Create the DOM element of the mask, for modal popups.
@protected
@param {String} className CSS classes for the dialog mask.
@return {HTMLElement}
174556
function (className) {
            var document = this._document;
            var div = document.createElement("div");
            div.className = className || "xModalMask-default";
            div.style.cssText = "position:absolute;top:-15000px;left:-15000px;visibility:hidden;display:block;";
            return this.popupContainer.getContainerElt().appendChild(div);
        }
537923
function(element) {
    // use given clip or create a new one
    this.clipper = element instanceof SVG.ClipPath ? element : this.parent().clip().add(element)

    // store reverence on self in mask
    this.clipper.targets.push(this)

    // apply mask
    return this.attr('clip-path', 'url("#' + this.clipper.attr('id') + '")')
  }
726384
function() {
      this.classList.add('overlay');

      this.parentEl_ = this.ownerDocument.body;

      this.visible_ = false;
      this.userCanClose_ = true;

      this.onKeyDown_ = this.onKeyDown_.bind(this);
      this.onClick_ = this.onClick_.bind(this);
      this.onFocusIn_ = this.onFocusIn_.bind(this);
      this.onDocumentClick_ = this.onDocumentClick_.bind(this);
      this.onClose_ = this.onClose_.bind(this);

      this.addEventListener('visible-change',
          tr.ui.b.Overlay.prototype.onVisibleChange_.bind(this), true);

      // Setup the shadow root
      var createShadowRoot = this.createShadowRoot ||
          this.webkitCreateShadowRoot;
      this.shadow_ = createShadowRoot.call(this);
      this.shadow_.appendChild(tr.ui.b.instantiateTemplate('#overlay-template',
                                                        THIS_DOC));

      this.closeBtn_ = this.shadow_.querySelector('close-button');
      this.closeBtn_.addEventListener('click', this.onClose_);

      this.shadow_
          .querySelector('overlay-frame')
          .addEventListener('click', this.onClick_);

      this.observer_ = new WebKitMutationObserver(
          this.didButtonBarMutate_.bind(this));
      this.observer_.observe(this.shadow_.querySelector('button-bar'),
                             { childList: true });

      // title is a variable on regular HTMLElements. However, we want to
      // use it for something more useful.
      Object.defineProperty(
          this, 'title', {
            get: function() {
              return this.shadow_.querySelector('title').textContent;
            },
            set: function(title) {
              this.shadow_.querySelector('title').textContent = title;
            }
          });
    }
473503
public static List<Element> getElementsByClass(String className, Element rootElement) {

        return getElementsByClass(className, Tag.ALL, rootElement);

    }
161145
function createElement(config){
    var isConfig = config != undefined && typeof config != 'string';
    var description = (isConfig ? config.description : config) || '';

    var elementName = 'div'; // modern browsers become case sensetive for tag names for xhtml
    var element;

    // fetch tag name
    var m = description.match(/^([a-z0-9_\-]+)(.*)$/i);
    if (m)
    {
      elementName = m[1];
      description = m[2];
    }

    // create an element

    if (description != '')
    {
      // extract properties
      var classNames = [];
      var attributes = {};
      var entryName;

      while (m = DESCRIPTION_PART_REGEXP.exec(description))
      {
        if (m[8])
        {
          throw new Error(
            'Create element error in basis.dom.createElement()' +
            '\n\nDescription:\n> ' + description +
            '\n\nProblem place:\n> ' + description.substr(0, m.index) + '-->' + description.substr(m.index) + '<--'
          );
        }

        entryName = m[1] || m[2] || m[3];

        if (m[1])     // id
          attributes.id = entryName;
        else
          if (m[2])   // class
            classNames.push(entryName);
          else
          {           // attribute
            if (entryName != 'class')
              attributes[entryName] = m[4] ? m[5] || m[6] || m[7] || '' : entryName;
          }
      }

      // create element
      if (IS_ATTRIBUTE_BUG_NAME && attributes.name && /^(input|textarea|select)$/i.test(elementName))
        elementName = '<' + elementName + ' name=' + attributes.name + '>';
    }

    // create element
    element = document.createElement(elementName);

    // set attributes
    if (attributes)
    {
      if (attributes.style && IS_ATTRIBUTE_BUG_STYLE)
        element.style.cssText = attributes.style;

      for (var attrName in attributes)
        element.setAttribute(attrName, attributes[attrName], 0);
    }

    // set css classes
    if (classNames && classNames.length)
      element.className = classNames.join(' ');

    // append child nodes
    if (arguments.length > 1)
      handleInsert(element, createFragment.apply(0, basis.array.flatten(arrayFrom(arguments, 1))));

    // attach event handlers
    if (isConfig)
    {
      if (config.css)
      {
        if (!cssom)
          cssom = require('basis.cssom');
        cssom.setStyle(element, config.css);
      }

      for (var event in config)
        if (typeof config[event] == 'function')
          eventUtils.addHandler(element, event, config[event], element);
    }

    // return an element
    return element;
  }
1022780
function(element, classToAdd) {
        if (!hasClass(element, classToAdd)) {
            element.className = element.className === '' ? classToAdd : element.className + ' ' + classToAdd;
        }
        return this;
    }
681655
function(className)
	{
		var el = this.__obj;
		
		if (el instanceof Element && className)
		{
			var classNames = className.trim().split(' ');

			// IE11 doesn't support multiple parameters
			while (className = classNames.pop())
			{
				el.classList.add(className);
			}
		}
		
		return this;
	}
489902
function ( Class , Container, InnerHtml ) {
			var Div = L.DomUtil.create ( 'div', Class, Container );
			Div.innerHTML = InnerHtml;
			
			return Div;
		}
1161008
public Element createElement(String tagName) {
        return new Element(Tag.valueOf(tagName, ParseSettings.preserveCase), this.baseUri());
    }
1088539
function( element, className ) {
            element = $.getElement( element );

            if (!element.className) {
                element.className = className;
            } else if ( ( ' ' + element.className + ' ' ).
                indexOf( ' ' + className + ' ' ) === -1 ) {
                element.className += ' ' + className;
            }
        }
83373
function createDom(tagName, opt_className) {
  var element = document.createElement(tagName);
  if (opt_className) {
    element.className = opt_className;
  }
  return element;
}
978743
function(element, className) {
    invariant(
      !/\s/.test(className),
      'CSSCore.addClass takes only a single class name. "%s" contains ' +
      'multiple classes.', className
    );

    if (className) {
      if (element.classList) {
        element.classList.add(className);
      } else if (!CSSCore.hasClass(element, className)) {
        element.className = element.className + ' ' + className;
      }
    }
    return element;
  }
820374
function () {
            var cfg = this._cfg;
            var modal = cfg.modal;

            if (this._showBack != null) {
                this._showBack();
                this._showBack = null;
            }

            if (this._popup) {
                this.waiReadText(cfg.waiCloseMsg);

                this._destroyDraggable();
                this._destroyResizable();

                if (cfg.maximized) {
                    this._setContainerOverflow(this._optionsBeforeMaximize.containerOverflow);
                }

                this._domElt = null;
                this._titleBarDomElt = null;
                this._titleDomElt = null;
                if (this._closeDelegateId) {
                    ariaUtilsDelegate.remove(this._closeDelegateId);
                }
                if (this._maximizeDelegateId) {
                    ariaUtilsDelegate.remove(this._maximizeDelegateId);
                }

                this._popup.close();
                this._popup.$unregisterListeners(this);
                this._popup.$dispose();
                this._popup = null;
                PopupContainerManager.releasePopupContainer(this._popupContainer);
                this._popupContainer = null;

                ariaTemplatesLayout.$removeListeners({
                    "viewportResized" : this._onViewportResized,
                    scope : this
                });

                if (modal) {
                    var previouslyFocusedElement = this._previouslyFocusedElement;
                    if (cfg.restoreFocusOnClose && ariaUtilsDom.isInDom(previouslyFocusedElement) && !/^body$/i.test(previouslyFocusedElement.tagName)) {
                        setTimeout(function () {
                            try {
                                // On IE 7 and 8, focusing an element which is no longer in the DOM
                                // throws the "Unexpected call to method or property access." exception
                                previouslyFocusedElement.focus();
                            } catch (e) {}
                        }, 0);
                        this._previouslyFocusedElement = null;
                    }
                }
            }
        }
513726
function Element(domElement) {

      // Helpers
      this.attr = function(attrName) {
        return domElement.getAttributeNS(null, attrName);
      };

      // Properties
      this.tag = domElement.tagName;
      this.class = this.attr('class');
      this.id = this.attr('id');

      // Methods
      this.isNode = function() {
        return !!~this.class.indexOf(self.settings('classPrefix') + '-node');
      };

      this.isEdge = function() {
        return !!~this.class.indexOf(self.settings('classPrefix') + '-edge');
      };

      this.isHover = function() {
        return !!~this.class.indexOf(self.settings('classPrefix') + '-hover');
      };
    }
320243
function() {
      if (this.dialog_.hasAttribute('open')) {
        throw new Error('Failed to execute \'showModal\' on dialog: The element is already open, and therefore cannot be opened modally.');
      }
      if (!document.body.contains(this.dialog_)) {
        throw new Error('Failed to execute \'showModal\' on dialog: The element is not in a Document.');
      }
      if (!dialogPolyfill.dm.pushDialog(this)) {
        throw new Error('Failed to execute \'showModal\' on dialog: There are too many open modal dialogs.');
      }

      if (createsStackingContext(this.dialog_.parentElement)) {
        console.warn('A dialog is being shown inside a stacking context. ' +
            'This may cause it to be unusable. For more information, see this link: ' +
            'https://github.com/GoogleChrome/dialog-polyfill/#stacking-context');
      }

      this.setOpen(true);
      this.openAsModal_ = true;

      // Optionally center vertically, relative to the current viewport.
      if (dialogPolyfill.needsCentering(this.dialog_)) {
        dialogPolyfill.reposition(this.dialog_);
        this.replacedStyleTop_ = true;
      } else {
        this.replacedStyleTop_ = false;
      }

      // Insert backdrop.
      this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling);

      // Focus on whatever inside the dialog.
      this.focus_();
    }
243057
function createTextElement (name, element = {}) {
  let classToAdd = ''
  const Tag = name

  if (/^h\d$/i.test(name)) {
    classToAdd = 'header'
  } else {
    classToAdd = 'text'
  }

  return createElement(name, merge({
    attrs: true,
    rules: {
      [`.${name}.${classToAdd}`]: [ { '@pseudo': 'root' }, '@default', { display: transforms.trueHide() }, margin, background, border, borderRadius, text, font ]
    },
    render (attrs, contents) {
      attrs.class += ` ${classToAdd} ${name}`

      return <Tag {...attrs}>{contents}</Tag>
    }
  }, element))
}
18155
function createWrapperClass(component) {
  return class WrapperClass {
    static inject = [Element];

    /**
     * @param {Element} element
     */
    constructor(element) {
      this.element = element;
    }

    /**
     * Re-render the Preact component when values changed
     */
    attached() {
      if (!this.component) {
        this.render();
      } else if (typeof this.component.componentDidMount === 'function') {
        this.component.componentDidMount();
      }
    }

    /**
     * Triggers un-mound function to release events
     */
    detached() {
      if (this.component && typeof this.component.componentWillUnmount === 'function') {
        this.component.componentWillUnmount();
      }
    }

    /**
     * Un-render the component
     */
    unbind() {
      this.component = null;
      this.element.component = null;
      render('', this.element, this.component);
    }

    /**
     * Determine props passed to create react elements
     * @returns {Object}
     */
    getProps() {
      const props = this.props || {};
      // Copy bound properties because Object.assign doesn't work deep
      for (const prop in this) {
        if (this[prop] !== undefined && typeof this[prop] !== 'function') {
          props[prop] = this[prop] === '' ? true : this[prop];
        }
      }
      delete props.element;

      return Object.assign({}, component.defaultProps, props);
    }

    /**
     * Will be called when bindable updated
     */
    updateProps() {
      if (this.component && typeof this.component.componentWillReceiveProps === 'function') {
        const props = this.getProps();
        this.component.componentWillReceiveProps(props);
        this.component.props = props;
      }
    }

    /**
     * Render Preact component
     */
    render() {
      // Create container in active dom to apply styles already
      const container = document.createElement('div');
      this.element.appendChild(container);

      // Render react component with a slot as children into a container to possibly replace the slot with real children
      const reactElement = createElement(component, this.getProps(), createElement('slot'));
      this.component = render(reactElement, container);
      this.element.component = this.component;

      const slot = container.querySelector('slot');
      // If no slot is rendered the component doesn't accept children
      if (slot) {
        const content = this.element.querySelector('au-content');
        if (!content) {
          return;
        }
        // Move original children to slot position
        for (let i = 0; i < content.children.length; i++) {
          slot.parentNode.insertBefore(content.children[i], slot);
        }
        slot.parentNode.removeChild(slot);
        this.insertContainerContent(container, content);
      } else {
        this.insertContainerContent(container);
      }
    }

    /**
     * Moves content of the container into the correct place within this element
     * @param {HTMLElement} container
     * @param {HTMLElement} replacement
     */
    insertContainerContent(container, replacement) {
      // Append child to fragment to get rid of container element which can break element flow
      const fragment = document.createDocumentFragment();
      for (let i = 0; i < container.children.length; i++) {
        fragment.appendChild(container.children[i]);
      }
      // Either replace au-content or just append if no children are passed
      if (replacement) {
        this.element.replaceChild(fragment, replacement);
      } else {
        this.element.appendChild(fragment);
      }
      // Container is now obsolete as the children are laying directly under the parent
      this.element.removeChild(container);
    }
  };
}