/*
Safari native methods required for Notifications do NOT run in strict mode.
 "use strict";
505694
function (target, source) {
            var name, s;
            for (name in source) {
                s = source[name];
                if (!(name in target) || (target[name] !== s && (!(name in empty) || empty[name] !== s))) {
                    target[name] = s;
                }
            }
            return target; // Object
        }
923636
function show_notification(msg, type, reload_page, timeout){
    // defaults to false
    reload_page = reload_page || false;
    timeout = timeout || 3000;

    $('#notify_message').removeClass();
    $('#notify_message').addClass('notify_message-' + type);
    $('#notify_message').html(msg);
    $('#notify_message').slideDown(600).delay(timeout).slideUp(600, function(){
        if(reload_page === true){
            location.reload();
        }
    });
}
466347
function initDelegateMembers(oScrollerInstance) {
			var oDelegateMembers = {
				_init : function(oControl, sScrollContentDom, oConfig) {
					// default scroll supression threshold of jQuery mobile is too small and prevent native scrolling
					if (jQuery.event && jQuery.event.special && jQuery.event.special.swipe && jQuery.event.special.swipe.scrollSupressionThreshold < 120) {
						jQuery.event.special.swipe.scrollSupressionThreshold = 120;
					}

					jQuery.extend(this, oNativeScrollDelegate);

					if (oConfig.nonTouchScrolling === true) {
						this._bDragScroll = true; // optional drag instead of native scrolling
					}
					if (sap.ui.getCore().getConfiguration().getRTL()) {
						this._scrollX = 9999; // in RTL case initially scroll to the very right
						if (Device.browser.msie || Device.browser.edge) {
							this._bFlipX = true; // in IE and Edge RTL, scrollLeft goes opposite direction
						}
					}
				},
				_exit : function() {
					if (this._cleanup) {
						this._cleanup();
					}
				}
			};
			// Copy over members to prototype
			jQuery.extend(oScrollerInstance, oDelegateMembers);
		}
1106063
function() {
		var proto = Element.prototype;
		if (gui.Type.isDefined(proto.spirit)) {
			throw new Error("Spiritual loaded twice?");
		} else {
			proto.spirit = null; // defineProperty fails in iOS5
		}
	}
481083
function(){
			document.getElementById('messageLabel').classList.remove("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$
			document.getElementById('messageContainer').classList.remove("errorMessage"); //$NON-NLS-0$ //$NON-NLS-1$
			lib.empty(document.getElementById('messageText')); //$NON-NLS-0$
			document.getElementById('messageContainer').classList.remove("showing"); //$NON-NLS-0$ //$NON-NLS-1$
		}
1312664
function alert(title, content, callback, type) {
  const opt = defaultOption.alert;
  const argLen = arguments.length;
  if (argLen === 1) {
    content = title;
    title = null;
  }
  if (argLen === 2) {
    if (typeof content === 'function') {
      callback = content;
      content = title;
      title = null;
    }
  }
  title = title || opt.title;
  if (opt.actions[0]) {
    opt.actions[0].onPress = callback;
  }
  tip(title, content, opt.actions, type);
}
733585
function printNotMetMessage(installedVersion) {
    console.log('Ignite CLI requires ' + packageName + ' ' + range + ' to be installed.')
    if (installedVersion) {
      console.log('')
      console.log('You currently have ' + installedVersion + ' installed.')
    }
    console.log('')
    console.log(installMessage)
  }
633889
function handleReload(loadWithoutExtensions) {
        var href    = window.location.href,
            params  = new UrlParams();

        // Make sure the Reload Without User Extensions parameter is removed
        params.parse();

        if (loadWithoutExtensions) {
            if (!params.get("reloadWithoutUserExts")) {
                params.put("reloadWithoutUserExts", true);
            }
        } else {
            if (params.get("reloadWithoutUserExts")) {
                params.remove("reloadWithoutUserExts");
            }
        }

        if (href.indexOf("?") !== -1) {
            href = href.substring(0, href.indexOf("?"));
        }

        if (!params.isEmpty()) {
            href += "?" + params.toString();
        }

        // Give Mac native menus extra time to update shortcut highlighting.
        // Prevents the menu highlighting from getting messed up after reload.
        window.setTimeout(function () {
            browserReload(href);
        }, 100);
    }
452116
function(message, rule) {
        "use strict";
        this.messages.push({
            type    : "error",
            rollup  : true,
            message : message,
            rule    : rule
        });
    }
892960
function checkAndSend(e) {
  var formName = $(e.currentTarget.parentNode).attr('id');

  var email = $('#' + formName + ' [name=ep_email]').val();

  if (email && $('#' + formName + ' [name=ep_email_option]').val() == 'subscribe'
      && !$('#' + formName + ' [name=ep_email_onStart]').is(':checked')
      && !$('#' + formName + ' [name=ep_email_onEnd]').is(':checked')) {
    $.gritter.add({
      // (string | mandatory) the heading of the notification
      title: window._('ep_email_notifications.titleGritterError'),
      // (string | mandatory) the text inside the notification
      text: window._('ep_email_notifications.msgOptionsNotChecked'),
      // (string | optional) add a class name to the gritter msg
      class_name: "emailNotificationsSubscrOptionsMissing"
    });
  } else if (email) {
    $('#' + formName).submit();
  }
  return false;
}
281574
def normal_notification(text, options = {})
      base = {
        aps: {
          alert: {
            title: nil,
            subtitle: nil,
            body: text
          },
          sound: options.delete(:sound),
          badge: 1,
          'mutable-content': 1,
          'content-available': 1
        }
      }
      base.merge(options)
    end
719929
function reactNativePlugin(Raven, options) {
  options = options || {};

  // react-native doesn't have a document, so can't use default Image
  // transport - use XMLHttpRequest instead
  Raven.setTransport(reactNativePlugin._transport);

  // Use data callback to strip device-specific paths from stack traces
  Raven.setDataCallback(
    wrappedCallback(function(data) {
      return reactNativePlugin._normalizeData(data, options.pathStrip);
    })
  );

  // Check for a previously persisted payload, and report it.
  reactNativePlugin
    ._restorePayload()
    .then(function(payload) {
      options.onInitialize && options.onInitialize(payload);
      if (!payload) return;
      Raven._sendProcessedPayload(payload, function(error) {
        if (error) return; // Try again next launch.
        reactNativePlugin._clearPayload();
      });
    })
    ['catch'](function() {});

  // Make sure that if multiple fatals occur, we only persist the first one.
  //
  // The first error is probably the most important/interesting error, and we
  // want to crash ASAP, rather than potentially queueing up multiple errors.
  var handlingFatal = false;

  var defaultHandler =
    (ErrorUtils.getGlobalHandler && ErrorUtils.getGlobalHandler()) ||
    ErrorUtils._globalHandler;

  Raven.setShouldSendCallback(function(data, originalCallback) {
    if (!(FATAL_ERROR_KEY in data)) {
      // not a fatal (will not crash runtime), continue as planned
      return originalCallback ? originalCallback.call(this, data) : true;
    }

    var origError = data[FATAL_ERROR_KEY];
    delete data[FATAL_ERROR_KEY];

    reactNativePlugin
      ._persistPayload(data)
      .then(function() {
        defaultHandler(origError, true);
        handlingFatal = false; // In case it isn't configured to crash.
        return null;
      })
      ['catch'](function() {});

    return false; // Do not continue.
  });

  ErrorUtils.setGlobalHandler(function(error, isFatal) {
    var captureOptions = {
      timestamp: new Date() / 1000
    };
    var error = arguments[0];
    // We want to handle fatals, but only in production mode.
    var shouldHandleFatal = isFatal && !global.__DEV__;
    if (shouldHandleFatal) {
      if (handlingFatal) {
        console.log('Encountered multiple fatals in a row. The latest:', error);
        return;
      }
      handlingFatal = true;
      // We need to preserve the original error so that it can be rethrown
      // after it is persisted (see our shouldSendCallback above).
      captureOptions[FATAL_ERROR_KEY] = error;
    }
    Raven.captureException(error, captureOptions);
    // Handle non-fatals regularly.
    if (!shouldHandleFatal) {
      defaultHandler(error);
    }
  });
}
1092234
function(ndefMessageAsString) {
    "use strict";
    var ndefMessage = JSON.parse(ndefMessageAsString);
    cordova.fireDocumentEvent("ndef", {
        type: "ndef",
        tag: {
            ndefMessage: ndefMessage
        }
    });
}
385666
function(node, obj) {
        var value;
        for(var name in obj) {
            value = obj[name].toString();
            if(value.match(/[A-Z]/)) {
                // safari lowercases attributes with setAttribute
                this.setAttributeNS(node, null, name, value);
            } else {
                node.setAttribute(name, value);
            }
        }
    }
783984
function mix(r, s, wl) {
    // Copy "all" properties including inherited ones.
    for (var p in s) {
        if (s.hasOwnProperty(p)) {
            if (wl && indexOf(wl, p) === -1) continue

            // 在 iPhone 1 代等设备的 Safari 中，prototype 也会被枚举出来，需排除
            if (p !== 'prototype') {
                r[p] = s[p]
            }
        }
    }
}
1327172
function onSignInWithEmailLink() {
  var email = $('#sign-in-with-email-link-email').val();
  var link = $('#sign-in-with-email-link-link').val() || undefined;
  if (auth.isSignInWithEmailLink(link)) {
    auth.signInWithEmailLink(email, link).then(onAuthSuccess, onAuthError);
  } else {
    alertError('Sign in link is invalid');
  }
}
56982
function(nativeEvent, typeOverride) {
  var evt = eventWrapper(nativeEvent);
  if (typeOverride !== undefined) {
    evt.type = typeOverride;
  }
  var activePath = [];
  var elem = evt.target;
  var events;

  /**
   * Handle calling bound functions with the proper targets set
   * @TODO move this outside eventHandler
   * @param  {Element}         elem      DOM element to trigger events on
   * @param  {Array<Function>} funcArr   Array of bound functions to trigger
   * @param  {String}          selector  Selector string that the event was bound to
   * @param  {Element}         delegate  DOM element this event was bound to for delegation
   */
  var triggerEventFunctions = function(elem, funcArr, selector, delegate) {
    var result;
    evt.currentTarget = elem;
    evt.delegateTarget = delegate;
    for (var i = 0; i < funcArr.length; i++) {
      if (!evt.isImmediatePropagationStopped()) {
        evt.vEvent = {
          handler: funcArr[i].method,
          selector: selector
        };

        result = funcArr[i].method(evt);
        if (result === false) {
          falseHandler(evt);
        }
      }
    }
  };

  /**
   * Checks if bound events should fire
   * @param  {Object}    typeEvents        Event object of events to check if should fire
   */
  var checkEvents = function(typeEvents) {
    var elemClasses, elemClass;

    // Iterate over previously passed elements to check for any delegated events
    var activePathLength = activePath.length;
    for (var i = 0; i < activePathLength; i++) {
      elemClasses = activePath[i].classes;
      // Once stopPropagation is called stop
      if (!evt.isPropagationStopped()) {
        var elemClassesLength = elemClasses.length;
        for (var j = 0; j < elemClassesLength; j++) {
          elemClass = elemClasses[j];
          if (typeEvents[elemClass]) {
            triggerEventFunctions(activePath[i].element, typeEvents[elemClass], elemClass, elem);
          }
        }
      }
    }

    // Check for any non-delegated events
    if (!evt.isPropagationStopped() && typeEvents.self) {
      triggerEventFunctions(elem, typeEvents.self);
    }
  };

  while (elem && !evt.isPropagationStopped()) {
    events = module.exports.getEvents(elem);
    if (events) {
      // Generic events
      if (events[evt.type]) {
        checkEvents(events[evt.type]);
      }
    }
    // Create array of class names that match our pattern to check for delegation later
    var elemActiveClasses = module.exports.getActiveClasses(elem);
    if (elemActiveClasses.length) {
      activePath.push({
        element: elem,
        classes: elemActiveClasses
      });
    }
    elem = elem.parentNode;
  }
}