sass-cms-template-common 0.0.10 → 0.0.12

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.
@@ -1,52 +1,182 @@
1
1
  //#region src/lib/theme/variables.ts
2
- var e = {
3
- primary: "#0067C4",
4
- primaryHover: "#005CAF",
5
- primaryDisabled: "#1D1B201A",
6
- secondary: "#D8E2FF",
7
- secondaryHover: "#E1E2EA",
8
- onSecondaryContainer: "#2C4678",
9
- secondaryStrong: "#455E91",
10
- controlBorder: "#727784",
11
- controlText: "#000000",
12
- controlHoverBg: "#F9F9FF",
13
- whiteBtnBorder: "#DDDDDD",
14
- whiteBtnText: "#515253",
15
- iconButtonHoverBg: "#E6E6E6",
16
- iconButtonIcon: "#929193",
17
- menuSurface: "#ECEDF6",
18
- menuItemActive: "#E1E2EB",
19
- surfaceHover: "#E3E2E6",
20
- alphabetIdle: "#B4BEDA",
21
- textStrong: "#191C22",
22
- textNav: "#414752",
23
- textMuted: "#94A2AA",
24
- link: "#004F99",
25
- danger: "#BA1A1A",
26
- dangerHover: "#93000A",
27
- success: "#1E8E3E",
28
- border: "#C1C6D4",
29
- avatarBg: "#F2F6FC",
30
- avatarBorder: "#DEE2E6",
2
+ function e(e) {
3
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase();
4
+ }
5
+ function t(t, n) {
6
+ let r = {}, i = {}, a = {};
7
+ return Object.keys(n).forEach((o) => {
8
+ let s = `--cms-${t ? `${t}-` : ""}${e(String(o))}`, c = n[o];
9
+ r[o] = `var(${s}, ${c.light})`, i[s] = c.light, a[s] = c.dark;
10
+ }), {
11
+ values: r,
12
+ light: i,
13
+ dark: a
14
+ };
15
+ }
16
+ function n(t, n) {
17
+ let r = {}, i = {}, a = {};
18
+ return Object.keys(n).forEach((o) => {
19
+ let s = `--cms-${t}-${e(String(o))}`, { bg: c, on: l } = n[o];
20
+ r[o] = {
21
+ bg: `var(${s}-bg, ${c.light})`,
22
+ on: `var(${s}-on, ${l.light})`
23
+ }, i[`${s}-bg`] = c.light, i[`${s}-on`] = l.light, a[`${s}-bg`] = c.dark, a[`${s}-on`] = l.dark;
24
+ }), {
25
+ values: r,
26
+ light: i,
27
+ dark: a
28
+ };
29
+ }
30
+ var r = t("", {
31
+ primary: {
32
+ light: "#0067C4",
33
+ dark: "#0067C4"
34
+ },
35
+ primaryHover: {
36
+ light: "#005CAF",
37
+ dark: "#2F7BD1"
38
+ },
39
+ primaryDisabled: {
40
+ light: "#1D1B201A",
41
+ dark: "#FFFFFF1A"
42
+ },
43
+ secondary: {
44
+ light: "#D8E2FF",
45
+ dark: "#2C4678"
46
+ },
47
+ secondaryHover: {
48
+ light: "#E1E2EA",
49
+ dark: "#2E3140"
50
+ },
51
+ onSecondaryContainer: {
52
+ light: "#2C4678",
53
+ dark: "#D8E2FF"
54
+ },
55
+ secondaryStrong: {
56
+ light: "#455E91",
57
+ dark: "#8FA8D8"
58
+ },
59
+ controlBorder: {
60
+ light: "#727784",
61
+ dark: "#8E9199"
62
+ },
63
+ controlText: {
64
+ light: "#000000",
65
+ dark: "#E1E2E9"
66
+ },
67
+ controlHoverBg: {
68
+ light: "#F9F9FF",
69
+ dark: "#1D2024"
70
+ },
71
+ whiteBtnBorder: {
72
+ light: "#DDDDDD",
73
+ dark: "#43474E"
74
+ },
75
+ whiteBtnText: {
76
+ light: "#515253",
77
+ dark: "#C4C6CF"
78
+ },
79
+ iconButtonHoverBg: {
80
+ light: "#E6E6E6",
81
+ dark: "#2A2D33"
82
+ },
83
+ iconButtonIcon: {
84
+ light: "#929193",
85
+ dark: "#A9AEB8"
86
+ },
87
+ menuSurface: {
88
+ light: "#ECEDF6",
89
+ dark: "#2A2C31"
90
+ },
91
+ menuItemActive: {
92
+ light: "#E1E2EB",
93
+ dark: "#34363B"
94
+ },
95
+ surfaceHover: {
96
+ light: "#E3E2E6",
97
+ dark: "#34363B"
98
+ },
99
+ alphabetIdle: {
100
+ light: "#B4BEDA",
101
+ dark: "#5A6478"
102
+ },
103
+ alphabetIdleSoft: {
104
+ light: "rgba(180, 190, 218, 0.12)",
105
+ dark: "rgba(140, 150, 180, 0.14)"
106
+ },
107
+ alphabetLetter: {
108
+ light: "#191C20",
109
+ dark: "#E1E2E9"
110
+ },
111
+ alphabetLetterDisabled: {
112
+ light: "#C4C6CF",
113
+ dark: "#43474E"
114
+ },
115
+ textStrong: {
116
+ light: "#191C22",
117
+ dark: "#E4E2E6"
118
+ },
119
+ textNav: {
120
+ light: "#414752",
121
+ dark: "#C4C6CF"
122
+ },
123
+ textMuted: {
124
+ light: "#94A2AA",
125
+ dark: "#8A929C"
126
+ },
127
+ link: {
128
+ light: "#004F99",
129
+ dark: "#9ECAFF"
130
+ },
131
+ danger: {
132
+ light: "#BA1A1A",
133
+ dark: "#DE3730"
134
+ },
135
+ dangerHover: {
136
+ light: "#93000A",
137
+ dark: "#FF6B5E"
138
+ },
139
+ success: {
140
+ light: "#1E8E3E",
141
+ dark: "#4CD97B"
142
+ },
143
+ border: {
144
+ light: "#C1C6D4",
145
+ dark: "#3A3E46"
146
+ },
147
+ avatarBg: {
148
+ light: "#F2F6FC",
149
+ dark: "#282A2F"
150
+ },
151
+ avatarBorder: {
152
+ light: "#DEE2E6",
153
+ dark: "#43474E"
154
+ },
155
+ surface: {
156
+ light: "#FFFFFF",
157
+ dark: "#282A2F"
158
+ }
159
+ }), i = {
160
+ ...r.values,
31
161
  white: "#FFFFFF"
32
- }, t = {
162
+ }, a = {
33
163
  sm: "8px",
34
164
  md: "10px",
35
165
  lg: "14px",
36
166
  xl: "28px",
37
167
  dialog: "24px",
38
168
  pill: "999px"
39
- }, n = {
169
+ }, o = {
40
170
  button: "0 1px 2px rgba(0, 0, 0, 0.10)",
41
171
  menu: "0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)",
42
172
  menuSoft: "0 10px 30px rgba(0, 0, 0, 0.18)",
43
173
  menuDropdown: "0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)",
44
174
  flyout: "0px 8px 16px rgba(0, 0, 0, 0.18)"
45
- }, r = {
175
+ }, s = {
46
176
  buttonHeight: 40,
47
177
  buttonHeightSm: 34,
48
178
  searchHeight: 48
49
- }, i = {
179
+ }, c = {
50
180
  surface: "#2E2E2E",
51
181
  onSurface: "#FFFFFF",
52
182
  onSurfaceMuted: "#C7C7C7",
@@ -59,7 +189,7 @@ var e = {
59
189
  onSurfaceSoft: "#F0F0F7",
60
190
  versionChipBg: "#F0F0F71A",
61
191
  separator: "#F0F0F7B3"
62
- }, a = {
192
+ }, l = {
63
193
  success: {
64
194
  bg: "#92F7B7",
65
195
  on: "#002112"
@@ -76,71 +206,205 @@ var e = {
76
206
  bg: "#D8E2FF",
77
207
  on: "#001551"
78
208
  }
79
- }, o = {
209
+ }, u = {
80
210
  active: {
81
- bg: "#D6F4DE",
82
- on: "#1D6B2E"
211
+ bg: {
212
+ light: "#D6F4DE",
213
+ dark: "#0F3D22"
214
+ },
215
+ on: {
216
+ light: "#1D6B2E",
217
+ dark: "#7FE0A0"
218
+ }
83
219
  },
84
220
  generating: {
85
- bg: "#DCE3FF",
86
- on: "#001551"
221
+ bg: {
222
+ light: "#DCE3FF",
223
+ dark: "#1E2A52"
224
+ },
225
+ on: {
226
+ light: "#001551",
227
+ dark: "#B7C9FF"
228
+ }
87
229
  },
88
230
  assigned: {
89
- bg: "#EADDFF",
90
- on: "#4F378A"
231
+ bg: {
232
+ light: "#EADDFF",
233
+ dark: "#2C2249"
234
+ },
235
+ on: {
236
+ light: "#4F378A",
237
+ dark: "#D9C6FF"
238
+ }
91
239
  },
92
240
  discarded: {
93
- bg: "#ECEDF6",
94
- on: "#43474E"
241
+ bg: {
242
+ light: "#ECEDF6",
243
+ dark: "#2A2C31"
244
+ },
245
+ on: {
246
+ light: "#43474E",
247
+ dark: "#C4C6CF"
248
+ }
95
249
  }
96
- }, s = {
250
+ }, d = n("state", u).values, f = {
97
251
  active: {
98
- bg: "#92F7B7",
99
- on: "#002112"
252
+ bg: {
253
+ light: "#92F7B7",
254
+ dark: "#0F3D22"
255
+ },
256
+ on: {
257
+ light: "#002112",
258
+ dark: "#92F7B7"
259
+ }
100
260
  },
101
261
  inactive: {
102
- bg: "#E1E2E9",
103
- on: "#002112"
262
+ bg: {
263
+ light: "#E1E2E9",
264
+ dark: "#2E3035"
265
+ },
266
+ on: {
267
+ light: "#002112",
268
+ dark: "#C4C6CF"
269
+ }
104
270
  }
105
- }, c = {
106
- assigned: {
107
- bg: e.secondary,
108
- on: e.onSecondaryContainer
109
- },
271
+ }, p = n("user-status", f).values, m = n("notification", {
110
272
  pending: {
111
- bg: "#FFE2D5",
112
- on: "#B3300A"
273
+ bg: {
274
+ light: "#FFE2D5",
275
+ dark: "#3A1D12"
276
+ },
277
+ on: {
278
+ light: "#B3300A",
279
+ dark: "#FFB59B"
280
+ }
113
281
  },
114
282
  system: {
115
- bg: "#DCEFE0",
116
- on: "#11663B"
283
+ bg: {
284
+ light: "#DCEFE0",
285
+ dark: "#123021"
286
+ },
287
+ on: {
288
+ light: "#11663B",
289
+ dark: "#8FD9A8"
290
+ }
291
+ },
292
+ editorialOpportunity: {
293
+ bg: {
294
+ light: "#3162E0",
295
+ dark: "#3B6FF0"
296
+ },
297
+ on: {
298
+ light: "#FFFFFF",
299
+ dark: "#FFFFFF"
300
+ }
117
301
  }
118
- }, l = {
302
+ }), h = {
303
+ assigned: {
304
+ bg: i.secondary,
305
+ on: i.onSecondaryContainer
306
+ },
307
+ ...m.values
308
+ }, g = t("editorial-opportunity", {
309
+ accent: {
310
+ light: "#3162E0",
311
+ dark: "#3B6FF0"
312
+ },
313
+ text: {
314
+ light: "#2B65BE",
315
+ dark: "#A9C4FF"
316
+ },
317
+ topicBg: {
318
+ light: "#ECEDF5",
319
+ dark: "#262A33"
320
+ },
321
+ topicBorder: {
322
+ light: "#C4C6CE",
323
+ dark: "#43474E"
324
+ },
325
+ trending: {
326
+ light: "#83521A",
327
+ dark: "#E5B87A"
328
+ }
329
+ }), _ = g.values, v = {
119
330
  high: {
120
- bg: "#D7F5DD",
121
- on: "#0D5B2B"
331
+ bg: {
332
+ light: "#D7F5DD",
333
+ dark: "#0F3D22"
334
+ },
335
+ on: {
336
+ light: "#0D5B2B",
337
+ dark: "#7FE0A0"
338
+ }
122
339
  },
123
340
  medium: {
124
- bg: "#FFF0C8",
125
- on: "#6B4D00"
341
+ bg: {
342
+ light: "#FFF0C8",
343
+ dark: "#3A2E05"
344
+ },
345
+ on: {
346
+ light: "#6B4D00",
347
+ dark: "#FFD98A"
348
+ }
126
349
  },
127
350
  low: {
128
- bg: "#E7E8EE",
129
- on: "#43474E"
351
+ bg: {
352
+ light: "#E7E8EE",
353
+ dark: "#2A2C31"
354
+ },
355
+ on: {
356
+ light: "#43474E",
357
+ dark: "#C4C6CF"
358
+ }
130
359
  }
131
- }, ee = {
360
+ }, y = n("confidence", v).values, b = {
132
361
  like: "#1E8E3E",
133
362
  dislike: "#D93025"
134
- }, u = {
135
- rss: "#FB923C",
136
- gtrends: "#4285F4",
137
- sconsole: "#0F9D58",
138
- x: "#111111"
139
- }, d = {
363
+ }, x = t("source", {
364
+ rss: {
365
+ light: "#FB923C",
366
+ dark: "#FB923C"
367
+ },
368
+ gtrends: {
369
+ light: "#4285F4",
370
+ dark: "#6BA0F8"
371
+ },
372
+ sconsole: {
373
+ light: "#0F9D58",
374
+ dark: "#34C77B"
375
+ },
376
+ x: {
377
+ light: "#111111",
378
+ dark: "#E1E2E9"
379
+ }
380
+ }), S = x.values;
381
+ function C() {
382
+ return {
383
+ light: {
384
+ ...r.light,
385
+ ...n("state", u).light,
386
+ ...n("user-status", f).light,
387
+ ...m.light,
388
+ ...g.light,
389
+ ...n("confidence", v).light,
390
+ ...x.light
391
+ },
392
+ dark: {
393
+ ...r.dark,
394
+ ...n("state", u).dark,
395
+ ...n("user-status", f).dark,
396
+ ...m.dark,
397
+ ...g.dark,
398
+ ...n("confidence", v).dark,
399
+ ...x.dark
400
+ }
401
+ };
402
+ }
403
+ var w = {
140
404
  roboto: "\"Roboto\",\"Helvetica\",\"Arial\",sans-serif",
141
405
  productSans: "\"Product Sans\",\"Roboto\",\"Helvetica\",\"Arial\",sans-serif",
142
406
  mono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
143
- }, f = {
407
+ }, T = {
144
408
  "000.000": "The user is already logged in",
145
409
  "000.001": "The user does not exist",
146
410
  "000.002": "The user will be disabled after 3 invalid login attempts.",
@@ -217,13 +481,21 @@ var e = {
217
481
  "010.012": "The resource is locked by another user",
218
482
  "015.001": "The video already exists",
219
483
  "015.011": "An error occurred in the service",
484
+ "030.000": "The Copilot service is not configured",
485
+ "030.001": "The Copilot service returned an error",
486
+ "030.002": "No response from the Copilot service",
487
+ "030.003": "Action not supported by Copilot",
488
+ "030.004": "The opportunity identifier is missing",
489
+ "030.005": "The writer to assign is missing",
490
+ "030.006": "The Copilot service does not exist at the configured address",
491
+ "030.007": "The Copilot site of the publication is not valid",
220
492
  "999.000": "The request does not have the expected format",
221
493
  "999.001a": "The request has an error that was not captured. Contact your Administrator and detail the steps you followed",
222
494
  "999.002a": "An error occurred in the service",
223
495
  "999.003a": "CMS internal error. Please contact your Administrator",
224
496
  "999.006a": "Login failed",
225
497
  "999.009a": "Maximum number of pins exceeded"
226
- }, p = {
498
+ }, E = {
227
499
  "000.000": "El usuario ya se encuentra logueado",
228
500
  "000.001": "El usuario no existe",
229
501
  "000.002": "El usuario será deshabilitado luego de 3 intentos de inicio de sesión no válidos.",
@@ -300,13 +572,21 @@ var e = {
300
572
  "010.012": "El recurso está bloqueado por otro usuario",
301
573
  "015.001": "El vídeo ya existe",
302
574
  "015.011": "Se produjo un error en el servicio",
575
+ "030.000": "El servicio Copilot no está configurado",
576
+ "030.001": "El servicio Copilot devolvió un error",
577
+ "030.002": "No hay respuesta del servicio Copilot",
578
+ "030.003": "Acción no soportada por Copilot",
579
+ "030.004": "Falta el identificador de la oportunidad",
580
+ "030.005": "Falta el redactor a asignar",
581
+ "030.006": "El servicio Copilot no existe en la dirección configurada",
582
+ "030.007": "El sitio Copilot de la publicación no es válido",
303
583
  "999.000": "El requerimiento no cuenta con el formato esperado",
304
584
  "999.001a": "El requerimiento tiene un error que no se capturó. Comuniquese con su Administrador y detalle los pasos que siguió",
305
585
  "999.002a": "Se produjo un error en el servicio",
306
586
  "999.003a": "Error interno de CMS. Comuniquese con su administrador",
307
587
  "999.006a": "Falló el login",
308
588
  "999.009a": "Supero el máximo de pines"
309
- }, m = {
589
+ }, D = {
310
590
  "000.000": "O usuário já está logado",
311
591
  "000.001": "O usuário não existe",
312
592
  "000.002": "O usuário será desabilitado após 3 tentativas de login inválidas.",
@@ -383,44 +663,26 @@ var e = {
383
663
  "010.012": "O recurso está bloqueado por outro usuário",
384
664
  "015.001": "O vídeo já existe",
385
665
  "015.011": "Ocorreu um erro no serviço",
666
+ "030.000": "O serviço Copilot não está configurado",
667
+ "030.001": "O serviço Copilot retornou um erro",
668
+ "030.002": "Sem resposta do serviço Copilot",
669
+ "030.003": "Ação não suportada pelo Copilot",
670
+ "030.004": "Falta o identificador da oportunidade",
671
+ "030.005": "Falta o redator a atribuir",
672
+ "030.006": "O serviço Copilot não existe no endereço configurado",
673
+ "030.007": "O site Copilot da publicação não é válido",
386
674
  "999.000": "A solicitação não tem o formato esperado",
387
675
  "999.001a": "O pedido tem um erro que não foi capturado. Entre em contato com seu administrador e detalhe as etapas que você seguiu",
388
676
  "999.002a": "Ocorreu um erro no serviço",
389
677
  "999.003a": "Erro interno do CMS. Entre em contato com seu administrador",
390
678
  "999.006a": "Falha no login",
391
679
  "999.009a": "Número máximo de pinos excedido"
392
- }, h = {
393
- es: p,
394
- en: f,
395
- pt: m
396
- }, g = new Set([
397
- "000.005",
398
- "000.001",
399
- "000.015",
400
- "003.008",
401
- "008.004",
402
- "000.018",
403
- "999.000",
404
- "009.002",
405
- "004.004",
406
- "008.018",
407
- "000.007",
408
- "000.008",
409
- "000.009",
410
- "000.010",
411
- "000.011",
412
- "000.012",
413
- "000.013",
414
- "000.027",
415
- "002.001",
416
- "002.003",
417
- "002.004",
418
- "003.004",
419
- "004.003",
420
- "006.002",
421
- "999.009a"
422
- ]);
423
- function _(e) {
680
+ }, O = {
681
+ es: E,
682
+ en: T,
683
+ pt: D
684
+ }, k = new Set(/* @__PURE__ */ "000.005,000.001,000.015,003.008,008.004,000.018,999.000,009.002,004.004,008.018,030.003,030.004,030.005,000.007,000.008,000.009,000.010,000.011,000.012,000.013,000.027,002.001,002.003,002.004,003.004,004.003,006.002,999.009a".split(","));
685
+ function A(e) {
424
686
  if (e == null) return;
425
687
  if (Array.isArray(e)) {
426
688
  let t = e.find((e) => e != null && e !== "");
@@ -429,68 +691,86 @@ function _(e) {
429
691
  let t = String(e);
430
692
  return t === "" ? void 0 : t;
431
693
  }
432
- function v(e, t = "es") {
433
- let n = _(e);
694
+ function ee(e, t = "es") {
695
+ let n = A(e);
434
696
  if (!n) return;
435
- let r = h[t] ?? f;
436
- return r[n] ?? r[`${n}a`] ?? f[n] ?? f[`${n}a`];
697
+ let r = O[t] ?? T;
698
+ return r[n] ?? r[`${n}a`] ?? T[n] ?? T[`${n}a`];
437
699
  }
438
- function y(e) {
439
- let t = _(e);
440
- return t && g.has(t) ? "warning" : "error";
700
+ function te(e) {
701
+ let t = A(e);
702
+ return t && k.has(t) ? "warning" : "error";
703
+ }
704
+ //#endregion
705
+ //#region src/lib/utils/toTestId.ts
706
+ function j(e) {
707
+ return e == null || e === "" ? "" : String(e).trim().toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/[\s._/\\]+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
441
708
  }
442
709
  //#endregion
443
710
  //#region src/lib/utils/site-selector.ts
444
- var b = e.menuSurface, x = e.secondary, S = e.white, C = "bluestack-es";
445
- function w(e) {
711
+ var M = i.menuSurface, N = i.secondary, P = i.surface, F = "bluestack-es";
712
+ function I(e) {
446
713
  return e.flatMap((e) => e.publications);
447
714
  }
448
- function T(e, t) {
449
- return w(e).find((e) => String(e.id) === t);
715
+ function L(e, t) {
716
+ return I(e).find((e) => String(e.id) === t);
450
717
  }
451
- function E(e, t) {
452
- return w(e).find((e) => String(e.id) === t)?.description ?? "Seleccionar publicación";
718
+ function R(e, t) {
719
+ return I(e).find((e) => String(e.id) === t)?.description ?? "Seleccionar publicación";
453
720
  }
454
- function D(e) {
455
- let t = w(e)[0];
721
+ function z(e) {
722
+ let t = I(e)[0];
456
723
  return t ? String(t.id) : "1";
457
724
  }
458
- function O(e) {
725
+ function B(e) {
459
726
  let t = Number(e);
460
727
  return Number.isFinite(t) && t > 0 ? t : 1;
461
728
  }
462
729
  //#endregion
463
730
  //#region src/lib/utils/site-time.ts
464
- function k(e) {
731
+ function V(e) {
465
732
  if (!e) return 0;
466
733
  let t = String(e).trim().replace(/^(GMT|UTC)/i, "").trim().match(/^([+-]?)(\d{1,2})(?::(\d{2}))?$/);
467
734
  if (!t) return 0;
468
735
  let n = t[1] === "-" ? -1 : 1, r = Number(t[2]), i = t[3] ? Number(t[3]) : 0;
469
736
  return n * (r * 60 + i);
470
737
  }
471
- function A(e, t) {
472
- return e + k(t) * 6e4;
738
+ function H(e, t) {
739
+ return e + V(t) * 6e4;
473
740
  }
474
- var j = {
741
+ var U = {
475
742
  day: "2-digit",
476
743
  month: "2-digit",
477
744
  year: "numeric",
478
745
  hour: "2-digit",
479
746
  minute: "2-digit"
480
747
  };
481
- function M(e, t, n, r = j) {
482
- let i = A(e, t);
748
+ function W(e, t, n, r = U) {
749
+ let i = H(e, t);
483
750
  return new Intl.DateTimeFormat(n, {
484
751
  ...r,
485
752
  timeZone: "UTC"
486
753
  }).format(i);
487
754
  }
488
- function N(e, t, n = j) {
489
- return M(Date.now(), e, t, n);
755
+ function G(e, t, n = U) {
756
+ return W(Date.now(), e, t, n);
757
+ }
758
+ //#endregion
759
+ //#region src/lib/utils/permissions.ts
760
+ function K(e, t) {
761
+ if (!e) return !1;
762
+ if (e.isAdmin) return !0;
763
+ let n = t.toUpperCase();
764
+ return n === "ALL_VIEWS" ? !0 : (e.operations ?? []).some((e) => typeof e?.name == "string" && e.name.toUpperCase() === n);
765
+ }
766
+ function q(e, t) {
767
+ if (!t || t.isAdmin) return e;
768
+ let n = new Set((t.operations ?? []).map((e) => typeof e?.name == "string" ? e.name.toUpperCase() : "").filter(Boolean));
769
+ return e.filter((e) => n.has(`${e.module.toUpperCase()}_VIEW`));
490
770
  }
491
771
  //#endregion
492
772
  //#region src/lib/services/auth.ts
493
- var P = class {
773
+ var J = class {
494
774
  props;
495
775
  authentication;
496
776
  constructor(e) {
@@ -541,7 +821,7 @@ var P = class {
541
821
  return console.error("[/auth/create]", e), Promise.reject(e);
542
822
  }
543
823
  };
544
- }, F = class {
824
+ }, Y = class {
545
825
  props;
546
826
  authentication;
547
827
  constructor(e) {
@@ -561,7 +841,7 @@ var P = class {
561
841
  return console.error("[/dashboard/notification]", e), Promise.reject(e);
562
842
  }
563
843
  };
564
- }, I = class {
844
+ }, X = class {
565
845
  props;
566
846
  authentication;
567
847
  constructor(e) {
@@ -699,7 +979,7 @@ var P = class {
699
979
  return console.error("[/profile/twoFactor/showOtc]", e), Promise.reject(e);
700
980
  }
701
981
  };
702
- }, L = class {
982
+ }, Z = class {
703
983
  props;
704
984
  authentication;
705
985
  constructor(e) {
@@ -719,7 +999,7 @@ var P = class {
719
999
  return console.error("[/publications/default]", e), Promise.reject(e);
720
1000
  }
721
1001
  };
722
- }, R = class {
1002
+ }, Q = class {
723
1003
  props;
724
1004
  authentication;
725
1005
  constructor(e) {
@@ -732,7 +1012,7 @@ var P = class {
732
1012
  return console.error("[/sites/get]", e), Promise.reject(e);
733
1013
  }
734
1014
  };
735
- }, z = class {
1015
+ }, ne = class {
736
1016
  props;
737
1017
  constructor(e) {
738
1018
  this.props = e;
@@ -834,7 +1114,7 @@ var P = class {
834
1114
  }
835
1115
  }
836
1116
  };
837
- }, B = (e) => btoa(e), V = class {
1117
+ }, re = (e) => btoa(e), ie = class {
838
1118
  props;
839
1119
  authentication;
840
1120
  constructor(e) {
@@ -843,7 +1123,7 @@ var P = class {
843
1123
  authParams = () => {
844
1124
  let { token: e, browserId: t, publication: n, siteName: r, project: i } = this.authentication;
845
1125
  return {
846
- token: B(e),
1126
+ token: re(e),
847
1127
  browserId: t,
848
1128
  publication: n,
849
1129
  siteName: r,
@@ -872,7 +1152,7 @@ var P = class {
872
1152
  ...n ?? {}
873
1153
  }
874
1154
  });
875
- }, H = class {
1155
+ }, ae = class {
876
1156
  props;
877
1157
  authentication;
878
1158
  constructor(e) {
@@ -902,7 +1182,7 @@ var P = class {
902
1182
  ...t
903
1183
  });
904
1184
  };
905
- }, U = class {
1185
+ }, oe = class {
906
1186
  props;
907
1187
  authentication;
908
1188
  constructor(e) {
@@ -925,7 +1205,7 @@ var P = class {
925
1205
  return console.error("[/audios/adminConfiguration]", e), Promise.reject(e);
926
1206
  }
927
1207
  };
928
- }, W = class {
1208
+ }, se = class {
929
1209
  props;
930
1210
  authentication;
931
1211
  constructor(e) {
@@ -961,7 +1241,7 @@ var P = class {
961
1241
  return console.error("[/categories/test]", e), Promise.reject(e);
962
1242
  }
963
1243
  };
964
- }, te = class {
1244
+ }, ce = class {
965
1245
  props;
966
1246
  authentication;
967
1247
  constructor(e) {
@@ -1004,7 +1284,35 @@ var P = class {
1004
1284
  return console.error("[/ckeditor/audioCode]", e), Promise.reject(e);
1005
1285
  }
1006
1286
  };
1007
- }, G = class {
1287
+ }, le = class {
1288
+ props;
1289
+ authentication;
1290
+ constructor(e) {
1291
+ this.props = e, this.authentication = e.authentication;
1292
+ }
1293
+ getOpportunities = async (e = {}) => {
1294
+ try {
1295
+ return (await this.props.axiosApi.post("/copilot/opportunities", {
1296
+ authentication: this.authentication,
1297
+ filters: e
1298
+ })).data;
1299
+ } catch (e) {
1300
+ return console.error("[/copilot/opportunities]", e), Promise.reject(e);
1301
+ }
1302
+ };
1303
+ executeAction = async (e) => {
1304
+ try {
1305
+ return (await this.props.axiosApi.post("/copilot/actions", {
1306
+ authentication: this.authentication,
1307
+ action: e.action,
1308
+ opportunity_id: e.opportunityId,
1309
+ ...e.userExternalId !== void 0 && { user_external_id: e.userExternalId }
1310
+ })).data;
1311
+ } catch (e) {
1312
+ return console.error("[/copilot/actions]", e), Promise.reject(e);
1313
+ }
1314
+ };
1315
+ }, ue = class {
1008
1316
  props;
1009
1317
  authentication;
1010
1318
  constructor(e) {
@@ -1170,7 +1478,7 @@ var P = class {
1170
1478
  return console.error("[/comments/user/get]", e), Promise.reject(e);
1171
1479
  }
1172
1480
  };
1173
- }, K = class {
1481
+ }, de = class {
1174
1482
  props;
1175
1483
  authentication;
1176
1484
  constructor(e) {
@@ -1246,7 +1554,7 @@ var P = class {
1246
1554
  return console.error("[/contributions/paymentGateways/get]", e), Promise.reject(e);
1247
1555
  }
1248
1556
  };
1249
- }, q = class {
1557
+ }, fe = class {
1250
1558
  props;
1251
1559
  authentication;
1252
1560
  constructor(e) {
@@ -1302,7 +1610,7 @@ var P = class {
1302
1610
  return console.error("[/sections/update]", e), Promise.reject(e);
1303
1611
  }
1304
1612
  };
1305
- }, J = class {
1613
+ }, pe = class {
1306
1614
  props;
1307
1615
  authentication;
1308
1616
  constructor(e) {
@@ -1588,7 +1896,7 @@ var P = class {
1588
1896
  return console.error("[/productivityPlan/reviewr/detail]", e), Promise.reject(e);
1589
1897
  }
1590
1898
  };
1591
- }, Y = class {
1899
+ }, me = class {
1592
1900
  props;
1593
1901
  authentication;
1594
1902
  constructor(e) {
@@ -1611,7 +1919,7 @@ var P = class {
1611
1919
  return console.error("[/events/get]", e), Promise.reject(e);
1612
1920
  }
1613
1921
  };
1614
- }, X = class {
1922
+ }, he = class {
1615
1923
  props;
1616
1924
  authentication;
1617
1925
  constructor(e) {
@@ -1637,7 +1945,7 @@ var P = class {
1637
1945
  return console.error("[/fileExplorer/getFolders]", e), Promise.reject(e);
1638
1946
  }
1639
1947
  };
1640
- }, Z = class {
1948
+ }, ge = class {
1641
1949
  props;
1642
1950
  authentication;
1643
1951
  constructor(e) {
@@ -1653,7 +1961,7 @@ var P = class {
1653
1961
  return console.error("[/updateCDN]", e), Promise.reject(e);
1654
1962
  }
1655
1963
  };
1656
- }, Q = class {
1964
+ }, _e = class {
1657
1965
  props;
1658
1966
  authentication;
1659
1967
  constructor(e) {
@@ -1849,7 +2157,7 @@ var P = class {
1849
2157
  return console.error("[/images/ckeditor/getImageComparation]", e), Promise.reject(e);
1850
2158
  }
1851
2159
  };
1852
- }, ne = class {
2160
+ }, ve = class {
1853
2161
  props;
1854
2162
  authentication;
1855
2163
  constructor(e) {
@@ -2422,7 +2730,7 @@ var P = class {
2422
2730
  return console.error("[/news/searchConsole/inspection]", e), Promise.reject(e);
2423
2731
  }
2424
2732
  };
2425
- }, re = class {
2733
+ }, ye = class {
2426
2734
  props;
2427
2735
  authentication;
2428
2736
  constructor(e) {
@@ -2452,7 +2760,7 @@ var P = class {
2452
2760
  return console.error("[/notification/topics]", e), Promise.reject(e);
2453
2761
  }
2454
2762
  };
2455
- }, ie = class {
2763
+ }, be = class {
2456
2764
  props;
2457
2765
  authentication;
2458
2766
  constructor(e) {
@@ -2528,7 +2836,7 @@ var P = class {
2528
2836
  return console.error("[/people/adminConfiguration]", e), Promise.reject(e);
2529
2837
  }
2530
2838
  };
2531
- }, ae = class {
2839
+ }, $ = class {
2532
2840
  props;
2533
2841
  authentication;
2534
2842
  constructor(e) {
@@ -2584,7 +2892,7 @@ var P = class {
2584
2892
  return console.error("[/planning/activity/copy]", e), Promise.reject(e);
2585
2893
  }
2586
2894
  };
2587
- }, $ = class {
2895
+ }, xe = class {
2588
2896
  props;
2589
2897
  authentication;
2590
2898
  constructor(e) {
@@ -2742,7 +3050,7 @@ var P = class {
2742
3050
  return console.error("[/polls/publish/now]", e), Promise.reject(e);
2743
3051
  }
2744
3052
  };
2745
- }, oe = class {
3053
+ }, Se = class {
2746
3054
  props;
2747
3055
  authentication;
2748
3056
  constructor(e) {
@@ -2910,7 +3218,7 @@ var P = class {
2910
3218
  return console.error("[/recipes/publish/schedule]", e), Promise.reject(e);
2911
3219
  }
2912
3220
  };
2913
- }, se = class {
3221
+ }, Ce = class {
2914
3222
  props;
2915
3223
  authentication;
2916
3224
  constructor(e) {
@@ -3006,7 +3314,7 @@ var P = class {
3006
3314
  return console.error("[/users/actions/resetMfa]", e), Promise.reject(e);
3007
3315
  }
3008
3316
  };
3009
- }, ce = class {
3317
+ }, we = class {
3010
3318
  props;
3011
3319
  authentication;
3012
3320
  constructor(e) {
@@ -3063,7 +3371,7 @@ var P = class {
3063
3371
  return console.error("[/zones/order]", e), Promise.reject(e);
3064
3372
  }
3065
3373
  };
3066
- }, le = class {
3374
+ }, Te = class {
3067
3375
  props;
3068
3376
  authentication;
3069
3377
  constructor(e) {
@@ -3096,7 +3404,7 @@ var P = class {
3096
3404
  return console.error("[/workpaper/status]", e), Promise.reject(e);
3097
3405
  }
3098
3406
  };
3099
- }, ue = class {
3407
+ }, Ee = class {
3100
3408
  props;
3101
3409
  authentication;
3102
3410
  constructor(e) {
@@ -3140,7 +3448,7 @@ var P = class {
3140
3448
  return console.error("[/vods/playlist/create]", e), Promise.reject(e);
3141
3449
  }
3142
3450
  };
3143
- }, de = class {
3451
+ }, De = class {
3144
3452
  props;
3145
3453
  authentication;
3146
3454
  constructor(e) {
@@ -3502,7 +3810,7 @@ var P = class {
3502
3810
  return console.error("[/videos/nativos/download]", e), Promise.reject(e);
3503
3811
  }
3504
3812
  };
3505
- }, fe = class {
3813
+ }, Oe = class {
3506
3814
  props;
3507
3815
  authentication;
3508
3816
  constructor(e) {
@@ -3619,7 +3927,7 @@ var P = class {
3619
3927
  return console.error("[/trivias/edit/inline]", e), Promise.reject(e);
3620
3928
  }
3621
3929
  };
3622
- }, pe = class {
3930
+ }, ke = class {
3623
3931
  props;
3624
3932
  authentication;
3625
3933
  constructor(e) {
@@ -3635,7 +3943,7 @@ var P = class {
3635
3943
  return console.error("[/transcribe/get]", e), Promise.reject(e);
3636
3944
  }
3637
3945
  };
3638
- }, me = class {
3946
+ }, Ae = class {
3639
3947
  props;
3640
3948
  authentication;
3641
3949
  constructor(e) {
@@ -3741,7 +4049,7 @@ var P = class {
3741
4049
  return console.error("[/tags/changeStatus]", e), Promise.reject(e);
3742
4050
  }
3743
4051
  };
3744
- }, he = class {
4052
+ }, je = class {
3745
4053
  props;
3746
4054
  authentication;
3747
4055
  publications;
@@ -3750,28 +4058,29 @@ var P = class {
3750
4058
  sites;
3751
4059
  auth;
3752
4060
  constructor(e) {
3753
- this.props = e, this.authentication = e.authentication, this.publications = new L(e), this.profileServices = new I(e), this.dashboard = new F(e), this.sites = new R(e), this.auth = new P(e);
4061
+ this.props = e, this.authentication = e.authentication, this.publications = new Z(e), this.profileServices = new X(e), this.dashboard = new Y(e), this.sites = new Q(e), this.auth = new J(e);
3754
4062
  }
3755
4063
  getDefaultPublication = () => this.publications.getDefaultPublication();
3756
4064
  getProfile = () => this.profileServices.getProfile();
3757
4065
  getCountNotifications = async () => await this.dashboard.countNotifications();
3758
4066
  getNotifications = async () => await this.dashboard.getNotifications();
3759
4067
  getSitesAndPublications = async () => {
3760
- let [e, t, n] = await Promise.all([
4068
+ let [e, t, n, r] = await Promise.all([
3761
4069
  this.sites.getSites(),
3762
4070
  this.publications.getPublications(),
3763
- this.auth.getModulesAvailable()
4071
+ this.auth.getModulesAvailable(),
4072
+ this.auth.getPermissions().catch(() => null)
3764
4073
  ]);
3765
4074
  return {
3766
4075
  sites: e.sites.map((e) => ({
3767
4076
  title: e.title,
3768
4077
  publications: t.publications.filter((t) => t.site === e.name)
3769
4078
  })).filter((e) => e.publications.length > 0),
3770
- modules: n.modules
4079
+ modules: q(n.modules, r)
3771
4080
  };
3772
4081
  };
3773
4082
  };
3774
4083
  //#endregion
3775
- export { f as $, R as A, S as B, G as C, H as D, U as E, M as F, w as G, b as H, N as I, v as J, D as K, k as L, I as M, F as N, V as O, P, p as Q, A as R, K as S, W as T, T as U, x as V, E as W, y as X, _ as Y, m as Z, Z as _, de as a, ee as at, J as b, ce as c, n as ct, $ as d, o as dt, e as et, ae as f, s as ft, Q as g, ne as h, fe as i, d as it, L as j, z as k, se as l, r as lt, re as m, me as n, a as nt, ue as o, c as ot, ie as p, O as q, pe as r, i as rt, le as s, t as st, he as t, l as tt, oe as u, u as ut, X as v, te as w, q as x, Y as y, C as z };
4084
+ export { A as $, ne as A, V as B, ue as C, oe as D, se as E, J as F, M as G, F as H, q as I, I as J, L as K, K as L, Z as M, X as N, ae as O, Y as P, ee as Q, W as R, de as S, ce as T, P as U, H as V, N as W, B as X, z as Y, j as Z, ge as _, d as _t, De as a, i as at, pe as b, we as c, l as ct, xe as d, b as dt, te as et, $ as f, h as ft, _e as g, S as gt, ve as h, s as ht, Oe as i, C as it, Q as j, ie as k, Ce as l, c as lt, ye as m, o as mt, Ae as n, E as nt, Ee as o, y as ot, be as p, a as pt, R as q, ke as r, T as rt, Te as s, _ as st, je as t, D as tt, Se as u, w as ut, he as v, p as vt, le as w, fe as x, me as y, G as z };
3776
4085
 
3777
- //# sourceMappingURL=services-Zx1IiHhX.js.map
4086
+ //# sourceMappingURL=services-BjcJgeV1.js.map