@beam3_dev/api_module 0.0.98 → 0.0.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wb3Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
- import { DateTime as b } from "luxon";
2
+ import { DateTime as N } from "luxon";
3
3
  import { requirejs as O, widget as U } from "@widget-lab/3ddashboard-utils";
4
- function R() {
4
+ function I() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -34,10 +34,10 @@ const L = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function re(e, t = void 0, s = void 0) {
38
- const n = parseInt(e);
37
+ async function re(e, t = void 0, n = void 0) {
38
+ const s = parseInt(e);
39
39
  await fetch(
40
- "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
40
+ "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
41
41
  {
42
42
  method: "GET",
43
43
  headers: {
@@ -47,10 +47,10 @@ async function re(e, t = void 0, s = void 0) {
47
47
  ).then((o) => o.json()).then((o) => {
48
48
  t && t(o);
49
49
  }).catch((o) => {
50
- s && s(o), console.error("Erreur : " + o);
50
+ n && n(o), console.error("Erreur : " + o);
51
51
  });
52
52
  }
53
- async function ce(e, t = void 0, s = void 0) {
53
+ async function ce(e, t = void 0, n = 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 ce(e, t = void 0, s = void 0) {
59
59
  Accept: "application/json"
60
60
  }
61
61
  }
62
- ).then((n) => n.json()).then((n) => {
63
- t && t(n);
64
- }).catch((n) => {
65
- s && s(n), console.error("Erreur : " + n);
62
+ ).then((s) => s.json()).then((s) => {
63
+ t && t(s);
64
+ }).catch((s) => {
65
+ n && n(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
68
  async function de(e, t = L) {
69
- let s = b.now().year;
70
- const n = e, o = [], r = (a) => {
71
- for (let i in a)
72
- o.push({ date: i, comment: a[i] });
69
+ let n = N.now().year;
70
+ const s = e, o = [], c = (a) => {
71
+ for (let r in a)
72
+ o.push({ date: r, comment: a[r] });
73
73
  };
74
- for (let a = s; a <= s + 1; a++)
74
+ for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
76
76
  "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
77
77
  {
@@ -80,63 +80,63 @@ async function de(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((i) => i.json()).then((i) => {
84
- r(i);
85
- }).catch((i) => console.error("Erreur : " + i));
83
+ ).then((r) => r.json()).then((r) => {
84
+ c(r);
85
+ }).catch((r) => console.error("Erreur : " + r));
86
86
  return (() => {
87
- const a = n.length === 0 ? {
87
+ const a = s.length === 0 ? {
88
88
  events: []
89
- } : n;
90
- for (let i of o)
89
+ } : s;
90
+ for (let r of o)
91
91
  a.events.findIndex(
92
- (l) => l.start === b.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
92
+ (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + i.comment,
95
- start: b.fromISO(i.date).toISODate(),
96
- end: b.fromISO(i.date).toISODate(),
94
+ name: "Férié : " + r.comment,
95
+ start: N.fromISO(r.date).toISODate(),
96
+ end: N.fromISO(r.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
100
  return a;
101
101
  })();
102
102
  }
103
- async function le(e, t, s = !0) {
104
- const n = e.events.findIndex((o) => o.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((o, r) => o.start - r.start), e;
103
+ async function le(e, t, n = !0) {
104
+ const s = e.events.findIndex((o) => o.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((o, c) => o.start - c.start), e;
106
106
  }
107
107
  function m(e, t) {
108
- O(["DS/WAFData/WAFData"], (s) => {
109
- s.authenticatedRequest(e, t);
108
+ O(["DS/WAFData/WAFData"], (n) => {
109
+ n.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function pe(e, t, s) {
113
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
114
- n.draggable(e, { data: t, start: s });
112
+ function pe(e, t, n) {
113
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
+ s.draggable(e, { data: t, start: n });
115
115
  });
116
116
  }
117
117
  function ue(e, t = void 0) {
118
- O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
119
- let n;
120
- n === void 0 && (n = s.createProxy({
118
+ O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
+ let s;
120
+ s === void 0 && (s = n.createProxy({
121
121
  widgetId: U.id,
122
122
  filteringMode: "WithFilteringServices"
123
- }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
123
+ }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
124
  });
125
125
  }
126
126
  function fe(e, t) {
127
- O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
128
- s.droppable(e, { drop: t });
127
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
128
+ n.droppable(e, { drop: t });
129
129
  });
130
130
  }
131
- async function me(e, t = void 0, s = void 0) {
131
+ async function me(e, t = void 0, n = void 0) {
132
132
  await O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
- (n) => {
134
+ (s) => {
135
135
  (!e || e === "") && (e = U.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
- n.getPlatformServices({
136
+ s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
139
- onFailure: s
139
+ onFailure: n
140
140
  })
141
141
  );
142
142
  }
@@ -145,82 +145,82 @@ async function me(e, t = void 0, s = void 0) {
145
145
  function J() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const s = t.getTenant(), n = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
148
+ const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
- tenant: s,
153
- user: n,
152
+ tenant: n,
153
+ user: s,
154
154
  appsConfiguration: o,
155
- appConf: r
155
+ appConf: c
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
159
- function ge(e, t, s) {
160
- const n = {
159
+ function ge(e, t, n) {
160
+ const s = {
161
161
  base: `${e.space}`,
162
162
  uri: "/resources/AppsMngt/api/custom/applications",
163
163
  option: `?filter=${e.tenant}`
164
164
  // facultatif
165
- }, o = `${n.base}${n.uri}${n.option}`;
165
+ }, o = `${s.base}${s.uri}${s.option}`;
166
166
  m(o, {
167
167
  method: "GET",
168
168
  headers: {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(r, c, a) {
173
- const i = JSON.parse(r), d = i.data.map((l) => {
172
+ onComplete(c, i, a) {
173
+ const r = JSON.parse(c), d = r.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
- t && t(d, i);
177
+ t && t(d, r);
178
178
  },
179
- onFailure(r, c) {
180
- const a = r;
181
- a.msg = c.errormsg, a.errCode = c.errorcode, s && s(a);
179
+ onFailure(c, i) {
180
+ const a = c;
181
+ a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
182
182
  }
183
183
  });
184
184
  }
185
- function he(e, t = void 0, s = void 0) {
186
- let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
- m(n, {
188
- onComplete(o, r, c) {
185
+ function he(e, t = void 0, n = void 0) {
186
+ let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
+ m(s, {
188
+ onComplete(o, c, i) {
189
189
  const a = JSON.parse(o);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(o, r) {
193
- const c = o;
194
- c.msg = r.errormsg, c.errCode = r.errorcode, s && s(c);
192
+ onFailure(o, c) {
193
+ const i = o;
194
+ i.msg = c.errormsg, i.errCode = c.errorcode, n && n(i);
195
195
  }
196
196
  });
197
197
  }
198
- function Se(e, t, s = void 0, n = void 0) {
198
+ function Se(e, t, n = void 0, s = void 0) {
199
199
  let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
200
  m(o, {
201
- onComplete(r, c, a) {
202
- const i = JSON.parse(r);
203
- s && s(i);
201
+ onComplete(c, i, a) {
202
+ const r = JSON.parse(c);
203
+ n && n(r);
204
204
  },
205
- onFailure(r, c) {
206
- const a = r;
207
- a.msg = c.errormsg, a.errCode = c.errorcode, n && n(a);
205
+ onFailure(c, i) {
206
+ const a = c;
207
+ a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
208
208
  }
209
209
  });
210
210
  }
211
- const D = {
211
+ const F = {
212
212
  "Content-Type": "application/json",
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
- function _e(e, t, s = void 0, n = void 0) {
216
- const { space: o, currentUser: r } = e, a = `${o}${{
215
+ function _e(e, t, n = void 0, s = void 0) {
216
+ const { space: o, currentUser: c } = e, a = `${o}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, i = {
218
+ }.URIUGr}`, r = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
222
222
  description: t.description,
223
- members: t.members || [r.email, "samuel.mureau@beam3.fr"],
223
+ members: t.members || [c.email, "samuel.mureau@beam3.fr"],
224
224
  pending_members: [],
225
225
  sharing: t.sharing,
226
226
  visibility: t.visibility
@@ -229,20 +229,20 @@ function _e(e, t, s = void 0, n = void 0) {
229
229
  };
230
230
  m(a, {
231
231
  method: "POST",
232
- headers: D,
233
- data: JSON.stringify(i),
232
+ headers: F,
233
+ data: JSON.stringify(r),
234
234
  onComplete(d) {
235
- s && s(JSON.parse(d));
235
+ n && n(JSON.parse(d));
236
236
  },
237
237
  onFailure(d, l) {
238
238
  console.log(d);
239
239
  const p = d;
240
- p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
240
+ p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
241
241
  }
242
242
  });
243
243
  }
244
- function ye(e, t, s = void 0, n = void 0) {
245
- const { space: o, tenant: r } = e, c = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${c}${a}${i}`;
244
+ function ye(e, t, n = void 0, s = void 0) {
245
+ const { space: o, tenant: c } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${i}${a}${r}`;
246
246
  m(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -252,32 +252,32 @@ function ye(e, t, s = void 0, n = void 0) {
252
252
  }
253
253
  },
254
254
  onComplete(u) {
255
- s && s(JSON.parse(u));
255
+ n && n(JSON.parse(u));
256
256
  },
257
257
  onFailure(u, f) {
258
258
  const g = u;
259
- g.msg = f.errormsg, g.errCode = f.errorcode, n && n(g);
259
+ g.msg = f.errormsg, g.errCode = f.errorcode, s && s(g);
260
260
  }
261
261
  });
262
262
  }
263
- function E(e, t = void 0, s = void 0) {
264
- const { space: n, tenant: o } = e, r = n, c = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
263
+ function E(e, t = void 0, n = void 0) {
264
+ const { space: s, tenant: o } = e, c = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, r = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${r}${c}${a}`;
267
+ }, d = `${c}${i}${a}`;
268
268
  m(d, {
269
- OPTsH: i,
269
+ OPTsH: r,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
273
273
  onFailure(l, p) {
274
274
  const u = l;
275
- u.msg = p.errormsg, u.errCode = p.errorcode, s && s(u);
275
+ u.msg = p.errormsg, u.errCode = p.errorcode, n && n(u);
276
276
  }
277
277
  });
278
278
  }
279
- function we(e, t = void 0, s = void 0) {
280
- const { space: n, currentUser: o } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
279
+ function we(e, t = void 0, n = void 0) {
280
+ const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
281
281
  "Content-Type": "application/json",
282
282
  Accept: "application/json,text/javascript,*/*"
283
283
  } };
@@ -294,13 +294,13 @@ function we(e, t = void 0, s = void 0) {
294
294
  u.rules = _, t && t(u);
295
295
  },
296
296
  (_) => {
297
- s && s(_);
297
+ n && n(_);
298
298
  }
299
299
  );
300
300
  }
301
301
  },
302
302
  onFailure(l) {
303
- s && s(l);
303
+ n && n(l);
304
304
  }
305
305
  });
306
306
  } catch (l) {
@@ -308,52 +308,52 @@ function we(e, t = void 0, s = void 0) {
308
308
  }
309
309
  }
310
310
  function Ce(e, t) {
311
- const { space: s } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
311
+ const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
312
  m(o, {
313
313
  method: "DELETE"
314
314
  });
315
315
  }
316
- function Te(e, t, s, n = void 0, o = void 0) {
317
- const { space: r, tenant: c } = e, a = {
316
+ function Te(e, t, n, s = void 0, o = void 0) {
317
+ const { space: c, tenant: i } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
321
321
  nextURIGr: "/group",
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
- OPTsTenant: `tenant=dstenant:${c}`
325
- }, i = s, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(i);
324
+ OPTsTenant: `tenant=dstenant:${i}`
325
+ }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
326
326
  m(d, {
327
- headers: D,
327
+ headers: F,
328
328
  method: "PATCH",
329
329
  data: l,
330
330
  type: "json",
331
331
  onComplete(p) {
332
- n && n(p);
332
+ s && s(p);
333
333
  },
334
334
  onFailure(p) {
335
335
  o && o(p);
336
336
  }
337
337
  });
338
338
  }
339
- function Oe(e, t, s, n = void 0, o = void 0) {
340
- const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
339
+ function Oe(e, t, n, s = void 0, o = void 0) {
340
+ const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  m(a, {
342
342
  method: "PATCH",
343
- headers: D,
344
- data: JSON.stringify(s),
343
+ headers: F,
344
+ data: JSON.stringify(n),
345
345
  type: "json",
346
346
  onComplete(d) {
347
- n && n(d);
347
+ s && s(d);
348
348
  },
349
349
  onFailure(d) {
350
350
  o && o(d);
351
351
  }
352
352
  });
353
353
  }
354
- function Ne(e, t, s = void 0, n = void 0) {
355
- const { space: o } = e, c = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- m(c, {
354
+ function be(e, t, n = void 0, s = void 0) {
355
+ const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ m(i, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -362,132 +362,132 @@ function Ne(e, t, s = void 0, n = void 0) {
362
362
  }
363
363
  },
364
364
  onComplete(d) {
365
- s && s(JSON.parse(d));
365
+ n && n(JSON.parse(d));
366
366
  },
367
367
  onFailure(d) {
368
- n && n(d);
368
+ s && s(d);
369
369
  }
370
370
  });
371
371
  }
372
- async function G(e, t, s) {
372
+ async function G(e, t, n) {
373
373
  if (e.space) {
374
- const n = `${e.space}/resources/v1/application/CSRF`;
375
- m(n, {
374
+ const s = `${e.space}/resources/v1/application/CSRF`;
375
+ m(s, {
376
376
  onComplete(o) {
377
377
  o = JSON.parse(o), t && t(o.csrf);
378
378
  },
379
- onFailure(o, r, c) {
380
- s && s({ error: o, headers: r, xhr: c });
379
+ onFailure(o, c, i) {
380
+ n && n({ error: o, headers: c, xhr: i });
381
381
  }
382
382
  });
383
383
  }
384
384
  }
385
- async function K(e, t = void 0, s = void 0, n = void 0) {
385
+ async function K(e, t = void 0, n = void 0, s = void 0) {
386
386
  const o = e.space;
387
387
  if (t === void 0) {
388
388
  console.log("Le paramètre docid est obligatoire");
389
389
  return;
390
390
  }
391
- const r = o + `/resources/v1/modeler/documents/${t}`;
392
- m(r, {
393
- onComplete(c, a, i) {
394
- const d = JSON.parse(c);
395
- s && s(d);
391
+ const c = o + `/resources/v1/modeler/documents/${t}`;
392
+ m(c, {
393
+ onComplete(i, a, r) {
394
+ const d = JSON.parse(i);
395
+ n && n(d);
396
396
  },
397
- onFailure(c) {
398
- n && n(c);
397
+ onFailure(i) {
398
+ s && s(i);
399
399
  }
400
400
  });
401
401
  }
402
- function k(e, t = void 0, s = void 0) {
402
+ function k(e, t = void 0, n = void 0) {
403
403
  if (e.objID && e.objID !== "") {
404
- let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
- m(n, {
406
- onComplete(o, r, c) {
404
+ let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
+ m(s, {
406
+ onComplete(o, c, i) {
407
407
  const a = JSON.parse(o);
408
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
409
  },
410
410
  onFailure(o) {
411
- s && s(o);
411
+ n && n(o);
412
412
  }
413
413
  });
414
414
  } else
415
415
  T(
416
416
  e,
417
- (n) => {
418
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
417
+ (s) => {
418
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
419
419
  },
420
- (n) => {
421
- s && s(n);
420
+ (s) => {
421
+ n && n(s);
422
422
  }
423
423
  );
424
424
  }
425
- function T(e, t = void 0, s = void 0) {
425
+ function T(e, t = void 0, n = void 0) {
426
426
  if (e.space) {
427
- const n = e.space + "/resources/v1/application/CSRF";
428
- m(n, {
429
- onComplete(o, r, c) {
427
+ const s = e.space + "/resources/v1/application/CSRF";
428
+ m(s, {
429
+ onComplete(o, c, i) {
430
430
  const a = JSON.parse(o);
431
431
  t && t(a.csrf.value);
432
432
  },
433
- onFailure(o, r, c) {
434
- s && s({
433
+ onFailure(o, c, i) {
434
+ n && n({
435
435
  response: o,
436
- headers: r,
437
- xhr: c
436
+ headers: c,
437
+ xhr: i
438
438
  });
439
439
  }
440
440
  });
441
441
  } else
442
- s && s("ERROR : url du 3DSpace non défini.");
442
+ n && n("ERROR : url du 3DSpace non défini.");
443
443
  }
444
- function A(e, t = void 0, s = void 0) {
445
- let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
444
+ function j(e, t = void 0, n = void 0) {
445
+ let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
446
446
  k(
447
447
  e,
448
448
  (o) => {
449
- m(n, {
449
+ m(s, {
450
450
  method: "PUT",
451
451
  headers: {
452
452
  ENO_CSRF_TOKEN: e.token
453
453
  },
454
- onComplete(r) {
455
- const a = JSON.parse(r).data[0].dataelements.ticketURL;
454
+ onComplete(c) {
455
+ const a = JSON.parse(c).data[0].dataelements.ticketURL;
456
456
  t && t(a);
457
457
  },
458
- onFailure(r, c) {
459
- console.warn("☠️ error => ", r, c), s && s(r, c);
458
+ onFailure(c, i) {
459
+ console.warn("☠️ error => ", c, i), n && n(c, i);
460
460
  }
461
461
  });
462
462
  },
463
463
  (o) => {
464
- console.warn("_3DSpace_get_ticket / error => ", o), s && s(o);
464
+ console.warn("_3DSpace_get_ticket / error => ", o), n && n(o);
465
465
  }
466
466
  );
467
467
  }
468
- function be(e, t, s, n = void 0, o = void 0) {
469
- const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
- s || (s = e.token), m(r, {
468
+ function Ne(e, t, n, s = void 0, o = void 0) {
469
+ const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
+ n || (n = e.token), m(c, {
471
471
  method: "PUT",
472
472
  headers: {
473
- ENO_CSRF_TOKEN: s
473
+ ENO_CSRF_TOKEN: n
474
474
  },
475
- onComplete(c) {
476
- let a = JSON.parse(c);
475
+ onComplete(i) {
476
+ let a = JSON.parse(i);
477
477
  if (console.log("☠️ info => ", a), a.success === !0)
478
478
  try {
479
- const i = a.data[0].dataelements.ticketURL;
480
- n && n(i);
481
- } catch (i) {
482
- o && o(i);
479
+ const r = a.data[0].dataelements.ticketURL;
480
+ s && s(r);
481
+ } catch (r) {
482
+ o && o(r);
483
483
  }
484
484
  },
485
- onFailure(c) {
486
- o && o(c);
485
+ onFailure(i) {
486
+ o && o(i);
487
487
  }
488
488
  });
489
489
  }
490
- function X(e, t, s, n, o, r = void 0, c = void 0) {
490
+ function X(e, t, n, s, o, c = void 0, i = void 0) {
491
491
  k(
492
492
  e,
493
493
  t,
@@ -495,39 +495,39 @@ function X(e, t, s, n, o, r = void 0, c = void 0) {
495
495
  V(
496
496
  e,
497
497
  t,
498
- s,
499
498
  n,
499
+ s,
500
500
  o,
501
501
  a.csrf.value,
502
- r,
503
- c
502
+ c,
503
+ i
504
504
  );
505
505
  }
506
506
  );
507
507
  }
508
- function V(e, t, s, n, o, r, c = void 0, a = void 0) {
509
- const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
- m(i, {
508
+ function V(e, t, n, s, o, c, i = void 0, a = void 0) {
509
+ const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
+ m(r, {
511
511
  method: "PUT",
512
512
  headers: {
513
- ENO_CSRF_TOKEN: r
513
+ ENO_CSRF_TOKEN: c
514
514
  },
515
515
  onComplete(d, l, p) {
516
516
  const u = JSON.parse(d).data[0].dataelements, f = new FormData();
517
- f.append("__fcs__jobTicket", u.ticket), f.append("file_0", n, o);
517
+ f.append("__fcs__jobTicket", u.ticket), f.append("file_0", s, o);
518
518
  const g = {};
519
519
  g.method = "POST", g.data = f, g.onComplete = function(h) {
520
520
  let S = "temp_" + Date.now(), _ = {
521
521
  method: "PUT",
522
522
  headers: {
523
- ENO_CSRF_TOKEN: r
523
+ ENO_CSRF_TOKEN: c
524
524
  },
525
525
  data: JSON.stringify({
526
526
  data: [{
527
527
  id: t,
528
528
  relateddata: {
529
529
  files: [{
530
- id: s,
530
+ id: n,
531
531
  dataelements: {
532
532
  title: o,
533
533
  receipt: h
@@ -540,7 +540,7 @@ function V(e, t, s, n, o, r, c = void 0, a = void 0) {
540
540
  }),
541
541
  type: "json",
542
542
  onComplete(y) {
543
- c && c(y);
543
+ i && i(y);
544
544
  },
545
545
  onFailure(y) {
546
546
  a && a(y);
@@ -556,14 +556,14 @@ function V(e, t, s, n, o, r, c = void 0, a = void 0) {
556
556
  }
557
557
  });
558
558
  }
559
- async function ke(e, t, s, n, o = void 0, r = void 0) {
560
- const c = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
559
+ async function ke(e, t, n, s, o = void 0, c = void 0) {
560
+ const i = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
561
561
  type: "text/plain"
562
562
  }), p = {
563
- url_Ticket: `${c}/resources/v1/modeler/documents/files/CheckinTicket`,
564
- url_Post: `${c}/resources/v1/modeler/documents/?SecurityContext=ctx::${i}`
563
+ url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
564
+ url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
565
565
  };
566
- if (!c && c !== "") {
566
+ if (!i && i !== "") {
567
567
  console.log("le store._3DSpace est vide");
568
568
  return;
569
569
  }
@@ -574,13 +574,13 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
574
574
  },
575
575
  onComplete(u, f, g) {
576
576
  const h = JSON.parse(u).data[0].dataelements;
577
- d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
577
+ d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
578
578
  const S = {
579
579
  method: "POST",
580
580
  data: d,
581
581
  onComplete(C) {
582
- if (i !== "" && a !== "") {
583
- const F = {
582
+ if (r !== "" && a !== "") {
583
+ const D = {
584
584
  method: "POST",
585
585
  headers: {
586
586
  ENO_CSRF_TOKEN: a,
@@ -591,19 +591,19 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
591
591
  data: [{
592
592
  type: "Document",
593
593
  dataelements: {
594
- title: `Title_${s.toLowerCase().split(" ").join("_")}`,
594
+ title: `Title_${n.toLowerCase().split(" ").join("_")}`,
595
595
  policy: "Document Release",
596
- description: n
596
+ description: s
597
597
  },
598
598
  relateddata: {
599
599
  files: [{
600
600
  dataelements: {
601
- title: `${s}.json`,
601
+ title: `${n}.json`,
602
602
  receipt: C
603
603
  }
604
604
  }]
605
605
  },
606
- tempId: R()
606
+ tempId: I()
607
607
  }]
608
608
  }),
609
609
  type: "json",
@@ -611,7 +611,7 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
611
611
  onComplete: _,
612
612
  onFailure: y
613
613
  };
614
- i !== "" && m(p.url_Post, F);
614
+ r !== "" && m(p.url_Post, D);
615
615
  } else
616
616
  console.warn("le store est vide");
617
617
  },
@@ -620,20 +620,20 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
620
620
  function _(C) {
621
621
  console.log("Success -- response ", C.data[0]), o && o(C);
622
622
  }
623
- function y(C, F) {
623
+ function y(C, D) {
624
624
  console.log("Erreur -- response ", C, `
625
- headers `, F), r && r(C);
625
+ headers `, D), c && c(C);
626
626
  }
627
627
  m(h.ticketURL, S);
628
628
  }
629
629
  });
630
630
  }
631
- function N(e, t = void 0, s = void 0, n = void 0, o = void 0, r = void 0, c = !1) {
631
+ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1) {
632
632
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
633
  m(a, {
634
634
  method: "GET",
635
- onComplete(i) {
636
- const d = JSON.parse(i);
635
+ onComplete(r) {
636
+ const d = JSON.parse(r);
637
637
  let l = "", p, u, f;
638
638
  if (t) {
639
639
  let g = d.collabspaces.find((h) => h.title === t);
@@ -644,141 +644,141 @@ function N(e, t = void 0, s = void 0, n = void 0, o = void 0, r = void 0, c = !1
644
644
  (S, _, y) => _ === y.findIndex(
645
645
  (C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
646
646
  )
647
- ), s && (Array.isArray(s) ? s.forEach((S) => {
647
+ ), n && (Array.isArray(n) ? n.forEach((S) => {
648
648
  f || h.forEach((_) => {
649
- if (S === _.role.name && n === _.organization.title)
650
- f = S, u = n;
649
+ if (S === _.role.name && s === _.organization.title)
650
+ f = S, u = s;
651
651
  else if (S === _.role.name) {
652
652
  let y = h.filter(
653
653
  (C) => C.role.name === S
654
654
  );
655
- y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : r(y);
655
+ y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
656
656
  }
657
657
  });
658
658
  }) : h.forEach((S) => {
659
- if (s === S.role.name && n === S.organization.title)
660
- f = s, u = n;
661
- else if (s === S.role.name) {
659
+ if (n === S.role.name && s === S.organization.title)
660
+ f = n, u = s;
661
+ else if (n === S.role.name) {
662
662
  let _ = h.filter(
663
- (y) => y.role.name === s
663
+ (y) => y.role.name === n
664
664
  );
665
- _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : r(_);
665
+ _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
666
666
  }
667
667
  }));
668
668
  }
669
669
  }
670
- p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && c ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : r && (l = f + "." + u + "." + p, r(l));
670
+ p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : c && (l = f + "." + u + "." + p, c(l));
671
671
  },
672
- onFailure(i, d) {
672
+ onFailure(r, d) {
673
673
  console.log("Erreur de récupération du contexte de sécurité. => ", {
674
- err: i,
674
+ err: r,
675
675
  headers: d
676
676
  });
677
677
  }
678
678
  });
679
679
  }
680
- async function v(e, t = void 0, s = void 0) {
680
+ async function v(e, t = void 0, n = void 0) {
681
681
  return (!e.objID || e.objID === "") && console.warn(
682
682
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
683
683
  ), (e.space === "" || !e.space) && console.warn(
684
684
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
685
685
  ), (e.token === "" || !e.token) && (G(
686
686
  e,
687
- (n) => {
688
- e.token = n;
687
+ (s) => {
688
+ e.token = s;
689
689
  },
690
- (n) => {
691
- console.log("☠️ error => ", n);
690
+ (s) => {
691
+ console.log("☠️ error => ", s);
692
692
  }
693
693
  ), console.warn(
694
694
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
695
- )), new Promise((n, o) => {
696
- A(
695
+ )), new Promise((s, o) => {
696
+ j(
697
697
  e,
698
- (r) => {
699
- m(r, {
698
+ (c) => {
699
+ m(c, {
700
700
  headers: {
701
701
  "Content-Type": "application/json",
702
702
  Accept: "application/json"
703
703
  },
704
704
  onComplete(a) {
705
- let i;
705
+ let r;
706
706
  try {
707
- i = JSON.parse(a);
707
+ r = JSON.parse(a);
708
708
  } catch {
709
- i = a;
709
+ r = a;
710
710
  }
711
- t && t(i), n(i);
711
+ t && t(r), s(r);
712
712
  },
713
- onFailure(a, i, d) {
714
- s && (console.log("error http", a), s({
713
+ onFailure(a, r, d) {
714
+ n && (console.log("error http", a), n({
715
715
  msg: JSON.parse(a),
716
- headers: i,
716
+ headers: r,
717
717
  xhr: d
718
718
  }), o({
719
719
  msg: JSON.parse(a),
720
- headers: i,
720
+ headers: r,
721
721
  xhr: d
722
722
  }));
723
723
  }
724
724
  });
725
725
  },
726
- (r) => {
727
- s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), o(r);
726
+ (c) => {
727
+ n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), o(c);
728
728
  }
729
729
  );
730
730
  });
731
731
  }
732
- async function W(e, t, s = void 0, n = void 0) {
732
+ async function W(e, t, n = void 0, s = void 0) {
733
733
  let o = [];
734
734
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
735
735
  for (let a = 0; a < t.length; a += 80) {
736
- const i = t.slice(a, a + 80);
737
- o.push(i);
736
+ const r = t.slice(a, a + 80);
737
+ o.push(r);
738
738
  }
739
- const c = (a) => {
739
+ const i = (a) => {
740
740
  B(
741
741
  e,
742
742
  o[a],
743
743
  () => {
744
- a++, a < o.length && c(a);
744
+ a++, a < o.length && i(a);
745
745
  },
746
- (i) => {
747
- s && s(i);
746
+ (r) => {
747
+ n && n(r);
748
748
  }
749
749
  );
750
750
  };
751
- c(0);
751
+ i(0);
752
752
  } else
753
- console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
753
+ console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), s && s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
754
754
  }
755
- function B(e, t, s = void 0, n = void 0, o = void 0) {
756
- const r = [];
757
- t.forEach((i) => {
758
- r.push({
759
- id: i
755
+ function B(e, t, n = void 0, s = void 0, o = void 0) {
756
+ const c = [];
757
+ t.forEach((r) => {
758
+ c.push({
759
+ id: r
760
760
  });
761
761
  });
762
- let c = JSON.stringify({
762
+ let i = JSON.stringify({
763
763
  csrf: {
764
764
  name: "ENO_CSRF_TOKEN",
765
765
  value: e.token
766
766
  },
767
- data: r
767
+ data: c
768
768
  });
769
769
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
770
770
  m(a, {
771
771
  method: "PUT",
772
- data: c,
772
+ data: i,
773
773
  type: "json",
774
- onComplete(i) {
775
- const d = i.data;
776
- i.success === !0 && (s && s(), d.forEach((l) => {
774
+ onComplete(r) {
775
+ const d = r.data;
776
+ r.success === !0 && (n && n(), d.forEach((l) => {
777
777
  try {
778
778
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
779
779
  m(u, {
780
780
  onComplete: (f) => {
781
- n && n({
781
+ s && s({
782
782
  objectId: l.id,
783
783
  fileName: p,
784
784
  data: JSON.parse(f)
@@ -793,16 +793,16 @@ function B(e, t, s = void 0, n = void 0, o = void 0) {
793
793
  }
794
794
  }));
795
795
  },
796
- onFailure(i) {
797
- console.log(i), o && o(i);
796
+ onFailure(r) {
797
+ console.log(r), o && o(r);
798
798
  }
799
799
  });
800
800
  }
801
- function Fe(e, t, s = void 0, n = void 0) {
801
+ function De(e, t, n = void 0, s = void 0) {
802
802
  return new Promise((o) => {
803
803
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
804
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
805
- N(
804
+ const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
805
+ b(
806
806
  e.space,
807
807
  "ESPACE COMMUN",
808
808
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -812,7 +812,7 @@ function Fe(e, t, s = void 0, n = void 0) {
812
812
  console.log("onError =>", a);
813
813
  }
814
814
  );
815
- let c = {
815
+ let i = {
816
816
  method: "POST",
817
817
  headers: {
818
818
  SecurityContext: "ctx::" + e.ctx,
@@ -827,28 +827,28 @@ function Fe(e, t, s = void 0, n = void 0) {
827
827
  }),
828
828
  type: "json",
829
829
  onComplete(a) {
830
- s && s(a);
830
+ n && n(a);
831
831
  },
832
832
  onFailure(a) {
833
- n && n(a);
833
+ s && s(a);
834
834
  }
835
835
  };
836
- m(r, c);
836
+ m(c, i);
837
837
  }
838
838
  });
839
839
  }
840
- function De(e, t, s, n = void 0, o = void 0) {
841
- return new Promise((r) => {
840
+ function Fe(e, t, n, s = void 0, o = void 0) {
841
+ return new Promise((c) => {
842
842
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
843
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
844
- N(
843
+ const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
844
+ b(
845
845
  e.space,
846
846
  "ESPACE COMMUN",
847
847
  ["VPLMProjectLeader", "VPLMCreator"],
848
848
  void 0,
849
- (i) => e.ctx = i,
850
- (i) => {
851
- console.log("onError =>", i);
849
+ (r) => e.ctx = r,
850
+ (r) => {
851
+ console.log("onError =>", r);
852
852
  }
853
853
  );
854
854
  let a = {
@@ -862,26 +862,26 @@ function De(e, t, s, n = void 0, o = void 0) {
862
862
  data: JSON.stringify({
863
863
  data: [{
864
864
  id: t,
865
- nextState: s
865
+ nextState: n
866
866
  }]
867
867
  }),
868
868
  type: "json",
869
- onComplete(i) {
870
- n && n(i);
869
+ onComplete(r) {
870
+ s && s(r);
871
871
  },
872
- onFailure(i) {
873
- o && o(i);
872
+ onFailure(r) {
873
+ o && o(r);
874
874
  }
875
875
  };
876
- m(c, a);
876
+ m(i, a);
877
877
  }
878
878
  });
879
879
  }
880
- function Ae(e, t, s = void 0, n = void 0) {
880
+ function je(e, t, n = void 0, s = void 0) {
881
881
  return new Promise((o) => {
882
882
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
883
- const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
884
- N(
883
+ const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
884
+ b(
885
885
  e.space,
886
886
  "ESPACE COMMUN",
887
887
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -891,7 +891,7 @@ function Ae(e, t, s = void 0, n = void 0) {
891
891
  console.log("onError =>", a);
892
892
  }
893
893
  );
894
- let c = {
894
+ let i = {
895
895
  method: "POST",
896
896
  headers: {
897
897
  securitycontext: "ctx::" + e.ctx,
@@ -906,21 +906,21 @@ function Ae(e, t, s = void 0, n = void 0) {
906
906
  }),
907
907
  type: "json",
908
908
  onComplete(a) {
909
- s && s(a);
909
+ n && n(a);
910
910
  },
911
911
  onFailure(a) {
912
- n && n(a);
912
+ s && s(a);
913
913
  }
914
914
  };
915
- m(r, c);
915
+ m(c, i);
916
916
  }
917
917
  });
918
918
  }
919
- function $e(e, t, s = void 0, n = void 0) {
919
+ function Ae(e, t, n = void 0, s = void 0) {
920
920
  return new Promise((o) => {
921
921
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
922
- const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
923
- N(
922
+ const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
923
+ b(
924
924
  e.space,
925
925
  "ESPACE COMMUN",
926
926
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -930,7 +930,7 @@ function $e(e, t, s = void 0, n = void 0) {
930
930
  console.log("onError =>", a);
931
931
  }
932
932
  );
933
- let c = {
933
+ let i = {
934
934
  method: "POST",
935
935
  headers: {
936
936
  SecurityContext: "ctx::" + e.ctx,
@@ -951,28 +951,28 @@ function $e(e, t, s = void 0, n = void 0) {
951
951
  }),
952
952
  type: "json",
953
953
  onComplete(a) {
954
- s && s(a);
954
+ n && n(a);
955
955
  },
956
956
  onFailure(a) {
957
- n && n(a);
957
+ s && s(a);
958
958
  }
959
959
  };
960
- m(r, c);
960
+ m(c, i);
961
961
  }
962
962
  });
963
963
  }
964
- function je(e, t, s, n = void 0, o = void 0) {
965
- return new Promise((r) => {
964
+ function $e(e, t, n, s = void 0, o = void 0) {
965
+ return new Promise((c) => {
966
966
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
967
- const c = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
968
- N(
967
+ const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
968
+ b(
969
969
  e.space,
970
970
  "ESPACE COMMUN",
971
971
  ["VPLMProjectLeader", "VPLMCreator"],
972
972
  void 0,
973
- (i) => e.ctx = i,
974
- (i) => {
975
- console.log("onError =>", i);
973
+ (r) => e.ctx = r,
974
+ (r) => {
975
+ console.log("onError =>", r);
976
976
  }
977
977
  );
978
978
  let a = {
@@ -986,106 +986,109 @@ function je(e, t, s, n = void 0, o = void 0) {
986
986
  data: JSON.stringify({
987
987
  data: [{
988
988
  physicalid: t,
989
- proposedRevision: s,
989
+ proposedRevision: n,
990
990
  modifiedAttributes: {
991
- revision: s
991
+ revision: n
992
992
  }
993
993
  }],
994
994
  folderid: null,
995
995
  notificationTimeout: 600
996
996
  }),
997
997
  type: "json",
998
- onComplete(i) {
999
- n && n(i);
998
+ onComplete(r) {
999
+ s && s(r);
1000
1000
  },
1001
- onFailure(i) {
1002
- o && o(i);
1001
+ onFailure(r) {
1002
+ o && o(r);
1003
1003
  }
1004
1004
  };
1005
- m(c, a);
1005
+ m(i, a);
1006
1006
  }
1007
1007
  });
1008
1008
  }
1009
- function Ue(e, t, s = void 0, n = void 0) {
1010
- return console.log("credentials", e), new Promise((o) => {
1009
+ function Ue(e, t = void 0, n = void 0) {
1010
+ return console.log("credentials", e), new Promise((s) => {
1011
1011
  if (e.token === "" && T(e), !e.space || e.space === "") {
1012
- const r = J();
1013
- console.log("platformeInfo", r);
1012
+ const i = J();
1013
+ console.log("platformeInfo", i);
1014
1014
  }
1015
- if (N(
1015
+ b(
1016
1016
  e,
1017
1017
  "Common space",
1018
1018
  ["VPLMProjectLeader", "VPLMCreator"],
1019
1019
  void 0,
1020
- (r) => e.ctx = r,
1021
- (r) => {
1022
- console.log("onError =>", r);
1020
+ (i) => e.ctx = i,
1021
+ (i) => {
1022
+ console.log("onError =>", i);
1023
1023
  },
1024
1024
  !0
1025
- ), t !== void 0 && t !== "" && t !== null) {
1026
- const r = b.now().ts;
1027
- `${e.space}`;
1028
- const c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1029
- m(c, {
1030
- onComplete(a) {
1031
- if (Array.isArray(JSON.parse(a))) {
1032
- const i = JSON.parse(a);
1033
- console.log("serviceId=3dsearch", i);
1034
- const d = `${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
1035
- m(d, {
1036
- method: "POST",
1037
- headers: {
1038
- securitycontext: "ctx::" + e.ctx,
1039
- Accept: "application/json",
1040
- "Content-Type": "application/json"
1041
- },
1042
- data: JSON.stringify({
1043
- with_indexing_date: !0,
1044
- with_nls: !1,
1045
- label: `3DSearch-${r}`,
1046
- locale: "en",
1047
- select_predicate: [
1048
- "ds6w:label",
1049
- "ds6w:type",
1050
- "ds6w:description",
1051
- "ds6w:identifier",
1052
- "ds6w:responsible",
1053
- "ds6wg:fullname"
1054
- ],
1055
- select_file: [
1056
- "icon",
1057
- "thumbnail_2d"
1058
- ],
1059
- query: '([ds6w:type]:(Group) AND [ds6w:status]:(Public)) OR (flattenedtaxonomies:"types/Person" AND current:"active")',
1060
- order_by: "desc",
1061
- order_field: "relevance",
1062
- nresults: 1e3,
1063
- start: "0",
1064
- source: [
1065
- "3dspace",
1066
- "usersgroup"
1067
- ],
1068
- tenant: e.tenant,
1069
- login: {
1070
- "3dspace": {
1071
- SecurityContext: `ctx::${e.ctx}`
1072
- }
1025
+ );
1026
+ const o = N.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1027
+ m(c, {
1028
+ onComplete(i) {
1029
+ if (Array.isArray(JSON.parse(i))) {
1030
+ const a = JSON.parse(i);
1031
+ console.log("serviceId=3dsearch", a);
1032
+ const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
1033
+ m(r, {
1034
+ method: "POST",
1035
+ headers: {
1036
+ Accept: "application/json",
1037
+ "Content-Type": "application/json"
1038
+ },
1039
+ data: JSON.stringify({
1040
+ with_indexing_date: !0,
1041
+ with_nls: !1,
1042
+ label: `3DSearch-${o}`,
1043
+ locale: "en",
1044
+ select_predicate: [
1045
+ "ds6w:label",
1046
+ "ds6w:type",
1047
+ "ds6w:description",
1048
+ "ds6w:identifier",
1049
+ "ds6w:responsible",
1050
+ "ds6wg:fullname"
1051
+ ],
1052
+ select_file: [
1053
+ "icon",
1054
+ "thumbnail_2d"
1055
+ ],
1056
+ query: '([ds6w:type]:(Group) AND [ds6w:status]:(Public)) OR (flattenedtaxonomies:"types/Person" AND current:"active")',
1057
+ order_by: "desc",
1058
+ order_field: "relevance",
1059
+ nresults: 1e3,
1060
+ start: "0",
1061
+ source: [
1062
+ "3dspace",
1063
+ "usersgroup"
1064
+ ],
1065
+ tenant: e.tenant,
1066
+ login: {
1067
+ "3dspace": {
1068
+ SecurityContext: `ctx::${e.ctx}`
1073
1069
  }
1074
- }),
1075
- type: "json",
1076
- onComplete(l) {
1077
- s && s(l);
1078
- },
1079
- onFailure(l) {
1080
- n && n(l);
1081
1070
  }
1082
- });
1083
- }
1084
- },
1085
- onFailure(a) {
1086
- n && n(a);
1071
+ }),
1072
+ type: "json",
1073
+ onComplete(d) {
1074
+ t && t(d);
1075
+ },
1076
+ onFailure(d) {
1077
+ n && n(d);
1078
+ }
1079
+ });
1087
1080
  }
1088
- }), JSON.stringify({
1081
+ },
1082
+ onFailure(i) {
1083
+ n && n(i);
1084
+ }
1085
+ });
1086
+ });
1087
+ }
1088
+ function Ie(e, t, n, s, o = void 0, c = void 0) {
1089
+ return console.log("credentials", e), new Promise(
1090
+ (i) => {
1091
+ `${e.space}`, JSON.stringify({
1089
1092
  csrf: {
1090
1093
  name: "ENO_CSRF_TOKEN",
1091
1094
  value: e.token
@@ -1103,74 +1106,74 @@ function Ue(e, t, s = void 0, n = void 0) {
1103
1106
  }]
1104
1107
  });
1105
1108
  }
1106
- });
1109
+ );
1107
1110
  }
1108
1111
  //!SECTION
1109
- function Re(e, t = void 0, s = void 0) {
1110
- const n = {
1112
+ function ve(e, t = void 0, n = void 0) {
1113
+ const s = {
1111
1114
  base: `${e.space}`,
1112
1115
  uri: "/resources/bps/cspaces",
1113
1116
  optTenant: `tenant=${e.tenant}`
1114
- }, o = `${n.base}${n.uri}?${n.optTenant}`;
1117
+ }, o = `${s.base}${s.uri}?${s.optTenant}`;
1115
1118
  m(o, {
1116
1119
  method: "GET",
1117
1120
  headers: {
1118
1121
  Accept: "application/json,text/javascript,*/*",
1119
1122
  "Content-Type": "application/ds-json"
1120
1123
  },
1121
- onComplete(r, c) {
1122
- const a = JSON.parse(r);
1123
- t && t(a, c);
1124
+ onComplete(c, i) {
1125
+ const a = JSON.parse(c);
1126
+ t && t(a, i);
1124
1127
  },
1125
- onFailure(r, c, a) {
1126
- s && s({ response: r, headers: c, xhr: a });
1128
+ onFailure(c, i, a) {
1129
+ n && n({ response: c, headers: i, xhr: a });
1127
1130
  }
1128
1131
  });
1129
1132
  }
1130
- function ve(e, t, s, n) {
1131
- A(
1133
+ function Re(e, t, n, s) {
1134
+ j(
1132
1135
  e.space,
1133
1136
  t,
1134
1137
  (o) => {
1135
1138
  m(o, {
1136
1139
  header: { ENO_CSRF_TOKEN: e.token },
1137
- onComplete: (r) => {
1138
- s && s(r);
1140
+ onComplete: (c) => {
1141
+ n && n(c);
1139
1142
  },
1140
- onFailure: (r) => {
1141
- console.log("error http", r), n && n(r);
1143
+ onFailure: (c) => {
1144
+ console.log("error http", c), s && s(c);
1142
1145
  }
1143
1146
  });
1144
1147
  }
1145
1148
  );
1146
1149
  }
1147
- async function Ie(e, t, s = void 0, n = void 0) {
1150
+ async function Pe(e, t, n = void 0, s = void 0) {
1148
1151
  return new Promise((o) => {
1149
- A(e, t, (r) => {
1150
- m(r, {
1151
- onComplete: (c, a, i) => (o(JSON.parse(c)), s && s(JSON.parse(c), a, i), o),
1152
- onFailure: (c, a, i) => {
1153
- n && n(c, a, i), console.log(c, a?.errormsg);
1152
+ j(e, t, (c) => {
1153
+ m(c, {
1154
+ onComplete: (i, a, r) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, r), o),
1155
+ onFailure: (i, a, r) => {
1156
+ s && s(i, a, r), console.log(i, a?.errormsg);
1154
1157
  }
1155
1158
  });
1156
1159
  });
1157
1160
  });
1158
1161
  }
1159
- function xe(e, t, s, n = void 0, o = void 0) {
1160
- const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1162
+ function xe(e, t, n, s = void 0, o = void 0) {
1163
+ const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1161
1164
  k(
1162
1165
  e,
1163
- s,
1164
- (c) => {
1165
- const a = c.data[0].relateddata.files[0].id, i = c.data[0].dataelements.secondaryTitle !== "" ? c.data[0].dataelements.secondaryTitle : c.data[0].dataelements.title;
1166
+ n,
1167
+ (i) => {
1168
+ const a = i.data[0].relateddata.files[0].id, r = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1166
1169
  X(
1167
1170
  e,
1168
- s,
1171
+ n,
1169
1172
  a,
1173
+ c,
1170
1174
  r,
1171
- i,
1172
1175
  (d) => {
1173
- n && n(d);
1176
+ s && s(d);
1174
1177
  },
1175
1178
  (d) => {
1176
1179
  o && o(d);
@@ -1179,65 +1182,65 @@ function xe(e, t, s, n = void 0, o = void 0) {
1179
1182
  }
1180
1183
  );
1181
1184
  }
1182
- let I, x;
1183
- const $ = [];
1184
- async function Pe(e, t = void 0, s = void 0) {
1185
+ let R, P;
1186
+ const A = [];
1187
+ async function Me(e, t = void 0, n = void 0) {
1185
1188
  e.objID && e.objID !== "" ? k(
1186
1189
  e,
1187
- (n) => {
1188
- t && t(n);
1190
+ (s) => {
1191
+ t && t(s);
1189
1192
  },
1190
- (n) => {
1191
- s && s(n);
1193
+ (s) => {
1194
+ n && n(s);
1192
1195
  }
1193
1196
  ) : (e.objID === null || e.objID === "") && T(
1194
1197
  e,
1195
- (n) => {
1196
- t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1198
+ (s) => {
1199
+ t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1197
1200
  },
1198
- (n) => {
1199
- s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1201
+ (s) => {
1202
+ n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1200
1203
  }
1201
1204
  );
1202
1205
  }
1203
- async function Me(e, t = void 0, s = void 0) {
1206
+ async function Le(e, t = void 0, n = void 0) {
1204
1207
  console.log("getDatasByTenant (getDocuments)", e), await v(
1205
1208
  e,
1206
- (n) => {
1209
+ (s) => {
1207
1210
  const o = {};
1208
- o.obj = n, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1211
+ o.obj = s, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1209
1212
  },
1210
- (n) => {
1211
- s && s?.(n);
1213
+ (s) => {
1214
+ n && n?.(s);
1212
1215
  }
1213
1216
  );
1214
1217
  }
1215
- function Le(e, t = void 0, s = void 0) {
1216
- const n = [];
1218
+ function Je(e, t = void 0, n = void 0) {
1219
+ const s = [];
1217
1220
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1218
1221
  console.warn("la liste est vide ou n'est pas un tableau");
1219
1222
  return;
1220
1223
  }
1221
- e.objIds.forEach((o, r) => {
1224
+ e.objIds.forEach((o, c) => {
1222
1225
  v(
1223
1226
  e,
1224
1227
  o.objID,
1225
- (c) => {
1226
- n.push({ [o.name]: c }), o.name === "dbProjets" && (I = c.affaires.map((a) => a.objectID), Y(e, x)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1228
+ (i) => {
1229
+ s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID), Y(e, P)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1227
1230
  }
1228
1231
  );
1229
1232
  });
1230
1233
  }
1231
- function Y(e, t, s = void 0, n = void 0) {
1234
+ function Y(e, t, n = void 0, s = void 0) {
1232
1235
  W(
1233
1236
  e,
1234
- I,
1237
+ R,
1235
1238
  (o) => {
1236
- const r = [...t];
1237
- r.find((c) => c.objectID === o.objectId).data = o.data, x = r, $.push(o.data), s && s($);
1239
+ const c = [...t];
1240
+ c.find((i) => i.objectID === o.objectId).data = o.data, P = c, A.push(o.data), n && n(A);
1238
1241
  },
1239
1242
  (o) => {
1240
- n && (n(o), console.log(o));
1243
+ s && (s(o), console.log(o));
1241
1244
  }
1242
1245
  );
1243
1246
  }
@@ -1248,7 +1251,7 @@ const q = "FA35FB9B177A280065800EA0000F599C", H = [
1248
1251
  "usersgroup",
1249
1252
  "3dplan",
1250
1253
  "dashboard"
1251
- ], P = {
1254
+ ], x = {
1252
1255
  how: "ds6w:how",
1253
1256
  what: "ds6w:what",
1254
1257
  when: "ds6w:when",
@@ -1261,22 +1264,22 @@ const q = "FA35FB9B177A280065800EA0000F599C", H = [
1261
1264
  order_by: "desc",
1262
1265
  tag: "testTag"
1263
1266
  };
1264
- function Je(e, t, s = void 0, n = void 0) {
1265
- const { space: o, tenant: r } = e, { objId: c, pred: a, tag: i } = t, d = {
1267
+ function Ee(e, t, n = void 0, s = void 0) {
1268
+ const { space: o, tenant: c } = e, { objId: i, pred: a, tag: r } = t, d = {
1266
1269
  uri: "/resources/6w/tags",
1267
1270
  otpCTX: "SecurityContext=preferred",
1268
- optTenant: `tenant=${r}`
1271
+ optTenant: `tenant=${c}`
1269
1272
  }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1270
1273
  tag: [
1271
1274
  {
1272
1275
  subject: [
1273
1276
  {
1274
- uri: `pid://${c}`
1277
+ uri: `pid://${i}`
1275
1278
  }
1276
1279
  ],
1277
- predicate: P[a],
1280
+ predicate: x[a],
1278
1281
  object: {
1279
- literal: i
1282
+ literal: r
1280
1283
  }
1281
1284
  }
1282
1285
  ]
@@ -1294,46 +1297,46 @@ function Je(e, t, s = void 0, n = void 0) {
1294
1297
  setTimeout(() => {
1295
1298
  K(
1296
1299
  e,
1297
- c,
1300
+ i,
1298
1301
  (g) => {
1299
1302
  const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1300
1303
  f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, Q(
1301
1304
  e,
1302
1305
  t,
1303
1306
  (y) => {
1304
- s && s(y);
1307
+ n && n(y);
1305
1308
  },
1306
1309
  (y) => {
1307
- n && n(y);
1310
+ s && s(y);
1308
1311
  }
1309
1312
  );
1310
1313
  },
1311
1314
  (g, h) => {
1312
1315
  const S = g;
1313
- S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
1316
+ S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), s && s(S);
1314
1317
  }
1315
1318
  );
1316
1319
  }, 2e3);
1317
1320
  },
1318
1321
  onFailure(u, f) {
1319
1322
  const g = u;
1320
- g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
1323
+ g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1321
1324
  }
1322
1325
  });
1323
1326
  }
1324
- function Q(e, t, s = void 0, n = void 0) {
1327
+ function Q(e, t, n = void 0, s = void 0) {
1325
1328
  console.log("obj ", t);
1326
- const o = t.info.name, r = {
1329
+ const o = t.info.name, c = {
1327
1330
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1328
1331
  uri: "/federated/search"
1329
- }, c = `${r.baseUrl}${r.uri}`, a = {
1332
+ }, i = `${c.baseUrl}${c.uri}`, a = {
1330
1333
  "Content-Type": "application/json",
1331
1334
  Accept: "application/json,text/javascript,*/*"
1332
- }, i = R(), d = {
1335
+ }, r = I(), d = {
1333
1336
  with_indexing_date: !0,
1334
1337
  with_synthesis: !0,
1335
1338
  with_nls: !1,
1336
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${i}`,
1339
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1337
1340
  locale: "fr",
1338
1341
  select_predicate: [
1339
1342
  "ds6w:label",
@@ -1390,26 +1393,26 @@ function Q(e, t, s = void 0, n = void 0) {
1390
1393
  }
1391
1394
  }
1392
1395
  };
1393
- console.log("dataPattern => ", d), m(c, {
1396
+ console.log("dataPattern => ", d), m(i, {
1394
1397
  method: "POST",
1395
1398
  headers: a,
1396
1399
  data: JSON.stringify(d),
1397
1400
  onComplete(l) {
1398
1401
  const p = JSON.parse(l);
1399
- s(p);
1402
+ n(p);
1400
1403
  },
1401
1404
  onFailure(l, p) {
1402
1405
  const u = l;
1403
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1406
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1404
1407
  }
1405
1408
  });
1406
1409
  }
1407
- function Ee(e, t, s = void 0, n = void 0) {
1408
- const { objId: o, pred: r, tag: c } = t, a = {
1410
+ function Ge(e, t, n = void 0, s = void 0) {
1411
+ const { objId: o, pred: c, tag: i } = t, a = {
1409
1412
  uri: "/resources/6w/tags",
1410
1413
  otpCTX: "SecurityContext=preferred",
1411
1414
  optTenant: `tenant=${e.tenant}`
1412
- }, i = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1415
+ }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1413
1416
  tag: [
1414
1417
  {
1415
1418
  subject: [
@@ -1417,14 +1420,14 @@ function Ee(e, t, s = void 0, n = void 0) {
1417
1420
  uri: `pid://${o}`
1418
1421
  }
1419
1422
  ],
1420
- predicate: P[r],
1423
+ predicate: x[c],
1421
1424
  object: {
1422
- literal: c
1425
+ literal: i
1423
1426
  }
1424
1427
  }
1425
1428
  ]
1426
1429
  };
1427
- m(i, {
1430
+ m(r, {
1428
1431
  method: "DELETE",
1429
1432
  data: JSON.stringify(d),
1430
1433
  headers: {
@@ -1432,52 +1435,52 @@ function Ee(e, t, s = void 0, n = void 0) {
1432
1435
  Accept: "application/json,text/javascript,*/*"
1433
1436
  },
1434
1437
  onComplete(l) {
1435
- s && s(l);
1438
+ n && n(l);
1436
1439
  },
1437
1440
  onFailure(l, p) {
1438
1441
  const u = l;
1439
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
1442
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1440
1443
  }
1441
1444
  });
1442
1445
  }
1443
- function Ge(e, t = "", s = void 0, n = void 0) {
1446
+ function Ke(e, t = "", n = void 0, s = void 0) {
1444
1447
  const { space: o } = e;
1445
1448
  if (t === "")
1446
1449
  return;
1447
- const r = {
1450
+ const c = {
1448
1451
  uri: "/resources/v1/modeler/documents"
1449
- }, c = {
1452
+ }, i = {
1450
1453
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1451
1454
  Accept: "application/json,text/javascript,*/*"
1452
- }, a = `${o}${r.uri}`, i = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1455
+ }, a = `${o}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1453
1456
  m(a, {
1454
1457
  method: "POST",
1455
- headers: c,
1456
- data: i,
1458
+ headers: i,
1459
+ data: r,
1457
1460
  onComplete(d) {
1458
- s && s(JSON.parse(d));
1461
+ n && n(JSON.parse(d));
1459
1462
  },
1460
1463
  onFailure(d, l) {
1461
1464
  const p = d;
1462
- p.msg = l.error, n && n(p);
1465
+ p.msg = l.error, s && s(p);
1463
1466
  }
1464
1467
  });
1465
1468
  }
1466
- async function w(e, t = void 0, s = void 0) {
1467
- const n = e.space + "/api/index/tk";
1468
- return m(n, {
1469
- onComplete(o, r, c) {
1469
+ async function w(e, t = void 0, n = void 0) {
1470
+ const s = e.space + "/api/index/tk";
1471
+ return m(s, {
1472
+ onComplete(o, c, i) {
1470
1473
  const a = JSON.parse(o);
1471
1474
  if (t)
1472
1475
  return t(a), e.token = a?.result?.ServerToken;
1473
1476
  },
1474
1477
  onFailure(o) {
1475
- s && s(o);
1478
+ n && n(o);
1476
1479
  }
1477
1480
  });
1478
1481
  }
1479
- function Ke(e, t = void 0, s = void 0) {
1480
- const n = `${e.space}/api/exalead/whatsnew`, o = {
1482
+ function Xe(e, t = void 0, n = void 0) {
1483
+ const s = `${e.space}/api/exalead/whatsnew`, o = {
1481
1484
  params: {
1482
1485
  community_id: null,
1483
1486
  hash_key: null,
@@ -1487,27 +1490,27 @@ function Ke(e, t = void 0, s = void 0) {
1487
1490
  start: 0
1488
1491
  }
1489
1492
  };
1490
- w(e, (r) => {
1491
- m(n, {
1493
+ w(e, (c) => {
1494
+ m(s, {
1492
1495
  method: "POST",
1493
1496
  headers: {
1494
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1497
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1495
1498
  "Content-type": "application/json;charset=UTF-8",
1496
1499
  Accept: "application/json"
1497
1500
  },
1498
1501
  data: JSON.stringify(o),
1499
1502
  type: "json",
1500
- onComplete(c, a) {
1501
- t && t(c, a);
1503
+ onComplete(i, a) {
1504
+ t && t(i, a);
1502
1505
  },
1503
- onFailure(c, a) {
1504
- s && s(c, a);
1506
+ onFailure(i, a) {
1507
+ n && n(i, a);
1505
1508
  }
1506
1509
  });
1507
1510
  });
1508
1511
  }
1509
- function Xe(e, t = void 0, s = void 0) {
1510
- const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1512
+ function Ve(e, t = void 0, n = void 0) {
1513
+ const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1511
1514
  params: {
1512
1515
  idsToFilterArr: [],
1513
1516
  mode: "offline",
@@ -1516,40 +1519,40 @@ function Xe(e, t = void 0, s = void 0) {
1516
1519
  maxNbOfCommonElements: "5"
1517
1520
  }
1518
1521
  };
1519
- w(e, (r) => {
1520
- m(n, {
1522
+ w(e, (c) => {
1523
+ m(s, {
1521
1524
  method: "POST",
1522
1525
  headers: {
1523
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1526
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1524
1527
  "Content-type": "application/json;charset=UTF-8",
1525
1528
  Accept: "application/json"
1526
1529
  },
1527
1530
  data: JSON.stringify(o),
1528
1531
  type: "json",
1529
- onComplete(c, a) {
1530
- const i = c.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1531
- t && t(i, c);
1532
+ onComplete(i, a) {
1533
+ const r = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1534
+ t && t(r, i);
1532
1535
  },
1533
- onFailure(c, a) {
1534
- s && s(c, a);
1536
+ onFailure(i, a) {
1537
+ n && n(i, a);
1535
1538
  }
1536
1539
  });
1537
1540
  });
1538
1541
  }
1539
- function Ve(e, t = void 0, s = void 0) {
1540
- const n = {
1542
+ function We(e, t = void 0, n = void 0) {
1543
+ const s = {
1541
1544
  base: e.space,
1542
1545
  uri: "/api/community/listmycommunities",
1543
1546
  limit: `/limit/${e.limit ? e.limit : 128}`,
1544
1547
  page: `/page/${e.page ? e.page : "1"}`
1545
- }, o = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1546
- w(e, (c) => {
1548
+ }, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1549
+ w(e, (i) => {
1547
1550
  m(o, {
1548
1551
  method: "GET",
1549
1552
  headers: {
1550
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1553
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1551
1554
  },
1552
- onComplete(a, i, d) {
1555
+ onComplete(a, r, d) {
1553
1556
  const p = JSON.parse(a).result;
1554
1557
  let u = 0;
1555
1558
  p.forEach((f) => {
@@ -1565,76 +1568,76 @@ function Ve(e, t = void 0, s = void 0) {
1565
1568
  e,
1566
1569
  f.id,
1567
1570
  (h) => {
1568
- u++, g.members = h, r.push(g), u === p.length && t && t(r);
1571
+ u++, g.members = h, c.push(g), u === p.length && t && t(c);
1569
1572
  },
1570
- (h) => s(h)
1573
+ (h) => n(h)
1571
1574
  );
1572
1575
  });
1573
1576
  },
1574
- onFailure(a, i) {
1577
+ onFailure(a, r) {
1575
1578
  const d = a;
1576
- d.status = i.status, d.response = i.errormsg, s && s(d);
1579
+ d.status = r.status, d.response = r.errormsg, n && n(d);
1577
1580
  }
1578
1581
  });
1579
1582
  });
1580
1583
  }
1581
- function Z(e, t, s, n) {
1582
- const o = `${e.space}/api/community/listmembers`, r = {
1584
+ function Z(e, t, n, s) {
1585
+ const o = `${e.space}/api/community/listmembers`, c = {
1583
1586
  params: {
1584
1587
  page: e.page ? e.page : 1,
1585
1588
  limit: e.limit ? e.limit : 50,
1586
1589
  community_id: t
1587
1590
  }
1588
1591
  };
1589
- w(e, (c) => {
1592
+ w(e, (i) => {
1590
1593
  m(o, {
1591
1594
  method: "POST",
1592
1595
  headers: {
1593
1596
  "Content-type": "application/json;charset=UTF-8",
1594
1597
  Accept: "application/json",
1595
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1598
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1596
1599
  },
1597
- data: JSON.stringify(r),
1600
+ data: JSON.stringify(c),
1598
1601
  type: "json",
1599
- onComplete(a, i, d) {
1600
- s && s(a);
1602
+ onComplete(a, r, d) {
1603
+ n && n(a);
1601
1604
  },
1602
- onFailure(a, i) {
1605
+ onFailure(a, r) {
1603
1606
  const d = a;
1604
- d.status = i.status, d.response = i.errormsg, n && n(d);
1607
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1605
1608
  }
1606
1609
  });
1607
1610
  });
1608
1611
  }
1609
- function We(e, t = void 0, s = void 0) {
1610
- const n = "YXdA5x4DSUKtlAi2wmnyTA";
1611
- e.commu_id || (e.commu_id = n);
1612
+ function Be(e, t = void 0, n = void 0) {
1613
+ const s = "YXdA5x4DSUKtlAi2wmnyTA";
1614
+ e.commu_id || (e.commu_id = s);
1612
1615
  const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1613
- w(e, (r) => {
1616
+ w(e, (c) => {
1614
1617
  m(o, {
1615
1618
  method: "GET",
1616
1619
  headers: {
1617
1620
  "Content-type": "application/json;charset=UTF-8",
1618
1621
  Accept: "application/json",
1619
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1622
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1620
1623
  },
1621
- onComplete(c) {
1622
- const a = JSON.parse(c);
1624
+ onComplete(i) {
1625
+ const a = JSON.parse(i);
1623
1626
  t && t(a);
1624
1627
  },
1625
- onFailure(c, a) {
1626
- const i = c;
1627
- i.status = a.status, i.response = a.errormsg, s && s(i);
1628
+ onFailure(i, a) {
1629
+ const r = i;
1630
+ r.status = a.status, r.response = a.errormsg, n && n(r);
1628
1631
  }
1629
1632
  });
1630
1633
  });
1631
1634
  }
1632
- function Be(e, t, s = void 0, n = void 0) {
1633
- const { listAllContacts: o, currentUser: r } = e;
1635
+ function Ye(e, t, n = void 0, s = void 0) {
1636
+ const { listAllContacts: o, currentUser: c } = e;
1634
1637
  console.log("__listAllContacts", o.hits);
1635
- const c = `${e.space}/api/directmessages`, a = {
1636
- users: [r.login].concat(t.receipt)
1637
- }, i = {
1638
+ const i = `${e.space}/api/directmessages`, a = {
1639
+ users: [c.login].concat(t.receipt)
1640
+ }, r = {
1638
1641
  id_msg: "",
1639
1642
  senderId: e.currentUser.login,
1640
1643
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1644,14 +1647,14 @@ function Be(e, t, s = void 0, n = void 0) {
1644
1647
  ee(
1645
1648
  a.users,
1646
1649
  (l) => {
1647
- l !== void 0 && (i.id_msg = l.id, d = !0, j(e, i));
1650
+ l !== void 0 && (r.id_msg = l.id, d = !0, $(e, r));
1648
1651
  },
1649
1652
  (l) => {
1650
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), i.id_msg = "";
1653
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1651
1654
  }
1652
1655
  ), d === !1 && setTimeout(() => {
1653
1656
  d === !1 && w(e, (l) => {
1654
- m(c, {
1657
+ m(i, {
1655
1658
  method: "POST",
1656
1659
  headers: {
1657
1660
  "Content-Type": "application/json",
@@ -1662,52 +1665,52 @@ function Be(e, t, s = void 0, n = void 0) {
1662
1665
  type: "json",
1663
1666
  onComplete(p, u, f) {
1664
1667
  const g = p;
1665
- g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), i.id_msg = g.result.id, j(e, i);
1668
+ g.reponse = JSON.parse(f.response), g.status = f.status, n && n(g), r.id_msg = g.result.id, $(e, r);
1666
1669
  },
1667
1670
  onFailure(p, u, f) {
1668
1671
  const g = p;
1669
- g.msg = u.errormsg, g.status = u.status, n && n(g);
1672
+ g.msg = u.errormsg, g.status = u.status, s && s(g);
1670
1673
  }
1671
1674
  });
1672
1675
  });
1673
1676
  }, 500);
1674
1677
  }
1675
- function ee(e, t, s, n) {
1678
+ function ee(e, t, n, s) {
1676
1679
  const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1677
- w(e, (r) => {
1680
+ w(e, (c) => {
1678
1681
  m(o, {
1679
1682
  method: "GET",
1680
1683
  headers: {
1681
1684
  Accept: "application/json,text/javascript,*/*",
1682
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1685
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1683
1686
  },
1684
- onComplete(c) {
1685
- const a = JSON.parse(c), i = [];
1687
+ onComplete(i) {
1688
+ const a = JSON.parse(i), r = [];
1686
1689
  a.result.forEach((p) => {
1687
- p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && i.push(p);
1690
+ p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && r.push(p);
1688
1691
  });
1689
- const d = t.sort(), l = i.find((p) => {
1692
+ const d = t.sort(), l = r.find((p) => {
1690
1693
  const u = [];
1691
1694
  return p.users.forEach((f) => {
1692
1695
  u.push(f.login);
1693
1696
  }), JSON.stringify(u) === JSON.stringify(d);
1694
1697
  });
1695
- s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
1698
+ n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1696
1699
  },
1697
- onFailure(c) {
1698
- const a = c;
1699
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
1700
+ onFailure(i) {
1701
+ const a = i;
1702
+ a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1700
1703
  }
1701
1704
  });
1702
1705
  });
1703
1706
  }
1704
- function j(e, t, s = void 0, n = void 0) {
1707
+ function $(e, t, n = void 0, s = void 0) {
1705
1708
  const o = {
1706
1709
  base: e.space,
1707
1710
  uri: "/api/community",
1708
1711
  id_msg: `${t.id_msg}`,
1709
1712
  endUri: "/instantmessages"
1710
- }, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, c = {
1713
+ }, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1711
1714
  author: { login: t.senderId, displayName: t.senderName },
1712
1715
  accessState: null,
1713
1716
  commentUri: null,
@@ -1717,33 +1720,33 @@ function j(e, t, s = void 0, n = void 0) {
1717
1720
  parentCommentUri: null,
1718
1721
  richMessage: t.msg
1719
1722
  };
1720
- console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1721
- m(r, {
1723
+ console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1724
+ m(c, {
1722
1725
  method: "POST",
1723
1726
  headers: {
1724
1727
  "Content-Type": "application/json",
1725
1728
  Accept: "application/json",
1726
1729
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1727
1730
  },
1728
- data: JSON.stringify(c),
1731
+ data: JSON.stringify(i),
1729
1732
  type: "json",
1730
- onComplete(i, d, l) {
1731
- const p = i;
1732
- p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1733
+ onComplete(r, d, l) {
1734
+ const p = r;
1735
+ p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1733
1736
  },
1734
- onFailure(i, d) {
1735
- const l = i;
1736
- l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1737
+ onFailure(r, d) {
1738
+ const l = r;
1739
+ l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1737
1740
  }
1738
1741
  });
1739
1742
  });
1740
1743
  }
1741
1744
  function te(e) {
1742
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1745
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1743
1746
  return `<p>${e} </p>
1744
1747
  <br/>
1745
1748
  <hr/>
1746
- <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
1749
+ <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1747
1750
  }
1748
1751
  const ne = {
1749
1752
  title: "TEST DEV COMMUNITY IDEA",
@@ -1755,16 +1758,16 @@ const ne = {
1755
1758
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1756
1759
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1757
1760
  };
1758
- function Ye(e, t, s = void 0, n = void 0) {
1759
- const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1760
- (i) => i.id === t.community_id
1761
- ), c = e.swymCommunities.find(
1762
- (i) => i.title.toLowerCase() === t.community_title.toLowerCase()
1761
+ function qe(e, t, n = void 0, s = void 0) {
1762
+ const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1763
+ (r) => r.id === t.community_id
1764
+ ), i = e.swymCommunities.find(
1765
+ (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1763
1766
  ), a = {
1764
1767
  params: {
1765
1768
  title: t.title,
1766
1769
  // String, le nom de l'affaire
1767
- community_id: r?.id !== void 0 ? r.id : c.id,
1770
+ community_id: c?.id !== void 0 ? c.id : i.id,
1768
1771
  // String, l'id de la communauté
1769
1772
  message: se(t.text_html),
1770
1773
  // STRING => le contenue du message doit être au format HTML
@@ -1772,11 +1775,11 @@ function Ye(e, t, s = void 0, n = void 0) {
1772
1775
  // 1 publier, 0 non publier
1773
1776
  }
1774
1777
  };
1775
- w(e, (i) => {
1778
+ w(e, (r) => {
1776
1779
  const d = {
1777
1780
  "Content-type": "application/json;charset=UTF-8",
1778
1781
  Accept: "application/json",
1779
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1782
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1780
1783
  };
1781
1784
  m(o, {
1782
1785
  method: "POST",
@@ -1785,90 +1788,90 @@ function Ye(e, t, s = void 0, n = void 0) {
1785
1788
  type: "json",
1786
1789
  onComplete(l, p, u) {
1787
1790
  const f = JSON.parse(l);
1788
- f.status = u.status, f.response = u.response, s && s(f);
1791
+ f.status = u.status, f.response = u.response, n && n(f);
1789
1792
  },
1790
1793
  onFailure(l, p, u) {
1791
1794
  const f = l;
1792
- f.status = p.status, f.response = p.errormsg, n && n(f);
1795
+ f.status = p.status, f.response = p.errormsg, s && s(f);
1793
1796
  }
1794
1797
  });
1795
1798
  });
1796
1799
  }
1797
- function qe(e, t, s = void 0, n = void 0) {
1798
- const o = `${e.space}/api/idea/delete`, r = {
1800
+ function He(e, t, n = void 0, s = void 0) {
1801
+ const o = `${e.space}/api/idea/delete`, c = {
1799
1802
  params: {
1800
1803
  community_id: t.community_id,
1801
1804
  ideationIds: [t.idee_id]
1802
1805
  }
1803
1806
  };
1804
- w(e, (c) => {
1807
+ w(e, (i) => {
1805
1808
  m(o, {
1806
1809
  method: "POST",
1807
1810
  headers: {
1808
1811
  "Content-type": "application/json;charset=UTF-8",
1809
1812
  Accept: "application/json",
1810
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1813
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1811
1814
  },
1812
- data: JSON.stringify(r),
1815
+ data: JSON.stringify(c),
1813
1816
  type: "json",
1814
- onComplete(a, i, d) {
1815
- s && s(a);
1817
+ onComplete(a, r, d) {
1818
+ n && n(a);
1816
1819
  },
1817
- onFailure(a, i, d) {
1820
+ onFailure(a, r, d) {
1818
1821
  const l = a;
1819
- l.status = i.status, l.response = i.errormsg, n && n(l);
1822
+ l.status = r.status, l.response = r.errormsg, s && s(l);
1820
1823
  }
1821
1824
  });
1822
1825
  });
1823
1826
  }
1824
- function He(e, t = "", s = void 0, n = void 0) {
1827
+ function ze(e, t = "", n = void 0, s = void 0) {
1825
1828
  const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1826
1829
  t === "" && (t = o);
1827
- const r = `${e.space}/api/idea/get`, c = {
1830
+ const c = `${e.space}/api/idea/get`, i = {
1828
1831
  params: {
1829
1832
  id: t
1830
1833
  }
1831
1834
  };
1832
1835
  w(e, (a) => {
1833
- m(r, {
1836
+ m(c, {
1834
1837
  method: "POST",
1835
1838
  headers: {
1836
1839
  "Content-type": "application/json;charset=UTF-8",
1837
1840
  Accept: "application/json",
1838
1841
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1839
1842
  },
1840
- data: JSON.stringify(c),
1843
+ data: JSON.stringify(i),
1841
1844
  type: "json",
1842
- onComplete(i) {
1843
- const d = i;
1844
- d.msg = d.result.message, s && s(d);
1845
+ onComplete(r) {
1846
+ const d = r;
1847
+ d.msg = d.result.message, n && n(d);
1845
1848
  },
1846
- onFailure(i) {
1847
- const d = i;
1848
- d.status = headers.status, d.response = headers.errormsg, n && n(d);
1849
+ onFailure(r) {
1850
+ const d = r;
1851
+ d.status = headers.status, d.response = headers.errormsg, s && s(d);
1849
1852
  }
1850
1853
  });
1851
1854
  });
1852
1855
  }
1853
- function ze(e, t = ne, s = void 0, n = void 0) {
1856
+ function Qe(e, t = ne, n = void 0, s = void 0) {
1854
1857
  const o = {
1855
1858
  uri: "/api/idea/list",
1856
1859
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1857
1860
  limit: `/limit/${t.limit ? t.limit : 10}`
1858
- }, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
1859
- w(e, (c) => {
1860
- m(r, {
1861
+ }, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
1862
+ w(e, (i) => {
1863
+ m(c, {
1861
1864
  method: "GET",
1862
1865
  headers: {
1863
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1866
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1864
1867
  },
1865
1868
  onComplete(a) {
1866
- const i = JSON.parse(a);
1867
- s && s(i);
1869
+ const r = JSON.parse(a);
1870
+ n && n(r);
1868
1871
  },
1869
- onFailure(a, i) {
1872
+ onFailure(a, r) {
1870
1873
  const d = a;
1871
- d.status = i.status, d.response = i.errormsg, n && n(d);
1874
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1872
1875
  }
1873
1876
  });
1874
1877
  });
@@ -1948,84 +1951,85 @@ function se(e) {
1948
1951
  <p>
1949
1952
  </p>` : e;
1950
1953
  }
1951
- function Qe(e, t = void 0, s = void 0) {
1952
- const n = e.space + "/api/user/getcurrent/";
1954
+ function Ze(e, t = void 0, n = void 0) {
1955
+ const s = e.space + "/api/user/getcurrent/";
1953
1956
  w(e, (o) => {
1954
- m(n, {
1957
+ m(s, {
1955
1958
  method: "GET",
1956
1959
  headers: {
1957
1960
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1958
1961
  },
1959
- onComplete(r, c, a) {
1960
- const i = JSON.parse(r);
1961
- t && t(i.result);
1962
+ onComplete(c, i, a) {
1963
+ const r = JSON.parse(c);
1964
+ t && t(r.result);
1962
1965
  },
1963
- onFailure(r, c, a) {
1964
- const i = { erreur: JSON.parse(r), headers: c, xhr: a };
1965
- s && s(i);
1966
+ onFailure(c, i, a) {
1967
+ const r = { erreur: JSON.parse(c), headers: i, xhr: a };
1968
+ n && n(r);
1966
1969
  }
1967
1970
  });
1968
1971
  });
1969
1972
  }
1970
- function Ze(e, t, s = void 0, n = void 0) {
1973
+ function et(e, t, n = void 0, s = void 0) {
1971
1974
  const o = e.space + "/api/user/find/login/" + t;
1972
1975
  w(
1973
1976
  e,
1974
- (r) => {
1977
+ (c) => {
1975
1978
  m(o, {
1976
1979
  method: "GET",
1977
- headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1978
- onComplete(c, a, i) {
1979
- const d = JSON.parse(c);
1980
- s && s(d);
1980
+ headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1981
+ onComplete(i, a, r) {
1982
+ const d = JSON.parse(i);
1983
+ n && n(d);
1981
1984
  },
1982
- onFailure(c) {
1983
- n && n(c);
1985
+ onFailure(i) {
1986
+ s && s(i);
1984
1987
  }
1985
1988
  });
1986
1989
  },
1987
- n
1990
+ s
1988
1991
  );
1989
1992
  }
1990
- function et(e) {
1993
+ function tt(e) {
1991
1994
  const t = "Hello " + e;
1992
1995
  return console.log(t), t;
1993
1996
  }
1994
1997
  export {
1995
- R as UUID,
1998
+ I as UUID,
1996
1999
  ke as _3DSpace_Create_Doc,
1997
- Ue as _3DSpace_bookmark_addSubsciptions,
2000
+ Ie as _3DSpace_bookmark_addSubsciptions,
1998
2001
  T as _3DSpace_csrf,
1999
2002
  v as _3DSpace_download_doc,
2000
2003
  W as _3DSpace_download_multidoc,
2001
2004
  X as _3DSpace_file_update,
2002
2005
  V as _3DSpace_file_update_csr,
2003
- be as _3DSpace_file_url_csr,
2006
+ Ne as _3DSpace_file_url_csr,
2007
+ Ue as _3DSpace_findUsersGroup,
2004
2008
  k as _3DSpace_get_csrf,
2005
2009
  K as _3DSpace_get_docInfo,
2006
2010
  B as _3DSpace_get_downloadTicket_multidoc,
2007
- N as _3DSpace_get_securityContexts,
2008
- A as _3DSpace_get_ticket,
2009
- je as _3DSpace_lifecycle_changeRevision,
2010
- De as _3DSpace_lifecycle_changeState,
2011
- Ae as _3DSpace_lifecycle_getGraph,
2012
- $e as _3DSpace_lifecycle_getNextRevision,
2013
- Fe as _3DSpace_lifecycle_getNextStates,
2014
- Be as _3DSwym_buildDirectMessage,
2015
- qe as _3DSwym_deleteIdea,
2011
+ b as _3DSpace_get_securityContexts,
2012
+ j as _3DSpace_get_ticket,
2013
+ $e as _3DSpace_lifecycle_changeRevision,
2014
+ Fe as _3DSpace_lifecycle_changeState,
2015
+ je as _3DSpace_lifecycle_getGraph,
2016
+ Ae as _3DSpace_lifecycle_getNextRevision,
2017
+ De as _3DSpace_lifecycle_getNextStates,
2018
+ Ye as _3DSwym_buildDirectMessage,
2019
+ He as _3DSwym_deleteIdea,
2016
2020
  ee as _3DSwym_findCommunityToInstantMSG,
2017
- Ve as _3DSwym_getAllCommunities,
2018
- Ke as _3DSwym_getAllNews,
2019
- Xe as _3DSwym_getFamiliarPeople,
2020
- We as _3DSwym_getIdeaStatusMaturity,
2021
+ We as _3DSwym_getAllCommunities,
2022
+ Xe as _3DSwym_getAllNews,
2023
+ Ve as _3DSwym_getFamiliarPeople,
2024
+ Be as _3DSwym_getIdeaStatusMaturity,
2021
2025
  Z as _3DSwym_getMembersCommunity,
2022
- He as _3DSwym_getSWYMIdea,
2023
- ze as _3DSwym_get_AllSWYMIdeas,
2024
- Qe as _3DSwym_get_currentUser,
2025
- Ze as _3DSwym_get_findUser,
2026
+ ze as _3DSwym_getSWYMIdea,
2027
+ Qe as _3DSwym_get_AllSWYMIdeas,
2028
+ Ze as _3DSwym_get_currentUser,
2029
+ et as _3DSwym_get_findUser,
2026
2030
  w as _3DSwym_get_version,
2027
- Ye as _3DSwym_postIdea,
2028
- j as _3DSwym_sendMessageData,
2031
+ qe as _3DSwym_postIdea,
2032
+ $ as _3DSwym_sendMessageData,
2029
2033
  Se as _AppMngt_get_info_user,
2030
2034
  he as _AppMngt_get_users,
2031
2035
  J as _getPlateformInfos,
@@ -2034,32 +2038,32 @@ export {
2034
2038
  pe as _setDraggable,
2035
2039
  fe as _setDroppable,
2036
2040
  ue as _setupTagger,
2037
- Je as addTagToDoc,
2041
+ Ee as addTagToDoc,
2038
2042
  ge as compass_getListAdditionalApps,
2039
2043
  L as couleurs,
2040
2044
  _e as createUserGroups,
2041
2045
  Y as dataMixing,
2042
2046
  Ce as deleteUserGroups,
2043
2047
  ce as findAdresse,
2044
- Re as getAllContextSecurity,
2048
+ ve as getAllContextSecurity,
2045
2049
  G as getCSRFToken,
2046
2050
  re as getCommunes,
2047
2051
  ye as getComplementUG,
2048
- ve as getDataFrom3DSpace,
2052
+ Re as getDataFrom3DSpace,
2049
2053
  de as getDataFromGouvFr,
2050
- Me as getDatasByTenant,
2051
- Le as getDatasFrom3DSpace,
2052
- Ie as getDownloadDocument,
2053
- Ge as getInfoDocTags,
2054
+ Le as getDatasByTenant,
2055
+ Je as getDatasFrom3DSpace,
2056
+ Pe as getDownloadDocument,
2057
+ Ke as getInfoDocTags,
2054
2058
  we as getUserGroupsList,
2055
2059
  E as getUsersGroupRules,
2056
- Pe as get_3DSpace_csrf,
2060
+ Me as get_3DSpace_csrf,
2057
2061
  Te as patchUserGroups,
2058
2062
  Oe as patchUserGroupsControl,
2059
2063
  xe as pushDataIn3DSpace,
2060
- Ne as readUserGroupControl,
2061
- Ee as removeTagToDoc,
2062
- et as sayHello,
2064
+ be as readUserGroupControl,
2065
+ Ge as removeTagToDoc,
2066
+ tt as sayHello,
2063
2067
  le as updateEvent
2064
2068
  };
2065
2069
  //# sourceMappingURL=wb3Api.js.map