@beam3_dev/api_module 0.0.184 → 0.0.185

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 V = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function me(e, t = void 0, n = void 0) {
38
- const s = parseInt(e);
37
+ async function me(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 me(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 ge(e, t = void 0, n = void 0) {
53
+ async function ge(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 ge(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 he(e, t = V) {
69
- let n = I.now().year;
70
- const s = e, i = [], r = (a) => {
69
+ let s = I.now().year;
70
+ const n = e, i = [], r = (a) => {
71
71
  for (let c in a)
72
72
  i.push({ date: c, comment: a[c] });
73
73
  };
74
- for (let a = n; a <= n + 1; a++)
74
+ for (let a = s; a <= s + 1; a++)
75
75
  await fetch(
76
76
  "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
77
77
  {
@@ -84,9 +84,9 @@ async function he(e, t = V) {
84
84
  r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
- const a = s.length === 0 ? {
87
+ const a = n.length === 0 ? {
88
88
  events: []
89
- } : s;
89
+ } : n;
90
90
  for (let c of i)
91
91
  a.events.findIndex(
92
92
  (p) => p.start === I.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
@@ -100,48 +100,48 @@ async function he(e, t = V) {
100
100
  return a;
101
101
  })();
102
102
  }
103
- async function Se(e, t, n = !0) {
104
- const s = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
103
+ async function Se(e, t, s = !0) {
104
+ const n = e.events.findIndex((i) => i.uuid === t.uuid);
105
+ 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;
106
106
  }
107
107
  function f(e, t) {
108
- O(["DS/WAFData/WAFData"], (n) => {
109
- n.authenticatedRequest(e, t);
108
+ O(["DS/WAFData/WAFData"], (s) => {
109
+ s.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function ye(e, t, n) {
113
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
- s.draggable(e, {
112
+ function ye(e, t, s) {
113
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
114
+ n.draggable(e, {
115
115
  data: t,
116
- start: n
116
+ start: s
117
117
  });
118
118
  });
119
119
  }
120
120
  function _e(e, t = void 0) {
121
- O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
122
- let s;
123
- s === void 0 && (s = n.createProxy({
121
+ O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
122
+ let n;
123
+ n === void 0 && (n = s.createProxy({
124
124
  widgetId: R.id,
125
125
  filteringMode: "WithFilteringServices"
126
- }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
126
+ }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
127
127
  });
128
128
  }
129
129
  function we(e, t) {
130
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
131
- n.droppable(e, {
130
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
131
+ s.droppable(e, {
132
132
  drop: t
133
133
  });
134
134
  });
135
135
  }
136
- async function Te(e, t = void 0, n = void 0) {
136
+ async function Ce(e, t = void 0, s = void 0) {
137
137
  await O(
138
138
  ["DS/i3DXCompassServices/i3DXCompassServices"],
139
- (s) => {
139
+ (n) => {
140
140
  (!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
141
- s.getPlatformServices({
141
+ n.getPlatformServices({
142
142
  platformId: e,
143
143
  onComplete: t,
144
- onFailure: n
144
+ onFailure: s
145
145
  })
146
146
  );
147
147
  }
@@ -150,41 +150,41 @@ async function Te(e, t = void 0, n = void 0) {
150
150
  function W() {
151
151
  let e = {};
152
152
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
153
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
153
+ const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
154
154
  "com.3ds.wp.passport.cors"
155
155
  );
156
156
  e = {
157
- tenant: n,
158
- user: s,
157
+ tenant: s,
158
+ user: n,
159
159
  appsConfiguration: i,
160
160
  appConf: r
161
161
  };
162
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
163
163
  }
164
- function T(e, t = void 0, n = void 0) {
164
+ function C(e, t = void 0, s = void 0) {
165
165
  if (e.tenant) {
166
- const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
- f(s, {
166
+ const n = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
+ f(n, {
168
168
  onComplete(i) {
169
169
  const r = typeof i == "string" ? JSON.parse(i) : i;
170
170
  if (r && "platforms" in r) {
171
171
  const o = r.platforms.find(
172
172
  (a) => a.id === e.tenant.toUpperCase()
173
173
  );
174
- t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
174
+ t && o ? t(o) : s && s("_getServiceUrl return listServiceUrl = undefined");
175
175
  } else
176
- n && n("_getServiceUrl return oResponse = undefined");
176
+ s && s("_getServiceUrl return oResponse = undefined");
177
177
  },
178
178
  onFailure(i) {
179
- n && n(i);
179
+ s && s(i);
180
180
  }
181
181
  });
182
182
  }
183
183
  }
184
- function Ce(e, t = void 0, n = void 0) {
184
+ function Te(e, t = void 0, s = void 0) {
185
185
  if (e.tenant) {
186
- const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
187
- f(s, {
186
+ const n = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
187
+ f(n, {
188
188
  onComplete(i) {
189
189
  const r = JSON.parse(i);
190
190
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
@@ -193,18 +193,18 @@ function Ce(e, t = void 0, n = void 0) {
193
193
  }
194
194
  },
195
195
  onFailure(i) {
196
- n && n(i);
196
+ s && s(i);
197
197
  }
198
198
  });
199
199
  }
200
200
  }
201
- function be(e, t, n) {
202
- const s = {
201
+ function be(e, t, s) {
202
+ const n = {
203
203
  base: `${e.space}`,
204
204
  uri: "/resources/AppsMngt/api/custom/applications",
205
205
  option: `?filter=${e.tenant}`
206
206
  // facultatif
207
- }, i = `${s.base}${s.uri}${s.option}`;
207
+ }, i = `${n.base}${n.uri}${n.option}`;
208
208
  f(i, {
209
209
  method: "GET",
210
210
  headers: {
@@ -220,33 +220,33 @@ function be(e, t, n) {
220
220
  },
221
221
  onFailure(r, o) {
222
222
  const a = r;
223
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
223
+ a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
224
224
  }
225
225
  });
226
226
  }
227
- function Oe(e, t = void 0, n = void 0) {
228
- let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
229
- f(s, {
227
+ function Oe(e, t = void 0, s = void 0) {
228
+ let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
229
+ f(n, {
230
230
  onComplete(i, r, o) {
231
231
  const a = JSON.parse(i);
232
232
  console.log("_AppMngt_get_users => ", a), t && t(a);
233
233
  },
234
234
  onFailure(i, r) {
235
235
  const o = i;
236
- o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
236
+ o.msg = r.errormsg, o.errCode = r.errorcode, s && s(o);
237
237
  }
238
238
  });
239
239
  }
240
- function $e(e, t, n = void 0, s = void 0) {
240
+ function $e(e, t, s = void 0, n = void 0) {
241
241
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
242
  f(i, {
243
243
  onComplete(r, o, a) {
244
244
  const c = JSON.parse(r);
245
- n && n(c);
245
+ s && s(c);
246
246
  },
247
247
  onFailure(r, o) {
248
248
  const a = r;
249
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
249
+ a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
250
250
  }
251
251
  });
252
252
  }
@@ -254,7 +254,7 @@ const F = {
254
254
  "Content-Type": "application/json",
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
257
- function ve(e, t, n = void 0, s = void 0) {
257
+ function ve(e, t, s = void 0, n = void 0) {
258
258
  const { space: i, currentUser: r } = e, a = `${i}${{
259
259
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
260
260
  }.URIUGr}`, c = {
@@ -274,16 +274,16 @@ function ve(e, t, n = void 0, s = void 0) {
274
274
  headers: F,
275
275
  data: JSON.stringify(c),
276
276
  onComplete(d) {
277
- n && n(JSON.parse(d));
277
+ s && s(JSON.parse(d));
278
278
  },
279
279
  onFailure(d, p) {
280
280
  console.log(d);
281
281
  const u = d;
282
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
282
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
283
283
  }
284
284
  });
285
285
  }
286
- function Ne(e, t, n = void 0, s = void 0) {
286
+ function Ne(e, t, s = void 0, n = void 0) {
287
287
  const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
288
288
  f(d, {
289
289
  opts: {
@@ -294,16 +294,16 @@ function Ne(e, t, n = void 0, s = void 0) {
294
294
  }
295
295
  },
296
296
  onComplete(m) {
297
- n && n(JSON.parse(m));
297
+ s && s(JSON.parse(m));
298
298
  },
299
299
  onFailure(m, l) {
300
300
  const g = m;
301
- g.msg = l.errormsg, g.errCode = l.errorcode, s && s(g);
301
+ g.msg = l.errormsg, g.errCode = l.errorcode, n && n(g);
302
302
  }
303
303
  });
304
304
  }
305
- function X(e, t = void 0, n = void 0) {
306
- const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
305
+ function X(e, t = void 0, s = void 0) {
306
+ const { space: n, tenant: i } = e, r = n, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
307
307
  method: "GET",
308
308
  Accept: "application/json,*/*,test/javascript"
309
309
  }, d = `${r}${o}${a}`;
@@ -314,12 +314,12 @@ function X(e, t = void 0, n = void 0) {
314
314
  },
315
315
  onFailure(p, u) {
316
316
  const m = p;
317
- m.msg = u.errormsg, m.errCode = u.errorcode, n && n(m);
317
+ m.msg = u.errormsg, m.errCode = u.errorcode, s && s(m);
318
318
  }
319
319
  });
320
320
  }
321
- function Ie(e, t = void 0, n = void 0) {
322
- const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
321
+ function Ie(e, t = void 0, s = void 0) {
322
+ const { space: n, currentUser: i } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
323
323
  "Content-Type": "application/json",
324
324
  Accept: "application/json,text/javascript,*/*"
325
325
  } };
@@ -336,13 +336,13 @@ function Ie(e, t = void 0, n = void 0) {
336
336
  m.rules = y, t && t(m);
337
337
  },
338
338
  (y) => {
339
- n && n(y);
339
+ s && s(y);
340
340
  }
341
341
  );
342
342
  }
343
343
  },
344
344
  onFailure(p) {
345
- n && n(p);
345
+ s && s(p);
346
346
  }
347
347
  });
348
348
  } catch (p) {
@@ -350,12 +350,12 @@ function Ie(e, t = void 0, n = void 0) {
350
350
  }
351
351
  }
352
352
  function Ae(e, t) {
353
- const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
353
+ const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
354
354
  f(i, {
355
355
  method: "DELETE"
356
356
  });
357
357
  }
358
- function Ue(e, t, n, s = void 0, i = void 0) {
358
+ function ke(e, t, s, n = void 0, i = void 0) {
359
359
  const { space: r, tenant: o } = e, a = {
360
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
361
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -364,36 +364,36 @@ function Ue(e, t, n, s = void 0, i = void 0) {
364
364
  nexURImem: "/members",
365
365
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
- }, c = n, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
367
+ }, c = s, d = `${r}${a.URIUGr}/${t}`, p = JSON.stringify(c);
368
368
  f(d, {
369
369
  headers: F,
370
370
  method: "PATCH",
371
371
  data: p,
372
372
  type: "json",
373
373
  onComplete(u) {
374
- s && s(u);
374
+ n && n(u);
375
375
  },
376
376
  onFailure(u) {
377
377
  i && i(u);
378
378
  }
379
379
  });
380
380
  }
381
- function ke(e, t, n, s = void 0, i = void 0) {
381
+ function Ue(e, t, s, n = void 0, i = void 0) {
382
382
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
383
  f(a, {
384
384
  method: "PATCH",
385
385
  headers: F,
386
- data: JSON.stringify(n),
386
+ data: JSON.stringify(s),
387
387
  type: "json",
388
388
  onComplete(d) {
389
- s && s(d);
389
+ n && n(d);
390
390
  },
391
391
  onFailure(d) {
392
392
  i && i(d);
393
393
  }
394
394
  });
395
395
  }
396
- function Fe(e, t, n = void 0, s = void 0) {
396
+ function Fe(e, t, s = void 0, n = void 0) {
397
397
  const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
398
  f(o, {
399
399
  opts: {
@@ -404,44 +404,44 @@ function Fe(e, t, n = void 0, s = void 0) {
404
404
  }
405
405
  },
406
406
  onComplete(d) {
407
- n && n(JSON.parse(d));
407
+ s && s(JSON.parse(d));
408
408
  },
409
409
  onFailure(d) {
410
- s && s(d);
410
+ n && n(d);
411
411
  }
412
412
  });
413
413
  }
414
- async function Y(e, t, n) {
414
+ async function Y(e, t, s) {
415
415
  if (e.space) {
416
- const s = `${e.space}/resources/v1/application/CSRF`;
417
- f(s, {
416
+ const n = `${e.space}/resources/v1/application/CSRF`;
417
+ f(n, {
418
418
  onComplete(i) {
419
419
  i = JSON.parse(i), t && t(i.csrf);
420
420
  },
421
421
  onFailure(i, r, o) {
422
- n && n({ error: i, headers: r, xhr: o });
422
+ s && s({ error: i, headers: r, xhr: o });
423
423
  }
424
424
  });
425
425
  }
426
426
  }
427
427
  var A = {};
428
- function z(e, t) {
428
+ function q(e, t) {
429
429
  return Object.prototype.hasOwnProperty.call(e, t);
430
430
  }
431
- var H = function(e, t, n, s) {
432
- t = t || "&", n = n || "=";
431
+ var z = function(e, t, s, n) {
432
+ t = t || "&", s = s || "=";
433
433
  var i = {};
434
434
  if (typeof e != "string" || e.length === 0)
435
435
  return i;
436
436
  var r = /\+/g;
437
437
  e = e.split(t);
438
438
  var o = 1e3;
439
- s && typeof s.maxKeys == "number" && (o = s.maxKeys);
439
+ n && typeof n.maxKeys == "number" && (o = n.maxKeys);
440
440
  var a = e.length;
441
441
  o > 0 && a > o && (a = o);
442
442
  for (var c = 0; c < a; ++c) {
443
- var d = e[c].replace(r, "%20"), p = d.indexOf(n), u, m, l, g;
444
- p >= 0 ? (u = d.substr(0, p), m = d.substr(p + 1)) : (u = d, m = ""), l = decodeURIComponent(u), g = decodeURIComponent(m), z(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
443
+ var d = e[c].replace(r, "%20"), p = d.indexOf(s), u, m, l, g;
444
+ p >= 0 ? (u = d.substr(0, p), m = d.substr(p + 1)) : (u = d, m = ""), l = decodeURIComponent(u), g = decodeURIComponent(m), q(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
445
445
  }
446
446
  return i;
447
447
  }, N = function(e) {
@@ -455,17 +455,17 @@ var H = function(e, t, n, s) {
455
455
  default:
456
456
  return "";
457
457
  }
458
- }, q = function(e, t, n, s) {
459
- return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
460
- var r = encodeURIComponent(N(i)) + n;
458
+ }, H = function(e, t, s, n) {
459
+ return t = t || "&", s = s || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
460
+ var r = encodeURIComponent(N(i)) + s;
461
461
  return Array.isArray(e[i]) ? e[i].map(function(o) {
462
462
  return r + encodeURIComponent(N(o));
463
463
  }).join(t) : r + encodeURIComponent(N(e[i]));
464
- }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
464
+ }).filter(Boolean).join(t) : n ? encodeURIComponent(N(n)) + s + encodeURIComponent(N(e)) : "";
465
465
  };
466
- A.decode = A.parse = H;
467
- A.encode = A.stringify = q;
468
- async function L(e, t = void 0, n = void 0, s = void 0) {
466
+ A.decode = A.parse = z;
467
+ A.encode = A.stringify = H;
468
+ async function L(e, t = void 0, s = void 0, n = void 0) {
469
469
  const i = e.space;
470
470
  if (t === void 0) {
471
471
  console.log("Le paramètre docid est obligatoire");
@@ -475,14 +475,14 @@ async function L(e, t = void 0, n = void 0, s = void 0) {
475
475
  f(r, {
476
476
  onComplete(o, a, c) {
477
477
  const d = JSON.parse(o);
478
- n && n(d);
478
+ s && s(d);
479
479
  },
480
480
  onFailure(o) {
481
- s && s(o);
481
+ n && n(o);
482
482
  }
483
483
  });
484
484
  }
485
- async function Pe(e, t = void 0, n = void 0, s = void 0) {
485
+ async function je(e, t = void 0, s = void 0, n = void 0) {
486
486
  const i = e.space;
487
487
  if (t === void 0) {
488
488
  console.log("Le paramètre docids est obligatoire");
@@ -499,46 +499,46 @@ async function Pe(e, t = void 0, n = void 0, s = void 0) {
499
499
  data: o,
500
500
  onComplete(a, c, d) {
501
501
  const p = JSON.parse(a);
502
- n && n(p);
502
+ s && s(p);
503
503
  },
504
504
  onFailure(a) {
505
- s && s(a);
505
+ n && n(a);
506
506
  }
507
507
  });
508
508
  }
509
- function U(e, t = void 0, n = void 0) {
509
+ function k(e, t = void 0, s = void 0) {
510
510
  if (e.objID && e.objID !== "") {
511
- let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
512
- f(s, {
511
+ let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
512
+ f(n, {
513
513
  onComplete(i, r, o) {
514
514
  const a = JSON.parse(i);
515
515
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
516
516
  },
517
517
  onFailure(i) {
518
- n && n(i);
518
+ s && s(i);
519
519
  }
520
520
  });
521
521
  } else
522
522
  b(
523
523
  e,
524
- (s) => {
525
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
524
+ (n) => {
525
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
526
526
  },
527
- (s) => {
528
- n && n(s);
527
+ (n) => {
528
+ s && s(n);
529
529
  }
530
530
  );
531
531
  }
532
- function b(e, t = void 0, n = void 0) {
532
+ function b(e, t = void 0, s = void 0) {
533
533
  if (e.space) {
534
- const s = e.space + "/resources/v1/application/CSRF";
535
- f(s, {
534
+ const n = e.space + "/resources/v1/application/CSRF";
535
+ f(n, {
536
536
  onComplete(i, r, o) {
537
537
  const a = JSON.parse(i);
538
538
  t && t(a.csrf.value);
539
539
  },
540
540
  onFailure(i, r, o) {
541
- n && n({
541
+ s && s({
542
542
  response: i,
543
543
  headers: r,
544
544
  xhr: o
@@ -546,14 +546,14 @@ function b(e, t = void 0, n = void 0) {
546
546
  }
547
547
  });
548
548
  } else
549
- n && n("ERROR : url du 3DSpace non défini.");
549
+ s && s("ERROR : url du 3DSpace non défini.");
550
550
  }
551
- function P(e, t = void 0, n = void 0) {
552
- let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
553
- U(
551
+ function j(e, t = void 0, s = void 0) {
552
+ let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
553
+ k(
554
554
  e,
555
555
  (i) => {
556
- f(s, {
556
+ f(n, {
557
557
  method: "PUT",
558
558
  headers: {
559
559
  ENO_CSRF_TOKEN: e.token
@@ -563,28 +563,28 @@ function P(e, t = void 0, n = void 0) {
563
563
  t && t(c, o);
564
564
  },
565
565
  onFailure(r, o) {
566
- console.warn("☠️ error => ", r, o), n && n(r, o);
566
+ console.warn("☠️ error => ", r, o), s && s(r, o);
567
567
  }
568
568
  });
569
569
  },
570
570
  (i) => {
571
- console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
571
+ console.warn("_3DSpace_get_ticket / error => ", i), s && s(i);
572
572
  }
573
573
  );
574
574
  }
575
- function je(e, t, n, s = void 0, i = void 0) {
575
+ function Pe(e, t, s, n = void 0, i = void 0) {
576
576
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
577
- n || (n = e.token), f(r, {
577
+ s || (s = e.token), f(r, {
578
578
  method: "PUT",
579
579
  headers: {
580
- ENO_CSRF_TOKEN: n
580
+ ENO_CSRF_TOKEN: s
581
581
  },
582
582
  onComplete(o) {
583
583
  let a = JSON.parse(o);
584
584
  if (console.log("☠️ info => ", a), a.success === !0)
585
585
  try {
586
586
  const c = a.data[0].dataelements.ticketURL;
587
- s && s(c);
587
+ n && n(c);
588
588
  } catch (c) {
589
589
  i && i(c);
590
590
  }
@@ -594,18 +594,18 @@ function je(e, t, n, s = void 0, i = void 0) {
594
594
  }
595
595
  });
596
596
  }
597
- function M(e, t, n, s, i, r = void 0, o = void 0) {
597
+ function M(e, t, s, n, i, r = void 0, o = void 0) {
598
598
  const a = () => Q(
599
599
  e,
600
600
  t,
601
- n,
602
601
  s,
602
+ n,
603
603
  i,
604
604
  e.token,
605
605
  r,
606
606
  o
607
607
  );
608
- e.token ? a() : U(
608
+ e.token ? a() : k(
609
609
  e,
610
610
  t,
611
611
  (c) => {
@@ -613,7 +613,7 @@ function M(e, t, n, s, i, r = void 0, o = void 0) {
613
613
  }
614
614
  );
615
615
  }
616
- function Q(e, t, n, s, i, r, o = void 0, a = void 0) {
616
+ function Q(e, t, s, n, i, r, o = void 0, a = void 0) {
617
617
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
618
618
  f(c, {
619
619
  method: "PUT",
@@ -623,7 +623,7 @@ function Q(e, t, n, s, i, r, o = void 0, a = void 0) {
623
623
  onComplete(d, p, u) {
624
624
  const m = JSON.parse(d).csrf, l = JSON.parse(d).data[0].dataelements, g = new FormData();
625
625
  let h;
626
- s instanceof Blob ? h = s : h = new Blob([s], {
626
+ n instanceof Blob ? h = n : h = new Blob([n], {
627
627
  type: "text/plain"
628
628
  }), g.append("__fcs__jobTicket", l.ticket), g.append("file_0", h, i);
629
629
  const S = {};
@@ -662,9 +662,9 @@ function Q(e, t, n, s, i, r, o = void 0, a = void 0) {
662
662
  onFailure(v) {
663
663
  a && a(v);
664
664
  }
665
- }, C = e.tenant.toUpperCase();
665
+ }, T = e.tenant.toUpperCase();
666
666
  f(
667
- e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${C}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
667
+ e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${T}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
668
668
  _
669
669
  );
670
670
  }, S.onFailure = function(y) {
@@ -673,7 +673,7 @@ function Q(e, t, n, s, i, r, o = void 0, a = void 0) {
673
673
  }
674
674
  });
675
675
  }
676
- async function xe(e, t, n, s = void 0, i = void 0) {
676
+ async function xe(e, t, s, n = void 0, i = void 0) {
677
677
  e.space, e.token, e.ctx, L(
678
678
  e,
679
679
  t,
@@ -683,10 +683,10 @@ async function xe(e, t, n, s = void 0, i = void 0) {
683
683
  e,
684
684
  t,
685
685
  o,
686
- n,
686
+ s,
687
687
  a,
688
688
  (c) => {
689
- s && s(c);
689
+ n && n(c);
690
690
  },
691
691
  (c) => {
692
692
  i && i(c);
@@ -698,7 +698,7 @@ async function xe(e, t, n, s = void 0, i = void 0) {
698
698
  }
699
699
  );
700
700
  }
701
- async function Re(e, t, n, s, i = void 0, r = void 0) {
701
+ async function Re(e, t, s, n, i = void 0, r = void 0) {
702
702
  const o = e.space, a = e.token, c = e.ctx;
703
703
  if (o !== "") {
704
704
  let d = `${o}/resources/v1/modeler/documents/files/CheckinTicket`;
@@ -711,13 +711,13 @@ async function Re(e, t, n, s, i = void 0, r = void 0) {
711
711
  let l = JSON.parse(p).data[0].dataelements, g = new FormData(), h;
712
712
  t instanceof Blob ? h = t : h = new Blob([t], {
713
713
  type: "text/plain"
714
- }), g.append("__fcs__jobTicket", l.ticket), g.append("filename", h, n);
714
+ }), g.append("__fcs__jobTicket", l.ticket), g.append("filename", h, s);
715
715
  const S = (_) => _.indexOf(".") === -1 ? _ : _.split(".").slice(0, -1).join(".");
716
716
  let y = {
717
717
  method: "POST",
718
718
  data: g,
719
719
  onComplete(_) {
720
- let C = D(), v = {
720
+ let T = D(), v = {
721
721
  method: "POST",
722
722
  headers: {
723
723
  ENO_CSRF_TOKEN: a,
@@ -729,30 +729,30 @@ async function Re(e, t, n, s, i = void 0, r = void 0) {
729
729
  {
730
730
  type: "Document",
731
731
  dataelements: {
732
- title: S(n),
733
- description: s,
732
+ title: S(s),
733
+ description: n,
734
734
  policy: "Document Release"
735
735
  },
736
736
  relateddata: {
737
737
  files: [
738
738
  {
739
739
  dataelements: {
740
- title: n,
740
+ title: s,
741
741
  receipt: _
742
742
  }
743
743
  }
744
744
  ]
745
745
  },
746
- tempId: C
746
+ tempId: T
747
747
  }
748
748
  ]
749
749
  }),
750
750
  type: "json",
751
- onComplete(k) {
752
- i && i(k);
751
+ onComplete(U) {
752
+ i && i(U);
753
753
  },
754
- onFailure(k) {
755
- r && r(k);
754
+ onFailure(U) {
755
+ r && r(U);
756
756
  }
757
757
  };
758
758
  f(
@@ -770,7 +770,7 @@ async function Re(e, t, n, s, i = void 0, r = void 0) {
770
770
  });
771
771
  }
772
772
  }
773
- function $(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
773
+ function $(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, o = !1) {
774
774
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
775
775
  f(a, {
776
776
  method: "GET",
@@ -784,25 +784,25 @@ function $(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
784
784
  let h = g.couples;
785
785
  h = h.filter(
786
786
  (S, y, _) => y === _.findIndex(
787
- (C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
787
+ (T) => T.organization.pid === S.organization.pid && T.role.pid === S.role.pid
788
788
  )
789
- ), n && (Array.isArray(n) ? n.forEach((S) => {
789
+ ), s && (Array.isArray(s) ? s.forEach((S) => {
790
790
  l || h.forEach((y) => {
791
- if (S === y.role.name && s === y.organization.title)
792
- l = S, m = s;
791
+ if (S === y.role.name && n === y.organization.title)
792
+ l = S, m = n;
793
793
  else if (S === y.role.name) {
794
794
  let _ = h.filter(
795
- (C) => C.role.name === S
795
+ (T) => T.role.name === S
796
796
  );
797
797
  _.length === 1 ? (l = _[0].role.name, m = _[0].organization.title) : r(_);
798
798
  }
799
799
  });
800
800
  }) : h.forEach((S) => {
801
- if (n === S.role.name && s === S.organization.title)
802
- l = n, m = s;
803
- else if (n === S.role.name) {
801
+ if (s === S.role.name && n === S.organization.title)
802
+ l = s, m = n;
803
+ else if (s === S.role.name) {
804
804
  let y = h.filter(
805
- (_) => _.role.name === n
805
+ (_) => _.role.name === s
806
806
  );
807
807
  y.length === 1 ? (l = y[0].role.name, m = y[0].organization.title) : r(y);
808
808
  }
@@ -819,29 +819,29 @@ function $(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
819
819
  }
820
820
  });
821
821
  }
822
- async function J(e, t = void 0, n = void 0) {
822
+ async function J(e, t = void 0, s = void 0) {
823
823
  return (!e.objID || e.objID === "") && (console.warn(
824
824
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
825
- ), n && n(
825
+ ), s && s(
826
826
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
827
827
  )), (e.space === "" || !e.space) && (console.warn(
828
828
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
829
- ), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && Y(
829
+ ), s && s("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && Y(
830
830
  e,
831
- (s) => {
832
- e.token = s;
831
+ (n) => {
832
+ e.token = n;
833
833
  },
834
- (s) => {
835
- console.log("☠️ error => ", s);
834
+ (n) => {
835
+ console.log("☠️ error => ", n);
836
836
  }
837
- ), new Promise((s, i) => {
838
- P(
837
+ ), new Promise((n, i) => {
838
+ j(
839
839
  e,
840
840
  (r) => {
841
841
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
842
842
  t && t(o);
843
843
  }).catch((o) => {
844
- n && n(o);
844
+ s && s(o);
845
845
  })) : f(r, {
846
846
  onComplete(o) {
847
847
  let a;
@@ -850,10 +850,10 @@ async function J(e, t = void 0, n = void 0) {
850
850
  } catch {
851
851
  a = o;
852
852
  }
853
- t && typeof t == "function" && t(a), s(a);
853
+ t && typeof t == "function" && t(a), n(a);
854
854
  },
855
855
  onFailure(o, a, c) {
856
- n && (console.log("error http", o), n({
856
+ s && (console.log("error http", o), s({
857
857
  msg: JSON.parse(o),
858
858
  headers: a,
859
859
  xhr: c
@@ -866,12 +866,12 @@ async function J(e, t = void 0, n = void 0) {
866
866
  });
867
867
  },
868
868
  (r) => {
869
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
869
+ s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
870
870
  }
871
871
  );
872
872
  });
873
873
  }
874
- async function Z(e, t, n = void 0, s = void 0) {
874
+ async function Z(e, t, s = void 0, n = void 0) {
875
875
  let i = [];
876
876
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
877
877
  for (let a = 0; a < t.length; a += 80) {
@@ -886,7 +886,7 @@ async function Z(e, t, n = void 0, s = void 0) {
886
886
  a++, a < i.length && o(a);
887
887
  },
888
888
  (c) => {
889
- n && n(c);
889
+ s && s(c);
890
890
  }
891
891
  );
892
892
  };
@@ -894,11 +894,11 @@ async function Z(e, t, n = void 0, s = void 0) {
894
894
  } else
895
895
  console.warn(
896
896
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
897
- ), s && s(
897
+ ), n && n(
898
898
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
899
899
  );
900
900
  }
901
- function ee(e, t, n = void 0, s = void 0, i = void 0) {
901
+ function ee(e, t, s = void 0, n = void 0, i = void 0) {
902
902
  const r = [];
903
903
  t.forEach((c) => {
904
904
  r.push({
@@ -919,7 +919,7 @@ function ee(e, t, n = void 0, s = void 0, i = void 0) {
919
919
  type: "json",
920
920
  onComplete(c) {
921
921
  const d = c.data;
922
- c.success === !0 && (n && n(), d.forEach((p) => {
922
+ c.success === !0 && (s && s(), d.forEach((p) => {
923
923
  try {
924
924
  const u = p.dataelements.fileName, m = p.dataelements.ticketURL;
925
925
  f(m, {
@@ -930,7 +930,7 @@ function ee(e, t, n = void 0, s = void 0, i = void 0) {
930
930
  } catch {
931
931
  h = l.blob();
932
932
  }
933
- s && s({
933
+ n && n({
934
934
  objectId: p.id,
935
935
  headers: g,
936
936
  fileName: u,
@@ -951,7 +951,7 @@ function ee(e, t, n = void 0, s = void 0, i = void 0) {
951
951
  }
952
952
  });
953
953
  }
954
- function De(e, t, n = void 0, s = void 0) {
954
+ function De(e, t, s = void 0, n = void 0) {
955
955
  return new Promise((i) => {
956
956
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
957
957
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
@@ -982,17 +982,17 @@ function De(e, t, n = void 0, s = void 0) {
982
982
  }),
983
983
  type: "json",
984
984
  onComplete(a) {
985
- n && n(a);
985
+ s && s(a);
986
986
  },
987
987
  onFailure(a) {
988
- s && s(a);
988
+ n && n(a);
989
989
  }
990
990
  };
991
991
  f(r, o);
992
992
  }
993
993
  });
994
994
  }
995
- function Le(e, t, n, s = void 0, i = void 0) {
995
+ function Le(e, t, s, n = void 0, i = void 0) {
996
996
  return new Promise((r) => {
997
997
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
998
998
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -1018,13 +1018,13 @@ function Le(e, t, n, s = void 0, i = void 0) {
1018
1018
  data: [
1019
1019
  {
1020
1020
  id: t,
1021
- nextState: n
1021
+ nextState: s
1022
1022
  }
1023
1023
  ]
1024
1024
  }),
1025
1025
  type: "json",
1026
1026
  onComplete(c) {
1027
- s && s(c);
1027
+ n && n(c);
1028
1028
  },
1029
1029
  onFailure(c) {
1030
1030
  i && i(c);
@@ -1034,7 +1034,7 @@ function Le(e, t, n, s = void 0, i = void 0) {
1034
1034
  }
1035
1035
  });
1036
1036
  }
1037
- function Me(e, t, n = void 0, s = void 0) {
1037
+ function Me(e, t, s = void 0, n = void 0) {
1038
1038
  return new Promise((i) => {
1039
1039
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1040
1040
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
@@ -1065,17 +1065,17 @@ function Me(e, t, n = void 0, s = void 0) {
1065
1065
  }),
1066
1066
  type: "json",
1067
1067
  onComplete(a) {
1068
- n && n(a);
1068
+ s && s(a);
1069
1069
  },
1070
1070
  onFailure(a) {
1071
- s && s(a);
1071
+ n && n(a);
1072
1072
  }
1073
1073
  };
1074
1074
  f(r, o);
1075
1075
  }
1076
1076
  });
1077
1077
  }
1078
- function Je(e, t, n = void 0, s = void 0) {
1078
+ function Je(e, t, s = void 0, n = void 0) {
1079
1079
  return new Promise((i) => {
1080
1080
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1081
1081
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
@@ -1112,17 +1112,17 @@ function Je(e, t, n = void 0, s = void 0) {
1112
1112
  }),
1113
1113
  type: "json",
1114
1114
  onComplete(a) {
1115
- n && n(a);
1115
+ s && s(a);
1116
1116
  },
1117
1117
  onFailure(a) {
1118
- s && s(a);
1118
+ n && n(a);
1119
1119
  }
1120
1120
  };
1121
1121
  f(r, o);
1122
1122
  }
1123
1123
  });
1124
1124
  }
1125
- function Ge(e, t, n, s = void 0, i = void 0) {
1125
+ function Ge(e, t, s, n = void 0, i = void 0) {
1126
1126
  return new Promise((r) => {
1127
1127
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1128
1128
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
@@ -1148,9 +1148,9 @@ function Ge(e, t, n, s = void 0, i = void 0) {
1148
1148
  data: [
1149
1149
  {
1150
1150
  physicalid: t,
1151
- proposedRevision: n,
1151
+ proposedRevision: s,
1152
1152
  modifiedAttributes: {
1153
- revision: n
1153
+ revision: s
1154
1154
  }
1155
1155
  }
1156
1156
  ],
@@ -1159,7 +1159,7 @@ function Ge(e, t, n, s = void 0, i = void 0) {
1159
1159
  }),
1160
1160
  type: "json",
1161
1161
  onComplete(c) {
1162
- s && s(c);
1162
+ n && n(c);
1163
1163
  },
1164
1164
  onFailure(c) {
1165
1165
  i && i(c);
@@ -1169,13 +1169,13 @@ function Ge(e, t, n, s = void 0, i = void 0) {
1169
1169
  }
1170
1170
  });
1171
1171
  }
1172
- function Ee(e, t, n, s, i = void 0, r = void 0) {
1172
+ function Ee(e, t, s, n, i = void 0, r = void 0) {
1173
1173
  return new Promise((o) => {
1174
1174
  const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1175
1175
  let c = {
1176
1176
  attributes: {
1177
- title: n,
1178
- description: s,
1177
+ title: s,
1178
+ description: n,
1179
1179
  inheritedAccess: "no"
1180
1180
  }
1181
1181
  }, d = {
@@ -1202,7 +1202,7 @@ function Ee(e, t, n, s, i = void 0, r = void 0) {
1202
1202
  f(a, p);
1203
1203
  });
1204
1204
  }
1205
- function Ke(e, t, n, s, i = void 0, r = void 0) {
1205
+ function Ke(e, t, s, n, i = void 0, r = void 0) {
1206
1206
  return console.log("credentials", e), new Promise((o) => {
1207
1207
  `${e.space}`, JSON.stringify({
1208
1208
  csrf: {
@@ -1216,8 +1216,8 @@ function Ke(e, t, n, s, i = void 0, r = void 0) {
1216
1216
  relId: t,
1217
1217
  id: t,
1218
1218
  dataelements: {
1219
- personList: n,
1220
- eventsList: s
1219
+ personList: s,
1220
+ eventsList: n
1221
1221
  },
1222
1222
  tenant: e.tenant
1223
1223
  }
@@ -1226,12 +1226,12 @@ function Ke(e, t, n, s, i = void 0, r = void 0) {
1226
1226
  });
1227
1227
  }
1228
1228
  //!SECTION
1229
- function Be(e, t = void 0, n = void 0) {
1230
- const s = {
1229
+ function Be(e, t = void 0, s = void 0) {
1230
+ const n = {
1231
1231
  base: `${e.space}`,
1232
1232
  uri: "/resources/bps/cspaces",
1233
1233
  optTenant: `tenant=${e.tenant}`
1234
- }, i = `${s.base}${s.uri}?${s.optTenant}`;
1234
+ }, i = `${n.base}${n.uri}?${n.optTenant}`;
1235
1235
  f(i, {
1236
1236
  method: "GET",
1237
1237
  headers: {
@@ -1243,54 +1243,54 @@ function Be(e, t = void 0, n = void 0) {
1243
1243
  t && t(a, o);
1244
1244
  },
1245
1245
  onFailure(r, o, a) {
1246
- n && n({ response: r, headers: o, xhr: a });
1246
+ s && s({ response: r, headers: o, xhr: a });
1247
1247
  }
1248
1248
  });
1249
1249
  }
1250
- function Ve(e, t, n, s) {
1251
- P(
1250
+ function Ve(e, t, s, n) {
1251
+ j(
1252
1252
  e.space,
1253
1253
  t,
1254
1254
  (i) => {
1255
1255
  f(i, {
1256
1256
  header: { ENO_CSRF_TOKEN: e.token },
1257
1257
  onComplete: (r) => {
1258
- n && n(r);
1258
+ s && s(r);
1259
1259
  },
1260
1260
  onFailure: (r) => {
1261
- console.log("error http", r), s && s(r);
1261
+ console.log("error http", r), n && n(r);
1262
1262
  }
1263
1263
  });
1264
1264
  }
1265
1265
  );
1266
1266
  }
1267
- async function We(e, t, n = void 0, s = void 0) {
1267
+ async function We(e, t, s = void 0, n = void 0) {
1268
1268
  return new Promise((i) => {
1269
- P(e, t, (r) => {
1269
+ j(e, t, (r) => {
1270
1270
  f(r, {
1271
- onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1271
+ onComplete: (o, a, c) => (i(JSON.parse(o)), s && s(JSON.parse(o), a, c), i),
1272
1272
  onFailure: (o, a, c) => {
1273
- s && s(o, a, c), console.log(o, a?.errormsg);
1273
+ n && n(o, a, c), console.log(o, a?.errormsg);
1274
1274
  }
1275
1275
  });
1276
1276
  });
1277
1277
  });
1278
1278
  }
1279
- function Xe(e, t, n, s = void 0, i = void 0) {
1279
+ function Xe(e, t, s, n = void 0, i = void 0) {
1280
1280
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1281
- U(
1281
+ k(
1282
1282
  e,
1283
- n,
1283
+ s,
1284
1284
  (o) => {
1285
1285
  const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1286
1286
  M(
1287
1287
  e,
1288
- n,
1288
+ s,
1289
1289
  a,
1290
1290
  r,
1291
1291
  c,
1292
1292
  (d) => {
1293
- s && s(d);
1293
+ n && n(d);
1294
1294
  },
1295
1295
  (d) => {
1296
1296
  i && i(d);
@@ -1300,40 +1300,40 @@ function Xe(e, t, n, s = void 0, i = void 0) {
1300
1300
  );
1301
1301
  }
1302
1302
  let G, E;
1303
- const j = [];
1304
- async function Ye(e, t = void 0, n = void 0) {
1305
- e.objID && e.objID !== "" ? U(
1303
+ const P = [];
1304
+ async function Ye(e, t = void 0, s = void 0) {
1305
+ e.objID && e.objID !== "" ? k(
1306
1306
  e,
1307
- (s) => {
1308
- t && t(s);
1307
+ (n) => {
1308
+ t && t(n);
1309
1309
  },
1310
- (s) => {
1311
- n && n(s);
1310
+ (n) => {
1311
+ s && s(n);
1312
1312
  }
1313
1313
  ) : (e.objID === null || e.objID === "") && b(
1314
1314
  e,
1315
- (s) => {
1316
- t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1315
+ (n) => {
1316
+ t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1317
1317
  },
1318
- (s) => {
1319
- n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1318
+ (n) => {
1319
+ s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1320
1320
  }
1321
1321
  );
1322
1322
  }
1323
- async function ze(e, t = void 0, n = void 0) {
1323
+ async function qe(e, t = void 0, s = void 0) {
1324
1324
  console.log("getDatasByTenant (getDocuments)", e), await J(
1325
1325
  e,
1326
- (s) => {
1326
+ (n) => {
1327
1327
  const i = {};
1328
- i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1328
+ i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1329
1329
  },
1330
- (s) => {
1331
- n && n?.(s);
1330
+ (n) => {
1331
+ s && s?.(n);
1332
1332
  }
1333
1333
  );
1334
1334
  }
1335
- function He(e, t = void 0, n = void 0) {
1336
- const s = [];
1335
+ function ze(e, t = void 0, s = void 0) {
1336
+ const n = [];
1337
1337
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1338
1338
  console.warn("la liste est vide ou n'est pas un tableau");
1339
1339
  return;
@@ -1343,21 +1343,21 @@ function He(e, t = void 0, n = void 0) {
1343
1343
  e,
1344
1344
  i.objID,
1345
1345
  (o) => {
1346
- s.push({ [i.name]: o }), i.name === "dbProjets" && (G = o.affaires.map((a) => a.objectID), te(e, E)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1346
+ n.push({ [i.name]: o }), i.name === "dbProjets" && (G = o.affaires.map((a) => a.objectID), te(e, E)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1347
1347
  }
1348
1348
  );
1349
1349
  });
1350
1350
  }
1351
- function te(e, t, n = void 0, s = void 0) {
1351
+ function te(e, t, s = void 0, n = void 0) {
1352
1352
  Z(
1353
1353
  e,
1354
1354
  G,
1355
1355
  (i) => {
1356
1356
  const r = [...t];
1357
- r.find((o) => o.objectID === i.objectId).data = i.data, E = r, j.push(i.data), n && n(j);
1357
+ r.find((o) => o.objectID === i.objectId).data = i.data, E = r, P.push(i.data), s && s(P);
1358
1358
  },
1359
1359
  (i) => {
1360
- s && (s(i), console.log(i));
1360
+ n && (n(i), console.log(i));
1361
1361
  }
1362
1362
  );
1363
1363
  }
@@ -1381,7 +1381,7 @@ const ne = "FA35FB9B177A280065800EA0000F599C", se = [
1381
1381
  order_by: "desc",
1382
1382
  tag: "testTag"
1383
1383
  };
1384
- function qe(e, t, n = void 0, s = void 0) {
1384
+ function He(e, t, s = void 0, n = void 0) {
1385
1385
  const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1386
1386
  uri: "/resources/6w/tags",
1387
1387
  otpCTX: "SecurityContext=preferred",
@@ -1421,27 +1421,27 @@ function qe(e, t, n = void 0, s = void 0) {
1421
1421
  e,
1422
1422
  t,
1423
1423
  (_) => {
1424
- n && n(_);
1424
+ s && s(_);
1425
1425
  },
1426
1426
  (_) => {
1427
- s && s(_);
1427
+ n && n(_);
1428
1428
  }
1429
1429
  );
1430
1430
  },
1431
1431
  (g, h) => {
1432
1432
  const S = g;
1433
- S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
1433
+ S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
1434
1434
  }
1435
1435
  );
1436
1436
  }, 2e3);
1437
1437
  },
1438
1438
  onFailure(m, l) {
1439
1439
  const g = m;
1440
- g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1440
+ g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
1441
1441
  }
1442
1442
  });
1443
1443
  }
1444
- function ae(e, t, n = void 0, s = void 0) {
1444
+ function ae(e, t, s = void 0, n = void 0) {
1445
1445
  console.log("obj ", t);
1446
1446
  const i = t.info.name, r = {
1447
1447
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1516,15 +1516,15 @@ function ae(e, t, n = void 0, s = void 0) {
1516
1516
  data: JSON.stringify(d),
1517
1517
  onComplete(p) {
1518
1518
  const u = JSON.parse(p);
1519
- n(u);
1519
+ s(u);
1520
1520
  },
1521
1521
  onFailure(p, u) {
1522
1522
  const m = p;
1523
- m.msg = u.errormsg, m.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", m), s && s(m), console.log("Erreur de recuperation d'id du doc et des tags", p);
1523
+ m.msg = u.errormsg, m.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", m), n && n(m), console.log("Erreur de recuperation d'id du doc et des tags", p);
1524
1524
  }
1525
1525
  });
1526
1526
  }
1527
- function Qe(e, t, n = void 0, s = void 0) {
1527
+ function Qe(e, t, s = void 0, n = void 0) {
1528
1528
  const { objId: i, pred: r, tag: o } = t, a = {
1529
1529
  uri: "/resources/6w/tags",
1530
1530
  otpCTX: "SecurityContext=preferred",
@@ -1552,15 +1552,15 @@ function Qe(e, t, n = void 0, s = void 0) {
1552
1552
  Accept: "application/json,text/javascript,*/*"
1553
1553
  },
1554
1554
  onComplete(p) {
1555
- n && n(p);
1555
+ s && s(p);
1556
1556
  },
1557
1557
  onFailure(p, u) {
1558
1558
  const m = p;
1559
- m.msg = u.errormsg, m.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", m), s && s(m);
1559
+ m.msg = u.errormsg, m.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", m), n && n(m);
1560
1560
  }
1561
1561
  });
1562
1562
  }
1563
- function Ze(e, t = "", n = void 0, s = void 0) {
1563
+ function Ze(e, t = "", s = void 0, n = void 0) {
1564
1564
  const { space: i } = e;
1565
1565
  if (t === "")
1566
1566
  return;
@@ -1575,29 +1575,29 @@ function Ze(e, t = "", n = void 0, s = void 0) {
1575
1575
  headers: o,
1576
1576
  data: c,
1577
1577
  onComplete(d) {
1578
- n && n(JSON.parse(d));
1578
+ s && s(JSON.parse(d));
1579
1579
  },
1580
1580
  onFailure(d, p) {
1581
1581
  const u = d;
1582
- u.msg = p.error, s && s(u);
1582
+ u.msg = p.error, n && n(u);
1583
1583
  }
1584
1584
  });
1585
1585
  }
1586
- async function w(e, t = void 0, n = void 0) {
1587
- const s = e.space + "/api/index/tk";
1588
- return f(s, {
1586
+ async function w(e, t = void 0, s = void 0) {
1587
+ const n = e.space + "/api/index/tk";
1588
+ return f(n, {
1589
1589
  onComplete(i, r, o) {
1590
1590
  const a = JSON.parse(i);
1591
1591
  if (t)
1592
1592
  return t(a), e.token = a?.result?.ServerToken;
1593
1593
  },
1594
1594
  onFailure(i) {
1595
- n && n(i);
1595
+ s && s(i);
1596
1596
  }
1597
1597
  });
1598
1598
  }
1599
- function et(e, t = void 0, n = void 0) {
1600
- const s = `${e.space}/api/exalead/whatsnew`, i = {
1599
+ function et(e, t = void 0, s = void 0) {
1600
+ const n = `${e.space}/api/exalead/whatsnew`, i = {
1601
1601
  params: {
1602
1602
  community_id: null,
1603
1603
  hash_key: null,
@@ -1608,7 +1608,7 @@ function et(e, t = void 0, n = void 0) {
1608
1608
  }
1609
1609
  };
1610
1610
  w(e, (r) => {
1611
- f(s, {
1611
+ f(n, {
1612
1612
  method: "POST",
1613
1613
  headers: {
1614
1614
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1621,13 +1621,13 @@ function et(e, t = void 0, n = void 0) {
1621
1621
  t && t(o, a);
1622
1622
  },
1623
1623
  onFailure(o, a) {
1624
- n && n(o, a);
1624
+ s && s(o, a);
1625
1625
  }
1626
1626
  });
1627
1627
  });
1628
1628
  }
1629
- function tt(e, t = void 0, n = void 0) {
1630
- const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1629
+ function tt(e, t = void 0, s = void 0) {
1630
+ const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1631
1631
  params: {
1632
1632
  idsToFilterArr: [],
1633
1633
  mode: "offline",
@@ -1637,7 +1637,7 @@ function tt(e, t = void 0, n = void 0) {
1637
1637
  }
1638
1638
  };
1639
1639
  w(e, (r) => {
1640
- f(s, {
1640
+ f(n, {
1641
1641
  method: "POST",
1642
1642
  headers: {
1643
1643
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1651,18 +1651,18 @@ function tt(e, t = void 0, n = void 0) {
1651
1651
  t && t(c, o);
1652
1652
  },
1653
1653
  onFailure(o, a) {
1654
- n && n(o, a);
1654
+ s && s(o, a);
1655
1655
  }
1656
1656
  });
1657
1657
  });
1658
1658
  }
1659
- function nt(e, t = void 0, n = void 0) {
1660
- const s = {
1659
+ function nt(e, t = void 0, s = void 0) {
1660
+ const n = {
1661
1661
  base: e.space,
1662
1662
  uri: "/api/community/listmycommunities",
1663
1663
  limit: `/limit/${e.limit ? e.limit : 128}`,
1664
1664
  page: `/page/${e.page ? e.page : "1"}`
1665
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1665
+ }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1666
1666
  w(e, (o) => {
1667
1667
  f(i, {
1668
1668
  method: "GET",
@@ -1687,18 +1687,18 @@ function nt(e, t = void 0, n = void 0) {
1687
1687
  (h) => {
1688
1688
  m++, g.members = h, r.push(g), m === u.length && t && t(r);
1689
1689
  },
1690
- (h) => n(h)
1690
+ (h) => s(h)
1691
1691
  );
1692
1692
  });
1693
1693
  },
1694
1694
  onFailure(a, c) {
1695
1695
  const d = a;
1696
- d.status = c.status, d.response = c.errormsg, n && n(d);
1696
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1697
1697
  }
1698
1698
  });
1699
1699
  });
1700
1700
  }
1701
- function oe(e, t, n, s) {
1701
+ function oe(e, t, s, n) {
1702
1702
  const i = `${e.space}/api/community/listmembers`, r = {
1703
1703
  params: {
1704
1704
  page: e.page ? e.page : 1,
@@ -1717,18 +1717,18 @@ function oe(e, t, n, s) {
1717
1717
  data: JSON.stringify(r),
1718
1718
  type: "json",
1719
1719
  onComplete(a, c, d) {
1720
- n && n(a);
1720
+ s && s(a);
1721
1721
  },
1722
1722
  onFailure(a, c) {
1723
1723
  const d = a;
1724
- d.status = c.status, d.response = c.errormsg, s && s(d);
1724
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1725
1725
  }
1726
1726
  });
1727
1727
  });
1728
1728
  }
1729
- function st(e, t = void 0, n = void 0) {
1730
- const s = "YXdA5x4DSUKtlAi2wmnyTA";
1731
- e.commu_id || (e.commu_id = s);
1729
+ function st(e, t = void 0, s = void 0) {
1730
+ const n = "YXdA5x4DSUKtlAi2wmnyTA";
1731
+ e.commu_id || (e.commu_id = n);
1732
1732
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1733
1733
  w(e, (r) => {
1734
1734
  f(i, {
@@ -1744,12 +1744,12 @@ function st(e, t = void 0, n = void 0) {
1744
1744
  },
1745
1745
  onFailure(o, a) {
1746
1746
  const c = o;
1747
- c.status = a.status, c.response = a.errormsg, n && n(c);
1747
+ c.status = a.status, c.response = a.errormsg, s && s(c);
1748
1748
  }
1749
1749
  });
1750
1750
  });
1751
1751
  }
1752
- function it(e, t, n = void 0, s = void 0) {
1752
+ function it(e, t, s = void 0, n = void 0) {
1753
1753
  const { listAllContacts: i, currentUser: r } = e;
1754
1754
  console.log("__listAllContacts", i.hits);
1755
1755
  const o = `${e.space}/api/directmessages`, a = {
@@ -1767,7 +1767,7 @@ function it(e, t, n = void 0, s = void 0) {
1767
1767
  p !== void 0 && (c.id_msg = p.id, d = !0, x(e, c));
1768
1768
  },
1769
1769
  (p) => {
1770
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), c.id_msg = "";
1770
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), n && n(p), c.id_msg = "";
1771
1771
  }
1772
1772
  ), d === !1 && setTimeout(() => {
1773
1773
  d === !1 && w(e, (p) => {
@@ -1782,17 +1782,17 @@ function it(e, t, n = void 0, s = void 0) {
1782
1782
  type: "json",
1783
1783
  onComplete(u, m, l) {
1784
1784
  const g = u;
1785
- g.reponse = JSON.parse(l.response), g.status = l.status, n && n(g), c.id_msg = g.result.id, x(e, c);
1785
+ g.reponse = JSON.parse(l.response), g.status = l.status, s && s(g), c.id_msg = g.result.id, x(e, c);
1786
1786
  },
1787
1787
  onFailure(u, m, l) {
1788
1788
  const g = u;
1789
- g.msg = m.errormsg, g.status = m.status, s && s(g);
1789
+ g.msg = m.errormsg, g.status = m.status, n && n(g);
1790
1790
  }
1791
1791
  });
1792
1792
  });
1793
1793
  }, 500);
1794
1794
  }
1795
- function re(e, t, n, s) {
1795
+ function re(e, t, s, n) {
1796
1796
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1797
1797
  w(e, (r) => {
1798
1798
  f(i, {
@@ -1812,16 +1812,16 @@ function re(e, t, n, s) {
1812
1812
  m.push(l.login);
1813
1813
  }), JSON.stringify(m) === JSON.stringify(d);
1814
1814
  });
1815
- n && p !== void 0 ? n(p) : (s || p === void 0) && s(p);
1815
+ s && p !== void 0 ? s(p) : (n || p === void 0) && n(p);
1816
1816
  },
1817
1817
  onFailure(o) {
1818
1818
  const a = o;
1819
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1819
+ a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
1820
1820
  }
1821
1821
  });
1822
1822
  });
1823
1823
  }
1824
- function x(e, t, n = void 0, s = void 0) {
1824
+ function x(e, t, s = void 0, n = void 0) {
1825
1825
  const i = {
1826
1826
  base: e.space,
1827
1827
  uri: "/api/community",
@@ -1849,21 +1849,21 @@ function x(e, t, n = void 0, s = void 0) {
1849
1849
  type: "json",
1850
1850
  onComplete(c, d, p) {
1851
1851
  const u = c;
1852
- u.status = p.status, u.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", u), n && n(u);
1852
+ u.status = p.status, u.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", u), s && s(u);
1853
1853
  },
1854
1854
  onFailure(c, d) {
1855
1855
  const p = c;
1856
- p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
1856
+ p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
1857
1857
  }
1858
1858
  });
1859
1859
  });
1860
1860
  }
1861
1861
  function ce(e) {
1862
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1862
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1863
1863
  return `<p>${e} </p>
1864
1864
  <br/>
1865
1865
  <hr/>
1866
- <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1866
+ <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
1867
1867
  }
1868
1868
  const de = {
1869
1869
  title: "TEST DEV COMMUNITY IDEA",
@@ -1875,7 +1875,7 @@ const de = {
1875
1875
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1876
1876
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1877
1877
  };
1878
- function at(e, t, n = void 0, s = void 0) {
1878
+ function at(e, t, s = void 0, n = void 0) {
1879
1879
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1880
1880
  (c) => c.id === t.community_id
1881
1881
  ), o = e.swymCommunities.find(
@@ -1905,24 +1905,42 @@ function at(e, t, n = void 0, s = void 0) {
1905
1905
  type: "json",
1906
1906
  onComplete(p, u, m) {
1907
1907
  const l = JSON.parse(p);
1908
- l.status = m.status, l.response = m.response, n && n(l);
1908
+ l.status = m.status, l.response = m.response, s && s(l);
1909
1909
  },
1910
1910
  onFailure(p, u, m) {
1911
1911
  const l = p;
1912
- l.status = u.status, l.response = u.errormsg, s && s(l);
1912
+ l.status = u.status, l.response = u.errormsg, n && n(l);
1913
1913
  }
1914
1914
  });
1915
1915
  });
1916
1916
  }
1917
- function ot(e, t = void 0, n = void 0) {
1918
- const s = { base: e.baseURL, uri: "/api/idea/add" };
1917
+ function ot(e, t = void 0, s = void 0) {
1918
+ const n = { base: e.space, uri: "/api/idea/add" };
1919
+ if (!Array.isArray(e.swymCommunities)) {
1920
+ const o = "☠️ swymCommunities doit être un tableau d'objets de communautés";
1921
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
1922
+ cause: o
1923
+ });
1924
+ }
1919
1925
  if (e.swymCommunities.findIndex(
1920
1926
  (o) => o.id === e.community_id
1921
1927
  ) === -1) {
1922
- console.log(
1923
- "la communauté n'existe pas dans la liste des communautés du Swym"
1924
- );
1925
- return;
1928
+ const o = "la communauté n'existe pas dans la liste des communautés du Swym";
1929
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
1930
+ cause: o
1931
+ });
1932
+ }
1933
+ if (e.community_id && e.community_id === "") {
1934
+ const o = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
1935
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
1936
+ cause: o
1937
+ });
1938
+ }
1939
+ if (e.title && e.title === "") {
1940
+ const o = "☠️ title doit être un String.";
1941
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
1942
+ cause: o
1943
+ });
1926
1944
  }
1927
1945
  const r = {
1928
1946
  params: {
@@ -1950,13 +1968,13 @@ function ot(e, t = void 0, n = void 0) {
1950
1968
  typeof u.response == "string" && (u.response = JSON.parse(u.response)), u.status = p.status, t && t(u);
1951
1969
  },
1952
1970
  onFailure(c, d, p) {
1953
- n && n({ response: c, headers: d, xhr: p });
1971
+ s && s({ response: c, headers: d, xhr: p });
1954
1972
  }
1955
1973
  };
1956
- f(s.base + s.uri, a);
1974
+ f(n.base + n.uri, a);
1957
1975
  });
1958
1976
  }
1959
- function rt(e, t, n = void 0, s = void 0) {
1977
+ function rt(e, t, s = void 0, n = void 0) {
1960
1978
  const i = `${e.space}/api/idea/delete`, r = {
1961
1979
  params: {
1962
1980
  community_id: t.community_id,
@@ -1974,20 +1992,20 @@ function rt(e, t, n = void 0, s = void 0) {
1974
1992
  data: JSON.stringify(r),
1975
1993
  type: "json",
1976
1994
  onComplete(a, c, d) {
1977
- n && n(a);
1995
+ s && s(a);
1978
1996
  },
1979
1997
  onFailure(a, c, d) {
1980
1998
  const p = a;
1981
- p.status = c.status, p.response = c.errormsg, s && s(p);
1999
+ p.status = c.status, p.response = c.errormsg, n && n(p);
1982
2000
  }
1983
2001
  });
1984
2002
  });
1985
2003
  }
1986
- function ct(e, t = void 0, n = void 0) {
1987
- const s = `${e.space}/api/idea/get`;
2004
+ function ct(e, t = void 0, s = void 0) {
2005
+ const n = `${e.space}/api/idea/get`;
1988
2006
  if (e.idPost === "") {
1989
2007
  const r = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
1990
- throw new Error(`Erreur sur cette requête : ${s}`, { cause: r });
2008
+ throw new Error(`Erreur sur cette requête : ${n}`, { cause: r });
1991
2009
  }
1992
2010
  const i = {
1993
2011
  params: {
@@ -1995,7 +2013,7 @@ function ct(e, t = void 0, n = void 0) {
1995
2013
  }
1996
2014
  };
1997
2015
  w(e, (r) => {
1998
- f(s, {
2016
+ f(n, {
1999
2017
  method: "POST",
2000
2018
  headers: {
2001
2019
  "Content-type": "application/json;charset=UTF-8",
@@ -2008,13 +2026,13 @@ function ct(e, t = void 0, n = void 0) {
2008
2026
  },
2009
2027
  onFailure(o) {
2010
2028
  const a = o;
2011
- a.status = headers.status, a.response = headers.errormsg, n && n(a);
2029
+ a.status = headers.status, a.response = headers.errormsg, s && s(a);
2012
2030
  }
2013
2031
  });
2014
2032
  });
2015
2033
  }
2016
- function dt(e, t, n) {
2017
- const s = {
2034
+ function dt(e, t, s) {
2035
+ const n = {
2018
2036
  base: `${e.space}/api/idea/edit`,
2019
2037
  uri: "/api/idea/edit"
2020
2038
  }, i = {
@@ -2042,13 +2060,13 @@ function dt(e, t, n) {
2042
2060
  t && t(c);
2043
2061
  },
2044
2062
  onFailure(a) {
2045
- n && n(a);
2063
+ s && s(a);
2046
2064
  }
2047
2065
  };
2048
- f(s.base + s.uri, o);
2066
+ f(n.base + n.uri, o);
2049
2067
  });
2050
2068
  }
2051
- function pt(e, t = de, n = void 0, s = void 0) {
2069
+ function pt(e, t = de, s = void 0, n = void 0) {
2052
2070
  const i = {
2053
2071
  uri: "/api/idea/list",
2054
2072
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
@@ -2062,11 +2080,11 @@ function pt(e, t = de, n = void 0, s = void 0) {
2062
2080
  },
2063
2081
  onComplete(a) {
2064
2082
  const c = JSON.parse(a);
2065
- n && n(c);
2083
+ s && s(c);
2066
2084
  },
2067
2085
  onFailure(a, c) {
2068
2086
  const d = a;
2069
- d.status = c.status, d.response = c.errormsg, s && s(d);
2087
+ d.status = c.status, d.response = c.errormsg, n && n(d);
2070
2088
  }
2071
2089
  });
2072
2090
  });
@@ -2146,10 +2164,10 @@ function pe(e) {
2146
2164
  <p>
2147
2165
  </p>` : e;
2148
2166
  }
2149
- function ut(e, t = void 0, n = void 0) {
2150
- const s = e.space + "/api/user/getcurrent/";
2167
+ function ut(e, t = void 0, s = void 0) {
2168
+ const n = e.space + "/api/user/getcurrent/";
2151
2169
  w(e, (i) => {
2152
- f(s, {
2170
+ f(n, {
2153
2171
  method: "GET",
2154
2172
  headers: {
2155
2173
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
@@ -2160,12 +2178,12 @@ function ut(e, t = void 0, n = void 0) {
2160
2178
  },
2161
2179
  onFailure(r, o, a) {
2162
2180
  const c = { erreur: JSON.parse(r), headers: o, xhr: a };
2163
- n && n(c);
2181
+ s && s(c);
2164
2182
  }
2165
2183
  });
2166
2184
  });
2167
2185
  }
2168
- function lt(e, t, n = void 0, s = void 0) {
2186
+ function lt(e, t, s = void 0, n = void 0) {
2169
2187
  const i = e.space + "/api/user/find/login/" + t;
2170
2188
  w(
2171
2189
  e,
@@ -2175,27 +2193,27 @@ function lt(e, t, n = void 0, s = void 0) {
2175
2193
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2176
2194
  onComplete(o, a, c) {
2177
2195
  const d = JSON.parse(o);
2178
- n && n(d);
2196
+ s && s(d);
2179
2197
  },
2180
2198
  onFailure(o) {
2181
- s && s(o);
2199
+ n && n(o);
2182
2200
  }
2183
2201
  });
2184
2202
  },
2185
- s
2203
+ n
2186
2204
  );
2187
2205
  }
2188
- function ft(e, t = void 0, n = void 0) {
2189
- e.tenant && T(e, (s) => {
2190
- console.log("serviceUrls", s);
2191
- const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2206
+ function ft(e, t = void 0, s = void 0) {
2207
+ e.tenant && C(e, (n) => {
2208
+ console.log("serviceUrls", n);
2209
+ const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2192
2210
  return t && t(i), i;
2193
2211
  });
2194
2212
  }
2195
- function mt(e, t = void 0, n = void 0) {
2196
- e.tenant && T(e, (s) => {
2197
- console.log("serviceUrls", s);
2198
- const i = s.services.find((a) => a.id === "3dpassport")?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
2213
+ function mt(e, t = void 0, s = void 0) {
2214
+ e.tenant && C(e, (n) => {
2215
+ console.log("serviceUrls", n);
2216
+ const i = n.services.find((a) => a.id === "3dpassport")?.url, r = n.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
2199
2217
  f(o, {
2200
2218
  async onComplete(a) {
2201
2219
  console.log("response", a);
@@ -2207,77 +2225,77 @@ function mt(e, t = void 0, n = void 0) {
2207
2225
  });
2208
2226
  },
2209
2227
  onFailure(a) {
2210
- n && n(a);
2228
+ s && s(a);
2211
2229
  }
2212
2230
  });
2213
2231
  });
2214
2232
  }
2215
- function gt(e, t = void 0, n = void 0) {
2233
+ function gt(e, t = void 0, s = void 0) {
2216
2234
  if (e.tenant) {
2217
- const s = e.tenant.toLowerCase();
2218
- fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
2235
+ const n = e.tenant.toLowerCase();
2236
+ fetch(`https://api.uixhome.fr/${n}/iterop/jwtuser`, {
2219
2237
  method: "POST"
2220
2238
  }).then((i) => i.json()).then((i) => {
2221
2239
  t && t(i);
2222
2240
  }).catch((i) => {
2223
- n && n(i);
2241
+ s && s(i);
2224
2242
  });
2225
2243
  }
2226
2244
  }
2227
- async function ht(e, t, n = void 0, s = void 0) {
2228
- e.tenant && T(e, (i) => {
2245
+ async function ht(e, t, s = void 0, n = void 0) {
2246
+ e.tenant && C(e, (i) => {
2229
2247
  const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
2230
2248
  fetch(`https://api.uixhome.fr/${a}/iterop/listusers?t=${t}&s=${o}`, {
2231
2249
  method: "POST"
2232
2250
  }).then((c) => c.json()).then((c) => {
2233
- n && n(c);
2234
- }).catch((c) => {
2235
2251
  s && s(c);
2252
+ }).catch((c) => {
2253
+ n && n(c);
2236
2254
  });
2237
2255
  });
2238
2256
  }
2239
- async function St(e, t, n = void 0, s = void 0) {
2240
- e.tenant && T(e, (i) => {
2257
+ async function St(e, t, s = void 0, n = void 0) {
2258
+ e.tenant && C(e, (i) => {
2241
2259
  const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
2242
2260
  fetch(`https://api.uixhome.fr/${a}/iterop/repository/data/tables?t=${t}&s=${o}`, {
2243
2261
  method: "GET"
2244
2262
  }).then((c) => c.json()).then((c) => {
2245
- n && n(c);
2246
- }).catch((c) => {
2247
2263
  s && s(c);
2264
+ }).catch((c) => {
2265
+ n && n(c);
2248
2266
  });
2249
2267
  });
2250
2268
  }
2251
- async function yt(e, t, n, s = void 0, i = void 0) {
2269
+ async function yt(e, t, s, n = void 0, i = void 0) {
2252
2270
  if (e.tenant) {
2253
2271
  const r = e.tenant.toLowerCase();
2254
- fetch(`https://api.uixhome.fr/${r}/iterop//businesstable/${n}?t=${t}`, {
2272
+ fetch(`https://api.uixhome.fr/${r}/iterop//businesstable/${s}?t=${t}`, {
2255
2273
  method: "POST"
2256
2274
  }).then((o) => o.json()).then((o) => {
2257
- s && s(o);
2275
+ n && n(o);
2258
2276
  }).catch((o) => {
2259
2277
  i && i(o);
2260
2278
  });
2261
2279
  }
2262
2280
  }
2263
- async function _t(e, t, n, s = void 0, i = void 0) {
2281
+ async function _t(e, t, s, n = void 0, i = void 0) {
2264
2282
  if (e.tenant) {
2265
2283
  const r = e.tenant.toLowerCase();
2266
- fetch(`https://api.uixhome.fr/${r}/iterop//businesstable/${n}/rows/?t=${t}`, {
2284
+ fetch(`https://api.uixhome.fr/${r}/iterop//businesstable/${s}/rows/?t=${t}`, {
2267
2285
  method: "POST"
2268
2286
  }).then((o) => o.json()).then((o) => {
2269
- s && s(o);
2287
+ n && n(o);
2270
2288
  }).catch((o) => {
2271
2289
  i && i(o);
2272
2290
  });
2273
2291
  }
2274
2292
  }
2275
- async function wt(e, t, n, s, i = void 0, r = void 0) {
2276
- e.tenant && T(e, (o) => {
2293
+ async function wt(e, t, s, n, i = void 0, r = void 0) {
2294
+ e.tenant && C(e, (o) => {
2277
2295
  o.services.find((c) => c.id === "businessprocess")?.url + "";
2278
2296
  const a = e.tenant.toLowerCase();
2279
2297
  fetch(
2280
- `https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2298
+ `https://api.uixhome.fr/${a}/iterop/runtime/processes/${s}?t=${t}&b=${n}`,
2281
2299
  {
2282
2300
  method: "POST"
2283
2301
  }
@@ -2288,12 +2306,12 @@ async function wt(e, t, n, s, i = void 0, r = void 0) {
2288
2306
  });
2289
2307
  });
2290
2308
  }
2291
- async function Tt(e, t, n, s, i, r = void 0, o = void 0) {
2292
- e.tenant && T(e, (a) => {
2309
+ async function Ct(e, t, s, n, i, r = void 0, o = void 0) {
2310
+ e.tenant && C(e, (a) => {
2293
2311
  a.services.find((d) => d.id === "businessprocess")?.url + "";
2294
2312
  const c = e.tenant.toLowerCase();
2295
2313
  fetch(
2296
- `https://api.uixhome.fr/${c}/iterop/businesstable/patch/${n}/rows?t=${t}&rowsToAdd=${s}&rowsToRemove=${i}`,
2314
+ `https://api.uixhome.fr/${c}/iterop/businesstable/patch/${s}/rows?t=${t}&rowsToAdd=${n}&rowsToRemove=${i}`,
2297
2315
  {
2298
2316
  method: "POST"
2299
2317
  }
@@ -2304,28 +2322,28 @@ async function Tt(e, t, n, s, i, r = void 0, o = void 0) {
2304
2322
  });
2305
2323
  });
2306
2324
  }
2307
- async function Ct(e, t, n, s = void 0, i = void 0) {
2308
- e.tenant && T(e, (r) => {
2325
+ async function Tt(e, t, s, n = void 0, i = void 0) {
2326
+ e.tenant && C(e, (r) => {
2309
2327
  r.services.find((a) => a.id === "businessprocess")?.url + "";
2310
2328
  const o = e.tenant.toLowerCase();
2311
2329
  fetch(
2312
- `https://api.uixhome.fr/${o}/iterop/dependencytable/one/${n}/?t=${t}`,
2330
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/one/${s}/?t=${t}`,
2313
2331
  {
2314
2332
  method: "POST"
2315
2333
  }
2316
2334
  ).then((a) => a.json()).then((a) => {
2317
- s && s(a);
2335
+ n && n(a);
2318
2336
  }).catch((a) => {
2319
2337
  i && i(a);
2320
2338
  });
2321
2339
  });
2322
2340
  }
2323
- async function bt(e, t, n, s, i, r = void 0, o = void 0) {
2324
- e.tenant && T(e, (a) => {
2341
+ async function bt(e, t, s, n, i, r = void 0, o = void 0) {
2342
+ e.tenant && C(e, (a) => {
2325
2343
  a.services.find((d) => d.id === "businessprocess")?.url + "";
2326
2344
  const c = e.tenant.toLowerCase();
2327
2345
  fetch(
2328
- `https://api.uixhome.fr/${c}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2346
+ `https://api.uixhome.fr/${c}/iterop/dependencytable/patch/${s}/?t=${t}&cli=${n}&b=${i}`,
2329
2347
  {
2330
2348
  method: "POST"
2331
2349
  }
@@ -2336,12 +2354,12 @@ async function bt(e, t, n, s, i, r = void 0, o = void 0) {
2336
2354
  });
2337
2355
  });
2338
2356
  }
2339
- async function Ot(e, t, n, s, i = void 0, r = void 0) {
2340
- e.tenant && T(e, (o) => {
2357
+ async function Ot(e, t, s, n, i = void 0, r = void 0) {
2358
+ e.tenant && C(e, (o) => {
2341
2359
  o.services.find((c) => c.id === "businessprocess")?.url + "";
2342
2360
  const a = e.tenant.toLowerCase();
2343
2361
  fetch(
2344
- `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2362
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${s}/?t=${t}&b=${n}`,
2345
2363
  {
2346
2364
  method: "POST"
2347
2365
  }
@@ -2356,8 +2374,8 @@ function $t(e) {
2356
2374
  const t = "Hello " + e;
2357
2375
  return console.log(t), t;
2358
2376
  }
2359
- function vt(e, t = void 0, n = void 0) {
2360
- return console.log("credentials", e), new Promise((s) => {
2377
+ function vt(e, t = void 0, s = void 0) {
2378
+ return console.log("credentials", e), new Promise((n) => {
2361
2379
  if (e.token === "" && b(e), !e.space || e.space === "") {
2362
2380
  const o = W();
2363
2381
  console.log("platformeInfo", o);
@@ -2424,13 +2442,13 @@ function vt(e, t = void 0, n = void 0) {
2424
2442
  t && t(d);
2425
2443
  },
2426
2444
  onFailure(d) {
2427
- n && n(d);
2445
+ s && s(d);
2428
2446
  }
2429
2447
  });
2430
2448
  }
2431
2449
  },
2432
2450
  onFailure(o) {
2433
- n && n(o);
2451
+ s && s(o);
2434
2452
  }
2435
2453
  });
2436
2454
  });
@@ -2447,13 +2465,13 @@ export {
2447
2465
  Z as _3DSpace_download_multidoc,
2448
2466
  M as _3DSpace_file_update,
2449
2467
  Q as _3DSpace_file_update_csr,
2450
- je as _3DSpace_file_url_csr,
2451
- U as _3DSpace_get_csrf,
2468
+ Pe as _3DSpace_file_url_csr,
2469
+ k as _3DSpace_get_csrf,
2452
2470
  L as _3DSpace_get_docInfo,
2453
2471
  ee as _3DSpace_get_downloadTicket_multidoc,
2454
- Pe as _3DSpace_get_multiDocInfo,
2472
+ je as _3DSpace_get_multiDocInfo,
2455
2473
  $ as _3DSpace_get_securityContexts,
2456
- P as _3DSpace_get_ticket,
2474
+ j as _3DSpace_get_ticket,
2457
2475
  Ge as _3DSpace_lifecycle_changeRevision,
2458
2476
  Le as _3DSpace_lifecycle_changeState,
2459
2477
  Me as _3DSpace_lifecycle_getGraph,
@@ -2478,9 +2496,9 @@ export {
2478
2496
  x as _3DSwym_sendMessageData,
2479
2497
  $e as _AppMngt_get_info_user,
2480
2498
  Oe as _AppMngt_get_users,
2481
- Tt as _Iterop_AddOrRemoveRows,
2499
+ Ct as _Iterop_AddOrRemoveRows,
2482
2500
  mt as _Iterop_Auth_CAS,
2483
- Ct as _Iterop_GetOneDependencyTable,
2501
+ Tt as _Iterop_GetOneDependencyTable,
2484
2502
  ht as _Iterop_ListUsers,
2485
2503
  bt as _Iterop_PatchDependencyTable,
2486
2504
  Ot as _Iterop_PutDependencyTable,
@@ -2490,15 +2508,15 @@ export {
2490
2508
  gt as _Iterop_jwtUser,
2491
2509
  wt as _Iterop_runProcess,
2492
2510
  W as _getPlateformInfos,
2493
- Te as _getPlatformServices,
2494
- T as _getServiceUrl,
2495
- Ce as _getServiceUrl_3DPassport,
2511
+ Ce as _getPlatformServices,
2512
+ C as _getServiceUrl,
2513
+ Te as _getServiceUrl_3DPassport,
2496
2514
  ft as _getServiceUrl_Iterop,
2497
2515
  f as _httpCallAuthenticated,
2498
2516
  ye as _setDraggable,
2499
2517
  we as _setDroppable,
2500
2518
  _e as _setupTagger,
2501
- qe as addTagToDoc,
2519
+ He as addTagToDoc,
2502
2520
  be as compass_getListAdditionalApps,
2503
2521
  V as couleurs,
2504
2522
  ve as createUserGroups,
@@ -2511,15 +2529,15 @@ export {
2511
2529
  Ne as getComplementUG,
2512
2530
  Ve as getDataFrom3DSpace,
2513
2531
  he as getDataFromGouvFr,
2514
- ze as getDatasByTenant,
2515
- He as getDatasFrom3DSpace,
2532
+ qe as getDatasByTenant,
2533
+ ze as getDatasFrom3DSpace,
2516
2534
  We as getDownloadDocument,
2517
2535
  Ze as getInfoDocTags,
2518
2536
  Ie as getUserGroupsList,
2519
2537
  X as getUsersGroupRules,
2520
2538
  Ye as get_3DSpace_csrf,
2521
- Ue as patchUserGroups,
2522
- ke as patchUserGroupsControl,
2539
+ ke as patchUserGroups,
2540
+ Ue as patchUserGroupsControl,
2523
2541
  Xe as pushDataIn3DSpace,
2524
2542
  Fe as readUserGroupControl,
2525
2543
  Qe as removeTagToDoc,