react-ecosistema-unp 2.5.0 → 2.6.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/README.md +354 -25
- package/dist/{AppList-DORGpC4I.js → AppList-CNtk-CBh.js} +56 -55
- package/dist/auth/hooks/useFinalizarSesion.js +12 -12
- package/dist/auth/services/FinSesionService.js +10 -11
- package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +1 -1
- package/dist/cards/tarjeta-info/TarjetaInfo.js +1 -1
- package/dist/data/tarjeta-datos/TarjetaDatos.js +1 -1
- package/dist/{index-BqaJxgOF.js → index-HaNVi1BU.js} +8 -8
- package/dist/lib/accessibility/barra-accesibilidad/BarraAccesibilidad.d.ts +1 -1
- package/dist/lib/assets/animations/loadingDuck.json.d.ts +1 -1
- package/dist/lib/utils/logger/logger.d.ts +25 -0
- package/dist/lib/utils/modal-radicados/ModalDocumento.d.ts +1 -1
- package/dist/lib/utils/sanitizar-html/sanitizarHtml.d.ts +12 -0
- package/dist/loadingDuck-Deggug5u.js +27 -0
- package/dist/shared/app-list/AppList.js +4 -3
- package/dist/shared/iconos-sistema/IconosSistema.js +1 -1
- package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
- package/dist/shared/menu-lateral/MenuLateral.js +5 -3
- package/dist/shared/notificacion-usuario/NotificacionUsuario.js +194 -745
- package/dist/shared/notificacion-usuario/services/notificacionesService.js +52 -51
- package/dist/shared/user-profile-icon/UserProfileIcon.js +17 -17
- package/dist/shared/ventana-tabs/VentanaTabs.js +1 -1
- package/dist/tables/custom-data-table/CustomDataTable.js +4 -2
- package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +4 -2
- package/dist/tables/eco-data-table/components/EcoBandejaEncabezado.js +3 -2
- package/dist/tables/eco-data-table/components/EcoDataTable/EcoDataTable.js +1 -1
- package/dist/tables/tabla-registros/buscador/Buscador.js +1 -1
- package/dist/tables/tabla-registros/encabezado-tabla/EncabezadoTabla.js +3 -2
- package/dist/tables/tabla-registros/modal-v2/EcoModal.js +1 -1
- package/dist/tables/tabla-registros/tabla/Tabla.js +1 -1
- package/dist/ui/alertas/AlertaFormulario.js +1 -1
- package/dist/ui/animacion/Animacion.js +1 -1
- package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
- package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
- package/dist/ui/contenido-modal-v2/ContenidoModalV2.js +1 -1
- package/dist/ui/contenido-modal-v2/ModalV2Menu.js +1 -1
- package/dist/ui/icono-tooltip/IconoTooltip.js +1 -1
- package/dist/ui/items-modal/ItemsModal.js +1 -1
- package/dist/ui/nav-formularios-lateral/NavFormulariosLateral.js +1 -1
- package/dist/ui/notificacion-popover-v2/NotificacionPopoverV2.js +80 -79
- package/dist/ui/status-filter-bar/StatusFilterBar.js +1 -1
- package/dist/ui/status-semaphore/StatusSemaphore.js +1 -1
- package/dist/ui/stepper-v2/StepperV2.js +1 -1
- package/dist/utils/components/ProtectedRoute.js +25 -26
- package/dist/utils/components/UserRoute.js +14 -16
- package/dist/utils/eco-provider/EcoContext.js +4 -2
- package/dist/utils/fetch-data/useFetchData.js +60 -59
- package/dist/utils/logger/logger.js +20 -0
- package/dist/utils/modal-radicados/AuxRadicadosComponents/TarjetaRadicado.js +20 -18
- package/dist/utils/modal-radicados/DocumentoVisorEstado.js +4 -3
- package/dist/utils/modal-radicados/ModalDocumento.js +1 -1
- package/dist/utils/modal-radicados/ModalRadicado.js +82 -80
- package/dist/utils/sanitizar-html/sanitizarHtml.js +1486 -0
- package/dist/utils/unp-historico/FetchHistorico.js +6 -5
- package/dist/utils/unp-historico/UnpHistorico.js +3 -2
- package/dist/utils/websocket-manager/websocket.js +19 -18
- package/package.json +28 -18
- package/dist/lib/utils/fetch/fetchInterceptor.d.ts +0 -7
- package/dist/lib/utils/fetch/fingerprintService.d.ts +0 -27
- package/dist/loadingDuck-Diu5KD6X.js +0 -27
- package/dist/utils/fetch/fetchInterceptor.js +0 -98
- package/dist/utils/fetch/fingerprintService.js +0 -1749
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as n, jsxs as r, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import * as yi from "react";
|
|
3
|
+
import { useState as s, useRef as Y, useEffect as j } from "react";
|
|
4
|
+
import { sanitizarHtml as bi } from "../../utils/sanitizar-html/sanitizarHtml.js";
|
|
5
|
+
import { r as Z, s as wi, t as Ci, u as Ii, v as Li, w as ki } from "../../index-B96iRUpt.js";
|
|
6
|
+
import { Animacion as ii } from "../../ui/animacion/Animacion.js";
|
|
7
|
+
import { getNotificaciones as Pi, getUnreadCount as ji, eliminarNotificacionesLeidas as Si, eliminarNotificacion as Mi, marcarLeida as $i, marcarNoLeida as Fi } from "./services/notificacionesService.js";
|
|
7
8
|
import "../../index-Cy8qF6oY.js";
|
|
9
|
+
import { logger as S } from "../../utils/logger/logger.js";
|
|
8
10
|
import "../../utils/websocket-manager/WebSocketContext.js";
|
|
9
|
-
import { useWebSocket as
|
|
10
|
-
import { m as
|
|
11
|
+
import { useWebSocket as Ri } from "../../utils/websocket-manager/useWebSocket.js";
|
|
12
|
+
import { m as Ai, $ as Hi } from "../../index-HaNVi1BU.js";
|
|
11
13
|
import '../../assets/styles.css';import '../../assets/Trazabilidad.css';import '../../assets/TarjetaInfo.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/DocumentoVisorEstado.css';import '../../assets/SmartTextArea.css';import '../../assets/EcoFooter.css';import '../../assets/ResumenEvaluacion.css';import '../../assets/AlertaFormulario.css';import '../../assets/SeccionFormulario.css';import '../../assets/CardGestionLateral.css';import '../../assets/NavFormulariosLateral.css';import '../../assets/DatosBasicosCard.css';import '../../assets/StatusFilterBar.css';import '../../assets/PaginadorV2.css';import '../../assets/StatusSemaphore.css';import '../../assets/TableSkeleton.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/TarjetaLectura.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/EcoModalStyles.css';import '../../assets/zIndex.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/StepperV2.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModalV2.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/Logo.css';import '../../assets/NotificacionUsuario.css';/* empty css */
|
|
12
14
|
/* empty css */
|
|
13
15
|
import "../../ui/subtitulo/Subtitulo.js";
|
|
@@ -35,7 +37,7 @@ import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
|
|
|
35
37
|
/* empty css */
|
|
36
38
|
/* empty css */
|
|
37
39
|
/* empty css */
|
|
38
|
-
import { NotificacionBellV2 as
|
|
40
|
+
import { NotificacionBellV2 as Ui } from "../../ui/notificacion-popover-v2/NotificacionPopoverV2.js";
|
|
39
41
|
/* empty css */
|
|
40
42
|
/* empty css */
|
|
41
43
|
/* empty css */
|
|
@@ -49,804 +51,251 @@ import { NotificacionBellV2 as hn } from "../../ui/notificacion-popover-v2/Notif
|
|
|
49
51
|
import "../../SileoNotifications-BESOBARG.js";
|
|
50
52
|
import "../../auth/contexts/AuthContex.js";
|
|
51
53
|
/* empty css */
|
|
52
|
-
import { c as
|
|
53
|
-
import { u as
|
|
54
|
-
const
|
|
55
|
-
bsPrefix:
|
|
56
|
-
bg:
|
|
57
|
-
pill:
|
|
58
|
-
text:
|
|
59
|
-
className:
|
|
60
|
-
as:
|
|
61
|
-
...
|
|
62
|
-
},
|
|
63
|
-
const
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
ref:
|
|
66
|
-
...
|
|
67
|
-
className:
|
|
54
|
+
import { c as Di } from "../../index-ZphT3dr_.js";
|
|
55
|
+
import { u as Ei } from "../../ThemeProvider-Cv61y4Uy.js";
|
|
56
|
+
const oi = /* @__PURE__ */ yi.forwardRef(({
|
|
57
|
+
bsPrefix: N,
|
|
58
|
+
bg: m = "primary",
|
|
59
|
+
pill: M = !1,
|
|
60
|
+
text: d,
|
|
61
|
+
className: f,
|
|
62
|
+
as: y = "span",
|
|
63
|
+
...h
|
|
64
|
+
}, b) => {
|
|
65
|
+
const p = Ei(N, "badge");
|
|
66
|
+
return /* @__PURE__ */ n(y, {
|
|
67
|
+
ref: b,
|
|
68
|
+
...h,
|
|
69
|
+
className: Di(f, p, M && "rounded-pill", d && `text-${d}`, m && `bg-${m}`)
|
|
68
70
|
});
|
|
69
71
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
construct: pt
|
|
86
|
-
} = typeof Reflect < "u" && Reflect;
|
|
87
|
-
M || (M = function(o) {
|
|
88
|
-
return o;
|
|
89
|
-
});
|
|
90
|
-
F || (F = function(o) {
|
|
91
|
-
return o;
|
|
92
|
-
});
|
|
93
|
-
dt || (dt = function(o, f) {
|
|
94
|
-
for (var s = arguments.length, d = new Array(s > 2 ? s - 2 : 0), R = 2; R < s; R++)
|
|
95
|
-
d[R - 2] = arguments[R];
|
|
96
|
-
return o.apply(f, d);
|
|
97
|
-
});
|
|
98
|
-
pt || (pt = function(o) {
|
|
99
|
-
for (var f = arguments.length, s = new Array(f > 1 ? f - 1 : 0), d = 1; d < f; d++)
|
|
100
|
-
s[d - 1] = arguments[d];
|
|
101
|
-
return new o(...s);
|
|
102
|
-
});
|
|
103
|
-
const je = x(Array.prototype.forEach), Nn = x(Array.prototype.lastIndexOf), vt = x(Array.prototype.pop), be = x(Array.prototype.push), Sn = x(Array.prototype.splice), Ve = x(String.prototype.toLowerCase), st = x(String.prototype.toString), ct = x(String.prototype.match), Le = x(String.prototype.replace), Rn = x(String.prototype.indexOf), yn = x(String.prototype.trim), k = x(Object.prototype.hasOwnProperty), w = x(RegExp.prototype.test), De = bn(TypeError);
|
|
104
|
-
function x(l) {
|
|
105
|
-
return function(o) {
|
|
106
|
-
o instanceof RegExp && (o.lastIndex = 0);
|
|
107
|
-
for (var f = arguments.length, s = new Array(f > 1 ? f - 1 : 0), d = 1; d < f; d++)
|
|
108
|
-
s[d - 1] = arguments[d];
|
|
109
|
-
return dt(l, o, s);
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
function bn(l) {
|
|
113
|
-
return function() {
|
|
114
|
-
for (var o = arguments.length, f = new Array(o), s = 0; s < o; s++)
|
|
115
|
-
f[s] = arguments[s];
|
|
116
|
-
return pt(l, f);
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
function m(l, o) {
|
|
120
|
-
let f = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ve;
|
|
121
|
-
xt && xt(l, null);
|
|
122
|
-
let s = o.length;
|
|
123
|
-
for (; s--; ) {
|
|
124
|
-
let d = o[s];
|
|
125
|
-
if (typeof d == "string") {
|
|
126
|
-
const R = f(d);
|
|
127
|
-
R !== d && (_n(o) || (o[s] = R), d = R);
|
|
128
|
-
}
|
|
129
|
-
l[d] = !0;
|
|
130
|
-
}
|
|
131
|
-
return l;
|
|
132
|
-
}
|
|
133
|
-
function Ln(l) {
|
|
134
|
-
for (let o = 0; o < l.length; o++)
|
|
135
|
-
k(l, o) || (l[o] = null);
|
|
136
|
-
return l;
|
|
137
|
-
}
|
|
138
|
-
function Y(l) {
|
|
139
|
-
const o = $e(null);
|
|
140
|
-
for (const [f, s] of Bt(l))
|
|
141
|
-
k(l, f) && (Array.isArray(s) ? o[f] = Ln(s) : s && typeof s == "object" && s.constructor === Object ? o[f] = Y(s) : o[f] = s);
|
|
142
|
-
return o;
|
|
143
|
-
}
|
|
144
|
-
function Ce(l, o) {
|
|
145
|
-
for (; l !== null; ) {
|
|
146
|
-
const s = An(l, o);
|
|
147
|
-
if (s) {
|
|
148
|
-
if (s.get)
|
|
149
|
-
return x(s.get);
|
|
150
|
-
if (typeof s.value == "function")
|
|
151
|
-
return x(s.value);
|
|
152
|
-
}
|
|
153
|
-
l = En(l);
|
|
154
|
-
}
|
|
155
|
-
function f() {
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
return f;
|
|
159
|
-
}
|
|
160
|
-
const Pt = M(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), lt = M(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ft = M(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Dn = M(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), ut = M(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Cn = M(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), kt = M(["#text"]), Ut = M(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), mt = M(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ft = M(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ye = M(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), On = F(/\{\{[\w\W]*|[\w\W]*\}\}/gm), In = F(/<%[\w\W]*|[\w\W]*%>/gm), wn = F(/\$\{[\w\W]*/gm), Mn = F(/^data-[\-\w.\u00B7-\uFFFF]+$/), xn = F(/^aria-[\-\w]+$/), Wt = F(
|
|
161
|
-
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
162
|
-
// eslint-disable-line no-useless-escape
|
|
163
|
-
), vn = F(/^(?:\w+script|data):/i), Pn = F(
|
|
164
|
-
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
165
|
-
// eslint-disable-line no-control-regex
|
|
166
|
-
), jt = F(/^html$/i), kn = F(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
167
|
-
var Ht = /* @__PURE__ */ Object.freeze({
|
|
168
|
-
__proto__: null,
|
|
169
|
-
ARIA_ATTR: xn,
|
|
170
|
-
ATTR_WHITESPACE: Pn,
|
|
171
|
-
CUSTOM_ELEMENT: kn,
|
|
172
|
-
DATA_ATTR: Mn,
|
|
173
|
-
DOCTYPE_NAME: jt,
|
|
174
|
-
ERB_EXPR: In,
|
|
175
|
-
IS_ALLOWED_URI: Wt,
|
|
176
|
-
IS_SCRIPT_OR_DATA: vn,
|
|
177
|
-
MUSTACHE_EXPR: On,
|
|
178
|
-
TMPLIT_EXPR: wn
|
|
179
|
-
});
|
|
180
|
-
const Oe = {
|
|
181
|
-
element: 1,
|
|
182
|
-
text: 3,
|
|
183
|
-
// Deprecated
|
|
184
|
-
progressingInstruction: 7,
|
|
185
|
-
comment: 8,
|
|
186
|
-
document: 9
|
|
187
|
-
}, Un = function() {
|
|
188
|
-
return typeof window > "u" ? null : window;
|
|
189
|
-
}, Fn = function(o, f) {
|
|
190
|
-
if (typeof o != "object" || typeof o.createPolicy != "function")
|
|
191
|
-
return null;
|
|
192
|
-
let s = null;
|
|
193
|
-
const d = "data-tt-policy-suffix";
|
|
194
|
-
f && f.hasAttribute(d) && (s = f.getAttribute(d));
|
|
195
|
-
const R = "dompurify" + (s ? "#" + s : "");
|
|
196
|
-
try {
|
|
197
|
-
return o.createPolicy(R, {
|
|
198
|
-
createHTML(v) {
|
|
199
|
-
return v;
|
|
200
|
-
},
|
|
201
|
-
createScriptURL(v) {
|
|
202
|
-
return v;
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
} catch {
|
|
206
|
-
return console.warn("TrustedTypes policy " + R + " could not be created."), null;
|
|
207
|
-
}
|
|
208
|
-
}, zt = function() {
|
|
209
|
-
return {
|
|
210
|
-
afterSanitizeAttributes: [],
|
|
211
|
-
afterSanitizeElements: [],
|
|
212
|
-
afterSanitizeShadowDOM: [],
|
|
213
|
-
beforeSanitizeAttributes: [],
|
|
214
|
-
beforeSanitizeElements: [],
|
|
215
|
-
beforeSanitizeShadowDOM: [],
|
|
216
|
-
uponSanitizeAttribute: [],
|
|
217
|
-
uponSanitizeElement: [],
|
|
218
|
-
uponSanitizeShadowNode: []
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
function Yt() {
|
|
222
|
-
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Un();
|
|
223
|
-
const o = (r) => Yt(r);
|
|
224
|
-
if (o.version = "3.3.3", o.removed = [], !l || !l.document || l.document.nodeType !== Oe.document || !l.Element)
|
|
225
|
-
return o.isSupported = !1, o;
|
|
226
|
-
let {
|
|
227
|
-
document: f
|
|
228
|
-
} = l;
|
|
229
|
-
const s = f, d = s.currentScript, {
|
|
230
|
-
DocumentFragment: R,
|
|
231
|
-
HTMLTemplateElement: v,
|
|
232
|
-
Node: K,
|
|
233
|
-
Element: z,
|
|
234
|
-
NodeFilter: ie,
|
|
235
|
-
NamedNodeMap: Xe = l.NamedNodeMap || l.MozNamedAttrMap,
|
|
236
|
-
HTMLFormElement: qe,
|
|
237
|
-
DOMParser: Ie,
|
|
238
|
-
trustedTypes: ue
|
|
239
|
-
} = l, oe = z.prototype, Ke = Ce(oe, "cloneNode"), Ze = Ce(oe, "remove"), Je = Ce(oe, "nextSibling"), we = Ce(oe, "childNodes"), me = Ce(oe, "parentNode");
|
|
240
|
-
if (typeof v == "function") {
|
|
241
|
-
const r = f.createElement("template");
|
|
242
|
-
r.content && r.content.ownerDocument && (f = r.content.ownerDocument);
|
|
243
|
-
}
|
|
244
|
-
let L, Z = "";
|
|
245
|
-
const {
|
|
246
|
-
implementation: de,
|
|
247
|
-
createNodeIterator: Qe,
|
|
248
|
-
createDocumentFragment: Me,
|
|
249
|
-
getElementsByTagName: xe
|
|
250
|
-
} = f, {
|
|
251
|
-
importNode: pe
|
|
252
|
-
} = s;
|
|
253
|
-
let y = zt();
|
|
254
|
-
o.isSupported = typeof Bt == "function" && typeof me == "function" && de && de.createHTMLDocument !== void 0;
|
|
255
|
-
const {
|
|
256
|
-
MUSTACHE_EXPR: J,
|
|
257
|
-
ERB_EXPR: $,
|
|
258
|
-
TMPLIT_EXPR: Ee,
|
|
259
|
-
DATA_ATTR: G,
|
|
260
|
-
ARIA_ATTR: ae,
|
|
261
|
-
IS_SCRIPT_OR_DATA: D,
|
|
262
|
-
ATTR_WHITESPACE: Ae,
|
|
263
|
-
CUSTOM_ELEMENT: ve
|
|
264
|
-
} = Ht;
|
|
265
|
-
let {
|
|
266
|
-
IS_ALLOWED_URI: Ne
|
|
267
|
-
} = Ht, A = null;
|
|
268
|
-
const Pe = m({}, [...Pt, ...lt, ...ft, ...ut, ...kt]);
|
|
269
|
-
let E = null;
|
|
270
|
-
const ke = m({}, [...Ut, ...mt, ...Ft, ...Ye]);
|
|
271
|
-
let T = Object.seal($e(null, {
|
|
272
|
-
tagNameCheck: {
|
|
273
|
-
writable: !0,
|
|
274
|
-
configurable: !1,
|
|
275
|
-
enumerable: !0,
|
|
276
|
-
value: null
|
|
277
|
-
},
|
|
278
|
-
attributeNameCheck: {
|
|
279
|
-
writable: !0,
|
|
280
|
-
configurable: !1,
|
|
281
|
-
enumerable: !0,
|
|
282
|
-
value: null
|
|
283
|
-
},
|
|
284
|
-
allowCustomizedBuiltInElements: {
|
|
285
|
-
writable: !0,
|
|
286
|
-
configurable: !1,
|
|
287
|
-
enumerable: !0,
|
|
288
|
-
value: !1
|
|
289
|
-
}
|
|
290
|
-
})), re = null, se = null;
|
|
291
|
-
const B = Object.seal($e(null, {
|
|
292
|
-
tagCheck: {
|
|
293
|
-
writable: !0,
|
|
294
|
-
configurable: !1,
|
|
295
|
-
enumerable: !0,
|
|
296
|
-
value: null
|
|
297
|
-
},
|
|
298
|
-
attributeCheck: {
|
|
299
|
-
writable: !0,
|
|
300
|
-
configurable: !1,
|
|
301
|
-
enumerable: !0,
|
|
302
|
-
value: null
|
|
303
|
-
}
|
|
304
|
-
}));
|
|
305
|
-
let Se = !0, Q = !0, Re = !1, Ue = !0, U = !1, ee = !0, W = !1, he = !1, te = !1, H = !1, ce = !1, le = !1, ne = !0, Fe = !1;
|
|
306
|
-
const t = "user-content-";
|
|
307
|
-
let i = !0, u = !1, h = {}, p = null;
|
|
308
|
-
const g = m({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
309
|
-
let ht = null;
|
|
310
|
-
const gt = m({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
311
|
-
let et = null;
|
|
312
|
-
const Tt = m({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), He = "http://www.w3.org/1998/Math/MathML", ze = "http://www.w3.org/2000/svg", V = "http://www.w3.org/1999/xhtml";
|
|
313
|
-
let ge = V, tt = !1, nt = null;
|
|
314
|
-
const $t = m({}, [He, ze, V], st);
|
|
315
|
-
let Ge = m({}, ["mi", "mo", "mn", "ms", "mtext"]), Be = m({}, ["annotation-xml"]);
|
|
316
|
-
const Vt = m({}, ["title", "style", "font", "a", "script"]);
|
|
317
|
-
let ye = null;
|
|
318
|
-
const Xt = ["application/xhtml+xml", "text/html"], qt = "text/html";
|
|
319
|
-
let b = null, Te = null;
|
|
320
|
-
const Kt = f.createElement("form"), _t = function(e) {
|
|
321
|
-
return e instanceof RegExp || e instanceof Function;
|
|
322
|
-
}, it = function() {
|
|
323
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
324
|
-
if (!(Te && Te === e)) {
|
|
325
|
-
if ((!e || typeof e != "object") && (e = {}), e = Y(e), ye = // eslint-disable-next-line unicorn/prefer-includes
|
|
326
|
-
Xt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? qt : e.PARSER_MEDIA_TYPE, b = ye === "application/xhtml+xml" ? st : Ve, A = k(e, "ALLOWED_TAGS") ? m({}, e.ALLOWED_TAGS, b) : Pe, E = k(e, "ALLOWED_ATTR") ? m({}, e.ALLOWED_ATTR, b) : ke, nt = k(e, "ALLOWED_NAMESPACES") ? m({}, e.ALLOWED_NAMESPACES, st) : $t, et = k(e, "ADD_URI_SAFE_ATTR") ? m(Y(Tt), e.ADD_URI_SAFE_ATTR, b) : Tt, ht = k(e, "ADD_DATA_URI_TAGS") ? m(Y(gt), e.ADD_DATA_URI_TAGS, b) : gt, p = k(e, "FORBID_CONTENTS") ? m({}, e.FORBID_CONTENTS, b) : g, re = k(e, "FORBID_TAGS") ? m({}, e.FORBID_TAGS, b) : Y({}), se = k(e, "FORBID_ATTR") ? m({}, e.FORBID_ATTR, b) : Y({}), h = k(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Se = e.ALLOW_ARIA_ATTR !== !1, Q = e.ALLOW_DATA_ATTR !== !1, Re = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ue = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, ee = e.SAFE_FOR_XML !== !1, W = e.WHOLE_DOCUMENT || !1, H = e.RETURN_DOM || !1, ce = e.RETURN_DOM_FRAGMENT || !1, le = e.RETURN_TRUSTED_TYPE || !1, te = e.FORCE_BODY || !1, ne = e.SANITIZE_DOM !== !1, Fe = e.SANITIZE_NAMED_PROPS || !1, i = e.KEEP_CONTENT !== !1, u = e.IN_PLACE || !1, Ne = e.ALLOWED_URI_REGEXP || Wt, ge = e.NAMESPACE || V, Ge = e.MATHML_TEXT_INTEGRATION_POINTS || Ge, Be = e.HTML_INTEGRATION_POINTS || Be, T = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && _t(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (T.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && _t(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (T.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (T.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), U && (Q = !1), ce && (H = !0), h && (A = m({}, kt), E = $e(null), h.html === !0 && (m(A, Pt), m(E, Ut)), h.svg === !0 && (m(A, lt), m(E, mt), m(E, Ye)), h.svgFilters === !0 && (m(A, ft), m(E, mt), m(E, Ye)), h.mathMl === !0 && (m(A, ut), m(E, Ft), m(E, Ye))), k(e, "ADD_TAGS") || (B.tagCheck = null), k(e, "ADD_ATTR") || (B.attributeCheck = null), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? B.tagCheck = e.ADD_TAGS : (A === Pe && (A = Y(A)), m(A, e.ADD_TAGS, b))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? B.attributeCheck = e.ADD_ATTR : (E === ke && (E = Y(E)), m(E, e.ADD_ATTR, b))), e.ADD_URI_SAFE_ATTR && m(et, e.ADD_URI_SAFE_ATTR, b), e.FORBID_CONTENTS && (p === g && (p = Y(p)), m(p, e.FORBID_CONTENTS, b)), e.ADD_FORBID_CONTENTS && (p === g && (p = Y(p)), m(p, e.ADD_FORBID_CONTENTS, b)), i && (A["#text"] = !0), W && m(A, ["html", "head", "body"]), A.table && (m(A, ["tbody"]), delete re.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
327
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
328
|
-
throw De('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
329
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
330
|
-
throw De('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
331
|
-
L = e.TRUSTED_TYPES_POLICY, Z = L.createHTML("");
|
|
332
|
-
} else
|
|
333
|
-
L === void 0 && (L = Fn(ue, d)), L !== null && typeof Z == "string" && (Z = L.createHTML(""));
|
|
334
|
-
M && M(e), Te = e;
|
|
72
|
+
oi.displayName = "Badge";
|
|
73
|
+
const Bo = ({ variant: N = "normal" }) => {
|
|
74
|
+
const [m, M] = s(!1), [d, f] = s([]), [y, h] = s([]), [b, p] = s([]), [ni, ei] = s(1), [ai, A] = s(1), [ti, ci] = s(1), [ri, si] = s(!0), [li, H] = s(!0), [di, fi] = s(!0), [U, D] = s(!1), [ui, E] = s(!1), [T, w] = s(!1), [$, C] = s(0), [g, mi] = s(null), [u, v] = s(null), [l, B] = s("unread"), O = Y(null), V = Y(null), hi = () => {
|
|
75
|
+
var e;
|
|
76
|
+
const i = localStorage.getItem("auth_state"), o = i ? JSON.parse(i) : null;
|
|
77
|
+
return ((e = o == null ? void 0 : o.user) == null ? void 0 : e.id_busuario) || "";
|
|
78
|
+
}, pi = window.location.host.includes("localhost") ? "" : `wss://${window.location.host}/notificaciones`;
|
|
79
|
+
Ri(
|
|
80
|
+
pi,
|
|
81
|
+
(i) => {
|
|
82
|
+
S.log("Notificación recibida"), !(!i || !i.id_notificacionusuario || i.usuario_id !== hi()) && (f(
|
|
83
|
+
(o) => o.some((e) => e.id_notificacionusuario === i.id_notificacionusuario) ? o : [i, ...o]
|
|
84
|
+
), p(
|
|
85
|
+
(o) => o.some((e) => e.id_notificacionusuario === i.id_notificacionusuario) ? o : [i, ...o]
|
|
86
|
+
), C((o) => o + 1));
|
|
335
87
|
}
|
|
336
|
-
|
|
337
|
-
let n = me(e);
|
|
338
|
-
(!n || !n.tagName) && (n = {
|
|
339
|
-
namespaceURI: ge,
|
|
340
|
-
tagName: "template"
|
|
341
|
-
});
|
|
342
|
-
const a = Ve(e.tagName), _ = Ve(n.tagName);
|
|
343
|
-
return nt[e.namespaceURI] ? e.namespaceURI === ze ? n.namespaceURI === V ? a === "svg" : n.namespaceURI === He ? a === "svg" && (_ === "annotation-xml" || Ge[_]) : !!Et[a] : e.namespaceURI === He ? n.namespaceURI === V ? a === "math" : n.namespaceURI === ze ? a === "math" && Be[_] : !!At[a] : e.namespaceURI === V ? n.namespaceURI === ze && !Be[_] || n.namespaceURI === He && !Ge[_] ? !1 : !At[a] && (Vt[a] || !Et[a]) : !!(ye === "application/xhtml+xml" && nt[e.namespaceURI]) : !1;
|
|
344
|
-
}, j = function(e) {
|
|
345
|
-
be(o.removed, {
|
|
346
|
-
element: e
|
|
347
|
-
});
|
|
348
|
-
try {
|
|
349
|
-
me(e).removeChild(e);
|
|
350
|
-
} catch {
|
|
351
|
-
Ze(e);
|
|
352
|
-
}
|
|
353
|
-
}, fe = function(e, n) {
|
|
354
|
-
try {
|
|
355
|
-
be(o.removed, {
|
|
356
|
-
attribute: n.getAttributeNode(e),
|
|
357
|
-
from: n
|
|
358
|
-
});
|
|
359
|
-
} catch {
|
|
360
|
-
be(o.removed, {
|
|
361
|
-
attribute: null,
|
|
362
|
-
from: n
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
if (n.removeAttribute(e), e === "is")
|
|
366
|
-
if (H || ce)
|
|
367
|
-
try {
|
|
368
|
-
j(n);
|
|
369
|
-
} catch {
|
|
370
|
-
}
|
|
371
|
-
else
|
|
372
|
-
try {
|
|
373
|
-
n.setAttribute(e, "");
|
|
374
|
-
} catch {
|
|
375
|
-
}
|
|
376
|
-
}, Nt = function(e) {
|
|
377
|
-
let n = null, a = null;
|
|
378
|
-
if (te)
|
|
379
|
-
e = "<remove></remove>" + e;
|
|
380
|
-
else {
|
|
381
|
-
const N = ct(e, /^[\r\n\t ]+/);
|
|
382
|
-
a = N && N[0];
|
|
383
|
-
}
|
|
384
|
-
ye === "application/xhtml+xml" && ge === V && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
385
|
-
const _ = L ? L.createHTML(e) : e;
|
|
386
|
-
if (ge === V)
|
|
387
|
-
try {
|
|
388
|
-
n = new Ie().parseFromString(_, ye);
|
|
389
|
-
} catch {
|
|
390
|
-
}
|
|
391
|
-
if (!n || !n.documentElement) {
|
|
392
|
-
n = de.createDocument(ge, "template", null);
|
|
393
|
-
try {
|
|
394
|
-
n.documentElement.innerHTML = tt ? Z : _;
|
|
395
|
-
} catch {
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
const I = n.body || n.documentElement;
|
|
399
|
-
return e && a && I.insertBefore(f.createTextNode(a), I.childNodes[0] || null), ge === V ? xe.call(n, W ? "html" : "body")[0] : W ? n.documentElement : I;
|
|
400
|
-
}, St = function(e) {
|
|
401
|
-
return Qe.call(
|
|
402
|
-
e.ownerDocument || e,
|
|
403
|
-
e,
|
|
404
|
-
// eslint-disable-next-line no-bitwise
|
|
405
|
-
ie.SHOW_ELEMENT | ie.SHOW_COMMENT | ie.SHOW_TEXT | ie.SHOW_PROCESSING_INSTRUCTION | ie.SHOW_CDATA_SECTION,
|
|
406
|
-
null
|
|
407
|
-
);
|
|
408
|
-
}, ot = function(e) {
|
|
409
|
-
return e instanceof qe && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof Xe) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
410
|
-
}, Rt = function(e) {
|
|
411
|
-
return typeof K == "function" && e instanceof K;
|
|
412
|
-
};
|
|
413
|
-
function X(r, e, n) {
|
|
414
|
-
je(r, (a) => {
|
|
415
|
-
a.call(o, e, n, Te);
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
const yt = function(e) {
|
|
419
|
-
let n = null;
|
|
420
|
-
if (X(y.beforeSanitizeElements, e, null), ot(e))
|
|
421
|
-
return j(e), !0;
|
|
422
|
-
const a = b(e.nodeName);
|
|
423
|
-
if (X(y.uponSanitizeElement, e, {
|
|
424
|
-
tagName: a,
|
|
425
|
-
allowedTags: A
|
|
426
|
-
}), ee && e.hasChildNodes() && !Rt(e.firstElementChild) && w(/<[/\w!]/g, e.innerHTML) && w(/<[/\w!]/g, e.textContent) || e.nodeType === Oe.progressingInstruction || ee && e.nodeType === Oe.comment && w(/<[/\w]/g, e.data))
|
|
427
|
-
return j(e), !0;
|
|
428
|
-
if (!(B.tagCheck instanceof Function && B.tagCheck(a)) && (!A[a] || re[a])) {
|
|
429
|
-
if (!re[a] && Lt(a) && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, a) || T.tagNameCheck instanceof Function && T.tagNameCheck(a)))
|
|
430
|
-
return !1;
|
|
431
|
-
if (i && !p[a]) {
|
|
432
|
-
const _ = me(e) || e.parentNode, I = we(e) || e.childNodes;
|
|
433
|
-
if (I && _) {
|
|
434
|
-
const N = I.length;
|
|
435
|
-
for (let P = N - 1; P >= 0; --P) {
|
|
436
|
-
const q = Ke(I[P], !0);
|
|
437
|
-
q.__removalCount = (e.__removalCount || 0) + 1, _.insertBefore(q, Je(e));
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
return j(e), !0;
|
|
442
|
-
}
|
|
443
|
-
return e instanceof z && !Zt(e) || (a === "noscript" || a === "noembed" || a === "noframes") && w(/<\/no(script|embed|frames)/i, e.innerHTML) ? (j(e), !0) : (U && e.nodeType === Oe.text && (n = e.textContent, je([J, $, Ee], (_) => {
|
|
444
|
-
n = Le(n, _, " ");
|
|
445
|
-
}), e.textContent !== n && (be(o.removed, {
|
|
446
|
-
element: e.cloneNode()
|
|
447
|
-
}), e.textContent = n)), X(y.afterSanitizeElements, e, null), !1);
|
|
448
|
-
}, bt = function(e, n, a) {
|
|
449
|
-
if (se[n] || ne && (n === "id" || n === "name") && (a in f || a in Kt))
|
|
450
|
-
return !1;
|
|
451
|
-
if (!(Q && !se[n] && w(G, n))) {
|
|
452
|
-
if (!(Se && w(ae, n))) {
|
|
453
|
-
if (!(B.attributeCheck instanceof Function && B.attributeCheck(n, e))) {
|
|
454
|
-
if (!E[n] || se[n]) {
|
|
455
|
-
if (
|
|
456
|
-
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
457
|
-
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
458
|
-
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
459
|
-
!(Lt(e) && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, e) || T.tagNameCheck instanceof Function && T.tagNameCheck(e)) && (T.attributeNameCheck instanceof RegExp && w(T.attributeNameCheck, n) || T.attributeNameCheck instanceof Function && T.attributeNameCheck(n, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
460
|
-
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
461
|
-
n === "is" && T.allowCustomizedBuiltInElements && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, a) || T.tagNameCheck instanceof Function && T.tagNameCheck(a)))
|
|
462
|
-
) return !1;
|
|
463
|
-
} else if (!et[n]) {
|
|
464
|
-
if (!w(Ne, Le(a, Ae, ""))) {
|
|
465
|
-
if (!((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && Rn(a, "data:") === 0 && ht[e])) {
|
|
466
|
-
if (!(Re && !w(D, Le(a, Ae, "")))) {
|
|
467
|
-
if (a)
|
|
468
|
-
return !1;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
return !0;
|
|
477
|
-
}, Lt = function(e) {
|
|
478
|
-
return e !== "annotation-xml" && ct(e, ve);
|
|
479
|
-
}, Dt = function(e) {
|
|
480
|
-
X(y.beforeSanitizeAttributes, e, null);
|
|
481
|
-
const {
|
|
482
|
-
attributes: n
|
|
483
|
-
} = e;
|
|
484
|
-
if (!n || ot(e))
|
|
485
|
-
return;
|
|
486
|
-
const a = {
|
|
487
|
-
attrName: "",
|
|
488
|
-
attrValue: "",
|
|
489
|
-
keepAttr: !0,
|
|
490
|
-
allowedAttributes: E,
|
|
491
|
-
forceKeepAttr: void 0
|
|
492
|
-
};
|
|
493
|
-
let _ = n.length;
|
|
494
|
-
for (; _--; ) {
|
|
495
|
-
const I = n[_], {
|
|
496
|
-
name: N,
|
|
497
|
-
namespaceURI: P,
|
|
498
|
-
value: q
|
|
499
|
-
} = I, _e = b(N), at = q;
|
|
500
|
-
let C = N === "value" ? at : yn(at);
|
|
501
|
-
if (a.attrName = _e, a.attrValue = C, a.keepAttr = !0, a.forceKeepAttr = void 0, X(y.uponSanitizeAttribute, e, a), C = a.attrValue, Fe && (_e === "id" || _e === "name") && (fe(N, e), C = t + C), ee && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, C)) {
|
|
502
|
-
fe(N, e);
|
|
503
|
-
continue;
|
|
504
|
-
}
|
|
505
|
-
if (_e === "attributename" && ct(C, "href")) {
|
|
506
|
-
fe(N, e);
|
|
507
|
-
continue;
|
|
508
|
-
}
|
|
509
|
-
if (a.forceKeepAttr)
|
|
510
|
-
continue;
|
|
511
|
-
if (!a.keepAttr) {
|
|
512
|
-
fe(N, e);
|
|
513
|
-
continue;
|
|
514
|
-
}
|
|
515
|
-
if (!Ue && w(/\/>/i, C)) {
|
|
516
|
-
fe(N, e);
|
|
517
|
-
continue;
|
|
518
|
-
}
|
|
519
|
-
U && je([J, $, Ee], (Ot) => {
|
|
520
|
-
C = Le(C, Ot, " ");
|
|
521
|
-
});
|
|
522
|
-
const Ct = b(e.nodeName);
|
|
523
|
-
if (!bt(Ct, _e, C)) {
|
|
524
|
-
fe(N, e);
|
|
525
|
-
continue;
|
|
526
|
-
}
|
|
527
|
-
if (L && typeof ue == "object" && typeof ue.getAttributeType == "function" && !P)
|
|
528
|
-
switch (ue.getAttributeType(Ct, _e)) {
|
|
529
|
-
case "TrustedHTML": {
|
|
530
|
-
C = L.createHTML(C);
|
|
531
|
-
break;
|
|
532
|
-
}
|
|
533
|
-
case "TrustedScriptURL": {
|
|
534
|
-
C = L.createScriptURL(C);
|
|
535
|
-
break;
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
if (C !== at)
|
|
539
|
-
try {
|
|
540
|
-
P ? e.setAttributeNS(P, N, C) : e.setAttribute(N, C), ot(e) ? j(e) : vt(o.removed);
|
|
541
|
-
} catch {
|
|
542
|
-
fe(N, e);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
X(y.afterSanitizeAttributes, e, null);
|
|
546
|
-
}, Jt = function r(e) {
|
|
547
|
-
let n = null;
|
|
548
|
-
const a = St(e);
|
|
549
|
-
for (X(y.beforeSanitizeShadowDOM, e, null); n = a.nextNode(); )
|
|
550
|
-
X(y.uponSanitizeShadowNode, n, null), yt(n), Dt(n), n.content instanceof R && r(n.content);
|
|
551
|
-
X(y.afterSanitizeShadowDOM, e, null);
|
|
552
|
-
};
|
|
553
|
-
return o.sanitize = function(r) {
|
|
554
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = null, a = null, _ = null, I = null;
|
|
555
|
-
if (tt = !r, tt && (r = "<!-->"), typeof r != "string" && !Rt(r))
|
|
556
|
-
if (typeof r.toString == "function") {
|
|
557
|
-
if (r = r.toString(), typeof r != "string")
|
|
558
|
-
throw De("dirty is not a string, aborting");
|
|
559
|
-
} else
|
|
560
|
-
throw De("toString is not a function");
|
|
561
|
-
if (!o.isSupported)
|
|
562
|
-
return r;
|
|
563
|
-
if (he || it(e), o.removed = [], typeof r == "string" && (u = !1), u) {
|
|
564
|
-
if (r.nodeName) {
|
|
565
|
-
const q = b(r.nodeName);
|
|
566
|
-
if (!A[q] || re[q])
|
|
567
|
-
throw De("root node is forbidden and cannot be sanitized in-place");
|
|
568
|
-
}
|
|
569
|
-
} else if (r instanceof K)
|
|
570
|
-
n = Nt("<!---->"), a = n.ownerDocument.importNode(r, !0), a.nodeType === Oe.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? n = a : n.appendChild(a);
|
|
571
|
-
else {
|
|
572
|
-
if (!H && !U && !W && // eslint-disable-next-line unicorn/prefer-includes
|
|
573
|
-
r.indexOf("<") === -1)
|
|
574
|
-
return L && le ? L.createHTML(r) : r;
|
|
575
|
-
if (n = Nt(r), !n)
|
|
576
|
-
return H ? null : le ? Z : "";
|
|
577
|
-
}
|
|
578
|
-
n && te && j(n.firstChild);
|
|
579
|
-
const N = St(u ? r : n);
|
|
580
|
-
for (; _ = N.nextNode(); )
|
|
581
|
-
yt(_), Dt(_), _.content instanceof R && Jt(_.content);
|
|
582
|
-
if (u)
|
|
583
|
-
return r;
|
|
584
|
-
if (H) {
|
|
585
|
-
if (ce)
|
|
586
|
-
for (I = Me.call(n.ownerDocument); n.firstChild; )
|
|
587
|
-
I.appendChild(n.firstChild);
|
|
588
|
-
else
|
|
589
|
-
I = n;
|
|
590
|
-
return (E.shadowroot || E.shadowrootmode) && (I = pe.call(s, I, !0)), I;
|
|
591
|
-
}
|
|
592
|
-
let P = W ? n.outerHTML : n.innerHTML;
|
|
593
|
-
return W && A["!doctype"] && n.ownerDocument && n.ownerDocument.doctype && n.ownerDocument.doctype.name && w(jt, n.ownerDocument.doctype.name) && (P = "<!DOCTYPE " + n.ownerDocument.doctype.name + `>
|
|
594
|
-
` + P), U && je([J, $, Ee], (q) => {
|
|
595
|
-
P = Le(P, q, " ");
|
|
596
|
-
}), L && le ? L.createHTML(P) : P;
|
|
597
|
-
}, o.setConfig = function() {
|
|
598
|
-
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
599
|
-
it(r), he = !0;
|
|
600
|
-
}, o.clearConfig = function() {
|
|
601
|
-
Te = null, he = !1;
|
|
602
|
-
}, o.isValidAttribute = function(r, e, n) {
|
|
603
|
-
Te || it({});
|
|
604
|
-
const a = b(r), _ = b(e);
|
|
605
|
-
return bt(a, _, n);
|
|
606
|
-
}, o.addHook = function(r, e) {
|
|
607
|
-
typeof e == "function" && be(y[r], e);
|
|
608
|
-
}, o.removeHook = function(r, e) {
|
|
609
|
-
if (e !== void 0) {
|
|
610
|
-
const n = Nn(y[r], e);
|
|
611
|
-
return n === -1 ? void 0 : Sn(y[r], n, 1)[0];
|
|
612
|
-
}
|
|
613
|
-
return vt(y[r]);
|
|
614
|
-
}, o.removeHooks = function(r) {
|
|
615
|
-
y[r] = [];
|
|
616
|
-
}, o.removeAllHooks = function() {
|
|
617
|
-
y = zt();
|
|
618
|
-
}, o;
|
|
619
|
-
}
|
|
620
|
-
var Hn = Yt();
|
|
621
|
-
const Fi = ({ variant: l = "normal" }) => {
|
|
622
|
-
const [o, f] = O(!1), [s, d] = O([]), [R, v] = O([]), [K, z] = O([]), [ie, Xe] = O(1), [qe, Ie] = O(1), [ue, oe] = O(1), [Ke, Ze] = O(!0), [Je, we] = O(!0), [me, L] = O(!0), [Z, de] = O(!1), [Qe, Me] = O(!1), [xe, pe] = O(!1), [y, J] = O(0), [$, Ee] = O(null), [G, ae] = O(null), [D, Ae] = O("unread"), ve = It(null), Ne = It(null), A = () => {
|
|
623
|
-
var u;
|
|
624
|
-
const t = localStorage.getItem("auth_state"), i = t ? JSON.parse(t) : null;
|
|
625
|
-
return ((u = i == null ? void 0 : i.user) == null ? void 0 : u.id_busuario) || "";
|
|
626
|
-
}, Pe = window.location.host.includes("localhost") ? "" : `wss://${window.location.host}/notificaciones`;
|
|
627
|
-
mn(
|
|
628
|
-
Pe,
|
|
629
|
-
(t) => {
|
|
630
|
-
console.log("Notificación recibida"), !(!t || !t.id_notificacionusuario || t.usuario_id !== A()) && (d(
|
|
631
|
-
(i) => i.some((u) => u.id_notificacionusuario === t.id_notificacionusuario) ? i : [t, ...i]
|
|
632
|
-
), z(
|
|
633
|
-
(i) => i.some((u) => u.id_notificacionusuario === t.id_notificacionusuario) ? i : [t, ...i]
|
|
634
|
-
), J((i) => i + 1));
|
|
635
|
-
}
|
|
636
|
-
), We(() => {
|
|
88
|
+
), j(() => {
|
|
637
89
|
(async () => {
|
|
638
90
|
try {
|
|
639
|
-
const
|
|
640
|
-
|
|
91
|
+
const o = await ji();
|
|
92
|
+
C(o);
|
|
641
93
|
} catch {
|
|
642
94
|
}
|
|
643
95
|
})();
|
|
644
|
-
}, []),
|
|
645
|
-
|
|
646
|
-
}, [
|
|
647
|
-
|
|
648
|
-
}, [
|
|
649
|
-
const
|
|
96
|
+
}, []), j(() => {
|
|
97
|
+
N === "popoverV2" && I("all", 1);
|
|
98
|
+
}, [N]), j(() => {
|
|
99
|
+
m || v(null);
|
|
100
|
+
}, [m]);
|
|
101
|
+
const I = async (i, o = 1) => {
|
|
650
102
|
try {
|
|
651
|
-
|
|
652
|
-
const
|
|
653
|
-
|
|
103
|
+
o === 1 && (E(!0), w(!1));
|
|
104
|
+
const a = await Pi(i === "read" ? !0 : i === "unread" ? !1 : void 0, o), t = a.results;
|
|
105
|
+
i === "all" ? (f((c) => o === 1 ? t : [...c, ...t]), si(!!a.next), ei(o)) : i === "read" ? (h((c) => o === 1 ? t : [...c, ...t]), H(!!a.next), A(o)) : (p((c) => o === 1 ? t : [...c, ...t]), fi(!!a.next), ci(o));
|
|
654
106
|
} catch {
|
|
655
107
|
} finally {
|
|
656
|
-
|
|
108
|
+
o === 1 && (E(!1), w(!0));
|
|
657
109
|
}
|
|
658
|
-
},
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
},
|
|
662
|
-
|
|
663
|
-
},
|
|
664
|
-
switch (
|
|
110
|
+
}, Ni = async () => {
|
|
111
|
+
const i = !m;
|
|
112
|
+
M(i), i ? (B("unread"), w(!1), v(null), await I("unread", 1)) : v(null);
|
|
113
|
+
}, z = async (i) => {
|
|
114
|
+
B(i), w(!1), await I(i, 1);
|
|
115
|
+
}, gi = (i) => {
|
|
116
|
+
switch (i) {
|
|
665
117
|
case "Asignación":
|
|
666
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ n(Hi, {});
|
|
667
119
|
case "Informativa":
|
|
668
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ n(ki, {});
|
|
669
121
|
case "Novedad":
|
|
670
|
-
return /* @__PURE__ */
|
|
122
|
+
return /* @__PURE__ */ n(Ai, {});
|
|
671
123
|
case "Noticia":
|
|
672
|
-
return /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ n(Li, {});
|
|
673
125
|
default:
|
|
674
|
-
return /* @__PURE__ */
|
|
126
|
+
return /* @__PURE__ */ n(Z, {});
|
|
675
127
|
}
|
|
676
|
-
},
|
|
677
|
-
const
|
|
678
|
-
return
|
|
679
|
-
},
|
|
680
|
-
const i =
|
|
681
|
-
return
|
|
682
|
-
},
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
const i = U(t);
|
|
689
|
-
if (!i) return;
|
|
690
|
-
const u = !i.leida;
|
|
128
|
+
}, J = (i, o) => i.length > o ? i.substring(0, o) + "..." : i, vi = (i) => new DOMParser().parseFromString(i, "text/html").body.textContent || "", W = (i) => {
|
|
129
|
+
const o = i.includes("<") ? vi(i) : i;
|
|
130
|
+
return o.length > 175 ? `${J(o, 175)} ver más` : o;
|
|
131
|
+
}, L = (i) => bi(i), q = (i) => {
|
|
132
|
+
const o = /* @__PURE__ */ new Date(), e = new Date(i), a = o.getTime() - e.getTime(), t = Math.floor(a / (1e3 * 60 * 60)), c = Math.floor(t / 24);
|
|
133
|
+
return c > 3 ? e.toISOString().slice(0, 16).replace("T", " ") : c > 0 ? `hace ${c} día${c > 1 ? "s" : ""}` : t > 0 ? `hace ${t} hora${t > 1 ? "s" : ""}` : "hace menos de 1 hora";
|
|
134
|
+
}, _i = (i) => {
|
|
135
|
+
l === "all" ? f(i) : l === "read" ? h(i) : p(i);
|
|
136
|
+
}, _ = (i) => d.find((o) => o.id_notificacionusuario === i) || y.find((o) => o.id_notificacionusuario === i) || b.find((o) => o.id_notificacionusuario === i), F = async (i) => {
|
|
137
|
+
const o = _(i);
|
|
138
|
+
if (!o) return;
|
|
139
|
+
const e = !o.leida;
|
|
691
140
|
try {
|
|
692
|
-
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
(
|
|
696
|
-
)),
|
|
697
|
-
(
|
|
698
|
-
),
|
|
699
|
-
(
|
|
700
|
-
),
|
|
701
|
-
} catch (
|
|
702
|
-
|
|
141
|
+
e ? await $i(i) : await Fi(i);
|
|
142
|
+
const a = { ...o, leida: e };
|
|
143
|
+
f((t) => t.map(
|
|
144
|
+
(c) => c.id_notificacionusuario === i ? a : c
|
|
145
|
+
)), h(
|
|
146
|
+
(t) => e ? [a, ...t.filter((c) => c.id_notificacionusuario !== i)] : t.filter((c) => c.id_notificacionusuario !== i)
|
|
147
|
+
), p(
|
|
148
|
+
(t) => e ? t.filter((c) => c.id_notificacionusuario !== i) : [a, ...t.filter((c) => c.id_notificacionusuario !== i)]
|
|
149
|
+
), C((t) => e ? t - 1 : t + 1);
|
|
150
|
+
} catch (a) {
|
|
151
|
+
S.error("Error cambiando estado de leída:", a);
|
|
703
152
|
}
|
|
704
|
-
},
|
|
153
|
+
}, G = async (i) => {
|
|
705
154
|
try {
|
|
706
|
-
await
|
|
707
|
-
const
|
|
708
|
-
|
|
709
|
-
(
|
|
710
|
-
),
|
|
711
|
-
} catch (
|
|
712
|
-
|
|
155
|
+
await Mi(i);
|
|
156
|
+
const o = _(i);
|
|
157
|
+
_i(
|
|
158
|
+
(e) => e.filter((a) => a.id_notificacionusuario !== i)
|
|
159
|
+
), f((e) => e.filter((a) => a.id_notificacionusuario !== i)), h((e) => e.filter((a) => a.id_notificacionusuario !== i)), p((e) => e.filter((a) => a.id_notificacionusuario !== i)), o && !o.leida && C((e) => e - 1);
|
|
160
|
+
} catch (o) {
|
|
161
|
+
S.error("Error eliminando notificación:", o);
|
|
713
162
|
}
|
|
714
|
-
},
|
|
163
|
+
}, K = async () => {
|
|
715
164
|
try {
|
|
716
|
-
await
|
|
717
|
-
} catch (
|
|
718
|
-
|
|
165
|
+
await Si(), h([]), H(!1), A(1), f((i) => i.filter((o) => !o.leida)), l === "read" && mi(null);
|
|
166
|
+
} catch (i) {
|
|
167
|
+
S.error("Error eliminando notificaciones leídas:", i);
|
|
719
168
|
}
|
|
720
|
-
},
|
|
721
|
-
|
|
722
|
-
if (!
|
|
723
|
-
const
|
|
724
|
-
(
|
|
725
|
-
if (!
|
|
726
|
-
|
|
727
|
-
const
|
|
728
|
-
|
|
169
|
+
}, k = l === "all" ? d : l === "read" ? y : b, P = l === "all" ? ri : l === "read" ? li : di, Q = l === "all" ? ni : l === "read" ? ai : ti;
|
|
170
|
+
j(() => {
|
|
171
|
+
if (!T || !P) return;
|
|
172
|
+
const i = new IntersectionObserver(
|
|
173
|
+
(e) => {
|
|
174
|
+
if (!e[0].isIntersecting || U || !P || k.length === 0) return;
|
|
175
|
+
D(!0);
|
|
176
|
+
const a = Q + 1;
|
|
177
|
+
I(l, a).finally(() => D(!1));
|
|
729
178
|
},
|
|
730
179
|
{
|
|
731
|
-
root:
|
|
180
|
+
root: O.current,
|
|
732
181
|
rootMargin: "200px"
|
|
733
182
|
}
|
|
734
|
-
),
|
|
735
|
-
return
|
|
736
|
-
|
|
183
|
+
), o = V.current;
|
|
184
|
+
return o && i.observe(o), () => {
|
|
185
|
+
o && i.unobserve(o), i.disconnect();
|
|
737
186
|
};
|
|
738
|
-
}, [
|
|
739
|
-
const
|
|
740
|
-
|
|
741
|
-
},
|
|
742
|
-
|
|
743
|
-
},
|
|
744
|
-
id:
|
|
745
|
-
title:
|
|
746
|
-
description:
|
|
747
|
-
time:
|
|
748
|
-
type:
|
|
749
|
-
unread: !
|
|
187
|
+
}, [l, Q, P, U, T]);
|
|
188
|
+
const X = (i) => {
|
|
189
|
+
v(i.id_notificacionusuario);
|
|
190
|
+
}, x = () => {
|
|
191
|
+
v(null);
|
|
192
|
+
}, xi = d.map((i) => ({
|
|
193
|
+
id: i.id_notificacionusuario,
|
|
194
|
+
title: i.notificacion.titulo,
|
|
195
|
+
description: i.notificacion.mensaje,
|
|
196
|
+
time: q(i.fecha_estado),
|
|
197
|
+
type: i.notificacion.tipo === "Error" ? "error" : i.notificacion.tipo === "Advertencia" ? "warning" : i.notificacion.tipo === "Asignación" ? "success" : "info",
|
|
198
|
+
unread: !i.leida
|
|
750
199
|
}));
|
|
751
|
-
return
|
|
752
|
-
/* @__PURE__ */
|
|
753
|
-
|
|
200
|
+
return N === "popoverV2" ? /* @__PURE__ */ r("div", { className: "notificacion-usuario-container", children: [
|
|
201
|
+
/* @__PURE__ */ n(
|
|
202
|
+
Ui,
|
|
754
203
|
{
|
|
755
|
-
count:
|
|
756
|
-
notifications:
|
|
204
|
+
count: $,
|
|
205
|
+
notifications: xi,
|
|
757
206
|
onMarkAllRead: () => {
|
|
758
|
-
|
|
207
|
+
d.filter((i) => !i.leida).forEach((i) => F(i.id_notificacionusuario));
|
|
759
208
|
},
|
|
760
|
-
onClearRead:
|
|
761
|
-
onItemClick: (
|
|
762
|
-
const
|
|
763
|
-
|
|
209
|
+
onClearRead: K,
|
|
210
|
+
onItemClick: (i) => {
|
|
211
|
+
const o = d.find((e) => e.id_notificacionusuario === i.id);
|
|
212
|
+
o && o.notificacion.mensaje.length > 175 && X(o);
|
|
764
213
|
},
|
|
765
|
-
onMarkRead: (
|
|
766
|
-
onDeleteItem: (
|
|
214
|
+
onMarkRead: (i) => F(i.id),
|
|
215
|
+
onDeleteItem: (i) => G(i.id),
|
|
767
216
|
onViewAll: () => {
|
|
768
217
|
}
|
|
769
218
|
}
|
|
770
219
|
),
|
|
771
|
-
|
|
772
|
-
const
|
|
773
|
-
return
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
220
|
+
u && (() => {
|
|
221
|
+
const i = _(u);
|
|
222
|
+
return i ? /* @__PURE__ */ r(R, { children: [
|
|
223
|
+
/* @__PURE__ */ n("div", { className: "notificacion-detail-overlay", onClick: x }),
|
|
224
|
+
/* @__PURE__ */ r("div", { className: "notificacion-detail-modal", children: [
|
|
225
|
+
/* @__PURE__ */ r("div", { className: "notificacion-detail-header", children: [
|
|
226
|
+
/* @__PURE__ */ n("h3", { children: i.notificacion.titulo }),
|
|
227
|
+
/* @__PURE__ */ n("button", { className: "notificacion-detail-close", onClick: x, children: "×" })
|
|
779
228
|
] }),
|
|
780
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ n("div", { className: "notificacion-detail-body", children: i.notificacion.mensaje.includes("<") ? /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: L(i.notificacion.mensaje) } }) : /* @__PURE__ */ n("p", { children: i.notificacion.mensaje }) })
|
|
781
230
|
] })
|
|
782
231
|
] }) : null;
|
|
783
232
|
})()
|
|
784
|
-
] }) : /* @__PURE__ */
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
-
|
|
787
|
-
/* @__PURE__ */
|
|
233
|
+
] }) : /* @__PURE__ */ r("div", { className: "notificacion-usuario-container", children: [
|
|
234
|
+
/* @__PURE__ */ r("button", { className: "notificacion-button", onClick: Ni, children: [
|
|
235
|
+
$ > 0 && /* @__PURE__ */ n(oi, { pill: !0, bg: "danger", className: "notificacion-badge", children: $ }),
|
|
236
|
+
/* @__PURE__ */ n(Z, { className: "icono-notificaciones" })
|
|
788
237
|
] }),
|
|
789
|
-
|
|
790
|
-
/* @__PURE__ */
|
|
791
|
-
const
|
|
792
|
-
return
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */
|
|
238
|
+
m && /* @__PURE__ */ r("div", { className: `notificacion-dropdown ${u ? "expanded" : ""}`, children: [
|
|
239
|
+
/* @__PURE__ */ n("div", { className: "notificacion-header", children: u ? (() => {
|
|
240
|
+
const i = _(u);
|
|
241
|
+
return i ? /* @__PURE__ */ r("div", { className: "notificacion-expanded-header", children: [
|
|
242
|
+
/* @__PURE__ */ n("span", { className: "notificacion-expanded-title", children: i.notificacion.titulo }),
|
|
243
|
+
/* @__PURE__ */ n("button", { onClick: x, className: "notificacion-expanded-close", children: "×" })
|
|
795
244
|
] }) : null;
|
|
796
|
-
})() : /* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
/* @__PURE__ */
|
|
245
|
+
})() : /* @__PURE__ */ r(R, { children: [
|
|
246
|
+
/* @__PURE__ */ r("div", { className: "filter-buttons", children: [
|
|
247
|
+
/* @__PURE__ */ n("button", { className: `filter-button ${l === "unread" ? "active" : ""}`, onClick: () => z("unread"), children: "Sin leer" }),
|
|
248
|
+
/* @__PURE__ */ n("button", { className: `filter-button ${l === "read" ? "active" : ""}`, onClick: () => z("read"), children: "Leídas" })
|
|
800
249
|
] }),
|
|
801
|
-
|
|
250
|
+
l === "read" && /* @__PURE__ */ n("div", { className: "header-actions", children: /* @__PURE__ */ n("span", { className: "delete-read-link", onClick: K, children: "Eliminar leídas" }) })
|
|
802
251
|
] }) }),
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
|
|
805
|
-
const
|
|
806
|
-
return
|
|
807
|
-
})() :
|
|
808
|
-
/* @__PURE__ */
|
|
809
|
-
/* @__PURE__ */
|
|
810
|
-
] }) :
|
|
252
|
+
/* @__PURE__ */ r("div", { className: "notificacion-list", ref: O, children: [
|
|
253
|
+
ui ? /* @__PURE__ */ n("div", { className: "notificacion-loading", children: /* @__PURE__ */ n(ii, { type: "perro" }) }) : u ? (() => {
|
|
254
|
+
const i = _(u);
|
|
255
|
+
return i ? /* @__PURE__ */ n("div", { className: "notificacion-expanded-content", children: /* @__PURE__ */ n("div", { className: "notificacion-expanded-text", children: i.notificacion.mensaje.includes("<") ? /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: L(i.notificacion.mensaje) } }) : /* @__PURE__ */ n("p", { children: i.notificacion.mensaje }) }) }) : null;
|
|
256
|
+
})() : k.length === 0 ? /* @__PURE__ */ r("div", { className: "notificacion-empty", children: [
|
|
257
|
+
/* @__PURE__ */ n(ii, { type: "perro" }),
|
|
258
|
+
/* @__PURE__ */ n("div", { className: "notificacion-empty-text", children: "Sin notificaciones" })
|
|
259
|
+
] }) : k.map((i) => /* @__PURE__ */ r(
|
|
811
260
|
"div",
|
|
812
261
|
{
|
|
813
|
-
className: `notificacion-item ${
|
|
814
|
-
onClick: () =>
|
|
262
|
+
className: `notificacion-item ${i.leida ? "" : "no-leida"} ${i.notificacion.mensaje.length > 175 ? "clickeable" : ""}`,
|
|
263
|
+
onClick: () => i.notificacion.mensaje.length > 175 && X(i),
|
|
815
264
|
children: [
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
|
|
819
|
-
!
|
|
265
|
+
/* @__PURE__ */ r("div", { className: "notificacion-content", children: [
|
|
266
|
+
/* @__PURE__ */ r("div", { className: "notificacion-icon-container", children: [
|
|
267
|
+
gi(i.notificacion.tipo),
|
|
268
|
+
!i.leida && /* @__PURE__ */ n("div", { className: "notificacion-indicator" })
|
|
820
269
|
] }),
|
|
821
|
-
/* @__PURE__ */
|
|
822
|
-
/* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ r("div", { className: "notificacion-text", children: [
|
|
271
|
+
/* @__PURE__ */ n("div", { className: "notificacion-titulo", children: J(i.notificacion.titulo, 60) }),
|
|
272
|
+
/* @__PURE__ */ n("div", { className: "notificacion-mensaje", children: i.notificacion.mensaje.includes("<") ? /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: L(W(i.notificacion.mensaje)) } }) : W(i.notificacion.mensaje) }),
|
|
273
|
+
/* @__PURE__ */ n("div", { className: "notificacion-fecha", children: q(i.fecha_estado) })
|
|
825
274
|
] })
|
|
826
275
|
] }),
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
/* @__PURE__ */
|
|
829
|
-
|
|
276
|
+
/* @__PURE__ */ r("div", { className: "notificacion-actions", onClick: (o) => o.stopPropagation(), children: [
|
|
277
|
+
/* @__PURE__ */ n("button", { className: "action-button toggle-leida", onClick: () => F(i.id_notificacionusuario), children: i.leida ? /* @__PURE__ */ n(wi, {}) : /* @__PURE__ */ n(Ci, {}) }),
|
|
278
|
+
l === "read" && /* @__PURE__ */ n("button", { className: "action-button delete", onClick: () => G(i.id_notificacionusuario), children: /* @__PURE__ */ n(Ii, {}) })
|
|
830
279
|
] })
|
|
831
280
|
]
|
|
832
281
|
},
|
|
833
|
-
|
|
282
|
+
i.id_notificacionusuario
|
|
834
283
|
)),
|
|
835
|
-
|
|
284
|
+
k.length > 0 && P && !u && /* @__PURE__ */ n("div", { ref: V, style: { height: "1px" } })
|
|
836
285
|
] })
|
|
837
286
|
] }),
|
|
838
|
-
|
|
839
|
-
/* @__PURE__ */
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
/* @__PURE__ */
|
|
287
|
+
g && /* @__PURE__ */ r(R, { children: [
|
|
288
|
+
/* @__PURE__ */ n("div", { className: "notificacion-detail-overlay", onClick: x }),
|
|
289
|
+
/* @__PURE__ */ r("div", { className: "notificacion-detail-modal", children: [
|
|
290
|
+
/* @__PURE__ */ r("div", { className: "notificacion-detail-header", children: [
|
|
291
|
+
/* @__PURE__ */ n("h3", { children: g.notificacion.titulo }),
|
|
292
|
+
/* @__PURE__ */ n("button", { className: "notificacion-detail-close", onClick: x, children: "×" })
|
|
844
293
|
] }),
|
|
845
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ n("div", { className: "notificacion-detail-body", children: g.notificacion.mensaje.includes("<") ? /* @__PURE__ */ n("div", { dangerouslySetInnerHTML: { __html: L(g.notificacion.mensaje) } }) : /* @__PURE__ */ n("p", { children: g.notificacion.mensaje }) })
|
|
846
295
|
] })
|
|
847
296
|
] })
|
|
848
297
|
] });
|
|
849
298
|
};
|
|
850
299
|
export {
|
|
851
|
-
|
|
300
|
+
Bo as NotificacionUsuario
|
|
852
301
|
};
|