@beam3_dev/api_module 0.0.77 → 0.0.79

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 ADDED
@@ -0,0 +1,1980 @@
1
+ import { v4 as M } from "uuid";
2
+ import { DateTime as N } from "luxon";
3
+ import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
+ function I() {
5
+ return M();
6
+ }
7
+ const L = {
8
+ b3M3Yellow: "#FFB300",
9
+ b3AboutageBlue: "#42A5F5",
10
+ b3UsinageGreen: "#689F38",
11
+ b3PanneauOrange: "#ff8000",
12
+ b3M350percent: "#fafa6e",
13
+ b3M380percent: "#aae479",
14
+ b3M390percent: "#64c987",
15
+ b3M3100percent: "#23aa8f",
16
+ b3M3105percent: "#00898a",
17
+ b3M3110percent: "#176877",
18
+ b3M3120percent: "#2a4858",
19
+ b3Aboutage50percent: "#fafa6e",
20
+ b3Aboutage80percent: "#aae479",
21
+ b3Aboutage90percent: "#64c987",
22
+ b3Aboutage100percent: "#23aa8f",
23
+ b3Aboutage105percent: "#00898a",
24
+ b3Aboutage110percent: "#176877",
25
+ b3Aboutage120percent: "#2a4858",
26
+ b3Warning: "#FF0000",
27
+ b3Edit1: "#AD1457",
28
+ b3Edit2: "#F4511E",
29
+ b3Edit3: "#009688",
30
+ b3Edit4: "#D50000",
31
+ b3Edit5: "#039BE5",
32
+ b3Edit6: "#9E69AF",
33
+ b3Edit7: "#A79B8E",
34
+ b3Edit8: "#616161",
35
+ b3Edit9: "#795548"
36
+ };
37
+ async function ie(e, t = void 0, s = void 0) {
38
+ const n = parseInt(e);
39
+ await fetch(
40
+ "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
41
+ {
42
+ method: "GET",
43
+ headers: {
44
+ Accept: "application/json"
45
+ }
46
+ }
47
+ ).then((o) => o.json()).then((o) => {
48
+ t && t(o);
49
+ }).catch((o) => {
50
+ s && s(o), console.error("Erreur : " + o);
51
+ });
52
+ }
53
+ async function re(e, t = void 0, s = void 0) {
54
+ e = encodeURIComponent(e), await fetch(
55
+ "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
+ {
57
+ method: "GET",
58
+ headers: {
59
+ Accept: "application/json"
60
+ }
61
+ }
62
+ ).then((n) => n.json()).then((n) => {
63
+ t && t(n);
64
+ }).catch((n) => {
65
+ s && s(n), console.error("Erreur : " + n);
66
+ });
67
+ }
68
+ async function ce(e, t = L) {
69
+ let s = N.now().year;
70
+ const n = e, o = [], c = (a) => {
71
+ for (let i in a)
72
+ o.push({ date: i, comment: a[i] });
73
+ };
74
+ for (let a = s; a <= s + 1; a++)
75
+ await fetch(
76
+ "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
77
+ {
78
+ method: "GET",
79
+ headers: {
80
+ Accept: "application/json"
81
+ }
82
+ }
83
+ ).then((i) => i.json()).then((i) => {
84
+ c(i);
85
+ }).catch((i) => console.error("Erreur : " + i));
86
+ return (() => {
87
+ const a = n.length === 0 ? {
88
+ events: []
89
+ } : n;
90
+ for (let i of o)
91
+ a.events.findIndex(
92
+ (l) => l.start === N.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
93
+ ) === -1 && a.events.push({
94
+ name: "Férié : " + i.comment,
95
+ start: N.fromISO(i.date).toISODate(),
96
+ end: N.fromISO(i.date).toISODate(),
97
+ color: t.b3BusinnessDays,
98
+ timed: !1
99
+ });
100
+ return a;
101
+ })();
102
+ }
103
+ async function de(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, c) => o.start - c.start), e;
106
+ }
107
+ function m(e, t) {
108
+ O(["DS/WAFData/WAFData"], (s) => {
109
+ s.authenticatedRequest(e, t);
110
+ });
111
+ }
112
+ function le(e, t, s) {
113
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
114
+ n.draggable(e, { data: t, start: s });
115
+ });
116
+ }
117
+ function pe(e, t = void 0) {
118
+ O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
119
+ let n;
120
+ n === void 0 && (n = s.createProxy({
121
+ widgetId: A.id,
122
+ filteringMode: "WithFilteringServices"
123
+ }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
124
+ });
125
+ }
126
+ function ue(e, t) {
127
+ O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
128
+ s.droppable(e, { drop: t });
129
+ });
130
+ }
131
+ async function fe(e, t = void 0, s = void 0) {
132
+ await O(
133
+ ["DS/i3DXCompassServices/i3DXCompassServices"],
134
+ (n) => {
135
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
+ n.getPlatformServices({
137
+ platformId: e,
138
+ onComplete: t,
139
+ onFailure: s
140
+ })
141
+ );
142
+ }
143
+ );
144
+ }
145
+ function me() {
146
+ let e = {};
147
+ return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
+ const s = t.getTenant(), n = t.getUser(), o = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
149
+ "com.3ds.wp.passport.cors"
150
+ );
151
+ e = {
152
+ tenant: s,
153
+ user: n,
154
+ appsConfiguration: o,
155
+ appConf: c
156
+ };
157
+ }), console.log("%cRETOUR API :", "color:blue", e), e;
158
+ }
159
+ function ge(e, t, s) {
160
+ const n = {
161
+ base: `${e.space}`,
162
+ uri: "/resources/AppsMngt/api/custom/applications",
163
+ option: `?filter=${e.tenant}`
164
+ // facultatif
165
+ }, o = `${n.base}${n.uri}${n.option}`;
166
+ m(o, {
167
+ method: "GET",
168
+ headers: {
169
+ "Content-Type": "application/json",
170
+ Accept: "application/json"
171
+ },
172
+ onComplete(c, r, a) {
173
+ const i = JSON.parse(c), d = i.data.map((l) => {
174
+ const p = l.attributes.name, u = l.id;
175
+ return { name: p, id: u };
176
+ });
177
+ t && t(d, i);
178
+ },
179
+ onFailure(c, r) {
180
+ const a = c;
181
+ a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
182
+ }
183
+ });
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, c, r) {
189
+ const a = JSON.parse(o);
190
+ console.log("_AppMngt_get_users => ", a), t && t(a);
191
+ },
192
+ onFailure(o, c) {
193
+ const r = o;
194
+ r.msg = c.errormsg, r.errCode = c.errorcode, s && s(r);
195
+ }
196
+ });
197
+ }
198
+ function Se(e, t, s = void 0, n = void 0) {
199
+ let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
+ m(o, {
201
+ onComplete(c, r, a) {
202
+ const i = JSON.parse(c);
203
+ s && s(i);
204
+ },
205
+ onFailure(c, r) {
206
+ const a = c;
207
+ a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
208
+ }
209
+ });
210
+ }
211
+ const F = {
212
+ "Content-Type": "application/json",
213
+ Accept: "application/json,text/javascript,*/*"
214
+ };
215
+ function _e(e, t, s = void 0, n = void 0) {
216
+ const { space: o, currentUser: c } = e, a = `${o}${{
217
+ URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
+ }.URIUGr}`, i = {
219
+ groups: [
220
+ {
221
+ title: t.title,
222
+ description: t.description,
223
+ members: t.members || [c.email, "samuel.mureau@beam3.fr"],
224
+ pending_members: [],
225
+ sharing: t.sharing,
226
+ visibility: t.visibility
227
+ }
228
+ ]
229
+ };
230
+ m(a, {
231
+ method: "POST",
232
+ headers: F,
233
+ data: JSON.stringify(i),
234
+ onComplete(d) {
235
+ s && s(JSON.parse(d));
236
+ },
237
+ onFailure(d, l) {
238
+ console.log(d);
239
+ const p = d;
240
+ p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
241
+ }
242
+ });
243
+ }
244
+ function ye(e, t, s = void 0, n = void 0) {
245
+ const { space: o, tenant: c } = e, r = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${i}`;
246
+ m(d, {
247
+ opts: {
248
+ method: "GET",
249
+ headers: {
250
+ "Content-Type": "application/json",
251
+ Accept: "application/json,text/javascript,*/*"
252
+ }
253
+ },
254
+ onComplete(u) {
255
+ s && s(JSON.parse(u));
256
+ },
257
+ onFailure(u, f) {
258
+ const g = u;
259
+ g.msg = f.errormsg, g.errCode = f.errorcode, n && n(g);
260
+ }
261
+ });
262
+ }
263
+ function E(e, t = void 0, s = void 0) {
264
+ const { space: n, tenant: o } = e, c = n, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
265
+ method: "GET",
266
+ Accept: "application/json,*/*,test/javascript"
267
+ }, d = `${c}${r}${a}`;
268
+ m(d, {
269
+ OPTsH: i,
270
+ onComplete(l) {
271
+ t && t(JSON.parse(l));
272
+ },
273
+ onFailure(l, p) {
274
+ const u = l;
275
+ u.msg = p.errormsg, u.errCode = p.errorcode, s && s(u);
276
+ }
277
+ });
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: {
281
+ "Content-Type": "application/json",
282
+ Accept: "application/json,text/javascript,*/*"
283
+ } };
284
+ try {
285
+ m(a, {
286
+ opts: d,
287
+ onComplete(l) {
288
+ const p = JSON.parse(l), u = {}, f = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
+ if (o && Object.keys(o).length > 0) {
290
+ const g = f.filter((_) => _.owner === o.email), h = f.filter((_) => _.members.includes(o.email)), S = g.concat(h);
291
+ u.iam = S, u.UG = f, u.iamMember = h, E(
292
+ e,
293
+ (_) => {
294
+ u.rules = _, t && t(u);
295
+ },
296
+ (_) => {
297
+ s && s(_);
298
+ }
299
+ );
300
+ }
301
+ },
302
+ onFailure(l) {
303
+ s && s(l);
304
+ }
305
+ });
306
+ } catch (l) {
307
+ console.log(l);
308
+ }
309
+ }
310
+ function Te(e, t) {
311
+ const { space: s } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
+ m(o, {
313
+ method: "DELETE"
314
+ });
315
+ }
316
+ function Ce(e, t, s, n = void 0, o = void 0) {
317
+ const { space: c, tenant: r } = e, a = {
318
+ URITI: "/3drdfpersist/resources/v1/template-instances",
319
+ URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
+ nextURICh: "/characteristics",
321
+ nextURIGr: "/group",
322
+ nexURImem: "/members",
323
+ OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
+ OPTsTenant: `tenant=dstenant:${r}`
325
+ }, i = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(i);
326
+ m(d, {
327
+ headers: F,
328
+ method: "PATCH",
329
+ data: l,
330
+ type: "json",
331
+ onComplete(p) {
332
+ n && n(p);
333
+ },
334
+ onFailure(p) {
335
+ o && o(p);
336
+ }
337
+ });
338
+ }
339
+ function Oe(e, t, s, n = void 0, o = void 0) {
340
+ const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
+ m(a, {
342
+ method: "PATCH",
343
+ headers: F,
344
+ data: JSON.stringify(s),
345
+ type: "json",
346
+ onComplete(d) {
347
+ n && n(d);
348
+ },
349
+ onFailure(d) {
350
+ o && o(d);
351
+ }
352
+ });
353
+ }
354
+ function be(e, t, s = void 0, n = void 0) {
355
+ const { space: o } = e, r = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ m(r, {
357
+ opts: {
358
+ method: "GET",
359
+ headers: {
360
+ "Content-Type": "application/json",
361
+ Accept: "application/json,text/javascript,*/*"
362
+ }
363
+ },
364
+ onComplete(d) {
365
+ s && s(JSON.parse(d));
366
+ },
367
+ onFailure(d) {
368
+ n && n(d);
369
+ }
370
+ });
371
+ }
372
+ async function J(e, t, s) {
373
+ if (e.space) {
374
+ const n = `${e.space}/resources/v1/application/CSRF`;
375
+ m(n, {
376
+ onComplete(o) {
377
+ o = JSON.parse(o), console.log("getCSRFToken() / response => ", o), t && t(o.csrf);
378
+ },
379
+ onFailure(o, c, r) {
380
+ s && s({ error: o, headers: c, xhr: r });
381
+ }
382
+ });
383
+ }
384
+ }
385
+ async function G(e, t = void 0, s = void 0, n = void 0) {
386
+ const o = e.space;
387
+ if (t === void 0) {
388
+ console.log("Le paramètre docid est obligatoire");
389
+ return;
390
+ }
391
+ const c = o + `/resources/v1/modeler/documents/${t}`;
392
+ m(c, {
393
+ onComplete(r, a, i) {
394
+ const d = JSON.parse(r);
395
+ s && s(d);
396
+ },
397
+ onFailure(r) {
398
+ n && n(r);
399
+ }
400
+ });
401
+ }
402
+ function k(e, t = void 0, s = void 0) {
403
+ if (e.objID && e.objID !== "") {
404
+ let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
+ m(n, {
406
+ onComplete(o, c, r) {
407
+ const a = JSON.parse(o);
408
+ e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
+ },
410
+ onFailure(o) {
411
+ s && s(o);
412
+ }
413
+ });
414
+ } else
415
+ C(
416
+ e,
417
+ (n) => {
418
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
419
+ },
420
+ (n) => {
421
+ s && s(n);
422
+ }
423
+ );
424
+ }
425
+ function C(e, t = void 0, s = void 0) {
426
+ if (e.space) {
427
+ const n = e.space + "/resources/v1/application/CSRF";
428
+ m(n, {
429
+ onComplete(o, c, r) {
430
+ const a = JSON.parse(o);
431
+ t && t(a.csrf.value);
432
+ },
433
+ onFailure(o, c, r) {
434
+ s && s({
435
+ response: o,
436
+ headers: c,
437
+ xhr: r
438
+ });
439
+ }
440
+ });
441
+ } else
442
+ s && s("ERROR : url du 3DSpace non défini.");
443
+ }
444
+ function U(e, t = void 0, s = void 0) {
445
+ let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
446
+ k(
447
+ e,
448
+ (o) => {
449
+ m(n, {
450
+ method: "PUT",
451
+ headers: {
452
+ ENO_CSRF_TOKEN: e.token
453
+ },
454
+ onComplete(c) {
455
+ const a = JSON.parse(c).data[0].dataelements.ticketURL;
456
+ t && t(a);
457
+ },
458
+ onFailure(c, r) {
459
+ console.warn("☠️ error => ", c, r), s && s(c, r);
460
+ }
461
+ });
462
+ },
463
+ (o) => {
464
+ console.warn("_3DSpace_get_ticket / error => ", o), s && s(o);
465
+ }
466
+ );
467
+ }
468
+ function Ne(e, t, s, n = void 0, o = void 0) {
469
+ const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
+ s || (s = e.token), m(c, {
471
+ method: "PUT",
472
+ headers: {
473
+ ENO_CSRF_TOKEN: s
474
+ },
475
+ onComplete(r) {
476
+ let a = JSON.parse(r);
477
+ if (console.log("☠️ info => ", a), a.success === !0)
478
+ try {
479
+ const i = a.data[0].dataelements.ticketURL;
480
+ n && n(i);
481
+ } catch (i) {
482
+ o && o(i);
483
+ }
484
+ },
485
+ onFailure(r) {
486
+ o && o(r);
487
+ }
488
+ });
489
+ }
490
+ function K(e, t, s, n, o, c = void 0, r = void 0) {
491
+ k(
492
+ e,
493
+ t,
494
+ (a) => {
495
+ W(
496
+ e,
497
+ t,
498
+ s,
499
+ n,
500
+ o,
501
+ a.csrf.value,
502
+ c,
503
+ r
504
+ );
505
+ }
506
+ );
507
+ }
508
+ function W(e, t, s, n, o, c, r = void 0, a = void 0) {
509
+ const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
+ m(i, {
511
+ method: "PUT",
512
+ headers: {
513
+ ENO_CSRF_TOKEN: c
514
+ },
515
+ onComplete(d, l, p) {
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);
518
+ const g = {};
519
+ g.method = "POST", g.data = f, g.onComplete = function(h) {
520
+ let S = "temp_" + Date.now(), _ = {
521
+ method: "PUT",
522
+ headers: {
523
+ ENO_CSRF_TOKEN: c
524
+ },
525
+ data: JSON.stringify({
526
+ data: [
527
+ {
528
+ id: t,
529
+ relateddata: {
530
+ files: [
531
+ {
532
+ id: s,
533
+ dataelements: {
534
+ title: o,
535
+ receipt: h
536
+ },
537
+ updateAction: "REVISE"
538
+ }
539
+ ]
540
+ },
541
+ tempId: S
542
+ }
543
+ ]
544
+ }),
545
+ type: "json",
546
+ onComplete(y) {
547
+ r && r(y);
548
+ },
549
+ onFailure(y) {
550
+ a && a(y);
551
+ }
552
+ };
553
+ m(
554
+ e.space + "/resources/v1/modeler/documents",
555
+ _
556
+ );
557
+ }, g.onFailure = function(h) {
558
+ a && a(h);
559
+ }, g.timeout = 0, m(u.ticketURL, g);
560
+ }
561
+ });
562
+ }
563
+ async function ke(e, t, s, n, o = void 0, c = void 0) {
564
+ const r = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
565
+ type: "text/plain"
566
+ }), p = {
567
+ url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
568
+ url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${i}`
569
+ };
570
+ if (!r && r !== "") {
571
+ console.log("le store._3DSpace est vide");
572
+ return;
573
+ }
574
+ m(p.url_Ticket, {
575
+ method: "PUT",
576
+ headers: {
577
+ ENO_CSRF_TOKEN: a.value
578
+ },
579
+ onComplete(u, f, g) {
580
+ const h = JSON.parse(u).data[0].dataelements;
581
+ d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, s);
582
+ const S = {
583
+ method: "POST",
584
+ data: d,
585
+ onComplete(T) {
586
+ if (i !== "" && a !== "") {
587
+ const D = {
588
+ method: "POST",
589
+ headers: {
590
+ ENO_CSRF_TOKEN: a,
591
+ Accept: "application/json",
592
+ "Content-Type": "application/json"
593
+ },
594
+ data: JSON.stringify({
595
+ data: [
596
+ {
597
+ type: "Document",
598
+ dataelements: {
599
+ title: `Title_${s.toLowerCase().split(" ").join("_")}`,
600
+ policy: "Document Release",
601
+ description: n
602
+ },
603
+ relateddata: {
604
+ files: [
605
+ {
606
+ dataelements: {
607
+ title: `${s}.json`,
608
+ receipt: T
609
+ }
610
+ }
611
+ ]
612
+ },
613
+ tempId: I()
614
+ }
615
+ ]
616
+ }),
617
+ type: "json",
618
+ timeout: 0,
619
+ onComplete: _,
620
+ onFailure: y
621
+ };
622
+ i !== "" && m(p.url_Post, D);
623
+ } else
624
+ console.warn("le store est vide");
625
+ },
626
+ onFailure: y
627
+ };
628
+ function _(T) {
629
+ console.log("Success -- response ", T.data[0]), o && o(T);
630
+ }
631
+ function y(T, D) {
632
+ console.log("Erreur -- response ", T, `
633
+ headers `, D), c && c(T);
634
+ }
635
+ m(h.ticketURL, S);
636
+ }
637
+ });
638
+ }
639
+ function b(e, t = void 0, s = void 0, n = void 0, o = void 0, c = void 0, r = !1) {
640
+ const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
641
+ m(a, {
642
+ method: "GET",
643
+ onComplete(i) {
644
+ const d = JSON.parse(i);
645
+ let l = "", p, u, f;
646
+ if (t) {
647
+ let g = d.collabspaces.find((h) => h.title === t);
648
+ if (g) {
649
+ p = t;
650
+ let h = g.couples;
651
+ h = h.filter(
652
+ (S, _, y) => _ === y.findIndex(
653
+ (T) => T.organization.pid === S.organization.pid && T.role.pid === S.role.pid
654
+ )
655
+ ), s && (Array.isArray(s) ? s.forEach((S) => {
656
+ f || h.forEach((_) => {
657
+ if (S === _.role.name && n === _.organization.title)
658
+ f = S, u = n;
659
+ else if (S === _.role.name) {
660
+ let y = h.filter(
661
+ (T) => T.role.name === S
662
+ );
663
+ y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
664
+ }
665
+ });
666
+ }) : h.forEach((S) => {
667
+ if (s === S.role.name && n === S.organization.title)
668
+ f = s, u = n;
669
+ else if (s === S.role.name) {
670
+ let _ = h.filter(
671
+ (y) => y.role.name === s
672
+ );
673
+ _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
674
+ }
675
+ }));
676
+ }
677
+ }
678
+ p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && r ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : c && (l = f + "." + u + "." + p, c(l));
679
+ },
680
+ onFailure(i, d) {
681
+ console.log("Erreur de récupération du contexte de sécurité. => ", {
682
+ err: i,
683
+ headers: d
684
+ });
685
+ }
686
+ });
687
+ }
688
+ async function R(e, t = void 0, s = void 0) {
689
+ return (!e.objID || e.objID === "") && console.warn(
690
+ "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
691
+ ), (e.space === "" || !e.space) && console.warn(
692
+ "_3DSpace_download_doc() / Le paramètre space est obligatoire"
693
+ ), (e.token === "" || !e.token) && (J(
694
+ e,
695
+ (n) => {
696
+ e.token = n;
697
+ },
698
+ (n) => {
699
+ console.log("☠️ error => ", n);
700
+ }
701
+ ), console.warn(
702
+ "_3DSpace_download_doc() / Le paramètre token est obligatoire"
703
+ )), new Promise((n, o) => {
704
+ U(
705
+ e,
706
+ (c) => {
707
+ m(c, {
708
+ headers: {
709
+ "Content-Type": "application/json",
710
+ Accept: "application/json"
711
+ },
712
+ onComplete(a) {
713
+ let i;
714
+ try {
715
+ i = JSON.parse(a);
716
+ } catch {
717
+ i = a;
718
+ }
719
+ t && t(i), n(i);
720
+ },
721
+ onFailure(a, i, d) {
722
+ s && (console.log("error http", a), s({
723
+ msg: JSON.parse(a),
724
+ headers: i,
725
+ xhr: d
726
+ }), o({
727
+ msg: JSON.parse(a),
728
+ headers: i,
729
+ xhr: d
730
+ }));
731
+ }
732
+ });
733
+ },
734
+ (c) => {
735
+ s && s(c), console.log("*_3dspace_download_doc / error file URL *", c), o(c);
736
+ }
737
+ );
738
+ });
739
+ }
740
+ async function X(e, t, s = void 0, n = void 0) {
741
+ let o = [];
742
+ for (let a = 0; a < t.length; a += 80) {
743
+ const i = t.slice(a, a + 80);
744
+ o.push(i);
745
+ }
746
+ const r = (a) => {
747
+ V(
748
+ e,
749
+ o[a],
750
+ () => {
751
+ a++, a < o.length && r(a);
752
+ },
753
+ (i) => {
754
+ s && s(i);
755
+ }
756
+ );
757
+ };
758
+ r(0);
759
+ }
760
+ function V(e, t, s = void 0, n = void 0, o = void 0) {
761
+ const c = [];
762
+ t.forEach((i) => {
763
+ c.push({
764
+ id: i
765
+ });
766
+ });
767
+ let r = JSON.stringify({
768
+ csrf: {
769
+ name: "ENO_CSRF_TOKEN",
770
+ value: e.token
771
+ },
772
+ data: c
773
+ });
774
+ const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
775
+ m(a, {
776
+ method: "PUT",
777
+ data: r,
778
+ type: "json",
779
+ onComplete(i) {
780
+ const d = i.data;
781
+ i.success === !0 && (s && s(), d.forEach((l) => {
782
+ try {
783
+ const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
784
+ m(u, {
785
+ onComplete: (f) => {
786
+ n && n({
787
+ objectId: l.id,
788
+ fileName: p,
789
+ data: JSON.parse(f)
790
+ });
791
+ },
792
+ onFailure: (f) => {
793
+ console.log("error http", f);
794
+ }
795
+ });
796
+ } catch (p) {
797
+ console.log(p), o && o(p);
798
+ }
799
+ }));
800
+ },
801
+ onFailure(i) {
802
+ console.log(i), o && o(i);
803
+ }
804
+ });
805
+ }
806
+ function De(e, t, s = void 0, n = void 0) {
807
+ return new Promise((o) => {
808
+ if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
809
+ const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
810
+ b(
811
+ e.space,
812
+ "ESPACE COMMUN",
813
+ ["VPLMProjectLeader", "VPLMCreator"],
814
+ void 0,
815
+ (a) => e.ctx = a,
816
+ (a) => {
817
+ console.log("onError =>", a);
818
+ }
819
+ );
820
+ let r = {
821
+ method: "POST",
822
+ headers: {
823
+ SecurityContext: "ctx::" + e.ctx,
824
+ ENO_CSRF_TOKEN: e.token,
825
+ Accept: "application/json",
826
+ "Content-Type": "application/json"
827
+ },
828
+ data: JSON.stringify({
829
+ data: [
830
+ {
831
+ id: t
832
+ }
833
+ ]
834
+ }),
835
+ type: "json",
836
+ onComplete(a) {
837
+ s && s(a);
838
+ },
839
+ onFailure(a) {
840
+ n && n(a);
841
+ }
842
+ };
843
+ m(c, r);
844
+ }
845
+ });
846
+ }
847
+ function Fe(e, t, s, n = void 0, o = void 0) {
848
+ return new Promise((c) => {
849
+ if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
850
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
851
+ b(
852
+ e.space,
853
+ "ESPACE COMMUN",
854
+ ["VPLMProjectLeader", "VPLMCreator"],
855
+ void 0,
856
+ (i) => e.ctx = i,
857
+ (i) => {
858
+ console.log("onError =>", i);
859
+ }
860
+ );
861
+ let a = {
862
+ method: "POST",
863
+ headers: {
864
+ SecurityContext: "ctx::" + e.ctx,
865
+ ENO_CSRF_TOKEN: e.token,
866
+ Accept: "application/json",
867
+ "Content-Type": "application/json"
868
+ },
869
+ data: JSON.stringify({
870
+ data: [
871
+ {
872
+ id: t,
873
+ nextState: s
874
+ }
875
+ ]
876
+ }),
877
+ type: "json",
878
+ onComplete(i) {
879
+ n && n(i);
880
+ },
881
+ onFailure(i) {
882
+ o && o(i);
883
+ }
884
+ };
885
+ m(r, a);
886
+ }
887
+ });
888
+ }
889
+ function Ue(e, t, s = void 0, n = void 0) {
890
+ return new Promise((o) => {
891
+ if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
892
+ const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
893
+ b(
894
+ e.space,
895
+ "ESPACE COMMUN",
896
+ ["VPLMProjectLeader", "VPLMCreator"],
897
+ void 0,
898
+ (a) => e.ctx = a,
899
+ (a) => {
900
+ console.log("onError =>", a);
901
+ }
902
+ );
903
+ let r = {
904
+ method: "POST",
905
+ headers: {
906
+ securitycontext: "ctx::" + e.ctx,
907
+ ENO_CSRF_TOKEN: e.token,
908
+ Accept: "application/json",
909
+ "Content-Type": "application/json"
910
+ },
911
+ data: JSON.stringify({
912
+ graphRequests: [
913
+ {
914
+ id: t
915
+ }
916
+ ]
917
+ }),
918
+ type: "json",
919
+ onComplete(a) {
920
+ s && s(a);
921
+ },
922
+ onFailure(a) {
923
+ n && n(a);
924
+ }
925
+ };
926
+ m(c, r);
927
+ }
928
+ });
929
+ }
930
+ function je(e, t, s = void 0, n = void 0) {
931
+ return new Promise((o) => {
932
+ if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
933
+ const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
934
+ b(
935
+ e.space,
936
+ "ESPACE COMMUN",
937
+ ["VPLMProjectLeader", "VPLMCreator"],
938
+ void 0,
939
+ (a) => e.ctx = a,
940
+ (a) => {
941
+ console.log("onError =>", a);
942
+ }
943
+ );
944
+ let r = {
945
+ method: "POST",
946
+ headers: {
947
+ SecurityContext: "ctx::" + e.ctx,
948
+ ENO_CSRF_TOKEN: e.token,
949
+ Accept: "application/json",
950
+ "Content-Type": "application/json"
951
+ },
952
+ data: JSON.stringify({
953
+ data: [
954
+ {
955
+ "attribute[PLMReference.V_versionComment]": null,
956
+ physicalid: t,
957
+ type: "Document",
958
+ tenant: e.tenant,
959
+ objectId: t,
960
+ policy: "Document Release",
961
+ availableSemantic: ["E", "LAST", "NEW", "DUP"]
962
+ }
963
+ ]
964
+ }),
965
+ type: "json",
966
+ onComplete(a) {
967
+ s && s(a);
968
+ },
969
+ onFailure(a) {
970
+ n && n(a);
971
+ }
972
+ };
973
+ m(c, r);
974
+ }
975
+ });
976
+ }
977
+ function $e(e, t, s, n = void 0, o = void 0) {
978
+ return new Promise((c) => {
979
+ if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
980
+ const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
981
+ b(
982
+ e.space,
983
+ "ESPACE COMMUN",
984
+ ["VPLMProjectLeader", "VPLMCreator"],
985
+ void 0,
986
+ (i) => e.ctx = i,
987
+ (i) => {
988
+ console.log("onError =>", i);
989
+ }
990
+ );
991
+ let a = {
992
+ method: "POST",
993
+ headers: {
994
+ securitycontext: "ctx::" + e.ctx,
995
+ ENO_CSRF_TOKEN: e.token,
996
+ Accept: "application/json",
997
+ "Content-Type": "application/json"
998
+ },
999
+ data: JSON.stringify({
1000
+ data: [
1001
+ {
1002
+ physicalid: t,
1003
+ proposedRevision: s,
1004
+ modifiedAttributes: {
1005
+ revision: s
1006
+ }
1007
+ }
1008
+ ],
1009
+ folderid: null,
1010
+ notificationTimeout: 600
1011
+ }),
1012
+ type: "json",
1013
+ onComplete(i) {
1014
+ n && n(i);
1015
+ },
1016
+ onFailure(i) {
1017
+ o && o(i);
1018
+ }
1019
+ };
1020
+ m(r, a);
1021
+ }
1022
+ });
1023
+ }
1024
+ //!SECTION
1025
+ function Ae(e, t = void 0, s = void 0) {
1026
+ const n = {
1027
+ base: `${e.space}`,
1028
+ uri: "/resources/bps/cspaces",
1029
+ optTenant: `tenant=${e.tenant}`
1030
+ }, o = `${n.base}${n.uri}?${n.optTenant}`;
1031
+ m(o, {
1032
+ method: "GET",
1033
+ headers: {
1034
+ Accept: "application/json,text/javascript,*/*",
1035
+ "Content-Type": "application/ds-json"
1036
+ },
1037
+ onComplete(c, r) {
1038
+ const a = JSON.parse(c);
1039
+ t && t(a, r);
1040
+ },
1041
+ onFailure(c, r, a) {
1042
+ s && s({ response: c, headers: r, xhr: a });
1043
+ }
1044
+ });
1045
+ }
1046
+ function Ie(e, t, s, n) {
1047
+ U(
1048
+ e.space,
1049
+ t,
1050
+ (o) => {
1051
+ m(o, {
1052
+ header: { ENO_CSRF_TOKEN: e.token },
1053
+ onComplete: (c) => {
1054
+ s && s(c);
1055
+ },
1056
+ onFailure: (c) => {
1057
+ console.log("error http", c), n && n(c);
1058
+ }
1059
+ });
1060
+ }
1061
+ );
1062
+ }
1063
+ async function Re(e, t, s = void 0, n = void 0) {
1064
+ return new Promise((o) => {
1065
+ U(e, t, (c) => {
1066
+ m(c, {
1067
+ onComplete: (r, a, i) => (o(JSON.parse(r)), s && s(JSON.parse(r), a, i), o),
1068
+ onFailure: (r, a, i) => {
1069
+ n && n(r, a, i), console.log(r, a?.errormsg);
1070
+ }
1071
+ });
1072
+ });
1073
+ });
1074
+ }
1075
+ function ve(e, t, s, n = void 0, o = void 0) {
1076
+ const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1077
+ k(
1078
+ e,
1079
+ s,
1080
+ (r) => {
1081
+ const a = r.data[0].relateddata.files[0].id, i = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
1082
+ K(
1083
+ e,
1084
+ s,
1085
+ a,
1086
+ c,
1087
+ i,
1088
+ (d) => {
1089
+ n && n(d);
1090
+ },
1091
+ (d) => {
1092
+ o && o(d);
1093
+ }
1094
+ );
1095
+ }
1096
+ );
1097
+ }
1098
+ let v, P;
1099
+ const j = [];
1100
+ async function Pe(e, t = void 0, s = void 0) {
1101
+ e.objID && e.objID !== "" ? k(
1102
+ e,
1103
+ (n) => {
1104
+ t && t(n);
1105
+ },
1106
+ (n) => {
1107
+ s && s(n);
1108
+ }
1109
+ ) : (e.objID === null || e.objID === "") && C(
1110
+ e,
1111
+ (n) => {
1112
+ t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1113
+ },
1114
+ (n) => {
1115
+ s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1116
+ }
1117
+ );
1118
+ }
1119
+ async function xe(e, t = void 0, s = void 0) {
1120
+ console.log("getDatasByTenant (getDocuments)", e), await R(
1121
+ e,
1122
+ (n) => {
1123
+ const o = {};
1124
+ o.obj = n, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1125
+ },
1126
+ (n) => {
1127
+ s && s?.(n);
1128
+ }
1129
+ );
1130
+ }
1131
+ function Me(e, t = void 0, s = void 0) {
1132
+ const n = [];
1133
+ if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1134
+ console.warn("la liste est vide ou n'est pas un tableau");
1135
+ return;
1136
+ }
1137
+ e.objIds.forEach((o, c) => {
1138
+ R(
1139
+ e,
1140
+ o.objID,
1141
+ (r) => {
1142
+ n.push({ [o.name]: r }), o.name === "dbProjets" && (v = r.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1143
+ }
1144
+ );
1145
+ });
1146
+ }
1147
+ function B(e, t, s = void 0, n = void 0) {
1148
+ X(
1149
+ e,
1150
+ v,
1151
+ (o) => {
1152
+ const c = [...t];
1153
+ c.find((r) => r.objectID === o.objectId).data = o.data, P = c, j.push(o.data), s && s(j);
1154
+ },
1155
+ (o) => {
1156
+ n && (n(o), console.log(o));
1157
+ }
1158
+ );
1159
+ }
1160
+ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1161
+ "swym",
1162
+ "3dspace",
1163
+ "drive",
1164
+ "usersgroup",
1165
+ "3dplan",
1166
+ "dashboard"
1167
+ ], x = {
1168
+ how: "ds6w:how",
1169
+ what: "ds6w:what",
1170
+ when: "ds6w:when",
1171
+ where: "ds6w:where",
1172
+ who: "ds6w:who",
1173
+ why: "ds6w:why"
1174
+ }, z = {
1175
+ objId: Y,
1176
+ pred: "who",
1177
+ order_by: "desc",
1178
+ tag: "testTag"
1179
+ };
1180
+ function Le(e, t, s = void 0, n = void 0) {
1181
+ const { space: o, tenant: c } = e, { objId: r, pred: a, tag: i } = t, d = {
1182
+ uri: "/resources/6w/tags",
1183
+ otpCTX: "SecurityContext=preferred",
1184
+ optTenant: `tenant=${c}`
1185
+ }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1186
+ tag: [
1187
+ {
1188
+ subject: [
1189
+ {
1190
+ uri: `pid://${r}`
1191
+ }
1192
+ ],
1193
+ predicate: x[a],
1194
+ object: {
1195
+ literal: i
1196
+ }
1197
+ }
1198
+ ]
1199
+ };
1200
+ m(l, {
1201
+ method: "PUT",
1202
+ headers: {
1203
+ "Content-Type": "application/json",
1204
+ Accept: "application/json"
1205
+ },
1206
+ data: JSON.stringify(p),
1207
+ onComplete(u) {
1208
+ JSON.parse(u);
1209
+ const f = {};
1210
+ setTimeout(() => {
1211
+ G(
1212
+ e,
1213
+ r,
1214
+ (g) => {
1215
+ 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;
1216
+ f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, q(
1217
+ e,
1218
+ t,
1219
+ (y) => {
1220
+ s && s(y);
1221
+ },
1222
+ (y) => {
1223
+ n && n(y);
1224
+ }
1225
+ );
1226
+ },
1227
+ (g, h) => {
1228
+ const S = g;
1229
+ S.msg = h.errormsg, S.errCode = h.errorcode, console.log("❌ sendDirectMessage => ", S), n && n(S);
1230
+ }
1231
+ );
1232
+ }, 2e3);
1233
+ },
1234
+ onFailure(u, f) {
1235
+ const g = u;
1236
+ g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), n && n(g);
1237
+ }
1238
+ });
1239
+ }
1240
+ function q(e, t, s = void 0, n = void 0) {
1241
+ console.log("obj ", t);
1242
+ const o = t.info.name, c = {
1243
+ baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1244
+ uri: "/federated/search"
1245
+ }, r = `${c.baseUrl}${c.uri}`, a = {
1246
+ "Content-Type": "application/json",
1247
+ Accept: "application/json,text/javascript,*/*"
1248
+ }, i = I(), d = {
1249
+ with_indexing_date: !0,
1250
+ with_synthesis: !0,
1251
+ with_nls: !1,
1252
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${i}`,
1253
+ locale: "fr",
1254
+ select_predicate: [
1255
+ "ds6w:label",
1256
+ "ds6w:type",
1257
+ "ds6w:description",
1258
+ "ds6w:identifier",
1259
+ "ds6w:modified",
1260
+ "ds6w:created",
1261
+ "ds6wg:revision",
1262
+ "ds6w:status",
1263
+ "ds6w:responsible",
1264
+ "owner",
1265
+ "ds6w:responsibleUid",
1266
+ "ds6wg:filesize",
1267
+ "ds6w:project",
1268
+ "ds6w:dataSource",
1269
+ "ds6w:community",
1270
+ "ds6w:originator",
1271
+ "dsgeo:referential",
1272
+ "ds6w:lastModifiedBy",
1273
+ "ds6w:repository",
1274
+ "dcterms:title",
1275
+ "dcterms:description",
1276
+ "ds6w:containerUid"
1277
+ ],
1278
+ with_synthesis_hierarchical: !0,
1279
+ select_file: ["icon", "thumbnail_2d"],
1280
+ query: o,
1281
+ specific_source_parameter: {
1282
+ "3dspace": {
1283
+ 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)'
1284
+ },
1285
+ drive: {
1286
+ additional_query: ' AND NOT ([flattenedtaxonomies]:"types/DriveNode" AND ( [current]:"Trashed" OR [policy]:"Drive File Iteration") )'
1287
+ }
1288
+ },
1289
+ select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
1290
+ order_by: z.order_by,
1291
+ order_field: "relevance",
1292
+ select_snippets: [
1293
+ "ds6w:snippet",
1294
+ "ds6w:label:snippet",
1295
+ "ds6w:responsible:snippet",
1296
+ "ds6w:community:snippet",
1297
+ "swym:message_text:snippet"
1298
+ ],
1299
+ nresults: 40,
1300
+ start: "0",
1301
+ source: H,
1302
+ tenant: e.tenant,
1303
+ login: {
1304
+ "3dspace": {
1305
+ SecurityContext: e.ctx
1306
+ }
1307
+ }
1308
+ };
1309
+ console.log("dataPattern => ", d), m(r, {
1310
+ method: "POST",
1311
+ headers: a,
1312
+ data: JSON.stringify(d),
1313
+ onComplete(l) {
1314
+ const p = JSON.parse(l);
1315
+ s(p);
1316
+ },
1317
+ onFailure(l, p) {
1318
+ const u = l;
1319
+ 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);
1320
+ }
1321
+ });
1322
+ }
1323
+ function Ee(e, t, s = void 0, n = void 0) {
1324
+ const { objId: o, pred: c, tag: r } = t, a = {
1325
+ uri: "/resources/6w/tags",
1326
+ otpCTX: "SecurityContext=preferred",
1327
+ optTenant: `tenant=${e.tenant}`
1328
+ }, i = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1329
+ tag: [
1330
+ {
1331
+ subject: [
1332
+ {
1333
+ uri: `pid://${o}`
1334
+ }
1335
+ ],
1336
+ predicate: x[c],
1337
+ object: {
1338
+ literal: r
1339
+ }
1340
+ }
1341
+ ]
1342
+ };
1343
+ m(i, {
1344
+ method: "DELETE",
1345
+ data: JSON.stringify(d),
1346
+ headers: {
1347
+ "Content-Type": "application/json",
1348
+ Accept: "application/json,text/javascript,*/*"
1349
+ },
1350
+ onComplete(l) {
1351
+ s && s(l);
1352
+ },
1353
+ onFailure(l, p) {
1354
+ const u = l;
1355
+ u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
1356
+ }
1357
+ });
1358
+ }
1359
+ function Je(e, t = "", s = void 0, n = void 0) {
1360
+ const { space: o } = e;
1361
+ if (t === "")
1362
+ return;
1363
+ const c = {
1364
+ uri: "/resources/v1/modeler/documents"
1365
+ }, r = {
1366
+ "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1367
+ Accept: "application/json,text/javascript,*/*"
1368
+ }, a = `${o}${c.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}`;
1369
+ m(a, {
1370
+ method: "POST",
1371
+ headers: r,
1372
+ data: i,
1373
+ onComplete(d) {
1374
+ s && s(JSON.parse(d));
1375
+ },
1376
+ onFailure(d, l) {
1377
+ const p = d;
1378
+ p.msg = l.error, n && n(p);
1379
+ }
1380
+ });
1381
+ }
1382
+ async function w(e, t = void 0, s = void 0) {
1383
+ const n = e.space + "/api/index/tk";
1384
+ return m(n, {
1385
+ onComplete(o, c, r) {
1386
+ const a = JSON.parse(o);
1387
+ if (t)
1388
+ return t(a), e.token = a?.result?.ServerToken;
1389
+ },
1390
+ onFailure(o) {
1391
+ s && s(o);
1392
+ }
1393
+ });
1394
+ }
1395
+ function Ge(e, t = void 0, s = void 0) {
1396
+ const n = `${e.space}/api/exalead/whatsnew`, o = {
1397
+ params: {
1398
+ community_id: null,
1399
+ hash_key: null,
1400
+ legacyFormat: !1,
1401
+ nresults: 1,
1402
+ query: "#all",
1403
+ start: 0
1404
+ }
1405
+ };
1406
+ w(e, (c) => {
1407
+ m(n, {
1408
+ method: "POST",
1409
+ headers: {
1410
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1411
+ "Content-type": "application/json;charset=UTF-8",
1412
+ Accept: "application/json"
1413
+ },
1414
+ data: JSON.stringify(o),
1415
+ type: "json",
1416
+ onComplete(r, a) {
1417
+ t && t(r, a);
1418
+ },
1419
+ onFailure(r, a) {
1420
+ s && s(r, a);
1421
+ }
1422
+ });
1423
+ });
1424
+ }
1425
+ function Ke(e, t = void 0, s = void 0) {
1426
+ const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1427
+ params: {
1428
+ idsToFilterArr: [],
1429
+ mode: "offline",
1430
+ limit: 30,
1431
+ itemType: "User",
1432
+ maxNbOfCommonElements: "5"
1433
+ }
1434
+ };
1435
+ w(e, (c) => {
1436
+ m(n, {
1437
+ method: "POST",
1438
+ headers: {
1439
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1440
+ "Content-type": "application/json;charset=UTF-8",
1441
+ Accept: "application/json"
1442
+ },
1443
+ data: JSON.stringify(o),
1444
+ type: "json",
1445
+ onComplete(r, a) {
1446
+ const i = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1447
+ t && t(i, r);
1448
+ },
1449
+ onFailure(r, a) {
1450
+ s && s(r, a);
1451
+ }
1452
+ });
1453
+ });
1454
+ }
1455
+ function We(e, t = void 0, s = void 0) {
1456
+ const n = {
1457
+ base: e.space,
1458
+ uri: "/api/community/listmycommunities",
1459
+ limit: `/limit/${e.limit ? e.limit : 128}`,
1460
+ page: `/page/${e.page ? e.page : "1"}`
1461
+ }, o = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
1462
+ w(e, (r) => {
1463
+ m(o, {
1464
+ method: "GET",
1465
+ headers: {
1466
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1467
+ },
1468
+ onComplete(a, i, d) {
1469
+ const p = JSON.parse(a).result;
1470
+ let u = 0;
1471
+ p.forEach((f) => {
1472
+ const g = {
1473
+ description: f.description,
1474
+ id: f.id,
1475
+ title: f.title,
1476
+ owner: f.owner,
1477
+ role: f.role,
1478
+ access: f.access
1479
+ };
1480
+ Q(
1481
+ e,
1482
+ f.id,
1483
+ (h) => {
1484
+ u++, g.members = h, c.push(g), u === p.length && t && t(c);
1485
+ },
1486
+ (h) => s(h)
1487
+ );
1488
+ });
1489
+ },
1490
+ onFailure(a, i) {
1491
+ const d = a;
1492
+ d.status = i.status, d.response = i.errormsg, s && s(d);
1493
+ }
1494
+ });
1495
+ });
1496
+ }
1497
+ function Q(e, t, s, n) {
1498
+ const o = `${e.space}/api/community/listmembers`, c = {
1499
+ params: {
1500
+ page: e.page ? e.page : 1,
1501
+ limit: e.limit ? e.limit : 50,
1502
+ community_id: t
1503
+ }
1504
+ };
1505
+ w(e, (r) => {
1506
+ m(o, {
1507
+ method: "POST",
1508
+ headers: {
1509
+ "Content-type": "application/json;charset=UTF-8",
1510
+ Accept: "application/json",
1511
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1512
+ },
1513
+ data: JSON.stringify(c),
1514
+ type: "json",
1515
+ onComplete(a, i, d) {
1516
+ s && s(a);
1517
+ },
1518
+ onFailure(a, i) {
1519
+ const d = a;
1520
+ d.status = i.status, d.response = i.errormsg, n && n(d);
1521
+ }
1522
+ });
1523
+ });
1524
+ }
1525
+ function Xe(e, t = void 0, s = void 0) {
1526
+ const n = "YXdA5x4DSUKtlAi2wmnyTA";
1527
+ e.commu_id || (e.commu_id = n);
1528
+ const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1529
+ w(e, (c) => {
1530
+ m(o, {
1531
+ method: "GET",
1532
+ headers: {
1533
+ "Content-type": "application/json;charset=UTF-8",
1534
+ Accept: "application/json",
1535
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1536
+ },
1537
+ onComplete(r) {
1538
+ const a = JSON.parse(r);
1539
+ t && t(a);
1540
+ },
1541
+ onFailure(r, a) {
1542
+ const i = r;
1543
+ i.status = a.status, i.response = a.errormsg, s && s(i);
1544
+ }
1545
+ });
1546
+ });
1547
+ }
1548
+ function Ve(e, t, s = void 0, n = void 0) {
1549
+ const { listAllContacts: o, currentUser: c } = e;
1550
+ console.log("__listAllContacts", o.hits);
1551
+ const r = `${e.space}/api/directmessages`, a = {
1552
+ users: [c.login].concat(t.receipt)
1553
+ }, i = {
1554
+ id_msg: "",
1555
+ senderId: e.currentUser.login,
1556
+ senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
1557
+ msg: ee(t.msg)
1558
+ };
1559
+ let d = !1;
1560
+ Z(
1561
+ a.users,
1562
+ (l) => {
1563
+ l !== void 0 && (i.id_msg = l.id, d = !0, $(e, i));
1564
+ },
1565
+ (l) => {
1566
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), i.id_msg = "";
1567
+ }
1568
+ ), d === !1 && setTimeout(() => {
1569
+ d === !1 && w(e, (l) => {
1570
+ m(r, {
1571
+ method: "POST",
1572
+ headers: {
1573
+ "Content-Type": "application/json",
1574
+ Accept: "application/json",
1575
+ "X-DS-SWYM-CSRFTOKEN": l.result.ServerToken
1576
+ },
1577
+ data: JSON.stringify(a),
1578
+ type: "json",
1579
+ onComplete(p, u, f) {
1580
+ const g = p;
1581
+ g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), i.id_msg = g.result.id, $(e, i);
1582
+ },
1583
+ onFailure(p, u, f) {
1584
+ const g = p;
1585
+ g.msg = u.errormsg, g.status = u.status, n && n(g);
1586
+ }
1587
+ });
1588
+ });
1589
+ }, 500);
1590
+ }
1591
+ function Z(e, t, s, n) {
1592
+ const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1593
+ w(e, (c) => {
1594
+ m(o, {
1595
+ method: "GET",
1596
+ headers: {
1597
+ Accept: "application/json,text/javascript,*/*",
1598
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1599
+ },
1600
+ onComplete(r) {
1601
+ const a = JSON.parse(r), i = [];
1602
+ a.result.forEach((p) => {
1603
+ p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && i.push(p);
1604
+ });
1605
+ const d = t.sort(), l = i.find((p) => {
1606
+ const u = [];
1607
+ return p.users.forEach((f) => {
1608
+ u.push(f.login);
1609
+ }), JSON.stringify(u) === JSON.stringify(d);
1610
+ });
1611
+ s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
1612
+ },
1613
+ onFailure(r) {
1614
+ const a = r;
1615
+ a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
1616
+ }
1617
+ });
1618
+ });
1619
+ }
1620
+ function $(e, t, s = void 0, n = void 0) {
1621
+ const o = {
1622
+ base: e.space,
1623
+ uri: "/api/community",
1624
+ id_msg: `${t.id_msg}`,
1625
+ endUri: "/instantmessages"
1626
+ }, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, r = {
1627
+ author: { login: t.senderId, displayName: t.senderName },
1628
+ accessState: null,
1629
+ commentUri: null,
1630
+ comments: null,
1631
+ endorsements: null,
1632
+ moderationState: null,
1633
+ parentCommentUri: null,
1634
+ richMessage: t.msg
1635
+ };
1636
+ console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1637
+ m(c, {
1638
+ method: "POST",
1639
+ headers: {
1640
+ "Content-Type": "application/json",
1641
+ Accept: "application/json",
1642
+ "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1643
+ },
1644
+ data: JSON.stringify(r),
1645
+ type: "json",
1646
+ onComplete(i, d, l) {
1647
+ const p = i;
1648
+ p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1649
+ },
1650
+ onFailure(i, d) {
1651
+ const l = i;
1652
+ l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1653
+ }
1654
+ });
1655
+ });
1656
+ }
1657
+ function ee(e) {
1658
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1659
+ return `<p>${e} </p>
1660
+ <br/>
1661
+ <hr/>
1662
+ <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
1663
+ }
1664
+ const te = {
1665
+ title: "TEST DEV COMMUNITY IDEA",
1666
+ // titre du post
1667
+ community_id: "YXdA5x4DSUKtlAi2wmnyTA",
1668
+ // STATUT PROJETS - Phase commerciale, tenant PIVETEAU TEST
1669
+ community_title: "TEST DEV COMMUNITY",
1670
+ // Possibilité de recherche par titre de la communauté (option)
1671
+ idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1672
+ // id de l'idee qui est créer au post (_3dSwym_postIdea)
1673
+ };
1674
+ function Be(e, t, s = void 0, n = void 0) {
1675
+ const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1676
+ (i) => i.id === t.community_id
1677
+ ), r = e.swymCommunities.find(
1678
+ (i) => i.title.toLowerCase() === t.community_title.toLowerCase()
1679
+ ), a = {
1680
+ params: {
1681
+ title: t.title,
1682
+ // String, le nom de l'affaire
1683
+ community_id: c?.id !== void 0 ? c.id : r.id,
1684
+ // String, l'id de la communauté
1685
+ message: ne(t.text_html),
1686
+ // STRING => le contenue du message doit être au format HTML
1687
+ published: 1
1688
+ // 1 publier, 0 non publier
1689
+ }
1690
+ };
1691
+ w(e, (i) => {
1692
+ const d = {
1693
+ "Content-type": "application/json;charset=UTF-8",
1694
+ Accept: "application/json",
1695
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1696
+ };
1697
+ m(o, {
1698
+ method: "POST",
1699
+ headers: d,
1700
+ data: JSON.stringify(a),
1701
+ type: "json",
1702
+ onComplete(l, p, u) {
1703
+ const f = JSON.parse(l);
1704
+ f.status = u.status, f.response = u.response, s && s(f);
1705
+ },
1706
+ onFailure(l, p, u) {
1707
+ const f = l;
1708
+ f.status = p.status, f.response = p.errormsg, n && n(f);
1709
+ }
1710
+ });
1711
+ });
1712
+ }
1713
+ function Ye(e, t, s = void 0, n = void 0) {
1714
+ const o = `${e.space}/api/idea/delete`, c = {
1715
+ params: {
1716
+ community_id: t.community_id,
1717
+ ideationIds: [t.idee_id]
1718
+ }
1719
+ };
1720
+ w(e, (r) => {
1721
+ m(o, {
1722
+ method: "POST",
1723
+ headers: {
1724
+ "Content-type": "application/json;charset=UTF-8",
1725
+ Accept: "application/json",
1726
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1727
+ },
1728
+ data: JSON.stringify(c),
1729
+ type: "json",
1730
+ onComplete(a, i, d) {
1731
+ s && s(a);
1732
+ },
1733
+ onFailure(a, i, d) {
1734
+ const l = a;
1735
+ l.status = i.status, l.response = i.errormsg, n && n(l);
1736
+ }
1737
+ });
1738
+ });
1739
+ }
1740
+ function He(e, t = "", s = void 0, n = void 0) {
1741
+ const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1742
+ t === "" && (t = o);
1743
+ const c = `${e.space}/api/idea/get`, r = {
1744
+ params: {
1745
+ id: t
1746
+ }
1747
+ };
1748
+ w(e, (a) => {
1749
+ m(c, {
1750
+ method: "POST",
1751
+ headers: {
1752
+ "Content-type": "application/json;charset=UTF-8",
1753
+ Accept: "application/json",
1754
+ "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1755
+ },
1756
+ data: JSON.stringify(r),
1757
+ type: "json",
1758
+ onComplete(i) {
1759
+ const d = i;
1760
+ d.msg = d.result.message, s && s(d);
1761
+ },
1762
+ onFailure(i) {
1763
+ const d = i;
1764
+ d.status = headers.status, d.response = headers.errormsg, n && n(d);
1765
+ }
1766
+ });
1767
+ });
1768
+ }
1769
+ function ze(e, t = te, s = void 0, n = void 0) {
1770
+ const o = {
1771
+ uri: "/api/idea/list",
1772
+ comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1773
+ limit: `/limit/${t.limit ? t.limit : 10}`
1774
+ }, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
1775
+ w(e, (r) => {
1776
+ m(c, {
1777
+ method: "GET",
1778
+ headers: {
1779
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1780
+ },
1781
+ onComplete(a) {
1782
+ const i = JSON.parse(a);
1783
+ s && s(i);
1784
+ },
1785
+ onFailure(a, i) {
1786
+ const d = a;
1787
+ d.status = i.status, d.response = i.errormsg, n && n(d);
1788
+ }
1789
+ });
1790
+ });
1791
+ }
1792
+ function ne(e) {
1793
+ return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
1794
+ <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
1795
+ <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
1796
+ <p><strong>Référence client </strong>: <em>
1797
+ <a data-predicate="ds6w:who" data-type="internal" class="s6m-tag-link s6m-link">CLIENT</a>
1798
+ </em></p>
1799
+ <p><strong>Référence projet </strong>: <em>
1800
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">NOM AFFAIRE</a>
1801
+ <a data-predicate="ds6w:where" data-type="internal" class="s6m-tag-link s6m-link">VILLE</a>
1802
+ <a data-predicate="ds6w:where" data-type="internal" class="s6m-tag-link s6m-link">DPT</a>
1803
+ </em></p>
1804
+ <p>&#x1f4dd; <strong>Base documentaire</strong> : LIEN projet</p>
1805
+ <p>&#x1f4dd; <strong>Fiche COCLICO</strong> : LIEN projet<em><strong></strong>
1806
+ </em></p>
1807
+ <p><br /></p>
1808
+ <table border="1">
1809
+ <tbody>
1810
+ <tr><td><strong>Description projet </strong>:
1811
+ <br /><br /></td></tr>
1812
+ </tbody>
1813
+ </table>
1814
+ <p><br /></p>
1815
+ <p><br /></p>
1816
+ <p><strong>Produit :<em> </em></strong><em>
1817
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Hexapli Usiné</a>
1818
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Hexapli MP</a>
1819
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Lamwood</a>
1820
+ </em></p>
1821
+ <p><strong>Type de Bâtiment :</strong><em>
1822
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Logements</a>
1823
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">BUP</a>
1824
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">ERP</a>
1825
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Plateforme Logistique</a>
1826
+ </em></p>
1827
+ <p><strong>Essence :</strong> <em>
1828
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">DOUGLAS</a>
1829
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">PIN</a>
1830
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">MIXTE</a>
1831
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">EPICEA</a>
1832
+ </em></p>
1833
+ <p><strong>Qualité : </strong><em>
1834
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">NVI</a>
1835
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">VI1F</a>
1836
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">VI2F</a>
1837
+ </em><strong></strong></p>
1838
+ <p><strong>Traitement : </strong><em>
1839
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">PARKA</a>
1840
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">CT2</a>
1841
+ </em></p>
1842
+ <p><strong>Type de Paroi : </strong><em>
1843
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Murs Intérieurs</a>
1844
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Murs Extérieurs</a>
1845
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Planchers</a>
1846
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Couverture</a>
1847
+ </em></p>
1848
+ <p><em>
1849
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Etanchéité Accessible</a>
1850
+ <a data-predicate="ds6w:what" data-type="internal" class="s6m-tag-link s6m-link">Etanchéité Non-Accessible</a>
1851
+ </em></p>
1852
+ <p><strong>Hauteur Dernier Plancher :</strong><em><strong> </strong>
1853
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">Hauteur &lt;8m</a>
1854
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">8m&lt; Hauteur &lt;28m</a>
1855
+ <a data-predicate="ds6w:how" data-type="internal" class="s6m-tag-link s6m-link">28m&lt; Hauteur &lt;50m</a>
1856
+ </em></p>
1857
+ <h2><br /></h2>
1858
+ <h2><u>EQUIPE PIVETEAU :</u></h2>
1859
+ <table border="1">
1860
+ <tbody>
1861
+ <tr><td><strong>Chargé d&#39;Affaires</strong></td><td><br /></td></tr>
1862
+ <tr><td><strong>Service études de prix</strong></td><td><br /></td></tr>
1863
+ </tbody></table>
1864
+ <p>
1865
+ </p>` : e;
1866
+ }
1867
+ function qe(e, t = void 0, s = void 0) {
1868
+ const n = e.space + "/api/user/getcurrent/";
1869
+ w(e, (o) => {
1870
+ m(n, {
1871
+ method: "GET",
1872
+ headers: {
1873
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1874
+ },
1875
+ onComplete(c, r, a) {
1876
+ const i = JSON.parse(c);
1877
+ t && t(i.result);
1878
+ },
1879
+ onFailure(c, r, a) {
1880
+ const i = { erreur: JSON.parse(c), headers: r, xhr: a };
1881
+ s && s(i);
1882
+ }
1883
+ });
1884
+ });
1885
+ }
1886
+ function Qe(e, t, s = void 0, n = void 0) {
1887
+ const o = e.space + "/api/user/find/login/" + t;
1888
+ w(
1889
+ e,
1890
+ (c) => {
1891
+ m(o, {
1892
+ method: "GET",
1893
+ headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1894
+ onComplete(r, a, i) {
1895
+ const d = JSON.parse(r);
1896
+ s && s(d);
1897
+ },
1898
+ onFailure(r) {
1899
+ n && n(r);
1900
+ }
1901
+ });
1902
+ },
1903
+ n
1904
+ );
1905
+ }
1906
+ function Ze(e) {
1907
+ const t = "Hello " + e;
1908
+ return console.log(t), t;
1909
+ }
1910
+ export {
1911
+ I as UUID,
1912
+ ke as _3DSpace_Create_Doc,
1913
+ C as _3DSpace_csrf,
1914
+ R as _3DSpace_download_doc,
1915
+ X as _3DSpace_download_multidoc,
1916
+ K as _3DSpace_file_update,
1917
+ W as _3DSpace_file_update_csr,
1918
+ Ne as _3DSpace_file_url_csr,
1919
+ k as _3DSpace_get_csrf,
1920
+ G as _3DSpace_get_docInfo,
1921
+ V as _3DSpace_get_downloadTicket_multidoc,
1922
+ b as _3DSpace_get_securityContexts,
1923
+ U as _3DSpace_get_ticket,
1924
+ $e as _3DSpace_lifecycle_changeRevision,
1925
+ Fe as _3DSpace_lifecycle_changeState,
1926
+ Ue as _3DSpace_lifecycle_getGraph,
1927
+ je as _3DSpace_lifecycle_getNextRevision,
1928
+ De as _3DSpace_lifecycle_getNextStates,
1929
+ Ve as _3DSwym_buildDirectMessage,
1930
+ Ye as _3DSwym_deleteIdea,
1931
+ Z as _3DSwym_findCommunityToInstantMSG,
1932
+ We as _3DSwym_getAllCommunities,
1933
+ Ge as _3DSwym_getAllNews,
1934
+ Ke as _3DSwym_getFamiliarPeople,
1935
+ Xe as _3DSwym_getIdeaStatusMaturity,
1936
+ Q as _3DSwym_getMembersCommunity,
1937
+ He as _3DSwym_getSWYMIdea,
1938
+ ze as _3DSwym_get_AllSWYMIdeas,
1939
+ qe as _3DSwym_get_currentUser,
1940
+ Qe as _3DSwym_get_findUser,
1941
+ w as _3DSwym_get_version,
1942
+ Be as _3DSwym_postIdea,
1943
+ $ as _3DSwym_sendMessageData,
1944
+ Se as _AppMngt_get_info_user,
1945
+ he as _AppMngt_get_users,
1946
+ me as _getPlateformInfos,
1947
+ fe as _getPlatformServices,
1948
+ m as _httpCallAuthenticated,
1949
+ le as _setDraggable,
1950
+ ue as _setDroppable,
1951
+ pe as _setupTagger,
1952
+ Le as addTagToDoc,
1953
+ ge as compass_getListAdditionalApps,
1954
+ L as couleurs,
1955
+ _e as createUserGroups,
1956
+ B as dataMixing,
1957
+ Te as deleteUserGroups,
1958
+ re as findAdresse,
1959
+ Ae as getAllContextSecurity,
1960
+ J as getCSRFToken,
1961
+ ie as getCommunes,
1962
+ ye as getComplementUG,
1963
+ Ie as getDataFrom3DSpace,
1964
+ ce as getDataFromGouvFr,
1965
+ xe as getDatasByTenant,
1966
+ Me as getDatasFrom3DSpace,
1967
+ Re as getDownloadDocument,
1968
+ Je as getInfoDocTags,
1969
+ we as getUserGroupsList,
1970
+ E as getUsersGroupRules,
1971
+ Pe as get_3DSpace_csrf,
1972
+ Ce as patchUserGroups,
1973
+ Oe as patchUserGroupsControl,
1974
+ ve as pushDataIn3DSpace,
1975
+ be as readUserGroupControl,
1976
+ Ee as removeTagToDoc,
1977
+ Ze as sayHello,
1978
+ de as updateEvent
1979
+ };
1980
+ //# sourceMappingURL=wb3Api.js.map