create faketouches instance
@param element
@constructor
337879
function FakeTouches(element) {
        this.element = element;

        this.touches = [];
        this.touch_type = FakeTouches.TOUCH_EVENTS;
        this.has_multitouch = true;
    }
1288177
function() {
			this._.cache = {};
			this.isFake = 0;

			var editor = this.root.editor;

			// Invalidate any fake selection available in the editor.
			if ( editor && editor._.fakeSelection ) {
				// Test whether this selection is the one that was
				// faked or its clone.
				if ( this.rev == editor._.fakeSelection.rev ) {
					delete editor._.fakeSelection;

					removeHiddenSelectionContainer( editor );
				}
				// jshint ignore:start
				// TODO after #9786 use commented out lines instead of console.log.
				else { // %REMOVE_LINE%
					window.console && console.log( 'Wrong selection instance resets fake selection.' ); // %REMOVE_LINE%
				} // %REMOVE_LINE%
				// else // %REMOVE_LINE%
				//	CKEDITOR.debug.error( 'Wrong selection instance resets fake selection.', CKEDITOR.DEBUG_CRITICAL ); // %REMOVE_LINE%
				// jshint ignore:end
			}

			this.rev = nextRev++;
		}
37531
function createBaseElementProto () {
  if (baseElementProto) {
    return baseElementProto
  }

  // Base element inherits from HTMLElement
  let proto = Object.create(HTMLElement.prototype)

  /**
   * Created callback of MIPElement. It will initialize the element.
   */
  proto.createdCallback = function () {
    // get mip1 clazz from custom elements store
    let CustomElement = customElementsStore.get(this.tagName, 'mip1')

    this.classList.add('mip-element')

    /**
     * Viewport state
     * @private
     * @type {boolean}
     */
    this._inViewport = false

    /**
     * Whether the element is into the viewport.
     * @private
     * @type {boolean}
     */
    this._firstInViewport = false

    /**
     * The resources object.
     * @private
     * @type {Object}
     */
    this._resources = resources

    /**
     * Instantiated the custom element.
     * @type {Object}
     * @public
     */
    let customElement = this.customElement = new CustomElement(this)
    customElement.createdCallback()

    // Add first-screen element to performance.
    if (customElement.hasResources()) {
      performance.addFsElement(this)
    }
  }

  /**
   * When the element is inserted into the DOM, initialize the layout and add the element to the '_resources'.
   */
  proto.attachedCallback = function () {
    // Apply layout for this.
    this._layout = applyLayout(this)
    this.customElement.attachedCallback()
    this._resources.add(this)
  }

  /**
   * When the element is removed from the DOM, remove it from '_resources'.
   */
  proto.detachedCallback = function () {
    this.customElement.detachedCallback()
    this._resources.remove(this)
    performance.fsElementLoaded(this)
  }

  proto.attributeChangedCallback = function (attributeName, oldValue, newValue, namespace) {
    let ele = this.customElement
    prerender.execute(() => {
      ele.attributeChangedCallback(...arguments)
    }, this)
  }

  /**
   * Check whether the element is in the viewport.
   *
   * @return {boolean}
   */
  proto.inViewport = function () {
    return this._inViewport
  }

  /**
   * Called when the element enter or exit the viewport.
   *
   * @param {boolean} inViewport whether in viewport or not
   * And it will call the firstInviewCallback and viewportCallback of the custom element.
   */
  proto.viewportCallback = function (inViewport) {
    this._inViewport = inViewport
    if (!this._firstInViewport) {
      this._firstInViewport = true
      this.customElement.firstInviewCallback()
    }
    this.customElement.viewportCallback(inViewport)
  }

  /**
   * Check whether the building callback has been executed.
   *
   * @return {boolean}
   */
  proto.isBuilt = function () {
    return this._built
  }

  /**
   * Check whether the element need to be rendered in advance.
   *
   * @return {boolean}
   */
  proto.prerenderAllowed = function () {
    return this.customElement.prerenderAllowed()
  }

  /**
   * Build the element and the custom element.
   * This will be executed only once.
   */
  proto.build = function () {
    if (this.isBuilt()) {
      return
    }

    // Add `try ... catch` avoid the executing build list being interrupted by errors.
    try {
      this.customElement.build()
      this._built = true
      customEmit(this, 'build')
    } catch (e) {
      customEmit(this, 'build-error', e)
      console.error(e)
    }
  }

  /**
   * Method of executing event actions of the custom Element
   *
   * @param {Object} action event action
   */
  proto.executeEventAction = function (action) {
    this.customElement.executeEventAction(action)
  }

  /**
   * Called by customElement. And tell the performance that element is loaded.
   * @deprecated
   */
  proto.resourcesComplete = function () {
    performance.fsElementLoaded(this)
  }

  baseElementProto = proto

  return baseElementProto
}
884486
function renderTouches(touches, element) {
        touches.forEach(function(touch) {
            var el = document.createElement('div');
            el.style.width = '20px';
            el.style.height = '20px';
            el.style.background = 'red';
            el.style.position = 'fixed';
            el.style.top = touch.y +'px';
            el.style.left = touch.x +'px';
            el.style.borderRadius = '100%';
            el.style.border = 'solid 2px #000';
            el.style.zIndex = 6000;

            element.appendChild(el);
            setTimeout(function() {
                el && el.parentNode && el.parentNode.removeChild(el);
                el = null;
            }, 100);
        });
    }
153439
function(element) {

            var parent = element.parentNode;

            // If input already have parent just pass through
            if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) {
                return;
            }

            // Put element class and style to the specified parent
            var wrapper       = document.createElement('i');
            wrapper.className = element.className + ' waves-input-wrapper';
            element.className = 'waves-button-input';

            // Put element as child
            parent.replaceChild(wrapper, element);
            wrapper.appendChild(element);

            // Apply element color and background color to wrapper
            var elementStyle    = window.getComputedStyle(element, null);
            var color           = elementStyle.color;
            var backgroundColor = elementStyle.backgroundColor;

            wrapper.setAttribute('style', 'color:' + color + ';background:' + backgroundColor);
            element.setAttribute('style', 'background-color:rgba(0,0,0,0);');

        }
539475
function createElement (
	  tag,
	  data,
	  children
	) {
	  if (data && (Array.isArray(data) || typeof data !== 'object')) {
	    children = data;
	    data = undefined;
	  }
	  // make sure to use real instance instead of proxy as context
	  return _createElement(this._self, tag, data, children)
	}
143161
def create(element, element_id=nil, &block)
      element = initialize_element(element, element_id)
      style_and_context(element, element_id, &block)

      element
    end
1804
function (elements) {
      for (var a = 0; a < elements.length; a++) {
        var el = elements[a];

        if (el.tagName.toLowerCase() === 'input') {
          var parent = el.parentNode;

          // If input already have parent just pass through
          if (parent.tagName.toLowerCase() === 'i' && parent.className.indexOf('waves-effect') !== -1) {
            continue;
          }

          // Put element class and style to the specified parent
          var wrapper = document.createElement('i');
          wrapper.className = el.className + ' waves-input-wrapper';

          var elementStyle = el.getAttribute('style');

          if (!elementStyle) {
            elementStyle = '';
          }

          wrapper.setAttribute('style', elementStyle);

          el.className = 'waves-button-input';
          el.removeAttribute('style');

          // Put element as child
          parent.replaceChild(wrapper, el);
          wrapper.appendChild(el);
        }
      }
    }
803502
function ( value ) {
            if ( this.isObject(value) ) {
                //$('.touch_area').get(0).constructor.toString()
                return !!( value && value.nodeType === 1 && value.nodeName );
            } else {
                return /HTML(?:.*)Element/.test( Object.prototype.toString.call(value) );
            }
        }
884694
function triggerTouch(type) {
        var event = document.createEvent('Event');
        var touchlist = this._createTouchList(this.touches);

        event.initEvent('touch' + type, true, true);
        event.touches = touchlist;
        event.changedTouches = touchlist;

        return this.element.dispatchEvent(event);
    }
901969
function getGesture( element_ ) {
    const element = ensureDom( element_ );
    if ( !element[ SYMBOL ] ) element[ SYMBOL ] = new Gesture( element );
    return element[ SYMBOL ];
}
130338
function makeClickEvent($el) {
  if ($el._events._click) return;
  $el._events._click = true;

  if (!navigator.userAgent.match(/iP(ad|hone|od)/g)) {
    $el._el.addEventListener('click', function(e) { $el.trigger('click', e); });
    return;
  }

  let start;

  $el._el.addEventListener('touchstart', function(e) {
    if (e.touches.length == 1) start = pointerPosition(e);
  });

  $el._el.addEventListener('touchend', function(e){
    if (!start) return;
    let end = pointerPosition(e);
    if (Math.abs(end.x - start.x) < 5 && Math.abs(end.y - start.y) < 5) {
      $el.trigger('click', e);
    }
    start = null;
  });

  $el._el.addEventListener('touchcancel', function() { start = null; });
}
1101984
function tap(position, element, done) {
                var touches = getTouches(position, 1);
                var gesture = {
                    duration: config.randomizer.integer({ min: 20, max: 700 })
                };

                triggerTouch(touches, element, 'start');

                setTimeout(function() {
                    triggerTouch(touches, element, 'end');
                    done(touches, gesture);
                }, gesture.duration);
            }
1023484
function(element, options, done) {
            options = merge(options, {
                pos: [10, 10],
                pos2: [11, 11],
                duration: 100,
                interval: 200,
                touches: 1
            });

            Simulator.gestures.tap(element, options, function() {
                setTimeout(function() {
                    options.pos = options.pos2;
                    Simulator.gestures.tap(element, options, done);
                }, options.interval);
            });
        }
601338
function(elements, options, done) {
            elements = ensureAnArray(elements);
            options = merge(options, {
                pos: [300, 300],
                scale: 2,
                duration: 250,
                radius: 100,
                touches: 2
            });

            var touches = getTouches(options.pos, elements, options.touches);
            triggerGesture(elements, touches, options, function() {
                done && setTimeout(done, 25);
            });
        }
1354881
function bind(elements) {
      for (var i = 0; i < elements.length; i++) {
        Binder.on('click', elements[i], this.click);
        Binder.on('touchstart', elements[i], this.click, capture);
      }
    }
542331
function (event) {
          var obj = event;
          if (event.targetTouches !== undefined) {
            obj = event.targetTouches.item(0);
          } else if (event.originalEvent !== undefined && event.originalEvent.targetTouches !== undefined) {
            obj = event.originalEvent.targetTouches.item(0);
          }
          return obj;
        }