@edifice.io/client 2.1.1 → 2.1.2-develop.20250226140918

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/index.js CHANGED
@@ -1,18 +1,93 @@
1
- var v = Object.defineProperty;
2
- var T = (o, e, t) => e in o ? v(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var u = (o, e, t) => T(o, typeof e != "symbol" ? e + "" : e, t);
1
+ var D = Object.defineProperty;
2
+ var T = (u, e, t) => e in u ? D(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
3
+ var n = (u, e, t) => T(u, typeof e != "symbol" ? e + "" : e, t);
4
4
  import axios from "axios";
5
5
  import { MimeTypeUtils } from "@edifice.io/utilities";
6
6
  const ERROR_CODE = {
7
+ SUCCESS: "0000",
7
8
  UNKNOWN: "0010",
9
+ NOT_INITIALIZED: "0020",
8
10
  NOT_SUPPORTED: "0030",
9
11
  APP_NOT_FOUND: "0040",
12
+ AGENT_NOT_FOUND: "0050",
13
+ TRANSPORT_ERROR: "0060",
10
14
  TIME_OUT: "0070",
11
15
  MALFORMED_DATA: "0080",
12
16
  NOT_LOGGED_IN: "0090"
13
- }, APP$3 = {
17
+ }, APP$4 = {
18
+ ADMIN: "admin",
19
+ ARCHIVE: "archive",
20
+ AUTH: "auth",
21
+ CAS: "cas",
22
+ COMMUNICATION: "communication",
23
+ CONVERSATION: "conversation",
24
+ DIRECTORY: "directory",
25
+ // FIXME userbook OR directory : the choice may impact some configurations, @see IXitiTrackingParams.NOM_PAGE for example
26
+ USERBOOK: "userbook",
27
+ INFRA: "infra",
28
+ PORTAL: "portal",
14
29
  TIMELINE: "timeline",
15
- VIDEO: "video"
30
+ WORKSPACE: "workspace",
31
+ // -- a few others commonly used apps
32
+ EXPLORER: "explorer",
33
+ HOMEWORKS: "homeworks",
34
+ VIDEO: "video",
35
+ MINDMAP: "mindmap",
36
+ SCRAPBOOK: "scrapbook",
37
+ COLLABORATIVEWALL: "collaborativewall",
38
+ WIKI: "wiki",
39
+ TIMELINEGENERATOR: "timelinegenerator",
40
+ COLLABORATIVEEDITOR: "collaborativeeditor"
41
+ // TODO compléter/trier les apps suivantes
42
+ /*
43
+ "competences"
44
+ "cahier-textes"
45
+ "poll"
46
+ "rack"
47
+ "rbs"
48
+ "searchengine"
49
+ "sharebigfiles"
50
+ "schoolbook"
51
+ "archive"
52
+ "admin"
53
+ "cahier-de-texte"
54
+ "wiki"
55
+ "cns"
56
+ "conversation"
57
+ "paths"
58
+ "parcours"
59
+ "notebook"
60
+ "account"
61
+ "support"
62
+ "workspace"
63
+ "admin-portal"
64
+ "stats"
65
+ "userbook" // FIXME userbook OR directory : the choice may impact some configurations, @see IXitiTrackingParams.NOM_PAGE for example
66
+ "directory" // FIXME Keep in mind that ode-ts-client MUST not access the locationPath of the window !
67
+ "mindmap"
68
+ "timelinegenerator"
69
+ "actualites"
70
+ "pad"
71
+ "collaborativeeditor"
72
+ "settings-class"
73
+ "library"
74
+ "visioconf"
75
+ "Web-conference"
76
+ "notes"
77
+ "attendance"
78
+ "calendar"
79
+ "canal-numerique"
80
+ "collaborative-wall"
81
+ "statistics"
82
+ "polls"
83
+ "community"
84
+ "forum"
85
+ "pages"
86
+ "website"
87
+ "parametrage"
88
+ "kne"
89
+ "sacoche"
90
+ */
16
91
  }, USER_PREFS = {
17
92
  APPS: "apps",
18
93
  WIDGETS: "widgets",
@@ -25,7 +100,7 @@ const ERROR_CODE = {
25
100
  };
26
101
  class Subscription {
27
102
  constructor(e, t) {
28
- u(this, "revoke");
103
+ n(this, "revoke");
29
104
  this._channel = e, this.revoke = this.setReceiver(
30
105
  (s) => t == null ? void 0 : t(s.data)
31
106
  );
@@ -43,7 +118,7 @@ class Subject {
43
118
  * => We maintain here channels for *sending* messages.
44
119
  * *Receiving* channels will be instantiated while subscribing.
45
120
  */
46
- u(this, "publishChannels", /* @__PURE__ */ new Map());
121
+ n(this, "publishChannels", /* @__PURE__ */ new Map());
47
122
  }
48
123
  getChannelName(e) {
49
124
  return "Subject:" + e;
@@ -78,9 +153,9 @@ const ASYNC_DATA_NAME = {
78
153
  class Promisified {
79
154
  constructor() {
80
155
  //-------------------------------------
81
- u(this, "_resolution");
82
- u(this, "_rejection");
83
- u(this, "_promise", new Promise((e, t) => {
156
+ n(this, "_resolution");
157
+ n(this, "_rejection");
158
+ n(this, "_promise", new Promise((e, t) => {
84
159
  this._resolution = e, this._rejection = t;
85
160
  }));
86
161
  }
@@ -97,8 +172,8 @@ class Promisified {
97
172
  class NotifyFramework {
98
173
  constructor() {
99
174
  //-------------------------------------
100
- u(this, "promises", {});
101
- u(this, "subject", new Subject());
175
+ n(this, "promises", {});
176
+ n(this, "subject", new Subject());
102
177
  }
103
178
  asyncData(e) {
104
179
  return typeof this.promises[e] > "u" && (this.promises[e] = new Promisified()), this.promises[e];
@@ -129,8 +204,8 @@ const notify = new NotifyFramework(), loadedScripts$1 = {};
129
204
  class Http {
130
205
  constructor(e) {
131
206
  // Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
132
- u(this, "axios");
133
- u(this, "_latestResponse");
207
+ n(this, "axios");
208
+ n(this, "_latestResponse");
134
209
  this.axios = axios.create(e);
135
210
  }
136
211
  setCdn(e) {
@@ -208,15 +283,15 @@ class Http {
208
283
  }
209
284
  getScript(e, t, s) {
210
285
  const r = s ?? "exports", i = this.toAxiosConfig(t);
211
- return i.headers && (i.headers.Accept = "application/javascript"), this.axios.get(this.toCdnUrl(e), i).then((n) => this.mapAxiosResponse(n, t)).then((n) => {
286
+ return i.headers && (i.headers.Accept = "application/javascript"), this.axios.get(this.toCdnUrl(e), i).then((o) => this.mapAxiosResponse(o, t)).then((o) => {
212
287
  try {
213
- const a = `"use strict";var ${r.split(".")[0]}={};${n};return ${r};`;
288
+ const a = `"use strict";var ${r.split(".")[0]}={};${o};return ${r};`;
214
289
  return Function(a)();
215
290
  } catch {
216
- return n;
291
+ return o;
217
292
  }
218
- }).catch((n) => {
219
- throw this.mapAxiosError(n, t), n;
293
+ }).catch((o) => {
294
+ throw this.mapAxiosError(o, t), o;
220
295
  });
221
296
  }
222
297
  loadScript(e, t) {
@@ -227,7 +302,7 @@ class Http {
227
302
  }
228
303
  class TransportFramework {
229
304
  constructor() {
230
- u(this, "_http", new Http());
305
+ n(this, "_http", new Http());
231
306
  }
232
307
  get http() {
233
308
  return this._http;
@@ -246,11 +321,11 @@ class ConfigurationFrameworkFactory {
246
321
  const http$2 = transport.http;
247
322
  class Session {
248
323
  constructor() {
249
- u(this, "_me", null);
250
- u(this, "_currentLanguage", "");
251
- u(this, "_notLoggedIn", !0);
252
- u(this, "_description");
253
- u(this, "_profile");
324
+ n(this, "_me", null);
325
+ n(this, "_currentLanguage", "");
326
+ n(this, "_notLoggedIn", !0);
327
+ n(this, "_description");
328
+ n(this, "_profile");
254
329
  }
255
330
  get currentLanguage() {
256
331
  return this._currentLanguage;
@@ -295,8 +370,8 @@ class Session {
295
370
  hasRight(e, t) {
296
371
  if (t === "owner")
297
372
  return e.owner && e.owner.userId === this._me.userId;
298
- const s = t.right || t, i = e.shared.filter((a) => (this._me.groupsIds || []).indexOf(a.groupId) !== -1 || a.userId === this._me.userId).find((a) => a[s] || a.manager) !== void 0, n = t.workflow ? this.hasWorkflow(t.workflow) : !0;
299
- return i && n;
373
+ const s = t.right || t, i = e.shared.filter((a) => (this._me.groupsIds || []).indexOf(a.groupId) !== -1 || a.userId === this._me.userId).find((a) => a[s] || a.manager) !== void 0, o = t.workflow ? this.hasWorkflow(t.workflow) : !0;
374
+ return i && o;
300
375
  }
301
376
  ////////////////////////////////////////////////////////// Storage management
302
377
  get latestQuotaAndUsage() {
@@ -368,7 +443,7 @@ class Session {
368
443
  }
369
444
  class SessionFramework {
370
445
  constructor() {
371
- u(this, "session", new Session());
446
+ n(this, "session", new Session());
372
447
  }
373
448
  initialize() {
374
449
  return this.session.initialize();
@@ -392,22 +467,22 @@ class SessionFramework {
392
467
  const session = new SessionFramework();
393
468
  class Theme {
394
469
  constructor() {
395
- u(this, "_conf");
396
- u(this, "_loaded");
470
+ n(this, "_conf");
471
+ n(this, "_loaded");
397
472
  // legacy (readonly)
398
- u(this, "skinName", "");
399
- u(this, "themeName", "");
400
- u(this, "skin", "raw");
401
- u(this, "themeUrl", "/assets/themes/raw/default/");
402
- u(this, "templateOverrides", {});
403
- u(this, "portalTemplate", "/assets/themes/raw/portal.html");
404
- u(this, "basePath", "");
405
- u(this, "logoutCallback", "/");
406
- u(this, "skins", []);
407
- u(this, "is1D", !1);
408
- u(this, "is2D", !1);
409
- u(this, "_onSkinReady", notify.onSkinReady());
410
- u(this, "_onOverrideReady", notify.onOverridesReady());
473
+ n(this, "skinName", "");
474
+ n(this, "themeName", "");
475
+ n(this, "skin", "raw");
476
+ n(this, "themeUrl", "/assets/themes/raw/default/");
477
+ n(this, "templateOverrides", {});
478
+ n(this, "portalTemplate", "/assets/themes/raw/portal.html");
479
+ n(this, "basePath", "");
480
+ n(this, "logoutCallback", "/");
481
+ n(this, "skins", []);
482
+ n(this, "is1D", !1);
483
+ n(this, "is2D", !1);
484
+ n(this, "_onSkinReady", notify.onSkinReady());
485
+ n(this, "_onOverrideReady", notify.onOverridesReady());
411
486
  }
412
487
  initialize(e) {
413
488
  return notify.onSessionReady().promise.then(() => this.load(e));
@@ -740,8 +815,8 @@ class Idiom {
740
815
  else {
741
816
  const i = new Promisified();
742
817
  promises$1[t] = i.promise;
743
- const n = {};
744
- e && (n["Accept-Language"] = e), transport.http.get(t, { headers: n }).then((a) => {
818
+ const o = {};
819
+ e && (o["Accept-Language"] = e), transport.http.get(t, { headers: o }).then((a) => {
745
820
  Object.assign(bundle$1, a), typeof s == "function" && s(), i.resolve();
746
821
  }).catch((a) => {
747
822
  typeof s == "function" && s(), i.reject();
@@ -779,7 +854,7 @@ class Idiom {
779
854
  class UserPreferences {
780
855
  constructor() {
781
856
  //-------------------------------------
782
- u(this, "data", {});
857
+ n(this, "data", {});
783
858
  }
784
859
  get(e) {
785
860
  return this.data[e];
@@ -806,10 +881,10 @@ class UserPreferences {
806
881
  class User {
807
882
  constructor() {
808
883
  //-------------------------------------
809
- u(this, "_me", null);
810
- u(this, "_keepOpenOnLogout", !1);
811
- u(this, "_preferences", new UserPreferences());
812
- u(this, "_bookmarkedApps", []);
884
+ n(this, "_me", null);
885
+ n(this, "_keepOpenOnLogout", !1);
886
+ n(this, "_preferences", new UserPreferences());
887
+ n(this, "_bookmarkedApps", []);
813
888
  }
814
889
  get keepOpenOnLogout() {
815
890
  return this._keepOpenOnLogout;
@@ -841,7 +916,7 @@ class User {
841
916
  let s;
842
917
  if (t && t.length && typeof t.concat == "function") {
843
918
  this._bookmarkedApps = t, s = {
844
- bookmarks: t.map((n) => n.name),
919
+ bookmarks: t.map((o) => o.name),
845
920
  applications: []
846
921
  }, transport.http.putJson("/userbook/preference/apps", s);
847
922
  return;
@@ -853,15 +928,15 @@ class User {
853
928
  });
854
929
  let r = !0;
855
930
  const i = [];
856
- s.bookmarks.forEach((n, a) => {
857
- const c = this._me.apps.find((h) => h.name === n);
931
+ s.bookmarks.forEach((o, a) => {
932
+ const c = this._me.apps.find((h) => h.name === o);
858
933
  if (c) {
859
934
  const h = Object.assign({}, c);
860
935
  this._bookmarkedApps.push(h);
861
936
  } else
862
- i.push(n), r = !1;
863
- }), i.forEach((n) => {
864
- const a = s.bookmarks.indexOf(n);
937
+ i.push(o), r = !1;
938
+ }), i.forEach((o) => {
939
+ const a = s.bookmarks.indexOf(o);
865
940
  a !== -1 && s.bookmarks.splice(a, 1);
866
941
  }), r || transport.http.putJson("/userbook/preference/apps", s);
867
942
  });
@@ -883,9 +958,9 @@ const http$1 = transport == null ? void 0 : transport.http;
883
958
  class AppConf {
884
959
  constructor() {
885
960
  //-------------------------------------
886
- u(this, "_publicConf", {});
887
- u(this, "_currentApp");
888
- u(this, "_appConf", {});
961
+ n(this, "_publicConf", {});
962
+ n(this, "_currentApp");
963
+ n(this, "_appConf", {});
889
964
  }
890
965
  /**
891
966
  * Get the currently initialized App.
@@ -923,8 +998,8 @@ class AppConf {
923
998
  class Analytics {
924
999
  constructor() {
925
1000
  //-------------------------------------
926
- u(this, "_status", "void");
927
- u(this, "_params");
1001
+ n(this, "_status", "void");
1002
+ n(this, "_params");
928
1003
  }
929
1004
  get status() {
930
1005
  return this._status;
@@ -976,8 +1051,8 @@ class Analytics {
976
1051
  configure.Platform.apps.currentApp
977
1052
  );
978
1053
  if (!i) return;
979
- const n = i.xiti;
980
- if (!n || !n.LIBELLE_SERVICE || !r.UAI) return;
1054
+ const o = i.xiti;
1055
+ if (!o || !o.LIBELLE_SERVICE || !r.UAI) return;
981
1056
  function a(h) {
982
1057
  let l = "";
983
1058
  for (let E = 0; E < h.length; E++)
@@ -992,10 +1067,10 @@ class Analytics {
992
1067
  Guest: "AUTRE"
993
1068
  };
994
1069
  return {
995
- LIBELLE_SERVICE: n.LIBELLE_SERVICE,
1070
+ LIBELLE_SERVICE: o.LIBELLE_SERVICE,
996
1071
  // Which property of LIBELLE_SERVICE to use depends on the frontend.
997
- TYPE: n.OUTIL ? "TIERS" : "NATIF",
998
- OUTIL: n.OUTIL ? n.OUTIL : "",
1072
+ TYPE: o.OUTIL ? "TIERS" : "NATIF",
1073
+ OUTIL: o.OUTIL ? o.OUTIL : "",
999
1074
  STRUCT_ID: r.collectiviteId,
1000
1075
  STRUCT_UAI: r.UAI,
1001
1076
  PROJET: r.projetId ? r.projetId : e.ID_PROJET,
@@ -1009,7 +1084,7 @@ class Analytics {
1009
1084
  class ConfigurationFramework {
1010
1085
  constructor() {
1011
1086
  //-------------------------------------
1012
- u(this, "Platform", {
1087
+ n(this, "Platform", {
1013
1088
  deploymentTag: "",
1014
1089
  cdnDomain: "",
1015
1090
  apps: new AppConf(),
@@ -1018,15 +1093,15 @@ class ConfigurationFramework {
1018
1093
  idiom: new Idiom(),
1019
1094
  listLanguages: () => transport.http.get("/languages")
1020
1095
  });
1021
- u(this, "School", {
1096
+ n(this, "School", {
1022
1097
  //apps; -> pinnedApps;
1023
1098
  });
1024
- u(this, "User", new User());
1099
+ n(this, "User", new User());
1025
1100
  }
1026
1101
  async initialize(e, t) {
1027
1102
  if (!e) {
1028
- const r = (h) => (h < 10 ? "0" : "") + h.toFixed(0), i = /* @__PURE__ */ new Date(), n = i.getFullYear(), a = i.getMonth() + 1, c = i.getDate();
1029
- e = `${n}${r(a)}${r(c)}`;
1103
+ const r = (h) => (h < 10 ? "0" : "") + h.toFixed(0), i = /* @__PURE__ */ new Date(), o = i.getFullYear(), a = i.getMonth() + 1, c = i.getDate();
1104
+ e = `${o}${r(a)}${r(c)}`;
1030
1105
  }
1031
1106
  const s = e;
1032
1107
  this.Platform.deploymentTag = e, typeof t == "string" && t.length > 0 && (this.Platform.cdnDomain = t), transport.http.setCdn(this.Platform.cdnDomain), await Promise.all([
@@ -1068,8 +1143,8 @@ var _;
1068
1143
  const me = (_ = session == null ? void 0 : session.session) == null ? void 0 : _.user;
1069
1144
  class Notification {
1070
1145
  constructor(e) {
1071
- u(this, "_id");
1072
- u(this, "model");
1146
+ n(this, "_id");
1147
+ n(this, "model");
1073
1148
  e.reported = e.reporters && e.reporters.length > 0, this._id = e._id, this.model = e;
1074
1149
  }
1075
1150
  isUnread() {
@@ -1089,14 +1164,14 @@ class Notification {
1089
1164
  class TimelineApp {
1090
1165
  constructor() {
1091
1166
  //-------------------------------------
1092
- u(this, "_notifications", []);
1093
- u(this, "_notificationTypes", []);
1167
+ n(this, "_notifications", []);
1168
+ n(this, "_notificationTypes", []);
1094
1169
  // ex: ["BLOG"]
1095
- u(this, "_flashMessages", []);
1096
- u(this, "_pageNumber", 0);
1097
- u(this, "_lastPage", !1);
1098
- u(this, "_loading", !1);
1099
- u(this, "showMine", !1);
1170
+ n(this, "_flashMessages", []);
1171
+ n(this, "_pageNumber", 0);
1172
+ n(this, "_lastPage", !1);
1173
+ n(this, "_loading", !1);
1174
+ n(this, "showMine", !1);
1100
1175
  }
1101
1176
  get notifications() {
1102
1177
  return this._notifications;
@@ -1117,20 +1192,20 @@ class TimelineApp {
1117
1192
  return this.preferences.type = this.preferences.type || [], this.preferences.type;
1118
1193
  }
1119
1194
  get preferences() {
1120
- return configure.User.preferences.get(APP$3.TIMELINE);
1195
+ return configure.User.preferences.get(APP$4.TIMELINE);
1121
1196
  }
1122
1197
  get flashMessages() {
1123
1198
  return this._flashMessages;
1124
1199
  }
1125
1200
  savePreferences() {
1126
- return configure.User.saveAppPrefs(APP$3.TIMELINE);
1201
+ return configure.User.saveAppPrefs(APP$4.TIMELINE);
1127
1202
  }
1128
1203
  resetPagination() {
1129
1204
  this._pageNumber = 0, this._lastPage = !1, this._loading = !1;
1130
1205
  }
1131
1206
  initialize() {
1132
1207
  return Promise.all([
1133
- configure.User.loadAppPrefs(APP$3.TIMELINE),
1208
+ configure.User.loadAppPrefs(APP$4.TIMELINE),
1134
1209
  transport.http.get("/timeline/types")
1135
1210
  ]).then((e) => {
1136
1211
  this._notificationTypes = e[1];
@@ -1154,10 +1229,10 @@ class TimelineApp {
1154
1229
  if (this._loading = !1, r.status === "ok")
1155
1230
  if (r.number && r.results) {
1156
1231
  const i = r.results.filter(
1157
- (n) => this._notifications.findIndex(
1158
- (a) => a._id === n._id
1232
+ (o) => this._notifications.findIndex(
1233
+ (a) => a._id === o._id
1159
1234
  ) === -1
1160
- ).map((n) => new Notification(n));
1235
+ ).map((o) => new Notification(o));
1161
1236
  this._notifications = this._notifications.concat(i), this._pageNumber++;
1162
1237
  } else
1163
1238
  this._lastPage = !0;
@@ -1194,10 +1269,12 @@ class NotifyFrameworkFactory {
1194
1269
  }
1195
1270
  const LAYER_NAME = {
1196
1271
  WIDGETS: "widgets",
1272
+ EXPLORER: "explorer",
1197
1273
  TRANSPORT: "transport",
1198
1274
  WEB_DATA: "webDataPipeline"
1199
1275
  }, EVENT_NAME = {
1200
1276
  USERPREF_CHANGED: "userprefChanged",
1277
+ SEARCH_RESULTED: "searchResulted",
1201
1278
  ERROR_OCCURED: "error",
1202
1279
  DATA_TRACKED: "track"
1203
1280
  };
@@ -1243,7 +1320,7 @@ const f = class f {
1243
1320
  //
1244
1321
  // PROTECTED HELPERS
1245
1322
  //
1246
- u(this, "checkHttpResponse", (e) => {
1323
+ n(this, "checkHttpResponse", (e) => {
1247
1324
  if (this.http.latestResponse.status >= 300)
1248
1325
  throw this.http.latestResponse.statusText;
1249
1326
  return e;
@@ -1395,7 +1472,7 @@ const f = class f {
1395
1472
  });
1396
1473
  return t.map((r) => {
1397
1474
  const i = s.resources.find(
1398
- (n) => n.assetId === r
1475
+ (o) => o.assetId === r
1399
1476
  );
1400
1477
  if (i === void 0)
1401
1478
  throw "explorer.assetid.notfound";
@@ -1461,10 +1538,10 @@ const f = class f {
1461
1538
  //
1462
1539
  // STATIC REGISTRY
1463
1540
  //
1464
- u(f, "registry", new ServiceRegistry()), // Expose some useful functions
1465
- u(f, "register", f.registry.register.bind(f.registry)), u(f, "findService", f.registry.findService.bind(f.registry)), u(f, "findMainService", f.registry.findMainService.bind(f.registry)), u(f, "isRegistered", f.registry.isRegistered.bind(f.registry));
1541
+ n(f, "registry", new ServiceRegistry()), // Expose some useful functions
1542
+ n(f, "register", f.registry.register.bind(f.registry)), n(f, "findService", f.registry.findService.bind(f.registry)), n(f, "findMainService", f.registry.findMainService.bind(f.registry)), n(f, "isRegistered", f.registry.isRegistered.bind(f.registry));
1466
1543
  let ResourceService = f;
1467
- const APP$2 = "scrapbook", RESOURCE$2 = "scrapbook";
1544
+ const APP$3 = "scrapbook", RESOURCE$3 = "scrapbook";
1468
1545
  class ScrapbookResourceService extends ResourceService {
1469
1546
  create(e) {
1470
1547
  throw new Error("Method not implemented.");
@@ -1482,10 +1559,10 @@ class ScrapbookResourceService extends ResourceService {
1482
1559
  return this.checkHttpResponse(s), { thumbnail: t, entId: e.entId };
1483
1560
  }
1484
1561
  getResourceType() {
1485
- return RESOURCE$2;
1562
+ return RESOURCE$3;
1486
1563
  }
1487
1564
  getApplication() {
1488
- return APP$2;
1565
+ return APP$3;
1489
1566
  }
1490
1567
  getFormUrl(e) {
1491
1568
  return e ? `/scrapbook?folderid=${e}#/create-scrapbook/` : "/scrapbook#/create-scrapbook/";
@@ -1504,10 +1581,10 @@ class ScrapbookResourceService extends ResourceService {
1504
1581
  }
1505
1582
  }
1506
1583
  ResourceService.register(
1507
- { application: RESOURCE$2, resourceType: RESOURCE$2 },
1508
- (o) => new ScrapbookResourceService(o)
1584
+ { application: RESOURCE$3, resourceType: RESOURCE$3 },
1585
+ (u) => new ScrapbookResourceService(u)
1509
1586
  );
1510
- const APP$1 = "homeworks", RESOURCE$1 = "homeworks";
1587
+ const APP$2 = "homeworks", RESOURCE$2 = "homeworks";
1511
1588
  class HomeworksResourceService extends ResourceService {
1512
1589
  async create(e) {
1513
1590
  const t = await this.getThumbnailPath(e.thumbnail), s = await this.http.post("/homeworks", {
@@ -1530,10 +1607,10 @@ class HomeworksResourceService extends ResourceService {
1530
1607
  return this.checkHttpResponse(s), { thumbnail: t, entId: e.entId };
1531
1608
  }
1532
1609
  getResourceType() {
1533
- return RESOURCE$1;
1610
+ return RESOURCE$2;
1534
1611
  }
1535
1612
  getApplication() {
1536
- return APP$1;
1613
+ return APP$2;
1537
1614
  }
1538
1615
  getFormUrl(e) {
1539
1616
  return e ? `/homeworks?folderid=${e}#/create-homeworks/` : "/homeworks#/create-homeworks/";
@@ -1552,10 +1629,10 @@ class HomeworksResourceService extends ResourceService {
1552
1629
  }
1553
1630
  }
1554
1631
  ResourceService.register(
1555
- { application: RESOURCE$1, resourceType: RESOURCE$1 },
1556
- (o) => new HomeworksResourceService(o)
1632
+ { application: RESOURCE$2, resourceType: RESOURCE$2 },
1633
+ (u) => new HomeworksResourceService(u)
1557
1634
  );
1558
- const APP = "timelinegenerator", RESOURCE = "timelinegenerator";
1635
+ const APP$1 = "timelinegenerator", RESOURCE$1 = "timelinegenerator";
1559
1636
  class TimelineGeneratorResourceService extends ResourceService {
1560
1637
  async create(e) {
1561
1638
  const t = e.thumbnail ? await this.getThumbnailPath(e.thumbnail) : "", s = await this.http.post(
@@ -1585,10 +1662,10 @@ class TimelineGeneratorResourceService extends ResourceService {
1585
1662
  return this.checkHttpResponse(s), { thumbnail: t, entId: e.entId };
1586
1663
  }
1587
1664
  getResourceType() {
1588
- return RESOURCE;
1665
+ return RESOURCE$1;
1589
1666
  }
1590
1667
  getApplication() {
1591
- return APP;
1668
+ return APP$1;
1592
1669
  }
1593
1670
  getFormUrl() {
1594
1671
  throw new Error("Method not implemented.");
@@ -1606,9 +1683,57 @@ class TimelineGeneratorResourceService extends ResourceService {
1606
1683
  throw new Error("Method not implemented.");
1607
1684
  }
1608
1685
  }
1686
+ ResourceService.register(
1687
+ { application: RESOURCE$1, resourceType: RESOURCE$1 },
1688
+ (u) => new TimelineGeneratorResourceService(u)
1689
+ );
1690
+ const APP = "collaborativeeditor", RESOURCE = "collaborativeeditor";
1691
+ class CollaborativeEditorResourceService extends ResourceService {
1692
+ async create(e) {
1693
+ const { name: t, description: s, thumbnail: r, folder: i } = e, o = r ? await this.getThumbnailPath(r) : "", a = await this.http.post("/collaborativeeditor", {
1694
+ name: t,
1695
+ description: s,
1696
+ thumbnail: o,
1697
+ folder: i
1698
+ });
1699
+ return this.checkHttpResponse(a), a;
1700
+ }
1701
+ async update(e) {
1702
+ const { name: t, description: s, thumbnail: r, entId: i } = e, o = await this.getThumbnailPath(r), a = await this.http.put(
1703
+ `/collaborativeeditor/${i}`,
1704
+ {
1705
+ name: t,
1706
+ description: s,
1707
+ thumbnail: o
1708
+ }
1709
+ );
1710
+ return this.checkHttpResponse(a), { thumbnail: o, entId: i };
1711
+ }
1712
+ getResourceType() {
1713
+ return RESOURCE;
1714
+ }
1715
+ getApplication() {
1716
+ return APP;
1717
+ }
1718
+ getFormUrl() {
1719
+ throw new Error("Method not implemented.");
1720
+ }
1721
+ getViewUrl(e) {
1722
+ return `/collaborativeeditor#/view/${e}`;
1723
+ }
1724
+ getPrintUrl() {
1725
+ throw new Error("Method not implemented.");
1726
+ }
1727
+ getEditUrl() {
1728
+ throw new Error("Method not implemented.");
1729
+ }
1730
+ getExportUrl() {
1731
+ throw new Error("Method not implemented.");
1732
+ }
1733
+ }
1609
1734
  ResourceService.register(
1610
1735
  { application: RESOURCE, resourceType: RESOURCE },
1611
- (o) => new TimelineGeneratorResourceService(o)
1736
+ (u) => new CollaborativeEditorResourceService(u)
1612
1737
  );
1613
1738
  const globalCache = {}, mutexPromise = {};
1614
1739
  class CacheService {
@@ -1677,14 +1802,14 @@ class ConfService {
1677
1802
  ]), [r, i] = await Promise.all([
1678
1803
  this.getTheme({ conf: t, publicTheme: s === void 0 }),
1679
1804
  this.getWebAppConf({ app: e, applications: s ?? [] })
1680
- ]), n = {
1805
+ ]), o = {
1681
1806
  app: e,
1682
1807
  applications: s ?? [],
1683
1808
  conf: t,
1684
1809
  currentApp: i,
1685
1810
  theme: r
1686
1811
  };
1687
- return this.notify.onAppConfReady().resolve(n), n;
1812
+ return this.notify.onAppConfReady().resolve(o), o;
1688
1813
  }
1689
1814
  async getPublicConf(e) {
1690
1815
  const { response: t, value: s } = await this.cache.httpGet(
@@ -1736,23 +1861,23 @@ class ConfService {
1736
1861
  conf: t,
1737
1862
  publicTheme: s
1738
1863
  }) {
1739
- const r = await this.http.get("/theme"), i = s ? null : r, n = t == null ? void 0 : t.overriding.find(
1864
+ const r = await this.http.get("/theme"), i = s ? null : r, o = t == null ? void 0 : t.overriding.find(
1740
1865
  (p) => (
1741
1866
  // Public access => simply use the 1st override
1742
1867
  i === null || p.child === i.themeName
1743
1868
  )
1744
- ), a = (i == null ? void 0 : i.skinName) || n.skins[0], c = (i == null ? void 0 : i.skin) || `/assets/themes/${n.child}/skins/${a}/`, h = n.skins, l = n.bootstrapVersion.split("-").slice(-1)[0], E = n.parent === "panda";
1869
+ ), a = (i == null ? void 0 : i.skinName) || o.skins[0], c = (i == null ? void 0 : i.skin) || `/assets/themes/${o.child}/skins/${a}/`, h = o.skins, l = o.bootstrapVersion.split("-").slice(-1)[0], E = o.parent === "panda";
1745
1870
  return {
1746
1871
  basePath: `${this.cdnDomain}${c}../../`,
1747
1872
  bootstrapVersion: l,
1748
1873
  is1d: E,
1749
1874
  logoutCallback: (i == null ? void 0 : i.logoutCallback) || "/",
1750
- skin: n.child,
1875
+ skin: o.child,
1751
1876
  skinName: a,
1752
1877
  skins: h,
1753
- themeName: n.child,
1878
+ themeName: o.child,
1754
1879
  themeUrl: c,
1755
- npmTheme: n.npmTheme ?? void 0
1880
+ npmTheme: o.npmTheme ?? void 0
1756
1881
  };
1757
1882
  }
1758
1883
  async getLogoutCallback(e) {
@@ -1797,13 +1922,13 @@ class DirectoryService {
1797
1922
  return {
1798
1923
  id: s,
1799
1924
  displayName: r,
1800
- groups: t.map(({ name: n, id: a }) => ({
1801
- displayName: n,
1925
+ groups: t.map(({ name: o, id: a }) => ({
1926
+ displayName: o,
1802
1927
  id: a
1803
1928
  })),
1804
- users: i.map(({ displayName: n, id: a, profile: c }) => ({
1929
+ users: i.map(({ displayName: o, id: a, profile: c }) => ({
1805
1930
  profile: c,
1806
- displayName: n,
1931
+ displayName: o,
1807
1932
  // these info are missing from api
1808
1933
  firstName: "",
1809
1934
  lastName: "",
@@ -1818,19 +1943,19 @@ class DirectoryService {
1818
1943
  users: r
1819
1944
  }) {
1820
1945
  this.cache.clearCache("/directory/sharebookmark/all");
1821
- const i = r.map((p) => typeof p == "string" ? p : p.id), n = s.map((p) => typeof p == "string" ? p : p.id), a = t.map(async (p) => {
1946
+ const i = r.map((p) => typeof p == "string" ? p : p.id), o = s.map((p) => typeof p == "string" ? p : p.id), a = t.map(async (p) => {
1822
1947
  if (typeof p == "string") {
1823
- const { displayName: d, groups: g, id: A, users: m } = await this.getBookMarkById(p), b = m.map((F) => F.id), R = g.map((F) => F.id);
1948
+ const { displayName: d, groups: g, id: A, users: m } = await this.getBookMarkById(p), b = m.map((F) => F.id), C = g.map((F) => F.id);
1824
1949
  return {
1825
1950
  displayName: d,
1826
1951
  id: A,
1827
- members: [...R, ...b]
1952
+ members: [...C, ...b]
1828
1953
  };
1829
1954
  } else
1830
1955
  return Promise.resolve(p);
1831
1956
  }), h = (await Promise.all(a)).map((p) => p.members).reduce((p, d) => [...p, ...d], []), l = {
1832
1957
  name: e,
1833
- members: [...i, ...n, ...h]
1958
+ members: [...i, ...o, ...h]
1834
1959
  }, { id: E } = await this.http.postJson(
1835
1960
  "/directory/sharebookmark",
1836
1961
  l
@@ -1846,10 +1971,10 @@ const loadedScripts = {};
1846
1971
  class HttpService {
1847
1972
  constructor(e, t) {
1848
1973
  // Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
1849
- u(this, "axios");
1850
- u(this, "baseUrl");
1851
- u(this, "headers", {});
1852
- u(this, "_latestResponse");
1974
+ n(this, "axios");
1975
+ n(this, "baseUrl");
1976
+ n(this, "headers", {});
1977
+ n(this, "_latestResponse");
1853
1978
  this.context = e, this.axios = axios.create(t);
1854
1979
  }
1855
1980
  fixBaseUrl(e) {
@@ -1894,15 +2019,15 @@ class HttpService {
1894
2019
  status: 500,
1895
2020
  statusText: ERROR_CODE.UNKNOWN
1896
2021
  };
1897
- const { status: s, statusText: r, headers: i, data: n } = this._latestResponse;
2022
+ const { status: s, statusText: r, headers: i, data: o } = this._latestResponse;
1898
2023
  return t != null && t.disableNotifications || notify.events().publish(LAYER_NAME.TRANSPORT, {
1899
2024
  name: EVENT_NAME.ERROR_OCCURED,
1900
2025
  data: {
1901
2026
  params: t,
1902
2027
  response: { status: s, statusText: r, headers: i },
1903
- payload: n
2028
+ payload: o
1904
2029
  }
1905
- }), n;
2030
+ }), o;
1906
2031
  }
1907
2032
  mapAxiosResponse(e, t) {
1908
2033
  return this._latestResponse = e, e.data;
@@ -2025,15 +2150,15 @@ class HttpService {
2025
2150
  }
2026
2151
  getScript(e, t, s) {
2027
2152
  const r = s ?? "exports", i = this.toAxiosConfig(t);
2028
- return i.headers && (i.headers.Accept = "application/javascript"), this.axios.get(this.toCdnUrl(e), i).then((n) => this.mapAxiosResponse(n, t)).then((n) => {
2153
+ return i.headers && (i.headers.Accept = "application/javascript"), this.axios.get(this.toCdnUrl(e), i).then((o) => this.mapAxiosResponse(o, t)).then((o) => {
2029
2154
  try {
2030
- const a = `"use strict";var ${r.split(".")[0]}={};${n};return ${r};`;
2155
+ const a = `"use strict";var ${r.split(".")[0]}={};${o};return ${r};`;
2031
2156
  return Function(a)();
2032
2157
  } catch {
2033
- return n;
2158
+ return o;
2034
2159
  }
2035
- }).catch((n) => {
2036
- throw this.mapAxiosError(n, t), n;
2160
+ }).catch((o) => {
2161
+ throw this.mapAxiosError(o, t), o;
2037
2162
  });
2038
2163
  }
2039
2164
  loadScript(e, t) {
@@ -2093,13 +2218,13 @@ class RightService {
2093
2218
  * @returns true if has rights
2094
2219
  */
2095
2220
  hasResourceRight({ id: e, groupIds: t }, s, r) {
2096
- const i = r.map((n) => typeof n == "string" ? this.parseResourceRight(n) : n).filter((n) => n !== void 0);
2097
- for (const n of i) {
2098
- if (n.id === e && n.type === "creator")
2221
+ const i = r.map((o) => typeof o == "string" ? this.parseResourceRight(o) : o).filter((o) => o !== void 0);
2222
+ for (const o of i) {
2223
+ if (o.id === e && o.type === "creator")
2099
2224
  return !0;
2100
- if (n.id === e && n.type === "user" && n.right === s)
2225
+ if (o.id === e && o.type === "user" && o.right === s)
2101
2226
  return !0;
2102
- if (t.includes(n.id) && n.type === "group" && n.right === s)
2227
+ if (t.includes(o.id) && o.type === "group" && o.right === s)
2103
2228
  return !0;
2104
2229
  }
2105
2230
  return !1;
@@ -2236,7 +2361,7 @@ class SessionService {
2236
2361
  s,
2237
2362
  r,
2238
2363
  i,
2239
- n
2364
+ o
2240
2365
  ] = await Promise.all([
2241
2366
  this.getCurrentLanguage(e),
2242
2367
  this.latestQuotaAndUsage(e),
@@ -2250,7 +2375,7 @@ class SessionService {
2250
2375
  currentLanguage: t,
2251
2376
  userDescription: r,
2252
2377
  userProfile: i,
2253
- bookmarkedApps: n
2378
+ bookmarkedApps: o
2254
2379
  };
2255
2380
  }
2256
2381
  login(e, t, s, r) {
@@ -2344,9 +2469,9 @@ class SessionService {
2344
2469
  applications: []
2345
2470
  });
2346
2471
  const i = [];
2347
- return r.bookmarks.forEach((n, a) => {
2472
+ return r.bookmarks.forEach((o, a) => {
2348
2473
  const c = ((e == null ? void 0 : e.apps) || []).find(
2349
- (h) => h.name === n
2474
+ (h) => h.name === o
2350
2475
  );
2351
2476
  if (c) {
2352
2477
  const h = Object.assign({}, c);
@@ -2356,8 +2481,8 @@ class SessionService {
2356
2481
  }
2357
2482
  async getUserProfile(e = {}) {
2358
2483
  var c, h;
2359
- const { options: t = {}, params: s = {} } = e, r = new URLSearchParams(s).toString(), i = `/userbook/api/person${r ? `?${r}` : ""}`, { response: n, value: a } = await this.cache.httpGet(i, t);
2360
- return n.status < 200 || n.status >= 300 || typeof a == "string" ? ["Guest"] : ((h = (c = a == null ? void 0 : a.result) == null ? void 0 : c[0]) == null ? void 0 : h.type) || ["Guest"];
2484
+ const { options: t = {}, params: s = {} } = e, r = new URLSearchParams(s).toString(), i = `/userbook/api/person${r ? `?${r}` : ""}`, { response: o, value: a } = await this.cache.httpGet(i, t);
2485
+ return o.status < 200 || o.status >= 300 || typeof a == "string" ? ["Guest"] : ((h = (c = a == null ? void 0 : a.result) == null ? void 0 : c[0]) == null ? void 0 : h.type) || ["Guest"];
2361
2486
  }
2362
2487
  async isAdml() {
2363
2488
  const e = await this.getUser();
@@ -2621,8 +2746,8 @@ class IdiomService {
2621
2746
  else {
2622
2747
  const i = new Promisified();
2623
2748
  promises[t] = i.promise;
2624
- const n = {};
2625
- e && (n["Accept-Language"] = e), this.http.get(t, { headers: n }).then((a) => {
2749
+ const o = {};
2750
+ e && (o["Accept-Language"] = e), this.http.get(t, { headers: o }).then((a) => {
2626
2751
  Object.assign(bundle, a), typeof s == "function" && s(), i.resolve();
2627
2752
  }).catch((a) => {
2628
2753
  typeof s == "function" && s(), i.reject();
@@ -2686,7 +2811,7 @@ class ShareService {
2686
2811
  async searchShareSubjects(e, t, s) {
2687
2812
  const r = StringUtils.removeAccents(s).toLowerCase(), i = await this.cache.httpGetJson(
2688
2813
  `/${e}/share/json/${t}?search=${s}`
2689
- ), n = i.users.visibles.filter(({ username: l, firstName: E, lastName: p, login: d }) => {
2814
+ ), o = i.users.visibles.filter(({ username: l, firstName: E, lastName: p, login: d }) => {
2690
2815
  const g = StringUtils.removeAccents(
2691
2816
  p || ""
2692
2817
  ).toLowerCase(), A = StringUtils.removeAccents(
@@ -2719,7 +2844,7 @@ class ShareService {
2719
2844
  displayName: l.displayName,
2720
2845
  id: l.id,
2721
2846
  type: "sharebookmark"
2722
- })), ...n, ...a];
2847
+ })), ...o, ...a];
2723
2848
  }
2724
2849
  async getShareMapping(e) {
2725
2850
  const t = await this.cache.httpGetJson(
@@ -2733,15 +2858,15 @@ class ShareService {
2733
2858
  return t;
2734
2859
  }
2735
2860
  getActionsAvailableFor({ id: e, type: t }, s, r) {
2736
- const n = (t === "user" ? s.users.checked[e] : s.groups.checked[e]) || [], a = Object.keys(r), c = [];
2861
+ const o = (t === "user" ? s.users.checked[e] : s.groups.checked[e]) || [], a = Object.keys(r), c = [];
2737
2862
  for (const h of a)
2738
2863
  r[h].filter(
2739
- (p) => n.includes(p)
2864
+ (p) => o.includes(p)
2740
2865
  ).length > 0 && c.push(h);
2741
2866
  return c;
2742
2867
  }
2743
2868
  async getRightsForResource(e, t) {
2744
- const s = await this.directory.getBookMarks(), r = `/${e}/share/json/${t}?search=`, i = await this.cache.httpGetJson(r), n = await this.getShareMapping(e), a = await this.cache.httpGetJson(
2869
+ const s = await this.directory.getBookMarks(), r = `/${e}/share/json/${t}?search=`, i = await this.cache.httpGetJson(r), o = await this.getShareMapping(e), a = await this.cache.httpGetJson(
2745
2870
  "/infra/public/json/sharing-rights.json"
2746
2871
  ), c = Object.keys(i.users.checked).map((d) => i.users.visibles.find(
2747
2872
  (A) => A.id === d
@@ -2749,7 +2874,7 @@ class ShareService {
2749
2874
  const g = this.getActionsAvailableFor(
2750
2875
  { id: d.id, type: "user" },
2751
2876
  i,
2752
- n
2877
+ o
2753
2878
  );
2754
2879
  return {
2755
2880
  id: d.id,
@@ -2773,7 +2898,7 @@ class ShareService {
2773
2898
  const g = this.getActionsAvailableFor(
2774
2899
  { id: d.id, type: "group" },
2775
2900
  i,
2776
- n
2901
+ o
2777
2902
  );
2778
2903
  return {
2779
2904
  id: d.id,
@@ -2797,11 +2922,11 @@ class ShareService {
2797
2922
  id: g
2798
2923
  })
2799
2924
  ), p = i.users.visibles.map(
2800
- ({ id: d, profile: g, username: A, firstName: m, lastName: b, login: R }) => ({
2925
+ ({ id: d, profile: g, username: A, firstName: m, lastName: b, login: C }) => ({
2801
2926
  displayName: A,
2802
2927
  firstName: m,
2803
2928
  lastName: b,
2804
- login: R,
2929
+ login: C,
2805
2930
  profile: g,
2806
2931
  id: d
2807
2932
  })
@@ -2823,66 +2948,66 @@ class ShareService {
2823
2948
  const h = c.actions.map((E) => r[E.id]).reduce((E, p) => Array.isArray(p) ? [...E, ...p] : E, []), l = [...new Set(h)];
2824
2949
  l.length > 0 && (c.type === "user" ? i.users[c.id] = l : c.type === "group" ? i.groups[c.id] = l : i.bookmarks[c.id] = l);
2825
2950
  }
2826
- const n = `/${e}/share/resource/${t}`;
2827
- return this.cache.clearCache(`/${e}/share/json/${t}?search=`), await this.http.putJson(n, i);
2951
+ const o = `/${e}/share/resource/${t}`;
2952
+ return this.cache.clearCache(`/${e}/share/json/${t}?search=`), await this.http.putJson(o, i);
2828
2953
  }
2829
2954
  async getActionsForApp(e) {
2830
2955
  const t = await this.cache.httpGetJson(
2831
2956
  "/infra/public/json/sharing-rights.json"
2832
2957
  ), s = await this.getShareMapping(e);
2833
2958
  return Object.keys(t).map((i) => {
2834
- const n = t[i];
2959
+ const o = t[i];
2835
2960
  return {
2836
2961
  displayName: i,
2837
2962
  id: i,
2838
- priority: n.priority,
2839
- requires: n.requires
2963
+ priority: o.priority,
2964
+ requires: o.requires
2840
2965
  };
2841
2966
  }).filter((i) => {
2842
- var n;
2843
- return ((n = s[i.id]) == null ? void 0 : n.length) > 0;
2844
- }).sort((i, n) => i.priority - n.priority);
2967
+ var o;
2968
+ return ((o = s[i.id]) == null ? void 0 : o.length) > 0;
2969
+ }).sort((i, o) => i.priority - o.priority);
2845
2970
  }
2846
2971
  }
2847
2972
  const defaultMappers = {
2848
- csv: function({ type: o, extension: e }) {
2849
- return MimeTypeUtils.INSTANCE.isCsvLike(o, e);
2973
+ csv: function({ type: u, extension: e }) {
2974
+ return MimeTypeUtils.INSTANCE.isCsvLike(u, e);
2850
2975
  },
2851
- doc: function({ type: o, extension: e }) {
2852
- return MimeTypeUtils.INSTANCE.isWordLike(o, e) ? !0 : o.indexOf("document") !== -1 && o.indexOf("wordprocessing") !== -1;
2976
+ doc: function({ type: u, extension: e }) {
2977
+ return MimeTypeUtils.INSTANCE.isWordLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("wordprocessing") !== -1;
2853
2978
  },
2854
- xls: function({ type: o, extension: e }) {
2855
- return MimeTypeUtils.INSTANCE.isExcelLike(o, e) ? !0 : o.indexOf("document") !== -1 && o.indexOf("spreadsheet") !== -1 || o.indexOf("ms-excel") !== -1;
2979
+ xls: function({ type: u, extension: e }) {
2980
+ return MimeTypeUtils.INSTANCE.isExcelLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("spreadsheet") !== -1 || u.indexOf("ms-excel") !== -1;
2856
2981
  },
2857
- img: function({ type: o }) {
2858
- return o.indexOf("image") !== -1;
2982
+ img: function({ type: u }) {
2983
+ return u.indexOf("image") !== -1;
2859
2984
  },
2860
- pdf: function({ type: o }) {
2861
- return o.indexOf("pdf") !== -1 || o === "application/x-download";
2985
+ pdf: function({ type: u }) {
2986
+ return u.indexOf("pdf") !== -1 || u === "application/x-download";
2862
2987
  },
2863
- ppt: function({ type: o, extension: e }) {
2864
- return MimeTypeUtils.INSTANCE.isPowerpointLike(o, e) ? !0 : o.indexOf("document") !== -1 && o.indexOf("presentation") !== -1 || o.indexOf("powerpoint") !== -1;
2988
+ ppt: function({ type: u, extension: e }) {
2989
+ return MimeTypeUtils.INSTANCE.isPowerpointLike(u, e) ? !0 : u.indexOf("document") !== -1 && u.indexOf("presentation") !== -1 || u.indexOf("powerpoint") !== -1;
2865
2990
  },
2866
- txt: function({ type: o, extension: e }) {
2867
- return MimeTypeUtils.INSTANCE.isTxtLike(o, e);
2991
+ txt: function({ type: u, extension: e }) {
2992
+ return MimeTypeUtils.INSTANCE.isTxtLike(u, e);
2868
2993
  },
2869
- md: function({ type: o, extension: e }) {
2870
- return MimeTypeUtils.INSTANCE.isMdLike(o, e);
2994
+ md: function({ type: u, extension: e }) {
2995
+ return MimeTypeUtils.INSTANCE.isMdLike(u, e);
2871
2996
  },
2872
- video: function({ type: o }) {
2873
- return o.indexOf("video") !== -1;
2997
+ video: function({ type: u }) {
2998
+ return u.indexOf("video") !== -1;
2874
2999
  },
2875
- audio: function({ type: o }) {
2876
- return o.indexOf("audio") !== -1;
3000
+ audio: function({ type: u }) {
3001
+ return u.indexOf("audio") !== -1;
2877
3002
  },
2878
- zip: function({ type: o }) {
2879
- return o.indexOf("zip") !== -1 || o.indexOf("rar") !== -1 || o.indexOf("tar") !== -1 || o.indexOf("7z") !== -1;
3003
+ zip: function({ type: u }) {
3004
+ return u.indexOf("zip") !== -1 || u.indexOf("rar") !== -1 || u.indexOf("tar") !== -1 || u.indexOf("7z") !== -1;
2880
3005
  }
2881
- }, C = class C {
3006
+ }, R = class R {
2882
3007
  /* Similar role notion as in infra-front > workspace > Model.ts */
2883
3008
  static getRole(e) {
2884
3009
  var t, s;
2885
- return C.role(
3010
+ return R.role(
2886
3011
  (t = e.metadata) == null ? void 0 : t["content-type"],
2887
3012
  !1,
2888
3013
  (s = e.metadata) == null ? void 0 : s.extension
@@ -2894,18 +3019,18 @@ const defaultMappers = {
2894
3019
  this.roleMappers || console.warn("[DocumentHelper.role] should not have empty roles", this);
2895
3020
  const r = { type: e, previewRole: t, extension: s };
2896
3021
  for (const i of this.roleMappers) {
2897
- const n = i(r);
2898
- if (n)
2899
- return n;
3022
+ const o = i(r);
3023
+ if (o)
3024
+ return o;
2900
3025
  }
2901
3026
  return "unknown";
2902
3027
  }
2903
3028
  };
2904
3029
  // FIXME add edumedia support
2905
- u(C, "roleMappers", [
3030
+ n(R, "roleMappers", [
2906
3031
  (e) => Object.keys(defaultMappers).find((s) => defaultMappers[s](e))
2907
3032
  ]);
2908
- let DocumentHelper = C;
3033
+ let DocumentHelper = R;
2909
3034
  class WorkspaceService {
2910
3035
  constructor(e) {
2911
3036
  this.context = e;
@@ -2914,22 +3039,22 @@ class WorkspaceService {
2914
3039
  return this.context.http();
2915
3040
  }
2916
3041
  extractMetadata(e) {
2917
- const t = e.name || "", s = t.split("."), r = e.type || "application/octet-stream", i = s.length > 1 ? s[s.length - 1] : "", n = {
3042
+ const t = e.name || "", s = t.split("."), r = e.type || "application/octet-stream", i = s.length > 1 ? s[s.length - 1] : "", o = {
2918
3043
  "content-type": r,
2919
3044
  filename: t,
2920
3045
  size: e.size,
2921
3046
  extension: i,
2922
3047
  role: DocumentHelper.role(r, !1, i)
2923
- }, a = t.replace("." + n.extension, ""), c = n.extension ? a + "." + n.extension : a;
2924
- return { basename: a, fullname: c, metadata: n };
3048
+ }, a = t.replace("." + o.extension, ""), c = o.extension ? a + "." + o.extension : a;
3049
+ return { basename: a, fullname: c, metadata: o };
2925
3050
  }
2926
3051
  async saveFile(e, t) {
2927
3052
  const { fullname: s, metadata: r } = this.extractMetadata(e), i = new FormData();
2928
3053
  i.append("file", e, s);
2929
- const n = [];
2930
- ((t == null ? void 0 : t.visibility) === "public" || (t == null ? void 0 : t.visibility) === "protected") && n.push(`${t.visibility}=true`), t != null && t.application && n.push(`application=${t.application}`), r.role === "img" && n.push("quality=1"), t != null && t.parentId && n.push(`parentId=${t.parentId}`);
3054
+ const o = [];
3055
+ ((t == null ? void 0 : t.visibility) === "public" || (t == null ? void 0 : t.visibility) === "protected") && o.push(`${t.visibility}=true`), t != null && t.application && o.push(`application=${t.application}`), r.role === "img" && o.push("quality=1"), t != null && t.parentId && o.push(`parentId=${t.parentId}`);
2931
3056
  const a = await this.http.postFile(
2932
- `/workspace/document?${n.join("&")}`,
3057
+ `/workspace/document?${o.join("&")}`,
2933
3058
  i
2934
3059
  );
2935
3060
  if (this.http.isResponseError())
@@ -2937,13 +3062,13 @@ class WorkspaceService {
2937
3062
  return a;
2938
3063
  }
2939
3064
  async updateFile(e, t, s) {
2940
- const { fullname: r, metadata: i } = this.extractMetadata(t), n = new FormData();
2941
- n.append("file", t, r);
3065
+ const { fullname: r, metadata: i } = this.extractMetadata(t), o = new FormData();
3066
+ o.append("file", t, r);
2942
3067
  const a = [];
2943
3068
  i.role === "img" && a.push("quality=1"), s != null && s.alt && a.push(`alt=${s.alt}`), s != null && s.legend && a.push(`legend=${s.legend}`), s != null && s.name && a.push(`name=${s.name}`);
2944
3069
  const c = await this.http.putFile(
2945
3070
  `/workspace/document/${e}?${a.join("&")}`,
2946
- n
3071
+ o
2947
3072
  );
2948
3073
  if (this.http.isResponseError())
2949
3074
  throw this.http.latestResponse.statusText;
@@ -2988,17 +3113,17 @@ class WorkspaceService {
2988
3113
  {
2989
3114
  application: t,
2990
3115
  visibility: s,
2991
- ids: r.map((n) => n._id)
3116
+ ids: r.map((o) => o._id)
2992
3117
  }
2993
3118
  );
2994
3119
  if (this.http.isResponseError())
2995
3120
  throw this.http.latestResponse.statusText;
2996
- return r.forEach((n, a) => {
3121
+ return r.forEach((o, a) => {
2997
3122
  const c = e.findIndex(
2998
- (h) => h._id === n._id
3123
+ (h) => h._id === o._id
2999
3124
  );
3000
3125
  0 <= c && c < e.length && (e[c] = i[a]);
3001
- }), e.filter((n) => !!n);
3126
+ }), e.filter((o) => !!o);
3002
3127
  }
3003
3128
  return e;
3004
3129
  }
@@ -3007,13 +3132,13 @@ class WorkspaceService {
3007
3132
  * or `null` if none exists or can be created.
3008
3133
  */
3009
3134
  getThumbnailUrl(e, t = 0, s = 0) {
3010
- var i, n;
3135
+ var i, o;
3011
3136
  const r = t > 0 || s > 0 ? `${t}x${s}` : "120x120";
3012
3137
  if (typeof e == "string")
3013
3138
  return e.includes("data:image") || e.includes("thumbnail") ? e : `${e}${e.includes("?") ? "&" : "?"}thumbnail=${r}`;
3014
3139
  {
3015
3140
  const a = `/workspace/${e.public ? "pub/" : ""}document/${e._id}?thumbnail=`, c = e.thumbnails;
3016
- if ((n = (i = e.metadata) == null ? void 0 : i["content-type"]) != null && n.includes("video")) {
3141
+ if ((o = (i = e.metadata) == null ? void 0 : i["content-type"]) != null && o.includes("video")) {
3017
3142
  const h = c && Object.keys(c).length > 0 ? Object.keys(c)[0] : null;
3018
3143
  return h ? a + h : null;
3019
3144
  } else
@@ -3023,8 +3148,8 @@ class WorkspaceService {
3023
3148
  }
3024
3149
  let ATTag;
3025
3150
  class AnalyticsService {
3026
- constructor(o) {
3027
- this.context = o;
3151
+ constructor(u) {
3152
+ this.context = u;
3028
3153
  }
3029
3154
  get http() {
3030
3155
  return this.context.http();
@@ -3037,7 +3162,7 @@ class AnalyticsService {
3037
3162
  * @param locationPath
3038
3163
  * @param app
3039
3164
  */
3040
- async trackPageLoad(o, e) {
3165
+ async trackPageLoad(u, e) {
3041
3166
  const [t] = await Promise.all([
3042
3167
  // get Xiti configuration
3043
3168
  this.getXitiConfig(e.name.toLowerCase()),
@@ -3047,7 +3172,7 @@ class AnalyticsService {
3047
3172
  if (!t || !ATInternet) return;
3048
3173
  let s = t.LIBELLE_SERVICE.default || null;
3049
3174
  for (const r in t.LIBELLE_SERVICE)
3050
- if (r !== "default" && o.indexOf(r) >= 0) {
3175
+ if (r !== "default" && u.indexOf(r) >= 0) {
3051
3176
  s = t.LIBELLE_SERVICE[r];
3052
3177
  break;
3053
3178
  }
@@ -3074,7 +3199,7 @@ class AnalyticsService {
3074
3199
  level2: t.STRUCT_UAI
3075
3200
  }), ATTag.dispatch();
3076
3201
  }
3077
- async getXitiConfig(o) {
3202
+ async getXitiConfig(u) {
3078
3203
  const [e, t] = await Promise.all([
3079
3204
  this.http.get("/analyticsConf"),
3080
3205
  //FIXME change servers config to only keep the "all-in-one" query to /analyticsConf.
@@ -3082,7 +3207,7 @@ class AnalyticsService {
3082
3207
  ]);
3083
3208
  if (!(e != null && e.type))
3084
3209
  throw ERROR_CODE.MALFORMED_DATA;
3085
- return t != null && t.active && (e.xiti = await this.getXitiTrackingParams(t, o)), e.xiti;
3210
+ return t != null && t.active && (e.xiti = await this.getXitiTrackingParams(t, u)), e.xiti;
3086
3211
  }
3087
3212
  async loadXitiScript() {
3088
3213
  if (typeof ATInternet > "u") {
@@ -3094,13 +3219,13 @@ class AnalyticsService {
3094
3219
  eval(response);
3095
3220
  }
3096
3221
  }
3097
- async getXitiTrackingParams(o, e) {
3098
- if (!o.structureMap || !e) return;
3222
+ async getXitiTrackingParams(u, e) {
3223
+ if (!u.structureMap || !e) return;
3099
3224
  const t = await this.session.getUser(), s = await this.session.getUserProfile();
3100
3225
  let r;
3101
3226
  if (!(t != null && t.structures)) return;
3102
3227
  for (const h of t.structures) {
3103
- const l = o.structureMap[h];
3228
+ const l = u.structureMap[h];
3104
3229
  if (l && l.collectiviteId && l.UAI) {
3105
3230
  r = l;
3106
3231
  break;
@@ -3109,8 +3234,8 @@ class AnalyticsService {
3109
3234
  if (!r || !r.active) return;
3110
3235
  const i = await configure.Platform.apps.getPublicConf(e);
3111
3236
  if (!i) return;
3112
- const n = i.xiti;
3113
- if (!n || !n.LIBELLE_SERVICE || !r.UAI) return;
3237
+ const o = i.xiti;
3238
+ if (!o || !o.LIBELLE_SERVICE || !r.UAI) return;
3114
3239
  function a(h) {
3115
3240
  let l = "";
3116
3241
  for (let E = 0; E < h.length; E++)
@@ -3125,15 +3250,15 @@ class AnalyticsService {
3125
3250
  Guest: "AUTRE"
3126
3251
  };
3127
3252
  return {
3128
- LIBELLE_SERVICE: n.LIBELLE_SERVICE,
3253
+ LIBELLE_SERVICE: o.LIBELLE_SERVICE,
3129
3254
  // Which property of LIBELLE_SERVICE to use depends on the frontend.
3130
- TYPE: n.OUTIL ? "TIERS" : "NATIF",
3131
- OUTIL: n.OUTIL ? n.OUTIL : "",
3255
+ TYPE: o.OUTIL ? "TIERS" : "NATIF",
3256
+ OUTIL: o.OUTIL ? o.OUTIL : "",
3132
3257
  STRUCT_ID: r.collectiviteId,
3133
3258
  STRUCT_UAI: r.UAI,
3134
- PROJET: r.projetId ? r.projetId : o.ID_PROJET,
3135
- EXPLOITANT: o.ID_EXPLOITANT,
3136
- PLATFORME: r.plateformeId ? r.plateformeId : o.ID_PLATEFORME,
3259
+ PROJET: r.projetId ? r.projetId : u.ID_PROJET,
3260
+ EXPLOITANT: u.ID_EXPLOITANT,
3261
+ PLATFORME: r.plateformeId ? r.plateformeId : u.ID_PLATEFORME,
3137
3262
  ID_PERSO: a(t.userId),
3138
3263
  PROFILE: s && s.length > 0 ? c[s[0]] ?? "" : ""
3139
3264
  };
@@ -3157,7 +3282,7 @@ const w = class w {
3157
3282
  async getVideoConf() {
3158
3283
  var t;
3159
3284
  const e = await this.conf.getPublicConf(
3160
- APP$3.VIDEO
3285
+ APP$4.VIDEO
3161
3286
  );
3162
3287
  return {
3163
3288
  maxWeight: (e == null ? void 0 : e["max-videosize-mbytes"]) ?? w.MAX_WEIGHT,
@@ -3182,13 +3307,13 @@ const w = class w {
3182
3307
  throw new Error("Invalid video file.");
3183
3308
  if (!e.filename)
3184
3309
  throw new Error("Invalid video filename");
3185
- const i = `${e.browser.name} ${e.browser.version}`, n = new FormData();
3186
- n.append("device", e.device || ""), n.append("browser", i), n.append("url", e.url), n.append("app", t), n.append("file", e.file, e.filename), n.append("weight", "" + e.file.size), n.append("captation", "" + s);
3310
+ const i = `${e.browser.name} ${e.browser.version}`, o = new FormData();
3311
+ o.append("device", e.device || ""), o.append("browser", i), o.append("url", e.url), o.append("app", t), o.append("file", e.file, e.filename), o.append("weight", "" + e.file.size), o.append("captation", "" + s);
3187
3312
  let a = `/video/encode?captation=${s}`;
3188
3313
  r && (a += `&duration=${r}`);
3189
3314
  const c = await this.http.post(
3190
3315
  a,
3191
- n,
3316
+ o,
3192
3317
  { headers: { "Content-Type": "multipart/form-data" } }
3193
3318
  );
3194
3319
  if (c.state == "running") {
@@ -3218,8 +3343,8 @@ const w = class w {
3218
3343
  throw new Error("Video cannot be uploaded.");
3219
3344
  }
3220
3345
  };
3221
- u(w, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
3222
- u(w, "MAX_DURATION", 3);
3346
+ n(w, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
3347
+ n(w, "MAX_DURATION", 3);
3223
3348
  let VideoService = w;
3224
3349
  class EmbedderService {
3225
3350
  constructor(e) {
@@ -3256,9 +3381,9 @@ class EmbedderService {
3256
3381
  urlIsFromPattern(e, t) {
3257
3382
  const s = new RegExp("[^{}]+(?=(?:[^{}]*{[^}]*})*[^}]*$)", "g"), r = new RegExp("{[^}]*}", "g");
3258
3383
  let i = !0;
3259
- const n = t.match(s) || [], a = [];
3384
+ const o = t.match(s) || [], a = [];
3260
3385
  return (t.match(r) || []).forEach((h, l) => {
3261
- h.includes("ignore") || a.push(n[l]);
3386
+ h.includes("ignore") || a.push(o[l]);
3262
3387
  }), a.forEach((h) => {
3263
3388
  if (!e.includes(h)) {
3264
3389
  i = !1;
@@ -3289,7 +3414,7 @@ class EmbedderService {
3289
3414
  for (const s of e.url)
3290
3415
  if (this.urlIsFromPattern(t, s)) {
3291
3416
  const r = new RegExp("{[a-zA-Z0-9_.]+}", "g"), i = s.match(r) || [];
3292
- let n = e.embed;
3417
+ let o = e.embed;
3293
3418
  for (const a of i) {
3294
3419
  let c = s.split(a)[0];
3295
3420
  const h = c.split("}");
@@ -3300,9 +3425,9 @@ class EmbedderService {
3300
3425
  const E = s.split(a)[1].split("{")[0];
3301
3426
  E && (l = l.split(E)[0]);
3302
3427
  const p = new RegExp("\\" + a.replace(/}/, "\\}"), "g");
3303
- n = n.replace(p, l);
3428
+ o = o.replace(p, l);
3304
3429
  }
3305
- return n;
3430
+ return o;
3306
3431
  }
3307
3432
  return "";
3308
3433
  }
@@ -3315,7 +3440,7 @@ class AbstractBehaviourService {
3315
3440
  //-----------------
3316
3441
  //--- Utilities ---
3317
3442
  //-----------------
3318
- u(this, "_cache");
3443
+ n(this, "_cache");
3319
3444
  this.context = e, this._cache = new CacheService(this.context);
3320
3445
  }
3321
3446
  getApplication() {
@@ -3349,8 +3474,8 @@ class AbstractBehaviourService {
3349
3474
  class ActualitesBehaviour extends AbstractBehaviourService {
3350
3475
  constructor() {
3351
3476
  super(...arguments);
3352
- u(this, "APP", "actualites");
3353
- u(this, "RESOURCE", "actualites");
3477
+ n(this, "APP", "actualites");
3478
+ n(this, "RESOURCE", "actualites");
3354
3479
  }
3355
3480
  async loadResources() {
3356
3481
  return (await this.httpGet(
@@ -3373,24 +3498,24 @@ class ActualitesBehaviour extends AbstractBehaviourService {
3373
3498
  class BlogBehaviour extends AbstractBehaviourService {
3374
3499
  constructor() {
3375
3500
  super(...arguments);
3376
- u(this, "APP", "blog");
3377
- u(this, "RESOURCE", "blog");
3501
+ n(this, "APP", "blog");
3502
+ n(this, "RESOURCE", "blog");
3378
3503
  }
3379
3504
  loadResources() {
3380
3505
  return new Promise(async (t, s) => {
3381
3506
  try {
3382
3507
  const r = await this.httpGet("/blog/linker"), i = [];
3383
- r.forEach((n) => {
3384
- n.thumbnail ? n.thumbnail = n.thumbnail + "?thumbnail=48x48" : n.thumbnail = "/img/illustrations/blog.svg";
3385
- const a = n.fetchPosts.map((c) => this.dataToResource({
3386
- owner: n.author.userId,
3387
- ownerName: n.author.username,
3388
- title: c.title + " [" + n.title + "]",
3389
- _id: `${n._id}#${c._id}`,
3390
- icon: n.thumbnail,
3391
- path: `/blog/id/${n._id}/post/${c._id}`,
3392
- shared: !!(n.shared && n.shared.length >= 0),
3393
- modified: n.modified
3508
+ r.forEach((o) => {
3509
+ o.thumbnail ? o.thumbnail = o.thumbnail + "?thumbnail=48x48" : o.thumbnail = "/img/illustrations/blog.svg";
3510
+ const a = o.fetchPosts.map((c) => this.dataToResource({
3511
+ owner: o.author.userId,
3512
+ ownerName: o.author.username,
3513
+ title: c.title + " [" + o.title + "]",
3514
+ _id: `${o._id}#${c._id}`,
3515
+ icon: o.thumbnail,
3516
+ path: `/blog/id/${o._id}/post/${c._id}`,
3517
+ shared: !!(o.shared && o.shared.length >= 0),
3518
+ modified: o.modified
3394
3519
  }));
3395
3520
  i.push(...a);
3396
3521
  }), t(i);
@@ -3403,8 +3528,8 @@ class BlogBehaviour extends AbstractBehaviourService {
3403
3528
  class CollaborativewallBehaviour extends AbstractBehaviourService {
3404
3529
  constructor() {
3405
3530
  super(...arguments);
3406
- u(this, "APP", "collaborativewall");
3407
- u(this, "RESOURCE", "collaborativewall");
3531
+ n(this, "APP", "collaborativewall");
3532
+ n(this, "RESOURCE", "collaborativewall");
3408
3533
  }
3409
3534
  async loadResources() {
3410
3535
  return (await this.httpGet(
@@ -3426,8 +3551,8 @@ class CollaborativewallBehaviour extends AbstractBehaviourService {
3426
3551
  class CommunityBehaviour extends AbstractBehaviourService {
3427
3552
  constructor() {
3428
3553
  super(...arguments);
3429
- u(this, "APP", "community");
3430
- u(this, "RESOURCE", "community");
3554
+ n(this, "APP", "community");
3555
+ n(this, "RESOURCE", "community");
3431
3556
  }
3432
3557
  async loadResources() {
3433
3558
  return (await this.httpGet(
@@ -3451,24 +3576,24 @@ class CommunityBehaviour extends AbstractBehaviourService {
3451
3576
  class ExercizerBehaviour extends AbstractBehaviourService {
3452
3577
  constructor() {
3453
3578
  super(...arguments);
3454
- u(this, "APP", "exercizer");
3455
- u(this, "RESOURCE", "exercizer");
3579
+ n(this, "APP", "exercizer");
3580
+ n(this, "RESOURCE", "exercizer");
3456
3581
  }
3457
3582
  async loadResources() {
3458
3583
  return (await this.httpGet(
3459
3584
  "/exercizer/subjects-scheduled"
3460
3585
  )).map((s) => {
3461
3586
  const r = s.picture ? s.picture + "?thumbnail=48x48" : "/img/illustrations/exercizer.svg";
3462
- let i, n = !1;
3587
+ let i, o = !1;
3463
3588
  const a = JSON.parse(s.scheduled_at);
3464
- return a.groupList.length > 0 ? (n = !0, i = a.groupList[0].name) : a.userList.length > 0 ? (n = !0, i = a.userList[0].name) : i = "", a.groupList.length + a.userList.length > 1 && (i += "..."), this.dataToResource({
3589
+ return a.groupList.length > 0 ? (o = !0, i = a.groupList[0].name) : a.userList.length > 0 ? (o = !0, i = a.userList[0].name) : i = "", a.groupList.length + a.userList.length > 1 && (i += "..."), this.dataToResource({
3465
3590
  title: s.title,
3466
3591
  owner: s.owner,
3467
3592
  ownerName: i,
3468
3593
  icon: r,
3469
3594
  path: "/exercizer#/linker/" + s.id,
3470
3595
  _id: "" + s.id,
3471
- shared: n,
3596
+ shared: o,
3472
3597
  modified: s.modified
3473
3598
  });
3474
3599
  });
@@ -3477,8 +3602,8 @@ class ExercizerBehaviour extends AbstractBehaviourService {
3477
3602
  class FormulaireBehaviour extends AbstractBehaviourService {
3478
3603
  constructor() {
3479
3604
  super(...arguments);
3480
- u(this, "APP", "formulaire");
3481
- u(this, "RESOURCE", "formulaire");
3605
+ n(this, "APP", "formulaire");
3606
+ n(this, "RESOURCE", "formulaire");
3482
3607
  }
3483
3608
  async loadResources() {
3484
3609
  return (await this.httpGet(
@@ -3498,8 +3623,8 @@ class FormulaireBehaviour extends AbstractBehaviourService {
3498
3623
  class ForumBehaviour extends AbstractBehaviourService {
3499
3624
  constructor() {
3500
3625
  super(...arguments);
3501
- u(this, "APP", "forum");
3502
- u(this, "RESOURCE", "forum");
3626
+ n(this, "APP", "forum");
3627
+ n(this, "RESOURCE", "forum");
3503
3628
  }
3504
3629
  async loadResources() {
3505
3630
  return (await this.httpGet("/forum/categories")).map(
@@ -3519,8 +3644,8 @@ class ForumBehaviour extends AbstractBehaviourService {
3519
3644
  class HomeworksBehaviour extends AbstractBehaviourService {
3520
3645
  constructor() {
3521
3646
  super(...arguments);
3522
- u(this, "APP", "homeworks");
3523
- u(this, "RESOURCE", "homeworks");
3647
+ n(this, "APP", "homeworks");
3648
+ n(this, "RESOURCE", "homeworks");
3524
3649
  }
3525
3650
  async loadResources() {
3526
3651
  return (await this.httpGet("/homeworks/list")).filter((t) => t.owner && t.trashed === 0).map((t) => this.dataToResource({
@@ -3538,8 +3663,8 @@ class HomeworksBehaviour extends AbstractBehaviourService {
3538
3663
  class MagnetoBehaviour extends AbstractBehaviourService {
3539
3664
  constructor() {
3540
3665
  super(...arguments);
3541
- u(this, "APP", "magneto");
3542
- u(this, "RESOURCE", "magneto");
3666
+ n(this, "APP", "magneto");
3667
+ n(this, "RESOURCE", "magneto");
3543
3668
  }
3544
3669
  async loadResources() {
3545
3670
  const { all: t } = await this.httpGet(
@@ -3560,8 +3685,8 @@ class MagnetoBehaviour extends AbstractBehaviourService {
3560
3685
  class MindmapBehaviour extends AbstractBehaviourService {
3561
3686
  constructor() {
3562
3687
  super(...arguments);
3563
- u(this, "APP", "mindmap");
3564
- u(this, "RESOURCE", "mindmap");
3688
+ n(this, "APP", "mindmap");
3689
+ n(this, "RESOURCE", "mindmap");
3565
3690
  }
3566
3691
  async loadResources() {
3567
3692
  return (await this.httpGet("/mindmap/list/all")).map(
@@ -3581,13 +3706,13 @@ class MindmapBehaviour extends AbstractBehaviourService {
3581
3706
  class PagesBehaviour extends AbstractBehaviourService {
3582
3707
  constructor() {
3583
3708
  super(...arguments);
3584
- u(this, "APP", "pages");
3585
- u(this, "RESOURCE", "pages");
3709
+ n(this, "APP", "pages");
3710
+ n(this, "RESOURCE", "pages");
3586
3711
  }
3587
3712
  async loadResources() {
3588
3713
  const t = await this.httpGet("/pages/list/all"), s = [];
3589
3714
  return t.forEach((r) => {
3590
- var n;
3715
+ var o;
3591
3716
  const i = r.thumbnail ? r.thumbnail + "?thumbnail=48x48" : "/img/illustrations/pages.svg";
3592
3717
  s.push(
3593
3718
  this.dataToResource({
@@ -3600,7 +3725,7 @@ class PagesBehaviour extends AbstractBehaviourService {
3600
3725
  shared: typeof r.shared < "u",
3601
3726
  modified: r.modified
3602
3727
  })
3603
- ), (n = r.pages) == null || n.forEach((a) => {
3728
+ ), (o = r.pages) == null || o.forEach((a) => {
3604
3729
  s.push(
3605
3730
  this.dataToResource({
3606
3731
  title: a.title,
@@ -3620,8 +3745,8 @@ class PagesBehaviour extends AbstractBehaviourService {
3620
3745
  class PollBehaviour extends AbstractBehaviourService {
3621
3746
  constructor() {
3622
3747
  super(...arguments);
3623
- u(this, "APP", "poll");
3624
- u(this, "RESOURCE", "poll");
3748
+ n(this, "APP", "poll");
3749
+ n(this, "RESOURCE", "poll");
3625
3750
  }
3626
3751
  async loadResources() {
3627
3752
  return (await this.httpGet("/poll/list/all")).map((s) => {
@@ -3642,8 +3767,8 @@ class PollBehaviour extends AbstractBehaviourService {
3642
3767
  class ScrapbookBehaviour extends AbstractBehaviourService {
3643
3768
  constructor() {
3644
3769
  super(...arguments);
3645
- u(this, "APP", "scrapbook");
3646
- u(this, "RESOURCE", "scrapbook");
3770
+ n(this, "APP", "scrapbook");
3771
+ n(this, "RESOURCE", "scrapbook");
3647
3772
  }
3648
3773
  async loadResources() {
3649
3774
  return (await this.httpGet(
@@ -3666,25 +3791,25 @@ class ScrapbookBehaviour extends AbstractBehaviourService {
3666
3791
  class TimelinegeneratorBehaviour extends AbstractBehaviourService {
3667
3792
  constructor() {
3668
3793
  super(...arguments);
3669
- u(this, "APP", "timelinegenerator");
3670
- u(this, "RESOURCE", "timelinegenerator");
3794
+ n(this, "APP", "timelinegenerator");
3795
+ n(this, "RESOURCE", "timelinegenerator");
3671
3796
  }
3672
3797
  loadResources() {
3673
3798
  return new Promise(async (t, s) => {
3674
3799
  try {
3675
3800
  const i = (await this.httpGet(
3676
3801
  "/timelinegenerator/timelines"
3677
- )).map((n) => {
3678
- const a = n.icon || "/img/illustrations/timeline-default.png";
3802
+ )).map((o) => {
3803
+ const a = o.icon || "/img/illustrations/timeline-default.png";
3679
3804
  return this.dataToResource({
3680
- title: n.headline,
3681
- ownerName: n.owner.displayName,
3682
- owner: n.owner.userId,
3805
+ title: o.headline,
3806
+ ownerName: o.owner.displayName,
3807
+ owner: o.owner.userId,
3683
3808
  icon: a,
3684
- path: "/timelinegenerator#/view/" + n._id,
3685
- _id: n._id,
3686
- shared: typeof n.shared < "u",
3687
- modified: n.modified
3809
+ path: "/timelinegenerator#/view/" + o._id,
3810
+ _id: o._id,
3811
+ shared: typeof o.shared < "u",
3812
+ modified: o.modified
3688
3813
  });
3689
3814
  });
3690
3815
  t(i);
@@ -3697,8 +3822,8 @@ class TimelinegeneratorBehaviour extends AbstractBehaviourService {
3697
3822
  class WikiBehaviour extends AbstractBehaviourService {
3698
3823
  constructor() {
3699
3824
  super(...arguments);
3700
- u(this, "APP", "wiki");
3701
- u(this, "RESOURCE", "wiki");
3825
+ n(this, "APP", "wiki");
3826
+ n(this, "RESOURCE", "wiki");
3702
3827
  }
3703
3828
  async loadResources() {
3704
3829
  return (await this.httpGet(
@@ -3721,15 +3846,15 @@ class WikiBehaviour extends AbstractBehaviourService {
3721
3846
  class WorkspaceBehaviour extends AbstractBehaviourService {
3722
3847
  constructor() {
3723
3848
  super(...arguments);
3724
- u(this, "APP", "workspace");
3725
- u(this, "RESOURCE", "workspace");
3849
+ n(this, "APP", "workspace");
3850
+ n(this, "RESOURCE", "workspace");
3726
3851
  }
3727
3852
  loadResources({ search: t, asset_id: s }) {
3728
3853
  return new Promise(async (r, i) => {
3729
3854
  try {
3730
- let n = "/workspace/documents?filter=all&hierarchical=true";
3731
- s && s.length ? n += `&search=${t}` : t && t.length && (n += `&search=${t}`);
3732
- const c = (await this.httpGet(n)).filter((h) => !h.deleted).map((h) => {
3855
+ let o = "/workspace/documents?filter=all&hierarchical=true";
3856
+ s && s.length ? o += `&search=${t}` : t && t.length && (o += `&search=${t}`);
3857
+ const c = (await this.httpGet(o)).filter((h) => !h.deleted).map((h) => {
3733
3858
  const l = h.metadata["content-type"] && h.metadata["content-type"].indexOf("image") !== -1 ? `/workspace/document/${h._id}?thumbnail=120x120` : "/img/icons/unknown-large.png";
3734
3859
  return this.dataToResource({
3735
3860
  title: h.name,
@@ -3743,8 +3868,8 @@ class WorkspaceBehaviour extends AbstractBehaviourService {
3743
3868
  });
3744
3869
  });
3745
3870
  r(c);
3746
- } catch (n) {
3747
- i(n);
3871
+ } catch (o) {
3872
+ i(o);
3748
3873
  }
3749
3874
  });
3750
3875
  }
@@ -3760,7 +3885,7 @@ const y = class y {
3760
3885
  e.session().getUser()
3761
3886
  ]);
3762
3887
  i != null && i.apps && (r != null && r.length) && (this.resourceProducingApps = r.filter(
3763
- (n) => i.apps.some((a) => a.address.includes(n))
3888
+ (o) => i.apps.some((a) => a.address.includes(o))
3764
3889
  ));
3765
3890
  } catch (r) {
3766
3891
  console.warn("Failed to load resource-producing apps:", r);
@@ -3837,13 +3962,13 @@ const y = class y {
3837
3962
  //
3838
3963
  // STATIC REGISTRY
3839
3964
  //
3840
- u(y, "registry", new ServiceRegistry()), // Expose some useful functions
3841
- u(y, "findBehaviour", y.registry.findService.bind(y.registry)), u(y, "hasBehaviour", y.registry.isRegistered.bind(y.registry)), u(y, "resourceProducingApps", []);
3965
+ n(y, "registry", new ServiceRegistry()), // Expose some useful functions
3966
+ n(y, "findBehaviour", y.registry.findService.bind(y.registry)), n(y, "hasBehaviour", y.registry.isRegistered.bind(y.registry)), n(y, "resourceProducingApps", []);
3842
3967
  let SnipletsService = y;
3843
3968
  const SEND_ALL = "*";
3844
3969
  class WebBroker {
3845
3970
  constructor(e) {
3846
- u(this, "subscription");
3971
+ n(this, "subscription");
3847
3972
  this.odeServices = e;
3848
3973
  }
3849
3974
  get http() {
@@ -3875,10 +4000,10 @@ class WebBroker {
3875
4000
  }
3876
4001
  class DataService {
3877
4002
  constructor(e) {
3878
- u(this, "_webBroker");
3879
- u(this, "app");
3880
- u(this, "user");
3881
- u(this, "profile");
4003
+ n(this, "_webBroker");
4004
+ n(this, "app");
4005
+ n(this, "user");
4006
+ n(this, "profile");
3882
4007
  this.odeServices = e;
3883
4008
  }
3884
4009
  get conf() {
@@ -3912,12 +4037,12 @@ class DataService {
3912
4037
  addUserInfos(e) {
3913
4038
  return this.user && (e.userId = this.user.userId, e.structure = this.user.structureNames[0]), this.profile && (e.profil = this.profile[0]), e;
3914
4039
  }
3915
- trackVideoSave(e, t, s, r, i, n, a) {
4040
+ trackVideoSave(e, t, s, r, i, o, a) {
3916
4041
  const c = this.addUserInfos({
3917
4042
  "event-type": "VIDEO_SAVE",
3918
4043
  module: "video",
3919
4044
  video_id: e,
3920
- browser: n,
4045
+ browser: o,
3921
4046
  duration: Math.round(t),
3922
4047
  weight: s,
3923
4048
  source: r ? "CAPTURED" : "UPLOADED",
@@ -3926,7 +4051,7 @@ class DataService {
3926
4051
  this.app && (c["override-module"] = this.app), a && (c.device_type = a), this.trackWebEvent(c);
3927
4052
  }
3928
4053
  trackVideoRead(e, t, s, r, i) {
3929
- const n = this.addUserInfos({
4054
+ const o = this.addUserInfos({
3930
4055
  "event-type": "VIDEO_READ",
3931
4056
  module: "video",
3932
4057
  video_id: e,
@@ -3934,7 +4059,7 @@ class DataService {
3934
4059
  source: t ? "CAPTURED" : "UPLOADED",
3935
4060
  url: s
3936
4061
  });
3937
- this.app && (n["override-module"] = this.app), i && (n.device_type = i), this.trackWebEvent(n);
4062
+ this.app && (o["override-module"] = this.app), i && (o.device_type = i), this.trackWebEvent(o);
3938
4063
  }
3939
4064
  trackSpeechAndText(e) {
3940
4065
  const t = this.addUserInfos({
@@ -4040,20 +4165,20 @@ class AudienceService {
4040
4165
  }
4041
4166
  class OdeServices {
4042
4167
  constructor() {
4043
- u(this, "_analytics");
4044
- u(this, "_cache");
4045
- u(this, "_conf");
4046
- u(this, "_data");
4047
- u(this, "_directory");
4048
- u(this, "_http");
4049
- u(this, "_idiom");
4050
- u(this, "_notify");
4051
- u(this, "_rights");
4052
- u(this, "_session");
4053
- u(this, "_share");
4054
- u(this, "_video");
4055
- u(this, "_workspace");
4056
- u(this, "_embedder");
4168
+ n(this, "_analytics");
4169
+ n(this, "_cache");
4170
+ n(this, "_conf");
4171
+ n(this, "_data");
4172
+ n(this, "_directory");
4173
+ n(this, "_http");
4174
+ n(this, "_idiom");
4175
+ n(this, "_notify");
4176
+ n(this, "_rights");
4177
+ n(this, "_session");
4178
+ n(this, "_share");
4179
+ n(this, "_video");
4180
+ n(this, "_workspace");
4181
+ n(this, "_embedder");
4057
4182
  this._analytics = new AnalyticsService(this), this._cache = new CacheService(this), this._conf = new ConfService(this), this._data = new DataService(this), this._directory = new DirectoryService(this), this._http = new HttpService(this), this._idiom = new IdiomService(this), this._notify = NotifyFrameworkFactory.instance(), this._rights = new RightService(this), this._session = new SessionService(this), this._share = new ShareService(this), this._video = new VideoService(this), this._workspace = new WorkspaceService(this), this._embedder = new EmbedderService(this);
4058
4183
  }
4059
4184
  initialize() {
@@ -4186,9 +4311,9 @@ class TransportFrameworkFactory {
4186
4311
  return transport;
4187
4312
  }
4188
4313
  }
4189
- const isActionAvailable = (o, e) => {
4314
+ const isActionAvailable = (u, e) => {
4190
4315
  const t = e == null ? void 0 : e.filter(
4191
- (s) => s.id === o && s.available
4316
+ (s) => s.id === u && s.available
4192
4317
  );
4193
4318
  return t && t.length > 0;
4194
4319
  }, firstLevelWidgets = [
@@ -4255,10 +4380,10 @@ const isActionAvailable = (o, e) => {
4255
4380
  class WidgetFramework {
4256
4381
  constructor() {
4257
4382
  //-------------------------------------
4258
- u(this, "_initialized");
4259
- u(this, "_widgets", []);
4383
+ n(this, "_initialized");
4384
+ n(this, "_widgets", []);
4260
4385
  ////////////////////////////////////// USER PREFERENCES
4261
- u(this, "_userPrefs", {});
4386
+ n(this, "_userPrefs", {});
4262
4387
  }
4263
4388
  initialize(e, t) {
4264
4389
  return this._initialized || (this._initialized = new Promisified(), notify.onSessionReady().promise.then((s) => {
@@ -4269,8 +4394,8 @@ class WidgetFramework {
4269
4394
  var i;
4270
4395
  (i = this._initialized) == null || i.resolve();
4271
4396
  }).catch((i) => {
4272
- var n;
4273
- (n = this._initialized) == null || n.reject();
4397
+ var o;
4398
+ (o = this._initialized) == null || o.reject();
4274
4399
  })) : (r = this._initialized) == null || r.reject();
4275
4400
  })), this._initialized.promise;
4276
4401
  }
@@ -4311,9 +4436,9 @@ class WidgetFramework {
4311
4436
  position: c.platformConf.position
4312
4437
  }), c.platformConf.mandatory && (this._userPrefs[l].show = !0, this._userPrefs[l].index = defaultWidgetOrder[l] ?? 999), c.platformConf.i18n && s.push(c.platformConf.i18n), c.applyUserPref(this._userPrefs[l]), !0);
4313
4438
  });
4314
- const n = new Idiom();
4439
+ const o = new Idiom();
4315
4440
  this._widgets = this._widgets.sort((c, h) => {
4316
- const l = n.translate(`timeline.settings.${c.platformConf.name}`).toLowerCase(), E = n.translate(`timeline.settings.${h.platformConf.name}`).toLowerCase();
4441
+ const l = o.translate(`timeline.settings.${c.platformConf.name}`).toLowerCase(), E = o.translate(`timeline.settings.${h.platformConf.name}`).toLowerCase();
4317
4442
  return l < E ? -1 : l > E ? 1 : 0;
4318
4443
  });
4319
4444
  });
@@ -4322,8 +4447,8 @@ class WidgetFramework {
4322
4447
  class Widget {
4323
4448
  //-------------------------------------
4324
4449
  constructor(e) {
4325
- u(this, "_schoolConf", {});
4326
- u(this, "_userPref");
4450
+ n(this, "_schoolConf", {});
4451
+ n(this, "_userPref");
4327
4452
  this._platformConf = e, this._userPref = null;
4328
4453
  }
4329
4454
  get platformConf() {
@@ -4382,7 +4507,7 @@ class WidgetFrameworkFactory {
4382
4507
  }
4383
4508
  export {
4384
4509
  ACTION,
4385
- APP$3 as APP,
4510
+ APP$4 as APP,
4386
4511
  BOOLEAN_FILTER,
4387
4512
  ConfigurationFrameworkFactory,
4388
4513
  DocumentHelper,