@beam3_dev/api_module 0.0.332 → 0.0.335

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
@@ -35,19 +35,19 @@ const z = {
35
35
  b3Edit9: "#795548"
36
36
  };
37
37
  async function Ue(e, n = void 0, t = void 0) {
38
- const s = parseInt(e);
38
+ const i = 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/" + i,
41
41
  {
42
42
  method: "GET",
43
43
  headers: {
44
44
  Accept: "application/json"
45
45
  }
46
46
  }
47
- ).then((i) => i.json()).then((i) => {
48
- n && n(i);
49
- }).catch((i) => {
50
- t && t(i), console.error("Erreur : " + i);
47
+ ).then((s) => s.json()).then((s) => {
48
+ n && n(s);
49
+ }).catch((s) => {
50
+ t && t(s), console.error("Erreur : " + s);
51
51
  });
52
52
  }
53
53
  async function xe(e, n = void 0, t = void 0) {
@@ -59,17 +59,17 @@ async function xe(e, n = void 0, t = void 0) {
59
59
  Accept: "application/json"
60
60
  }
61
61
  }
62
- ).then((s) => s.json()).then((s) => {
63
- n && n(s);
64
- }).catch((s) => {
65
- t && t(s), console.error("Erreur : " + s);
62
+ ).then((i) => i.json()).then((i) => {
63
+ n && n(i);
64
+ }).catch((i) => {
65
+ t && t(i), console.error("Erreur : " + i);
66
66
  });
67
67
  }
68
- async function Ie(e, n = z) {
68
+ async function Ne(e, n = z) {
69
69
  let t = T.now().year;
70
- const s = e, i = [], r = (a) => {
70
+ const i = e, s = [], r = (a) => {
71
71
  for (let c in a)
72
- i.push({ date: c, comment: a[c] });
72
+ s.push({ date: c, comment: a[c] });
73
73
  };
74
74
  for (let a = t; a <= t + 1; a++)
75
75
  await fetch(
@@ -84,10 +84,10 @@ async function Ie(e, n = z) {
84
84
  r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
- const a = s.length === 0 ? {
87
+ const a = i.length === 0 ? {
88
88
  events: []
89
- } : s;
90
- for (let c of i)
89
+ } : i;
90
+ for (let c of s)
91
91
  a.events.findIndex(
92
92
  (u) => u.start === T.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
@@ -101,13 +101,13 @@ async function Ie(e, n = z) {
101
101
  })();
102
102
  }
103
103
  function H(e, n, t) {
104
- const { credentials: s, myArray: i, chunk: r, fn_to_call: o } = e, a = [];
105
- for (let c = 0; c < i.length; c += r) {
106
- const d = i.slice(c, c + r);
104
+ const { credentials: i, myArray: s, chunk: r, fn_to_call: o } = e, a = [];
105
+ for (let c = 0; c < s.length; c += r) {
106
+ const d = s.slice(c, c + r);
107
107
  a.push(d);
108
108
  }
109
109
  Q(
110
- { credentials: s, chunks: a, initLoop: 0, fn: o },
110
+ { credentials: i, chunks: a, initLoop: 0, fn: o },
111
111
  (c) => {
112
112
  n && n(c);
113
113
  },
@@ -117,12 +117,12 @@ function H(e, n, t) {
117
117
  );
118
118
  }
119
119
  function Q(e, n, t) {
120
- const { credentials: s, chunks: i, initLoop: r, fn: o } = e, a = (c) => {
120
+ const { credentials: i, chunks: s, initLoop: r, fn: o } = e, a = (c) => {
121
121
  o(
122
- s,
123
- i[c],
122
+ i,
123
+ s[c],
124
124
  () => {
125
- c++, c < i.length && a(c);
125
+ c++, c < s.length && a(c);
126
126
  },
127
127
  (d) => {
128
128
  n && n(d);
@@ -134,9 +134,9 @@ function Q(e, n, t) {
134
134
  };
135
135
  a(r);
136
136
  }
137
- async function Ne(e, n, t = !0) {
138
- const s = e.events.findIndex((i) => i.uuid === n.uuid);
139
- return s === -1 ? e.events.push(n) : t ? e.events[s] = n : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
137
+ async function Ie(e, n, t = !0) {
138
+ const i = e.events.findIndex((s) => s.uuid === n.uuid);
139
+ return i === -1 ? e.events.push(n) : t ? e.events[i] = n : e.events.splice(i, 1), e.length > 0 && e.sort((s, r) => s.start - r.start), e;
140
140
  }
141
141
  function m(e, n) {
142
142
  $(["DS/WAFData/WAFData"], (t) => {
@@ -144,8 +144,8 @@ function m(e, n) {
144
144
  });
145
145
  }
146
146
  function Re(e, n, t) {
147
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
148
- s.draggable(e, {
147
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (i) => {
148
+ i.draggable(e, {
149
149
  data: n,
150
150
  start: t
151
151
  });
@@ -153,26 +153,26 @@ function Re(e, n, t) {
153
153
  }
154
154
  function Fe(e, n = void 0) {
155
155
  $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (t) => {
156
- let s;
157
- s === void 0 && (s = t.createProxy({
156
+ let i;
157
+ i === void 0 && (i = t.createProxy({
158
158
  widgetId: L.id,
159
159
  filteringMode: "WithFilteringServices"
160
- }), n !== void 0 && s.addEvent("onFilterSubjectsChange", n)), s.setSubjectsTags(e);
160
+ }), n !== void 0 && i.addEvent("onFilterSubjectsChange", n)), i.setSubjectsTags(e);
161
161
  });
162
162
  }
163
- function ve(e, n) {
163
+ function je(e, n) {
164
164
  $(["DS/DataDragAndDrop/DataDragAndDrop"], (t) => {
165
165
  t.droppable(e, {
166
166
  drop: n
167
167
  });
168
168
  });
169
169
  }
170
- async function je(e, n = void 0, t = void 0) {
170
+ async function ve(e, n = void 0, t = void 0) {
171
171
  await $(
172
172
  ["DS/i3DXCompassServices/i3DXCompassServices"],
173
- (s) => {
173
+ (i) => {
174
174
  (!e || e === "") && (e = L.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), n && n(
175
- s.getPlatformServices({
175
+ i.getPlatformServices({
176
176
  platformId: e,
177
177
  onComplete: n,
178
178
  onFailure: t
@@ -184,88 +184,88 @@ async function je(e, n = void 0, t = void 0) {
184
184
  function Z() {
185
185
  let e = {};
186
186
  return $(["DS/PlatformAPI/PlatformAPI"], (n) => {
187
- const t = n.getTenant(), s = n.getUser(), i = n.getAllApplicationConfigurations(), r = n.getApplicationConfiguration(
187
+ const t = n.getTenant(), i = n.getUser(), s = n.getAllApplicationConfigurations(), r = n.getApplicationConfiguration(
188
188
  "com.3ds.wp.passport.cors"
189
189
  );
190
190
  e = {
191
191
  tenant: t,
192
- user: s,
193
- appsConfiguration: i,
192
+ user: i,
193
+ appsConfiguration: s,
194
194
  appConf: r
195
195
  };
196
- }), console.log("%cRETOUR API :", "color:blue", e), e;
196
+ }), e;
197
197
  }
198
198
  function ke(e, n = void 0, t = 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, {
202
- onComplete(i) {
203
- const r = typeof i == "string" ? JSON.parse(i) : i;
200
+ const i = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
+ m(i, {
202
+ onComplete(s) {
203
+ const r = typeof s == "string" ? JSON.parse(s) : s;
204
204
  r && "fields" in r ? n && n(r.fields) : t && t("_getMe return not find properties fields");
205
205
  },
206
- onFailure(i) {
207
- t && t("_getMe return error", i);
206
+ onFailure(s) {
207
+ t && t("_getMe return error", s);
208
208
  }
209
209
  });
210
210
  }
211
211
  }
212
212
  function J(e, n = void 0, t = void 0) {
213
- if (console.log("_getServiceUrl"), e.tenant) {
214
- const s = `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(s, {
216
- onComplete(i) {
217
- const r = typeof i == "string" ? JSON.parse(i) : i;
213
+ if (e.tenant) {
214
+ const i = `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(i, {
216
+ onComplete(s) {
217
+ const r = typeof s == "string" ? JSON.parse(s) : s;
218
218
  if (r && "platforms" in r) {
219
219
  const o = r.platforms.find((a) => a.id === e.tenant.toUpperCase());
220
220
  n && o ? n(o) : t && t("_getServiceUrl return listServiceUrl = undefined");
221
221
  } else
222
222
  t && t("_getServiceUrl return oResponse = undefined");
223
223
  },
224
- onFailure(i) {
225
- t && t(i);
224
+ onFailure(s) {
225
+ t && t(s);
226
226
  }
227
227
  });
228
228
  }
229
229
  }
230
230
  function De(e, n = void 0, t = void 0) {
231
231
  if (e.tenant) {
232
- const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
- m(s, {
234
- onComplete(i) {
235
- const r = JSON.parse(i);
236
- if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
232
+ const i = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
+ m(i, {
234
+ onComplete(s) {
235
+ const r = JSON.parse(s);
236
+ if (Array.isArray(r) && r.length > 0) {
237
237
  const o = `${r[0].services[0].url}`;
238
238
  n && n(o);
239
239
  }
240
240
  },
241
- onFailure(i) {
242
- t && t(i);
241
+ onFailure(s) {
242
+ t && t(s);
243
243
  }
244
244
  });
245
245
  }
246
246
  }
247
247
  function Ae(e, n = void 0, t = void 0) {
248
248
  if (e.tenant) {
249
- const s = `https://eu1-registry.3dexperience.3ds.com/api/v1/platform/instance?id=${e.tenant.toLowerCase()}`;
250
- m(s, {
249
+ const i = `https://eu1-registry.3dexperience.3ds.com/api/v1/platform/instance?id=${e.tenant.toLowerCase()}`;
250
+ m(i, {
251
251
  type: "json",
252
- onComplete(i) {
253
- n && n(i);
252
+ onComplete(s) {
253
+ n && n(s);
254
254
  },
255
- onFailure(i) {
256
- t && t(i);
255
+ onFailure(s) {
256
+ t && t(s);
257
257
  }
258
258
  });
259
259
  }
260
260
  }
261
261
  function Pe(e, n, t) {
262
- const s = {
262
+ const i = {
263
263
  base: `${e.space}`,
264
264
  uri: "/resources/AppsMngt/api/custom/applications",
265
265
  option: `?filter=${e.tenant}`
266
266
  // facultatif
267
- }, i = `${s.base}${s.uri}${s.option}`;
268
- m(i, {
267
+ }, s = `${i.base}${i.uri}${i.option}`;
268
+ m(s, {
269
269
  method: "GET",
270
270
  headers: {
271
271
  "Content-Type": "application/json",
@@ -285,37 +285,37 @@ function Pe(e, n, t) {
285
285
  });
286
286
  }
287
287
  function Le(e, n = void 0, t = void 0) {
288
- let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
289
- m(s, {
290
- onComplete(i, r, o) {
291
- const a = JSON.parse(i);
288
+ let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
289
+ m(i, {
290
+ onComplete(s, r, o) {
291
+ const a = JSON.parse(s);
292
292
  console.log("_AppMngt_get_users => ", a), n && n(a);
293
293
  },
294
- onFailure(i, r) {
295
- const o = i;
294
+ onFailure(s, r) {
295
+ const o = s;
296
296
  o.msg = r.errormsg, o.errCode = r.errorcode, t && t(o);
297
297
  }
298
298
  });
299
299
  }
300
- function Je(e, n, t = void 0, s = void 0) {
301
- let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${n}`;
302
- m(i, {
300
+ function Je(e, n, t = void 0, i = void 0) {
301
+ let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${n}`;
302
+ m(s, {
303
303
  onComplete(r, o, a) {
304
304
  const c = JSON.parse(r);
305
305
  t && t(c);
306
306
  },
307
307
  onFailure(r, o) {
308
308
  const a = r;
309
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
309
+ a.msg = o.errormsg, a.errCode = o.errorcode, i && i(a);
310
310
  }
311
311
  });
312
312
  }
313
- const I = {
313
+ const N = {
314
314
  "Content-Type": "application/json",
315
315
  Accept: "application/json,text/javascript,*/*"
316
316
  };
317
- function Me(e, n, t = void 0, s = void 0) {
318
- const { space: i, currentUser: r } = e, a = `${i}${{
317
+ function Me(e, n, t = void 0, i = void 0) {
318
+ const { space: s, currentUser: r } = e, a = `${s}${{
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
320
320
  }.URIUGr}`, c = {
321
321
  groups: [
@@ -331,7 +331,7 @@ function Me(e, n, t = void 0, s = void 0) {
331
331
  };
332
332
  m(a, {
333
333
  method: "POST",
334
- headers: I,
334
+ headers: N,
335
335
  data: JSON.stringify(c),
336
336
  onComplete(d) {
337
337
  t && t(JSON.parse(d));
@@ -339,12 +339,12 @@ function Me(e, n, t = void 0, s = void 0) {
339
339
  onFailure(d, u) {
340
340
  console.log(d);
341
341
  const p = d;
342
- p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
342
+ p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), i && i(p);
343
343
  }
344
344
  });
345
345
  }
346
- function Ge(e, n, t = void 0, s = void 0) {
347
- const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${n}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
346
+ function Ge(e, n, t = void 0, i = void 0) {
347
+ const { space: s, tenant: r } = e, o = s, a = `/3drdfpersist/v1/resources/${n}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
348
348
  m(d, {
349
349
  opts: {
350
350
  method: "GET",
@@ -358,12 +358,12 @@ function Ge(e, n, t = void 0, s = void 0) {
358
358
  },
359
359
  onFailure(f, l) {
360
360
  const g = f;
361
- g.msg = l.errormsg, g.errCode = l.errorcode, s && s(g);
361
+ g.msg = l.errormsg, g.errCode = l.errorcode, i && i(g);
362
362
  }
363
363
  });
364
364
  }
365
365
  function ee(e, n = void 0, t = void 0) {
366
- const { _usersgroup: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
366
+ const { _usersgroup: i, tenant: s } = e, r = i, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${s}`, c = {
367
367
  method: "GET",
368
368
  Accept: "application/json,*/*,test/javascript"
369
369
  }, d = `${r}${o}${a}`;
@@ -379,9 +379,9 @@ function ee(e, n = void 0, t = void 0) {
379
379
  });
380
380
  }
381
381
  function Be(e, n = void 0, t = void 0) {
382
- const { _usersgroup: s, currentUser: i, numMax: r } = e;
382
+ const { _usersgroup: i, currentUser: s, numMax: r } = e;
383
383
  r || (r = 50);
384
- const o = "/3drdfpersist/resources/v1/usersgroup", a = "?select=uri,title,owner,members", c = `&top=${r}`, d = `${s}${o}${a}${c}`, p = { method: "GET", headers: {
384
+ const o = "/3drdfpersist/resources/v1/usersgroup", a = "?select=uri,title,owner,members", c = `&top=${r}`, d = `${i}${o}${a}${c}`, p = { method: "GET", headers: {
385
385
  "Content-Type": "application/json",
386
386
  Accept: "application/json,text/javascript,*/*"
387
387
  } };
@@ -390,8 +390,8 @@ function Be(e, n = void 0, t = void 0) {
390
390
  opts: p,
391
391
  onComplete(f) {
392
392
  const l = JSON.parse(f), g = {}, h = l.groups.filter((y) => y.uri.startsWith("uuid:"));
393
- if (i && Object.keys(i).length > 0) {
394
- const y = h.filter((_) => _.owner === i.email), S = h.filter((_) => _.members.includes(i.email)), w = y.concat(S);
393
+ if (s && Object.keys(s).length > 0) {
394
+ const y = h.filter((_) => _.owner === s.email), S = h.filter((_) => _.members.includes(s.email)), w = y.concat(S);
395
395
  g.iam = w, g.UG = h, g.iamMember = S, ee(
396
396
  e,
397
397
  (_) => {
@@ -421,19 +421,19 @@ function Be(e, n = void 0, t = void 0) {
421
421
  }
422
422
  }
423
423
  function Ee(e, n, t) {
424
- const { _usersgroup: s, list_uris: i } = e;
425
- if (!i || i.length === 0) {
424
+ const { _usersgroup: i, list_uris: s } = e;
425
+ if (!s || s.length === 0) {
426
426
  t({ msg: "getUserGroupsByURIList: lists_uri is empty or undefined" });
427
427
  return;
428
428
  }
429
429
  const r = {
430
- baseUrl: s,
430
+ baseUrl: i,
431
431
  uri: "/3drdfpersist/resources/v1/usersgroup/groups",
432
432
  opt: "?select=uri,title,owner,members"
433
433
  }, o = `${r.baseUrl}${r.uri}${r.opt}`, a = {
434
434
  method: "POST",
435
- headers: I,
436
- data: JSON.stringify({ groups: i })
435
+ headers: N,
436
+ data: JSON.stringify({ groups: s })
437
437
  };
438
438
  try {
439
439
  m(o, {
@@ -466,21 +466,21 @@ function Ee(e, n, t) {
466
466
  }
467
467
  }
468
468
  function Ke(e, n, t) {
469
- const { _usersgroup: s, list_emails: i } = e;
470
- if (!i || i.length === 0) {
469
+ const { _usersgroup: i, list_emails: s } = e;
470
+ if (!s || s.length === 0) {
471
471
  t({
472
472
  msg: "getUserGroupsByEmailList: lists_email is empty or undefined"
473
473
  });
474
474
  return;
475
475
  }
476
476
  const r = {
477
- baseUrl: s,
477
+ baseUrl: i,
478
478
  uri: "/3drdfpersist/resources/v1/usersgroup/users/locate",
479
479
  opt: "?person_ident=email"
480
480
  }, o = `${r.baseUrl}${r.uri}${r.opt}`, a = {
481
481
  method: "POST",
482
- headers: I,
483
- data: JSON.stringify({ users: i })
482
+ headers: N,
483
+ data: JSON.stringify({ users: s })
484
484
  };
485
485
  try {
486
486
  m(o, {
@@ -519,12 +519,12 @@ function Ke(e, n, t) {
519
519
  }
520
520
  }
521
521
  function qe(e, n) {
522
- const { space: t } = e, i = `${t}/3drdfpersist/resources/v1/usersgroup/${n}`;
523
- m(i, {
522
+ const { space: t } = e, s = `${t}/3drdfpersist/resources/v1/usersgroup/${n}`;
523
+ m(s, {
524
524
  method: "DELETE"
525
525
  });
526
526
  }
527
- function Xe(e, n, t, s = void 0, i = void 0) {
527
+ function Xe(e, n, t, i = void 0, s = void 0) {
528
528
  const { space: r, tenant: o } = e, a = {
529
529
  URITI: "/3drdfpersist/resources/v1/template-instances",
530
530
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -535,35 +535,35 @@ function Xe(e, n, t, s = void 0, i = void 0) {
535
535
  OPTsTenant: `tenant=dstenant:${o}`
536
536
  }, c = t, d = `${r}${a.URIUGr}/${n}`, u = JSON.stringify(c);
537
537
  m(d, {
538
- headers: I,
538
+ headers: N,
539
539
  method: "PATCH",
540
540
  data: u,
541
541
  type: "json",
542
542
  onComplete(p) {
543
- s && s(p);
543
+ i && i(p);
544
544
  },
545
545
  onFailure(p) {
546
- i && i(p);
546
+ s && s(p);
547
547
  }
548
548
  });
549
549
  }
550
- function We(e, n, t, s = void 0, i = void 0) {
550
+ function We(e, n, t, i = void 0, s = void 0) {
551
551
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${n}/sharing`;
552
552
  m(a, {
553
553
  method: "PATCH",
554
- headers: I,
554
+ headers: N,
555
555
  data: JSON.stringify(t),
556
556
  type: "json",
557
557
  onComplete(d) {
558
- s && s(d);
558
+ i && i(d);
559
559
  },
560
560
  onFailure(d) {
561
- i && i(d);
561
+ s && s(d);
562
562
  }
563
563
  });
564
564
  }
565
- function Ve(e, n, t = void 0, s = void 0) {
566
- const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${n}/sharing`;
565
+ function Ve(e, n, t = void 0, i = void 0) {
566
+ const { space: s } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup/${n}/sharing`;
567
567
  m(o, {
568
568
  opts: {
569
569
  method: "GET",
@@ -576,19 +576,19 @@ function Ve(e, n, t = void 0, s = void 0) {
576
576
  t && t(JSON.parse(d));
577
577
  },
578
578
  onFailure(d) {
579
- s && s(d);
579
+ i && i(d);
580
580
  }
581
581
  });
582
582
  }
583
583
  async function te(e, n, t) {
584
584
  if (e.space) {
585
- const s = `${e.space}/resources/v1/application/CSRF`;
586
- m(s, {
587
- onComplete(i) {
588
- i = JSON.parse(i), n && n(i.csrf);
585
+ const i = `${e.space}/resources/v1/application/CSRF`;
586
+ m(i, {
587
+ onComplete(s) {
588
+ s = JSON.parse(s), n && n(s.csrf);
589
589
  },
590
- onFailure(i, r, o) {
591
- t && t({ error: i, headers: r, xhr: o });
590
+ onFailure(s, r, o) {
591
+ t && t({ error: s, headers: r, xhr: o });
592
592
  }
593
593
  });
594
594
  }
@@ -597,22 +597,22 @@ var x = {};
597
597
  function ne(e, n) {
598
598
  return Object.prototype.hasOwnProperty.call(e, n);
599
599
  }
600
- var se = function(e, n, t, s) {
600
+ var se = function(e, n, t, i) {
601
601
  n = n || "&", t = t || "=";
602
- var i = {};
602
+ var s = {};
603
603
  if (typeof e != "string" || e.length === 0)
604
- return i;
604
+ return s;
605
605
  var r = /\+/g;
606
606
  e = e.split(n);
607
607
  var o = 1e3;
608
- s && typeof s.maxKeys == "number" && (o = s.maxKeys);
608
+ i && typeof i.maxKeys == "number" && (o = i.maxKeys);
609
609
  var a = e.length;
610
610
  o > 0 && a > o && (a = o);
611
611
  for (var c = 0; c < a; ++c) {
612
612
  var d = e[c].replace(r, "%20"), u = d.indexOf(t), p, f, l, g;
613
- u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
613
+ u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), ne(s, l) ? Array.isArray(s[l]) ? s[l].push(g) : s[l] = [s[l], g] : s[l] = g;
614
614
  }
615
- return i;
615
+ return s;
616
616
  }, U = function(e) {
617
617
  switch (typeof e) {
618
618
  case "string":
@@ -624,40 +624,40 @@ var se = function(e, n, t, s) {
624
624
  default:
625
625
  return "";
626
626
  }
627
- }, ie = function(e, n, t, s) {
628
- return n = n || "&", t = t || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
629
- var r = encodeURIComponent(U(i)) + t;
630
- return Array.isArray(e[i]) ? e[i].map(function(o) {
627
+ }, ie = function(e, n, t, i) {
628
+ return n = n || "&", t = t || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(s) {
629
+ var r = encodeURIComponent(U(s)) + t;
630
+ return Array.isArray(e[s]) ? e[s].map(function(o) {
631
631
  return r + encodeURIComponent(U(o));
632
- }).join(n) : r + encodeURIComponent(U(e[i]));
633
- }).filter(Boolean).join(n) : s ? encodeURIComponent(U(s)) + t + encodeURIComponent(U(e)) : "";
632
+ }).join(n) : r + encodeURIComponent(U(e[s]));
633
+ }).filter(Boolean).join(n) : i ? encodeURIComponent(U(i)) + t + encodeURIComponent(U(e)) : "";
634
634
  };
635
635
  x.decode = x.parse = se;
636
636
  x.encode = x.stringify = ie;
637
- async function M(e, n = void 0, t = void 0, s = void 0) {
638
- const i = e.space;
637
+ async function M(e, n = void 0, t = void 0, i = void 0) {
638
+ const s = e.space;
639
639
  if (n === void 0) {
640
640
  console.log("Le paramètre docid est obligatoire");
641
641
  return;
642
642
  }
643
- const r = i + `/resources/v1/modeler/documents/${n}`;
643
+ const r = s + `/resources/v1/modeler/documents/${n}`;
644
644
  m(r, {
645
645
  onComplete(o, a, c) {
646
646
  const d = JSON.parse(o);
647
647
  t && t(d);
648
648
  },
649
649
  onFailure(o) {
650
- s && s(o);
650
+ i && i(o);
651
651
  }
652
652
  });
653
653
  }
654
- async function Ye(e, n = void 0, t = void 0, s = void 0) {
655
- const i = e.space;
654
+ async function Ye(e, n = void 0, t = void 0, i = void 0) {
655
+ const s = e.space;
656
656
  if (n === void 0) {
657
657
  console.log("Le paramètre docids est obligatoire");
658
658
  return;
659
659
  }
660
- let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = x.stringify({
660
+ let r = `${s}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = x.stringify({
661
661
  $ids: n.toString().replace('"', "").replace("[", "").replace("]", "")
662
662
  });
663
663
  m(r, {
@@ -671,44 +671,44 @@ async function Ye(e, n = void 0, t = void 0, s = void 0) {
671
671
  t && t(u);
672
672
  },
673
673
  onFailure(a) {
674
- s && s(a);
674
+ i && i(a);
675
675
  }
676
676
  });
677
677
  }
678
678
  function R(e, n = void 0, t = void 0) {
679
679
  if (e.objID && e.objID !== "") {
680
- let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
681
- m(s, {
682
- onComplete(i, r, o) {
683
- const a = JSON.parse(i);
680
+ let i = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
681
+ m(i, {
682
+ onComplete(s, r, o) {
683
+ const a = JSON.parse(s);
684
684
  e.success = !0, e.token = a?.csrf?.value, e.datas = a?.data[0], n && n(e);
685
685
  },
686
- onFailure(i) {
687
- t && t(i);
686
+ onFailure(s) {
687
+ t && t(s);
688
688
  }
689
689
  });
690
690
  } else
691
691
  O(
692
692
  e,
693
- (s) => {
694
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), e.token = s, n && n(e);
693
+ (i) => {
694
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", i), e.token = i, n && n(e);
695
695
  },
696
- (s) => {
697
- t && t(s);
696
+ (i) => {
697
+ t && t(i);
698
698
  }
699
699
  );
700
700
  }
701
701
  function O(e, n = void 0, t = void 0) {
702
702
  if (e.space) {
703
- const s = e.space + "/resources/v1/application/CSRF";
704
- m(s, {
705
- onComplete(i, r, o) {
706
- const a = JSON.parse(i);
703
+ const i = e.space + "/resources/v1/application/CSRF";
704
+ m(i, {
705
+ onComplete(s, r, o) {
706
+ const a = JSON.parse(s);
707
707
  n && n(a.csrf.value);
708
708
  },
709
- onFailure(i, r, o) {
709
+ onFailure(s, r, o) {
710
710
  t && t({
711
- response: i,
711
+ response: s,
712
712
  headers: r,
713
713
  xhr: o
714
714
  });
@@ -717,12 +717,12 @@ function O(e, n = void 0, t = void 0) {
717
717
  } else
718
718
  t && t("ERROR : url du 3DSpace non défini.");
719
719
  }
720
- function j(e, n = void 0, t = void 0) {
721
- let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
720
+ function v(e, n = void 0, t = void 0) {
721
+ let i = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
722
722
  R(
723
723
  e,
724
- (i) => {
725
- m(s, {
724
+ (s) => {
725
+ m(i, {
726
726
  method: "PUT",
727
727
  headers: {
728
728
  ENO_CSRF_TOKEN: e.token
@@ -736,12 +736,12 @@ function j(e, n = void 0, t = void 0) {
736
736
  }
737
737
  });
738
738
  },
739
- (i) => {
740
- console.warn("_3DSpace_get_ticket / error => ", i), t && t(i);
739
+ (s) => {
740
+ console.warn("_3DSpace_get_ticket / error => ", s), t && t(s);
741
741
  }
742
742
  );
743
743
  }
744
- function ze(e, n, t = void 0, s = void 0, i = void 0) {
744
+ function ze(e, n, t = void 0, i = void 0, s = void 0) {
745
745
  const r = `${e.space}/resources/v1/modeler/documents/${n}/files/DownloadTicket`;
746
746
  t || (t = e.token), m(r, {
747
747
  method: "PUT",
@@ -753,23 +753,23 @@ function ze(e, n, t = void 0, s = void 0, i = void 0) {
753
753
  if (console.log("☠️ info => ", a), a.success === !0)
754
754
  try {
755
755
  const c = a.data[0].dataelements.ticketURL;
756
- s && s(c);
757
- } catch (c) {
758
756
  i && i(c);
757
+ } catch (c) {
758
+ s && s(c);
759
759
  }
760
760
  },
761
761
  onFailure(o) {
762
- i && i(o);
762
+ s && s(o);
763
763
  }
764
764
  });
765
765
  }
766
- function G(e, n, t, s, i, r = void 0, o = void 0) {
766
+ function G(e, n, t, i, s, r = void 0, o = void 0) {
767
767
  const a = () => oe(
768
768
  e,
769
769
  n,
770
770
  t,
771
- s,
772
771
  i,
772
+ s,
773
773
  e.token,
774
774
  r,
775
775
  o
@@ -785,7 +785,7 @@ function G(e, n, t, s, i, r = void 0, o = void 0) {
785
785
  }
786
786
  );
787
787
  }
788
- function oe(e, n, t, s, i, r, o = void 0, a = void 0) {
788
+ function oe(e, n, t, i, s, r, o = void 0, a = void 0) {
789
789
  const c = e.space + `/resources/v1/modeler/documents/files/CheckinTicket?tenant=${e.tenant.toUpperCase()}&e6w-lang=fr&e6w-timezone=-60&xrequestedwith=xmlhttprequest`;
790
790
  m(c, {
791
791
  method: "PUT",
@@ -803,9 +803,9 @@ function oe(e, n, t, s, i, r, o = void 0, a = void 0) {
803
803
  onComplete(d, u, p) {
804
804
  const f = d.csrf, l = d.data[0].dataelements, g = new FormData();
805
805
  let h;
806
- s instanceof Blob ? h = s : h = new Blob([s], {
806
+ i instanceof Blob ? h = i : h = new Blob([i], {
807
807
  type: "text/plain"
808
- }), g.append(l.ticketparamname, l.ticket), g.append("file_0", h, i);
808
+ }), g.append(l.ticketparamname, l.ticket), g.append("file_0", h, s);
809
809
  const y = {};
810
810
  y.method = "POST", y.data = g, y.onComplete = function(S) {
811
811
  let w = {
@@ -821,7 +821,7 @@ function oe(e, n, t, s, i, r, o = void 0, a = void 0) {
821
821
  files: [
822
822
  {
823
823
  dataelements: {
824
- title: i,
824
+ title: s,
825
825
  receipt: S
826
826
  },
827
827
  updateAction: "REVISE"
@@ -851,11 +851,11 @@ function oe(e, n, t, s, i, r, o = void 0, a = void 0) {
851
851
  }
852
852
  });
853
853
  }
854
- async function He(e, n, t = void 0, s = void 0) {
854
+ async function He(e, n, t = void 0, i = void 0) {
855
855
  e.space, e.token, e.ctx;
856
- const i = e?.description, r = e?.title;
856
+ const s = e?.description, r = e?.title;
857
857
  if (!n) {
858
- console.warn("Error: docId undefined"), s && s("Error: docId undefined");
858
+ console.warn("Error: docId undefined"), i && i("Error: docId undefined");
859
859
  return;
860
860
  }
861
861
  let o = `${e.space}/resources/v1/modeler/documents/${n}`;
@@ -863,7 +863,7 @@ async function He(e, n, t = void 0, s = void 0) {
863
863
  data: [
864
864
  {
865
865
  dataelements: {
866
- description: i,
866
+ description: s,
867
867
  title: r
868
868
  }
869
869
  }
@@ -880,18 +880,18 @@ async function He(e, n, t = void 0, s = void 0) {
880
880
  t && t(c);
881
881
  },
882
882
  onFailure(c) {
883
- s && s(c);
883
+ i && i(c);
884
884
  }
885
885
  });
886
886
  }
887
- async function Qe(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0) {
887
+ async function Qe(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0) {
888
888
  let { tenant: o, cs_name: a } = e;
889
889
  if (!o && !a) {
890
- i && i("Credentials undefined");
890
+ s && s("Credentials undefined");
891
891
  return;
892
892
  }
893
893
  if (!n && !t) {
894
- i && i("Définition du fichier undefined");
894
+ s && s("Définition du fichier undefined");
895
895
  return;
896
896
  }
897
897
  const c = T.now().ts;
@@ -921,10 +921,10 @@ async function Qe(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0)
921
921
  t,
922
922
  n,
923
923
  (_) => {
924
- const v = new DOMParser().parseFromString(
924
+ const j = new DOMParser().parseFromString(
925
925
  _,
926
926
  "text/html"
927
- ).body.firstChild.querySelector("input").getAttributeNode("value").value, k = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(a)}/contents?receipt=${encodeURIComponent(v)}`;
927
+ ).body.firstChild.querySelector("input").getAttributeNode("value").value, k = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(a)}/contents?receipt=${encodeURIComponent(j)}`;
928
928
  let W = /(?:\.([^.]+))?$/.exec(n)[1];
929
929
  const D = JSON.stringify({
930
930
  actions: [],
@@ -951,19 +951,19 @@ async function Qe(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0)
951
951
  },
952
952
  data: D,
953
953
  type: "json",
954
- onComplete(N, Ce, Oe) {
955
- s && s(N);
954
+ onComplete(I, Ce, Oe) {
955
+ i && i(I);
956
956
  },
957
- onFailure(N) {
957
+ onFailure(I) {
958
958
  console.warn(
959
959
  "_3DSpace_Upload_Doc | pushFileInFcs | onFailure",
960
- { url: k, bodyRequest: D, err: N }
961
- ), i && i(N);
960
+ { url: k, bodyRequest: D, err: I }
961
+ ), s && s(I);
962
962
  }
963
963
  });
964
964
  },
965
965
  (_) => {
966
- console.warn("pushFileInFcs", _), i && i(_);
966
+ console.warn("pushFileInFcs", _), s && s(_);
967
967
  },
968
968
  (_) => {
969
969
  r && r({ fileName: n, progress: _ });
@@ -971,24 +971,24 @@ async function Qe(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0)
971
971
  );
972
972
  }
973
973
  } catch (y) {
974
- i && i(y);
974
+ s && s(y);
975
975
  }
976
976
  },
977
977
  onFailure(l) {
978
- console.warn("_3DSpace_Upload_Doc | onFailure"), i && i(l);
978
+ console.warn("_3DSpace_Upload_Doc | onFailure"), s && s(l);
979
979
  }
980
980
  });
981
981
  } catch {
982
- i && i();
982
+ s && s();
983
983
  }
984
984
  },
985
985
  onFailure(u) {
986
- i && i(u);
986
+ s && s(u);
987
987
  }
988
988
  }
989
989
  );
990
990
  }
991
- async function Ze(e, n, t, s = void 0, i = void 0) {
991
+ async function Ze(e, n, t, i = void 0, s = void 0) {
992
992
  e.space, e.token, e.ctx, M(
993
993
  e,
994
994
  n,
@@ -1001,19 +1001,19 @@ async function Ze(e, n, t, s = void 0, i = void 0) {
1001
1001
  t,
1002
1002
  a,
1003
1003
  (c) => {
1004
- s && s(c);
1004
+ i && i(c);
1005
1005
  },
1006
1006
  (c) => {
1007
- i && i(c);
1007
+ s && s(c);
1008
1008
  }
1009
1009
  );
1010
1010
  },
1011
1011
  (r) => {
1012
- i && i(r);
1012
+ s && s(r);
1013
1013
  }
1014
1014
  );
1015
1015
  }
1016
- async function et(e, n, t, s, i = void 0, r = void 0) {
1016
+ async function et(e, n, t, i, s = void 0, r = void 0) {
1017
1017
  ae(
1018
1018
  e,
1019
1019
  (o) => {
@@ -1027,9 +1027,9 @@ async function et(e, n, t, s, i = void 0, r = void 0) {
1027
1027
  e,
1028
1028
  c,
1029
1029
  t,
1030
- s,
1030
+ i,
1031
1031
  (d) => {
1032
- d?.data.length ? i && i(d) : r && r({
1032
+ d?.data.length ? s && s(d) : r && r({
1033
1033
  success: !1,
1034
1034
  msg: "Erreur lors de la mise en ralation entre la document et le fichier"
1035
1035
  });
@@ -1046,8 +1046,8 @@ async function et(e, n, t, s, i = void 0, r = void 0) {
1046
1046
  }
1047
1047
  function ae(e, n = void 0, t = void 0) {
1048
1048
  if (e?.space && e.token && e.ctx) {
1049
- let s = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
1050
- m(s, {
1049
+ let i = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
1050
+ m(i, {
1051
1051
  method: "PUT",
1052
1052
  headers: {
1053
1053
  ENO_CSRF_TOKEN: e.token,
@@ -1055,21 +1055,21 @@ function ae(e, n = void 0, t = void 0) {
1055
1055
  "Content-Type": "application/json",
1056
1056
  SecurityContext: e.ctx
1057
1057
  },
1058
- onComplete(i, r, o) {
1058
+ onComplete(s, r, o) {
1059
1059
  try {
1060
- i = JSON.parse(i);
1060
+ s = JSON.parse(s);
1061
1061
  } catch {
1062
1062
  }
1063
- n && n(i);
1063
+ n && n(s);
1064
1064
  },
1065
- onFailure(i) {
1066
- t && t(i);
1065
+ onFailure(s) {
1066
+ t && t(s);
1067
1067
  }
1068
1068
  });
1069
1069
  } else
1070
1070
  console.log("Error de credentials", e);
1071
1071
  }
1072
- function B(e, n, t, s = void 0, i = void 0, r = void 0) {
1072
+ function B(e, n, t, i = void 0, s = void 0, r = void 0) {
1073
1073
  console.log("pushFileInFcs", { fcs__jobTicket: e, fileData: n, fileName: t });
1074
1074
  let o = new FormData();
1075
1075
  n instanceof Blob || (n = new Blob([n], {
@@ -1083,12 +1083,12 @@ function B(e, n, t, s = void 0, i = void 0, r = void 0) {
1083
1083
  r && r(u);
1084
1084
  }
1085
1085
  }, c.onload = function() {
1086
- c.status === 200 ? s && s(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
1086
+ c.status === 200 ? i && i(c.responseText.replace(/[\n\r]/g, "")) : s && s(c.statusText);
1087
1087
  }, c.onerror = function() {
1088
- i && i(c.statusText);
1088
+ s && s(c.statusText);
1089
1089
  }, c.send(o);
1090
1090
  }
1091
- function re(e, n, t, s = void 0, i = void 0, r = void 0) {
1091
+ function re(e, n, t, i = void 0, s = void 0, r = void 0) {
1092
1092
  console.log("relatedDocAndFile", { credentials: e, receipt: n, filename: t });
1093
1093
  const o = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
1094
1094
  let a = "temp_" + T.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
@@ -1106,7 +1106,7 @@ function re(e, n, t, s = void 0, i = void 0, r = void 0) {
1106
1106
  type: "Document",
1107
1107
  dataelements: {
1108
1108
  title: o(t),
1109
- description: s
1109
+ description: i
1110
1110
  },
1111
1111
  relateddata: {
1112
1112
  files: [
@@ -1128,14 +1128,14 @@ function re(e, n, t, s = void 0, i = void 0, r = void 0) {
1128
1128
  d = JSON.parse(d);
1129
1129
  } catch {
1130
1130
  }
1131
- i && i(d);
1131
+ s && s(d);
1132
1132
  },
1133
1133
  onFailure(d) {
1134
1134
  r && r(d);
1135
1135
  }
1136
1136
  });
1137
1137
  }
1138
- function F(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
1138
+ function F(e, n = void 0, t = void 0, i = void 0, s = void 0, r = void 0, o = !1) {
1139
1139
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
1140
1140
  m(a, {
1141
1141
  method: "GET",
@@ -1153,8 +1153,8 @@ function F(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0, o = !1
1153
1153
  )
1154
1154
  ), t && (Array.isArray(t) ? t.forEach((y) => {
1155
1155
  l || h.forEach((S) => {
1156
- if (y === S.role.name && s === S.organization.title)
1157
- l = y, f = s;
1156
+ if (y === S.role.name && i === S.organization.title)
1157
+ l = y, f = i;
1158
1158
  else if (y === S.role.name) {
1159
1159
  let w = h.filter(
1160
1160
  (_) => _.role.name === y
@@ -1163,8 +1163,8 @@ function F(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0, o = !1
1163
1163
  }
1164
1164
  });
1165
1165
  }) : h.forEach((y) => {
1166
- if (t === y.role.name && s === y.organization.title)
1167
- l = t, f = s;
1166
+ if (t === y.role.name && i === y.organization.title)
1167
+ l = t, f = i;
1168
1168
  else if (t === y.role.name) {
1169
1169
  let S = h.filter(
1170
1170
  (w) => w.role.name === t
@@ -1174,7 +1174,7 @@ function F(e, n = void 0, t = void 0, s = void 0, i = void 0, r = void 0, o = !1
1174
1174
  }));
1175
1175
  }
1176
1176
  }
1177
- p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && o ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
1177
+ p && f && l ? (u = l + "." + f + "." + p, s(u)) : d.preferredcredentials && o ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, s(u)) : r && (u = l + "." + f + "." + p, r(u));
1178
1178
  },
1179
1179
  onFailure(c, d) {
1180
1180
  console.warn("Erreur de récupération du contexte de sécurité. => ", {
@@ -1193,14 +1193,14 @@ async function E(e, n = void 0, t = void 0) {
1193
1193
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
1194
1194
  ), t && t("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1195
1195
  e,
1196
- (s) => {
1197
- e.token = s;
1196
+ (i) => {
1197
+ e.token = i;
1198
1198
  },
1199
- (s) => {
1200
- console.log("☠️ error => ", s);
1199
+ (i) => {
1200
+ console.log("☠️ error => ", i);
1201
1201
  }
1202
- ), new Promise((s, i) => {
1203
- j(
1202
+ ), new Promise((i, s) => {
1203
+ v(
1204
1204
  e,
1205
1205
  (r) => {
1206
1206
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
@@ -1215,14 +1215,14 @@ async function E(e, n = void 0, t = void 0) {
1215
1215
  } catch {
1216
1216
  a = o;
1217
1217
  }
1218
- n && typeof n == "function" && n(a), s(a);
1218
+ n && typeof n == "function" && n(a), i(a);
1219
1219
  },
1220
1220
  onFailure(o, a, c) {
1221
1221
  t && (console.log("error http", o), t({
1222
1222
  msg: JSON.parse(o),
1223
1223
  headers: a,
1224
1224
  xhr: c
1225
- }), i({
1225
+ }), s({
1226
1226
  msg: JSON.parse(o),
1227
1227
  headers: a,
1228
1228
  xhr: c
@@ -1231,12 +1231,12 @@ async function E(e, n = void 0, t = void 0) {
1231
1231
  });
1232
1232
  },
1233
1233
  (r) => {
1234
- t && t(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1234
+ t && t(r), console.log("*_3dspace_download_doc / error file URL *", r), s(r);
1235
1235
  }
1236
1236
  );
1237
1237
  });
1238
1238
  }
1239
- async function ce(e, n, t = void 0, s = void 0) {
1239
+ async function ce(e, n, t = void 0, i = void 0) {
1240
1240
  typeof n < "u" && Array.isArray(n) && n?.length > 0 ? H({
1241
1241
  credentials: e,
1242
1242
  myArray: n,
@@ -1246,11 +1246,11 @@ async function ce(e, n, t = void 0, s = void 0) {
1246
1246
  t && t(r);
1247
1247
  }) : (console.warn(
1248
1248
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1249
- ), s && s(
1249
+ ), i && i(
1250
1250
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1251
1251
  ));
1252
1252
  }
1253
- function de(e, n, t = void 0, s = void 0, i = void 0) {
1253
+ function de(e, n, t = void 0, i = void 0, s = void 0) {
1254
1254
  const r = [];
1255
1255
  n.forEach((c) => {
1256
1256
  r.push({
@@ -1282,7 +1282,7 @@ function de(e, n, t = void 0, s = void 0, i = void 0) {
1282
1282
  } catch {
1283
1283
  h = l.blob();
1284
1284
  }
1285
- s && s({
1285
+ i && i({
1286
1286
  objectId: u.id,
1287
1287
  headers: g,
1288
1288
  fileName: p,
@@ -1294,17 +1294,17 @@ function de(e, n, t = void 0, s = void 0, i = void 0) {
1294
1294
  }
1295
1295
  });
1296
1296
  } catch (p) {
1297
- console.log(p), i && i(p);
1297
+ console.log(p), s && s(p);
1298
1298
  }
1299
1299
  }));
1300
1300
  },
1301
1301
  onFailure(c) {
1302
- console.log(c), i && i(c);
1302
+ console.log(c), s && s(c);
1303
1303
  }
1304
1304
  });
1305
1305
  }
1306
- function tt(e, n, t = void 0, s = void 0) {
1307
- return new Promise((i) => {
1306
+ function tt(e, n, t = void 0, i = void 0) {
1307
+ return new Promise((s) => {
1308
1308
  if (e.token === "" && O(e), n !== void 0 && n !== "" && n !== null) {
1309
1309
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
1310
1310
  let o = {
@@ -1327,14 +1327,14 @@ function tt(e, n, t = void 0, s = void 0) {
1327
1327
  t && t(a);
1328
1328
  },
1329
1329
  onFailure(a) {
1330
- s && s(a);
1330
+ i && i(a);
1331
1331
  }
1332
1332
  };
1333
1333
  m(r, o);
1334
1334
  }
1335
1335
  });
1336
1336
  }
1337
- function nt(e, n, t, s = void 0, i = void 0) {
1337
+ function nt(e, n, t, i = void 0, s = void 0) {
1338
1338
  return new Promise((r) => {
1339
1339
  if (e.token === "" && O(e), n !== void 0 && n !== "" && n !== null) {
1340
1340
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -1356,18 +1356,18 @@ function nt(e, n, t, s = void 0, i = void 0) {
1356
1356
  }),
1357
1357
  type: "json",
1358
1358
  onComplete(c) {
1359
- s && s(c);
1359
+ i && i(c);
1360
1360
  },
1361
1361
  onFailure(c) {
1362
- i && i(c);
1362
+ s && s(c);
1363
1363
  }
1364
1364
  };
1365
1365
  m(o, a);
1366
1366
  }
1367
1367
  });
1368
1368
  }
1369
- function st(e, n, t = void 0, s = void 0) {
1370
- return new Promise((i) => {
1369
+ function st(e, n, t = void 0, i = void 0) {
1370
+ return new Promise((s) => {
1371
1371
  if (e.token === "" && O(e), n !== void 0 && n !== "" && n !== null) {
1372
1372
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1373
1373
  F(
@@ -1400,15 +1400,15 @@ function st(e, n, t = void 0, s = void 0) {
1400
1400
  t && t(a);
1401
1401
  },
1402
1402
  onFailure(a) {
1403
- s && s(a);
1403
+ i && i(a);
1404
1404
  }
1405
1405
  };
1406
1406
  m(r, o);
1407
1407
  }
1408
1408
  });
1409
1409
  }
1410
- function it(e, n, t = void 0, s = void 0) {
1411
- return new Promise((i) => {
1410
+ function it(e, n, t = void 0, i = void 0) {
1411
+ return new Promise((s) => {
1412
1412
  if (e.token === "" && O(e), n !== void 0 && n !== "" && n !== null) {
1413
1413
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1414
1414
  F(
@@ -1447,14 +1447,14 @@ function it(e, n, t = void 0, s = void 0) {
1447
1447
  t && t(a);
1448
1448
  },
1449
1449
  onFailure(a) {
1450
- s && s(a);
1450
+ i && i(a);
1451
1451
  }
1452
1452
  };
1453
1453
  m(r, o);
1454
1454
  }
1455
1455
  });
1456
1456
  }
1457
- function ot(e, n, t, s = void 0, i = void 0) {
1457
+ function ot(e, n, t, i = void 0, s = void 0) {
1458
1458
  return new Promise((r) => {
1459
1459
  if (e.token === "" && O(e), n !== void 0 && n !== "" && n !== null) {
1460
1460
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
@@ -1491,10 +1491,10 @@ function ot(e, n, t, s = void 0, i = void 0) {
1491
1491
  }),
1492
1492
  type: "json",
1493
1493
  onComplete(c) {
1494
- s && s(c);
1494
+ i && i(c);
1495
1495
  },
1496
1496
  onFailure(c) {
1497
- i && i(c);
1497
+ s && s(c);
1498
1498
  }
1499
1499
  };
1500
1500
  m(o, a);
@@ -1503,8 +1503,8 @@ function ot(e, n, t, s = void 0, i = void 0) {
1503
1503
  }
1504
1504
  function ue(e) {
1505
1505
  return new Promise((n, t) => {
1506
- const s = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1507
- m(s, {
1506
+ const i = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1507
+ m(i, {
1508
1508
  method: "GET",
1509
1509
  onComplete(r) {
1510
1510
  n(r);
@@ -1515,8 +1515,8 @@ function ue(e) {
1515
1515
  });
1516
1516
  });
1517
1517
  }
1518
- function at(e, n, t = void 0, s = void 0) {
1519
- return new Promise(async (i, r) => {
1518
+ function at(e, n, t = void 0, i = void 0) {
1519
+ return new Promise(async (s, r) => {
1520
1520
  const { tenant: o, ctx: a, space: c } = e;
1521
1521
  (!o || !a || !c) && r({ error: "Erreur de credentials", tenant: o, ctx: a, space: c });
1522
1522
  const d = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=1&withAttributes=1&withCopyFrom=1&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
@@ -1541,22 +1541,22 @@ function at(e, n, t = void 0, s = void 0) {
1541
1541
  }),
1542
1542
  type: "json",
1543
1543
  onComplete(f) {
1544
- t && t(f), i(f);
1544
+ t && t(f), s(f);
1545
1545
  },
1546
1546
  onFailure(f) {
1547
- s && s(f), r(f);
1547
+ i && i(f), r(f);
1548
1548
  }
1549
1549
  };
1550
1550
  m(d, p);
1551
1551
  });
1552
1552
  }
1553
- function rt(e, n, t, s, i = void 0, r = void 0) {
1553
+ function rt(e, n, t, i, s = void 0, r = void 0) {
1554
1554
  return new Promise((o) => {
1555
1555
  const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1556
1556
  let c = {
1557
1557
  attributes: {
1558
1558
  title: t,
1559
- description: s,
1559
+ description: i,
1560
1560
  inheritedAccess: "no"
1561
1561
  }
1562
1562
  }, d = {
@@ -1574,7 +1574,7 @@ function rt(e, n, t, s, i = void 0, r = void 0) {
1574
1574
  data: JSON.stringify(d),
1575
1575
  type: "json",
1576
1576
  onComplete(p) {
1577
- i && i(p);
1577
+ s && s(p);
1578
1578
  },
1579
1579
  onFailure(p) {
1580
1580
  r && r(p);
@@ -1583,7 +1583,7 @@ function rt(e, n, t, s, i = void 0, r = void 0) {
1583
1583
  m(a, u);
1584
1584
  });
1585
1585
  }
1586
- function ct(e, n, t, s, i = void 0, r = void 0) {
1586
+ function ct(e, n, t, i, s = void 0, r = void 0) {
1587
1587
  return console.log("credentials", e), new Promise((o) => {
1588
1588
  `${e.space}`, JSON.stringify({
1589
1589
  csrf: {
@@ -1598,7 +1598,7 @@ function ct(e, n, t, s, i = void 0, r = void 0) {
1598
1598
  id: n,
1599
1599
  dataelements: {
1600
1600
  personList: t,
1601
- eventsList: s
1601
+ eventsList: i
1602
1602
  },
1603
1603
  tenant: e.tenant
1604
1604
  }
@@ -1608,12 +1608,12 @@ function ct(e, n, t, s, i = void 0, r = void 0) {
1608
1608
  }
1609
1609
  //!SECTION
1610
1610
  function dt(e, n = void 0, t = void 0) {
1611
- const s = {
1611
+ const i = {
1612
1612
  base: `${e.space}`,
1613
1613
  uri: "/resources/bps/cspaces",
1614
1614
  optTenant: `tenant=${e.tenant}`
1615
- }, i = `${s.base}${s.uri}?${s.optTenant}`;
1616
- m(i, {
1615
+ }, s = `${i.base}${i.uri}?${i.optTenant}`;
1616
+ m(s, {
1617
1617
  method: "GET",
1618
1618
  headers: {
1619
1619
  Accept: "application/json,text/javascript,*/*",
@@ -1628,36 +1628,36 @@ function dt(e, n = void 0, t = void 0) {
1628
1628
  }
1629
1629
  });
1630
1630
  }
1631
- function ut(e, n, t, s) {
1632
- j(
1631
+ function ut(e, n, t, i) {
1632
+ v(
1633
1633
  e.space,
1634
1634
  n,
1635
- (i) => {
1636
- m(i, {
1635
+ (s) => {
1636
+ m(s, {
1637
1637
  header: { ENO_CSRF_TOKEN: e.token },
1638
1638
  onComplete: (r) => {
1639
1639
  t && t(r);
1640
1640
  },
1641
1641
  onFailure: (r) => {
1642
- console.log("error http", r), s && s(r);
1642
+ console.log("error http", r), i && i(r);
1643
1643
  }
1644
1644
  });
1645
1645
  }
1646
1646
  );
1647
1647
  }
1648
- async function pt(e, n, t = void 0, s = void 0) {
1649
- return new Promise((i) => {
1650
- j(e, n, (r) => {
1648
+ async function pt(e, n, t = void 0, i = void 0) {
1649
+ return new Promise((s) => {
1650
+ v(e, n, (r) => {
1651
1651
  m(r, {
1652
- onComplete: (o, a, c) => (i(JSON.parse(o)), t && t(JSON.parse(o), a, c), i),
1652
+ onComplete: (o, a, c) => (s(JSON.parse(o)), t && t(JSON.parse(o), a, c), s),
1653
1653
  onFailure: (o, a, c) => {
1654
- s && s(o, a, c), console.log(o, a?.errormsg);
1654
+ i && i(o, a, c), console.log(o, a?.errormsg);
1655
1655
  }
1656
1656
  });
1657
1657
  });
1658
1658
  });
1659
1659
  }
1660
- function lt(e, n, t, s = void 0, i = void 0) {
1660
+ function lt(e, n, t, i = void 0, s = void 0) {
1661
1661
  const r = new Blob([JSON.stringify(n)], { type: "text/plain" });
1662
1662
  e = { ...e, objID: t }, R(
1663
1663
  e,
@@ -1671,15 +1671,15 @@ function lt(e, n, t, s = void 0, i = void 0) {
1671
1671
  r,
1672
1672
  c,
1673
1673
  (d) => {
1674
- s && s(d);
1674
+ i && i(d);
1675
1675
  },
1676
1676
  (d) => {
1677
- i && i(d);
1677
+ s && s(d);
1678
1678
  }
1679
1679
  );
1680
1680
  },
1681
1681
  (o) => {
1682
- console.log("En cas d'erreur nous avons :", o), alert("Erreur lors de la sauvegarde, Veuillez réessayez"), i && i(o);
1682
+ console.log("En cas d'erreur nous avons :", o), alert("Erreur lors de la sauvegarde, Veuillez réessayez"), s && s(o);
1683
1683
  }
1684
1684
  );
1685
1685
  }
@@ -1688,60 +1688,60 @@ const A = [];
1688
1688
  async function ft(e, n = void 0, t = void 0) {
1689
1689
  e.objID && e.objID !== "" ? R(
1690
1690
  e,
1691
- (s) => {
1692
- n && n(s);
1691
+ (i) => {
1692
+ n && n(i);
1693
1693
  },
1694
- (s) => {
1695
- t && t(s);
1694
+ (i) => {
1695
+ t && t(i);
1696
1696
  }
1697
1697
  ) : (e.objID === null || e.objID === "") && O(
1698
1698
  e,
1699
- (s) => {
1700
- n && n({ rep: s, msg: "Pas d'objID, ou invalide" });
1699
+ (i) => {
1700
+ n && n({ rep: i, msg: "Pas d'objID, ou invalide" });
1701
1701
  },
1702
- (s) => {
1703
- t && t({ msg: "Pas d'objID et erreur sur le Space", err: s });
1702
+ (i) => {
1703
+ t && t({ msg: "Pas d'objID et erreur sur le Space", err: i });
1704
1704
  }
1705
1705
  );
1706
1706
  }
1707
1707
  async function mt(e, n = void 0, t = void 0) {
1708
1708
  console.log("getDatasByTenant (getDocuments)", e), await E(
1709
1709
  e,
1710
- (s) => {
1711
- const i = {};
1712
- i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), n && n?.(i);
1710
+ (i) => {
1711
+ const s = {};
1712
+ s.obj = i, console.log("getDatasByTenant (getDocuments) _datas", s), n && n?.(s);
1713
1713
  },
1714
- (s) => {
1715
- t && t?.(s);
1714
+ (i) => {
1715
+ t && t?.(i);
1716
1716
  }
1717
1717
  );
1718
1718
  }
1719
1719
  function gt(e, n = void 0, t = void 0) {
1720
- const s = [];
1720
+ const i = [];
1721
1721
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1722
1722
  console.warn("la liste est vide ou n'est pas un tableau");
1723
1723
  return;
1724
1724
  }
1725
- e.objIds.forEach((i, r) => {
1725
+ e.objIds.forEach((s, r) => {
1726
1726
  E(
1727
1727
  e,
1728
- i.objID,
1728
+ s.objID,
1729
1729
  (o) => {
1730
- s.push({ [i.name]: o }), i.name === "dbProjets" && (K = o.affaires.map((a) => a.objectID), pe(e, q)), r === e.objIds.length - 1 && (n && n(s), delete e.objIds, delete e.datas);
1730
+ i.push({ [s.name]: o }), s.name === "dbProjets" && (K = o.affaires.map((a) => a.objectID), pe(e, q)), r === e.objIds.length - 1 && (n && n(i), delete e.objIds, delete e.datas);
1731
1731
  }
1732
1732
  );
1733
1733
  });
1734
1734
  }
1735
- function pe(e, n, t = void 0, s = void 0) {
1735
+ function pe(e, n, t = void 0, i = void 0) {
1736
1736
  ce(
1737
1737
  e,
1738
1738
  K,
1739
- (i) => {
1739
+ (s) => {
1740
1740
  const r = [...n];
1741
- r.find((o) => o.objectID === i.objectId).data = i.data, q = r, A.push(i.data), t && t(A);
1741
+ r.find((o) => o.objectID === s.objectId).data = s.data, q = r, A.push(s.data), t && t(A);
1742
1742
  },
1743
- (i) => {
1744
- s && (s(i), console.log(i));
1743
+ (s) => {
1744
+ i && (i(s), console.log(s));
1745
1745
  }
1746
1746
  );
1747
1747
  }
@@ -1765,12 +1765,12 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
1765
1765
  order_by: "desc",
1766
1766
  tag: "testTag"
1767
1767
  };
1768
- function ht(e, n, t = void 0, s = void 0) {
1769
- const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = n, d = {
1768
+ function ht(e, n, t = void 0, i = void 0) {
1769
+ const { space: s, tenant: r } = e, { objId: o, pred: a, tag: c } = n, d = {
1770
1770
  uri: "/resources/6w/tags",
1771
1771
  otpCTX: "SecurityContext=preferred",
1772
1772
  optTenant: `tenant=${r}`
1773
- }, u = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1773
+ }, u = `${s}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1774
1774
  tag: [
1775
1775
  {
1776
1776
  subject: [
@@ -1808,26 +1808,26 @@ function ht(e, n, t = void 0, s = void 0) {
1808
1808
  t && t(w);
1809
1809
  },
1810
1810
  (w) => {
1811
- s && s(w);
1811
+ i && i(w);
1812
1812
  }
1813
1813
  );
1814
1814
  },
1815
1815
  (g, h) => {
1816
1816
  const y = g;
1817
- y.msg = h.errormsg, y.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", y), s && s(y);
1817
+ y.msg = h.errormsg, y.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", y), i && i(y);
1818
1818
  }
1819
1819
  );
1820
1820
  }, 2e3);
1821
1821
  },
1822
1822
  onFailure(f, l) {
1823
1823
  const g = f;
1824
- g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1824
+ g.msg = l.errormsg, g.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", g), i && i(g);
1825
1825
  }
1826
1826
  });
1827
1827
  }
1828
- function ge(e, n, t = void 0, s = void 0) {
1828
+ function ge(e, n, t = void 0, i = void 0) {
1829
1829
  console.log("obj ", n);
1830
- const i = n.info.name, r = {
1830
+ const s = n.info.name, r = {
1831
1831
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1832
1832
  uri: "/federated/search"
1833
1833
  }, o = `${r.baseUrl}${r.uri}`, a = {
@@ -1865,7 +1865,7 @@ function ge(e, n, t = void 0, s = void 0) {
1865
1865
  ],
1866
1866
  with_synthesis_hierarchical: !0,
1867
1867
  select_file: ["icon", "thumbnail_2d"],
1868
- query: i,
1868
+ query: s,
1869
1869
  specific_source_parameter: {
1870
1870
  "3dspace": {
1871
1871
  additional_query: ' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'
@@ -1904,12 +1904,12 @@ function ge(e, n, t = void 0, s = void 0) {
1904
1904
  },
1905
1905
  onFailure(u, p) {
1906
1906
  const f = u;
1907
- 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);
1907
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), i && i(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
1908
1908
  }
1909
1909
  });
1910
1910
  }
1911
- function yt(e, n, t = void 0, s = void 0) {
1912
- const { objId: i, pred: r, tag: o } = n, a = {
1911
+ function yt(e, n, t = void 0, i = void 0) {
1912
+ const { objId: s, pred: r, tag: o } = n, a = {
1913
1913
  uri: "/resources/6w/tags",
1914
1914
  otpCTX: "SecurityContext=preferred",
1915
1915
  optTenant: `tenant=${e.tenant}`
@@ -1918,7 +1918,7 @@ function yt(e, n, t = void 0, s = void 0) {
1918
1918
  {
1919
1919
  subject: [
1920
1920
  {
1921
- uri: `pid://${i}`
1921
+ uri: `pid://${s}`
1922
1922
  }
1923
1923
  ],
1924
1924
  predicate: X[r],
@@ -1940,12 +1940,12 @@ function yt(e, n, t = void 0, s = void 0) {
1940
1940
  },
1941
1941
  onFailure(u, p) {
1942
1942
  const f = u;
1943
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1943
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), i && i(f);
1944
1944
  }
1945
1945
  });
1946
1946
  }
1947
- function _t(e, n = "", t = void 0, s = void 0) {
1948
- const { space: i } = e;
1947
+ function _t(e, n = "", t = void 0, i = void 0) {
1948
+ const { space: s } = e;
1949
1949
  if (n === "")
1950
1950
  return;
1951
1951
  const r = {
@@ -1953,7 +1953,7 @@ function _t(e, n = "", t = void 0, s = void 0) {
1953
1953
  }, o = {
1954
1954
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1955
1955
  Accept: "application/json,text/javascript,*/*"
1956
- }, a = `${i}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${n}`;
1956
+ }, a = `${s}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${n}`;
1957
1957
  m(a, {
1958
1958
  method: "POST",
1959
1959
  headers: o,
@@ -1963,25 +1963,25 @@ function _t(e, n = "", t = void 0, s = void 0) {
1963
1963
  },
1964
1964
  onFailure(d, u) {
1965
1965
  const p = d;
1966
- p.msg = u.error, s && s(p);
1966
+ p.msg = u.error, i && i(p);
1967
1967
  }
1968
1968
  });
1969
1969
  }
1970
1970
  async function C(e, n = void 0, t = void 0) {
1971
- const s = e._3DSwym + "/api/index/tk";
1972
- return m(s, {
1973
- onComplete(i, r, o) {
1974
- const a = JSON.parse(i);
1971
+ const i = e._3DSwym + "/api/index/tk";
1972
+ return m(i, {
1973
+ onComplete(s, r, o) {
1974
+ const a = JSON.parse(s);
1975
1975
  if (n)
1976
1976
  return n(a), e.token = a?.result?.ServerToken;
1977
1977
  },
1978
- onFailure(i) {
1979
- t && t(i);
1978
+ onFailure(s) {
1979
+ t && t(s);
1980
1980
  }
1981
1981
  });
1982
1982
  }
1983
1983
  function St(e, n = void 0, t = void 0) {
1984
- const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1984
+ const i = `${e._3DSwym}/api/exalead/whatsnew`, s = {
1985
1985
  params: {
1986
1986
  community_id: null,
1987
1987
  hash_key: null,
@@ -1992,14 +1992,14 @@ function St(e, n = void 0, t = void 0) {
1992
1992
  }
1993
1993
  };
1994
1994
  C(e, (r) => {
1995
- m(s, {
1995
+ m(i, {
1996
1996
  method: "POST",
1997
1997
  headers: {
1998
1998
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1999
1999
  "Content-type": "application/json;charset=UTF-8",
2000
2000
  Accept: "application/json"
2001
2001
  },
2002
- data: JSON.stringify(i),
2002
+ data: JSON.stringify(s),
2003
2003
  type: "json",
2004
2004
  onComplete(o, a) {
2005
2005
  n && n(o, a);
@@ -2011,7 +2011,7 @@ function St(e, n = void 0, t = void 0) {
2011
2011
  });
2012
2012
  }
2013
2013
  function wt(e, n = void 0, t = void 0) {
2014
- const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
2014
+ const i = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, s = {
2015
2015
  params: {
2016
2016
  idsToFilterArr: [],
2017
2017
  mode: "offline",
@@ -2021,14 +2021,14 @@ function wt(e, n = void 0, t = void 0) {
2021
2021
  }
2022
2022
  };
2023
2023
  C(e, (r) => {
2024
- m(s, {
2024
+ m(i, {
2025
2025
  method: "POST",
2026
2026
  headers: {
2027
2027
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
2028
2028
  "Content-type": "application/json;charset=UTF-8",
2029
2029
  Accept: "application/json"
2030
2030
  },
2031
- data: JSON.stringify(i),
2031
+ data: JSON.stringify(s),
2032
2032
  type: "json",
2033
2033
  onComplete(o, a) {
2034
2034
  const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
@@ -2041,14 +2041,14 @@ function wt(e, n = void 0, t = void 0) {
2041
2041
  });
2042
2042
  }
2043
2043
  function Ct(e, n = void 0, t = void 0) {
2044
- const s = {
2044
+ const i = {
2045
2045
  base: e._3DSwym,
2046
2046
  uri: "/api/community/listmycommunities",
2047
2047
  limit: `/limit/${e.limit ? e.limit : 500}`,
2048
2048
  page: `/page/${e.page ? e.page : "1"}`
2049
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
2049
+ }, s = `${i.base}${i.uri}${i.limit}${i.page}`, r = [];
2050
2050
  C(e, (o) => {
2051
- m(i, {
2051
+ m(s, {
2052
2052
  method: "GET",
2053
2053
  headers: {
2054
2054
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
@@ -2082,8 +2082,8 @@ function Ct(e, n = void 0, t = void 0) {
2082
2082
  });
2083
2083
  });
2084
2084
  }
2085
- function he(e, n, t, s) {
2086
- const i = `${e._3DSwym}/api/community/listmembers`, r = {
2085
+ function he(e, n, t, i) {
2086
+ const s = `${e._3DSwym}/api/community/listmembers`, r = {
2087
2087
  params: {
2088
2088
  page: e.page ? e.page : 1,
2089
2089
  limit: e.limit ? e.limit : 50,
@@ -2091,7 +2091,7 @@ function he(e, n, t, s) {
2091
2091
  }
2092
2092
  };
2093
2093
  C(e, (o) => {
2094
- m(i, {
2094
+ m(s, {
2095
2095
  method: "POST",
2096
2096
  headers: {
2097
2097
  "Content-type": "application/json;charset=UTF-8",
@@ -2105,17 +2105,17 @@ function he(e, n, t, s) {
2105
2105
  },
2106
2106
  onFailure(a, c) {
2107
2107
  const d = a;
2108
- d.status = c.status, d.response = c.errormsg, s && s(d);
2108
+ d.status = c.status, d.response = c.errormsg, i && i(d);
2109
2109
  }
2110
2110
  });
2111
2111
  });
2112
2112
  }
2113
2113
  function Ot(e, n = void 0, t = void 0) {
2114
- const s = "YXdA5x4DSUKtlAi2wmnyTA";
2115
- e.commu_id || (e.commu_id = s);
2116
- const i = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
2114
+ const i = "YXdA5x4DSUKtlAi2wmnyTA";
2115
+ e.commu_id || (e.commu_id = i);
2116
+ const s = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
2117
2117
  C(e, (r) => {
2118
- m(i, {
2118
+ m(s, {
2119
2119
  method: "GET",
2120
2120
  headers: {
2121
2121
  "Content-type": "application/json;charset=UTF-8",
@@ -2133,9 +2133,9 @@ function Ot(e, n = void 0, t = void 0) {
2133
2133
  });
2134
2134
  });
2135
2135
  }
2136
- function bt(e, n, t = void 0, s = void 0) {
2137
- const { listAllContacts: i, currentUser: r, _3DSwym: o } = e;
2138
- console.log("__listAllContacts", i.hits);
2136
+ function bt(e, n, t = void 0, i = void 0) {
2137
+ const { listAllContacts: s, currentUser: r, _3DSwym: o } = e;
2138
+ console.log("__listAllContacts", s.hits);
2139
2139
  const a = `${o}/api/directmessages`, c = {
2140
2140
  users: [r.login].concat(n.receipt)
2141
2141
  }, d = {
@@ -2151,7 +2151,7 @@ function bt(e, n, t = void 0, s = void 0) {
2151
2151
  p !== void 0 && (d.id_msg = p.id, u = !0, P(e, d));
2152
2152
  },
2153
2153
  (p) => {
2154
- u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
2154
+ u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), i && i(p), d.id_msg = "";
2155
2155
  }
2156
2156
  ), u === !1 && setTimeout(() => {
2157
2157
  u === !1 && C(e, (p) => {
@@ -2170,16 +2170,16 @@ function bt(e, n, t = void 0, s = void 0) {
2170
2170
  },
2171
2171
  onFailure(f, l, g) {
2172
2172
  const h = f;
2173
- h.msg = l.errormsg, h.status = l.status, s && s(h);
2173
+ h.msg = l.errormsg, h.status = l.status, i && i(h);
2174
2174
  }
2175
2175
  });
2176
2176
  });
2177
2177
  }, 500);
2178
2178
  }
2179
- function ye(e, n, t, s) {
2180
- const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
2179
+ function ye(e, n, t, i) {
2180
+ const s = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
2181
2181
  C(e, (r) => {
2182
- m(i, {
2182
+ m(s, {
2183
2183
  method: "GET",
2184
2184
  headers: {
2185
2185
  Accept: "application/json,text/javascript,*/*",
@@ -2196,22 +2196,22 @@ function ye(e, n, t, s) {
2196
2196
  f.push(l.login);
2197
2197
  }), JSON.stringify(f) === JSON.stringify(d);
2198
2198
  });
2199
- t && u !== void 0 ? t(u) : (s || u === void 0) && s(u);
2199
+ t && u !== void 0 ? t(u) : (i || u === void 0) && i(u);
2200
2200
  },
2201
2201
  onFailure(o) {
2202
2202
  const a = o;
2203
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
2203
+ a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), i && i(a);
2204
2204
  }
2205
2205
  });
2206
2206
  });
2207
2207
  }
2208
- function P(e, n, t = void 0, s = void 0) {
2209
- const i = {
2208
+ function P(e, n, t = void 0, i = void 0) {
2209
+ const s = {
2210
2210
  base: e._3DSwym,
2211
2211
  uri: "/api/community",
2212
2212
  id_msg: `${n.id_msg}`,
2213
2213
  endUri: "/instantmessages"
2214
- }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
2214
+ }, r = `${s.base}${s.uri}/${s.id_msg}${s.endUri}`, o = {
2215
2215
  author: { login: n.senderId, displayName: n.senderName },
2216
2216
  accessState: null,
2217
2217
  commentUri: null,
@@ -2237,7 +2237,7 @@ function P(e, n, t = void 0, s = void 0) {
2237
2237
  },
2238
2238
  onFailure(c, d) {
2239
2239
  const u = c;
2240
- u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
2240
+ u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), i && i(u);
2241
2241
  }
2242
2242
  });
2243
2243
  });
@@ -2249,8 +2249,8 @@ function _e(e) {
2249
2249
  <hr/>
2250
2250
  <p><u>envoyer :</u>Le <b>${n} à ${t}</b></p>`;
2251
2251
  }
2252
- function Tt(e, n, t = void 0, s = void 0) {
2253
- const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
2252
+ function Tt(e, n, t = void 0, i = void 0) {
2253
+ const s = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
2254
2254
  (c) => c.id === n.community_id
2255
2255
  ), o = e.swymCommunities.find(
2256
2256
  (c) => c.title.toLowerCase() === n.community_title.toLowerCase()
@@ -2272,7 +2272,7 @@ function Tt(e, n, t = void 0, s = void 0) {
2272
2272
  Accept: "application/json",
2273
2273
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
2274
2274
  };
2275
- m(i, {
2275
+ m(s, {
2276
2276
  method: "POST",
2277
2277
  headers: d,
2278
2278
  data: JSON.stringify(a),
@@ -2283,16 +2283,16 @@ function Tt(e, n, t = void 0, s = void 0) {
2283
2283
  },
2284
2284
  onFailure(u, p, f) {
2285
2285
  const l = u;
2286
- l.status = p.status, l.response = p.errormsg, s && s(l);
2286
+ l.status = p.status, l.response = p.errormsg, i && i(l);
2287
2287
  }
2288
2288
  });
2289
2289
  });
2290
2290
  }
2291
2291
  function $t(e, n = void 0, t = void 0) {
2292
- const s = { base: e.space, uri: "/api/idea/add" };
2292
+ const i = { base: e.space, uri: "/api/idea/add" };
2293
2293
  if (!Array.isArray(e.swymCommunities)) {
2294
2294
  const o = "☠️ swymCommunities doit être un tableau d'objets de communautés";
2295
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2295
+ throw new Error(`Erreur sur cette requête : ${i.base + i.uri}`, {
2296
2296
  cause: o
2297
2297
  });
2298
2298
  }
@@ -2300,19 +2300,19 @@ function $t(e, n = void 0, t = void 0) {
2300
2300
  (o) => o.id === e.community_id
2301
2301
  ) === -1) {
2302
2302
  const o = "la communauté n'existe pas dans la liste des communautés du Swym";
2303
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2303
+ throw new Error(`Erreur sur cette requête : ${i.base + i.uri}`, {
2304
2304
  cause: o
2305
2305
  });
2306
2306
  }
2307
2307
  if (e.community_id && e.community_id === "") {
2308
2308
  const o = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
2309
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2309
+ throw new Error(`Erreur sur cette requête : ${i.base + i.uri}`, {
2310
2310
  cause: o
2311
2311
  });
2312
2312
  }
2313
2313
  if (e.title && e.title === "") {
2314
2314
  const o = "☠️ title doit être un String.";
2315
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2315
+ throw new Error(`Erreur sur cette requête : ${i.base + i.uri}`, {
2316
2316
  cause: o
2317
2317
  });
2318
2318
  }
@@ -2331,7 +2331,7 @@ function $t(e, n = void 0, t = void 0) {
2331
2331
  C(e, (o) => {
2332
2332
  if (!o)
2333
2333
  throw new Error(
2334
- `☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
2334
+ `☠️ token n'est pas disponible pour cette requête : ${i.base + i.uri}`,
2335
2335
  {
2336
2336
  cause: o
2337
2337
  }
@@ -2350,7 +2350,7 @@ function $t(e, n = void 0, t = void 0) {
2350
2350
  },
2351
2351
  onFailure(c, d, u) {
2352
2352
  const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
2353
- `Erreur sur cette requête : ${s.base + s.uri}`,
2353
+ `Erreur sur cette requête : ${i.base + i.uri}`,
2354
2354
  {
2355
2355
  cause: { head: p, rep: f }
2356
2356
  }
@@ -2358,18 +2358,18 @@ function $t(e, n = void 0, t = void 0) {
2358
2358
  t && t(l);
2359
2359
  }
2360
2360
  };
2361
- m(s.base + s.uri, a);
2361
+ m(i.base + i.uri, a);
2362
2362
  });
2363
2363
  }
2364
- function Ut(e, n, t = void 0, s = void 0) {
2365
- const i = `${e.space}/api/idea/delete`, r = {
2364
+ function Ut(e, n, t = void 0, i = void 0) {
2365
+ const s = `${e.space}/api/idea/delete`, r = {
2366
2366
  params: {
2367
2367
  community_id: n.community_id,
2368
2368
  ideationIds: [n.idee_id]
2369
2369
  }
2370
2370
  };
2371
2371
  C(e, (o) => {
2372
- m(i, {
2372
+ m(s, {
2373
2373
  method: "POST",
2374
2374
  headers: {
2375
2375
  "Content-type": "application/json;charset=UTF-8",
@@ -2383,13 +2383,13 @@ function Ut(e, n, t = void 0, s = void 0) {
2383
2383
  },
2384
2384
  onFailure(a, c, d) {
2385
2385
  const u = a;
2386
- u.status = c.status, u.response = c.errormsg, s && s(u);
2386
+ u.status = c.status, u.response = c.errormsg, i && i(u);
2387
2387
  }
2388
2388
  });
2389
2389
  });
2390
2390
  }
2391
2391
  function xt(e, n = void 0, t = void 0) {
2392
- const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
2392
+ const { _3DSwym: i, _3DSwym_token: s } = e, r = `${i}/api/idea/get`;
2393
2393
  if (e.idPost === "") {
2394
2394
  const a = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
2395
2395
  throw new Error(`Erreur sur cette requête : ${r}`, { cause: a });
@@ -2404,7 +2404,7 @@ function xt(e, n = void 0, t = void 0) {
2404
2404
  headers: {
2405
2405
  "Content-type": "application/json;charset=UTF-8",
2406
2406
  Accept: "application/json",
2407
- "X-DS-SWYM-CSRFTOKEN": i
2407
+ "X-DS-SWYM-CSRFTOKEN": s
2408
2408
  },
2409
2409
  data: JSON.stringify(o),
2410
2410
  onComplete(a) {
@@ -2416,10 +2416,10 @@ function xt(e, n = void 0, t = void 0) {
2416
2416
  }
2417
2417
  });
2418
2418
  }
2419
- function It(e, n, t) {
2419
+ function Nt(e, n, t) {
2420
2420
  const {
2421
- _3DSwym: s,
2422
- _3DSwym_token: i,
2421
+ _3DSwym: i,
2422
+ _3DSwym_token: s,
2423
2423
  idPost: r,
2424
2424
  title: o,
2425
2425
  community_id: a,
@@ -2427,14 +2427,14 @@ function It(e, n, t) {
2427
2427
  status_id: d,
2428
2428
  message: u
2429
2429
  } = e, p = {
2430
- base: `${s}`,
2430
+ base: `${i}`,
2431
2431
  uri: "/api/idea/edit"
2432
2432
  }, l = {
2433
2433
  method: "POST",
2434
2434
  headers: {
2435
2435
  "Content-type": "application/json;charset=UTF-8",
2436
2436
  Accept: "application/json",
2437
- "X-DS-SWYM-CSRFTOKEN": i
2437
+ "X-DS-SWYM-CSRFTOKEN": s
2438
2438
  },
2439
2439
  data: JSON.stringify({
2440
2440
  params: {
@@ -2461,8 +2461,8 @@ function It(e, n, t) {
2461
2461
  };
2462
2462
  m(p.base + p.uri, l);
2463
2463
  }
2464
- function Nt(e, n, t = void 0, s = void 0) {
2465
- const { _3DSwym: i } = e;
2464
+ function It(e, n, t = void 0, i = void 0) {
2465
+ const { _3DSwym: s } = e;
2466
2466
  let { community_id: r, limit: o, page: a, search: c } = n;
2467
2467
  const d = [], u = 1;
2468
2468
  let p = !1, f = 2;
@@ -2473,7 +2473,7 @@ function Nt(e, n, t = void 0, s = void 0) {
2473
2473
  limit: `/limit/${o}`,
2474
2474
  page: `/page/${a}`
2475
2475
  };
2476
- let g = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
2476
+ let g = `${s}${l.uri}${l.comId}${l.limit}${l.page}`;
2477
2477
  C(e, (h) => {
2478
2478
  const y = (S) => {
2479
2479
  m(S, {
@@ -2484,11 +2484,11 @@ function Nt(e, n, t = void 0, s = void 0) {
2484
2484
  onComplete(w) {
2485
2485
  const _ = { response: JSON.parse(w) };
2486
2486
  if (f = Math.ceil(Number(_.response.nb_result) / 100), w && f >= a) {
2487
- if (a++, l.page = `/page/${a}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2487
+ if (a++, l.page = `/page/${a}`, S = `${s}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2488
2488
  d.push(_.response.result);
2489
2489
  else {
2490
2490
  const b = _.response.result.find(
2491
- (v) => v.title.includes(c)
2491
+ (j) => j.title.includes(c)
2492
2492
  );
2493
2493
  if (b) {
2494
2494
  t(b);
@@ -2504,7 +2504,7 @@ function Nt(e, n, t = void 0, s = void 0) {
2504
2504
  },
2505
2505
  onFailure(w, _) {
2506
2506
  const b = w;
2507
- b.status = _.status, b.response = _.errormsg, s && s(b);
2507
+ b.status = _.status, b.response = _.errormsg, i && i(b);
2508
2508
  }
2509
2509
  });
2510
2510
  };
@@ -2587,9 +2587,9 @@ function Se(e) {
2587
2587
  </p>` : e;
2588
2588
  }
2589
2589
  function Rt(e, n = void 0, t = void 0) {
2590
- const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
2591
- if (s && i && r && o && a) {
2592
- const c = `${i}/api/idea/forward`;
2590
+ const { tenant: i, _3DSwym: s, _3DSwym_token: r, community_id: o, idea_id: a } = e;
2591
+ if (i && s && r && o && a) {
2592
+ const c = `${s}/api/idea/forward`;
2593
2593
  m(c, {
2594
2594
  method: "POST",
2595
2595
  headers: {
@@ -2598,8 +2598,8 @@ function Rt(e, n = void 0, t = void 0) {
2598
2598
  "X-DS-SWYM-CSRFTOKEN": r
2599
2599
  },
2600
2600
  data: JSON.stringify({
2601
- community_uri: `swym:prd:${s.toUpperCase()}:community:${o}`,
2602
- content_uri: `swym:prd:${s.toUpperCase()}:idea:${a}`,
2601
+ community_uri: `swym:prd:${i.toUpperCase()}:community:${o}`,
2602
+ content_uri: `swym:prd:${i.toUpperCase()}:idea:${a}`,
2603
2603
  timeout: 3e4
2604
2604
  }),
2605
2605
  type: "json",
@@ -2620,41 +2620,41 @@ function Rt(e, n = void 0, t = void 0) {
2620
2620
  });
2621
2621
  }
2622
2622
  function Ft(e, n = void 0, t = void 0) {
2623
- return new Promise((s, i) => {
2623
+ return new Promise((i, s) => {
2624
2624
  try {
2625
2625
  let r;
2626
2626
  if (e._3DDashboard) {
2627
2627
  const o = e._3DDashboard + "/api/users/current";
2628
- console.log("_3DSwym_get_currentUser | url", o), m(o, {
2628
+ m(o, {
2629
2629
  method: "GET",
2630
2630
  onComplete(a, c, d) {
2631
2631
  let u = a.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, "");
2632
- u = u.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, ""), console.log("result", u);
2632
+ u = u.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, "");
2633
2633
  let p = {};
2634
2634
  try {
2635
2635
  p = JSON.parse(u);
2636
2636
  } catch (f) {
2637
- i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
2637
+ s("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
2638
2638
  }
2639
- 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);
2639
+ p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", r = p, i(p);
2640
2640
  },
2641
2641
  onFailure(a) {
2642
- i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", a);
2642
+ s("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", a);
2643
2643
  }
2644
2644
  });
2645
2645
  }
2646
- r ? s(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2646
+ r ? i(r) : s("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2647
2647
  } catch (r) {
2648
- i("ERROR | _3DSwym_get_currentUser => ", r);
2648
+ s("ERROR | _3DSwym_get_currentUser => ", r);
2649
2649
  }
2650
2650
  });
2651
2651
  }
2652
- function vt(e, n, t = void 0, s = void 0) {
2653
- const i = e.space + "/api/user/find/login/" + n;
2652
+ function jt(e, n, t = void 0, i = void 0) {
2653
+ const s = e.space + "/api/user/find/login/" + n;
2654
2654
  C(
2655
2655
  e,
2656
2656
  (r) => {
2657
- m(i, {
2657
+ m(s, {
2658
2658
  method: "GET",
2659
2659
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2660
2660
  onComplete(o, a, c) {
@@ -2662,25 +2662,25 @@ function vt(e, n, t = void 0, s = void 0) {
2662
2662
  t && t(d);
2663
2663
  },
2664
2664
  onFailure(o) {
2665
- s && s(o);
2665
+ i && i(o);
2666
2666
  }
2667
2667
  });
2668
2668
  },
2669
- s
2669
+ i
2670
2670
  );
2671
2671
  }
2672
- function jt(e, n = void 0, t = void 0) {
2672
+ function vt(e, n = void 0, t = void 0) {
2673
2673
  const {
2674
- _3DSwym: s,
2675
- _3DSwym_token: i,
2674
+ _3DSwym: i,
2675
+ _3DSwym_token: s,
2676
2676
  subjectUri: r,
2677
2677
  richMessage: o
2678
- } = e, a = `${s}/commentproxy/subjects/${r}/comments`, d = {
2678
+ } = e, a = `${i}/commentproxy/subjects/${r}/comments`, d = {
2679
2679
  method: "POST",
2680
2680
  headers: {
2681
2681
  "Content-type": "application/json;charset=UTF-8",
2682
2682
  Accept: "application/json",
2683
- "X-DS-SWYM-CSRFTOKEN": i
2683
+ "X-DS-SWYM-CSRFTOKEN": s
2684
2684
  },
2685
2685
  data: JSON.stringify({ richMessage: o }),
2686
2686
  type: "json",
@@ -2697,20 +2697,18 @@ function jt(e, n = void 0, t = void 0) {
2697
2697
  m(a, d);
2698
2698
  }
2699
2699
  function kt(e, n = void 0, t = void 0) {
2700
- e.tenant && J(e, (s) => {
2701
- const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2702
- return n && n(i), i;
2700
+ e.tenant && J(e, (i) => {
2701
+ const s = i.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2702
+ return n && n(s), s;
2703
2703
  });
2704
2704
  }
2705
2705
  function Dt(e, n = void 0, t = void 0) {
2706
- console.log("_Iterop_Auth_CAS"), e.tenant ? J(e, (s) => {
2707
- console.log("serviceUrls", s);
2708
- const i = s.services.find(
2706
+ e.tenant ? J(e, (i) => {
2707
+ const s = i.services.find(
2709
2708
  (a) => a.id === "3dpassport"
2710
- )?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?cors=false&service=${r}/auth/cas`;
2709
+ )?.url, r = i.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${s}/login/?cors=false&service=${r}/auth/cas`;
2711
2710
  m(o, {
2712
2711
  async onComplete(a) {
2713
- console.log("response", a);
2714
2712
  const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
2715
2713
  await fetch(c, {
2716
2714
  method: "POST"
@@ -2726,32 +2724,32 @@ function Dt(e, n = void 0, t = void 0) {
2726
2724
  }
2727
2725
  function At(e, n = void 0, t = void 0) {
2728
2726
  if (e.tenant) {
2729
- const s = e.tenant.toLowerCase();
2730
- fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
2727
+ const i = e.tenant.toLowerCase();
2728
+ fetch(`https://api.uixhome.fr/${i}/iterop/jwtuser`, {
2731
2729
  method: "POST"
2732
- }).then((i) => i.json()).then((i) => {
2733
- n && n(i);
2734
- }).catch((i) => {
2735
- t && t(i);
2730
+ }).then((s) => s.json()).then((s) => {
2731
+ n && n(s);
2732
+ }).catch((s) => {
2733
+ t && t(s);
2736
2734
  });
2737
2735
  }
2738
2736
  }
2739
- async function Pt(e, n, t = void 0, s = void 0) {
2737
+ async function Pt(e, n, t = void 0, i = void 0) {
2740
2738
  if (e.tenant) {
2741
- const i = e.tenant.toLowerCase();
2739
+ const s = e.tenant.toLowerCase();
2742
2740
  fetch(
2743
- `https://api.uixhome.fr/${i}/iterop/repository/data/tables?t=${n}`,
2741
+ `https://api.uixhome.fr/${s}/iterop/repository/data/tables?t=${n}`,
2744
2742
  {
2745
2743
  method: "GET"
2746
2744
  }
2747
2745
  ).then((r) => r.json()).then((r) => {
2748
2746
  t && t(r);
2749
2747
  }).catch((r) => {
2750
- s && s(r);
2748
+ i && i(r);
2751
2749
  });
2752
2750
  }
2753
2751
  }
2754
- function Lt(e, n, t, s = void 0, i = void 0) {
2752
+ function Lt(e, n, t, i = void 0, s = void 0) {
2755
2753
  if (e.tenant) {
2756
2754
  const r = e.tenant.toLowerCase();
2757
2755
  fetch(
@@ -2760,13 +2758,13 @@ function Lt(e, n, t, s = void 0, i = void 0) {
2760
2758
  method: "POST"
2761
2759
  }
2762
2760
  ).then((o) => o.json()).then((o) => {
2763
- s && s(o);
2764
- }).catch((o) => {
2765
2761
  i && i(o);
2762
+ }).catch((o) => {
2763
+ s && s(o);
2766
2764
  });
2767
2765
  }
2768
2766
  }
2769
- async function Jt(e, n, t, s = void 0, i = void 0) {
2767
+ async function Jt(e, n, t, i = void 0, s = void 0) {
2770
2768
  if (e.tenant) {
2771
2769
  const r = e.tenant.toLowerCase();
2772
2770
  fetch(
@@ -2775,32 +2773,32 @@ async function Jt(e, n, t, s = void 0, i = void 0) {
2775
2773
  method: "POST"
2776
2774
  }
2777
2775
  ).then((o) => o.json()).then((o) => {
2778
- s && s(o);
2779
- }).catch((o) => {
2780
2776
  i && i(o);
2777
+ }).catch((o) => {
2778
+ s && s(o);
2781
2779
  });
2782
2780
  }
2783
2781
  }
2784
- async function Mt(e, n, t, s, i = void 0, r = void 0) {
2782
+ async function Mt(e, n, t, i, s = void 0, r = void 0) {
2785
2783
  if (e.tenant) {
2786
2784
  const o = e.tenant.toLowerCase();
2787
2785
  fetch(
2788
- `https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${t}/?t=${n}&b=${s}`,
2786
+ `https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${t}/?t=${n}&b=${i}`,
2789
2787
  {
2790
2788
  method: "POST"
2791
2789
  }
2792
2790
  ).then((a) => a.json()).then((a) => {
2793
- i && i(a);
2791
+ s && s(a);
2794
2792
  }).catch((a) => {
2795
- r && r(a, t, s);
2793
+ r && r(a, t, i);
2796
2794
  });
2797
2795
  }
2798
2796
  }
2799
- async function Gt(e, n, t, s, i, r = void 0, o = void 0) {
2797
+ async function Gt(e, n, t, i, s, r = void 0, o = void 0) {
2800
2798
  if (e.tenant) {
2801
2799
  const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${t}?t=${n}&c=${encodeURIComponent(
2802
- s
2803
- )}&b=${encodeURIComponent(i)}`;
2800
+ i
2801
+ )}&b=${encodeURIComponent(s)}`;
2804
2802
  fetch(a, {
2805
2803
  method: "POST"
2806
2804
  }).then((c) => c.json()).then((c) => {
@@ -2809,21 +2807,21 @@ async function Gt(e, n, t, s, i, r = void 0, o = void 0) {
2809
2807
  o && o({
2810
2808
  error: c,
2811
2809
  tableId: t,
2812
- columns: s,
2813
- body: i
2810
+ columns: i,
2811
+ body: s
2814
2812
  });
2815
2813
  });
2816
2814
  }
2817
2815
  }
2818
- async function Bt(e, n, t, s, i = void 0, r = void 0) {
2816
+ async function Bt(e, n, t, i, s = void 0, r = void 0) {
2819
2817
  if (e.tenant) {
2820
2818
  const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${t}?t=${n}&b=${encodeURIComponent(
2821
- s
2819
+ i
2822
2820
  )}`;
2823
2821
  fetch(o, {
2824
2822
  method: "POST"
2825
2823
  }).then((a) => a.json()).then((a) => {
2826
- i && i(a);
2824
+ s && s(a);
2827
2825
  }).catch((a) => {
2828
2826
  r && r({
2829
2827
  error: a,
@@ -2832,7 +2830,7 @@ async function Bt(e, n, t, s, i = void 0, r = void 0) {
2832
2830
  });
2833
2831
  }
2834
2832
  }
2835
- async function Et(e, n, t, s = void 0, i = void 0) {
2833
+ async function Et(e, n, t, i = void 0, s = void 0) {
2836
2834
  if (e.tenant) {
2837
2835
  const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${n}&b=${encodeURIComponent(
2838
2836
  t
@@ -2840,31 +2838,31 @@ async function Et(e, n, t, s = void 0, i = void 0) {
2840
2838
  fetch(r, {
2841
2839
  method: "POST"
2842
2840
  }).then((o) => o.json()).then((o) => {
2843
- s && s(o);
2841
+ i && i(o);
2844
2842
  }).catch((o) => {
2845
- i && i({
2843
+ s && s({
2846
2844
  error: o,
2847
2845
  url: r
2848
2846
  });
2849
2847
  });
2850
2848
  }
2851
2849
  }
2852
- async function Kt(e, n, t, s, i = void 0, r = void 0) {
2850
+ async function Kt(e, n, t, i, s = void 0, r = void 0) {
2853
2851
  if (e.tenant) {
2854
2852
  const o = e.tenant.toLowerCase();
2855
2853
  fetch(
2856
- `https://api.uixhome.fr/${o}/iterop/runtime/processes/${t}?t=${n}&b=${s}`,
2854
+ `https://api.uixhome.fr/${o}/iterop/runtime/processes/${t}?t=${n}&b=${i}`,
2857
2855
  {
2858
2856
  method: "POST"
2859
2857
  }
2860
2858
  ).then((a) => a.json()).then((a) => {
2861
- console.log("_Iterop_runProcess : OK"), i && i(a);
2859
+ console.log("_Iterop_runProcess : OK"), s && s(a);
2862
2860
  }).catch((a) => {
2863
2861
  r && r(a);
2864
2862
  });
2865
2863
  }
2866
2864
  }
2867
- async function qt(e, n, t, s = void 0, i = void 0) {
2865
+ async function qt(e, n, t, i = void 0, s = void 0) {
2868
2866
  if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
2869
2867
  const r = e.tenant.toLowerCase();
2870
2868
  fetch(
@@ -2873,17 +2871,17 @@ async function qt(e, n, t, s = void 0, i = void 0) {
2873
2871
  method: "POST"
2874
2872
  }
2875
2873
  ).then((o) => o.json()).then((o) => {
2876
- s && s(o);
2877
- }).catch((o) => {
2878
2874
  i && i(o);
2875
+ }).catch((o) => {
2876
+ s && s(o);
2879
2877
  });
2880
2878
  }
2881
2879
  }
2882
- async function Xt(e, n, t, s, i, r = void 0, o = void 0) {
2880
+ async function Xt(e, n, t, i, s, r = void 0, o = void 0) {
2883
2881
  if (e.tenant) {
2884
2882
  const a = e.tenant.toLowerCase();
2885
2883
  fetch(
2886
- `https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${t}/?t=${n}&cli=${s}&b=${i}`,
2884
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${t}/?t=${n}&cli=${i}&b=${s}`,
2887
2885
  {
2888
2886
  method: "POST"
2889
2887
  }
@@ -2894,23 +2892,23 @@ async function Xt(e, n, t, s, i, r = void 0, o = void 0) {
2894
2892
  });
2895
2893
  }
2896
2894
  }
2897
- async function Wt(e, n, t, s, i = void 0, r = void 0) {
2895
+ async function Wt(e, n, t, i, s = void 0, r = void 0) {
2898
2896
  if (e.tenant) {
2899
2897
  const o = e.tenant.toLowerCase();
2900
2898
  fetch(
2901
- `https://api.uixhome.fr/${o}/iterop/dependencytable/put/${t}/?t=${n}&b=${s}`,
2899
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/put/${t}/?t=${n}&b=${i}`,
2902
2900
  {
2903
2901
  method: "POST"
2904
2902
  }
2905
2903
  ).then((a) => a.json()).then((a) => {
2906
- i && i(a);
2904
+ s && s(a);
2907
2905
  }).catch((a) => {
2908
2906
  r && r(a);
2909
2907
  });
2910
2908
  }
2911
2909
  }
2912
2910
  //!SECTION
2913
- async function Vt(e, n, t, s = void 0, i = void 0) {
2911
+ async function Vt(e, n, t, i = void 0, s = void 0) {
2914
2912
  if (e.tenant) {
2915
2913
  const r = e.tenant.toLowerCase();
2916
2914
  fetch(
@@ -2919,9 +2917,9 @@ async function Vt(e, n, t, s = void 0, i = void 0) {
2919
2917
  method: "POST"
2920
2918
  }
2921
2919
  ).then((o) => o.json()).then((o) => {
2922
- s && s(o);
2923
- }).catch((o) => {
2924
2920
  i && i(o);
2921
+ }).catch((o) => {
2922
+ s && s(o);
2925
2923
  });
2926
2924
  }
2927
2925
  }
@@ -2931,7 +2929,7 @@ function Yt(e) {
2931
2929
  return console.log(n), n;
2932
2930
  }
2933
2931
  function zt(e, n = void 0, t = void 0) {
2934
- return console.log("credentials", e), new Promise((s) => {
2932
+ return console.log("credentials", e), new Promise((i) => {
2935
2933
  if (e.token === "" && O(e), !e.space || e.space === "") {
2936
2934
  const o = Z();
2937
2935
  console.log("platformeInfo", o);
@@ -2947,7 +2945,7 @@ function zt(e, n = void 0, t = void 0) {
2947
2945
  },
2948
2946
  !0
2949
2947
  );
2950
- const i = T.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2948
+ const s = T.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2951
2949
  m(r, {
2952
2950
  onComplete(o) {
2953
2951
  if (Array.isArray(JSON.parse(o))) {
@@ -2963,7 +2961,7 @@ function zt(e, n = void 0, t = void 0) {
2963
2961
  data: JSON.stringify({
2964
2962
  with_indexing_date: !0,
2965
2963
  with_nls: !1,
2966
- label: `3DSearch-${i}`,
2964
+ label: `3DSearch-${s}`,
2967
2965
  locale: "en",
2968
2966
  select_predicate: [
2969
2967
  "ds6w:label",
@@ -3028,7 +3026,7 @@ export {
3028
3026
  de as _3DSpace_get_downloadTicket_multidoc,
3029
3027
  Ye as _3DSpace_get_multiDocInfo,
3030
3028
  F as _3DSpace_get_securityContexts,
3031
- j as _3DSpace_get_ticket,
3029
+ v as _3DSpace_get_ticket,
3032
3030
  ot as _3DSpace_lifecycle_changeRevision,
3033
3031
  nt as _3DSpace_lifecycle_changeState,
3034
3032
  st as _3DSpace_lifecycle_getGraph,
@@ -3037,13 +3035,13 @@ export {
3037
3035
  at as _3DSpace_lifecycle_getRevisions,
3038
3036
  He as _3DSpace_put_docInfo,
3039
3037
  Rt as _3DSwym_ForwardIdea,
3040
- jt as _3DSwym_addComment,
3038
+ vt as _3DSwym_addComment,
3041
3039
  bt as _3DSwym_buildDirectMessage,
3042
3040
  Ut as _3DSwym_deleteIdea,
3043
- It as _3DSwym_editIdea,
3041
+ Nt as _3DSwym_editIdea,
3044
3042
  ye as _3DSwym_findCommunityToInstantMSG,
3045
3043
  Ct as _3DSwym_getAllCommunities,
3046
- Nt as _3DSwym_getAllListIdeas,
3044
+ It as _3DSwym_getAllListIdeas,
3047
3045
  St as _3DSwym_getAllNews,
3048
3046
  wt as _3DSwym_getFamiliarPeople,
3049
3047
  Ot as _3DSwym_getIdeaStatusMaturity,
@@ -3051,7 +3049,7 @@ export {
3051
3049
  xt as _3DSwym_getOneIdea,
3052
3050
  C as _3DSwym_get_Token,
3053
3051
  Ft as _3DSwym_get_currentUser,
3054
- vt as _3DSwym_get_findUser,
3052
+ jt as _3DSwym_get_findUser,
3055
3053
  $t as _3DSwym_postIdea,
3056
3054
  Tt as _3DSwym_postIdeaTemplate,
3057
3055
  P as _3DSwym_sendMessageData,
@@ -3074,13 +3072,13 @@ export {
3074
3072
  Ae as _Registry_getServicesUrl,
3075
3073
  ke as _getMe,
3076
3074
  Z as _getPlateformInfos,
3077
- je as _getPlatformServices,
3075
+ ve as _getPlatformServices,
3078
3076
  J as _getServiceUrl,
3079
3077
  De as _getServiceUrl_3DPassport,
3080
3078
  kt as _getServiceUrl_Iterop,
3081
3079
  m as _httpCallAuthenticated,
3082
3080
  Re as _setDraggable,
3083
- ve as _setDroppable,
3081
+ je as _setDroppable,
3084
3082
  Fe as _setupTagger,
3085
3083
  ht as addTagToDoc,
3086
3084
  H as chunkArray,
@@ -3095,7 +3093,7 @@ export {
3095
3093
  Ue as getCommunes,
3096
3094
  Ge as getComplementUG,
3097
3095
  ut as getDataFrom3DSpace,
3098
- Ie as getDataFromGouvFr,
3096
+ Ne as getDataFromGouvFr,
3099
3097
  mt as getDatasByTenant,
3100
3098
  gt as getDatasFrom3DSpace,
3101
3099
  pt as getDownloadDocument,
@@ -3111,6 +3109,6 @@ export {
3111
3109
  Ve as readUserGroupControl,
3112
3110
  yt as removeTagToDoc,
3113
3111
  Yt as sayHello,
3114
- Ne as updateEvent
3112
+ Ie as updateEvent
3115
3113
  };
3116
3114
  //# sourceMappingURL=wb3Api.js.map