作者 曾海沥

add master

要显示太多修改。

为保证性能只显示 37 of 37+ 个文件。

  1 +FROM centos:centos7
  2 +MAINTAINER The CentOS Project <cloud-ops@centos.org>
  3 +
  4 +RUN yum -y update; yum clean all
  5 +RUN yum -y install epel-release; yum clean all
  6 +RUN yum -y install nginx; yum clean all
  7 +RUN echo "daemon off;" >> /etc/nginx/nginx.conf
  8 +#RUN echo "nginx on CentOS 7 inside Docker" > /usr/share/nginx/html/index.html
  9 +COPY ./conf.d /etc/nginx/conf.d
  10 +COPY ./dist /home/project
  11 +EXPOSE 80
  12 +CMD [ "/usr/sbin/nginx" ]
  1 +server {
  2 + listen 80;
  3 + server_name suplus-yhs-dev.fjmaimaimai.com;
  4 + gzip_static on;
  5 + root /home/project;
  6 + index index.html;
  7 + location /flow-platform-api/ {
  8 + proxy_pass http://suplus-customer/;
  9 + }
  10 +
  11 +}
  1 +#!/bin/bash
  2 +export PATH=/root/local/bin:$PATH
  3 +kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
  4 +if [ "$?" == "1" ];then
  5 + kubectl create -f /tmp/suplus-front.yaml --record
  6 + kubectl -n mmm-suplus-dev get svc | grep -q suplus-front
  7 + if [ "$?" == "0" ];then
  8 + echo "suplus-front service install success!"
  9 + else
  10 + echo "suplus-front service install fail!"
  11 + fi
  12 + kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
  13 + if [ "$?" == "0" ];then
  14 + echo "suplus-front deployment install success!"
  15 + else
  16 + echo "suplus-front deployment install fail!"
  17 + fi
  18 +else
  19 + kubectl delete -f /tmp/suplus-front.yaml
  20 + kubectl -n mmm-suplus-dev get svc | grep -q suplus-front
  21 + while [ "$?" == "0" ]
  22 + do
  23 + kubectl -n mmm-suplus-dev get svc | grep -q suplus-front
  24 + done
  25 + kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
  26 + while [ "$?" == "0" ]
  27 + do
  28 + kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
  29 + done
  30 + kubectl create -f /tmp/suplus-front.yaml --record
  31 + kubectl -n mmm-suplus-dev get svc | grep -q suplus-front
  32 + if [ "$?" == "0" ];then
  33 + echo "suplus-front service update success!"
  34 + else
  35 + echo "suplus-front service update fail!"
  36 + fi
  37 + kubectl -n mmm-suplus-dev get pods | grep -q suplus-front
  38 + if [ "$?" == "0" ];then
  39 + echo "suplus-front deployment update success!"
  40 + else
  41 + echo "suplus-front deployment update fail!"
  42 + fi
  43 +fi
  1 +apiVersion: v1
  2 +kind: Service
  3 +metadata:
  4 + name: suplus-front
  5 + namespace: mmm-suplus-dev
  6 + labels:
  7 + k8s-app: suplus-front
  8 +spec:
  9 + ports:
  10 + - name: "http"
  11 + port: 80
  12 + targetPort: 80
  13 + selector:
  14 + k8s-app: suplus-front
  15 +---
  16 +apiVersion: extensions/v1beta1
  17 +kind: Deployment
  18 +metadata:
  19 + name: suplus-front
  20 + namespace: mmm-suplus-dev
  21 + labels:
  22 + k8s-app: suplus-front
  23 +spec:
  24 + replicas: 1
  25 + template:
  26 + metadata:
  27 + labels:
  28 + k8s-app: suplus-front
  29 + spec:
  30 + containers:
  31 + - name: suplus-front
  32 + image: 192.168.0.243:5000/mmm/suplus-front:dev
  33 + imagePullPolicy: Always
  34 + volumeMounts:
  35 + - mountPath: /opt/logs
  36 + name: accesslogs
  37 + ports:
  38 + - containerPort: 80
  39 + env:
  40 + - name: MYSQL_HOST
  41 + valueFrom:
  42 + configMapKeyRef:
  43 + name: suplus-config
  44 + key: mysql.host
  45 + - name: MYSQL_PORT
  46 + valueFrom:
  47 + configMapKeyRef:
  48 + name: suplus-config
  49 + key: mysql.port
  50 + - name: MYSQL_USER
  51 + valueFrom:
  52 + configMapKeyRef:
  53 + name: suplus-config
  54 + key: mysql.user
  55 + - name: MYSQL_PASSWORD
  56 + valueFrom:
  57 + configMapKeyRef:
  58 + name: suplus-config
  59 + key: mysql.password
  60 + - name: MYSQL_DB_NAME
  61 + value: "suplus_file"
  62 + - name: aliyun_logs_suplusfront
  63 + value: "stdout"
  64 + - name: aliyun_logs_access
  65 + value: " /opt/logs/app.log"
  66 + volumes:
  67 + - name: accesslogs
  68 + emptyDir: {}
  1 +/*!
  2 + * EventEmitter v4.2.11 - git.io/ee
  3 + * Unlicense - http://unlicense.org/
  4 + * Oliver Caldwell - http://oli.me.uk/
  5 + * @preserve
  6 + */
  7 +
  8 +;(function () {
  9 + 'use strict';
  10 +
  11 + /**
  12 + * Class for managing events.
  13 + * Can be extended to provide event functionality in other classes.
  14 + *
  15 + * @class EventEmitter Manages event registering and emitting.
  16 + */
  17 + function EventEmitter() {}
  18 +
  19 + // Shortcuts to improve speed and size
  20 + var proto = EventEmitter.prototype;
  21 + var exports = this;
  22 + var originalGlobalValue = exports.EventEmitter;
  23 +
  24 + /**
  25 + * Finds the index of the listener for the event in its storage array.
  26 + *
  27 + * @param {Function[]} listeners Array of listeners to search through.
  28 + * @param {Function} listener Method to look for.
  29 + * @return {Number} Index of the specified listener, -1 if not found
  30 + * @api private
  31 + */
  32 + function indexOfListener(listeners, listener) {
  33 + var i = listeners.length;
  34 + while (i--) {
  35 + if (listeners[i].listener === listener) {
  36 + return i;
  37 + }
  38 + }
  39 +
  40 + return -1;
  41 + }
  42 +
  43 + /**
  44 + * Alias a method while keeping the context correct, to allow for overwriting of target method.
  45 + *
  46 + * @param {String} name The name of the target method.
  47 + * @return {Function} The aliased method
  48 + * @api private
  49 + */
  50 + function alias(name) {
  51 + return function aliasClosure() {
  52 + return this[name].apply(this, arguments);
  53 + };
  54 + }
  55 +
  56 + /**
  57 + * Returns the listener array for the specified event.
  58 + * Will initialise the event object and listener arrays if required.
  59 + * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.
  60 + * Each property in the object response is an array of listener functions.
  61 + *
  62 + * @param {String|RegExp} evt Name of the event to return the listeners from.
  63 + * @return {Function[]|Object} All listener functions for the event.
  64 + */
  65 + proto.getListeners = function getListeners(evt) {
  66 + var events = this._getEvents();
  67 + var response;
  68 + var key;
  69 +
  70 + // Return a concatenated array of all matching events if
  71 + // the selector is a regular expression.
  72 + if (evt instanceof RegExp) {
  73 + response = {};
  74 + for (key in events) {
  75 + if (events.hasOwnProperty(key) && evt.test(key)) {
  76 + response[key] = events[key];
  77 + }
  78 + }
  79 + }
  80 + else {
  81 + response = events[evt] || (events[evt] = []);
  82 + }
  83 +
  84 + return response;
  85 + };
  86 +
  87 + /**
  88 + * Takes a list of listener objects and flattens it into a list of listener functions.
  89 + *
  90 + * @param {Object[]} listeners Raw listener objects.
  91 + * @return {Function[]} Just the listener functions.
  92 + */
  93 + proto.flattenListeners = function flattenListeners(listeners) {
  94 + var flatListeners = [];
  95 + var i;
  96 +
  97 + for (i = 0; i < listeners.length; i += 1) {
  98 + flatListeners.push(listeners[i].listener);
  99 + }
  100 +
  101 + return flatListeners;
  102 + };
  103 +
  104 + /**
  105 + * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.
  106 + *
  107 + * @param {String|RegExp} evt Name of the event to return the listeners from.
  108 + * @return {Object} All listener functions for an event in an object.
  109 + */
  110 + proto.getListenersAsObject = function getListenersAsObject(evt) {
  111 + var listeners = this.getListeners(evt);
  112 + var response;
  113 +
  114 + if (listeners instanceof Array) {
  115 + response = {};
  116 + response[evt] = listeners;
  117 + }
  118 +
  119 + return response || listeners;
  120 + };
  121 +
  122 + /**
  123 + * Adds a listener function to the specified event.
  124 + * The listener will not be added if it is a duplicate.
  125 + * If the listener returns true then it will be removed after it is called.
  126 + * If you pass a regular expression as the event name then the listener will be added to all events that match it.
  127 + *
  128 + * @param {String|RegExp} evt Name of the event to attach the listener to.
  129 + * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
  130 + * @return {Object} Current instance of EventEmitter for chaining.
  131 + */
  132 + proto.addListener = function addListener(evt, listener) {
  133 + var listeners = this.getListenersAsObject(evt);
  134 + var listenerIsWrapped = typeof listener === 'object';
  135 + var key;
  136 +
  137 + for (key in listeners) {
  138 + if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {
  139 + listeners[key].push(listenerIsWrapped ? listener : {
  140 + listener: listener,
  141 + once: false
  142 + });
  143 + }
  144 + }
  145 +
  146 + return this;
  147 + };
  148 +
  149 + /**
  150 + * Alias of addListener
  151 + */
  152 + proto.on = alias('addListener');
  153 +
  154 + /**
  155 + * Semi-alias of addListener. It will add a listener that will be
  156 + * automatically removed after its first execution.
  157 + *
  158 + * @param {String|RegExp} evt Name of the event to attach the listener to.
  159 + * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
  160 + * @return {Object} Current instance of EventEmitter for chaining.
  161 + */
  162 + proto.addOnceListener = function addOnceListener(evt, listener) {
  163 + return this.addListener(evt, {
  164 + listener: listener,
  165 + once: true
  166 + });
  167 + };
  168 +
  169 + /**
  170 + * Alias of addOnceListener.
  171 + */
  172 + proto.once = alias('addOnceListener');
  173 +
  174 + /**
  175 + * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.
  176 + * You need to tell it what event names should be matched by a regex.
  177 + *
  178 + * @param {String} evt Name of the event to create.
  179 + * @return {Object} Current instance of EventEmitter for chaining.
  180 + */
  181 + proto.defineEvent = function defineEvent(evt) {
  182 + this.getListeners(evt);
  183 + return this;
  184 + };
  185 +
  186 + /**
  187 + * Uses defineEvent to define multiple events.
  188 + *
  189 + * @param {String[]} evts An array of event names to define.
  190 + * @return {Object} Current instance of EventEmitter for chaining.
  191 + */
  192 + proto.defineEvents = function defineEvents(evts) {
  193 + for (var i = 0; i < evts.length; i += 1) {
  194 + this.defineEvent(evts[i]);
  195 + }
  196 + return this;
  197 + };
  198 +
  199 + /**
  200 + * Removes a listener function from the specified event.
  201 + * When passed a regular expression as the event name, it will remove the listener from all events that match it.
  202 + *
  203 + * @param {String|RegExp} evt Name of the event to remove the listener from.
  204 + * @param {Function} listener Method to remove from the event.
  205 + * @return {Object} Current instance of EventEmitter for chaining.
  206 + */
  207 + proto.removeListener = function removeListener(evt, listener) {
  208 + var listeners = this.getListenersAsObject(evt);
  209 + var index;
  210 + var key;
  211 +
  212 + for (key in listeners) {
  213 + if (listeners.hasOwnProperty(key)) {
  214 + index = indexOfListener(listeners[key], listener);
  215 +
  216 + if (index !== -1) {
  217 + listeners[key].splice(index, 1);
  218 + }
  219 + }
  220 + }
  221 +
  222 + return this;
  223 + };
  224 +
  225 + /**
  226 + * Alias of removeListener
  227 + */
  228 + proto.off = alias('removeListener');
  229 +
  230 + /**
  231 + * Adds listeners in bulk using the manipulateListeners method.
  232 + * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
  233 + * You can also pass it a regular expression to add the array of listeners to all events that match it.
  234 + * Yeah, this function does quite a bit. That's probably a bad thing.
  235 + *
  236 + * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.
  237 + * @param {Function[]} [listeners] An optional array of listener functions to add.
  238 + * @return {Object} Current instance of EventEmitter for chaining.
  239 + */
  240 + proto.addListeners = function addListeners(evt, listeners) {
  241 + // Pass through to manipulateListeners
  242 + return this.manipulateListeners(false, evt, listeners);
  243 + };
  244 +
  245 + /**
  246 + * Removes listeners in bulk using the manipulateListeners method.
  247 + * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
  248 + * You can also pass it an event name and an array of listeners to be removed.
  249 + * You can also pass it a regular expression to remove the listeners from all events that match it.
  250 + *
  251 + * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.
  252 + * @param {Function[]} [listeners] An optional array of listener functions to remove.
  253 + * @return {Object} Current instance of EventEmitter for chaining.
  254 + */
  255 + proto.removeListeners = function removeListeners(evt, listeners) {
  256 + // Pass through to manipulateListeners
  257 + return this.manipulateListeners(true, evt, listeners);
  258 + };
  259 +
  260 + /**
  261 + * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.
  262 + * The first argument will determine if the listeners are removed (true) or added (false).
  263 + * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
  264 + * You can also pass it an event name and an array of listeners to be added/removed.
  265 + * You can also pass it a regular expression to manipulate the listeners of all events that match it.
  266 + *
  267 + * @param {Boolean} remove True if you want to remove listeners, false if you want to add.
  268 + * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.
  269 + * @param {Function[]} [listeners] An optional array of listener functions to add/remove.
  270 + * @return {Object} Current instance of EventEmitter for chaining.
  271 + */
  272 + proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
  273 + var i;
  274 + var value;
  275 + var single = remove ? this.removeListener : this.addListener;
  276 + var multiple = remove ? this.removeListeners : this.addListeners;
  277 +
  278 + // If evt is an object then pass each of its properties to this method
  279 + if (typeof evt === 'object' && !(evt instanceof RegExp)) {
  280 + for (i in evt) {
  281 + if (evt.hasOwnProperty(i) && (value = evt[i])) {
  282 + // Pass the single listener straight through to the singular method
  283 + if (typeof value === 'function') {
  284 + single.call(this, i, value);
  285 + }
  286 + else {
  287 + // Otherwise pass back to the multiple function
  288 + multiple.call(this, i, value);
  289 + }
  290 + }
  291 + }
  292 + }
  293 + else {
  294 + // So evt must be a string
  295 + // And listeners must be an array of listeners
  296 + // Loop over it and pass each one to the multiple method
  297 + i = listeners.length;
  298 + while (i--) {
  299 + single.call(this, evt, listeners[i]);
  300 + }
  301 + }
  302 +
  303 + return this;
  304 + };
  305 +
  306 + /**
  307 + * Removes all listeners from a specified event.
  308 + * If you do not specify an event then all listeners will be removed.
  309 + * That means every event will be emptied.
  310 + * You can also pass a regex to remove all events that match it.
  311 + *
  312 + * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.
  313 + * @return {Object} Current instance of EventEmitter for chaining.
  314 + */
  315 + proto.removeEvent = function removeEvent(evt) {
  316 + var type = typeof evt;
  317 + var events = this._getEvents();
  318 + var key;
  319 +
  320 + // Remove different things depending on the state of evt
  321 + if (type === 'string') {
  322 + // Remove all listeners for the specified event
  323 + delete events[evt];
  324 + }
  325 + else if (evt instanceof RegExp) {
  326 + // Remove all events matching the regex.
  327 + for (key in events) {
  328 + if (events.hasOwnProperty(key) && evt.test(key)) {
  329 + delete events[key];
  330 + }
  331 + }
  332 + }
  333 + else {
  334 + // Remove all listeners in all events
  335 + delete this._events;
  336 + }
  337 +
  338 + return this;
  339 + };
  340 +
  341 + /**
  342 + * Alias of removeEvent.
  343 + *
  344 + * Added to mirror the node API.
  345 + */
  346 + proto.removeAllListeners = alias('removeEvent');
  347 +
  348 + /**
  349 + * Emits an event of your choice.
  350 + * When emitted, every listener attached to that event will be executed.
  351 + * If you pass the optional argument array then those arguments will be passed to every listener upon execution.
  352 + * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.
  353 + * So they will not arrive within the array on the other side, they will be separate.
  354 + * You can also pass a regular expression to emit to all events that match it.
  355 + *
  356 + * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
  357 + * @param {Array} [args] Optional array of arguments to be passed to each listener.
  358 + * @return {Object} Current instance of EventEmitter for chaining.
  359 + */
  360 + proto.emitEvent = function emitEvent(evt, args) {
  361 + var listenersMap = this.getListenersAsObject(evt);
  362 + var listeners;
  363 + var listener;
  364 + var i;
  365 + var key;
  366 + var response;
  367 +
  368 + for (key in listenersMap) {
  369 + if (listenersMap.hasOwnProperty(key)) {
  370 + listeners = listenersMap[key].slice(0);
  371 + i = listeners.length;
  372 +
  373 + while (i--) {
  374 + // If the listener returns true then it shall be removed from the event
  375 + // The function is executed either with a basic call or an apply if there is an args array
  376 + listener = listeners[i];
  377 +
  378 + if (listener.once === true) {
  379 + this.removeListener(evt, listener.listener);
  380 + }
  381 +
  382 + response = listener.listener.apply(this, args || []);
  383 +
  384 + if (response === this._getOnceReturnValue()) {
  385 + this.removeListener(evt, listener.listener);
  386 + }
  387 + }
  388 + }
  389 + }
  390 +
  391 + return this;
  392 + };
  393 +
  394 + /**
  395 + * Alias of emitEvent
  396 + */
  397 + proto.trigger = alias('emitEvent');
  398 +
  399 + /**
  400 + * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.
  401 + * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.
  402 + *
  403 + * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
  404 + * @param {...*} Optional additional arguments to be passed to each listener.
  405 + * @return {Object} Current instance of EventEmitter for chaining.
  406 + */
  407 + proto.emit = function emit(evt) {
  408 + var args = Array.prototype.slice.call(arguments, 1);
  409 + return this.emitEvent(evt, args);
  410 + };
  411 +
  412 + /**
  413 + * Sets the current value to check against when executing listeners. If a
  414 + * listeners return value matches the one set here then it will be removed
  415 + * after execution. This value defaults to true.
  416 + *
  417 + * @param {*} value The new value to check for when executing listeners.
  418 + * @return {Object} Current instance of EventEmitter for chaining.
  419 + */
  420 + proto.setOnceReturnValue = function setOnceReturnValue(value) {
  421 + this._onceReturnValue = value;
  422 + return this;
  423 + };
  424 +
  425 + /**
  426 + * Fetches the current value to check against when executing listeners. If
  427 + * the listeners return value matches this one then it should be removed
  428 + * automatically. It will return true by default.
  429 + *
  430 + * @return {*|Boolean} The current value to check for or the default, true.
  431 + * @api private
  432 + */
  433 + proto._getOnceReturnValue = function _getOnceReturnValue() {
  434 + if (this.hasOwnProperty('_onceReturnValue')) {
  435 + return this._onceReturnValue;
  436 + }
  437 + else {
  438 + return true;
  439 + }
  440 + };
  441 +
  442 + /**
  443 + * Fetches the events object and creates one if required.
  444 + *
  445 + * @return {Object} The events storage object.
  446 + * @api private
  447 + */
  448 + proto._getEvents = function _getEvents() {
  449 + return this._events || (this._events = {});
  450 + };
  451 +
  452 + /**
  453 + * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.
  454 + *
  455 + * @return {Function} Non conflicting EventEmitter class.
  456 + */
  457 + EventEmitter.noConflict = function noConflict() {
  458 + exports.EventEmitter = originalGlobalValue;
  459 + return EventEmitter;
  460 + };
  461 +
  462 + // Expose the class either via AMD, CommonJS or the global object
  463 + if (typeof define === 'function' && define.amd) {
  464 + define(function () {
  465 + return EventEmitter;
  466 + });
  467 + }
  468 + else if (typeof module === 'object' && module.exports){
  469 + module.exports = EventEmitter;
  470 + }
  471 + else {
  472 + exports.EventEmitter = EventEmitter;
  473 + }
  474 +}.call(this));
  1 +/*!
  2 + * EventEmitter v4.2.11 - git.io/ee
  3 + * Unlicense - http://unlicense.org/
  4 + * Oliver Caldwell - http://oli.me.uk/
  5 + * @preserve
  6 + */
  7 +(function(){"use strict";function t(){}function i(t,n){for(var e=t.length;e--;)if(t[e].listener===n)return e;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var e=t.prototype,r=this,s=r.EventEmitter;e.getListeners=function(n){var r,e,t=this._getEvents();if(n instanceof RegExp){r={};for(e in t)t.hasOwnProperty(e)&&n.test(e)&&(r[e]=t[e])}else r=t[n]||(t[n]=[]);return r},e.flattenListeners=function(t){var e,n=[];for(e=0;e<t.length;e+=1)n.push(t[e].listener);return n},e.getListenersAsObject=function(n){var e,t=this.getListeners(n);return t instanceof Array&&(e={},e[n]=t),e||t},e.addListener=function(r,e){var t,n=this.getListenersAsObject(r),s="object"==typeof e;for(t in n)n.hasOwnProperty(t)&&-1===i(n[t],e)&&n[t].push(s?e:{listener:e,once:!1});return this},e.on=n("addListener"),e.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},e.once=n("addOnceListener"),e.defineEvent=function(e){return this.getListeners(e),this},e.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},e.removeListener=function(r,s){var n,e,t=this.getListenersAsObject(r);for(e in t)t.hasOwnProperty(e)&&(n=i(t[e],s),-1!==n&&t[e].splice(n,1));return this},e.off=n("removeListener"),e.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},e.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},e.manipulateListeners=function(r,t,i){var e,n,s=r?this.removeListener:this.addListener,o=r?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(e=i.length;e--;)s.call(this,t,i[e]);else for(e in t)t.hasOwnProperty(e)&&(n=t[e])&&("function"==typeof n?s.call(this,e,n):o.call(this,e,n));return this},e.removeEvent=function(e){var t,r=typeof e,n=this._getEvents();if("string"===r)delete n[e];else if(e instanceof RegExp)for(t in n)n.hasOwnProperty(t)&&e.test(t)&&delete n[t];else delete this._events;return this},e.removeAllListeners=n("removeEvent"),e.emitEvent=function(t,u){var n,e,r,i,o,s=this.getListenersAsObject(t);for(i in s)if(s.hasOwnProperty(i))for(n=s[i].slice(0),r=n.length;r--;)e=n[r],e.once===!0&&this.removeListener(t,e.listener),o=e.listener.apply(this,u||[]),o===this._getOnceReturnValue()&&this.removeListener(t,e.listener);return this},e.trigger=n("emitEvent"),e.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},e.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},e._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},e._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return r.EventEmitter=s,t},"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports?module.exports=t:r.EventEmitter=t}).call(this);
此 diff 太大无法显示。
此 diff 太大无法显示。
  1 +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Netcall=e():t.Netcall=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(98),r=i(o),s="4.8.0",a="2.4.0.208",c=n(343),u=n(219),l=n(276),d=n(341),h=n(203),f=n(285),p=n(286),v=n(287),m=void 0,_=(0,r["default"])({version:s,versionAgent:a},h,{webgl:c,install:function(t,e){u.install(t,e),l.install(t,e),t.parser.mixin({configMap:f,serializeMap:p,unserializeMap:v}),d.install(t,e)},getInstance:function(t){return m||(m=new d(t)),m},destroy:function(){m&&(m.destroy(),m=null)}});t.exports=_},,function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var i=n(35)("wks"),o=n(22),r=n(2).Symbol,s="function"==typeof r,a=t.exports=function(t){return i[t]||(i[t]=s&&r[t]||(s?r:o)("Symbol."+t))};a.store=i},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},,function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){t.exports=!n(18)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(9),o=n(21);t.exports=n(7)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(14),o=n(50),r=n(37),s=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return s(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var i=n(57),o=n(32);t.exports=function(t){return i(o(t))}},function(t,e,n){(function(e){"use strict";var n="'4cb44d7578c1b21a823b0bbf6da74f19e0b51d15",i="4cb44d75'",o="4.8.0",r="2.4.0.208",s="3.7.0",a="45",c=1,u="https://lbs.netease.im/lbs/webconf.jsp",l="development"===e.env.NODE_ENV?6e3:42e3,d={info:{hash:n,shortHash:i,version:o,sdkVersion:a,nrtcVersion:s,protocolVersion:c},agentVersion:r,lbsUrl:u,connectTimeout:l,xhrTimeout:l,socketTimeout:l,reconnectionDelay:656.25,reconnectionDelayMax:l,reconnectionJitter:.1,heartbeatInterval:18e4,cmdTimeout:l};d.formatSocketUrl=function(t){var e=t.url,n=t.secure,i=n?"https":"http";return e.indexOf("http")===-1?i+"://"+e:e},d.fileServerUrl="https://nos.netease.com",d.replaceUrl="http://nos.netease.im",d.genUploadUrl=function(t){return d.uploadUrl?d.uploadUrl+"/"+t:d.fileServerUrl+"/"+t},d.genDownloadUrl=function(t,e){return d.downloadUrl?d.replaceUrl+"/"+t+"/"+e:"https://"+t+".nosdn.127.net/"+e},t.exports=d}).call(e,n(28))},function(t,e,n){var i=n(11);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(121),r=i(o),s=n(120),a=i(s),c=n(20),u=i(c);e["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":(0,u["default"])(e)));t.prototype=(0,a["default"])(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(r["default"]?(0,r["default"])(t,e):t.__proto__=e)}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(20),r=i(o);e["default"]=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":(0,r["default"])(e))&&"function"!=typeof e?t:e}},function(t,e,n){var i=n(2),o=n(10),r=n(45),s=n(8),a="prototype",c=function(t,e,n){var u,l,d,h=t&c.F,f=t&c.G,p=t&c.S,v=t&c.P,m=t&c.B,_=t&c.W,g=f?o:o[e]||(o[e]={}),y=g[a],C=f?i:p?i[e]:(i[e]||{})[a];f&&(n=e);for(u in n)l=!h&&C&&void 0!==C[u],l&&u in g||(d=l?C[u]:n[u],g[u]=f&&"function"!=typeof C[u]?n[u]:m&&l?r(d,i):_&&C[u]==d?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[a]=t[a],e}(d):v&&"function"==typeof d?r(Function.call,d):d,v&&((g.virtual||(g.virtual={}))[u]=d,t&c.R&&y&&!y[u]&&s(y,u,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){"use strict";function i(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function r(){this._events=new i,this._eventsCount=0}var s=Object.prototype.hasOwnProperty,a="~";Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(a=!1)),r.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)s.call(t,e)&&n.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},r.prototype.listeners=function(t,e){var n=a?a+t:t,i=this._events[n];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,r=i.length,s=new Array(r);o<r;o++)s[o]=i[o].fn;return s},r.prototype.emit=function(t,e,n,i,o,r){var s=a?a+t:t;if(!this._events[s])return!1;var c,u,l=this._events[s],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,i),!0;case 5:return l.fn.call(l.context,e,n,i,o),!0;case 6:return l.fn.call(l.context,e,n,i,o,r),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var h,f=l.length;for(u=0;u<f;u++)switch(l[u].once&&this.removeListener(t,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,e);break;case 3:l[u].fn.call(l[u].context,e,n);break;case 4:l[u].fn.call(l[u].context,e,n,i);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];l[u].fn.apply(l[u].context,c)}}return!0},r.prototype.on=function(t,e,n){var i=new o(e,n||this),r=a?a+t:t;return this._events[r]?this._events[r].fn?this._events[r]=[this._events[r],i]:this._events[r].push(i):(this._events[r]=i,this._eventsCount++),this},r.prototype.once=function(t,e,n){var i=new o(e,n||this,!0),r=a?a+t:t;return this._events[r]?this._events[r].fn?this._events[r]=[this._events[r],i]:this._events[r].push(i):(this._events[r]=i,this._eventsCount++),this},r.prototype.removeListener=function(t,e,n,o){var r=a?a+t:t;if(!this._events[r])return this;if(!e)return 0===--this._eventsCount?this._events=new i:delete this._events[r],this;var s=this._events[r];if(s.fn)s.fn!==e||o&&!s.once||n&&s.context!==n||(0===--this._eventsCount?this._events=new i:delete this._events[r]);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==e||o&&!s[c].once||n&&s[c].context!==n)&&u.push(s[c]);u.length?this._events[r]=1===u.length?u[0]:u:0===--this._eventsCount?this._events=new i:delete this._events[r]}return this},r.prototype.removeAllListeners=function(t){var e;return t?(e=a?a+t:t,this._events[e]&&(0===--this._eventsCount?this._events=new i:delete this._events[e])):(this._events=new i,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=a,r.EventEmitter=r,t.exports=r},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(74),r=i(o),s=n(73),a=i(s),c="function"==typeof a["default"]&&"symbol"==typeof r["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof a["default"]&&t.constructor===a["default"]&&t!==a["default"].prototype?"symbol":typeof t};e["default"]="function"==typeof a["default"]&&"symbol"===c(r["default"])?function(t){return"undefined"==typeof t?"undefined":c(t)}:function(t){return t&&"function"==typeof a["default"]&&t.constructor===a["default"]&&t!==a["default"].prototype?"symbol":"undefined"==typeof t?"undefined":c(t)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},,function(t,e,n){var i=n(53),o=n(33);t.exports=Object.keys||function(t){return i(t,o)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports={}},,function(t,e){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function r(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function s(){v&&f&&(v=!1,f.length?p=f.concat(p):m=-1,p.length&&a())}function a(){if(!v){var t=o(s);v=!0;for(var e=p.length;e;){for(f=p,p=[];++m<e;)f&&f[m].run();m=-1,e=p.length}f=null,v=!1,r(t)}}function c(t,e){this.fun=t,this.array=e}function u(){}var l,d,h=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}}();var f,p=[],v=!1,m=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];p.push(new c(t,e)),1!==p.length||v||o(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},,function(t,e){t.exports=!0},function(t,e,n){var i=n(9).f,o=n(4),r=n(3)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(35)("keys"),o=n(22);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var i=n(2),o="__core-js_shared__",r=i[o]||(i[o]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(11);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(2),o=n(10),r=n(30),s=n(39),a=n(9).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(3)},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(114);Object.defineProperty(e,"ajax",{enumerable:!0,get:function(){return i(o)["default"]}});var r=n(115);Object.defineProperty(e,"element",{enumerable:!0,get:function(){return i(r)["default"]}});var s=n(116);Object.defineProperty(e,"tool",{enumerable:!0,get:function(){return i(s)["default"]}})},function(t,e,n){var i=n(14),o=n(84),r=n(33),s=n(34)("IE_PROTO"),a=function(){},c="prototype",u=function(){var t,e=n(46)("iframe"),i=r.length,o="<",s=">";for(e.style.display="none",n(67).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+s+"document.F=Object"+o+"/script"+s),t.close(),u=t.F;i--;)delete u[c][r[i]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[c]=i(t),n=new a,a[c]=null,n[s]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e){e.f=Object.getOwnPropertySymbols},,function(t,e,n){var i=n(56);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(11),o=n(2).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},,,,function(t,e,n){t.exports=!n(7)&&!n(18)(function(){return 7!=Object.defineProperty(n(46)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var i=n(30),o=n(17),r=n(54),s=n(8),a=n(4),c=n(26),u=n(81),l=n(31),d=n(86),h=n(3)("iterator"),f=!([].keys&&"next"in[].keys()),p="@@iterator",v="keys",m="values",_=function(){return this};t.exports=function(t,e,n,g,y,C,T){u(n,e,g);var A,S,b,E=function(t){if(!f&&t in w)return w[t];switch(t){case v:return function(){return new n(this,t)};case m:return function(){return new n(this,t)}}return function(){return new n(this,t)}},I=e+" Iterator",O=y==m,M=!1,w=t.prototype,N=w[h]||w[p]||y&&w[y],k=!f&&N||E(y),x=y?O?E("entries"):k:void 0,L="Array"==e?w.entries||N:N;if(L&&(b=d(L.call(new t)),b!==Object.prototype&&b.next&&(l(b,I,!0),i||a(b,h)||s(b,h,_))),O&&N&&N.name!==m&&(M=!0,k=function(){return N.call(this)}),i&&!T||!f&&!M&&w[h]||s(w,h,k),c[e]=k,c[I]=_,y)if(A={values:O?k:E(m),keys:C?k:E(v),entries:x},T)for(S in A)S in w||r(w,S,A[S]);else o(o.P+o.F*(f||M),e,A);return A}},function(t,e,n){var i=n(53),o=n(33).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},function(t,e,n){var i=n(4),o=n(12),r=n(78)(!1),s=n(34)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),c=0,u=[];for(n in a)n!=s&&i(a,n)&&u.push(n);for(;e.length>c;)i(a,n=e[c++])&&(~r(u,n)||u.push(n));return u}},function(t,e,n){t.exports=n(8)},,function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(40);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(25),o=n(21),r=n(12),s=n(37),a=n(4),c=n(50),u=Object.getOwnPropertyDescriptor;e.f=n(7)?u:function(t,e){if(t=r(t),e=s(e,!0),c)try{return u(t,e)}catch(n){}if(a(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){var i=n(32);t.exports=function(t){return Object(i(t))}},,,,,,,,function(t,e,n){var i=n(2).document;t.exports=i&&i.documentElement},function(t,e,n){var i=n(36),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},function(t,e){},function(t,e,n){"use strict";var i=n(87)(!0);n(51)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){n(89);for(var i=n(2),o=n(8),r=n(26),s=n(3)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<a.length;c++){var u=a[c],l=i[u],d=l&&l.prototype;d&&!d[s]&&o(d,s,u),r[u]=r.Array}},,function(t,e,n){t.exports={"default":n(75),__esModule:!0}},function(t,e,n){t.exports={"default":n(76),__esModule:!0}},function(t,e,n){n(90),n(69),n(91),n(92),t.exports=n(10).Symbol},function(t,e,n){n(70),n(71),t.exports=n(39).f("iterator")},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(12),o=n(68),r=n(88);t.exports=function(t){return function(e,n,s){var a,c=i(e),u=o(c.length),l=r(s,u);if(t&&n!=n){for(;u>l;)if(a=c[l++],a!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var i=n(24),o=n(43),r=n(25);t.exports=function(t){var e=i(t),n=o.f;if(n)for(var s,a=n(t),c=r.f,u=0;a.length>u;)c.call(t,s=a[u++])&&e.push(s);return e}},function(t,e,n){var i=n(40);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(42),o=n(21),r=n(31),s={};n(8)(s,n(3)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:o(1,n)}),r(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var i=n(22)("meta"),o=n(11),r=n(4),s=n(9).f,a=0,c=Object.isExtensible||function(){return!0},u=!n(18)(function(){return c(Object.preventExtensions({}))}),l=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},d=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,i)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[i].i},h=function(t,e){if(!r(t,i)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[i].w},f=function(t){return u&&p.NEED&&c(t)&&!r(t,i)&&l(t),t},p=t.exports={KEY:i,NEED:!1,fastKey:d,getWeak:h,onFreeze:f}},function(t,e,n){var i=n(9),o=n(14),r=n(24);t.exports=n(7)?Object.defineProperties:function(t,e){o(t);for(var n,s=r(e),a=s.length,c=0;a>c;)i.f(t,n=s[c++],e[n]);return t}},function(t,e,n){var i=n(12),o=n(52).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==r.call(t)?a(t):o(i(t))}},function(t,e,n){var i=n(4),o=n(59),r=n(34)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),i(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(36),o=n(32);t.exports=function(t){return function(e,n){var r,s,a=String(o(e)),c=i(n),u=a.length;return c<0||c>=u?t?"":void 0:(r=a.charCodeAt(c),r<55296||r>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):r:t?a.slice(c,c+2):(r-55296<<10)+(s-56320)+65536)}}},function(t,e,n){var i=n(36),o=Math.max,r=Math.min;t.exports=function(t,e){return t=i(t),t<0?o(t+e,0):r(t,e)}},function(t,e,n){"use strict";var i=n(77),o=n(82),r=n(26),s=n(12);t.exports=n(51)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(t,e,n){"use strict";var i=n(2),o=n(4),r=n(7),s=n(17),a=n(54),c=n(83).KEY,u=n(18),l=n(35),d=n(31),h=n(22),f=n(3),p=n(39),v=n(38),m=n(79),_=n(80),g=n(14),y=n(11),C=n(12),T=n(37),A=n(21),S=n(42),b=n(85),E=n(58),I=n(9),O=n(24),M=E.f,w=I.f,N=b.f,k=i.Symbol,x=i.JSON,L=x&&x.stringify,D="prototype",R=f("_hidden"),U=f("toPrimitive"),P={}.propertyIsEnumerable,j=l("symbol-registry"),V=l("symbols"),F=l("op-symbols"),H=Object[D],W="function"==typeof k,B=i.QObject,Y=!B||!B[D]||!B[D].findChild,Q=r&&u(function(){return 7!=S(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=M(H,e);i&&delete H[e],w(t,e,n),i&&t!==H&&w(H,e,i)}:w,q=function(t){var e=V[t]=S(k[D]);return e._k=t,e},z=W&&"symbol"==typeof k.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof k},G=function(t,e,n){return t===H&&G(F,e,n),g(t),e=T(e,!0),g(n),o(V,e)?(n.enumerable?(o(t,R)&&t[R][e]&&(t[R][e]=!1),n=S(n,{enumerable:A(0,!1)})):(o(t,R)||w(t,R,A(1,{})),t[R][e]=!0),Q(t,e,n)):w(t,e,n)},J=function(t,e){g(t);for(var n,i=m(e=C(e)),o=0,r=i.length;r>o;)G(t,n=i[o++],e[n]);return t},X=function(t,e){return void 0===e?S(t):J(S(t),e)},K=function(t){var e=P.call(this,t=T(t,!0));return!(this===H&&o(V,t)&&!o(F,t))&&(!(e||!o(this,t)||!o(V,t)||o(this,R)&&this[R][t])||e)},$=function(t,e){if(t=C(t),e=T(e,!0),t!==H||!o(V,e)||o(F,e)){var n=M(t,e);return!n||!o(V,e)||o(t,R)&&t[R][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=N(C(t)),i=[],r=0;n.length>r;)o(V,e=n[r++])||e==R||e==c||i.push(e);return i},tt=function(t){for(var e,n=t===H,i=N(n?F:C(t)),r=[],s=0;i.length>s;)!o(V,e=i[s++])||n&&!o(H,e)||r.push(V[e]);return r};W||(k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(F,n),o(this,R)&&o(this[R],t)&&(this[R][t]=!1),Q(this,t,A(1,n))};return r&&Y&&Q(H,t,{configurable:!0,set:e}),q(t)},a(k[D],"toString",function(){return this._k}),E.f=$,I.f=G,n(52).f=b.f=Z,n(25).f=K,n(43).f=tt,r&&!n(30)&&a(H,"propertyIsEnumerable",K,!0),p.f=function(t){return q(f(t))}),s(s.G+s.W+s.F*!W,{Symbol:k});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)f(et[nt++]);for(var it=O(f.store),ot=0;it.length>ot;)v(it[ot++]);s(s.S+s.F*!W,"Symbol",{"for":function(t){return o(j,t+="")?j[t]:j[t]=k(t)},keyFor:function(t){if(!z(t))throw TypeError(t+" is not a symbol!");for(var e in j)if(j[e]===t)return e},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),s(s.S+s.F*!W,"Object",{create:X,defineProperty:G,defineProperties:J,getOwnPropertyDescriptor:$,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),x&&s(s.S+s.F*(!W||u(function(){var t=k();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))})),"JSON",{stringify:function(t){for(var e,n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=e=i[1],(y(e)||void 0!==t)&&!z(t))return _(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!z(e))return e}),i[1]=e,L.apply(x,i)}}),k[D][U]||n(8)(k[D],U,k[D].valueOf),d(k,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},function(t,e,n){n(38)("asyncIterator")},function(t,e,n){n(38)("observable")},,,,,,function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(119),r=i(o);e["default"]=r["default"]||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}},,,,,,,function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(6),r=i(o),s=n(41),a=n(13),c=a.info.nrtcVersion,u="https://statistic.live.126.net/statistic/realtime/sdkFunctioninfo",l=function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r["default"])(this,h);var e=t.appkey,n=t.platform;this.apis={},this.isRtc=/WebRTC/.test(n),this.init(e,n),this.resetStatus()};e["default"]=l;var d=l.prototype;d.init=function(t,e){this.apis=Object.assign(this.apis,{ver:1,platform:e,sdk_ver:c||"v4.4.0",uid:null,appkey:t,time:null})},d.start=function(t){this.calling=!0,this.apis=Object.assign(this.apis,t)},d.resetStatus=function(){this.calling=!1,this.apis=Object.assign(this.apis,{p2p:{value:0},meeting:{value:0},bypass:{value:0},call_control_type:{value:0},self_mute:{value:-1},self_mic_mute:{value:-1},switch_p2p_type:{value:0},set_speaker:{value:-1},net_detect:{value:this.isRtc?-1:0},beautify:{value:-1},water_mark:{value:-1},audio_samples:{value:-1},video_samples:{value:-1},pre_view_mirror:{value:-1},code_mirror:{value:-1},custom_audio:{value:-1},custom_video:{value:-1},audio_mix:{value:-1},snap_shot:{value:-1},record:{value:0},audio_record:{value:0},display:{value:0},android_compatibility:{value:-1},hd_audio:{value:0},video_quality:{value:0},fps:{value:0},prefered_video_encoder:{value:-1},prefered_video_decoder:{value:-1},video_max_encode_bitrate:{value:this.isRtc?-1:0},audio_scene:{value:-1},video_adaptive_strategy:{value:this.isRtc?-1:0},ans:{value:this.isRtc?-1:0},agc:{value:-1},dtx:{value:-1},aec:{value:this.isRtc?-1:0},awc:{value:this.isRtc?-1:0}})},d.update=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=t.key,i=t.ext;t.constructor===String&&(n=t),i=i||e,this.apis[n]&&(this.apis[n].value=1,void 0!==i&&(this.apis[n].ext=i),/(p2p|meeting)/.test(n)&&(this.calling=!0))},d.send=function(){var t=this;this.calling&&(this.calling=!1,this.apis.time=Date.now(),(0,s.ajax)({type:"post",url:u,data:this.apis}).then(function(e){t.resetStatus()})["catch"](function(e){console.log("err",e),t.resetStatus()}))},t.exports=e["default"]},,,,,,,,,function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t){if(!t.url||!t.data)return Promise.reject("参数不完整,无法发起请求");t.dataType=t.dataType||"json";var e=new XMLHttpRequest;return e.open(t.type||"GET",t.url,!0),e.responseType=""+t.dataType,e.setRequestHeader("Content-type","application/json;charset=UTF-8"),new Promise(function(n,i){e.onload=function(){var t=e.response;n(t)},e.onerror=function(t){i(t)},e.send(JSON.stringify(t.data))})};t.exports=e["default"]},function(t,e){"use strict";e.__esModule=!0,e["default"]={html2node:function(t){var e=document.createElement("div");e.innerHTML=t;var n,i,o=[];if(e.children)for(n=0,i=e.children.length;n<i;n++)o.push(e.children[n]);else for(n=0,i=e.childNodes.length;n<i;n++){var r=e.childNodes[n];1===r.nodeType&&o.push(r)}return o.length>1?e:o[0]},n2node:function(t){return t?/HTML.+Element/gi.test(t)?t:t[0]&&/HTML.+Element/gi.test(t[0])?t[0]:null:null}},t.exports=e["default"]},function(t,e){"use strict";e.__esModule=!0,e["default"]={merge:function(){var t=arguments;return t[0]=Object.assign.apply(Object.assign,arguments),t[0]},verifyOptions:function(){var t=arguments;if(t[0]&&t[0].constructor===Object)for(var e=1;e<arguments.length;e++){var n=t[e];n=n.split(" "),n.map(function(e){if(!t[0][e])throw Error("参数缺失 "+e)})}},guid:function(){var t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return function(){return t()+t()+t()+t()+t()+t()+t()+t()}}()},t.exports=e["default"]},,,function(t,e,n){t.exports={"default":n(122),__esModule:!0}},function(t,e,n){t.exports={"default":n(123),__esModule:!0}},function(t,e,n){t.exports={"default":n(124),__esModule:!0}},function(t,e,n){n(127),t.exports=n(10).Object.assign},function(t,e,n){n(128);var i=n(10).Object;t.exports=function(t,e){return i.create(t,e)}},function(t,e,n){n(129),t.exports=n(10).Object.setPrototypeOf},function(t,e,n){"use strict";var i=n(24),o=n(43),r=n(25),s=n(59),a=n(57),c=Object.assign;t.exports=!c||n(18)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=i})?function(t,e){for(var n=s(t),c=arguments.length,u=1,l=o.f,d=r.f;c>u;)for(var h,f=a(arguments[u++]),p=l?i(f).concat(l(f)):i(f),v=p.length,m=0;v>m;)d.call(f,h=p[m++])&&(n[h]=f[h]);return n}:c},function(t,e,n){var i=n(11),o=n(14),r=function(t,e){if(o(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{i=n(45)(Function.call,n(58).f(Object.prototype,"__proto__").set,2),i(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return r(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:r}},function(t,e,n){var i=n(17);i(i.S+i.F,"Object",{assign:n(125)})},function(t,e,n){var i=n(17);i(i.S,"Object",{create:n(42)})},function(t,e,n){var i=n(17);i(i.S,"Object",{setPrototypeOf:n(126).set})},,,,,,,,,,,,,,,,,,,,function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},,,function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(105),r=i(o),s=n(172),a=i(s),c=n(173),u=i(c);e["default"]={DataApi:function(t){return new r["default"](t)},DataRtc:function(t){return new a["default"](t)},DataStats:function(t){return new u["default"](t)}},t.exports=e["default"]},,,,,,,,,,function(t,e){"use strict";function n(t){i(t.enable)&&(this.enable=t.enable?1:0),i(t.needBadge)&&(this.needBadge=t.needBadge?1:0),i(t.needPushNick)&&(this.needPushNick=t.needPushNick?1:0),i(t.pushContent)&&(this.pushContent=""+t.pushContent),i(t.custom)&&(this.custom=""+t.custom),i(t.pushPayload)&&(this.pushPayload=""+t.pushPayload),i(t.sound)&&(this.sound=""+t.sound),i(t.webrtcEnable)&&(this.webrtcEnable=t.webrtcEnable?1:0)}e.__esModule=!0,e["default"]=function(t){var e=t.util;return i=e.notundef,n};var i=void 0;t.exports=e["default"]},,,,,,,,,,function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(6),r=i(o),s=n(41),a=n(13),c=a.info.nrtcVersion,u="https://statistic.live.126.net/statistic/realtime/sdkinfo",l=function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r["default"])(this,f);var e=t.appkey;this.infos={},this.userlist=[],this.localVolumn=0,this.local={},this.remote={},this.init(e),this.resetStatus()};e["default"]=l;var d=l.prototype;d.init=function(t){this.infos=Object.assign(this.infos,{ver:1,device:-1,isp:-1,platform:h.convertPlatform(platform.os.family)+"-"+platform.os.version,browser:platform.name+"-"+platform.version,sdk_ver:c||"3.6.0",appkey:t,interval:60,samples:30,time:null,qos_algorithm:-1,fec_algorithm:-1,qos_scene:-1,qos_strategy:-1})},d.resetStatus=function(){this.infos=Object.assign(this.infos,{uid:null,cid:null,push_url:null,turn_ip:null,proxy_ip:null,meeting:!1,live:!1}),this.clearInfoData(),this.uidSsrcMap={},this.userlist=[]},d.initInfoData=function(t){var e={uid:t,cid:this.imInfo&&this.imInfo.channelId||-1,push_url:this.sessionConfig&&this.sessionConfig.rtmpUrl||-1,turn_ip:this.imInfo&&this.imInfo.turnMap||-1,proxy_ip:this.imInfo&&this.imInfo.turnMap||-1,meeting:/^meeting$/gi.test(this.imInfo.sessionMode),live:this.sessionConfig&&this.sessionConfig.liveEnable||!1,p2p:!1,isp:-1,net:-1,connect_state:this.imInfo&&this.imInfo.code||200,signalling_time:(this.sessionConfig&&this.sessionConfig.signalEndTime||0)-(this.sessionConfig&&this.sessionConfig.signalStartTime||0),connect_time:(this.sessionConfig&&this.sessionConfig.rtcEndTime||0)-(this.sessionConfig&&this.sessionConfig.rtcStartTime||0)};this.infos=Object.assign(this.infos,e)},d.clearInfoData=function(){this.localVolumn=0,this.infos=Object.assign(this.infos,{rx:{audio:[],video:[]},tx:{a_lost:[],v_lost:[],rtt:[],rtt_mdev:[],set_v_fps:[],qos_v_fps:[],v_fps:[],set_v_quality:[],real_v_res:[],real_v_kbps:[],real_v_kbps_n:[],real_a_kbps:[],real_a_kbps_n:[],set_v_kbps:[],qos_v_kbps:[],tx_bw_kbps:[],a_volume:[]}})},d.start=function(t){var e=this,n=t.info,i=t.imInfo,o=t.remoteUidMsidMap,r=t.sessionConfig,s=t.rtcConnection,a=t.uid;i&&o&&s&&(this.infos.appkey=n.appKey||n.appkey||this.infos.appkey,this.imInfo=i||{},this.remoteUidMsidMap=o||{},this.sessionConfig=r||{},this.rtcConnection=s,this.videoConfig=t.videoConfig||{},this.statsTimer||(this.getTurnMap(),this.initInfoData(a),this.format(),this.statsTimer=setInterval(function(){e.sendInfo()},1e3*this.infos.interval)))},
  2 +d.stop=function(){this.statsTimer&&(clearInterval(this.statsTimer),this.statsTimer=null,this.resetStatus())},d.update=function(t){this.rtcStats=t,this.format(),this.updateRxMediaInfo(),this.updateTxMediaInfo()},d.updateOnce=function(t){var e=t.imInfo,n=t.remoteUidMsidMap,i=t.sessionConfig,o=t.rtcConnection;e&&(this.imInfo=e||{},this.remoteUidMsidMap=n||{},this.sessionConfig=i||{},this.rtcConnection=o||{},this.videoConfig=t.videoConfig||{},this.getTurnMap(),this.initInfoData(),this.sendInfo())},d.updateLocalVolumn=function(t){this.localVolumn=t},d.updateRxMediaInfo=function(){var t=this,e={u:[],g:[],c:[],bn:[],bc:[]},n={u:[],i:[],bn:[],bc:[],r:[],f:[]};this.userlist.map(function(i){var o=t.getMediaStats(i);e.u.push(o.audio.u),e.g.push(-1),e.c.push(-1),e.bn.push(o.audio.bn),e.bc.push(o.audio.bc),n.u.push(o.video.u),n.i.push(o.video.i),n.bn.push(o.video.bn),n.bc.push(o.video.bc),n.r.push(o.video.r),n.f.push(o.video.f)}),this.infos.rx.audio.push(e),this.infos.rx.video.push(n)},d.getMediaStats=function(t){var e=this.rtcStats,n={audio:{u:+t,g:-1,c:-1,bn:0,bc:0},video:{u:+t,i:-1,bn:0,bc:0,r:-1,f:0}},i={},o=this.uidSsrcMap[t];if(!o)return n;o=o.join("|");var r=new RegExp("("+o+")");return e.results.filter(function(t){return r.test(t.ssrc)&&(i[t.mediaType]=t),r.test(t)}),i.audio&&(n.audio.bn=(i.audio.availableBandwidth||0)-0,n.audio.bc=-1),i.video&&(n.video.bn=(i.video.availableBandwidth||0)-0,n.video.bc=i.video.googFrameWidthReceived+"x"+i.video.googFrameHeightReceived,n.video.f=(i.video.googFrameRateDecoded||0)-0),n},d.getLocalMediaStats=function(){var t=this.rtcStats,e={a_lost:-1,v_lost:-1,rtt:0,rtt_mdev:-1,set_v_fps:this.videoConfig.frameRate||0,qos_v_fps:0,v_fps:0,set_v_quality:this.sessionConfig.videoQuality,real_v_res:0,real_v_kbps:0,real_v_kbps_n:0,real_a_kbps:-1,real_a_kbps_n:0,set_v_kbps:-1,qos_v_kbps:0,tx_bw_kbps:0,a_volume:0},n={},i=this.imInfo.uid,o=this.uidSsrcMap[i];if(!o)return e;o=o.join("|");var r=new RegExp("("+o+")");return t.results.filter(function(t){return t.localCandidateId?void(n.rtt=t):(r.test(t.ssrc)&&(n[t.mediaType]=t),r.test(t))}),n.audio&&(e.real_a_kbps_n=(n.audio.availableBandwidth||t.audio.send.availableBandwidth)-0,e.a_volume=this.localVolumn-0),n.video&&(e.qos_v_fps=n.video.googFrameRateInput-0,e.v_fps=n.video.googFrameRateSent-0,e.real_v_res=n.video.googFrameWidthSent+"x"+n.video.googFrameHeightSent,e.real_v_kbps=n.video.googEncodeUsagePercent-0,e.real_v_kbps_n=n.video.availableBandwidth-0),e.rtt=n.rtt.googRtt-0,e.tx_bw_kbps=(t.connectionType.bitsSentPerSecond||0)-0,e},d.updateTxMediaInfo=function(){var t=this.getLocalMediaStats(),e=this.infos.tx;for(var n in t)e[n].push(t[n]);this.infos.net=h.convertNetwork(this.rtcStats.connectionType.local.networkType[0])},d.getTurnMap=function(){var t=this.imInfo;t.serverMap&&(t.turnMap=JSON.parse(t.serverMap||null),t.turnMap=t.turnMap&&t.turnMap.turnaddrs,t.turnMap=t.turnMap&&t.turnMap[0],t.turnMap=t.turnMap.constructor===Array?t.turnMap[0]:t.turnMap,t.turnMap=t.turnMap&&t.turnMap.match(/\d+\.\d+.\d+\.\d+/),t.turnMap=t.turnMap[0])},d.getSsrc=function(t,e){var n=[],i={audio:this.getTypeSsrc("audio",t,e),video:this.getTypeSsrc("video",t,e)};return i.audio&&n.push(i.audio),i.video&&n.push(i.video),n},d.getTypeSsrc=function(t,e,n){var i=void 0,o="";if(i=new RegExp(t+"[.\\r\\n\\s\\S]*ssrc:(\\d+)\\smsid:"+e),o=n.match(i),o=o&&o[0])return i=new RegExp("ssrc:\\d+\\smsid:"+e),o=o.match(i),o=o.map(function(t){return i=new RegExp("ssrc:(\\d+)\\s"),t=t.match(i),t[1]})},d.format=function(){this.formatLocal(),this.formatRemote()},d.formatLocal=function(){this.localSdp=this.rtcConnection.localDescription,this.localStream=this.rtcConnection.getLocalStreams()[0],this.localStream&&(this.uidSsrcMap[this.imInfo.uid]=this.getSsrc(this.localStream.id,this.localSdp.sdp),this.local.ssrc=this.uidSsrcMap[this.imInfo.uid])},d.formatRemote=function(){this.remoteSdp=this.rtcConnection.remoteDescription,this.userlist=[];var t=this.remoteUidMsidMap;for(var e in t)this.userlist.push(e),this.remote[e]={},this.uidSsrcMap[e]=this.getSsrc(t[e],this.remoteSdp.sdp),this.remote[e].ssrc=this.uidSsrcMap[e]},d.sendInfo=function(){var t=this;this.infos.uid&&this.infos.cid&&(this.infos.time=Date.now(),this.infos.samples=this.infos.rx.audio.length,(0,s.ajax)({type:"post",url:u,data:this.infos}).then(function(e){t.clearInfoData()})["catch"](function(e){t.clearInfoData()}))};var h={convertNetwork:function(t){var e={wlan:"wifi",lan:"ethernet"};return e[t]||"unknown"},convertPlatform:function(t){var e=/Windows/i,n=/OS X/i,i=void 0;return i=e.test(t)&&"Win"||t,i=n.test(i)&&"Mac"||i}};t.exports=e["default"]},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(6),r=i(o),s=n(41),a=n(13),c=a.info.nrtcVersion,u="//statistic.live.126.net/webrtc/stat",l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r["default"])(this,t);var n=e.appkey;this.infos={},this.init(n),this.resetStatus()}return t.prototype.resetStatus=function(){},t.prototype.init=function(t){this.infos=Object.assign(this.infos,{interval:60,ver:1,platform:d.convertPlatform(platform.os.family)+"-"+platform.os.version,browser:platform.name+"-"+platform.version,sdk_ver:c||"3.6.0",uid:null,appkey:t,time:null,data:{}})},t.prototype.clear=function(){this.infos.data={}},t.prototype.start=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.infos.appkey=e.appKey||e.appkey||this.infos.appkey,this.infos.cid=e.cid,this.infos.uid=e.uid,this.statsTimer||(this.statsTimer=setInterval(function(){t.send()},1e3*this.infos.interval))},t.prototype.stop=function(){this.statsTimer&&(clearInterval(this.statsTimer),this.statsTimer=null,this.clear())},t.prototype.update=function(t){this.infos.data["stat_"+Date.now()]=t},t.prototype.send=function(){var t=this;0!==Object.keys(this.infos.data).length&&(this.infos.time=Date.now(),(0,s.ajax)({type:"post",url:u,data:this.infos}).then(function(e){t.clear()})["catch"](function(t){console.log("err",t)}))},t}();e["default"]=l;var d={convertNetwork:function(t){var e={wlan:"wifi",lan:"ethernet"};return e[t]||"unknown"},convertPlatform:function(t){var e=/Windows/i,n=/OS X/i,i=void 0;return i=e.test(t)&&"Win"||t,i=n.test(i)&&"Mac"||i}};t.exports=e["default"]},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){"use strict";e.__esModule=!0;var n,i,o={NETCALL_TYPE_AUDIO:1,NETCALL_TYPE_VIDEO:2,NETCALL_CONTROL_COMMAND_NOTIFY_AUDIO_ON:1,NETCALL_CONTROL_COMMAND_NOTIFY_AUDIO_OFF:2,NETCALL_CONTROL_COMMAND_NOTIFY_VIDEO_ON:3,NETCALL_CONTROL_COMMAND_NOTIFY_VIDEO_OFF:4,NETCALL_CONTROL_COMMAND_SWITCH_AUDIO_TO_VIDEO:5,NETCALL_CONTROL_COMMAND_SWITCH_AUDIO_TO_VIDEO_AGREE:6,NETCALL_CONTROL_COMMAND_SWITCH_AUDIO_TO_VIDEO_REJECT:7,NETCALL_CONTROL_COMMAND_SWITCH_VIDEO_TO_AUDIO:8,NETCALL_CONTROL_COMMAND_BUSY:9,NETCALL_CONTROL_COMMAND_SELF_CAMERA_INVALID:10,NETCALL_CONTROL_COMMAND_SELF_AUDIO_INVALID:11,NETCALL_CONTROL_COMMAND_SELF_ON_BACKGROUND:12,NETCALL_CONTROL_COMMAND_START_NOTIFY_RECEIVED:13,NETCALL_CONTROL_COMMAND_NOTIFY_RECORD_START:14,NETCALL_CONTROL_COMMAND_NOTIFY_RECORD_STOP:15,DEVICE_TYPE_AUDIO_IN:0,DEVICE_TYPE_AUDIO_OUT_LOCAL:1,DEVICE_TYPE_AUDIO_OUT_CHAT:2,DEVICE_TYPE_VIDEO:3,DEVICE_STATUS_NO_CHANGE:0,DEVICE_STATUS_CHANGE:1,DEVICE_STATUS_WORK_REMOVE:2,DEVICE_STATUS_RESET:4,DEVICE_STATUS_START:8,DEVICE_STATUS_END:16,CHAT_VIDEO_QUALITY_NORMAL:0,CHAT_VIDEO_QUALITY_LOW:1,CHAT_VIDEO_QUALITY_MEDIUM:2,CHAT_VIDEO_QUALITY_HIGH:3,CHAT_VIDEO_QUALITY_480P:4,CHAT_VIDEO_QUALITY_720P:5,CHAT_VIDEO_QUALITY_540P:6,CHAT_VIDEO_ENCODEMODE_NORMAL:0,CHAT_VIDEO_ENCODEMODE_SMOOTH:1,CHAT_VIDEO_ENCODEMODE_QUALITY:2,CHAT_VIDEO_ENCODEMODE_SCREEN:3,CHAT_VIDEO_FRAME_RATE_NORMAL:0,CHAT_VIDEO_FRAME_RATE_5:1,CHAT_VIDEO_FRAME_RATE_10:2,CHAT_VIDEO_FRAME_RATE_15:3,CHAT_VIDEO_FRAME_RATE_20:4,CHAT_VIDEO_FRAME_RATE_25:5,CHAT_VIDEO_SCALE_None:0,CHAT_VIDEO_SCALE_1x1:1,CHAT_VIDEO_SCALE_4x3:2,CHAT_VIDEO_SCALE_16x9:3,CHAT_USER_LEFT_TIMEOUT:-1,CHAT_USER_LEFT_NORMAL:0,CHAT_NET_STATUS_VERY_GOOD:0,CHAT_NET_STATUS_GOOD:1,CHAT_NET_STATUS_POOR:2,CHAT_NET_STATUS_BAD:3,CHAT_NET_STATUS_VERY_BAD:4,CLIENT_TYPE_AOS:1,CLIENT_TYPE_IOS:2,CLIENT_TYPE_PC:4,CLIENT_TYPE_WINPHONE:8,CLIENT_TYPE_WEB:16,CLIENT_TYPE_REST:32,LAYOUT_SPLITBOTTOMHORFLOATING:0,LAYOUT_SPLITTOPHORFLOATING:1,LAYOUT_SPLITLATTICETILE:2,LAYOUT_SPLITLATTICECUTTINGTILE:3,LAYOUT_SPLITCUSTOMLAYOUT:4,LAYOUT_SPLITAUDIOLAYOUT:5,NETDETECT_AUDIO:0,NETDETECT_VIDEO:1};o.deviceTypeMap=(n={},n[o.DEVICE_TYPE_AUDIO_IN]="audioIn",n[o.DEVICE_TYPE_AUDIO_OUT_CHAT]="audioOut",n[o.DEVICE_TYPE_VIDEO]="video",n),o.getDeviceTypeStr=function(t){return o.deviceTypeMap[t]},o.deviceStatusMap=(i={},i[o.DEVICE_STATUS_NO_CHANGE]="noChange",i[o.DEVICE_STATUS_CHANGE]="change",i[o.DEVICE_STATUS_WORK_REMOVE]="workRemove",i[o.DEVICE_STATUS_RESET]="reset",i[o.DEVICE_STATUS_START]="start",i[o.DEVICE_STATUS_END]="end",i),o.getDeviceStatusStr=function(t){return o.deviceStatusMap[t]},e["default"]=o,t.exports=e["default"]},,,,,,,,,,,,,,,,function(t,e,n){"use strict";var i=n(162),o={};o.install=function(t){var e=t.fn,n=t.util,o=i({util:n});e.initNetcall=function(t){return n.verifyOptions(t,"type accounts","netcall::initNetcall"),t.pushContent="",t.custom="",t.pushConfig||(t.pushConfig={}),t.pushConfig.webrtcEnable=t.webrtcEnable,t.pushConfig=new o(t.pushConfig),this.cbAndSendCmd("initNetcall",t)},e.keepCalling=function(t){return n.verifyOptions(t,"type accounts channelId","netcall::keepCalling"),this.cbAndSendCmd("keepCalling",t)},e.calleeAck=function(t){return n.verifyOptions(t,"account channelId type accepted","netcall::calleeAck"),this.cbAndSendCmd("calleeAck",t)},e.hangup=function(t){return n.verifyOptions(t,"channelId","netcall::hangup"),this.cbAndSendCmd("hangup",t)},e.netcallControl=function(t){return n.verifyOptions(t,"channelId type","netcall::netcallControl"),this.cbAndSendCmd("netcallControl",t)},e.createChannel=function(t){return this.cbAndSendCmd("createChannel",t)},e.joinChannel=function(t){return n.verifyOptions(t,"channelName","netcall::joinChannel"),n.verifyBooleanWithDefault(t,"liveEnable",!1,"","netcall::joinChannel"),n.verifyBooleanWithDefault(t,"webrtcEnable",!1,"","netcall::joinChannel"),this.cbAndSendCmd("joinChannel",{channelName:t.channelName,liveOption:{liveEnable:t.liveEnable?1:0,webrtcEnable:t.webrtcEnable?1:0}})},e.queryAccountUidMap=function(t,e){return this.cbAndSendCmd("queryAccountUidMap",{channelName:t,uids:e})}},t.exports=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){"use strict";var n={};n.install=function(t){var e=t.Protocol.fn;e.processNetcall=function(t){switch(t.cmd){case"initNetcall":this.onInitNetcall(t);break;case"beCalled":this.onBeCalled(t);break;case"keepCalling":this.onKeepCalling(t);break;case"calleeAck":break;case"notifyCalleeAck":this.onNotifyCalleeAck(t);break;case"hangup":break;case"notifyHangup":this.onNotifyHangup(t);break;case"notifyNetcallControl":this.onNetcallControl(t);break;case"notifyCalleeAckSync":this.onNotifyCalleeAckSync(t);break;case"notifyNetcallRecord":this.onMsg(t);break;case"createChannel":break;case"joinChannel":this.joinChannel(t);break;case"notifyJoin":this.notifyJoin(t)}},e.onInitNetcall=function(t){if(!t.error){var e=t.obj.type;t.obj=t.content,t.obj.type=e,t.obj.accounts=t.obj.keepCallingAccounts,this.setCurrentNetcall(t.obj.channelId),this.keepCalling(t)}},e.setCurrentNetcall=function(t){this.currentNetcallChannelId=t},e.onKeepCalling=function(t){t.error||t.content.accounts.length&&this.keepCalling(t)},e.keepCalling=function(t){var e=this,n=t.obj,i=n.type,o=n.accounts,r=n.channelId;o&&o.length&&setTimeout(function(){e.currentNetcallChannelId&&e.currentNetcallChannelId===r&&e.api.keepCalling({type:i,accounts:o,channelId:r})["catch"](function(){})},3e3)},e.onBeCalled=function(t){t.error||this.emitAPI({type:"beCalled",obj:t.content})},e.onNotifyCalleeAck=function(t){t.error||this.emitAPI({type:"notifyCalleeAck",obj:t.content})},e.onNotifyHangup=function(t){t.error||this.emitAPI({type:"notifyHangup",obj:t.content})},e.onNetcallControl=function(t){t.error||this.emitAPI({type:"netcallControl",obj:t.content})},e.onNotifyCalleeAckSync=function(t){t.error||this.emitAPI({type:"notifyCalleeAckSync",obj:t.content})},e.notifyJoin=function(t){t.error||this.emitAPI({type:"notifyJoin",obj:t.content})},e.joinChannel=function(t){t.obj=t.content}},t.exports=n},,,,,,,,,function(t,e){"use strict";var n=9,i={netcall:{id:n,initNetcall:1,keepCalling:3,calleeAck:4,notifyCalleeAck:5,hangup:6,notifyHangup:7,netcallControl:8,notifyNetcallControl:9,verifyChannelId:10,createChannel:13,joinChannel:14,queryAccountUidMap:16}},o={initNetcall:{sid:n,cid:i.netcall.initNetcall,params:[{type:"byte",name:"type"},{type:"StrArray",name:"accounts"},{type:"String",name:"pushContent"},{type:"String",name:"custom"},{type:"Property",name:"pushConfig"}]},keepCalling:{sid:n,cid:i.netcall.keepCalling,params:[{type:"byte",name:"type"},{type:"StrArray",name:"accounts"},{type:"long",name:"channelId"}]},calleeAck:{sid:n,cid:i.netcall.calleeAck,params:[{type:"string",name:"account"},{type:"long",name:"channelId"},{type:"byte",name:"type"},{type:"bool",name:"accepted"}]},hangup:{sid:n,cid:i.netcall.hangup,params:[{type:"long",name:"channelId"}]},netcallControl:{sid:n,cid:i.netcall.netcallControl,params:[{type:"long",name:"channelId"},{type:"byte",name:"type"}]},verifyChannelId:{sid:n,cid:i.netcall.verifyChannelId,params:[{type:"long",name:"channelId"},{type:"String",name:"account"}]},createChannel:{sid:n,cid:i.netcall.createChannel,params:[{type:"String",name:"channelName"},{type:"String",name:"custom"},{type:"String",name:"webrtcEnable"}]},joinChannel:{sid:n,cid:i.netcall.joinChannel,params:[{type:"String",name:"channelName"},{type:"Property",name:"liveOption"}]},queryAccountUidMap:{sid:n,cid:i.netcall.queryAccountUidMap,params:[{type:"String",name:"channelName"},{type:"LongArray",name:"uids"}]}},r="netcall",s={"9_1":{service:r,cmd:"initNetcall",response:[{type:"Number",name:"timetag"},{type:"Number",name:"uid"},{type:"Number",name:"channelId"},{type:"StrArray",name:"turnServerList"},{type:"StrArray",name:"sturnServerList"},{type:"StrArray",name:"proxyServerList"},{type:"StrArray",name:"keepCallingAccounts"},{type:"StrLongMap",name:"accountUidMap"},{type:"String",name:"clientConfig"},{type:"String",name:"serverMap"}]},"9_2":{service:r,cmd:"beCalled",response:[{type:"Number",name:"timetag"},{type:"Number",name:"type"},{type:"Number",name:"channelId"},{type:"String",name:"account"},{type:"Number",name:"uid"},{type:"StrArray",name:"turnServerList"},{type:"StrArray",name:"sturnServerList"},{type:"StrArray",name:"proxyServerList"},{type:"StrLongMap",name:"accountUidMap"},{type:"String",name:"clientConfig"},{type:"String",name:"custom"},{type:"Property",name:"pushConfig"},{type:"String",name:"serverMap"}]},"9_3":{service:r,cmd:"keepCalling",response:[{type:"StrArr",name:"accounts"}]},"9_4":{service:r,cmd:"calleeAck",response:[]},"9_5":{service:r,cmd:"notifyCalleeAck",response:[{type:"String",name:"account"},{type:"long",name:"channelId"},{type:"byte",name:"type"},{type:"bool",name:"accepted"}]},"9_6":{service:r,cmd:"hangup",response:[]},"9_7":{service:r,cmd:"notifyHangup",response:[{type:"long",name:"channelId"},{type:"String",name:"account"},{type:"long",name:"timetag"}]},"9_8":{service:r,cmd:"netcallControl",response:[]},"9_9":{service:r,cmd:"notifyNetcallControl",response:[{type:"String",name:"account"},{type:"byte",name:"type"},{type:"long",name:"channelId"}]},"9_10":{service:r,cmd:"verifyChannelId",response:[]},"9_11":{service:r,cmd:"notifyNetcallRecord",response:[{type:"Property",name:"msg"}]},"9_12":{service:r,cmd:"notifyCalleeAckSync",response:[{type:"String",name:"timetag"},{type:"long",name:"channelId"},{type:"byte",name:"type"},{type:"bool",name:"accepted"},{type:"byte",name:"fromClientType"}]},"9_13":{service:r,cmd:"createChannel",response:[{type:"long",name:"timetag"}]},"9_14":{service:r,cmd:"joinChannel",response:[{type:"long",name:"timetag"},{type:"long",name:"channelId"},{type:"StrLongMap",name:"accountUidMap"},{type:"String",name:"serverMap"},{type:"String",name:"clientConfig"},{type:"String",name:"custom"}]},"9_15":{service:r,cmd:"notifyJoin",response:[{type:"Long",name:"channelId"},{type:"StrLongMap",name:"accountUidMap"}]},"9_16":{service:r,cmd:"queryAccountUidMap",response:[]}};t.exports={idMap:i,cmdConfig:o,packetConfig:s}},function(t,e){"use strict";t.exports={pushConfig:{enable:1,needBadge:2,needPushNick:3,pushContent:4,custom:5,pushPayload:6,sound:7,webrtcEnable:10},liveOption:{liveEnable:1,webrtcEnable:2}}},function(t,e){"use strict";t.exports={pushConfig:{1:"enable",2:"needBadge",3:"needPushNick",4:"pushContent",5:"custom",6:"pushPayload",7:"sound",10:"webrtcEnable"},liveOption:{1:"liveEnable",2:"webrtcEnable"}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(98),r=i(o),s=n(6),a=i(s),c=n(16),u=i(c),l=n(15),d=i(l),h=n(41),f=n(152),p=void 0,v=void 0,m=n(19),_=n(351),g=n(13),y=n(352),C=n(353),T=n(342),A=n(203),S=g.agentVersion,b=function(t){function e(n){(0,a["default"])(this,e);var i=(0,u["default"])(this,t.call(this));return n.container=h.element.n2node(n.container),n.remoteContainer=h.element.n2node(n.remoteContainer),i.setUtil(p),p.undef(n.heartbeat)&&(n.heartbeat=!0),p.merge(i,n),i.init(),i}return(0,d["default"])(e,t),e}(m);b.install=function(t){p=t.util,v=t.Promise,y.install(t),C.install(t),T.install(t)};var E=b.prototype;E.init=function(){this.signal=null,this.signalInited=!1,this.localStreamInfo=null,this.resetStatus(),this.initProtocol(),this.dataApi=(0,f.DataApi)({appkey:this.nim.options.appKey,platform:"PC-Agent"})},E.resetStatus=function(){this.channelId=null,this.channelName=null,this.type=null,this.target=null,this.sessionMode=null,this.sessionConfig={},this.isCaller=!1,this.callee=null,this.remoteStreamInfo={},this.calling=!1,this.callAccepted=!1,this.callerInfo=null,this.nim.protocol.setCurrentNetcall(),this.needQueryAccountMap={}},E.initProtocol=function(){var t=this.nim;this.account=this.nim.account,t.on("beCalled",this.onBeCalled.bind(this)),t.on("notifyCalleeAck",this.onCalleeAck.bind(this)),t.on("notifyHangup",this.onHangup.bind(this)),t.on("notifyUploadLog",this.uploadLog.bind(this)),t.on("netcallControl",this.onNetcallControl.bind(this)),t.on("notifyCalleeAckSync",this.onCalleeAckSync.bind(this)),t.on("notifyJoin",this.onNotifyJoin.bind(this))},E.getAccount=function(){return this.nim.account},E.getUid=function(){return this.accountUidMap?this.accountUidMap[this.nim.account]||"-1":"-1"},E.isCurrentChannelId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.channelId&&this.channelId===t.channelId},E.notCurrentChannelId=function(t){return!this.isCurrentChannelId(t)},E.rejectWithNoSignal=function(){return this.resetWhenHangup(),v.reject({code:"noConnection"})},E.initSignal=function(){var t=this;return this.signal?this.stopSignal().then(function(){return t._initSignal()}):this._initSignal()},E._initSignal=function(){var t=this;return new v(function(e,n){var i=t.signal=new y({url:_.signalUrl,client:t,kickLast:t.kickLast,account:t.getAccount(),heartbeat:t.heartbeat,appkey:t.nim.options.appKey});i.on("init",function(i){return t.log(i),t.checkAgentVersion(i.version)?(t.localStreamInfo=i,t.signalInited=!0,void e()):(t.log("插件版本有更新,请下载最新的插件再使用音视频功能"),t.stopSignal(),i.error="请安装最新版插件,方可使用视频功能",i.errorType="agent_update",void n(i))}),i.on("initError",function(e){t.log(e),e=e||{},417===e.code&&(e.error="设备被别的程序占用中, 请检查重试",e.errorType="device_busy"),"noPC"===e.code&&(e.error="请安装插件PC Agent,方可使用音视频功能",e.errorType="agent_empty"),n(e),t.rejectWithNoSignal()}),i.on("close",function(){t.emit("signalClosed"),t.stopSignal()}),i.on("devices",function(e){t.emit("devices",e)}),i.on("login",function(e){t.emit("sessionStarted",e)}),i.on("deviceStatus",function(e){t.emit("deviceStatus",e)}),i.on("userJoined",t.onUserJoin.bind(t)),i.on("userLeft",t.onUserLeft.bind(t)),i.on("logUploaded",t.onLogUploaded.bind(t)),i.on("netStatus",function(e){var n=e.id,i=e.status;t.emit("netStatus",{account:t.getAccountWithUid(n),status:i})}),i.on("statistics",function(e){t.emit("statistics",e)}),i.on("audioVolume",function(e){var n=e.self,i=e.receiver,o={self:n};i&&i.forEach(function(e){var n=e.id,i=e.status;o[t.getAccountWithUid(n)]={status:i}}),t.emit("audioVolume",o)}),i.on("error",t.onError.bind(t)),i.on("recordMp4",t.onRecordMp4.bind(t)),i.on("heartBeatError",t.onError.bind(t))})},E.checkAgentVersion=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.0.0.0",e=t.split("."),n=S.split("."),i=0;i<e.length;i++){if(+e[i]>+n[i])return!0;if(+e[i]<+n[i])return!1}return!0},E.stopSignal=function(){var t=this;return this.stopLocalStream(),this.stopRemoteStream(),this.signal?this.signal.stopSession().then(function(){t.signal.destroy(),t.signal=null,t.signalInited=!1}):v.resolve()},E.initNetcall=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.type,i=e.pushConfig;return this.type=n,this.sessionMode="p2p",this.nim.initNetcall({type:n,accounts:[this.callee],webrtcEnable:!0,pushConfig:i}).then(function(e){return t.callerInfo=e,t.channelId=e.channelId,v.resolve(e)},function(e){throw t.resetWhenHangup(),e})},E.initSession=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.signalInited){var n=this.isCaller?this.callerInfo:e.beCalledInfo;this.parseAccountUidMap(n.accountUidMap);var i=this.sessionConfig||{};return i.awc&&this.dataApi.update({key:"awc"}),i.ans&&this.dataApi.update({key:"ans"}),i.aec&&this.dataApi.update({key:"aec"}),this.signal.startSession((0,r["default"])({},n,i)).then(function(){return{channelId:t.channelId}})}return this.rejectWithNoSignal()},E.call=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.dataApi.update("p2p"),new v(function(n,i){if(!t.signalInited||t.calling)return t.resetStatus(),i({type:"statusNotMatch",error:"呼叫失败: 当前正在通话中或者Agent唤起失败,请排查"});var o=e.account,r=e.type,s=e.pushConfig,a=e.sessionConfig,c=void 0===a?{}:a;if(t.calling=!0,t.isCaller=!0,t.callee=t.target=o,t.sessionConfig=c,c.highAudio&&t.dataApi.update("hd_audio"),void 0!==c.videoFrameRate&&t.dataApi.update("fps",0===+c.videoFrameRate?0:+c.videoFrameRate+1),void 0!==c.videoEncodeMode&&t.dataApi.update("video_adaptive_strategy",c.videoEncodeMode||0),void 0!==c.videoBitrate&&t.dataApi.update("video_max_encode_bitrate",c.videoBitrate||""),void 0!==c.videoQuality){var u=c.videoQuality;u===A.CHAT_VIDEO_QUALITY_540P?u=A.CHAT_VIDEO_QUALITY_720P:u===A.CHAT_VIDEO_QUALITY_720P&&(u=A.CHAT_VIDEO_QUALITY_540P),t.dataApi.update("video_quality",u||0)}return o?t.initNetcall({type:r,pushConfig:s}).then(function(t){n(t)})["catch"](function(t){i(t)}):(t.resetStatus(),void i({code:"noCalleeAccount"}))})},E.onBeCalled=function(t){this.log("beCalling",t),this.emit("beCalling",t)},E.response=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.dataApi.update("p2p");var n=e.beCalledInfo;if(!n)return v.resolve();var i=n.accepted=e.accepted!==!1,o=this.sessionConfig=e.sessionConfig||{};if(o.highAudio&&this.dataApi.update("hd_audio"),void 0!==o.videoFrameRate&&this.dataApi.update("fps",0===+o.videoFrameRate?0:+o.videoFrameRate+1),void 0!==o.videoEncodeMode&&this.dataApi.update("video_adaptive_strategy",o.videoEncodeMode||0),void 0!==o.videoBitrate&&this.dataApi.update("video_max_encode_bitrate",o.videoBitrate||""),void 0!==o.videoQuality){var r=o.videoQuality;r===A.CHAT_VIDEO_QUALITY_540P?r=A.CHAT_VIDEO_QUALITY_720P:r===A.CHAT_VIDEO_QUALITY_720P&&(r=A.CHAT_VIDEO_QUALITY_540P),this.dataApi.update("video_quality",r||0)}return i?(this.type=n.type,this.channelId=n.channelId,this.target=n.account,this.calling=!0):(this.log("rejectNetcall",n),this.packNetcallRecord({type:n.type,channelId:n.channelId,isCaller:!1,target:n.account,recordType:"rejectNetcall"})),this.sessionMode="p2p",this.nim.calleeAck(n).then(function(){if(i)return t.initSession({beCalledInfo:n})},function(e){throw t.log(e),e})},E.onCalleeAck=function(t){if(!this.notCurrentChannelId(t))return t.accepted?this.initSession({type:t.type}):(this.log("netcallRejected",t),this.packNetcallRecord({type:t.type,channelId:t.channelId,isCaller:!0,target:t.account,recordType:"netcallRejected"}),this.resetWhenHangup(),this.emit("callRejected",t),void 0)},E.onUserJoin=function(t){this.log("onUserJoin ",t);var e=t.account,n=t.uid;return!e&&n&&(t.account=e=this.getAccountWithUid(n)),e?void this.emitUserJoin(t):(this.needQueryAccountMap[n]=t,void this.nim.queryAccountUidMap(this.channelName,[n]))},E.emitUserJoin=function(t){var e=t.uid,n=t.isMeeting;this.remoteStreamInfo[e]=t,this.dataApi.start({uid:this.getUid()}),n?this.emit("joinChannel",{type:t.type,uid:t.uid,account:t.account}):(this.callAccepted||(this.callAccepted=!0),this.emit("callAccepted",{type:t.type,account:t.account,uid:t.uid}))},E.onUserLeft=function(t){var e=this,n=t.account,i=t.uid,o=t.isMeeting;o?(!n&&i&&(t.account=this.getAccountWithUid(i)),this.emit("leaveChannel",{account:t.account})):(this.log("on user left",t),this.calling&&setTimeout(function(){t.account=e.getAccountWithUid(t.uid),e.onHangup(t)},1e3))},E.onNetcallControl=function(t){this.emit("control",t)},E.onCalleeAckSync=function(t){this.emit("callerAckSync",t),this.isCurrentChannelId(t)&&this.resetWhenHangup()},E.onNotifyJoin=function(t){var e=t.accountUidMap,n=this.needQueryAccountMap;this.parseAccountUidMap(e);for(var i in e){var o=i,r=e[i];if(r in n){var s=n[r];s.account=o,this.emitUserJoin(s),delete n[r]}}},E.onHangup=function(t){this.dataApi.send(),this.emit("hangup",t),this.isCurrentChannelId(t)&&this.resetWhenHangup()},E.hangup=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.channelId;!e&&this.calling&&this.channelId&&(e=this.channelId),e&&(this.dataApi.send(),this.nim.hangup({channelId:e})),e===this.channelId&&(this.isCaller&&!this.callAccepted&&(this.log("cancelNetcallBeforeAccept",{channelId:e}),this.packNetcallRecord({recordType:"cancelNetcallBeforeAccept"})),this.resetWhenHangup())},E.packNetcallRecord=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.recordType,n=p.exist(t.type)?t.type:this.type,i=p.exist(t.channelId)?t.channelId:this.channelId,o=p.exist(t.duration)?t.duration:0,r=p.exist(t.isCaller)?t.isCaller:this.isCaller,s=p.exist(t.target)?t.target:this.target,a=this.getAccount(),c=r?a:s,u=r?s:a,l=+new Date;this.nim.protocol.onMsg({content:{msg:{attach:JSON.stringify({data:{calltype:n,channel:i,duration:o,ids:[a,s],time:l},id:e}),from:c,fromClientType:r?16:0,fromDeviceId:"",fromNick:"",idClient:p.guid(),idServer:p.guid(),scene:0,time:l,to:u,type:5}}})},E.resetWhenHangup=function(){this.resetStatus(),this.signalInited&&this.signal.stopSession()},E.control=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.command,i=e.channelId;if(i||(i=this.channelId),n&&i)return this.dataApi.update("call_control_type"),this.nim.netcallControl({channelId:i,type:n})["catch"](function(e){throw t.log(e),e})},E.setVideoViewSize=function(t){return this.signalInited?this.signal.setVideoViewSize(t):this.rejectWithNoSignal()},E.setVideoViewRemoteSize=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.signalInited?(t.account&&(t.id=this.getUidWithAccount(t.account)),this.signal.setVideoViewRemoteSize(t)):this.rejectWithNoSignal()},E.setVideoScale=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.signalInited?(t.account&&(t.id=this.getUidWithAccount(t.account)),this.signal.setVideoScale(t)):this.rejectWithNoSignal()},E.startLocalStream=function(t){var e=this;if(this.dataApi.update("display"),this.signalInited&&!this.stream&&this.localStreamInfo){var n=t||this.container,i=this.localStreamInfo.port;this.stream=new C({client:this,url:_.genStreamUrl(i),container:n,mirror:this.mirror}),this.stream.on("resize",function(t){e.emit("streamResize",t)}),this.stream.on("error",function(t){e.emit("error",t)})}},E.stopLocalStream=function(){this.stream&&(this.stream.destroy(),this.stream=null)},E.startRemoteStream=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"p2p"===this.sessionMode?(t=this.getUidWithAccount(this.target),this.remoteContainer||this.target||this.nim.logger.error("不传参数且点对点模式实例化Netcall必须设置remoteContainer与target;传参数必须包含account,node"),!this.getRemoteStream(t)&&this.remoteStreamInfo[t]&&this.addRemoteStream(this.remoteStreamInfo[t])):(t=e.uid||this.getUidWithAccount(e.account),e.node=h.element.n2node(e.node),t&&e.node?this.addRemoteStream(this.remoteStreamInfo[t],e.node):this.nim.logger.error("不传参数且点对点模式实例化Netcall必须设置remoteContainer与target;传参数必须包含account,node"))},E.stopRemoteStream=function(t){return t?this.removeRemoteStream(t):this.removeRemoteStreams()},E.addRemoteStream=function(t,e){var n=this,i=t.uid,o=t.port;this.remoteStreams||(this.remoteStreams={});var r=this.remoteStreams[i];r&&r.destroy(),r=this.remoteStreams[i]=new C({client:this,isRemote:!0,url:_.genStreamUrl(o),container:e||this.remoteContainer,mirror:this.mirrorRemote}),r.on("resize",function(t){n.emit("remoteStreamResize",t)}),r.on("error",function(t){n.emit("error",t)})},E.removeRemoteStreams=function(){var t=this;this.remoteStreams&&Object.keys(this.remoteStreams).forEach(function(e){t.remoteStreams[e].destroy()}),this.remoteStreams={}},E.removeRemoteStream=function(t){var e=this.getUidWithAccount(t);if(!this.remoteStreams[e]){var n={code:"accountNotMatch"};throw n}this.remoteStreams[e].destroy()},E.getRemoteStream=function(t){var e=this.getUidWithAccount(t);return this.remoteStreams&&this.remoteStreams[e]},E.suspendLocalStream=function(){this.stream&&this.stream.suspend()},E.resumeLocalStream=function(){this.stream&&this.stream.resume()},E.suspendRemoteStream=function(t){var e=this.getRemoteStream(t||this.target);e&&e.suspend()},E.resumeRemoteStream=function(t){var e=this.getRemoteStream(t||this.target);e&&e.resume()},E.switchVideoToAudio=function(){var t=this;return this.signalInited?(this.dataApi.update("switch_p2p_type"),this.signal.switchVideoToAudio().then(function(){t.type=A.NETCALL_TYPE_AUDIO})):this.rejectWithNoSignal()},E.switchAudioToVideo=function(){var t=this;return this.signalInited?(this.dataApi.update("switch_p2p_type"),this.signal.switchAudioToVideo().then(function(){t.type=A.NETCALL_TYPE_VIDEO})):this.rejectWithNoSignal()},E.getDevicesOfType=function(t){return this.signalInited?this.signal.getDevicesOfType(t):this.rejectWithNoSignal()},E.getStoredDevicesOfType=function(t){return this.signalInited?(t=+t,t===A.DEVICE_TYPE_AUDIO_OUT_LOCAL&&(t=A.DEVICE_TYPE_AUDIO_OUT_CHAT),this.signal.devicesMap[t]):void this.rejectWithNoSignal()},E.hasDevicesOfType=function(t){return this.getStoredDevicesOfType(t)},E.getStartedDeviceOfType=function(t){return this.signalInited?this.signal.deviceMap[t]:this.rejectWithNoSignal()},E.hasStartedDeviceOfType=function(t){return this.getStartedDeviceOfType(t)},E.stopDevice=function(t){return this.signalInited?this.hasStartedDeviceOfType(t)?this.signal.stopDevice(t):v.resolve():this.rejectWithNoSignal()},E.startDevice=function(t){var e=t.type,n=t.device;if(this.signalInited){if(p.exist(e)&&!n){if(this.hasStartedDeviceOfType(e))return v.resolve();this.hasDevicesOfType(e)&&(n=t.device=this.getStoredDevicesOfType(e)[0])}return n?this.signal.startDevice(t):v.reject((0,r["default"])({type:"noDevice"},t))}return this.rejectWithNoSignal()},E.setSessionVideoQuality=function(t){if(this.signalInited){if(void 0!==t){var e=t;e===A.CHAT_VIDEO_QUALITY_540P?e=A.CHAT_VIDEO_QUALITY_720P:e===A.CHAT_VIDEO_QUALITY_720P&&(e=A.CHAT_VIDEO_QUALITY_540P),this.dataApi.update("video_quality",e||0)}return this.signal.setVideoQuality(t)}return this.rejectWithNoSignal()},E.setSessionVideoFrameRate=function(t){return this.signalInited?(this.dataApi.update("fps",void 0!==t?+t+1:0),this.signal.setVideoFrameRate(t)):this.rejectWithNoSignal();
  3 +},E.setSessionVideoBitrate=function(t){return this.signalInited?(this.dataApi.update("video_max_encode_bitrate",t||""),this.signal.setVideoBitrate(t)):this.rejectWithNoSignal()},E.setCaptureVolume=function(t){return t=void 0===t?255:t,t.constructor===String&&(t=+t||255),this.signalInited?this.signal.setCaptureVolume(t):this.rejectWithNoSignal()},E.setPlayVolume=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};/(Number|String)/.test(t.constructor)&&(t={volume:t});var e=t,n=e.volume;return n=void 0===n?255:n,this.signalInited?this.signal.setPlayVolume(n):this.rejectWithNoSignal()},E.netDetect=function(t,e){return this.dataApi.update({key:"net_detect"}),t=void 0===t?A.NETDETECT_AUDIO:t,e=e||A.CHAT_VIDEO_QUALITY_480P,this.signalInited?this.signal.netDetect({appKey:this.nim.options.appKey,type:t,quality:e}):this.rejectWithNoSignal()},E.uploadLog=function(){var t=this;this.signalInited&&this.nim.getSimpleNosToken().then(function(e){t.signal.uploadLog(e)},function(e){t.log(e)})},E.onLogUploaded=function(t){this.nim.uploadSdkLogUrl(t)},E.log=function(){var t=this.nim.logger;t.log.apply(t,arguments)},E.info=function(){var t=this.nim.logger;t.info.apply(t,arguments)},E.parseAccountUidMap=function(t){var e=this;Object.keys(t).forEach(function(n){e.addAccountUidMap({account:n,uid:t[n]})})},E.addAccountUidMap=function(t){var e=t.account,n=t.uid;this.uidAccountMap||(this.uidAccountMap={}),this.uidAccountMap[n]=e,this.accountUidMap||(this.accountUidMap={}),this.accountUidMap[e]=n},E.getAccountWithUid=function(t){if(this.uidAccountMap)return this.uidAccountMap[t]},E.getUidWithAccount=function(t){if(this.accountUidMap)return this.accountUidMap[t]},E.onError=function(t){this.emit("error",t)},E.setAudioBlack=function(t){var e=this.getUidWithAccount(t);if(e)return this.signal.setAudioBlack(this.getUidWithAccount(t),1);var n={code:"accountNotMatch"};return v.reject(n)},E.setAudioStart=function(t){var e=this.getUidWithAccount(t);if(e)return this.signal.setAudioBlack(this.getUidWithAccount(t),0);var n={code:"accountNotMatch"};return v.reject(n)},E.setVideoBlack=function(t){return this.signal.setVideoBlack(this.getUidWithAccount(t),1)},E.setVideoShow=function(t){return this.signal.setVideoBlack(this.getUidWithAccount(t),0)},E.startRecordMp4=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.dataApi.update({key:"record"}),p.verifyOptions(t,"path"),t.account&&(t.id=t.account===this.account?0:this.getUidWithAccount(t.account)),this.signal.startRecordMp4(t)},E.stopRecordMp4=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.account&&(t.id=t.account===this.account?0:this.getUidWithAccount(t.account)),this.signal.stopRecordMp4(t)},E.startRecordAac=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.dataApi.update({key:"audio_record"}),p.verifyOptions(t,"path"),this.signal.startRecordAac(t)},E.stopRecordAac=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.signal.stopRecordAac(t)},E.onRecordMp4=function(t,e){t.type=e,this.emit("recordMp4",t)},E.destroy=function(){},E.setNetcallSession=function(t){return this.calling?v.reject({type:"statusNotMatch",error:"开启会话失败: 当前正在通话中"}):(this.calling=!0,this.channelId=t.channelId,this.type=+t.netcallType,this.imInfo=t,this.imInfo.rtcUrls=t.rtcServerMap,this.beCalledInfo=this.imInfo,this.target=t.target.account,this.parseAccountUidMap(t.accountUidMap),this.signal.startSession((0,r["default"])({},this.imInfo,{type:this.type},this.imInfo.sessionConfig),!1))},E.ans=function(t){return this.signal?(this.dataApi.update({key:"ans"}),this.sessionConfig.ns=~~t,this.signal.audioControl({ns:this.sessionConfig.ns})):v.reject({code:"noConnection"})},E.aec=function(t){return this.signal?(this.dataApi.update({key:"aec"}),this.sessionConfig.aec=~~t,this.signal.audioControl({aec:this.sessionConfig.aec})):v.reject({code:"noConnection"})},E.voiceDetection=function(t){return this.signal?(this.sessionConfig.vad=~~t,this.signal.audioControl({vad:this.sessionConfig.vad})):v.reject({code:"noConnection"})},E.awc=function(t){return this.signal?(this.dataApi.update({key:"awc"}),this.sessionConfig.awc=~~t,this.signal.awc(this.sessionConfig.awc)):v.reject({code:"noConnection"})},t.exports=b,n(350)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(6),r=i(o),s=n(16),a=i(s),c=n(15),u=i(c),l=void 0,d=n(19),h=n(343),f=n(364),p=n(363),v=function(t){function e(n){(0,r["default"])(this,e);var i=(0,a["default"])(this,t.call(this));return l.merge(i,n),i.init(),i}return(0,u["default"])(e,t),e}(d);v.install=function(t){l=t.util};var m=v.prototype;m.init=function(){this.reset()},m.reset=function(){this.width=0,this.height=0},m.initCanvas=function(t){l.merge(this,t);var e=this.container||document.body,n=this.canvas;n||(n=this.canvas=document.createElement("canvas"),e.appendChild(n)),n.width=this.width,n.height=this.height;var i=this.gl;if(i||(i=this.gl=h.getWebGLContext(n)),i)i.viewport(0,0,this.width,this.height),i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT),h.initShaders(i,f,p),this.initBuffer(i),this.initTextures(i);else{var o={code:"notSupportWebGl"};this.emit("error",o)}},m.initBuffer=function(t){this.positionLocation=t.getAttribLocation(t.program,"a_position"),this.texCoordLocation=t.getAttribLocation(t.program,"a_texCoord"),this.texCoordBuffer=t.createBuffer()},m.initTextures=function(t){this.yTexture=this.createTexture(t.TEXTURE0),this.uTexture=this.createTexture(t.TEXTURE1),this.vTexture=this.createTexture(t.TEXTURE2);var e=t.getUniformLocation(t.program,"Ytex");t.uniform1i(e,0);var n=t.getUniformLocation(t.program,"Utex");t.uniform1i(n,1);var i=t.getUniformLocation(t.program,"Vtex");t.uniform1i(i,2)},m.createTexture=function(t){var e=this.gl,n=e.createTexture();return e.activeTexture(t),e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),n},m.destroyTextures=function(){var t=this.gl;t&&(t.deleteTexture(this.yTexture),t.deleteTexture(this.uTexture),t.deleteTexture(this.vTexture)),this.yTexture=null,this.uTexture=null,this.vTexture=null},m.destroyBuffer=function(){var t=this.gl;t&&this.texCoordBuffer&&t.deleteBuffer(this.texCoordBuffer),this.texCoordBuffer=null},m.updateShaders=function(){var t=this.gl,e=void 0;e=this.mirror?new Float32Array([-1,1,1,0,-1,-1,1,1,1,1,0,0,1,-1,0,1]):new Float32Array([-1,1,0,0,-1,-1,0,1,1,1,1,0,1,-1,1,1]),t.bindBuffer(t.ARRAY_BUFFER,this.texCoordBuffer),t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW);var n=e.BYTES_PER_ELEMENT;t.vertexAttribPointer(this.positionLocation,2,t.FLOAT,!1,4*n,0),t.vertexAttribPointer(this.texCoordLocation,2,t.FLOAT,!1,4*n,2*n),t.enableVertexAttribArray(this.positionLocation),t.enableVertexAttribArray(this.texCoordLocation)},m.updateTextures=function(t){var e=t.y,n=t.u,i=t.v,o=this.gl,r=this.width,s=this.height;this.updateTexture(o.TEXTURE0,this.yTexture,e,r,s),this.updateTexture(o.TEXTURE1,this.uTexture,n,r/2,s/2),this.updateTexture(o.TEXTURE2,this.vTexture,i,r/2,s/2),o.finish()},m.updateTexture=function(t,e,n,i,o){var r=this.gl;r.activeTexture(t),r.bindTexture(r.TEXTURE_2D,e),r.texImage2D(r.TEXTURE_2D,0,r.LUMINANCE,i,o,0,r.LUMINANCE,r.UNSIGNED_BYTE,n)},m.drawImage=function(t){if(!this.destroyed){var e=t.width,n=t.height,i=t.y,o=t.u,r=t.v;e===this.width&&n===this.height||(this.width=e,this.height=n,this.clean(),this.initCanvas({width:e,height:n}),this.emit("resize",{width:e,height:n,isRemote:this.isRemote,container:this.container})),this.updateShaders(),this.updateTextures({y:i,u:o,v:r});var s=this.gl;s.drawArrays(s.TRIANGLE_STRIP,0,4)}},m.destroy=function(){this.destroyed||(this.destroyed=!0,this.clean(),this.reset())},m.clean=function(){this.destroyTextures(),this.destroyBuffer(),this.removeGl()},m.removeGl=function(){this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.canvasInited=!1,this.gl=null},t.exports=v},function(t,e){"use strict";var n={},i=n.create3DContext=function(t,e){for(var n=["webgl","experimental-webgl","webkit-3d","moz-webgl"],i=null,o=0;o<n.length;++o){try{i=t.getContext(n[o],e)}catch(r){}if(i){console.log("use",n[o]);break}}return i};n.initShaders=function(t,e,n){var i=o(t,e,n);return i?(t.useProgram(i),t.program=i,!0):(console.log("Failed to create program"),!1)};var o=n.createProgram=function(t,e,n){var i=r(t,t.VERTEX_SHADER,e),o=r(t,t.FRAGMENT_SHADER,n);if(!i||!o)return null;var s=t.createProgram();if(!s)return null;t.attachShader(s,i),t.attachShader(s,o),t.linkProgram(s);var a=t.getProgramParameter(s,t.LINK_STATUS);if(!a){var c=t.getProgramInfoLog(s);return console.log("Failed to link program: "+c),t.deleteProgram(s),t.deleteShader(o),t.deleteShader(i),null}return s},r=n.loadShader=function(t,e,n){var i=t.createShader(e);return null==i?(console.log("unable to create shader"),null):(t.shaderSource(i,n),t.compileShader(i),i)};n.getWebGLContext=function(t,e){var n=i(t);return n?n:null},window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.cancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelAnimationFrame||window.oCancelRequestAnimationFrame||window.clearTimeout),t.exports=n},,,,,,,function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(98),r=i(o),s=n(341),a=n(203),c=s.prototype,u=void 0;c.setUtil=function(t){u=t},c.createChannel=function(t){return u.verifyOptions(t,"channelName"),t.custom=t.custom||"",this.dataApi.update("meeting"),t.webrtcEnable=!0,this.nim.createChannel(t)},c.joinChannel=function(t){var e=this;this.dataApi.update("meeting"),u.verifyOptions(t,"channelName type");var n=t.type,i=t.sessionConfig,o=void 0===i?{}:i;if(o.bypassRtmp=t.liveEnable,o.customLayout=t.layout||t.customLayout,t.liveEnable&&this.dataApi.update("bypass",void 0!==o.splitMode?+o.splitMode+1:0),o.highAudio&&this.dataApi.update("hd_audio"),void 0!==o.videoFrameRate&&this.dataApi.update("fps",0===+o.videoFrameRate?0:+o.videoFrameRate+1),void 0!==o.videoEncodeMode&&this.dataApi.update("video_adaptive_strategy",o.videoEncodeMode||0),void 0!==o.videoBitrate&&this.dataApi.update("video_max_encode_bitrate",o.videoBitrate||""),void 0!==o.videoQuality){var s=o.videoQuality;s===a.CHAT_VIDEO_QUALITY_540P?s=a.CHAT_VIDEO_QUALITY_720P:s===a.CHAT_VIDEO_QUALITY_720P&&(s=a.CHAT_VIDEO_QUALITY_540P),this.dataApi.update("video_quality",s||0)}if(o.awc&&this.dataApi.update({key:"awc"}),o.ans&&this.dataApi.update({key:"ans"}),o.aec&&this.dataApi.update({key:"aec"}),this.signalInited)return this.nim.joinChannel({channelName:t.channelName,liveEnable:t.liveEnable,webrtcEnable:!0}).then(function(i){return console.log("joinchannel obj",i),console.log("joinchannel options",t),e.callerInfo=i,e.channelId=i.channelId,e.channelName=t.channelName,e.sessionMode="meeting",e.parseAccountUidMap(i.accountUidMap),i.uid=e.getUidWithAccount(e.account),e.dataApi.start({uid:i.uid}),e.signal.startSession((0,r["default"])({},i,{type:n},t.sessionConfig),!0).then(function(t){return t.custom=i.custom,t})});var c={code:"noConnection"};return Promise.reject(c)},c.leaveChannel=function(){if(this.signalInited)return this.dataApi.send(),this.signal.stopSession();var t={code:"noConnection"};return Promise.reject(t)},c.changeRoleToPlayer=function(){return this.signal.setRole(0)},c.changeRoleToAudience=function(){return this.signal.setRole(1)},c.updateRtmpUrl=function(t){return this.signal.updateRtmpUrl(t)}},function(t,e){"use strict";var n="wss://localhost.netease.im:",i={baseUrl:n,signalUrl:n+"30000",streamUrl:n+"40000",genStreamUrl:function(t){return""+n+t}};t.exports=i},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(98),r=i(o),s=n(6),a=i(s),c=n(16),u=i(c),l=n(15),d=i(l),h=void 0,f=n(19),p=n(203),v=n(354),m=n(149),_=function(t){function e(n){(0,a["default"])(this,e);var i=(0,u["default"])(this,t.call(this));return h.merge(i,n),i.reset(),window.addEventListener("beforeunload",function(){i.destroy()}),i}return(0,d["default"])(e,t),e}(f);_.install=function(t){h=t.util};var g=_.prototype;g.reset=function(){this.inited=!1,this.isMeeting=!1,this.hasInvokePC=!1,this.cmdId=1,this.cmdTasksMap={},this.sessionStopped=!1,this.devicesMap={},this.deviceMap={},this.initSocket(),this.audioGroup={aec:1,ns:1,vad:1,awc:0}},g.initSocket=function(){var t=this.socket=new WebSocket(this.url);t.onopen=this.onOpen.bind(this),t.onmessage=this.onMessage.bind(this),t.onerror=this.onError.bind(this),t.onclose=this.onClose.bind(this)},g.onOpen=function(t){var e=this,n=this.heartbeat?1:0,i=this.getName()+" open -> signal.js";this.inited=!0,this.logToConsole(i),this.log(i),this.emit("open"),this.sendCmd({type:"on_init",info:{account:this.account,type:this.kickLast?1:0,heartbeat:n,app_key:this.appkey}}).then(this.onInit.bind(this))["catch"](function(t){e.logToConsole("init error -> signal.js",t),e.emit("initError",t)})},g.onError=function(t){if(!this.destroyed&&this.inited){var e=this.getName()+" error -> signal.js";this.logToConsole(e)}},g.onClose=function(t){var e=this;if(!this.destroyed)if(this.inited){var n=this.getName()+" close -> signal.js : "+t.code;this.logToConsole(n),this.inited=!1,this.emit("close")}else{this.hasInvokePC||(this.hasInvokePC=!0,this.invokePC());var i=this.backoff;i||(i=this.backoff=new m({min:1e3,max:2e3})),3===i.attempts?this.emit("initError",{code:"noPC"}):setTimeout(function(){e.initSocket()},i.duration())}},g.invokePC=function(){var t="NIMWebAgent:invokePC",e=document.createElement("iframe");e.src=t,document.body.appendChild(e),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},0)},g.onMessage=function(t){if(!this.destroyed){var e=JSON.parse(t.data),n=e.cmd_id,i=e.cmd_type,o=e.cmd_info;this.shouldPrintMsg({cmdType:i,cmdInfo:o})&&"on_heartbeat_notify"!==i&&this.client.info("signal socket msg",e);var r=this.cmdTasksMap[n];if(r)delete this.cmdTasksMap[n],200===o.code?r.resolve(o):r.reject(o);else switch(i){case"device_status_notify":this.onDeviceStatus(o);break;case"session_notify":this.onSessionNotify(o);break;case"upload_log_notify":this.onUploadLogNotify(o)}}},g.shouldPrintMsg=function(t){var e=t.cmdType,n=t.cmdInfo;return"session_notify"!==e||!n.audio_volume&&!n.net&&!n.static_info},g.sendCmd=function(t){var e=this;return new Promise(function(n,i){var o="on_heartbeat"===t.type?0:e.cmdId++,s=(0,r["default"])({cmd_id:o,cmd_type:t.type,cmd_info:t.info||{}},t.extra);e.socket&&e.socket.readyState===WebSocket.OPEN?("on_heartbeat"!==t.type&&e.logToConsole("send signal cmd",s),e.cmdTasksMap[o]={resolve:n,reject:i},e.socket.send(JSON.stringify(s))):i({code:"noConnection"})})},g.onInit=function(t){var e=t.code,n=t.version,i=t.port,o=t.device_list_notify;200===e&&(o.forEach(this.onDevices,this),this.emit("init",{port:i,version:n,code:e}),this.startHeartBeat())},g.startHeartBeat=function(){var t=this;this.heartBeatTimer&&this.stopHeartBeat(),this.heartBeatTimer=setInterval(function(){t.sendCmd({type:"on_heartbeat",info:{}})["catch"](function(){t.emit("heartBeatError",{type:"heartbeatError"})})},15e3)},g.stopHeartBeat=function(){clearInterval(this.heartBeatTimer),this.heartBeatTimer=null},g.setVideoViewSize=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=parseInt(t.width)||0,n=parseInt(t.height)||0,i=void 0===t.cut?1:~~t.cut;return this.sendCmd({type:"on_capture_video_size",info:{width:e,height:n,cut:i}})},g.setVideoViewRemoteSize=function(t){var e=parseInt(t.width)||0,n=parseInt(t.height)||0,i=t.id||0,o=void 0===t.cut?1:~~t.cut;return this.sendCmd({type:"on_rec_video_size",info:{id:i,width:e,height:n,cut:o}})},g.setVideoScale=function(t){var e=t.type,n=void 0===e?p.CHAT_VIDEO_SCALE_None:e,i=t.id;return this.sendCmd({type:"on_send_video_Scale",info:{id:i,type:n}})},g.getDevicesOfType=function(t){var e=this;return this.sendCmd({type:"on_get_devices",info:{type:t}}).then(function(t){return t.devices=t.devices||[],e.onDevices(t),t})["catch"](function(t){throw t})},g.onDevices=function(t){var e=t.type,n=t.devices;if(n&&n.length){v.sortDevices(n);var i=p.getDeviceTypeStr(e);i&&(this.devicesMap[e]=n,this.emit("devices",{type:e,typeStr:i,devices:n}))}},g.startAllDevices=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.videoQuality,i=e.audioOutType;Object.keys(this.devicesMap).forEach(function(e){e=+e,e===p.DEVICE_TYPE_AUDIO_OUT_CHAT&&i===p.DEVICE_TYPE_AUDIO_OUT_LOCAL&&(e=i);var o=t.devicesMap[e];t.startDevice({device:o[0],type:e,videoQuality:n})})},g.startDevice=function(t){var e=this,n=t.device,i=t.type,o=t.width,r=t.height;if(n){i=+i;var s={type:i,path:n.path};return i===p.DEVICE_TYPE_VIDEO&&(s.width=parseInt(o)||0,s.height=parseInt(r)||0),this.deviceMap[i]=n,this.sendCmd({type:"on_start_device",info:s})["catch"](function(){throw delete e.deviceMap[i],s})}},g.stopDevice=function(t){var e=this,n=this.deviceMap[t];return delete this.deviceMap[t],this.sendCmd({type:"on_stop_device",info:{type:t}})["catch"](function(){e.deviceMap[t]=n})},g.onDeviceStatus=function(t){var e=t.type,n=t.status,i=1===(1&n),o=4===(4&n),s=8===(8&n),a=16===(16&n);s&&(this.deviceMap[e]=t,this.emit("deviceStatus",(0,r["default"])({},t,{status:"started"}))),a&&(delete this.deviceMap[e],this.emit("deviceStatus",(0,r["default"])({},t,{status:"stopped"}))),o&&(this.deviceMap[e]=t,this.emit("deviceStatus",(0,r["default"])({},t,{status:"reset"}))),i&&this.emit("deviceStatus",(0,r["default"])({},t,{status:"change"}))},g.startSession=function(t,e){var n=this;this.sessionStopped=!1;var i=h.guid();this.sessionId=i;var o=t.type;this.type=o;var r={id:t.uid,cid:t.channelId,type:o,p2p_connect:1,dispatch:t.serverMap,config:t.clientConfig,v_encode_mode:this.normalizeVideoEncodeMode(t.videoEncodeMode),video_quality:this.normalizeVideoQuality(t.videoQuality),video_record:t.recordVideo?1:0,record:t.recordAudio?1:0,high_rate:t.highAudio?1:0,frame_rate:this.normalizeVideoFrameRate(t.videoFrameRate),max_video_rate:this.normalizeVideoBitrate(t.videoBitrate),custom_layout:t.customLayout};return e&&(r.meeting_mode=1,r.bypass_rtmp=t.bypassRtmp?1:0,r.rtmp_url=t.rtmpUrl||"",r.rtmp_record=t.rtmpRecord?1:0,r.split_mode=t.splitMode||0),this.sendCmd({type:"on_start_chat",info:r,extra:{session_id:i}}).then(function(i){var o=i.login,r=i.error;if(r)throw r;return n.isMeeting=e,void 0!==t.ns&&n.audioControl({ns:t.ns}),void 0!==t.vad&&n.audioControl({vad:t.vad}),void 0!==t.aec&&n.audioControl({aec:t.aec}),void 0!==t.awc&&n.awc(t.awc),{login:o}})},g.stopSession=function(){return this.sessionStopped?Promise.resolve():(this.sessionStopped=!0,this.isMeeting=!1,this.sendCmd({type:"on_stop_chat"}))},g.clear=function(){this.sendCmd({type:"on_clear"})},g.switchVideoToAudio=function(){return this.sendCmd({type:"on_set_chat_mode",info:{type:p.NETCALL_TYPE_AUDIO}})},g.switchAudioToVideo=function(){return this.sendCmd({type:"on_set_chat_mode",info:{type:p.NETCALL_TYPE_VIDEO}})},g.logToConsole=function(){var t=this.client;t&&t.log.apply(t,arguments)},g.log=function(t){t&&this.doLog({msg:t,level:3})},g.warn=function(t){t&&this.doLog({msg:t,level:2})},g.err=function(t){t&&this.doLog({msg:t,level:1})},g.doLog=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.msg,n=t.level;return this.sendCmd({type:"on_log",info:{type:n,content:""+e}})["catch"](function(){})},g.uploadLog=function(t){var e=t.bucket,n=t.objectName,i=t.token;return this.sendCmd({type:"on_upload_log",info:{nos_bucket:e,nos_object:n,nos_header_token:i}})["catch"](function(){})},g.normalizeVideoEncodeMode=function(t){return parseInt(t)||p.CHAT_VIDEO_ENCODEMODE_NORMAL},g.normalizeVideoQuality=function(t){return parseInt(t)||p.CHAT_VIDEO_QUALITY_480P},g.setVideoQuality=function(t){return this.sendCmd({type:"on_set_video_quality",info:{type:this.normalizeVideoQuality(t)}})},g.normalizeVideoFrameRate=function(t){return parseInt(t)||p.CHAT_VIDEO_FRAME_RATE_NORMAL},g.setVideoFrameRate=function(t){return this.sendCmd({type:"on_set_video_frame_rate",info:{type:this.normalizeVideoFrameRate(t)}})},g.normalizeVideoBitrate=function(t){return parseInt(t)||0},g.setVideoBitrate=function(t){return this.sendCmd({type:"on_set_video_bitrate",info:{code:this.normalizeVideoBitrate(t)}})},g.netDetect=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.appKey,n=t.type,i=t.quality,o=void 0===i?0:i;return this.sendCmd({type:"on_net_detect",info:{app_key:e,type:n,quality:o}})},g.normalizeVolumn=function(t){return t=+t,h.isNumber(t)&&!isNaN(t)||(t=255),t<0&&(t=0),t>255&&(t=255),t},g.setCaptureVolume=function(t){return t=this.normalizeVolumn(t),this.sendCmd({type:"on_capture_volume",info:{status:t}})},g.setPlayVolume=function(t){return t=this.normalizeVolumn(t),this.sendCmd({type:"on_play_volume",info:{status:t}})},g.setRole=function(t){return this.sendCmd({type:"on_set_viewer",info:{status:t}})},g.setAudioBlack=function(t,e){return this.sendCmd({type:"on_set_audio_black",info:{id:t,status:e}})},g.setVideoBlack=function(t,e){return this.sendCmd({type:"on_set_video_black",info:{id:t,status:e}})},g.updateRtmpUrl=function(t){return this.sendCmd({type:"on_update_rtmp_url",info:{content:t}})},g.startRecordMp4=function(t){var e=t.path,n=t.id,i=void 0===n?"":n;return this.sendCmd({type:"on_record_mp4",info:{path:e,id:i}})},g.stopRecordMp4=function(t){var e=t.id,n=void 0===e?0:e;return this.sendCmd({type:"on_stop_record_mp4",info:{id:n}})},g.startRecordAac=function(t){var e=t.path;return this.sendCmd({type:"on_record_aac",info:{path:e}})},g.stopRecordAac=function(){return this.sendCmd({type:"on_stop_record_aac",info:{}})},g.onSessionNotify=function(t){t&&(t.user_joined?(console.log("onSessionNotify ",t),this.emit("userJoined",{uid:t.user_joined.id,port:t.user_joined.port,type:this.type,isMeeting:this.isMeeting})):t.user_left?this.emit("userLeft",{uid:t.user_left.id,type:t.user_left.status,isMeeting:this.isMeeting}):t.net?this.emit("netStatus",t.net):t.static_info?this.emit("statistics",t.static_info):t.audio_volume?this.emit("audioVolume",t.audio_volume):t.error?this.emit("error",t.error):t.mp4_start?this.emit("recordMp4",t.mp4_start,"start"):t.mp4_close&&this.emit("recordMp4",t.mp4_close,"close"))},g.onUploadLogNotify=function(t){var e=t.code,n=t.url;200===e&&this.emit("logUploaded",{url:n})},g.getName=function(){return"signal socket "+this.url},g.destroy=function(){this.destroyed=!0,this.stopHeartBeat();var t="signal close -> signal.js";this.logToConsole(t),this.socket&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onerror=null,this.socket.onclose=null,this.socket.readyState===WebSocket.OPEN&&(this.clear(),this.socket.close()),this.socket=null)},g.audioControl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h.merge(this.audioGroup,t),this.sendCmd({type:"on_audio_process",info:this.audioGroup,id:++this.cmdId})},g.awc=function(t){return this.sendCmd({type:"on_audio_howling",info:{status:~~t},id:++this.cmdId})},t.exports=_},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var o=n(6),r=i(o),s=n(16),a=i(s),c=n(15),u=i(c),l=void 0,d=n(19),h=n(342),f=n(362),p=function(t){function e(n){(0,r["default"])(this,e);var i=(0,a["default"])(this,t.call(this));return l.merge(i,n),i.init(),i}return(0,u["default"])(e,t),e}(d);p.install=function(t){l=t.util};var v=p.prototype;v.init=function(){this.reset(),this.initRender(),this.initWorker(),window.addEventListener("beforeunload",this.destroy.bind(this))},v.initRender=function(){var t=this;this.render=new h({client:this.client,stream:this,isRemote:this.isRemote,container:this.container,mirror:this.mirror}),this.render.on("resize",function(e){t.emit("resize",e)}),this.render.on("error",function(e){t.emit("error",e)})},v.reset=function(){this.currFrameCount=0,this.width=0,this.height=0,this.timetag=0,this.worker=null,this.render=null},v.initWorker=function(){var t=this,e=new Blob([f],{type:"application/javascript"}),n=this.worker=new Worker(URL.createObjectURL(e));n.addEventListener("message",function(e){var n=e.data;switch(n.cmd){case"open":t.onOpen();break;case"error":t.onError();break;case"close":t.onClose();break;case"message":t.onMessage(n)}}),this.sendWorkerCmd({cmd:"init",info:{url:this.url}})},v.destroyWorker=function(){this.worker&&this.worker.terminate()},v.sendWorkerCmd=function(t){this.worker&&this.worker.postMessage(t)},v.getName=function(){return(this.isRemote?"remote ":"")+"stream socket "+this.url},v.onOpen=function(t){var e=this.getName()+" open -> stream.js";this.logToConsole(e),this.logToPC(e)},v.startStatisticsTimer=function(){var t=this;this.statisticsTimer=setInterval(function(){var e=t.currFrameCount-t.lastFrameCount;t.sendWorkerCmd({cmd:"msg",info:{cmd:"statistics",info:{lastFrameCount:t.lastFrameCount,fps:e,latency:t.latency}}}),t.lastFrameCount=t.currFrameCount,t.latency=0},1e3)},v.onError=function(t){if(!this.destroyed){var e=this.getName()+" error -> stream.js";this.logToConsole(e),this.logToPC(e),this.destroy()}},v.onClose=function(t){this.destroy(t)},v.onMessage=function(t){var e=t.data;if(!this.destroyed&&e instanceof ArrayBuffer){var n=e.byteLength;this.render&&!this.suspended&&this.renderFrame(e,n)}},v.renderFrame=function(t,e){var n=16,i=new DataView(t),o=this.width=i.getUint32(0),r=this.height=i.getUint32(4),s=i.getUint32(8),a=i.getUint32(12);this.timetag=1e3*s+a;var c=o*r,u=c/4,l=c/4;if(n+c+u+l!==e){var d="yuv数据长度不匹配: total "+e+", meta "+n+", width "+o+", height "+r+", yLength "+c+" uLength "+u+" vLength "+l;return this.logToConsole(d),void this.logToPC(d)}this.currFrameCount++,this.scheduleRender({id:this.currFrameCount,width:o,height:r,y:new Uint8Array(t,n,c),u:new Uint8Array(t,n+c,u),v:new Uint8Array(t,n+c+u)})},v.scheduleRender=function(t){this.render&&!this.suspended&&this.render.drawImage(t)},v.suspend=function(){this.suspended=!0},v.resume=function(){this.suspended=!1},v.destroy=function(t){this.sendWorkerCmd({cmd:"close",info:{cmd_type:"on_clear_media"}}),this.destroyed=!0,this.render&&this.render.destroy(),this.reset();var e=t&&t.constructor===Object?t.code:"",n=this.getName()+" destroy: code - "+e+" -> stream.js";this.logToConsole(n),this.logToPC(n)},v.logToConsole=function(){var t=this.client;t&&t.log.apply(t,arguments)},v.logToPC=function(){var t=this.client;if(t){var e=t.signal;e&&e.log.apply(e,arguments)}},t.exports=p},function(t,e){"use strict";var n={};n.sortDevices=function(t){t&&t.length>1&&t.sort(function(t,e){var n=t.name.toLowerCase().indexOf("virtual")!==-1,i=t.path.toLowerCase().indexOf("virtual")!==-1,o=e.name.toLowerCase().indexOf("virtual")!==-1,r=e.path.toLowerCase().indexOf("virtual")!==-1;return i?1:r?-1:n&&o?0:n?1:o?-1:0})},t.exports=n},,,,,,,,function(t,e){t.exports="'use strict';\n\n/* 该web worker 职能为向 websocket 发送指令及数据*/\n\nvar that = {};\n\nthat.init = function (data) {\n if (!that.socket) {\n var url = that.url = data.info.url;\n var socket = that.socket = new WebSocket(url);\n socket.onopen = function (event) {\n postMessage({\n cmd: 'open'\n });\n };\n socket.onmessage = function (event) {\n postMessage({\n cmd: 'message',\n data: event.data\n }, [event.data]);\n };\n socket.onerror = function (event) {\n postMessage({\n cmd: 'error'\n });\n };\n socket.onclose = function (event) {\n postMessage({ // web 端被动结束\n cmd: 'close'\n });\n };\n socket.binaryType = 'arraybuffer';\n }\n};\n\nthat.close = function () {\n if (that.socket) {\n that.socket.onopen = null;\n that.socket.onmessage = null;\n that.socket.onerror = null;\n that.socket.onclose = null;\n that.socket.close(); // 结束socket\n that.socket = null;\n }\n self.close(); // 结束worker,web端主动\n};\n\nthat.send = function (obj) {\n if (that.socket && that.socket.readyState === WebSocket.OPEN) {\n that.socket.send(JSON.stringify(obj));\n }\n};\n// 侦听主线程的worker消息\nself.addEventListener('message', function (event) {\n var data = event.data;\n switch (data.cmd) {\n case 'init':\n // worker第一步2\n that.init(data);\n break;\n case 'close':\n // web发起,结束worker及相应socket\n that.send(data.info);\n that.close(data);\n break;\n case 'msg':\n that.send(data.info);\n break;\n }\n});"},function(t,e){t.exports="precision mediump float;\r\nuniform sampler2D Ytex, Utex, Vtex;\r\nvarying vec2 v_texCoord;\r\nvoid main(void) {\r\n float r, g, b, y, u, v;\r\n vec4 yuv, rgb;\r\n y = texture2D(Ytex, v_texCoord).r;\r\n u = texture2D(Utex, v_texCoord).r;\r\n v = texture2D(Vtex, v_texCoord).r;\r\n yuv = vec4(y, u, v, 1.0);\r\n yuv = yuv - vec4(0.0625, 0.5, 0.5, 0.0);\r\n yuv = mat4(\r\n 1.1643, 0.0, 0.0, 0.0,\r\n 0.0, 1.0, 0.0, 0.0,\r\n 0.0, 0.0, 1.0, 0.0,\r\n 0.0, 0.0, 0.0, 1.0\r\n ) * yuv;\r\n rgb = mat4(\r\n 1.0, 1.0, 1.0, 0.0,\r\n 0.0, -0.3917, 2.017, 0.0,\r\n 1.5958, -0.8129, 0.0, 0.0,\r\n 0.0, 0.0, 0.0, 1.0\r\n ) * yuv;\r\n gl_FragColor = rgb;\r\n // y = 1.1643 * (y - 0.0625);\r\n // u = u - 0.5;\r\n // v = v - 0.5;\r\n // r = y + 1.5958 * v;\r\n // g = y - 0.39173 * u - 0.81290 * v;\r\n // b = y + 2.017 * u;\r\n // gl_FragColor = vec4(r, g, b, 1.0);\r\n}\r\n"},function(t,e){t.exports="attribute vec4 a_position;\r\nattribute vec2 a_texCoord;\r\nvarying vec2 v_texCoord;\r\nvoid main () {\r\n gl_Position = a_position;\r\n v_texCoord = a_texCoord;\r\n}\r\n"}])});
此 diff 太大无法显示。
此 diff 太大无法显示。
此 diff 太大无法显示。
  1 +{
  2 + "root": true,
  3 +
  4 + "extends": "@ljharb",
  5 +
  6 + "rules": {
  7 + "camelcase": [0],
  8 + "complexity": [0, 10],
  9 + "dot-notation": [2, { "allowKeywords": false }],
  10 + "eqeqeq": [2, "allow-null"],
  11 + "id-length": [2, { "min": 1, "max": 40 }],
  12 + "max-nested-callbacks": [2, 5],
  13 + "max-params": [2, 7],
  14 + "max-statements": [1, 30],
  15 + "new-cap": [2, { "capIsNewExceptions": ["ToInteger", "ToObject", "ToPrimitive", "ToUint32"] }],
  16 + "no-constant-condition": [1],
  17 + "no-extend-native": [2, {"exceptions": ["Date", "Error", "RegExp"]}],
  18 + "no-extra-parens": [0],
  19 + "no-extra-semi": [1],
  20 + "no-func-assign": [1],
  21 + "no-implicit-coercion": [2, {
  22 + "boolean": false,
  23 + "number": false,
  24 + "string": true
  25 + }],
  26 + "no-invalid-this": [0],
  27 + "no-magic-numbers": [0],
  28 + "no-native-reassign": [2, {"exceptions": ["Date", "parseInt"]}],
  29 + "no-new-func": [1],
  30 + "no-plusplus": [1],
  31 + "no-restricted-syntax": [2, "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
  32 + "no-shadow": [1],
  33 + "no-unused-vars": [1, { "vars": "all", "args": "after-used" }],
  34 + "operator-linebreak": [2, "after"],
  35 + "quote-props": [1, "as-needed", { "keywords": true }],
  36 + "spaced-comment": [0],
  37 + "strict": [0]
  38 + }
  39 +}
  1 +node_modules
  2 +.DS_Store
  1 +{
  2 + "es3": true,
  3 +
  4 + "additionalRules": [],
  5 +
  6 + "requireSemicolons": true,
  7 +
  8 + "disallowMultipleSpaces": true,
  9 +
  10 + "disallowIdentifierNames": [],
  11 +
  12 + "requireCurlyBraces": {
  13 + "allExcept": [],
  14 + "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
  15 + },
  16 +
  17 + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
  18 +
  19 + "disallowSpaceAfterKeywords": [],
  20 +
  21 + "disallowSpaceBeforeComma": true,
  22 + "disallowSpaceAfterComma": false,
  23 + "disallowSpaceBeforeSemicolon": true,
  24 +
  25 + "disallowNodeTypes": [
  26 + "DebuggerStatement",
  27 + "LabeledStatement",
  28 + "SwitchCase",
  29 + "SwitchStatement",
  30 + "WithStatement"
  31 + ],
  32 +
  33 + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
  34 +
  35 + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
  36 + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
  37 + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
  38 + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
  39 + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
  40 +
  41 + "requireSpaceBetweenArguments": true,
  42 +
  43 + "disallowSpacesInsideParentheses": true,
  44 +
  45 + "disallowSpacesInsideArrayBrackets": true,
  46 +
  47 + "disallowQuotedKeysInObjects": "allButReserved",
  48 +
  49 + "disallowSpaceAfterObjectKeys": true,
  50 +
  51 + "requireCommaBeforeLineBreak": true,
  52 +
  53 + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
  54 + "requireSpaceAfterPrefixUnaryOperators": [],
  55 +
  56 + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
  57 + "requireSpaceBeforePostfixUnaryOperators": [],
  58 +
  59 + "disallowSpaceBeforeBinaryOperators": [],
  60 + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
  61 +
  62 + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
  63 + "disallowSpaceAfterBinaryOperators": [],
  64 +
  65 + "disallowImplicitTypeConversion": ["binary", "string"],
  66 +
  67 + "disallowKeywords": ["with", "eval"],
  68 +
  69 + "requireKeywordsOnNewLine": [],
  70 + "disallowKeywordsOnNewLine": ["else"],
  71 +
  72 + "requireLineFeedAtFileEnd": true,
  73 +
  74 + "disallowTrailingWhitespace": true,
  75 +
  76 + "disallowTrailingComma": true,
  77 +
  78 + "excludeFiles": ["node_modules/**", "vendor/**"],
  79 +
  80 + "disallowMultipleLineStrings": true,
  81 +
  82 + "requireDotNotation": { "allExcept": ["keywords"] },
  83 +
  84 + "requireParenthesesAroundIIFE": true,
  85 +
  86 + "validateLineBreaks": "LF",
  87 +
  88 + "validateQuoteMarks": {
  89 + "escape": true,
  90 + "mark": "'"
  91 + },
  92 +
  93 + "disallowOperatorBeforeLineBreak": [],
  94 +
  95 + "requireSpaceBeforeKeywords": [
  96 + "do",
  97 + "for",
  98 + "if",
  99 + "else",
  100 + "switch",
  101 + "case",
  102 + "try",
  103 + "catch",
  104 + "finally",
  105 + "while",
  106 + "with",
  107 + "return"
  108 + ],
  109 +
  110 + "validateAlignedFunctionParameters": {
  111 + "lineBreakAfterOpeningBraces": true,
  112 + "lineBreakBeforeClosingBraces": true
  113 + },
  114 +
  115 + "requirePaddingNewLinesBeforeExport": true,
  116 +
  117 + "validateNewlineAfterArrayElements": {
  118 + "maximum": 200
  119 + },
  120 +
  121 + "requirePaddingNewLinesAfterUseStrict": true,
  122 +
  123 + "disallowArrowFunctions": true,
  124 +
  125 + "disallowMultiLineTernary": false,
  126 +
  127 + "validateOrderInObjectKeys": false,
  128 +
  129 + "disallowIdenticalDestructuringNames": true,
  130 +
  131 + "disallowNestedTernaries": { "maxLevel": 7 },
  132 +
  133 + "requireSpaceAfterComma": { "allExcept": ["trailing"] },
  134 + "requireAlignedMultilineParams": false,
  135 +
  136 + "requireSpacesInGenerator": {
  137 + "afterStar": true
  138 + },
  139 +
  140 + "disallowSpacesInGenerator": {
  141 + "beforeStar": true
  142 + },
  143 +
  144 + "disallowVar": false,
  145 +
  146 + "requireArrayDestructuring": false,
  147 +
  148 + "requireEnhancedObjectLiterals": false,
  149 +
  150 + "requireObjectDestructuring": false,
  151 +
  152 + "requireEarlyReturn": false,
  153 +
  154 + "requireCapitalizedConstructorsNew": {
  155 + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
  156 + },
  157 +
  158 + "requireImportAlphabetized": false,
  159 +
  160 + "requireSpaceBeforeObjectValues": true,
  161 + "requireSpaceBeforeDestructuredValues": true,
  162 +
  163 + "disallowSpacesInsideTemplateStringPlaceholders": true,
  164 +
  165 + "disallowArrayDestructuringReturn": false,
  166 +
  167 + "requireNewlineBeforeSingleStatementsInIf": false
  168 +}
  169 +
  1 +language: node_js
  2 +node_js:
  3 + - "5.9"
  4 + - "5.8"
  5 + - "5.7"
  6 + - "5.6"
  7 + - "5.5"
  8 + - "5.4"
  9 + - "5.3"
  10 + - "5.2"
  11 + - "5.1"
  12 + - "5.0"
  13 + - "4.4"
  14 + - "4.3"
  15 + - "4.2"
  16 + - "4.1"
  17 + - "4.0"
  18 + - "iojs-v3.3"
  19 + - "iojs-v3.2"
  20 + - "iojs-v3.1"
  21 + - "iojs-v3.0"
  22 + - "iojs-v2.5"
  23 + - "iojs-v2.4"
  24 + - "iojs-v2.3"
  25 + - "iojs-v2.2"
  26 + - "iojs-v2.1"
  27 + - "iojs-v2.0"
  28 + - "iojs-v1.8"
  29 + - "iojs-v1.7"
  30 + - "iojs-v1.6"
  31 + - "iojs-v1.5"
  32 + - "iojs-v1.4"
  33 + - "iojs-v1.3"
  34 + - "iojs-v1.2"
  35 + - "iojs-v1.1"
  36 + - "iojs-v1.0"
  37 + - "0.12"
  38 + - "0.11"
  39 + - "0.10"
  40 + - "0.9"
  41 + - "0.8"
  42 + - "0.6"
  43 + - "0.4"
  44 +before_install:
  45 + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
  46 + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
  47 +script:
  48 + - 'if [ "${TRAVIS_NODE_VERSION}" != "4.4" ]; then npm run tests-only ; else npm test ; fi'
  49 +sudo: false
  50 +matrix:
  51 + fast_finish: true
  52 + allow_failures:
  53 + - node_js: "5.8"
  54 + - node_js: "5.7"
  55 + - node_js: "5.6"
  56 + - node_js: "5.5"
  57 + - node_js: "5.4"
  58 + - node_js: "5.3"
  59 + - node_js: "5.2"
  60 + - node_js: "5.1"
  61 + - node_js: "5.0"
  62 + - node_js: "4.3"
  63 + - node_js: "4.2"
  64 + - node_js: "4.1"
  65 + - node_js: "4.0"
  66 + - node_js: "iojs-v3.2"
  67 + - node_js: "iojs-v3.1"
  68 + - node_js: "iojs-v3.0"
  69 + - node_js: "iojs-v2.4"
  70 + - node_js: "iojs-v2.3"
  71 + - node_js: "iojs-v2.2"
  72 + - node_js: "iojs-v2.1"
  73 + - node_js: "iojs-v2.0"
  74 + - node_js: "iojs-v1.7"
  75 + - node_js: "iojs-v1.6"
  76 + - node_js: "iojs-v1.5"
  77 + - node_js: "iojs-v1.4"
  78 + - node_js: "iojs-v1.3"
  79 + - node_js: "iojs-v1.2"
  80 + - node_js: "iojs-v1.1"
  81 + - node_js: "iojs-v1.0"
  82 + - node_js: "0.11"
  83 + - node_js: "0.9"
  84 + - node_js: "0.6"
  85 + - node_js: "0.4"
  1 +4.5.7
  2 + - [Fix] `bind` in IE 8: Update `is-callable` implementation to v1.1.3 (#390)
  3 +
  4 +4.5.6
  5 + - [Fix] `new Date(new Date())` should work in IE 8 (#389)
  6 + - [Tests] on `node` `v5.7`
  7 + - [Dev Deps] update `uglify-js`
  8 +
  9 +4.5.5
  10 + - [Fix] Adobe Photoshop’s JS engine bizarrely can have `+date !== date.getTime()` (#365)
  11 + - [Dev Deps] update `eslint`
  12 + - [Refactor] Update `is-callable` implementation to match latest
  13 + - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `jscs`
  14 +
  15 +4.5.4
  16 + - [Fix] careless error from 5cf99aca49e59bae03b5d542381424bb1b13ec42
  17 +
  18 +4.5.3
  19 + - [Fix] Saturday is a day in the week (#386)
  20 + - [Robustness] improve Function#bind (#381)
  21 + - [Tests] on `node` `v5.6`, `v4.3`
  22 + - [Tests] use json3 (#382)
  23 + - [Dev Deps] update `eslint`, `@ljharb/eslint-config`
  24 + - [Docs] add note about script order (#379)
  25 +
  26 +4.5.2
  27 + - [shim: fix] use `Array#slice`, not `String#slice`, on `String#split` output (#380)
  28 +
  29 +4.5.1
  30 + - [Fix] Make sure preexisting + broken `Array#` methods that throw don’t break the runtime (#377)
  31 + - [Dev Deps] update `jscs`
  32 +
  33 +4.5.0
  34 + - [New] `parseFloat('-0')` should return -0 in Opera 12 (#371)
  35 + - [New] Provide and replace Date UTC methods (#360)
  36 + - [Robustness] cache `Date` getUTC* methods so that `Date#toISOString` doesn’t observably look them up on the receiver
  37 + - [Robustness] use a cached and shimmed `String#trim`
  38 + - [Tests] up to `node` `v5.5`
  39 + - [Tests] add `parallelshell` and use it in a few tasks
  40 + - [Refactor] rename cached methods to avoid linter warnings
  41 + - [Dev Deps] update `eslint`, `jscs`, '@ljharb/eslint-config'
  42 + - [Docs] Update license year to 2016 (#374)
  43 +
  44 +4.4.2
  45 + - [shim: fix] use `Array#slice`, not `String#slice`, on `String#split` output (#380)
  46 +
  47 +4.4.1
  48 + - [Fix] ensure that IE 11 in compatibility mode doesn't throw (#370)
  49 + - [Docs] add missing shimmed things
  50 +
  51 +4.4.0
  52 + - [New] Detect and patch `RegExp#toString` in IE 8, which returns flags in the wrong order (#364)
  53 + - [Fix] Patch `Array#sort` on {Chrome, Safari, IE < 9, FF 4} that throws improperly, per ES5 (#354)
  54 + - [Fix] In IE 6, `window.external` makes `Object.keys` throw
  55 + - [Fix] `Array#slice`: boxed string access on IE <= 8 (#349)
  56 + - [Fix] `Array#join`: fix IE 6-8 join called on string literal (#352)
  57 + - [Fix] Ensure that `Error#message` and `Error#name` are non-enumerable (#358)
  58 + - [Fix: sham] `Object.getOwnPropertyDescriptor`: In Opera 11.6, `propertyIsEnumerable` is a nonshadowable global, like `toString`
  59 + - [Robustness] Use a bound form of `Array#slice.call`
  60 + - [Tests] Properly check for descriptor support in IE <= 8
  61 + - [Tests] on `node` `v5.1`
  62 + - [Tests] Add `Array#slice` tests (#346)
  63 + - [Dev Deps] update `uglify-js`, `eslint`, `jscs`, `uglify-js`, `semver`
  64 + - [Docs] Fix broken UMD links (#344)
  65 +
  66 +4.3.2
  67 + - [shim: fix] use `Array#slice`, not `String#slice`, on `String#split` output (#380)
  68 +
  69 +4.3.1
  70 + - [Fix] `String#split`: revert part of dcce96ae21185a69d2d40e67416e7496b73e8e47 which broke in older browsers (#342)
  71 + - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `jscs`
  72 + - [Tests] Firefox allows `Number#toPrecision` values of [1,100], which the spec permits
  73 +
  74 +4.3.0
  75 + - [New] `Array#push`: in IE <= 7, `Array#push` was not generic (#336)
  76 + - [New] `Array#push` in Opera `10.6` has a super weird bug when pushing `undefined`
  77 + - [New] `Array#join`: In IE <= 7, passing `undefined` didn't use the default separator (#333)
  78 + - [New] `Error#toString`: prints out the proper message in IE 7 and below (#334)
  79 + - [New] `Number#toPrecision`: IE 7 and below incorrectly throw when an explicit `undefined` precision is passed (#340)
  80 + - [Fix] `String#lastIndexOf`: ensure the correct length in IE 8
  81 + - [Fix] ensure `parseInt` accepts negative and plus-prefixed hex values (#332)
  82 + - [Robustness] Use a bound `Array#push` instead of relying on `Function#call`
  83 + - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `jscs`
  84 + - [Tests] Add some conditionals to avoid impossible-to-fix test failures in IE 6-8, due to it being unable to distinguish between `undefined` and an absent index (#114)
  85 + - [Tests] Fix false negatives in IE 6-8 with jasmine comparing arrays to arraylikes (#114)
  86 + - [Tests] add additional `Array#shift` tests (#337)
  87 + - [Tests] Add additional `Array#splice` tests (#339)
  88 + - [Tests] Add `Array#pop` tests, just in case (#338)
  89 + - [Tests] include `global` tests in HTML test files
  90 + - [Tests] Make sure the HTML tests run with the right charset
  91 + - [Tests] ensure `node` `v0.8` tests stay passing.
  92 + - [Tests] Prevent nondeterminism in the tests - this sometime produced values that are one ms off
  93 + - [Tests] on `node` `v5.0`
  94 + - [Tests] fix npm upgrades for older nodes
  95 +
  96 +4.2.1
  97 + - [shim: fix] use `Array#slice`, not `String#slice`, on `String#split` output (#380)
  98 +
  99 +4.2.0
  100 + - [shim: new] Overwrite `String#lastIndexOf` in IE 9, 10, 11, and Edge, so it has proper unicode support.
  101 + - [Dev Deps] update `eslint`, `jscs`
  102 +
  103 +4.1.16
  104 + - [shim: fix] use `Array#slice`, not `String#slice`, on `String#split` output (#380)
  105 +
  106 +4.1.15
  107 + - [shim: fix] new Date + Date.parse: Fix a Safari 8 & 9 bug where the `ms` arg is treated as a signed instead of unsigned int (#329)
  108 + - [shim: fix] add 'frame' to blacklisted keys (#330)
  109 + - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `jscs`, `uglify-js`
  110 + - [Tests] on `node` `v4.2`
  111 + - [Tests] Date: prevent nondeterminism in the tests - this sometime produced values that are one ms off
  112 +
  113 +4.1.14
  114 + - [shim: fix] Wrap more things in a try/catch, because IE sucks and sometimes throws on [[Get]] of window.localStorage (#327)
  115 + - [Refactor] Use `ES.ToUint32` instead of inline `>>>`
  116 + - [Tests] up to `node` `v4.1`
  117 + - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `semver`, `jscs`
  118 +
  119 +4.1.13
  120 + - [shim: fix] Fix a bug where `Date(x)` threw instead of equalling `String(Date(x))` (#326)
  121 +
  122 +4.1.12
  123 + - [fix] Make sure uglify doesn't remove function names
  124 + - [shim: fix] Use `is-arguments` implementation; don't call down legacy code path in modern engines (#325)
  125 + - [Tests] up to `io.js` `v3.3`
  126 + - [Dev Deps] update `eslint`, `@ljharb/eslint-config`
  127 +
  128 +4.1.11
  129 + - [shim: fix] Object.keys in Safari 9 has some bugs. (Already fixed in Webkit Nightly)
  130 + - [shim: fix] Omit !Date.parse check in the if statement (#323)
  131 + - [sham: fix] Fix Object.create sham to not set __proto__ (#301)
  132 + - [sham: fix] Add a typeof check to Object.getPrototypeOf (#319, #320)
  133 + - [Tests] up to `io.js` `v3.1`
  134 + - [Tests] Make sure `Object.getPrototypeOf` tests don't fail when engines implement ES6 semantics
  135 + - [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG (#318)
  136 + - [Dev Deps] Update `eslint`, `uglify-js`, `jscs`; use my personal shared `eslint` config
  137 +
  138 +4.1.10
  139 + - [Fix] Fix IE 8 issue with `window.frameElement` access in a child iframe (#322)
  140 + - [Tests] Consolidating `Date.parse` extended year tests
  141 + - [Tests] Account for a `Date.parse` precision variance in Safari 8
  142 + - [Tests] DRY up some Date.parse tests
  143 + - [Tests] Don't create globals in Date tests
  144 + - [Tests] Better failure output when an invalid date's toJSON throws
  145 + - [Tests] Also compare lengths of array-likes
  146 + - [Tests] Extra check on Object.keys(arguments)
  147 + - [Tests] Skip appropriate tests when objects aren't extensible/freezeable/sealable
  148 +
  149 +4.1.9
  150 + - [Fix] Remove "extended", add "unicode" in `String#split` shim, to match ES6
  151 + - [Fix] Object.keys: Preserve the IE 8 dontEnum bugfix, and the automation equality bugfix.
  152 + - [Fix] Object.keys: Prevent a deprecation message from showing up in Chrome.
  153 + - [Performance] Speed up blacklisted key check for Object.keys automation equality bug.
  154 + - [Tests] Test on `io.js` `v2.4`
  155 + - [Dev Deps] Update `eslint`, `semver`
  156 +
  157 +4.1.8
  158 + - [Fix] Fix an `Object.keys` IE 8 bug where `localStorage.prototype.constructor === localStorage` would throw (#275)
  159 + - [Fix] Shimmed `Object.defineProperty` should not throw for an empty descriptor (#315)
  160 + - [Fix] Fix `Date#toISOString` in Safari 5.1 (#243)
  161 + - [Fix] Use `Object#propertyIsEnumerable` to default the initial "enumerable" value in `Object.getOwnPropertyDescriptor` sham (#289)
  162 + - [Fix] Fix `Array#splice` with large sparse arrays in Safari 7/8, and Opera 12.15 (#295)
  163 + - [Robustness] Safely use and reference many builtins internally (also see #313)
  164 + - [Tests] Add `Date#{getUTCDate,getUTCMonth}` tests to expose Opera 10.6/11.61/12 `Date` bugs
  165 + - [Dev Deps] Update `eslint`
  166 +
  167 +4.1.7
  168 + - Make sure `Date.parse` is not enumerable (#310)
  169 +
  170 +4.1.6
  171 + - Support IE 8 when `document.domain` is set (#306, #150)
  172 + - Remove version from `bower.json` (#307)
  173 +
  174 +4.1.5
  175 + - Add a failing runtime check for Safari 8 `Date.parse`
  176 + - Update `eslint`, `semver`
  177 + - Test on `io.js` `v2.2`
  178 +
  179 +4.1.4
  180 + - Make sure copied `Date` properties remain non-enumerable.
  181 + - Using a more reliable check for supported property descriptors in non-IE ES3
  182 + - Fix 'constructor' in Object.defineProperties sham in ES3 (#252, #305)
  183 + - Use a reference to `Array#concat` rather than relying on the runtime environment's `concat`.
  184 + - Test on `io.js` `v2.1`
  185 + - Clean up `Array.prototype` iteration methods
  186 +
  187 +4.1.3
  188 + - Update `license` in `package.json` per https://docs.npmjs.com/files/package.json#license
  189 + - Update `uglify-js`, `eslint`
  190 +
  191 +4.1.2
  192 + - In IE 6-8, `Date` inside the function expression does not reference `DateShim` (#303)
  193 + - Date: Ensure all code paths have the correct `constructor` property
  194 + - Date: Don't copy non-own properties from original `Date`
  195 + - Test up to `io.js` `v2.0.0`
  196 + - Simplify `isPrimitive` check.
  197 + - Adding sanity check tests for ES5 `Number` constants.
  198 + - Update `uglify-js`, `eslint`, `semver`
  199 +
  200 +4.1.1
  201 + - Fix name of `parseInt` replacement.
  202 + - Update copyright year
  203 + - Update `eslint`, `jscs`
  204 + - Lock `uglify-js` down to v2.4.17, since v2.4.18 and v2.4.19 have a breaking change.
  205 + - All grade A-supported `node`/`iojs` versions now ship with an `npm` that understands `^`.
  206 + - Run `travis-ci` tests on latest `node` and `iojs`; speed up builds; allow 0.8 failures.
  207 + - Ensure some Object tests don't fail in ES6
  208 + - Make sure `Date` instances don't have an enumerable `constructor` property, when possible.
  209 +
  210 +4.1.0
  211 + - Update `eslint`
  212 + - Improve type checks: `Array.isArray`, `isRegex`
  213 + - Replace `isRegex`/`isString`/`isCallable` checks with inlined versions from npm modules
  214 + - Note which ES abstract methods are replaceable via `es-abstract`
  215 + - Run `travis-ci` tests on `iojs`!
  216 +
  217 +4.0.6
  218 + - Update `jscs`, `uglify-js`, add `eslint`
  219 + - es5-sham: fix Object.defineProperty to not check for own properties (#211)
  220 + - Fix Array#splice bug in Safari 5 (#284)
  221 + - Fix `Object.keys` issue with boxed primitives with extra properties in older browsers. (#242, #285)
  222 +
  223 +4.0.5
  224 + - Update `jscs` so tests pass
  225 +
  226 +4.0.4
  227 + - Style/indentation/whitespace cleanups.
  228 + - README tweaks
  229 +
  230 +4.0.3
  231 + - Fix keywords (#268)
  232 + - add some Date tests
  233 + - Note in README that the es5-sham requires the es5-shim (https://github.com/es-shims/es5-shim/issues/256#issuecomment-52875710)
  234 +
  235 +4.0.2
  236 + - Start including version numbers in minified files (#267)
  237 +
  238 +4.0.1
  239 + - Fix legacy arguments object detection in Object.keys (#260)
  240 +
  241 +4.0.0
  242 + - No longer shim the ES5-spec behavior of splice when `deleteCount` is omitted - since no engines implement it, and ES6 changes it. (#255)
  243 + - Use Object.defineProperty where available, so that polyfills are non-enumerable when possible (#250)
  244 + - lots of internal refactoring
  245 + - Fixed a bug referencing String#indexOf and String#lastIndexOf before polyfilling it (#253, #254)
  246 +
  247 +3.4.0
  248 + - Removed nonstandard SpiderMonkey extension to Array#splice - when `deleteCount` is omitted, it's now treated as 0. (#192, #239)
  249 + - Fix Object.keys with Arguments objects in Safari 5.0
  250 + - Now shimming String#split in Opera 10.6
  251 + - Avoid using "toString" as a variable name, since that breaks Opera
  252 + - Internal implementation and test cleanups
  253 +
  254 +3.3.2
  255 + - Remove an internal "bind" call, which should make the shim a bit faster
  256 + - Fix a bug with object boxing in Array#reduceRight that was failing a test in IE 6
  257 +
  258 +3.3.1
  259 + - Fixing an Array#splice bug in IE 6/7
  260 + - cleaning up Array#splice tests
  261 +
  262 +3.3.0
  263 + - Fix Array#reduceRight in node 0.6 and older browsers (#238)
  264 +
  265 +3.2.0
  266 + - Fix es5-sham UMD definition to work properly with AMD (#237)
  267 + - Ensure that Array methods do not autobox context in strict mode (#233)
  268 +
  269 +3.1.1
  270 + - Update minified files (#231)
  271 +
  272 +3.1.0
  273 + - Fix String#replace in Firefox up through 29 (#228)
  274 +
  275 +3.0.2
  276 + - Fix `Function#bind` in IE 7 and 8 (#224, #225, #226)
  277 +
  278 +3.0.1
  279 + - Version bump to ensure npm has newest minified assets
  280 +
  281 +3.0.0
  282 + - es5-sham: fix `Object.getPrototypeOf` and `Object.getOwnPropertyDescriptor` for Opera Mini
  283 + - Better override noncompliant native ES5 methods: `Array#forEach`, `Array#map`, `Array#filter`, `Array#every`, `Array#some`, `Array#reduce`, `Date.parse`, `String#trim`
  284 + - Added spec-compliant shim for `parseInt`
  285 + - Ensure `Object.keys` handles more edge cases with `arguments` objects and boxed primitives
  286 + - Improve minification of builds
  287 +
  288 +2.3.0
  289 + - parseInt is now properly shimmed in ES3 browsers to default the radix
  290 + - update URLs to point to the new organization
  291 +
  292 +2.2.0
  293 + - Function.prototype.bind shim now reports correct length on a bound function
  294 + - fix node 0.6.x v8 bug in Array#forEach
  295 + - test improvements
  296 +
  297 +2.1.0
  298 + - Object.create fixes
  299 + - tweaks to the Object.defineProperties shim
  300 +
  301 +2.0.0
  302 + - Separate reliable shims from dubious shims (shams).
  303 +
  304 +1.2.10
  305 + - Group-effort Style Cleanup
  306 + - Took a stab at fixing Object.defineProperty on IE8 without
  307 + bad side-effects. (@hax)
  308 + - Object.isExtensible no longer fakes it. (@xavierm)
  309 + - Date.prototype.toISOString no longer deals with partial
  310 + ISO dates, per spec (@kitcambridge)
  311 + - More (mostly from @bryanforbes)
  312 +
  313 +1.2.9
  314 + - Corrections to toISOString by @kitcambridge
  315 + - Fixed three bugs in array methods revealed by Jasmine tests.
  316 + - Cleaned up Function.prototype.bind with more fixes and tests from
  317 + @bryanforbes.
  318 +
  319 +1.2.8
  320 + - Actually fixed problems with Function.prototype.bind, and regressions
  321 + from 1.2.7 (@bryanforbes, @jdalton #36)
  322 +
  323 +1.2.7 - REGRESSED
  324 + - Fixed problems with Function.prototype.bind when called as a constructor.
  325 + (@jdalton #36)
  326 +
  327 +1.2.6
  328 + - Revised Date.parse to match ES 5.1 (kitcambridge)
  329 +
  330 +1.2.5
  331 + - Fixed a bug for padding it Date..toISOString (tadfisher issue #33)
  332 +
  333 +1.2.4
  334 + - Fixed a descriptor bug in Object.defineProperty (raynos)
  335 +
  336 +1.2.3
  337 + - Cleaned up RequireJS and <script> boilerplate
  338 +
  339 +1.2.2
  340 + - Changed reduce to follow the letter of the spec with regard to having and
  341 + owning properties.
  342 + - Fixed a bug where RegExps pass as Functions in some engines in reduce.
  343 +
  344 +1.2.1
  345 + - Adding few fixes to make jshint happy.
  346 + - Fix for issue #12, function expressions can cause scoping issues in IE.
  347 + - NPM will minify on install or when `npm run-script install` is executed.
  348 + - Adding .gitignore to avoid publishing dev dependencies.
  349 +
  350 +1.2.0
  351 + - Making script loadable as AMD module.
  352 + - Adding `indexOf` to the list of safe shims.
  353 +
  354 +1.1.0
  355 + - Added support for accessor properties where possible (which is all browsers
  356 + except IE).
  357 + - Stop exposing bound function's (that are returned by
  358 + `Function.prototype.bind`) internal properties (`bound, boundTo, boundArgs`)
  359 + as in some cases (when using facade objects for example) capabilities of the
  360 + enclosed functions will be leaked.
  361 + - `Object.create` now explicitly sets `__proto__` property to guarantee
  362 + correct behavior of `Object.getPrototypeOf`'s on all objects created using
  363 + `Object.create`.
  364 + - Switched to `===` from `==` where possible as it's slightly faster on older
  365 + browsers that are target of this lib.
  366 + - Added names to all anonymous functions to have a better stack traces.
  367 +
  368 +1.0.0
  369 + - fixed Date.toISODate, using UTC accessors, as in
  370 + http://code.google.com/p/v8/source/browse/trunk/src/date.js?r=6120#986
  371 + (arian)
  372 +
  373 +0.0.4
  374 + - Revised Object.getPrototypeOf to work in more cases
  375 + in response to http://ejohn.org/blog/objectgetprototypeof/
  376 + [issue #2] (fschaefer)
  377 +
  378 +0.0.3
  379 + - Fixed typos in Object.keys (samsonjs)
  380 +
  381 +0.0.2
  382 + Per kangax's recommendations:
  383 + - faster Object.create(null)
  384 + - fixed a function-scope function declaration statement in Object.create
  385 +
  386 +0.0.1
  387 + - fixed Object.create(null), in so far as that's possible
  388 + - reworked Rhino Object.freeze(Function) bug detector and patcher
  389 +
  390 +0.0.0
  391 + - forked from narwhal-lib
  392 +
  1 +
  2 +- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
  3 +- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal
  4 + Project)
  5 +- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
  6 +- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
  7 +- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
  8 +- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
  9 +- kossnocorp Sasha Koss XXX TODO License or CLA
  10 +- bryanforbes Bryan Forbes XXX TODO License or CLA
  11 +- killdream Quildreen Motta Copyright (C) 2011 MIT Licence
  12 +- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD
  13 + License
  14 +- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
  15 +- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
  16 +- iwyg XXX TODO License or CLA
  17 +- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
  18 +- xavierm02 Montillet Xavier Copyright (C) 2011 MIT License
  19 +- Raynos Jake Verbaten Copyright (C) 2011 MIT Licence
  20 +- samsonjs Sami Samhuri Copyright (C) 2010 MIT License
  21 +- rwldrn Rick Waldron Copyright (C) 2011 MIT License
  22 +- lexer Alexey Zakharov XXX TODO License or CLA
  23 +- 280 North Inc. (Now Motorola LLC, a subsidiary of Google Inc.)
  24 + Copyright (C) 2009 MIT License
  25 +- Steven Levithan Copyright (C) 2012 MIT License
  26 +- Jordan Harband (C) 2013 MIT License
  27 +
  1 +The MIT License (MIT)
  2 +
  3 +Copyright (C) 2009-2016 Kristopher Michael Kowal and contributors
  4 +
  5 +Permission is hereby granted, free of charge, to any person obtaining a copy
  6 +of this software and associated documentation files (the "Software"), to deal
  7 +in the Software without restriction, including without limitation the rights
  8 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9 +copies of the Software, and to permit persons to whom the Software is
  10 +furnished to do so, subject to the following conditions:
  11 +
  12 +The above copyright notice and this permission notice shall be included in
  13 +all copies or substantial portions of the Software.
  14 +
  15 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21 +THE SOFTWARE.
  22 +
  1 +# Since we rely on paths relative to the makefile location, abort if make isn't being run from there.
  2 +$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in))
  3 +
  4 + # The files that need updating when incrementing the version number.
  5 +VERSIONED_FILES := *.js *.json *.map README*
  6 +
  7 +
  8 +# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly.
  9 +# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment
  10 +# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests.
  11 +export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH")
  12 +UTILS := semver
  13 +# Make sure that all required utilities can be located.
  14 +UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS)))
  15 +
  16 +# Default target (by virtue of being the first non '.'-prefixed in the file).
  17 +.PHONY: _no-target-specified
  18 +_no-target-specified:
  19 + $(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests)
  20 +
  21 +# Lists all targets defined in this makefile.
  22 +.PHONY: list
  23 +list:
  24 + @$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | command grep -v -e '^[^[:alnum:]]' -e '^$@$$command ' | sort
  25 +
  26 +# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS).
  27 +.PHONY: test
  28 +test:
  29 + @npm test
  30 +
  31 +.PHONY: _ensure-tag
  32 +_ensure-tag:
  33 +ifndef TAG
  34 + $(error Please invoke with `make TAG=<new-version> release`, where <new-version> is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number)
  35 +endif
  36 +
  37 +CHANGELOG_ERROR = $(error No CHANGES specified)
  38 +.PHONY: _ensure-changelog
  39 +_ensure-changelog:
  40 + @ (git status -sb --porcelain | command grep -E '^( M|[MA] ) CHANGES' > /dev/null) || (echo no CHANGES specified && exit 2)
  41 +
  42 +# Ensures that the git workspace is clean.
  43 +.PHONY: _ensure-clean
  44 +_ensure-clean:
  45 + @[ -z "$$((git status --porcelain --untracked-files=no || echo err) | command grep -v 'CHANGES')" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; }
  46 +
  47 +# Makes a release; invoke with `make TAG=<versionOrIncrementSpec> release`.
  48 +.PHONY: release
  49 +release: _ensure-tag _ensure-changelog _ensure-clean
  50 + @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \
  51 + new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \
  52 + if printf "$$new_ver" | command grep -q '^[0-9]'; then \
  53 + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \
  54 + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \
  55 + else \
  56 + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \
  57 + fi; \
  58 + printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \
  59 + npm run minify; \
  60 + replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \
  61 + replace "blob/master" "blob/v$$new_ver" -- *.min.js && \
  62 + git commit -m "v$$new_ver" $(VERSIONED_FILES) CHANGES && \
  63 + git tag -a -m "v$$new_ver" "v$$new_ver"
  1 +#es5-shim <sup>[![Version Badge][npm-version-svg]][npm-url]</sup>
  2 +
  3 +[![npm badge][npm-badge-png]][npm-url]
  4 +
  5 +[![Build Status][travis-svg]][travis-url]
  6 +[![dependency status][deps-svg]][deps-url]
  7 +[![dev dependency status][dev-deps-svg]][dev-deps-url]
  8 +
  9 +`es5-shim.js` and `es5-shim.min.js` monkey-patch a JavaScript context to
  10 +contain all EcmaScript 5 methods that can be faithfully emulated with a
  11 +legacy JavaScript engine.
  12 +**Note:** As `es5-shim.js` is designed to patch the native Javascript
  13 +engine, it should be the library that is loaded first.
  14 +
  15 +`es5-sham.js` and `es5-sham.min.js` monkey-patch other ES5 methods as
  16 +closely as possible. For these methods, as closely as possible to ES5
  17 +is not very close. Many of these shams are intended only to allow code
  18 +to be written to ES5 without causing run-time errors in older engines.
  19 +In many cases, this means that these shams cause many ES5 methods to
  20 +silently fail. Decide carefully whether this is what you want.
  21 +**Note:** `es5-sham.js` requires `es5-shim.js` to be able to work properly.
  22 +
  23 +
  24 +## Tests
  25 +
  26 +The tests are written with the Jasmine BDD test framework.
  27 +To run the tests, navigate to <root-folder>/tests/ , or,
  28 +simply `npm install` and `npm test`.
  29 +
  30 +## Shims
  31 +
  32 +### Complete tests ###
  33 +
  34 +* Array.prototype.every
  35 +* Array.prototype.filter
  36 +* Array.prototype.forEach
  37 +* Array.prototype.indexOf
  38 +* Array.prototype.lastIndexOf
  39 +* Array.prototype.map
  40 +* Array.prototype.slice
  41 +* Array.prototype.some
  42 +* Array.prototype.sort
  43 +* Array.prototype.reduce
  44 +* Array.prototype.reduceRight
  45 +* Array.prototype.push
  46 +* Array.prototype.join
  47 +* Array.isArray
  48 +* Date.now
  49 +* Date.prototype.toJSON
  50 +* Function.prototype.bind
  51 + * :warning: Caveat: the bound function has a prototype property.
  52 + * :warning: Caveat: bound functions do not try too hard to keep you
  53 + from manipulating their ``arguments`` and ``caller`` properties.
  54 + * :warning: Caveat: bound functions don't have checks in ``call`` and
  55 + ``apply`` to avoid executing as a constructor.
  56 +* Number.prototype.toFixed
  57 +* Number.prototype.toPrecision
  58 +* Object.keys
  59 +* String.prototype.split
  60 +* String.prototype.trim
  61 +* String.prototype.lastIndexOf
  62 +* String.prototype.replace
  63 + * Firefox (through v29) natively handles capturing groups incorrectly.
  64 +* Date.parse (for ISO parsing)
  65 +* Date.prototype.toISOString
  66 +* parseInt
  67 +* parseFloat
  68 +* Error.prototype.toString
  69 +* Error.prototype.name
  70 +* Error.prototype.message
  71 +* RegExp.prototype.toString
  72 +
  73 +## Shams
  74 +
  75 +* :warning: Object.create
  76 +
  77 + For the case of simply "begetting" an object that inherits
  78 + prototypically from another, this should work fine across legacy
  79 + engines.
  80 +
  81 + :warning: The second argument is passed to Object.defineProperties
  82 + which will probably fail either silently or with extreme prejudice.
  83 +
  84 +* :warning: Object.getPrototypeOf
  85 +
  86 + This will return "undefined" in some cases. It uses `__proto__` if
  87 + it's available. Failing that, it uses constructor.prototype, which
  88 + depends on the constructor property of the object's prototype having
  89 + not been replaced. If your object was created like this, it won't
  90 + work:
  91 +
  92 + function Foo() {
  93 + }
  94 + Foo.prototype = {};
  95 +
  96 + Because the prototype reassignment destroys the constructor
  97 + property.
  98 +
  99 + This will work for all objects that were created using
  100 + `Object.create` implemented with this library.
  101 +
  102 +* :warning: Object.getOwnPropertyNames
  103 +
  104 + This method uses Object.keys, so it will not be accurate on legacy
  105 + engines.
  106 +
  107 +* Object.isSealed
  108 +
  109 + Returns "false" in all legacy engines for all objects, which is
  110 + conveniently guaranteed to be accurate.
  111 +
  112 +* Object.isFrozen
  113 +
  114 + Returns "false" in all legacy engines for all objects, which is
  115 + conveniently guaranteed to be accurate.
  116 +
  117 +* Object.isExtensible
  118 +
  119 + Works like a charm, by trying very hard to extend the object then
  120 + redacting the extension.
  121 +
  122 +### May fail
  123 +
  124 +* :warning: Object.getOwnPropertyDescriptor
  125 +
  126 + The behavior of this shim does not conform to ES5. It should
  127 + probably not be used at this time, until its behavior has been
  128 + reviewed and been confirmed to be useful in legacy engines.
  129 +
  130 +* :warning: Object.defineProperty
  131 +
  132 + In the worst of circumstances, IE 8 provides a version of this
  133 + method that only works on DOM objects. This sham will not be
  134 + installed. The given version of `defineProperty` will throw an
  135 + exception if used on non-DOM objects.
  136 +
  137 + In slightly better circumstances, this method will silently fail to
  138 + set "writable", "enumerable", and "configurable" properties.
  139 +
  140 + Providing a getter or setter with "get" or "set" on a descriptor
  141 + will silently fail on engines that lack "__defineGetter__" and
  142 + "__defineSetter__", which include all versions of IE.
  143 +
  144 + https://github.com/es-shims/es5-shim/issues#issue/5
  145 +
  146 +* :warning: Object.defineProperties
  147 +
  148 + This uses the Object.defineProperty shim.
  149 +
  150 +* Object.seal
  151 +
  152 + Silently fails on all legacy engines. This should be
  153 + fine unless you are depending on the safety and security
  154 + provisions of this method, which you cannot possibly
  155 + obtain in legacy engines.
  156 +
  157 +* Object.freeze
  158 +
  159 + Silently fails on all legacy engines. This should be
  160 + fine unless you are depending on the safety and security
  161 + provisions of this method, which you cannot possibly
  162 + obtain in legacy engines.
  163 +
  164 +* Object.preventExtensions
  165 +
  166 + Silently fails on all legacy engines. This should be
  167 + fine unless you are depending on the safety and security
  168 + provisions of this method, which you cannot possibly
  169 + obtain in legacy engines.
  170 +
  171 +### Example of applying ES compatability shims in a browser project
  172 +
  173 +```html
  174 +<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
  175 +<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-sham.min.js"></script>
  176 +<script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
  177 +<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-shim.min.js"></script>
  178 +<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.2/es6-sham.min.js"></script>
  179 +<script src="https://wzrd.in/standalone/es7-shim@latest"></script>
  180 +<script src="other-libs.js"></script>
  181 +```
  182 +[npm-url]: https://npmjs.org/package/es5-shim
  183 +[npm-version-svg]: http://versionbadg.es/es-shims/es5-shim.svg
  184 +[travis-svg]: https://travis-ci.org/es-shims/es5-shim.svg
  185 +[travis-url]: https://travis-ci.org/es-shims/es5-shim
  186 +[deps-svg]: https://david-dm.org/es-shims/es5-shim.svg
  187 +[deps-url]: https://david-dm.org/es-shims/es5-shim
  188 +[dev-deps-svg]: https://david-dm.org/es-shims/es5-shim/dev-status.svg
  189 +[dev-deps-url]: https://david-dm.org/es-shims/es5-shim#info=devDependencies
  190 +[npm-badge-png]: https://nodei.co/npm/es5-shim.png?downloads=true&stars=true
  1 +{
  2 + "name": "es5-shim",
  3 + "main": "es5-shim.js",
  4 + "repository": {
  5 + "type": "git",
  6 + "url": "git://github.com/es-shims/es5-shim"
  7 + },
  8 + "homepage": "https://github.com/es-shims/es5-shim",
  9 + "authors": [
  10 + "Kris Kowal <kris@cixar.com> (http://github.com/kriskowal/)",
  11 + "Sami Samhuri <sami.samhuri@gmail.com> (http://samhuri.net/)",
  12 + "Florian Schäfer <florian.schaefer@gmail.com> (http://github.com/fschaefer)",
  13 + "Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)",
  14 + "Kit Cambridge <kitcambridge@gmail.com> (http://kitcambridge.github.com)",
  15 + "Jordan Harband <ljharb@gmail.com> (https://github.com/ljharb/)"
  16 + ],
  17 + "description": "ECMAScript 5 compatibility shims for legacy JavaScript engines",
  18 + "keywords": [
  19 + "shim",
  20 + "es5",
  21 + "es5 shim",
  22 + "javascript",
  23 + "ecmascript",
  24 + "polyfill"
  25 + ],
  26 + "license": "MIT",
  27 + "ignore": [
  28 + "**/.*",
  29 + "node_modules",
  30 + "bower_components",
  31 + "tests"
  32 + ]
  33 +}
  1 +{
  2 + "name": "es5-shim",
  3 + "repo": "es-shims/es5-shim",
  4 + "description": "ECMAScript 5 compatibility shims for legacy JavaScript engines",
  5 + "version": "v4.5.1",
  6 + "keywords": [
  7 + "shim",
  8 + "es5",
  9 + "es5 shim",
  10 + "javascript",
  11 + "ecmascript",
  12 + "polyfill"
  13 + ],
  14 + "license": "MIT",
  15 + "main": "es5-shim.js",
  16 + "scripts": [
  17 + "es5-shim.js"
  18 + ]
  19 +}
  1 +/*!
  2 + * https://github.com/es-shims/es5-shim
  3 + * @license es5-shim Copyright 2009-2015 by contributors, MIT License
  4 + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE
  5 + */
  6 +
  7 +// vim: ts=4 sts=4 sw=4 expandtab
  8 +
  9 +// Add semicolon to prevent IIFE from being passed as argument to concatenated code.
  10 +;
  11 +
  12 +// UMD (Universal Module Definition)
  13 +// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js
  14 +(function (root, factory) {
  15 + 'use strict';
  16 +
  17 + /* global define, exports, module */
  18 + if (typeof define === 'function' && define.amd) {
  19 + // AMD. Register as an anonymous module.
  20 + define(factory);
  21 + } else if (typeof exports === 'object') {
  22 + // Node. Does not work with strict CommonJS, but
  23 + // only CommonJS-like enviroments that support module.exports,
  24 + // like Node.
  25 + module.exports = factory();
  26 + } else {
  27 + // Browser globals (root is window)
  28 + root.returnExports = factory();
  29 + }
  30 +}(this, function () {
  31 +
  32 +var call = Function.call;
  33 +var prototypeOfObject = Object.prototype;
  34 +var owns = call.bind(prototypeOfObject.hasOwnProperty);
  35 +var isEnumerable = call.bind(prototypeOfObject.propertyIsEnumerable);
  36 +var toStr = call.bind(prototypeOfObject.toString);
  37 +
  38 +// If JS engine supports accessors creating shortcuts.
  39 +var defineGetter;
  40 +var defineSetter;
  41 +var lookupGetter;
  42 +var lookupSetter;
  43 +var supportsAccessors = owns(prototypeOfObject, '__defineGetter__');
  44 +if (supportsAccessors) {
  45 + /* eslint-disable no-underscore-dangle */
  46 + defineGetter = call.bind(prototypeOfObject.__defineGetter__);
  47 + defineSetter = call.bind(prototypeOfObject.__defineSetter__);
  48 + lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
  49 + lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
  50 + /* eslint-enable no-underscore-dangle */
  51 +}
  52 +
  53 +// ES5 15.2.3.2
  54 +// http://es5.github.com/#x15.2.3.2
  55 +if (!Object.getPrototypeOf) {
  56 + // https://github.com/es-shims/es5-shim/issues#issue/2
  57 + // http://ejohn.org/blog/objectgetprototypeof/
  58 + // recommended by fschaefer on github
  59 + //
  60 + // sure, and webreflection says ^_^
  61 + // ... this will nerever possibly return null
  62 + // ... Opera Mini breaks here with infinite loops
  63 + Object.getPrototypeOf = function getPrototypeOf(object) {
  64 + /* eslint-disable no-proto */
  65 + var proto = object.__proto__;
  66 + /* eslint-enable no-proto */
  67 + if (proto || proto === null) {
  68 + return proto;
  69 + } else if (toStr(object.constructor) === '[object Function]') {
  70 + return object.constructor.prototype;
  71 + } else if (object instanceof Object) {
  72 + return prototypeOfObject;
  73 + } else {
  74 + // Correctly return null for Objects created with `Object.create(null)`
  75 + // (shammed or native) or `{ __proto__: null}`. Also returns null for
  76 + // cross-realm objects on browsers that lack `__proto__` support (like
  77 + // IE <11), but that's the best we can do.
  78 + return null;
  79 + }
  80 + };
  81 +}
  82 +
  83 +// ES5 15.2.3.3
  84 +// http://es5.github.com/#x15.2.3.3
  85 +
  86 +var doesGetOwnPropertyDescriptorWork = function doesGetOwnPropertyDescriptorWork(object) {
  87 + try {
  88 + object.sentinel = 0;
  89 + return Object.getOwnPropertyDescriptor(object, 'sentinel').value === 0;
  90 + } catch (exception) {
  91 + return false;
  92 + }
  93 +};
  94 +
  95 +// check whether getOwnPropertyDescriptor works if it's given. Otherwise, shim partially.
  96 +if (Object.defineProperty) {
  97 + var getOwnPropertyDescriptorWorksOnObject = doesGetOwnPropertyDescriptorWork({});
  98 + var getOwnPropertyDescriptorWorksOnDom = typeof document === 'undefined' ||
  99 + doesGetOwnPropertyDescriptorWork(document.createElement('div'));
  100 + if (!getOwnPropertyDescriptorWorksOnDom || !getOwnPropertyDescriptorWorksOnObject) {
  101 + var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor;
  102 + }
  103 +}
  104 +
  105 +if (!Object.getOwnPropertyDescriptor || getOwnPropertyDescriptorFallback) {
  106 + var ERR_NON_OBJECT = 'Object.getOwnPropertyDescriptor called on a non-object: ';
  107 +
  108 + /* eslint-disable no-proto */
  109 + Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
  110 + if ((typeof object !== 'object' && typeof object !== 'function') || object === null) {
  111 + throw new TypeError(ERR_NON_OBJECT + object);
  112 + }
  113 +
  114 + // make a valiant attempt to use the real getOwnPropertyDescriptor
  115 + // for I8's DOM elements.
  116 + if (getOwnPropertyDescriptorFallback) {
  117 + try {
  118 + return getOwnPropertyDescriptorFallback.call(Object, object, property);
  119 + } catch (exception) {
  120 + // try the shim if the real one doesn't work
  121 + }
  122 + }
  123 +
  124 + var descriptor;
  125 +
  126 + // If object does not owns property return undefined immediately.
  127 + if (!owns(object, property)) {
  128 + return descriptor;
  129 + }
  130 +
  131 + // If object has a property then it's for sure `configurable`, and
  132 + // probably `enumerable`. Detect enumerability though.
  133 + descriptor = {
  134 + enumerable: isEnumerable(object, property),
  135 + configurable: true
  136 + };
  137 +
  138 + // If JS engine supports accessor properties then property may be a
  139 + // getter or setter.
  140 + if (supportsAccessors) {
  141 + // Unfortunately `__lookupGetter__` will return a getter even
  142 + // if object has own non getter property along with a same named
  143 + // inherited getter. To avoid misbehavior we temporary remove
  144 + // `__proto__` so that `__lookupGetter__` will return getter only
  145 + // if it's owned by an object.
  146 + var prototype = object.__proto__;
  147 + var notPrototypeOfObject = object !== prototypeOfObject;
  148 + // avoid recursion problem, breaking in Opera Mini when
  149 + // Object.getOwnPropertyDescriptor(Object.prototype, 'toString')
  150 + // or any other Object.prototype accessor
  151 + if (notPrototypeOfObject) {
  152 + object.__proto__ = prototypeOfObject;
  153 + }
  154 +
  155 + var getter = lookupGetter(object, property);
  156 + var setter = lookupSetter(object, property);
  157 +
  158 + if (notPrototypeOfObject) {
  159 + // Once we have getter and setter we can put values back.
  160 + object.__proto__ = prototype;
  161 + }
  162 +
  163 + if (getter || setter) {
  164 + if (getter) {
  165 + descriptor.get = getter;
  166 + }
  167 + if (setter) {
  168 + descriptor.set = setter;
  169 + }
  170 + // If it was accessor property we're done and return here
  171 + // in order to avoid adding `value` to the descriptor.
  172 + return descriptor;
  173 + }
  174 + }
  175 +
  176 + // If we got this far we know that object has an own property that is
  177 + // not an accessor so we set it as a value and return descriptor.
  178 + descriptor.value = object[property];
  179 + descriptor.writable = true;
  180 + return descriptor;
  181 + };
  182 + /* eslint-enable no-proto */
  183 +}
  184 +
  185 +// ES5 15.2.3.4
  186 +// http://es5.github.com/#x15.2.3.4
  187 +if (!Object.getOwnPropertyNames) {
  188 + Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
  189 + return Object.keys(object);
  190 + };
  191 +}
  192 +
  193 +// ES5 15.2.3.5
  194 +// http://es5.github.com/#x15.2.3.5
  195 +if (!Object.create) {
  196 +
  197 + // Contributed by Brandon Benvie, October, 2012
  198 + var createEmpty;
  199 + var supportsProto = !({ __proto__: null } instanceof Object);
  200 + // the following produces false positives
  201 + // in Opera Mini => not a reliable check
  202 + // Object.prototype.__proto__ === null
  203 +
  204 + // Check for document.domain and active x support
  205 + // No need to use active x approach when document.domain is not set
  206 + // see https://github.com/es-shims/es5-shim/issues/150
  207 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  208 + /* global ActiveXObject */
  209 + var shouldUseActiveX = function shouldUseActiveX() {
  210 + // return early if document.domain not set
  211 + if (!document.domain) {
  212 + return false;
  213 + }
  214 +
  215 + try {
  216 + return !!new ActiveXObject('htmlfile');
  217 + } catch (exception) {
  218 + return false;
  219 + }
  220 + };
  221 +
  222 + // This supports IE8 when document.domain is used
  223 + // see https://github.com/es-shims/es5-shim/issues/150
  224 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  225 + var getEmptyViaActiveX = function getEmptyViaActiveX() {
  226 + var empty;
  227 + var xDoc;
  228 +
  229 + xDoc = new ActiveXObject('htmlfile');
  230 +
  231 + var script = 'script';
  232 + xDoc.write('<' + script + '></' + script + '>');
  233 + xDoc.close();
  234 +
  235 + empty = xDoc.parentWindow.Object.prototype;
  236 + xDoc = null;
  237 +
  238 + return empty;
  239 + };
  240 +
  241 + // The original implementation using an iframe
  242 + // before the activex approach was added
  243 + // see https://github.com/es-shims/es5-shim/issues/150
  244 + var getEmptyViaIFrame = function getEmptyViaIFrame() {
  245 + var iframe = document.createElement('iframe');
  246 + var parent = document.body || document.documentElement;
  247 + var empty;
  248 +
  249 + iframe.style.display = 'none';
  250 + parent.appendChild(iframe);
  251 + /* eslint-disable no-script-url */
  252 + iframe.src = 'javascript:';
  253 + /* eslint-enable no-script-url */
  254 +
  255 + empty = iframe.contentWindow.Object.prototype;
  256 + parent.removeChild(iframe);
  257 + iframe = null;
  258 +
  259 + return empty;
  260 + };
  261 +
  262 + /* global document */
  263 + if (supportsProto || typeof document === 'undefined') {
  264 + createEmpty = function () {
  265 + return { __proto__: null };
  266 + };
  267 + } else {
  268 + // In old IE __proto__ can't be used to manually set `null`, nor does
  269 + // any other method exist to make an object that inherits from nothing,
  270 + // aside from Object.prototype itself. Instead, create a new global
  271 + // object and *steal* its Object.prototype and strip it bare. This is
  272 + // used as the prototype to create nullary objects.
  273 + createEmpty = function () {
  274 + // Determine which approach to use
  275 + // see https://github.com/es-shims/es5-shim/issues/150
  276 + var empty = shouldUseActiveX() ? getEmptyViaActiveX() : getEmptyViaIFrame();
  277 +
  278 + delete empty.constructor;
  279 + delete empty.hasOwnProperty;
  280 + delete empty.propertyIsEnumerable;
  281 + delete empty.isPrototypeOf;
  282 + delete empty.toLocaleString;
  283 + delete empty.toString;
  284 + delete empty.valueOf;
  285 +
  286 + var Empty = function Empty() {};
  287 + Empty.prototype = empty;
  288 + // short-circuit future calls
  289 + createEmpty = function () {
  290 + return new Empty();
  291 + };
  292 + return new Empty();
  293 + };
  294 + }
  295 +
  296 + Object.create = function create(prototype, properties) {
  297 +
  298 + var object;
  299 + var Type = function Type() {}; // An empty constructor.
  300 +
  301 + if (prototype === null) {
  302 + object = createEmpty();
  303 + } else {
  304 + if (typeof prototype !== 'object' && typeof prototype !== 'function') {
  305 + // In the native implementation `parent` can be `null`
  306 + // OR *any* `instanceof Object` (Object|Function|Array|RegExp|etc)
  307 + // Use `typeof` tho, b/c in old IE, DOM elements are not `instanceof Object`
  308 + // like they are in modern browsers. Using `Object.create` on DOM elements
  309 + // is...err...probably inappropriate, but the native version allows for it.
  310 + throw new TypeError('Object prototype may only be an Object or null'); // same msg as Chrome
  311 + }
  312 + Type.prototype = prototype;
  313 + object = new Type();
  314 + // IE has no built-in implementation of `Object.getPrototypeOf`
  315 + // neither `__proto__`, but this manually setting `__proto__` will
  316 + // guarantee that `Object.getPrototypeOf` will work as expected with
  317 + // objects created using `Object.create`
  318 + /* eslint-disable no-proto */
  319 + object.__proto__ = prototype;
  320 + /* eslint-enable no-proto */
  321 + }
  322 +
  323 + if (properties !== void 0) {
  324 + Object.defineProperties(object, properties);
  325 + }
  326 +
  327 + return object;
  328 + };
  329 +}
  330 +
  331 +// ES5 15.2.3.6
  332 +// http://es5.github.com/#x15.2.3.6
  333 +
  334 +// Patch for WebKit and IE8 standard mode
  335 +// Designed by hax <hax.github.com>
  336 +// related issue: https://github.com/es-shims/es5-shim/issues#issue/5
  337 +// IE8 Reference:
  338 +// http://msdn.microsoft.com/en-us/library/dd282900.aspx
  339 +// http://msdn.microsoft.com/en-us/library/dd229916.aspx
  340 +// WebKit Bugs:
  341 +// https://bugs.webkit.org/show_bug.cgi?id=36423
  342 +
  343 +var doesDefinePropertyWork = function doesDefinePropertyWork(object) {
  344 + try {
  345 + Object.defineProperty(object, 'sentinel', {});
  346 + return 'sentinel' in object;
  347 + } catch (exception) {
  348 + return false;
  349 + }
  350 +};
  351 +
  352 +// check whether defineProperty works if it's given. Otherwise,
  353 +// shim partially.
  354 +if (Object.defineProperty) {
  355 + var definePropertyWorksOnObject = doesDefinePropertyWork({});
  356 + var definePropertyWorksOnDom = typeof document === 'undefined' ||
  357 + doesDefinePropertyWork(document.createElement('div'));
  358 + if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
  359 + var definePropertyFallback = Object.defineProperty,
  360 + definePropertiesFallback = Object.defineProperties;
  361 + }
  362 +}
  363 +
  364 +if (!Object.defineProperty || definePropertyFallback) {
  365 + var ERR_NON_OBJECT_DESCRIPTOR = 'Property description must be an object: ';
  366 + var ERR_NON_OBJECT_TARGET = 'Object.defineProperty called on non-object: ';
  367 + var ERR_ACCESSORS_NOT_SUPPORTED = 'getters & setters can not be defined on this javascript engine';
  368 +
  369 + Object.defineProperty = function defineProperty(object, property, descriptor) {
  370 + if ((typeof object !== 'object' && typeof object !== 'function') || object === null) {
  371 + throw new TypeError(ERR_NON_OBJECT_TARGET + object);
  372 + }
  373 + if ((typeof descriptor !== 'object' && typeof descriptor !== 'function') || descriptor === null) {
  374 + throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
  375 + }
  376 + // make a valiant attempt to use the real defineProperty
  377 + // for I8's DOM elements.
  378 + if (definePropertyFallback) {
  379 + try {
  380 + return definePropertyFallback.call(Object, object, property, descriptor);
  381 + } catch (exception) {
  382 + // try the shim if the real one doesn't work
  383 + }
  384 + }
  385 +
  386 + // If it's a data property.
  387 + if ('value' in descriptor) {
  388 + // fail silently if 'writable', 'enumerable', or 'configurable'
  389 + // are requested but not supported
  390 + /*
  391 + // alternate approach:
  392 + if ( // can't implement these features; allow false but not true
  393 + ('writable' in descriptor && !descriptor.writable) ||
  394 + ('enumerable' in descriptor && !descriptor.enumerable) ||
  395 + ('configurable' in descriptor && !descriptor.configurable)
  396 + ))
  397 + throw new RangeError(
  398 + 'This implementation of Object.defineProperty does not support configurable, enumerable, or writable.'
  399 + );
  400 + */
  401 +
  402 + if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) {
  403 + // As accessors are supported only on engines implementing
  404 + // `__proto__` we can safely override `__proto__` while defining
  405 + // a property to make sure that we don't hit an inherited
  406 + // accessor.
  407 + /* eslint-disable no-proto */
  408 + var prototype = object.__proto__;
  409 + object.__proto__ = prototypeOfObject;
  410 + // Deleting a property anyway since getter / setter may be
  411 + // defined on object itself.
  412 + delete object[property];
  413 + object[property] = descriptor.value;
  414 + // Setting original `__proto__` back now.
  415 + object.__proto__ = prototype;
  416 + /* eslint-enable no-proto */
  417 + } else {
  418 + object[property] = descriptor.value;
  419 + }
  420 + } else {
  421 + if (!supportsAccessors && (('get' in descriptor) || ('set' in descriptor))) {
  422 + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
  423 + }
  424 + // If we got that far then getters and setters can be defined !!
  425 + if ('get' in descriptor) {
  426 + defineGetter(object, property, descriptor.get);
  427 + }
  428 + if ('set' in descriptor) {
  429 + defineSetter(object, property, descriptor.set);
  430 + }
  431 + }
  432 + return object;
  433 + };
  434 +}
  435 +
  436 +// ES5 15.2.3.7
  437 +// http://es5.github.com/#x15.2.3.7
  438 +if (!Object.defineProperties || definePropertiesFallback) {
  439 + Object.defineProperties = function defineProperties(object, properties) {
  440 + // make a valiant attempt to use the real defineProperties
  441 + if (definePropertiesFallback) {
  442 + try {
  443 + return definePropertiesFallback.call(Object, object, properties);
  444 + } catch (exception) {
  445 + // try the shim if the real one doesn't work
  446 + }
  447 + }
  448 +
  449 + Object.keys(properties).forEach(function (property) {
  450 + if (property !== '__proto__') {
  451 + Object.defineProperty(object, property, properties[property]);
  452 + }
  453 + });
  454 + return object;
  455 + };
  456 +}
  457 +
  458 +// ES5 15.2.3.8
  459 +// http://es5.github.com/#x15.2.3.8
  460 +if (!Object.seal) {
  461 + Object.seal = function seal(object) {
  462 + if (Object(object) !== object) {
  463 + throw new TypeError('Object.seal can only be called on Objects.');
  464 + }
  465 + // this is misleading and breaks feature-detection, but
  466 + // allows "securable" code to "gracefully" degrade to working
  467 + // but insecure code.
  468 + return object;
  469 + };
  470 +}
  471 +
  472 +// ES5 15.2.3.9
  473 +// http://es5.github.com/#x15.2.3.9
  474 +if (!Object.freeze) {
  475 + Object.freeze = function freeze(object) {
  476 + if (Object(object) !== object) {
  477 + throw new TypeError('Object.freeze can only be called on Objects.');
  478 + }
  479 + // this is misleading and breaks feature-detection, but
  480 + // allows "securable" code to "gracefully" degrade to working
  481 + // but insecure code.
  482 + return object;
  483 + };
  484 +}
  485 +
  486 +// detect a Rhino bug and patch it
  487 +try {
  488 + Object.freeze(function () {});
  489 +} catch (exception) {
  490 + Object.freeze = (function (freezeObject) {
  491 + return function freeze(object) {
  492 + if (typeof object === 'function') {
  493 + return object;
  494 + } else {
  495 + return freezeObject(object);
  496 + }
  497 + };
  498 + }(Object.freeze));
  499 +}
  500 +
  501 +// ES5 15.2.3.10
  502 +// http://es5.github.com/#x15.2.3.10
  503 +if (!Object.preventExtensions) {
  504 + Object.preventExtensions = function preventExtensions(object) {
  505 + if (Object(object) !== object) {
  506 + throw new TypeError('Object.preventExtensions can only be called on Objects.');
  507 + }
  508 + // this is misleading and breaks feature-detection, but
  509 + // allows "securable" code to "gracefully" degrade to working
  510 + // but insecure code.
  511 + return object;
  512 + };
  513 +}
  514 +
  515 +// ES5 15.2.3.11
  516 +// http://es5.github.com/#x15.2.3.11
  517 +if (!Object.isSealed) {
  518 + Object.isSealed = function isSealed(object) {
  519 + if (Object(object) !== object) {
  520 + throw new TypeError('Object.isSealed can only be called on Objects.');
  521 + }
  522 + return false;
  523 + };
  524 +}
  525 +
  526 +// ES5 15.2.3.12
  527 +// http://es5.github.com/#x15.2.3.12
  528 +if (!Object.isFrozen) {
  529 + Object.isFrozen = function isFrozen(object) {
  530 + if (Object(object) !== object) {
  531 + throw new TypeError('Object.isFrozen can only be called on Objects.');
  532 + }
  533 + return false;
  534 + };
  535 +}
  536 +
  537 +// ES5 15.2.3.13
  538 +// http://es5.github.com/#x15.2.3.13
  539 +if (!Object.isExtensible) {
  540 + Object.isExtensible = function isExtensible(object) {
  541 + // 1. If Type(O) is not Object throw a TypeError exception.
  542 + if (Object(object) !== object) {
  543 + throw new TypeError('Object.isExtensible can only be called on Objects.');
  544 + }
  545 + // 2. Return the Boolean value of the [[Extensible]] internal property of O.
  546 + var name = '';
  547 + while (owns(object, name)) {
  548 + name += '?';
  549 + }
  550 + object[name] = true;
  551 + var returnValue = owns(object, name);
  552 + delete object[name];
  553 + return returnValue;
  554 + };
  555 +}
  556 +
  557 +}));
  1 +{"version":3,"sources":["es5-sham.js"],"names":["root","factory","define","amd","exports","module","returnExports","this","call","Function","prototypeOfObject","Object","prototype","owns","bind","hasOwnProperty","isEnumerable","propertyIsEnumerable","toStr","toString","defineGetter","defineSetter","lookupGetter","lookupSetter","supportsAccessors","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","getPrototypeOf","object","proto","__proto__","constructor","doesGetOwnPropertyDescriptorWork","sentinel","getOwnPropertyDescriptor","value","exception","defineProperty","getOwnPropertyDescriptorWorksOnObject","getOwnPropertyDescriptorWorksOnDom","document","createElement","getOwnPropertyDescriptorFallback","ERR_NON_OBJECT","property","TypeError","descriptor","enumerable","configurable","notPrototypeOfObject","getter","setter","get","set","writable","getOwnPropertyNames","keys","create","createEmpty","supportsProto","shouldUseActiveX","domain","ActiveXObject","getEmptyViaActiveX","empty","xDoc","write","close","parentWindow","getEmptyViaIFrame","iframe","parent","body","documentElement","style","display","appendChild","src","contentWindow","removeChild","isPrototypeOf","toLocaleString","valueOf","Empty","properties","Type","defineProperties","doesDefinePropertyWork","definePropertyWorksOnObject","definePropertyWorksOnDom","definePropertyFallback","definePropertiesFallback","ERR_NON_OBJECT_DESCRIPTOR","ERR_NON_OBJECT_TARGET","ERR_ACCESSORS_NOT_SUPPORTED","forEach","seal","freeze","freezeObject","preventExtensions","isSealed","isFrozen","isExtensible","name","returnValue"],"mappings":";;;;;CAa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AC3B,KAAM,IAAIiB,WAAU,sDAGxB,GAAI0D,GAAO,EACX,OAAO5F,EAAKiB,EAAQ2E,GAAO,CACvBA,GAAQ,IAEZ3E,EAAO2E,GAAQ,IACf,IAAIC,GAAc7F,EAAKiB,EAAQ2E,SACxB3E,GAAO2E,EACd,OAAOC"}
  1 +/*!
  2 + * https://github.com/es-shims/es5-shim
  3 + * @license es5-shim Copyright 2009-2015 by contributors, MIT License
  4 + * see https://github.com/es-shims/es5-shim/blob/v4.5.7/LICENSE
  5 + */
  6 +(function(e,t){"use strict";if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){var e=Function.call;var t=Object.prototype;var r=e.bind(t.hasOwnProperty);var n=e.bind(t.propertyIsEnumerable);var o=e.bind(t.toString);var i;var c;var f;var a;var l=r(t,"__defineGetter__");if(l){i=e.bind(t.__defineGetter__);c=e.bind(t.__defineSetter__);f=e.bind(t.__lookupGetter__);a=e.bind(t.__lookupSetter__)}if(!Object.getPrototypeOf){Object.getPrototypeOf=function getPrototypeOf(e){var r=e.__proto__;if(r||r===null){return r}else if(o(e.constructor)==="[object Function]"){return e.constructor.prototype}else if(e instanceof Object){return t}else{return null}}}var u=function doesGetOwnPropertyDescriptorWork(e){try{e.sentinel=0;return Object.getOwnPropertyDescriptor(e,"sentinel").value===0}catch(t){return false}};if(Object.defineProperty){var p=u({});var s=typeof document==="undefined"||u(document.createElement("div"));if(!s||!p){var b=Object.getOwnPropertyDescriptor}}if(!Object.getOwnPropertyDescriptor||b){var O="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function getOwnPropertyDescriptor(e,o){if(typeof e!=="object"&&typeof e!=="function"||e===null){throw new TypeError(O+e)}if(b){try{return b.call(Object,e,o)}catch(i){}}var c;if(!r(e,o)){return c}c={enumerable:n(e,o),configurable:true};if(l){var u=e.__proto__;var p=e!==t;if(p){e.__proto__=t}var s=f(e,o);var y=a(e,o);if(p){e.__proto__=u}if(s||y){if(s){c.get=s}if(y){c.set=y}return c}}c.value=e[o];c.writable=true;return c}}if(!Object.getOwnPropertyNames){Object.getOwnPropertyNames=function getOwnPropertyNames(e){return Object.keys(e)}}if(!Object.create){var y;var d=!({__proto__:null}instanceof Object);var j=function shouldUseActiveX(){if(!document.domain){return false}try{return!!new ActiveXObject("htmlfile")}catch(e){return false}};var v=function getEmptyViaActiveX(){var e;var t;t=new ActiveXObject("htmlfile");t.write("<script></script>");t.close();e=t.parentWindow.Object.prototype;t=null;return e};var _=function getEmptyViaIFrame(){var e=document.createElement("iframe");var t=document.body||document.documentElement;var r;e.style.display="none";t.appendChild(e);e.src="javascript:";r=e.contentWindow.Object.prototype;t.removeChild(e);e=null;return r};if(d||typeof document==="undefined"){y=function(){return{__proto__:null}}}else{y=function(){var e=j()?v():_();delete e.constructor;delete e.hasOwnProperty;delete e.propertyIsEnumerable;delete e.isPrototypeOf;delete e.toLocaleString;delete e.toString;delete e.valueOf;var t=function Empty(){};t.prototype=e;y=function(){return new t};return new t}}Object.create=function create(e,t){var r;var n=function Type(){};if(e===null){r=y()}else{if(typeof e!=="object"&&typeof e!=="function"){throw new TypeError("Object prototype may only be an Object or null")}n.prototype=e;r=new n;r.__proto__=e}if(t!==void 0){Object.defineProperties(r,t)}return r}}var w=function doesDefinePropertyWork(e){try{Object.defineProperty(e,"sentinel",{});return"sentinel"in e}catch(t){return false}};if(Object.defineProperty){var m=w({});var P=typeof document==="undefined"||w(document.createElement("div"));if(!m||!P){var E=Object.defineProperty,h=Object.defineProperties}}if(!Object.defineProperty||E){var g="Property description must be an object: ";var z="Object.defineProperty called on non-object: ";var T="getters & setters can not be defined on this javascript engine";Object.defineProperty=function defineProperty(e,r,n){if(typeof e!=="object"&&typeof e!=="function"||e===null){throw new TypeError(z+e)}if(typeof n!=="object"&&typeof n!=="function"||n===null){throw new TypeError(g+n)}if(E){try{return E.call(Object,e,r,n)}catch(o){}}if("value"in n){if(l&&(f(e,r)||a(e,r))){var u=e.__proto__;e.__proto__=t;delete e[r];e[r]=n.value;e.__proto__=u}else{e[r]=n.value}}else{if(!l&&("get"in n||"set"in n)){throw new TypeError(T)}if("get"in n){i(e,r,n.get)}if("set"in n){c(e,r,n.set)}}return e}}if(!Object.defineProperties||h){Object.defineProperties=function defineProperties(e,t){if(h){try{return h.call(Object,e,t)}catch(r){}}Object.keys(t).forEach(function(r){if(r!=="__proto__"){Object.defineProperty(e,r,t[r])}});return e}}if(!Object.seal){Object.seal=function seal(e){if(Object(e)!==e){throw new TypeError("Object.seal can only be called on Objects.")}return e}}if(!Object.freeze){Object.freeze=function freeze(e){if(Object(e)!==e){throw new TypeError("Object.freeze can only be called on Objects.")}return e}}try{Object.freeze(function(){})}catch(x){Object.freeze=function(e){return function freeze(t){if(typeof t==="function"){return t}else{return e(t)}}}(Object.freeze)}if(!Object.preventExtensions){Object.preventExtensions=function preventExtensions(e){if(Object(e)!==e){throw new TypeError("Object.preventExtensions can only be called on Objects.")}return e}}if(!Object.isSealed){Object.isSealed=function isSealed(e){if(Object(e)!==e){throw new TypeError("Object.isSealed can only be called on Objects.")}return false}}if(!Object.isFrozen){Object.isFrozen=function isFrozen(e){if(Object(e)!==e){throw new TypeError("Object.isFrozen can only be called on Objects.")}return false}}if(!Object.isExtensible){Object.isExtensible=function isExtensible(e){if(Object(e)!==e){throw new TypeError("Object.isExtensible can only be called on Objects.")}var t="";while(r(e,t)){t+="?"}e[t]=true;var n=r(e,t);delete e[t];return n}}});
  7 +//# sourceMappingURL=es5-sham.map
  1 +/*!
  2 + * https://github.com/es-shims/es5-shim
  3 + * @license es5-shim Copyright 2009-2015 by contributors, MIT License
  4 + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE
  5 + */
  6 +
  7 +// vim: ts=4 sts=4 sw=4 expandtab
  8 +
  9 +// Add semicolon to prevent IIFE from being passed as argument to concatenated code.
  10 +;
  11 +
  12 +// UMD (Universal Module Definition)
  13 +// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js
  14 +(function (root, factory) {
  15 + 'use strict';
  16 +
  17 + /* global define, exports, module */
  18 + if (typeof define === 'function' && define.amd) {
  19 + // AMD. Register as an anonymous module.
  20 + define(factory);
  21 + } else if (typeof exports === 'object') {
  22 + // Node. Does not work with strict CommonJS, but
  23 + // only CommonJS-like enviroments that support module.exports,
  24 + // like Node.
  25 + module.exports = factory();
  26 + } else {
  27 + // Browser globals (root is window)
  28 + root.returnExports = factory();
  29 + }
  30 +}(this, function () {
  31 +
  32 +/**
  33 + * Brings an environment as close to ECMAScript 5 compliance
  34 + * as is possible with the facilities of erstwhile engines.
  35 + *
  36 + * Annotated ES5: http://es5.github.com/ (specific links below)
  37 + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
  38 + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/
  39 + */
  40 +
  41 +// Shortcut to an often accessed properties, in order to avoid multiple
  42 +// dereference that costs universally. This also holds a reference to known-good
  43 +// functions.
  44 +var $Array = Array;
  45 +var ArrayPrototype = $Array.prototype;
  46 +var $Object = Object;
  47 +var ObjectPrototype = $Object.prototype;
  48 +var $Function = Function;
  49 +var FunctionPrototype = $Function.prototype;
  50 +var $String = String;
  51 +var StringPrototype = $String.prototype;
  52 +var $Number = Number;
  53 +var NumberPrototype = $Number.prototype;
  54 +var array_slice = ArrayPrototype.slice;
  55 +var array_splice = ArrayPrototype.splice;
  56 +var array_push = ArrayPrototype.push;
  57 +var array_unshift = ArrayPrototype.unshift;
  58 +var array_concat = ArrayPrototype.concat;
  59 +var array_join = ArrayPrototype.join;
  60 +var call = FunctionPrototype.call;
  61 +var apply = FunctionPrototype.apply;
  62 +var max = Math.max;
  63 +var min = Math.min;
  64 +
  65 +// Having a toString local variable name breaks in Opera so use to_string.
  66 +var to_string = ObjectPrototype.toString;
  67 +
  68 +/* global Symbol */
  69 +/* eslint-disable one-var-declaration-per-line, no-redeclare, max-statements-per-line */
  70 +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
  71 +var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
  72 +
  73 +var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; };
  74 +var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; };
  75 +/* eslint-enable one-var-declaration-per-line, no-redeclare, max-statements-per-line */
  76 +
  77 +/* inlined from http://npmjs.com/define-properties */
  78 +var supportsDescriptors = $Object.defineProperty && (function () {
  79 + try {
  80 + var obj = {};
  81 + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj });
  82 + for (var _ in obj) { return false; }
  83 + return obj.x === obj;
  84 + } catch (e) { /* this is ES3 */
  85 + return false;
  86 + }
  87 +}());
  88 +var defineProperties = (function (has) {
  89 + // Define configurable, writable, and non-enumerable props
  90 + // if they don't exist.
  91 + var defineProperty;
  92 + if (supportsDescriptors) {
  93 + defineProperty = function (object, name, method, forceAssign) {
  94 + if (!forceAssign && (name in object)) { return; }
  95 + $Object.defineProperty(object, name, {
  96 + configurable: true,
  97 + enumerable: false,
  98 + writable: true,
  99 + value: method
  100 + });
  101 + };
  102 + } else {
  103 + defineProperty = function (object, name, method, forceAssign) {
  104 + if (!forceAssign && (name in object)) { return; }
  105 + object[name] = method;
  106 + };
  107 + }
  108 + return function defineProperties(object, map, forceAssign) {
  109 + for (var name in map) {
  110 + if (has.call(map, name)) {
  111 + defineProperty(object, name, map[name], forceAssign);
  112 + }
  113 + }
  114 + };
  115 +}(ObjectPrototype.hasOwnProperty));
  116 +
  117 +//
  118 +// Util
  119 +// ======
  120 +//
  121 +
  122 +/* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */
  123 +var isPrimitive = function isPrimitive(input) {
  124 + var type = typeof input;
  125 + return input === null || (type !== 'object' && type !== 'function');
  126 +};
  127 +
  128 +var isActualNaN = $Number.isNaN || function (x) { return x !== x; };
  129 +
  130 +var ES = {
  131 + // ES5 9.4
  132 + // http://es5.github.com/#x9.4
  133 + // http://jsperf.com/to-integer
  134 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */
  135 + ToInteger: function ToInteger(num) {
  136 + var n = +num;
  137 + if (isActualNaN(n)) {
  138 + n = 0;
  139 + } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
  140 + n = (n > 0 || -1) * Math.floor(Math.abs(n));
  141 + }
  142 + return n;
  143 + },
  144 +
  145 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */
  146 + ToPrimitive: function ToPrimitive(input) {
  147 + var val, valueOf, toStr;
  148 + if (isPrimitive(input)) {
  149 + return input;
  150 + }
  151 + valueOf = input.valueOf;
  152 + if (isCallable(valueOf)) {
  153 + val = valueOf.call(input);
  154 + if (isPrimitive(val)) {
  155 + return val;
  156 + }
  157 + }
  158 + toStr = input.toString;
  159 + if (isCallable(toStr)) {
  160 + val = toStr.call(input);
  161 + if (isPrimitive(val)) {
  162 + return val;
  163 + }
  164 + }
  165 + throw new TypeError();
  166 + },
  167 +
  168 + // ES5 9.9
  169 + // http://es5.github.com/#x9.9
  170 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */
  171 + ToObject: function (o) {
  172 + if (o == null) { // this matches both null and undefined
  173 + throw new TypeError("can't convert " + o + ' to object');
  174 + }
  175 + return $Object(o);
  176 + },
  177 +
  178 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */
  179 + ToUint32: function ToUint32(x) {
  180 + return x >>> 0;
  181 + }
  182 +};
  183 +
  184 +//
  185 +// Function
  186 +// ========
  187 +//
  188 +
  189 +// ES-5 15.3.4.5
  190 +// http://es5.github.com/#x15.3.4.5
  191 +
  192 +var Empty = function Empty() {};
  193 +
  194 +defineProperties(FunctionPrototype, {
  195 + bind: function bind(that) { // .length is 1
  196 + // 1. Let Target be the this value.
  197 + var target = this;
  198 + // 2. If IsCallable(Target) is false, throw a TypeError exception.
  199 + if (!isCallable(target)) {
  200 + throw new TypeError('Function.prototype.bind called on incompatible ' + target);
  201 + }
  202 + // 3. Let A be a new (possibly empty) internal list of all of the
  203 + // argument values provided after thisArg (arg1, arg2 etc), in order.
  204 + // XXX slicedArgs will stand in for "A" if used
  205 + var args = array_slice.call(arguments, 1); // for normal call
  206 + // 4. Let F be a new native ECMAScript object.
  207 + // 11. Set the [[Prototype]] internal property of F to the standard
  208 + // built-in Function prototype object as specified in 15.3.3.1.
  209 + // 12. Set the [[Call]] internal property of F as described in
  210 + // 15.3.4.5.1.
  211 + // 13. Set the [[Construct]] internal property of F as described in
  212 + // 15.3.4.5.2.
  213 + // 14. Set the [[HasInstance]] internal property of F as described in
  214 + // 15.3.4.5.3.
  215 + var bound;
  216 + var binder = function () {
  217 +
  218 + if (this instanceof bound) {
  219 + // 15.3.4.5.2 [[Construct]]
  220 + // When the [[Construct]] internal method of a function object,
  221 + // F that was created using the bind function is called with a
  222 + // list of arguments ExtraArgs, the following steps are taken:
  223 + // 1. Let target be the value of F's [[TargetFunction]]
  224 + // internal property.
  225 + // 2. If target has no [[Construct]] internal method, a
  226 + // TypeError exception is thrown.
  227 + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
  228 + // property.
  229 + // 4. Let args be a new list containing the same values as the
  230 + // list boundArgs in the same order followed by the same
  231 + // values as the list ExtraArgs in the same order.
  232 + // 5. Return the result of calling the [[Construct]] internal
  233 + // method of target providing args as the arguments.
  234 +
  235 + var result = apply.call(
  236 + target,
  237 + this,
  238 + array_concat.call(args, array_slice.call(arguments))
  239 + );
  240 + if ($Object(result) === result) {
  241 + return result;
  242 + }
  243 + return this;
  244 +
  245 + } else {
  246 + // 15.3.4.5.1 [[Call]]
  247 + // When the [[Call]] internal method of a function object, F,
  248 + // which was created using the bind function is called with a
  249 + // this value and a list of arguments ExtraArgs, the following
  250 + // steps are taken:
  251 + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
  252 + // property.
  253 + // 2. Let boundThis be the value of F's [[BoundThis]] internal
  254 + // property.
  255 + // 3. Let target be the value of F's [[TargetFunction]] internal
  256 + // property.
  257 + // 4. Let args be a new list containing the same values as the
  258 + // list boundArgs in the same order followed by the same
  259 + // values as the list ExtraArgs in the same order.
  260 + // 5. Return the result of calling the [[Call]] internal method
  261 + // of target providing boundThis as the this value and
  262 + // providing args as the arguments.
  263 +
  264 + // equiv: target.call(this, ...boundArgs, ...args)
  265 + return apply.call(
  266 + target,
  267 + that,
  268 + array_concat.call(args, array_slice.call(arguments))
  269 + );
  270 +
  271 + }
  272 +
  273 + };
  274 +
  275 + // 15. If the [[Class]] internal property of Target is "Function", then
  276 + // a. Let L be the length property of Target minus the length of A.
  277 + // b. Set the length own property of F to either 0 or L, whichever is
  278 + // larger.
  279 + // 16. Else set the length own property of F to 0.
  280 +
  281 + var boundLength = max(0, target.length - args.length);
  282 +
  283 + // 17. Set the attributes of the length own property of F to the values
  284 + // specified in 15.3.5.1.
  285 + var boundArgs = [];
  286 + for (var i = 0; i < boundLength; i++) {
  287 + array_push.call(boundArgs, '$' + i);
  288 + }
  289 +
  290 + // XXX Build a dynamic function with desired amount of arguments is the only
  291 + // way to set the length property of a function.
  292 + // In environments where Content Security Policies enabled (Chrome extensions,
  293 + // for ex.) all use of eval or Function costructor throws an exception.
  294 + // However in all of these environments Function.prototype.bind exists
  295 + // and so this code will never be executed.
  296 + bound = $Function('binder', 'return function (' + array_join.call(boundArgs, ',') + '){ return binder.apply(this, arguments); }')(binder);
  297 +
  298 + if (target.prototype) {
  299 + Empty.prototype = target.prototype;
  300 + bound.prototype = new Empty();
  301 + // Clean up dangling references.
  302 + Empty.prototype = null;
  303 + }
  304 +
  305 + // TODO
  306 + // 18. Set the [[Extensible]] internal property of F to true.
  307 +
  308 + // TODO
  309 + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
  310 + // 20. Call the [[DefineOwnProperty]] internal method of F with
  311 + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
  312 + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
  313 + // false.
  314 + // 21. Call the [[DefineOwnProperty]] internal method of F with
  315 + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
  316 + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
  317 + // and false.
  318 +
  319 + // TODO
  320 + // NOTE Function objects created using Function.prototype.bind do not
  321 + // have a prototype property or the [[Code]], [[FormalParameters]], and
  322 + // [[Scope]] internal properties.
  323 + // XXX can't delete prototype in pure-js.
  324 +
  325 + // 22. Return F.
  326 + return bound;
  327 + }
  328 +});
  329 +
  330 +// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
  331 +// use it in defining shortcuts.
  332 +var owns = call.bind(ObjectPrototype.hasOwnProperty);
  333 +var toStr = call.bind(ObjectPrototype.toString);
  334 +var arraySlice = call.bind(array_slice);
  335 +var arraySliceApply = apply.bind(array_slice);
  336 +var strSlice = call.bind(StringPrototype.slice);
  337 +var strSplit = call.bind(StringPrototype.split);
  338 +var strIndexOf = call.bind(StringPrototype.indexOf);
  339 +var pushCall = call.bind(array_push);
  340 +var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable);
  341 +var arraySort = call.bind(ArrayPrototype.sort);
  342 +
  343 +//
  344 +// Array
  345 +// =====
  346 +//
  347 +
  348 +var isArray = $Array.isArray || function isArray(obj) {
  349 + return toStr(obj) === '[object Array]';
  350 +};
  351 +
  352 +// ES5 15.4.4.12
  353 +// http://es5.github.com/#x15.4.4.13
  354 +// Return len+argCount.
  355 +// [bugfix, ielt8]
  356 +// IE < 8 bug: [].unshift(0) === undefined but should be "1"
  357 +var hasUnshiftReturnValueBug = [].unshift(0) !== 1;
  358 +defineProperties(ArrayPrototype, {
  359 + unshift: function () {
  360 + array_unshift.apply(this, arguments);
  361 + return this.length;
  362 + }
  363 +}, hasUnshiftReturnValueBug);
  364 +
  365 +// ES5 15.4.3.2
  366 +// http://es5.github.com/#x15.4.3.2
  367 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
  368 +defineProperties($Array, { isArray: isArray });
  369 +
  370 +// The IsCallable() check in the Array functions
  371 +// has been replaced with a strict check on the
  372 +// internal class of the object to trap cases where
  373 +// the provided function was actually a regular
  374 +// expression literal, which in V8 and
  375 +// JavaScriptCore is a typeof "function". Only in
  376 +// V8 are regular expression literals permitted as
  377 +// reduce parameters, so it is desirable in the
  378 +// general case for the shim to match the more
  379 +// strict and common behavior of rejecting regular
  380 +// expressions.
  381 +
  382 +// ES5 15.4.4.18
  383 +// http://es5.github.com/#x15.4.4.18
  384 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
  385 +
  386 +// Check failure of by-index access of string characters (IE < 9)
  387 +// and failure of `0 in boxedString` (Rhino)
  388 +var boxedString = $Object('a');
  389 +var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
  390 +
  391 +var properlyBoxesContext = function properlyBoxed(method) {
  392 + // Check node 0.6.21 bug where third parameter is not boxed
  393 + var properlyBoxesNonStrict = true;
  394 + var properlyBoxesStrict = true;
  395 + var threwException = false;
  396 + if (method) {
  397 + try {
  398 + method.call('foo', function (_, __, context) {
  399 + if (typeof context !== 'object') {
  400 + properlyBoxesNonStrict = false;
  401 + }
  402 + });
  403 +
  404 + method.call([1], function () {
  405 + 'use strict';
  406 +
  407 + properlyBoxesStrict = typeof this === 'string';
  408 + }, 'x');
  409 + } catch (e) {
  410 + threwException = true;
  411 + }
  412 + }
  413 + return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict;
  414 +};
  415 +
  416 +defineProperties(ArrayPrototype, {
  417 + forEach: function forEach(callbackfn/*, thisArg*/) {
  418 + var object = ES.ToObject(this);
  419 + var self = splitString && isString(this) ? strSplit(this, '') : object;
  420 + var i = -1;
  421 + var length = ES.ToUint32(self.length);
  422 + var T;
  423 + if (arguments.length > 1) {
  424 + T = arguments[1];
  425 + }
  426 +
  427 + // If no callback function or if callback is not a callable function
  428 + if (!isCallable(callbackfn)) {
  429 + throw new TypeError('Array.prototype.forEach callback must be a function');
  430 + }
  431 +
  432 + while (++i < length) {
  433 + if (i in self) {
  434 + // Invoke the callback function with call, passing arguments:
  435 + // context, property value, property key, thisArg object
  436 + if (typeof T === 'undefined') {
  437 + callbackfn(self[i], i, object);
  438 + } else {
  439 + callbackfn.call(T, self[i], i, object);
  440 + }
  441 + }
  442 + }
  443 + }
  444 +}, !properlyBoxesContext(ArrayPrototype.forEach));
  445 +
  446 +// ES5 15.4.4.19
  447 +// http://es5.github.com/#x15.4.4.19
  448 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
  449 +defineProperties(ArrayPrototype, {
  450 + map: function map(callbackfn/*, thisArg*/) {
  451 + var object = ES.ToObject(this);
  452 + var self = splitString && isString(this) ? strSplit(this, '') : object;
  453 + var length = ES.ToUint32(self.length);
  454 + var result = $Array(length);
  455 + var T;
  456 + if (arguments.length > 1) {
  457 + T = arguments[1];
  458 + }
  459 +
  460 + // If no callback function or if callback is not a callable function
  461 + if (!isCallable(callbackfn)) {
  462 + throw new TypeError('Array.prototype.map callback must be a function');
  463 + }
  464 +
  465 + for (var i = 0; i < length; i++) {
  466 + if (i in self) {
  467 + if (typeof T === 'undefined') {
  468 + result[i] = callbackfn(self[i], i, object);
  469 + } else {
  470 + result[i] = callbackfn.call(T, self[i], i, object);
  471 + }
  472 + }
  473 + }
  474 + return result;
  475 + }
  476 +}, !properlyBoxesContext(ArrayPrototype.map));
  477 +
  478 +// ES5 15.4.4.20
  479 +// http://es5.github.com/#x15.4.4.20
  480 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
  481 +defineProperties(ArrayPrototype, {
  482 + filter: function filter(callbackfn/*, thisArg*/) {
  483 + var object = ES.ToObject(this);
  484 + var self = splitString && isString(this) ? strSplit(this, '') : object;
  485 + var length = ES.ToUint32(self.length);
  486 + var result = [];
  487 + var value;
  488 + var T;
  489 + if (arguments.length > 1) {
  490 + T = arguments[1];
  491 + }
  492 +
  493 + // If no callback function or if callback is not a callable function
  494 + if (!isCallable(callbackfn)) {
  495 + throw new TypeError('Array.prototype.filter callback must be a function');
  496 + }
  497 +
  498 + for (var i = 0; i < length; i++) {
  499 + if (i in self) {
  500 + value = self[i];
  501 + if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) {
  502 + pushCall(result, value);
  503 + }
  504 + }
  505 + }
  506 + return result;
  507 + }
  508 +}, !properlyBoxesContext(ArrayPrototype.filter));
  509 +
  510 +// ES5 15.4.4.16
  511 +// http://es5.github.com/#x15.4.4.16
  512 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
  513 +defineProperties(ArrayPrototype, {
  514 + every: function every(callbackfn/*, thisArg*/) {
  515 + var object = ES.ToObject(this);
  516 + var self = splitString && isString(this) ? strSplit(this, '') : object;
  517 + var length = ES.ToUint32(self.length);
  518 + var T;
  519 + if (arguments.length > 1) {
  520 + T = arguments[1];
  521 + }
  522 +
  523 + // If no callback function or if callback is not a callable function
  524 + if (!isCallable(callbackfn)) {
  525 + throw new TypeError('Array.prototype.every callback must be a function');
  526 + }
  527 +
  528 + for (var i = 0; i < length; i++) {
  529 + if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) {
  530 + return false;
  531 + }
  532 + }
  533 + return true;
  534 + }
  535 +}, !properlyBoxesContext(ArrayPrototype.every));
  536 +
  537 +// ES5 15.4.4.17
  538 +// http://es5.github.com/#x15.4.4.17
  539 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
  540 +defineProperties(ArrayPrototype, {
  541 + some: function some(callbackfn/*, thisArg */) {
  542 + var object = ES.ToObject(this);
  543 + var self = splitString && isString(this) ? strSplit(this, '') : object;
  544 + var length = ES.ToUint32(self.length);
  545 + var T;
  546 + if (arguments.length > 1) {
  547 + T = arguments[1];
  548 + }
  549 +
  550 + // If no callback function or if callback is not a callable function
  551 + if (!isCallable(callbackfn)) {
  552 + throw new TypeError('Array.prototype.some callback must be a function');
  553 + }
  554 +
  555 + for (var i = 0; i < length; i++) {
  556 + if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) {
  557 + return true;
  558 + }
  559 + }
  560 + return false;
  561 + }
  562 +}, !properlyBoxesContext(ArrayPrototype.some));
  563 +
  564 +// ES5 15.4.4.21
  565 +// http://es5.github.com/#x15.4.4.21
  566 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
  567 +var reduceCoercesToObject = false;
  568 +if (ArrayPrototype.reduce) {
  569 + reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) {
  570 + return list;
  571 + }) === 'object';
  572 +}
  573 +defineProperties(ArrayPrototype, {
  574 + reduce: function reduce(callbackfn/*, initialValue*/) {
  575 + var object = ES.ToObject(this);
  576 + var self = splitString && isString(this) ? strSplit(this, '') : object;
  577 + var length = ES.ToUint32(self.length);
  578 +
  579 + // If no callback function or if callback is not a callable function
  580 + if (!isCallable(callbackfn)) {
  581 + throw new TypeError('Array.prototype.reduce callback must be a function');
  582 + }
  583 +
  584 + // no value to return if no initial value and an empty array
  585 + if (length === 0 && arguments.length === 1) {
  586 + throw new TypeError('reduce of empty array with no initial value');
  587 + }
  588 +
  589 + var i = 0;
  590 + var result;
  591 + if (arguments.length >= 2) {
  592 + result = arguments[1];
  593 + } else {
  594 + do {
  595 + if (i in self) {
  596 + result = self[i++];
  597 + break;
  598 + }
  599 +
  600 + // if array contains no values, no initial value to return
  601 + if (++i >= length) {
  602 + throw new TypeError('reduce of empty array with no initial value');
  603 + }
  604 + } while (true);
  605 + }
  606 +
  607 + for (; i < length; i++) {
  608 + if (i in self) {
  609 + result = callbackfn(result, self[i], i, object);
  610 + }
  611 + }
  612 +
  613 + return result;
  614 + }
  615 +}, !reduceCoercesToObject);
  616 +
  617 +// ES5 15.4.4.22
  618 +// http://es5.github.com/#x15.4.4.22
  619 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
  620 +var reduceRightCoercesToObject = false;
  621 +if (ArrayPrototype.reduceRight) {
  622 + reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) {
  623 + return list;
  624 + }) === 'object';
  625 +}
  626 +defineProperties(ArrayPrototype, {
  627 + reduceRight: function reduceRight(callbackfn/*, initial*/) {
  628 + var object = ES.ToObject(this);
  629 + var self = splitString && isString(this) ? strSplit(this, '') : object;
  630 + var length = ES.ToUint32(self.length);
  631 +
  632 + // If no callback function or if callback is not a callable function
  633 + if (!isCallable(callbackfn)) {
  634 + throw new TypeError('Array.prototype.reduceRight callback must be a function');
  635 + }
  636 +
  637 + // no value to return if no initial value, empty array
  638 + if (length === 0 && arguments.length === 1) {
  639 + throw new TypeError('reduceRight of empty array with no initial value');
  640 + }
  641 +
  642 + var result;
  643 + var i = length - 1;
  644 + if (arguments.length >= 2) {
  645 + result = arguments[1];
  646 + } else {
  647 + do {
  648 + if (i in self) {
  649 + result = self[i--];
  650 + break;
  651 + }
  652 +
  653 + // if array contains no values, no initial value to return
  654 + if (--i < 0) {
  655 + throw new TypeError('reduceRight of empty array with no initial value');
  656 + }
  657 + } while (true);
  658 + }
  659 +
  660 + if (i < 0) {
  661 + return result;
  662 + }
  663 +
  664 + do {
  665 + if (i in self) {
  666 + result = callbackfn(result, self[i], i, object);
  667 + }
  668 + } while (i--);
  669 +
  670 + return result;
  671 + }
  672 +}, !reduceRightCoercesToObject);
  673 +
  674 +// ES5 15.4.4.14
  675 +// http://es5.github.com/#x15.4.4.14
  676 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
  677 +var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1;
  678 +defineProperties(ArrayPrototype, {
  679 + indexOf: function indexOf(searchElement/*, fromIndex */) {
  680 + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this);
  681 + var length = ES.ToUint32(self.length);
  682 +
  683 + if (length === 0) {
  684 + return -1;
  685 + }
  686 +
  687 + var i = 0;
  688 + if (arguments.length > 1) {
  689 + i = ES.ToInteger(arguments[1]);
  690 + }
  691 +
  692 + // handle negative indices
  693 + i = i >= 0 ? i : max(0, length + i);
  694 + for (; i < length; i++) {
  695 + if (i in self && self[i] === searchElement) {
  696 + return i;
  697 + }
  698 + }
  699 + return -1;
  700 + }
  701 +}, hasFirefox2IndexOfBug);
  702 +
  703 +// ES5 15.4.4.15
  704 +// http://es5.github.com/#x15.4.4.15
  705 +// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
  706 +var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1;
  707 +defineProperties(ArrayPrototype, {
  708 + lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) {
  709 + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this);
  710 + var length = ES.ToUint32(self.length);
  711 +
  712 + if (length === 0) {
  713 + return -1;
  714 + }
  715 + var i = length - 1;
  716 + if (arguments.length > 1) {
  717 + i = min(i, ES.ToInteger(arguments[1]));
  718 + }
  719 + // handle negative indices
  720 + i = i >= 0 ? i : length - Math.abs(i);
  721 + for (; i >= 0; i--) {
  722 + if (i in self && searchElement === self[i]) {
  723 + return i;
  724 + }
  725 + }
  726 + return -1;
  727 + }
  728 +}, hasFirefox2LastIndexOfBug);
  729 +
  730 +// ES5 15.4.4.12
  731 +// http://es5.github.com/#x15.4.4.12
  732 +var spliceNoopReturnsEmptyArray = (function () {
  733 + var a = [1, 2];
  734 + var result = a.splice();
  735 + return a.length === 2 && isArray(result) && result.length === 0;
  736 +}());
  737 +defineProperties(ArrayPrototype, {
  738 + // Safari 5.0 bug where .splice() returns undefined
  739 + splice: function splice(start, deleteCount) {
  740 + if (arguments.length === 0) {
  741 + return [];
  742 + } else {
  743 + return array_splice.apply(this, arguments);
  744 + }
  745 + }
  746 +}, !spliceNoopReturnsEmptyArray);
  747 +
  748 +var spliceWorksWithEmptyObject = (function () {
  749 + var obj = {};
  750 + ArrayPrototype.splice.call(obj, 0, 0, 1);
  751 + return obj.length === 1;
  752 +}());
  753 +defineProperties(ArrayPrototype, {
  754 + splice: function splice(start, deleteCount) {
  755 + if (arguments.length === 0) { return []; }
  756 + var args = arguments;
  757 + this.length = max(ES.ToInteger(this.length), 0);
  758 + if (arguments.length > 0 && typeof deleteCount !== 'number') {
  759 + args = arraySlice(arguments);
  760 + if (args.length < 2) {
  761 + pushCall(args, this.length - start);
  762 + } else {
  763 + args[1] = ES.ToInteger(deleteCount);
  764 + }
  765 + }
  766 + return array_splice.apply(this, args);
  767 + }
  768 +}, !spliceWorksWithEmptyObject);
  769 +var spliceWorksWithLargeSparseArrays = (function () {
  770 + // Per https://github.com/es-shims/es5-shim/issues/295
  771 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater
  772 + var arr = new $Array(1e5);
  773 + // note: the index MUST be 8 or larger or the test will false pass
  774 + arr[8] = 'x';
  775 + arr.splice(1, 1);
  776 + // note: this test must be defined *after* the indexOf shim
  777 + // per https://github.com/es-shims/es5-shim/issues/313
  778 + return arr.indexOf('x') === 7;
  779 +}());
  780 +var spliceWorksWithSmallSparseArrays = (function () {
  781 + // Per https://github.com/es-shims/es5-shim/issues/295
  782 + // Opera 12.15 breaks on this, no idea why.
  783 + var n = 256;
  784 + var arr = [];
  785 + arr[n] = 'a';
  786 + arr.splice(n + 1, 0, 'b');
  787 + return arr[n] === 'a';
  788 +}());
  789 +defineProperties(ArrayPrototype, {
  790 + splice: function splice(start, deleteCount) {
  791 + var O = ES.ToObject(this);
  792 + var A = [];
  793 + var len = ES.ToUint32(O.length);
  794 + var relativeStart = ES.ToInteger(start);
  795 + var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len);
  796 + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart);
  797 +
  798 + var k = 0;
  799 + var from;
  800 + while (k < actualDeleteCount) {
  801 + from = $String(actualStart + k);
  802 + if (owns(O, from)) {
  803 + A[k] = O[from];
  804 + }
  805 + k += 1;
  806 + }
  807 +
  808 + var items = arraySlice(arguments, 2);
  809 + var itemCount = items.length;
  810 + var to;
  811 + if (itemCount < actualDeleteCount) {
  812 + k = actualStart;
  813 + var maxK = len - actualDeleteCount;
  814 + while (k < maxK) {
  815 + from = $String(k + actualDeleteCount);
  816 + to = $String(k + itemCount);
  817 + if (owns(O, from)) {
  818 + O[to] = O[from];
  819 + } else {
  820 + delete O[to];
  821 + }
  822 + k += 1;
  823 + }
  824 + k = len;
  825 + var minK = len - actualDeleteCount + itemCount;
  826 + while (k > minK) {
  827 + delete O[k - 1];
  828 + k -= 1;
  829 + }
  830 + } else if (itemCount > actualDeleteCount) {
  831 + k = len - actualDeleteCount;
  832 + while (k > actualStart) {
  833 + from = $String(k + actualDeleteCount - 1);
  834 + to = $String(k + itemCount - 1);
  835 + if (owns(O, from)) {
  836 + O[to] = O[from];
  837 + } else {
  838 + delete O[to];
  839 + }
  840 + k -= 1;
  841 + }
  842 + }
  843 + k = actualStart;
  844 + for (var i = 0; i < items.length; ++i) {
  845 + O[k] = items[i];
  846 + k += 1;
  847 + }
  848 + O.length = len - actualDeleteCount + itemCount;
  849 +
  850 + return A;
  851 + }
  852 +}, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays);
  853 +
  854 +var originalJoin = ArrayPrototype.join;
  855 +var hasStringJoinBug;
  856 +try {
  857 + hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3';
  858 +} catch (e) {
  859 + hasStringJoinBug = true;
  860 +}
  861 +if (hasStringJoinBug) {
  862 + defineProperties(ArrayPrototype, {
  863 + join: function join(separator) {
  864 + var sep = typeof separator === 'undefined' ? ',' : separator;
  865 + return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep);
  866 + }
  867 + }, hasStringJoinBug);
  868 +}
  869 +
  870 +var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2';
  871 +if (hasJoinUndefinedBug) {
  872 + defineProperties(ArrayPrototype, {
  873 + join: function join(separator) {
  874 + var sep = typeof separator === 'undefined' ? ',' : separator;
  875 + return originalJoin.call(this, sep);
  876 + }
  877 + }, hasJoinUndefinedBug);
  878 +}
  879 +
  880 +var pushShim = function push(item) {
  881 + var O = ES.ToObject(this);
  882 + var n = ES.ToUint32(O.length);
  883 + var i = 0;
  884 + while (i < arguments.length) {
  885 + O[n + i] = arguments[i];
  886 + i += 1;
  887 + }
  888 + O.length = n + i;
  889 + return n + i;
  890 +};
  891 +
  892 +var pushIsNotGeneric = (function () {
  893 + var obj = {};
  894 + var result = Array.prototype.push.call(obj, undefined);
  895 + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0);
  896 +}());
  897 +defineProperties(ArrayPrototype, {
  898 + push: function push(item) {
  899 + if (isArray(this)) {
  900 + return array_push.apply(this, arguments);
  901 + }
  902 + return pushShim.apply(this, arguments);
  903 + }
  904 +}, pushIsNotGeneric);
  905 +
  906 +// This fixes a very weird bug in Opera 10.6 when pushing `undefined
  907 +var pushUndefinedIsWeird = (function () {
  908 + var arr = [];
  909 + var result = arr.push(undefined);
  910 + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0);
  911 +}());
  912 +defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird);
  913 +
  914 +// ES5 15.2.3.14
  915 +// http://es5.github.io/#x15.4.4.10
  916 +// Fix boxed string bug
  917 +defineProperties(ArrayPrototype, {
  918 + slice: function (start, end) {
  919 + var arr = isString(this) ? strSplit(this, '') : this;
  920 + return arraySliceApply(arr, arguments);
  921 + }
  922 +}, splitString);
  923 +
  924 +var sortIgnoresNonFunctions = (function () {
  925 + try {
  926 + [1, 2].sort(null);
  927 + [1, 2].sort({});
  928 + return true;
  929 + } catch (e) { /**/ }
  930 + return false;
  931 +}());
  932 +var sortThrowsOnRegex = (function () {
  933 + // this is a problem in Firefox 4, in which `typeof /a/ === 'function'`
  934 + try {
  935 + [1, 2].sort(/a/);
  936 + return false;
  937 + } catch (e) { /**/ }
  938 + return true;
  939 +}());
  940 +var sortIgnoresUndefined = (function () {
  941 + // applies in IE 8, for one.
  942 + try {
  943 + [1, 2].sort(undefined);
  944 + return true;
  945 + } catch (e) { /**/ }
  946 + return false;
  947 +}());
  948 +defineProperties(ArrayPrototype, {
  949 + sort: function sort(compareFn) {
  950 + if (typeof compareFn === 'undefined') {
  951 + return arraySort(this);
  952 + }
  953 + if (!isCallable(compareFn)) {
  954 + throw new TypeError('Array.prototype.sort callback must be a function');
  955 + }
  956 + return arraySort(this, compareFn);
  957 + }
  958 +}, sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex);
  959 +
  960 +//
  961 +// Object
  962 +// ======
  963 +//
  964 +
  965 +// ES5 15.2.3.14
  966 +// http://es5.github.com/#x15.2.3.14
  967 +
  968 +// http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
  969 +var hasDontEnumBug = !({ 'toString': null }).propertyIsEnumerable('toString');
  970 +var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');
  971 +var hasStringEnumBug = !owns('x', '0');
  972 +var equalsConstructorPrototype = function (o) {
  973 + var ctor = o.constructor;
  974 + return ctor && ctor.prototype === o;
  975 +};
  976 +var blacklistedKeys = {
  977 + $window: true,
  978 + $console: true,
  979 + $parent: true,
  980 + $self: true,
  981 + $frame: true,
  982 + $frames: true,
  983 + $frameElement: true,
  984 + $webkitIndexedDB: true,
  985 + $webkitStorageInfo: true,
  986 + $external: true
  987 +};
  988 +var hasAutomationEqualityBug = (function () {
  989 + /* globals window */
  990 + if (typeof window === 'undefined') { return false; }
  991 + for (var k in window) {
  992 + try {
  993 + if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') {
  994 + equalsConstructorPrototype(window[k]);
  995 + }
  996 + } catch (e) {
  997 + return true;
  998 + }
  999 + }
  1000 + return false;
  1001 +}());
  1002 +var equalsConstructorPrototypeIfNotBuggy = function (object) {
  1003 + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { return equalsConstructorPrototype(object); }
  1004 + try {
  1005 + return equalsConstructorPrototype(object);
  1006 + } catch (e) {
  1007 + return false;
  1008 + }
  1009 +};
  1010 +var dontEnums = [
  1011 + 'toString',
  1012 + 'toLocaleString',
  1013 + 'valueOf',
  1014 + 'hasOwnProperty',
  1015 + 'isPrototypeOf',
  1016 + 'propertyIsEnumerable',
  1017 + 'constructor'
  1018 +];
  1019 +var dontEnumsLength = dontEnums.length;
  1020 +
  1021 +// taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js
  1022 +// can be replaced with require('is-arguments') if we ever use a build process instead
  1023 +var isStandardArguments = function isArguments(value) {
  1024 + return toStr(value) === '[object Arguments]';
  1025 +};
  1026 +var isLegacyArguments = function isArguments(value) {
  1027 + return value !== null &&
  1028 + typeof value === 'object' &&
  1029 + typeof value.length === 'number' &&
  1030 + value.length >= 0 &&
  1031 + !isArray(value) &&
  1032 + isCallable(value.callee);
  1033 +};
  1034 +var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments;
  1035 +
  1036 +defineProperties($Object, {
  1037 + keys: function keys(object) {
  1038 + var isFn = isCallable(object);
  1039 + var isArgs = isArguments(object);
  1040 + var isObject = object !== null && typeof object === 'object';
  1041 + var isStr = isObject && isString(object);
  1042 +
  1043 + if (!isObject && !isFn && !isArgs) {
  1044 + throw new TypeError('Object.keys called on a non-object');
  1045 + }
  1046 +
  1047 + var theKeys = [];
  1048 + var skipProto = hasProtoEnumBug && isFn;
  1049 + if ((isStr && hasStringEnumBug) || isArgs) {
  1050 + for (var i = 0; i < object.length; ++i) {
  1051 + pushCall(theKeys, $String(i));
  1052 + }
  1053 + }
  1054 +
  1055 + if (!isArgs) {
  1056 + for (var name in object) {
  1057 + if (!(skipProto && name === 'prototype') && owns(object, name)) {
  1058 + pushCall(theKeys, $String(name));
  1059 + }
  1060 + }
  1061 + }
  1062 +
  1063 + if (hasDontEnumBug) {
  1064 + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
  1065 + for (var j = 0; j < dontEnumsLength; j++) {
  1066 + var dontEnum = dontEnums[j];
  1067 + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) {
  1068 + pushCall(theKeys, dontEnum);
  1069 + }
  1070 + }
  1071 + }
  1072 + return theKeys;
  1073 + }
  1074 +});
  1075 +
  1076 +var keysWorksWithArguments = $Object.keys && (function () {
  1077 + // Safari 5.0 bug
  1078 + return $Object.keys(arguments).length === 2;
  1079 +}(1, 2));
  1080 +var keysHasArgumentsLengthBug = $Object.keys && (function () {
  1081 + var argKeys = $Object.keys(arguments);
  1082 + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1;
  1083 +}(1));
  1084 +var originalKeys = $Object.keys;
  1085 +defineProperties($Object, {
  1086 + keys: function keys(object) {
  1087 + if (isArguments(object)) {
  1088 + return originalKeys(arraySlice(object));
  1089 + } else {
  1090 + return originalKeys(object);
  1091 + }
  1092 + }
  1093 +}, !keysWorksWithArguments || keysHasArgumentsLengthBug);
  1094 +
  1095 +//
  1096 +// Date
  1097 +// ====
  1098 +//
  1099 +
  1100 +var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0;
  1101 +var aNegativeTestDate = new Date(-1509842289600292);
  1102 +var aPositiveTestDate = new Date(1449662400000);
  1103 +var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT';
  1104 +var hasToDateStringFormatBug;
  1105 +var hasToStringFormatBug;
  1106 +var timeZoneOffset = aNegativeTestDate.getTimezoneOffset();
  1107 +if (timeZoneOffset < -720) {
  1108 + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875';
  1109 + hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString());
  1110 +} else {
  1111 + hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875';
  1112 + hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString());
  1113 +}
  1114 +
  1115 +var originalGetFullYear = call.bind(Date.prototype.getFullYear);
  1116 +var originalGetMonth = call.bind(Date.prototype.getMonth);
  1117 +var originalGetDate = call.bind(Date.prototype.getDate);
  1118 +var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear);
  1119 +var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth);
  1120 +var originalGetUTCDate = call.bind(Date.prototype.getUTCDate);
  1121 +var originalGetUTCDay = call.bind(Date.prototype.getUTCDay);
  1122 +var originalGetUTCHours = call.bind(Date.prototype.getUTCHours);
  1123 +var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes);
  1124 +var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds);
  1125 +var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds);
  1126 +var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
  1127 +var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
  1128 +var daysInMonth = function daysInMonth(month, year) {
  1129 + return originalGetDate(new Date(year, month, 0));
  1130 +};
  1131 +
  1132 +defineProperties(Date.prototype, {
  1133 + getFullYear: function getFullYear() {
  1134 + if (!this || !(this instanceof Date)) {
  1135 + throw new TypeError('this is not a Date object.');
  1136 + }
  1137 + var year = originalGetFullYear(this);
  1138 + if (year < 0 && originalGetMonth(this) > 11) {
  1139 + return year + 1;
  1140 + }
  1141 + return year;
  1142 + },
  1143 + getMonth: function getMonth() {
  1144 + if (!this || !(this instanceof Date)) {
  1145 + throw new TypeError('this is not a Date object.');
  1146 + }
  1147 + var year = originalGetFullYear(this);
  1148 + var month = originalGetMonth(this);
  1149 + if (year < 0 && month > 11) {
  1150 + return 0;
  1151 + }
  1152 + return month;
  1153 + },
  1154 + getDate: function getDate() {
  1155 + if (!this || !(this instanceof Date)) {
  1156 + throw new TypeError('this is not a Date object.');
  1157 + }
  1158 + var year = originalGetFullYear(this);
  1159 + var month = originalGetMonth(this);
  1160 + var date = originalGetDate(this);
  1161 + if (year < 0 && month > 11) {
  1162 + if (month === 12) {
  1163 + return date;
  1164 + }
  1165 + var days = daysInMonth(0, year + 1);
  1166 + return (days - date) + 1;
  1167 + }
  1168 + return date;
  1169 + },
  1170 + getUTCFullYear: function getUTCFullYear() {
  1171 + if (!this || !(this instanceof Date)) {
  1172 + throw new TypeError('this is not a Date object.');
  1173 + }
  1174 + var year = originalGetUTCFullYear(this);
  1175 + if (year < 0 && originalGetUTCMonth(this) > 11) {
  1176 + return year + 1;
  1177 + }
  1178 + return year;
  1179 + },
  1180 + getUTCMonth: function getUTCMonth() {
  1181 + if (!this || !(this instanceof Date)) {
  1182 + throw new TypeError('this is not a Date object.');
  1183 + }
  1184 + var year = originalGetUTCFullYear(this);
  1185 + var month = originalGetUTCMonth(this);
  1186 + if (year < 0 && month > 11) {
  1187 + return 0;
  1188 + }
  1189 + return month;
  1190 + },
  1191 + getUTCDate: function getUTCDate() {
  1192 + if (!this || !(this instanceof Date)) {
  1193 + throw new TypeError('this is not a Date object.');
  1194 + }
  1195 + var year = originalGetUTCFullYear(this);
  1196 + var month = originalGetUTCMonth(this);
  1197 + var date = originalGetUTCDate(this);
  1198 + if (year < 0 && month > 11) {
  1199 + if (month === 12) {
  1200 + return date;
  1201 + }
  1202 + var days = daysInMonth(0, year + 1);
  1203 + return (days - date) + 1;
  1204 + }
  1205 + return date;
  1206 + }
  1207 +}, hasNegativeMonthYearBug);
  1208 +
  1209 +defineProperties(Date.prototype, {
  1210 + toUTCString: function toUTCString() {
  1211 + if (!this || !(this instanceof Date)) {
  1212 + throw new TypeError('this is not a Date object.');
  1213 + }
  1214 + var day = originalGetUTCDay(this);
  1215 + var date = originalGetUTCDate(this);
  1216 + var month = originalGetUTCMonth(this);
  1217 + var year = originalGetUTCFullYear(this);
  1218 + var hour = originalGetUTCHours(this);
  1219 + var minute = originalGetUTCMinutes(this);
  1220 + var second = originalGetUTCSeconds(this);
  1221 + return dayName[day] + ', ' +
  1222 + (date < 10 ? '0' + date : date) + ' ' +
  1223 + monthName[month] + ' ' +
  1224 + year + ' ' +
  1225 + (hour < 10 ? '0' + hour : hour) + ':' +
  1226 + (minute < 10 ? '0' + minute : minute) + ':' +
  1227 + (second < 10 ? '0' + second : second) + ' GMT';
  1228 + }
  1229 +}, hasNegativeMonthYearBug || hasToUTCStringFormatBug);
  1230 +
  1231 +// Opera 12 has `,`
  1232 +defineProperties(Date.prototype, {
  1233 + toDateString: function toDateString() {
  1234 + if (!this || !(this instanceof Date)) {
  1235 + throw new TypeError('this is not a Date object.');
  1236 + }
  1237 + var day = this.getDay();
  1238 + var date = this.getDate();
  1239 + var month = this.getMonth();
  1240 + var year = this.getFullYear();
  1241 + return dayName[day] + ' ' +
  1242 + monthName[month] + ' ' +
  1243 + (date < 10 ? '0' + date : date) + ' ' +
  1244 + year;
  1245 + }
  1246 +}, hasNegativeMonthYearBug || hasToDateStringFormatBug);
  1247 +
  1248 +// can't use defineProperties here because of toString enumeration issue in IE <= 8
  1249 +if (hasNegativeMonthYearBug || hasToStringFormatBug) {
  1250 + Date.prototype.toString = function toString() {
  1251 + if (!this || !(this instanceof Date)) {
  1252 + throw new TypeError('this is not a Date object.');
  1253 + }
  1254 + var day = this.getDay();
  1255 + var date = this.getDate();
  1256 + var month = this.getMonth();
  1257 + var year = this.getFullYear();
  1258 + var hour = this.getHours();
  1259 + var minute = this.getMinutes();
  1260 + var second = this.getSeconds();
  1261 + var timezoneOffset = this.getTimezoneOffset();
  1262 + var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60);
  1263 + var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60);
  1264 + return dayName[day] + ' ' +
  1265 + monthName[month] + ' ' +
  1266 + (date < 10 ? '0' + date : date) + ' ' +
  1267 + year + ' ' +
  1268 + (hour < 10 ? '0' + hour : hour) + ':' +
  1269 + (minute < 10 ? '0' + minute : minute) + ':' +
  1270 + (second < 10 ? '0' + second : second) + ' GMT' +
  1271 + (timezoneOffset > 0 ? '-' : '+') +
  1272 + (hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) +
  1273 + (minutesOffset < 10 ? '0' + minutesOffset : minutesOffset);
  1274 + };
  1275 + if (supportsDescriptors) {
  1276 + $Object.defineProperty(Date.prototype, 'toString', {
  1277 + configurable: true,
  1278 + enumerable: false,
  1279 + writable: true
  1280 + });
  1281 + }
  1282 +}
  1283 +
  1284 +// ES5 15.9.5.43
  1285 +// http://es5.github.com/#x15.9.5.43
  1286 +// This function returns a String value represent the instance in time
  1287 +// represented by this Date object. The format of the String is the Date Time
  1288 +// string format defined in 15.9.1.15. All fields are present in the String.
  1289 +// The time zone is always UTC, denoted by the suffix Z. If the time value of
  1290 +// this object is not a finite Number a RangeError exception is thrown.
  1291 +var negativeDate = -62198755200000;
  1292 +var negativeYearString = '-000001';
  1293 +var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1;
  1294 +var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z';
  1295 +
  1296 +var getTime = call.bind(Date.prototype.getTime);
  1297 +
  1298 +defineProperties(Date.prototype, {
  1299 + toISOString: function toISOString() {
  1300 + if (!isFinite(this) || !isFinite(getTime(this))) {
  1301 + // Adope Photoshop requires the second check.
  1302 + throw new RangeError('Date.prototype.toISOString called on non-finite value.');
  1303 + }
  1304 +
  1305 + var year = originalGetUTCFullYear(this);
  1306 +
  1307 + var month = originalGetUTCMonth(this);
  1308 + // see https://github.com/es-shims/es5-shim/issues/111
  1309 + year += Math.floor(month / 12);
  1310 + month = (month % 12 + 12) % 12;
  1311 +
  1312 + // the date time string format is specified in 15.9.1.15.
  1313 + var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)];
  1314 + year = (
  1315 + (year < 0 ? '-' : (year > 9999 ? '+' : '')) +
  1316 + strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6)
  1317 + );
  1318 +
  1319 + for (var i = 0; i < result.length; ++i) {
  1320 + // pad months, days, hours, minutes, and seconds to have two digits.
  1321 + result[i] = strSlice('00' + result[i], -2);
  1322 + }
  1323 + // pad milliseconds to have three digits.
  1324 + return (
  1325 + year + '-' + arraySlice(result, 0, 2).join('-') +
  1326 + 'T' + arraySlice(result, 2).join(':') + '.' +
  1327 + strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z'
  1328 + );
  1329 + }
  1330 +}, hasNegativeDateBug || hasSafari51DateBug);
  1331 +
  1332 +// ES5 15.9.5.44
  1333 +// http://es5.github.com/#x15.9.5.44
  1334 +// This function provides a String representation of a Date object for use by
  1335 +// JSON.stringify (15.12.3).
  1336 +var dateToJSONIsSupported = (function () {
  1337 + try {
  1338 + return Date.prototype.toJSON &&
  1339 + new Date(NaN).toJSON() === null &&
  1340 + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 &&
  1341 + Date.prototype.toJSON.call({ // generic
  1342 + toISOString: function () { return true; }
  1343 + });
  1344 + } catch (e) {
  1345 + return false;
  1346 + }
  1347 +}());
  1348 +if (!dateToJSONIsSupported) {
  1349 + Date.prototype.toJSON = function toJSON(key) {
  1350 + // When the toJSON method is called with argument key, the following
  1351 + // steps are taken:
  1352 +
  1353 + // 1. Let O be the result of calling ToObject, giving it the this
  1354 + // value as its argument.
  1355 + // 2. Let tv be ES.ToPrimitive(O, hint Number).
  1356 + var O = $Object(this);
  1357 + var tv = ES.ToPrimitive(O);
  1358 + // 3. If tv is a Number and is not finite, return null.
  1359 + if (typeof tv === 'number' && !isFinite(tv)) {
  1360 + return null;
  1361 + }
  1362 + // 4. Let toISO be the result of calling the [[Get]] internal method of
  1363 + // O with argument "toISOString".
  1364 + var toISO = O.toISOString;
  1365 + // 5. If IsCallable(toISO) is false, throw a TypeError exception.
  1366 + if (!isCallable(toISO)) {
  1367 + throw new TypeError('toISOString property is not callable');
  1368 + }
  1369 + // 6. Return the result of calling the [[Call]] internal method of
  1370 + // toISO with O as the this value and an empty argument list.
  1371 + return toISO.call(O);
  1372 +
  1373 + // NOTE 1 The argument is ignored.
  1374 +
  1375 + // NOTE 2 The toJSON function is intentionally generic; it does not
  1376 + // require that its this value be a Date object. Therefore, it can be
  1377 + // transferred to other kinds of objects for use as a method. However,
  1378 + // it does require that any such object have a toISOString method. An
  1379 + // object is free to use the argument key to filter its
  1380 + // stringification.
  1381 + };
  1382 +}
  1383 +
  1384 +// ES5 15.9.4.2
  1385 +// http://es5.github.com/#x15.9.4.2
  1386 +// based on work shared by Daniel Friesen (dantman)
  1387 +// http://gist.github.com/303249
  1388 +var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15;
  1389 +var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z'));
  1390 +var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z'));
  1391 +if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) {
  1392 + // XXX global assignment won't work in embeddings that use
  1393 + // an alternate object for the context.
  1394 + /* global Date: true */
  1395 + /* eslint-disable no-undef */
  1396 + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1;
  1397 + var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime());
  1398 + /* eslint-disable no-implicit-globals */
  1399 + Date = (function (NativeDate) {
  1400 + /* eslint-enable no-implicit-globals */
  1401 + /* eslint-enable no-undef */
  1402 + // Date.length === 7
  1403 + var DateShim = function Date(Y, M, D, h, m, s, ms) {
  1404 + var length = arguments.length;
  1405 + var date;
  1406 + if (this instanceof NativeDate) {
  1407 + var seconds = s;
  1408 + var millis = ms;
  1409 + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) {
  1410 + // work around a Safari 8/9 bug where it treats the seconds as signed
  1411 + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit;
  1412 + var sToShift = Math.floor(msToShift / 1e3);
  1413 + seconds += sToShift;
  1414 + millis -= sToShift * 1e3;
  1415 + }
  1416 + date = length === 1 && $String(Y) === Y ? // isString(Y)
  1417 + // We explicitly pass it through parse:
  1418 + new NativeDate(DateShim.parse(Y)) :
  1419 + // We have to manually make calls depending on argument
  1420 + // length here
  1421 + length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) :
  1422 + length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) :
  1423 + length >= 5 ? new NativeDate(Y, M, D, h, m) :
  1424 + length >= 4 ? new NativeDate(Y, M, D, h) :
  1425 + length >= 3 ? new NativeDate(Y, M, D) :
  1426 + length >= 2 ? new NativeDate(Y, M) :
  1427 + length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) :
  1428 + new NativeDate();
  1429 + } else {
  1430 + date = NativeDate.apply(this, arguments);
  1431 + }
  1432 + if (!isPrimitive(date)) {
  1433 + // Prevent mixups with unfixed Date object
  1434 + defineProperties(date, { constructor: DateShim }, true);
  1435 + }
  1436 + return date;
  1437 + };
  1438 +
  1439 + // 15.9.1.15 Date Time String Format.
  1440 + var isoDateExpression = new RegExp('^' +
  1441 + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign +
  1442 + // 6-digit extended year
  1443 + '(?:-(\\d{2})' + // optional month capture
  1444 + '(?:-(\\d{2})' + // optional day capture
  1445 + '(?:' + // capture hours:minutes:seconds.milliseconds
  1446 + 'T(\\d{2})' + // hours capture
  1447 + ':(\\d{2})' + // minutes capture
  1448 + '(?:' + // optional :seconds.milliseconds
  1449 + ':(\\d{2})' + // seconds capture
  1450 + '(?:(\\.\\d{1,}))?' + // milliseconds capture
  1451 + ')?' +
  1452 + '(' + // capture UTC offset component
  1453 + 'Z|' + // UTC capture
  1454 + '(?:' + // offset specifier +/-hours:minutes
  1455 + '([-+])' + // sign capture
  1456 + '(\\d{2})' + // hours offset capture
  1457 + ':(\\d{2})' + // minutes offset capture
  1458 + ')' +
  1459 + ')?)?)?)?' +
  1460 + '$');
  1461 +
  1462 + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];
  1463 +
  1464 + var dayFromMonth = function dayFromMonth(year, month) {
  1465 + var t = month > 1 ? 1 : 0;
  1466 + return (
  1467 + months[month] +
  1468 + Math.floor((year - 1969 + t) / 4) -
  1469 + Math.floor((year - 1901 + t) / 100) +
  1470 + Math.floor((year - 1601 + t) / 400) +
  1471 + 365 * (year - 1970)
  1472 + );
  1473 + };
  1474 +
  1475 + var toUTC = function toUTC(t) {
  1476 + var s = 0;
  1477 + var ms = t;
  1478 + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) {
  1479 + // work around a Safari 8/9 bug where it treats the seconds as signed
  1480 + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit;
  1481 + var sToShift = Math.floor(msToShift / 1e3);
  1482 + s += sToShift;
  1483 + ms -= sToShift * 1e3;
  1484 + }
  1485 + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms));
  1486 + };
  1487 +
  1488 + // Copy any custom methods a 3rd party library may have added
  1489 + for (var key in NativeDate) {
  1490 + if (owns(NativeDate, key)) {
  1491 + DateShim[key] = NativeDate[key];
  1492 + }
  1493 + }
  1494 +
  1495 + // Copy "native" methods explicitly; they may be non-enumerable
  1496 + defineProperties(DateShim, {
  1497 + now: NativeDate.now,
  1498 + UTC: NativeDate.UTC
  1499 + }, true);
  1500 + DateShim.prototype = NativeDate.prototype;
  1501 + defineProperties(DateShim.prototype, {
  1502 + constructor: DateShim
  1503 + }, true);
  1504 +
  1505 + // Upgrade Date.parse to handle simplified ISO 8601 strings
  1506 + var parseShim = function parse(string) {
  1507 + var match = isoDateExpression.exec(string);
  1508 + if (match) {
  1509 + // parse months, days, hours, minutes, seconds, and milliseconds
  1510 + // provide default values if necessary
  1511 + // parse the UTC offset component
  1512 + var year = $Number(match[1]),
  1513 + month = $Number(match[2] || 1) - 1,
  1514 + day = $Number(match[3] || 1) - 1,
  1515 + hour = $Number(match[4] || 0),
  1516 + minute = $Number(match[5] || 0),
  1517 + second = $Number(match[6] || 0),
  1518 + millisecond = Math.floor($Number(match[7] || 0) * 1000),
  1519 + // When time zone is missed, local offset should be used
  1520 + // (ES 5.1 bug)
  1521 + // see https://bugs.ecmascript.org/show_bug.cgi?id=112
  1522 + isLocalTime = Boolean(match[4] && !match[8]),
  1523 + signOffset = match[9] === '-' ? 1 : -1,
  1524 + hourOffset = $Number(match[10] || 0),
  1525 + minuteOffset = $Number(match[11] || 0),
  1526 + result;
  1527 + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0;
  1528 + if (
  1529 + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) &&
  1530 + minute < 60 && second < 60 && millisecond < 1000 &&
  1531 + month > -1 && month < 12 && hourOffset < 24 &&
  1532 + minuteOffset < 60 && // detect invalid offsets
  1533 + day > -1 &&
  1534 + day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month))
  1535 + ) {
  1536 + result = (
  1537 + (dayFromMonth(year, month) + day) * 24 +
  1538 + hour +
  1539 + hourOffset * signOffset
  1540 + ) * 60;
  1541 + result = (
  1542 + (result + minute + minuteOffset * signOffset) * 60 +
  1543 + second
  1544 + ) * 1000 + millisecond;
  1545 + if (isLocalTime) {
  1546 + result = toUTC(result);
  1547 + }
  1548 + if (-8.64e15 <= result && result <= 8.64e15) {
  1549 + return result;
  1550 + }
  1551 + }
  1552 + return NaN;
  1553 + }
  1554 + return NativeDate.parse.apply(this, arguments);
  1555 + };
  1556 + defineProperties(DateShim, { parse: parseShim });
  1557 +
  1558 + return DateShim;
  1559 + }(Date));
  1560 + /* global Date: false */
  1561 +}
  1562 +
  1563 +// ES5 15.9.4.4
  1564 +// http://es5.github.com/#x15.9.4.4
  1565 +if (!Date.now) {
  1566 + Date.now = function now() {
  1567 + return new Date().getTime();
  1568 + };
  1569 +}
  1570 +
  1571 +//
  1572 +// Number
  1573 +// ======
  1574 +//
  1575 +
  1576 +// ES5.1 15.7.4.5
  1577 +// http://es5.github.com/#x15.7.4.5
  1578 +var hasToFixedBugs = NumberPrototype.toFixed && (
  1579 + (0.00008).toFixed(3) !== '0.000' ||
  1580 + (0.9).toFixed(0) !== '1' ||
  1581 + (1.255).toFixed(2) !== '1.25' ||
  1582 + (1000000000000000128).toFixed(0) !== '1000000000000000128'
  1583 +);
  1584 +
  1585 +var toFixedHelpers = {
  1586 + base: 1e7,
  1587 + size: 6,
  1588 + data: [0, 0, 0, 0, 0, 0],
  1589 + multiply: function multiply(n, c) {
  1590 + var i = -1;
  1591 + var c2 = c;
  1592 + while (++i < toFixedHelpers.size) {
  1593 + c2 += n * toFixedHelpers.data[i];
  1594 + toFixedHelpers.data[i] = c2 % toFixedHelpers.base;
  1595 + c2 = Math.floor(c2 / toFixedHelpers.base);
  1596 + }
  1597 + },
  1598 + divide: function divide(n) {
  1599 + var i = toFixedHelpers.size;
  1600 + var c = 0;
  1601 + while (--i >= 0) {
  1602 + c += toFixedHelpers.data[i];
  1603 + toFixedHelpers.data[i] = Math.floor(c / n);
  1604 + c = (c % n) * toFixedHelpers.base;
  1605 + }
  1606 + },
  1607 + numToString: function numToString() {
  1608 + var i = toFixedHelpers.size;
  1609 + var s = '';
  1610 + while (--i >= 0) {
  1611 + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) {
  1612 + var t = $String(toFixedHelpers.data[i]);
  1613 + if (s === '') {
  1614 + s = t;
  1615 + } else {
  1616 + s += strSlice('0000000', 0, 7 - t.length) + t;
  1617 + }
  1618 + }
  1619 + }
  1620 + return s;
  1621 + },
  1622 + pow: function pow(x, n, acc) {
  1623 + return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc)));
  1624 + },
  1625 + log: function log(x) {
  1626 + var n = 0;
  1627 + var x2 = x;
  1628 + while (x2 >= 4096) {
  1629 + n += 12;
  1630 + x2 /= 4096;
  1631 + }
  1632 + while (x2 >= 2) {
  1633 + n += 1;
  1634 + x2 /= 2;
  1635 + }
  1636 + return n;
  1637 + }
  1638 +};
  1639 +
  1640 +var toFixedShim = function toFixed(fractionDigits) {
  1641 + var f, x, s, m, e, z, j, k;
  1642 +
  1643 + // Test for NaN and round fractionDigits down
  1644 + f = $Number(fractionDigits);
  1645 + f = isActualNaN(f) ? 0 : Math.floor(f);
  1646 +
  1647 + if (f < 0 || f > 20) {
  1648 + throw new RangeError('Number.toFixed called with invalid number of decimals');
  1649 + }
  1650 +
  1651 + x = $Number(this);
  1652 +
  1653 + if (isActualNaN(x)) {
  1654 + return 'NaN';
  1655 + }
  1656 +
  1657 + // If it is too big or small, return the string value of the number
  1658 + if (x <= -1e21 || x >= 1e21) {
  1659 + return $String(x);
  1660 + }
  1661 +
  1662 + s = '';
  1663 +
  1664 + if (x < 0) {
  1665 + s = '-';
  1666 + x = -x;
  1667 + }
  1668 +
  1669 + m = '0';
  1670 +
  1671 + if (x > 1e-21) {
  1672 + // 1e-21 < x < 1e21
  1673 + // -70 < log2(x) < 70
  1674 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69;
  1675 + z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1));
  1676 + z *= 0x10000000000000; // Math.pow(2, 52);
  1677 + e = 52 - e;
  1678 +
  1679 + // -18 < e < 122
  1680 + // x = z / 2 ^ e
  1681 + if (e > 0) {
  1682 + toFixedHelpers.multiply(0, z);
  1683 + j = f;
  1684 +
  1685 + while (j >= 7) {
  1686 + toFixedHelpers.multiply(1e7, 0);
  1687 + j -= 7;
  1688 + }
  1689 +
  1690 + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0);
  1691 + j = e - 1;
  1692 +
  1693 + while (j >= 23) {
  1694 + toFixedHelpers.divide(1 << 23);
  1695 + j -= 23;
  1696 + }
  1697 +
  1698 + toFixedHelpers.divide(1 << j);
  1699 + toFixedHelpers.multiply(1, 1);
  1700 + toFixedHelpers.divide(2);
  1701 + m = toFixedHelpers.numToString();
  1702 + } else {
  1703 + toFixedHelpers.multiply(0, z);
  1704 + toFixedHelpers.multiply(1 << (-e), 0);
  1705 + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f);
  1706 + }
  1707 + }
  1708 +
  1709 + if (f > 0) {
  1710 + k = m.length;
  1711 +
  1712 + if (k <= f) {
  1713 + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m;
  1714 + } else {
  1715 + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f);
  1716 + }
  1717 + } else {
  1718 + m = s + m;
  1719 + }
  1720 +
  1721 + return m;
  1722 +};
  1723 +defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs);
  1724 +
  1725 +var hasToPrecisionUndefinedBug = (function () {
  1726 + try {
  1727 + return 1.0.toPrecision(undefined) === '1';
  1728 + } catch (e) {
  1729 + return true;
  1730 + }
  1731 +}());
  1732 +var originalToPrecision = NumberPrototype.toPrecision;
  1733 +defineProperties(NumberPrototype, {
  1734 + toPrecision: function toPrecision(precision) {
  1735 + return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision);
  1736 + }
  1737 +}, hasToPrecisionUndefinedBug);
  1738 +
  1739 +//
  1740 +// String
  1741 +// ======
  1742 +//
  1743 +
  1744 +// ES5 15.5.4.14
  1745 +// http://es5.github.com/#x15.5.4.14
  1746 +
  1747 +// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
  1748 +// Many browsers do not split properly with regular expressions or they
  1749 +// do not perform the split correctly under obscure conditions.
  1750 +// See http://blog.stevenlevithan.com/archives/cross-browser-split
  1751 +// I've tested in many browsers and this seems to cover the deviant ones:
  1752 +// 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
  1753 +// '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
  1754 +// 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
  1755 +// [undefined, "t", undefined, "e", ...]
  1756 +// ''.split(/.?/) should be [], not [""]
  1757 +// '.'.split(/()()/) should be ["."], not ["", "", "."]
  1758 +
  1759 +if (
  1760 + 'ab'.split(/(?:ab)*/).length !== 2 ||
  1761 + '.'.split(/(.?)(.?)/).length !== 4 ||
  1762 + 'tesst'.split(/(s)*/)[1] === 't' ||
  1763 + 'test'.split(/(?:)/, -1).length !== 4 ||
  1764 + ''.split(/.?/).length ||
  1765 + '.'.split(/()()/).length > 1
  1766 +) {
  1767 + (function () {
  1768 + var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group
  1769 + var maxSafe32BitInt = Math.pow(2, 32) - 1;
  1770 +
  1771 + StringPrototype.split = function (separator, limit) {
  1772 + var string = String(this);
  1773 + if (typeof separator === 'undefined' && limit === 0) {
  1774 + return [];
  1775 + }
  1776 +
  1777 + // If `separator` is not a regex, use native split
  1778 + if (!isRegex(separator)) {
  1779 + return strSplit(this, separator, limit);
  1780 + }
  1781 +
  1782 + var output = [];
  1783 + var flags = (separator.ignoreCase ? 'i' : '') +
  1784 + (separator.multiline ? 'm' : '') +
  1785 + (separator.unicode ? 'u' : '') + // in ES6
  1786 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6
  1787 + lastLastIndex = 0,
  1788 + // Make `global` and avoid `lastIndex` issues by working with a copy
  1789 + separator2, match, lastIndex, lastLength;
  1790 + var separatorCopy = new RegExp(separator.source, flags + 'g');
  1791 + if (!compliantExecNpcg) {
  1792 + // Doesn't need flags gy, but they don't hurt
  1793 + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
  1794 + }
  1795 + /* Values for `limit`, per the spec:
  1796 + * If undefined: 4294967295 // maxSafe32BitInt
  1797 + * If 0, Infinity, or NaN: 0
  1798 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
  1799 + * If negative number: 4294967296 - Math.floor(Math.abs(limit))
  1800 + * If other: Type-convert, then use the above rules
  1801 + */
  1802 + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit);
  1803 + match = separatorCopy.exec(string);
  1804 + while (match) {
  1805 + // `separatorCopy.lastIndex` is not reliable cross-browser
  1806 + lastIndex = match.index + match[0].length;
  1807 + if (lastIndex > lastLastIndex) {
  1808 + pushCall(output, strSlice(string, lastLastIndex, match.index));
  1809 + // Fix browsers whose `exec` methods don't consistently return `undefined` for
  1810 + // nonparticipating capturing groups
  1811 + if (!compliantExecNpcg && match.length > 1) {
  1812 + /* eslint-disable no-loop-func */
  1813 + match[0].replace(separator2, function () {
  1814 + for (var i = 1; i < arguments.length - 2; i++) {
  1815 + if (typeof arguments[i] === 'undefined') {
  1816 + match[i] = void 0;
  1817 + }
  1818 + }
  1819 + });
  1820 + /* eslint-enable no-loop-func */
  1821 + }
  1822 + if (match.length > 1 && match.index < string.length) {
  1823 + array_push.apply(output, arraySlice(match, 1));
  1824 + }
  1825 + lastLength = match[0].length;
  1826 + lastLastIndex = lastIndex;
  1827 + if (output.length >= splitLimit) {
  1828 + break;
  1829 + }
  1830 + }
  1831 + if (separatorCopy.lastIndex === match.index) {
  1832 + separatorCopy.lastIndex++; // Avoid an infinite loop
  1833 + }
  1834 + match = separatorCopy.exec(string);
  1835 + }
  1836 + if (lastLastIndex === string.length) {
  1837 + if (lastLength || !separatorCopy.test('')) {
  1838 + pushCall(output, '');
  1839 + }
  1840 + } else {
  1841 + pushCall(output, strSlice(string, lastLastIndex));
  1842 + }
  1843 + return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output;
  1844 + };
  1845 + }());
  1846 +
  1847 +// [bugfix, chrome]
  1848 +// If separator is undefined, then the result array contains just one String,
  1849 +// which is the this value (converted to a String). If limit is not undefined,
  1850 +// then the output array is truncated so that it contains no more than limit
  1851 +// elements.
  1852 +// "0".split(undefined, 0) -> []
  1853 +} else if ('0'.split(void 0, 0).length) {
  1854 + StringPrototype.split = function split(separator, limit) {
  1855 + if (typeof separator === 'undefined' && limit === 0) { return []; }
  1856 + return strSplit(this, separator, limit);
  1857 + };
  1858 +}
  1859 +
  1860 +var str_replace = StringPrototype.replace;
  1861 +var replaceReportsGroupsCorrectly = (function () {
  1862 + var groups = [];
  1863 + 'x'.replace(/x(.)?/g, function (match, group) {
  1864 + pushCall(groups, group);
  1865 + });
  1866 + return groups.length === 1 && typeof groups[0] === 'undefined';
  1867 +}());
  1868 +
  1869 +if (!replaceReportsGroupsCorrectly) {
  1870 + StringPrototype.replace = function replace(searchValue, replaceValue) {
  1871 + var isFn = isCallable(replaceValue);
  1872 + var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source);
  1873 + if (!isFn || !hasCapturingGroups) {
  1874 + return str_replace.call(this, searchValue, replaceValue);
  1875 + } else {
  1876 + var wrappedReplaceValue = function (match) {
  1877 + var length = arguments.length;
  1878 + var originalLastIndex = searchValue.lastIndex;
  1879 + searchValue.lastIndex = 0;
  1880 + var args = searchValue.exec(match) || [];
  1881 + searchValue.lastIndex = originalLastIndex;
  1882 + pushCall(args, arguments[length - 2], arguments[length - 1]);
  1883 + return replaceValue.apply(this, args);
  1884 + };
  1885 + return str_replace.call(this, searchValue, wrappedReplaceValue);
  1886 + }
  1887 + };
  1888 +}
  1889 +
  1890 +// ECMA-262, 3rd B.2.3
  1891 +// Not an ECMAScript standard, although ECMAScript 3rd Edition has a
  1892 +// non-normative section suggesting uniform semantics and it should be
  1893 +// normalized across all browsers
  1894 +// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
  1895 +var string_substr = StringPrototype.substr;
  1896 +var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
  1897 +defineProperties(StringPrototype, {
  1898 + substr: function substr(start, length) {
  1899 + var normalizedStart = start;
  1900 + if (start < 0) {
  1901 + normalizedStart = max(this.length + start, 0);
  1902 + }
  1903 + return string_substr.call(this, normalizedStart, length);
  1904 + }
  1905 +}, hasNegativeSubstrBug);
  1906 +
  1907 +// ES5 15.5.4.20
  1908 +// whitespace from: http://es5.github.io/#x15.5.4.20
  1909 +var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  1910 + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' +
  1911 + '\u2029\uFEFF';
  1912 +var zeroWidth = '\u200b';
  1913 +var wsRegexChars = '[' + ws + ']';
  1914 +var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*');
  1915 +var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$');
  1916 +var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim());
  1917 +defineProperties(StringPrototype, {
  1918 + // http://blog.stevenlevithan.com/archives/faster-trim-javascript
  1919 + // http://perfectionkills.com/whitespace-deviations/
  1920 + trim: function trim() {
  1921 + if (typeof this === 'undefined' || this === null) {
  1922 + throw new TypeError("can't convert " + this + ' to object');
  1923 + }
  1924 + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, '');
  1925 + }
  1926 +}, hasTrimWhitespaceBug);
  1927 +var trim = call.bind(String.prototype.trim);
  1928 +
  1929 +var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1;
  1930 +defineProperties(StringPrototype, {
  1931 + lastIndexOf: function lastIndexOf(searchString) {
  1932 + if (typeof this === 'undefined' || this === null) {
  1933 + throw new TypeError("can't convert " + this + ' to object');
  1934 + }
  1935 + var S = $String(this);
  1936 + var searchStr = $String(searchString);
  1937 + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN;
  1938 + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos);
  1939 + var start = min(max(pos, 0), S.length);
  1940 + var searchLen = searchStr.length;
  1941 + var k = start + searchLen;
  1942 + while (k > 0) {
  1943 + k = max(0, k - searchLen);
  1944 + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr);
  1945 + if (index !== -1) {
  1946 + return k + index;
  1947 + }
  1948 + }
  1949 + return -1;
  1950 + }
  1951 +}, hasLastIndexBug);
  1952 +
  1953 +var originalLastIndexOf = StringPrototype.lastIndexOf;
  1954 +defineProperties(StringPrototype, {
  1955 + lastIndexOf: function lastIndexOf(searchString) {
  1956 + return originalLastIndexOf.apply(this, arguments);
  1957 + }
  1958 +}, StringPrototype.lastIndexOf.length !== 1);
  1959 +
  1960 +// ES-5 15.1.2.2
  1961 +/* eslint-disable radix */
  1962 +if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) {
  1963 +/* eslint-enable radix */
  1964 + /* global parseInt: true */
  1965 + parseInt = (function (origParseInt) {
  1966 + var hexRegex = /^[\-+]?0[xX]/;
  1967 + return function parseInt(str, radix) {
  1968 + var string = trim(str);
  1969 + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10);
  1970 + return origParseInt(string, defaultedRadix);
  1971 + };
  1972 + }(parseInt));
  1973 +}
  1974 +
  1975 +// https://es5.github.io/#x15.1.2.3
  1976 +if (1 / parseFloat('-0') !== -Infinity) {
  1977 + /* global parseFloat: true */
  1978 + parseFloat = (function (origParseFloat) {
  1979 + return function parseFloat(string) {
  1980 + var inputString = trim(string);
  1981 + var result = origParseFloat(inputString);
  1982 + return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result;
  1983 + };
  1984 + }(parseFloat));
  1985 +}
  1986 +
  1987 +if (String(new RangeError('test')) !== 'RangeError: test') {
  1988 + var errorToStringShim = function toString() {
  1989 + if (typeof this === 'undefined' || this === null) {
  1990 + throw new TypeError("can't convert " + this + ' to object');
  1991 + }
  1992 + var name = this.name;
  1993 + if (typeof name === 'undefined') {
  1994 + name = 'Error';
  1995 + } else if (typeof name !== 'string') {
  1996 + name = $String(name);
  1997 + }
  1998 + var msg = this.message;
  1999 + if (typeof msg === 'undefined') {
  2000 + msg = '';
  2001 + } else if (typeof msg !== 'string') {
  2002 + msg = $String(msg);
  2003 + }
  2004 + if (!name) {
  2005 + return msg;
  2006 + }
  2007 + if (!msg) {
  2008 + return name;
  2009 + }
  2010 + return name + ': ' + msg;
  2011 + };
  2012 + // can't use defineProperties here because of toString enumeration issue in IE <= 8
  2013 + Error.prototype.toString = errorToStringShim;
  2014 +}
  2015 +
  2016 +if (supportsDescriptors) {
  2017 + var ensureNonEnumerable = function (obj, prop) {
  2018 + if (isEnum(obj, prop)) {
  2019 + var desc = Object.getOwnPropertyDescriptor(obj, prop);
  2020 + desc.enumerable = false;
  2021 + Object.defineProperty(obj, prop, desc);
  2022 + }
  2023 + };
  2024 + ensureNonEnumerable(Error.prototype, 'message');
  2025 + if (Error.prototype.message !== '') {
  2026 + Error.prototype.message = '';
  2027 + }
  2028 + ensureNonEnumerable(Error.prototype, 'name');
  2029 +}
  2030 +
  2031 +if (String(/a/mig) !== '/a/gim') {
  2032 + var regexToString = function toString() {
  2033 + var str = '/' + this.source + '/';
  2034 + if (this.global) {
  2035 + str += 'g';
  2036 + }
  2037 + if (this.ignoreCase) {
  2038 + str += 'i';
  2039 + }
  2040 + if (this.multiline) {
  2041 + str += 'm';
  2042 + }
  2043 + return str;
  2044 + };
  2045 + // can't use defineProperties here because of toString enumeration issue in IE <= 8
  2046 + RegExp.prototype.toString = regexToString;
  2047 +}
  2048 +
  2049 +}));
  1 +{"version":3,"sources":["es5-shim.js"],"names":["root","factory","define","amd","exports","module","returnExports","this","$Array","Array","ArrayPrototype","prototype","$Object","Object","ObjectPrototype","$Function","Function","FunctionPrototype","$String","String","StringPrototype","$Number","Number","NumberPrototype","array_slice","slice","array_splice","splice","array_push","push","array_unshift","unshift","array_concat","concat","array_join","join","call","apply","max","Math","min","to_string","toString","hasToStringTag","Symbol","toStringTag","isCallable","fnToStr","constructorRegex","isES6ClassFn","value","fnStr","singleStripped","replace","multiStripped","spaceStripped","test","e","tryFunctionObject","fnClass","genClass","strClass","isRegex","regexExec","RegExp","exec","tryRegexExec","regexClass","isString","strValue","valueOf","tryStringObject","stringClass","supportsDescriptors","defineProperty","obj","enumerable","_","x","defineProperties","has","object","name","method","forceAssign","configurable","writable","map","hasOwnProperty","isPrimitive","input","type","isActualNaN","isNaN","ES","ToInteger","num","n","floor","abs","ToPrimitive","val","toStr","TypeError","ToObject","o","ToUint32","Empty","bind","that","target","args","arguments","bound","binder","result","boundLength","length","boundArgs","i","owns","arraySlice","arraySliceApply","strSlice","strSplit","split","strIndexOf","indexOf","pushCall","isEnum","propertyIsEnumerable","arraySort","sort","isArray","hasUnshiftReturnValueBug","boxedString","splitString","properlyBoxesContext","properlyBoxed","properlyBoxesNonStrict","properlyBoxesStrict","threwException","__","context","forEach","callbackfn","self","T","filter","every","some","reduceCoercesToObject","reduce","___","list","reduceRightCoercesToObject","reduceRight","hasFirefox2IndexOfBug","searchElement","hasFirefox2LastIndexOfBug","lastIndexOf","spliceNoopReturnsEmptyArray","a","start","deleteCount","spliceWorksWithEmptyObject","spliceWorksWithLargeSparseArrays","arr","spliceWorksWithSmallSparseArrays","O","A","len","relativeStart","actualStart","actualDeleteCount","k","from","items","itemCount","to","maxK","minK","originalJoin","hasStringJoinBug","separator","sep","hasJoinUndefinedBug","undefined","pushShim","item","pushIsNotGeneric","pushUndefinedIsWeird","end","sortIgnoresNonFunctions","sortThrowsOnRegex","sortIgnoresUndefined","compareFn","hasDontEnumBug","hasProtoEnumBug","hasStringEnumBug","equalsConstructorPrototype","ctor","constructor","blacklistedKeys","$window","$console","$parent","$self","$frame","$frames","$frameElement","$webkitIndexedDB","$webkitStorageInfo","$external","hasAutomationEqualityBug","window","equalsConstructorPrototypeIfNotBuggy","dontEnums","dontEnumsLength","isStandardArguments","isArguments","isLegacyArguments","callee","keys","isFn","isArgs","isObject","isStr","theKeys","skipProto","skipConstructor","j","dontEnum","keysWorksWithArguments","keysHasArgumentsLengthBug","argKeys","originalKeys","hasNegativeMonthYearBug","Date","getUTCMonth","aNegativeTestDate","aPositiveTestDate","hasToUTCStringFormatBug","toUTCString","hasToDateStringFormatBug","hasToStringFormatBug","timeZoneOffset","getTimezoneOffset","toDateString","originalGetFullYear","getFullYear","originalGetMonth","getMonth","originalGetDate","getDate","originalGetUTCFullYear","getUTCFullYear","originalGetUTCMonth","originalGetUTCDate","getUTCDate","originalGetUTCDay","getUTCDay","originalGetUTCHours","getUTCHours","originalGetUTCMinutes","getUTCMinutes","originalGetUTCSeconds","getUTCSeconds","originalGetUTCMilliseconds","getUTCMilliseconds","dayName","monthName","daysInMonth","month","year","date","days","day","hour","minute","second","getDay","getHours","getMinutes","getSeconds","timezoneOffset","hoursOffset","minutesOffset","negativeDate","negativeYearString","hasNegativeDateBug","toISOString","hasSafari51DateBug","getTime","isFinite","RangeError","dateToJSONIsSupported","toJSON","NaN","key","tv","toISO","supportsExtendedYears","parse","acceptsInvalidDates","doesNotParseY2KNewYear","maxSafeUnsigned32Bit","pow","hasSafariSignedIntBug","NativeDate","DateShim","Y","M","D","h","m","s","ms","seconds","millis","msToShift","sToShift","isoDateExpression","months","dayFromMonth","t","toUTC","now","UTC","parseShim","string","match","millisecond","isLocalTime","Boolean","signOffset","hourOffset","minuteOffset","hasMinutesOrSecondsOrMilliseconds","hasToFixedBugs","toFixed","toFixedHelpers","base","size","data","multiply","c","c2","divide","numToString","acc","log","x2","toFixedShim","fractionDigits","f","z","hasToPrecisionUndefinedBug","toPrecision","originalToPrecision","precision","compliantExecNpcg","maxSafe32BitInt","limit","output","flags","ignoreCase","multiline","unicode","sticky","lastLastIndex","separator2","lastIndex","lastLength","separatorCopy","source","splitLimit","index","str_replace","replaceReportsGroupsCorrectly","groups","group","searchValue","replaceValue","hasCapturingGroups","wrappedReplaceValue","originalLastIndex","string_substr","substr","hasNegativeSubstrBug","normalizedStart","ws","zeroWidth","wsRegexChars","trimBeginRegexp","trimEndRegexp","hasTrimWhitespaceBug","trim","hasLastIndexBug","searchString","S","searchStr","numPos","pos","Infinity","searchLen","originalLastIndexOf","parseInt","origParseInt","hexRegex","str","radix","defaultedRadix","parseFloat","origParseFloat","inputString","errorToStringShim","msg","message","Error","ensureNonEnumerable","prop","desc","getOwnPropertyDescriptor","regexToString","global"],"mappings":";;;;;CAaC,SAAUA,EAAMC,GACb,YAGA,UAAWC,UAAW,YAAcA,OAAOC,IAAK,CAE5CD,OAAOD,OACJ,UAAWG,WAAY,SAAU,CAIpCC,OAAOD,QAAUH,QACd,CAEHD,EAAKM,cAAgBL,OAE3BM,KAAM,WAcR,GAAIC,GAASC,KACb,IAAIC,GAAiBF,EAAOG,SAC5B,IAAIC,GAAUC,MACd,IAAIC,GAAkBF,EAAQD,SAC9B,IAAII,GAAYC,QAChB,IAAIC,GAAoBF,EAAUJ,SAClC,IAAIO,GAAUC,MACd,IAAIC,GAAkBF,EAAQP,SAC9B,IAAIU,GAAUC,MACd,IAAIC,GAAkBF,EAAQV,SAC9B,IAAIa,GAAcd,EAAee,KACjC,IAAIC,GAAehB,EAAeiB,MAClC,IAAIC,GAAalB,EAAemB,IAChC,IAAIC,GAAgBpB,EAAeqB,OACnC,IAAIC,GAAetB,EAAeuB,MAClC,IAAIC,GAAaxB,EAAeyB,IAChC,IAAIC,GAAOnB,EAAkBmB,IAC7B,IAAIC,GAAQpB,EAAkBoB,KAC9B,IAAIC,GAAMC,KAAKD,GACf,IAAIE,GAAMD,KAAKC,GAGf,IAAIC,GAAY3B,EAAgB4B,QAIhC,IAAIC,SAAwBC,UAAW,kBAAqBA,QAAOC,cAAgB,QACnF,IAAIC,EAA6D,IAAIC,GAAU/B,SAASL,UAAU+B,SAAUM,EAAmB,aAAcC,EAAe,QAASA,cAAaC,GAAS,IAAM,GAAIC,GAAQJ,EAAQX,KAAKc,EAAQ,IAAIE,GAAiBD,EAAME,QAAQ,YAAa,GAAK,IAAIC,GAAgBF,EAAeC,QAAQ,oBAAqB,GAAK,IAAIE,GAAgBD,EAAcD,QAAQ,OAAQ,KAAKA,QAAQ,QAAS,IAAM,OAAOL,GAAiBQ,KAAKD,G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W,CAChB2C,GAAO,IAEX,MAAOA,GAGX1V,QAAOrD,UAAU+B,SAAW8X"}
  1 +/*!
  2 + * https://github.com/es-shims/es5-shim
  3 + * @license es5-shim Copyright 2009-2015 by contributors, MIT License
  4 + * see https://github.com/es-shims/es5-shim/blob/v4.5.7/LICENSE
  5 + */
  6 +(function(t,r){"use strict";if(typeof define==="function"&&define.amd){define(r)}else if(typeof exports==="object"){module.exports=r()}else{t.returnExports=r()}})(this,function(){var t=Array;var r=t.prototype;var e=Object;var n=e.prototype;var i=Function;var a=i.prototype;var o=String;var f=o.prototype;var u=Number;var l=u.prototype;var s=r.slice;var c=r.splice;var v=r.push;var h=r.unshift;var p=r.concat;var y=r.join;var d=a.call;var g=a.apply;var w=Math.max;var b=Math.min;var T=n.toString;var m=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var D;var x=Function.prototype.toString,S=/^\s*class /,O=function isES6ClassFn(t){try{var r=x.call(t);var e=r.replace(/\/\/.*\n/g,"");var n=e.replace(/\/\*[.\s\S]*\*\//g,"");var i=n.replace(/\n/gm," ").replace(/ {2}/g," ");return S.test(i)}catch(a){return false}},E=function tryFunctionObject(t){try{if(O(t)){return false}x.call(t);return true}catch(r){return false}},j="[object Function]",I="[object GeneratorFunction]",D=function isCallable(t){if(!t){return false}if(typeof t!=="function"&&typeof t!=="object"){return false}if(m){return E(t)}if(O(t)){return false}var r=T.call(t);return r===j||r===I};var M;var U=RegExp.prototype.exec,F=function tryRegexExec(t){try{U.call(t);return true}catch(r){return false}},N="[object RegExp]";M=function isRegex(t){if(typeof t!=="object"){return false}return m?F(t):T.call(t)===N};var C;var k=String.prototype.valueOf,R=function tryStringObject(t){try{k.call(t);return true}catch(r){return false}},A="[object String]";C=function isString(t){if(typeof t==="string"){return true}if(typeof t!=="object"){return false}return m?R(t):T.call(t)===A};var P=e.defineProperty&&function(){try{var t={};e.defineProperty(t,"x",{enumerable:false,value:t});for(var r in t){return false}return t.x===t}catch(n){return false}}();var $=function(t){var r;if(P){r=function(t,r,n,i){if(!i&&r in t){return}e.defineProperty(t,r,{configurable:true,enumerable:false,writable:true,value:n})}}else{r=function(t,r,e,n){if(!n&&r in t){return}t[r]=e}}return function defineProperties(e,n,i){for(var a in n){if(t.call(n,a)){r(e,a,n[a],i)}}}}(n.hasOwnProperty);var J=function isPrimitive(t){var r=typeof t;return t===null||r!=="object"&&r!=="function"};var Y=u.isNaN||function(t){return t!==t};var Z={ToInteger:function ToInteger(t){var r=+t;if(Y(r)){r=0}else if(r!==0&&r!==1/0&&r!==-(1/0)){r=(r>0||-1)*Math.floor(Math.abs(r))}return r},ToPrimitive:function ToPrimitive(t){var r,e,n;if(J(t)){return t}e=t.valueOf;if(D(e)){r=e.call(t);if(J(r)){return r}}n=t.toString;if(D(n)){r=n.call(t);if(J(r)){return r}}throw new TypeError},ToObject:function(t){if(t==null){throw new TypeError("can't convert "+t+" to object")}return e(t)},ToUint32:function ToUint32(t){return t>>>0}};var z=function Empty(){};$(a,{bind:function bind(t){var r=this;if(!D(r)){throw new TypeError("Function.prototype.bind called on incompatible "+r)}var n=s.call(arguments,1);var a;var o=function(){if(this instanceof a){var i=g.call(r,this,p.call(n,s.call(arguments)));if(e(i)===i){return i}return this}else{return g.call(r,t,p.call(n,s.call(arguments)))}};var f=w(0,r.length-n.length);var u=[];for(var l=0;l<f;l++){v.call(u,"$"+l)}a=i("binder","return function ("+y.call(u,",")+"){ return binder.apply(this, arguments); }")(o);if(r.prototype){z.prototype=r.prototype;a.prototype=new z;z.prototype=null}return a}});var G=d.bind(n.hasOwnProperty);var B=d.bind(n.toString);var H=d.bind(s);var W=g.bind(s);var L=d.bind(f.slice);var X=d.bind(f.split);var q=d.bind(f.indexOf);var K=d.bind(v);var Q=d.bind(n.propertyIsEnumerable);var V=d.bind(r.sort);var _=t.isArray||function isArray(t){return B(t)==="[object Array]"};var tt=[].unshift(0)!==1;$(r,{unshift:function(){h.apply(this,arguments);return this.length}},tt);$(t,{isArray:_});var rt=e("a");var et=rt[0]!=="a"||!(0 in rt);var nt=function properlyBoxed(t){var r=true;var e=true;var n=false;if(t){try{t.call("foo",function(t,e,n){if(typeof n!=="object"){r=false}});t.call([1],function(){"use strict";e=typeof this==="string"},"x")}catch(i){n=true}}return!!t&&!n&&r&&e};$(r,{forEach:function forEach(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=-1;var i=Z.ToUint32(e.length);var a;if(arguments.length>1){a=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.forEach callback must be a function")}while(++n<i){if(n in e){if(typeof a==="undefined"){t(e[n],n,r)}else{t.call(a,e[n],n,r)}}}}},!nt(r.forEach));$(r,{map:function map(r){var e=Z.ToObject(this);var n=et&&C(this)?X(this,""):e;var i=Z.ToUint32(n.length);var a=t(i);var o;if(arguments.length>1){o=arguments[1]}if(!D(r)){throw new TypeError("Array.prototype.map callback must be a function")}for(var f=0;f<i;f++){if(f in n){if(typeof o==="undefined"){a[f]=r(n[f],f,e)}else{a[f]=r.call(o,n[f],f,e)}}}return a}},!nt(r.map));$(r,{filter:function filter(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);var i=[];var a;var o;if(arguments.length>1){o=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.filter callback must be a function")}for(var f=0;f<n;f++){if(f in e){a=e[f];if(typeof o==="undefined"?t(a,f,r):t.call(o,a,f,r)){K(i,a)}}}return i}},!nt(r.filter));$(r,{every:function every(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.every callback must be a function")}for(var a=0;a<n;a++){if(a in e&&!(typeof i==="undefined"?t(e[a],a,r):t.call(i,e[a],a,r))){return false}}return true}},!nt(r.every));$(r,{some:function some(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.some callback must be a function")}for(var a=0;a<n;a++){if(a in e&&(typeof i==="undefined"?t(e[a],a,r):t.call(i,e[a],a,r))){return true}}return false}},!nt(r.some));var it=false;if(r.reduce){it=typeof r.reduce.call("es5",function(t,r,e,n){return n})==="object"}$(r,{reduce:function reduce(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);if(!D(t)){throw new TypeError("Array.prototype.reduce callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var a;if(arguments.length>=2){a=arguments[1]}else{do{if(i in e){a=e[i++];break}if(++i>=n){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<n;i++){if(i in e){a=t(a,e[i],i,r)}}return a}},!it);var at=false;if(r.reduceRight){at=typeof r.reduceRight.call("es5",function(t,r,e,n){return n})==="object"}$(r,{reduceRight:function reduceRight(t){var r=Z.ToObject(this);var e=et&&C(this)?X(this,""):r;var n=Z.ToUint32(e.length);if(!D(t)){throw new TypeError("Array.prototype.reduceRight callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduceRight of empty array with no initial value")}var i;var a=n-1;if(arguments.length>=2){i=arguments[1]}else{do{if(a in e){i=e[a--];break}if(--a<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(a<0){return i}do{if(a in e){i=t(i,e[a],a,r)}}while(a--);return i}},!at);var ot=r.indexOf&&[0,1].indexOf(1,2)!==-1;$(r,{indexOf:function indexOf(t){var r=et&&C(this)?X(this,""):Z.ToObject(this);var e=Z.ToUint32(r.length);if(e===0){return-1}var n=0;if(arguments.length>1){n=Z.ToInteger(arguments[1])}n=n>=0?n:w(0,e+n);for(;n<e;n++){if(n in r&&r[n]===t){return n}}return-1}},ot);var ft=r.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;$(r,{lastIndexOf:function lastIndexOf(t){var r=et&&C(this)?X(this,""):Z.ToObject(this);var e=Z.ToUint32(r.length);if(e===0){return-1}var n=e-1;if(arguments.length>1){n=b(n,Z.ToInteger(arguments[1]))}n=n>=0?n:e-Math.abs(n);for(;n>=0;n--){if(n in r&&t===r[n]){return n}}return-1}},ft);var ut=function(){var t=[1,2];var r=t.splice();return t.length===2&&_(r)&&r.length===0}();$(r,{splice:function splice(t,r){if(arguments.length===0){return[]}else{return c.apply(this,arguments)}}},!ut);var lt=function(){var t={};r.splice.call(t,0,0,1);return t.length===1}();$(r,{splice:function splice(t,r){if(arguments.length===0){return[]}var e=arguments;this.length=w(Z.ToInteger(this.length),0);if(arguments.length>0&&typeof r!=="number"){e=H(arguments);if(e.length<2){K(e,this.length-t)}else{e[1]=Z.ToInteger(r)}}return c.apply(this,e)}},!lt);var st=function(){var r=new t(1e5);r[8]="x";r.splice(1,1);return r.indexOf("x")===7}();var ct=function(){var t=256;var r=[];r[t]="a";r.splice(t+1,0,"b");return r[t]==="a"}();$(r,{splice:function splice(t,r){var e=Z.ToObject(this);var n=[];var i=Z.ToUint32(e.length);var a=Z.ToInteger(t);var f=a<0?w(i+a,0):b(a,i);var u=b(w(Z.ToInteger(r),0),i-f);var l=0;var s;while(l<u){s=o(f+l);if(G(e,s)){n[l]=e[s]}l+=1}var c=H(arguments,2);var v=c.length;var h;if(v<u){l=f;var p=i-u;while(l<p){s=o(l+u);h=o(l+v);if(G(e,s)){e[h]=e[s]}else{delete e[h]}l+=1}l=i;var y=i-u+v;while(l>y){delete e[l-1];l-=1}}else if(v>u){l=i-u;while(l>f){s=o(l+u-1);h=o(l+v-1);if(G(e,s)){e[h]=e[s]}else{delete e[h]}l-=1}}l=f;for(var d=0;d<c.length;++d){e[l]=c[d];l+=1}e.length=i-u+v;return n}},!st||!ct);var vt=r.join;var ht;try{ht=Array.prototype.join.call("123",",")!=="1,2,3"}catch(pt){ht=true}if(ht){$(r,{join:function join(t){var r=typeof t==="undefined"?",":t;return vt.call(C(this)?X(this,""):this,r)}},ht)}var yt=[1,2].join(undefined)!=="1,2";if(yt){$(r,{join:function join(t){var r=typeof t==="undefined"?",":t;return vt.call(this,r)}},yt)}var dt=function push(t){var r=Z.ToObject(this);var e=Z.ToUint32(r.length);var n=0;while(n<arguments.length){r[e+n]=arguments[n];n+=1}r.length=e+n;return e+n};var gt=function(){var t={};var r=Array.prototype.push.call(t,undefined);return r!==1||t.length!==1||typeof t[0]!=="undefined"||!G(t,0)}();$(r,{push:function push(t){if(_(this)){return v.apply(this,arguments)}return dt.apply(this,arguments)}},gt);var wt=function(){var t=[];var r=t.push(undefined);return r!==1||t.length!==1||typeof t[0]!=="undefined"||!G(t,0)}();$(r,{push:dt},wt);$(r,{slice:function(t,r){var e=C(this)?X(this,""):this;return W(e,arguments)}},et);var bt=function(){try{[1,2].sort(null);[1,2].sort({});return true}catch(t){}return false}();var Tt=function(){try{[1,2].sort(/a/);return false}catch(t){}return true}();var mt=function(){try{[1,2].sort(undefined);return true}catch(t){}return false}();$(r,{sort:function sort(t){if(typeof t==="undefined"){return V(this)}if(!D(t)){throw new TypeError("Array.prototype.sort callback must be a function")}return V(this,t)}},bt||!mt||!Tt);var Dt=!{toString:null}.propertyIsEnumerable("toString");var xt=function(){}.propertyIsEnumerable("prototype");var St=!G("x","0");var Ot=function(t){var r=t.constructor;return r&&r.prototype===t};var Et={$window:true,$console:true,$parent:true,$self:true,$frame:true,$frames:true,$frameElement:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$external:true};var jt=function(){if(typeof window==="undefined"){return false}for(var t in window){try{if(!Et["$"+t]&&G(window,t)&&window[t]!==null&&typeof window[t]==="object"){Ot(window[t])}}catch(r){return true}}return false}();var It=function(t){if(typeof window==="undefined"||!jt){return Ot(t)}try{return Ot(t)}catch(r){return false}};var Mt=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var Ut=Mt.length;var Ft=function isArguments(t){return B(t)==="[object Arguments]"};var Nt=function isArguments(t){return t!==null&&typeof t==="object"&&typeof t.length==="number"&&t.length>=0&&!_(t)&&D(t.callee)};var Ct=Ft(arguments)?Ft:Nt;$(e,{keys:function keys(t){var r=D(t);var e=Ct(t);var n=t!==null&&typeof t==="object";var i=n&&C(t);if(!n&&!r&&!e){throw new TypeError("Object.keys called on a non-object")}var a=[];var f=xt&&r;if(i&&St||e){for(var u=0;u<t.length;++u){K(a,o(u))}}if(!e){for(var l in t){if(!(f&&l==="prototype")&&G(t,l)){K(a,o(l))}}}if(Dt){var s=It(t);for(var c=0;c<Ut;c++){var v=Mt[c];if(!(s&&v==="constructor")&&G(t,v)){K(a,v)}}}return a}});var kt=e.keys&&function(){return e.keys(arguments).length===2}(1,2);var Rt=e.keys&&function(){var t=e.keys(arguments);return arguments.length!==1||t.length!==1||t[0]!==1}(1);var At=e.keys;$(e,{keys:function keys(t){if(Ct(t)){return At(H(t))}else{return At(t)}}},!kt||Rt);var Pt=new Date(-0xc782b5b342b24).getUTCMonth()!==0;var $t=new Date(-0x55d318d56a724);var Jt=new Date(14496624e5);var Yt=$t.toUTCString()!=="Mon, 01 Jan -45875 11:59:59 GMT";var Zt;var zt;var Gt=$t.getTimezoneOffset();if(Gt<-720){Zt=$t.toDateString()!=="Tue Jan 02 -45875";zt=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Jt.toString())}else{Zt=$t.toDateString()!=="Mon Jan 01 -45875";zt=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Jt.toString())}var Bt=d.bind(Date.prototype.getFullYear);var Ht=d.bind(Date.prototype.getMonth);var Wt=d.bind(Date.prototype.getDate);var Lt=d.bind(Date.prototype.getUTCFullYear);var Xt=d.bind(Date.prototype.getUTCMonth);var qt=d.bind(Date.prototype.getUTCDate);var Kt=d.bind(Date.prototype.getUTCDay);var Qt=d.bind(Date.prototype.getUTCHours);var Vt=d.bind(Date.prototype.getUTCMinutes);var _t=d.bind(Date.prototype.getUTCSeconds);var tr=d.bind(Date.prototype.getUTCMilliseconds);var rr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var er=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var nr=function daysInMonth(t,r){return Wt(new Date(r,t,0))};$(Date.prototype,{getFullYear:function getFullYear(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);if(t<0&&Ht(this)>11){return t+1}return t},getMonth:function getMonth(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);var r=Ht(this);if(t<0&&r>11){return 0}return r},getDate:function getDate(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);var r=Ht(this);var e=Wt(this);if(t<0&&r>11){if(r===12){return e}var n=nr(0,t+1);return n-e+1}return e},getUTCFullYear:function getUTCFullYear(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Lt(this);if(t<0&&Xt(this)>11){return t+1}return t},getUTCMonth:function getUTCMonth(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Lt(this);var r=Xt(this);if(t<0&&r>11){return 0}return r},getUTCDate:function getUTCDate(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Lt(this);var r=Xt(this);var e=qt(this);if(t<0&&r>11){if(r===12){return e}var n=nr(0,t+1);return n-e+1}return e}},Pt);$(Date.prototype,{toUTCString:function toUTCString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Kt(this);var r=qt(this);var e=Xt(this);var n=Lt(this);var i=Qt(this);var a=Vt(this);var o=_t(this);return rr[t]+", "+(r<10?"0"+r:r)+" "+er[e]+" "+n+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"}},Pt||Yt);$(Date.prototype,{toDateString:function toDateString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=this.getDay();var r=this.getDate();var e=this.getMonth();var n=this.getFullYear();return rr[t]+" "+er[e]+" "+(r<10?"0"+r:r)+" "+n}},Pt||Zt);if(Pt||zt){Date.prototype.toString=function toString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=this.getDay();var r=this.getDate();var e=this.getMonth();var n=this.getFullYear();var i=this.getHours();var a=this.getMinutes();var o=this.getSeconds();var f=this.getTimezoneOffset();var u=Math.floor(Math.abs(f)/60);var l=Math.floor(Math.abs(f)%60);return rr[t]+" "+er[e]+" "+(r<10?"0"+r:r)+" "+n+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"+(f>0?"-":"+")+(u<10?"0"+u:u)+(l<10?"0"+l:l)};if(P){e.defineProperty(Date.prototype,"toString",{configurable:true,enumerable:false,writable:true})}}var ir=-621987552e5;var ar="-000001";var or=Date.prototype.toISOString&&new Date(ir).toISOString().indexOf(ar)===-1;var fr=Date.prototype.toISOString&&new Date(-1).toISOString()!=="1969-12-31T23:59:59.999Z";var ur=d.bind(Date.prototype.getTime);$(Date.prototype,{toISOString:function toISOString(){if(!isFinite(this)||!isFinite(ur(this))){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}var t=Lt(this);var r=Xt(this);t+=Math.floor(r/12);r=(r%12+12)%12;var e=[r+1,qt(this),Qt(this),Vt(this),_t(this)];t=(t<0?"-":t>9999?"+":"")+L("00000"+Math.abs(t),0<=t&&t<=9999?-4:-6);for(var n=0;n<e.length;++n){e[n]=L("00"+e[n],-2)}return t+"-"+H(e,0,2).join("-")+"T"+H(e,2).join(":")+"."+L("000"+tr(this),-3)+"Z"}},or||fr);var lr=function(){try{return Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(ir).toJSON().indexOf(ar)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(t){return false}}();if(!lr){Date.prototype.toJSON=function toJSON(t){var r=e(this);var n=Z.ToPrimitive(r);if(typeof n==="number"&&!isFinite(n)){return null}var i=r.toISOString;if(!D(i)){throw new TypeError("toISOString property is not callable")}return i.call(r)}}var sr=Date.parse("+033658-09-27T01:46:40.000Z")===1e15;var cr=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z"));var vr=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(vr||cr||!sr){var hr=Math.pow(2,31)-1;var pr=Y(new Date(1970,0,1,0,0,0,hr+1).getTime());Date=function(t){var r=function Date(e,n,i,a,f,u,l){var s=arguments.length;var c;if(this instanceof t){var v=u;var h=l;if(pr&&s>=7&&l>hr){var p=Math.floor(l/hr)*hr;var y=Math.floor(p/1e3);v+=y;h-=y*1e3}c=s===1&&o(e)===e?new t(r.parse(e)):s>=7?new t(e,n,i,a,f,v,h):s>=6?new t(e,n,i,a,f,v):s>=5?new t(e,n,i,a,f):s>=4?new t(e,n,i,a):s>=3?new t(e,n,i):s>=2?new t(e,n):s>=1?new t(e instanceof t?+e:e):new t}else{c=t.apply(this,arguments)}if(!J(c)){$(c,{constructor:r},true)}return c};var e=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var n=[0,31,59,90,120,151,181,212,243,273,304,334,365];var i=function dayFromMonth(t,r){var e=r>1?1:0;return n[r]+Math.floor((t-1969+e)/4)-Math.floor((t-1901+e)/100)+Math.floor((t-1601+e)/400)+365*(t-1970)};var a=function toUTC(r){var e=0;var n=r;if(pr&&n>hr){var i=Math.floor(n/hr)*hr;var a=Math.floor(i/1e3);e+=a;n-=a*1e3}return u(new t(1970,0,1,0,0,e,n))};for(var f in t){if(G(t,f)){r[f]=t[f]}}$(r,{now:t.now,UTC:t.UTC},true);r.prototype=t.prototype;$(r.prototype,{constructor:r},true);var l=function parse(r){var n=e.exec(r);if(n){var o=u(n[1]),f=u(n[2]||1)-1,l=u(n[3]||1)-1,s=u(n[4]||0),c=u(n[5]||0),v=u(n[6]||0),h=Math.floor(u(n[7]||0)*1e3),p=Boolean(n[4]&&!n[8]),y=n[9]==="-"?1:-1,d=u(n[10]||0),g=u(n[11]||0),w;var b=c>0||v>0||h>0;if(s<(b?24:25)&&c<60&&v<60&&h<1e3&&f>-1&&f<12&&d<24&&g<60&&l>-1&&l<i(o,f+1)-i(o,f)){w=((i(o,f)+l)*24+s+d*y)*60;w=((w+c+g*y)*60+v)*1e3+h;if(p){w=a(w)}if(-864e13<=w&&w<=864e13){return w}}return NaN}return t.parse.apply(this,arguments)};$(r,{parse:l});return r}(Date)}if(!Date.now){Date.now=function now(){return(new Date).getTime()}}var yr=l.toFixed&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128");var dr={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function multiply(t,r){var e=-1;var n=r;while(++e<dr.size){n+=t*dr.data[e];dr.data[e]=n%dr.base;n=Math.floor(n/dr.base)}},divide:function divide(t){var r=dr.size;var e=0;while(--r>=0){e+=dr.data[r];dr.data[r]=Math.floor(e/t);e=e%t*dr.base}},numToString:function numToString(){var t=dr.size;var r="";while(--t>=0){if(r!==""||t===0||dr.data[t]!==0){var e=o(dr.data[t]);if(r===""){r=e}else{r+=L("0000000",0,7-e.length)+e}}}return r},pow:function pow(t,r,e){return r===0?e:r%2===1?pow(t,r-1,e*t):pow(t*t,r/2,e)},log:function log(t){var r=0;var e=t;while(e>=4096){r+=12;e/=4096}while(e>=2){r+=1;e/=2}return r}};var gr=function toFixed(t){var r,e,n,i,a,f,l,s;r=u(t);r=Y(r)?0:Math.floor(r);if(r<0||r>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}e=u(this);if(Y(e)){return"NaN"}if(e<=-1e21||e>=1e21){return o(e)}n="";if(e<0){n="-";e=-e}i="0";if(e>1e-21){a=dr.log(e*dr.pow(2,69,1))-69;f=a<0?e*dr.pow(2,-a,1):e/dr.pow(2,a,1);f*=4503599627370496;a=52-a;if(a>0){dr.multiply(0,f);l=r;while(l>=7){dr.multiply(1e7,0);l-=7}dr.multiply(dr.pow(10,l,1),0);l=a-1;while(l>=23){dr.divide(1<<23);l-=23}dr.divide(1<<l);dr.multiply(1,1);dr.divide(2);i=dr.numToString()}else{dr.multiply(0,f);dr.multiply(1<<-a,0);i=dr.numToString()+L("0.00000000000000000000",2,2+r)}}if(r>0){s=i.length;if(s<=r){i=n+L("0.0000000000000000000",0,r-s+2)+i}else{i=n+L(i,0,s-r)+"."+L(i,s-r)}}else{i=n+i}return i};$(l,{toFixed:gr},yr);var wr=function(){try{return 1..toPrecision(undefined)==="1"}catch(t){return true}}();var br=l.toPrecision;$(l,{toPrecision:function toPrecision(t){return typeof t==="undefined"?br.call(this):br.call(this,t)}},wr);if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var t=typeof/()??/.exec("")[1]==="undefined";var r=Math.pow(2,32)-1;f.split=function(e,n){var i=String(this);if(typeof e==="undefined"&&n===0){return[]}if(!M(e)){return X(this,e,n)}var a=[];var o=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,u,l,s,c;var h=new RegExp(e.source,o+"g");if(!t){u=new RegExp("^"+h.source+"$(?!\\s)",o)}var p=typeof n==="undefined"?r:Z.ToUint32(n);l=h.exec(i);while(l){s=l.index+l[0].length;if(s>f){K(a,L(i,f,l.index));if(!t&&l.length>1){l[0].replace(u,function(){for(var t=1;t<arguments.length-2;t++){if(typeof arguments[t]==="undefined"){l[t]=void 0}}})}if(l.length>1&&l.index<i.length){v.apply(a,H(l,1))}c=l[0].length;f=s;if(a.length>=p){break}}if(h.lastIndex===l.index){h.lastIndex++}l=h.exec(i)}if(f===i.length){if(c||!h.test("")){K(a,"")}}else{K(a,L(i,f))}return a.length>p?H(a,0,p):a}})()}else if("0".split(void 0,0).length){f.split=function split(t,r){if(typeof t==="undefined"&&r===0){return[]}return X(this,t,r)}}var Tr=f.replace;var mr=function(){var t=[];"x".replace(/x(.)?/g,function(r,e){K(t,e)});return t.length===1&&typeof t[0]==="undefined"}();if(!mr){f.replace=function replace(t,r){var e=D(r);var n=M(t)&&/\)[*?]/.test(t.source);if(!e||!n){return Tr.call(this,t,r)}else{var i=function(e){var n=arguments.length;var i=t.lastIndex;t.lastIndex=0;var a=t.exec(e)||[];t.lastIndex=i;K(a,arguments[n-2],arguments[n-1]);return r.apply(this,a)};return Tr.call(this,t,i)}}}var Dr=f.substr;var xr="".substr&&"0b".substr(-1)!=="b";$(f,{substr:function substr(t,r){var e=t;if(t<0){e=w(this.length+t,0)}return Dr.call(this,e,r)}},xr);var Sr=" \n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";var Or="\u200b";var Er="["+Sr+"]";var jr=new RegExp("^"+Er+Er+"*");var Ir=new RegExp(Er+Er+"*$");var Mr=f.trim&&(Sr.trim()||!Or.trim());$(f,{trim:function trim(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}return o(this).replace(jr,"").replace(Ir,"")}},Mr);var Ur=d.bind(String.prototype.trim);var Fr=f.lastIndexOf&&"abc\u3042\u3044".lastIndexOf("\u3042\u3044",2)!==-1;$(f,{lastIndexOf:function lastIndexOf(t){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var r=o(this);var e=o(t);var n=arguments.length>1?u(arguments[1]):NaN;var i=Y(n)?Infinity:Z.ToInteger(n);var a=b(w(i,0),r.length);var f=e.length;var l=a+f;while(l>0){l=w(0,l-f);var s=q(L(r,l,a+f),e);if(s!==-1){return l+s}}return-1}},Fr);var Nr=f.lastIndexOf;$(f,{lastIndexOf:function lastIndexOf(t){return Nr.apply(this,arguments)}},f.lastIndexOf.length!==1);if(parseInt(Sr+"08")!==8||parseInt(Sr+"0x16")!==22){parseInt=function(t){var r=/^[\-+]?0[xX]/;return function parseInt(e,n){var i=Ur(e);var a=u(n)||(r.test(i)?16:10);return t(i,a)}}(parseInt)}if(1/parseFloat("-0")!==-Infinity){parseFloat=function(t){return function parseFloat(r){var e=Ur(r);var n=t(e);return n===0&&L(e,0,1)==="-"?-0:n}}(parseFloat)}if(String(new RangeError("test"))!=="RangeError: test"){var Cr=function toString(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var t=this.name;if(typeof t==="undefined"){t="Error"}else if(typeof t!=="string"){t=o(t)}var r=this.message;if(typeof r==="undefined"){r=""}else if(typeof r!=="string"){r=o(r)}if(!t){return r}if(!r){return t}return t+": "+r};Error.prototype.toString=Cr}if(P){var kr=function(t,r){if(Q(t,r)){var e=Object.getOwnPropertyDescriptor(t,r);e.enumerable=false;Object.defineProperty(t,r,e)}};kr(Error.prototype,"message");if(Error.prototype.message!==""){Error.prototype.message=""}kr(Error.prototype,"name")}if(String(/a/gim)!=="/a/gim"){var Rr=function toString(){var t="/"+this.source+"/";if(this.global){t+="g"}if(this.ignoreCase){t+="i"}if(this.multiline){t+="m"}return t};RegExp.prototype.toString=Rr}});
  7 +//# sourceMappingURL=es5-shim.map
  1 +{
  2 + "name": "es5-shim",
  3 + "version": "4.5.7",
  4 + "description": "ECMAScript 5 compatibility shims for legacy JavaScript engines",
  5 + "homepage": "http://github.com/es-shims/es5-shim/",
  6 + "contributors": [
  7 + "Kris Kowal <kris@cixar.com> (http://github.com/kriskowal/)",
  8 + "Sami Samhuri <sami.samhuri@gmail.com> (http://samhuri.net/)",
  9 + "Florian Schäfer <florian.schaefer@gmail.com> (http://github.com/fschaefer)",
  10 + "Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)",
  11 + "Kit Cambridge <kitcambridge@gmail.com> (http://kitcambridge.github.com)",
  12 + "Jordan Harband <ljharb@gmail.com> (https://github.com/ljharb/)"
  13 + ],
  14 + "bugs": {
  15 + "mail": "ljharb@gmail.com",
  16 + "url": "http://github.com/es-shims/es5-shim/issues"
  17 + },
  18 + "license": "MIT",
  19 + "main": "es5-shim.js",
  20 + "repository": {
  21 + "type": "git",
  22 + "url": "http://github.com/es-shims/es5-shim.git"
  23 + },
  24 + "scripts": {
  25 + "minify": "concurrently --raw 'npm run --silent minify-shim' 'npm run --silent minify-sham'",
  26 + "minify-shim": "uglifyjs es5-shim.js --keep-fnames --comments --source-map=es5-shim.map -m -b ascii_only=true,beautify=false > es5-shim.min.js",
  27 + "minify-sham": "uglifyjs es5-sham.js --keep-fnames --comments --source-map=es5-sham.map -m -b ascii_only=true,beautify=false > es5-sham.min.js",
  28 + "pretest": "npm run --silent lint",
  29 + "test": "npm run --silent tests-only",
  30 + "tests-only": "jasmine-node --matchall ./ tests/spec/",
  31 + "test-native": "jasmine-node --matchall tests/spec/",
  32 + "lint": "concurrently --raw 'npm run --silent jscs' 'npm run --silent eslint'",
  33 + "eslint": "eslint tests/helpers/*.js tests/spec/*.js es5-shim.js es5-sham.js",
  34 + "jscs": "jscs tests/helpers/*.js tests/spec/*.js es5-shim.js es5-sham.js"
  35 + },
  36 + "devDependencies": {
  37 + "eslint": "^2.5.3",
  38 + "@ljharb/eslint-config": "^2.2.0",
  39 + "jasmine-node": "^1.14.5",
  40 + "jscs": "^2.11.0",
  41 + "uglify-js": "^2.6.2",
  42 + "replace": "^0.3.0",
  43 + "semver": "^5.1.0",
  44 + "concurrently": "^2.0.0"
  45 + },
  46 + "engines": {
  47 + "node": ">=0.4.0"
  48 + },
  49 + "testling": {
  50 + "browsers": [
  51 + "iexplore/6.0..latest",
  52 + "firefox/3.0..6.0",
  53 + "firefox/18.0..latest",
  54 + "firefox/nightly",
  55 + "chrome/4.0..10.0",
  56 + "chrome/25.0..latest",
  57 + "chrome/canary",
  58 + "opera/10.0..latest",
  59 + "opera/next",
  60 + "safari/4.0..latest",
  61 + "ipad/6.0..latest",
  62 + "iphone/6.0..latest",
  63 + "android-browser/4.2"
  64 + ]
  65 + },
  66 + "keywords": [
  67 + "shim",
  68 + "es5",
  69 + "es5 shim",
  70 + "javascript",
  71 + "ecmascript",
  72 + "polyfill"
  73 + ]
  74 +}
  75 +
  1 +{
  2 + "Object": {
  3 + "prototype": {},
  4 + "keys": "object-keys"
  5 + }
  6 +}
  7 +
  1 +{
  2 + "rules": {
  3 + "max-statements-per-line": [2, { "max": 2 }]
  4 + }
  5 +}
  1 +/* global beforeEach, expect */
  2 +
  3 +var has = Object.prototype.hasOwnProperty;
  4 +var getKeys = function (o) {
  5 + 'use strict';
  6 +
  7 + var key;
  8 + var a = [];
  9 + for (key in o) {
  10 + if (has.call(o, key)) {
  11 + a.push(key);
  12 + }
  13 + }
  14 + return a;
  15 +};
  16 +
  17 +beforeEach(function () {
  18 + 'use strict';
  19 +
  20 + this.addMatchers({
  21 + toExactlyMatch: function (expected) {
  22 + var a1, a2, l, i, key;
  23 + var actual = this.actual;
  24 +
  25 + a1 = getKeys(actual);
  26 + a2 = getKeys(expected);
  27 +
  28 + l = a1.length;
  29 + if (l !== a2.length) {
  30 + return false;
  31 + }
  32 + for (i = 0; i < l; i++) {
  33 + key = a1[i];
  34 + expect(key).toEqual(a2[i]);
  35 + expect(actual[key]).toEqual(expected[key]);
  36 + }
  37 +
  38 + return true;
  39 + }
  40 + });
  41 +});
  1 +<!DOCTYPE HTML>
  2 +<html>
  3 +<head>
  4 + <meta charset="utf-8" />
  5 + <title>Jasmine Spec Runner</title>
  6 +
  7 + <link rel="shortcut icon" type="image/png" href="lib/jasmine_favicon.png">
  8 +
  9 + <link rel="stylesheet" type="text/css" href="lib/jasmine.css">
  10 + <script type="text/javascript" src="lib/jasmine.js"></script>
  11 + <script type="text/javascript" src="lib/jasmine-html.js"></script>
  12 + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
  13 +
  14 + <!-- include helper files here... -->
  15 + <script src="helpers/h-matchers.js"></script>
  16 +
  17 + <!-- include source files here... -->
  18 + <script src="../es5-shim.js"></script>
  19 + <script src="../es5-sham.js"></script>
  20 +
  21 + <!-- include spec files here... -->
  22 + <script src="spec/s-array.js"></script>
  23 + <script src="spec/s-date.js"></script>
  24 + <script src="spec/s-error.js"></script>
  25 + <script src="spec/s-function.js"></script>
  26 + <script src="spec/s-global.js"></script>
  27 + <script src="spec/s-number.js"></script>
  28 + <script src="spec/s-object.js"></script>
  29 + <script src="spec/s-string.js"></script>
  30 + <script src="spec/s-regexp.js"></script>
  31 +
  32 +
  33 + <script type="text/javascript">
  34 + (function() {
  35 + var jasmineEnv = jasmine.getEnv();
  36 + jasmineEnv.updateInterval = 1000;
  37 +
  38 + var trivialReporter = new jasmine.TrivialReporter();
  39 +
  40 + jasmineEnv.addReporter(trivialReporter);
  41 +
  42 + jasmineEnv.specFilter = function(spec) {
  43 + return trivialReporter.specFilter(spec);
  44 + };
  45 +
  46 + var currentWindowOnload = window.onload;
  47 +
  48 + window.onload = function() {
  49 + if (currentWindowOnload) {
  50 + currentWindowOnload();
  51 + }
  52 + execJasmine();
  53 + };
  54 +
  55 + function execJasmine() {
  56 + jasmineEnv.execute();
  57 + }
  58 +
  59 + })();
  60 + </script>
  61 +
  62 +</head>
  63 +
  64 +<body>
  65 +</body>
  66 +</html>
  1 +<!DOCTYPE HTML>
  2 +<html>
  3 +<head>
  4 + <title>Jasmine Spec Runner</title>
  5 +
  6 + <link rel="shortcut icon" type="image/png" href="lib/jasmine_favicon.png">
  7 +
  8 + <link rel="stylesheet" type="text/css" href="lib/jasmine.css">
  9 + <script type="text/javascript" src="lib/jasmine.js"></script>
  10 + <script type="text/javascript" src="lib/jasmine-html.js"></script>
  11 + <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
  12 +
  13 +
  14 + <!-- include helper files here... -->
  15 + <script src="helpers/h-matchers.js"></script>
  16 +
  17 + <!-- include source files here... -->
  18 + <script src="../es5-shim.min.js"></script>
  19 +
  20 + <!-- include spec files here... -->
  21 + <script src="spec/s-array.js"></script>
  22 + <script src="spec/s-date.js"></script>
  23 + <script src="spec/s-error.js"></script>
  24 + <script src="spec/s-function.js"></script>
  25 + <script src="spec/s-global.js"></script>
  26 + <script src="spec/s-number.js"></script>
  27 + <script src="spec/s-object.js"></script>
  28 + <script src="spec/s-string.js"></script>
  29 +
  30 +
  31 + <script type="text/javascript">
  32 + (function() {
  33 + var jasmineEnv = jasmine.getEnv();
  34 + jasmineEnv.updateInterval = 1000;
  35 +
  36 + var trivialReporter = new jasmine.TrivialReporter();
  37 +
  38 + jasmineEnv.addReporter(trivialReporter);
  39 +
  40 + jasmineEnv.specFilter = function(spec) {
  41 + return trivialReporter.specFilter(spec);
  42 + };
  43 +
  44 + var currentWindowOnload = window.onload;
  45 +
  46 + window.onload = function() {
  47 + if (currentWindowOnload) {
  48 + currentWindowOnload();
  49 + }
  50 + execJasmine();
  51 + };
  52 +
  53 + function execJasmine() {
  54 + jasmineEnv.execute();
  55 + }
  56 +
  57 + })();
  58 + </script>
  59 +
  60 +</head>
  61 +
  62 +<body>
  63 +</body>
  64 +</html>
  1 +jasmine.TrivialReporter = function(doc) {
  2 + this.document = doc || document;
  3 + this.suiteDivs = {};
  4 + this.logRunningSpecs = false;
  5 +};
  6 +
  7 +jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
  8 + var el = document.createElement(type);
  9 +
  10 + for (var i = 2; i < arguments.length; i++) {
  11 + var child = arguments[i];
  12 +
  13 + if (typeof child === 'string') {
  14 + el.appendChild(document.createTextNode(child));
  15 + } else {
  16 + if (child) { el.appendChild(child); }
  17 + }
  18 + }
  19 +
  20 + for (var attr in attrs) {
  21 + if (attr == "className") {
  22 + el[attr] = attrs[attr];
  23 + } else {
  24 + el.setAttribute(attr, attrs[attr]);
  25 + }
  26 + }
  27 +
  28 + return el;
  29 +};
  30 +
  31 +jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
  32 + var showPassed, showSkipped;
  33 +
  34 + this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },
  35 + this.createDom('div', { className: 'banner' },
  36 + this.createDom('div', { className: 'logo' },
  37 + this.createDom('span', { className: 'title' }, "Jasmine"),
  38 + this.createDom('span', { className: 'version' }, runner.env.versionString())),
  39 + this.createDom('div', { className: 'options' },
  40 + "Show ",
  41 + showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
  42 + this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
  43 + showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
  44 + this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
  45 + )
  46 + ),
  47 +
  48 + this.runnerDiv = this.createDom('div', { className: 'runner running' },
  49 + this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
  50 + this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
  51 + this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
  52 + );
  53 +
  54 + this.document.body.appendChild(this.outerDiv);
  55 +
  56 + var suites = runner.suites();
  57 + for (var i = 0; i < suites.length; i++) {
  58 + var suite = suites[i];
  59 + var suiteDiv = this.createDom('div', { className: 'suite' },
  60 + this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
  61 + this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
  62 + this.suiteDivs[suite.id] = suiteDiv;
  63 + var parentDiv = this.outerDiv;
  64 + if (suite.parentSuite) {
  65 + parentDiv = this.suiteDivs[suite.parentSuite.id];
  66 + }
  67 + parentDiv.appendChild(suiteDiv);
  68 + }
  69 +
  70 + this.startedAt = new Date();
  71 +
  72 + var self = this;
  73 + showPassed.onclick = function(evt) {
  74 + if (showPassed.checked) {
  75 + self.outerDiv.className += ' show-passed';
  76 + } else {
  77 + self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
  78 + }
  79 + };
  80 +
  81 + showSkipped.onclick = function(evt) {
  82 + if (showSkipped.checked) {
  83 + self.outerDiv.className += ' show-skipped';
  84 + } else {
  85 + self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
  86 + }
  87 + };
  88 +};
  89 +
  90 +jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
  91 + var results = runner.results();
  92 + var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
  93 + this.runnerDiv.setAttribute("class", className);
  94 + //do it twice for IE
  95 + this.runnerDiv.setAttribute("className", className);
  96 + var specs = runner.specs();
  97 + var specCount = 0;
  98 + for (var i = 0; i < specs.length; i++) {
  99 + if (this.specFilter(specs[i])) {
  100 + specCount++;
  101 + }
  102 + }
  103 + var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
  104 + message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
  105 + this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
  106 +
  107 + this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
  108 +};
  109 +
  110 +jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
  111 + var results = suite.results();
  112 + var status = results.passed() ? 'passed' : 'failed';
  113 + if (results.totalCount === 0) { // todo: change this to check results.skipped
  114 + status = 'skipped';
  115 + }
  116 + this.suiteDivs[suite.id].className += " " + status;
  117 +};
  118 +
  119 +jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
  120 + if (this.logRunningSpecs) {
  121 + this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
  122 + }
  123 +};
  124 +
  125 +jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
  126 + var results = spec.results();
  127 + var status = results.passed() ? 'passed' : 'failed';
  128 + if (results.skipped) {
  129 + status = 'skipped';
  130 + }
  131 + var specDiv = this.createDom('div', { className: 'spec ' + status },
  132 + this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
  133 + this.createDom('a', {
  134 + className: 'description',
  135 + href: '?spec=' + encodeURIComponent(spec.getFullName()),
  136 + title: spec.getFullName()
  137 + }, spec.description));
  138 +
  139 +
  140 + var resultItems = results.getItems();
  141 + var messagesDiv = this.createDom('div', { className: 'messages' });
  142 + for (var i = 0; i < resultItems.length; i++) {
  143 + var result = resultItems[i];
  144 +
  145 + if (result.type == 'log') {
  146 + messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
  147 + } else if (result.type == 'expect' && result.passed && !result.passed()) {
  148 + messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
  149 +
  150 + if (result.trace.stack) {
  151 + messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
  152 + }
  153 + }
  154 + }
  155 +
  156 + if (messagesDiv.childNodes.length > 0) {
  157 + specDiv.appendChild(messagesDiv);
  158 + }
  159 +
  160 + this.suiteDivs[spec.suite.id].appendChild(specDiv);
  161 +};
  162 +
  163 +jasmine.TrivialReporter.prototype.log = function() {
  164 + var console = jasmine.getGlobal().console;
  165 + if (console && console.log) {
  166 + if (console.log.apply) {
  167 + console.log.apply(console, arguments);
  168 + } else {
  169 + console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
  170 + }
  171 + }
  172 +};
  173 +
  174 +jasmine.TrivialReporter.prototype.getLocation = function() {
  175 + return this.document.location;
  176 +};
  177 +
  178 +jasmine.TrivialReporter.prototype.specFilter = function(spec) {
  179 + var paramMap = {};
  180 + var params = this.getLocation().search.substring(1).split('&');
  181 + for (var i = 0; i < params.length; i++) {
  182 + var p = params[i].split('=');
  183 + paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
  184 + }
  185 +
  186 + if (!paramMap.spec) {
  187 + return true;
  188 + }
  189 + return spec.getFullName().indexOf(paramMap.spec) === 0;
  190 +};
  1 +body {
  2 + font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif;
  3 +}
  4 +
  5 +
  6 +.jasmine_reporter a:visited, .jasmine_reporter a {
  7 + color: #303;
  8 +}
  9 +
  10 +.jasmine_reporter a:hover, .jasmine_reporter a:active {
  11 + color: blue;
  12 +}
  13 +
  14 +.run_spec {
  15 + float:right;
  16 + padding-right: 5px;
  17 + font-size: .8em;
  18 + text-decoration: none;
  19 +}
  20 +
  21 +.jasmine_reporter {
  22 + margin: 0 5px;
  23 +}
  24 +
  25 +.banner {
  26 + color: #303;
  27 + background-color: #fef;
  28 + padding: 5px;
  29 +}
  30 +
  31 +.logo {
  32 + float: left;
  33 + font-size: 1.1em;
  34 + padding-left: 5px;
  35 +}
  36 +
  37 +.logo .version {
  38 + font-size: .6em;
  39 + padding-left: 1em;
  40 +}
  41 +
  42 +.runner.running {
  43 + background-color: yellow;
  44 +}
  45 +
  46 +
  47 +.options {
  48 + text-align: right;
  49 + font-size: .8em;
  50 +}
  51 +
  52 +
  53 +
  54 +
  55 +.suite {
  56 + border: 1px outset gray;
  57 + margin: 5px 0;
  58 + padding-left: 1em;
  59 +}
  60 +
  61 +.suite .suite {
  62 + margin: 5px;
  63 +}
  64 +
  65 +.suite.passed {
  66 + background-color: #dfd;
  67 +}
  68 +
  69 +.suite.failed {
  70 + background-color: #fdd;
  71 +}
  72 +
  73 +.spec {
  74 + margin: 5px;
  75 + padding-left: 1em;
  76 + clear: both;
  77 +}
  78 +
  79 +.spec.failed, .spec.passed, .spec.skipped {
  80 + padding-bottom: 5px;
  81 + border: 1px solid gray;
  82 +}
  83 +
  84 +.spec.failed {
  85 + background-color: #fbb;
  86 + border-color: red;
  87 +}
  88 +
  89 +.spec.passed {
  90 + background-color: #bfb;
  91 + border-color: green;
  92 +}
  93 +
  94 +.spec.skipped {
  95 + background-color: #bbb;
  96 +}
  97 +
  98 +.messages {
  99 + border-left: 1px dashed gray;
  100 + padding-left: 1em;
  101 + padding-right: 1em;
  102 +}
  103 +
  104 +.passed {
  105 + background-color: #cfc;
  106 + display: none;
  107 +}
  108 +
  109 +.failed {
  110 + background-color: #fbb;
  111 +}
  112 +
  113 +.skipped {
  114 + color: #777;
  115 + background-color: #eee;
  116 + display: none;
  117 +}
  118 +
  119 +
  120 +/*.resultMessage {*/
  121 + /*white-space: pre;*/
  122 +/*}*/
  123 +
  124 +.resultMessage span.result {
  125 + display: block;
  126 + line-height: 2em;
  127 + color: black;
  128 +}
  129 +
  130 +.resultMessage .mismatch {
  131 + color: black;
  132 +}
  133 +
  134 +.stackTrace {
  135 + white-space: pre;
  136 + font-size: .8em;
  137 + margin-left: 10px;
  138 + max-height: 5em;
  139 + overflow: auto;
  140 + border: 1px inset red;
  141 + padding: 1em;
  142 + background: #eef;
  143 +}
  144 +
  145 +.finished-at {
  146 + padding-left: 1em;
  147 + font-size: .6em;
  148 +}
  149 +
  150 +.show-passed .passed,
  151 +.show-skipped .skipped {
  152 + display: block;
  153 +}
  154 +
  155 +
  156 +#jasmine_content {
  157 + position:fixed;
  158 + right: 100%;
  159 +}
  160 +
  161 +.runner {
  162 + border: 1px solid gray;
  163 + display: block;
  164 + margin: 5px 0;
  165 + padding: 2px 0 2px 10px;
  166 +}