@qtalo/qt-ui-library 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -326,20 +326,20 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
326
326
  function createDOMPurify() {
327
327
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
328
328
  if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
329
- let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: ao } = e, h = c.prototype, g = lookupGetter(h, "cloneNode"), oo = lookupGetter(h, "remove"), so = lookupGetter(h, "nextSibling"), O = lookupGetter(h, "childNodes"), co = lookupGetter(h, "parentNode");
329
+ let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: lo } = e, h = c.prototype, g = lookupGetter(h, "cloneNode"), uo = lookupGetter(h, "remove"), fo = lookupGetter(h, "nextSibling"), O = lookupGetter(h, "childNodes"), A = lookupGetter(h, "parentNode");
330
330
  if (typeof o == "function") {
331
331
  let e = n.createElement("template");
332
332
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
333
333
  }
334
- let A, lo = "", { implementation: uo, createNodeIterator: fo, createDocumentFragment: po, getElementsByTagName: mo } = n, { importNode: ho } = r, R = _createHooksMap();
335
- t.isSupported = typeof entries == "function" && typeof co == "function" && uo && uo.createHTMLDocument !== void 0;
336
- let { MUSTACHE_EXPR: go, ERB_EXPR: _o, TMPLIT_EXPR: vo, DATA_ATTR: yo, ARIA_ATTR: bo, IS_SCRIPT_OR_DATA: xo, ATTR_WHITESPACE: So, CUSTOM_ELEMENT: Co } = EXPRESSIONS, { IS_ALLOWED_URI: wo } = EXPRESSIONS, B = null, To = addToSet({}, [
334
+ let R, po = "", { implementation: mo, createNodeIterator: ho, createDocumentFragment: go, getElementsByTagName: _o } = n, { importNode: vo } = r, yo = _createHooksMap();
335
+ t.isSupported = typeof entries == "function" && typeof A == "function" && mo && mo.createHTMLDocument !== void 0;
336
+ let { MUSTACHE_EXPR: bo, ERB_EXPR: xo, TMPLIT_EXPR: So, DATA_ATTR: Co, ARIA_ATTR: wo, IS_SCRIPT_OR_DATA: To, ATTR_WHITESPACE: Eo, CUSTOM_ELEMENT: Do } = EXPRESSIONS, { IS_ALLOWED_URI: Oo } = EXPRESSIONS, B = null, ko = addToSet({}, [
337
337
  ...html$1,
338
338
  ...svg$1,
339
339
  ...svgFilters,
340
340
  ...mathMl$1,
341
341
  ...text
342
- ]), V = null, Eo = addToSet({}, [
342
+ ]), V = null, Ao = addToSet({}, [
343
343
  ...html,
344
344
  ...svg,
345
345
  ...mathMl,
@@ -363,7 +363,7 @@ function createDOMPurify() {
363
363
  enumerable: !0,
364
364
  value: !1
365
365
  }
366
- })), Do = null, Oo = null, ko = Object.seal(create(null, {
366
+ })), jo = null, Mo = null, No = Object.seal(create(null, {
367
367
  tagCheck: {
368
368
  writable: !0,
369
369
  configurable: !1,
@@ -376,7 +376,7 @@ function createDOMPurify() {
376
376
  enumerable: !0,
377
377
  value: null
378
378
  }
379
- })), Ao = !0, jo = !0, Mo = !1, No = !0, Po = !1, Fo = !0, Io = !1, Lo = !1, Ro = !1, zo = !1, Bo = !1, Vo = !1, Ho = !0, Uo = !1, Wo = !0, Go = !1, Ko = {}, qo = null, Jo = addToSet({}, [
379
+ })), Po = !0, Fo = !0, Io = !1, Lo = !0, Ro = !1, zo = !0, Bo = !1, Vo = !1, Ho = !1, Uo = !1, Wo = !1, Go = !1, Ko = !0, qo = !1, Jo = !0, Yo = !1, Xo = {}, Zo = null, Qo = addToSet({}, [
380
380
  "annotation-xml",
381
381
  "audio",
382
382
  "colgroup",
@@ -402,14 +402,14 @@ function createDOMPurify() {
402
402
  "title",
403
403
  "video",
404
404
  "xmp"
405
- ]), Yo = null, Xo = addToSet({}, [
405
+ ]), $o = null, es = addToSet({}, [
406
406
  "audio",
407
407
  "video",
408
408
  "img",
409
409
  "source",
410
410
  "image",
411
411
  "track"
412
- ]), Zo = null, Qo = addToSet({}, [
412
+ ]), ts = null, ns = addToSet({}, [
413
413
  "alt",
414
414
  "class",
415
415
  "for",
@@ -424,58 +424,58 @@ function createDOMPurify() {
424
424
  "value",
425
425
  "style",
426
426
  "xmlns"
427
- ]), $o = "http://www.w3.org/1998/Math/MathML", es = "http://www.w3.org/2000/svg", ts = "http://www.w3.org/1999/xhtml", ns = ts, rs = !1, is = null, as = addToSet({}, [
428
- $o,
429
- es,
430
- ts
431
- ], stringToString), os = addToSet({}, [
427
+ ]), rs = "http://www.w3.org/1998/Math/MathML", is = "http://www.w3.org/2000/svg", as = "http://www.w3.org/1999/xhtml", os = as, ss = !1, cs = null, ls = addToSet({}, [
428
+ rs,
429
+ is,
430
+ as
431
+ ], stringToString), us = addToSet({}, [
432
432
  "mi",
433
433
  "mo",
434
434
  "mn",
435
435
  "ms",
436
436
  "mtext"
437
- ]), ss = addToSet({}, ["annotation-xml"]), cs = addToSet({}, [
437
+ ]), ds = addToSet({}, ["annotation-xml"]), fs = addToSet({}, [
438
438
  "title",
439
439
  "style",
440
440
  "font",
441
441
  "a",
442
442
  "script"
443
- ]), ls = null, us = ["application/xhtml+xml", "text/html"], Y = null, ds = null, fs = n.createElement("form"), ps = function(e) {
443
+ ]), ps = null, ms = ["application/xhtml+xml", "text/html"], Y = null, hs = null, gs = n.createElement("form"), _s = function(e) {
444
444
  return e instanceof RegExp || e instanceof Function;
445
- }, ms = function() {
445
+ }, vs = function() {
446
446
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
447
- if (!(ds && ds === e)) {
448
- if ((!e || typeof e != "object") && (e = {}), e = clone(e), ls = us.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = ls === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : To, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : Eo, is = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : as, Zo = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Qo), e.ADD_URI_SAFE_ATTR, Y) : Qo, Yo = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Xo), e.ADD_DATA_URI_TAGS, Y) : Xo, qo = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : Jo, Do = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), Oo = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Ko = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Ao = e.ALLOW_ARIA_ATTR !== !1, jo = e.ALLOW_DATA_ATTR !== !1, Mo = e.ALLOW_UNKNOWN_PROTOCOLS || !1, No = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Po = e.SAFE_FOR_TEMPLATES || !1, Fo = e.SAFE_FOR_XML !== !1, Io = e.WHOLE_DOCUMENT || !1, zo = e.RETURN_DOM || !1, Bo = e.RETURN_DOM_FRAGMENT || !1, Vo = e.RETURN_TRUSTED_TYPE || !1, Ro = e.FORCE_BODY || !1, Ho = e.SANITIZE_DOM !== !1, Uo = e.SANITIZE_NAMED_PROPS || !1, Wo = e.KEEP_CONTENT !== !1, Go = e.IN_PLACE || !1, wo = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, ns = e.NAMESPACE || ts, os = e.MATHML_TEXT_INTEGRATION_POINTS || os, ss = e.HTML_INTEGRATION_POINTS || ss, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && ps(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && ps(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (H.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Po && (jo = !1), Bo && (zo = !0), Ko && (B = addToSet({}, text), V = [], Ko.html === !0 && (addToSet(B, html$1), addToSet(V, html)), Ko.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), Ko.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), Ko.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? ko.tagCheck = e.ADD_TAGS : (B === To && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? ko.attributeCheck = e.ADD_ATTR : (V === Eo && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Zo, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (qo === Jo && (qo = clone(qo)), addToSet(qo, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (qo === Jo && (qo = clone(qo)), addToSet(qo, e.ADD_FORBID_CONTENTS, Y)), Wo && (B["#text"] = !0), Io && addToSet(B, [
447
+ if (!(hs && hs === e)) {
448
+ if ((!e || typeof e != "object") && (e = {}), e = clone(e), ps = ms.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = ps === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : ko, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : Ao, cs = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : ls, ts = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(ns), e.ADD_URI_SAFE_ATTR, Y) : ns, $o = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(es), e.ADD_DATA_URI_TAGS, Y) : es, Zo = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : Qo, jo = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), Mo = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Xo = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Po = e.ALLOW_ARIA_ATTR !== !1, Fo = e.ALLOW_DATA_ATTR !== !1, Io = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Lo = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ro = e.SAFE_FOR_TEMPLATES || !1, zo = e.SAFE_FOR_XML !== !1, Bo = e.WHOLE_DOCUMENT || !1, Uo = e.RETURN_DOM || !1, Wo = e.RETURN_DOM_FRAGMENT || !1, Go = e.RETURN_TRUSTED_TYPE || !1, Ho = e.FORCE_BODY || !1, Ko = e.SANITIZE_DOM !== !1, qo = e.SANITIZE_NAMED_PROPS || !1, Jo = e.KEEP_CONTENT !== !1, Yo = e.IN_PLACE || !1, Oo = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, os = e.NAMESPACE || as, us = e.MATHML_TEXT_INTEGRATION_POINTS || us, ds = e.HTML_INTEGRATION_POINTS || ds, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && _s(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && _s(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (H.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ro && (Fo = !1), Wo && (Uo = !0), Xo && (B = addToSet({}, text), V = [], Xo.html === !0 && (addToSet(B, html$1), addToSet(V, html)), Xo.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), Xo.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), Xo.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? No.tagCheck = e.ADD_TAGS : (B === ko && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? No.attributeCheck = e.ADD_ATTR : (V === Ao && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(ts, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Zo === Qo && (Zo = clone(Zo)), addToSet(Zo, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Zo === Qo && (Zo = clone(Zo)), addToSet(Zo, e.ADD_FORBID_CONTENTS, Y)), Jo && (B["#text"] = !0), Bo && addToSet(B, [
449
449
  "html",
450
450
  "head",
451
451
  "body"
452
- ]), B.table && (addToSet(B, ["tbody"]), delete Do.tbody), e.TRUSTED_TYPES_POLICY) {
452
+ ]), B.table && (addToSet(B, ["tbody"]), delete jo.tbody), e.TRUSTED_TYPES_POLICY) {
453
453
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
454
454
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
455
- A = e.TRUSTED_TYPES_POLICY, lo = A.createHTML("");
456
- } else A === void 0 && (A = _createTrustedTypesPolicy(ao, i)), A !== null && typeof lo == "string" && (lo = A.createHTML(""));
457
- freeze && freeze(e), ds = e;
455
+ R = e.TRUSTED_TYPES_POLICY, po = R.createHTML("");
456
+ } else R === void 0 && (R = _createTrustedTypesPolicy(lo, i)), R !== null && typeof po == "string" && (po = R.createHTML(""));
457
+ freeze && freeze(e), hs = e;
458
458
  }
459
- }, hs = addToSet({}, [
459
+ }, ys = addToSet({}, [
460
460
  ...svg$1,
461
461
  ...svgFilters,
462
462
  ...svgDisallowed
463
- ]), gs = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), _s = function(e) {
464
- let t = co(e);
463
+ ]), bs = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), xs = function(e) {
464
+ let t = A(e);
465
465
  (!t || !t.tagName) && (t = {
466
- namespaceURI: ns,
466
+ namespaceURI: os,
467
467
  tagName: "template"
468
468
  });
469
469
  let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
470
- return is[e.namespaceURI] ? e.namespaceURI === es ? t.namespaceURI === ts ? n === "svg" : t.namespaceURI === $o ? n === "svg" && (r === "annotation-xml" || os[r]) : !!hs[n] : e.namespaceURI === $o ? t.namespaceURI === ts ? n === "math" : t.namespaceURI === es ? n === "math" && ss[r] : !!gs[n] : e.namespaceURI === ts ? t.namespaceURI === es && !ss[r] || t.namespaceURI === $o && !os[r] ? !1 : !gs[n] && (cs[n] || !hs[n]) : !!(ls === "application/xhtml+xml" && is[e.namespaceURI]) : !1;
471
- }, vs = function(e) {
470
+ return cs[e.namespaceURI] ? e.namespaceURI === is ? t.namespaceURI === as ? n === "svg" : t.namespaceURI === rs ? n === "svg" && (r === "annotation-xml" || us[r]) : !!ys[n] : e.namespaceURI === rs ? t.namespaceURI === as ? n === "math" : t.namespaceURI === is ? n === "math" && ds[r] : !!bs[n] : e.namespaceURI === as ? t.namespaceURI === is && !ds[r] || t.namespaceURI === rs && !us[r] ? !1 : !bs[n] && (fs[n] || !ys[n]) : !!(ps === "application/xhtml+xml" && cs[e.namespaceURI]) : !1;
471
+ }, Ss = function(e) {
472
472
  arrayPush(t.removed, { element: e });
473
473
  try {
474
- co(e).removeChild(e);
474
+ A(e).removeChild(e);
475
475
  } catch {
476
- oo(e);
476
+ uo(e);
477
477
  }
478
- }, ys = function(e, n) {
478
+ }, Cs = function(e, n) {
479
479
  try {
480
480
  arrayPush(t.removed, {
481
481
  attribute: n.getAttributeNode(e),
@@ -487,87 +487,87 @@ function createDOMPurify() {
487
487
  from: n
488
488
  });
489
489
  }
490
- if (n.removeAttribute(e), e === "is") if (zo || Bo) try {
491
- vs(n);
490
+ if (n.removeAttribute(e), e === "is") if (Uo || Wo) try {
491
+ Ss(n);
492
492
  } catch {}
493
493
  else try {
494
494
  n.setAttribute(e, "");
495
495
  } catch {}
496
- }, bs = function(e) {
496
+ }, ws = function(e) {
497
497
  let t = null, r = null;
498
- if (Ro) e = "<remove></remove>" + e;
498
+ if (Ho) e = "<remove></remove>" + e;
499
499
  else {
500
500
  let t = stringMatch(e, /^[\r\n\t ]+/);
501
501
  r = t && t[0];
502
502
  }
503
- ls === "application/xhtml+xml" && ns === ts && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
504
- let i = A ? A.createHTML(e) : e;
505
- if (ns === ts) try {
506
- t = new p().parseFromString(i, ls);
503
+ ps === "application/xhtml+xml" && os === as && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
504
+ let i = R ? R.createHTML(e) : e;
505
+ if (os === as) try {
506
+ t = new p().parseFromString(i, ps);
507
507
  } catch {}
508
508
  if (!t || !t.documentElement) {
509
- t = uo.createDocument(ns, "template", null);
509
+ t = mo.createDocument(os, "template", null);
510
510
  try {
511
- t.documentElement.innerHTML = rs ? lo : i;
511
+ t.documentElement.innerHTML = ss ? po : i;
512
512
  } catch {}
513
513
  }
514
514
  let a = t.body || t.documentElement;
515
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), ns === ts ? mo.call(t, Io ? "html" : "body")[0] : Io ? t.documentElement : a;
516
- }, xs = function(e) {
517
- return fo.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
518
- }, Ss = function(e) {
515
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), os === as ? _o.call(t, Bo ? "html" : "body")[0] : Bo ? t.documentElement : a;
516
+ }, Ts = function(e) {
517
+ return ho.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
518
+ }, Es = function(e) {
519
519
  return e instanceof f && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
520
- }, Cs = function(e) {
520
+ }, Ds = function(e) {
521
521
  return typeof s == "function" && e instanceof s;
522
522
  };
523
- function ws(e, n, r) {
523
+ function Os(e, n, r) {
524
524
  arrayForEach(e, (e) => {
525
- e.call(t, n, r, ds);
525
+ e.call(t, n, r, hs);
526
526
  });
527
527
  }
528
- let Ts = function(e) {
528
+ let ks = function(e) {
529
529
  let n = null;
530
- if (ws(R.beforeSanitizeElements, e, null), Ss(e)) return vs(e), !0;
530
+ if (Os(yo.beforeSanitizeElements, e, null), Es(e)) return Ss(e), !0;
531
531
  let r = Y(e.nodeName);
532
- if (ws(R.uponSanitizeElement, e, {
532
+ if (Os(yo.uponSanitizeElement, e, {
533
533
  tagName: r,
534
534
  allowedTags: B
535
- }), Fo && e.hasChildNodes() && !Cs(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Fo && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return vs(e), !0;
536
- if (!(ko.tagCheck instanceof Function && ko.tagCheck(r)) && (!B[r] || Do[r])) {
537
- if (!Do[r] && Ds(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
538
- if (Wo && !qo[r]) {
539
- let t = co(e) || e.parentNode, n = O(e) || e.childNodes;
535
+ }), zo && e.hasChildNodes() && !Ds(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || zo && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return Ss(e), !0;
536
+ if (!(No.tagCheck instanceof Function && No.tagCheck(r)) && (!B[r] || jo[r])) {
537
+ if (!jo[r] && js(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
538
+ if (Jo && !Zo[r]) {
539
+ let t = A(e) || e.parentNode, n = O(e) || e.childNodes;
540
540
  if (n && t) {
541
541
  let r = n.length;
542
542
  for (let i = r - 1; i >= 0; --i) {
543
543
  let r = g(n[i], !0);
544
- r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, so(e));
544
+ r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, fo(e));
545
545
  }
546
546
  }
547
547
  }
548
- return vs(e), !0;
548
+ return Ss(e), !0;
549
549
  }
550
- return e instanceof c && !_s(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (vs(e), !0) : (Po && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
551
- go,
552
- _o,
553
- vo
550
+ return e instanceof c && !xs(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Ss(e), !0) : (Ro && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
551
+ bo,
552
+ xo,
553
+ So
554
554
  ], (e) => {
555
555
  n = stringReplace(n, e, " ");
556
- }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), ws(R.afterSanitizeElements, e, null), !1);
557
- }, Es = function(e, t, r) {
558
- if (Ho && (t === "id" || t === "name") && (r in n || r in fs)) return !1;
559
- if (!(jo && !Oo[t] && regExpTest(yo, t)) && !(Ao && regExpTest(bo, t)) && !(ko.attributeCheck instanceof Function && ko.attributeCheck(t, e))) {
560
- if (!V[t] || Oo[t]) {
561
- if (!(Ds(e) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, e) || H.tagNameCheck instanceof Function && H.tagNameCheck(e)) && (H.attributeNameCheck instanceof RegExp && regExpTest(H.attributeNameCheck, t) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(t, e)) || t === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r)))) return !1;
562
- } else if (!Zo[t] && !regExpTest(wo, stringReplace(r, So, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Yo[e]) && !(Mo && !regExpTest(xo, stringReplace(r, So, ""))) && r) return !1;
556
+ }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), Os(yo.afterSanitizeElements, e, null), !1);
557
+ }, As = function(e, t, r) {
558
+ if (Ko && (t === "id" || t === "name") && (r in n || r in gs)) return !1;
559
+ if (!(Fo && !Mo[t] && regExpTest(Co, t)) && !(Po && regExpTest(wo, t)) && !(No.attributeCheck instanceof Function && No.attributeCheck(t, e))) {
560
+ if (!V[t] || Mo[t]) {
561
+ if (!(js(e) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, e) || H.tagNameCheck instanceof Function && H.tagNameCheck(e)) && (H.attributeNameCheck instanceof RegExp && regExpTest(H.attributeNameCheck, t) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(t, e)) || t === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r)))) return !1;
562
+ } else if (!ts[t] && !regExpTest(Oo, stringReplace(r, Eo, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && $o[e]) && !(Io && !regExpTest(To, stringReplace(r, Eo, ""))) && r) return !1;
563
563
  }
564
564
  return !0;
565
- }, Ds = function(e) {
566
- return e !== "annotation-xml" && stringMatch(e, Co);
567
- }, Os = function(e) {
568
- ws(R.beforeSanitizeAttributes, e, null);
565
+ }, js = function(e) {
566
+ return e !== "annotation-xml" && stringMatch(e, Do);
567
+ }, Ms = function(e) {
568
+ Os(yo.beforeSanitizeAttributes, e, null);
569
569
  let { attributes: n } = e;
570
- if (!n || Ss(e)) return;
570
+ if (!n || Es(e)) return;
571
571
  let r = {
572
572
  attrName: "",
573
573
  attrValue: "",
@@ -577,106 +577,106 @@ function createDOMPurify() {
577
577
  }, i = n.length;
578
578
  for (; i--;) {
579
579
  let { name: a, namespaceURI: o, value: s } = n[i], c = Y(a), l = s, u = a === "value" ? l : stringTrim(l);
580
- if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, ws(R.uponSanitizeAttribute, e, r), u = r.attrValue, Uo && (c === "id" || c === "name") && (ys(a, e), u = "user-content-" + u), Fo && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
581
- ys(a, e);
580
+ if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, Os(yo.uponSanitizeAttribute, e, r), u = r.attrValue, qo && (c === "id" || c === "name") && (Cs(a, e), u = "user-content-" + u), zo && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
581
+ Cs(a, e);
582
582
  continue;
583
583
  }
584
584
  if (c === "attributename" && stringMatch(u, "href")) {
585
- ys(a, e);
585
+ Cs(a, e);
586
586
  continue;
587
587
  }
588
588
  if (r.forceKeepAttr) continue;
589
589
  if (!r.keepAttr) {
590
- ys(a, e);
590
+ Cs(a, e);
591
591
  continue;
592
592
  }
593
- if (!No && regExpTest(/\/>/i, u)) {
594
- ys(a, e);
593
+ if (!Lo && regExpTest(/\/>/i, u)) {
594
+ Cs(a, e);
595
595
  continue;
596
596
  }
597
- Po && arrayForEach([
598
- go,
599
- _o,
600
- vo
597
+ Ro && arrayForEach([
598
+ bo,
599
+ xo,
600
+ So
601
601
  ], (e) => {
602
602
  u = stringReplace(u, e, " ");
603
603
  });
604
604
  let f = Y(e.nodeName);
605
- if (!Es(f, c, u)) {
606
- ys(a, e);
605
+ if (!As(f, c, u)) {
606
+ Cs(a, e);
607
607
  continue;
608
608
  }
609
- if (A && typeof ao == "object" && typeof ao.getAttributeType == "function" && !o) switch (ao.getAttributeType(f, c)) {
609
+ if (R && typeof lo == "object" && typeof lo.getAttributeType == "function" && !o) switch (lo.getAttributeType(f, c)) {
610
610
  case "TrustedHTML":
611
- u = A.createHTML(u);
611
+ u = R.createHTML(u);
612
612
  break;
613
613
  case "TrustedScriptURL":
614
- u = A.createScriptURL(u);
614
+ u = R.createScriptURL(u);
615
615
  break;
616
616
  }
617
617
  if (u !== l) try {
618
- o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), Ss(e) ? vs(e) : arrayPop(t.removed);
618
+ o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), Es(e) ? Ss(e) : arrayPop(t.removed);
619
619
  } catch {
620
- ys(a, e);
620
+ Cs(a, e);
621
621
  }
622
622
  }
623
- ws(R.afterSanitizeAttributes, e, null);
624
- }, ks = function e(t) {
625
- let n = null, r = xs(t);
626
- for (ws(R.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) ws(R.uponSanitizeShadowNode, n, null), Ts(n), Os(n), n.content instanceof a && e(n.content);
627
- ws(R.afterSanitizeShadowDOM, t, null);
623
+ Os(yo.afterSanitizeAttributes, e, null);
624
+ }, Ns = function e(t) {
625
+ let n = null, r = Ts(t);
626
+ for (Os(yo.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) Os(yo.uponSanitizeShadowNode, n, null), ks(n), Ms(n), n.content instanceof a && e(n.content);
627
+ Os(yo.afterSanitizeShadowDOM, t, null);
628
628
  };
629
629
  return t.sanitize = function(e) {
630
630
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
631
- if (rs = !e, rs && (e = "<!-->"), typeof e != "string" && !Cs(e)) if (typeof e.toString == "function") {
631
+ if (ss = !e, ss && (e = "<!-->"), typeof e != "string" && !Ds(e)) if (typeof e.toString == "function") {
632
632
  if (e = e.toString(), typeof e != "string") throw typeErrorCreate("dirty is not a string, aborting");
633
633
  } else throw typeErrorCreate("toString is not a function");
634
634
  if (!t.isSupported) return e;
635
- if (Lo || ms(n), t.removed = [], typeof e == "string" && (Go = !1), Go) {
635
+ if (Vo || vs(n), t.removed = [], typeof e == "string" && (Yo = !1), Yo) {
636
636
  if (e.nodeName) {
637
637
  let t = Y(e.nodeName);
638
- if (!B[t] || Do[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
638
+ if (!B[t] || jo[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
639
639
  }
640
- } else if (e instanceof s) i = bs("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
640
+ } else if (e instanceof s) i = ws("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
641
641
  else {
642
- if (!zo && !Po && !Io && e.indexOf("<") === -1) return A && Vo ? A.createHTML(e) : e;
643
- if (i = bs(e), !i) return zo ? null : Vo ? lo : "";
642
+ if (!Uo && !Ro && !Bo && e.indexOf("<") === -1) return R && Go ? R.createHTML(e) : e;
643
+ if (i = ws(e), !i) return Uo ? null : Go ? po : "";
644
644
  }
645
- i && Ro && vs(i.firstChild);
646
- let u = xs(Go ? e : i);
647
- for (; c = u.nextNode();) Ts(c), Os(c), c.content instanceof a && ks(c.content);
648
- if (Go) return e;
649
- if (zo) {
650
- if (Bo) for (l = po.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
645
+ i && Ho && Ss(i.firstChild);
646
+ let u = Ts(Yo ? e : i);
647
+ for (; c = u.nextNode();) ks(c), Ms(c), c.content instanceof a && Ns(c.content);
648
+ if (Yo) return e;
649
+ if (Uo) {
650
+ if (Wo) for (l = go.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
651
651
  else l = i;
652
- return (V.shadowroot || V.shadowrootmode) && (l = ho.call(r, l, !0)), l;
652
+ return (V.shadowroot || V.shadowrootmode) && (l = vo.call(r, l, !0)), l;
653
653
  }
654
- let f = Io ? i.outerHTML : i.innerHTML;
655
- return Io && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), Po && arrayForEach([
656
- go,
657
- _o,
658
- vo
654
+ let f = Bo ? i.outerHTML : i.innerHTML;
655
+ return Bo && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), Ro && arrayForEach([
656
+ bo,
657
+ xo,
658
+ So
659
659
  ], (e) => {
660
660
  f = stringReplace(f, e, " ");
661
- }), A && Vo ? A.createHTML(f) : f;
661
+ }), R && Go ? R.createHTML(f) : f;
662
662
  }, t.setConfig = function() {
663
- ms(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Lo = !0;
663
+ vs(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Vo = !0;
664
664
  }, t.clearConfig = function() {
665
- ds = null, Lo = !1;
665
+ hs = null, Vo = !1;
666
666
  }, t.isValidAttribute = function(e, t, n) {
667
- return ds || ms({}), Es(Y(e), Y(t), n);
667
+ return hs || vs({}), As(Y(e), Y(t), n);
668
668
  }, t.addHook = function(e, t) {
669
- typeof t == "function" && arrayPush(R[e], t);
669
+ typeof t == "function" && arrayPush(yo[e], t);
670
670
  }, t.removeHook = function(e, t) {
671
671
  if (t !== void 0) {
672
- let n = arrayLastIndexOf(R[e], t);
673
- return n === -1 ? void 0 : arraySplice(R[e], n, 1)[0];
672
+ let n = arrayLastIndexOf(yo[e], t);
673
+ return n === -1 ? void 0 : arraySplice(yo[e], n, 1)[0];
674
674
  }
675
- return arrayPop(R[e]);
675
+ return arrayPop(yo[e]);
676
676
  }, t.removeHooks = function(e) {
677
- R[e] = [];
677
+ yo[e] = [];
678
678
  }, t.removeAllHooks = function() {
679
- R = _createHooksMap();
679
+ yo = _createHooksMap();
680
680
  }, t;
681
681
  }
682
682
  var purify = createDOMPurify();
@@ -20157,14 +20157,14 @@ ${c}` : c;
20157
20157
  if (this.options.pedantic ? (f = 2, s = c.trimStart()) : u ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, s = c.slice(f), f += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
20158
20158
  let t = this.rules.other.nextBulletRegex(f), n = this.rules.other.hrRegex(f), i = this.rules.other.fencesBeginRegex(f), a = this.rules.other.headingBeginRegex(f), o = this.rules.other.htmlBeginRegex(f);
20159
20159
  for (; e;) {
20160
- let p = e.split("\n", 1)[0], ao;
20161
- if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), ao = l) : ao = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
20162
- if (ao.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + ao.slice(f);
20160
+ let p = e.split("\n", 1)[0], lo;
20161
+ if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), lo = l) : lo = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
20162
+ if (lo.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + lo.slice(f);
20163
20163
  else {
20164
20164
  if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
20165
20165
  s += "\n" + l;
20166
20166
  }
20167
- !u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c = ao.slice(f);
20167
+ !u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c = lo.slice(f);
20168
20168
  }
20169
20169
  }
20170
20170
  i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
@@ -21372,13 +21372,13 @@ function useDropdown() {
21372
21372
  return e;
21373
21373
  }
21374
21374
  function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1 }) {
21375
- let [s, c] = useState(!1), f = useRef(null), h = useRef(null), g = useRef(null), [co, A] = useState(null);
21375
+ let [s, c] = useState(!1), f = useRef(null), h = useRef(null), g = useRef(null), [A, R] = useState(null);
21376
21376
  useLayoutEffect(() => {
21377
21377
  if (!s || !f.current || !h.current) return;
21378
21378
  let e = f.current.getBoundingClientRect(), t = h.current.getBoundingClientRect(), o = e.left;
21379
21379
  n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
21380
21380
  let c;
21381
- c = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => A({
21381
+ c = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => R({
21382
21382
  top: c,
21383
21383
  left: o
21384
21384
  }));
@@ -21389,10 +21389,10 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
21389
21389
  i,
21390
21390
  a
21391
21391
  ]);
21392
- function lo() {
21392
+ function po() {
21393
21393
  g.current &&= (clearTimeout(g.current), null), c(!0);
21394
21394
  }
21395
- function uo() {
21395
+ function mo() {
21396
21396
  g.current = window.setTimeout(() => {
21397
21397
  c(!1);
21398
21398
  }, 120);
@@ -21410,21 +21410,21 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
21410
21410
  children: [/* @__PURE__ */ jsx("div", {
21411
21411
  ref: f,
21412
21412
  className: "inline-flex",
21413
- onMouseEnter: lo,
21414
- onMouseLeave: uo,
21413
+ onMouseEnter: po,
21414
+ onMouseLeave: mo,
21415
21415
  onClick: () => c((e) => !e),
21416
21416
  "aria-haspopup": "menu",
21417
21417
  "aria-expanded": s,
21418
21418
  children: e
21419
21419
  }), s && !o && createPortal(/* @__PURE__ */ jsx("div", {
21420
21420
  ref: h,
21421
- onMouseEnter: lo,
21422
- onMouseLeave: uo,
21421
+ onMouseEnter: po,
21422
+ onMouseLeave: mo,
21423
21423
  style: {
21424
21424
  position: "fixed",
21425
- top: co?.top ?? 0,
21426
- left: co?.left ?? 0,
21427
- visibility: co ? "visible" : "hidden",
21425
+ top: A?.top ?? 0,
21426
+ left: A?.left ?? 0,
21427
+ visibility: A ? "visible" : "hidden",
21428
21428
  zIndex: 1e3
21429
21429
  },
21430
21430
  children: t
@@ -21486,17 +21486,17 @@ function getVerticalAlign(e, t, n) {
21486
21486
  return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
21487
21487
  }
21488
21488
  function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
21489
- let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h, co] = useState(null), A = () => {
21489
+ let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h, A] = useState(null), R = () => {
21490
21490
  s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
21491
21491
  f(!0);
21492
21492
  }, r);
21493
- }, lo = () => {
21493
+ }, po = () => {
21494
21494
  s.current &&= (clearTimeout(s.current), null), f(!1);
21495
21495
  };
21496
21496
  return useLayoutEffect(() => {
21497
21497
  if (!c || !a.current || !o.current) return;
21498
21498
  let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
21499
- r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), co((e) => e && e.top === l && e.left === u ? e : {
21499
+ r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), A((e) => e && e.top === l && e.left === u ? e : {
21500
21500
  top: l,
21501
21501
  left: u
21502
21502
  });
@@ -21505,10 +21505,10 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
21505
21505
  }, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
21506
21506
  ref: a,
21507
21507
  className: "inline-flex",
21508
- onMouseEnter: A,
21509
- onMouseLeave: lo,
21510
- onFocus: A,
21511
- onBlur: lo,
21508
+ onMouseEnter: R,
21509
+ onMouseLeave: po,
21510
+ onFocus: R,
21511
+ onBlur: po,
21512
21512
  children: e
21513
21513
  }), c && createPortal(/* @__PURE__ */ jsx("div", {
21514
21514
  ref: o,
@@ -22757,7 +22757,11 @@ function RichContent({ content: e, className: t }) {
22757
22757
  function Skeleton({ className: e }) {
22758
22758
  return /* @__PURE__ */ jsx("div", { className: cn("skeleton rounded-md", e) });
22759
22759
  }
22760
- var toasts = [], listeners = /* @__PURE__ */ new Set(), activeKeys = /* @__PURE__ */ new Map();
22760
+ var toasts = [], listeners = /* @__PURE__ */ new Set(), pendingDismissReasons = /* @__PURE__ */ new Map();
22761
+ function removeToast(e, t) {
22762
+ t && pendingDismissReasons.set(e, t), toasts = toasts.filter((t) => t.id !== e), notify();
22763
+ }
22764
+ var activeKeys = /* @__PURE__ */ new Map();
22761
22765
  function notify() {
22762
22766
  listeners.forEach((e) => e(toasts));
22763
22767
  }
@@ -22770,8 +22774,16 @@ const toastStore = {
22770
22774
  add(e) {
22771
22775
  e.key && activeKeys.set(e.key, e.id), toasts = [e, ...toasts], notify();
22772
22776
  },
22773
- remove(e) {
22774
- toasts = toasts.filter((t) => t.id !== e), notify();
22777
+ remove(e, t) {
22778
+ removeToast(e, t);
22779
+ },
22780
+ removeAllAtPosition(e, t = "replaced") {
22781
+ let n = toasts.filter((t) => t.position === e).map((e) => e.id);
22782
+ for (let e of n) removeToast(e, t);
22783
+ },
22784
+ consumePendingDismissReason(e) {
22785
+ let t = pendingDismissReasons.get(e);
22786
+ return t !== void 0 && pendingDismissReasons.delete(e), t;
22775
22787
  },
22776
22788
  cleanup(e) {
22777
22789
  for (let [t, n] of activeKeys) if (n === e) {
@@ -22804,7 +22816,17 @@ var ANIMATION_DURATION_MS = 200, COUNTDOWN_INTERVAL_MS = 100, POSITION_CLASSES =
22804
22816
  "bottom-left": "-translate-x-full",
22805
22817
  "bottom-center": "translate-y-full",
22806
22818
  "bottom-right": "translate-x-full"
22819
+ }, SINGLE_SLOT_PLACE = {
22820
+ "top-left": "place-items-start",
22821
+ "top-center": "items-start justify-items-center",
22822
+ "top-right": "items-start justify-items-end",
22823
+ "bottom-left": "items-end justify-items-start",
22824
+ "bottom-center": "items-end justify-items-center",
22825
+ "bottom-right": "items-end justify-items-end"
22807
22826
  };
22827
+ function isTopPosition(e) {
22828
+ return e.startsWith("top");
22829
+ }
22808
22830
  function isRenderFn(e) {
22809
22831
  return typeof e == "function";
22810
22832
  }
@@ -22904,7 +22926,7 @@ function useToastTimers(e, t) {
22904
22926
  e,
22905
22927
  u,
22906
22928
  f
22907
- ]), oo = useCallback((e) => {
22929
+ ]), uo = useCallback((e) => {
22908
22930
  i.current.delete(e), r((t) => {
22909
22931
  let n = new Map(t);
22910
22932
  return n.delete(e), n;
@@ -22926,21 +22948,21 @@ function useToastTimers(e, t) {
22926
22948
  remainingTimes: n,
22927
22949
  pauseAll: h,
22928
22950
  resumeAll: g,
22929
- cleanupTimer: oo
22951
+ cleanupTimer: uo
22930
22952
  };
22931
22953
  }
22932
22954
  function Toaster() {
22933
- 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: so } = useToastTimers(e, a);
22955
+ 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: A } = useToastTimers(e, a);
22934
22956
  useEffect(() => toastStore.subscribe(t), []);
22935
- let co = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), A = useCallback((e) => {
22957
+ let R = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), po = useCallback((e) => {
22936
22958
  e.callbacks?.onOpen?.();
22937
- }, []), lo = useCallback((e, t) => {
22938
- t === "manual" ? e.callbacks?.onClose?.() : e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
22959
+ }, []), mo = useCallback((e, t) => {
22960
+ t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
22939
22961
  }, []);
22940
22962
  useEffect(() => {
22941
22963
  let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
22942
22964
  o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
22943
- lo(e, a.current.get(e.id) ?? "timeout"), a.current.delete(e.id);
22965
+ mo(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
22944
22966
  }), r((r) => {
22945
22967
  let i = r.map((e) => {
22946
22968
  let t = n.get(e.id);
@@ -22949,7 +22971,7 @@ function Toaster() {
22949
22971
  content: t.content,
22950
22972
  duration: t.duration
22951
22973
  } : e;
22952
- }).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (A(e), {
22974
+ }).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (po(e), {
22953
22975
  ...e,
22954
22976
  animationState: "entering"
22955
22977
  })), ...i];
@@ -22957,30 +22979,47 @@ function Toaster() {
22957
22979
  }), i.current = t;
22958
22980
  }, [
22959
22981
  e,
22960
- A,
22961
- lo
22982
+ po,
22983
+ mo
22962
22984
  ]);
22963
- let uo = useCallback((e) => {
22985
+ let ho = useCallback((e) => {
22964
22986
  r((t) => {
22965
22987
  let n = t.filter((t) => t.id !== e);
22966
22988
  return o.current = n, n;
22967
- }), so(e), toastStore.cleanup(e);
22968
- }, [so]), fo = useCallback((e) => {
22989
+ }), A(e), toastStore.cleanup(e);
22990
+ }, [A]), go = useCallback((e) => {
22969
22991
  a.current.set(e, "manual"), toastStore.remove(e);
22970
22992
  }, []);
22971
- if (!co) return null;
22972
- let po = groupByPosition(n);
22973
- return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(po).map(([e, t]) => /* @__PURE__ */ jsx("div", {
22974
- className: cn("pointer-events-none fixed z-1000 flex flex-col items-end gap-2 p-4", POSITION_CLASSES[e]),
22975
- children: t.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
22993
+ if (!R) return null;
22994
+ let _o = groupByPosition(n);
22995
+ return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(_o).map(([e, t]) => {
22996
+ let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
22997
+ className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
22998
+ children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
22999
+ className: "col-span-full row-span-full col-start-1 row-start-1",
23000
+ style: { zIndex: n.length - t },
23001
+ children: /* @__PURE__ */ jsx(ToastWrapper, {
23002
+ toast: e,
23003
+ remainingTime: c.get(e.id) ?? e.duration,
23004
+ onExitComplete: ho,
23005
+ onClose: go,
23006
+ onHoverStart: u,
23007
+ onHoverEnd: f
23008
+ })
23009
+ }, e.id))
23010
+ }) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
22976
23011
  toast: e,
22977
23012
  remainingTime: c.get(e.id) ?? e.duration,
22978
- onExitComplete: uo,
22979
- onClose: fo,
23013
+ onExitComplete: ho,
23014
+ onClose: go,
22980
23015
  onHoverStart: u,
22981
23016
  onHoverEnd: f
22982
- }, e.id))
22983
- }, e)) }), document.body);
23017
+ }, e.id));
23018
+ return /* @__PURE__ */ jsx("div", {
23019
+ className: cn("pointer-events-none fixed z-1000 flex flex-col items-end gap-2 p-4", POSITION_CLASSES[e]),
23020
+ children: isTopPosition(e) ? /* @__PURE__ */ jsxs(Fragment$1, { children: [i, a] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [a, i] })
23021
+ }, e);
23022
+ }) }), document.body);
22984
23023
  }
22985
23024
  function AccountInfo({ title: e, value: t }) {
22986
23025
  return /* @__PURE__ */ jsxs("div", {
@@ -23190,7 +23229,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23190
23229
  function O(e) {
23191
23230
  p(e), a?.(e);
23192
23231
  }
23193
- let co = {
23232
+ let A = {
23194
23233
  fire: [{
23195
23234
  id: "fire",
23196
23235
  tooltip: "Mark as fire",
@@ -23242,7 +23281,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23242
23281
  }),
23243
23282
  onClick: r.read.off
23244
23283
  }]
23245
- }, A = [{
23284
+ }, R = [{
23246
23285
  value: "normal",
23247
23286
  tooltip: "Normal density",
23248
23287
  icon: /* @__PURE__ */ jsx(NormalDensityIcon, { size: 20 })
@@ -23271,7 +23310,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23271
23310
  }),
23272
23311
  /* @__PURE__ */ jsx("div", {
23273
23312
  className: "flex items-center divide-x divide-neutral-400-variant-1",
23274
- children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(co).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23313
+ children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(A).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23275
23314
  className: "flex items-center gap-2 px-1",
23276
23315
  children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
23277
23316
  content: e.tooltip,
@@ -23286,7 +23325,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23286
23325
  }),
23287
23326
  /* @__PURE__ */ jsx("div", {
23288
23327
  className: "flex items-center gap-2",
23289
- children: A.map(({ value: e, tooltip: t, icon: n }) => {
23328
+ children: R.map(({ value: e, tooltip: t, icon: n }) => {
23290
23329
  let r = f === e;
23291
23330
  return /* @__PURE__ */ jsx(InfoTooltip, {
23292
23331
  content: t,
@@ -23392,7 +23431,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
23392
23431
  let c = !!o, l = filterButtonStyles({
23393
23432
  variant: e,
23394
23433
  selected: !c && r
23395
- }), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label, ao = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
23434
+ }), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label, lo = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
23396
23435
  return /* @__PURE__ */ jsxs(Button, {
23397
23436
  ...s,
23398
23437
  disabled: o,
@@ -23400,7 +23439,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
23400
23439
  className: cn("group", l.root(), c && "border-neutral-300 bg-white hover:border-neutral-300", a?.root),
23401
23440
  children: [f && /* @__PURE__ */ jsx("span", {
23402
23441
  className: cn("flex items-center", a?.icon),
23403
- children: renderIcon$1(f, cn("shrink-0", ao))
23442
+ children: renderIcon$1(f, cn("shrink-0", lo))
23404
23443
  }), p && /* @__PURE__ */ jsxs("span", {
23405
23444
  className: cn(l.label(), c && "font-medium text-neutral-400", a?.label),
23406
23445
  children: [/* @__PURE__ */ jsx("span", { children: p }), typeof n == "number" && n > 0 && /* @__PURE__ */ jsxs("span", {
@@ -23516,7 +23555,7 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
23516
23555
  position: "fixed",
23517
23556
  top: n.top,
23518
23557
  left: n.left,
23519
- zIndex: 100
23558
+ zIndex: 10
23520
23559
  },
23521
23560
  children: /* @__PURE__ */ jsx(InfoTooltip, {
23522
23561
  content: s,
@@ -23546,15 +23585,15 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
23546
23585
  variant: r,
23547
23586
  orientation: i,
23548
23587
  status: a
23549
- }), co = useRef(null), [A, lo] = useState(!1), [uo, fo] = useState(!1), [po, mo] = useState(l), [ho, R] = useState(null), go = c ?? po, _o = s && (A || uo || go), vo = typeof n == "number" && n > 0 && (o || a === "active");
23550
- function yo(e) {
23551
- c === void 0 && mo(e), f?.(e);
23588
+ }), A = useRef(null), [R, po] = useState(!1), [mo, ho] = useState(!1), [go, _o] = useState(l), [vo, yo] = useState(null), bo = c ?? go, xo = s && (R || mo || bo), So = typeof n == "number" && n > 0 && (o || a === "active");
23589
+ function Co(e) {
23590
+ c === void 0 && _o(e), f?.(e);
23552
23591
  }
23553
23592
  return useLayoutEffect(() => {
23554
- if (!_o || !co.current) return;
23593
+ if (!xo || !A.current) return;
23555
23594
  function e() {
23556
- let e = co.current?.getBoundingClientRect();
23557
- e && R({
23595
+ let e = A.current?.getBoundingClientRect();
23596
+ e && yo({
23558
23597
  top: e.top - 8,
23559
23598
  left: e.right - 12
23560
23599
  });
@@ -23562,28 +23601,28 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
23562
23601
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
23563
23602
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
23564
23603
  };
23565
- }, [_o]), /* @__PURE__ */ jsxs(Button, {
23604
+ }, [xo]), /* @__PURE__ */ jsxs(Button, {
23566
23605
  ...g,
23567
23606
  className: cn(O.root(), h?.root),
23568
- onMouseEnter: () => lo(!0),
23569
- onMouseLeave: () => lo(!1),
23607
+ onMouseEnter: () => po(!0),
23608
+ onMouseLeave: () => po(!1),
23570
23609
  children: [/* @__PURE__ */ jsxs("div", {
23571
23610
  className: "relative",
23572
23611
  children: [/* @__PURE__ */ jsx("div", {
23573
- ref: co,
23612
+ ref: A,
23574
23613
  className: cn(O.bubble(), h?.bubble),
23575
23614
  children: renderIcon(e, O.icon())
23576
- }), _o && ho && typeof document < "u" && ToggleControlPortal({
23577
- isPressed: go,
23578
- isPortalHovered: uo,
23579
- portalPosition: ho,
23580
- onMouseEnter: () => fo(!0),
23581
- onMouseLeave: () => fo(!1),
23582
- onToggle: () => yo(!go)
23615
+ }), xo && vo && typeof document < "u" && ToggleControlPortal({
23616
+ isPressed: bo,
23617
+ isPortalHovered: mo,
23618
+ portalPosition: vo,
23619
+ onMouseEnter: () => ho(!0),
23620
+ onMouseLeave: () => ho(!1),
23621
+ onToggle: () => Co(!bo)
23583
23622
  })]
23584
23623
  }), /* @__PURE__ */ jsxs("div", {
23585
23624
  className: cn(O.label(), h?.label),
23586
- children: [/* @__PURE__ */ jsx("span", { children: t }), vo && /* @__PURE__ */ jsxs("span", {
23625
+ children: [/* @__PURE__ */ jsx("span", { children: t }), So && /* @__PURE__ */ jsxs("span", {
23587
23626
  "aria-label": `${n} items`,
23588
23627
  className: cn(O.count(), h?.count),
23589
23628
  children: [
@@ -23643,8 +23682,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23643
23682
  t,
23644
23683
  n
23645
23684
  ]);
23646
- let co = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
23647
- function A(t) {
23685
+ let A = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
23686
+ function R(t) {
23648
23687
  let o = t.getMonth(), s = t.getFullYear();
23649
23688
  if ((o !== g.month || s !== g.year) && O({
23650
23689
  year: s,
@@ -23661,7 +23700,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23661
23700
  }), a());
23662
23701
  }
23663
23702
  }
23664
- function lo() {
23703
+ function po() {
23665
23704
  O((e) => e.month === 0 ? {
23666
23705
  year: e.year - 1,
23667
23706
  month: 11
@@ -23670,7 +23709,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23670
23709
  month: e.month - 1
23671
23710
  });
23672
23711
  }
23673
- function uo() {
23712
+ function mo() {
23674
23713
  O((e) => e.month === 11 ? {
23675
23714
  year: e.year + 1,
23676
23715
  month: 0
@@ -23679,7 +23718,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23679
23718
  month: e.month + 1
23680
23719
  });
23681
23720
  }
23682
- let fo = getWeekdays();
23721
+ let ho = getWeekdays();
23683
23722
  return /* @__PURE__ */ jsxs("div", {
23684
23723
  className: "mt-1 w-fit rounded-lg border border-neutral-400 bg-white p-2 shadow-lg",
23685
23724
  children: [
@@ -23691,7 +23730,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23691
23730
  direction: "left",
23692
23731
  size: 20
23693
23732
  }),
23694
- onClick: lo,
23733
+ onClick: po,
23695
23734
  className: "hover:opacity-60",
23696
23735
  "aria-label": "Previous month"
23697
23736
  }),
@@ -23708,7 +23747,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23708
23747
  direction: "right",
23709
23748
  size: 20
23710
23749
  }),
23711
- onClick: uo,
23750
+ onClick: mo,
23712
23751
  className: "hover:opacity-60",
23713
23752
  "aria-label": "Next month"
23714
23753
  })
@@ -23716,20 +23755,20 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23716
23755
  }),
23717
23756
  /* @__PURE__ */ jsx("div", {
23718
23757
  className: "mb-2 grid grid-cols-7",
23719
- children: fo.map((e) => /* @__PURE__ */ jsx("div", {
23758
+ children: ho.map((e) => /* @__PURE__ */ jsx("div", {
23720
23759
  className: "flex items-center justify-center p-0.5 text-[9px] font-bold text-neutral-900",
23721
23760
  children: e
23722
23761
  }, e))
23723
23762
  }),
23724
23763
  /* @__PURE__ */ jsx("div", {
23725
23764
  className: "grid grid-cols-7",
23726
- children: co.map(({ day: r, date: i, isCurrentMonth: a }) => {
23727
- let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), ao = f && isSameDay(i, f), h = u, g = s;
23765
+ children: A.map(({ day: r, date: i, isCurrentMonth: a }) => {
23766
+ let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), lo = f && isSameDay(i, f), h = u, g = s;
23728
23767
  e === "range" && u && !f && s && !isDateBefore(s, u) ? (h = u, g = s) : (h = null, g = null);
23729
- let so = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, h, g)), O = l || p || ao;
23768
+ let fo = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, h, g)), O = l || p || lo;
23730
23769
  return /* @__PURE__ */ jsx(Button, {
23731
23770
  type: "button",
23732
- onClick: () => A(i),
23771
+ onClick: () => R(i),
23733
23772
  onMouseEnter: () => {
23734
23773
  e === "range" && u && !f && !isDateBefore(i, u) && c(i);
23735
23774
  },
@@ -23740,7 +23779,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23740
23779
  "aria-label": `Select ${formatDate(i)}`,
23741
23780
  "aria-selected": O || void 0,
23742
23781
  children: /* @__PURE__ */ jsx("div", {
23743
- className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", O && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500", so && !O && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !O && !so && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !O && !so && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
23782
+ className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", O && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500", fo && !O && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !O && !fo && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !O && !fo && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
23744
23783
  children: r
23745
23784
  })
23746
23785
  }, `${i.getFullYear()}-${i.getMonth()}-${r}`);
@@ -23805,11 +23844,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
23805
23844
  function h(t) {
23806
23845
  e === "single" && (u || s(t), r?.(t));
23807
23846
  }
23808
- function so(t) {
23847
+ function fo(t) {
23809
23848
  e === "range" && (u || l(t), r?.(t));
23810
23849
  }
23811
23850
  function O() {
23812
- e === "single" ? h(null) : so({
23851
+ e === "single" ? h(null) : fo({
23813
23852
  startDate: null,
23814
23853
  endDate: null
23815
23854
  });
@@ -23827,7 +23866,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
23827
23866
  selectedDate: f,
23828
23867
  selectedRange: p,
23829
23868
  onDateSelect: h,
23830
- onRangeSelect: so
23869
+ onRangeSelect: fo
23831
23870
  })
23832
23871
  }) });
23833
23872
  }
@@ -24030,16 +24069,16 @@ function EventActionsList({ actions: e, className: t }) {
24030
24069
  }) })
24031
24070
  });
24032
24071
  }
24033
- 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: ao = {}, actions: h = {}, density: g = "normal", className: O, style: co, isPriority: A, isDone: lo }) {
24072
+ 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: lo = {}, actions: h = {}, density: g = "normal", className: O, style: A, isPriority: R, isDone: po }) {
24034
24073
  return /* @__PURE__ */ jsx(Card, {
24035
24074
  as: Pressable,
24036
24075
  onPress: u,
24037
24076
  className: cn(eventCardStyles({
24038
- tone: A ? "priority" : lo ? "done" : "default",
24077
+ tone: R ? "priority" : po ? "done" : "default",
24039
24078
  state: l ? "selected" : c ? "read" : "unread",
24040
24079
  density: g
24041
24080
  }), O),
24042
- style: co,
24081
+ style: A,
24043
24082
  "data-service": t,
24044
24083
  children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
24045
24084
  className: "gap-x-2 gap-y-1",
@@ -24076,7 +24115,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24076
24115
  }),
24077
24116
  /* @__PURE__ */ jsxs(CardFooter, {
24078
24117
  className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1",
24079
- children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: ao }), /* @__PURE__ */ jsx(EventActionsList, {
24118
+ children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: lo }), /* @__PURE__ */ jsx(EventActionsList, {
24080
24119
  actions: h,
24081
24120
  className: "col-start-2 justify-self-end"
24082
24121
  })]
@@ -24095,7 +24134,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24095
24134
  children: [
24096
24135
  e,
24097
24136
  /* @__PURE__ */ jsx(EventStatusesList, {
24098
- statusBadges: ao,
24137
+ statusBadges: lo,
24099
24138
  density: g
24100
24139
  }),
24101
24140
  /* @__PURE__ */ jsxs("div", {
@@ -24173,7 +24212,7 @@ function EventDetailContentCalendarDetails({ from: e, to: t, link: n, location:
24173
24212
  }
24174
24213
  function EventDetailPriority({ priorityText: e }) {
24175
24214
  return /* @__PURE__ */ jsxs("div", {
24176
- className: "sticky top-14 z-5 flex h-14 min-h-14 shrink-0 items-center gap-4 bg-tertiary-50 px-4 py-2",
24215
+ className: "sticky top-14 z-5 flex min-h-14 shrink-0 items-center gap-4 bg-tertiary-50 px-4 py-2",
24177
24216
  children: [/* @__PURE__ */ jsx(FireIcon, {
24178
24217
  size: 32,
24179
24218
  className: "text-tertiary-500-variant-2"
@@ -24593,7 +24632,7 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
24593
24632
  ]
24594
24633
  })] });
24595
24634
  }
24596
- function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related: ao }, className: h }) {
24635
+ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related: lo }, className: h }) {
24597
24636
  return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
24598
24637
  summary: e,
24599
24638
  priorityText: n,
@@ -24611,7 +24650,7 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
24611
24650
  reporter: u,
24612
24651
  team: f,
24613
24652
  location: p,
24614
- related: ao
24653
+ related: lo
24615
24654
  }),
24616
24655
  /* @__PURE__ */ jsx("h2", {
24617
24656
  className: "px-4 text-sm font-bold text-neutral-900",
@@ -24626,10 +24665,10 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
24626
24665
  }
24627
24666
  function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, timestamp: a, isPriority: o, isOpen: s, isFirstEvent: c, isSingleEvent: l, className: u }) {
24628
24667
  return /* @__PURE__ */ jsxs("div", {
24629
- className: cn("flex h-14 w-full items-center bg-white px-4 py-2", o && "relative", u),
24668
+ className: cn("flex h-14 w-full min-w-0 items-center overflow-hidden bg-white px-4 py-2", o && "relative", u),
24630
24669
  "data-priority": o,
24631
- children: [o && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 z-10 h-full w-1 bg-tertiary-500-variant-2" }), /* @__PURE__ */ jsxs("div", {
24632
- className: "flex w-full items-center gap-4",
24670
+ children: [o && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 z-10 h-full w-1 shrink-0 bg-tertiary-500-variant-2" }), /* @__PURE__ */ jsxs("div", {
24671
+ className: "flex w-full min-w-0 items-center gap-4 overflow-hidden",
24633
24672
  children: [
24634
24673
  c && /* @__PURE__ */ jsx(IconButton, {
24635
24674
  icon: /* @__PURE__ */ jsx(ArrowIcon, {
@@ -24651,27 +24690,27 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
24651
24690
  })
24652
24691
  }),
24653
24692
  /* @__PURE__ */ jsxs("div", {
24654
- className: "min-w-0 flex-1",
24693
+ className: "w-0 min-w-0 flex-1 overflow-hidden",
24655
24694
  children: [/* @__PURE__ */ jsx("h3", {
24656
- className: "line-clamp-1 truncate text-sm leading-[1.3] font-bold text-neutral-900",
24695
+ className: "block truncate text-sm leading-[1.3] font-bold text-neutral-900",
24657
24696
  children: n
24658
24697
  }), /* @__PURE__ */ jsx("div", {
24659
- className: "line-clamp-1 text-sm leading-[1.3] font-normal text-neutral-900",
24698
+ className: "block truncate text-sm leading-[1.3] font-normal text-neutral-900",
24660
24699
  children: t
24661
24700
  })]
24662
24701
  }),
24663
24702
  /* @__PURE__ */ jsxs("div", {
24664
- className: "leading-[1.2]tracking-[0.12px] flex items-center gap-1 text-right text-xs whitespace-nowrap",
24703
+ className: "flex max-w-[180px] min-w-0 shrink items-center gap-1 text-right text-xs leading-[1.2] tracking-[0.12px]",
24665
24704
  children: [r != null && /* @__PURE__ */ jsx("span", {
24666
- className: "font-normal text-neutral-600",
24705
+ className: "min-w-0 truncate font-normal text-neutral-600",
24667
24706
  children: r
24668
24707
  }), /* @__PURE__ */ jsx("span", {
24669
- className: "font-semibold text-neutral-800",
24708
+ className: "shrink-0 font-semibold whitespace-nowrap text-neutral-800",
24670
24709
  children: a
24671
24710
  })]
24672
24711
  }),
24673
24712
  /* @__PURE__ */ jsxs("div", {
24674
- className: "flex items-center gap-2",
24713
+ className: "flex shrink-0 items-center gap-2",
24675
24714
  children: [!l && /* @__PURE__ */ jsx(IconButton, {
24676
24715
  icon: /* @__PURE__ */ jsx(ArrowIcon, {
24677
24716
  size: 24,
@@ -25070,7 +25109,7 @@ function buildCallbacks({ onOpen: e, onClose: t, onAutoClose: n, onDismiss: r })
25070
25109
  onDismiss: r
25071
25110
  } : void 0;
25072
25111
  }
25073
- function showToast({ content: e, duration: t = DEFAULT_DURATION, position: n = DEFAULT_POSITION, persistent: r, onOpen: i, onClose: a, onAutoClose: o, onDismiss: s, key: c, refresh: l = !1 }) {
25112
+ function showToast({ content: e, duration: t = DEFAULT_DURATION, position: n = DEFAULT_POSITION, persistent: r, onOpen: i, onClose: a, onAutoClose: o, onDismiss: s, key: c, refresh: l = !1, dismissPrevious: u = !1 }) {
25074
25113
  if (c) {
25075
25114
  let n = toastStore.getActiveToastIdByKey(c);
25076
25115
  if (n) return l && toastStore.update(n, {
@@ -25082,9 +25121,10 @@ function showToast({ content: e, duration: t = DEFAULT_DURATION, position: n = D
25082
25121
  deduplicated: !0
25083
25122
  };
25084
25123
  }
25085
- let u = crypto.randomUUID();
25124
+ u && toastStore.removeAllAtPosition(n);
25125
+ let f = crypto.randomUUID();
25086
25126
  return toastStore.add({
25087
- id: u,
25127
+ id: f,
25088
25128
  content: e,
25089
25129
  duration: t,
25090
25130
  position: n,
@@ -25095,10 +25135,11 @@ function showToast({ content: e, duration: t = DEFAULT_DURATION, position: n = D
25095
25135
  onAutoClose: o,
25096
25136
  onDismiss: s
25097
25137
  }),
25098
- key: c
25138
+ key: c,
25139
+ singleSlot: u
25099
25140
  }), {
25100
- id: u,
25101
- dismiss: () => toastStore.remove(u),
25141
+ id: f,
25142
+ dismiss: () => toastStore.remove(f),
25102
25143
  deduplicated: !1
25103
25144
  };
25104
25145
  }