text: var win;
  /**
   * Note: Accessing "window" in IE11 is somewhat expensive, and calling "typeof window"
   * hits a memory leak, whereas aliasing it and calling "typeof win" does not.
   * Caching the window value at the file scope lets us minimize the impact.
   *
   * @see IE11 Memory Leak Issue https://github.com/microsoft/fluentui/pull/9010#issuecomment-490768427
   */
  
  try {
    win = window;
  } catch (e) {
    /* no-op */
  }
  /**
   * Helper to get the window object. The helper will make sure to use a cached variable
   * of "window", to avoid overhead and memory leaks in IE11.
   */
  
  
  export var getWindow = node => {
    var _node$ownerDocument$d, _node$ownerDocument;
  
    return (_node$ownerDocument$d = node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) != null ? _node$ownerDocument$d : win;
  };
  /**
   * Check if we can use the DOM. Useful for SSR purposes
   */
  
  function checkIsBrowser() {
    var win = getWindow();
    return Boolean(typeof win !== "undefined" && win.document && win.document.createElement);
  }
  
  export var isBrowser = checkIsBrowser();
  /**
   * Get the normalized event key across all browsers
   * @param event keyboard event
   */
  
  export function normalizeEventKey(event) {
    var {
      key,
      keyCode
    } = event;
    var isArrowKey = keyCode >= 37 && keyCode <= 40 && key.indexOf("Arrow") !== 0;
    var eventKey = isArrowKey ? "Arrow" + key : key;
    return eventKey;
  }
  export var dataAttr = condition => condition ? "" : undefined;
  export var ariaAttr = condition => condition ? true : undefined;
  export var getDocument = node => (node == null ? void 0 : node.ownerDocument) || isBrowser ? document : null;
  export var cx = function cx() {
    for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {
      classNames[_key] = arguments[_key];
    }
  
    return classNames.filter(Boolean).join(" ");
  };
  export function getActiveElement(node) {
    var doc = getDocument(node);
    return doc == null ? void 0 : doc.activeElement;
  }
  export function contains(parent, child) {
    return parent === child || parent.contains(child);
  }
  //# sourceMappingURL=dom.js.map