@edifice.io/client 2.0.0-develop-pedago.20250115112809 → 2.0.0-develop-pedago.20250116124516

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,6 +1,6 @@
1
1
  var v = Object.defineProperty;
2
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 n = (o, e, t) => T(o, typeof e != "symbol" ? e + "" : e, t);
3
+ var u = (o, e, t) => T(o, 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 = {
@@ -14,7 +14,7 @@ const ERROR_CODE = {
14
14
  TIME_OUT: "0070",
15
15
  MALFORMED_DATA: "0080",
16
16
  NOT_LOGGED_IN: "0090"
17
- }, APP$2 = {
17
+ }, APP$3 = {
18
18
  ADMIN: "admin",
19
19
  ARCHIVE: "archive",
20
20
  AUTH: "auth",
@@ -35,7 +35,8 @@ const ERROR_CODE = {
35
35
  MINDMAP: "mindmap",
36
36
  SCRAPBOOK: "scrapbook",
37
37
  COLLABORATIVEWALL: "collaborativewall",
38
- WIKI: "wiki"
38
+ WIKI: "wiki",
39
+ TIMELINEGENERATOR: "timelinegenerator"
39
40
  // TODO compléter/trier les apps suivantes
40
41
  /*
41
42
  "competences"
@@ -98,7 +99,7 @@ const ERROR_CODE = {
98
99
  };
99
100
  class Subscription {
100
101
  constructor(e, t) {
101
- n(this, "revoke");
102
+ u(this, "revoke");
102
103
  this._channel = e, this.revoke = this.setReceiver(
103
104
  (s) => t == null ? void 0 : t(s.data)
104
105
  );
@@ -116,7 +117,7 @@ class Subject {
116
117
  * => We maintain here channels for *sending* messages.
117
118
  * *Receiving* channels will be instantiated while subscribing.
118
119
  */
119
- n(this, "publishChannels", /* @__PURE__ */ new Map());
120
+ u(this, "publishChannels", /* @__PURE__ */ new Map());
120
121
  }
121
122
  getChannelName(e) {
122
123
  return "Subject:" + e;
@@ -151,9 +152,9 @@ const ASYNC_DATA_NAME = {
151
152
  class Promisified {
152
153
  constructor() {
153
154
  //-------------------------------------
154
- n(this, "_resolution");
155
- n(this, "_rejection");
156
- n(this, "_promise", new Promise((e, t) => {
155
+ u(this, "_resolution");
156
+ u(this, "_rejection");
157
+ u(this, "_promise", new Promise((e, t) => {
157
158
  this._resolution = e, this._rejection = t;
158
159
  }));
159
160
  }
@@ -170,8 +171,8 @@ class Promisified {
170
171
  class NotifyFramework {
171
172
  constructor() {
172
173
  //-------------------------------------
173
- n(this, "promises", {});
174
- n(this, "subject", new Subject());
174
+ u(this, "promises", {});
175
+ u(this, "subject", new Subject());
175
176
  }
176
177
  asyncData(e) {
177
178
  return typeof this.promises[e] > "u" && (this.promises[e] = new Promisified()), this.promises[e];
@@ -202,8 +203,8 @@ const notify = new NotifyFramework(), loadedScripts$1 = {};
202
203
  class Http {
203
204
  constructor(e) {
204
205
  // Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
205
- n(this, "axios");
206
- n(this, "_latestResponse");
206
+ u(this, "axios");
207
+ u(this, "_latestResponse");
207
208
  this.axios = axios.create(e);
208
209
  }
209
210
  setCdn(e) {
@@ -281,15 +282,15 @@ class Http {
281
282
  }
282
283
  getScript(e, t, s) {
283
284
  const r = s ?? "exports", i = this.toAxiosConfig(t);
284
- return i.headers && (i.headers.Accept = "application/javascript"), this.axios.get(this.toCdnUrl(e), i).then((u) => this.mapAxiosResponse(u, t)).then((u) => {
285
+ return i.headers && (i.headers.Accept = "application/javascript"), this.axios.get(this.toCdnUrl(e), i).then((n) => this.mapAxiosResponse(n, t)).then((n) => {
285
286
  try {
286
- const a = `"use strict";var ${r.split(".")[0]}={};${u};return ${r};`;
287
+ const a = `"use strict";var ${r.split(".")[0]}={};${n};return ${r};`;
287
288
  return Function(a)();
288
289
  } catch {
289
- return u;
290
+ return n;
290
291
  }
291
- }).catch((u) => {
292
- throw this.mapAxiosError(u, t), u;
292
+ }).catch((n) => {
293
+ throw this.mapAxiosError(n, t), n;
293
294
  });
294
295
  }
295
296
  loadScript(e, t) {
@@ -300,7 +301,7 @@ class Http {
300
301
  }
301
302
  class TransportFramework {
302
303
  constructor() {
303
- n(this, "_http", new Http());
304
+ u(this, "_http", new Http());
304
305
  }
305
306
  get http() {
306
307
  return this._http;
@@ -319,11 +320,11 @@ class ConfigurationFrameworkFactory {
319
320
  const http$2 = transport.http;
320
321
  class Session {
321
322
  constructor() {
322
- n(this, "_me", null);
323
- n(this, "_currentLanguage", "");
324
- n(this, "_notLoggedIn", !0);
325
- n(this, "_description");
326
- n(this, "_profile");
323
+ u(this, "_me", null);
324
+ u(this, "_currentLanguage", "");
325
+ u(this, "_notLoggedIn", !0);
326
+ u(this, "_description");
327
+ u(this, "_profile");
327
328
  }
328
329
  get currentLanguage() {
329
330
  return this._currentLanguage;
@@ -368,8 +369,8 @@ class Session {
368
369
  hasRight(e, t) {
369
370
  if (t === "owner")
370
371
  return e.owner && e.owner.userId === this._me.userId;
371
- 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, u = t.workflow ? this.hasWorkflow(t.workflow) : !0;
372
- return i && u;
372
+ 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;
373
+ return i && n;
373
374
  }
374
375
  ////////////////////////////////////////////////////////// Storage management
375
376
  get latestQuotaAndUsage() {
@@ -441,7 +442,7 @@ class Session {
441
442
  }
442
443
  class SessionFramework {
443
444
  constructor() {
444
- n(this, "session", new Session());
445
+ u(this, "session", new Session());
445
446
  }
446
447
  initialize() {
447
448
  return this.session.initialize();
@@ -465,22 +466,22 @@ class SessionFramework {
465
466
  const session = new SessionFramework();
466
467
  class Theme {
467
468
  constructor() {
468
- n(this, "_conf");
469
- n(this, "_loaded");
469
+ u(this, "_conf");
470
+ u(this, "_loaded");
470
471
  // legacy (readonly)
471
- n(this, "skinName", "");
472
- n(this, "themeName", "");
473
- n(this, "skin", "raw");
474
- n(this, "themeUrl", "/assets/themes/raw/default/");
475
- n(this, "templateOverrides", {});
476
- n(this, "portalTemplate", "/assets/themes/raw/portal.html");
477
- n(this, "basePath", "");
478
- n(this, "logoutCallback", "/");
479
- n(this, "skins", []);
480
- n(this, "is1D", !1);
481
- n(this, "is2D", !1);
482
- n(this, "_onSkinReady", notify.onSkinReady());
483
- n(this, "_onOverrideReady", notify.onOverridesReady());
472
+ u(this, "skinName", "");
473
+ u(this, "themeName", "");
474
+ u(this, "skin", "raw");
475
+ u(this, "themeUrl", "/assets/themes/raw/default/");
476
+ u(this, "templateOverrides", {});
477
+ u(this, "portalTemplate", "/assets/themes/raw/portal.html");
478
+ u(this, "basePath", "");
479
+ u(this, "logoutCallback", "/");
480
+ u(this, "skins", []);
481
+ u(this, "is1D", !1);
482
+ u(this, "is2D", !1);
483
+ u(this, "_onSkinReady", notify.onSkinReady());
484
+ u(this, "_onOverrideReady", notify.onOverridesReady());
484
485
  }
485
486
  initialize(e) {
486
487
  return notify.onSessionReady().promise.then(() => this.load(e));
@@ -813,8 +814,8 @@ class Idiom {
813
814
  else {
814
815
  const i = new Promisified();
815
816
  promises$1[t] = i.promise;
816
- const u = {};
817
- e && (u["Accept-Language"] = e), transport.http.get(t, { headers: u }).then((a) => {
817
+ const n = {};
818
+ e && (n["Accept-Language"] = e), transport.http.get(t, { headers: n }).then((a) => {
818
819
  Object.assign(bundle$1, a), typeof s == "function" && s(), i.resolve();
819
820
  }).catch((a) => {
820
821
  typeof s == "function" && s(), i.reject();
@@ -852,7 +853,7 @@ class Idiom {
852
853
  class UserPreferences {
853
854
  constructor() {
854
855
  //-------------------------------------
855
- n(this, "data", {});
856
+ u(this, "data", {});
856
857
  }
857
858
  get(e) {
858
859
  return this.data[e];
@@ -879,10 +880,10 @@ class UserPreferences {
879
880
  class User {
880
881
  constructor() {
881
882
  //-------------------------------------
882
- n(this, "_me", null);
883
- n(this, "_keepOpenOnLogout", !1);
884
- n(this, "_preferences", new UserPreferences());
885
- n(this, "_bookmarkedApps", []);
883
+ u(this, "_me", null);
884
+ u(this, "_keepOpenOnLogout", !1);
885
+ u(this, "_preferences", new UserPreferences());
886
+ u(this, "_bookmarkedApps", []);
886
887
  }
887
888
  get keepOpenOnLogout() {
888
889
  return this._keepOpenOnLogout;
@@ -914,7 +915,7 @@ class User {
914
915
  let s;
915
916
  if (t && t.length && typeof t.concat == "function") {
916
917
  this._bookmarkedApps = t, s = {
917
- bookmarks: t.map((u) => u.name),
918
+ bookmarks: t.map((n) => n.name),
918
919
  applications: []
919
920
  }, transport.http.putJson("/userbook/preference/apps", s);
920
921
  return;
@@ -926,15 +927,15 @@ class User {
926
927
  });
927
928
  let r = !0;
928
929
  const i = [];
929
- s.bookmarks.forEach((u, a) => {
930
- const c = this._me.apps.find((h) => h.name === u);
930
+ s.bookmarks.forEach((n, a) => {
931
+ const c = this._me.apps.find((h) => h.name === n);
931
932
  if (c) {
932
933
  let h = Object.assign({}, c);
933
934
  this._bookmarkedApps.push(h);
934
935
  } else
935
- i.push(u), r = !1;
936
- }), i.forEach((u) => {
937
- let a = s.bookmarks.indexOf(u);
936
+ i.push(n), r = !1;
937
+ }), i.forEach((n) => {
938
+ let a = s.bookmarks.indexOf(n);
938
939
  a !== -1 && s.bookmarks.splice(a, 1);
939
940
  }), r || transport.http.putJson("/userbook/preference/apps", s);
940
941
  });
@@ -956,9 +957,9 @@ const http$1 = transport == null ? void 0 : transport.http;
956
957
  class AppConf {
957
958
  constructor() {
958
959
  //-------------------------------------
959
- n(this, "_publicConf", {});
960
- n(this, "_currentApp");
961
- n(this, "_appConf", {});
960
+ u(this, "_publicConf", {});
961
+ u(this, "_currentApp");
962
+ u(this, "_appConf", {});
962
963
  }
963
964
  /**
964
965
  * Get the currently initialized App.
@@ -996,8 +997,8 @@ class AppConf {
996
997
  class Analytics {
997
998
  constructor() {
998
999
  //-------------------------------------
999
- n(this, "_status", "void");
1000
- n(this, "_params");
1000
+ u(this, "_status", "void");
1001
+ u(this, "_params");
1001
1002
  }
1002
1003
  get status() {
1003
1004
  return this._status;
@@ -1049,8 +1050,8 @@ class Analytics {
1049
1050
  configure.Platform.apps.currentApp
1050
1051
  );
1051
1052
  if (!i) return;
1052
- const u = i.xiti;
1053
- if (!u || !u.LIBELLE_SERVICE || !r.UAI) return;
1053
+ const n = i.xiti;
1054
+ if (!n || !n.LIBELLE_SERVICE || !r.UAI) return;
1054
1055
  function a(h) {
1055
1056
  let l = "";
1056
1057
  for (let E = 0; E < h.length; E++)
@@ -1065,10 +1066,10 @@ class Analytics {
1065
1066
  Guest: "AUTRE"
1066
1067
  };
1067
1068
  return {
1068
- LIBELLE_SERVICE: u.LIBELLE_SERVICE,
1069
+ LIBELLE_SERVICE: n.LIBELLE_SERVICE,
1069
1070
  // Which property of LIBELLE_SERVICE to use depends on the frontend.
1070
- TYPE: u.OUTIL ? "TIERS" : "NATIF",
1071
- OUTIL: u.OUTIL ? u.OUTIL : "",
1071
+ TYPE: n.OUTIL ? "TIERS" : "NATIF",
1072
+ OUTIL: n.OUTIL ? n.OUTIL : "",
1072
1073
  STRUCT_ID: r.collectiviteId,
1073
1074
  STRUCT_UAI: r.UAI,
1074
1075
  PROJET: r.projetId ? r.projetId : e.ID_PROJET,
@@ -1082,7 +1083,7 @@ class Analytics {
1082
1083
  class ConfigurationFramework {
1083
1084
  constructor() {
1084
1085
  //-------------------------------------
1085
- n(this, "Platform", {
1086
+ u(this, "Platform", {
1086
1087
  deploymentTag: "",
1087
1088
  cdnDomain: "",
1088
1089
  apps: new AppConf(),
@@ -1091,15 +1092,15 @@ class ConfigurationFramework {
1091
1092
  idiom: new Idiom(),
1092
1093
  listLanguages: () => transport.http.get("/languages")
1093
1094
  });
1094
- n(this, "School", {
1095
+ u(this, "School", {
1095
1096
  //apps; -> pinnedApps;
1096
1097
  });
1097
- n(this, "User", new User());
1098
+ u(this, "User", new User());
1098
1099
  }
1099
1100
  async initialize(e, t) {
1100
1101
  if (!e) {
1101
- const r = (h) => (h < 10 ? "0" : "") + h.toFixed(0), i = /* @__PURE__ */ new Date(), u = i.getFullYear(), a = i.getMonth() + 1, c = i.getDate();
1102
- e = `${u}${r(a)}${r(c)}`;
1102
+ const r = (h) => (h < 10 ? "0" : "") + h.toFixed(0), i = /* @__PURE__ */ new Date(), n = i.getFullYear(), a = i.getMonth() + 1, c = i.getDate();
1103
+ e = `${n}${r(a)}${r(c)}`;
1103
1104
  }
1104
1105
  const s = e;
1105
1106
  this.Platform.deploymentTag = e, typeof t == "string" && t.length > 0 && (this.Platform.cdnDomain = t), transport.http.setCdn(this.Platform.cdnDomain), await Promise.all([
@@ -1141,8 +1142,8 @@ var _;
1141
1142
  const me = (_ = session == null ? void 0 : session.session) == null ? void 0 : _.user;
1142
1143
  class Notification {
1143
1144
  constructor(e) {
1144
- n(this, "_id");
1145
- n(this, "model");
1145
+ u(this, "_id");
1146
+ u(this, "model");
1146
1147
  e.reported = e.reporters && e.reporters.length > 0, this._id = e._id, this.model = e;
1147
1148
  }
1148
1149
  isUnread() {
@@ -1162,14 +1163,14 @@ class Notification {
1162
1163
  class TimelineApp {
1163
1164
  constructor() {
1164
1165
  //-------------------------------------
1165
- n(this, "_notifications", []);
1166
- n(this, "_notificationTypes", []);
1166
+ u(this, "_notifications", []);
1167
+ u(this, "_notificationTypes", []);
1167
1168
  // ex: ["BLOG"]
1168
- n(this, "_flashMessages", []);
1169
- n(this, "_pageNumber", 0);
1170
- n(this, "_lastPage", !1);
1171
- n(this, "_loading", !1);
1172
- n(this, "showMine", !1);
1169
+ u(this, "_flashMessages", []);
1170
+ u(this, "_pageNumber", 0);
1171
+ u(this, "_lastPage", !1);
1172
+ u(this, "_loading", !1);
1173
+ u(this, "showMine", !1);
1173
1174
  }
1174
1175
  get notifications() {
1175
1176
  return this._notifications;
@@ -1190,20 +1191,20 @@ class TimelineApp {
1190
1191
  return this.preferences.type = this.preferences.type || [], this.preferences.type;
1191
1192
  }
1192
1193
  get preferences() {
1193
- return configure.User.preferences.get(APP$2.TIMELINE);
1194
+ return configure.User.preferences.get(APP$3.TIMELINE);
1194
1195
  }
1195
1196
  get flashMessages() {
1196
1197
  return this._flashMessages;
1197
1198
  }
1198
1199
  savePreferences() {
1199
- return configure.User.saveAppPrefs(APP$2.TIMELINE);
1200
+ return configure.User.saveAppPrefs(APP$3.TIMELINE);
1200
1201
  }
1201
1202
  resetPagination() {
1202
1203
  this._pageNumber = 0, this._lastPage = !1, this._loading = !1;
1203
1204
  }
1204
1205
  initialize() {
1205
1206
  return Promise.all([
1206
- configure.User.loadAppPrefs(APP$2.TIMELINE),
1207
+ configure.User.loadAppPrefs(APP$3.TIMELINE),
1207
1208
  transport.http.get("/timeline/types")
1208
1209
  ]).then((e) => {
1209
1210
  this._notificationTypes = e[1];
@@ -1227,10 +1228,10 @@ class TimelineApp {
1227
1228
  if (this._loading = !1, r.status === "ok")
1228
1229
  if (r.number && r.results) {
1229
1230
  const i = r.results.filter(
1230
- (u) => this._notifications.findIndex(
1231
- (a) => a._id === u._id
1231
+ (n) => this._notifications.findIndex(
1232
+ (a) => a._id === n._id
1232
1233
  ) === -1
1233
- ).map((u) => new Notification(u));
1234
+ ).map((n) => new Notification(n));
1234
1235
  this._notifications = this._notifications.concat(i), this._pageNumber++;
1235
1236
  } else
1236
1237
  this._lastPage = !0;
@@ -1318,7 +1319,7 @@ const f = class f {
1318
1319
  //
1319
1320
  // PROTECTED HELPERS
1320
1321
  //
1321
- n(this, "checkHttpResponse", (e) => {
1322
+ u(this, "checkHttpResponse", (e) => {
1322
1323
  if (this.http.latestResponse.status >= 300)
1323
1324
  throw this.http.latestResponse.statusText;
1324
1325
  return e;
@@ -1470,7 +1471,7 @@ const f = class f {
1470
1471
  });
1471
1472
  return t.map((r) => {
1472
1473
  const i = s.resources.find(
1473
- (u) => u.assetId === r
1474
+ (n) => n.assetId === r
1474
1475
  );
1475
1476
  if (i === void 0)
1476
1477
  throw "explorer.assetid.notfound";
@@ -1536,10 +1537,10 @@ const f = class f {
1536
1537
  //
1537
1538
  // STATIC REGISTRY
1538
1539
  //
1539
- n(f, "registry", new ServiceRegistry()), // Expose some useful functions
1540
- 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));
1540
+ u(f, "registry", new ServiceRegistry()), // Expose some useful functions
1541
+ 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
1542
  let ResourceService = f;
1542
- const APP$1 = "scrapbook", RESOURCE$1 = "scrapbook";
1543
+ const APP$2 = "scrapbook", RESOURCE$2 = "scrapbook";
1543
1544
  class ScrapbookResourceService extends ResourceService {
1544
1545
  create(e) {
1545
1546
  throw new Error("Method not implemented.");
@@ -1557,10 +1558,10 @@ class ScrapbookResourceService extends ResourceService {
1557
1558
  return this.checkHttpResponse(s), { thumbnail: t, entId: e.entId };
1558
1559
  }
1559
1560
  getResourceType() {
1560
- return RESOURCE$1;
1561
+ return RESOURCE$2;
1561
1562
  }
1562
1563
  getApplication() {
1563
- return APP$1;
1564
+ return APP$2;
1564
1565
  }
1565
1566
  getFormUrl(e) {
1566
1567
  return e ? `/scrapbook?folderid=${e}#/create-scrapbook/` : "/scrapbook#/create-scrapbook/";
@@ -1579,10 +1580,10 @@ class ScrapbookResourceService extends ResourceService {
1579
1580
  }
1580
1581
  }
1581
1582
  ResourceService.register(
1582
- { application: RESOURCE$1, resourceType: RESOURCE$1 },
1583
+ { application: RESOURCE$2, resourceType: RESOURCE$2 },
1583
1584
  (o) => new ScrapbookResourceService(o)
1584
1585
  );
1585
- const APP = "homeworks", RESOURCE = "homeworks";
1586
+ const APP$1 = "homeworks", RESOURCE$1 = "homeworks";
1586
1587
  class HomeworksResourceService extends ResourceService {
1587
1588
  async create(e) {
1588
1589
  const t = await this.getThumbnailPath(e.thumbnail), s = await this.http.post("/homeworks", {
@@ -1605,10 +1606,10 @@ class HomeworksResourceService extends ResourceService {
1605
1606
  return this.checkHttpResponse(s), { thumbnail: t, entId: e.entId };
1606
1607
  }
1607
1608
  getResourceType() {
1608
- return RESOURCE;
1609
+ return RESOURCE$1;
1609
1610
  }
1610
1611
  getApplication() {
1611
- return APP;
1612
+ return APP$1;
1612
1613
  }
1613
1614
  getFormUrl(e) {
1614
1615
  return e ? `/homeworks?folderid=${e}#/create-homeworks/` : "/homeworks#/create-homeworks/";
@@ -1627,9 +1628,64 @@ class HomeworksResourceService extends ResourceService {
1627
1628
  }
1628
1629
  }
1629
1630
  ResourceService.register(
1630
- { application: RESOURCE, resourceType: RESOURCE },
1631
+ { application: RESOURCE$1, resourceType: RESOURCE$1 },
1631
1632
  (o) => new HomeworksResourceService(o)
1632
1633
  );
1634
+ const APP = "timelinegenerator", RESOURCE = "timelinegenerator";
1635
+ class TimelineGeneratorResourceService extends ResourceService {
1636
+ async create(e) {
1637
+ const t = e.thumbnail ? await this.getThumbnailPath(e.thumbnail) : "", s = await this.http.post(
1638
+ "/timelinegenerator/timelines",
1639
+ {
1640
+ headline: e.name,
1641
+ text: e.description,
1642
+ icon: t,
1643
+ type: "default",
1644
+ folder: e.folder
1645
+ }
1646
+ );
1647
+ return this.checkHttpResponse(s), s;
1648
+ }
1649
+ async update(e) {
1650
+ const t = await this.getThumbnailPath(e.thumbnail), s = await this.http.put(
1651
+ `/timelinegenerator/timeline/${e.entId}`,
1652
+ {
1653
+ headline: e.name,
1654
+ text: e.description,
1655
+ icon: t,
1656
+ trashed: !!e.trashed,
1657
+ _id: e.entId,
1658
+ type: "default"
1659
+ }
1660
+ );
1661
+ return this.checkHttpResponse(s), { thumbnail: t, entId: e.entId };
1662
+ }
1663
+ getResourceType() {
1664
+ return RESOURCE;
1665
+ }
1666
+ getApplication() {
1667
+ return APP;
1668
+ }
1669
+ getFormUrl() {
1670
+ throw new Error("Method not implemented.");
1671
+ }
1672
+ getViewUrl(e) {
1673
+ return `/timelinegenerator#/view/${e}`;
1674
+ }
1675
+ getPrintUrl(e) {
1676
+ return `/timelinegenerator/print#/print/${e}`;
1677
+ }
1678
+ getEditUrl() {
1679
+ throw new Error("Method not implemented.");
1680
+ }
1681
+ getExportUrl() {
1682
+ throw new Error("Method not implemented.");
1683
+ }
1684
+ }
1685
+ ResourceService.register(
1686
+ { application: RESOURCE, resourceType: RESOURCE },
1687
+ (o) => new TimelineGeneratorResourceService(o)
1688
+ );
1633
1689
  const globalCache = {}, mutexPromise = {};
1634
1690
  class CacheService {
1635
1691
  constructor(e) {
@@ -1697,14 +1753,14 @@ class ConfService {
1697
1753
  ]), [r, i] = await Promise.all([
1698
1754
  this.getTheme({ conf: t, publicTheme: s === void 0 }),
1699
1755
  this.getWebAppConf({ app: e, applications: s ?? [] })
1700
- ]), u = {
1756
+ ]), n = {
1701
1757
  app: e,
1702
1758
  applications: s ?? [],
1703
1759
  conf: t,
1704
1760
  currentApp: i,
1705
1761
  theme: r
1706
1762
  };
1707
- return this.notify.onAppConfReady().resolve(u), u;
1763
+ return this.notify.onAppConfReady().resolve(n), n;
1708
1764
  }
1709
1765
  async getPublicConf(e) {
1710
1766
  const { response: t, value: s } = await this.cache.httpGet(
@@ -1758,23 +1814,23 @@ class ConfService {
1758
1814
  }) {
1759
1815
  const { value: r } = await this.cache.httpGet("/theme", {
1760
1816
  queryParams: { _: e }
1761
- }), i = s ? null : r, u = t == null ? void 0 : t.overriding.find(
1817
+ }), i = s ? null : r, n = t == null ? void 0 : t.overriding.find(
1762
1818
  (p) => (
1763
1819
  // Public access => simply use the 1st override
1764
1820
  i === null || p.child === i.themeName
1765
1821
  )
1766
- ), a = (i == null ? void 0 : i.skinName) || u.skins[0], c = (i == null ? void 0 : i.skin) || `/assets/themes/${u.child}/skins/${a}/`, h = u.skins, l = u.bootstrapVersion.split("-").slice(-1)[0], E = u.parent === "panda";
1822
+ ), 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";
1767
1823
  return {
1768
1824
  basePath: `${this.cdnDomain}${c}../../`,
1769
1825
  bootstrapVersion: l,
1770
1826
  is1d: E,
1771
1827
  logoutCallback: (i == null ? void 0 : i.logoutCallback) || "/",
1772
- skin: u.child,
1828
+ skin: n.child,
1773
1829
  skinName: a,
1774
1830
  skins: h,
1775
- themeName: u.child,
1831
+ themeName: n.child,
1776
1832
  themeUrl: c,
1777
- npmTheme: u.npmTheme ?? void 0
1833
+ npmTheme: n.npmTheme ?? void 0
1778
1834
  };
1779
1835
  }
1780
1836
  async getLogoutCallback(e) {
@@ -1819,13 +1875,13 @@ class DirectoryService {
1819
1875
  return {
1820
1876
  id: s,
1821
1877
  displayName: r,
1822
- groups: t.map(({ name: u, id: a }) => ({
1823
- displayName: u,
1878
+ groups: t.map(({ name: n, id: a }) => ({
1879
+ displayName: n,
1824
1880
  id: a
1825
1881
  })),
1826
- users: i.map(({ displayName: u, id: a, profile: c }) => ({
1882
+ users: i.map(({ displayName: n, id: a, profile: c }) => ({
1827
1883
  profile: c,
1828
- displayName: u,
1884
+ displayName: n,
1829
1885
  // these info are missing from api
1830
1886
  firstName: "",
1831
1887
  lastName: "",
@@ -1840,19 +1896,19 @@ class DirectoryService {
1840
1896
  users: r
1841
1897
  }) {
1842
1898
  this.cache.clearCache("/directory/sharebookmark/all");
1843
- const i = r.map((p) => typeof p == "string" ? p : p.id), u = s.map((p) => typeof p == "string" ? p : p.id), a = t.map(async (p) => {
1899
+ 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) => {
1844
1900
  if (typeof p == "string") {
1845
- 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);
1901
+ 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);
1846
1902
  return {
1847
1903
  displayName: d,
1848
1904
  id: A,
1849
- members: [...R, ...b]
1905
+ members: [...C, ...b]
1850
1906
  };
1851
1907
  } else
1852
1908
  return Promise.resolve(p);
1853
1909
  }), h = (await Promise.all(a)).map((p) => p.members).reduce((p, d) => [...p, ...d], []), l = {
1854
1910
  name: e,
1855
- members: [...i, ...u, ...h]
1911
+ members: [...i, ...n, ...h]
1856
1912
  }, { id: E } = await this.http.postJson(
1857
1913
  "/directory/sharebookmark",
1858
1914
  l
@@ -1868,10 +1924,10 @@ const loadedScripts = {};
1868
1924
  class HttpService {
1869
1925
  constructor(e, t) {
1870
1926
  // Axios automatically manages the XSRF-TOKEN cookie and the X-XSRF-TOKEN HTTP header.
1871
- n(this, "axios");
1872
- n(this, "baseUrl");
1873
- n(this, "headers", {});
1874
- n(this, "_latestResponse");
1927
+ u(this, "axios");
1928
+ u(this, "baseUrl");
1929
+ u(this, "headers", {});
1930
+ u(this, "_latestResponse");
1875
1931
  this.context = e, this.axios = axios.create(t);
1876
1932
  }
1877
1933
  fixBaseUrl(e) {
@@ -1916,15 +1972,15 @@ class HttpService {
1916
1972
  status: 500,
1917
1973
  statusText: ERROR_CODE.UNKNOWN
1918
1974
  };
1919
- const { status: s, statusText: r, headers: i, data: u } = this._latestResponse;
1975
+ const { status: s, statusText: r, headers: i, data: n } = this._latestResponse;
1920
1976
  return t != null && t.disableNotifications || notify.events().publish(LAYER_NAME.TRANSPORT, {
1921
1977
  name: EVENT_NAME.ERROR_OCCURED,
1922
1978
  data: {
1923
1979
  params: t,
1924
1980
  response: { status: s, statusText: r, headers: i },
1925
- payload: u
1981
+ payload: n
1926
1982
  }
1927
- }), u;
1983
+ }), n;
1928
1984
  }
1929
1985
  mapAxiosResponse(e, t) {
1930
1986
  return this._latestResponse = e, e.data;
@@ -2047,15 +2103,15 @@ class HttpService {
2047
2103
  }
2048
2104
  getScript(e, t, s) {
2049
2105
  const r = s ?? "exports", i = this.toAxiosConfig(t);
2050
- return i.headers && (i.headers.Accept = "application/javascript"), this.axios.get(this.toCdnUrl(e), i).then((u) => this.mapAxiosResponse(u, t)).then((u) => {
2106
+ return i.headers && (i.headers.Accept = "application/javascript"), this.axios.get(this.toCdnUrl(e), i).then((n) => this.mapAxiosResponse(n, t)).then((n) => {
2051
2107
  try {
2052
- const a = `"use strict";var ${r.split(".")[0]}={};${u};return ${r};`;
2108
+ const a = `"use strict";var ${r.split(".")[0]}={};${n};return ${r};`;
2053
2109
  return Function(a)();
2054
2110
  } catch {
2055
- return u;
2111
+ return n;
2056
2112
  }
2057
- }).catch((u) => {
2058
- throw this.mapAxiosError(u, t), u;
2113
+ }).catch((n) => {
2114
+ throw this.mapAxiosError(n, t), n;
2059
2115
  });
2060
2116
  }
2061
2117
  loadScript(e, t) {
@@ -2115,13 +2171,13 @@ class RightService {
2115
2171
  * @returns true if has rights
2116
2172
  */
2117
2173
  hasResourceRight({ id: e, groupIds: t }, s, r) {
2118
- const i = r.map((u) => typeof u == "string" ? this.parseResourceRight(u) : u).filter((u) => u !== void 0);
2119
- for (const u of i) {
2120
- if (u.id === e && u.type === "creator")
2174
+ const i = r.map((n) => typeof n == "string" ? this.parseResourceRight(n) : n).filter((n) => n !== void 0);
2175
+ for (const n of i) {
2176
+ if (n.id === e && n.type === "creator")
2121
2177
  return !0;
2122
- if (u.id === e && u.type === "user" && u.right === s)
2178
+ if (n.id === e && n.type === "user" && n.right === s)
2123
2179
  return !0;
2124
- if (t.includes(u.id) && u.type === "group" && u.right === s)
2180
+ if (t.includes(n.id) && n.type === "group" && n.right === s)
2125
2181
  return !0;
2126
2182
  }
2127
2183
  return !1;
@@ -2258,7 +2314,7 @@ class SessionService {
2258
2314
  s,
2259
2315
  r,
2260
2316
  i,
2261
- u
2317
+ n
2262
2318
  ] = await Promise.all([
2263
2319
  this.getCurrentLanguage(e),
2264
2320
  this.latestQuotaAndUsage(e),
@@ -2272,7 +2328,7 @@ class SessionService {
2272
2328
  currentLanguage: t,
2273
2329
  userDescription: r,
2274
2330
  userProfile: i,
2275
- bookmarkedApps: u
2331
+ bookmarkedApps: n
2276
2332
  };
2277
2333
  }
2278
2334
  login(e, t, s, r) {
@@ -2366,9 +2422,9 @@ class SessionService {
2366
2422
  applications: []
2367
2423
  });
2368
2424
  const i = [];
2369
- return r.bookmarks.forEach((u, a) => {
2425
+ return r.bookmarks.forEach((n, a) => {
2370
2426
  const c = ((e == null ? void 0 : e.apps) || []).find(
2371
- (h) => h.name === u
2427
+ (h) => h.name === n
2372
2428
  );
2373
2429
  if (c) {
2374
2430
  const h = Object.assign({}, c);
@@ -2378,8 +2434,8 @@ class SessionService {
2378
2434
  }
2379
2435
  async getUserProfile(e = {}) {
2380
2436
  var c, h;
2381
- const { options: t = {}, params: s = {} } = e, r = new URLSearchParams(s).toString(), i = `/userbook/api/person${r ? `?${r}` : ""}`, { response: u, value: a } = await this.cache.httpGet(i, t);
2382
- return u.status < 200 || u.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"];
2437
+ 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);
2438
+ 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"];
2383
2439
  }
2384
2440
  async isAdml() {
2385
2441
  const e = await this.getUser();
@@ -2426,7 +2482,7 @@ class ShareService {
2426
2482
  async searchShareSubjects(e, t, s) {
2427
2483
  const r = StringUtils.removeAccents(s).toLowerCase(), i = await this.cache.httpGetJson(
2428
2484
  `/${e}/share/json/${t}?search=${s}`
2429
- ), u = i.users.visibles.filter(({ username: l, firstName: E, lastName: p, login: d }) => {
2485
+ ), n = i.users.visibles.filter(({ username: l, firstName: E, lastName: p, login: d }) => {
2430
2486
  const g = StringUtils.removeAccents(
2431
2487
  p || ""
2432
2488
  ).toLowerCase(), A = StringUtils.removeAccents(
@@ -2459,7 +2515,7 @@ class ShareService {
2459
2515
  displayName: l.displayName,
2460
2516
  id: l.id,
2461
2517
  type: "sharebookmark"
2462
- })), ...u, ...a];
2518
+ })), ...n, ...a];
2463
2519
  }
2464
2520
  async getShareMapping(e) {
2465
2521
  const t = await this.cache.httpGetJson(
@@ -2473,15 +2529,15 @@ class ShareService {
2473
2529
  return t;
2474
2530
  }
2475
2531
  getActionsAvailableFor({ id: e, type: t }, s, r) {
2476
- const u = (t === "user" ? s.users.checked[e] : s.groups.checked[e]) || [], a = Object.keys(r), c = [];
2532
+ const n = (t === "user" ? s.users.checked[e] : s.groups.checked[e]) || [], a = Object.keys(r), c = [];
2477
2533
  for (const h of a)
2478
2534
  r[h].filter(
2479
- (p) => u.includes(p)
2535
+ (p) => n.includes(p)
2480
2536
  ).length > 0 && c.push(h);
2481
2537
  return c;
2482
2538
  }
2483
2539
  async getRightsForResource(e, t) {
2484
- const s = await this.directory.getBookMarks(), r = `/${e}/share/json/${t}?search=`, i = await this.cache.httpGetJson(r), u = await this.getShareMapping(e), a = await this.cache.httpGetJson(
2540
+ 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(
2485
2541
  "/infra/public/json/sharing-rights.json"
2486
2542
  ), c = Object.keys(i.users.checked).map((d) => i.users.visibles.find(
2487
2543
  (A) => A.id === d
@@ -2489,7 +2545,7 @@ class ShareService {
2489
2545
  const g = this.getActionsAvailableFor(
2490
2546
  { id: d.id, type: "user" },
2491
2547
  i,
2492
- u
2548
+ n
2493
2549
  );
2494
2550
  return {
2495
2551
  id: d.id,
@@ -2513,7 +2569,7 @@ class ShareService {
2513
2569
  const g = this.getActionsAvailableFor(
2514
2570
  { id: d.id, type: "group" },
2515
2571
  i,
2516
- u
2572
+ n
2517
2573
  );
2518
2574
  return {
2519
2575
  id: d.id,
@@ -2537,11 +2593,11 @@ class ShareService {
2537
2593
  id: g
2538
2594
  })
2539
2595
  ), p = i.users.visibles.map(
2540
- ({ id: d, profile: g, username: A, firstName: m, lastName: b, login: R }) => ({
2596
+ ({ id: d, profile: g, username: A, firstName: m, lastName: b, login: C }) => ({
2541
2597
  displayName: A,
2542
2598
  firstName: m,
2543
2599
  lastName: b,
2544
- login: R,
2600
+ login: C,
2545
2601
  profile: g,
2546
2602
  id: d
2547
2603
  })
@@ -2563,25 +2619,25 @@ class ShareService {
2563
2619
  const h = c.actions.map((E) => r[E.id]).reduce((E, p) => Array.isArray(p) ? [...E, ...p] : E, []), l = [...new Set(h)];
2564
2620
  l.length > 0 && (c.type === "user" ? i.users[c.id] = l : c.type === "group" ? i.groups[c.id] = l : i.bookmarks[c.id] = l);
2565
2621
  }
2566
- const u = `/${e}/share/resource/${t}`;
2567
- return this.cache.clearCache(`/${e}/share/json/${t}?search=`), await this.http.putJson(u, i);
2622
+ const n = `/${e}/share/resource/${t}`;
2623
+ return this.cache.clearCache(`/${e}/share/json/${t}?search=`), await this.http.putJson(n, i);
2568
2624
  }
2569
2625
  async getActionsForApp(e) {
2570
2626
  const t = await this.cache.httpGetJson(
2571
2627
  "/infra/public/json/sharing-rights.json"
2572
2628
  ), s = await this.getShareMapping(e);
2573
2629
  return Object.keys(t).map((i) => {
2574
- const u = t[i];
2630
+ const n = t[i];
2575
2631
  return {
2576
2632
  displayName: i,
2577
2633
  id: i,
2578
- priority: u.priority,
2579
- requires: u.requires
2634
+ priority: n.priority,
2635
+ requires: n.requires
2580
2636
  };
2581
2637
  }).filter((i) => {
2582
- var u;
2583
- return ((u = s[i.id]) == null ? void 0 : u.length) > 0;
2584
- }).sort((i, u) => i.priority - u.priority);
2638
+ var n;
2639
+ return ((n = s[i.id]) == null ? void 0 : n.length) > 0;
2640
+ }).sort((i, n) => i.priority - n.priority);
2585
2641
  }
2586
2642
  }
2587
2643
  const defaultMappers = {
@@ -2618,11 +2674,11 @@ const defaultMappers = {
2618
2674
  zip: function({ type: o }) {
2619
2675
  return o.indexOf("zip") !== -1 || o.indexOf("rar") !== -1 || o.indexOf("tar") !== -1 || o.indexOf("7z") !== -1;
2620
2676
  }
2621
- }, C = class C {
2677
+ }, R = class R {
2622
2678
  /* Similar role notion as in infra-front > workspace > Model.ts */
2623
2679
  static getRole(e) {
2624
2680
  var t, s;
2625
- return C.role(
2681
+ return R.role(
2626
2682
  (t = e.metadata) == null ? void 0 : t["content-type"],
2627
2683
  !1,
2628
2684
  (s = e.metadata) == null ? void 0 : s.extension
@@ -2634,18 +2690,18 @@ const defaultMappers = {
2634
2690
  this.roleMappers || console.warn("[DocumentHelper.role] should not have empty roles", this);
2635
2691
  const r = { type: e, previewRole: t, extension: s };
2636
2692
  for (const i of this.roleMappers) {
2637
- const u = i(r);
2638
- if (u)
2639
- return u;
2693
+ const n = i(r);
2694
+ if (n)
2695
+ return n;
2640
2696
  }
2641
2697
  return "unknown";
2642
2698
  }
2643
2699
  };
2644
2700
  // FIXME add edumedia support
2645
- n(C, "roleMappers", [
2701
+ u(R, "roleMappers", [
2646
2702
  (e) => Object.keys(defaultMappers).find((s) => defaultMappers[s](e))
2647
2703
  ]);
2648
- let DocumentHelper = C;
2704
+ let DocumentHelper = R;
2649
2705
  class WorkspaceService {
2650
2706
  constructor(e) {
2651
2707
  this.context = e;
@@ -2654,22 +2710,22 @@ class WorkspaceService {
2654
2710
  return this.context.http();
2655
2711
  }
2656
2712
  extractMetadata(e) {
2657
- const t = e.name || "", s = t.split("."), r = e.type || "application/octet-stream", i = s.length > 1 ? s[s.length - 1] : "", u = {
2713
+ const t = e.name || "", s = t.split("."), r = e.type || "application/octet-stream", i = s.length > 1 ? s[s.length - 1] : "", n = {
2658
2714
  "content-type": r,
2659
2715
  filename: t,
2660
2716
  size: e.size,
2661
2717
  extension: i,
2662
2718
  role: DocumentHelper.role(r, !1, i)
2663
- }, a = t.replace("." + u.extension, ""), c = u.extension ? a + "." + u.extension : a;
2664
- return { basename: a, fullname: c, metadata: u };
2719
+ }, a = t.replace("." + n.extension, ""), c = n.extension ? a + "." + n.extension : a;
2720
+ return { basename: a, fullname: c, metadata: n };
2665
2721
  }
2666
2722
  async saveFile(e, t) {
2667
2723
  const { fullname: s, metadata: r } = this.extractMetadata(e), i = new FormData();
2668
2724
  i.append("file", e, s);
2669
- const u = [];
2670
- ((t == null ? void 0 : t.visibility) === "public" || (t == null ? void 0 : t.visibility) === "protected") && u.push(`${t.visibility}=true`), t != null && t.application && u.push(`application=${t.application}`), r.role === "img" && u.push("quality=1"), t != null && t.parentId && u.push(`parentId=${t.parentId}`);
2725
+ const n = [];
2726
+ ((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}`);
2671
2727
  const a = await this.http.postFile(
2672
- `/workspace/document?${u.join("&")}`,
2728
+ `/workspace/document?${n.join("&")}`,
2673
2729
  i
2674
2730
  );
2675
2731
  if (this.http.isResponseError())
@@ -2677,13 +2733,13 @@ class WorkspaceService {
2677
2733
  return a;
2678
2734
  }
2679
2735
  async updateFile(e, t, s) {
2680
- const { fullname: r, metadata: i } = this.extractMetadata(t), u = new FormData();
2681
- u.append("file", t, r);
2736
+ const { fullname: r, metadata: i } = this.extractMetadata(t), n = new FormData();
2737
+ n.append("file", t, r);
2682
2738
  const a = [];
2683
2739
  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}`);
2684
2740
  const c = await this.http.putFile(
2685
2741
  `/workspace/document/${e}?${a.join("&")}`,
2686
- u
2742
+ n
2687
2743
  );
2688
2744
  if (this.http.isResponseError())
2689
2745
  throw this.http.latestResponse.statusText;
@@ -2728,17 +2784,17 @@ class WorkspaceService {
2728
2784
  {
2729
2785
  application: t,
2730
2786
  visibility: s,
2731
- ids: r.map((u) => u._id)
2787
+ ids: r.map((n) => n._id)
2732
2788
  }
2733
2789
  );
2734
2790
  if (this.http.isResponseError())
2735
2791
  throw this.http.latestResponse.statusText;
2736
- return r.forEach((u, a) => {
2792
+ return r.forEach((n, a) => {
2737
2793
  const c = e.findIndex(
2738
- (h) => h._id === u._id
2794
+ (h) => h._id === n._id
2739
2795
  );
2740
2796
  0 <= c && c < e.length && (e[c] = i[a]);
2741
- }), e.filter((u) => !!u);
2797
+ }), e.filter((n) => !!n);
2742
2798
  }
2743
2799
  return e;
2744
2800
  }
@@ -2747,13 +2803,13 @@ class WorkspaceService {
2747
2803
  * or `null` if none exists or can be created.
2748
2804
  */
2749
2805
  getThumbnailUrl(e, t = 0, s = 0) {
2750
- var i, u;
2806
+ var i, n;
2751
2807
  const r = t > 0 || s > 0 ? `${t}x${s}` : "120x120";
2752
2808
  if (typeof e == "string")
2753
2809
  return e.includes("data:image") || e.includes("thumbnail") ? e : `${e}${e.includes("?") ? "&" : "?"}thumbnail=${r}`;
2754
2810
  {
2755
2811
  const a = `/workspace/${e.public ? "pub/" : ""}document/${e._id}?thumbnail=`, c = e.thumbnails;
2756
- if ((u = (i = e.metadata) == null ? void 0 : i["content-type"]) != null && u.includes("video")) {
2812
+ if ((n = (i = e.metadata) == null ? void 0 : i["content-type"]) != null && n.includes("video")) {
2757
2813
  const h = c && Object.keys(c).length > 0 ? Object.keys(c)[0] : null;
2758
2814
  return h ? a + h : null;
2759
2815
  } else
@@ -3007,8 +3063,8 @@ class IdiomService {
3007
3063
  else {
3008
3064
  const i = new Promisified();
3009
3065
  promises[t] = i.promise;
3010
- const u = {};
3011
- e && (u["Accept-Language"] = e), this.http.get(t, { headers: u }).then((a) => {
3066
+ const n = {};
3067
+ e && (n["Accept-Language"] = e), this.http.get(t, { headers: n }).then((a) => {
3012
3068
  Object.assign(bundle, a), typeof s == "function" && s(), i.resolve();
3013
3069
  }).catch((a) => {
3014
3070
  typeof s == "function" && s(), i.reject();
@@ -3131,8 +3187,8 @@ class AnalyticsService {
3131
3187
  if (!r || !r.active) return;
3132
3188
  const i = await configure.Platform.apps.getPublicConf(e);
3133
3189
  if (!i) return;
3134
- const u = i.xiti;
3135
- if (!u || !u.LIBELLE_SERVICE || !r.UAI) return;
3190
+ const n = i.xiti;
3191
+ if (!n || !n.LIBELLE_SERVICE || !r.UAI) return;
3136
3192
  function a(h) {
3137
3193
  let l = "";
3138
3194
  for (let E = 0; E < h.length; E++)
@@ -3147,10 +3203,10 @@ class AnalyticsService {
3147
3203
  Guest: "AUTRE"
3148
3204
  };
3149
3205
  return {
3150
- LIBELLE_SERVICE: u.LIBELLE_SERVICE,
3206
+ LIBELLE_SERVICE: n.LIBELLE_SERVICE,
3151
3207
  // Which property of LIBELLE_SERVICE to use depends on the frontend.
3152
- TYPE: u.OUTIL ? "TIERS" : "NATIF",
3153
- OUTIL: u.OUTIL ? u.OUTIL : "",
3208
+ TYPE: n.OUTIL ? "TIERS" : "NATIF",
3209
+ OUTIL: n.OUTIL ? n.OUTIL : "",
3154
3210
  STRUCT_ID: r.collectiviteId,
3155
3211
  STRUCT_UAI: r.UAI,
3156
3212
  PROJET: r.projetId ? r.projetId : o.ID_PROJET,
@@ -3179,7 +3235,7 @@ const w = class w {
3179
3235
  async getVideoConf() {
3180
3236
  var t;
3181
3237
  const e = await this.conf.getPublicConf(
3182
- APP$2.VIDEO
3238
+ APP$3.VIDEO
3183
3239
  );
3184
3240
  return {
3185
3241
  maxWeight: (e == null ? void 0 : e["max-videosize-mbytes"]) ?? w.MAX_WEIGHT,
@@ -3204,13 +3260,13 @@ const w = class w {
3204
3260
  throw new Error("Invalid video file.");
3205
3261
  if (!e.filename)
3206
3262
  throw new Error("Invalid video filename");
3207
- const i = `${e.browser.name} ${e.browser.version}`, u = new FormData();
3208
- u.append("device", e.device || ""), u.append("browser", i), u.append("url", e.url), u.append("app", t), u.append("file", e.file, e.filename), u.append("weight", "" + e.file.size), u.append("captation", "" + s);
3263
+ const i = `${e.browser.name} ${e.browser.version}`, n = new FormData();
3264
+ 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);
3209
3265
  let a = `/video/encode?captation=${s}`;
3210
3266
  r && (a += `&duration=${r}`);
3211
3267
  const c = await this.http.post(
3212
3268
  a,
3213
- u,
3269
+ n,
3214
3270
  { headers: { "Content-Type": "multipart/form-data" } }
3215
3271
  );
3216
3272
  if (c.state == "running") {
@@ -3240,8 +3296,8 @@ const w = class w {
3240
3296
  throw new Error("Video cannot be uploaded.");
3241
3297
  }
3242
3298
  };
3243
- n(w, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
3244
- n(w, "MAX_DURATION", 3);
3299
+ u(w, "MAX_WEIGHT", 50), // in Mbytes. Applies to uploaded videos.
3300
+ u(w, "MAX_DURATION", 3);
3245
3301
  let VideoService = w;
3246
3302
  class EmbedderService {
3247
3303
  constructor(e) {
@@ -3278,9 +3334,9 @@ class EmbedderService {
3278
3334
  urlIsFromPattern(e, t) {
3279
3335
  const s = new RegExp("[^{}]+(?=(?:[^{}]*{[^}]*})*[^}]*$)", "g"), r = new RegExp("{[^}]*}", "g");
3280
3336
  let i = !0;
3281
- const u = t.match(s) || [], a = [];
3337
+ const n = t.match(s) || [], a = [];
3282
3338
  return (t.match(r) || []).forEach((h, l) => {
3283
- h.includes("ignore") || a.push(u[l]);
3339
+ h.includes("ignore") || a.push(n[l]);
3284
3340
  }), a.forEach((h) => {
3285
3341
  if (!e.includes(h)) {
3286
3342
  i = !1;
@@ -3311,7 +3367,7 @@ class EmbedderService {
3311
3367
  for (const s of e.url)
3312
3368
  if (this.urlIsFromPattern(t, s)) {
3313
3369
  const r = new RegExp("{[a-zA-Z0-9_.]+}", "g"), i = s.match(r) || [];
3314
- let u = e.embed;
3370
+ let n = e.embed;
3315
3371
  for (const a of i) {
3316
3372
  let c = s.split(a)[0];
3317
3373
  const h = c.split("}");
@@ -3322,9 +3378,9 @@ class EmbedderService {
3322
3378
  const E = s.split(a)[1].split("{")[0];
3323
3379
  E && (l = l.split(E)[0]);
3324
3380
  const p = new RegExp("\\" + a.replace(/}/, "\\}"), "g");
3325
- u = u.replace(p, l);
3381
+ n = n.replace(p, l);
3326
3382
  }
3327
- return u;
3383
+ return n;
3328
3384
  }
3329
3385
  return "";
3330
3386
  }
@@ -3337,7 +3393,7 @@ class AbstractBehaviourService {
3337
3393
  //-----------------
3338
3394
  //--- Utilities ---
3339
3395
  //-----------------
3340
- n(this, "_cache");
3396
+ u(this, "_cache");
3341
3397
  this.context = e, this._cache = new CacheService(this.context);
3342
3398
  }
3343
3399
  getApplication() {
@@ -3371,8 +3427,8 @@ class AbstractBehaviourService {
3371
3427
  class ActualitesBehaviour extends AbstractBehaviourService {
3372
3428
  constructor() {
3373
3429
  super(...arguments);
3374
- n(this, "APP", "actualites");
3375
- n(this, "RESOURCE", "actualites");
3430
+ u(this, "APP", "actualites");
3431
+ u(this, "RESOURCE", "actualites");
3376
3432
  }
3377
3433
  async loadResources() {
3378
3434
  return (await this.httpGet(
@@ -3395,24 +3451,24 @@ class ActualitesBehaviour extends AbstractBehaviourService {
3395
3451
  class BlogBehaviour extends AbstractBehaviourService {
3396
3452
  constructor() {
3397
3453
  super(...arguments);
3398
- n(this, "APP", "blog");
3399
- n(this, "RESOURCE", "blog");
3454
+ u(this, "APP", "blog");
3455
+ u(this, "RESOURCE", "blog");
3400
3456
  }
3401
3457
  loadResources() {
3402
3458
  return new Promise(async (t, s) => {
3403
3459
  try {
3404
3460
  const r = await this.httpGet("/blog/linker"), i = [];
3405
- r.forEach((u) => {
3406
- u.thumbnail ? u.thumbnail = u.thumbnail + "?thumbnail=48x48" : u.thumbnail = "/img/illustrations/blog.svg";
3407
- const a = u.fetchPosts.map((c) => this.dataToResource({
3408
- owner: u.author.userId,
3409
- ownerName: u.author.username,
3410
- title: c.title + " [" + u.title + "]",
3411
- _id: `${u._id}#${c._id}`,
3412
- icon: u.thumbnail,
3413
- path: `/blog/id/${u._id}/post/${c._id}`,
3414
- shared: !!(u.shared && u.shared.length >= 0),
3415
- modified: u.modified
3461
+ r.forEach((n) => {
3462
+ n.thumbnail ? n.thumbnail = n.thumbnail + "?thumbnail=48x48" : n.thumbnail = "/img/illustrations/blog.svg";
3463
+ const a = n.fetchPosts.map((c) => this.dataToResource({
3464
+ owner: n.author.userId,
3465
+ ownerName: n.author.username,
3466
+ title: c.title + " [" + n.title + "]",
3467
+ _id: `${n._id}#${c._id}`,
3468
+ icon: n.thumbnail,
3469
+ path: `/blog/id/${n._id}/post/${c._id}`,
3470
+ shared: !!(n.shared && n.shared.length >= 0),
3471
+ modified: n.modified
3416
3472
  }));
3417
3473
  i.push(...a);
3418
3474
  }), t(i);
@@ -3425,8 +3481,8 @@ class BlogBehaviour extends AbstractBehaviourService {
3425
3481
  class CollaborativewallBehaviour extends AbstractBehaviourService {
3426
3482
  constructor() {
3427
3483
  super(...arguments);
3428
- n(this, "APP", "collaborativewall");
3429
- n(this, "RESOURCE", "collaborativewall");
3484
+ u(this, "APP", "collaborativewall");
3485
+ u(this, "RESOURCE", "collaborativewall");
3430
3486
  }
3431
3487
  async loadResources() {
3432
3488
  return (await this.httpGet(
@@ -3448,8 +3504,8 @@ class CollaborativewallBehaviour extends AbstractBehaviourService {
3448
3504
  class CommunityBehaviour extends AbstractBehaviourService {
3449
3505
  constructor() {
3450
3506
  super(...arguments);
3451
- n(this, "APP", "community");
3452
- n(this, "RESOURCE", "community");
3507
+ u(this, "APP", "community");
3508
+ u(this, "RESOURCE", "community");
3453
3509
  }
3454
3510
  async loadResources() {
3455
3511
  return (await this.httpGet(
@@ -3473,23 +3529,23 @@ class CommunityBehaviour extends AbstractBehaviourService {
3473
3529
  class ExercizerBehaviour extends AbstractBehaviourService {
3474
3530
  constructor() {
3475
3531
  super(...arguments);
3476
- n(this, "APP", "exercizer");
3477
- n(this, "RESOURCE", "exercizer");
3532
+ u(this, "APP", "exercizer");
3533
+ u(this, "RESOURCE", "exercizer");
3478
3534
  }
3479
3535
  async loadResources() {
3480
3536
  return (await this.httpGet(
3481
3537
  "/exercizer/subjects-scheduled"
3482
3538
  )).map((s) => {
3483
3539
  const r = s.picture ? s.picture + "?thumbnail=48x48" : "/img/illustrations/exercizer.svg";
3484
- let i, u = !1, a = JSON.parse(s.scheduled_at);
3485
- return a.groupList.length > 0 ? (u = !0, i = a.groupList[0].name) : a.userList.length > 0 ? (u = !0, i = a.userList[0].name) : i = "", a.groupList.length + a.userList.length > 1 && (i += "..."), this.dataToResource({
3540
+ let i, n = !1, a = JSON.parse(s.scheduled_at);
3541
+ 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({
3486
3542
  title: s.title,
3487
3543
  owner: s.owner,
3488
3544
  ownerName: i,
3489
3545
  icon: r,
3490
3546
  path: "/exercizer#/linker/" + s.id,
3491
3547
  _id: "" + s.id,
3492
- shared: u,
3548
+ shared: n,
3493
3549
  modified: s.modified
3494
3550
  });
3495
3551
  });
@@ -3498,8 +3554,8 @@ class ExercizerBehaviour extends AbstractBehaviourService {
3498
3554
  class FormulaireBehaviour extends AbstractBehaviourService {
3499
3555
  constructor() {
3500
3556
  super(...arguments);
3501
- n(this, "APP", "formulaire");
3502
- n(this, "RESOURCE", "formulaire");
3557
+ u(this, "APP", "formulaire");
3558
+ u(this, "RESOURCE", "formulaire");
3503
3559
  }
3504
3560
  async loadResources() {
3505
3561
  return (await this.httpGet(
@@ -3519,8 +3575,8 @@ class FormulaireBehaviour extends AbstractBehaviourService {
3519
3575
  class ForumBehaviour extends AbstractBehaviourService {
3520
3576
  constructor() {
3521
3577
  super(...arguments);
3522
- n(this, "APP", "forum");
3523
- n(this, "RESOURCE", "forum");
3578
+ u(this, "APP", "forum");
3579
+ u(this, "RESOURCE", "forum");
3524
3580
  }
3525
3581
  async loadResources() {
3526
3582
  return (await this.httpGet("/forum/categories")).map(
@@ -3540,8 +3596,8 @@ class ForumBehaviour extends AbstractBehaviourService {
3540
3596
  class HomeworksBehaviour extends AbstractBehaviourService {
3541
3597
  constructor() {
3542
3598
  super(...arguments);
3543
- n(this, "APP", "homeworks");
3544
- n(this, "RESOURCE", "homeworks");
3599
+ u(this, "APP", "homeworks");
3600
+ u(this, "RESOURCE", "homeworks");
3545
3601
  }
3546
3602
  async loadResources() {
3547
3603
  return (await this.httpGet("/homeworks/list")).filter((t) => t.owner && t.trashed === 0).map((t) => this.dataToResource({
@@ -3559,8 +3615,8 @@ class HomeworksBehaviour extends AbstractBehaviourService {
3559
3615
  class MagnetoBehaviour extends AbstractBehaviourService {
3560
3616
  constructor() {
3561
3617
  super(...arguments);
3562
- n(this, "APP", "magneto");
3563
- n(this, "RESOURCE", "magneto");
3618
+ u(this, "APP", "magneto");
3619
+ u(this, "RESOURCE", "magneto");
3564
3620
  }
3565
3621
  async loadResources() {
3566
3622
  const { all: t } = await this.httpGet(
@@ -3581,8 +3637,8 @@ class MagnetoBehaviour extends AbstractBehaviourService {
3581
3637
  class MindmapBehaviour extends AbstractBehaviourService {
3582
3638
  constructor() {
3583
3639
  super(...arguments);
3584
- n(this, "APP", "mindmap");
3585
- n(this, "RESOURCE", "mindmap");
3640
+ u(this, "APP", "mindmap");
3641
+ u(this, "RESOURCE", "mindmap");
3586
3642
  }
3587
3643
  async loadResources() {
3588
3644
  return (await this.httpGet("/mindmap/list/all")).map(
@@ -3602,13 +3658,13 @@ class MindmapBehaviour extends AbstractBehaviourService {
3602
3658
  class PagesBehaviour extends AbstractBehaviourService {
3603
3659
  constructor() {
3604
3660
  super(...arguments);
3605
- n(this, "APP", "pages");
3606
- n(this, "RESOURCE", "pages");
3661
+ u(this, "APP", "pages");
3662
+ u(this, "RESOURCE", "pages");
3607
3663
  }
3608
3664
  async loadResources() {
3609
3665
  const t = await this.httpGet("/pages/list/all"), s = [];
3610
3666
  return t.forEach((r) => {
3611
- var u;
3667
+ var n;
3612
3668
  const i = r.thumbnail ? r.thumbnail + "?thumbnail=48x48" : "/img/illustrations/pages.svg";
3613
3669
  s.push(
3614
3670
  this.dataToResource({
@@ -3621,7 +3677,7 @@ class PagesBehaviour extends AbstractBehaviourService {
3621
3677
  shared: typeof r.shared < "u",
3622
3678
  modified: r.modified
3623
3679
  })
3624
- ), (u = r.pages) == null || u.forEach((a) => {
3680
+ ), (n = r.pages) == null || n.forEach((a) => {
3625
3681
  s.push(
3626
3682
  this.dataToResource({
3627
3683
  title: a.title,
@@ -3641,8 +3697,8 @@ class PagesBehaviour extends AbstractBehaviourService {
3641
3697
  class PollBehaviour extends AbstractBehaviourService {
3642
3698
  constructor() {
3643
3699
  super(...arguments);
3644
- n(this, "APP", "poll");
3645
- n(this, "RESOURCE", "poll");
3700
+ u(this, "APP", "poll");
3701
+ u(this, "RESOURCE", "poll");
3646
3702
  }
3647
3703
  async loadResources() {
3648
3704
  return (await this.httpGet("/poll/list/all")).map((s) => {
@@ -3663,8 +3719,8 @@ class PollBehaviour extends AbstractBehaviourService {
3663
3719
  class ScrapbookBehaviour extends AbstractBehaviourService {
3664
3720
  constructor() {
3665
3721
  super(...arguments);
3666
- n(this, "APP", "scrapbook");
3667
- n(this, "RESOURCE", "scrapbook");
3722
+ u(this, "APP", "scrapbook");
3723
+ u(this, "RESOURCE", "scrapbook");
3668
3724
  }
3669
3725
  async loadResources() {
3670
3726
  return (await this.httpGet(
@@ -3687,25 +3743,25 @@ class ScrapbookBehaviour extends AbstractBehaviourService {
3687
3743
  class TimelinegeneratorBehaviour extends AbstractBehaviourService {
3688
3744
  constructor() {
3689
3745
  super(...arguments);
3690
- n(this, "APP", "timelinegenerator");
3691
- n(this, "RESOURCE", "timelinegenerator");
3746
+ u(this, "APP", "timelinegenerator");
3747
+ u(this, "RESOURCE", "timelinegenerator");
3692
3748
  }
3693
3749
  loadResources() {
3694
3750
  return new Promise(async (t, s) => {
3695
3751
  try {
3696
3752
  const i = (await this.httpGet(
3697
3753
  "/timelinegenerator/timelines"
3698
- )).map((u) => {
3699
- const a = u.icon || "/img/illustrations/timeline-default.png";
3754
+ )).map((n) => {
3755
+ const a = n.icon || "/img/illustrations/timeline-default.png";
3700
3756
  return this.dataToResource({
3701
- title: u.headline,
3702
- ownerName: u.owner.displayName,
3703
- owner: u.owner.userId,
3757
+ title: n.headline,
3758
+ ownerName: n.owner.displayName,
3759
+ owner: n.owner.userId,
3704
3760
  icon: a,
3705
- path: "/timelinegenerator#/view/" + u._id,
3706
- _id: u._id,
3707
- shared: typeof u.shared < "u",
3708
- modified: u.modified
3761
+ path: "/timelinegenerator#/view/" + n._id,
3762
+ _id: n._id,
3763
+ shared: typeof n.shared < "u",
3764
+ modified: n.modified
3709
3765
  });
3710
3766
  });
3711
3767
  t(i);
@@ -3718,8 +3774,8 @@ class TimelinegeneratorBehaviour extends AbstractBehaviourService {
3718
3774
  class WikiBehaviour extends AbstractBehaviourService {
3719
3775
  constructor() {
3720
3776
  super(...arguments);
3721
- n(this, "APP", "wiki");
3722
- n(this, "RESOURCE", "wiki");
3777
+ u(this, "APP", "wiki");
3778
+ u(this, "RESOURCE", "wiki");
3723
3779
  }
3724
3780
  async loadResources() {
3725
3781
  return (await this.httpGet(
@@ -3742,15 +3798,15 @@ class WikiBehaviour extends AbstractBehaviourService {
3742
3798
  class WorkspaceBehaviour extends AbstractBehaviourService {
3743
3799
  constructor() {
3744
3800
  super(...arguments);
3745
- n(this, "APP", "workspace");
3746
- n(this, "RESOURCE", "workspace");
3801
+ u(this, "APP", "workspace");
3802
+ u(this, "RESOURCE", "workspace");
3747
3803
  }
3748
3804
  loadResources({ search: t, asset_id: s }) {
3749
3805
  return new Promise(async (r, i) => {
3750
3806
  try {
3751
- let u = "/workspace/documents?filter=all&hierarchical=true";
3752
- s && s.length ? u += `&search=${t}` : t && t.length && (u += `&search=${t}`);
3753
- const c = (await this.httpGet(u)).filter((h) => !h.deleted).map((h) => {
3807
+ let n = "/workspace/documents?filter=all&hierarchical=true";
3808
+ s && s.length ? n += `&search=${t}` : t && t.length && (n += `&search=${t}`);
3809
+ const c = (await this.httpGet(n)).filter((h) => !h.deleted).map((h) => {
3754
3810
  const l = h.metadata["content-type"] && h.metadata["content-type"].indexOf("image") !== -1 ? `/workspace/document/${h._id}?thumbnail=120x120` : "/img/icons/unknown-large.png";
3755
3811
  return this.dataToResource({
3756
3812
  title: h.name,
@@ -3764,8 +3820,8 @@ class WorkspaceBehaviour extends AbstractBehaviourService {
3764
3820
  });
3765
3821
  });
3766
3822
  r(c);
3767
- } catch (u) {
3768
- i(u);
3823
+ } catch (n) {
3824
+ i(n);
3769
3825
  }
3770
3826
  });
3771
3827
  }
@@ -3781,7 +3837,7 @@ const y = class y {
3781
3837
  e.session().getUser()
3782
3838
  ]);
3783
3839
  i != null && i.apps && (r != null && r.length) && (this.resourceProducingApps = r.filter(
3784
- (u) => i.apps.some((a) => a.address.includes(u))
3840
+ (n) => i.apps.some((a) => a.address.includes(n))
3785
3841
  ));
3786
3842
  } catch (r) {
3787
3843
  console.warn("Failed to load resource-producing apps:", r);
@@ -3858,13 +3914,13 @@ const y = class y {
3858
3914
  //
3859
3915
  // STATIC REGISTRY
3860
3916
  //
3861
- n(y, "registry", new ServiceRegistry()), // Expose some useful functions
3862
- n(y, "findBehaviour", y.registry.findService.bind(y.registry)), n(y, "hasBehaviour", y.registry.isRegistered.bind(y.registry)), n(y, "resourceProducingApps", []);
3917
+ u(y, "registry", new ServiceRegistry()), // Expose some useful functions
3918
+ u(y, "findBehaviour", y.registry.findService.bind(y.registry)), u(y, "hasBehaviour", y.registry.isRegistered.bind(y.registry)), u(y, "resourceProducingApps", []);
3863
3919
  let SnipletsService = y;
3864
3920
  const SEND_ALL = "*";
3865
3921
  class WebBroker {
3866
3922
  constructor(e) {
3867
- n(this, "subscription");
3923
+ u(this, "subscription");
3868
3924
  this.odeServices = e;
3869
3925
  }
3870
3926
  get http() {
@@ -3896,10 +3952,10 @@ class WebBroker {
3896
3952
  }
3897
3953
  class DataService {
3898
3954
  constructor(e) {
3899
- n(this, "_webBroker");
3900
- n(this, "app");
3901
- n(this, "user");
3902
- n(this, "profile");
3955
+ u(this, "_webBroker");
3956
+ u(this, "app");
3957
+ u(this, "user");
3958
+ u(this, "profile");
3903
3959
  this.odeServices = e;
3904
3960
  }
3905
3961
  get conf() {
@@ -3933,12 +3989,12 @@ class DataService {
3933
3989
  addUserInfos(e) {
3934
3990
  return this.user && (e.userId = this.user.userId, e.structure = this.user.structureNames[0]), this.profile && (e.profil = this.profile[0]), e;
3935
3991
  }
3936
- trackVideoSave(e, t, s, r, i, u, a) {
3992
+ trackVideoSave(e, t, s, r, i, n, a) {
3937
3993
  const c = this.addUserInfos({
3938
3994
  "event-type": "VIDEO_SAVE",
3939
3995
  module: "video",
3940
3996
  video_id: e,
3941
- browser: u,
3997
+ browser: n,
3942
3998
  duration: Math.round(t),
3943
3999
  weight: s,
3944
4000
  source: r ? "CAPTURED" : "UPLOADED",
@@ -3947,7 +4003,7 @@ class DataService {
3947
4003
  this.app && (c["override-module"] = this.app), a && (c.device_type = a), this.trackWebEvent(c);
3948
4004
  }
3949
4005
  trackVideoRead(e, t, s, r, i) {
3950
- const u = this.addUserInfos({
4006
+ const n = this.addUserInfos({
3951
4007
  "event-type": "VIDEO_READ",
3952
4008
  module: "video",
3953
4009
  video_id: e,
@@ -3955,7 +4011,7 @@ class DataService {
3955
4011
  source: t ? "CAPTURED" : "UPLOADED",
3956
4012
  url: s
3957
4013
  });
3958
- this.app && (u["override-module"] = this.app), i && (u.device_type = i), this.trackWebEvent(u);
4014
+ this.app && (n["override-module"] = this.app), i && (n.device_type = i), this.trackWebEvent(n);
3959
4015
  }
3960
4016
  trackSpeechAndText(e) {
3961
4017
  const t = this.addUserInfos({
@@ -4061,20 +4117,20 @@ class AudienceService {
4061
4117
  }
4062
4118
  class OdeServices {
4063
4119
  constructor() {
4064
- n(this, "_analytics");
4065
- n(this, "_cache");
4066
- n(this, "_conf");
4067
- n(this, "_data");
4068
- n(this, "_directory");
4069
- n(this, "_http");
4070
- n(this, "_idiom");
4071
- n(this, "_notify");
4072
- n(this, "_rights");
4073
- n(this, "_session");
4074
- n(this, "_share");
4075
- n(this, "_video");
4076
- n(this, "_workspace");
4077
- n(this, "_embedder");
4120
+ u(this, "_analytics");
4121
+ u(this, "_cache");
4122
+ u(this, "_conf");
4123
+ u(this, "_data");
4124
+ u(this, "_directory");
4125
+ u(this, "_http");
4126
+ u(this, "_idiom");
4127
+ u(this, "_notify");
4128
+ u(this, "_rights");
4129
+ u(this, "_session");
4130
+ u(this, "_share");
4131
+ u(this, "_video");
4132
+ u(this, "_workspace");
4133
+ u(this, "_embedder");
4078
4134
  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);
4079
4135
  }
4080
4136
  initialize() {
@@ -4276,10 +4332,10 @@ const isActionAvailable = (o, e) => {
4276
4332
  class WidgetFramework {
4277
4333
  constructor() {
4278
4334
  //-------------------------------------
4279
- n(this, "_initialized");
4280
- n(this, "_widgets", []);
4335
+ u(this, "_initialized");
4336
+ u(this, "_widgets", []);
4281
4337
  ////////////////////////////////////// USER PREFERENCES
4282
- n(this, "_userPrefs", {});
4338
+ u(this, "_userPrefs", {});
4283
4339
  }
4284
4340
  initialize(e, t) {
4285
4341
  return this._initialized || (this._initialized = new Promisified(), notify.onSessionReady().promise.then((s) => {
@@ -4290,8 +4346,8 @@ class WidgetFramework {
4290
4346
  var i;
4291
4347
  (i = this._initialized) == null || i.resolve();
4292
4348
  }).catch((i) => {
4293
- var u;
4294
- (u = this._initialized) == null || u.reject();
4349
+ var n;
4350
+ (n = this._initialized) == null || n.reject();
4295
4351
  })) : (r = this._initialized) == null || r.reject();
4296
4352
  })), this._initialized.promise;
4297
4353
  }
@@ -4332,9 +4388,9 @@ class WidgetFramework {
4332
4388
  position: c.platformConf.position
4333
4389
  }), 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);
4334
4390
  });
4335
- const u = new Idiom();
4391
+ const n = new Idiom();
4336
4392
  this._widgets = this._widgets.sort((c, h) => {
4337
- const l = u.translate(`timeline.settings.${c.platformConf.name}`).toLowerCase(), E = u.translate(`timeline.settings.${h.platformConf.name}`).toLowerCase();
4393
+ const l = n.translate(`timeline.settings.${c.platformConf.name}`).toLowerCase(), E = n.translate(`timeline.settings.${h.platformConf.name}`).toLowerCase();
4338
4394
  return l < E ? -1 : l > E ? 1 : 0;
4339
4395
  });
4340
4396
  });
@@ -4343,8 +4399,8 @@ class WidgetFramework {
4343
4399
  class Widget {
4344
4400
  //-------------------------------------
4345
4401
  constructor(e) {
4346
- n(this, "_schoolConf", {});
4347
- n(this, "_userPref");
4402
+ u(this, "_schoolConf", {});
4403
+ u(this, "_userPref");
4348
4404
  this._platformConf = e, this._userPref = null;
4349
4405
  }
4350
4406
  get platformConf() {
@@ -4403,7 +4459,7 @@ class WidgetFrameworkFactory {
4403
4459
  }
4404
4460
  export {
4405
4461
  ACTION,
4406
- APP$2 as APP,
4462
+ APP$3 as APP,
4407
4463
  BOOLEAN_FILTER,
4408
4464
  ConfigurationFrameworkFactory,
4409
4465
  DocumentHelper,