Created
January 15, 2016 11:55
-
-
Save paulohp/f3262d805931fb932a23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
module.exports = { | |
VERSION: '%KARMA_VERSION%', | |
KARMA_URL_ROOT: '%KARMA_URL_ROOT%', | |
CONTEXT_URL: 'context.html' | |
} | |
},{}],2:[function(require,module,exports){ | |
var stringify = require('./stringify') | |
var constant = require('./constants') | |
var util = require('./util') | |
var Karma = function (socket, iframe, opener, navigator, location) { | |
var hasError = false | |
var startEmitted = false | |
var reloadingContext = false | |
var store = {} | |
var self = this | |
var queryParams = util.parseQueryParams(location.search) | |
var browserId = queryParams.id || util.generateId('manual-') | |
var returnUrl = queryParams['return_url' + ''] || null | |
var resultsBufferLimit = 50 | |
var resultsBuffer = [] | |
this.VERSION = constant.VERSION | |
this.config = {} | |
// Expose for testing purposes as there is no global socket.io | |
// registry anymore. | |
this.socket = socket | |
var childWindow = null | |
var navigateContextTo = function (url) { | |
if (self.config.useIframe === false) { | |
if (childWindow === null || childWindow.closed === true) { | |
// If this is the first time we are opening the window, or the window is closed | |
childWindow = opener('about:blank') | |
} | |
childWindow.location = url | |
} else { | |
iframe.src = url | |
} | |
} | |
this.setupContext = function (contextWindow) { | |
if (hasError) { | |
return | |
} | |
var getConsole = function (currentWindow) { | |
return currentWindow.console || { | |
log: function () {}, | |
info: function () {}, | |
warn: function () {}, | |
error: function () {}, | |
debug: function () {} | |
} | |
} | |
contextWindow.__karma__ = this | |
// This causes memory leak in Chrome (17.0.963.66) | |
contextWindow.onerror = function () { | |
return contextWindow.__karma__.error.apply(contextWindow.__karma__, arguments) | |
} | |
if (self.config.captureConsole) { | |
// patch the console | |
var localConsole = contextWindow.console = getConsole(contextWindow) | |
var logMethods = ['log', 'info', 'warn', 'error', 'debug'] | |
var patchConsoleMethod = function (method) { | |
var orig = localConsole[method] | |
if (!orig) { | |
return | |
} | |
localConsole[method] = function () { | |
self.log(method, arguments) | |
return Function.prototype.apply.call(orig, localConsole, arguments) | |
} | |
} | |
for (var i = 0; i < logMethods.length; i++) { | |
patchConsoleMethod(logMethods[i]) | |
} | |
} | |
contextWindow.dump = function () { | |
self.log('dump', arguments) | |
} | |
contextWindow.alert = function (msg) { | |
self.log('alert', [msg]) | |
} | |
} | |
this.log = function (type, args) { | |
var values = [] | |
for (var i = 0; i < args.length; i++) { | |
values.push(this.stringify(args[i], 3)) | |
} | |
this.info({log: values.join(', '), type: type}) | |
} | |
this.stringify = stringify | |
var clearContext = function () { | |
reloadingContext = true | |
navigateContextTo('about:blank') | |
} | |
// error during js file loading (most likely syntax error) | |
// we are not going to execute at all | |
this.error = function (msg, url, line) { | |
hasError = true | |
var message = msg | |
if (url) { | |
message = msg + '\nat ' + url + (line ? ':' + line : '') | |
} | |
socket.emit('karma_error', message) | |
this.complete() | |
return false | |
} | |
this.result = function (result) { | |
if (!startEmitted) { | |
socket.emit('start', {total: null}) | |
startEmitted = true | |
} | |
if (resultsBufferLimit === 1) { | |
return socket.emit('result', result) | |
} | |
resultsBuffer.push(result) | |
if (resultsBuffer.length === resultsBufferLimit) { | |
socket.emit('result', resultsBuffer) | |
resultsBuffer = [] | |
} | |
} | |
this.complete = function (result) { | |
if (resultsBuffer.length) { | |
socket.emit('result', resultsBuffer) | |
resultsBuffer = [] | |
} | |
// give the browser some time to breath, there could be a page reload, but because a bunch of | |
// tests could run in the same event loop, we wouldn't notice. | |
setTimeout(function () { | |
clearContext() | |
}, 0) | |
socket.emit('complete', result || {}, function () { | |
if (returnUrl) { | |
location.href = returnUrl | |
} | |
}) | |
} | |
this.info = function (info) { | |
// TODO(vojta): introduce special API for this | |
if (!startEmitted && util.isDefined(info.total)) { | |
socket.emit('start', info) | |
startEmitted = true | |
} else { | |
socket.emit('info', info) | |
} | |
} | |
var UNIMPLEMENTED_START = function () { | |
this.error('You need to include some adapter that implements __karma__.start method!') | |
} | |
// all files loaded, let's start the execution | |
this.loaded = function () { | |
// has error -> cancel | |
if (!hasError) { | |
this.start(this.config) | |
} | |
// remove reference to child iframe | |
this.start = UNIMPLEMENTED_START | |
} | |
this.store = function (key, value) { | |
if (util.isUndefined(value)) { | |
return store[key] | |
} | |
if (util.instanceOf(value, 'Array')) { | |
var s = store[key] = [] | |
for (var i = 0; i < value.length; i++) { | |
s.push(value[i]) | |
} | |
} else { | |
// TODO(vojta): clone objects + deep | |
store[key] = value | |
} | |
} | |
// supposed to be overriden by the context | |
// TODO(vojta): support multiple callbacks (queue) | |
this.start = UNIMPLEMENTED_START | |
socket.on('execute', function (cfg) { | |
// reset hasError and reload the iframe | |
hasError = false | |
startEmitted = false | |
reloadingContext = false | |
self.config = cfg | |
navigateContextTo(constant.CONTEXT_URL) | |
// clear the console before run | |
// works only on FF (Safari, Chrome do not allow to clear console from js source) | |
if (window.console && window.console.clear) { | |
window.console.clear() | |
} | |
}) | |
socket.on('stop', function () { | |
this.complete() | |
}.bind(this)) | |
// report browser name, id | |
socket.on('connect', function () { | |
socket.io.engine.on('upgrade', function () { | |
resultsBufferLimit = 1 | |
}) | |
socket.emit('register', { | |
name: navigator.userAgent, | |
id: browserId | |
}) | |
}) | |
} | |
module.exports = Karma | |
},{"./constants":1,"./stringify":4,"./util":6}],3:[function(require,module,exports){ | |
/* global io */ | |
/* eslint-disable no-new */ | |
require('core-js/es5') | |
var Karma = require('./karma') | |
var StatusUpdater = require('./updater') | |
var util = require('./util') | |
var KARMA_URL_ROOT = require('./constants').KARMA_URL_ROOT | |
// Connect to the server using socket.io http://socket.io | |
var socket = io(location.host, { | |
reconnectionDelay: 500, | |
reconnectionDelayMax: Infinity, | |
timeout: 2000, | |
path: '/' + KARMA_URL_ROOT.substr(1) + 'socket.io', | |
'sync disconnect on unload': true | |
}) | |
// instantiate the updater of the view | |
new StatusUpdater(socket, util.elm('title'), util.elm('banner'), util.elm('browsers')) | |
window.karma = new Karma(socket, util.elm('context'), window.open, | |
window.navigator, window.location) | |
},{"./constants":1,"./karma":2,"./updater":5,"./util":6,"core-js/es5":7}],4:[function(require,module,exports){ | |
var serialize = require('dom-serialize') | |
var instanceOf = require('./util').instanceOf | |
var stringify = function stringify (obj, depth) { | |
if (depth === 0) { | |
return '...' | |
} | |
if (obj === null) { | |
return 'null' | |
} | |
switch (typeof obj) { | |
case 'string': | |
return "'" + obj + "'" | |
case 'undefined': | |
return 'undefined' | |
case 'function': | |
return obj.toString().replace(/\{[\s\S]*\}/, '{ ... }') | |
case 'boolean': | |
return obj ? 'true' : 'false' | |
case 'object': | |
var strs = [] | |
if (instanceOf(obj, 'Array')) { | |
strs.push('[') | |
for (var i = 0, ii = obj.length; i < ii; i++) { | |
if (i) { | |
strs.push(', ') | |
} | |
strs.push(stringify(obj[i], depth - 1)) | |
} | |
strs.push(']') | |
} else if (instanceOf(obj, 'Date')) { | |
return obj.toString() | |
} else if (instanceOf(obj, 'Text')) { | |
return obj.nodeValue | |
} else if (instanceOf(obj, 'Comment')) { | |
return '<!--' + obj.nodeValue + '-->' | |
} else if (obj.outerHTML) { | |
return obj.outerHTML | |
} else if (obj.tagName || obj.nodeName) { | |
return serialize(obj) | |
} else { | |
var constructor = 'Object' | |
if (obj.constructor && typeof obj.constructor === 'function') { | |
constructor = obj.constructor.name | |
} | |
strs.push(constructor) | |
strs.push('{') | |
var first = true | |
for (var key in obj) { | |
if (Object.prototype.hasOwnProperty.call(obj, key)) { | |
if (first) { | |
first = false | |
} else { | |
strs.push(', ') | |
} | |
strs.push(key + ': ' + stringify(obj[key], depth - 1)) | |
} | |
} | |
strs.push('}') | |
} | |
return strs.join('') | |
default: | |
return obj | |
} | |
} | |
module.exports = stringify | |
},{"./util":6,"dom-serialize":50}],5:[function(require,module,exports){ | |
var VERSION = require('./constants').VERSION | |
var StatusUpdater = function (socket, titleElement, bannerElement, browsersElement) { | |
var updateBrowsersInfo = function (browsers) { | |
var items = [] | |
var status | |
for (var i = 0; i < browsers.length; i++) { | |
status = browsers[i].isReady ? 'idle' : 'executing' | |
items.push('<li class="' + status + '">' + browsers[i].name + ' is ' + status + '</li>') | |
} | |
browsersElement.innerHTML = items.join('\n') | |
} | |
var updateBanner = function (status) { | |
return function (param) { | |
var paramStatus = param ? status.replace('$', param) : status | |
titleElement.innerHTML = 'Karma v' + VERSION + ' - ' + paramStatus | |
bannerElement.className = status === 'connected' ? 'online' : 'offline' | |
} | |
} | |
socket.on('connect', updateBanner('connected')) | |
socket.on('disconnect', updateBanner('disconnected')) | |
socket.on('reconnecting', updateBanner('reconnecting in $ ms...')) | |
socket.on('reconnect', updateBanner('connected')) | |
socket.on('reconnect_failed', updateBanner('failed to reconnect')) | |
socket.on('info', updateBrowsersInfo) | |
socket.on('disconnect', function () { | |
updateBrowsersInfo([]) | |
}) | |
} | |
module.exports = StatusUpdater | |
},{"./constants":1}],6:[function(require,module,exports){ | |
exports.instanceOf = function (value, constructorName) { | |
return Object.prototype.toString.apply(value) === '[object ' + constructorName + ']' | |
} | |
exports.elm = function (id) { | |
return document.getElementById(id) | |
} | |
exports.generateId = function (prefix) { | |
return prefix + Math.floor(Math.random() * 10000) | |
} | |
exports.isUndefined = function (value) { | |
return typeof value === 'undefined' | |
} | |
exports.isDefined = function (value) { | |
return !exports.isUndefined(value) | |
} | |
exports.parseQueryParams = function (locationSearch) { | |
var params = {} | |
var pairs = locationSearch.substr(1).split('&') | |
var keyValue | |
for (var i = 0; i < pairs.length; i++) { | |
keyValue = pairs[i].split('=') | |
params[decodeURIComponent(keyValue[0])] = decodeURIComponent(keyValue[1]) | |
} | |
return params | |
} | |
},{}],7:[function(require,module,exports){ | |
require('../modules/es5'); | |
require('../modules/es6.object.freeze'); | |
require('../modules/es6.object.seal'); | |
require('../modules/es6.object.prevent-extensions'); | |
require('../modules/es6.object.is-frozen'); | |
require('../modules/es6.object.is-sealed'); | |
require('../modules/es6.object.is-extensible'); | |
require('../modules/es6.string.trim'); | |
module.exports = require('../modules/$.core'); | |
},{"../modules/$.core":13,"../modules/es5":41,"../modules/es6.object.freeze":42,"../modules/es6.object.is-extensible":43,"../modules/es6.object.is-frozen":44,"../modules/es6.object.is-sealed":45,"../modules/es6.object.prevent-extensions":46,"../modules/es6.object.seal":47,"../modules/es6.string.trim":48}],8:[function(require,module,exports){ | |
module.exports = function(it){ | |
if(typeof it != 'function')throw TypeError(it + ' is not a function!'); | |
return it; | |
}; | |
},{}],9:[function(require,module,exports){ | |
var isObject = require('./$.is-object'); | |
module.exports = function(it){ | |
if(!isObject(it))throw TypeError(it + ' is not an object!'); | |
return it; | |
}; | |
},{"./$.is-object":26}],10:[function(require,module,exports){ | |
// false -> Array#indexOf | |
// true -> Array#includes | |
var toIObject = require('./$.to-iobject') | |
, toLength = require('./$.to-length') | |
, toIndex = require('./$.to-index'); | |
module.exports = function(IS_INCLUDES){ | |
return function($this, el, fromIndex){ | |
var O = toIObject($this) | |
, length = toLength(O.length) | |
, index = toIndex(fromIndex, length) | |
, value; | |
// Array#includes uses SameValueZero equality algorithm | |
if(IS_INCLUDES && el != el)while(length > index){ | |
value = O[index++]; | |
if(value != value)return true; | |
// Array#toIndex ignores holes, Array#includes - not | |
} else for(;length > index; index++)if(IS_INCLUDES || index in O){ | |
if(O[index] === el)return IS_INCLUDES || index; | |
} return !IS_INCLUDES && -1; | |
}; | |
}; | |
},{"./$.to-index":34,"./$.to-iobject":36,"./$.to-length":37}],11:[function(require,module,exports){ | |
// 0 -> Array#forEach | |
// 1 -> Array#map | |
// 2 -> Array#filter | |
// 3 -> Array#some | |
// 4 -> Array#every | |
// 5 -> Array#find | |
// 6 -> Array#findIndex | |
var ctx = require('./$.ctx') | |
, isObject = require('./$.is-object') | |
, IObject = require('./$.iobject') | |
, toObject = require('./$.to-object') | |
, toLength = require('./$.to-length') | |
, isArray = require('./$.is-array') | |
, SPECIES = require('./$.wks')('species'); | |
// 9.4.2.3 ArraySpeciesCreate(originalArray, length) | |
var ASC = function(original, length){ | |
var C; | |
if(isArray(original) && isObject(C = original.constructor)){ | |
C = C[SPECIES]; | |
if(C === null)C = undefined; | |
} return new (C === undefined ? Array : C)(length); | |
}; | |
module.exports = function(TYPE){ | |
var IS_MAP = TYPE == 1 | |
, IS_FILTER = TYPE == 2 | |
, IS_SOME = TYPE == 3 | |
, IS_EVERY = TYPE == 4 | |
, IS_FIND_INDEX = TYPE == 6 | |
, NO_HOLES = TYPE == 5 || IS_FIND_INDEX; | |
return function($this, callbackfn, that){ | |
var O = toObject($this) | |
, self = IObject(O) | |
, f = ctx(callbackfn, that, 3) | |
, length = toLength(self.length) | |
, index = 0 | |
, result = IS_MAP ? ASC($this, length) : IS_FILTER ? ASC($this, 0) : undefined | |
, val, res; | |
for(;length > index; index++)if(NO_HOLES || index in self){ | |
val = self[index]; | |
res = f(val, index, O); | |
if(TYPE){ | |
if(IS_MAP)result[index] = res; // map | |
else if(res)switch(TYPE){ | |
case 3: return true; // some | |
case 5: return val; // find | |
case 6: return index; // findIndex | |
case 2: result.push(val); // filter | |
} else if(IS_EVERY)return false; // every | |
} | |
} | |
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; | |
}; | |
}; | |
},{"./$.ctx":14,"./$.iobject":24,"./$.is-array":25,"./$.is-object":26,"./$.to-length":37,"./$.to-object":38,"./$.wks":40}],12:[function(require,module,exports){ | |
var toString = {}.toString; | |
module.exports = function(it){ | |
return toString.call(it).slice(8, -1); | |
}; | |
},{}],13:[function(require,module,exports){ | |
var core = module.exports = {version: '1.2.2'}; | |
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef | |
},{}],14:[function(require,module,exports){ | |
// optional / simple context binding | |
var aFunction = require('./$.a-function'); | |
module.exports = function(fn, that, length){ | |
aFunction(fn); | |
if(that === undefined)return fn; | |
switch(length){ | |
case 1: return function(a){ | |
return fn.call(that, a); | |
}; | |
case 2: return function(a, b){ | |
return fn.call(that, a, b); | |
}; | |
case 3: return function(a, b, c){ | |
return fn.call(that, a, b, c); | |
}; | |
} | |
return function(/* ...args */){ | |
return fn.apply(that, arguments); | |
}; | |
}; | |
},{"./$.a-function":8}],15:[function(require,module,exports){ | |
var global = require('./$.global') | |
, core = require('./$.core') | |
, hide = require('./$.hide') | |
, $redef = require('./$.redef') | |
, PROTOTYPE = 'prototype'; | |
var ctx = function(fn, that){ | |
return function(){ | |
return fn.apply(that, arguments); | |
}; | |
}; | |
var $def = function(type, name, source){ | |
var key, own, out, exp | |
, isGlobal = type & $def.G | |
, isProto = type & $def.P | |
, target = isGlobal ? global : type & $def.S | |
? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] | |
, exports = isGlobal ? core : core[name] || (core[name] = {}); | |
if(isGlobal)source = name; | |
for(key in source){ | |
// contains in native | |
own = !(type & $def.F) && target && key in target; | |
// export native or passed | |
out = (own ? target : source)[key]; | |
// bind timers to global for call from export context | |
if(type & $def.B && own)exp = ctx(out, global); | |
else exp = isProto && typeof out == 'function' ? ctx(Function.call, out) : out; | |
// extend global | |
if(target && !own)$redef(target, key, out); | |
// export | |
if(exports[key] != out)hide(exports, key, exp); | |
if(isProto)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; | |
} | |
}; | |
global.core = core; | |
// type bitmap | |
$def.F = 1; // forced | |
$def.G = 2; // global | |
$def.S = 4; // static | |
$def.P = 8; // proto | |
$def.B = 16; // bind | |
$def.W = 32; // wrap | |
module.exports = $def; | |
},{"./$.core":13,"./$.global":19,"./$.hide":21,"./$.redef":30}],16:[function(require,module,exports){ | |
// 7.2.1 RequireObjectCoercible(argument) | |
module.exports = function(it){ | |
if(it == undefined)throw TypeError("Can't call method on " + it); | |
return it; | |
}; | |
},{}],17:[function(require,module,exports){ | |
var isObject = require('./$.is-object') | |
, document = require('./$.global').document | |
// in old IE typeof document.createElement is 'object' | |
, is = isObject(document) && isObject(document.createElement); | |
module.exports = function(it){ | |
return is ? document.createElement(it) : {}; | |
}; | |
},{"./$.global":19,"./$.is-object":26}],18:[function(require,module,exports){ | |
module.exports = function(exec){ | |
try { | |
return !!exec(); | |
} catch(e){ | |
return true; | |
} | |
}; | |
},{}],19:[function(require,module,exports){ | |
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | |
var global = module.exports = typeof window != 'undefined' && window.Math == Math | |
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); | |
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef | |
},{}],20:[function(require,module,exports){ | |
var hasOwnProperty = {}.hasOwnProperty; | |
module.exports = function(it, key){ | |
return hasOwnProperty.call(it, key); | |
}; | |
},{}],21:[function(require,module,exports){ | |
var $ = require('./$') | |
, createDesc = require('./$.property-desc'); | |
module.exports = require('./$.support-desc') ? function(object, key, value){ | |
return $.setDesc(object, key, createDesc(1, value)); | |
} : function(object, key, value){ | |
object[key] = value; | |
return object; | |
}; | |
},{"./$":27,"./$.property-desc":29,"./$.support-desc":33}],22:[function(require,module,exports){ | |
module.exports = require('./$.global').document && document.documentElement; | |
},{"./$.global":19}],23:[function(require,module,exports){ | |
// fast apply, http://jsperf.lnkit.com/fast-apply/5 | |
module.exports = function(fn, args, that){ | |
var un = that === undefined; | |
switch(args.length){ | |
case 0: return un ? fn() | |
: fn.call(that); | |
case 1: return un ? fn(args[0]) | |
: fn.call(that, args[0]); | |
case 2: return un ? fn(args[0], args[1]) | |
: fn.call(that, args[0], args[1]); | |
case 3: return un ? fn(args[0], args[1], args[2]) | |
: fn.call(that, args[0], args[1], args[2]); | |
case 4: return un ? fn(args[0], args[1], args[2], args[3]) | |
: fn.call(that, args[0], args[1], args[2], args[3]); | |
} return fn.apply(that, args); | |
}; | |
},{}],24:[function(require,module,exports){ | |
// indexed object, fallback for non-array-like ES3 strings | |
var cof = require('./$.cof'); | |
module.exports = 0 in Object('z') ? Object : function(it){ | |
return cof(it) == 'String' ? it.split('') : Object(it); | |
}; | |
},{"./$.cof":12}],25:[function(require,module,exports){ | |
// 7.2.2 IsArray(argument) | |
var cof = require('./$.cof'); | |
module.exports = Array.isArray || function(arg){ | |
return cof(arg) == 'Array'; | |
}; | |
},{"./$.cof":12}],26:[function(require,module,exports){ | |
module.exports = function(it){ | |
return typeof it === 'object' ? it !== null : typeof it === 'function'; | |
}; | |
},{}],27:[function(require,module,exports){ | |
var $Object = Object; | |
module.exports = { | |
create: $Object.create, | |
getProto: $Object.getPrototypeOf, | |
isEnum: {}.propertyIsEnumerable, | |
getDesc: $Object.getOwnPropertyDescriptor, | |
setDesc: $Object.defineProperty, | |
setDescs: $Object.defineProperties, | |
getKeys: $Object.keys, | |
getNames: $Object.getOwnPropertyNames, | |
getSymbols: $Object.getOwnPropertySymbols, | |
each: [].forEach | |
}; | |
},{}],28:[function(require,module,exports){ | |
// most Object methods by ES6 should accept primitives | |
module.exports = function(KEY, exec){ | |
var $def = require('./$.def') | |
, fn = (require('./$.core').Object || {})[KEY] || Object[KEY] | |
, exp = {}; | |
exp[KEY] = exec(fn); | |
$def($def.S + $def.F * require('./$.fails')(function(){ fn(1); }), 'Object', exp); | |
}; | |
},{"./$.core":13,"./$.def":15,"./$.fails":18}],29:[function(require,module,exports){ | |
module.exports = function(bitmap, value){ | |
return { | |
enumerable : !(bitmap & 1), | |
configurable: !(bitmap & 2), | |
writable : !(bitmap & 4), | |
value : value | |
}; | |
}; | |
},{}],30:[function(require,module,exports){ | |
// add fake Function#toString | |
// for correct work wrapped methods / constructors with methods like LoDash isNative | |
var global = require('./$.global') | |
, hide = require('./$.hide') | |
, SRC = require('./$.uid')('src') | |
, TO_STRING = 'toString' | |
, $toString = Function[TO_STRING] | |
, TPL = ('' + $toString).split(TO_STRING); | |
require('./$.core').inspectSource = function(it){ | |
return $toString.call(it); | |
}; | |
(module.exports = function(O, key, val, safe){ | |
if(typeof val == 'function'){ | |
hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); | |
if(!('name' in val))val.name = key; | |
} | |
if(O === global){ | |
O[key] = val; | |
} else { | |
if(!safe)delete O[key]; | |
hide(O, key, val); | |
} | |
})(Function.prototype, TO_STRING, function toString(){ | |
return typeof this == 'function' && this[SRC] || $toString.call(this); | |
}); | |
},{"./$.core":13,"./$.global":19,"./$.hide":21,"./$.uid":39}],31:[function(require,module,exports){ | |
var global = require('./$.global') | |
, SHARED = '__core-js_shared__' | |
, store = global[SHARED] || (global[SHARED] = {}); | |
module.exports = function(key){ | |
return store[key] || (store[key] = {}); | |
}; | |
},{"./$.global":19}],32:[function(require,module,exports){ | |
// 1 -> String#trimLeft | |
// 2 -> String#trimRight | |
// 3 -> String#trim | |
var trim = function(string, TYPE){ | |
string = String(defined(string)); | |
if(TYPE & 1)string = string.replace(ltrim, ''); | |
if(TYPE & 2)string = string.replace(rtrim, ''); | |
return string; | |
}; | |
var $def = require('./$.def') | |
, defined = require('./$.defined') | |
, spaces = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + | |
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF' | |
, space = '[' + spaces + ']' | |
, non = '\u200b\u0085' | |
, ltrim = RegExp('^' + space + space + '*') | |
, rtrim = RegExp(space + space + '*$'); | |
module.exports = function(KEY, exec){ | |
var exp = {}; | |
exp[KEY] = exec(trim); | |
$def($def.P + $def.F * require('./$.fails')(function(){ | |
return !!spaces[KEY]() || non[KEY]() != non; | |
}), 'String', exp); | |
}; | |
},{"./$.def":15,"./$.defined":16,"./$.fails":18}],33:[function(require,module,exports){ | |
// Thank's IE8 for his funny defineProperty | |
module.exports = !require('./$.fails')(function(){ | |
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; | |
}); | |
},{"./$.fails":18}],34:[function(require,module,exports){ | |
var toInteger = require('./$.to-integer') | |
, max = Math.max | |
, min = Math.min; | |
module.exports = function(index, length){ | |
index = toInteger(index); | |
return index < 0 ? max(index + length, 0) : min(index, length); | |
}; | |
},{"./$.to-integer":35}],35:[function(require,module,exports){ | |
// 7.1.4 ToInteger | |
var ceil = Math.ceil | |
, floor = Math.floor; | |
module.exports = function(it){ | |
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); | |
}; | |
},{}],36:[function(require,module,exports){ | |
// to indexed object, toObject with fallback for non-array-like ES3 strings | |
var IObject = require('./$.iobject') | |
, defined = require('./$.defined'); | |
module.exports = function(it){ | |
return IObject(defined(it)); | |
}; | |
},{"./$.defined":16,"./$.iobject":24}],37:[function(require,module,exports){ | |
// 7.1.15 ToLength | |
var toInteger = require('./$.to-integer') | |
, min = Math.min; | |
module.exports = function(it){ | |
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 | |
}; | |
},{"./$.to-integer":35}],38:[function(require,module,exports){ | |
// 7.1.13 ToObject(argument) | |
var defined = require('./$.defined'); | |
module.exports = function(it){ | |
return Object(defined(it)); | |
}; | |
},{"./$.defined":16}],39:[function(require,module,exports){ | |
var id = 0 | |
, px = Math.random(); | |
module.exports = function(key){ | |
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | |
}; | |
},{}],40:[function(require,module,exports){ | |
var store = require('./$.shared')('wks') | |
, Symbol = require('./$.global').Symbol; | |
module.exports = function(name){ | |
return store[name] || (store[name] = | |
Symbol && Symbol[name] || (Symbol || require('./$.uid'))('Symbol.' + name)); | |
}; | |
},{"./$.global":19,"./$.shared":31,"./$.uid":39}],41:[function(require,module,exports){ | |
'use strict'; | |
var $ = require('./$') | |
, SUPPORT_DESC = require('./$.support-desc') | |
, createDesc = require('./$.property-desc') | |
, html = require('./$.html') | |
, cel = require('./$.dom-create') | |
, has = require('./$.has') | |
, cof = require('./$.cof') | |
, $def = require('./$.def') | |
, invoke = require('./$.invoke') | |
, arrayMethod = require('./$.array-methods') | |
, IE_PROTO = require('./$.uid')('__proto__') | |
, isObject = require('./$.is-object') | |
, anObject = require('./$.an-object') | |
, aFunction = require('./$.a-function') | |
, toObject = require('./$.to-object') | |
, toIObject = require('./$.to-iobject') | |
, toInteger = require('./$.to-integer') | |
, toIndex = require('./$.to-index') | |
, toLength = require('./$.to-length') | |
, IObject = require('./$.iobject') | |
, fails = require('./$.fails') | |
, ObjectProto = Object.prototype | |
, A = [] | |
, _slice = A.slice | |
, _join = A.join | |
, defineProperty = $.setDesc | |
, getOwnDescriptor = $.getDesc | |
, defineProperties = $.setDescs | |
, $indexOf = require('./$.array-includes')(false) | |
, factories = {} | |
, IE8_DOM_DEFINE; | |
if(!SUPPORT_DESC){ | |
IE8_DOM_DEFINE = !fails(function(){ | |
return defineProperty(cel('div'), 'a', {get: function(){ return 7; }}).a != 7; | |
}); | |
$.setDesc = function(O, P, Attributes){ | |
if(IE8_DOM_DEFINE)try { | |
return defineProperty(O, P, Attributes); | |
} catch(e){ /* empty */ } | |
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); | |
if('value' in Attributes)anObject(O)[P] = Attributes.value; | |
return O; | |
}; | |
$.getDesc = function(O, P){ | |
if(IE8_DOM_DEFINE)try { | |
return getOwnDescriptor(O, P); | |
} catch(e){ /* empty */ } | |
if(has(O, P))return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]); | |
}; | |
$.setDescs = defineProperties = function(O, Properties){ | |
anObject(O); | |
var keys = $.getKeys(Properties) | |
, length = keys.length | |
, i = 0 | |
, P; | |
while(length > i)$.setDesc(O, P = keys[i++], Properties[P]); | |
return O; | |
}; | |
} | |
$def($def.S + $def.F * !SUPPORT_DESC, 'Object', { | |
// 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P) | |
getOwnPropertyDescriptor: $.getDesc, | |
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) | |
defineProperty: $.setDesc, | |
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) | |
defineProperties: defineProperties | |
}); | |
// IE 8- don't enum bug keys | |
var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + | |
'toLocaleString,toString,valueOf').split(',') | |
// Additional keys for getOwnPropertyNames | |
, keys2 = keys1.concat('length', 'prototype') | |
, keysLen1 = keys1.length; | |
// Create object with `null` prototype: use iframe Object with cleared prototype | |
var createDict = function(){ | |
// Thrash, waste and sodomy: IE GC bug | |
var iframe = cel('iframe') | |
, i = keysLen1 | |
, gt = '>' | |
, iframeDocument; | |
iframe.style.display = 'none'; | |
html.appendChild(iframe); | |
iframe.src = 'javascript:'; // eslint-disable-line no-script-url | |
// createDict = iframe.contentWindow.Object; | |
// html.removeChild(iframe); | |
iframeDocument = iframe.contentWindow.document; | |
iframeDocument.open(); | |
iframeDocument.write('<script>document.F=Object</script' + gt); | |
iframeDocument.close(); | |
createDict = iframeDocument.F; | |
while(i--)delete createDict.prototype[keys1[i]]; | |
return createDict(); | |
}; | |
var createGetKeys = function(names, length){ | |
return function(object){ | |
var O = toIObject(object) | |
, i = 0 | |
, result = [] | |
, key; | |
for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); | |
// Don't enum bug & hidden keys | |
while(length > i)if(has(O, key = names[i++])){ | |
~$indexOf(result, key) || result.push(key); | |
} | |
return result; | |
}; | |
}; | |
var Empty = function(){}; | |
$def($def.S, 'Object', { | |
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) | |
getPrototypeOf: $.getProto = $.getProto || function(O){ | |
O = toObject(O); | |
if(has(O, IE_PROTO))return O[IE_PROTO]; | |
if(typeof O.constructor == 'function' && O instanceof O.constructor){ | |
return O.constructor.prototype; | |
} return O instanceof Object ? ObjectProto : null; | |
}, | |
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) | |
getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true), | |
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) | |
create: $.create = $.create || function(O, /*?*/Properties){ | |
var result; | |
if(O !== null){ | |
Empty.prototype = anObject(O); | |
result = new Empty(); | |
Empty.prototype = null; | |
// add "__proto__" for Object.getPrototypeOf shim | |
result[IE_PROTO] = O; | |
} else result = createDict(); | |
return Properties === undefined ? result : defineProperties(result, Properties); | |
}, | |
// 19.1.2.14 / 15.2.3.14 Object.keys(O) | |
keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false) | |
}); | |
var construct = function(F, len, args){ | |
if(!(len in factories)){ | |
for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; | |
factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); | |
} | |
return factories[len](F, args); | |
}; | |
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) | |
$def($def.P, 'Function', { | |
bind: function bind(that /*, args... */){ | |
var fn = aFunction(this) | |
, partArgs = _slice.call(arguments, 1); | |
var bound = function(/* args... */){ | |
var args = partArgs.concat(_slice.call(arguments)); | |
return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); | |
}; | |
if(isObject(fn.prototype))bound.prototype = fn.prototype; | |
return bound; | |
} | |
}); | |
// fallback for not array-like ES3 strings and DOM objects | |
var buggySlice = fails(function(){ | |
if(html)_slice.call(html); | |
}); | |
$def($def.P + $def.F * buggySlice, 'Array', { | |
slice: function(begin, end){ | |
var len = toLength(this.length) | |
, klass = cof(this); | |
end = end === undefined ? len : end; | |
if(klass == 'Array')return _slice.call(this, begin, end); | |
var start = toIndex(begin, len) | |
, upTo = toIndex(end, len) | |
, size = toLength(upTo - start) | |
, cloned = Array(size) | |
, i = 0; | |
for(; i < size; i++)cloned[i] = klass == 'String' | |
? this.charAt(start + i) | |
: this[start + i]; | |
return cloned; | |
} | |
}); | |
$def($def.P + $def.F * (IObject != Object), 'Array', { | |
join: function(){ | |
return _join.apply(IObject(this), arguments); | |
} | |
}); | |
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) | |
$def($def.S, 'Array', {isArray: require('./$.is-array')}); | |
var createArrayReduce = function(isRight){ | |
return function(callbackfn, memo){ | |
aFunction(callbackfn); | |
var O = IObject(this) | |
, length = toLength(O.length) | |
, index = isRight ? length - 1 : 0 | |
, i = isRight ? -1 : 1; | |
if(arguments.length < 2)for(;;){ | |
if(index in O){ | |
memo = O[index]; | |
index += i; | |
break; | |
} | |
index += i; | |
if(isRight ? index < 0 : length <= index){ | |
throw TypeError('Reduce of empty array with no initial value'); | |
} | |
} | |
for(;isRight ? index >= 0 : length > index; index += i)if(index in O){ | |
memo = callbackfn(memo, O[index], index, this); | |
} | |
return memo; | |
}; | |
}; | |
var methodize = function($fn){ | |
return function(arg1/*, arg2 = undefined */){ | |
return $fn(this, arg1, arguments[1]); | |
}; | |
}; | |
$def($def.P, 'Array', { | |
// 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) | |
forEach: $.each = $.each || methodize(arrayMethod(0)), | |
// 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) | |
map: methodize(arrayMethod(1)), | |
// 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) | |
filter: methodize(arrayMethod(2)), | |
// 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) | |
some: methodize(arrayMethod(3)), | |
// 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) | |
every: methodize(arrayMethod(4)), | |
// 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) | |
reduce: createArrayReduce(false), | |
// 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) | |
reduceRight: createArrayReduce(true), | |
// 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) | |
indexOf: methodize($indexOf), | |
// 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) | |
lastIndexOf: function(el, fromIndex /* = @[*-1] */){ | |
var O = toIObject(this) | |
, length = toLength(O.length) | |
, index = length - 1; | |
if(arguments.length > 1)index = Math.min(index, toInteger(fromIndex)); | |
if(index < 0)index = toLength(length + index); | |
for(;index >= 0; index--)if(index in O)if(O[index] === el)return index; | |
return -1; | |
} | |
}); | |
// 20.3.3.1 / 15.9.4.4 Date.now() | |
$def($def.S, 'Date', {now: function(){ return +new Date; }}); | |
var lz = function(num){ | |
return num > 9 ? num : '0' + num; | |
}; | |
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() | |
// PhantomJS and old webkit had a broken Date implementation. | |
var date = new Date(-5e13 - 1) | |
, brokenDate = !(date.toISOString && date.toISOString() == '0385-07-25T07:06:39.999Z' | |
&& fails(function(){ new Date(NaN).toISOString(); })); | |
$def($def.P + $def.F * brokenDate, 'Date', { | |
toISOString: function toISOString(){ | |
if(!isFinite(this))throw RangeError('Invalid time value'); | |
var d = this | |
, y = d.getUTCFullYear() | |
, m = d.getUTCMilliseconds() | |
, s = y < 0 ? '-' : y > 9999 ? '+' : ''; | |
return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + | |
'-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + | |
'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + | |
':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; | |
} | |
}); | |
},{"./$":27,"./$.a-function":8,"./$.an-object":9,"./$.array-includes":10,"./$.array-methods":11,"./$.cof":12,"./$.def":15,"./$.dom-create":17,"./$.fails":18,"./$.has":20,"./$.html":22,"./$.invoke":23,"./$.iobject":24,"./$.is-array":25,"./$.is-object":26,"./$.property-desc":29,"./$.support-desc":33,"./$.to-index":34,"./$.to-integer":35,"./$.to-iobject":36,"./$.to-length":37,"./$.to-object":38,"./$.uid":39}],42:[function(require,module,exports){ | |
// 19.1.2.5 Object.freeze(O) | |
var isObject = require('./$.is-object'); | |
require('./$.object-sap')('freeze', function($freeze){ | |
return function freeze(it){ | |
return $freeze && isObject(it) ? $freeze(it) : it; | |
}; | |
}); | |
},{"./$.is-object":26,"./$.object-sap":28}],43:[function(require,module,exports){ | |
// 19.1.2.11 Object.isExtensible(O) | |
var isObject = require('./$.is-object'); | |
require('./$.object-sap')('isExtensible', function($isExtensible){ | |
return function isExtensible(it){ | |
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; | |
}; | |
}); | |
},{"./$.is-object":26,"./$.object-sap":28}],44:[function(require,module,exports){ | |
// 19.1.2.12 Object.isFrozen(O) | |
var isObject = require('./$.is-object'); | |
require('./$.object-sap')('isFrozen', function($isFrozen){ | |
return function isFrozen(it){ | |
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; | |
}; | |
}); | |
},{"./$.is-object":26,"./$.object-sap":28}],45:[function(require,module,exports){ | |
// 19.1.2.13 Object.isSealed(O) | |
var isObject = require('./$.is-object'); | |
require('./$.object-sap')('isSealed', function($isSealed){ | |
return function isSealed(it){ | |
return isObject(it) ? $isSealed ? $isSealed(it) : false : true; | |
}; | |
}); | |
},{"./$.is-object":26,"./$.object-sap":28}],46:[function(require,module,exports){ | |
// 19.1.2.15 Object.preventExtensions(O) | |
var isObject = require('./$.is-object'); | |
require('./$.object-sap')('preventExtensions', function($preventExtensions){ | |
return function preventExtensions(it){ | |
return $preventExtensions && isObject(it) ? $preventExtensions(it) : it; | |
}; | |
}); | |
},{"./$.is-object":26,"./$.object-sap":28}],47:[function(require,module,exports){ | |
// 19.1.2.17 Object.seal(O) | |
var isObject = require('./$.is-object'); | |
require('./$.object-sap')('seal', function($seal){ | |
return function seal(it){ | |
return $seal && isObject(it) ? $seal(it) : it; | |
}; | |
}); | |
},{"./$.is-object":26,"./$.object-sap":28}],48:[function(require,module,exports){ | |
'use strict'; | |
// 21.1.3.25 String.prototype.trim() | |
require('./$.string-trim')('trim', function($trim){ | |
return function trim(){ | |
return $trim(this, 3); | |
}; | |
}); | |
},{"./$.string-trim":32}],49:[function(require,module,exports){ | |
(function (global){ | |
var NativeCustomEvent = global.CustomEvent; | |
function useNative () { | |
try { | |
var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } }); | |
return 'cat' === p.type && 'bar' === p.detail.foo; | |
} catch (e) { | |
} | |
return false; | |
} | |
/** | |
* Cross-browser `CustomEvent` constructor. | |
* | |
* https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent | |
* | |
* @public | |
*/ | |
module.exports = useNative() ? NativeCustomEvent : | |
// IE >= 9 | |
'function' === typeof document.createEvent ? function CustomEvent (type, params) { | |
var e = document.createEvent('CustomEvent'); | |
if (params) { | |
e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail); | |
} else { | |
e.initCustomEvent(type, false, false, void 0); | |
} | |
return e; | |
} : | |
// IE <= 8 | |
function CustomEvent (type, params) { | |
var e = document.createEventObject(); | |
e.type = type; | |
if (params) { | |
e.bubbles = Boolean(params.bubbles); | |
e.cancelable = Boolean(params.cancelable); | |
e.detail = params.detail; | |
} else { | |
e.bubbles = false; | |
e.cancelable = false; | |
e.detail = void 0; | |
} | |
return e; | |
} | |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | |
},{}],50:[function(require,module,exports){ | |
/** | |
* Module dependencies. | |
*/ | |
var extend = require('extend'); | |
var encode = require('ent/encode'); | |
var CustomEvent = require('custom-event'); | |
var voidElements = require('void-elements').reduce(function (obj, name) { | |
obj[name] = true; | |
return obj; | |
}, {}); | |
/** | |
* Module exports. | |
*/ | |
exports = module.exports = serialize; | |
exports.serializeElement = serializeElement; | |
exports.serializeAttribute = serializeAttribute; | |
exports.serializeText = serializeText; | |
exports.serializeComment = serializeComment; | |
exports.serializeDocument = serializeDocument; | |
exports.serializeDoctype = serializeDoctype; | |
exports.serializeDocumentFragment = serializeDocumentFragment; | |
exports.serializeNodeList = serializeNodeList; | |
/** | |
* Serializes any DOM node. Returns a string. | |
* | |
* @param {Node} node - DOM Node to serialize | |
* @param {String} [context] - optional arbitrary "context" string to use (useful for event listeners) | |
* @param {Function} [fn] - optional callback function to use in the "serialize" event for this call | |
* @param {EventTarget} [eventTarget] - optional EventTarget instance to emit the "serialize" event on (defaults to `node`) | |
* return {String} | |
* @public | |
*/ | |
function serialize (node, context, fn, eventTarget) { | |
if (!node) return ''; | |
if ('function' === typeof context) { | |
fn = context; | |
context = null; | |
} | |
if (!context) context = null; | |
var rtn; | |
var nodeType = node.nodeType; | |
if (!nodeType && 'number' === typeof node.length) { | |
// assume it's a NodeList or Array of Nodes | |
rtn = exports.serializeNodeList(node, context, fn); | |
} else { | |
if ('function' === typeof fn) { | |
// one-time "serialize" event listener | |
node.addEventListener('serialize', fn, false); | |
} | |
// emit a custom "serialize" event on `node`, in case there | |
// are event listeners for custom serialization of this node | |
var e = new CustomEvent('serialize', { | |
bubbles: true, | |
cancelable: true, | |
detail: { | |
serialize: null, | |
context: context | |
} | |
}); | |
e.serializeTarget = node; | |
var target = eventTarget || node; | |
var cancelled = !target.dispatchEvent(e); | |
// `e.detail.serialize` can be set to a: | |
// String - returned directly | |
// Node - goes through serializer logic instead of `node` | |
// Anything else - get Stringified first, and then returned directly | |
var s = e.detail.serialize; | |
if (s != null) { | |
if ('string' === typeof s) { | |
rtn = s; | |
} else if ('number' === typeof s.nodeType) { | |
// make it go through the serialization logic | |
rtn = serialize(s, context, null, target); | |
} else { | |
rtn = String(s); | |
} | |
} else if (!cancelled) { | |
// default serialization logic | |
switch (nodeType) { | |
case 1 /* element */: | |
rtn = exports.serializeElement(node, context, eventTarget); | |
break; | |
case 2 /* attribute */: | |
rtn = exports.serializeAttribute(node); | |
break; | |
case 3 /* text */: | |
rtn = exports.serializeText(node); | |
break; | |
case 8 /* comment */: | |
rtn = exports.serializeComment(node); | |
break; | |
case 9 /* document */: | |
rtn = exports.serializeDocument(node, context, eventTarget); | |
break; | |
case 10 /* doctype */: | |
rtn = exports.serializeDoctype(node); | |
break; | |
case 11 /* document fragment */: | |
rtn = exports.serializeDocumentFragment(node, context, eventTarget); | |
break; | |
} | |
} | |
if ('function' === typeof fn) { | |
node.removeEventListener('serialize', fn, false); | |
} | |
} | |
return rtn || ''; | |
} | |
/** | |
* Serialize an Attribute node. | |
*/ | |
function serializeAttribute (node, opts) { | |
return node.name + '="' + encode(node.value, extend({ | |
named: true | |
}, opts)) + '"'; | |
} | |
/** | |
* Serialize a DOM element. | |
*/ | |
function serializeElement (node, context, eventTarget) { | |
var c, i, l; | |
var name = node.nodeName.toLowerCase(); | |
// opening tag | |
var r = '<' + name; | |
// attributes | |
for (i = 0, c = node.attributes, l = c.length; i < l; i++) { | |
r += ' ' + exports.serializeAttribute(c[i]); | |
} | |
r += '>'; | |
// child nodes | |
r += exports.serializeNodeList(node.childNodes, context, null, eventTarget); | |
// closing tag, only for non-void elements | |
if (!voidElements[name]) { | |
r += '</' + name + '>'; | |
} | |
return r; | |
} | |
/** | |
* Serialize a text node. | |
*/ | |
function serializeText (node, opts) { | |
return encode(node.nodeValue, extend({ | |
named: true, | |
special: { '<': true, '>': true, '&': true } | |
}, opts)); | |
} | |
/** | |
* Serialize a comment node. | |
*/ | |
function serializeComment (node) { | |
return '<!--' + node.nodeValue + '-->'; | |
} | |
/** | |
* Serialize a Document node. | |
*/ | |
function serializeDocument (node, context, eventTarget) { | |
return exports.serializeNodeList(node.childNodes, context, null, eventTarget); | |
} | |
/** | |
* Serialize a DOCTYPE node. | |
* See: http://stackoverflow.com/a/10162353 | |
*/ | |
function serializeDoctype (node) { | |
var r = '<!DOCTYPE ' + node.name; | |
if (node.publicId) { | |
r += ' PUBLIC "' + node.publicId + '"'; | |
} | |
if (!node.publicId && node.systemId) { | |
r += ' SYSTEM'; | |
} | |
if (node.systemId) { | |
r += ' "' + node.systemId + '"'; | |
} | |
r += '>'; | |
return r; | |
} | |
/** | |
* Serialize a DocumentFragment instance. | |
*/ | |
function serializeDocumentFragment (node, context, eventTarget) { | |
return exports.serializeNodeList(node.childNodes, context, null, eventTarget); | |
} | |
/** | |
* Serialize a NodeList/Array of nodes. | |
*/ | |
function serializeNodeList (list, context, fn, eventTarget) { | |
var r = ''; | |
for (var i = 0, l = list.length; i < l; i++) { | |
r += serialize(list[i], context, fn, eventTarget); | |
} | |
return r; | |
} | |
},{"custom-event":49,"ent/encode":51,"extend":53,"void-elements":55}],51:[function(require,module,exports){ | |
var punycode = require('punycode'); | |
var revEntities = require('./reversed.json'); | |
module.exports = encode; | |
function encode (str, opts) { | |
if (typeof str !== 'string') { | |
throw new TypeError('Expected a String'); | |
} | |
if (!opts) opts = {}; | |
var numeric = true; | |
if (opts.named) numeric = false; | |
if (opts.numeric !== undefined) numeric = opts.numeric; | |
var special = opts.special || { | |
'"': true, "'": true, | |
'<': true, '>': true, | |
'&': true | |
}; | |
var codePoints = punycode.ucs2.decode(str); | |
var chars = []; | |
for (var i = 0; i < codePoints.length; i++) { | |
var cc = codePoints[i]; | |
var c = punycode.ucs2.encode([ cc ]); | |
var e = revEntities[cc]; | |
if (e && (cc >= 127 || special[c]) && !numeric) { | |
chars.push('&' + (/;$/.test(e) ? e : e + ';')); | |
} | |
else if (cc < 32 || cc >= 127 || special[c]) { | |
chars.push('&#' + cc + ';'); | |
} | |
else { | |
chars.push(c); | |
} | |
} | |
return chars.join(''); | |
} | |
},{"./reversed.json":52,"punycode":54}],52:[function(require,module,exports){ | |
module.exports={ | |
"9": "Tab;", | |
"10": "NewLine;", | |
"33": "excl;", | |
"34": "quot;", | |
"35": "num;", | |
"36": "dollar;", | |
"37": "percnt;", | |
"38": "amp;", | |
"39": "apos;", | |
"40": "lpar;", | |
"41": "rpar;", | |
"42": "midast;", | |
"43": "plus;", | |
"44": "comma;", | |
"46": "period;", | |
"47": "sol;", | |
"58": "colon;", | |
"59": "semi;", | |
"60": "lt;", | |
"61": "equals;", | |
"62": "gt;", | |
"63": "quest;", | |
"64": "commat;", | |
"91": "lsqb;", | |
"92": "bsol;", | |
"93": "rsqb;", | |
"94": "Hat;", | |
"95": "UnderBar;", | |
"96": "grave;", | |
"123": "lcub;", | |
"124": "VerticalLine;", | |
"125": "rcub;", | |
"160": "NonBreakingSpace;", | |
"161": "iexcl;", | |
"162": "cent;", | |
"163": "pound;", | |
"164": "curren;", | |
"165": "yen;", | |
"166": "brvbar;", | |
"167": "sect;", | |
"168": "uml;", | |
"169": "copy;", | |
"170": "ordf;", | |
"171": "laquo;", | |
"172": "not;", | |
"173": "shy;", | |
"174": "reg;", | |
"175": "strns;", | |
"176": "deg;", | |
"177": "pm;", | |
"178": "sup2;", | |
"179": "sup3;", | |
"180": "DiacriticalAcute;", | |
"181": "micro;", | |
"182": "para;", | |
"183": "middot;", | |
"184": "Cedilla;", | |
"185": "sup1;", | |
"186": "ordm;", | |
"187": "raquo;", | |
"188": "frac14;", | |
"189": "half;", | |
"190": "frac34;", | |
"191": "iquest;", | |
"192": "Agrave;", | |
"193": "Aacute;", | |
"194": "Acirc;", | |
"195": "Atilde;", | |
"196": "Auml;", | |
"197": "Aring;", | |
"198": "AElig;", | |
"199": "Ccedil;", | |
"200": "Egrave;", | |
"201": "Eacute;", | |
"202": "Ecirc;", | |
"203": "Euml;", | |
"204": "Igrave;", | |
"205": "Iacute;", | |
"206": "Icirc;", | |
"207": "Iuml;", | |
"208": "ETH;", | |
"209": "Ntilde;", | |
"210": "Ograve;", | |
"211": "Oacute;", | |
"212": "Ocirc;", | |
"213": "Otilde;", | |
"214": "Ouml;", | |
"215": "times;", | |
"216": "Oslash;", | |
"217": "Ugrave;", | |
"218": "Uacute;", | |
"219": "Ucirc;", | |
"220": "Uuml;", | |
"221": "Yacute;", | |
"222": "THORN;", | |
"223": "szlig;", | |
"224": "agrave;", | |
"225": "aacute;", | |
"226": "acirc;", | |
"227": "atilde;", | |
"228": "auml;", | |
"229": "aring;", | |
"230": "aelig;", | |
"231": "ccedil;", | |
"232": "egrave;", | |
"233": "eacute;", | |
"234": "ecirc;", | |
"235": "euml;", | |
"236": "igrave;", | |
"237": "iacute;", | |
"238": "icirc;", | |
"239": "iuml;", | |
"240": "eth;", | |
"241": "ntilde;", | |
"242": "ograve;", | |
"243": "oacute;", | |
"244": "ocirc;", | |
"245": "otilde;", | |
"246": "ouml;", | |
"247": "divide;", | |
"248": "oslash;", | |
"249": "ugrave;", | |
"250": "uacute;", | |
"251": "ucirc;", | |
"252": "uuml;", | |
"253": "yacute;", | |
"254": "thorn;", | |
"255": "yuml;", | |
"256": "Amacr;", | |
"257": "amacr;", | |
"258": "Abreve;", | |
"259": "abreve;", | |
"260": "Aogon;", | |
"261": "aogon;", | |
"262": "Cacute;", | |
"263": "cacute;", | |
"264": "Ccirc;", | |
"265": "ccirc;", | |
"266": "Cdot;", | |
"267": "cdot;", | |
"268": "Ccaron;", | |
"269": "ccaron;", | |
"270": "Dcaron;", | |
"271": "dcaron;", | |
"272": "Dstrok;", | |
"273": "dstrok;", | |
"274": "Emacr;", | |
"275": "emacr;", | |
"278": "Edot;", | |
"279": "edot;", | |
"280": "Eogon;", | |
"281": "eogon;", | |
"282": "Ecaron;", | |
"283": "ecaron;", | |
"284": "Gcirc;", | |
"285": "gcirc;", | |
"286": "Gbreve;", | |
"287": "gbreve;", | |
"288": "Gdot;", | |
"289": "gdot;", | |
"290": "Gcedil;", | |
"292": "Hcirc;", | |
"293": "hcirc;", | |
"294": "Hstrok;", | |
"295": "hstrok;", | |
"296": "Itilde;", | |
"297": "itilde;", | |
"298": "Imacr;", | |
"299": "imacr;", | |
"302": "Iogon;", | |
"303": "iogon;", | |
"304": "Idot;", | |
"305": "inodot;", | |
"306": "IJlig;", | |
"307": "ijlig;", | |
"308": "Jcirc;", | |
"309": "jcirc;", | |
"310": "Kcedil;", | |
"311": "kcedil;", | |
"312": "kgreen;", | |
"313": "Lacute;", | |
"314": "lacute;", | |
"315": "Lcedil;", | |
"316": "lcedil;", | |
"317": "Lcaron;", | |
"318": "lcaron;", | |
"319": "Lmidot;", | |
"320": "lmidot;", | |
"321": "Lstrok;", | |
"322": "lstrok;", | |
"323": "Nacute;", | |
"324": "nacute;", | |
"325": "Ncedil;", | |
"326": "ncedil;", | |
"327": "Ncaron;", | |
"328": "ncaron;", | |
"329": "napos;", | |
"330": "ENG;", | |
"331": "eng;", | |
"332": "Omacr;", | |
"333": "omacr;", | |
"336": "Odblac;", | |
"337": "odblac;", | |
"338": "OElig;", | |
"339": "oelig;", | |
"340": "Racute;", | |
"341": "racute;", | |
"342": "Rcedil;", | |
"343": "rcedil;", | |
"344": "Rcaron;", | |
"345": "rcaron;", | |
"346": "Sacute;", | |
"347": "sacute;", | |
"348": "Scirc;", | |
"349": "scirc;", | |
"350": "Scedil;", | |
"351": "scedil;", | |
"352": "Scaron;", | |
"353": "scaron;", | |
"354": "Tcedil;", | |
"355": "tcedil;", | |
"356": "Tcaron;", | |
"357": "tcaron;", | |
"358": "Tstrok;", | |
"359": "tstrok;", | |
"360": "Utilde;", | |
"361": "utilde;", | |
"362": "Umacr;", | |
"363": "umacr;", | |
"364": "Ubreve;", | |
"365": "ubreve;", | |
"366": "Uring;", | |
"367": "uring;", | |
"368": "Udblac;", | |
"369": "udblac;", | |
"370": "Uogon;", | |
"371": "uogon;", | |
"372": "Wcirc;", | |
"373": "wcirc;", | |
"374": "Ycirc;", | |
"375": "ycirc;", | |
"376": "Yuml;", | |
"377": "Zacute;", | |
"378": "zacute;", | |
"379": "Zdot;", | |
"380": "zdot;", | |
"381": "Zcaron;", | |
"382": "zcaron;", | |
"402": "fnof;", | |
"437": "imped;", | |
"501": "gacute;", | |
"567": "jmath;", | |
"710": "circ;", | |
"711": "Hacek;", | |
"728": "breve;", | |
"729": "dot;", | |
"730": "ring;", | |
"731": "ogon;", | |
"732": "tilde;", | |
"733": "DiacriticalDoubleAcute;", | |
"785": "DownBreve;", | |
"913": "Alpha;", | |
"914": "Beta;", | |
"915": "Gamma;", | |
"916": "Delta;", | |
"917": "Epsilon;", | |
"918": "Zeta;", | |
"919": "Eta;", | |
"920": "Theta;", | |
"921": "Iota;", | |
"922": "Kappa;", | |
"923": "Lambda;", | |
"924": "Mu;", | |
"925": "Nu;", | |
"926": "Xi;", | |
"927": "Omicron;", | |
"928": "Pi;", | |
"929": "Rho;", | |
"931": "Sigma;", | |
"932": "Tau;", | |
"933": "Upsilon;", | |
"934": "Phi;", | |
"935": "Chi;", | |
"936": "Psi;", | |
"937": "Omega;", | |
"945": "alpha;", | |
"946": "beta;", | |
"947": "gamma;", | |
"948": "delta;", | |
"949": "epsilon;", | |
"950": "zeta;", | |
"951": "eta;", | |
"952": "theta;", | |
"953": "iota;", | |
"954": "kappa;", | |
"955": "lambda;", | |
"956": "mu;", | |
"957": "nu;", | |
"958": "xi;", | |
"959": "omicron;", | |
"960": "pi;", | |
"961": "rho;", | |
"962": "varsigma;", | |
"963": "sigma;", | |
"964": "tau;", | |
"965": "upsilon;", | |
"966": "phi;", | |
"967": "chi;", | |
"968": "psi;", | |
"969": "omega;", | |
"977": "vartheta;", | |
"978": "upsih;", | |
"981": "varphi;", | |
"982": "varpi;", | |
"988": "Gammad;", | |
"989": "gammad;", | |
"1008": "varkappa;", | |
"1009": "varrho;", | |
"1013": "varepsilon;", | |
"1014": "bepsi;", | |
"1025": "IOcy;", | |
"1026": "DJcy;", | |
"1027": "GJcy;", | |
"1028": "Jukcy;", | |
"1029": "DScy;", | |
"1030": "Iukcy;", | |
"1031": "YIcy;", | |
"1032": "Jsercy;", | |
"1033": "LJcy;", | |
"1034": "NJcy;", | |
"1035": "TSHcy;", | |
"1036": "KJcy;", | |
"1038": "Ubrcy;", | |
"1039": "DZcy;", | |
"1040": "Acy;", | |
"1041": "Bcy;", | |
"1042": "Vcy;", | |
"1043": "Gcy;", | |
"1044": "Dcy;", | |
"1045": "IEcy;", | |
"1046": "ZHcy;", | |
"1047": "Zcy;", | |
"1048": "Icy;", | |
"1049": "Jcy;", | |
"1050": "Kcy;", | |
"1051": "Lcy;", | |
"1052": "Mcy;", | |
"1053": "Ncy;", | |
"1054": "Ocy;", | |
"1055": "Pcy;", | |
"1056": "Rcy;", | |
"1057": "Scy;", | |
"1058": "Tcy;", | |
"1059": "Ucy;", | |
"1060": "Fcy;", | |
"1061": "KHcy;", | |
"1062": "TScy;", | |
"1063": "CHcy;", | |
"1064": "SHcy;", | |
"1065": "SHCHcy;", | |
"1066": "HARDcy;", | |
"1067": "Ycy;", | |
"1068": "SOFTcy;", | |
"1069": "Ecy;", | |
"1070": "YUcy;", | |
"1071": "YAcy;", | |
"1072": "acy;", | |
"1073": "bcy;", | |
"1074": "vcy;", | |
"1075": "gcy;", | |
"1076": "dcy;", | |
"1077": "iecy;", | |
"1078": "zhcy;", | |
"1079": "zcy;", | |
"1080": "icy;", | |
"1081": "jcy;", | |
"1082": "kcy;", | |
"1083": "lcy;", | |
"1084": "mcy;", | |
"1085": "ncy;", | |
"1086": "ocy;", | |
"1087": "pcy;", | |
"1088": "rcy;", | |
"1089": "scy;", | |
"1090": "tcy;", | |
"1091": "ucy;", | |
"1092": "fcy;", | |
"1093": "khcy;", | |
"1094": "tscy;", | |
"1095": "chcy;", | |
"1096": "shcy;", | |
"1097": "shchcy;", | |
"1098": "hardcy;", | |
"1099": "ycy;", | |
"1100": "softcy;", | |
"1101": "ecy;", | |
"1102": "yucy;", | |
"1103": "yacy;", | |
"1105": "iocy;", | |
"1106": "djcy;", | |
"1107": "gjcy;", | |
"1108": "jukcy;", | |
"1109": "dscy;", | |
"1110": "iukcy;", | |
"1111": "yicy;", | |
"1112": "jsercy;", | |
"1113": "ljcy;", | |
"1114": "njcy;", | |
"1115": "tshcy;", | |
"1116": "kjcy;", | |
"1118": "ubrcy;", | |
"1119": "dzcy;", | |
"8194": "ensp;", | |
"8195": "emsp;", | |
"8196": "emsp13;", | |
"8197": "emsp14;", | |
"8199": "numsp;", | |
"8200": "puncsp;", | |
"8201": "ThinSpace;", | |
"8202": "VeryThinSpace;", | |
"8203": "ZeroWidthSpace;", | |
"8204": "zwnj;", | |
"8205": "zwj;", | |
"8206": "lrm;", | |
"8207": "rlm;", | |
"8208": "hyphen;", | |
"8211": "ndash;", | |
"8212": "mdash;", | |
"8213": "horbar;", | |
"8214": "Vert;", | |
"8216": "OpenCurlyQuote;", | |
"8217": "rsquor;", | |
"8218": "sbquo;", | |
"8220": "OpenCurlyDoubleQuote;", | |
"8221": "rdquor;", | |
"8222": "ldquor;", | |
"8224": "dagger;", | |
"8225": "ddagger;", | |
"8226": "bullet;", | |
"8229": "nldr;", | |
"8230": "mldr;", | |
"8240": "permil;", | |
"8241": "pertenk;", | |
"8242": "prime;", | |
"8243": "Prime;", | |
"8244": "tprime;", | |
"8245": "bprime;", | |
"8249": "lsaquo;", | |
"8250": "rsaquo;", | |
"8254": "OverBar;", | |
"8257": "caret;", | |
"8259": "hybull;", | |
"8260": "frasl;", | |
"8271": "bsemi;", | |
"8279": "qprime;", | |
"8287": "MediumSpace;", | |
"8288": "NoBreak;", | |
"8289": "ApplyFunction;", | |
"8290": "it;", | |
"8291": "InvisibleComma;", | |
"8364": "euro;", | |
"8411": "TripleDot;", | |
"8412": "DotDot;", | |
"8450": "Copf;", | |
"8453": "incare;", | |
"8458": "gscr;", | |
"8459": "Hscr;", | |
"8460": "Poincareplane;", | |
"8461": "quaternions;", | |
"8462": "planckh;", | |
"8463": "plankv;", | |
"8464": "Iscr;", | |
"8465": "imagpart;", | |
"8466": "Lscr;", | |
"8467": "ell;", | |
"8469": "Nopf;", | |
"8470": "numero;", | |
"8471": "copysr;", | |
"8472": "wp;", | |
"8473": "primes;", | |
"8474": "rationals;", | |
"8475": "Rscr;", | |
"8476": "Rfr;", | |
"8477": "Ropf;", | |
"8478": "rx;", | |
"8482": "trade;", | |
"8484": "Zopf;", | |
"8487": "mho;", | |
"8488": "Zfr;", | |
"8489": "iiota;", | |
"8492": "Bscr;", | |
"8493": "Cfr;", | |
"8495": "escr;", | |
"8496": "expectation;", | |
"8497": "Fscr;", | |
"8499": "phmmat;", | |
"8500": "oscr;", | |
"8501": "aleph;", | |
"8502": "beth;", | |
"8503": "gimel;", | |
"8504": "daleth;", | |
"8517": "DD;", | |
"8518": "DifferentialD;", | |
"8519": "exponentiale;", | |
"8520": "ImaginaryI;", | |
"8531": "frac13;", | |
"8532": "frac23;", | |
"8533": "frac15;", | |
"8534": "frac25;", | |
"8535": "frac35;", | |
"8536": "frac45;", | |
"8537": "frac16;", | |
"8538": "frac56;", | |
"8539": "frac18;", | |
"8540": "frac38;", | |
"8541": "frac58;", | |
"8542": "frac78;", | |
"8592": "slarr;", | |
"8593": "uparrow;", | |
"8594": "srarr;", | |
"8595": "ShortDownArrow;", | |
"8596": "leftrightarrow;", | |
"8597": "varr;", | |
"8598": "UpperLeftArrow;", | |
"8599": "UpperRightArrow;", | |
"8600": "searrow;", | |
"8601": "swarrow;", | |
"8602": "nleftarrow;", | |
"8603": "nrightarrow;", | |
"8605": "rightsquigarrow;", | |
"8606": "twoheadleftarrow;", | |
"8607": "Uarr;", | |
"8608": "twoheadrightarrow;", | |
"8609": "Darr;", | |
"8610": "leftarrowtail;", | |
"8611": "rightarrowtail;", | |
"8612": "mapstoleft;", | |
"8613": "UpTeeArrow;", | |
"8614": "RightTeeArrow;", | |
"8615": "mapstodown;", | |
"8617": "larrhk;", | |
"8618": "rarrhk;", | |
"8619": "looparrowleft;", | |
"8620": "rarrlp;", | |
"8621": "leftrightsquigarrow;", | |
"8622": "nleftrightarrow;", | |
"8624": "lsh;", | |
"8625": "rsh;", | |
"8626": "ldsh;", | |
"8627": "rdsh;", | |
"8629": "crarr;", | |
"8630": "curvearrowleft;", | |
"8631": "curvearrowright;", | |
"8634": "olarr;", | |
"8635": "orarr;", | |
"8636": "lharu;", | |
"8637": "lhard;", | |
"8638": "upharpoonright;", | |
"8639": "upharpoonleft;", | |
"8640": "RightVector;", | |
"8641": "rightharpoondown;", | |
"8642": "RightDownVector;", | |
"8643": "LeftDownVector;", | |
"8644": "rlarr;", | |
"8645": "UpArrowDownArrow;", | |
"8646": "lrarr;", | |
"8647": "llarr;", | |
"8648": "uuarr;", | |
"8649": "rrarr;", | |
"8650": "downdownarrows;", | |
"8651": "ReverseEquilibrium;", | |
"8652": "rlhar;", | |
"8653": "nLeftarrow;", | |
"8654": "nLeftrightarrow;", | |
"8655": "nRightarrow;", | |
"8656": "Leftarrow;", | |
"8657": "Uparrow;", | |
"8658": "Rightarrow;", | |
"8659": "Downarrow;", | |
"8660": "Leftrightarrow;", | |
"8661": "vArr;", | |
"8662": "nwArr;", | |
"8663": "neArr;", | |
"8664": "seArr;", | |
"8665": "swArr;", | |
"8666": "Lleftarrow;", | |
"8667": "Rrightarrow;", | |
"8669": "zigrarr;", | |
"8676": "LeftArrowBar;", | |
"8677": "RightArrowBar;", | |
"8693": "duarr;", | |
"8701": "loarr;", | |
"8702": "roarr;", | |
"8703": "hoarr;", | |
"8704": "forall;", | |
"8705": "complement;", | |
"8706": "PartialD;", | |
"8707": "Exists;", | |
"8708": "NotExists;", | |
"8709": "varnothing;", | |
"8711": "nabla;", | |
"8712": "isinv;", | |
"8713": "notinva;", | |
"8715": "SuchThat;", | |
"8716": "NotReverseElement;", | |
"8719": "Product;", | |
"8720": "Coproduct;", | |
"8721": "sum;", | |
"8722": "minus;", | |
"8723": "mp;", | |
"8724": "plusdo;", | |
"8726": "ssetmn;", | |
"8727": "lowast;", | |
"8728": "SmallCircle;", | |
"8730": "Sqrt;", | |
"8733": "vprop;", | |
"8734": "infin;", | |
"8735": "angrt;", | |
"8736": "angle;", | |
"8737": "measuredangle;", | |
"8738": "angsph;", | |
"8739": "VerticalBar;", | |
"8740": "nsmid;", | |
"8741": "spar;", | |
"8742": "nspar;", | |
"8743": "wedge;", | |
"8744": "vee;", | |
"8745": "cap;", | |
"8746": "cup;", | |
"8747": "Integral;", | |
"8748": "Int;", | |
"8749": "tint;", | |
"8750": "oint;", | |
"8751": "DoubleContourIntegral;", | |
"8752": "Cconint;", | |
"8753": "cwint;", | |
"8754": "cwconint;", | |
"8755": "CounterClockwiseContourIntegral;", | |
"8756": "therefore;", | |
"8757": "because;", | |
"8758": "ratio;", | |
"8759": "Proportion;", | |
"8760": "minusd;", | |
"8762": "mDDot;", | |
"8763": "homtht;", | |
"8764": "Tilde;", | |
"8765": "bsim;", | |
"8766": "mstpos;", | |
"8767": "acd;", | |
"8768": "wreath;", | |
"8769": "nsim;", | |
"8770": "esim;", | |
"8771": "TildeEqual;", | |
"8772": "nsimeq;", | |
"8773": "TildeFullEqual;", | |
"8774": "simne;", | |
"8775": "NotTildeFullEqual;", | |
"8776": "TildeTilde;", | |
"8777": "NotTildeTilde;", | |
"8778": "approxeq;", | |
"8779": "apid;", | |
"8780": "bcong;", | |
"8781": "CupCap;", | |
"8782": "HumpDownHump;", | |
"8783": "HumpEqual;", | |
"8784": "esdot;", | |
"8785": "eDot;", | |
"8786": "fallingdotseq;", | |
"8787": "risingdotseq;", | |
"8788": "coloneq;", | |
"8789": "eqcolon;", | |
"8790": "eqcirc;", | |
"8791": "cire;", | |
"8793": "wedgeq;", | |
"8794": "veeeq;", | |
"8796": "trie;", | |
"8799": "questeq;", | |
"8800": "NotEqual;", | |
"8801": "equiv;", | |
"8802": "NotCongruent;", | |
"8804": "leq;", | |
"8805": "GreaterEqual;", | |
"8806": "LessFullEqual;", | |
"8807": "GreaterFullEqual;", | |
"8808": "lneqq;", | |
"8809": "gneqq;", | |
"8810": "NestedLessLess;", | |
"8811": "NestedGreaterGreater;", | |
"8812": "twixt;", | |
"8813": "NotCupCap;", | |
"8814": "NotLess;", | |
"8815": "NotGreater;", | |
"8816": "NotLessEqual;", | |
"8817": "NotGreaterEqual;", | |
"8818": "lsim;", | |
"8819": "gtrsim;", | |
"8820": "NotLessTilde;", | |
"8821": "NotGreaterTilde;", | |
"8822": "lg;", | |
"8823": "gtrless;", | |
"8824": "ntlg;", | |
"8825": "ntgl;", | |
"8826": "Precedes;", | |
"8827": "Succeeds;", | |
"8828": "PrecedesSlantEqual;", | |
"8829": "SucceedsSlantEqual;", | |
"8830": "prsim;", | |
"8831": "succsim;", | |
"8832": "nprec;", | |
"8833": "nsucc;", | |
"8834": "subset;", | |
"8835": "supset;", | |
"8836": "nsub;", | |
"8837": "nsup;", | |
"8838": "SubsetEqual;", | |
"8839": "supseteq;", | |
"8840": "nsubseteq;", | |
"8841": "nsupseteq;", | |
"8842": "subsetneq;", | |
"8843": "supsetneq;", | |
"8845": "cupdot;", | |
"8846": "uplus;", | |
"8847": "SquareSubset;", | |
"8848": "SquareSuperset;", | |
"8849": "SquareSubsetEqual;", | |
"8850": "SquareSupersetEqual;", | |
"8851": "SquareIntersection;", | |
"8852": "SquareUnion;", | |
"8853": "oplus;", | |
"8854": "ominus;", | |
"8855": "otimes;", | |
"8856": "osol;", | |
"8857": "odot;", | |
"8858": "ocir;", | |
"8859": "oast;", | |
"8861": "odash;", | |
"8862": "plusb;", | |
"8863": "minusb;", | |
"8864": "timesb;", | |
"8865": "sdotb;", | |
"8866": "vdash;", | |
"8867": "LeftTee;", | |
"8868": "top;", | |
"8869": "UpTee;", | |
"8871": "models;", | |
"8872": "vDash;", | |
"8873": "Vdash;", | |
"8874": "Vvdash;", | |
"8875": "VDash;", | |
"8876": "nvdash;", | |
"8877": "nvDash;", | |
"8878": "nVdash;", | |
"8879": "nVDash;", | |
"8880": "prurel;", | |
"8882": "vltri;", | |
"8883": "vrtri;", | |
"8884": "trianglelefteq;", | |
"8885": "trianglerighteq;", | |
"8886": "origof;", | |
"8887": "imof;", | |
"8888": "mumap;", | |
"8889": "hercon;", | |
"8890": "intercal;", | |
"8891": "veebar;", | |
"8893": "barvee;", | |
"8894": "angrtvb;", | |
"8895": "lrtri;", | |
"8896": "xwedge;", | |
"8897": "xvee;", | |
"8898": "xcap;", | |
"8899": "xcup;", | |
"8900": "diamond;", | |
"8901": "sdot;", | |
"8902": "Star;", | |
"8903": "divonx;", | |
"8904": "bowtie;", | |
"8905": "ltimes;", | |
"8906": "rtimes;", | |
"8907": "lthree;", | |
"8908": "rthree;", | |
"8909": "bsime;", | |
"8910": "cuvee;", | |
"8911": "cuwed;", | |
"8912": "Subset;", | |
"8913": "Supset;", | |
"8914": "Cap;", | |
"8915": "Cup;", | |
"8916": "pitchfork;", | |
"8917": "epar;", | |
"8918": "ltdot;", | |
"8919": "gtrdot;", | |
"8920": "Ll;", | |
"8921": "ggg;", | |
"8922": "LessEqualGreater;", | |
"8923": "gtreqless;", | |
"8926": "curlyeqprec;", | |
"8927": "curlyeqsucc;", | |
"8928": "nprcue;", | |
"8929": "nsccue;", | |
"8930": "nsqsube;", | |
"8931": "nsqsupe;", | |
"8934": "lnsim;", | |
"8935": "gnsim;", | |
"8936": "prnsim;", | |
"8937": "succnsim;", | |
"8938": "ntriangleleft;", | |
"8939": "ntriangleright;", | |
"8940": "ntrianglelefteq;", | |
"8941": "ntrianglerighteq;", | |
"8942": "vellip;", | |
"8943": "ctdot;", | |
"8944": "utdot;", | |
"8945": "dtdot;", | |
"8946": "disin;", | |
"8947": "isinsv;", | |
"8948": "isins;", | |
"8949": "isindot;", | |
"8950": "notinvc;", | |
"8951": "notinvb;", | |
"8953": "isinE;", | |
"8954": "nisd;", | |
"8955": "xnis;", | |
"8956": "nis;", | |
"8957": "notnivc;", | |
"8958": "notnivb;", | |
"8965": "barwedge;", | |
"8966": "doublebarwedge;", | |
"8968": "LeftCeiling;", | |
"8969": "RightCeiling;", | |
"8970": "lfloor;", | |
"8971": "RightFloor;", | |
"8972": "drcrop;", | |
"8973": "dlcrop;", | |
"8974": "urcrop;", | |
"8975": "ulcrop;", | |
"8976": "bnot;", | |
"8978": "profline;", | |
"8979": "profsurf;", | |
"8981": "telrec;", | |
"8982": "target;", | |
"8988": "ulcorner;", | |
"8989": "urcorner;", | |
"8990": "llcorner;", | |
"8991": "lrcorner;", | |
"8994": "sfrown;", | |
"8995": "ssmile;", | |
"9005": "cylcty;", | |
"9006": "profalar;", | |
"9014": "topbot;", | |
"9021": "ovbar;", | |
"9023": "solbar;", | |
"9084": "angzarr;", | |
"9136": "lmoustache;", | |
"9137": "rmoustache;", | |
"9140": "tbrk;", | |
"9141": "UnderBracket;", | |
"9142": "bbrktbrk;", | |
"9180": "OverParenthesis;", | |
"9181": "UnderParenthesis;", | |
"9182": "OverBrace;", | |
"9183": "UnderBrace;", | |
"9186": "trpezium;", | |
"9191": "elinters;", | |
"9251": "blank;", | |
"9416": "oS;", | |
"9472": "HorizontalLine;", | |
"9474": "boxv;", | |
"9484": "boxdr;", | |
"9488": "boxdl;", | |
"9492": "boxur;", | |
"9496": "boxul;", | |
"9500": "boxvr;", | |
"9508": "boxvl;", | |
"9516": "boxhd;", | |
"9524": "boxhu;", | |
"9532": "boxvh;", | |
"9552": "boxH;", | |
"9553": "boxV;", | |
"9554": "boxdR;", | |
"9555": "boxDr;", | |
"9556": "boxDR;", | |
"9557": "boxdL;", | |
"9558": "boxDl;", | |
"9559": "boxDL;", | |
"9560": "boxuR;", | |
"9561": "boxUr;", | |
"9562": "boxUR;", | |
"9563": "boxuL;", | |
"9564": "boxUl;", | |
"9565": "boxUL;", | |
"9566": "boxvR;", | |
"9567": "boxVr;", | |
"9568": "boxVR;", | |
"9569": "boxvL;", | |
"9570": "boxVl;", | |
"9571": "boxVL;", | |
"9572": "boxHd;", | |
"9573": "boxhD;", | |
"9574": "boxHD;", | |
"9575": "boxHu;", | |
"9576": "boxhU;", | |
"9577": "boxHU;", | |
"9578": "boxvH;", | |
"9579": "boxVh;", | |
"9580": "boxVH;", | |
"9600": "uhblk;", | |
"9604": "lhblk;", | |
"9608": "block;", | |
"9617": "blk14;", | |
"9618": "blk12;", | |
"9619": "blk34;", | |
"9633": "square;", | |
"9642": "squf;", | |
"9643": "EmptyVerySmallSquare;", | |
"9645": "rect;", | |
"9646": "marker;", | |
"9649": "fltns;", | |
"9651": "xutri;", | |
"9652": "utrif;", | |
"9653": "utri;", | |
"9656": "rtrif;", | |
"9657": "triangleright;", | |
"9661": "xdtri;", | |
"9662": "dtrif;", | |
"9663": "triangledown;", | |
"9666": "ltrif;", | |
"9667": "triangleleft;", | |
"9674": "lozenge;", | |
"9675": "cir;", | |
"9708": "tridot;", | |
"9711": "xcirc;", | |
"9720": "ultri;", | |
"9721": "urtri;", | |
"9722": "lltri;", | |
"9723": "EmptySmallSquare;", | |
"9724": "FilledSmallSquare;", | |
"9733": "starf;", | |
"9734": "star;", | |
"9742": "phone;", | |
"9792": "female;", | |
"9794": "male;", | |
"9824": "spadesuit;", | |
"9827": "clubsuit;", | |
"9829": "heartsuit;", | |
"9830": "diams;", | |
"9834": "sung;", | |
"9837": "flat;", | |
"9838": "natural;", | |
"9839": "sharp;", | |
"10003": "checkmark;", | |
"10007": "cross;", | |
"10016": "maltese;", | |
"10038": "sext;", | |
"10072": "VerticalSeparator;", | |
"10098": "lbbrk;", | |
"10099": "rbbrk;", | |
"10184": "bsolhsub;", | |
"10185": "suphsol;", | |
"10214": "lobrk;", | |
"10215": "robrk;", | |
"10216": "LeftAngleBracket;", | |
"10217": "RightAngleBracket;", | |
"10218": "Lang;", | |
"10219": "Rang;", | |
"10220": "loang;", | |
"10221": "roang;", | |
"10229": "xlarr;", | |
"10230": "xrarr;", | |
"10231": "xharr;", | |
"10232": "xlArr;", | |
"10233": "xrArr;", | |
"10234": "xhArr;", | |
"10236": "xmap;", | |
"10239": "dzigrarr;", | |
"10498": "nvlArr;", | |
"10499": "nvrArr;", | |
"10500": "nvHarr;", | |
"10501": "Map;", | |
"10508": "lbarr;", | |
"10509": "rbarr;", | |
"10510": "lBarr;", | |
"10511": "rBarr;", | |
"10512": "RBarr;", | |
"10513": "DDotrahd;", | |
"10514": "UpArrowBar;", | |
"10515": "DownArrowBar;", | |
"10518": "Rarrtl;", | |
"10521": "latail;", | |
"10522": "ratail;", | |
"10523": "lAtail;", | |
"10524": "rAtail;", | |
"10525": "larrfs;", | |
"10526": "rarrfs;", | |
"10527": "larrbfs;", | |
"10528": "rarrbfs;", | |
"10531": "nwarhk;", | |
"10532": "nearhk;", | |
"10533": "searhk;", | |
"10534": "swarhk;", | |
"10535": "nwnear;", | |
"10536": "toea;", | |
"10537": "tosa;", | |
"10538": "swnwar;", | |
"10547": "rarrc;", | |
"10549": "cudarrr;", | |
"10550": "ldca;", | |
"10551": "rdca;", | |
"10552": "cudarrl;", | |
"10553": "larrpl;", | |
"10556": "curarrm;", | |
"10557": "cularrp;", | |
"10565": "rarrpl;", | |
"10568": "harrcir;", | |
"10569": "Uarrocir;", | |
"10570": "lurdshar;", | |
"10571": "ldrushar;", | |
"10574": "LeftRightVector;", | |
"10575": "RightUpDownVector;", | |
"10576": "DownLeftRightVector;", | |
"10577": "LeftUpDownVector;", | |
"10578": "LeftVectorBar;", | |
"10579": "RightVectorBar;", | |
"10580": "RightUpVectorBar;", | |
"10581": "RightDownVectorBar;", | |
"10582": "DownLeftVectorBar;", | |
"10583": "DownRightVectorBar;", | |
"10584": "LeftUpVectorBar;", | |
"10585": "LeftDownVectorBar;", | |
"10586": "LeftTeeVector;", | |
"10587": "RightTeeVector;", | |
"10588": "RightUpTeeVector;", | |
"10589": "RightDownTeeVector;", | |
"10590": "DownLeftTeeVector;", | |
"10591": "DownRightTeeVector;", | |
"10592": "LeftUpTeeVector;", | |
"10593": "LeftDownTeeVector;", | |
"10594": "lHar;", | |
"10595": "uHar;", | |
"10596": "rHar;", | |
"10597": "dHar;", | |
"10598": "luruhar;", | |
"10599": "ldrdhar;", | |
"10600": "ruluhar;", | |
"10601": "rdldhar;", | |
"10602": "lharul;", | |
"10603": "llhard;", | |
"10604": "rharul;", | |
"10605": "lrhard;", | |
"10606": "UpEquilibrium;", | |
"10607": "ReverseUpEquilibrium;", | |
"10608": "RoundImplies;", | |
"10609": "erarr;", | |
"10610": "simrarr;", | |
"10611": "larrsim;", | |
"10612": "rarrsim;", | |
"10613": "rarrap;", | |
"10614": "ltlarr;", | |
"10616": "gtrarr;", | |
"10617": "subrarr;", | |
"10619": "suplarr;", | |
"10620": "lfisht;", | |
"10621": "rfisht;", | |
"10622": "ufisht;", | |
"10623": "dfisht;", | |
"10629": "lopar;", | |
"10630": "ropar;", | |
"10635": "lbrke;", | |
"10636": "rbrke;", | |
"10637": "lbrkslu;", | |
"10638": "rbrksld;", | |
"10639": "lbrksld;", | |
"10640": "rbrkslu;", | |
"10641": "langd;", | |
"10642": "rangd;", | |
"10643": "lparlt;", | |
"10644": "rpargt;", | |
"10645": "gtlPar;", | |
"10646": "ltrPar;", | |
"10650": "vzigzag;", | |
"10652": "vangrt;", | |
"10653": "angrtvbd;", | |
"10660": "ange;", | |
"10661": "range;", | |
"10662": "dwangle;", | |
"10663": "uwangle;", | |
"10664": "angmsdaa;", | |
"10665": "angmsdab;", | |
"10666": "angmsdac;", | |
"10667": "angmsdad;", | |
"10668": "angmsdae;", | |
"10669": "angmsdaf;", | |
"10670": "angmsdag;", | |
"10671": "angmsdah;", | |
"10672": "bemptyv;", | |
"10673": "demptyv;", | |
"10674": "cemptyv;", | |
"10675": "raemptyv;", | |
"10676": "laemptyv;", | |
"10677": "ohbar;", | |
"10678": "omid;", | |
"10679": "opar;", | |
"10681": "operp;", | |
"10683": "olcross;", | |
"10684": "odsold;", | |
"10686": "olcir;", | |
"10687": "ofcir;", | |
"10688": "olt;", | |
"10689": "ogt;", | |
"10690": "cirscir;", | |
"10691": "cirE;", | |
"10692": "solb;", | |
"10693": "bsolb;", | |
"10697": "boxbox;", | |
"10701": "trisb;", | |
"10702": "rtriltri;", | |
"10703": "LeftTriangleBar;", | |
"10704": "RightTriangleBar;", | |
"10716": "iinfin;", | |
"10717": "infintie;", | |
"10718": "nvinfin;", | |
"10723": "eparsl;", | |
"10724": "smeparsl;", | |
"10725": "eqvparsl;", | |
"10731": "lozf;", | |
"10740": "RuleDelayed;", | |
"10742": "dsol;", | |
"10752": "xodot;", | |
"10753": "xoplus;", | |
"10754": "xotime;", | |
"10756": "xuplus;", | |
"10758": "xsqcup;", | |
"10764": "qint;", | |
"10765": "fpartint;", | |
"10768": "cirfnint;", | |
"10769": "awint;", | |
"10770": "rppolint;", | |
"10771": "scpolint;", | |
"10772": "npolint;", | |
"10773": "pointint;", | |
"10774": "quatint;", | |
"10775": "intlarhk;", | |
"10786": "pluscir;", | |
"10787": "plusacir;", | |
"10788": "simplus;", | |
"10789": "plusdu;", | |
"10790": "plussim;", | |
"10791": "plustwo;", | |
"10793": "mcomma;", | |
"10794": "minusdu;", | |
"10797": "loplus;", | |
"10798": "roplus;", | |
"10799": "Cross;", | |
"10800": "timesd;", | |
"10801": "timesbar;", | |
"10803": "smashp;", | |
"10804": "lotimes;", | |
"10805": "rotimes;", | |
"10806": "otimesas;", | |
"10807": "Otimes;", | |
"10808": "odiv;", | |
"10809": "triplus;", | |
"10810": "triminus;", | |
"10811": "tritime;", | |
"10812": "iprod;", | |
"10815": "amalg;", | |
"10816": "capdot;", | |
"10818": "ncup;", | |
"10819": "ncap;", | |
"10820": "capand;", | |
"10821": "cupor;", | |
"10822": "cupcap;", | |
"10823": "capcup;", | |
"10824": "cupbrcap;", | |
"10825": "capbrcup;", | |
"10826": "cupcup;", | |
"10827": "capcap;", | |
"10828": "ccups;", | |
"10829": "ccaps;", | |
"10832": "ccupssm;", | |
"10835": "And;", | |
"10836": "Or;", | |
"10837": "andand;", | |
"10838": "oror;", | |
"10839": "orslope;", | |
"10840": "andslope;", | |
"10842": "andv;", | |
"10843": "orv;", | |
"10844": "andd;", | |
"10845": "ord;", | |
"10847": "wedbar;", | |
"10854": "sdote;", | |
"10858": "simdot;", | |
"10861": "congdot;", | |
"10862": "easter;", | |
"10863": "apacir;", | |
"10864": "apE;", | |
"10865": "eplus;", | |
"10866": "pluse;", | |
"10867": "Esim;", | |
"10868": "Colone;", | |
"10869": "Equal;", | |
"10871": "eDDot;", | |
"10872": "equivDD;", | |
"10873": "ltcir;", | |
"10874": "gtcir;", | |
"10875": "ltquest;", | |
"10876": "gtquest;", | |
"10877": "LessSlantEqual;", | |
"10878": "GreaterSlantEqual;", | |
"10879": "lesdot;", | |
"10880": "gesdot;", | |
"10881": "lesdoto;", | |
"10882": "gesdoto;", | |
"10883": "lesdotor;", | |
"10884": "gesdotol;", | |
"10885": "lessapprox;", | |
"10886": "gtrapprox;", | |
"10887": "lneq;", | |
"10888": "gneq;", | |
"10889": "lnapprox;", | |
"10890": "gnapprox;", | |
"10891": "lesseqqgtr;", | |
"10892": "gtreqqless;", | |
"10893": "lsime;", | |
"10894": "gsime;", | |
"10895": "lsimg;", | |
"10896": "gsiml;", | |
"10897": "lgE;", | |
"10898": "glE;", | |
"10899": "lesges;", | |
"10900": "gesles;", | |
"10901": "eqslantless;", | |
"10902": "eqslantgtr;", | |
"10903": "elsdot;", | |
"10904": "egsdot;", | |
"10905": "el;", | |
"10906": "eg;", | |
"10909": "siml;", | |
"10910": "simg;", | |
"10911": "simlE;", | |
"10912": "simgE;", | |
"10913": "LessLess;", | |
"10914": "GreaterGreater;", | |
"10916": "glj;", | |
"10917": "gla;", | |
"10918": "ltcc;", | |
"10919": "gtcc;", | |
"10920": "lescc;", | |
"10921": "gescc;", | |
"10922": "smt;", | |
"10923": "lat;", | |
"10924": "smte;", | |
"10925": "late;", | |
"10926": "bumpE;", | |
"10927": "preceq;", | |
"10928": "succeq;", | |
"10931": "prE;", | |
"10932": "scE;", | |
"10933": "prnE;", | |
"10934": "succneqq;", | |
"10935": "precapprox;", | |
"10936": "succapprox;", | |
"10937": "prnap;", | |
"10938": "succnapprox;", | |
"10939": "Pr;", | |
"10940": "Sc;", | |
"10941": "subdot;", | |
"10942": "supdot;", | |
"10943": "subplus;", | |
"10944": "supplus;", | |
"10945": "submult;", | |
"10946": "supmult;", | |
"10947": "subedot;", | |
"10948": "supedot;", | |
"10949": "subseteqq;", | |
"10950": "supseteqq;", | |
"10951": "subsim;", | |
"10952": "supsim;", | |
"10955": "subsetneqq;", | |
"10956": "supsetneqq;", | |
"10959": "csub;", | |
"10960": "csup;", | |
"10961": "csube;", | |
"10962": "csupe;", | |
"10963": "subsup;", | |
"10964": "supsub;", | |
"10965": "subsub;", | |
"10966": "supsup;", | |
"10967": "suphsub;", | |
"10968": "supdsub;", | |
"10969": "forkv;", | |
"10970": "topfork;", | |
"10971": "mlcp;", | |
"10980": "DoubleLeftTee;", | |
"10982": "Vdashl;", | |
"10983": "Barv;", | |
"10984": "vBar;", | |
"10985": "vBarv;", | |
"10987": "Vbar;", | |
"10988": "Not;", | |
"10989": "bNot;", | |
"10990": "rnmid;", | |
"10991": "cirmid;", | |
"10992": "midcir;", | |
"10993": "topcir;", | |
"10994": "nhpar;", | |
"10995": "parsim;", | |
"11005": "parsl;", | |
"64256": "fflig;", | |
"64257": "filig;", | |
"64258": "fllig;", | |
"64259": "ffilig;", | |
"64260": "ffllig;" | |
} | |
},{}],53:[function(require,module,exports){ | |
var hasOwn = Object.prototype.hasOwnProperty; | |
var toStr = Object.prototype.toString; | |
var undefined; | |
var isArray = function isArray(arr) { | |
if (typeof Array.isArray === 'function') { | |
return Array.isArray(arr); | |
} | |
return toStr.call(arr) === '[object Array]'; | |
}; | |
var isPlainObject = function isPlainObject(obj) { | |
'use strict'; | |
if (!obj || toStr.call(obj) !== '[object Object]') { | |
return false; | |
} | |
var has_own_constructor = hasOwn.call(obj, 'constructor'); | |
var has_is_property_of_method = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); | |
// Not own constructor property must be Object | |
if (obj.constructor && !has_own_constructor && !has_is_property_of_method) { | |
return false; | |
} | |
// Own properties are enumerated firstly, so to speed up, | |
// if last one is own, then all properties are own. | |
var key; | |
for (key in obj) {} | |
return key === undefined || hasOwn.call(obj, key); | |
}; | |
module.exports = function extend() { | |
'use strict'; | |
var options, name, src, copy, copyIsArray, clone, | |
target = arguments[0], | |
i = 1, | |
length = arguments.length, | |
deep = false; | |
// Handle a deep copy situation | |
if (typeof target === 'boolean') { | |
deep = target; | |
target = arguments[1] || {}; | |
// skip the boolean and the target | |
i = 2; | |
} else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) { | |
target = {}; | |
} | |
for (; i < length; ++i) { | |
options = arguments[i]; | |
// Only deal with non-null/undefined values | |
if (options != null) { | |
// Extend the base object | |
for (name in options) { | |
src = target[name]; | |
copy = options[name]; | |
// Prevent never-ending loop | |
if (target === copy) { | |
continue; | |
} | |
// Recurse if we're merging plain objects or arrays | |
if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { | |
if (copyIsArray) { | |
copyIsArray = false; | |
clone = src && isArray(src) ? src : []; | |
} else { | |
clone = src && isPlainObject(src) ? src : {}; | |
} | |
// Never move original objects, clone them | |
target[name] = extend(deep, clone, copy); | |
// Don't bring in undefined values | |
} else if (copy !== undefined) { | |
target[name] = copy; | |
} | |
} | |
} | |
} | |
// Return the modified object | |
return target; | |
}; | |
},{}],54:[function(require,module,exports){ | |
(function (global){ | |
/*! https://mths.be/punycode v1.3.2 by @mathias */ | |
;(function(root) { | |
/** Detect free variables */ | |
var freeExports = typeof exports == 'object' && exports && | |
!exports.nodeType && exports; | |
var freeModule = typeof module == 'object' && module && | |
!module.nodeType && module; | |
var freeGlobal = typeof global == 'object' && global; | |
if ( | |
freeGlobal.global === freeGlobal || | |
freeGlobal.window === freeGlobal || | |
freeGlobal.self === freeGlobal | |
) { | |
root = freeGlobal; | |
} | |
/** | |
* The `punycode` object. | |
* @name punycode | |
* @type Object | |
*/ | |
var punycode, | |
/** Highest positive signed 32-bit float value */ | |
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 | |
/** Bootstring parameters */ | |
base = 36, | |
tMin = 1, | |
tMax = 26, | |
skew = 38, | |
damp = 700, | |
initialBias = 72, | |
initialN = 128, // 0x80 | |
delimiter = '-', // '\x2D' | |
/** Regular expressions */ | |
regexPunycode = /^xn--/, | |
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars | |
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators | |
/** Error messages */ | |
errors = { | |
'overflow': 'Overflow: input needs wider integers to process', | |
'not-basic': 'Illegal input >= 0x80 (not a basic code point)', | |
'invalid-input': 'Invalid input' | |
}, | |
/** Convenience shortcuts */ | |
baseMinusTMin = base - tMin, | |
floor = Math.floor, | |
stringFromCharCode = String.fromCharCode, | |
/** Temporary variable */ | |
key; | |
/*--------------------------------------------------------------------------*/ | |
/** | |
* A generic error utility function. | |
* @private | |
* @param {String} type The error type. | |
* @returns {Error} Throws a `RangeError` with the applicable error message. | |
*/ | |
function error(type) { | |
throw RangeError(errors[type]); | |
} | |
/** | |
* A generic `Array#map` utility function. | |
* @private | |
* @param {Array} array The array to iterate over. | |
* @param {Function} callback The function that gets called for every array | |
* item. | |
* @returns {Array} A new array of values returned by the callback function. | |
*/ | |
function map(array, fn) { | |
var length = array.length; | |
var result = []; | |
while (length--) { | |
result[length] = fn(array[length]); | |
} | |
return result; | |
} | |
/** | |
* A simple `Array#map`-like wrapper to work with domain name strings or email | |
* addresses. | |
* @private | |
* @param {String} domain The domain name or email address. | |
* @param {Function} callback The function that gets called for every | |
* character. | |
* @returns {Array} A new string of characters returned by the callback | |
* function. | |
*/ | |
function mapDomain(string, fn) { | |
var parts = string.split('@'); | |
var result = ''; | |
if (parts.length > 1) { | |
// In email addresses, only the domain name should be punycoded. Leave | |
// the local part (i.e. everything up to `@`) intact. | |
result = parts[0] + '@'; | |
string = parts[1]; | |
} | |
// Avoid `split(regex)` for IE8 compatibility. See #17. | |
string = string.replace(regexSeparators, '\x2E'); | |
var labels = string.split('.'); | |
var encoded = map(labels, fn).join('.'); | |
return result + encoded; | |
} | |
/** | |
* Creates an array containing the numeric code points of each Unicode | |
* character in the string. While JavaScript uses UCS-2 internally, | |
* this function will convert a pair of surrogate halves (each of which | |
* UCS-2 exposes as separate characters) into a single code point, | |
* matching UTF-16. | |
* @see `punycode.ucs2.encode` | |
* @see <https://mathiasbynens.be/notes/javascript-encoding> | |
* @memberOf punycode.ucs2 | |
* @name decode | |
* @param {String} string The Unicode input string (UCS-2). | |
* @returns {Array} The new array of code points. | |
*/ | |
function ucs2decode(string) { | |
var output = [], | |
counter = 0, | |
length = string.length, | |
value, | |
extra; | |
while (counter < length) { | |
value = string.charCodeAt(counter++); | |
if (value >= 0xD800 && value <= 0xDBFF && counter < length) { | |
// high surrogate, and there is a next character | |
extra = string.charCodeAt(counter++); | |
if ((extra & 0xFC00) == 0xDC00) { // low surrogate | |
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); | |
} else { | |
// unmatched surrogate; only append this code unit, in case the next | |
// code unit is the high surrogate of a surrogate pair | |
output.push(value); | |
counter--; | |
} | |
} else { | |
output.push(value); | |
} | |
} | |
return output; | |
} | |
/** | |
* Creates a string based on an array of numeric code points. | |
* @see `punycode.ucs2.decode` | |
* @memberOf punycode.ucs2 | |
* @name encode | |
* @param {Array} codePoints The array of numeric code points. | |
* @returns {String} The new Unicode string (UCS-2). | |
*/ | |
function ucs2encode(array) { | |
return map(array, function(value) { | |
var output = ''; | |
if (value > 0xFFFF) { | |
value -= 0x10000; | |
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); | |
value = 0xDC00 | value & 0x3FF; | |
} | |
output += stringFromCharCode(value); | |
return output; | |
}).join(''); | |
} | |
/** | |
* Converts a basic code point into a digit/integer. | |
* @see `digitToBasic()` | |
* @private | |
* @param {Number} codePoint The basic numeric code point value. | |
* @returns {Number} The numeric value of a basic code point (for use in | |
* representing integers) in the range `0` to `base - 1`, or `base` if | |
* the code point does not represent a value. | |
*/ | |
function basicToDigit(codePoint) { | |
if (codePoint - 48 < 10) { | |
return codePoint - 22; | |
} | |
if (codePoint - 65 < 26) { | |
return codePoint - 65; | |
} | |
if (codePoint - 97 < 26) { | |
return codePoint - 97; | |
} | |
return base; | |
} | |
/** | |
* Converts a digit/integer into a basic code point. | |
* @see `basicToDigit()` | |
* @private | |
* @param {Number} digit The numeric value of a basic code point. | |
* @returns {Number} The basic code point whose value (when used for | |
* representing integers) is `digit`, which needs to be in the range | |
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is | |
* used; else, the lowercase form is used. The behavior is undefined | |
* if `flag` is non-zero and `digit` has no uppercase form. | |
*/ | |
function digitToBasic(digit, flag) { | |
// 0..25 map to ASCII a..z or A..Z | |
// 26..35 map to ASCII 0..9 | |
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); | |
} | |
/** | |
* Bias adaptation function as per section 3.4 of RFC 3492. | |
* http://tools.ietf.org/html/rfc3492#section-3.4 | |
* @private | |
*/ | |
function adapt(delta, numPoints, firstTime) { | |
var k = 0; | |
delta = firstTime ? floor(delta / damp) : delta >> 1; | |
delta += floor(delta / numPoints); | |
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { | |
delta = floor(delta / baseMinusTMin); | |
} | |
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); | |
} | |
/** | |
* Converts a Punycode string of ASCII-only symbols to a string of Unicode | |
* symbols. | |
* @memberOf punycode | |
* @param {String} input The Punycode string of ASCII-only symbols. | |
* @returns {String} The resulting string of Unicode symbols. | |
*/ | |
function decode(input) { | |
// Don't use UCS-2 | |
var output = [], | |
inputLength = input.length, | |
out, | |
i = 0, | |
n = initialN, | |
bias = initialBias, | |
basic, | |
j, | |
index, | |
oldi, | |
w, | |
k, | |
digit, | |
t, | |
/** Cached calculation results */ | |
baseMinusT; | |
// Handle the basic code points: let `basic` be the number of input code | |
// points before the last delimiter, or `0` if there is none, then copy | |
// the first basic code points to the output. | |
basic = input.lastIndexOf(delimiter); | |
if (basic < 0) { | |
basic = 0; | |
} | |
for (j = 0; j < basic; ++j) { | |
// if it's not a basic code point | |
if (input.charCodeAt(j) >= 0x80) { | |
error('not-basic'); | |
} | |
output.push(input.charCodeAt(j)); | |
} | |
// Main decoding loop: start just after the last delimiter if any basic code | |
// points were copied; start at the beginning otherwise. | |
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { | |
// `index` is the index of the next character to be consumed. | |
// Decode a generalized variable-length integer into `delta`, | |
// which gets added to `i`. The overflow checking is easier | |
// if we increase `i` as we go, then subtract off its starting | |
// value at the end to obtain `delta`. | |
for (oldi = i, w = 1, k = base; /* no condition */; k += base) { | |
if (index >= inputLength) { | |
error('invalid-input'); | |
} | |
digit = basicToDigit(input.charCodeAt(index++)); | |
if (digit >= base || digit > floor((maxInt - i) / w)) { | |
error('overflow'); | |
} | |
i += digit * w; | |
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); | |
if (digit < t) { | |
break; | |
} | |
baseMinusT = base - t; | |
if (w > floor(maxInt / baseMinusT)) { | |
error('overflow'); | |
} | |
w *= baseMinusT; | |
} | |
out = output.length + 1; | |
bias = adapt(i - oldi, out, oldi == 0); | |
// `i` was supposed to wrap around from `out` to `0`, | |
// incrementing `n` each time, so we'll fix that now: | |
if (floor(i / out) > maxInt - n) { | |
error('overflow'); | |
} | |
n += floor(i / out); | |
i %= out; | |
// Insert `n` at position `i` of the output | |
output.splice(i++, 0, n); | |
} | |
return ucs2encode(output); | |
} | |
/** | |
* Converts a string of Unicode symbols (e.g. a domain name label) to a | |
* Punycode string of ASCII-only symbols. | |
* @memberOf punycode | |
* @param {String} input The string of Unicode symbols. | |
* @returns {String} The resulting Punycode string of ASCII-only symbols. | |
*/ | |
function encode(input) { | |
var n, | |
delta, | |
handledCPCount, | |
basicLength, | |
bias, | |
j, | |
m, | |
q, | |
k, | |
t, | |
currentValue, | |
output = [], | |
/** `inputLength` will hold the number of code points in `input`. */ | |
inputLength, | |
/** Cached calculation results */ | |
handledCPCountPlusOne, | |
baseMinusT, | |
qMinusT; | |
// Convert the input in UCS-2 to Unicode | |
input = ucs2decode(input); | |
// Cache the length | |
inputLength = input.length; | |
// Initialize the state | |
n = initialN; | |
delta = 0; | |
bias = initialBias; | |
// Handle the basic code points | |
for (j = 0; j < inputLength; ++j) { | |
currentValue = input[j]; | |
if (currentValue < 0x80) { | |
output.push(stringFromCharCode(currentValue)); | |
} | |
} | |
handledCPCount = basicLength = output.length; | |
// `handledCPCount` is the number of code points that have been handled; | |
// `basicLength` is the number of basic code points. | |
// Finish the basic string - if it is not empty - with a delimiter | |
if (basicLength) { | |
output.push(delimiter); | |
} | |
// Main encoding loop: | |
while (handledCPCount < inputLength) { | |
// All non-basic code points < n have been handled already. Find the next | |
// larger one: | |
for (m = maxInt, j = 0; j < inputLength; ++j) { | |
currentValue = input[j]; | |
if (currentValue >= n && currentValue < m) { | |
m = currentValue; | |
} | |
} | |
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, | |
// but guard against overflow | |
handledCPCountPlusOne = handledCPCount + 1; | |
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { | |
error('overflow'); | |
} | |
delta += (m - n) * handledCPCountPlusOne; | |
n = m; | |
for (j = 0; j < inputLength; ++j) { | |
currentValue = input[j]; | |
if (currentValue < n && ++delta > maxInt) { | |
error('overflow'); | |
} | |
if (currentValue == n) { | |
// Represent delta as a generalized variable-length integer | |
for (q = delta, k = base; /* no condition */; k += base) { | |
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); | |
if (q < t) { | |
break; | |
} | |
qMinusT = q - t; | |
baseMinusT = base - t; | |
output.push( | |
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) | |
); | |
q = floor(qMinusT / baseMinusT); | |
} | |
output.push(stringFromCharCode(digitToBasic(q, 0))); | |
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); | |
delta = 0; | |
++handledCPCount; | |
} | |
} | |
++delta; | |
++n; | |
} | |
return output.join(''); | |
} | |
/** | |
* Converts a Punycode string representing a domain name or an email address | |
* to Unicode. Only the Punycoded parts of the input will be converted, i.e. | |
* it doesn't matter if you call it on a string that has already been | |
* converted to Unicode. | |
* @memberOf punycode | |
* @param {String} input The Punycoded domain name or email address to | |
* convert to Unicode. | |
* @returns {String} The Unicode representation of the given Punycode | |
* string. | |
*/ | |
function toUnicode(input) { | |
return mapDomain(input, function(string) { | |
return regexPunycode.test(string) | |
? decode(string.slice(4).toLowerCase()) | |
: string; | |
}); | |
} | |
/** | |
* Converts a Unicode string representing a domain name or an email address to | |
* Punycode. Only the non-ASCII parts of the domain name will be converted, | |
* i.e. it doesn't matter if you call it with a domain that's already in | |
* ASCII. | |
* @memberOf punycode | |
* @param {String} input The domain name or email address to convert, as a | |
* Unicode string. | |
* @returns {String} The Punycode representation of the given domain name or | |
* email address. | |
*/ | |
function toASCII(input) { | |
return mapDomain(input, function(string) { | |
return regexNonASCII.test(string) | |
? 'xn--' + encode(string) | |
: string; | |
}); | |
} | |
/*--------------------------------------------------------------------------*/ | |
/** Define the public API */ | |
punycode = { | |
/** | |
* A string representing the current Punycode.js version number. | |
* @memberOf punycode | |
* @type String | |
*/ | |
'version': '1.3.2', | |
/** | |
* An object of methods to convert from JavaScript's internal character | |
* representation (UCS-2) to Unicode code points, and back. | |
* @see <https://mathiasbynens.be/notes/javascript-encoding> | |
* @memberOf punycode | |
* @type Object | |
*/ | |
'ucs2': { | |
'decode': ucs2decode, | |
'encode': ucs2encode | |
}, | |
'decode': decode, | |
'encode': encode, | |
'toASCII': toASCII, | |
'toUnicode': toUnicode | |
}; | |
/** Expose `punycode` */ | |
// Some AMD build optimizers, like r.js, check for specific condition patterns | |
// like the following: | |
if ( | |
typeof define == 'function' && | |
typeof define.amd == 'object' && | |
define.amd | |
) { | |
define('punycode', function() { | |
return punycode; | |
}); | |
} else if (freeExports && freeModule) { | |
if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+ | |
freeModule.exports = punycode; | |
} else { // in Narwhal or RingoJS v0.7.0- | |
for (key in punycode) { | |
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); | |
} | |
} | |
} else { // in Rhino or a web browser | |
root.punycode = punycode; | |
} | |
}(this)); | |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | |
},{}],55:[function(require,module,exports){ | |
/** | |
* This file automatically generated from `build.js`. | |
* Do not manually edit. | |
*/ | |
module.exports = [ | |
"area", | |
"base", | |
"br", | |
"col", | |
"embed", | |
"hr", | |
"img", | |
"input", | |
"keygen", | |
"link", | |
"menuitem", | |
"meta", | |
"param", | |
"source", | |
"track", | |
"wbr" | |
]; | |
},{}]},{},[3]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment