sass-cms-template-common 0.0.0

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 ADDED
@@ -0,0 +1,1698 @@
1
+ import { ThemeProvider as e, alpha as t, createTheme as n } from "@mui/material/styles";
2
+ import { forwardRef as r, useMemo as i, useState as a } from "react";
3
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ import l from "@mui/icons-material/ChevronRight";
5
+ import u from "@mui/icons-material/ExpandMore";
6
+ import d from "@mui/material/Box";
7
+ import f from "@mui/material/Collapse";
8
+ import p from "@mui/material/IconButton";
9
+ import m from "@mui/material/ListItemIcon";
10
+ import h from "@mui/material/ListItemText";
11
+ import g from "@mui/material/Menu";
12
+ import _ from "@mui/material/MenuItem";
13
+ import v from "@mui/material/Tooltip";
14
+ import y from "@mui/material/Typography";
15
+ import b from "@mui/icons-material/AddOutlined";
16
+ import x from "@mui/icons-material/DevicesOtherOutlined";
17
+ import S from "@mui/icons-material/HelpOutlineOutlined";
18
+ import C from "@mui/icons-material/LanguageOutlined";
19
+ import w from "@mui/icons-material/Menu";
20
+ import T from "@mui/material/AppBar";
21
+ import ee from "@mui/material/Toolbar";
22
+ import E from "@mui/icons-material/KeyboardArrowDown";
23
+ import D from "@mui/material/Button";
24
+ import O from "@mui/icons-material/NotificationsNoneOutlined";
25
+ import k from "@mui/material/Badge";
26
+ import A from "@mui/material/List";
27
+ import te from "@mui/material/ListItemButton";
28
+ import ne from "@mui/icons-material/EditOutlined";
29
+ import re from "@mui/icons-material/LogoutOutlined";
30
+ import ie from "@mui/icons-material/PersonOutlined";
31
+ import ae from "@mui/material/Avatar";
32
+ import oe from "@mui/material/Divider";
33
+ import j from "@mui/material/CssBaseline";
34
+ import { AppRouterCacheProvider as se } from "@mui/material-nextjs/v16-appRouter";
35
+ //#region src/lib/version.ts
36
+ var ce = "0.0.0", M = {
37
+ description: "TYPE: CUSTOM\nMaterial Theme Builder export 2026-05-08 02:18:51",
38
+ seed: "#0067C4",
39
+ coreColors: {
40
+ primary: "#0067C4",
41
+ secondary: "#D8E2FF",
42
+ tertiary: "#B4BEDA"
43
+ },
44
+ extendedColors: [
45
+ {
46
+ name: "Bluestack color",
47
+ color: "#2962FF",
48
+ description: "primario de bluestack",
49
+ harmonized: !1
50
+ },
51
+ {
52
+ name: "Estado publicada",
53
+ color: "#00C853",
54
+ description: "",
55
+ harmonized: !1
56
+ },
57
+ {
58
+ name: "Estado Redaccion",
59
+ color: "#0091EA",
60
+ description: "",
61
+ harmonized: !1
62
+ },
63
+ {
64
+ name: "Estado frescura",
65
+ color: "#30FF5D",
66
+ description: "",
67
+ harmonized: !1
68
+ },
69
+ {
70
+ name: "Estado Programado",
71
+ color: "#FF6D00",
72
+ description: "",
73
+ harmonized: !1
74
+ },
75
+ {
76
+ name: "Estado bloqueada",
77
+ color: "#D50000",
78
+ description: "",
79
+ harmonized: !1
80
+ },
81
+ {
82
+ name: "Estado borrador",
83
+ color: "#FFAB00",
84
+ description: "",
85
+ harmonized: !1
86
+ }
87
+ ],
88
+ schemes: {
89
+ light: {
90
+ primary: "#536dfe",
91
+ surfaceTint: "#3E5F90",
92
+ onPrimary: "#FFFFFF",
93
+ primaryContainer: "#D5E3FF",
94
+ onPrimaryContainer: "#254777",
95
+ secondary: "#455E91",
96
+ onSecondary: "#FFFFFF",
97
+ secondaryContainer: "#D8E2FF",
98
+ onSecondaryContainer: "#2C4678",
99
+ tertiary: "#455E91",
100
+ onTertiary: "#FFFFFF",
101
+ tertiaryContainer: "#D8E2FF",
102
+ onTertiaryContainer: "#2C4678",
103
+ error: "#BA1A1A",
104
+ onError: "#FFFFFF",
105
+ errorContainer: "#FFDAD6",
106
+ onErrorContainer: "#93000A",
107
+ background: "#F9F9FF",
108
+ onBackground: "#191C20",
109
+ surface: "#F9F9FF",
110
+ onSurface: "#191C20",
111
+ surfaceVariant: "#E0E2EC",
112
+ onSurfaceVariant: "#43474E",
113
+ outline: "#74777F",
114
+ outlineVariant: "#C4C6CF",
115
+ shadow: "#000000",
116
+ scrim: "#000000",
117
+ inverseSurface: "#2E3035",
118
+ inverseOnSurface: "#F0F0F7",
119
+ inversePrimary: "#A8C8FF",
120
+ primaryFixed: "#D5E3FF",
121
+ onPrimaryFixed: "#001B3C",
122
+ primaryFixedDim: "#A8C8FF",
123
+ onPrimaryFixedVariant: "#254777",
124
+ secondaryFixed: "#D8E2FF",
125
+ onSecondaryFixed: "#001A42",
126
+ secondaryFixedDim: "#AEC6FF",
127
+ onSecondaryFixedVariant: "#2C4678",
128
+ tertiaryFixed: "#D8E2FF",
129
+ onTertiaryFixed: "#001A42",
130
+ tertiaryFixedDim: "#AEC6FF",
131
+ onTertiaryFixedVariant: "#2C4678",
132
+ surfaceDim: "#D9D9E0",
133
+ surfaceBright: "#F9F9FF",
134
+ surfaceContainerLowest: "#FFFFFF",
135
+ surfaceContainerLow: "#F3F3FA",
136
+ surfaceContainer: "#EDEDF4",
137
+ surfaceContainerHigh: "#E7E8EE",
138
+ surfaceContainerHighest: "#E1E2E9"
139
+ },
140
+ "light-medium-contrast": {
141
+ primary: "#0F3665",
142
+ surfaceTint: "#3E5F90",
143
+ onPrimary: "#FFFFFF",
144
+ primaryContainer: "#4E6EA0",
145
+ onPrimaryContainer: "#FFFFFF",
146
+ secondary: "#193566",
147
+ onSecondary: "#FFFFFF",
148
+ secondaryContainer: "#546CA1",
149
+ onSecondaryContainer: "#FFFFFF",
150
+ tertiary: "#193566",
151
+ onTertiary: "#FFFFFF",
152
+ tertiaryContainer: "#546CA1",
153
+ onTertiaryContainer: "#FFFFFF",
154
+ error: "#740006",
155
+ onError: "#FFFFFF",
156
+ errorContainer: "#CF2C27",
157
+ onErrorContainer: "#FFFFFF",
158
+ background: "#F9F9FF",
159
+ onBackground: "#191C20",
160
+ surface: "#F9F9FF",
161
+ onSurface: "#0F1116",
162
+ surfaceVariant: "#E0E2EC",
163
+ onSurfaceVariant: "#33363D",
164
+ outline: "#4F525A",
165
+ outlineVariant: "#6A6D75",
166
+ shadow: "#000000",
167
+ scrim: "#000000",
168
+ inverseSurface: "#2E3035",
169
+ inverseOnSurface: "#F0F0F7",
170
+ inversePrimary: "#A8C8FF",
171
+ primaryFixed: "#4E6EA0",
172
+ onPrimaryFixed: "#FFFFFF",
173
+ primaryFixedDim: "#345586",
174
+ onPrimaryFixedVariant: "#FFFFFF",
175
+ secondaryFixed: "#546CA1",
176
+ onSecondaryFixed: "#FFFFFF",
177
+ secondaryFixedDim: "#3B5487",
178
+ onSecondaryFixedVariant: "#FFFFFF",
179
+ tertiaryFixed: "#546CA1",
180
+ onTertiaryFixed: "#FFFFFF",
181
+ tertiaryFixedDim: "#3B5487",
182
+ onTertiaryFixedVariant: "#FFFFFF",
183
+ surfaceDim: "#C5C6CD",
184
+ surfaceBright: "#F9F9FF",
185
+ surfaceContainerLowest: "#FFFFFF",
186
+ surfaceContainerLow: "#F3F3FA",
187
+ surfaceContainer: "#E7E8EE",
188
+ surfaceContainerHigh: "#DCDCE3",
189
+ surfaceContainerHighest: "#D0D1D8"
190
+ },
191
+ "light-high-contrast": {
192
+ primary: "#002C5A",
193
+ surfaceTint: "#3E5F90",
194
+ onPrimary: "#FFFFFF",
195
+ primaryContainer: "#274A79",
196
+ onPrimaryContainer: "#FFFFFF",
197
+ secondary: "#0B2A5B",
198
+ onSecondary: "#FFFFFF",
199
+ secondaryContainer: "#2E487A",
200
+ onSecondaryContainer: "#FFFFFF",
201
+ tertiary: "#0C2A5B",
202
+ onTertiary: "#FFFFFF",
203
+ tertiaryContainer: "#2F487A",
204
+ onTertiaryContainer: "#FFFFFF",
205
+ error: "#600004",
206
+ onError: "#FFFFFF",
207
+ errorContainer: "#98000A",
208
+ onErrorContainer: "#FFFFFF",
209
+ background: "#F9F9FF",
210
+ onBackground: "#191C20",
211
+ surface: "#F9F9FF",
212
+ onSurface: "#000000",
213
+ surfaceVariant: "#E0E2EC",
214
+ onSurfaceVariant: "#000000",
215
+ outline: "#292C33",
216
+ outlineVariant: "#464951",
217
+ shadow: "#000000",
218
+ scrim: "#000000",
219
+ inverseSurface: "#2E3035",
220
+ inverseOnSurface: "#FFFFFF",
221
+ inversePrimary: "#A8C8FF",
222
+ primaryFixed: "#274A79",
223
+ onPrimaryFixed: "#FFFFFF",
224
+ primaryFixedDim: "#093361",
225
+ onPrimaryFixedVariant: "#FFFFFF",
226
+ secondaryFixed: "#2E487A",
227
+ onSecondaryFixed: "#FFFFFF",
228
+ secondaryFixedDim: "#143162",
229
+ onSecondaryFixedVariant: "#FFFFFF",
230
+ tertiaryFixed: "#2F487A",
231
+ onTertiaryFixed: "#FFFFFF",
232
+ tertiaryFixedDim: "#153162",
233
+ onTertiaryFixedVariant: "#FFFFFF",
234
+ surfaceDim: "#B7B8BF",
235
+ surfaceBright: "#F9F9FF",
236
+ surfaceContainerLowest: "#FFFFFF",
237
+ surfaceContainerLow: "#F0F0F7",
238
+ surfaceContainer: "#E1E2E9",
239
+ surfaceContainerHigh: "#D3D4DB",
240
+ surfaceContainerHighest: "#C5C6CD"
241
+ },
242
+ dark: {
243
+ primary: "#A8C8FF",
244
+ surfaceTint: "#A8C8FF",
245
+ onPrimary: "#05305F",
246
+ primaryContainer: "#254777",
247
+ onPrimaryContainer: "#D5E3FF",
248
+ secondary: "#AEC6FF",
249
+ onSecondary: "#112F60",
250
+ secondaryContainer: "#2C4678",
251
+ onSecondaryContainer: "#D8E2FF",
252
+ tertiary: "#AEC6FF",
253
+ onTertiary: "#122F60",
254
+ tertiaryContainer: "#2C4678",
255
+ onTertiaryContainer: "#D8E2FF",
256
+ error: "#FFB4AB",
257
+ onError: "#690005",
258
+ errorContainer: "#93000A",
259
+ onErrorContainer: "#FFDAD6",
260
+ background: "#111318",
261
+ onBackground: "#E1E2E9",
262
+ surface: "#111318",
263
+ onSurface: "#E1E2E9",
264
+ surfaceVariant: "#43474E",
265
+ onSurfaceVariant: "#C4C6CF",
266
+ outline: "#8E9199",
267
+ outlineVariant: "#43474E",
268
+ shadow: "#000000",
269
+ scrim: "#000000",
270
+ inverseSurface: "#E1E2E9",
271
+ inverseOnSurface: "#2E3035",
272
+ inversePrimary: "#3E5F90",
273
+ primaryFixed: "#D5E3FF",
274
+ onPrimaryFixed: "#001B3C",
275
+ primaryFixedDim: "#A8C8FF",
276
+ onPrimaryFixedVariant: "#254777",
277
+ secondaryFixed: "#D8E2FF",
278
+ onSecondaryFixed: "#001A42",
279
+ secondaryFixedDim: "#AEC6FF",
280
+ onSecondaryFixedVariant: "#2C4678",
281
+ tertiaryFixed: "#D8E2FF",
282
+ onTertiaryFixed: "#001A42",
283
+ tertiaryFixedDim: "#AEC6FF",
284
+ onTertiaryFixedVariant: "#2C4678",
285
+ surfaceDim: "#111318",
286
+ surfaceBright: "#37393E",
287
+ surfaceContainerLowest: "#0C0E13",
288
+ surfaceContainerLow: "#191C20",
289
+ surfaceContainer: "#1D2024",
290
+ surfaceContainerHigh: "#282A2F",
291
+ surfaceContainerHighest: "#33353A"
292
+ },
293
+ "dark-medium-contrast": {
294
+ primary: "#CCDDFF",
295
+ surfaceTint: "#A8C8FF",
296
+ onPrimary: "#00254E",
297
+ primaryContainer: "#7292C6",
298
+ onPrimaryContainer: "#000000",
299
+ secondary: "#CFDCFF",
300
+ onSecondary: "#012455",
301
+ secondaryContainer: "#7790C7",
302
+ onSecondaryContainer: "#000000",
303
+ tertiary: "#CFDCFF",
304
+ onTertiary: "#022455",
305
+ tertiaryContainer: "#7890C7",
306
+ onTertiaryContainer: "#000000",
307
+ error: "#FFD2CC",
308
+ onError: "#540003",
309
+ errorContainer: "#FF5449",
310
+ onErrorContainer: "#000000",
311
+ background: "#111318",
312
+ onBackground: "#E1E2E9",
313
+ surface: "#111318",
314
+ onSurface: "#FFFFFF",
315
+ surfaceVariant: "#43474E",
316
+ onSurfaceVariant: "#DADCE5",
317
+ outline: "#AFB2BB",
318
+ outlineVariant: "#8D9099",
319
+ shadow: "#000000",
320
+ scrim: "#000000",
321
+ inverseSurface: "#E1E2E9",
322
+ inverseOnSurface: "#282A2F",
323
+ inversePrimary: "#264878",
324
+ primaryFixed: "#D5E3FF",
325
+ onPrimaryFixed: "#001129",
326
+ primaryFixedDim: "#A8C8FF",
327
+ onPrimaryFixedVariant: "#0F3665",
328
+ secondaryFixed: "#D8E2FF",
329
+ onSecondaryFixed: "#00102E",
330
+ secondaryFixedDim: "#AEC6FF",
331
+ onSecondaryFixedVariant: "#193566",
332
+ tertiaryFixed: "#D8E2FF",
333
+ onTertiaryFixed: "#00102E",
334
+ tertiaryFixedDim: "#AEC6FF",
335
+ onTertiaryFixedVariant: "#193566",
336
+ surfaceDim: "#111318",
337
+ surfaceBright: "#42444A",
338
+ surfaceContainerLowest: "#06070C",
339
+ surfaceContainerLow: "#1B1E22",
340
+ surfaceContainer: "#26282D",
341
+ surfaceContainerHigh: "#303338",
342
+ surfaceContainerHighest: "#3B3E43"
343
+ },
344
+ "dark-high-contrast": {
345
+ primary: "#EAF0FF",
346
+ surfaceTint: "#A8C8FF",
347
+ onPrimary: "#000000",
348
+ primaryContainer: "#A4C4FB",
349
+ onPrimaryContainer: "#000B1F",
350
+ secondary: "#ECEFFF",
351
+ onSecondary: "#000000",
352
+ secondaryContainer: "#A9C2FC",
353
+ onSecondaryContainer: "#000A23",
354
+ tertiary: "#ECEFFF",
355
+ onTertiary: "#000000",
356
+ tertiaryContainer: "#A9C2FC",
357
+ onTertiaryContainer: "#000A23",
358
+ error: "#FFECE9",
359
+ onError: "#000000",
360
+ errorContainer: "#FFAEA4",
361
+ onErrorContainer: "#220001",
362
+ background: "#111318",
363
+ onBackground: "#E1E2E9",
364
+ surface: "#111318",
365
+ onSurface: "#FFFFFF",
366
+ surfaceVariant: "#43474E",
367
+ onSurfaceVariant: "#FFFFFF",
368
+ outline: "#EEF0F9",
369
+ outlineVariant: "#C0C2CC",
370
+ shadow: "#000000",
371
+ scrim: "#000000",
372
+ inverseSurface: "#E1E2E9",
373
+ inverseOnSurface: "#000000",
374
+ inversePrimary: "#264878",
375
+ primaryFixed: "#D5E3FF",
376
+ onPrimaryFixed: "#000000",
377
+ primaryFixedDim: "#A8C8FF",
378
+ onPrimaryFixedVariant: "#001129",
379
+ secondaryFixed: "#D8E2FF",
380
+ onSecondaryFixed: "#000000",
381
+ secondaryFixedDim: "#AEC6FF",
382
+ onSecondaryFixedVariant: "#00102E",
383
+ tertiaryFixed: "#D8E2FF",
384
+ onTertiaryFixed: "#000000",
385
+ tertiaryFixedDim: "#AEC6FF",
386
+ onTertiaryFixedVariant: "#00102E",
387
+ surfaceDim: "#111318",
388
+ surfaceBright: "#4E5055",
389
+ surfaceContainerLowest: "#000000",
390
+ surfaceContainerLow: "#1D2024",
391
+ surfaceContainer: "#2E3035",
392
+ surfaceContainerHigh: "#393B41",
393
+ surfaceContainerHighest: "#45474C"
394
+ }
395
+ },
396
+ palettes: {
397
+ primary: {
398
+ 0: "#000000",
399
+ 5: "#001129",
400
+ 10: "#001B3C",
401
+ 15: "#00264E",
402
+ 20: "#003061",
403
+ 25: "#003B75",
404
+ 30: "#004689",
405
+ 35: "#00529E",
406
+ 40: "#005EB3",
407
+ 50: "#2777D5",
408
+ 60: "#4A91F1",
409
+ 70: "#76ACFF",
410
+ 80: "#A8C8FF",
411
+ 90: "#D5E3FF",
412
+ 95: "#ECF1FF",
413
+ 98: "#F9F9FF",
414
+ 99: "#FDFBFF",
415
+ 100: "#FFFFFF"
416
+ },
417
+ secondary: {
418
+ 0: "#000000",
419
+ 5: "#061025",
420
+ 10: "#111B30",
421
+ 15: "#1B263B",
422
+ 20: "#263046",
423
+ 25: "#313B52",
424
+ 30: "#3D475E",
425
+ 35: "#48526A",
426
+ 40: "#545E76",
427
+ 50: "#6D7790",
428
+ 60: "#8690AB",
429
+ 70: "#A1ABC6",
430
+ 80: "#BCC6E2",
431
+ 90: "#D8E2FF",
432
+ 95: "#EDF0FF",
433
+ 98: "#F9F9FF",
434
+ 99: "#FEFBFF",
435
+ 100: "#FFFFFF"
436
+ },
437
+ tertiary: {
438
+ 0: "#000000",
439
+ 5: "#061025",
440
+ 10: "#111B30",
441
+ 15: "#1B253B",
442
+ 20: "#263046",
443
+ 25: "#313B52",
444
+ 30: "#3D475E",
445
+ 35: "#48526A",
446
+ 40: "#545E77",
447
+ 50: "#6D7790",
448
+ 60: "#8690AB",
449
+ 70: "#A1ABC6",
450
+ 80: "#BCC6E2",
451
+ 90: "#D8E2FF",
452
+ 95: "#EDF0FF",
453
+ 98: "#FAF9FF",
454
+ 99: "#FEFBFF",
455
+ 100: "#FFFFFF"
456
+ },
457
+ neutral: {
458
+ 0: "#000000",
459
+ 5: "#101114",
460
+ 10: "#1A1C1E",
461
+ 15: "#252629",
462
+ 20: "#2F3033",
463
+ 25: "#3A3B3E",
464
+ 30: "#46474A",
465
+ 35: "#525256",
466
+ 40: "#5E5E62",
467
+ 50: "#76777A",
468
+ 60: "#909094",
469
+ 70: "#ABABAF",
470
+ 80: "#C7C6CA",
471
+ 90: "#E3E2E6",
472
+ 95: "#F1F0F4",
473
+ 98: "#FAF9FD",
474
+ 99: "#FDFBFF",
475
+ 100: "#FFFFFF"
476
+ },
477
+ "neutral-variant": {
478
+ 0: "#000000",
479
+ 5: "#0D1117",
480
+ 10: "#181C22",
481
+ 15: "#22262D",
482
+ 20: "#2D3038",
483
+ 25: "#383B43",
484
+ 30: "#43474E",
485
+ 35: "#4F525A",
486
+ 40: "#5B5E66",
487
+ 50: "#74777F",
488
+ 60: "#8E9199",
489
+ 70: "#A8ABB4",
490
+ 80: "#C4C6CF",
491
+ 90: "#E0E2EC",
492
+ 95: "#EEF0FA",
493
+ 98: "#F9F9FF",
494
+ 99: "#FDFBFF",
495
+ 100: "#FFFFFF"
496
+ }
497
+ }
498
+ };
499
+ //#endregion
500
+ //#region src/lib/theme/createAppTheme.ts
501
+ function N(e) {
502
+ return M.extendedColors.find((t) => t.name === e)?.color;
503
+ }
504
+ function le(e) {
505
+ return {
506
+ 50: e[98],
507
+ 100: e[95],
508
+ 200: e[90],
509
+ 300: e[80],
510
+ 400: e[70],
511
+ 500: e[60],
512
+ 600: e[50],
513
+ 700: e[40],
514
+ 800: e[30],
515
+ 900: e[20],
516
+ A100: e[90],
517
+ A200: e[80],
518
+ A400: e[60],
519
+ A700: e[40]
520
+ };
521
+ }
522
+ function P(e, n) {
523
+ let r = n.onSurface;
524
+ return {
525
+ mode: e,
526
+ primary: {
527
+ main: n.primary,
528
+ light: n.primaryContainer,
529
+ dark: n.onPrimaryContainer,
530
+ contrastText: n.onPrimary
531
+ },
532
+ secondary: {
533
+ main: n.secondary,
534
+ light: n.secondaryContainer,
535
+ dark: n.onSecondaryContainer,
536
+ contrastText: n.onSecondary
537
+ },
538
+ tertiary: {
539
+ main: n.tertiary,
540
+ light: n.tertiaryContainer,
541
+ dark: n.onTertiaryContainer,
542
+ contrastText: n.onTertiary
543
+ },
544
+ error: {
545
+ main: n.error,
546
+ light: n.errorContainer,
547
+ dark: n.onErrorContainer,
548
+ contrastText: n.onError
549
+ },
550
+ warning: {
551
+ main: N("Estado Programado") ?? "#FF6D00",
552
+ light: "#FF9E40",
553
+ dark: "#C25400",
554
+ contrastText: "#FFFFFF"
555
+ },
556
+ info: {
557
+ main: N("Estado Redaccion") ?? "#0091EA",
558
+ light: "#64B5F6",
559
+ dark: "#0064B7",
560
+ contrastText: "#FFFFFF"
561
+ },
562
+ success: {
563
+ main: N("Estado publicada") ?? "#00C853",
564
+ light: "#69F0AE",
565
+ dark: "#009624",
566
+ contrastText: "#FFFFFF"
567
+ },
568
+ brand: { main: N("Bluestack color") ?? "#2962FF" },
569
+ text: {
570
+ primary: n.onSurface,
571
+ secondary: n.onSurfaceVariant,
572
+ disabled: t(n.onSurface, .38)
573
+ },
574
+ divider: n.outlineVariant,
575
+ background: {
576
+ default: n.background,
577
+ paper: n.surfaceContainerLowest
578
+ },
579
+ action: {
580
+ active: t(r, .56),
581
+ hover: t(r, e === "light" ? .04 : .08),
582
+ selected: t(n.primary, .12),
583
+ focus: t(n.primary, .12),
584
+ disabled: t(r, .26),
585
+ disabledBackground: t(r, .12)
586
+ },
587
+ common: {
588
+ black: n.shadow,
589
+ white: "#FFFFFF"
590
+ },
591
+ grey: le(M.palettes.neutral),
592
+ m3: {
593
+ surfaceTint: n.surfaceTint,
594
+ surfaceDim: n.surfaceDim,
595
+ surfaceBright: n.surfaceBright,
596
+ surface: n.surface,
597
+ surfaceContainerLowest: n.surfaceContainerLowest,
598
+ surfaceContainerLow: n.surfaceContainerLow,
599
+ surfaceContainer: n.surfaceContainer,
600
+ surfaceContainerHigh: n.surfaceContainerHigh,
601
+ surfaceContainerHighest: n.surfaceContainerHighest,
602
+ outline: n.outline,
603
+ outlineVariant: n.outlineVariant,
604
+ inverseSurface: n.inverseSurface,
605
+ inverseOnSurface: n.inverseOnSurface,
606
+ inversePrimary: n.inversePrimary,
607
+ onBackground: n.onBackground,
608
+ surfaceVariant: n.surfaceVariant,
609
+ onSurfaceVariant: n.onSurfaceVariant
610
+ }
611
+ };
612
+ }
613
+ function F() {
614
+ let e = P("light", M.schemes.light), t = P("dark", M.schemes.dark);
615
+ return n({
616
+ cssVariables: { colorSchemeSelector: "data" },
617
+ defaultColorScheme: "light",
618
+ colorSchemes: {
619
+ light: { palette: e },
620
+ dark: { palette: t }
621
+ },
622
+ typography: { fontFamily: [
623
+ "\"Roboto\"",
624
+ "\"Helvetica\"",
625
+ "\"Arial\"",
626
+ "sans-serif"
627
+ ].join(",") }
628
+ });
629
+ }
630
+ //#endregion
631
+ //#region src/lib/components/link.tsx
632
+ var I = r(function({ href: e, children: t, ...n }, r) {
633
+ return /* @__PURE__ */ s("a", {
634
+ href: e,
635
+ ref: r,
636
+ ...n,
637
+ children: t
638
+ });
639
+ }), L = "#D8E2FF", R = "#E3E2E6", z = "#414752", ue = 24, de = 24, B = {
640
+ sxRoot: (e) => {
641
+ let t = e ? 195 : 96;
642
+ return {
643
+ width: t,
644
+ maxWidth: t,
645
+ minWidth: t,
646
+ flexShrink: 0,
647
+ alignSelf: "stretch",
648
+ minHeight: 0,
649
+ height: "100%",
650
+ display: "flex",
651
+ flexDirection: "column",
652
+ overflow: "hidden",
653
+ bgcolor: "m3.surfaceContainer",
654
+ paddingTop: e ? "2rem" : "1.5rem",
655
+ boxSizing: "border-box",
656
+ transition: "width 0.2s ease, min-width 0.2s ease, max-width 0.2s ease"
657
+ };
658
+ },
659
+ sxNavScroll: {
660
+ flex: 1,
661
+ minHeight: 0,
662
+ overflowY: "auto",
663
+ overflowX: "hidden",
664
+ width: "100%",
665
+ boxSizing: "border-box",
666
+ scrollbarWidth: "none",
667
+ msOverflowStyle: "none",
668
+ "&::-webkit-scrollbar": { display: "none" }
669
+ },
670
+ sxNav: (e) => ({
671
+ display: "flex",
672
+ flexDirection: "column",
673
+ py: 1.5,
674
+ gap: e ? .25 : .5,
675
+ width: "100%",
676
+ maxWidth: "100%",
677
+ minWidth: 0,
678
+ boxSizing: "border-box",
679
+ position: "relative",
680
+ px: e ? "1rem" : .75,
681
+ alignItems: e ? "stretch" : "start"
682
+ }),
683
+ sxNavGroup: (e) => ({
684
+ position: "relative",
685
+ minWidth: 0,
686
+ maxWidth: e ? "100%" : "none",
687
+ overflow: "visible",
688
+ width: e ? "100%" : "auto"
689
+ }),
690
+ sxTooltipWrap: (e) => ({
691
+ display: "flex",
692
+ width: e ? "100%" : "auto",
693
+ alignItems: "flex-start"
694
+ }),
695
+ sxDivider: {
696
+ my: 1,
697
+ borderColor: "#C1C6D4"
698
+ },
699
+ sxItem: (e, t = !1, n = !1, r = !1) => r ? {
700
+ position: "relative",
701
+ display: "flex",
702
+ alignItems: "center",
703
+ justifyContent: "center",
704
+ minHeight: 48,
705
+ minWidth: 0,
706
+ width: "auto",
707
+ maxWidth: "none",
708
+ boxSizing: "border-box",
709
+ overflow: "hidden",
710
+ px: 0,
711
+ py: 0,
712
+ borderRadius: "100px",
713
+ color: z,
714
+ textDecoration: "none",
715
+ bgcolor: e ? L : "transparent",
716
+ "&:hover": { bgcolor: e ? L : "action.hover" }
717
+ } : {
718
+ position: "relative",
719
+ display: "flex",
720
+ alignItems: "center",
721
+ gap: 1,
722
+ minHeight: 40,
723
+ minWidth: 0,
724
+ maxWidth: "none",
725
+ width: "calc(100% + 1rem)",
726
+ boxSizing: "border-box",
727
+ overflow: n ? "visible" : "hidden",
728
+ px: t ? 1.5 : 0,
729
+ pl: t ? 4.5 : 3,
730
+ py: .75,
731
+ ml: "-1rem",
732
+ mr: 0,
733
+ borderRadius: t ? "100px" : "0 100px 100px 0",
734
+ color: z,
735
+ textDecoration: "none",
736
+ bgcolor: e ? L : "transparent",
737
+ "&:hover": { bgcolor: e ? L : R }
738
+ },
739
+ sxItemIcon: (e, t = !1) => ({
740
+ fontSize: t ? de : ue,
741
+ color: e ? "secondary.dark" : "m3.onSurfaceVariant",
742
+ width: t ? 48 : "auto",
743
+ flexShrink: 0
744
+ }),
745
+ sxItemLabel: (e) => ({
746
+ flex: 1,
747
+ minWidth: 0,
748
+ fontSize: 14,
749
+ fontWeight: e ? 600 : 400,
750
+ lineHeight: 1.43,
751
+ color: z,
752
+ overflow: "hidden",
753
+ textOverflow: "ellipsis",
754
+ whiteSpace: "nowrap"
755
+ }),
756
+ sxExpandButton: {
757
+ pl: "1.5rem",
758
+ position: "absolute",
759
+ left: 0,
760
+ top: "50%",
761
+ transform: "translateY(-50%)",
762
+ p: .25,
763
+ color: "m3.onSurfaceVariant",
764
+ zIndex: 1
765
+ },
766
+ sxChildrenMenuPaper: {
767
+ mt: .5,
768
+ borderRadius: "28px",
769
+ bgcolor: "#FFFFFF",
770
+ boxShadow: "0px 8px 16px rgba(0,0,0,0.18)",
771
+ px: 1
772
+ },
773
+ sxChildrenMenuItem: (e) => ({
774
+ minHeight: 44,
775
+ borderRadius: "100px",
776
+ px: 2,
777
+ py: 1,
778
+ gap: 1.25,
779
+ color: z,
780
+ bgcolor: e ? L : "transparent",
781
+ "&:hover": { bgcolor: e ? L : R },
782
+ "&.Mui-selected": {
783
+ bgcolor: L,
784
+ "&:hover": { bgcolor: L }
785
+ }
786
+ }),
787
+ sxChildrenMenuListItemIcon: {
788
+ minWidth: 34,
789
+ color: "m3.onSurfaceVariant",
790
+ "& .MuiSvgIcon-root": { fontSize: 22 }
791
+ },
792
+ sxBetaChip: (e = !1) => ({
793
+ height: 15,
794
+ fontSize: 11,
795
+ fontWeight: 600,
796
+ letterSpacing: "0.04em",
797
+ bgcolor: "primary.main",
798
+ color: "primary.contrastText",
799
+ borderRadius: ".625rem",
800
+ px: .75,
801
+ mr: +!!e,
802
+ lineHeight: 1,
803
+ flexShrink: 0,
804
+ display: "flex",
805
+ alignItems: "center",
806
+ justifyContent: "center"
807
+ })
808
+ };
809
+ //#endregion
810
+ //#region src/lib/components/sidebar/Sidebar.tsx
811
+ function V(e, t) {
812
+ return !!(e === t || t !== "/" && e.startsWith(`${t}/`));
813
+ }
814
+ function fe(e, t) {
815
+ return V(e, t.href) ? !0 : t.children?.some((t) => V(e, t.href)) ?? !1;
816
+ }
817
+ function pe(e, t, n) {
818
+ return e ? n : /* @__PURE__ */ s(v, {
819
+ title: t,
820
+ placement: "right",
821
+ arrow: !0,
822
+ children: /* @__PURE__ */ s(d, {
823
+ component: "span",
824
+ sx: B.sxTooltipWrap(e),
825
+ children: n
826
+ })
827
+ });
828
+ }
829
+ function H({ item: e, nested: t = !1, open: n = !0, expanded: r, onToggleExpand: i, LinkComponent: v, pathname: b }) {
830
+ let x = !n, S = V(b, e.href), C = fe(b, e), w = !!e.children?.length, T = e.icon, ee = t ? S : S || C, [E, D] = a(null), O = !!E, k = /* @__PURE__ */ c(o, { children: [
831
+ w && !x ? /* @__PURE__ */ s(p, {
832
+ size: "small",
833
+ "aria-label": r ? "Contraer" : "Expandir",
834
+ onClick: (e) => {
835
+ e.preventDefault(), e.stopPropagation(), i?.();
836
+ },
837
+ sx: B.sxExpandButton,
838
+ children: s(r ? u : l, { sx: { fontSize: 20 } })
839
+ }) : null,
840
+ /* @__PURE__ */ s(T, { sx: B.sxItemIcon(ee, x) }),
841
+ x ? null : /* @__PURE__ */ s(y, {
842
+ component: "span",
843
+ sx: B.sxItemLabel(S),
844
+ children: e.label
845
+ }),
846
+ e.badge && /* @__PURE__ */ s(d, {
847
+ component: "span",
848
+ sx: B.sxBetaChip(n),
849
+ children: e.badge
850
+ })
851
+ ] });
852
+ if (w && !x) return /* @__PURE__ */ c(d, {
853
+ sx: B.sxNavGroup(n),
854
+ children: [/* @__PURE__ */ s(d, {
855
+ component: "div",
856
+ onClick: i,
857
+ sx: {
858
+ ...B.sxItem(C, t, !0, !1),
859
+ cursor: "pointer"
860
+ },
861
+ children: k
862
+ }), /* @__PURE__ */ s(f, {
863
+ in: r,
864
+ timeout: "auto",
865
+ unmountOnExit: !0,
866
+ children: /* @__PURE__ */ s(d, {
867
+ sx: {
868
+ display: "flex",
869
+ flexDirection: "column",
870
+ gap: .25,
871
+ mt: .25,
872
+ minWidth: 0,
873
+ maxWidth: "100%",
874
+ overflow: "hidden"
875
+ },
876
+ children: e.children.map((e) => /* @__PURE__ */ s(H, {
877
+ item: e,
878
+ nested: !0,
879
+ open: n,
880
+ LinkComponent: v,
881
+ pathname: b
882
+ }, e.href))
883
+ })
884
+ })]
885
+ });
886
+ if (w && x) return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(d, {
887
+ component: "button",
888
+ type: "button",
889
+ "aria-label": e.label,
890
+ "aria-controls": O ? `sidebar-children-${e.href}` : void 0,
891
+ "aria-haspopup": "true",
892
+ "aria-expanded": O ? "true" : void 0,
893
+ onClick: (e) => D(e.currentTarget),
894
+ onMouseEnter: (e) => D(e.currentTarget),
895
+ sx: {
896
+ ...B.sxItem(C, t, w, !0),
897
+ border: 0,
898
+ background: "transparent",
899
+ cursor: "pointer"
900
+ },
901
+ children: k
902
+ }), /* @__PURE__ */ s(g, {
903
+ id: `sidebar-children-${e.href}`,
904
+ anchorEl: E,
905
+ open: O,
906
+ onClose: () => D(null),
907
+ anchorOrigin: {
908
+ vertical: "center",
909
+ horizontal: "right"
910
+ },
911
+ transformOrigin: {
912
+ vertical: "center",
913
+ horizontal: "left"
914
+ },
915
+ slotProps: {
916
+ paper: { sx: B.sxChildrenMenuPaper },
917
+ list: {
918
+ onMouseLeave: () => D(null),
919
+ sx: { py: 1 }
920
+ }
921
+ },
922
+ children: e.children.map((e) => {
923
+ let t = e.icon;
924
+ return /* @__PURE__ */ c(_, {
925
+ component: v,
926
+ href: e.href,
927
+ onClick: () => D(null),
928
+ sx: B.sxChildrenMenuItem(V(b, e.href)),
929
+ children: [/* @__PURE__ */ s(m, {
930
+ sx: B.sxChildrenMenuListItemIcon,
931
+ children: /* @__PURE__ */ s(t, {})
932
+ }), /* @__PURE__ */ s(h, {
933
+ primary: e.label,
934
+ slotProps: { primary: { sx: {
935
+ fontSize: 14,
936
+ fontWeight: 400,
937
+ color: "#191C22"
938
+ } } }
939
+ })]
940
+ }, e.href);
941
+ })
942
+ })] });
943
+ let A = /* @__PURE__ */ s(d, {
944
+ component: v,
945
+ href: e.href,
946
+ sx: B.sxItem(x ? C : S, t, w, x),
947
+ children: k
948
+ });
949
+ return pe(n, e.label, A);
950
+ }
951
+ function me({ items: e, open: t, LinkComponent: n, pathname: r }) {
952
+ let [c, l] = a(i(() => {
953
+ let t = {};
954
+ for (let n of e) n.children && (t[n.href] = n.defaultOpen ?? n.children.some((e) => V(r, e.href)));
955
+ return t;
956
+ }, [e, r])), u = (e) => {
957
+ l((t) => ({
958
+ ...t,
959
+ [e]: !t[e]
960
+ }));
961
+ };
962
+ return /* @__PURE__ */ s(o, { children: e.map((e) => /* @__PURE__ */ s(H, {
963
+ item: e,
964
+ open: t,
965
+ expanded: c[e.href],
966
+ onToggleExpand: e.children ? () => u(e.href) : void 0,
967
+ LinkComponent: n,
968
+ pathname: r
969
+ }, e.href)) });
970
+ }
971
+ function U({ open: e, pathname: t, navBlocks: n, LinkComponent: r = I }) {
972
+ return /* @__PURE__ */ s(d, {
973
+ component: "aside",
974
+ sx: B.sxRoot(e),
975
+ children: /* @__PURE__ */ s(d, {
976
+ sx: B.sxNavScroll,
977
+ children: /* @__PURE__ */ s(d, {
978
+ component: "nav",
979
+ "aria-label": "Principal",
980
+ sx: B.sxNav(e),
981
+ children: n.map((n, i) => Array.isArray(n) ? /* @__PURE__ */ s(me, {
982
+ items: n,
983
+ open: e,
984
+ LinkComponent: r,
985
+ pathname: t
986
+ }, `section-${i}`) : null)
987
+ })
988
+ })
989
+ });
990
+ }
991
+ //#endregion
992
+ //#region src/lib/utils/site-selector.ts
993
+ var W = "#ECEDF6", G = "#D8E2FF", K = "#FFFFFF", he = "bluestack-es";
994
+ function q(e) {
995
+ return e.flatMap((e) => e.publications);
996
+ }
997
+ function ge(e, t) {
998
+ return q(e).find((e) => String(e.id) === t);
999
+ }
1000
+ function J(e, t) {
1001
+ return q(e).find((e) => String(e.id) === t)?.description ?? "Seleccionar publicación";
1002
+ }
1003
+ function _e(e) {
1004
+ let t = q(e)[0];
1005
+ return t ? String(t.id) : "1";
1006
+ }
1007
+ function ve(e) {
1008
+ let t = Number(e);
1009
+ return Number.isFinite(t) && t > 0 ? t : 1;
1010
+ }
1011
+ //#endregion
1012
+ //#region src/lib/components/site-selector-menu/SiteSelectorMenu.styles.ts
1013
+ var Y = {
1014
+ sxTriggerButton: (e) => ({
1015
+ height: 34,
1016
+ borderRadius: "8px",
1017
+ borderColor: e ? "transparent" : "m3.outline",
1018
+ color: "black",
1019
+ bgcolor: e ? G : "transparent",
1020
+ textTransform: "none",
1021
+ fontSize: "12px",
1022
+ fontWeight: 500,
1023
+ lineHeight: 0,
1024
+ letterSpacing: "0.007em",
1025
+ px: 2,
1026
+ py: 0,
1027
+ flexShrink: 0,
1028
+ "&:hover": {
1029
+ borderColor: "m3.outline",
1030
+ bgcolor: e ? G : "action.hover"
1031
+ }
1032
+ }),
1033
+ sxTriggerIcon: { fontSize: 20 },
1034
+ sxMenuPaper: {
1035
+ mt: 1,
1036
+ bgcolor: W,
1037
+ borderRadius: 2,
1038
+ marginTop: 0,
1039
+ boxShadow: "0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)",
1040
+ width: "auto",
1041
+ minWidth: 380,
1042
+ maxWidth: 640,
1043
+ py: "1.5rem",
1044
+ px: "1.5rem"
1045
+ },
1046
+ sxMenuList: { p: 0 },
1047
+ sxSection: (e) => ({ mb: e ? 0 : 2 }),
1048
+ sxSectionTitle: {
1049
+ px: 1,
1050
+ mb: 1,
1051
+ fontSize: 13,
1052
+ fontWeight: 400,
1053
+ letterSpacing: "normal",
1054
+ textTransform: "uppercase",
1055
+ color: "m3.outline"
1056
+ },
1057
+ sxSectionGrid: (e) => ({
1058
+ display: "grid",
1059
+ gridTemplateColumns: e ? "1fr" : "1fr 1fr",
1060
+ gap: 1
1061
+ }),
1062
+ sxMenuItem: (e) => ({
1063
+ width: "16.4rem",
1064
+ maxWidth: "100%",
1065
+ minHeight: 40,
1066
+ height: 54,
1067
+ px: 2,
1068
+ py: 1,
1069
+ padding: "1rem",
1070
+ margin: ".65rem",
1071
+ borderRadius: "28px",
1072
+ bgcolor: e ? G : K,
1073
+ color: "m3.onSurfaceVariant",
1074
+ display: "flex",
1075
+ alignItems: "center",
1076
+ justifyContent: "space-between",
1077
+ gap: 1.5,
1078
+ whiteSpace: "nowrap",
1079
+ "&:hover": { bgcolor: G },
1080
+ "&.Mui-selected": {
1081
+ bgcolor: G,
1082
+ "&:hover": { bgcolor: G }
1083
+ }
1084
+ }),
1085
+ sxMenuItemLabel: (e) => ({
1086
+ flex: 1,
1087
+ minWidth: 0,
1088
+ fontSize: 14,
1089
+ fontWeight: e ? 600 : 500,
1090
+ lineHeight: 1.43,
1091
+ color: "black",
1092
+ overflow: "hidden",
1093
+ display: "-webkit-box",
1094
+ WebkitLineClamp: 2,
1095
+ WebkitBoxOrient: "vertical",
1096
+ wordBreak: "break-word",
1097
+ padding: "0 10px 0 5px",
1098
+ whiteSpace: "pre-wrap"
1099
+ }),
1100
+ sxMenuItemLogoWrap: {
1101
+ display: "flex",
1102
+ alignItems: "center",
1103
+ flexShrink: 0,
1104
+ marginRight: ".5rem"
1105
+ }
1106
+ };
1107
+ //#endregion
1108
+ //#region src/lib/components/site-selector-menu/SiteSelectorMenu.tsx
1109
+ function ye({ publication: e, selected: t, href: n, imageUrl: r }) {
1110
+ return /* @__PURE__ */ s("a", {
1111
+ href: n,
1112
+ style: {
1113
+ textDecoration: "none",
1114
+ color: "inherit"
1115
+ },
1116
+ children: /* @__PURE__ */ c(_, {
1117
+ selected: t,
1118
+ sx: Y.sxMenuItem(t),
1119
+ children: [/* @__PURE__ */ s(y, {
1120
+ sx: Y.sxMenuItemLabel(t),
1121
+ children: e.description
1122
+ }), r ? /* @__PURE__ */ s(d, {
1123
+ sx: Y.sxMenuItemLogoWrap,
1124
+ children: /* @__PURE__ */ s("img", {
1125
+ src: r,
1126
+ alt: e.description,
1127
+ width: 90,
1128
+ height: 20
1129
+ })
1130
+ }) : null]
1131
+ })
1132
+ });
1133
+ }
1134
+ function X({ sites: e, selectedPublicationId: t, getPublicationHref: n, resolvePublicationImageUrl: r }) {
1135
+ let [i, l] = a(null), u = !!i, f = (e) => {
1136
+ l(e.currentTarget);
1137
+ }, p = () => {
1138
+ l(null);
1139
+ }, m = t ?? "";
1140
+ return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(D, {
1141
+ id: "site-selector-button",
1142
+ "aria-controls": u ? "site-selector-menu" : void 0,
1143
+ "aria-haspopup": "true",
1144
+ "aria-expanded": u ? "true" : void 0,
1145
+ variant: "outlined",
1146
+ onClick: f,
1147
+ endIcon: /* @__PURE__ */ s(E, { sx: Y.sxTriggerIcon }),
1148
+ sx: Y.sxTriggerButton(u),
1149
+ children: J(e, m)
1150
+ }), /* @__PURE__ */ s(g, {
1151
+ id: "site-selector-menu",
1152
+ anchorEl: i,
1153
+ open: u,
1154
+ onClose: p,
1155
+ anchorOrigin: {
1156
+ vertical: "bottom",
1157
+ horizontal: "right"
1158
+ },
1159
+ transformOrigin: {
1160
+ vertical: "top",
1161
+ horizontal: "right"
1162
+ },
1163
+ slotProps: {
1164
+ paper: { sx: Y.sxMenuPaper },
1165
+ list: {
1166
+ "aria-labelledby": "site-selector-button",
1167
+ disablePadding: !0,
1168
+ sx: Y.sxMenuList
1169
+ }
1170
+ },
1171
+ children: e.map((i, a) => /* @__PURE__ */ c(d, {
1172
+ sx: Y.sxSection(a === e.length - 1),
1173
+ children: [/* @__PURE__ */ s(y, {
1174
+ sx: Y.sxSectionTitle,
1175
+ children: i.title
1176
+ }), /* @__PURE__ */ s(d, {
1177
+ sx: Y.sxSectionGrid(i.fullWidth),
1178
+ children: i.publications.map((e) => /* @__PURE__ */ s(ye, {
1179
+ publication: e,
1180
+ selected: Number(t) === e.id,
1181
+ href: n(e),
1182
+ imageUrl: e.imagePath && r ? r(e.imagePath) : void 0
1183
+ }, e.id))
1184
+ })]
1185
+ }, i.title))
1186
+ })] });
1187
+ }
1188
+ var Z = {
1189
+ sxAppBar: {
1190
+ bgcolor: "m3.surfaceContainer",
1191
+ color: "m3.onSurfaceVariant",
1192
+ height: 48
1193
+ },
1194
+ sxToolbar: {
1195
+ minHeight: 48,
1196
+ height: 48,
1197
+ pl: "10px",
1198
+ pr: 2,
1199
+ gap: 1.5
1200
+ },
1201
+ sxMenuButton: {
1202
+ width: 40,
1203
+ height: 40,
1204
+ flexShrink: 0,
1205
+ borderRadius: "100px",
1206
+ color: "m3.onSurfaceVariant",
1207
+ "&:hover": { bgcolor: "#E3E2E6" }
1208
+ },
1209
+ sxMenuButtonIcon: { fontSize: 24 },
1210
+ sxLogoBox: {
1211
+ width: 200,
1212
+ height: 50,
1213
+ display: "flex",
1214
+ alignItems: "center",
1215
+ justifyContent: "center",
1216
+ flexShrink: 0,
1217
+ my: "auto"
1218
+ },
1219
+ sxActionsFrame: {
1220
+ display: "flex",
1221
+ flexDirection: "row",
1222
+ alignItems: "center",
1223
+ gap: "15px",
1224
+ flexShrink: 0
1225
+ },
1226
+ sxIconActionsRow: {
1227
+ display: "flex",
1228
+ alignItems: "center",
1229
+ width: 240,
1230
+ height: 48,
1231
+ flexShrink: 0
1232
+ },
1233
+ sxActionIcon: {
1234
+ width: 48,
1235
+ height: 48,
1236
+ color: "m3.onSurfaceVariant",
1237
+ borderRadius: "50%"
1238
+ },
1239
+ sxActionIconGlyph: { fontSize: 24 },
1240
+ sxBadge: { "& .MuiBadge-badge": {
1241
+ fontSize: 11,
1242
+ fontWeight: 500,
1243
+ minWidth: 16,
1244
+ height: 16,
1245
+ px: .5,
1246
+ top: 10,
1247
+ right: 10
1248
+ } },
1249
+ sxDivider: {
1250
+ width: "1px",
1251
+ height: 27.6,
1252
+ flexShrink: 0,
1253
+ bgcolor: "#C1C6D4"
1254
+ },
1255
+ sxProfileButton: {
1256
+ p: 0,
1257
+ width: 34,
1258
+ height: 34,
1259
+ flexShrink: 0
1260
+ },
1261
+ sxProfileAvatar: {
1262
+ width: 34,
1263
+ height: 34,
1264
+ border: "1px solid #DEE2E6",
1265
+ bgcolor: "#F2F6FC"
1266
+ },
1267
+ sxProfileMenuPaper: {
1268
+ mt: 1,
1269
+ minWidth: 220,
1270
+ borderRadius: 2,
1271
+ bgcolor: "#ECEDF6",
1272
+ py: .5,
1273
+ boxShadow: "0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)"
1274
+ },
1275
+ sxProfileMenuItem: {
1276
+ py: 1.25,
1277
+ px: 2,
1278
+ fontSize: 14,
1279
+ color: "#191C22",
1280
+ "&:hover": { bgcolor: "action.hover" }
1281
+ },
1282
+ sxProfileMenuListItemIcon: {
1283
+ minWidth: 36,
1284
+ color: "m3.onSurfaceVariant",
1285
+ "& .MuiSvgIcon-root": { fontSize: 22 }
1286
+ },
1287
+ sxProfileMenuDivider: {
1288
+ my: .5,
1289
+ borderColor: "#C1C6D4"
1290
+ }
1291
+ };
1292
+ //#endregion
1293
+ //#region src/lib/components/top-bar/NotificationsMenu.tsx
1294
+ function be(e) {
1295
+ let t = new Date(e);
1296
+ return Number.isNaN(t.getTime()) ? "" : t.toLocaleString("es-MX", {
1297
+ day: "2-digit",
1298
+ month: "short",
1299
+ hour: "2-digit",
1300
+ minute: "2-digit"
1301
+ });
1302
+ }
1303
+ function Q({ unreadCount: e, notifications: t }) {
1304
+ let [n, r] = a(null), l = !!n, u = i(() => e > 0 ? e : void 0, [e]);
1305
+ return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(v, {
1306
+ title: "Notificaciones",
1307
+ children: /* @__PURE__ */ s(p, {
1308
+ "aria-label": "Notificaciones",
1309
+ "aria-haspopup": "true",
1310
+ "aria-expanded": l,
1311
+ onClick: (e) => r(e.currentTarget),
1312
+ sx: Z.sxActionIcon,
1313
+ children: /* @__PURE__ */ s(k, {
1314
+ badgeContent: u,
1315
+ color: "error",
1316
+ sx: Z.sxBadge,
1317
+ children: /* @__PURE__ */ s(O, { sx: Z.sxActionIconGlyph })
1318
+ })
1319
+ })
1320
+ }), /* @__PURE__ */ c(g, {
1321
+ anchorEl: n,
1322
+ open: l,
1323
+ onClose: () => r(null),
1324
+ anchorOrigin: {
1325
+ vertical: "bottom",
1326
+ horizontal: "right"
1327
+ },
1328
+ transformOrigin: {
1329
+ vertical: "top",
1330
+ horizontal: "right"
1331
+ },
1332
+ slotProps: { paper: { sx: {
1333
+ width: 360,
1334
+ maxHeight: 420,
1335
+ mt: 1,
1336
+ borderRadius: 2,
1337
+ bgcolor: "m3.surfaceContainerHigh"
1338
+ } } },
1339
+ children: [/* @__PURE__ */ c(d, {
1340
+ sx: {
1341
+ px: 2,
1342
+ py: 1.5,
1343
+ borderBottom: 1,
1344
+ borderColor: "m3.outlineVariant"
1345
+ },
1346
+ children: [/* @__PURE__ */ s(y, {
1347
+ variant: "subtitle2",
1348
+ color: "m3.onSurface",
1349
+ children: "Notificaciones"
1350
+ }), e > 0 ? /* @__PURE__ */ c(y, {
1351
+ variant: "caption",
1352
+ color: "m3.onSurfaceVariant",
1353
+ children: [e, " sin leer"]
1354
+ }) : null]
1355
+ }), t.length === 0 ? /* @__PURE__ */ s(d, {
1356
+ sx: {
1357
+ px: 2,
1358
+ py: 3
1359
+ },
1360
+ children: /* @__PURE__ */ s(y, {
1361
+ variant: "body2",
1362
+ color: "m3.onSurfaceVariant",
1363
+ sx: { textAlign: "center" },
1364
+ children: "No hay notificaciones"
1365
+ })
1366
+ }) : /* @__PURE__ */ s(A, {
1367
+ dense: !0,
1368
+ disablePadding: !0,
1369
+ sx: { py: .5 },
1370
+ children: t.map((e) => /* @__PURE__ */ s(te, {
1371
+ component: e.href ? "a" : "div",
1372
+ href: e.href,
1373
+ onClick: () => r(null),
1374
+ sx: {
1375
+ alignItems: "flex-start",
1376
+ py: 1.25,
1377
+ bgcolor: e.read ? "transparent" : "m3.secondaryContainer",
1378
+ "&:hover": { bgcolor: e.read ? "action.hover" : "m3.secondaryContainer" }
1379
+ },
1380
+ children: /* @__PURE__ */ s(h, {
1381
+ primary: e.title,
1382
+ secondary: /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(y, {
1383
+ component: "span",
1384
+ variant: "body2",
1385
+ color: "m3.onSurfaceVariant",
1386
+ sx: {
1387
+ display: "block",
1388
+ mt: .25
1389
+ },
1390
+ children: e.message
1391
+ }), /* @__PURE__ */ s(y, {
1392
+ component: "span",
1393
+ variant: "caption",
1394
+ color: "m3.onSurfaceVariant",
1395
+ sx: {
1396
+ display: "block",
1397
+ mt: .5
1398
+ },
1399
+ children: be(e.createdAt)
1400
+ })] }),
1401
+ slotProps: { primary: {
1402
+ variant: "subtitle2",
1403
+ color: "m3.onSurface",
1404
+ sx: { fontWeight: e.read ? 400 : 600 }
1405
+ } }
1406
+ })
1407
+ }, e.id))
1408
+ })]
1409
+ })] });
1410
+ }
1411
+ //#endregion
1412
+ //#region src/lib/utils/cms-asset.ts
1413
+ var xe = "https://dev.cms-medios.com";
1414
+ function Se(e) {
1415
+ let t = e?.trim();
1416
+ return t ? t.replace(/\/$/, "") : xe;
1417
+ }
1418
+ function Ce(e, t) {
1419
+ if (!e) return "";
1420
+ if (e.startsWith("http://") || e.startsWith("https://")) return e;
1421
+ let n = e.startsWith("/") ? e : `/${e}`;
1422
+ return `${Se(t)}${n}`;
1423
+ }
1424
+ //#endregion
1425
+ //#region src/lib/utils/profile-avatar.ts
1426
+ var we = "noPicture", Te = "/topbar_profile.png";
1427
+ function Ee(e, t) {
1428
+ let { image: n } = e, r = t?.fallbackAvatar ?? Te;
1429
+ return !n || n === we ? r : Ce(n, t?.cmsOrigin);
1430
+ }
1431
+ function De(e) {
1432
+ if (e.fullName?.trim()) return e.fullName.trim();
1433
+ let t = [e.firstName, e.lastName].filter(Boolean);
1434
+ return t.length > 0 ? t.join(" ") : e.userName;
1435
+ }
1436
+ //#endregion
1437
+ //#region src/lib/components/top-bar/ProfileMenu.tsx
1438
+ var Oe = [{
1439
+ id: "profile",
1440
+ label: "My Profile",
1441
+ icon: ie
1442
+ }, {
1443
+ id: "webmaster",
1444
+ label: "Webmaster View",
1445
+ icon: ne
1446
+ }], ke = {
1447
+ id: "sign-off",
1448
+ label: "Sign off",
1449
+ icon: re
1450
+ };
1451
+ function Ae({ label: e, icon: t, onSelect: n }) {
1452
+ return /* @__PURE__ */ c(_, {
1453
+ onClick: n,
1454
+ sx: Z.sxProfileMenuItem,
1455
+ children: [/* @__PURE__ */ s(m, {
1456
+ sx: Z.sxProfileMenuListItemIcon,
1457
+ children: /* @__PURE__ */ s(t, {})
1458
+ }), /* @__PURE__ */ s(h, {
1459
+ primary: e,
1460
+ slotProps: { primary: { sx: {
1461
+ fontSize: 14,
1462
+ fontWeight: 400,
1463
+ color: "#191C22"
1464
+ } } }
1465
+ })]
1466
+ });
1467
+ }
1468
+ function je({ profile: e, avatarOptions: t }) {
1469
+ let [n, r] = a(null), i = !!n, l = De(e), u = Ee(e, t), f = u.startsWith("/"), m = () => r(null), h = (e) => {
1470
+ m();
1471
+ };
1472
+ return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(p, {
1473
+ id: "profile-menu-button",
1474
+ "aria-label": "Mi perfil",
1475
+ "aria-controls": i ? "profile-menu" : void 0,
1476
+ "aria-haspopup": "true",
1477
+ "aria-expanded": i ? "true" : void 0,
1478
+ onClick: (e) => r(e.currentTarget),
1479
+ sx: Z.sxProfileButton,
1480
+ children: /* @__PURE__ */ s(ae, {
1481
+ sx: Z.sxProfileAvatar,
1482
+ children: /* @__PURE__ */ s(d, {
1483
+ component: "img",
1484
+ src: u,
1485
+ alt: "",
1486
+ sx: {
1487
+ width: "100%",
1488
+ height: "100%",
1489
+ objectFit: "cover"
1490
+ },
1491
+ ...f ? {} : { crossOrigin: "anonymous" }
1492
+ })
1493
+ })
1494
+ }), /* @__PURE__ */ c(g, {
1495
+ id: "profile-menu",
1496
+ anchorEl: n,
1497
+ open: i,
1498
+ onClose: m,
1499
+ anchorOrigin: {
1500
+ vertical: "bottom",
1501
+ horizontal: "right"
1502
+ },
1503
+ transformOrigin: {
1504
+ vertical: "top",
1505
+ horizontal: "right"
1506
+ },
1507
+ slotProps: {
1508
+ paper: { sx: Z.sxProfileMenuPaper },
1509
+ list: { disablePadding: !0 }
1510
+ },
1511
+ children: [
1512
+ /* @__PURE__ */ c(d, {
1513
+ sx: {
1514
+ px: 2,
1515
+ py: 1.5,
1516
+ borderBottom: 1,
1517
+ borderColor: "divider"
1518
+ },
1519
+ children: [/* @__PURE__ */ s(y, {
1520
+ variant: "subtitle2",
1521
+ sx: {
1522
+ fontWeight: 600,
1523
+ color: "#191C22"
1524
+ },
1525
+ children: l
1526
+ }), /* @__PURE__ */ s(y, {
1527
+ variant: "caption",
1528
+ sx: { color: "#414752" },
1529
+ children: e.email
1530
+ })]
1531
+ }),
1532
+ Oe.map((e) => /* @__PURE__ */ s(Ae, {
1533
+ ...e,
1534
+ onSelect: () => h(e.id)
1535
+ }, e.id)),
1536
+ /* @__PURE__ */ s(oe, { sx: Z.sxProfileMenuDivider }),
1537
+ /* @__PURE__ */ s(Ae, {
1538
+ ...ke,
1539
+ onSelect: () => h(ke.id)
1540
+ })
1541
+ ]
1542
+ })] });
1543
+ }
1544
+ //#endregion
1545
+ //#region src/lib/components/top-bar/TopBar.tsx
1546
+ function Me() {
1547
+ return /* @__PURE__ */ s(d, {
1548
+ component: "span",
1549
+ role: "separator",
1550
+ "aria-orientation": "vertical",
1551
+ sx: Z.sxDivider
1552
+ });
1553
+ }
1554
+ function $({ title: e, icon: t }) {
1555
+ return /* @__PURE__ */ s(v, {
1556
+ title: e,
1557
+ children: /* @__PURE__ */ s(p, {
1558
+ "aria-label": e,
1559
+ sx: Z.sxActionIcon,
1560
+ children: /* @__PURE__ */ s(t, { sx: Z.sxActionIconGlyph })
1561
+ })
1562
+ });
1563
+ }
1564
+ function Ne({ sites: e, sidebarOpen: t, onToggleSidebar: n, notificationUnreadCount: r, notifications: i, profile: a, primaryLogo: o, brandLogo: l, selectedPublicationId: u, getPublicationHref: f, resolvePublicationImageUrl: m, profileAvatarOptions: h }) {
1565
+ let g = [{
1566
+ title: "Analíticas",
1567
+ icon: x
1568
+ }, {
1569
+ title: "Ayuda",
1570
+ icon: S
1571
+ }];
1572
+ return /* @__PURE__ */ s(T, {
1573
+ position: "static",
1574
+ elevation: 0,
1575
+ sx: Z.sxAppBar,
1576
+ children: /* @__PURE__ */ c(ee, {
1577
+ disableGutters: !0,
1578
+ variant: "dense",
1579
+ sx: Z.sxToolbar,
1580
+ children: [
1581
+ /* @__PURE__ */ s(p, {
1582
+ "aria-label": t ? "Cerrar menú lateral" : "Abrir menú lateral",
1583
+ "aria-expanded": t,
1584
+ onClick: n,
1585
+ sx: Z.sxMenuButton,
1586
+ children: /* @__PURE__ */ s(w, { sx: Z.sxMenuButtonIcon })
1587
+ }),
1588
+ /* @__PURE__ */ s(d, {
1589
+ sx: Z.sxLogoBox,
1590
+ children: o
1591
+ }),
1592
+ /* @__PURE__ */ s(d, { sx: { flex: 1 } }),
1593
+ /* @__PURE__ */ c(d, {
1594
+ sx: Z.sxActionsFrame,
1595
+ children: [
1596
+ /* @__PURE__ */ c(d, {
1597
+ sx: Z.sxIconActionsRow,
1598
+ children: [
1599
+ /* @__PURE__ */ s($, {
1600
+ title: "Nuevo",
1601
+ icon: b
1602
+ }),
1603
+ /* @__PURE__ */ s(Q, {
1604
+ unreadCount: r,
1605
+ notifications: i
1606
+ }),
1607
+ /* @__PURE__ */ s($, {
1608
+ title: "Idioma",
1609
+ icon: C
1610
+ }),
1611
+ g.map(({ title: e, icon: t }) => /* @__PURE__ */ s($, {
1612
+ title: e,
1613
+ icon: t
1614
+ }, e))
1615
+ ]
1616
+ }),
1617
+ /* @__PURE__ */ s(Me, {}),
1618
+ l,
1619
+ /* @__PURE__ */ s(X, {
1620
+ sites: e,
1621
+ selectedPublicationId: u,
1622
+ getPublicationHref: f,
1623
+ resolvePublicationImageUrl: m
1624
+ }),
1625
+ /* @__PURE__ */ s(Me, {}),
1626
+ /* @__PURE__ */ s(je, {
1627
+ profile: a,
1628
+ avatarOptions: h
1629
+ })
1630
+ ]
1631
+ })
1632
+ ]
1633
+ })
1634
+ });
1635
+ }
1636
+ //#endregion
1637
+ //#region src/lib/components/shell/AppShell.tsx
1638
+ function Pe({ pathname: e, sites: t, children: n, notificationUnreadCount: r, notifications: i, profile: o, navBlocks: l, primaryLogo: u, brandLogo: d, selectedPublicationId: f, getPublicationHref: p, resolvePublicationImageUrl: m, profileAvatarOptions: h, LinkComponent: g = I }) {
1639
+ let [_, v] = a(!0);
1640
+ return /* @__PURE__ */ c("div", {
1641
+ className: "flex flex-col h-full",
1642
+ style: { background: "var(--md-surface-container)" },
1643
+ children: [/* @__PURE__ */ s(Ne, {
1644
+ sites: t,
1645
+ sidebarOpen: _,
1646
+ onToggleSidebar: () => v((e) => !e),
1647
+ notificationUnreadCount: r,
1648
+ notifications: i,
1649
+ profile: o,
1650
+ primaryLogo: u,
1651
+ brandLogo: d,
1652
+ selectedPublicationId: f,
1653
+ getPublicationHref: p,
1654
+ resolvePublicationImageUrl: m,
1655
+ profileAvatarOptions: h
1656
+ }), /* @__PURE__ */ c("div", {
1657
+ className: "flex flex-1 min-h-0",
1658
+ children: [/* @__PURE__ */ s(U, {
1659
+ open: _,
1660
+ pathname: e,
1661
+ navBlocks: l,
1662
+ LinkComponent: g
1663
+ }), /* @__PURE__ */ s("main", {
1664
+ className: "flex flex-col flex-1 min-w-0 min-h-0 pt-1 pb-3 pr-3 mt-[10px]",
1665
+ children: n
1666
+ })]
1667
+ })]
1668
+ });
1669
+ }
1670
+ //#endregion
1671
+ //#region src/lib/components/mui-provider/CmsMuiProvider.tsx
1672
+ var Fe = F();
1673
+ function Ie({ children: t }) {
1674
+ return /* @__PURE__ */ c(e, {
1675
+ theme: Fe,
1676
+ defaultMode: "light",
1677
+ storageManager: null,
1678
+ children: [/* @__PURE__ */ s(j, { enableColorScheme: !0 }), t]
1679
+ });
1680
+ }
1681
+ //#endregion
1682
+ //#region src/lib/components/mui-provider/NextCmsMuiProvider.tsx
1683
+ var Le = F();
1684
+ function Re({ children: t }) {
1685
+ return /* @__PURE__ */ s(se, {
1686
+ options: { enableCssLayer: !0 },
1687
+ children: /* @__PURE__ */ c(e, {
1688
+ theme: Le,
1689
+ defaultMode: "light",
1690
+ storageManager: null,
1691
+ children: [/* @__PURE__ */ s(j, { enableColorScheme: !0 }), t]
1692
+ })
1693
+ });
1694
+ }
1695
+ //#endregion
1696
+ export { Pe as AppShell, Ie as CmsMuiProvider, he as DEFAULT_SITE_ID, I as DefaultCmsLink, K as ITEM_DEFAULT_BG, G as ITEM_HOVER_BG, ce as LIB_VERSION, W as MENU_BG, Re as NextCmsMuiProvider, Q as NotificationsMenu, je as ProfileMenu, U as Sidebar, X as SiteSelectorMenu, Ne as TopBar, F as createAppTheme, ge as findPublicationBySlug, J as findPublicationLabel, q as getAllPublications, _e as getDefaultPublicationSlug, Ee as getProfileAvatarSrc, De as getProfileDisplayName, ve as parsePublicationSlug, Ce as resolveCmsAssetUrl, Se as resolveCmsOrigin };
1697
+
1698
+ //# sourceMappingURL=index.js.map