@qtalo/qt-ui-library 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.js +441 -363
- 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"), Ns = lookupGetter(f, "nextSibling"), g = lookupGetter(f, "childNodes"), O = lookupGetter(f, "parentNode"), Ps = lookupGetter(f, "shadowRoot"), Fs = lookupGetter(f, "attributes"), A = o && o.prototype ? lookupGetter(o.prototype, "nodeType") : null, R = o && o.prototype ? lookupGetter(o.prototype, "nodeName") : null, B = 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 V,
|
|
400
|
-
if (
|
|
401
|
-
},
|
|
402
|
-
|
|
399
|
+
let V, Is = "", Ls, Rs = !1, zs = 0, Bs = function() {
|
|
400
|
+
if (zs > 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
|
+
}, Vs = function(e) {
|
|
402
|
+
Bs(), zs++;
|
|
403
403
|
try {
|
|
404
404
|
return V.createHTML(e);
|
|
405
405
|
} finally {
|
|
406
|
-
|
|
406
|
+
zs--;
|
|
407
407
|
}
|
|
408
|
-
},
|
|
409
|
-
|
|
408
|
+
}, Hs = function(e) {
|
|
409
|
+
Bs(), zs++;
|
|
410
410
|
try {
|
|
411
411
|
return V.createScriptURL(e);
|
|
412
412
|
} finally {
|
|
413
|
-
|
|
413
|
+
zs--;
|
|
414
414
|
}
|
|
415
|
-
},
|
|
416
|
-
return
|
|
417
|
-
},
|
|
418
|
-
t.isSupported = typeof entries == "function" && typeof O == "function" &&
|
|
419
|
-
let
|
|
415
|
+
}, Us = function() {
|
|
416
|
+
return Rs ||= (Ls = _createTrustedTypesPolicy(u, i), !0), Ls;
|
|
417
|
+
}, Ws = n, Gs = Ws.implementation, Ks = Ws.createNodeIterator, qs = Ws.createDocumentFragment, Js = Ws.getElementsByTagName, Ys = r.importNode, H = _createHooksMap();
|
|
418
|
+
t.isSupported = typeof entries == "function" && typeof O == "function" && Gs && Gs.createHTMLDocument !== void 0;
|
|
419
|
+
let Xs = MUSTACHE_EXPR, Zs = ERB_EXPR, Qs = TMPLIT_EXPR, $s = DATA_ATTR, ec = ARIA_ATTR, tc = IS_SCRIPT_OR_DATA, nc = ATTR_WHITESPACE, rc = CUSTOM_ELEMENT, ic = IS_ALLOWED_URI, Y = null, ac = addToSet({}, [
|
|
420
420
|
...html$1,
|
|
421
421
|
...svg$1,
|
|
422
422
|
...svgFilters,
|
|
423
423
|
...mathMl$1,
|
|
424
424
|
...text
|
|
425
|
-
]),
|
|
425
|
+
]), oc = null, sc = addToSet({}, [
|
|
426
426
|
...html,
|
|
427
427
|
...svg,
|
|
428
428
|
...mathMl,
|
|
429
429
|
...xml
|
|
430
|
-
]),
|
|
430
|
+
]), cc = 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
|
+
})), lc = null, uc = null, dc = 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
|
+
})), fc = !0, pc = !0, mc = !1, hc = !0, gc = !1, _c = !0, vc = !1, yc = !1, bc = null, xc = null, Sc = !1, Cc = !1, wc = !1, Tc = !1, Ec = !0, Dc = !1, Oc = "user-content-", kc = !0, Ac = !1, jc = {}, Mc = null, Nc = 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(".")), Pc = null, Fc = addToSet({}, [
|
|
463
463
|
"audio",
|
|
464
464
|
"video",
|
|
465
465
|
"img",
|
|
466
466
|
"source",
|
|
467
467
|
"image",
|
|
468
468
|
"track"
|
|
469
|
-
]),
|
|
469
|
+
]), Ic = null, Lc = 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
|
+
]), Rc = "http://www.w3.org/1998/Math/MathML", zc = "http://www.w3.org/2000/svg", Bc = "http://www.w3.org/1999/xhtml", Vc = Bc, Hc = !1, Uc = null, Wc = addToSet({}, [
|
|
485
|
+
Rc,
|
|
486
|
+
zc,
|
|
487
|
+
Bc
|
|
488
|
+
], stringToString), Gc = freeze([
|
|
489
489
|
"mi",
|
|
490
490
|
"mo",
|
|
491
491
|
"mn",
|
|
492
492
|
"ms",
|
|
493
493
|
"mtext"
|
|
494
|
-
]),
|
|
494
|
+
]), Kc = addToSet({}, Gc), qc = freeze(["annotation-xml"]), Jc = addToSet({}, qc), Yc = addToSet({}, [
|
|
495
495
|
"title",
|
|
496
496
|
"style",
|
|
497
497
|
"font",
|
|
498
498
|
"a",
|
|
499
499
|
"script"
|
|
500
|
-
]),
|
|
500
|
+
]), Xc = null, Zc = ["application/xhtml+xml", "text/html"], Qc = null, $c = null, el = n.createElement("form"), tl = function(e) {
|
|
501
501
|
return e instanceof RegExp || e instanceof Function;
|
|
502
|
-
},
|
|
502
|
+
}, nl = 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 ($c && $c === e) return;
|
|
505
|
+
(!e || typeof e != "object") && (e = {}), e = clone(e), Xc = Zc.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Qc = Xc === "application/xhtml+xml" ? stringToString : stringToLowerCase, Y = _resolveSetOption(e, "ALLOWED_TAGS", ac, { transform: Qc }), oc = _resolveSetOption(e, "ALLOWED_ATTR", sc, { transform: Qc }), Uc = _resolveSetOption(e, "ALLOWED_NAMESPACES", Wc, { transform: stringToString }), Ic = _resolveSetOption(e, "ADD_URI_SAFE_ATTR", Lc, {
|
|
506
|
+
transform: Qc,
|
|
507
|
+
base: Lc
|
|
508
|
+
}), Pc = _resolveSetOption(e, "ADD_DATA_URI_TAGS", Fc, {
|
|
509
|
+
transform: Qc,
|
|
507
510
|
base: Fc
|
|
508
|
-
}), Mc = _resolveSetOption(e, "
|
|
509
|
-
transform: Xc,
|
|
510
|
-
base: Nc
|
|
511
|
-
}), Ac = _resolveSetOption(e, "FORBID_CONTENTS", jc, { transform: Xc }), sc = _resolveSetOption(e, "FORBID_TAGS", clone({}), { transform: Xc }), cc = _resolveSetOption(e, "FORBID_ATTR", clone({}), { transform: Xc }), kc = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, uc = e.ALLOW_ARIA_ATTR !== !1, dc = e.ALLOW_DATA_ATTR !== !1, fc = e.ALLOW_UNKNOWN_PROTOCOLS || !1, pc = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, mc = e.SAFE_FOR_TEMPLATES || !1, hc = e.SAFE_FOR_XML !== !1, gc = e.WHOLE_DOCUMENT || !1, xc = e.RETURN_DOM || !1, Sc = e.RETURN_DOM_FRAGMENT || !1, Cc = e.RETURN_TRUSTED_TYPE || !1, bc = e.FORCE_BODY || !1, wc = e.SANITIZE_DOM !== !1, Tc = e.SANITIZE_NAMED_PROPS || !1, Dc = e.KEEP_CONTENT !== !1, Oc = e.IN_PLACE || !1, nc = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : IS_ALLOWED_URI, zc = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Rc, Wc = 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({}, Uc), Kc = objectHasOwnProperty(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Gc);
|
|
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);
|
|
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 (cc = create(null), objectHasOwnProperty(t, "tagNameCheck") && tl(t.tagNameCheck) && (cc.tagNameCheck = t.tagNameCheck), objectHasOwnProperty(t, "attributeNameCheck") && tl(t.attributeNameCheck) && (cc.attributeNameCheck = t.attributeNameCheck), objectHasOwnProperty(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (cc.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), seal(cc), gc && (pc = !1), wc && (Cc = !0), jc && (Y = addToSet({}, text), oc = create(null), jc.html === !0 && (addToSet(Y, html$1), addToSet(oc, html)), jc.svg === !0 && (addToSet(Y, svg$1), addToSet(oc, svg), addToSet(oc, xml)), jc.svgFilters === !0 && (addToSet(Y, svgFilters), addToSet(oc, svg), addToSet(oc, xml)), jc.mathMl === !0 && (addToSet(Y, mathMl$1), addToSet(oc, mathMl), addToSet(oc, xml))), dc.tagCheck = null, dc.attributeCheck = null, objectHasOwnProperty(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? dc.tagCheck = e.ADD_TAGS : arrayIsArray(e.ADD_TAGS) && (Y === ac && (Y = clone(Y)), addToSet(Y, e.ADD_TAGS, Qc))), objectHasOwnProperty(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? dc.attributeCheck = e.ADD_ATTR : arrayIsArray(e.ADD_ATTR) && (oc === sc && (oc = clone(oc)), addToSet(oc, e.ADD_ATTR, Qc))), objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") && arrayIsArray(e.ADD_URI_SAFE_ATTR) && addToSet(Ic, e.ADD_URI_SAFE_ATTR, Qc), objectHasOwnProperty(e, "FORBID_CONTENTS") && arrayIsArray(e.FORBID_CONTENTS) && (Mc === Nc && (Mc = clone(Mc)), addToSet(Mc, e.FORBID_CONTENTS, Qc)), objectHasOwnProperty(e, "ADD_FORBID_CONTENTS") && arrayIsArray(e.ADD_FORBID_CONTENTS) && (Mc === Nc && (Mc = clone(Mc)), addToSet(Mc, e.ADD_FORBID_CONTENTS, Qc)), kc && (Y["#text"] = !0), vc && addToSet(Y, [
|
|
514
514
|
"html",
|
|
515
515
|
"head",
|
|
516
516
|
"body"
|
|
517
|
-
]), Y.table && (addToSet(Y, ["tbody"]), delete
|
|
517
|
+
]), Y.table && (addToSet(Y, ["tbody"]), delete lc.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
520
|
let t = V;
|
|
521
521
|
V = e.TRUSTED_TYPES_POLICY;
|
|
522
522
|
try {
|
|
523
|
-
|
|
523
|
+
Is = Vs("");
|
|
524
524
|
} catch (e) {
|
|
525
525
|
throw V = t, e;
|
|
526
526
|
}
|
|
527
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (V = void 0,
|
|
528
|
-
freeze && freeze(e),
|
|
529
|
-
},
|
|
527
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (V = void 0, Is = "") : (V === void 0 && (V = Us()), V && typeof Is == "string" && (Is = Vs("")));
|
|
528
|
+
freeze && freeze(e), $c = e;
|
|
529
|
+
}, rl = 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
|
+
]), il = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), al = function(e, t, n) {
|
|
534
|
+
return t.namespaceURI === Bc ? e === "svg" : t.namespaceURI === Rc ? e === "svg" && (n === "annotation-xml" || Kc[n]) : !!rl[e];
|
|
535
|
+
}, ol = function(e, t, n) {
|
|
536
|
+
return t.namespaceURI === Bc ? e === "math" : t.namespaceURI === zc ? e === "math" && Jc[n] : !!il[e];
|
|
537
|
+
}, sl = function(e, t, n) {
|
|
538
|
+
return t.namespaceURI === zc && !Jc[n] || t.namespaceURI === Rc && !Kc[n] ? !1 : !il[e] && (Yc[e] || !rl[e]);
|
|
539
|
+
}, cl = function(e) {
|
|
540
540
|
let t = O(e);
|
|
541
541
|
(!t || !t.tagName) && (t = {
|
|
542
|
-
namespaceURI:
|
|
542
|
+
namespaceURI: Vc,
|
|
543
543
|
tagName: "template"
|
|
544
544
|
});
|
|
545
545
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
546
|
-
return
|
|
547
|
-
},
|
|
546
|
+
return Uc[e.namespaceURI] ? e.namespaceURI === zc ? al(n, t, r) : e.namespaceURI === Rc ? ol(n, t, r) : e.namespaceURI === Bc ? sl(n, t, r) : !!(Xc === "application/xhtml+xml" && Uc[e.namespaceURI]) : !1;
|
|
547
|
+
}, ll = 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
|
+
}, ul = function(e) {
|
|
555
|
+
pl(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 = Fs(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
|
+
}, dl = 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 (Cc || wc) try {
|
|
587
|
+
ll(n);
|
|
588
588
|
} catch {}
|
|
589
589
|
else try {
|
|
590
590
|
n.setAttribute(e, "");
|
|
591
591
|
} catch {}
|
|
592
|
-
},
|
|
593
|
-
let t =
|
|
592
|
+
}, fl = function(e) {
|
|
593
|
+
let t = Fs(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" || oc[Qc(i)])) try {
|
|
597
597
|
e.removeAttribute(i);
|
|
598
598
|
} catch {}
|
|
599
599
|
}
|
|
600
|
-
},
|
|
600
|
+
}, pl = 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 && fl(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
|
+
}, ml = function(e) {
|
|
609
|
+
if (!_c) 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 = Qc(R ? R(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
|
+
}, hl = function(e) {
|
|
629
629
|
let t = null, r = null;
|
|
630
|
-
if (
|
|
630
|
+
if (Sc) 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 = V ?
|
|
637
|
-
if (
|
|
638
|
-
t = new l().parseFromString(i,
|
|
635
|
+
Xc === "application/xhtml+xml" && Vc === Bc && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
636
|
+
let i = V ? Vs(e) : e;
|
|
637
|
+
if (Vc === Bc) try {
|
|
638
|
+
t = new l().parseFromString(i, Xc);
|
|
639
639
|
} catch {}
|
|
640
640
|
if (!t || !t.documentElement) {
|
|
641
|
-
t =
|
|
641
|
+
t = Gs.createDocument(Vc, "template", null);
|
|
642
642
|
try {
|
|
643
|
-
t.documentElement.innerHTML =
|
|
643
|
+
t.documentElement.innerHTML = Hc ? Is : 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
|
-
}, ml = function(e) {
|
|
649
|
-
let t = B ? B(e) : e.ownerDocument;
|
|
650
|
-
return Ws.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
651
|
-
}, hl = function(e) {
|
|
652
|
-
return e = stringReplace(e, Js, " "), e = stringReplace(e, Ys, " "), e = stringReplace(e, Xs, " "), e;
|
|
647
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Vc === Bc ? Js.call(t, vc ? "html" : "body")[0] : vc ? t.documentElement : a;
|
|
653
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;
|
|
653
|
+
}, vl = function(e) {
|
|
654
654
|
e.normalize();
|
|
655
|
-
let t = B ? B(e) : e.ownerDocument, n =
|
|
656
|
-
for (; r;) r.data =
|
|
655
|
+
let t = B ? B(e) : e.ownerDocument, n = Ks.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 = _l(r.data), r = n.nextNode();
|
|
657
657
|
let i = e.querySelectorAll?.call(e, "template");
|
|
658
658
|
i && arrayForEach(i, (e) => {
|
|
659
|
-
|
|
659
|
+
bl(e.content) && vl(e.content);
|
|
660
660
|
});
|
|
661
|
-
},
|
|
661
|
+
}, yl = function(e) {
|
|
662
662
|
let t = R ? R(e) : null;
|
|
663
|
-
return typeof t != "string" ||
|
|
664
|
-
},
|
|
663
|
+
return typeof t != "string" || Qc(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== Fs(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
|
+
}, bl = 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
|
+
}, xl = 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 Sl(e, n, r) {
|
|
680
680
|
e.length !== 0 && arrayForEach(e, (e) => {
|
|
681
|
-
e.call(t, n, r,
|
|
681
|
+
e.call(t, n, r, $c);
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
|
-
let
|
|
685
|
-
return !!(
|
|
686
|
-
},
|
|
687
|
-
if (!
|
|
688
|
-
if (
|
|
684
|
+
let Cl = function(e, t) {
|
|
685
|
+
return !!(_c && e.hasChildNodes() && !xl(e.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, e.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, e.innerHTML) || _c && e.namespaceURI === Bc && t === "style" && xl(e.firstElementChild) || e.nodeType === NODE_TYPE.processingInstruction || _c && e.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, e.data));
|
|
686
|
+
}, wl = function(e, t, n) {
|
|
687
|
+
if (!lc[t] && kl(t) && (cc.tagNameCheck instanceof RegExp && regExpTest(cc.tagNameCheck, t) || cc.tagNameCheck instanceof Function && cc.tagNameCheck(t))) return !1;
|
|
688
|
+
if (kc && !Mc[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, Ns(e));
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
return
|
|
699
|
-
},
|
|
698
|
+
return ll(e), !0;
|
|
699
|
+
}, Tl = 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 (Y =
|
|
701
|
+
}, El = function(e, n) {
|
|
702
|
+
if (Sl(H.beforeSanitizeElements, e, null), e !== n && O(e) === null) return Ac && pl(e), !0;
|
|
703
|
+
if (yl(e)) return ll(e), !0;
|
|
704
|
+
let r = Qc(R ? R(e) : e.nodeName);
|
|
705
|
+
if (Y = Tl(H.uponSanitizeElement, Y, ac, bc), Sl(H.uponSanitizeElement, e, {
|
|
706
706
|
tagName: r,
|
|
707
707
|
allowedTags: Y
|
|
708
|
-
}), e !== n && O(e) === null) return
|
|
709
|
-
if (
|
|
710
|
-
if (
|
|
711
|
-
let t =
|
|
712
|
-
return t === !1 &&
|
|
708
|
+
}), e !== n && O(e) === null) return Ac && pl(e), !0;
|
|
709
|
+
if (Cl(e, r)) return ll(e), !0;
|
|
710
|
+
if (lc[r] || !(dc.tagCheck instanceof Function && dc.tagCheck(r)) && !Y[r]) {
|
|
711
|
+
let t = wl(e, r, n);
|
|
712
|
+
return t === !1 && Sl(H.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 && !cl(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(FALLBACK_TAG_CLOSE, e.innerHTML)) return ll(e), !0;
|
|
715
|
+
if (gc && e.nodeType === NODE_TYPE.text) {
|
|
716
|
+
let n = _l(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 Sl(H.afterSanitizeElements, e, null), !1;
|
|
720
|
+
}, Dl = function(e, t, r) {
|
|
721
|
+
if (uc[t] || _c && t === "patchsrc" || _c && t === "for" && e !== "label" && e !== "output" || Ec && (t === "id" || t === "name") && (r in n || r in el)) return !1;
|
|
722
|
+
let i = oc[t] || dc.attributeCheck instanceof Function && dc.attributeCheck(t, e);
|
|
723
|
+
if (!(pc && regExpTest($s, t)) && !(fc && regExpTest(ec, t))) {
|
|
724
724
|
if (i) {
|
|
725
|
-
if (!
|
|
726
|
-
} else if (!(
|
|
725
|
+
if (!Ic[t] && !regExpTest(ic, stringReplace(r, nc, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Pc[e]) && !(mc && !regExpTest(tc, stringReplace(r, nc, ""))) && r) return !1;
|
|
726
|
+
} else if (!(kl(e) && (cc.tagNameCheck instanceof RegExp && regExpTest(cc.tagNameCheck, e) || cc.tagNameCheck instanceof Function && cc.tagNameCheck(e)) && (cc.attributeNameCheck instanceof RegExp && regExpTest(cc.attributeNameCheck, t) || cc.attributeNameCheck instanceof Function && cc.attributeNameCheck(t, e)) || t === "is" && cc.allowCustomizedBuiltInElements && (cc.tagNameCheck instanceof RegExp && regExpTest(cc.tagNameCheck, r) || cc.tagNameCheck instanceof Function && cc.tagNameCheck(r)))) return !1;
|
|
727
727
|
}
|
|
728
728
|
return !0;
|
|
729
|
-
},
|
|
729
|
+
}, Ol = 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
|
-
},
|
|
738
|
+
]), kl = function(e) {
|
|
739
|
+
return !Ol[stringToLowerCase(e)] && regExpTest(rc, e);
|
|
740
|
+
}, Al = function(e, t, n, r) {
|
|
741
741
|
if (V && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
742
|
-
case "TrustedHTML": return
|
|
743
|
-
case "TrustedScriptURL": return
|
|
742
|
+
case "TrustedHTML": return Vs(r);
|
|
743
|
+
case "TrustedScriptURL": return Hs(r);
|
|
744
744
|
}
|
|
745
745
|
return r;
|
|
746
|
-
},
|
|
746
|
+
}, jl = 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), yl(e) ? ll(e) : arrayPop(t.removed);
|
|
749
749
|
} catch {
|
|
750
|
-
|
|
750
|
+
dl(n, e);
|
|
751
751
|
}
|
|
752
|
-
},
|
|
753
|
-
|
|
752
|
+
}, Ml = function(e) {
|
|
753
|
+
Sl(H.beforeSanitizeAttributes, e, null);
|
|
754
754
|
let t = e.attributes;
|
|
755
|
-
if (!t ||
|
|
756
|
-
|
|
755
|
+
if (!t || yl(e)) return;
|
|
756
|
+
oc = Tl(H.uponSanitizeAttribute, oc, sc, xc);
|
|
757
757
|
let n = {
|
|
758
758
|
attrName: "",
|
|
759
759
|
attrValue: "",
|
|
760
760
|
keepAttr: !0,
|
|
761
|
-
allowedAttributes:
|
|
761
|
+
allowedAttributes: oc,
|
|
762
762
|
forceKeepAttr: void 0
|
|
763
|
-
}, r = t.length, i =
|
|
763
|
+
}, r = t.length, i = Qc(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 = Qc(o), u = c, f = o === "value" ? u : stringTrim(u);
|
|
766
|
+
if (n.attrName = l, n.attrValue = f, n.keepAttr = !0, n.forceKeepAttr = void 0, Sl(H.uponSanitizeAttribute, e, n), f = n.attrValue, Dc && (l === "id" || l === "name") && stringIndexOf(f, Oc) !== 0 && (dl(o, e), f = Oc + f), _c && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
|
|
767
|
+
dl(o, e);
|
|
768
768
|
continue;
|
|
769
769
|
}
|
|
770
770
|
if (l === "attributename" && stringMatch(f, "href")) {
|
|
771
|
-
|
|
771
|
+
dl(o, e);
|
|
772
772
|
continue;
|
|
773
773
|
}
|
|
774
774
|
if (!n.forceKeepAttr) {
|
|
775
775
|
if (!n.keepAttr) {
|
|
776
|
-
|
|
776
|
+
dl(o, e);
|
|
777
777
|
continue;
|
|
778
778
|
}
|
|
779
|
-
if (!
|
|
780
|
-
|
|
779
|
+
if (!hc && regExpTest(SELF_CLOSING_TAG, f)) {
|
|
780
|
+
dl(o, e);
|
|
781
781
|
continue;
|
|
782
782
|
}
|
|
783
|
-
if (
|
|
784
|
-
|
|
783
|
+
if (gc && (f = _l(f)), !Dl(i, l, f)) {
|
|
784
|
+
dl(o, e);
|
|
785
785
|
continue;
|
|
786
786
|
}
|
|
787
|
-
f =
|
|
787
|
+
f = Al(i, l, s, f), f !== u && jl(e, o, s, f);
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
|
-
|
|
791
|
-
},
|
|
792
|
-
let t = null, n =
|
|
793
|
-
for (
|
|
794
|
-
let e =
|
|
795
|
-
|
|
790
|
+
Sl(H.afterSanitizeAttributes, e, null);
|
|
791
|
+
}, Nl = function(e) {
|
|
792
|
+
let t = null, n = gl(e);
|
|
793
|
+
for (Sl(H.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Sl(H.uponSanitizeShadowNode, t, null), El(t, e), Ml(t), bl(t.content) && Nl(t.content), (A ? A(t) : t.nodeType) === NODE_TYPE.element) {
|
|
794
|
+
let e = Ps(t);
|
|
795
|
+
bl(e) && (Pl(e), Nl(e));
|
|
796
796
|
}
|
|
797
|
-
|
|
798
|
-
},
|
|
797
|
+
Sl(H.afterSanitizeShadowDOM, e, null);
|
|
798
|
+
}, Pl = 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
|
+
Nl(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);
|
|
@@ -813,17 +813,17 @@ function createDOMPurify() {
|
|
|
813
813
|
});
|
|
814
814
|
if (r) {
|
|
815
815
|
let e = R ? R(n) : null;
|
|
816
|
-
if (typeof e == "string" &&
|
|
816
|
+
if (typeof e == "string" && Qc(e) === "template") {
|
|
817
817
|
let e = n.content;
|
|
818
|
-
|
|
818
|
+
bl(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 = Ps(n);
|
|
826
|
+
bl(e) && t.push({
|
|
827
827
|
node: null,
|
|
828
828
|
shadow: e
|
|
829
829
|
}, {
|
|
@@ -835,54 +835,54 @@ 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 (Hc = !e, Hc && (e = "<!-->"), typeof e != "string" && !xl(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
|
+
yc ? (Y = bc, oc = xc) : nl(n), (H.uponSanitizeElement.length > 0 || H.uponSanitizeAttribute.length > 0) && (Y = clone(Y)), H.uponSanitizeAttribute.length > 0 && (oc = clone(oc)), t.removed = [];
|
|
841
|
+
let c = Ac && typeof e != "string" && xl(e);
|
|
842
842
|
if (c) {
|
|
843
|
-
|
|
843
|
+
ml(e);
|
|
844
844
|
let t = R ? R(e) : e.nodeName;
|
|
845
845
|
if (typeof t == "string") {
|
|
846
|
-
let n =
|
|
847
|
-
if (!Y[n] ||
|
|
846
|
+
let n = Qc(t);
|
|
847
|
+
if (!Y[n] || lc[n]) throw ul(e), typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
848
848
|
}
|
|
849
|
-
if (
|
|
849
|
+
if (yl(e)) throw ul(e), typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
|
|
850
850
|
try {
|
|
851
|
-
|
|
851
|
+
Pl(e);
|
|
852
852
|
} catch (t) {
|
|
853
|
-
throw
|
|
853
|
+
throw ul(e), t;
|
|
854
854
|
}
|
|
855
|
-
} else if (
|
|
855
|
+
} else if (xl(e)) i = hl("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === NODE_TYPE.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Pl(a);
|
|
856
856
|
else {
|
|
857
|
-
if (!
|
|
858
|
-
if (i =
|
|
857
|
+
if (!Cc && !gc && !vc && e.indexOf("<") === -1) return V && Tc ? Vs(e) : e;
|
|
858
|
+
if (i = hl(e), !i) return Cc ? null : Tc ? Is : "";
|
|
859
859
|
}
|
|
860
|
-
i &&
|
|
860
|
+
i && Sc && ll(i.firstChild);
|
|
861
861
|
let l = c ? e : i;
|
|
862
862
|
try {
|
|
863
|
-
let e =
|
|
864
|
-
for (; o = e.nextNode();)
|
|
863
|
+
let e = gl(l);
|
|
864
|
+
for (; o = e.nextNode();) El(o, l), Ml(o), bl(o.content) && Nl(o.content);
|
|
865
865
|
} catch (n) {
|
|
866
|
-
throw c && (
|
|
867
|
-
e.element &&
|
|
866
|
+
throw c && (ul(e), arrayForEach(t.removed, (e) => {
|
|
867
|
+
e.element && pl(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 && pl(e.element);
|
|
872
|
+
}), gc && vl(e), e;
|
|
873
|
+
if (Cc) {
|
|
874
|
+
if (gc && vl(i), wc) for (s = qs.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
875
875
|
else s = i;
|
|
876
|
-
return (
|
|
876
|
+
return (oc.shadowroot || oc.shadowrootmode) && (s = Ys.call(r, s, !0)), s;
|
|
877
877
|
}
|
|
878
|
-
let u =
|
|
879
|
-
return
|
|
878
|
+
let u = vc ? i.outerHTML : i.innerHTML;
|
|
879
|
+
return vc && Y["!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), gc && (u = _l(u)), V && Tc ? Vs(u) : u;
|
|
880
880
|
}, t.setConfig = function() {
|
|
881
|
-
|
|
881
|
+
nl(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), yc = !0, bc = Y, xc = oc;
|
|
882
882
|
}, t.clearConfig = function() {
|
|
883
|
-
|
|
883
|
+
$c = null, yc = !1, bc = null, xc = null, V = Ls, Is = "";
|
|
884
884
|
}, t.isValidAttribute = function(e, t, n) {
|
|
885
|
-
return
|
|
885
|
+
return $c || nl({}), Dl(Qc(e), Qc(t), n);
|
|
886
886
|
}, t.addHook = function(e, t) {
|
|
887
887
|
typeof t == "function" && objectHasOwnProperty(H, e) && arrayPush(H[e], t);
|
|
888
888
|
}, t.removeHook = function(e, t) {
|
|
@@ -21598,12 +21598,12 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21598
21598
|
B,
|
|
21599
21599
|
g,
|
|
21600
21600
|
p
|
|
21601
|
-
]),
|
|
21602
|
-
if (!
|
|
21603
|
-
let e =
|
|
21601
|
+
]), Is = useRef(null), Ls = useRef(null), Rs = useRef(null), [zs, Bs] = useState(null), Vs = useCallback(() => {
|
|
21602
|
+
if (!Is.current || !Ls.current) return;
|
|
21603
|
+
let e = Is.current.getBoundingClientRect(), t = Ls.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(() => Bs({
|
|
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
|
-
B &&
|
|
21618
|
-
}, [B,
|
|
21617
|
+
B && Vs();
|
|
21618
|
+
}, [B, Vs]), useEffect(() => {
|
|
21619
21619
|
if (!B) return;
|
|
21620
|
-
let e = () =>
|
|
21620
|
+
let e = () => Vs();
|
|
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
|
-
}, [B,
|
|
21625
|
-
let
|
|
21626
|
-
|
|
21627
|
-
}, [V]),
|
|
21628
|
-
|
|
21624
|
+
}, [B, Vs]);
|
|
21625
|
+
let Hs = useCallback(() => {
|
|
21626
|
+
Rs.current &&= (clearTimeout(Rs.current), null), V(!0);
|
|
21627
|
+
}, [V]), Us = useCallback(() => {
|
|
21628
|
+
Rs.current = window.setTimeout(() => {
|
|
21629
21629
|
V(!1);
|
|
21630
21630
|
}, 120);
|
|
21631
21631
|
}, [V]);
|
|
21632
21632
|
return useEffect(() => {
|
|
21633
21633
|
function e(e) {
|
|
21634
21634
|
let t = e.target;
|
|
21635
|
-
|
|
21635
|
+
Is.current?.contains(t) || Ls.current?.contains(t) || V(!1);
|
|
21636
21636
|
}
|
|
21637
21637
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21638
21638
|
}, [V]), useEffect(() => () => {
|
|
21639
|
-
|
|
21639
|
+
Rs.current && clearTimeout(Rs.current);
|
|
21640
21640
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21641
21641
|
value: {
|
|
21642
21642
|
close: () => V(!1),
|
|
21643
|
-
open:
|
|
21643
|
+
open: Hs
|
|
21644
21644
|
},
|
|
21645
21645
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21646
|
-
ref:
|
|
21646
|
+
ref: Is,
|
|
21647
21647
|
className: "inline-flex",
|
|
21648
|
-
onMouseEnter: c ?
|
|
21649
|
-
onMouseLeave: c ?
|
|
21648
|
+
onMouseEnter: c ? Hs : void 0,
|
|
21649
|
+
onMouseLeave: c ? Us : void 0,
|
|
21650
21650
|
onClick: () => V(!B),
|
|
21651
21651
|
"aria-haspopup": "menu",
|
|
21652
21652
|
"aria-expanded": B,
|
|
21653
21653
|
children: e
|
|
21654
21654
|
}), B && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21655
|
-
ref:
|
|
21656
|
-
onMouseEnter: c ?
|
|
21657
|
-
onMouseLeave: c ?
|
|
21655
|
+
ref: Ls,
|
|
21656
|
+
onMouseEnter: c ? Hs : void 0,
|
|
21657
|
+
onMouseLeave: c ? Us : void 0,
|
|
21658
21658
|
style: {
|
|
21659
21659
|
position: "fixed",
|
|
21660
|
-
top:
|
|
21661
|
-
left:
|
|
21662
|
-
visibility:
|
|
21660
|
+
top: zs?.top ?? 0,
|
|
21661
|
+
left: zs?.left ?? 0,
|
|
21662
|
+
visibility: zs ? "visible" : "hidden",
|
|
21663
21663
|
zIndex: 1e3
|
|
21664
21664
|
},
|
|
21665
21665
|
children: t
|
|
@@ -23352,7 +23352,7 @@ 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, Fs = 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);
|
|
@@ -23371,7 +23371,7 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
|
|
|
23371
23371
|
return /* @__PURE__ */ jsx(Fragment$1, { children: i({
|
|
23372
23372
|
context: t,
|
|
23373
23373
|
currentStep: g,
|
|
23374
|
-
currentStepIndex:
|
|
23374
|
+
currentStepIndex: Fs,
|
|
23375
23375
|
dismissedStepIds: o,
|
|
23376
23376
|
actions: useMemo(() => ({
|
|
23377
23377
|
dismissCurrentStep: R,
|
|
@@ -23620,17 +23620,17 @@ function Toaster() {
|
|
|
23620
23620
|
B,
|
|
23621
23621
|
V
|
|
23622
23622
|
]);
|
|
23623
|
-
let
|
|
23623
|
+
let Is = 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]), Ls = useCallback((e) => {
|
|
23629
23629
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
23630
23630
|
}, []);
|
|
23631
23631
|
if (!R) return null;
|
|
23632
|
-
let
|
|
23633
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23632
|
+
let Rs = groupByPosition(n);
|
|
23633
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Rs).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: Is,
|
|
23643
|
+
onClose: Ls,
|
|
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: Is,
|
|
23652
|
+
onClose: Ls,
|
|
23653
23653
|
onHoverStart: u,
|
|
23654
23654
|
onHoverEnd: f
|
|
23655
23655
|
}, e.id));
|
|
@@ -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), [R, B] = useState(!1), [V,
|
|
24241
|
-
function
|
|
24242
|
-
c === void 0 &&
|
|
24240
|
+
}), A = useRef(null), [R, B] = useState(!1), [V, Is] = useState(!1), [Ls, Rs] = useState(l), [zs, Bs] = useState(null), Vs = c ?? Ls, Hs = s && (R || V || Vs), Us = typeof n == "number" && n > 0 && (o || a === "active");
|
|
24241
|
+
function Ws(e) {
|
|
24242
|
+
c === void 0 && Rs(e), u?.(e);
|
|
24243
24243
|
}
|
|
24244
24244
|
return useLayoutEffect(() => {
|
|
24245
|
-
if (!
|
|
24245
|
+
if (!Hs || !A.current) return;
|
|
24246
24246
|
function e() {
|
|
24247
24247
|
let e = A.current?.getBoundingClientRect();
|
|
24248
|
-
e &&
|
|
24248
|
+
e && Bs({
|
|
24249
24249
|
top: e.top - 8,
|
|
24250
24250
|
left: e.right - 12
|
|
24251
24251
|
});
|
|
@@ -24253,7 +24253,7 @@ 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
|
+
}, [Hs]), /* @__PURE__ */ jsxs(Button, {
|
|
24257
24257
|
...g,
|
|
24258
24258
|
className: cn(O.root(), p?.root),
|
|
24259
24259
|
onMouseEnter: () => B(!0),
|
|
@@ -24264,17 +24264,17 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
24264
24264
|
ref: A,
|
|
24265
24265
|
className: cn(O.bubble(), p?.bubble),
|
|
24266
24266
|
children: renderIcon(e, O.icon())
|
|
24267
|
-
}),
|
|
24268
|
-
isPressed:
|
|
24267
|
+
}), Hs && zs && typeof document < "u" && ToggleControlPortal({
|
|
24268
|
+
isPressed: Vs,
|
|
24269
24269
|
isPortalHovered: V,
|
|
24270
|
-
portalPosition:
|
|
24271
|
-
onMouseEnter: () =>
|
|
24272
|
-
onMouseLeave: () =>
|
|
24273
|
-
onToggle: () =>
|
|
24270
|
+
portalPosition: zs,
|
|
24271
|
+
onMouseEnter: () => Is(!0),
|
|
24272
|
+
onMouseLeave: () => Is(!1),
|
|
24273
|
+
onToggle: () => Ws(!Vs)
|
|
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 }), Us && /* @__PURE__ */ jsxs("span", {
|
|
24278
24278
|
"aria-label": `${n} items`,
|
|
24279
24279
|
className: cn(O.count(), p?.count),
|
|
24280
24280
|
children: [
|
|
@@ -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 Is = 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: [
|
|
@@ -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: Is.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,9 +24415,9 @@ 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), Ns = u, g = s;
|
|
24419
|
+
e === "range" && u && !f && s && !isDateBefore(s, u) ? (Ns = u, g = s) : (Ns = null, g = null);
|
|
24420
|
+
let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, Ns, g)), Fs = l || p || h;
|
|
24421
24421
|
return /* @__PURE__ */ jsx(Button, {
|
|
24422
24422
|
type: "button",
|
|
24423
24423
|
onClick: () => R(i),
|
|
@@ -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": Fs || 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", Fs && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", O && !Fs && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Fs && !O && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Fs && !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 Fs() {
|
|
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: Fs
|
|
24514
24514
|
}),
|
|
24515
24515
|
disabled: i,
|
|
24516
24516
|
children: /* @__PURE__ */ jsx(CalendarPanel, {
|
|
@@ -24724,7 +24724,7 @@ 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: Ns = {}, density: g = "normal", className: O, style: A, isPriority: R, isDone: B }) {
|
|
24728
24728
|
return /* @__PURE__ */ jsx(Card, {
|
|
24729
24729
|
as: Pressable,
|
|
24730
24730
|
onPress: u,
|
|
@@ -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: Ns,
|
|
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: Ns }),
|
|
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, Ns = 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(Ns) ? "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(Ns) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: Ns }),
|
|
25087
25087
|
f.onClick && /* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
25088
25088
|
active: f.active,
|
|
25089
25089
|
onClick: f.onClick
|
|
@@ -25355,9 +25355,9 @@ 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
|
+
})), Ns = /* @__PURE__ */ new Set(), g = new Set(c.reduce((e, t) => {
|
|
25359
25359
|
let n = t.insightBadgeId ?? t.id;
|
|
25360
|
-
return
|
|
25360
|
+
return Ns.has(n) || (Ns.add(n), e.push(t.id)), e;
|
|
25361
25361
|
}, [])), O = useRef(null), A = useRef(null), R = useRef(!1);
|
|
25362
25362
|
useEffect(() => {
|
|
25363
25363
|
if (e.length === 0 || R.current) return;
|
|
@@ -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: Ns, 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: Ns,
|
|
25501
25501
|
related: g
|
|
25502
25502
|
}),
|
|
25503
25503
|
/* @__PURE__ */ jsx("h2", {
|
|
@@ -25805,10 +25805,10 @@ var ABSENCE_BUBBLE_STYLES = {
|
|
|
25805
25805
|
border: "border-amber-200",
|
|
25806
25806
|
title: "text-amber-700"
|
|
25807
25807
|
},
|
|
25808
|
-
|
|
25809
|
-
bg: "bg-
|
|
25810
|
-
border: "border-
|
|
25811
|
-
title: "text-
|
|
25808
|
+
resolved: {
|
|
25809
|
+
bg: "bg-green-50",
|
|
25810
|
+
border: "border-green-200",
|
|
25811
|
+
title: "text-green-700"
|
|
25812
25812
|
}
|
|
25813
25813
|
};
|
|
25814
25814
|
function TimelineConnector({ isFirst: e, isLast: t, variant: n }) {
|
|
@@ -25902,7 +25902,7 @@ function TimelineItem({ item: e, isFirst: t, isLast: n, tone: r }) {
|
|
|
25902
25902
|
});
|
|
25903
25903
|
}
|
|
25904
25904
|
function EvidenceTimeline({ items: e, canExpandThread: t = !1, tone: n = "fire", threadTitle: r, clientCompany: i, contactName: a, teamCompanyName: o, recipientLabel: s, className: c, ...l }) {
|
|
25905
|
-
let [u, f] = useState(!
|
|
25905
|
+
let [u, f] = useState(!1), p = e.filter((e) => e.type === "source_message");
|
|
25906
25906
|
return /* @__PURE__ */ jsxs("div", {
|
|
25907
25907
|
className: cn("flex flex-col", c),
|
|
25908
25908
|
...l,
|
|
@@ -26293,10 +26293,10 @@ function OnboardingCard({ stepLabel: e, title: t, description: n, titleAccessory
|
|
|
26293
26293
|
children: [i, a]
|
|
26294
26294
|
})
|
|
26295
26295
|
]
|
|
26296
|
-
}),
|
|
26296
|
+
}), Ns = 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: [Ns, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, Ns] });
|
|
26300
26300
|
return o === "horizontal" ? /* @__PURE__ */ jsx("div", {
|
|
26301
26301
|
className: cn("flex items-center", u),
|
|
26302
26302
|
children: g
|
|
@@ -26712,7 +26712,7 @@ var SEVERITY_CONFIG$1 = {
|
|
|
26712
26712
|
base: "relative h-full w-full text-left transition-colors focus:outline-none",
|
|
26713
26713
|
variants: {
|
|
26714
26714
|
layout: {
|
|
26715
|
-
home: "rounded-lg border-[1.5px] p-4",
|
|
26715
|
+
home: "min-h-[96px] rounded-lg border-[1.5px] p-4",
|
|
26716
26716
|
row: "border-b border-l-[3px] px-4 py-3.5"
|
|
26717
26717
|
},
|
|
26718
26718
|
status: {
|
|
@@ -26766,7 +26766,7 @@ var SEVERITY_CONFIG$1 = {
|
|
|
26766
26766
|
layout: "row",
|
|
26767
26767
|
status: "needs_response",
|
|
26768
26768
|
selected: !1,
|
|
26769
|
-
class: "border-neutral-200 border-l-transparent hover:bg-neutral-50"
|
|
26769
|
+
class: "border-neutral-200 border-l-transparent bg-white-variant-8 hover:bg-neutral-50"
|
|
26770
26770
|
},
|
|
26771
26771
|
{
|
|
26772
26772
|
layout: "row",
|
|
@@ -26778,7 +26778,7 @@ var SEVERITY_CONFIG$1 = {
|
|
|
26778
26778
|
layout: "row",
|
|
26779
26779
|
status: "needs_review",
|
|
26780
26780
|
selected: !1,
|
|
26781
|
-
class: "border-neutral-200 border-l-transparent hover:bg-neutral-50"
|
|
26781
|
+
class: "border-neutral-200 border-l-transparent bg-white-variant-8 hover:bg-neutral-50"
|
|
26782
26782
|
},
|
|
26783
26783
|
{
|
|
26784
26784
|
layout: "row",
|
|
@@ -26790,7 +26790,7 @@ var SEVERITY_CONFIG$1 = {
|
|
|
26790
26790
|
layout: "row",
|
|
26791
26791
|
status: "resolved",
|
|
26792
26792
|
selected: !1,
|
|
26793
|
-
class: "border-neutral-200 border-l-transparent hover:bg-neutral-50"
|
|
26793
|
+
class: "border-neutral-200 border-l-transparent bg-white-variant-8 hover:bg-neutral-50"
|
|
26794
26794
|
},
|
|
26795
26795
|
{
|
|
26796
26796
|
layout: "row",
|
|
@@ -26800,51 +26800,91 @@ var SEVERITY_CONFIG$1 = {
|
|
|
26800
26800
|
}
|
|
26801
26801
|
]
|
|
26802
26802
|
});
|
|
26803
|
-
function
|
|
26803
|
+
function OpenThreadIcon() {
|
|
26804
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
26805
|
+
width: "12",
|
|
26806
|
+
height: "12",
|
|
26807
|
+
viewBox: "0 0 24 24",
|
|
26808
|
+
fill: "none",
|
|
26809
|
+
stroke: "currentColor",
|
|
26810
|
+
strokeWidth: "2",
|
|
26811
|
+
strokeLinecap: "round",
|
|
26812
|
+
strokeLinejoin: "round",
|
|
26813
|
+
children: [
|
|
26814
|
+
/* @__PURE__ */ jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
26815
|
+
/* @__PURE__ */ jsx("polyline", { points: "15 3 21 3 21 9" }),
|
|
26816
|
+
/* @__PURE__ */ jsx("line", {
|
|
26817
|
+
x1: "10",
|
|
26818
|
+
y1: "14",
|
|
26819
|
+
x2: "21",
|
|
26820
|
+
y2: "3"
|
|
26821
|
+
})
|
|
26822
|
+
]
|
|
26823
|
+
});
|
|
26824
|
+
}
|
|
26825
|
+
function SourceIcons({ sourceTypes: e, sourceLink: t }) {
|
|
26804
26826
|
return /* @__PURE__ */ jsxs("span", {
|
|
26805
|
-
className: "absolute top-
|
|
26806
|
-
children: [
|
|
26827
|
+
className: "absolute top-[10px] right-3 flex items-center gap-1.5",
|
|
26828
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
26829
|
+
className: "flex items-center gap-1",
|
|
26830
|
+
children: [e.includes("gmail") && /* @__PURE__ */ jsx(GmailIcon, { size: 16 }), e.includes("slack") && /* @__PURE__ */ jsx(SlackIcon, { size: 18 })]
|
|
26831
|
+
}), t && /* @__PURE__ */ jsx(InfoTooltip, {
|
|
26832
|
+
content: "Open thread",
|
|
26833
|
+
position: "top",
|
|
26834
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
26835
|
+
href: t,
|
|
26836
|
+
target: "_blank",
|
|
26837
|
+
rel: "noopener noreferrer",
|
|
26838
|
+
"aria-label": "Open thread",
|
|
26839
|
+
onClick: (e) => e.stopPropagation(),
|
|
26840
|
+
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
|
+
children: /* @__PURE__ */ jsx(OpenThreadIcon, {})
|
|
26842
|
+
})
|
|
26843
|
+
})]
|
|
26807
26844
|
});
|
|
26808
26845
|
}
|
|
26809
|
-
function SignalCard({ title: e, clientName: t, requesterName: n, explanation: r, severity: i, status: a, slaLabel: o, slaStatusLabel: s, sourceTypes: c,
|
|
26810
|
-
let
|
|
26846
|
+
function SignalCard({ title: e, clientName: t, requesterName: n, explanation: r, severity: i, status: a, slaLabel: o, slaStatusLabel: s, sourceTypes: c, sourceLink: l, patternContext: u, variant: f = "home", selected: p = !1, onClick: h, className: Ns }) {
|
|
26847
|
+
let g = SEVERITY_CONFIG$1[i];
|
|
26811
26848
|
return /* @__PURE__ */ jsxs(Pressable, {
|
|
26812
|
-
onPress:
|
|
26849
|
+
onPress: h,
|
|
26813
26850
|
className: cn(signalCardStyles({
|
|
26814
|
-
layout:
|
|
26851
|
+
layout: f,
|
|
26815
26852
|
status: a,
|
|
26816
|
-
selected:
|
|
26817
|
-
}),
|
|
26853
|
+
selected: p
|
|
26854
|
+
}), Ns),
|
|
26818
26855
|
children: [
|
|
26819
|
-
/* @__PURE__ */ jsx(SourceIcons, {
|
|
26856
|
+
/* @__PURE__ */ jsx(SourceIcons, {
|
|
26857
|
+
sourceTypes: c,
|
|
26858
|
+
sourceLink: l
|
|
26859
|
+
}),
|
|
26820
26860
|
/* @__PURE__ */ jsxs("div", {
|
|
26821
26861
|
className: "mb-1 flex items-center gap-1.5 pr-10",
|
|
26822
|
-
children: [/* @__PURE__ */ jsx(
|
|
26823
|
-
|
|
26824
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
26825
|
-
className: cn("shrink-0", js.text),
|
|
26826
|
-
children: /* @__PURE__ */ jsx(js.icon, { size: 16 })
|
|
26827
|
-
})
|
|
26828
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
26829
|
-
className: cn("text-[12px] font-semibold", js.text),
|
|
26862
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
26863
|
+
className: cn("text-[13px] font-bold", g.text),
|
|
26830
26864
|
children: o
|
|
26865
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
26866
|
+
className: "inline-flex items-center gap-0.5 text-[10px] font-medium text-neutral-500",
|
|
26867
|
+
children: [/* @__PURE__ */ jsx(g.icon, {
|
|
26868
|
+
size: 10,
|
|
26869
|
+
className: g.text
|
|
26870
|
+
}), s]
|
|
26831
26871
|
})]
|
|
26832
26872
|
}),
|
|
26833
26873
|
/* @__PURE__ */ jsx("p", {
|
|
26834
26874
|
className: "mb-1 line-clamp-1 pr-10 text-[13px] leading-snug font-semibold text-neutral-900",
|
|
26835
|
-
children: e
|
|
26875
|
+
children: e || "Message needs review"
|
|
26836
26876
|
}),
|
|
26837
26877
|
r && /* @__PURE__ */ jsx("p", {
|
|
26838
26878
|
className: "mb-1 line-clamp-1 pr-10 text-[11px] leading-snug text-neutral-700-variant-1",
|
|
26839
26879
|
children: r
|
|
26840
26880
|
}),
|
|
26841
|
-
|
|
26881
|
+
/* @__PURE__ */ jsx("p", {
|
|
26842
26882
|
className: "line-clamp-1 pr-10 text-[11px] font-medium text-neutral-700-variant-1",
|
|
26843
|
-
children: [t, n].filter(Boolean).join(" · ")
|
|
26883
|
+
children: [t, n].filter(Boolean).join(" · ") || "Client contact"
|
|
26844
26884
|
}),
|
|
26845
|
-
|
|
26885
|
+
u && /* @__PURE__ */ jsx("p", {
|
|
26846
26886
|
className: "mt-1 pr-10 text-[10px] font-medium text-primary-500",
|
|
26847
|
-
children:
|
|
26887
|
+
children: u
|
|
26848
26888
|
})
|
|
26849
26889
|
]
|
|
26850
26890
|
});
|
|
@@ -26981,18 +27021,15 @@ function SlaProgressBar({ policyLabel: e, statusLabel: t, status: n, actualLabel
|
|
|
26981
27021
|
var SEVERITY_CONFIG = {
|
|
26982
27022
|
fire: {
|
|
26983
27023
|
icon: FireFillIcon,
|
|
26984
|
-
text: "text-tertiary-500-variant-2"
|
|
26985
|
-
label: "Fire"
|
|
27024
|
+
text: "text-tertiary-500-variant-2"
|
|
26986
27025
|
},
|
|
26987
27026
|
spark: {
|
|
26988
27027
|
icon: InsightFillIcon,
|
|
26989
|
-
text: "text-primary-500"
|
|
26990
|
-
label: "Spark"
|
|
27028
|
+
text: "text-primary-500"
|
|
26991
27029
|
},
|
|
26992
27030
|
watching: {
|
|
26993
27031
|
icon: void 0,
|
|
26994
|
-
text: "text-neutral-700-variant-1"
|
|
26995
|
-
label: "Watching"
|
|
27032
|
+
text: "text-neutral-700-variant-1"
|
|
26996
27033
|
}
|
|
26997
27034
|
}, STATUS_BADGE_STYLES = {
|
|
26998
27035
|
fire: {
|
|
@@ -27005,10 +27042,10 @@ var SEVERITY_CONFIG = {
|
|
|
27005
27042
|
dot: "bg-amber-400",
|
|
27006
27043
|
accentBar: "border-l-[3px] border-l-amber-400"
|
|
27007
27044
|
},
|
|
27008
|
-
|
|
27009
|
-
badge: "bg-
|
|
27010
|
-
dot: "bg-
|
|
27011
|
-
accentBar: "border-l-[3px] border-l-
|
|
27045
|
+
resolved: {
|
|
27046
|
+
badge: "bg-green-50 text-green-700 border-green-200",
|
|
27047
|
+
dot: "bg-green-500",
|
|
27048
|
+
accentBar: "border-l-[3px] border-l-green-500"
|
|
27012
27049
|
}
|
|
27013
27050
|
};
|
|
27014
27051
|
function SectionCard({ title: e, titleAdornment: t, children: n }) {
|
|
@@ -27091,6 +27128,19 @@ function CopyActionIcon() {
|
|
|
27091
27128
|
}), /* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })]
|
|
27092
27129
|
});
|
|
27093
27130
|
}
|
|
27131
|
+
function ChevronIcon({ expanded: e }) {
|
|
27132
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
27133
|
+
width: "11",
|
|
27134
|
+
height: "11",
|
|
27135
|
+
viewBox: "0 0 24 24",
|
|
27136
|
+
fill: "none",
|
|
27137
|
+
stroke: "currentColor",
|
|
27138
|
+
strokeWidth: "2",
|
|
27139
|
+
strokeLinecap: "round",
|
|
27140
|
+
strokeLinejoin: "round",
|
|
27141
|
+
children: e ? /* @__PURE__ */ jsx("polyline", { points: "18 15 12 9 6 15" }) : /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
27142
|
+
});
|
|
27143
|
+
}
|
|
27094
27144
|
function GuardrailTooltip({ text: e }) {
|
|
27095
27145
|
return /* @__PURE__ */ jsx(InfoTooltip, {
|
|
27096
27146
|
content: e,
|
|
@@ -27107,22 +27157,23 @@ function GuardrailTooltip({ text: e }) {
|
|
|
27107
27157
|
})
|
|
27108
27158
|
});
|
|
27109
27159
|
}
|
|
27110
|
-
function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n,
|
|
27111
|
-
let
|
|
27112
|
-
let t = [
|
|
27160
|
+
function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, slaStatusLabel: r, statusLabel: i, statusTone: a, sourceType: o, sourceLink: s, clientCompany: c, contactName: l, teamCompanyName: u, recipientLabel: f, sla: p, claim: h, sameThreadGuardrail: g, evidenceItems: O, nextStep: A, actionRationale: R, rankingRationale: B, attentionRationale: V, dismissOptions: Is, onClose: Ls, onResolve: Rs, onDismiss: zs, className: Bs, ...Vs }) {
|
|
27161
|
+
let Hs = SEVERITY_CONFIG[t], [Us, Ws] = useState(!1), [Gs, Ks] = useState(null), [qs, Js] = useState(!1), [Ys, H] = useState(!1), Zs = () => {
|
|
27162
|
+
let t = [r, n].filter(Boolean).join(" · "), i = [
|
|
27113
27163
|
e,
|
|
27114
27164
|
"",
|
|
27115
|
-
|
|
27165
|
+
h,
|
|
27116
27166
|
"",
|
|
27117
|
-
|
|
27167
|
+
g,
|
|
27168
|
+
...t ? ["", t] : []
|
|
27118
27169
|
];
|
|
27119
|
-
navigator.clipboard.writeText(
|
|
27120
|
-
},
|
|
27121
|
-
|
|
27170
|
+
navigator.clipboard.writeText(i.join("\n")).catch(() => {}), Js(!0), setTimeout(() => Js(!1), 2e3);
|
|
27171
|
+
}, Qs = () => {
|
|
27172
|
+
zs?.(Gs ?? void 0), Ws(!1), Ks(null);
|
|
27122
27173
|
};
|
|
27123
27174
|
return /* @__PURE__ */ jsxs("div", {
|
|
27124
|
-
className: cn("flex h-full flex-col overflow-y-auto bg-white-variant-8", STATUS_BADGE_STYLES[
|
|
27125
|
-
...
|
|
27175
|
+
className: cn("flex h-full flex-col overflow-y-auto bg-white-variant-8", STATUS_BADGE_STYLES[a].accentBar, Bs),
|
|
27176
|
+
...Vs,
|
|
27126
27177
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
27127
27178
|
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",
|
|
27128
27179
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -27134,22 +27185,25 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27134
27185
|
className: "truncate text-[15px] leading-snug font-semibold text-neutral-900",
|
|
27135
27186
|
children: e
|
|
27136
27187
|
}),
|
|
27137
|
-
/* @__PURE__ */
|
|
27138
|
-
className: cn("
|
|
27139
|
-
children:
|
|
27140
|
-
|
|
27141
|
-
|
|
27142
|
-
|
|
27143
|
-
|
|
27188
|
+
n && /* @__PURE__ */ jsx("span", {
|
|
27189
|
+
className: cn("text-[13px] font-bold shrink-0", Hs.text),
|
|
27190
|
+
children: n
|
|
27191
|
+
}),
|
|
27192
|
+
r && /* @__PURE__ */ jsxs("span", {
|
|
27193
|
+
className: "inline-flex shrink-0 items-center gap-1 text-[10px] font-medium text-neutral-500",
|
|
27194
|
+
children: [Hs.icon && /* @__PURE__ */ jsx(Hs.icon, {
|
|
27195
|
+
size: 11,
|
|
27196
|
+
className: "text-neutral-500"
|
|
27197
|
+
}), r]
|
|
27144
27198
|
}),
|
|
27145
27199
|
/* @__PURE__ */ jsxs("span", {
|
|
27146
|
-
className: cn("inline-flex shrink-0 items-center gap-1.5 rounded-full border px-2 py-0.5 text-[11px] font-medium", STATUS_BADGE_STYLES[
|
|
27147
|
-
children: [/* @__PURE__ */ jsx("span", { className: cn("h-1.5 w-1.5 shrink-0 rounded-full", STATUS_BADGE_STYLES[
|
|
27200
|
+
className: cn("inline-flex shrink-0 items-center gap-1.5 rounded-full border px-2 py-0.5 text-[11px] font-medium", STATUS_BADGE_STYLES[a].badge),
|
|
27201
|
+
children: [/* @__PURE__ */ jsx("span", { className: cn("h-1.5 w-1.5 shrink-0 rounded-full", STATUS_BADGE_STYLES[a].dot) }), i]
|
|
27148
27202
|
})
|
|
27149
27203
|
]
|
|
27150
|
-
}),
|
|
27204
|
+
}), Ls && /* @__PURE__ */ jsx("button", {
|
|
27151
27205
|
type: "button",
|
|
27152
|
-
onClick:
|
|
27206
|
+
onClick: Ls,
|
|
27153
27207
|
"aria-label": "Close",
|
|
27154
27208
|
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-lg hover:bg-neutral-100",
|
|
27155
27209
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -27165,9 +27219,9 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27165
27219
|
})
|
|
27166
27220
|
})
|
|
27167
27221
|
})]
|
|
27168
|
-
}),
|
|
27222
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
27169
27223
|
className: "mt-2 flex flex-col gap-1.5 rounded-lg border border-neutral-200-variant-1 bg-neutral-50 px-3 py-2.5",
|
|
27170
|
-
children: [
|
|
27224
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
27171
27225
|
className: "flex items-center gap-2 min-w-0",
|
|
27172
27226
|
children: [
|
|
27173
27227
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -27176,19 +27230,19 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27176
27230
|
}),
|
|
27177
27231
|
/* @__PURE__ */ jsx("span", {
|
|
27178
27232
|
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",
|
|
27179
|
-
children:
|
|
27233
|
+
children: (l || "Client contact").charAt(0).toUpperCase()
|
|
27180
27234
|
}),
|
|
27181
27235
|
/* @__PURE__ */ jsx("span", {
|
|
27182
27236
|
className: "truncate text-[12px] font-semibold text-neutral-900",
|
|
27183
|
-
children:
|
|
27237
|
+
children: l || "Client contact"
|
|
27184
27238
|
}),
|
|
27185
|
-
|
|
27239
|
+
c && /* @__PURE__ */ jsx("span", {
|
|
27186
27240
|
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",
|
|
27187
|
-
children:
|
|
27241
|
+
children: c
|
|
27188
27242
|
}),
|
|
27189
27243
|
/* @__PURE__ */ jsx(RoleBadge, { role: "client" })
|
|
27190
27244
|
]
|
|
27191
|
-
}), (
|
|
27245
|
+
}), (u || f) && /* @__PURE__ */ jsxs("div", {
|
|
27192
27246
|
className: "flex items-center gap-2 min-w-0",
|
|
27193
27247
|
children: [
|
|
27194
27248
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -27197,15 +27251,15 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27197
27251
|
}),
|
|
27198
27252
|
/* @__PURE__ */ jsx("span", {
|
|
27199
27253
|
className: "flex h-[18px] w-[18px] shrink-0 items-center justify-center",
|
|
27200
|
-
children: jsx(
|
|
27254
|
+
children: jsx(o === "gmail" ? GmailIcon : SlackIcon, { size: 15 })
|
|
27201
27255
|
}),
|
|
27202
|
-
|
|
27256
|
+
u && /* @__PURE__ */ jsx("span", {
|
|
27203
27257
|
className: "truncate text-[12px] font-semibold text-neutral-900",
|
|
27204
|
-
children:
|
|
27258
|
+
children: u
|
|
27205
27259
|
}),
|
|
27206
|
-
|
|
27260
|
+
f && /* @__PURE__ */ jsx("span", {
|
|
27207
27261
|
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",
|
|
27208
|
-
children:
|
|
27262
|
+
children: f
|
|
27209
27263
|
}),
|
|
27210
27264
|
/* @__PURE__ */ jsx(RoleBadge, { role: "team" })
|
|
27211
27265
|
]
|
|
@@ -27214,63 +27268,59 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27214
27268
|
}), /* @__PURE__ */ jsxs("div", {
|
|
27215
27269
|
className: "flex flex-col gap-3 p-4",
|
|
27216
27270
|
children: [
|
|
27217
|
-
|
|
27271
|
+
p ? /* @__PURE__ */ jsxs("div", {
|
|
27218
27272
|
className: "grid grid-cols-1 items-stretch gap-3 xl:grid-cols-2",
|
|
27219
27273
|
children: [/* @__PURE__ */ jsx("div", {
|
|
27220
27274
|
className: "rounded-xl border border-neutral-200-variant-1 bg-white-variant-8 px-4 py-3.5",
|
|
27221
|
-
children: /* @__PURE__ */ jsx(SlaProgressBar, { ...
|
|
27275
|
+
children: /* @__PURE__ */ jsx(SlaProgressBar, { ...p })
|
|
27222
27276
|
}), /* @__PURE__ */ jsx(SectionCard, {
|
|
27223
27277
|
title: "What QTalo found",
|
|
27224
|
-
titleAdornment: /* @__PURE__ */ jsx(GuardrailTooltip, { text:
|
|
27278
|
+
titleAdornment: /* @__PURE__ */ jsx(GuardrailTooltip, { text: g }),
|
|
27225
27279
|
children: /* @__PURE__ */ jsx("p", {
|
|
27226
27280
|
className: "text-sm leading-snug text-neutral-800",
|
|
27227
|
-
children:
|
|
27281
|
+
children: h
|
|
27228
27282
|
})
|
|
27229
27283
|
})]
|
|
27230
27284
|
}) : /* @__PURE__ */ jsx(SectionCard, {
|
|
27231
27285
|
title: "What QTalo found",
|
|
27232
|
-
titleAdornment: /* @__PURE__ */ jsx(GuardrailTooltip, { text:
|
|
27286
|
+
titleAdornment: /* @__PURE__ */ jsx(GuardrailTooltip, { text: g }),
|
|
27233
27287
|
children: /* @__PURE__ */ jsx("p", {
|
|
27234
27288
|
className: "text-sm leading-snug text-neutral-800",
|
|
27235
|
-
children:
|
|
27236
|
-
})
|
|
27237
|
-
}),
|
|
27238
|
-
/* @__PURE__ */ jsx(SectionCard, {
|
|
27239
|
-
title: "Evidence analysis",
|
|
27240
|
-
children: /* @__PURE__ */ jsx(EvidenceTimeline, {
|
|
27241
|
-
items: g,
|
|
27242
|
-
canExpandThread: !0,
|
|
27243
|
-
tone: i,
|
|
27244
|
-
threadTitle: e,
|
|
27245
|
-
clientCompany: s,
|
|
27246
|
-
contactName: c,
|
|
27247
|
-
teamCompanyName: l,
|
|
27248
|
-
recipientLabel: u
|
|
27289
|
+
children: h
|
|
27249
27290
|
})
|
|
27250
27291
|
}),
|
|
27251
|
-
|
|
27292
|
+
A && /* @__PURE__ */ jsxs(SectionCard, {
|
|
27252
27293
|
title: "Next step",
|
|
27253
27294
|
children: [/* @__PURE__ */ jsx("p", {
|
|
27254
27295
|
className: "text-sm font-semibold text-neutral-900",
|
|
27255
|
-
children: O
|
|
27256
|
-
}), A && /* @__PURE__ */ jsx("p", {
|
|
27257
|
-
className: "mt-1 text-sm text-neutral-700",
|
|
27258
27296
|
children: A
|
|
27297
|
+
}), R && /* @__PURE__ */ jsx("p", {
|
|
27298
|
+
className: "mt-1 text-sm text-neutral-700",
|
|
27299
|
+
children: R
|
|
27259
27300
|
})]
|
|
27260
27301
|
}),
|
|
27261
|
-
|
|
27302
|
+
B ? /* @__PURE__ */ jsxs("div", {
|
|
27262
27303
|
className: "rounded-xl border border-neutral-200-variant-1 bg-neutral-50 px-4 py-3.5",
|
|
27263
27304
|
children: [/* @__PURE__ */ jsx("p", {
|
|
27264
27305
|
className: "mb-2 text-[10px] font-bold tracking-widest text-neutral-900 uppercase",
|
|
27265
27306
|
children: "Why ranked first"
|
|
27266
27307
|
}), /* @__PURE__ */ jsx("p", {
|
|
27267
27308
|
className: "text-sm text-neutral-800",
|
|
27268
|
-
children:
|
|
27309
|
+
children: B
|
|
27269
27310
|
})]
|
|
27270
|
-
}),
|
|
27311
|
+
}) : V ? /* @__PURE__ */ jsxs("div", {
|
|
27312
|
+
className: "rounded-xl border border-neutral-200-variant-1 bg-neutral-50 px-4 py-3.5",
|
|
27313
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
27314
|
+
className: "mb-2 text-[10px] font-bold tracking-widest text-neutral-900 uppercase",
|
|
27315
|
+
children: "Why this needs attention"
|
|
27316
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
27317
|
+
className: "text-sm text-neutral-800",
|
|
27318
|
+
children: V
|
|
27319
|
+
})]
|
|
27320
|
+
}) : null,
|
|
27271
27321
|
/* @__PURE__ */ jsx(SectionCard, {
|
|
27272
27322
|
title: "What do you want to do?",
|
|
27273
|
-
children:
|
|
27323
|
+
children: Us ? /* @__PURE__ */ jsxs("div", {
|
|
27274
27324
|
className: "flex flex-col gap-2",
|
|
27275
27325
|
children: [
|
|
27276
27326
|
/* @__PURE__ */ jsx("p", {
|
|
@@ -27279,10 +27329,10 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27279
27329
|
}),
|
|
27280
27330
|
/* @__PURE__ */ jsx("div", {
|
|
27281
27331
|
className: "flex flex-wrap gap-1.5",
|
|
27282
|
-
children:
|
|
27332
|
+
children: Is.map((e) => /* @__PURE__ */ jsx("button", {
|
|
27283
27333
|
type: "button",
|
|
27284
|
-
onClick: () =>
|
|
27285
|
-
className:
|
|
27334
|
+
onClick: () => Ks((t) => t === e.id ? null : e.id),
|
|
27335
|
+
className: Gs === 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",
|
|
27286
27336
|
children: e.label
|
|
27287
27337
|
}, e.id))
|
|
27288
27338
|
}),
|
|
@@ -27291,21 +27341,21 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27291
27341
|
children: [
|
|
27292
27342
|
/* @__PURE__ */ jsx("button", {
|
|
27293
27343
|
type: "button",
|
|
27294
|
-
onClick:
|
|
27344
|
+
onClick: Qs,
|
|
27295
27345
|
className: "rounded-lg bg-neutral-800 px-3 py-1.5 text-xs font-semibold text-white",
|
|
27296
27346
|
children: "Confirm"
|
|
27297
27347
|
}),
|
|
27298
27348
|
/* @__PURE__ */ jsx("button", {
|
|
27299
27349
|
type: "button",
|
|
27300
27350
|
onClick: () => {
|
|
27301
|
-
|
|
27351
|
+
Ws(!1), Ks(null);
|
|
27302
27352
|
},
|
|
27303
27353
|
className: "text-xs font-medium text-neutral-700-variant-1 hover:underline",
|
|
27304
27354
|
children: "Cancel"
|
|
27305
27355
|
}),
|
|
27306
27356
|
/* @__PURE__ */ jsx("button", {
|
|
27307
27357
|
type: "button",
|
|
27308
|
-
onClick:
|
|
27358
|
+
onClick: Rs,
|
|
27309
27359
|
className: "ml-auto text-xs font-medium text-primary-500 hover:underline",
|
|
27310
27360
|
children: "Mark handled instead"
|
|
27311
27361
|
})
|
|
@@ -27315,8 +27365,8 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27315
27365
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
27316
27366
|
className: "flex flex-wrap items-center gap-2",
|
|
27317
27367
|
children: [
|
|
27318
|
-
|
|
27319
|
-
href:
|
|
27368
|
+
s && /* @__PURE__ */ jsxs("a", {
|
|
27369
|
+
href: s,
|
|
27320
27370
|
target: "_blank",
|
|
27321
27371
|
rel: "noopener noreferrer",
|
|
27322
27372
|
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",
|
|
@@ -27324,24 +27374,52 @@ function SignalDetailPanel({ title: e, severity: t, slaDurationLabel: n, statusL
|
|
|
27324
27374
|
}),
|
|
27325
27375
|
/* @__PURE__ */ jsxs("button", {
|
|
27326
27376
|
type: "button",
|
|
27327
|
-
onClick:
|
|
27377
|
+
onClick: Rs,
|
|
27328
27378
|
className: "inline-flex items-center 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",
|
|
27329
27379
|
children: [/* @__PURE__ */ jsx(CheckActionIcon, {}), "Mark handled"]
|
|
27330
27380
|
}),
|
|
27331
27381
|
/* @__PURE__ */ jsxs("button", {
|
|
27332
27382
|
type: "button",
|
|
27333
|
-
onClick: () =>
|
|
27383
|
+
onClick: () => Ws(!0),
|
|
27334
27384
|
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",
|
|
27335
27385
|
children: [/* @__PURE__ */ jsx(DismissActionIcon, {}), "Mark not useful"]
|
|
27336
27386
|
}),
|
|
27337
27387
|
/* @__PURE__ */ jsxs("button", {
|
|
27338
27388
|
type: "button",
|
|
27339
|
-
onClick:
|
|
27340
|
-
className:
|
|
27341
|
-
children: [jsx(
|
|
27389
|
+
onClick: Zs,
|
|
27390
|
+
className: qs ? "inline-flex items-center 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" : "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",
|
|
27391
|
+
children: [jsx(qs ? CheckActionIcon : CopyActionIcon, {}), qs ? "Copied" : "Copy evidence"]
|
|
27342
27392
|
})
|
|
27343
27393
|
]
|
|
27344
27394
|
})
|
|
27395
|
+
}),
|
|
27396
|
+
/* @__PURE__ */ jsxs("div", {
|
|
27397
|
+
className: "rounded-xl border border-neutral-200-variant-1 bg-white-variant-8 px-4 py-3.5",
|
|
27398
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
27399
|
+
type: "button",
|
|
27400
|
+
onClick: () => H((e) => !e),
|
|
27401
|
+
className: "flex w-full items-center justify-between text-left",
|
|
27402
|
+
"aria-expanded": Ys,
|
|
27403
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
27404
|
+
className: "text-[10px] font-bold tracking-widest text-neutral-900 uppercase",
|
|
27405
|
+
children: "Evidence analysis"
|
|
27406
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
27407
|
+
className: "inline-flex items-center gap-1 text-xs font-medium text-neutral-700-variant-1",
|
|
27408
|
+
children: [Ys ? "Hide proof" : "Show proof", /* @__PURE__ */ jsx(ChevronIcon, { expanded: Ys })]
|
|
27409
|
+
})]
|
|
27410
|
+
}), Ys && /* @__PURE__ */ jsx("div", {
|
|
27411
|
+
className: "mt-3 border-t border-neutral-200-variant-1 pt-3",
|
|
27412
|
+
children: /* @__PURE__ */ jsx(EvidenceTimeline, {
|
|
27413
|
+
items: O,
|
|
27414
|
+
canExpandThread: !0,
|
|
27415
|
+
tone: a,
|
|
27416
|
+
threadTitle: e,
|
|
27417
|
+
clientCompany: c,
|
|
27418
|
+
contactName: l,
|
|
27419
|
+
teamCompanyName: u,
|
|
27420
|
+
recipientLabel: f
|
|
27421
|
+
})
|
|
27422
|
+
})]
|
|
27345
27423
|
})
|
|
27346
27424
|
]
|
|
27347
27425
|
})]
|