@qtalo/qt-ui-library 0.3.0 → 0.3.2
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.cjs +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +33 -2
- package/dist/index.js +453 -410
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -391,43 +391,43 @@ function createDOMPurify() {
|
|
|
391
391
|
e.DocumentFragment;
|
|
392
392
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
393
393
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
394
|
-
let l = e.DOMParser, u = e.trustedTypes, f = s.prototype, p = lookupGetter(f, "cloneNode"), h = lookupGetter(f, "remove"),
|
|
394
|
+
let l = e.DOMParser, u = e.trustedTypes, f = s.prototype, p = lookupGetter(f, "cloneNode"), h = lookupGetter(f, "remove"), Fs = lookupGetter(f, "nextSibling"), g = lookupGetter(f, "childNodes"), O = lookupGetter(f, "parentNode"), Is = lookupGetter(f, "shadowRoot"), Ls = lookupGetter(f, "attributes"), A = o && o.prototype ? lookupGetter(o.prototype, "nodeType") : null, Rs = o && o.prototype ? lookupGetter(o.prototype, "nodeName") : null, R = o && o.prototype ? lookupGetter(o.prototype, "ownerDocument") : null;
|
|
395
395
|
if (typeof a == "function") {
|
|
396
396
|
let e = n.createElement("template");
|
|
397
397
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
398
398
|
}
|
|
399
|
-
let
|
|
400
|
-
if (
|
|
401
|
-
},
|
|
402
|
-
|
|
399
|
+
let B, zs = "", Bs, Vs = !1, Hs = 0, Us = function() {
|
|
400
|
+
if (Hs > 0) throw typeErrorCreate("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
|
|
401
|
+
}, Ws = function(e) {
|
|
402
|
+
Us(), Hs++;
|
|
403
403
|
try {
|
|
404
|
-
return
|
|
404
|
+
return B.createHTML(e);
|
|
405
405
|
} finally {
|
|
406
|
-
|
|
406
|
+
Hs--;
|
|
407
407
|
}
|
|
408
|
-
},
|
|
409
|
-
|
|
408
|
+
}, Gs = function(e) {
|
|
409
|
+
Us(), Hs++;
|
|
410
410
|
try {
|
|
411
|
-
return
|
|
411
|
+
return B.createScriptURL(e);
|
|
412
412
|
} finally {
|
|
413
|
-
|
|
413
|
+
Hs--;
|
|
414
414
|
}
|
|
415
|
-
},
|
|
416
|
-
return
|
|
417
|
-
},
|
|
418
|
-
t.isSupported = typeof entries == "function" && typeof O == "function" &&
|
|
419
|
-
let
|
|
415
|
+
}, Ks = function() {
|
|
416
|
+
return Vs ||= (Bs = _createTrustedTypesPolicy(u, i), !0), Bs;
|
|
417
|
+
}, qs = n, Js = qs.implementation, Ys = qs.createNodeIterator, Xs = qs.createDocumentFragment, Zs = qs.getElementsByTagName, Qs = r.importNode, V = _createHooksMap();
|
|
418
|
+
t.isSupported = typeof entries == "function" && typeof O == "function" && Js && Js.createHTMLDocument !== void 0;
|
|
419
|
+
let $s = MUSTACHE_EXPR, ec = ERB_EXPR, tc = TMPLIT_EXPR, nc = DATA_ATTR, rc = ARIA_ATTR, ic = IS_SCRIPT_OR_DATA, ac = ATTR_WHITESPACE, oc = CUSTOM_ELEMENT, sc = IS_ALLOWED_URI, H = null, cc = addToSet({}, [
|
|
420
420
|
...html$1,
|
|
421
421
|
...svg$1,
|
|
422
422
|
...svgFilters,
|
|
423
423
|
...mathMl$1,
|
|
424
424
|
...text
|
|
425
|
-
]),
|
|
425
|
+
]), Y = null, lc = addToSet({}, [
|
|
426
426
|
...html,
|
|
427
427
|
...svg,
|
|
428
428
|
...mathMl,
|
|
429
429
|
...xml
|
|
430
|
-
]),
|
|
430
|
+
]), uc = Object.seal(create(null, {
|
|
431
431
|
tagNameCheck: {
|
|
432
432
|
writable: !0,
|
|
433
433
|
configurable: !1,
|
|
@@ -446,7 +446,7 @@ function createDOMPurify() {
|
|
|
446
446
|
enumerable: !0,
|
|
447
447
|
value: !1
|
|
448
448
|
}
|
|
449
|
-
})),
|
|
449
|
+
})), dc = null, fc = null, pc = Object.seal(create(null, {
|
|
450
450
|
tagCheck: {
|
|
451
451
|
writable: !0,
|
|
452
452
|
configurable: !1,
|
|
@@ -459,14 +459,14 @@ function createDOMPurify() {
|
|
|
459
459
|
enumerable: !0,
|
|
460
460
|
value: null
|
|
461
461
|
}
|
|
462
|
-
})),
|
|
462
|
+
})), mc = !0, hc = !0, gc = !1, _c = !0, vc = !1, yc = !0, bc = !1, xc = !1, Sc = null, Cc = null, wc = !1, Tc = !1, Ec = !1, Dc = !1, Oc = !0, kc = !1, Ac = "user-content-", jc = !0, Mc = !1, Nc = {}, Pc = null, Fc = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ic = null, Lc = addToSet({}, [
|
|
463
463
|
"audio",
|
|
464
464
|
"video",
|
|
465
465
|
"img",
|
|
466
466
|
"source",
|
|
467
467
|
"image",
|
|
468
468
|
"track"
|
|
469
|
-
]),
|
|
469
|
+
]), Rc = null, zc = addToSet({}, [
|
|
470
470
|
"alt",
|
|
471
471
|
"class",
|
|
472
472
|
"for",
|
|
@@ -481,78 +481,78 @@ function createDOMPurify() {
|
|
|
481
481
|
"value",
|
|
482
482
|
"style",
|
|
483
483
|
"xmlns"
|
|
484
|
-
]),
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
], stringToString),
|
|
484
|
+
]), Bc = "http://www.w3.org/1998/Math/MathML", Vc = "http://www.w3.org/2000/svg", Hc = "http://www.w3.org/1999/xhtml", Uc = Hc, Wc = !1, Gc = null, Kc = addToSet({}, [
|
|
485
|
+
Bc,
|
|
486
|
+
Vc,
|
|
487
|
+
Hc
|
|
488
|
+
], stringToString), qc = freeze([
|
|
489
489
|
"mi",
|
|
490
490
|
"mo",
|
|
491
491
|
"mn",
|
|
492
492
|
"ms",
|
|
493
493
|
"mtext"
|
|
494
|
-
]),
|
|
494
|
+
]), Jc = addToSet({}, qc), Yc = freeze(["annotation-xml"]), Xc = addToSet({}, Yc), Zc = addToSet({}, [
|
|
495
495
|
"title",
|
|
496
496
|
"style",
|
|
497
497
|
"font",
|
|
498
498
|
"a",
|
|
499
499
|
"script"
|
|
500
|
-
]),
|
|
500
|
+
]), Qc = null, $c = ["application/xhtml+xml", "text/html"], el = null, tl = null, nl = n.createElement("form"), rl = function(e) {
|
|
501
501
|
return e instanceof RegExp || e instanceof Function;
|
|
502
|
-
},
|
|
502
|
+
}, il = function() {
|
|
503
503
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
504
|
-
if (
|
|
505
|
-
(!e || typeof e != "object") && (e = {}), e = clone(e),
|
|
506
|
-
transform:
|
|
504
|
+
if (tl && tl === e) return;
|
|
505
|
+
(!e || typeof e != "object") && (e = {}), e = clone(e), Qc = $c.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, el = Qc === "application/xhtml+xml" ? stringToString : stringToLowerCase, H = _resolveSetOption(e, "ALLOWED_TAGS", cc, { transform: el }), Y = _resolveSetOption(e, "ALLOWED_ATTR", lc, { transform: el }), Gc = _resolveSetOption(e, "ALLOWED_NAMESPACES", Kc, { transform: stringToString }), Rc = _resolveSetOption(e, "ADD_URI_SAFE_ATTR", zc, {
|
|
506
|
+
transform: el,
|
|
507
|
+
base: zc
|
|
508
|
+
}), Ic = _resolveSetOption(e, "ADD_DATA_URI_TAGS", Lc, {
|
|
509
|
+
transform: el,
|
|
507
510
|
base: Lc
|
|
508
|
-
}), Pc = _resolveSetOption(e, "
|
|
509
|
-
transform: Qc,
|
|
510
|
-
base: Fc
|
|
511
|
-
}), Mc = _resolveSetOption(e, "FORBID_CONTENTS", Nc, { transform: Qc }), lc = _resolveSetOption(e, "FORBID_TAGS", clone({}), { transform: Qc }), uc = _resolveSetOption(e, "FORBID_ATTR", clone({}), { transform: Qc }), jc = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, fc = e.ALLOW_ARIA_ATTR !== !1, pc = e.ALLOW_DATA_ATTR !== !1, mc = e.ALLOW_UNKNOWN_PROTOCOLS || !1, hc = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, gc = e.SAFE_FOR_TEMPLATES || !1, _c = e.SAFE_FOR_XML !== !1, vc = e.WHOLE_DOCUMENT || !1, Cc = e.RETURN_DOM || !1, wc = e.RETURN_DOM_FRAGMENT || !1, Tc = e.RETURN_TRUSTED_TYPE || !1, Sc = e.FORCE_BODY || !1, Ec = e.SANITIZE_DOM !== !1, Dc = e.SANITIZE_NAMED_PROPS || !1, kc = e.KEEP_CONTENT !== !1, Ac = e.IN_PLACE || !1, ic = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : IS_ALLOWED_URI, Vc = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Bc, Kc = objectHasOwnProperty(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, Gc), Jc = objectHasOwnProperty(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, qc);
|
|
511
|
+
}), Pc = _resolveSetOption(e, "FORBID_CONTENTS", Fc, { transform: el }), dc = _resolveSetOption(e, "FORBID_TAGS", clone({}), { transform: el }), fc = _resolveSetOption(e, "FORBID_ATTR", clone({}), { transform: el }), Nc = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, mc = e.ALLOW_ARIA_ATTR !== !1, hc = e.ALLOW_DATA_ATTR !== !1, gc = e.ALLOW_UNKNOWN_PROTOCOLS || !1, _c = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, vc = e.SAFE_FOR_TEMPLATES || !1, yc = e.SAFE_FOR_XML !== !1, bc = e.WHOLE_DOCUMENT || !1, Tc = e.RETURN_DOM || !1, Ec = e.RETURN_DOM_FRAGMENT || !1, Dc = e.RETURN_TRUSTED_TYPE || !1, wc = e.FORCE_BODY || !1, Oc = e.SANITIZE_DOM !== !1, kc = e.SANITIZE_NAMED_PROPS || !1, jc = e.KEEP_CONTENT !== !1, Mc = e.IN_PLACE || !1, sc = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : IS_ALLOWED_URI, Uc = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Hc, Jc = objectHasOwnProperty(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, qc), Xc = objectHasOwnProperty(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Yc);
|
|
512
512
|
let t = objectHasOwnProperty(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : create(null);
|
|
513
|
-
if (
|
|
513
|
+
if (uc = create(null), objectHasOwnProperty(t, "tagNameCheck") && rl(t.tagNameCheck) && (uc.tagNameCheck = t.tagNameCheck), objectHasOwnProperty(t, "attributeNameCheck") && rl(t.attributeNameCheck) && (uc.attributeNameCheck = t.attributeNameCheck), objectHasOwnProperty(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (uc.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), seal(uc), vc && (hc = !1), Ec && (Tc = !0), Nc && (H = addToSet({}, text), Y = create(null), Nc.html === !0 && (addToSet(H, html$1), addToSet(Y, html)), Nc.svg === !0 && (addToSet(H, svg$1), addToSet(Y, svg), addToSet(Y, xml)), Nc.svgFilters === !0 && (addToSet(H, svgFilters), addToSet(Y, svg), addToSet(Y, xml)), Nc.mathMl === !0 && (addToSet(H, mathMl$1), addToSet(Y, mathMl), addToSet(Y, xml))), pc.tagCheck = null, pc.attributeCheck = null, objectHasOwnProperty(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? pc.tagCheck = e.ADD_TAGS : arrayIsArray(e.ADD_TAGS) && (H === cc && (H = clone(H)), addToSet(H, e.ADD_TAGS, el))), objectHasOwnProperty(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? pc.attributeCheck = e.ADD_ATTR : arrayIsArray(e.ADD_ATTR) && (Y === lc && (Y = clone(Y)), addToSet(Y, e.ADD_ATTR, el))), objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") && arrayIsArray(e.ADD_URI_SAFE_ATTR) && addToSet(Rc, e.ADD_URI_SAFE_ATTR, el), objectHasOwnProperty(e, "FORBID_CONTENTS") && arrayIsArray(e.FORBID_CONTENTS) && (Pc === Fc && (Pc = clone(Pc)), addToSet(Pc, e.FORBID_CONTENTS, el)), objectHasOwnProperty(e, "ADD_FORBID_CONTENTS") && arrayIsArray(e.ADD_FORBID_CONTENTS) && (Pc === Fc && (Pc = clone(Pc)), addToSet(Pc, e.ADD_FORBID_CONTENTS, el)), jc && (H["#text"] = !0), bc && addToSet(H, [
|
|
514
514
|
"html",
|
|
515
515
|
"head",
|
|
516
516
|
"body"
|
|
517
|
-
]),
|
|
517
|
+
]), H.table && (addToSet(H, ["tbody"]), delete dc.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
518
518
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
519
519
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
520
|
-
let t =
|
|
521
|
-
|
|
520
|
+
let t = B;
|
|
521
|
+
B = e.TRUSTED_TYPES_POLICY;
|
|
522
522
|
try {
|
|
523
|
-
|
|
523
|
+
zs = Ws("");
|
|
524
524
|
} catch (e) {
|
|
525
|
-
throw
|
|
525
|
+
throw B = t, e;
|
|
526
526
|
}
|
|
527
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (
|
|
528
|
-
freeze && freeze(e),
|
|
529
|
-
},
|
|
527
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (B = void 0, zs = "") : (B === void 0 && (B = Ks()), B && typeof zs == "string" && (zs = Ws("")));
|
|
528
|
+
freeze && freeze(e), tl = e;
|
|
529
|
+
}, al = addToSet({}, [
|
|
530
530
|
...svg$1,
|
|
531
531
|
...svgFilters,
|
|
532
532
|
...svgDisallowed
|
|
533
|
-
]),
|
|
534
|
-
return t.namespaceURI ===
|
|
535
|
-
},
|
|
536
|
-
return t.namespaceURI ===
|
|
537
|
-
},
|
|
538
|
-
return t.namespaceURI ===
|
|
539
|
-
},
|
|
533
|
+
]), ol = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), sl = function(e, t, n) {
|
|
534
|
+
return t.namespaceURI === Hc ? e === "svg" : t.namespaceURI === Bc ? e === "svg" && (n === "annotation-xml" || Jc[n]) : !!al[e];
|
|
535
|
+
}, cl = function(e, t, n) {
|
|
536
|
+
return t.namespaceURI === Hc ? e === "math" : t.namespaceURI === Vc ? e === "math" && Xc[n] : !!ol[e];
|
|
537
|
+
}, ll = function(e, t, n) {
|
|
538
|
+
return t.namespaceURI === Vc && !Xc[n] || t.namespaceURI === Bc && !Jc[n] ? !1 : !ol[e] && (Zc[e] || !al[e]);
|
|
539
|
+
}, ul = function(e) {
|
|
540
540
|
let t = O(e);
|
|
541
541
|
(!t || !t.tagName) && (t = {
|
|
542
|
-
namespaceURI:
|
|
542
|
+
namespaceURI: Uc,
|
|
543
543
|
tagName: "template"
|
|
544
544
|
});
|
|
545
545
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
546
|
-
return
|
|
547
|
-
},
|
|
546
|
+
return Gc[e.namespaceURI] ? e.namespaceURI === Vc ? sl(n, t, r) : e.namespaceURI === Bc ? cl(n, t, r) : e.namespaceURI === Hc ? ll(n, t, r) : !!(Qc === "application/xhtml+xml" && Gc[e.namespaceURI]) : !1;
|
|
547
|
+
}, dl = function(e) {
|
|
548
548
|
arrayPush(t.removed, { element: e });
|
|
549
549
|
try {
|
|
550
550
|
O(e).removeChild(e);
|
|
551
551
|
} catch {
|
|
552
552
|
if (h(e), !O(e)) throw typeErrorCreate("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
553
553
|
}
|
|
554
|
-
},
|
|
555
|
-
|
|
554
|
+
}, fl = function(e) {
|
|
555
|
+
hl(e);
|
|
556
556
|
let t = g(e);
|
|
557
557
|
if (t) {
|
|
558
558
|
let e = [];
|
|
@@ -564,14 +564,14 @@ function createDOMPurify() {
|
|
|
564
564
|
} catch {}
|
|
565
565
|
});
|
|
566
566
|
}
|
|
567
|
-
let n =
|
|
567
|
+
let n = Ls(e);
|
|
568
568
|
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
569
569
|
let r = n[t], i = r && r.name;
|
|
570
570
|
if (typeof i == "string") try {
|
|
571
571
|
e.removeAttribute(i);
|
|
572
572
|
} catch {}
|
|
573
573
|
}
|
|
574
|
-
},
|
|
574
|
+
}, pl = function(e, n) {
|
|
575
575
|
try {
|
|
576
576
|
arrayPush(t.removed, {
|
|
577
577
|
attribute: n.getAttributeNode(e),
|
|
@@ -583,30 +583,30 @@ function createDOMPurify() {
|
|
|
583
583
|
from: n
|
|
584
584
|
});
|
|
585
585
|
}
|
|
586
|
-
if (n.removeAttribute(e), e === "is") if (
|
|
587
|
-
|
|
586
|
+
if (n.removeAttribute(e), e === "is") if (Tc || Ec) try {
|
|
587
|
+
dl(n);
|
|
588
588
|
} catch {}
|
|
589
589
|
else try {
|
|
590
590
|
n.setAttribute(e, "");
|
|
591
591
|
} catch {}
|
|
592
|
-
},
|
|
593
|
-
let t =
|
|
592
|
+
}, ml = function(e) {
|
|
593
|
+
let t = Ls(e);
|
|
594
594
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
595
595
|
let r = t[n], i = r && r.name;
|
|
596
|
-
if (!(typeof i != "string" ||
|
|
596
|
+
if (!(typeof i != "string" || Y[el(i)])) try {
|
|
597
597
|
e.removeAttribute(i);
|
|
598
598
|
} catch {}
|
|
599
599
|
}
|
|
600
|
-
},
|
|
600
|
+
}, hl = function(e) {
|
|
601
601
|
let t = [e];
|
|
602
602
|
for (; t.length > 0;) {
|
|
603
603
|
let e = t.pop();
|
|
604
|
-
(A ? A(e) : e.nodeType) === NODE_TYPE.element &&
|
|
604
|
+
(A ? A(e) : e.nodeType) === NODE_TYPE.element && ml(e);
|
|
605
605
|
let n = g(e);
|
|
606
606
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
607
607
|
}
|
|
608
|
-
},
|
|
609
|
-
if (!
|
|
608
|
+
}, gl = function(e) {
|
|
609
|
+
if (!yc) return;
|
|
610
610
|
let t = [e];
|
|
611
611
|
for (; t.length > 0;) {
|
|
612
612
|
let e = t.pop(), n = A ? A(e) : e.nodeType;
|
|
@@ -617,7 +617,7 @@ function createDOMPurify() {
|
|
|
617
617
|
continue;
|
|
618
618
|
}
|
|
619
619
|
if (n === NODE_TYPE.element) {
|
|
620
|
-
let t = e, n =
|
|
620
|
+
let t = e, n = el(Rs ? Rs(e) : e.nodeName);
|
|
621
621
|
try {
|
|
622
622
|
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
|
|
623
623
|
} catch {}
|
|
@@ -625,50 +625,50 @@ function createDOMPurify() {
|
|
|
625
625
|
let r = g(e);
|
|
626
626
|
if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
|
|
627
627
|
}
|
|
628
|
-
},
|
|
628
|
+
}, _l = function(e) {
|
|
629
629
|
let t = null, r = null;
|
|
630
|
-
if (
|
|
630
|
+
if (wc) e = "<remove></remove>" + e;
|
|
631
631
|
else {
|
|
632
632
|
let t = stringMatch(e, /^[\r\n\t ]+/);
|
|
633
633
|
r = t && t[0];
|
|
634
634
|
}
|
|
635
|
-
|
|
636
|
-
let i =
|
|
637
|
-
if (
|
|
638
|
-
t = new l().parseFromString(i,
|
|
635
|
+
Qc === "application/xhtml+xml" && Uc === Hc && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
636
|
+
let i = B ? Ws(e) : e;
|
|
637
|
+
if (Uc === Hc) try {
|
|
638
|
+
t = new l().parseFromString(i, Qc);
|
|
639
639
|
} catch {}
|
|
640
640
|
if (!t || !t.documentElement) {
|
|
641
|
-
t =
|
|
641
|
+
t = Js.createDocument(Uc, "template", null);
|
|
642
642
|
try {
|
|
643
|
-
t.documentElement.innerHTML =
|
|
643
|
+
t.documentElement.innerHTML = Wc ? zs : i;
|
|
644
644
|
} catch {}
|
|
645
645
|
}
|
|
646
646
|
let a = t.body || t.documentElement;
|
|
647
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
648
|
-
}, gl = function(e) {
|
|
649
|
-
let t = B ? B(e) : e.ownerDocument;
|
|
650
|
-
return Ks.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
651
|
-
}, _l = function(e) {
|
|
652
|
-
return e = stringReplace(e, Xs, " "), e = stringReplace(e, Zs, " "), e = stringReplace(e, Qs, " "), e;
|
|
647
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Uc === Hc ? Zs.call(t, bc ? "html" : "body")[0] : bc ? t.documentElement : a;
|
|
653
648
|
}, vl = function(e) {
|
|
649
|
+
let t = R ? R(e) : e.ownerDocument;
|
|
650
|
+
return Ys.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
651
|
+
}, yl = function(e) {
|
|
652
|
+
return e = stringReplace(e, $s, " "), e = stringReplace(e, ec, " "), e = stringReplace(e, tc, " "), e;
|
|
653
|
+
}, bl = function(e) {
|
|
654
654
|
e.normalize();
|
|
655
|
-
let t =
|
|
656
|
-
for (; r;) r.data =
|
|
655
|
+
let t = R ? R(e) : e.ownerDocument, n = Ys.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
656
|
+
for (; r;) r.data = yl(r.data), r = n.nextNode();
|
|
657
657
|
let i = e.querySelectorAll?.call(e, "template");
|
|
658
658
|
i && arrayForEach(i, (e) => {
|
|
659
|
-
|
|
659
|
+
Sl(e.content) && bl(e.content);
|
|
660
660
|
});
|
|
661
|
-
},
|
|
662
|
-
let t =
|
|
663
|
-
return typeof t != "string" ||
|
|
664
|
-
},
|
|
661
|
+
}, xl = function(e) {
|
|
662
|
+
let t = Rs ? Rs(e) : null;
|
|
663
|
+
return typeof t != "string" || el(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== Ls(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== A(e) || e.childNodes !== g(e);
|
|
664
|
+
}, Sl = function(e) {
|
|
665
665
|
if (!A || typeof e != "object" || !e) return !1;
|
|
666
666
|
try {
|
|
667
667
|
return A(e) === NODE_TYPE.documentFragment;
|
|
668
668
|
} catch {
|
|
669
669
|
return !1;
|
|
670
670
|
}
|
|
671
|
-
},
|
|
671
|
+
}, Cl = function(e) {
|
|
672
672
|
if (!A || typeof e != "object" || !e) return !1;
|
|
673
673
|
try {
|
|
674
674
|
return typeof A(e) == "number";
|
|
@@ -676,57 +676,57 @@ function createDOMPurify() {
|
|
|
676
676
|
return !1;
|
|
677
677
|
}
|
|
678
678
|
};
|
|
679
|
-
function
|
|
679
|
+
function wl(e, n, r) {
|
|
680
680
|
e.length !== 0 && arrayForEach(e, (e) => {
|
|
681
|
-
e.call(t, n, r,
|
|
681
|
+
e.call(t, n, r, tl);
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
|
-
let
|
|
685
|
-
return !!(
|
|
686
|
-
},
|
|
687
|
-
if (!
|
|
688
|
-
if (
|
|
684
|
+
let Tl = function(e, t) {
|
|
685
|
+
return !!(yc && e.hasChildNodes() && !Cl(e.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, e.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, e.innerHTML) || yc && e.namespaceURI === Hc && t === "style" && Cl(e.firstElementChild) || e.nodeType === NODE_TYPE.processingInstruction || yc && e.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, e.data));
|
|
686
|
+
}, El = function(e, t, n) {
|
|
687
|
+
if (!dc[t] && jl(t) && (uc.tagNameCheck instanceof RegExp && regExpTest(uc.tagNameCheck, t) || uc.tagNameCheck instanceof Function && uc.tagNameCheck(t))) return !1;
|
|
688
|
+
if (jc && !Pc[t]) {
|
|
689
689
|
let t = O(e), r = g(e);
|
|
690
690
|
if (r && t) {
|
|
691
691
|
let i = r.length;
|
|
692
692
|
for (let a = i - 1; a >= 0; --a) {
|
|
693
693
|
let i = e === n ? p(r[a], !0) : r[a];
|
|
694
|
-
t.insertBefore(i,
|
|
694
|
+
t.insertBefore(i, Fs(e));
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
return
|
|
699
|
-
},
|
|
698
|
+
return dl(e), !0;
|
|
699
|
+
}, Dl = function(e, t, n, r) {
|
|
700
700
|
return e.length === 0 ? t : t === n || t === r ? clone(t) : t;
|
|
701
|
-
},
|
|
702
|
-
if (
|
|
703
|
-
if (
|
|
704
|
-
let r =
|
|
705
|
-
if (
|
|
701
|
+
}, Ol = function(e, n) {
|
|
702
|
+
if (wl(V.beforeSanitizeElements, e, null), e !== n && O(e) === null) return Mc && hl(e), !0;
|
|
703
|
+
if (xl(e)) return dl(e), !0;
|
|
704
|
+
let r = el(Rs ? Rs(e) : e.nodeName);
|
|
705
|
+
if (H = Dl(V.uponSanitizeElement, H, cc, Sc), wl(V.uponSanitizeElement, e, {
|
|
706
706
|
tagName: r,
|
|
707
|
-
allowedTags:
|
|
708
|
-
}), e !== n && O(e) === null) return
|
|
709
|
-
if (
|
|
710
|
-
if (
|
|
711
|
-
let t =
|
|
712
|
-
return t === !1 &&
|
|
707
|
+
allowedTags: H
|
|
708
|
+
}), e !== n && O(e) === null) return Mc && hl(e), !0;
|
|
709
|
+
if (Tl(e, r)) return dl(e), !0;
|
|
710
|
+
if (dc[r] || !(pc.tagCheck instanceof Function && pc.tagCheck(r)) && !H[r]) {
|
|
711
|
+
let t = El(e, r, n);
|
|
712
|
+
return t === !1 && wl(V.afterSanitizeElements, e, null), t;
|
|
713
713
|
}
|
|
714
|
-
if ((A ? A(e) : e.nodeType) === NODE_TYPE.element && !
|
|
715
|
-
if (
|
|
716
|
-
let n =
|
|
714
|
+
if ((A ? A(e) : e.nodeType) === NODE_TYPE.element && !ul(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(FALLBACK_TAG_CLOSE, e.innerHTML)) return dl(e), !0;
|
|
715
|
+
if (vc && e.nodeType === NODE_TYPE.text) {
|
|
716
|
+
let n = yl(e.textContent);
|
|
717
717
|
e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
718
718
|
}
|
|
719
|
-
return
|
|
720
|
-
},
|
|
721
|
-
if (
|
|
722
|
-
let i =
|
|
723
|
-
if (!(
|
|
719
|
+
return wl(V.afterSanitizeElements, e, null), !1;
|
|
720
|
+
}, kl = function(e, t, r) {
|
|
721
|
+
if (fc[t] || yc && t === "patchsrc" || yc && t === "for" && e !== "label" && e !== "output" || Oc && (t === "id" || t === "name") && (r in n || r in nl)) return !1;
|
|
722
|
+
let i = Y[t] || pc.attributeCheck instanceof Function && pc.attributeCheck(t, e);
|
|
723
|
+
if (!(hc && regExpTest(nc, t)) && !(mc && regExpTest(rc, t))) {
|
|
724
724
|
if (i) {
|
|
725
|
-
if (!
|
|
726
|
-
} else if (!(
|
|
725
|
+
if (!Rc[t] && !regExpTest(sc, stringReplace(r, ac, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Ic[e]) && !(gc && !regExpTest(ic, stringReplace(r, ac, ""))) && r) return !1;
|
|
726
|
+
} else if (!(jl(e) && (uc.tagNameCheck instanceof RegExp && regExpTest(uc.tagNameCheck, e) || uc.tagNameCheck instanceof Function && uc.tagNameCheck(e)) && (uc.attributeNameCheck instanceof RegExp && regExpTest(uc.attributeNameCheck, t) || uc.attributeNameCheck instanceof Function && uc.attributeNameCheck(t, e)) || t === "is" && uc.allowCustomizedBuiltInElements && (uc.tagNameCheck instanceof RegExp && regExpTest(uc.tagNameCheck, r) || uc.tagNameCheck instanceof Function && uc.tagNameCheck(r)))) return !1;
|
|
727
727
|
}
|
|
728
728
|
return !0;
|
|
729
|
-
},
|
|
729
|
+
}, Al = addToSet({}, [
|
|
730
730
|
"annotation-xml",
|
|
731
731
|
"color-profile",
|
|
732
732
|
"font-face",
|
|
@@ -735,67 +735,67 @@ function createDOMPurify() {
|
|
|
735
735
|
"font-face-src",
|
|
736
736
|
"font-face-uri",
|
|
737
737
|
"missing-glyph"
|
|
738
|
-
]),
|
|
739
|
-
return !
|
|
740
|
-
},
|
|
741
|
-
if (
|
|
742
|
-
case "TrustedHTML": return
|
|
743
|
-
case "TrustedScriptURL": return
|
|
738
|
+
]), jl = function(e) {
|
|
739
|
+
return !Al[stringToLowerCase(e)] && regExpTest(oc, e);
|
|
740
|
+
}, Ml = function(e, t, n, r) {
|
|
741
|
+
if (B && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
742
|
+
case "TrustedHTML": return Ws(r);
|
|
743
|
+
case "TrustedScriptURL": return Gs(r);
|
|
744
744
|
}
|
|
745
745
|
return r;
|
|
746
|
-
},
|
|
746
|
+
}, Nl = function(e, n, r, i) {
|
|
747
747
|
try {
|
|
748
|
-
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i),
|
|
748
|
+
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), xl(e) ? dl(e) : arrayPop(t.removed);
|
|
749
749
|
} catch {
|
|
750
|
-
|
|
750
|
+
pl(n, e);
|
|
751
751
|
}
|
|
752
|
-
},
|
|
753
|
-
|
|
752
|
+
}, Pl = function(e) {
|
|
753
|
+
wl(V.beforeSanitizeAttributes, e, null);
|
|
754
754
|
let t = e.attributes;
|
|
755
|
-
if (!t ||
|
|
756
|
-
|
|
755
|
+
if (!t || xl(e)) return;
|
|
756
|
+
Y = Dl(V.uponSanitizeAttribute, Y, lc, Cc);
|
|
757
757
|
let n = {
|
|
758
758
|
attrName: "",
|
|
759
759
|
attrValue: "",
|
|
760
760
|
keepAttr: !0,
|
|
761
|
-
allowedAttributes:
|
|
761
|
+
allowedAttributes: Y,
|
|
762
762
|
forceKeepAttr: void 0
|
|
763
|
-
}, r = t.length, i =
|
|
763
|
+
}, r = t.length, i = el(e.nodeName);
|
|
764
764
|
for (; r--;) {
|
|
765
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l =
|
|
766
|
-
if (n.attrName = l, n.attrValue = f, n.keepAttr = !0, n.forceKeepAttr = void 0,
|
|
767
|
-
|
|
765
|
+
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = el(o), u = c, f = o === "value" ? u : stringTrim(u);
|
|
766
|
+
if (n.attrName = l, n.attrValue = f, n.keepAttr = !0, n.forceKeepAttr = void 0, wl(V.uponSanitizeAttribute, e, n), f = n.attrValue, kc && (l === "id" || l === "name") && stringIndexOf(f, Ac) !== 0 && (pl(o, e), f = Ac + f), yc && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
|
|
767
|
+
pl(o, e);
|
|
768
768
|
continue;
|
|
769
769
|
}
|
|
770
770
|
if (l === "attributename" && stringMatch(f, "href")) {
|
|
771
|
-
|
|
771
|
+
pl(o, e);
|
|
772
772
|
continue;
|
|
773
773
|
}
|
|
774
774
|
if (!n.forceKeepAttr) {
|
|
775
775
|
if (!n.keepAttr) {
|
|
776
|
-
|
|
776
|
+
pl(o, e);
|
|
777
777
|
continue;
|
|
778
778
|
}
|
|
779
|
-
if (!
|
|
780
|
-
|
|
779
|
+
if (!_c && regExpTest(SELF_CLOSING_TAG, f)) {
|
|
780
|
+
pl(o, e);
|
|
781
781
|
continue;
|
|
782
782
|
}
|
|
783
|
-
if (
|
|
784
|
-
|
|
783
|
+
if (vc && (f = yl(f)), !kl(i, l, f)) {
|
|
784
|
+
pl(o, e);
|
|
785
785
|
continue;
|
|
786
786
|
}
|
|
787
|
-
f =
|
|
787
|
+
f = Ml(i, l, s, f), f !== u && Nl(e, o, s, f);
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
|
|
791
|
-
},
|
|
792
|
-
let t = null, n =
|
|
793
|
-
for (
|
|
794
|
-
let e =
|
|
795
|
-
|
|
790
|
+
wl(V.afterSanitizeAttributes, e, null);
|
|
791
|
+
}, Fl = function(e) {
|
|
792
|
+
let t = null, n = vl(e);
|
|
793
|
+
for (wl(V.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (wl(V.uponSanitizeShadowNode, t, null), Ol(t, e), Pl(t), Sl(t.content) && Fl(t.content), (A ? A(t) : t.nodeType) === NODE_TYPE.element) {
|
|
794
|
+
let e = Is(t);
|
|
795
|
+
Sl(e) && (Il(e), Fl(e));
|
|
796
796
|
}
|
|
797
|
-
|
|
798
|
-
},
|
|
797
|
+
wl(V.afterSanitizeShadowDOM, e, null);
|
|
798
|
+
}, Il = function(e) {
|
|
799
799
|
let t = [{
|
|
800
800
|
node: e,
|
|
801
801
|
shadow: null
|
|
@@ -803,7 +803,7 @@ function createDOMPurify() {
|
|
|
803
803
|
for (; t.length > 0;) {
|
|
804
804
|
let e = t.pop();
|
|
805
805
|
if (e.shadow) {
|
|
806
|
-
|
|
806
|
+
Fl(e.shadow);
|
|
807
807
|
continue;
|
|
808
808
|
}
|
|
809
809
|
let n = e.node, r = (A ? A(n) : n.nodeType) === NODE_TYPE.element, i = g(n);
|
|
@@ -812,18 +812,18 @@ function createDOMPurify() {
|
|
|
812
812
|
shadow: null
|
|
813
813
|
});
|
|
814
814
|
if (r) {
|
|
815
|
-
let e =
|
|
816
|
-
if (typeof e == "string" &&
|
|
815
|
+
let e = Rs ? Rs(n) : null;
|
|
816
|
+
if (typeof e == "string" && el(e) === "template") {
|
|
817
817
|
let e = n.content;
|
|
818
|
-
|
|
818
|
+
Sl(e) && t.push({
|
|
819
819
|
node: e,
|
|
820
820
|
shadow: null
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
if (r) {
|
|
825
|
-
let e =
|
|
826
|
-
|
|
825
|
+
let e = Is(n);
|
|
826
|
+
Sl(e) && t.push({
|
|
827
827
|
node: null,
|
|
828
828
|
shadow: e
|
|
829
829
|
}, {
|
|
@@ -835,68 +835,68 @@ function createDOMPurify() {
|
|
|
835
835
|
};
|
|
836
836
|
return t.sanitize = function(e) {
|
|
837
837
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
838
|
-
if (
|
|
838
|
+
if (Wc = !e, Wc && (e = "<!-->"), typeof e != "string" && !Cl(e) && (e = stringifyValue(e), typeof e != "string")) throw typeErrorCreate("dirty is not a string, aborting");
|
|
839
839
|
if (!t.isSupported) return e;
|
|
840
|
-
|
|
841
|
-
let c =
|
|
840
|
+
xc ? (H = Sc, Y = Cc) : il(n), (V.uponSanitizeElement.length > 0 || V.uponSanitizeAttribute.length > 0) && (H = clone(H)), V.uponSanitizeAttribute.length > 0 && (Y = clone(Y)), t.removed = [];
|
|
841
|
+
let c = Mc && typeof e != "string" && Cl(e);
|
|
842
842
|
if (c) {
|
|
843
|
-
|
|
844
|
-
let t =
|
|
843
|
+
gl(e);
|
|
844
|
+
let t = Rs ? Rs(e) : e.nodeName;
|
|
845
845
|
if (typeof t == "string") {
|
|
846
|
-
let n =
|
|
847
|
-
if (!
|
|
846
|
+
let n = el(t);
|
|
847
|
+
if (!H[n] || dc[n]) throw fl(e), typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
848
848
|
}
|
|
849
|
-
if (
|
|
849
|
+
if (xl(e)) throw fl(e), typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
|
|
850
850
|
try {
|
|
851
|
-
|
|
851
|
+
Il(e);
|
|
852
852
|
} catch (t) {
|
|
853
|
-
throw
|
|
853
|
+
throw fl(e), t;
|
|
854
854
|
}
|
|
855
|
-
} else if (
|
|
855
|
+
} else if (Cl(e)) i = _l("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === NODE_TYPE.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Il(a);
|
|
856
856
|
else {
|
|
857
|
-
if (!
|
|
858
|
-
if (i =
|
|
857
|
+
if (!Tc && !vc && !bc && e.indexOf("<") === -1) return B && Dc ? Ws(e) : e;
|
|
858
|
+
if (i = _l(e), !i) return Tc ? null : Dc ? zs : "";
|
|
859
859
|
}
|
|
860
|
-
i &&
|
|
860
|
+
i && wc && dl(i.firstChild);
|
|
861
861
|
let l = c ? e : i;
|
|
862
862
|
try {
|
|
863
|
-
let e =
|
|
864
|
-
for (; o = e.nextNode();)
|
|
863
|
+
let e = vl(l);
|
|
864
|
+
for (; o = e.nextNode();) Ol(o, l), Pl(o), Sl(o.content) && Fl(o.content);
|
|
865
865
|
} catch (n) {
|
|
866
|
-
throw c && (
|
|
867
|
-
e.element &&
|
|
866
|
+
throw c && (fl(e), arrayForEach(t.removed, (e) => {
|
|
867
|
+
e.element && hl(e.element);
|
|
868
868
|
})), n;
|
|
869
869
|
}
|
|
870
870
|
if (c) return arrayForEach(t.removed, (e) => {
|
|
871
|
-
e.element &&
|
|
872
|
-
}),
|
|
873
|
-
if (
|
|
874
|
-
if (
|
|
871
|
+
e.element && hl(e.element);
|
|
872
|
+
}), vc && bl(e), e;
|
|
873
|
+
if (Tc) {
|
|
874
|
+
if (vc && bl(i), Ec) for (s = Xs.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
875
875
|
else s = i;
|
|
876
|
-
return (
|
|
876
|
+
return (Y.shadowroot || Y.shadowrootmode) && (s = Qs.call(r, s, !0)), s;
|
|
877
877
|
}
|
|
878
|
-
let u =
|
|
879
|
-
return
|
|
878
|
+
let u = bc ? i.outerHTML : i.innerHTML;
|
|
879
|
+
return bc && H["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), vc && (u = yl(u)), B && Dc ? Ws(u) : u;
|
|
880
880
|
}, t.setConfig = function() {
|
|
881
|
-
|
|
881
|
+
il(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), xc = !0, Sc = H, Cc = Y;
|
|
882
882
|
}, t.clearConfig = function() {
|
|
883
|
-
|
|
883
|
+
tl = null, xc = !1, Sc = null, Cc = null, B = Bs, zs = "";
|
|
884
884
|
}, t.isValidAttribute = function(e, t, n) {
|
|
885
|
-
return
|
|
885
|
+
return tl || il({}), kl(el(e), el(t), n);
|
|
886
886
|
}, t.addHook = function(e, t) {
|
|
887
|
-
typeof t == "function" && objectHasOwnProperty(
|
|
887
|
+
typeof t == "function" && objectHasOwnProperty(V, e) && arrayPush(V[e], t);
|
|
888
888
|
}, t.removeHook = function(e, t) {
|
|
889
|
-
if (objectHasOwnProperty(
|
|
889
|
+
if (objectHasOwnProperty(V, e)) {
|
|
890
890
|
if (t !== void 0) {
|
|
891
|
-
let n = arrayLastIndexOf(
|
|
892
|
-
return n === -1 ? void 0 : arraySplice(
|
|
891
|
+
let n = arrayLastIndexOf(V[e], t);
|
|
892
|
+
return n === -1 ? void 0 : arraySplice(V[e], n, 1)[0];
|
|
893
893
|
}
|
|
894
|
-
return arrayPop(
|
|
894
|
+
return arrayPop(V[e]);
|
|
895
895
|
}
|
|
896
896
|
}, t.removeHooks = function(e) {
|
|
897
|
-
objectHasOwnProperty(
|
|
897
|
+
objectHasOwnProperty(V, e) && (V[e] = []);
|
|
898
898
|
}, t.removeAllHooks = function() {
|
|
899
|
-
|
|
899
|
+
V = _createHooksMap();
|
|
900
900
|
}, t;
|
|
901
901
|
}
|
|
902
902
|
var purify = createDOMPurify();
|
|
@@ -21592,18 +21592,18 @@ function useDropdown() {
|
|
|
21592
21592
|
return e;
|
|
21593
21593
|
}
|
|
21594
21594
|
function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1, openOnHover: c = !0, open: u, onOpenChange: p }) {
|
|
21595
|
-
let g = u !== void 0, [O,
|
|
21596
|
-
e !==
|
|
21595
|
+
let g = u !== void 0, [O, Rs] = useState(!1), R = g ? u : O, B = useCallback((e) => {
|
|
21596
|
+
e !== R && (g || Rs(e), p?.(e));
|
|
21597
21597
|
}, [
|
|
21598
|
-
|
|
21598
|
+
R,
|
|
21599
21599
|
g,
|
|
21600
21600
|
p
|
|
21601
|
-
]),
|
|
21602
|
-
if (!
|
|
21603
|
-
let e =
|
|
21601
|
+
]), zs = useRef(null), Bs = useRef(null), Vs = useRef(null), [Hs, Us] = useState(null), Ws = useCallback(() => {
|
|
21602
|
+
if (!zs.current || !Bs.current) return;
|
|
21603
|
+
let e = zs.current.getBoundingClientRect(), t = Bs.current.getBoundingClientRect(), o = e.left;
|
|
21604
21604
|
n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
|
|
21605
21605
|
let s;
|
|
21606
|
-
s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() =>
|
|
21606
|
+
s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => Us({
|
|
21607
21607
|
top: s,
|
|
21608
21608
|
left: o
|
|
21609
21609
|
}));
|
|
@@ -21614,52 +21614,52 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21614
21614
|
a
|
|
21615
21615
|
]);
|
|
21616
21616
|
useLayoutEffect(() => {
|
|
21617
|
-
|
|
21618
|
-
}, [
|
|
21619
|
-
if (!
|
|
21620
|
-
let e = () =>
|
|
21617
|
+
R && Ws();
|
|
21618
|
+
}, [R, Ws]), useEffect(() => {
|
|
21619
|
+
if (!R) return;
|
|
21620
|
+
let e = () => Ws();
|
|
21621
21621
|
return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
21622
21622
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
21623
21623
|
};
|
|
21624
|
-
}, [
|
|
21625
|
-
let
|
|
21626
|
-
|
|
21627
|
-
}, [
|
|
21628
|
-
|
|
21629
|
-
|
|
21624
|
+
}, [R, Ws]);
|
|
21625
|
+
let Gs = useCallback(() => {
|
|
21626
|
+
Vs.current &&= (clearTimeout(Vs.current), null), B(!0);
|
|
21627
|
+
}, [B]), Ks = useCallback(() => {
|
|
21628
|
+
Vs.current = window.setTimeout(() => {
|
|
21629
|
+
B(!1);
|
|
21630
21630
|
}, 120);
|
|
21631
|
-
}, [
|
|
21631
|
+
}, [B]);
|
|
21632
21632
|
return useEffect(() => {
|
|
21633
21633
|
function e(e) {
|
|
21634
21634
|
let t = e.target;
|
|
21635
|
-
|
|
21635
|
+
zs.current?.contains(t) || Bs.current?.contains(t) || B(!1);
|
|
21636
21636
|
}
|
|
21637
21637
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21638
|
-
}, [
|
|
21639
|
-
|
|
21638
|
+
}, [B]), useEffect(() => () => {
|
|
21639
|
+
Vs.current && clearTimeout(Vs.current);
|
|
21640
21640
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21641
21641
|
value: {
|
|
21642
|
-
close: () =>
|
|
21643
|
-
open:
|
|
21642
|
+
close: () => B(!1),
|
|
21643
|
+
open: Gs
|
|
21644
21644
|
},
|
|
21645
21645
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21646
|
-
ref:
|
|
21646
|
+
ref: zs,
|
|
21647
21647
|
className: "inline-flex",
|
|
21648
|
-
onMouseEnter: c ?
|
|
21649
|
-
onMouseLeave: c ?
|
|
21650
|
-
onClick: () =>
|
|
21648
|
+
onMouseEnter: c ? Gs : void 0,
|
|
21649
|
+
onMouseLeave: c ? Ks : void 0,
|
|
21650
|
+
onClick: () => B(!R),
|
|
21651
21651
|
"aria-haspopup": "menu",
|
|
21652
|
-
"aria-expanded":
|
|
21652
|
+
"aria-expanded": R,
|
|
21653
21653
|
children: e
|
|
21654
|
-
}),
|
|
21655
|
-
ref:
|
|
21656
|
-
onMouseEnter: c ?
|
|
21657
|
-
onMouseLeave: c ?
|
|
21654
|
+
}), R && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21655
|
+
ref: Bs,
|
|
21656
|
+
onMouseEnter: c ? Gs : void 0,
|
|
21657
|
+
onMouseLeave: c ? Ks : void 0,
|
|
21658
21658
|
style: {
|
|
21659
21659
|
position: "fixed",
|
|
21660
|
-
top:
|
|
21661
|
-
left:
|
|
21662
|
-
visibility:
|
|
21660
|
+
top: Hs?.top ?? 0,
|
|
21661
|
+
left: Hs?.left ?? 0,
|
|
21662
|
+
visibility: Hs ? "visible" : "hidden",
|
|
21663
21663
|
zIndex: 1e3
|
|
21664
21664
|
},
|
|
21665
21665
|
children: t
|
|
@@ -21721,11 +21721,11 @@ function getVerticalAlign(e, t, n) {
|
|
|
21721
21721
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21722
21722
|
}
|
|
21723
21723
|
function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
|
|
21724
|
-
let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, g] = useState(null),
|
|
21724
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, g] = useState(null), Rs = () => {
|
|
21725
21725
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21726
21726
|
u(!0);
|
|
21727
21727
|
}, r);
|
|
21728
|
-
},
|
|
21728
|
+
}, R = () => {
|
|
21729
21729
|
s.current &&= (clearTimeout(s.current), null), u(!1);
|
|
21730
21730
|
};
|
|
21731
21731
|
return useLayoutEffect(() => {
|
|
@@ -21740,10 +21740,10 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
|
|
|
21740
21740
|
}, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
21741
21741
|
ref: a,
|
|
21742
21742
|
className: "inline-flex",
|
|
21743
|
-
onMouseEnter:
|
|
21744
|
-
onMouseLeave:
|
|
21745
|
-
onFocus:
|
|
21746
|
-
onBlur:
|
|
21743
|
+
onMouseEnter: Rs,
|
|
21744
|
+
onMouseLeave: R,
|
|
21745
|
+
onFocus: Rs,
|
|
21746
|
+
onBlur: R,
|
|
21747
21747
|
children: e
|
|
21748
21748
|
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21749
21749
|
ref: o,
|
|
@@ -23352,36 +23352,36 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
|
|
|
23352
23352
|
e,
|
|
23353
23353
|
o,
|
|
23354
23354
|
t
|
|
23355
|
-
]), g = h?.step ?? null,
|
|
23355
|
+
]), g = h?.step ?? null, Ls = h?.index ?? null, A = useCallback((e) => {
|
|
23356
23356
|
c((t) => {
|
|
23357
23357
|
if (t.has(e)) return t;
|
|
23358
23358
|
let n = new Set(t);
|
|
23359
23359
|
return n.add(e), n;
|
|
23360
23360
|
});
|
|
23361
|
-
}, []),
|
|
23361
|
+
}, []), Rs = useCallback(() => {
|
|
23362
23362
|
c((n) => {
|
|
23363
23363
|
let r = findActiveStep(e, n, t);
|
|
23364
23364
|
if (r == null || n.has(r.step.id)) return n;
|
|
23365
23365
|
let i = new Set(n);
|
|
23366
23366
|
return i.add(r.step.id), i;
|
|
23367
23367
|
});
|
|
23368
|
-
}, [e, t]),
|
|
23368
|
+
}, [e, t]), R = useCallback(() => {
|
|
23369
23369
|
c(new Set(e.map((e) => e.id)));
|
|
23370
23370
|
}, [e]);
|
|
23371
23371
|
return /* @__PURE__ */ jsx(Fragment$1, { children: i({
|
|
23372
23372
|
context: t,
|
|
23373
23373
|
currentStep: g,
|
|
23374
|
-
currentStepIndex:
|
|
23374
|
+
currentStepIndex: Ls,
|
|
23375
23375
|
dismissedStepIds: o,
|
|
23376
23376
|
actions: useMemo(() => ({
|
|
23377
|
-
dismissCurrentStep:
|
|
23377
|
+
dismissCurrentStep: Rs,
|
|
23378
23378
|
dismissStep: A,
|
|
23379
|
-
skipAll:
|
|
23380
|
-
close:
|
|
23379
|
+
skipAll: R,
|
|
23380
|
+
close: R
|
|
23381
23381
|
}), [
|
|
23382
|
-
|
|
23382
|
+
Rs,
|
|
23383
23383
|
A,
|
|
23384
|
-
|
|
23384
|
+
R
|
|
23385
23385
|
])
|
|
23386
23386
|
}) });
|
|
23387
23387
|
}
|
|
@@ -23592,15 +23592,15 @@ function useToastTimers(e, t) {
|
|
|
23592
23592
|
function Toaster() {
|
|
23593
23593
|
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer: p } = useToastTimers(e, a);
|
|
23594
23594
|
useEffect(() => toastStore.subscribe(t), []);
|
|
23595
|
-
let
|
|
23595
|
+
let Rs = useSyncExternalStore(subscribeNoop$1, getClientSnapshot$1, getServerSnapshot$1), R = useCallback((e) => {
|
|
23596
23596
|
e.callbacks?.onOpen?.();
|
|
23597
|
-
}, []),
|
|
23597
|
+
}, []), B = useCallback((e, t) => {
|
|
23598
23598
|
t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
23599
23599
|
}, []);
|
|
23600
23600
|
useEffect(() => {
|
|
23601
23601
|
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
23602
23602
|
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
23603
|
-
|
|
23603
|
+
B(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
23604
23604
|
}), r((r) => {
|
|
23605
23605
|
let i = r.map((e) => {
|
|
23606
23606
|
let t = n.get(e.id);
|
|
@@ -23609,7 +23609,7 @@ function Toaster() {
|
|
|
23609
23609
|
content: t.content,
|
|
23610
23610
|
duration: t.duration
|
|
23611
23611
|
} : e;
|
|
23612
|
-
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (
|
|
23612
|
+
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (R(e), {
|
|
23613
23613
|
...e,
|
|
23614
23614
|
animationState: "entering"
|
|
23615
23615
|
})), ...i];
|
|
@@ -23617,20 +23617,20 @@ function Toaster() {
|
|
|
23617
23617
|
}), i.current = t;
|
|
23618
23618
|
}, [
|
|
23619
23619
|
e,
|
|
23620
|
-
|
|
23621
|
-
|
|
23620
|
+
R,
|
|
23621
|
+
B
|
|
23622
23622
|
]);
|
|
23623
|
-
let
|
|
23623
|
+
let zs = useCallback((e) => {
|
|
23624
23624
|
r((t) => {
|
|
23625
23625
|
let n = t.filter((t) => t.id !== e);
|
|
23626
23626
|
return o.current = n, n;
|
|
23627
23627
|
}), p(e), toastStore.cleanup(e);
|
|
23628
|
-
}, [p]),
|
|
23628
|
+
}, [p]), Bs = useCallback((e) => {
|
|
23629
23629
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
23630
23630
|
}, []);
|
|
23631
|
-
if (!
|
|
23632
|
-
let
|
|
23633
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23631
|
+
if (!Rs) return null;
|
|
23632
|
+
let Vs = groupByPosition(n);
|
|
23633
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Vs).map(([e, t]) => {
|
|
23634
23634
|
let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
23635
23635
|
className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
|
|
23636
23636
|
children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
|
|
@@ -23639,8 +23639,8 @@ function Toaster() {
|
|
|
23639
23639
|
children: /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23640
23640
|
toast: e,
|
|
23641
23641
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23642
|
-
onExitComplete:
|
|
23643
|
-
onClose:
|
|
23642
|
+
onExitComplete: zs,
|
|
23643
|
+
onClose: Bs,
|
|
23644
23644
|
onHoverStart: u,
|
|
23645
23645
|
onHoverEnd: f
|
|
23646
23646
|
})
|
|
@@ -23648,8 +23648,8 @@ function Toaster() {
|
|
|
23648
23648
|
}) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23649
23649
|
toast: e,
|
|
23650
23650
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23651
|
-
onExitComplete:
|
|
23652
|
-
onClose:
|
|
23651
|
+
onExitComplete: zs,
|
|
23652
|
+
onClose: Bs,
|
|
23653
23653
|
onHoverStart: u,
|
|
23654
23654
|
onHoverEnd: f
|
|
23655
23655
|
}, e.id));
|
|
@@ -23931,7 +23931,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23931
23931
|
}),
|
|
23932
23932
|
onClick: r.read.off
|
|
23933
23933
|
}]
|
|
23934
|
-
},
|
|
23934
|
+
}, Rs = [{
|
|
23935
23935
|
value: "normal",
|
|
23936
23936
|
tooltip: "Normal density",
|
|
23937
23937
|
icon: /* @__PURE__ */ jsx(NormalDensityIcon, { size: 20 })
|
|
@@ -23975,7 +23975,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23975
23975
|
}),
|
|
23976
23976
|
/* @__PURE__ */ jsx("div", {
|
|
23977
23977
|
className: "gap-2 flex items-center",
|
|
23978
|
-
children:
|
|
23978
|
+
children: Rs.map(({ value: e, tooltip: t, icon: n }) => {
|
|
23979
23979
|
let r = f === e;
|
|
23980
23980
|
return /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23981
23981
|
content: t,
|
|
@@ -24237,15 +24237,15 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
24237
24237
|
variant: r,
|
|
24238
24238
|
orientation: i,
|
|
24239
24239
|
status: a
|
|
24240
|
-
}), A = useRef(null), [
|
|
24241
|
-
function
|
|
24242
|
-
c === void 0 &&
|
|
24240
|
+
}), A = useRef(null), [Rs, R] = useState(!1), [B, zs] = useState(!1), [Bs, Vs] = useState(l), [Hs, Us] = useState(null), Ws = c ?? Bs, Gs = s && (Rs || B || Ws), Ks = typeof n == "number" && n > 0 && (o || a === "active");
|
|
24241
|
+
function qs(e) {
|
|
24242
|
+
c === void 0 && Vs(e), u?.(e);
|
|
24243
24243
|
}
|
|
24244
24244
|
return useLayoutEffect(() => {
|
|
24245
|
-
if (!
|
|
24245
|
+
if (!Gs || !A.current) return;
|
|
24246
24246
|
function e() {
|
|
24247
24247
|
let e = A.current?.getBoundingClientRect();
|
|
24248
|
-
e &&
|
|
24248
|
+
e && Us({
|
|
24249
24249
|
top: e.top - 8,
|
|
24250
24250
|
left: e.right - 12
|
|
24251
24251
|
});
|
|
@@ -24253,28 +24253,28 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
24253
24253
|
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
24254
24254
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
24255
24255
|
};
|
|
24256
|
-
}, [
|
|
24256
|
+
}, [Gs]), /* @__PURE__ */ jsxs(Button, {
|
|
24257
24257
|
...g,
|
|
24258
24258
|
className: cn(O.root(), p?.root),
|
|
24259
|
-
onMouseEnter: () =>
|
|
24260
|
-
onMouseLeave: () =>
|
|
24259
|
+
onMouseEnter: () => R(!0),
|
|
24260
|
+
onMouseLeave: () => R(!1),
|
|
24261
24261
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24262
24262
|
className: "relative",
|
|
24263
24263
|
children: [/* @__PURE__ */ jsx("div", {
|
|
24264
24264
|
ref: A,
|
|
24265
24265
|
className: cn(O.bubble(), p?.bubble),
|
|
24266
24266
|
children: renderIcon(e, O.icon())
|
|
24267
|
-
}),
|
|
24268
|
-
isPressed:
|
|
24269
|
-
isPortalHovered:
|
|
24270
|
-
portalPosition:
|
|
24271
|
-
onMouseEnter: () =>
|
|
24272
|
-
onMouseLeave: () =>
|
|
24273
|
-
onToggle: () =>
|
|
24267
|
+
}), Gs && Hs && typeof document < "u" && ToggleControlPortal({
|
|
24268
|
+
isPressed: Ws,
|
|
24269
|
+
isPortalHovered: B,
|
|
24270
|
+
portalPosition: Hs,
|
|
24271
|
+
onMouseEnter: () => zs(!0),
|
|
24272
|
+
onMouseLeave: () => zs(!1),
|
|
24273
|
+
onToggle: () => qs(!Ws)
|
|
24274
24274
|
})]
|
|
24275
24275
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24276
24276
|
className: cn(O.label(), p?.label),
|
|
24277
|
-
children: [/* @__PURE__ */ jsx("span", { children: t }),
|
|
24277
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), Ks && /* @__PURE__ */ jsxs("span", {
|
|
24278
24278
|
"aria-label": `${n} items`,
|
|
24279
24279
|
className: cn(O.count(), p?.count),
|
|
24280
24280
|
children: [
|
|
@@ -24335,7 +24335,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24335
24335
|
n
|
|
24336
24336
|
]);
|
|
24337
24337
|
let A = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
|
|
24338
|
-
function
|
|
24338
|
+
function Rs(t) {
|
|
24339
24339
|
let o = t.getMonth(), s = t.getFullYear();
|
|
24340
24340
|
if ((o !== g.month || s !== g.year) && O({
|
|
24341
24341
|
year: s,
|
|
@@ -24352,7 +24352,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24352
24352
|
}), a());
|
|
24353
24353
|
}
|
|
24354
24354
|
}
|
|
24355
|
-
function
|
|
24355
|
+
function R() {
|
|
24356
24356
|
O((e) => e.month === 0 ? {
|
|
24357
24357
|
year: e.year - 1,
|
|
24358
24358
|
month: 11
|
|
@@ -24361,7 +24361,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24361
24361
|
month: e.month - 1
|
|
24362
24362
|
});
|
|
24363
24363
|
}
|
|
24364
|
-
function
|
|
24364
|
+
function B() {
|
|
24365
24365
|
O((e) => e.month === 11 ? {
|
|
24366
24366
|
year: e.year + 1,
|
|
24367
24367
|
month: 0
|
|
@@ -24370,7 +24370,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24370
24370
|
month: e.month + 1
|
|
24371
24371
|
});
|
|
24372
24372
|
}
|
|
24373
|
-
let
|
|
24373
|
+
let zs = getWeekdays();
|
|
24374
24374
|
return /* @__PURE__ */ jsxs("div", {
|
|
24375
24375
|
className: "mt-1 rounded-lg p-2 shadow-lg w-fit border border-neutral-400 bg-white",
|
|
24376
24376
|
children: [
|
|
@@ -24382,7 +24382,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24382
24382
|
direction: "left",
|
|
24383
24383
|
size: 20
|
|
24384
24384
|
}),
|
|
24385
|
-
onClick:
|
|
24385
|
+
onClick: R,
|
|
24386
24386
|
className: "hover:opacity-60",
|
|
24387
24387
|
"aria-label": "Previous month"
|
|
24388
24388
|
}),
|
|
@@ -24399,7 +24399,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24399
24399
|
direction: "right",
|
|
24400
24400
|
size: 20
|
|
24401
24401
|
}),
|
|
24402
|
-
onClick:
|
|
24402
|
+
onClick: B,
|
|
24403
24403
|
className: "hover:opacity-60",
|
|
24404
24404
|
"aria-label": "Next month"
|
|
24405
24405
|
})
|
|
@@ -24407,7 +24407,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24407
24407
|
}),
|
|
24408
24408
|
/* @__PURE__ */ jsx("div", {
|
|
24409
24409
|
className: "mb-2 grid grid-cols-7",
|
|
24410
|
-
children:
|
|
24410
|
+
children: zs.map((e) => /* @__PURE__ */ jsx("div", {
|
|
24411
24411
|
className: "p-0.5 font-bold flex items-center justify-center text-[9px] text-neutral-900",
|
|
24412
24412
|
children: e
|
|
24413
24413
|
}, e))
|
|
@@ -24415,12 +24415,12 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24415
24415
|
/* @__PURE__ */ jsx("div", {
|
|
24416
24416
|
className: "grid grid-cols-7",
|
|
24417
24417
|
children: A.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
24418
|
-
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f),
|
|
24419
|
-
e === "range" && u && !f && s && !isDateBefore(s, u) ? (
|
|
24420
|
-
let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i,
|
|
24418
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), Fs = u, g = s;
|
|
24419
|
+
e === "range" && u && !f && s && !isDateBefore(s, u) ? (Fs = u, g = s) : (Fs = null, g = null);
|
|
24420
|
+
let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, Fs, g)), Ls = l || p || h;
|
|
24421
24421
|
return /* @__PURE__ */ jsx(Button, {
|
|
24422
24422
|
type: "button",
|
|
24423
|
-
onClick: () =>
|
|
24423
|
+
onClick: () => Rs(i),
|
|
24424
24424
|
onMouseEnter: () => {
|
|
24425
24425
|
e === "range" && u && !f && !isDateBefore(i, u) && c(i);
|
|
24426
24426
|
},
|
|
@@ -24429,9 +24429,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24429
24429
|
},
|
|
24430
24430
|
className: "p-0.5",
|
|
24431
24431
|
"aria-label": `Select ${formatDate(i)}`,
|
|
24432
|
-
"aria-selected":
|
|
24432
|
+
"aria-selected": Ls || void 0,
|
|
24433
24433
|
children: /* @__PURE__ */ jsx("div", {
|
|
24434
|
-
className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors",
|
|
24434
|
+
className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", Ls && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", O && !Ls && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Ls && !O && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Ls && !O && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
24435
24435
|
children: r
|
|
24436
24436
|
})
|
|
24437
24437
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -24499,7 +24499,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
24499
24499
|
function g(t) {
|
|
24500
24500
|
e === "range" && (u || l(t), r?.(t));
|
|
24501
24501
|
}
|
|
24502
|
-
function
|
|
24502
|
+
function Ls() {
|
|
24503
24503
|
e === "single" ? h(null) : g({
|
|
24504
24504
|
startDate: null,
|
|
24505
24505
|
endDate: null
|
|
@@ -24510,7 +24510,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
24510
24510
|
displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
|
|
24511
24511
|
disabled: i,
|
|
24512
24512
|
className: a,
|
|
24513
|
-
onClear:
|
|
24513
|
+
onClear: Ls
|
|
24514
24514
|
}),
|
|
24515
24515
|
disabled: i,
|
|
24516
24516
|
children: /* @__PURE__ */ jsx(CalendarPanel, {
|
|
@@ -24724,12 +24724,12 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
24724
24724
|
}) })
|
|
24725
24725
|
});
|
|
24726
24726
|
}
|
|
24727
|
-
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions:
|
|
24727
|
+
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: Fs = {}, density: g = "normal", className: O, style: A, isPriority: Rs, isDone: R }) {
|
|
24728
24728
|
return /* @__PURE__ */ jsx(Card, {
|
|
24729
24729
|
as: Pressable,
|
|
24730
24730
|
onPress: u,
|
|
24731
24731
|
className: cn(eventCardStyles({
|
|
24732
|
-
tone:
|
|
24732
|
+
tone: Rs ? "priority" : R ? "done" : "default",
|
|
24733
24733
|
state: l ? "selected" : c ? "read" : "unread",
|
|
24734
24734
|
density: g
|
|
24735
24735
|
}), O),
|
|
@@ -24771,7 +24771,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24771
24771
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
24772
24772
|
className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
|
|
24773
24773
|
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
24774
|
-
actions:
|
|
24774
|
+
actions: Fs,
|
|
24775
24775
|
className: "col-start-2 justify-self-end"
|
|
24776
24776
|
})]
|
|
24777
24777
|
})
|
|
@@ -24810,7 +24810,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24810
24810
|
]
|
|
24811
24811
|
}),
|
|
24812
24812
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
24813
|
-
/* @__PURE__ */ jsx(EventActionsList, { actions:
|
|
24813
|
+
/* @__PURE__ */ jsx(EventActionsList, { actions: Fs }),
|
|
24814
24814
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
24815
24815
|
content: o,
|
|
24816
24816
|
children: /* @__PURE__ */ jsx("span", {
|
|
@@ -25055,11 +25055,11 @@ function EventSummaryFireButton({ active: e, onClick: t }) {
|
|
|
25055
25055
|
}) });
|
|
25056
25056
|
}
|
|
25057
25057
|
function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, workspace: o, selected: s = !1, onSelect: c, actions: l, className: u }) {
|
|
25058
|
-
let { fire: f, insight: p, link: h } = l,
|
|
25058
|
+
let { fire: f, insight: p, link: h } = l, Fs = p?.label ?? null;
|
|
25059
25059
|
return /* @__PURE__ */ jsxs(Pressable, {
|
|
25060
25060
|
onPress: c,
|
|
25061
25061
|
className: cn(eventSummaryCardStyles({
|
|
25062
|
-
tone: f.active ? "priority" : insightLabelVisible(
|
|
25062
|
+
tone: f.active ? "priority" : insightLabelVisible(Fs) ? "insight" : "default",
|
|
25063
25063
|
state: s ? "selected" : "normal"
|
|
25064
25064
|
}), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
|
|
25065
25065
|
"data-service": t,
|
|
@@ -25083,7 +25083,7 @@ function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i
|
|
|
25083
25083
|
className: "text-xs leading-tight font-semibold tracking-wide flex-1 text-right whitespace-nowrap text-neutral-800",
|
|
25084
25084
|
children: a
|
|
25085
25085
|
}),
|
|
25086
|
-
insightLabelVisible(
|
|
25086
|
+
insightLabelVisible(Fs) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: Fs }),
|
|
25087
25087
|
f.onClick && /* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
25088
25088
|
active: f.active,
|
|
25089
25089
|
onClick: f.onClick
|
|
@@ -25355,13 +25355,13 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
25355
25355
|
}, []), f = u.length, p = new Map(c.map((e) => {
|
|
25356
25356
|
let t = e.insightBadgeId ?? e.id, n = u.indexOf(t);
|
|
25357
25357
|
return [e.id, f - n];
|
|
25358
|
-
})),
|
|
25358
|
+
})), Fs = /* @__PURE__ */ new Set(), g = new Set(c.reduce((e, t) => {
|
|
25359
25359
|
let n = t.insightBadgeId ?? t.id;
|
|
25360
|
-
return
|
|
25361
|
-
}, [])), O = useRef(null), A = useRef(null),
|
|
25360
|
+
return Fs.has(n) || (Fs.add(n), e.push(t.id)), e;
|
|
25361
|
+
}, [])), O = useRef(null), A = useRef(null), Rs = useRef(!1);
|
|
25362
25362
|
useEffect(() => {
|
|
25363
|
-
if (e.length === 0 ||
|
|
25364
|
-
|
|
25363
|
+
if (e.length === 0 || Rs.current) return;
|
|
25364
|
+
Rs.current = !0;
|
|
25365
25365
|
let t = [...e].reverse().find((e) => e.isPriority), n = [...e].reverse().find((e) => !e.isPriority && e.isInsight), r = t ?? n;
|
|
25366
25366
|
if (r && O.current) {
|
|
25367
25367
|
let e = O.current.querySelector(`[data-group-id="${r.id}"]`);
|
|
@@ -25375,7 +25375,7 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
25375
25375
|
}
|
|
25376
25376
|
A.current?.scrollIntoView({ behavior: "smooth" });
|
|
25377
25377
|
}, [e]);
|
|
25378
|
-
let
|
|
25378
|
+
let R = o, B = useCallback((t, n) => {
|
|
25379
25379
|
if (!O.current) return;
|
|
25380
25380
|
let r = Array.from(O.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")), i = n === "fire" ? o : f, a = r.filter((t) => {
|
|
25381
25381
|
let r = t.getAttribute("data-group-id");
|
|
@@ -25402,12 +25402,12 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
25402
25402
|
ref: O,
|
|
25403
25403
|
className: "gap-4 flex flex-col",
|
|
25404
25404
|
children: [e.map((e) => {
|
|
25405
|
-
let t = e.isPriority ? "fire" : e.isInsight ? "insight" : null, n = e.isPriority ?
|
|
25405
|
+
let t = e.isPriority ? "fire" : e.isInsight ? "insight" : null, n = e.isPriority ? R-- : e.isInsight ? p.get(e.id) ?? 0 : 0, r = e.isPriority ? o : e.isInsight ? f : 0, i = n && t ? () => {
|
|
25406
25406
|
let e = n + 1;
|
|
25407
|
-
e <= r &&
|
|
25407
|
+
e <= r && B(e, t);
|
|
25408
25408
|
} : void 0, a = n && t ? () => {
|
|
25409
25409
|
let e = n - 1;
|
|
25410
|
-
e >= 1 &&
|
|
25410
|
+
e >= 1 && B(e, t);
|
|
25411
25411
|
} : void 0, s = e.isInsight && !e.isPriority && !g.has(e.id);
|
|
25412
25412
|
return /* @__PURE__ */ jsx(MessageGroup, {
|
|
25413
25413
|
group: {
|
|
@@ -25479,7 +25479,7 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
|
|
|
25479
25479
|
]
|
|
25480
25480
|
})] });
|
|
25481
25481
|
}
|
|
25482
|
-
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location:
|
|
25482
|
+
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location: Fs, related: g }, className: O }) {
|
|
25483
25483
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
25484
25484
|
summary: e,
|
|
25485
25485
|
priorityText: n,
|
|
@@ -25497,7 +25497,7 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
25497
25497
|
assignees: f,
|
|
25498
25498
|
reporter: p,
|
|
25499
25499
|
team: h,
|
|
25500
|
-
location:
|
|
25500
|
+
location: Fs,
|
|
25501
25501
|
related: g
|
|
25502
25502
|
}),
|
|
25503
25503
|
/* @__PURE__ */ jsx("h2", {
|
|
@@ -25913,10 +25913,10 @@ function EvidenceTimeline({ items: e, canExpandThread: t = !1, tone: n = "fire",
|
|
|
25913
25913
|
tone: n
|
|
25914
25914
|
}, t.id)), t && p.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
25915
25915
|
className: "mt-1 border-t border-neutral-200-variant-1 pt-2",
|
|
25916
|
-
children: [/* @__PURE__ */ jsxs(
|
|
25916
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
25917
25917
|
type: "button",
|
|
25918
25918
|
onClick: () => f((e) => !e),
|
|
25919
|
-
className: "
|
|
25919
|
+
className: "gap-1.5 text-xs font-medium text-neutral-700-variant-1 transition-colors hover:text-neutral-900",
|
|
25920
25920
|
children: [/* @__PURE__ */ jsx("svg", {
|
|
25921
25921
|
width: "11",
|
|
25922
25922
|
height: "11",
|
|
@@ -26293,10 +26293,10 @@ function OnboardingCard({ stepLabel: e, title: t, description: n, titleAccessory
|
|
|
26293
26293
|
children: [i, a]
|
|
26294
26294
|
})
|
|
26295
26295
|
]
|
|
26296
|
-
}),
|
|
26296
|
+
}), Fs = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
|
|
26297
26297
|
layout: o,
|
|
26298
26298
|
placement: s
|
|
26299
|
-
}), c, l), g = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
26299
|
+
}), c, l), g = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [Fs, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, Fs] });
|
|
26300
26300
|
return o === "horizontal" ? /* @__PURE__ */ jsx("div", {
|
|
26301
26301
|
className: cn("flex items-center", u),
|
|
26302
26302
|
children: g
|
|
@@ -26601,12 +26601,12 @@ function SelectedChip({ suggestion: e, onClear: t }) {
|
|
|
26601
26601
|
});
|
|
26602
26602
|
}
|
|
26603
26603
|
function SuggestionRow({ suggestion: e, onSelect: t }) {
|
|
26604
|
-
return /* @__PURE__ */ jsxs(
|
|
26604
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
26605
26605
|
type: "button",
|
|
26606
26606
|
onMouseDown: (n) => {
|
|
26607
26607
|
n.preventDefault(), t(e);
|
|
26608
26608
|
},
|
|
26609
|
-
className: "hover:bg-neutral-50
|
|
26609
|
+
className: "hover:bg-neutral-50 w-full justify-start gap-2 px-3 py-2 text-left text-[12px] text-neutral-800",
|
|
26610
26610
|
children: [e.type === "client" ? /* @__PURE__ */ jsx(BuildingOutlineIcon, {
|
|
26611
26611
|
size: 12,
|
|
26612
26612
|
className: "text-neutral-600"
|
|
@@ -26822,51 +26822,55 @@ function OpenThreadIcon() {
|
|
|
26822
26822
|
]
|
|
26823
26823
|
});
|
|
26824
26824
|
}
|
|
26825
|
-
function SourceIcons({ sourceTypes: e, sourceLink: t }) {
|
|
26825
|
+
function SourceIcons({ sourceTypes: e, sourceLink: t, onOpenSource: n, sourceTooltip: r }) {
|
|
26826
26826
|
return /* @__PURE__ */ jsxs("span", {
|
|
26827
26827
|
className: "absolute top-[10px] right-3 flex items-center gap-1.5",
|
|
26828
26828
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
26829
26829
|
className: "flex items-center gap-1",
|
|
26830
26830
|
children: [e.includes("gmail") && /* @__PURE__ */ jsx(GmailIcon, { size: 16 }), e.includes("slack") && /* @__PURE__ */ jsx(SlackIcon, { size: 18 })]
|
|
26831
26831
|
}), t && /* @__PURE__ */ jsx(InfoTooltip, {
|
|
26832
|
-
content: "Open thread",
|
|
26832
|
+
content: r ?? "Open thread",
|
|
26833
26833
|
position: "top",
|
|
26834
26834
|
children: /* @__PURE__ */ jsx("a", {
|
|
26835
26835
|
href: t,
|
|
26836
26836
|
target: "_blank",
|
|
26837
26837
|
rel: "noopener noreferrer",
|
|
26838
26838
|
"aria-label": "Open thread",
|
|
26839
|
-
onClick: (e) =>
|
|
26839
|
+
onClick: (e) => {
|
|
26840
|
+
e.stopPropagation(), n && (e.preventDefault(), n(t));
|
|
26841
|
+
},
|
|
26840
26842
|
className: "flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors hover:bg-neutral-200 hover:text-neutral-800",
|
|
26841
26843
|
children: /* @__PURE__ */ jsx(OpenThreadIcon, {})
|
|
26842
26844
|
})
|
|
26843
26845
|
})]
|
|
26844
26846
|
});
|
|
26845
26847
|
}
|
|
26846
|
-
function SignalCard({ title: e, clientName: t, requesterName: n, explanation: r, severity: i, status: a, slaLabel: o, slaStatusLabel: s, sourceTypes: c, sourceLink: l,
|
|
26847
|
-
let
|
|
26848
|
+
function SignalCard({ title: e, clientName: t, requesterName: n, explanation: r, severity: i, status: a, slaLabel: o, slaStatusLabel: s, sourceTypes: c, sourceLink: l, onOpenSource: u, sourceTooltip: f, patternContext: p, variant: h = "home", selected: Fs = !1, onClick: g, className: O }) {
|
|
26849
|
+
let A = SEVERITY_CONFIG$1[i];
|
|
26848
26850
|
return /* @__PURE__ */ jsxs(Pressable, {
|
|
26849
|
-
onPress:
|
|
26851
|
+
onPress: g,
|
|
26850
26852
|
className: cn(signalCardStyles({
|
|
26851
|
-
layout:
|
|
26853
|
+
layout: h,
|
|
26852
26854
|
status: a,
|
|
26853
|
-
selected:
|
|
26854
|
-
}),
|
|
26855
|
+
selected: Fs
|
|
26856
|
+
}), O),
|
|
26855
26857
|
children: [
|
|
26856
26858
|
/* @__PURE__ */ jsx(SourceIcons, {
|
|
26857
26859
|
sourceTypes: c,
|
|
26858
|
-
sourceLink: l
|
|
26860
|
+
sourceLink: l,
|
|
26861
|
+
onOpenSource: u,
|
|
26862
|
+
sourceTooltip: f
|
|
26859
26863
|
}),
|
|
26860
26864
|
/* @__PURE__ */ jsxs("div", {
|
|
26861
26865
|
className: "mb-1 flex items-center gap-1.5 pr-10",
|
|
26862
26866
|
children: [/* @__PURE__ */ jsx("span", {
|
|
26863
|
-
className: cn("text-[13px] font-bold",
|
|
26867
|
+
className: cn("text-[13px] font-bold", A.text),
|
|
26864
26868
|
children: o
|
|
26865
26869
|
}), /* @__PURE__ */ jsxs("span", {
|
|
26866
26870
|
className: "inline-flex items-center gap-0.5 text-[10px] font-medium text-neutral-500",
|
|
26867
|
-
children: [/* @__PURE__ */ jsx(
|
|
26871
|
+
children: [/* @__PURE__ */ jsx(A.icon, {
|
|
26868
26872
|
size: 10,
|
|
26869
|
-
className:
|
|
26873
|
+
className: A.text
|
|
26870
26874
|
}), s]
|
|
26871
26875
|
})]
|
|
26872
26876
|
}),
|
|
@@ -26882,9 +26886,9 @@ function SignalCard({ title: e, clientName: t, requesterName: n, explanation: r,
|
|
|
26882
26886
|
className: "line-clamp-1 pr-10 text-[11px] font-medium text-neutral-700-variant-1",
|
|
26883
26887
|
children: [t, n].filter(Boolean).join(" · ") || "Client contact"
|
|
26884
26888
|
}),
|
|
26885
|
-
|
|
26889
|
+
p && /* @__PURE__ */ jsx("p", {
|
|
26886
26890
|
className: "mt-1 pr-10 text-[10px] font-medium text-primary-500",
|
|
26887
|
-
children:
|
|
26891
|
+
children: p
|
|
26888
26892
|
})
|
|
26889
26893
|
]
|
|
26890
26894
|
});
|
|
@@ -27157,23 +27161,23 @@ function GuardrailTooltip({ text: e }) {
|
|
|
27157
27161
|
})
|
|
27158
27162
|
});
|
|
27159
27163
|
}
|
|
27160
|
-
function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStatusLabel: r, statusLabel: i, statusTone: a, sourceType: o, sourceLink: s,
|
|
27161
|
-
let
|
|
27164
|
+
function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStatusLabel: r, statusLabel: i, statusTone: a, sourceType: o, sourceLink: s, onOpenSource: c, sourceTooltip: l, clientCompany: u, contactName: f, teamCompanyName: p, recipientLabel: h, sla: g, claim: O, sameThreadGuardrail: A, evidenceItems: Rs, nextStep: R, actionRationale: B, rankingRationale: zs, attentionRationale: Bs, dismissOptions: Vs, onClose: Hs, onResolve: Us, onDismiss: Ws, className: Gs, ...Ks }) {
|
|
27165
|
+
let qs = SEVERITY_CONFIG[t], [Js, Ys] = useState(!1), [Xs, Zs] = useState(null), [Qs, V] = useState(!1), [ec, tc] = useState(!1), nc = () => {
|
|
27162
27166
|
let t = [r, n].filter(Boolean).join(" · "), i = [
|
|
27163
27167
|
e,
|
|
27164
27168
|
"",
|
|
27165
|
-
|
|
27169
|
+
O,
|
|
27166
27170
|
"",
|
|
27167
|
-
|
|
27171
|
+
A,
|
|
27168
27172
|
...t ? ["", t] : []
|
|
27169
27173
|
];
|
|
27170
|
-
navigator.clipboard.writeText(i.join("\n")).catch(() => {}),
|
|
27171
|
-
},
|
|
27172
|
-
|
|
27174
|
+
navigator.clipboard.writeText(i.join("\n")).catch(() => {}), V(!0), setTimeout(() => V(!1), 2e3);
|
|
27175
|
+
}, rc = () => {
|
|
27176
|
+
Ws?.(Xs ?? void 0), Ys(!1), Zs(null);
|
|
27173
27177
|
};
|
|
27174
27178
|
return /* @__PURE__ */ jsxs("div", {
|
|
27175
|
-
className: cn("flex h-full flex-col overflow-y-auto bg-white-variant-8", STATUS_BADGE_STYLES[a].accentBar,
|
|
27176
|
-
...
|
|
27179
|
+
className: cn("flex h-full flex-col overflow-y-auto bg-white-variant-8", STATUS_BADGE_STYLES[a].accentBar, Gs),
|
|
27180
|
+
...Ks,
|
|
27177
27181
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
27178
27182
|
className: "sticky top-0 z-20 shrink-0 border-b border-neutral-200-variant-1 bg-white-variant-8 px-4 pt-5 pb-4",
|
|
27179
27183
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -27186,12 +27190,12 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStat
|
|
|
27186
27190
|
children: e
|
|
27187
27191
|
}),
|
|
27188
27192
|
n && /* @__PURE__ */ jsx("span", {
|
|
27189
|
-
className: cn("text-[13px] font-bold shrink-0",
|
|
27193
|
+
className: cn("text-[13px] font-bold shrink-0", qs.text),
|
|
27190
27194
|
children: n
|
|
27191
27195
|
}),
|
|
27192
27196
|
r && /* @__PURE__ */ jsxs("span", {
|
|
27193
27197
|
className: "inline-flex shrink-0 items-center gap-1 text-[10px] font-medium text-neutral-500",
|
|
27194
|
-
children: [
|
|
27198
|
+
children: [qs.icon && /* @__PURE__ */ jsx(qs.icon, {
|
|
27195
27199
|
size: 11,
|
|
27196
27200
|
className: "text-neutral-500"
|
|
27197
27201
|
}), r]
|
|
@@ -27201,11 +27205,11 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStat
|
|
|
27201
27205
|
children: [/* @__PURE__ */ jsx("span", { className: cn("h-1.5 w-1.5 shrink-0 rounded-full", STATUS_BADGE_STYLES[a].dot) }), i]
|
|
27202
27206
|
})
|
|
27203
27207
|
]
|
|
27204
|
-
}),
|
|
27208
|
+
}), Hs && /* @__PURE__ */ jsx(Button, {
|
|
27205
27209
|
type: "button",
|
|
27206
|
-
onClick:
|
|
27210
|
+
onClick: Hs,
|
|
27207
27211
|
"aria-label": "Close",
|
|
27208
|
-
className: "
|
|
27212
|
+
className: "h-7 w-7 shrink-0 rounded-lg hover:bg-neutral-100",
|
|
27209
27213
|
children: /* @__PURE__ */ jsx("svg", {
|
|
27210
27214
|
width: "14",
|
|
27211
27215
|
height: "14",
|
|
@@ -27230,19 +27234,19 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStat
|
|
|
27230
27234
|
}),
|
|
27231
27235
|
/* @__PURE__ */ jsx("span", {
|
|
27232
27236
|
className: "flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-full bg-neutral-200 text-[9px] font-bold text-neutral-700-variant-1",
|
|
27233
|
-
children: (
|
|
27237
|
+
children: (f || "Client contact").charAt(0).toUpperCase()
|
|
27234
27238
|
}),
|
|
27235
27239
|
/* @__PURE__ */ jsx("span", {
|
|
27236
27240
|
className: "truncate text-[12px] font-semibold text-neutral-900",
|
|
27237
|
-
children:
|
|
27241
|
+
children: f || "Client contact"
|
|
27238
27242
|
}),
|
|
27239
|
-
|
|
27243
|
+
u && /* @__PURE__ */ jsx("span", {
|
|
27240
27244
|
className: "shrink-0 truncate rounded-full border border-neutral-300 bg-white px-2 py-px text-[10px] font-medium text-neutral-700-variant-1",
|
|
27241
|
-
children:
|
|
27245
|
+
children: u
|
|
27242
27246
|
}),
|
|
27243
27247
|
/* @__PURE__ */ jsx(RoleBadge, { role: "client" })
|
|
27244
27248
|
]
|
|
27245
|
-
}), (
|
|
27249
|
+
}), (p || h) && /* @__PURE__ */ jsxs("div", {
|
|
27246
27250
|
className: "flex items-center gap-2 min-w-0",
|
|
27247
27251
|
children: [
|
|
27248
27252
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -27253,13 +27257,13 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStat
|
|
|
27253
27257
|
className: "flex h-[18px] w-[18px] shrink-0 items-center justify-center",
|
|
27254
27258
|
children: jsx(o === "gmail" ? GmailIcon : SlackIcon, { size: 15 })
|
|
27255
27259
|
}),
|
|
27256
|
-
|
|
27260
|
+
p && /* @__PURE__ */ jsx("span", {
|
|
27257
27261
|
className: "truncate text-[12px] font-semibold text-neutral-900",
|
|
27258
|
-
children:
|
|
27262
|
+
children: p
|
|
27259
27263
|
}),
|
|
27260
|
-
|
|
27264
|
+
h && /* @__PURE__ */ jsx("span", {
|
|
27261
27265
|
className: "shrink-0 truncate rounded-full border border-neutral-300 bg-white px-2 py-px text-[10px] font-medium text-neutral-700-variant-1",
|
|
27262
|
-
children:
|
|
27266
|
+
children: h
|
|
27263
27267
|
}),
|
|
27264
27268
|
/* @__PURE__ */ jsx(RoleBadge, { role: "team" })
|
|
27265
27269
|
]
|
|
@@ -27268,59 +27272,59 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStat
|
|
|
27268
27272
|
}), /* @__PURE__ */ jsxs("div", {
|
|
27269
27273
|
className: "flex flex-col gap-3 p-4",
|
|
27270
27274
|
children: [
|
|
27271
|
-
|
|
27275
|
+
g ? /* @__PURE__ */ jsxs("div", {
|
|
27272
27276
|
className: "grid grid-cols-1 items-stretch gap-3 xl:grid-cols-2",
|
|
27273
27277
|
children: [/* @__PURE__ */ jsx("div", {
|
|
27274
27278
|
className: "rounded-xl border border-neutral-200-variant-1 bg-white-variant-8 px-4 py-3.5",
|
|
27275
|
-
children: /* @__PURE__ */ jsx(SlaProgressBar, { ...
|
|
27279
|
+
children: /* @__PURE__ */ jsx(SlaProgressBar, { ...g })
|
|
27276
27280
|
}), /* @__PURE__ */ jsx(SectionCard, {
|
|
27277
27281
|
title: "What QTalo found",
|
|
27278
|
-
titleAdornment: /* @__PURE__ */ jsx(GuardrailTooltip, { text:
|
|
27282
|
+
titleAdornment: /* @__PURE__ */ jsx(GuardrailTooltip, { text: A }),
|
|
27279
27283
|
children: /* @__PURE__ */ jsx("p", {
|
|
27280
27284
|
className: "text-sm leading-snug text-neutral-800",
|
|
27281
|
-
children:
|
|
27285
|
+
children: O
|
|
27282
27286
|
})
|
|
27283
27287
|
})]
|
|
27284
27288
|
}) : /* @__PURE__ */ jsx(SectionCard, {
|
|
27285
27289
|
title: "What QTalo found",
|
|
27286
|
-
titleAdornment: /* @__PURE__ */ jsx(GuardrailTooltip, { text:
|
|
27290
|
+
titleAdornment: /* @__PURE__ */ jsx(GuardrailTooltip, { text: A }),
|
|
27287
27291
|
children: /* @__PURE__ */ jsx("p", {
|
|
27288
27292
|
className: "text-sm leading-snug text-neutral-800",
|
|
27289
|
-
children:
|
|
27293
|
+
children: O
|
|
27290
27294
|
})
|
|
27291
27295
|
}),
|
|
27292
|
-
|
|
27296
|
+
R && /* @__PURE__ */ jsxs(SectionCard, {
|
|
27293
27297
|
title: "Next step",
|
|
27294
27298
|
children: [/* @__PURE__ */ jsx("p", {
|
|
27295
27299
|
className: "text-sm font-semibold text-neutral-900",
|
|
27296
|
-
children: A
|
|
27297
|
-
}), R && /* @__PURE__ */ jsx("p", {
|
|
27298
|
-
className: "mt-1 text-sm text-neutral-700",
|
|
27299
27300
|
children: R
|
|
27301
|
+
}), B && /* @__PURE__ */ jsx("p", {
|
|
27302
|
+
className: "mt-1 text-sm text-neutral-700",
|
|
27303
|
+
children: B
|
|
27300
27304
|
})]
|
|
27301
27305
|
}),
|
|
27302
|
-
|
|
27306
|
+
zs ? /* @__PURE__ */ jsxs("div", {
|
|
27303
27307
|
className: "rounded-xl border border-neutral-200-variant-1 bg-neutral-50 px-4 py-3.5",
|
|
27304
27308
|
children: [/* @__PURE__ */ jsx("p", {
|
|
27305
27309
|
className: "mb-2 text-[10px] font-bold tracking-widest text-neutral-900 uppercase",
|
|
27306
27310
|
children: "Why ranked first"
|
|
27307
27311
|
}), /* @__PURE__ */ jsx("p", {
|
|
27308
27312
|
className: "text-sm text-neutral-800",
|
|
27309
|
-
children:
|
|
27313
|
+
children: zs
|
|
27310
27314
|
})]
|
|
27311
|
-
}) :
|
|
27315
|
+
}) : Bs ? /* @__PURE__ */ jsxs("div", {
|
|
27312
27316
|
className: "rounded-xl border border-neutral-200-variant-1 bg-neutral-50 px-4 py-3.5",
|
|
27313
27317
|
children: [/* @__PURE__ */ jsx("p", {
|
|
27314
27318
|
className: "mb-2 text-[10px] font-bold tracking-widest text-neutral-900 uppercase",
|
|
27315
27319
|
children: "Why this needs attention"
|
|
27316
27320
|
}), /* @__PURE__ */ jsx("p", {
|
|
27317
27321
|
className: "text-sm text-neutral-800",
|
|
27318
|
-
children:
|
|
27322
|
+
children: Bs
|
|
27319
27323
|
})]
|
|
27320
27324
|
}) : null,
|
|
27321
27325
|
/* @__PURE__ */ jsx(SectionCard, {
|
|
27322
27326
|
title: "What do you want to do?",
|
|
27323
|
-
children:
|
|
27327
|
+
children: Js ? /* @__PURE__ */ jsxs("div", {
|
|
27324
27328
|
className: "flex flex-col gap-2",
|
|
27325
27329
|
children: [
|
|
27326
27330
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -27329,33 +27333,33 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStat
|
|
|
27329
27333
|
}),
|
|
27330
27334
|
/* @__PURE__ */ jsx("div", {
|
|
27331
27335
|
className: "flex flex-wrap gap-1.5",
|
|
27332
|
-
children:
|
|
27336
|
+
children: Vs.map((e) => /* @__PURE__ */ jsx(Button, {
|
|
27333
27337
|
type: "button",
|
|
27334
|
-
onClick: () =>
|
|
27335
|
-
className:
|
|
27338
|
+
onClick: () => Zs((t) => t === e.id ? null : e.id),
|
|
27339
|
+
className: Xs === e.id ? "rounded-full bg-neutral-800 px-2.5 py-1 text-[11px] font-medium text-white" : "rounded-full border border-neutral-300 bg-white px-2.5 py-1 text-[11px] font-medium text-neutral-700 hover:border-neutral-500",
|
|
27336
27340
|
children: e.label
|
|
27337
27341
|
}, e.id))
|
|
27338
27342
|
}),
|
|
27339
27343
|
/* @__PURE__ */ jsxs("div", {
|
|
27340
27344
|
className: "mt-1 flex items-center gap-3",
|
|
27341
27345
|
children: [
|
|
27342
|
-
/* @__PURE__ */ jsx(
|
|
27346
|
+
/* @__PURE__ */ jsx(Button, {
|
|
27343
27347
|
type: "button",
|
|
27344
|
-
onClick:
|
|
27348
|
+
onClick: rc,
|
|
27345
27349
|
className: "rounded-lg bg-neutral-800 px-3 py-1.5 text-xs font-semibold text-white",
|
|
27346
27350
|
children: "Confirm"
|
|
27347
27351
|
}),
|
|
27348
|
-
/* @__PURE__ */ jsx(
|
|
27352
|
+
/* @__PURE__ */ jsx(Button, {
|
|
27349
27353
|
type: "button",
|
|
27350
27354
|
onClick: () => {
|
|
27351
|
-
|
|
27355
|
+
Ys(!1), Zs(null);
|
|
27352
27356
|
},
|
|
27353
27357
|
className: "text-xs font-medium text-neutral-700-variant-1 hover:underline",
|
|
27354
27358
|
children: "Cancel"
|
|
27355
27359
|
}),
|
|
27356
|
-
/* @__PURE__ */ jsx(
|
|
27360
|
+
/* @__PURE__ */ jsx(Button, {
|
|
27357
27361
|
type: "button",
|
|
27358
|
-
onClick:
|
|
27362
|
+
onClick: Us,
|
|
27359
27363
|
className: "ml-auto text-xs font-medium text-primary-500 hover:underline",
|
|
27360
27364
|
children: "Mark handled instead"
|
|
27361
27365
|
})
|
|
@@ -27365,59 +27369,68 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStat
|
|
|
27365
27369
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
27366
27370
|
className: "flex flex-wrap items-center gap-2",
|
|
27367
27371
|
children: [
|
|
27368
|
-
s &&
|
|
27369
|
-
|
|
27370
|
-
|
|
27371
|
-
|
|
27372
|
-
|
|
27373
|
-
|
|
27374
|
-
|
|
27375
|
-
|
|
27372
|
+
s && (() => {
|
|
27373
|
+
let e = /* @__PURE__ */ jsxs("a", {
|
|
27374
|
+
href: s,
|
|
27375
|
+
target: "_blank",
|
|
27376
|
+
rel: "noopener noreferrer",
|
|
27377
|
+
onClick: (e) => {
|
|
27378
|
+
c && (e.preventDefault(), c(s));
|
|
27379
|
+
},
|
|
27380
|
+
className: "inline-flex items-center gap-1.5 rounded-lg border border-neutral-300 bg-neutral-100 px-3 py-1.5 text-xs font-semibold text-neutral-700 transition-colors hover:bg-neutral-200",
|
|
27381
|
+
children: [/* @__PURE__ */ jsx(OpenSourceIcon, {}), "Open source"]
|
|
27382
|
+
});
|
|
27383
|
+
return l ? /* @__PURE__ */ jsx(InfoTooltip, {
|
|
27384
|
+
content: l,
|
|
27385
|
+
children: e
|
|
27386
|
+
}) : e;
|
|
27387
|
+
})(),
|
|
27388
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
27376
27389
|
type: "button",
|
|
27377
|
-
onClick:
|
|
27378
|
-
className: "
|
|
27390
|
+
onClick: Us,
|
|
27391
|
+
className: "gap-1.5 rounded-lg border border-green-400 bg-green-50 px-3 py-1.5 text-xs font-semibold text-green-800 transition-colors hover:bg-green-100",
|
|
27379
27392
|
children: [/* @__PURE__ */ jsx(CheckActionIcon, {}), "Mark handled"]
|
|
27380
27393
|
}),
|
|
27381
|
-
/* @__PURE__ */ jsxs(
|
|
27394
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
27382
27395
|
type: "button",
|
|
27383
|
-
onClick: () =>
|
|
27384
|
-
className: "
|
|
27396
|
+
onClick: () => Ys(!0),
|
|
27397
|
+
className: "gap-1.5 rounded-lg border border-neutral-300 bg-neutral-100 px-3 py-1.5 text-xs font-semibold text-neutral-700 transition-colors hover:bg-neutral-200",
|
|
27385
27398
|
children: [/* @__PURE__ */ jsx(DismissActionIcon, {}), "Mark not useful"]
|
|
27386
27399
|
}),
|
|
27387
|
-
/* @__PURE__ */ jsxs(
|
|
27400
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
27388
27401
|
type: "button",
|
|
27389
|
-
onClick:
|
|
27390
|
-
className:
|
|
27391
|
-
children: [jsx(
|
|
27402
|
+
onClick: nc,
|
|
27403
|
+
className: Qs ? "gap-1.5 rounded-lg border border-green-400 bg-green-50 px-3 py-1.5 text-xs font-semibold text-green-800 transition-colors" : "gap-1.5 rounded-lg border border-neutral-300 bg-neutral-100 px-3 py-1.5 text-xs font-semibold text-neutral-700 transition-colors hover:bg-neutral-200",
|
|
27404
|
+
children: [jsx(Qs ? CheckActionIcon : CopyActionIcon, {}), Qs ? "Copied" : "Copy evidence"]
|
|
27392
27405
|
})
|
|
27393
27406
|
]
|
|
27394
27407
|
})
|
|
27395
27408
|
}),
|
|
27396
27409
|
/* @__PURE__ */ jsxs("div", {
|
|
27397
27410
|
className: "rounded-xl border border-neutral-200-variant-1 bg-white-variant-8 px-4 py-3.5",
|
|
27398
|
-
children: [/* @__PURE__ */ jsxs(
|
|
27411
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
27399
27412
|
type: "button",
|
|
27400
|
-
onClick: () =>
|
|
27401
|
-
className: "
|
|
27402
|
-
"aria-expanded":
|
|
27413
|
+
onClick: () => tc((e) => !e),
|
|
27414
|
+
className: "w-full justify-between text-left",
|
|
27415
|
+
"aria-expanded": ec,
|
|
27403
27416
|
children: [/* @__PURE__ */ jsx("span", {
|
|
27404
27417
|
className: "text-[10px] font-bold tracking-widest text-neutral-900 uppercase",
|
|
27405
27418
|
children: "Evidence analysis"
|
|
27406
27419
|
}), /* @__PURE__ */ jsxs("span", {
|
|
27407
27420
|
className: "inline-flex items-center gap-1 text-xs font-medium text-neutral-700-variant-1",
|
|
27408
|
-
children: [
|
|
27421
|
+
children: [ec ? "Hide proof" : "Show proof", /* @__PURE__ */ jsx(ChevronIcon, { expanded: ec })]
|
|
27409
27422
|
})]
|
|
27410
|
-
}),
|
|
27423
|
+
}), ec && /* @__PURE__ */ jsx("div", {
|
|
27411
27424
|
className: "mt-3 border-t border-neutral-200-variant-1 pt-3",
|
|
27412
27425
|
children: /* @__PURE__ */ jsx(EvidenceTimeline, {
|
|
27413
|
-
items:
|
|
27426
|
+
items: Rs,
|
|
27414
27427
|
canExpandThread: !0,
|
|
27415
27428
|
tone: a,
|
|
27416
27429
|
threadTitle: e,
|
|
27417
|
-
clientCompany:
|
|
27418
|
-
contactName:
|
|
27419
|
-
teamCompanyName:
|
|
27420
|
-
recipientLabel:
|
|
27430
|
+
clientCompany: u,
|
|
27431
|
+
contactName: f,
|
|
27432
|
+
teamCompanyName: p,
|
|
27433
|
+
recipientLabel: h
|
|
27421
27434
|
})
|
|
27422
27435
|
})]
|
|
27423
27436
|
})
|
|
@@ -27592,6 +27605,35 @@ function ConfirmationTemplate({ title: e, description: t, cancelLabel: n, accept
|
|
|
27592
27605
|
})]
|
|
27593
27606
|
});
|
|
27594
27607
|
}
|
|
27608
|
+
function ErrorToast({ title: e, description: t, onClose: n, options: r = {} }) {
|
|
27609
|
+
return toast$1((r) => /* @__PURE__ */ jsx(ErrorToastTemplate, {
|
|
27610
|
+
title: e,
|
|
27611
|
+
description: t,
|
|
27612
|
+
onClose: () => n(r)
|
|
27613
|
+
}), { ...r });
|
|
27614
|
+
}
|
|
27615
|
+
function ErrorToastTemplate({ title: e, description: t, onClose: n }) {
|
|
27616
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
27617
|
+
className: "gap-3 rounded-lg p-4 grid max-w-[400px] min-w-[280px] grid-cols-[auto_1fr] bg-error-base",
|
|
27618
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
27619
|
+
className: "gap-1 flex flex-col justify-center",
|
|
27620
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
27621
|
+
className: "text-xs font-medium text-white",
|
|
27622
|
+
children: e
|
|
27623
|
+
}), t && /* @__PURE__ */ jsx("div", {
|
|
27624
|
+
className: "text-xs line-clamp-2 text-white-alpha-80",
|
|
27625
|
+
children: t
|
|
27626
|
+
})]
|
|
27627
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
27628
|
+
className: "flex items-center justify-center",
|
|
27629
|
+
children: /* @__PURE__ */ jsx(IconButton, { icon: /* @__PURE__ */ jsx(CloseIcon, {
|
|
27630
|
+
size: 20,
|
|
27631
|
+
className: "text-white",
|
|
27632
|
+
onClick: () => n(close)
|
|
27633
|
+
}) })
|
|
27634
|
+
})]
|
|
27635
|
+
});
|
|
27636
|
+
}
|
|
27595
27637
|
function UndoToast({ title: e, subtitle: t, description: n, onUndo: r, onClose: i, options: a = {} }) {
|
|
27596
27638
|
return toast$1((a) => /* @__PURE__ */ jsx(UndoToastTemplate, {
|
|
27597
27639
|
title: e,
|
|
@@ -27639,7 +27681,8 @@ function UndoToastTemplate({ title: e, subtitle: t, description: n, onUndo: r, o
|
|
|
27639
27681
|
}
|
|
27640
27682
|
const toast = Object.assign(toast$1, {
|
|
27641
27683
|
confirm: (e) => ConfirmationToast(e),
|
|
27642
|
-
undo: (e) => UndoToast(e)
|
|
27684
|
+
undo: (e) => UndoToast(e),
|
|
27685
|
+
error: (e) => ErrorToast(e)
|
|
27643
27686
|
});
|
|
27644
27687
|
function QtaloImage({ size: e = 40, className: t, ...n }) {
|
|
27645
27688
|
return /* @__PURE__ */ jsxs("svg", {
|