React to storage event coming from the EventBus. This function raises an Aria Templates event making sure
that it's not raised when namespacing is applied
@param {HTMLEvent} event Event raised by the browser
558967
function (event) {
            if (event.key === null || event.namespace === this.namespace) {
                var lessDetailedEvent = ariaUtilsJson.copy(event, false, this.EVENT_KEYS);
                this.$raiseEvent(lessDetailedEvent);
            }
        }
803132
function (domEvent) {
            var cfg = this._cfg;
            if (cfg) {
                var domEvtWrapper;
                if (domEvent) {
                    domEvtWrapper = new aria.templates.DomEventWrapper(domEvent);
                }
                var returnValue = this.evalCallback(cfg.onclick, domEvtWrapper);
                if (domEvtWrapper) {
                    domEvtWrapper.$dispose();
                }
                return returnValue;
            }
            return true;
        }
422574
function (domEvt) {
        var DomWrapper = ariaTemplatesDomElementWrapper;
        this.$DomEvent.constructor.call(this, domEvt);

        /**
         * Wrapper on the HTML element on which the event happened.
         * @type aria.templates.DomElementWrapper
         */
        this.target = (this.target ? new DomWrapper(this.target) : null);

        /**
         * Wrapper on the HTML element from/to which the event is directed. (relatedTarget/fromElement/toElement)
         * @type aria.templates.DomElementWrapper
         */
        this.relatedTarget = (this.relatedTarget ? new DomWrapper(this.relatedTarget) : null);
        // bind function to original scope so that "this" is preserved
        // Not needed as $DomEvent constructor creates these functions
        // this.stopPropagation = aria.utils.Function.bind(domEvt.stopPropagation, domEvt);
        // this.preventDefault = aria.utils.Function.bind(domEvt.preventDefault, domEvt);
    }
980823
function(event) {
        event = event || {};

        if (event.added) {
            this._renderSelectedItem(event.added);

            this._scrollToBottom();
        } else if (event.removed) {
            removeElement(this.$(getItemSelector(SELECTED_ITEM_SELECTOR, event.removed.id)));
        } else {
            this._forEachSelectedItem(removeElement);

            this._data.forEach(this._renderSelectedItem, this);

            this._updateInputWidth();
        }

        if (event.added || event.removed) {
            if (this.dropdown) {
                this.dropdown.showResults(this.filterResults(this.dropdown.results), {
                    hasMore: this.dropdown.hasMore
                });
            }

            if (!hasTouch) {
                this.focus();
            }
        }

        this.positionDropdown();

        this._updatePlaceholder();
    }
1234784
function (event) {
            var pageId = event.pageId;
            if (this.currentPageId == pageId) {
                this._rootModule.unloadPageModules(pageId);
                this.navigate({
                    pageId : pageId,
                    url : this._navigationManager ? this._navigationManager.getUrl() : null,
                    forceReload : true
                });
            }
        }
364592
function (event) {
            this.data.showSource = !this.data.showSource;
            if (this.data.showSource) {
                this.data.initialSource = true;
                var filePath = this.data.templateCtxt.tplClasspath.replace(/\./g, "/") + ".tpl";
                this.data.source = this.moduleCtrl.getSource(filePath).value;
            }
            this.$refresh();
        }
678128
function (eventName, handler)
  {
    if (!this._events[eventName])
      this._events[eventName] = [];
    this._events[eventName].push (handler);
  }
735684
function(dom, eventName, data) {
          data = data || {};

          var event = document.createEvent('HTMLEvents');

          for (var key in data) {
            if (data.hasOwnProperty(key)) {
              event[key] = data[key];
            }
          }

          event.component = dom ?
            angular.element(dom).data(dom.nodeName.toLowerCase()) || null : null;
          event.initEvent(dom.nodeName.toLowerCase() + ':' + eventName, true, true);

          dom.dispatchEvent(event);
        }
684167
function initEvents() {
        var bind = _this.h.addEventListener;
        var eventTarget = params.eventTarget === 'wrapper' ? _this.wrapper : _this.container;
        //Touch Events
        if (! (_this.browser.ie10 || _this.browser.ie11)) {
            if (_this.support.touch) {
                bind(eventTarget, 'touchstart', onTouchStart);
                bind(eventTarget, 'touchmove', onTouchMove);
                bind(eventTarget, 'touchend', onTouchEnd);
            }
            if (params.simulateTouch) {
                bind(eventTarget, 'mousedown', onTouchStart);
                bind(document, 'mousemove', onTouchMove);
                bind(document, 'mouseup', onTouchEnd);
            }
        }
        else {
            bind(eventTarget, _this.touchEvents.touchStart, onTouchStart);
            bind(document, _this.touchEvents.touchMove, onTouchMove);
            bind(document, _this.touchEvents.touchEnd, onTouchEnd);
        }

        //Resize Event
        if (params.autoResize) {
            bind(window, 'resize', _this.resizeFix);
        }
        //Slide Events
        addSlideEvents();
        //Mousewheel
        _this._wheelEvent = false;
        if (params.mousewheelControl) {
            if (document.onmousewheel !== undefined) {
                _this._wheelEvent = 'mousewheel';
            }
            if (!_this._wheelEvent) {
                try {
                    new WheelEvent('wheel');
                    _this._wheelEvent = 'wheel';
                } catch (e) {}
            }
            if (!_this._wheelEvent) {
                _this._wheelEvent = 'DOMMouseScroll';
            }
            if (_this._wheelEvent) {
                bind(_this.container, _this._wheelEvent, handleMousewheel);
            }
        }

        //Keyboard
        function _loadImage(src) {
            var image = new Image();
            image.onload = function () {
                if (typeof _this === 'undefined' || _this === null) return;
                if (_this.imagesLoaded !== undefined) _this.imagesLoaded++;
                if (_this.imagesLoaded === _this.imagesToLoad.length) {
                    _this.reInit();
                    if (params.onImagesReady) _this.fireCallback(params.onImagesReady, _this);
                }
            };
            image.src = src;
        }

        if (params.keyboardControl) {
            bind(document, 'keydown', handleKeyboardKeys);
        }
        if (params.updateOnImagesReady) {
            _this.imagesToLoad = $$('img', _this.container);

            for (var i = 0; i < _this.imagesToLoad.length; i++) {
                _loadImage(_this.imagesToLoad[i].getAttribute('src'));
            }
        }
    }
156129
function( /* data, namespaces */ ) {
            if ( self.bound ) {
                return;
            }

            self.bound = true;

            if ( self.isPushStateEnabled() ) {
                self.originalEventName = "popstate";
                $win.bind( "popstate.navigate", self.popstate );
            } else if ( self.isHashChangeEnabled() ) {
                self.originalEventName = "hashchange";
                $win.bind( "hashchange.navigate", self.hashchange );
            }
        }
615321
function(el, eventName, data)
    {
        var ev;

        if (document.createEvent) {
            ev = document.createEvent('HTMLEvents');
            ev.initEvent(eventName, true, false);
            ev = extend(ev, data);
            el.dispatchEvent(ev);
        } else if (document.createEventObject) {
            ev = document.createEventObject();
            ev = extend(ev, data);
            el.fireEvent('on' + eventName, ev);
        }
    }
1127111
function _onAttributeModified(event, res) {
        // res = {nodeId, name, value}
        var matches = /^data-ld-(.*)/.exec(res.name);
        if (matches) {
            exports.trigger(matches[1], res);
        }
    }
785415
function (event, template) {
            this.moduleCtrl.displayHighlight(template.templateCtxt.getContainerDiv());
            this.data.overModuleCtrl = template.moduleCtrl;
            this.mouseOver(event);
            this._refreshModulesDisplay();
            // prevent propagation
            event.stopPropagation();
        }
1066320
function (event) {
            var containerSize = this._popupContainer.getClientSize();
            if (!this._popup.isOpen || containerSize.width <= 0 || containerSize.height <= 0) {
                // do nothing if the container is not visible
                // or if the popup was manually hidden from external code
                return;
            }

            var domElt = this._domElt;
            var maximized = this._cfg.maximized;

            if (domElt) {
                // Remove width and height, they will be recalculated later, to have the content size well calculated
                domElt.style.width = "";
                domElt.style.height = "";

                // constrain dialog to containerSize
                this._updateDivSize(containerSize);
                this._updateContainerSize();
            }

            if (maximized) {
                this._setMaximizedHeightAndWidth(containerSize);
            }
        }
123717
function(target, type, properties) {
			if(_.type(target) === 'string' || _.type(target) === 'array') {
				var elements = _.type(target) === 'string'? $$(target) : target;
				
				elements.forEach(function(element) {
					_.event.fire(element, type, properties);
				});
			}
			else if (document.createEvent) {
				var evt = document.createEvent("HTMLEvents");
		
				evt.initEvent(type, true, true );
				evt.custom = true;
		
				if(properties) {
					_.attach(evt, properties);
				}
		
				target.dispatchEvent(evt);
			}
		}
371654
function(name, container, args, events) {
      /* handling for any default values if args are not specified */
      var mergeDefaults = function(args, defaults) {
        var args = args || {};

        if (typeof defaults == 'object') {
          for (var key in defaults) {
            if (elation.utils.isNull(args[key])) {
              args[key] = defaults[key];
            }
          }
        }
        
        return args;
      };

      var realname = name;
      if (elation.utils.isObject(name)) {
        // Simple syntax just takes an object with all arguments
        args = name;
        realname = elation.utils.any(args.id, args.name, null);
        container = (!elation.utils.isNull(args.container) ? args.container : null);
        events = (!elation.utils.isNull(args.events) ? args.events : null);
      }

      // If no args were passed in, we're probably being used as the base for another 
      // component's prototype, so there's no need to go through full init
      if (elation.utils.isNull(realname) && !container && !args) {
        var obj = new component.base(type);
        
        // apply default args
        obj.args = mergeDefaults(obj.args, elation.utils.clone(obj.defaults));
        
        return obj;
      }

      // If no name was passed, use the current object count as a name instead ("anonymous" components)
      if (elation.utils.isNull(realname) || realname === "") {
        realname = component.objcount;
      }

      if (!component.obj[realname] && !elation.utils.isEmpty(args)) {
        component.obj[realname] = obj = new component.base(type);
        component.objcount++;
      //}
      // TODO - I think combining this logic would let us use components without needing HTML elements for the container
      //if (component.obj[realname] && container !== undefined) {
        component.obj[realname].componentinit(type, realname, container, args, events);

/*
        if (component.extendclass) {
          component.obj[realname].initSuperClass(component.extendclass);
        }
*/
        // fix handling for append component infinite recursion issue
        if (args.append instanceof elation.component.base) 
          args.append = args.append.container;

        if (args.before instanceof elation.component.base) 
          args.before = args.before.container;

        // apply default args
        try {
          if (typeof obj.defaults == 'object')
            args = mergeDefaults(args, elation.utils.clone(obj.defaults));

          var parentclass = component.extendclass;

          // recursively apply inherited defaults
          while (parentclass) {
            if (typeof parentclass.defaults == 'object')
              elation.utils.merge(mergeDefaults(args, elation.utils.clone(parentclass.defaults)),args);

            parentclass = parentclass.extendclass;
          }
        } catch (e) {
          console.log('-!- Error merging component args', e.msg);
        }

        if (typeof obj.init == 'function') {
          obj.init(realname, container, args, events);
        }
      }
      return component.obj[realname];
    }
986175
function onLoad(event) {
        var img = new Image();
        img.onload = utils.getDimensions(canvas, vm.$storage);
        img.src = event.target.result;
      }