import { r as tt, i as et, s as it, x as F, e as rt } from "./query-assigned-elements-D930kELM.mjs";
import { n as C } from "./property-DJzm_oB9.mjs";
import { i as X } from "./query-CDOd1Kwm.mjs";
import { a as ot } from "./utils-Dr5MegQq.mjs";
import { _ as nt, a as Y, c as x, e as $, f as q } from "./tslib.es6-CJ7TUrOc.mjs";
import { A as at, n as st, K as lt } from "./keyboard-BLpVBEDM.mjs";
import { M as dt } from "./foundation-PL3XY-m_.mjs";
/**
 * @license
 * Copyright 2020 Google Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
var S;
(function(i) {
  i.RICH = "mdc-tooltip--rich", i.SHOWN = "mdc-tooltip--shown", i.SHOWING = "mdc-tooltip--showing", i.SHOWING_TRANSITION = "mdc-tooltip--showing-transition", i.HIDE = "mdc-tooltip--hide", i.HIDE_TRANSITION = "mdc-tooltip--hide-transition", i.MULTILINE_TOOLTIP = "mdc-tooltip--multiline", i.SURFACE = "mdc-tooltip__surface", i.SURFACE_ANIMATION = "mdc-tooltip__surface-animation", i.TOOLTIP_CARET_TOP = "mdc-tooltip__caret-surface-top", i.TOOLTIP_CARET_BOTTOM = "mdc-tooltip__caret-surface-bottom";
})(S || (S = {}));
var _ = {
  BOUNDED_ANCHOR_GAP: 4,
  UNBOUNDED_ANCHOR_GAP: 8,
  MIN_VIEWPORT_TOOLTIP_THRESHOLD: 8,
  HIDE_DELAY_MS: 600,
  SHOW_DELAY_MS: 500,
  // LINT.IfChange(tooltip-dimensions)
  MIN_WIDTH: 40,
  MIN_HEIGHT: 24,
  MAX_WIDTH: 200,
  // LINT.ThenChange(_tooltip.scss:tooltip-dimensions)
  CARET_INDENTATION: 24,
  // LINT.IfChange(tooltip-anim-scale)
  ANIMATION_SCALE: 0.8,
  // LINT.ThenChange(_tooltip.scss:tooltip-anim-scale)
  // LINT.IfChange(rich-tooltip-dimensions)
  RICH_MAX_WIDTH: 320
  // LINT.ThenChange(_tooltip.scss:rich-tooltip-dimensions)
}, W = {
  ARIA_EXPANDED: "aria-expanded",
  ARIA_HASPOPUP: "aria-haspopup",
  PERSISTENT: "data-mdc-tooltip-persistent",
  HAS_CARET: "data-mdc-tooltip-has-caret"
}, j = {
  HIDDEN: "MDCTooltip:hidden",
  SHOWN: "MDCTooltip:shown"
}, D;
(function(i) {
  i[i.DETECTED = 0] = "DETECTED", i[i.START = 1] = "START", i[i.CENTER = 2] = "CENTER", i[i.END = 3] = "END", i[i.SIDE_START = 4] = "SIDE_START", i[i.SIDE_END = 5] = "SIDE_END";
})(D || (D = {}));
var N;
(function(i) {
  i[i.DETECTED = 0] = "DETECTED", i[i.ABOVE = 1] = "ABOVE", i[i.BELOW = 2] = "BELOW", i[i.SIDE = 3] = "SIDE";
})(N || (N = {}));
var U;
(function(i) {
  i[i.BOUNDED = 0] = "BOUNDED", i[i.UNBOUNDED = 1] = "UNBOUNDED";
})(U || (U = {}));
var c = {
  LEFT: "left",
  RIGHT: "right",
  CENTER: "center",
  TOP: "top",
  BOTTOM: "bottom"
}, p;
(function(i) {
  i[i.DETECTED = 0] = "DETECTED", i[i.ABOVE_START = 1] = "ABOVE_START", i[i.ABOVE_CENTER = 2] = "ABOVE_CENTER", i[i.ABOVE_END = 3] = "ABOVE_END", i[i.TOP_SIDE_START = 4] = "TOP_SIDE_START", i[i.CENTER_SIDE_START = 5] = "CENTER_SIDE_START", i[i.BOTTOM_SIDE_START = 6] = "BOTTOM_SIDE_START", i[i.TOP_SIDE_END = 7] = "TOP_SIDE_END", i[i.CENTER_SIDE_END = 8] = "CENTER_SIDE_END", i[i.BOTTOM_SIDE_END = 9] = "BOTTOM_SIDE_END", i[i.BELOW_START = 10] = "BELOW_START", i[i.BELOW_CENTER = 11] = "BELOW_CENTER", i[i.BELOW_END = 12] = "BELOW_END";
})(p || (p = {}));
var O;
(function(i) {
  i[i.ABOVE = 1] = "ABOVE", i[i.BELOW = 2] = "BELOW", i[i.SIDE_TOP = 3] = "SIDE_TOP", i[i.SIDE_CENTER = 4] = "SIDE_CENTER", i[i.SIDE_BOTTOM = 5] = "SIDE_BOTTOM";
})(O || (O = {}));
var u;
(function(i) {
  i[i.START = 1] = "START", i[i.CENTER = 2] = "CENTER", i[i.END = 3] = "END", i[i.SIDE_START = 4] = "SIDE_START", i[i.SIDE_END = 5] = "SIDE_END";
})(u || (u = {}));
/**
 * @license
 * Copyright 2016 Google Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
var J = {
  animation: {
    prefixed: "-webkit-animation",
    standard: "animation"
  },
  transform: {
    prefixed: "-webkit-transform",
    standard: "transform"
  },
  transition: {
    prefixed: "-webkit-transition",
    standard: "transition"
  }
};
function ct(i) {
  return !!i.document && typeof i.document.createElement == "function";
}
function Q(i, o) {
  if (ct(i) && o in J) {
    var t = i.document.createElement("div"), r = J[o], e = r.standard, n = r.prefixed, a = e in t.style;
    return a ? e : n;
  }
  return o;
}
/**
 * @license
 * Copyright 2020 Google Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
var ht = S.RICH, G = S.SHOWN, z = S.SHOWING, V = S.SHOWING_TRANSITION, M = S.HIDE, k = S.HIDE_TRANSITION, pt = S.MULTILINE_TOOLTIP, K;
(function(i) {
  i.POLL_ANCHOR = "poll_anchor";
})(K || (K = {}));
var Z = typeof window < "u", ut = (
  /** @class */
  function(i) {
    nt(o, i);
    function o(t) {
      var r = i.call(this, Y(Y({}, o.defaultAdapter), t)) || this;
      return r.tooltipShown = !1, r.anchorGap = _.BOUNDED_ANCHOR_GAP, r.xTooltipPos = D.DETECTED, r.yTooltipPos = N.DETECTED, r.tooltipPositionWithCaret = p.DETECTED, r.minViewportTooltipThreshold = _.MIN_VIEWPORT_TOOLTIP_THRESHOLD, r.hideDelayMs = _.HIDE_DELAY_MS, r.showDelayMs = _.SHOW_DELAY_MS, r.anchorRect = null, r.parentRect = null, r.frameId = null, r.hideTimeout = null, r.showTimeout = null, r.addAncestorScrollEventListeners = new Array(), r.removeAncestorScrollEventListeners = new Array(), r.animFrame = new at(), r.anchorBlurHandler = function(e) {
        r.handleAnchorBlur(e);
      }, r.documentClickHandler = function(e) {
        r.handleDocumentClick(e);
      }, r.documentKeydownHandler = function(e) {
        r.handleKeydown(e);
      }, r.tooltipMouseEnterHandler = function() {
        r.handleTooltipMouseEnter();
      }, r.tooltipMouseLeaveHandler = function() {
        r.handleTooltipMouseLeave();
      }, r.richTooltipFocusOutHandler = function(e) {
        r.handleRichTooltipFocusOut(e);
      }, r.windowScrollHandler = function() {
        r.handleWindowScrollEvent();
      }, r.windowResizeHandler = function() {
        r.handleWindowChangeEvent();
      }, r;
    }
    return Object.defineProperty(o, "defaultAdapter", {
      get: function() {
        return {
          getAttribute: function() {
            return null;
          },
          setAttribute: function() {
          },
          removeAttribute: function() {
          },
          addClass: function() {
          },
          hasClass: function() {
            return !1;
          },
          removeClass: function() {
          },
          getComputedStyleProperty: function() {
            return "";
          },
          setStyleProperty: function() {
          },
          setSurfaceAnimationStyleProperty: function() {
          },
          getViewportWidth: function() {
            return 0;
          },
          getViewportHeight: function() {
            return 0;
          },
          getTooltipSize: function() {
            return { width: 0, height: 0 };
          },
          getAnchorBoundingRect: function() {
            return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
          },
          getParentBoundingRect: function() {
            return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
          },
          getAnchorAttribute: function() {
            return null;
          },
          setAnchorAttribute: function() {
            return null;
          },
          isRTL: function() {
            return !1;
          },
          anchorContainsElement: function() {
            return !1;
          },
          tooltipContainsElement: function() {
            return !1;
          },
          focusAnchorElement: function() {
          },
          registerEventHandler: function() {
          },
          deregisterEventHandler: function() {
          },
          registerAnchorEventHandler: function() {
          },
          deregisterAnchorEventHandler: function() {
          },
          registerDocumentEventHandler: function() {
          },
          deregisterDocumentEventHandler: function() {
          },
          registerWindowEventHandler: function() {
          },
          deregisterWindowEventHandler: function() {
          },
          notifyHidden: function() {
          },
          notifyShown: function() {
          },
          getTooltipCaretBoundingRect: function() {
            return { top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 };
          },
          setTooltipCaretStyle: function() {
          },
          clearTooltipCaretStyles: function() {
          },
          getActiveElement: function() {
            return null;
          },
          isInstanceOfElement: function() {
            return !1;
          }
        };
      },
      enumerable: !1,
      configurable: !0
    }), o.prototype.init = function() {
      this.richTooltip = this.adapter.hasClass(ht), this.persistentTooltip = this.adapter.getAttribute(W.PERSISTENT) === "true", this.interactiveTooltip = !!this.adapter.getAnchorAttribute(W.ARIA_EXPANDED) && this.adapter.getAnchorAttribute(W.ARIA_HASPOPUP) === "dialog", this.hasCaret = this.richTooltip && this.adapter.getAttribute(W.HAS_CARET) === "true";
    }, o.prototype.isShown = function() {
      return this.tooltipShown;
    }, o.prototype.isRich = function() {
      return this.richTooltip;
    }, o.prototype.isPersistent = function() {
      return this.persistentTooltip;
    }, o.prototype.handleAnchorMouseEnter = function() {
      var t = this;
      this.tooltipShown ? this.show() : (this.clearHideTimeout(), this.showTimeout = setTimeout(function() {
        t.show();
      }, this.showDelayMs));
    }, o.prototype.handleAnchorTouchstart = function() {
      var t = this;
      this.showTimeout = setTimeout(function() {
        t.show();
      }, this.showDelayMs), this.adapter.registerWindowEventHandler("contextmenu", this.preventContextMenuOnLongTouch);
    }, o.prototype.preventContextMenuOnLongTouch = function(t) {
      t.preventDefault();
    }, o.prototype.tooltipContainsRelatedTargetElement = function(t) {
      return this.adapter.isInstanceOfElement(t) && this.adapter.tooltipContainsElement(t);
    }, o.prototype.anchorOrTooltipContainsTargetElement = function(t) {
      return this.adapter.isInstanceOfElement(t) && (this.adapter.tooltipContainsElement(t) || this.adapter.anchorContainsElement(t));
    }, o.prototype.handleAnchorTouchend = function() {
      this.clearShowTimeout(), this.isShown() || this.adapter.deregisterWindowEventHandler("contextmenu", this.preventContextMenuOnLongTouch);
    }, o.prototype.handleAnchorFocus = function(t) {
      var r = this;
      this.tooltipContainsRelatedTargetElement(t.relatedTarget) || (this.showTimeout = setTimeout(function() {
        r.show();
      }, this.showDelayMs));
    }, o.prototype.handleAnchorMouseLeave = function() {
      var t = this;
      this.clearShowTimeout(), this.hideTimeout = setTimeout(function() {
        t.hide();
      }, this.hideDelayMs);
    }, o.prototype.handleAnchorClick = function() {
      this.tooltipShown ? this.hide() : this.show();
    }, o.prototype.handleDocumentClick = function(t) {
      this.richTooltip && this.persistentTooltip && this.anchorOrTooltipContainsTargetElement(t.target) || this.hide();
    }, o.prototype.handleKeydown = function(t) {
      var r = st(t);
      if (r === lt.ESCAPE) {
        var e = this.adapter.getActiveElement(), n = !1;
        return this.adapter.isInstanceOfElement(e) && (n = this.adapter.tooltipContainsElement(e)), n && this.adapter.focusAnchorElement(), this.hide(), t.stopPropagation(), !1;
      }
      return !0;
    }, o.prototype.handleAnchorBlur = function(t) {
      this.richTooltip && (t.relatedTarget === null || this.tooltipContainsRelatedTargetElement(t.relatedTarget)) || this.hide();
    }, o.prototype.handleTooltipMouseEnter = function() {
      this.show();
    }, o.prototype.handleTooltipMouseLeave = function() {
      var t = this;
      this.clearShowTimeout(), this.hideTimeout = setTimeout(function() {
        t.hide();
      }, this.hideDelayMs);
    }, o.prototype.handleRichTooltipFocusOut = function(t) {
      this.anchorOrTooltipContainsTargetElement(t.relatedTarget) || t.relatedTarget === null && this.interactiveTooltip || this.hide();
    }, o.prototype.handleWindowScrollEvent = function() {
      this.persistentTooltip || this.hide();
    }, o.prototype.handleWindowChangeEvent = function() {
      var t = this;
      this.animFrame.request(K.POLL_ANCHOR, function() {
        t.repositionTooltipOnAnchorMove();
      });
    }, o.prototype.show = function() {
      var t, r, e = this;
      if (this.clearHideTimeout(), this.clearShowTimeout(), !this.tooltipShown) {
        this.tooltipShown = !0, this.adapter.removeAttribute("aria-hidden"), this.richTooltip && (this.interactiveTooltip && this.adapter.setAnchorAttribute("aria-expanded", "true"), this.adapter.registerEventHandler("focusout", this.richTooltipFocusOutHandler)), this.persistentTooltip || (this.adapter.registerEventHandler("mouseenter", this.tooltipMouseEnterHandler), this.adapter.registerEventHandler("mouseleave", this.tooltipMouseLeaveHandler)), this.adapter.removeClass(M), this.adapter.addClass(z), this.isTooltipMultiline() && !this.richTooltip && this.adapter.addClass(pt), this.anchorRect = this.adapter.getAnchorBoundingRect(), this.parentRect = this.adapter.getParentBoundingRect(), this.richTooltip ? this.positionRichTooltip() : this.positionPlainTooltip(), this.adapter.registerAnchorEventHandler("blur", this.anchorBlurHandler), this.adapter.registerDocumentEventHandler("click", this.documentClickHandler), this.adapter.registerDocumentEventHandler("keydown", this.documentKeydownHandler), this.adapter.registerWindowEventHandler("scroll", this.windowScrollHandler), this.adapter.registerWindowEventHandler("resize", this.windowResizeHandler);
        try {
          for (var n = x(this.addAncestorScrollEventListeners), a = n.next(); !a.done; a = n.next()) {
            var d = a.value;
            d();
          }
        } catch (h) {
          t = { error: h };
        } finally {
          try {
            a && !a.done && (r = n.return) && r.call(n);
          } finally {
            if (t) throw t.error;
          }
        }
        this.frameId = requestAnimationFrame(function() {
          e.clearAllAnimationClasses(), e.adapter.addClass(G), e.adapter.addClass(V);
        });
      }
    }, o.prototype.hide = function() {
      var t, r;
      if (this.clearHideTimeout(), this.clearShowTimeout(), !!this.tooltipShown) {
        this.frameId && cancelAnimationFrame(this.frameId), this.tooltipShown = !1, this.adapter.setAttribute("aria-hidden", "true"), this.adapter.deregisterEventHandler("focusout", this.richTooltipFocusOutHandler), this.richTooltip && this.interactiveTooltip && this.adapter.setAnchorAttribute("aria-expanded", "false"), this.persistentTooltip || (this.adapter.deregisterEventHandler("mouseenter", this.tooltipMouseEnterHandler), this.adapter.deregisterEventHandler("mouseleave", this.tooltipMouseLeaveHandler)), this.clearAllAnimationClasses(), this.adapter.addClass(M), this.adapter.addClass(k), this.adapter.removeClass(G), this.adapter.deregisterAnchorEventHandler("blur", this.anchorBlurHandler), this.adapter.deregisterDocumentEventHandler("click", this.documentClickHandler), this.adapter.deregisterDocumentEventHandler("keydown", this.documentKeydownHandler), this.adapter.deregisterWindowEventHandler("scroll", this.windowScrollHandler), this.adapter.deregisterWindowEventHandler("resize", this.windowResizeHandler), this.adapter.deregisterWindowEventHandler("contextmenu", this.preventContextMenuOnLongTouch);
        try {
          for (var e = x(this.removeAncestorScrollEventListeners), n = e.next(); !n.done; n = e.next()) {
            var a = n.value;
            a();
          }
        } catch (d) {
          t = { error: d };
        } finally {
          try {
            n && !n.done && (r = e.return) && r.call(e);
          } finally {
            if (t) throw t.error;
          }
        }
      }
    }, o.prototype.handleTransitionEnd = function() {
      var t = this.adapter.hasClass(M);
      this.adapter.removeClass(z), this.adapter.removeClass(V), this.adapter.removeClass(M), this.adapter.removeClass(k), t && this.showTimeout === null ? this.adapter.notifyHidden() : t || this.adapter.notifyShown();
    }, o.prototype.clearAllAnimationClasses = function() {
      this.adapter.removeClass(V), this.adapter.removeClass(k);
    }, o.prototype.setTooltipPosition = function(t) {
      var r = t.xPos, e = t.yPos, n = t.withCaretPos;
      if (this.hasCaret && n) {
        this.tooltipPositionWithCaret = n;
        return;
      }
      r && (this.xTooltipPos = r), e && (this.yTooltipPos = e);
    }, o.prototype.setAnchorBoundaryType = function(t) {
      t === U.UNBOUNDED ? this.anchorGap = _.UNBOUNDED_ANCHOR_GAP : this.anchorGap = _.BOUNDED_ANCHOR_GAP;
    }, o.prototype.setShowDelay = function(t) {
      this.showDelayMs = t;
    }, o.prototype.setHideDelay = function(t) {
      this.hideDelayMs = t;
    }, o.prototype.isTooltipMultiline = function() {
      var t = this.adapter.getTooltipSize();
      return t.height > _.MIN_HEIGHT && t.width >= _.MAX_WIDTH;
    }, o.prototype.positionPlainTooltip = function() {
      var t = this.calculateTooltipStyles(this.anchorRect), r = t.top, e = t.yTransformOrigin, n = t.left, a = t.xTransformOrigin, d = Z ? Q(window, "transform") : "transform";
      this.adapter.setSurfaceAnimationStyleProperty(d + "-origin", a + " " + e), this.adapter.setStyleProperty("top", r + "px"), this.adapter.setStyleProperty("left", n + "px");
    }, o.prototype.positionRichTooltip = function() {
      var t, r, e, n;
      this.adapter.setStyleProperty("width", ""), this.adapter.setStyleProperty("left", "-" + _.RICH_MAX_WIDTH + "px");
      var a = Number(this.adapter.getComputedStyleProperty("width").slice(0, -2)), d = isFinite(a) ? a : _.RICH_MAX_WIDTH, h = Math.max(this.adapter.getViewportWidth() - 2 * _.MIN_VIEWPORT_TOOLTIP_THRESHOLD, _.MIN_WIDTH), s = Math.min(h, d);
      this.adapter.setStyleProperty("width", s + "px");
      var l = this.hasCaret ? this.calculateTooltipWithCaretStyles(this.anchorRect) : this.calculateTooltipStyles(this.anchorRect), T = l.top, y = l.yTransformOrigin, v = l.left, f = l.xTransformOrigin, E = Z ? Q(window, "transform") : "transform";
      this.adapter.setSurfaceAnimationStyleProperty(E + "-origin", f + " " + y);
      var g = v - ((r = (t = this.parentRect) === null || t === void 0 ? void 0 : t.left) !== null && r !== void 0 ? r : 0), m = T - ((n = (e = this.parentRect) === null || e === void 0 ? void 0 : e.top) !== null && n !== void 0 ? n : 0);
      this.adapter.setStyleProperty("top", m + "px"), this.adapter.setStyleProperty("left", g + "px");
    }, o.prototype.calculateTooltipStyles = function(t) {
      if (!t)
        return { top: 0, left: 0 };
      var r = this.adapter.getTooltipSize(), e = this.calculateYTooltipDistance(t, r.height), n = this.calculateXTooltipDistance(t, r.width);
      return {
        top: e.distance,
        yTransformOrigin: e.yTransformOrigin,
        left: n.distance,
        xTransformOrigin: n.xTransformOrigin
      };
    }, o.prototype.calculateXTooltipDistance = function(t, r) {
      var e = !this.adapter.isRTL(), n, a, d, h, s, l, T;
      if (this.richTooltip)
        n = e ? t.left - r : t.right, a = e ? t.right : t.left - r, l = e ? c.RIGHT : c.LEFT, T = e ? c.LEFT : c.RIGHT;
      else {
        n = e ? t.left : t.right - r, a = e ? t.right - r : t.left, d = t.left + (t.width - r) / 2;
        var y = t.left - (r + this.anchorGap), v = t.right + this.anchorGap;
        h = e ? y : v, s = e ? v : y, l = e ? c.LEFT : c.RIGHT, T = e ? c.RIGHT : c.LEFT;
      }
      var f = [n, d, a];
      this.xTooltipPos === D.SIDE_START ? f.push(h) : this.xTooltipPos === D.SIDE_END && f.push(s);
      var E = this.richTooltip ? this.determineValidPositionOptions(n, a) : this.determineValidPositionOptions.apply(this, $([], q(f)));
      if (this.xTooltipPos === D.START && E.has(n))
        return { distance: n, xTransformOrigin: l };
      if (this.xTooltipPos === D.END && E.has(a))
        return { distance: a, xTransformOrigin: T };
      if (this.xTooltipPos === D.CENTER && E.has(d))
        return { distance: d, xTransformOrigin: c.CENTER };
      if (this.xTooltipPos === D.SIDE_START && E.has(h))
        return { distance: h, xTransformOrigin: T };
      if (this.xTooltipPos === D.SIDE_END && E.has(s))
        return { distance: s, xTransformOrigin: l };
      var g = this.richTooltip ? [
        { distance: a, xTransformOrigin: T },
        { distance: n, xTransformOrigin: l }
      ] : [
        { distance: d, xTransformOrigin: c.CENTER },
        { distance: n, xTransformOrigin: l },
        { distance: a, xTransformOrigin: T }
      ], m = g.find(function(H) {
        var b = H.distance;
        return E.has(b);
      });
      if (m)
        return m;
      if (t.left < 0)
        return {
          distance: this.minViewportTooltipThreshold,
          xTransformOrigin: c.LEFT
        };
      var w = this.adapter.getViewportWidth(), I = w - (r + this.minViewportTooltipThreshold);
      return { distance: I, xTransformOrigin: c.RIGHT };
    }, o.prototype.determineValidPositionOptions = function() {
      for (var t, r, e = [], n = 0; n < arguments.length; n++)
        e[n] = arguments[n];
      var a = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
      try {
        for (var h = x(e), s = h.next(); !s.done; s = h.next()) {
          var l = s.value;
          this.positionHonorsViewportThreshold(l) ? a.add(l) : this.positionDoesntCollideWithViewport(l) && d.add(l);
        }
      } catch (T) {
        t = { error: T };
      } finally {
        try {
          s && !s.done && (r = h.return) && r.call(h);
        } finally {
          if (t) throw t.error;
        }
      }
      return a.size ? a : d;
    }, o.prototype.positionHonorsViewportThreshold = function(t) {
      var r = this.adapter.getViewportWidth(), e = this.adapter.getTooltipSize().width;
      return t + e <= r - this.minViewportTooltipThreshold && t >= this.minViewportTooltipThreshold;
    }, o.prototype.positionDoesntCollideWithViewport = function(t) {
      var r = this.adapter.getViewportWidth(), e = this.adapter.getTooltipSize().width;
      return t + e <= r && t >= 0;
    }, o.prototype.calculateYTooltipDistance = function(t, r) {
      var e = t.bottom + this.anchorGap, n = t.top - (this.anchorGap + r), a = t.top + t.height / 2, d = a - r / 2, h = [n, e];
      this.yTooltipPos === N.SIDE && h.push(d);
      var s = this.determineValidYPositionOptions.apply(this, $([], q(h)));
      return this.yTooltipPos === N.ABOVE && s.has(n) ? { distance: n, yTransformOrigin: c.BOTTOM } : this.yTooltipPos === N.BELOW && s.has(e) ? { distance: e, yTransformOrigin: c.TOP } : this.yTooltipPos === N.SIDE && s.has(d) ? { distance: d, yTransformOrigin: c.CENTER } : s.has(e) ? { distance: e, yTransformOrigin: c.TOP } : s.has(n) ? { distance: n, yTransformOrigin: c.BOTTOM } : { distance: e, yTransformOrigin: c.TOP };
    }, o.prototype.determineValidYPositionOptions = function() {
      for (var t, r, e = [], n = 0; n < arguments.length; n++)
        e[n] = arguments[n];
      var a = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
      try {
        for (var h = x(e), s = h.next(); !s.done; s = h.next()) {
          var l = s.value;
          this.yPositionHonorsViewportThreshold(l) ? a.add(l) : this.yPositionDoesntCollideWithViewport(l) && d.add(l);
        }
      } catch (T) {
        t = { error: T };
      } finally {
        try {
          s && !s.done && (r = h.return) && r.call(h);
        } finally {
          if (t) throw t.error;
        }
      }
      return a.size ? a : d;
    }, o.prototype.yPositionHonorsViewportThreshold = function(t) {
      var r = this.adapter.getViewportHeight(), e = this.adapter.getTooltipSize().height;
      return t + e + this.minViewportTooltipThreshold <= r && t >= this.minViewportTooltipThreshold;
    }, o.prototype.yPositionDoesntCollideWithViewport = function(t) {
      var r = this.adapter.getViewportHeight(), e = this.adapter.getTooltipSize().height;
      return t + e <= r && t >= 0;
    }, o.prototype.calculateTooltipWithCaretStyles = function(t) {
      this.adapter.clearTooltipCaretStyles();
      var r = this.adapter.getTooltipCaretBoundingRect();
      if (!t || !r)
        return { position: p.DETECTED, top: 0, left: 0 };
      var e = r.width / _.ANIMATION_SCALE, n = r.height / _.ANIMATION_SCALE / 2, a = this.adapter.getTooltipSize(), d = this.calculateYWithCaretDistanceOptions(t, a.height, { caretWidth: e, caretHeight: n }), h = this.calculateXWithCaretDistanceOptions(t, a.width, { caretWidth: e, caretHeight: n }), s = this.validateTooltipWithCaretDistances(d, h);
      s.size < 1 && (s = this.generateBackupPositionOption(t, a, { caretWidth: e, caretHeight: n }));
      var l = this.determineTooltipWithCaretDistance(s), T = l.position, y = l.xDistance, v = l.yDistance, f = this.setCaretPositionStyles(T, { caretWidth: e, caretHeight: n }), E = f.yTransformOrigin, g = f.xTransformOrigin;
      return {
        yTransformOrigin: E,
        xTransformOrigin: g,
        top: v,
        left: y
      };
    }, o.prototype.calculateXWithCaretDistanceOptions = function(t, r, e) {
      var n = e.caretWidth, a = e.caretHeight, d = !this.adapter.isRTL(), h = t.left + t.width / 2, s = t.left - (r + this.anchorGap + a), l = t.right + this.anchorGap + a, T = d ? s : l, y = d ? l : s, v = h - (_.CARET_INDENTATION + n / 2), f = h - (r - _.CARET_INDENTATION - n / 2), E = d ? v : f, g = d ? f : v, m = h - r / 2, w = /* @__PURE__ */ new Map([
        [u.START, E],
        [u.CENTER, m],
        [u.END, g],
        [u.SIDE_END, y],
        [u.SIDE_START, T]
      ]);
      return w;
    }, o.prototype.calculateYWithCaretDistanceOptions = function(t, r, e) {
      var n = e.caretWidth, a = e.caretHeight, d = t.top + t.height / 2, h = t.bottom + this.anchorGap + a, s = t.top - (this.anchorGap + r + a), l = d - (_.CARET_INDENTATION + n / 2), T = d - r / 2, y = d - (r - _.CARET_INDENTATION - n / 2), v = /* @__PURE__ */ new Map([
        [O.ABOVE, s],
        [O.BELOW, h],
        [O.SIDE_TOP, l],
        [O.SIDE_CENTER, T],
        [O.SIDE_BOTTOM, y]
      ]);
      return v;
    }, o.prototype.repositionTooltipOnAnchorMove = function() {
      var t = this.adapter.getAnchorBoundingRect();
      if (!(!t || !this.anchorRect)) {
        var r = this.adapter.getViewportHeight();
        t.top + t.height < 0 || t.bottom - t.height >= r || (t.top !== this.anchorRect.top || t.left !== this.anchorRect.left || t.height !== this.anchorRect.height || t.width !== this.anchorRect.width) && (this.anchorRect = t, this.parentRect = this.adapter.getParentBoundingRect(), this.richTooltip ? this.positionRichTooltip() : this.positionPlainTooltip());
      }
    }, o.prototype.validateTooltipWithCaretDistances = function(t, r) {
      var e, n, a, d, h, s, l = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map([
        [
          O.ABOVE,
          [
            u.START,
            u.CENTER,
            u.END
          ]
        ],
        [
          O.BELOW,
          [
            u.START,
            u.CENTER,
            u.END
          ]
        ],
        [
          O.SIDE_TOP,
          [u.SIDE_START, u.SIDE_END]
        ],
        [
          O.SIDE_CENTER,
          [u.SIDE_START, u.SIDE_END]
        ],
        [
          O.SIDE_BOTTOM,
          [u.SIDE_START, u.SIDE_END]
        ]
      ]);
      try {
        for (var v = x(y.keys()), f = v.next(); !f.done; f = v.next()) {
          var E = f.value, g = t.get(E);
          if (this.yPositionHonorsViewportThreshold(g))
            try {
              for (var m = (a = void 0, x(y.get(E))), w = m.next(); !w.done; w = m.next()) {
                var I = w.value, H = r.get(I);
                if (this.positionHonorsViewportThreshold(H)) {
                  var b = this.caretPositionOptionsMapping(I, E);
                  l.set(b, { xDistance: H, yDistance: g });
                }
              }
            } catch (L) {
              a = { error: L };
            } finally {
              try {
                w && !w.done && (d = m.return) && d.call(m);
              } finally {
                if (a) throw a.error;
              }
            }
          if (this.yPositionDoesntCollideWithViewport(g))
            try {
              for (var B = (h = void 0, x(y.get(E))), P = B.next(); !P.done; P = B.next()) {
                var I = P.value, H = r.get(I);
                if (this.positionDoesntCollideWithViewport(H)) {
                  var b = this.caretPositionOptionsMapping(I, E);
                  T.set(b, { xDistance: H, yDistance: g });
                }
              }
            } catch (L) {
              h = { error: L };
            } finally {
              try {
                P && !P.done && (s = B.return) && s.call(B);
              } finally {
                if (h) throw h.error;
              }
            }
        }
      } catch (L) {
        e = { error: L };
      } finally {
        try {
          f && !f.done && (n = v.return) && n.call(v);
        } finally {
          if (e) throw e.error;
        }
      }
      return l.size ? l : T;
    }, o.prototype.generateBackupPositionOption = function(t, r, e) {
      var n = !this.adapter.isRTL(), a, d;
      if (t.left < 0)
        a = this.minViewportTooltipThreshold + e.caretHeight, d = n ? u.END : u.START;
      else {
        var h = this.adapter.getViewportWidth();
        a = h - (r.width + this.minViewportTooltipThreshold + e.caretHeight), d = n ? u.START : u.END;
      }
      var s, l;
      if (t.top < 0)
        s = this.minViewportTooltipThreshold + e.caretHeight, l = O.BELOW;
      else {
        var T = this.adapter.getViewportHeight();
        s = T - (r.height + this.minViewportTooltipThreshold + e.caretHeight), l = O.ABOVE;
      }
      var y = this.caretPositionOptionsMapping(d, l);
      return /* @__PURE__ */ new Map([[y, { xDistance: a, yDistance: s }]]);
    }, o.prototype.determineTooltipWithCaretDistance = function(t) {
      if (t.has(this.tooltipPositionWithCaret)) {
        var r = t.get(this.tooltipPositionWithCaret);
        return {
          position: this.tooltipPositionWithCaret,
          xDistance: r.xDistance,
          yDistance: r.yDistance
        };
      }
      var e = [
        p.ABOVE_START,
        p.ABOVE_CENTER,
        p.ABOVE_END,
        p.TOP_SIDE_START,
        p.CENTER_SIDE_START,
        p.BOTTOM_SIDE_START,
        p.TOP_SIDE_END,
        p.CENTER_SIDE_END,
        p.BOTTOM_SIDE_END,
        p.BELOW_START,
        p.BELOW_CENTER,
        p.BELOW_END
      ], n = e.find(function(d) {
        return t.has(d);
      }), a = t.get(n);
      return {
        position: n,
        xDistance: a.xDistance,
        yDistance: a.yDistance
      };
    }, o.prototype.caretPositionOptionsMapping = function(t, r) {
      switch (r) {
        case O.ABOVE:
          if (t === u.START)
            return p.ABOVE_START;
          if (t === u.CENTER)
            return p.ABOVE_CENTER;
          if (t === u.END)
            return p.ABOVE_END;
          break;
        case O.BELOW:
          if (t === u.START)
            return p.BELOW_START;
          if (t === u.CENTER)
            return p.BELOW_CENTER;
          if (t === u.END)
            return p.BELOW_END;
          break;
        case O.SIDE_TOP:
          if (t === u.SIDE_START)
            return p.TOP_SIDE_START;
          if (t === u.SIDE_END)
            return p.TOP_SIDE_END;
          break;
        case O.SIDE_CENTER:
          if (t === u.SIDE_START)
            return p.CENTER_SIDE_START;
          if (t === u.SIDE_END)
            return p.CENTER_SIDE_END;
          break;
        case O.SIDE_BOTTOM:
          if (t === u.SIDE_START)
            return p.BOTTOM_SIDE_START;
          if (t === u.SIDE_END)
            return p.BOTTOM_SIDE_END;
          break;
      }
      throw new Error("MDCTooltipFoundation: Invalid caret position of " + t + ", " + r);
    }, o.prototype.setCaretPositionStyles = function(t, r) {
      var e, n, a = this.calculateCaretPositionOnTooltip(t, r);
      if (!a)
        return { yTransformOrigin: 0, xTransformOrigin: 0 };
      this.adapter.clearTooltipCaretStyles(), this.adapter.setTooltipCaretStyle(a.yAlignment, a.yAxisPx), this.adapter.setTooltipCaretStyle(a.xAlignment, a.xAxisPx);
      var d = a.skew * (Math.PI / 180), h = Math.cos(d);
      this.adapter.setTooltipCaretStyle("transform", "rotate(" + a.rotation + "deg) skewY(" + a.skew + "deg) scaleX(" + h + ")"), this.adapter.setTooltipCaretStyle("transform-origin", a.xAlignment + " " + a.yAlignment);
      try {
        for (var s = x(a.caretCorners), l = s.next(); !l.done; l = s.next()) {
          var T = l.value;
          this.adapter.setTooltipCaretStyle(T, "0");
        }
      } catch (y) {
        e = { error: y };
      } finally {
        try {
          l && !l.done && (n = s.return) && n.call(s);
        } finally {
          if (e) throw e.error;
        }
      }
      return {
        yTransformOrigin: a.yTransformOrigin,
        xTransformOrigin: a.xTransformOrigin
      };
    }, o.prototype.calculateCaretPositionOnTooltip = function(t, r) {
      var e = !this.adapter.isRTL(), n = this.adapter.getComputedStyleProperty("width"), a = this.adapter.getComputedStyleProperty("height");
      if (!(!n || !a || !r)) {
        var d = "calc((" + n + " - " + r.caretWidth + "px) / 2)", h = "calc((" + a + " - " + r.caretWidth + "px) / 2)", s = "0", l = _.CARET_INDENTATION + "px", T = "calc(" + n + " - " + l + ")", y = "calc(" + a + " - " + l + ")", v = 35, f = Math.abs(90 - v), E = ["border-bottom-right-radius", "border-top-left-radius"], g = ["border-bottom-left-radius", "border-top-right-radius"], m = 20;
        switch (t) {
          case p.BELOW_CENTER:
            return {
              yAlignment: c.TOP,
              xAlignment: c.LEFT,
              yAxisPx: s,
              xAxisPx: d,
              rotation: -1 * v,
              skew: -1 * m,
              xTransformOrigin: d,
              yTransformOrigin: s,
              caretCorners: E
            };
          case p.BELOW_END:
            return {
              yAlignment: c.TOP,
              xAlignment: e ? c.RIGHT : c.LEFT,
              yAxisPx: s,
              xAxisPx: l,
              rotation: e ? v : -1 * v,
              skew: e ? m : -1 * m,
              xTransformOrigin: e ? T : l,
              yTransformOrigin: s,
              caretCorners: e ? g : E
            };
          case p.BELOW_START:
            return {
              yAlignment: c.TOP,
              xAlignment: e ? c.LEFT : c.RIGHT,
              yAxisPx: s,
              xAxisPx: l,
              rotation: e ? -1 * v : v,
              skew: e ? -1 * m : m,
              xTransformOrigin: e ? l : T,
              yTransformOrigin: s,
              caretCorners: e ? E : g
            };
          case p.TOP_SIDE_END:
            return {
              yAlignment: c.TOP,
              xAlignment: e ? c.LEFT : c.RIGHT,
              yAxisPx: l,
              xAxisPx: s,
              rotation: e ? f : -1 * f,
              skew: e ? -1 * m : m,
              xTransformOrigin: e ? s : n,
              yTransformOrigin: l,
              caretCorners: e ? E : g
            };
          case p.CENTER_SIDE_END:
            return {
              yAlignment: c.TOP,
              xAlignment: e ? c.LEFT : c.RIGHT,
              yAxisPx: h,
              xAxisPx: s,
              rotation: e ? f : -1 * f,
              skew: e ? -1 * m : m,
              xTransformOrigin: e ? s : n,
              yTransformOrigin: h,
              caretCorners: e ? E : g
            };
          case p.BOTTOM_SIDE_END:
            return {
              yAlignment: c.BOTTOM,
              xAlignment: e ? c.LEFT : c.RIGHT,
              yAxisPx: l,
              xAxisPx: s,
              rotation: e ? -1 * f : f,
              skew: e ? m : -1 * m,
              xTransformOrigin: e ? s : n,
              yTransformOrigin: y,
              caretCorners: e ? g : E
            };
          case p.TOP_SIDE_START:
            return {
              yAlignment: c.TOP,
              xAlignment: e ? c.RIGHT : c.LEFT,
              yAxisPx: l,
              xAxisPx: s,
              rotation: e ? -1 * f : f,
              skew: e ? m : -1 * m,
              xTransformOrigin: e ? n : s,
              yTransformOrigin: l,
              caretCorners: e ? g : E
            };
          case p.CENTER_SIDE_START:
            return {
              yAlignment: c.TOP,
              xAlignment: e ? c.RIGHT : c.LEFT,
              yAxisPx: h,
              xAxisPx: s,
              rotation: e ? -1 * f : f,
              skew: e ? m : -1 * m,
              xTransformOrigin: e ? n : s,
              yTransformOrigin: h,
              caretCorners: e ? g : E
            };
          case p.BOTTOM_SIDE_START:
            return {
              yAlignment: c.BOTTOM,
              xAlignment: e ? c.RIGHT : c.LEFT,
              yAxisPx: l,
              xAxisPx: s,
              rotation: e ? f : -1 * f,
              skew: e ? -1 * m : m,
              xTransformOrigin: e ? n : s,
              yTransformOrigin: y,
              caretCorners: e ? E : g
            };
          case p.ABOVE_CENTER:
            return {
              yAlignment: c.BOTTOM,
              xAlignment: c.LEFT,
              yAxisPx: s,
              xAxisPx: d,
              rotation: v,
              skew: m,
              xTransformOrigin: d,
              yTransformOrigin: a,
              caretCorners: g
            };
          case p.ABOVE_END:
            return {
              yAlignment: c.BOTTOM,
              xAlignment: e ? c.RIGHT : c.LEFT,
              yAxisPx: s,
              xAxisPx: l,
              rotation: e ? -1 * v : v,
              skew: e ? -1 * m : m,
              xTransformOrigin: e ? T : l,
              yTransformOrigin: a,
              caretCorners: e ? E : g
            };
          default:
          case p.ABOVE_START:
            return {
              yAlignment: c.BOTTOM,
              xAlignment: e ? c.LEFT : c.RIGHT,
              yAxisPx: s,
              xAxisPx: l,
              rotation: e ? v : -1 * v,
              skew: e ? m : -1 * m,
              xTransformOrigin: e ? l : T,
              yTransformOrigin: a,
              caretCorners: e ? g : E
            };
        }
      }
    }, o.prototype.clearShowTimeout = function() {
      this.showTimeout && (clearTimeout(this.showTimeout), this.showTimeout = null);
    }, o.prototype.clearHideTimeout = function() {
      this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null);
    }, o.prototype.attachScrollHandler = function(t) {
      var r = this;
      this.addAncestorScrollEventListeners.push(function() {
        t("scroll", r.windowScrollHandler);
      });
    }, o.prototype.removeScrollHandler = function(t) {
      var r = this;
      this.removeAncestorScrollEventListeners.push(function() {
        t("scroll", r.windowScrollHandler);
      });
    }, o.prototype.destroy = function() {
      var t, r;
      this.frameId && (cancelAnimationFrame(this.frameId), this.frameId = null), this.clearHideTimeout(), this.clearShowTimeout(), this.adapter.removeClass(G), this.adapter.removeClass(V), this.adapter.removeClass(z), this.adapter.removeClass(M), this.adapter.removeClass(k), this.richTooltip && this.adapter.deregisterEventHandler("focusout", this.richTooltipFocusOutHandler), this.persistentTooltip || (this.adapter.deregisterEventHandler("mouseenter", this.tooltipMouseEnterHandler), this.adapter.deregisterEventHandler("mouseleave", this.tooltipMouseLeaveHandler)), this.adapter.deregisterAnchorEventHandler("blur", this.anchorBlurHandler), this.adapter.deregisterDocumentEventHandler("click", this.documentClickHandler), this.adapter.deregisterDocumentEventHandler("keydown", this.documentKeydownHandler), this.adapter.deregisterWindowEventHandler("scroll", this.windowScrollHandler), this.adapter.deregisterWindowEventHandler("resize", this.windowResizeHandler);
      try {
        for (var e = x(this.removeAncestorScrollEventListeners), n = e.next(); !n.done; n = e.next()) {
          var a = n.value;
          a();
        }
      } catch (d) {
        t = { error: d };
      } finally {
        try {
          n && !n.done && (r = e.return) && r.call(e);
        } finally {
          if (t) throw t.error;
        }
      }
      this.animFrame.cancelAll();
    }, o;
  }(dt)
);
const mt = '.mdc-tooltip__surface,.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__surface{color:#fff;color:var(--mdc-theme-text-primary-on-dark, white)}.mdc-tooltip__surface{background-color:#0009}.mdc-tooltip__title{color:#000000de;color:var(--mdc-theme-text-primary-on-light, rgba(0, 0, 0, .87))}.mdc-tooltip__content{color:#0009}.mdc-tooltip__content-link{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-tooltip__interactive-content{overflow-x:unset;overflow-y:auto}.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__surface,.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__caret-surface-top,.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__caret-surface-bottom{background-color:#fff}.mdc-tooltip__surface{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit)}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip--rich .mdc-tooltip__surface{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;border-radius:4px;line-height:20px}.mdc-tooltip__surface .mdc-tooltip__title{display:block}.mdc-tooltip__surface .mdc-tooltip__title:before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-tooltip__surface .mdc-tooltip__title{margin-top:0;line-height:20px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-subtitle2-font-size, .875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-tooltip__surface .mdc-tooltip__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit)}.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip--showing-transition .mdc-tooltip__surface-animation{transition:opacity .15s 0ms cubic-bezier(0,0,.2,1),transform .15s 0ms cubic-bezier(0,0,.2,1)}.mdc-tooltip--hide-transition .mdc-tooltip__surface-animation{transition:opacity 75ms 0ms cubic-bezier(.4,0,1,1)}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface:before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface:before{border-color:CanvasText}}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:184px;margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:304px;align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(.9396926208)}.mdc-tooltip__caret-surface-bottom{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;outline:1px solid transparent;z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color)}.mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color)}.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__surface,.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__caret-surface-top,.mdc-tooltip.mdc-tooltip--rich .mdc-tooltip__caret-surface-bottom{background-color:var(--cv-theme-surface-container)}.mdc-tooltip .mdc-tooltip__title,.mdc-tooltip .mdc-tooltip__content{color:var(--cv-theme-on-surface-variant)}.mdc-tooltip .mdc-tooltip__content-link{color:var(--mdc-theme-accent)}';
var Tt = Object.defineProperty, ft = Object.getOwnPropertyDescriptor, R = (i, o, t, r) => {
  for (var e = r > 1 ? void 0 : r ? ft(o, t) : o, n = i.length - 1, a; n >= 0; n--)
    (a = i[n]) && (e = (r ? a(o, t, e) : a(e)) || e);
  return r && e && Tt(o, t, e), e;
};
let A = class extends it {
  constructor() {
    super(...arguments), this.mdcFoundationClass = ut;
  }
  createAdapter() {
    return {
      ...ot(this.mdcRoot),
      getAttribute: (i) => this.mdcRoot.getAttribute(i),
      setAttribute: (i, o) => this.mdcRoot.setAttribute(i, o),
      removeAttribute: (i) => this.mdcRoot.removeAttribute(i),
      getComputedStyleProperty: (i) => getComputedStyle(this.mdcRoot, i).cssText,
      setStyleProperty: (i, o) => this.mdcRoot.style.setProperty(i, o),
      setSurfaceAnimationStyleProperty: (i, o) => this.mdcSurface.style.setProperty(i, o),
      getViewportWidth: () => Math.max(
        document.documentElement.clientWidth || 0,
        window.innerWidth || 0
      ),
      getViewportHeight: () => Math.max(
        document.documentElement.clientHeight || 0,
        window.innerHeight || 0
      ),
      getTooltipSize: () => Object.assign({
        width: this.mdcRoot.clientWidth,
        height: this.mdcRoot.clientHeight
      }),
      getTooltipCaretBoundingRect: () => this.mdcRoot.getBoundingClientRect() ?? null,
      getAnchorBoundingRect: () => {
        var i;
        return ((i = this.anchor) == null ? void 0 : i.getBoundingClientRect()) ?? null;
      },
      getParentBoundingRect: () => {
        var i;
        return ((i = this.renderRoot.getRootNode().parentElement) == null ? void 0 : i.getBoundingClientRect()) ?? null;
      },
      getAnchorAttribute: (i) => {
        var o;
        return ((o = this.anchor) == null ? void 0 : o.getAttribute(i)) ?? null;
      },
      setAnchorAttribute: (i, o) => {
        var t;
        return (t = this.anchor) == null ? void 0 : t.setAttribute(i, o);
      },
      isRTL: () => !1,
      isInstanceOfElement: (i) => i instanceof Element,
      anchorContainsElement: (i) => {
        var o;
        return ((o = this.anchor) == null ? void 0 : o.contains(i)) ?? !1;
      },
      tooltipContainsElement: (i) => this.contains(i),
      focusAnchorElement: () => {
        var i;
        return (i = this.anchor) == null ? void 0 : i.focus();
      },
      registerEventHandler: (i, o) => {
        var t;
        return (t = this.mdcRoot) == null ? void 0 : t.addEventListener(i, o);
      },
      deregisterEventHandler: (i, o) => {
        var t;
        return (t = this.mdcRoot) == null ? void 0 : t.removeEventListener(i, o);
      },
      registerAnchorEventHandler: (i, o) => {
        var t;
        return (t = this.anchor) == null ? void 0 : t.addEventListener(i, o);
      },
      deregisterAnchorEventHandler: (i, o) => {
        var t;
        return (t = this.anchor) == null ? void 0 : t.removeEventListener(i, o);
      },
      registerDocumentEventHandler: (i, o) => document.addEventListener(i, o),
      deregisterDocumentEventHandler: (i, o) => document.removeEventListener(i, o),
      registerWindowEventHandler: (i, o) => window.addEventListener(i, o),
      deregisterWindowEventHandler: (i, o) => window.removeEventListener(i, o),
      notifyHidden: () => this.dispatchEvent(new Event(j.HIDDEN)),
      notifyShown: () => this.dispatchEvent(new Event(j.SHOWN)),
      setTooltipCaretStyle: () => {
      },
      clearTooltipCaretStyles: () => {
      },
      getActiveElement: () => document.activeElement
    };
  }
  updated(i) {
    super.updated(i), this.showDelay !== void 0 && !isNaN(this.showDelay) && this.mdcFoundation.setShowDelay(this.showDelay), this.hideDelay !== void 0 && !isNaN(this.hideDelay) && this.mdcFoundation.setHideDelay(this.hideDelay);
  }
  async firstUpdated() {
    var i, o, t, r, e;
    this.mdcFoundation !== void 0 && this.mdcFoundation.destroy(), this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter()), (i = this.anchor) == null || i.addEventListener(
      "click",
      () => this.mdcFoundation.handleAnchorClick()
    ), (o = this.anchor) == null || o.addEventListener(
      "mouseenter",
      () => this.mdcFoundation.handleAnchorMouseEnter()
    ), (t = this.anchor) == null || t.addEventListener(
      "touchstart",
      () => this.mdcFoundation.handleAnchorTouchstart()
    ), this.persistent || ((r = this.anchor) == null || r.addEventListener(
      "mouseleave",
      () => this.mdcFoundation.handleAnchorMouseLeave()
    ), (e = this.anchor) == null || e.addEventListener(
      "touchend",
      () => this.mdcFoundation.handleAnchorTouchend()
    ));
  }
  disconnectedCallback() {
    var i, o, t, r, e;
    super.connectedCallback(), (i = this.anchor) == null || i.removeEventListener(
      "click",
      () => this.mdcFoundation.handleAnchorClick()
    ), (o = this.anchor) == null || o.removeEventListener(
      "mouseenter",
      () => this.mdcFoundation.handleAnchorMouseEnter()
    ), (t = this.anchor) == null || t.removeEventListener(
      "mouseleave",
      () => this.mdcFoundation.handleAnchorMouseLeave()
    ), (r = this.anchor) == null || r.removeEventListener(
      "touchstart",
      () => this.mdcFoundation.handleAnchorTouchstart()
    ), (e = this.anchor) == null || e.removeEventListener(
      "touchend",
      () => this.mdcFoundation.handleAnchorTouchend()
    );
  }
  render() {
    return F`
      <div
        class="mdc-tooltip ${this.rich ? "mdc-tooltip--rich" : ""}"
        role="tooltip"
        aria-hidden="true"
        data-mdc-tooltip-persistent="true"
      >
        <div class="mdc-tooltip__surface mdc-tooltip__surface-animation">
          ${this.rich ? F`<div class="mdc-tooltip__title">${this.richTitle}</div>
                <div class="mdc-tooltip__content">
                  <slot></slot>
                </div>
                <div class="mdc-tooltip--rich-actions">
                  <slot name="actionItems"></slot>
                </div>` : F`<slot></slot>`}
        </div>
      </div>
    `;
  }
};
A.styles = [
  et`
      ${tt(mt)}
    `
];
R([
  X(".mdc-tooltip")
], A.prototype, "mdcRoot", 2);
R([
  X(".mdc-tooltip__surface")
], A.prototype, "mdcSurface", 2);
R([
  C({ type: Object })
], A.prototype, "anchor", 2);
R([
  C()
], A.prototype, "richTitle", 2);
R([
  C({ type: Boolean, reflect: !0 })
], A.prototype, "rich", 2);
R([
  C({ type: Boolean, reflect: !0 })
], A.prototype, "persistent", 2);
R([
  C({ type: Number })
], A.prototype, "showDelay", 2);
R([
  C({ type: Number })
], A.prototype, "hideDelay", 2);
A = R([
  rt("cv-tooltip")
], A);
const Dt = A;
export {
  A as CovalentTooltip,
  Dt as default
};
