Commit 41190f81 authored by superman's avatar superman

添加es5-shim es5-sham html5shiv promise-polyfill production 下使用min 文件

parent 546ba572
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/lib/node_modules/npm/bin/npm-cli.js',
1 verbose cli 'run-script',
1 verbose cli 'start' ]
2 info using npm@3.8.3
3 info using node@v5.10.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle www.fudou6.com@0.0.0~prestart: www.fudou6.com@0.0.0
6 silly lifecycle www.fudou6.com@0.0.0~prestart: no script for prestart, continuing
7 info lifecycle www.fudou6.com@0.0.0~start: www.fudou6.com@0.0.0
8 verbose lifecycle www.fudou6.com@0.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle www.fudou6.com@0.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/superman/Works/www.fudou6.com/node_modules/.bin:/usr/local/bin:/Users/superman/.sdkman/candidates/groovy/current/bin:/Users/superman/.sdkman/candidates/gradle/current/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle www.fudou6.com@0.0.0~start: CWD: /Users/superman/Works/www.fudou6.com
11 silly lifecycle www.fudou6.com@0.0.0~start: Args: [ '-c', 'node --harmony ./bin/www' ]
12 silly lifecycle www.fudou6.com@0.0.0~start: Returned: code: 1 signal: null
13 info lifecycle www.fudou6.com@0.0.0~start: Failed to exec start script
14 verbose stack Error: www.fudou6.com@0.0.0 start: `node --harmony ./bin/www`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid www.fudou6.com@0.0.0
16 verbose cwd /Users/superman/Works/www.fudou6.com
17 error Darwin 15.6.0
18 error argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "run-script" "start"
19 error node v5.10.1
20 error npm v3.8.3
21 error code ELIFECYCLE
22 error www.fudou6.com@0.0.0 start: `node --harmony ./bin/www`
22 error Exit status 1
23 error Failed at the www.fudou6.com@0.0.0 start script 'node --harmony ./bin/www'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the www.fudou6.com package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node --harmony ./bin/www
23 error You can get information on how to open an issue for this project with:
23 error npm bugs www.fudou6.com
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls www.fudou6.com
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
......@@ -3,9 +3,10 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "pm2 start ./bin/www --name=www.fudou6.com",
"start": "NODE_ENV=production pm2 start ./bin/www --name=www.fudou6.com",
"stop": "pm2 stop www.fudou6.com",
"restart": "pm2 restart www.fudou6.com"
"restart": "pm2 restart www.fudou6.com",
"test": "node ./bin/www"
},
"dependencies": {
"babel-plugin-transform-es2015-sticky-regex": "^6.8.0",
......
/*!
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2015 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
*/
// vim: ts=4 sts=4 sw=4 expandtab
// Add semicolon to prevent IIFE from being passed as argument to concatenated code.
;
// UMD (Universal Module Definition)
// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js
(function (root, factory) {
'use strict';
/* global define, exports, module */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root is window)
root.returnExports = factory();
}
}(this, function () {
var call = Function.call;
var prototypeOfObject = Object.prototype;
var owns = call.bind(prototypeOfObject.hasOwnProperty);
var isEnumerable = call.bind(prototypeOfObject.propertyIsEnumerable);
var toStr = call.bind(prototypeOfObject.toString);
// If JS engine supports accessors creating shortcuts.
var defineGetter;
var defineSetter;
var lookupGetter;
var lookupSetter;
var supportsAccessors = owns(prototypeOfObject, '__defineGetter__');
if (supportsAccessors) {
/* eslint-disable no-underscore-dangle */
defineGetter = call.bind(prototypeOfObject.__defineGetter__);
defineSetter = call.bind(prototypeOfObject.__defineSetter__);
lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
/* eslint-enable no-underscore-dangle */
}
// ES5 15.2.3.2
// http://es5.github.com/#x15.2.3.2
if (!Object.getPrototypeOf) {
// https://github.com/es-shims/es5-shim/issues#issue/2
// http://ejohn.org/blog/objectgetprototypeof/
// recommended by fschaefer on github
//
// sure, and webreflection says ^_^
// ... this will nerever possibly return null
// ... Opera Mini breaks here with infinite loops
Object.getPrototypeOf = function getPrototypeOf(object) {
/* eslint-disable no-proto */
var proto = object.__proto__;
/* eslint-enable no-proto */
if (proto || proto === null) {
return proto;
} else if (toStr(object.constructor) === '[object Function]') {
return object.constructor.prototype;
} else if (object instanceof Object) {
return prototypeOfObject;
} else {
// Correctly return null for Objects created with `Object.create(null)`
// (shammed or native) or `{ __proto__: null}`. Also returns null for
// cross-realm objects on browsers that lack `__proto__` support (like
// IE <11), but that's the best we can do.
return null;
}
};
}
// ES5 15.2.3.3
// http://es5.github.com/#x15.2.3.3
var doesGetOwnPropertyDescriptorWork = function doesGetOwnPropertyDescriptorWork(object) {
try {
object.sentinel = 0;
return Object.getOwnPropertyDescriptor(object, 'sentinel').value === 0;
} catch (exception) {
return false;
}
};
// check whether getOwnPropertyDescriptor works if it's given. Otherwise, shim partially.
if (Object.defineProperty) {
var getOwnPropertyDescriptorWorksOnObject = doesGetOwnPropertyDescriptorWork({});
var getOwnPropertyDescriptorWorksOnDom = typeof document === 'undefined' ||
doesGetOwnPropertyDescriptorWork(document.createElement('div'));
if (!getOwnPropertyDescriptorWorksOnDom || !getOwnPropertyDescriptorWorksOnObject) {
var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor;
}
}
if (!Object.getOwnPropertyDescriptor || getOwnPropertyDescriptorFallback) {
var ERR_NON_OBJECT = 'Object.getOwnPropertyDescriptor called on a non-object: ';
/* eslint-disable no-proto */
Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
if ((typeof object !== 'object' && typeof object !== 'function') || object === null) {
throw new TypeError(ERR_NON_OBJECT + object);
}
// make a valiant attempt to use the real getOwnPropertyDescriptor
// for I8's DOM elements.
if (getOwnPropertyDescriptorFallback) {
try {
return getOwnPropertyDescriptorFallback.call(Object, object, property);
} catch (exception) {
// try the shim if the real one doesn't work
}
}
var descriptor;
// If object does not owns property return undefined immediately.
if (!owns(object, property)) {
return descriptor;
}
// If object has a property then it's for sure `configurable`, and
// probably `enumerable`. Detect enumerability though.
descriptor = {
enumerable: isEnumerable(object, property),
configurable: true
};
// If JS engine supports accessor properties then property may be a
// getter or setter.
if (supportsAccessors) {
// Unfortunately `__lookupGetter__` will return a getter even
// if object has own non getter property along with a same named
// inherited getter. To avoid misbehavior we temporary remove
// `__proto__` so that `__lookupGetter__` will return getter only
// if it's owned by an object.
var prototype = object.__proto__;
var notPrototypeOfObject = object !== prototypeOfObject;
// avoid recursion problem, breaking in Opera Mini when
// Object.getOwnPropertyDescriptor(Object.prototype, 'toString')
// or any other Object.prototype accessor
if (notPrototypeOfObject) {
object.__proto__ = prototypeOfObject;
}
var getter = lookupGetter(object, property);
var setter = lookupSetter(object, property);
if (notPrototypeOfObject) {
// Once we have getter and setter we can put values back.
object.__proto__ = prototype;
}
if (getter || setter) {
if (getter) {
descriptor.get = getter;
}
if (setter) {
descriptor.set = setter;
}
// If it was accessor property we're done and return here
// in order to avoid adding `value` to the descriptor.
return descriptor;
}
}
// If we got this far we know that object has an own property that is
// not an accessor so we set it as a value and return descriptor.
descriptor.value = object[property];
descriptor.writable = true;
return descriptor;
};
/* eslint-enable no-proto */
}
// ES5 15.2.3.4
// http://es5.github.com/#x15.2.3.4
if (!Object.getOwnPropertyNames) {
Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
return Object.keys(object);
};
}
// ES5 15.2.3.5
// http://es5.github.com/#x15.2.3.5
if (!Object.create) {
// Contributed by Brandon Benvie, October, 2012
var createEmpty;
var supportsProto = !({ __proto__: null } instanceof Object);
// the following produces false positives
// in Opera Mini => not a reliable check
// Object.prototype.__proto__ === null
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
/* global ActiveXObject */
var shouldUseActiveX = function shouldUseActiveX() {
// return early if document.domain not set
if (!document.domain) {
return false;
}
try {
return !!new ActiveXObject('htmlfile');
} catch (exception) {
return false;
}
};
// This supports IE8 when document.domain is used
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
var getEmptyViaActiveX = function getEmptyViaActiveX() {
var empty;
var xDoc;
xDoc = new ActiveXObject('htmlfile');
xDoc.write('<script><\/script>');
xDoc.close();
empty = xDoc.parentWindow.Object.prototype;
xDoc = null;
return empty;
};
// The original implementation using an iframe
// before the activex approach was added
// see https://github.com/es-shims/es5-shim/issues/150
var getEmptyViaIFrame = function getEmptyViaIFrame() {
var iframe = document.createElement('iframe');
var parent = document.body || document.documentElement;
var empty;
iframe.style.display = 'none';
parent.appendChild(iframe);
/* eslint-disable no-script-url */
iframe.src = 'javascript:';
/* eslint-enable no-script-url */
empty = iframe.contentWindow.Object.prototype;
parent.removeChild(iframe);
iframe = null;
return empty;
};
/* global document */
if (supportsProto || typeof document === 'undefined') {
createEmpty = function () {
return { __proto__: null };
};
} else {
// In old IE __proto__ can't be used to manually set `null`, nor does
// any other method exist to make an object that inherits from nothing,
// aside from Object.prototype itself. Instead, create a new global
// object and *steal* its Object.prototype and strip it bare. This is
// used as the prototype to create nullary objects.
createEmpty = function () {
// Determine which approach to use
// see https://github.com/es-shims/es5-shim/issues/150
var empty = shouldUseActiveX() ? getEmptyViaActiveX() : getEmptyViaIFrame();
delete empty.constructor;
delete empty.hasOwnProperty;
delete empty.propertyIsEnumerable;
delete empty.isPrototypeOf;
delete empty.toLocaleString;
delete empty.toString;
delete empty.valueOf;
var Empty = function Empty() {};
Empty.prototype = empty;
// short-circuit future calls
createEmpty = function () {
return new Empty();
};
return new Empty();
};
}
Object.create = function create(prototype, properties) {
var object;
var Type = function Type() {}; // An empty constructor.
if (prototype === null) {
object = createEmpty();
} else {
if (typeof prototype !== 'object' && typeof prototype !== 'function') {
// In the native implementation `parent` can be `null`
// OR *any* `instanceof Object` (Object|Function|Array|RegExp|etc)
// Use `typeof` tho, b/c in old IE, DOM elements are not `instanceof Object`
// like they are in modern browsers. Using `Object.create` on DOM elements
// is...err...probably inappropriate, but the native version allows for it.
throw new TypeError('Object prototype may only be an Object or null'); // same msg as Chrome
}
Type.prototype = prototype;
object = new Type();
// IE has no built-in implementation of `Object.getPrototypeOf`
// neither `__proto__`, but this manually setting `__proto__` will
// guarantee that `Object.getPrototypeOf` will work as expected with
// objects created using `Object.create`
/* eslint-disable no-proto */
object.__proto__ = prototype;
/* eslint-enable no-proto */
}
if (properties !== void 0) {
Object.defineProperties(object, properties);
}
return object;
};
}
// ES5 15.2.3.6
// http://es5.github.com/#x15.2.3.6
// Patch for WebKit and IE8 standard mode
// Designed by hax <hax.github.com>
// related issue: https://github.com/es-shims/es5-shim/issues#issue/5
// IE8 Reference:
// http://msdn.microsoft.com/en-us/library/dd282900.aspx
// http://msdn.microsoft.com/en-us/library/dd229916.aspx
// WebKit Bugs:
// https://bugs.webkit.org/show_bug.cgi?id=36423
var doesDefinePropertyWork = function doesDefinePropertyWork(object) {
try {
Object.defineProperty(object, 'sentinel', {});
return 'sentinel' in object;
} catch (exception) {
return false;
}
};
// check whether defineProperty works if it's given. Otherwise,
// shim partially.
if (Object.defineProperty) {
var definePropertyWorksOnObject = doesDefinePropertyWork({});
var definePropertyWorksOnDom = typeof document === 'undefined' ||
doesDefinePropertyWork(document.createElement('div'));
if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
var definePropertyFallback = Object.defineProperty,
definePropertiesFallback = Object.defineProperties;
}
}
if (!Object.defineProperty || definePropertyFallback) {
var ERR_NON_OBJECT_DESCRIPTOR = 'Property description must be an object: ';
var ERR_NON_OBJECT_TARGET = 'Object.defineProperty called on non-object: ';
var ERR_ACCESSORS_NOT_SUPPORTED = 'getters & setters can not be defined on this javascript engine';
Object.defineProperty = function defineProperty(object, property, descriptor) {
if ((typeof object !== 'object' && typeof object !== 'function') || object === null) {
throw new TypeError(ERR_NON_OBJECT_TARGET + object);
}
if ((typeof descriptor !== 'object' && typeof descriptor !== 'function') || descriptor === null) {
throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
}
// make a valiant attempt to use the real defineProperty
// for I8's DOM elements.
if (definePropertyFallback) {
try {
return definePropertyFallback.call(Object, object, property, descriptor);
} catch (exception) {
// try the shim if the real one doesn't work
}
}
// If it's a data property.
if ('value' in descriptor) {
// fail silently if 'writable', 'enumerable', or 'configurable'
// are requested but not supported
/*
// alternate approach:
if ( // can't implement these features; allow false but not true
('writable' in descriptor && !descriptor.writable) ||
('enumerable' in descriptor && !descriptor.enumerable) ||
('configurable' in descriptor && !descriptor.configurable)
))
throw new RangeError(
'This implementation of Object.defineProperty does not support configurable, enumerable, or writable.'
);
*/
if (supportsAccessors && (lookupGetter(object, property) || lookupSetter(object, property))) {
// As accessors are supported only on engines implementing
// `__proto__` we can safely override `__proto__` while defining
// a property to make sure that we don't hit an inherited
// accessor.
/* eslint-disable no-proto */
var prototype = object.__proto__;
object.__proto__ = prototypeOfObject;
// Deleting a property anyway since getter / setter may be
// defined on object itself.
delete object[property];
object[property] = descriptor.value;
// Setting original `__proto__` back now.
object.__proto__ = prototype;
/* eslint-enable no-proto */
} else {
object[property] = descriptor.value;
}
} else {
if (!supportsAccessors && (('get' in descriptor) || ('set' in descriptor))) {
throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
}
// If we got that far then getters and setters can be defined !!
if ('get' in descriptor) {
defineGetter(object, property, descriptor.get);
}
if ('set' in descriptor) {
defineSetter(object, property, descriptor.set);
}
}
return object;
};
}
// ES5 15.2.3.7
// http://es5.github.com/#x15.2.3.7
if (!Object.defineProperties || definePropertiesFallback) {
Object.defineProperties = function defineProperties(object, properties) {
// make a valiant attempt to use the real defineProperties
if (definePropertiesFallback) {
try {
return definePropertiesFallback.call(Object, object, properties);
} catch (exception) {
// try the shim if the real one doesn't work
}
}
Object.keys(properties).forEach(function (property) {
if (property !== '__proto__') {
Object.defineProperty(object, property, properties[property]);
}
});
return object;
};
}
// ES5 15.2.3.8
// http://es5.github.com/#x15.2.3.8
if (!Object.seal) {
Object.seal = function seal(object) {
if (Object(object) !== object) {
throw new TypeError('Object.seal can only be called on Objects.');
}
// this is misleading and breaks feature-detection, but
// allows "securable" code to "gracefully" degrade to working
// but insecure code.
return object;
};
}
// ES5 15.2.3.9
// http://es5.github.com/#x15.2.3.9
if (!Object.freeze) {
Object.freeze = function freeze(object) {
if (Object(object) !== object) {
throw new TypeError('Object.freeze can only be called on Objects.');
}
// this is misleading and breaks feature-detection, but
// allows "securable" code to "gracefully" degrade to working
// but insecure code.
return object;
};
}
// detect a Rhino bug and patch it
try {
Object.freeze(function () {});
} catch (exception) {
Object.freeze = (function (freezeObject) {
return function freeze(object) {
if (typeof object === 'function') {
return object;
} else {
return freezeObject(object);
}
};
}(Object.freeze));
}
// ES5 15.2.3.10
// http://es5.github.com/#x15.2.3.10
if (!Object.preventExtensions) {
Object.preventExtensions = function preventExtensions(object) {
if (Object(object) !== object) {
throw new TypeError('Object.preventExtensions can only be called on Objects.');
}
// this is misleading and breaks feature-detection, but
// allows "securable" code to "gracefully" degrade to working
// but insecure code.
return object;
};
}
// ES5 15.2.3.11
// http://es5.github.com/#x15.2.3.11
if (!Object.isSealed) {
Object.isSealed = function isSealed(object) {
if (Object(object) !== object) {
throw new TypeError('Object.isSealed can only be called on Objects.');
}
return false;
};
}
// ES5 15.2.3.12
// http://es5.github.com/#x15.2.3.12
if (!Object.isFrozen) {
Object.isFrozen = function isFrozen(object) {
if (Object(object) !== object) {
throw new TypeError('Object.isFrozen can only be called on Objects.');
}
return false;
};
}
// ES5 15.2.3.13
// http://es5.github.com/#x15.2.3.13
if (!Object.isExtensible) {
Object.isExtensible = function isExtensible(object) {
// 1. If Type(O) is not Object throw a TypeError exception.
if (Object(object) !== object) {
throw new TypeError('Object.isExtensible can only be called on Objects.');
}
// 2. Return the Boolean value of the [[Extensible]] internal property of O.
var name = '';
while (owns(object, name)) {
name += '?';
}
object[name] = true;
var returnValue = owns(object, name);
delete object[name];
return returnValue;
};
}
}));
\ No newline at end of file
!function(e, t) {
"use strict";
"function" == typeof define && define.amd ? define(t) : "object" == typeof exports ? module.exports = t() : e.returnExports = t();
}(this, function() {
var e, t, n, r, o = Function.call, c = Object.prototype, i = o.bind(c.hasOwnProperty), f = o.bind(c.propertyIsEnumerable), u = o.bind(c.toString), l = i(c, "__defineGetter__");
l && (e = o.bind(c.__defineGetter__), t = o.bind(c.__defineSetter__), n = o.bind(c.__lookupGetter__),
r = o.bind(c.__lookupSetter__)), Object.getPrototypeOf || (Object.getPrototypeOf = function(e) {
var t = e.__proto__;
return t || null === t ? t : "[object Function]" === u(e.constructor) ? e.constructor.prototype : e instanceof Object ? c : null;
});
var b = function(e) {
try {
return e.sentinel = 0, 0 === Object.getOwnPropertyDescriptor(e, "sentinel").value;
} catch (e) {
return !1;
}
};
if (Object.defineProperty) {
var p = b({}), a = "undefined" == typeof document || b(document.createElement("div"));
if (!a || !p) var O = Object.getOwnPropertyDescriptor;
}
if (!Object.getOwnPropertyDescriptor || O) {
var j = "Object.getOwnPropertyDescriptor called on a non-object: ";
Object.getOwnPropertyDescriptor = function(e, t) {
if ("object" != typeof e && "function" != typeof e || null === e) throw new TypeError(j + e);
if (O) try {
return O.call(Object, e, t);
} catch (e) {}
var o;
if (!i(e, t)) return o;
if (o = {
enumerable: f(e, t),
configurable: !0
}, l) {
var u = e.__proto__, b = e !== c;
b && (e.__proto__ = c);
var p = n(e, t), a = r(e, t);
if (b && (e.__proto__ = u), p || a) return p && (o.get = p), a && (o.set = a), o;
}
return o.value = e[t], o.writable = !0, o;
};
}
if (Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function(e) {
return Object.keys(e);
}), !Object.create) {
var s, d = !({
__proto__: null
} instanceof Object), y = function() {
if (!document.domain) return !1;
try {
return !!new ActiveXObject("htmlfile");
} catch (e) {
return !1;
}
}, _ = function() {
var e, t;
return t = new ActiveXObject("htmlfile"), t.write("<script></script>"), t.close(),
e = t.parentWindow.Object.prototype, t = null, e;
}, w = function() {
var e, t = document.createElement("iframe"), n = document.body || document.documentElement;
return t.style.display = "none", n.appendChild(t), t.src = "javascript:", e = t.contentWindow.Object.prototype,
n.removeChild(t), t = null, e;
};
s = d || "undefined" == typeof document ? function() {
return {
__proto__: null
};
} : function() {
var e = y() ? _() : w();
delete e.constructor, delete e.hasOwnProperty, delete e.propertyIsEnumerable, delete e.isPrototypeOf,
delete e.toLocaleString, delete e.toString, delete e.valueOf;
var t = function() {};
return t.prototype = e, s = function() {
return new t();
}, new t();
}, Object.create = function(e, t) {
var n, r = function() {};
if (null === e) n = s(); else {
if ("object" != typeof e && "function" != typeof e) throw new TypeError("Object prototype may only be an Object or null");
r.prototype = e, n = new r(), n.__proto__ = e;
}
return void 0 !== t && Object.defineProperties(n, t), n;
};
}
var v = function(e) {
try {
return Object.defineProperty(e, "sentinel", {}), "sentinel" in e;
} catch (e) {
return !1;
}
};
if (Object.defineProperty) {
var m = v({}), h = "undefined" == typeof document || v(document.createElement("div"));
if (!m || !h) var E = Object.defineProperty, P = Object.defineProperties;
}
if (!Object.defineProperty || E) {
var g = "Property description must be an object: ", T = "Object.defineProperty called on non-object: ", x = "getters & setters can not be defined on this javascript engine";
Object.defineProperty = function(o, i, f) {
if ("object" != typeof o && "function" != typeof o || null === o) throw new TypeError(T + o);
if ("object" != typeof f && "function" != typeof f || null === f) throw new TypeError(g + f);
if (E) try {
return E.call(Object, o, i, f);
} catch (e) {}
if ("value" in f) if (l && (n(o, i) || r(o, i))) {
var u = o.__proto__;
o.__proto__ = c, delete o[i], o[i] = f.value, o.__proto__ = u;
} else o[i] = f.value; else {
if (!l && ("get" in f || "set" in f)) throw new TypeError(x);
"get" in f && e(o, i, f.get), "set" in f && t(o, i, f.set);
}
return o;
};
}
Object.defineProperties && !P || (Object.defineProperties = function(e, t) {
if (P) try {
return P.call(Object, e, t);
} catch (e) {}
return Object.keys(t).forEach(function(n) {
"__proto__" !== n && Object.defineProperty(e, n, t[n]);
}), e;
}), Object.seal || (Object.seal = function(e) {
if (Object(e) !== e) throw new TypeError("Object.seal can only be called on Objects.");
return e;
}), Object.freeze || (Object.freeze = function(e) {
if (Object(e) !== e) throw new TypeError("Object.freeze can only be called on Objects.");
return e;
});
try {
Object.freeze(function() {});
} catch (e) {
Object.freeze = function(e) {
return function(t) {
return "function" == typeof t ? t : e(t);
};
}(Object.freeze);
}
Object.preventExtensions || (Object.preventExtensions = function(e) {
if (Object(e) !== e) throw new TypeError("Object.preventExtensions can only be called on Objects.");
return e;
}), Object.isSealed || (Object.isSealed = function(e) {
if (Object(e) !== e) throw new TypeError("Object.isSealed can only be called on Objects.");
return !1;
}), Object.isFrozen || (Object.isFrozen = function(e) {
if (Object(e) !== e) throw new TypeError("Object.isFrozen can only be called on Objects.");
return !1;
}), Object.isExtensible || (Object.isExtensible = function(e) {
if (Object(e) !== e) throw new TypeError("Object.isExtensible can only be called on Objects.");
for (var t = ""; i(e, t); ) t += "?";
e[t] = !0;
var n = i(e, t);
return delete e[t], n;
});
});
\ No newline at end of file
/*!
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2015 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
*/
// vim: ts=4 sts=4 sw=4 expandtab
// Add semicolon to prevent IIFE from being passed as argument to concatenated code.
;
// UMD (Universal Module Definition)
// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js
(function (root, factory) {
'use strict';
/* global define, exports, module */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root is window)
root.returnExports = factory();
}
}(this, function () {
/**
* Brings an environment as close to ECMAScript 5 compliance
* as is possible with the facilities of erstwhile engines.
*
* Annotated ES5: http://es5.github.com/ (specific links below)
* ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
* Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/
*/
// Shortcut to an often accessed properties, in order to avoid multiple
// dereference that costs universally. This also holds a reference to known-good
// functions.
var $Array = Array;
var ArrayPrototype = $Array.prototype;
var $Object = Object;
var ObjectPrototype = $Object.prototype;
var $Function = Function;
var FunctionPrototype = $Function.prototype;
var $String = String;
var StringPrototype = $String.prototype;
var $Number = Number;
var NumberPrototype = $Number.prototype;
var array_slice = ArrayPrototype.slice;
var array_splice = ArrayPrototype.splice;
var array_push = ArrayPrototype.push;
var array_unshift = ArrayPrototype.unshift;
var array_concat = ArrayPrototype.concat;
var array_join = ArrayPrototype.join;
var call = FunctionPrototype.call;
var apply = FunctionPrototype.apply;
var max = Math.max;
var min = Math.min;
// Having a toString local variable name breaks in Opera so use to_string.
var to_string = ObjectPrototype.toString;
/* global Symbol */
/* eslint-disable one-var-declaration-per-line, no-redeclare */
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, constructorRegex = /^\s*class /, isES6ClassFn = function isES6ClassFn(value) { try { var fnStr = fnToStr.call(value); var singleStripped = fnStr.replace(/\/\/.*\n/g, ''); var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, ''); var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' '); return constructorRegex.test(spaceStripped); } catch (e) { return false; /* not a function */ } }, tryFunctionObject = function tryFunctionObject(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]', isCallable = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; };
var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; };
var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; };
/* eslint-enable one-var-declaration-per-line, no-redeclare */
/* inlined from http://npmjs.com/define-properties */
var supportsDescriptors = $Object.defineProperty && (function () {
try {
var obj = {};
$Object.defineProperty(obj, 'x', { enumerable: false, value: obj });
for (var _ in obj) { return false; }
return obj.x === obj;
} catch (e) { /* this is ES3 */
return false;
}
}());
var defineProperties = (function (has) {
// Define configurable, writable, and non-enumerable props
// if they don't exist.
var defineProperty;
if (supportsDescriptors) {
defineProperty = function (object, name, method, forceAssign) {
if (!forceAssign && (name in object)) { return; }
$Object.defineProperty(object, name, {
configurable: true,
enumerable: false,
writable: true,
value: method
});
};
} else {
defineProperty = function (object, name, method, forceAssign) {
if (!forceAssign && (name in object)) { return; }
object[name] = method;
};
}
return function defineProperties(object, map, forceAssign) {
for (var name in map) {
if (has.call(map, name)) {
defineProperty(object, name, map[name], forceAssign);
}
}
};
}(ObjectPrototype.hasOwnProperty));
//
// Util
// ======
//
/* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */
var isPrimitive = function isPrimitive(input) {
var type = typeof input;
return input === null || (type !== 'object' && type !== 'function');
};
var isActualNaN = $Number.isNaN || function (x) { return x !== x; };
var ES = {
// ES5 9.4
// http://es5.github.com/#x9.4
// http://jsperf.com/to-integer
/* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */
ToInteger: function ToInteger(num) {
var n = +num;
if (isActualNaN(n)) {
n = 0;
} else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
n = (n > 0 || -1) * Math.floor(Math.abs(n));
}
return n;
},
/* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */
ToPrimitive: function ToPrimitive(input) {
var val, valueOf, toStr;
if (isPrimitive(input)) {
return input;
}
valueOf = input.valueOf;
if (isCallable(valueOf)) {
val = valueOf.call(input);
if (isPrimitive(val)) {
return val;
}
}
toStr = input.toString;
if (isCallable(toStr)) {
val = toStr.call(input);
if (isPrimitive(val)) {
return val;
}
}
throw new TypeError();
},
// ES5 9.9
// http://es5.github.com/#x9.9
/* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */
ToObject: function (o) {
if (o == null) { // this matches both null and undefined
throw new TypeError("can't convert " + o + ' to object');
}
return $Object(o);
},
/* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */
ToUint32: function ToUint32(x) {
return x >>> 0;
}
};
//
// Function
// ========
//
// ES-5 15.3.4.5
// http://es5.github.com/#x15.3.4.5
var Empty = function Empty() {};
defineProperties(FunctionPrototype, {
bind: function bind(that) { // .length is 1
// 1. Let Target be the this value.
var target = this;
// 2. If IsCallable(Target) is false, throw a TypeError exception.
if (!isCallable(target)) {
throw new TypeError('Function.prototype.bind called on incompatible ' + target);
}
// 3. Let A be a new (possibly empty) internal list of all of the
// argument values provided after thisArg (arg1, arg2 etc), in order.
// XXX slicedArgs will stand in for "A" if used
var args = array_slice.call(arguments, 1); // for normal call
// 4. Let F be a new native ECMAScript object.
// 11. Set the [[Prototype]] internal property of F to the standard
// built-in Function prototype object as specified in 15.3.3.1.
// 12. Set the [[Call]] internal property of F as described in
// 15.3.4.5.1.
// 13. Set the [[Construct]] internal property of F as described in
// 15.3.4.5.2.
// 14. Set the [[HasInstance]] internal property of F as described in
// 15.3.4.5.3.
var bound;
var binder = function () {
if (this instanceof bound) {
// 15.3.4.5.2 [[Construct]]
// When the [[Construct]] internal method of a function object,
// F that was created using the bind function is called with a
// list of arguments ExtraArgs, the following steps are taken:
// 1. Let target be the value of F's [[TargetFunction]]
// internal property.
// 2. If target has no [[Construct]] internal method, a
// TypeError exception is thrown.
// 3. Let boundArgs be the value of F's [[BoundArgs]] internal
// property.
// 4. Let args be a new list containing the same values as the
// list boundArgs in the same order followed by the same
// values as the list ExtraArgs in the same order.
// 5. Return the result of calling the [[Construct]] internal
// method of target providing args as the arguments.
var result = apply.call(
target,
this,
array_concat.call(args, array_slice.call(arguments))
);
if ($Object(result) === result) {
return result;
}
return this;
} else {
// 15.3.4.5.1 [[Call]]
// When the [[Call]] internal method of a function object, F,
// which was created using the bind function is called with a
// this value and a list of arguments ExtraArgs, the following
// steps are taken:
// 1. Let boundArgs be the value of F's [[BoundArgs]] internal
// property.
// 2. Let boundThis be the value of F's [[BoundThis]] internal
// property.
// 3. Let target be the value of F's [[TargetFunction]] internal
// property.
// 4. Let args be a new list containing the same values as the
// list boundArgs in the same order followed by the same
// values as the list ExtraArgs in the same order.
// 5. Return the result of calling the [[Call]] internal method
// of target providing boundThis as the this value and
// providing args as the arguments.
// equiv: target.call(this, ...boundArgs, ...args)
return apply.call(
target,
that,
array_concat.call(args, array_slice.call(arguments))
);
}
};
// 15. If the [[Class]] internal property of Target is "Function", then
// a. Let L be the length property of Target minus the length of A.
// b. Set the length own property of F to either 0 or L, whichever is
// larger.
// 16. Else set the length own property of F to 0.
var boundLength = max(0, target.length - args.length);
// 17. Set the attributes of the length own property of F to the values
// specified in 15.3.5.1.
var boundArgs = [];
for (var i = 0; i < boundLength; i++) {
array_push.call(boundArgs, '$' + i);
}
// XXX Build a dynamic function with desired amount of arguments is the only
// way to set the length property of a function.
// In environments where Content Security Policies enabled (Chrome extensions,
// for ex.) all use of eval or Function costructor throws an exception.
// However in all of these environments Function.prototype.bind exists
// and so this code will never be executed.
bound = $Function('binder', 'return function (' + array_join.call(boundArgs, ',') + '){ return binder.apply(this, arguments); }')(binder);
if (target.prototype) {
Empty.prototype = target.prototype;
bound.prototype = new Empty();
// Clean up dangling references.
Empty.prototype = null;
}
// TODO
// 18. Set the [[Extensible]] internal property of F to true.
// TODO
// 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
// 20. Call the [[DefineOwnProperty]] internal method of F with
// arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
// thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
// false.
// 21. Call the [[DefineOwnProperty]] internal method of F with
// arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
// [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
// and false.
// TODO
// NOTE Function objects created using Function.prototype.bind do not
// have a prototype property or the [[Code]], [[FormalParameters]], and
// [[Scope]] internal properties.
// XXX can't delete prototype in pure-js.
// 22. Return F.
return bound;
}
});
// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
// use it in defining shortcuts.
var owns = call.bind(ObjectPrototype.hasOwnProperty);
var toStr = call.bind(ObjectPrototype.toString);
var arraySlice = call.bind(array_slice);
var arraySliceApply = apply.bind(array_slice);
var strSlice = call.bind(StringPrototype.slice);
var strSplit = call.bind(StringPrototype.split);
var strIndexOf = call.bind(StringPrototype.indexOf);
var pushCall = call.bind(array_push);
var isEnum = call.bind(ObjectPrototype.propertyIsEnumerable);
var arraySort = call.bind(ArrayPrototype.sort);
//
// Array
// =====
//
var isArray = $Array.isArray || function isArray(obj) {
return toStr(obj) === '[object Array]';
};
// ES5 15.4.4.12
// http://es5.github.com/#x15.4.4.13
// Return len+argCount.
// [bugfix, ielt8]
// IE < 8 bug: [].unshift(0) === undefined but should be "1"
var hasUnshiftReturnValueBug = [].unshift(0) !== 1;
defineProperties(ArrayPrototype, {
unshift: function () {
array_unshift.apply(this, arguments);
return this.length;
}
}, hasUnshiftReturnValueBug);
// ES5 15.4.3.2
// http://es5.github.com/#x15.4.3.2
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
defineProperties($Array, { isArray: isArray });
// The IsCallable() check in the Array functions
// has been replaced with a strict check on the
// internal class of the object to trap cases where
// the provided function was actually a regular
// expression literal, which in V8 and
// JavaScriptCore is a typeof "function". Only in
// V8 are regular expression literals permitted as
// reduce parameters, so it is desirable in the
// general case for the shim to match the more
// strict and common behavior of rejecting regular
// expressions.
// ES5 15.4.4.18
// http://es5.github.com/#x15.4.4.18
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
// Check failure of by-index access of string characters (IE < 9)
// and failure of `0 in boxedString` (Rhino)
var boxedString = $Object('a');
var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
var properlyBoxesContext = function properlyBoxed(method) {
// Check node 0.6.21 bug where third parameter is not boxed
var properlyBoxesNonStrict = true;
var properlyBoxesStrict = true;
var threwException = false;
if (method) {
try {
method.call('foo', function (_, __, context) {
if (typeof context !== 'object') { properlyBoxesNonStrict = false; }
});
method.call([1], function () {
'use strict';
properlyBoxesStrict = typeof this === 'string';
}, 'x');
} catch (e) {
threwException = true;
}
}
return !!method && !threwException && properlyBoxesNonStrict && properlyBoxesStrict;
};
defineProperties(ArrayPrototype, {
forEach: function forEach(callbackfn/*, thisArg*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var i = -1;
var length = ES.ToUint32(self.length);
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.forEach callback must be a function');
}
while (++i < length) {
if (i in self) {
// Invoke the callback function with call, passing arguments:
// context, property value, property key, thisArg object
if (typeof T === 'undefined') {
callbackfn(self[i], i, object);
} else {
callbackfn.call(T, self[i], i, object);
}
}
}
}
}, !properlyBoxesContext(ArrayPrototype.forEach));
// ES5 15.4.4.19
// http://es5.github.com/#x15.4.4.19
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
defineProperties(ArrayPrototype, {
map: function map(callbackfn/*, thisArg*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
var result = $Array(length);
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.map callback must be a function');
}
for (var i = 0; i < length; i++) {
if (i in self) {
if (typeof T === 'undefined') {
result[i] = callbackfn(self[i], i, object);
} else {
result[i] = callbackfn.call(T, self[i], i, object);
}
}
}
return result;
}
}, !properlyBoxesContext(ArrayPrototype.map));
// ES5 15.4.4.20
// http://es5.github.com/#x15.4.4.20
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
defineProperties(ArrayPrototype, {
filter: function filter(callbackfn/*, thisArg*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
var result = [];
var value;
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.filter callback must be a function');
}
for (var i = 0; i < length; i++) {
if (i in self) {
value = self[i];
if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) {
pushCall(result, value);
}
}
}
return result;
}
}, !properlyBoxesContext(ArrayPrototype.filter));
// ES5 15.4.4.16
// http://es5.github.com/#x15.4.4.16
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
defineProperties(ArrayPrototype, {
every: function every(callbackfn/*, thisArg*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.every callback must be a function');
}
for (var i = 0; i < length; i++) {
if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) {
return false;
}
}
return true;
}
}, !properlyBoxesContext(ArrayPrototype.every));
// ES5 15.4.4.17
// http://es5.github.com/#x15.4.4.17
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
defineProperties(ArrayPrototype, {
some: function some(callbackfn/*, thisArg */) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
var T;
if (arguments.length > 1) {
T = arguments[1];
}
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.some callback must be a function');
}
for (var i = 0; i < length; i++) {
if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) {
return true;
}
}
return false;
}
}, !properlyBoxesContext(ArrayPrototype.some));
// ES5 15.4.4.21
// http://es5.github.com/#x15.4.4.21
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
var reduceCoercesToObject = false;
if (ArrayPrototype.reduce) {
reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { return list; }) === 'object';
}
defineProperties(ArrayPrototype, {
reduce: function reduce(callbackfn/*, initialValue*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.reduce callback must be a function');
}
// no value to return if no initial value and an empty array
if (length === 0 && arguments.length === 1) {
throw new TypeError('reduce of empty array with no initial value');
}
var i = 0;
var result;
if (arguments.length >= 2) {
result = arguments[1];
} else {
do {
if (i in self) {
result = self[i++];
break;
}
// if array contains no values, no initial value to return
if (++i >= length) {
throw new TypeError('reduce of empty array with no initial value');
}
} while (true);
}
for (; i < length; i++) {
if (i in self) {
result = callbackfn(result, self[i], i, object);
}
}
return result;
}
}, !reduceCoercesToObject);
// ES5 15.4.4.22
// http://es5.github.com/#x15.4.4.22
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
var reduceRightCoercesToObject = false;
if (ArrayPrototype.reduceRight) {
reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { return list; }) === 'object';
}
defineProperties(ArrayPrototype, {
reduceRight: function reduceRight(callbackfn/*, initial*/) {
var object = ES.ToObject(this);
var self = splitString && isString(this) ? strSplit(this, '') : object;
var length = ES.ToUint32(self.length);
// If no callback function or if callback is not a callable function
if (!isCallable(callbackfn)) {
throw new TypeError('Array.prototype.reduceRight callback must be a function');
}
// no value to return if no initial value, empty array
if (length === 0 && arguments.length === 1) {
throw new TypeError('reduceRight of empty array with no initial value');
}
var result;
var i = length - 1;
if (arguments.length >= 2) {
result = arguments[1];
} else {
do {
if (i in self) {
result = self[i--];
break;
}
// if array contains no values, no initial value to return
if (--i < 0) {
throw new TypeError('reduceRight of empty array with no initial value');
}
} while (true);
}
if (i < 0) {
return result;
}
do {
if (i in self) {
result = callbackfn(result, self[i], i, object);
}
} while (i--);
return result;
}
}, !reduceRightCoercesToObject);
// ES5 15.4.4.14
// http://es5.github.com/#x15.4.4.14
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1;
defineProperties(ArrayPrototype, {
indexOf: function indexOf(searchElement/*, fromIndex */) {
var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this);
var length = ES.ToUint32(self.length);
if (length === 0) {
return -1;
}
var i = 0;
if (arguments.length > 1) {
i = ES.ToInteger(arguments[1]);
}
// handle negative indices
i = i >= 0 ? i : max(0, length + i);
for (; i < length; i++) {
if (i in self && self[i] === searchElement) {
return i;
}
}
return -1;
}
}, hasFirefox2IndexOfBug);
// ES5 15.4.4.15
// http://es5.github.com/#x15.4.4.15
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1;
defineProperties(ArrayPrototype, {
lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) {
var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this);
var length = ES.ToUint32(self.length);
if (length === 0) {
return -1;
}
var i = length - 1;
if (arguments.length > 1) {
i = min(i, ES.ToInteger(arguments[1]));
}
// handle negative indices
i = i >= 0 ? i : length - Math.abs(i);
for (; i >= 0; i--) {
if (i in self && searchElement === self[i]) {
return i;
}
}
return -1;
}
}, hasFirefox2LastIndexOfBug);
// ES5 15.4.4.12
// http://es5.github.com/#x15.4.4.12
var spliceNoopReturnsEmptyArray = (function () {
var a = [1, 2];
var result = a.splice();
return a.length === 2 && isArray(result) && result.length === 0;
}());
defineProperties(ArrayPrototype, {
// Safari 5.0 bug where .splice() returns undefined
splice: function splice(start, deleteCount) {
if (arguments.length === 0) {
return [];
} else {
return array_splice.apply(this, arguments);
}
}
}, !spliceNoopReturnsEmptyArray);
var spliceWorksWithEmptyObject = (function () {
var obj = {};
ArrayPrototype.splice.call(obj, 0, 0, 1);
return obj.length === 1;
}());
defineProperties(ArrayPrototype, {
splice: function splice(start, deleteCount) {
if (arguments.length === 0) { return []; }
var args = arguments;
this.length = max(ES.ToInteger(this.length), 0);
if (arguments.length > 0 && typeof deleteCount !== 'number') {
args = arraySlice(arguments);
if (args.length < 2) {
pushCall(args, this.length - start);
} else {
args[1] = ES.ToInteger(deleteCount);
}
}
return array_splice.apply(this, args);
}
}, !spliceWorksWithEmptyObject);
var spliceWorksWithLargeSparseArrays = (function () {
// Per https://github.com/es-shims/es5-shim/issues/295
// Safari 7/8 breaks with sparse arrays of size 1e5 or greater
var arr = new $Array(1e5);
// note: the index MUST be 8 or larger or the test will false pass
arr[8] = 'x';
arr.splice(1, 1);
// note: this test must be defined *after* the indexOf shim
// per https://github.com/es-shims/es5-shim/issues/313
return arr.indexOf('x') === 7;
}());
var spliceWorksWithSmallSparseArrays = (function () {
// Per https://github.com/es-shims/es5-shim/issues/295
// Opera 12.15 breaks on this, no idea why.
var n = 256;
var arr = [];
arr[n] = 'a';
arr.splice(n + 1, 0, 'b');
return arr[n] === 'a';
}());
defineProperties(ArrayPrototype, {
splice: function splice(start, deleteCount) {
var O = ES.ToObject(this);
var A = [];
var len = ES.ToUint32(O.length);
var relativeStart = ES.ToInteger(start);
var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len);
var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart);
var k = 0;
var from;
while (k < actualDeleteCount) {
from = $String(actualStart + k);
if (owns(O, from)) {
A[k] = O[from];
}
k += 1;
}
var items = arraySlice(arguments, 2);
var itemCount = items.length;
var to;
if (itemCount < actualDeleteCount) {
k = actualStart;
var maxK = len - actualDeleteCount;
while (k < maxK) {
from = $String(k + actualDeleteCount);
to = $String(k + itemCount);
if (owns(O, from)) {
O[to] = O[from];
} else {
delete O[to];
}
k += 1;
}
k = len;
var minK = len - actualDeleteCount + itemCount;
while (k > minK) {
delete O[k - 1];
k -= 1;
}
} else if (itemCount > actualDeleteCount) {
k = len - actualDeleteCount;
while (k > actualStart) {
from = $String(k + actualDeleteCount - 1);
to = $String(k + itemCount - 1);
if (owns(O, from)) {
O[to] = O[from];
} else {
delete O[to];
}
k -= 1;
}
}
k = actualStart;
for (var i = 0; i < items.length; ++i) {
O[k] = items[i];
k += 1;
}
O.length = len - actualDeleteCount + itemCount;
return A;
}
}, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays);
var originalJoin = ArrayPrototype.join;
var hasStringJoinBug;
try {
hasStringJoinBug = Array.prototype.join.call('123', ',') !== '1,2,3';
} catch (e) {
hasStringJoinBug = true;
}
if (hasStringJoinBug) {
defineProperties(ArrayPrototype, {
join: function join(separator) {
var sep = typeof separator === 'undefined' ? ',' : separator;
return originalJoin.call(isString(this) ? strSplit(this, '') : this, sep);
}
}, hasStringJoinBug);
}
var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2';
if (hasJoinUndefinedBug) {
defineProperties(ArrayPrototype, {
join: function join(separator) {
var sep = typeof separator === 'undefined' ? ',' : separator;
return originalJoin.call(this, sep);
}
}, hasJoinUndefinedBug);
}
var pushShim = function push(item) {
var O = ES.ToObject(this);
var n = ES.ToUint32(O.length);
var i = 0;
while (i < arguments.length) {
O[n + i] = arguments[i];
i += 1;
}
O.length = n + i;
return n + i;
};
var pushIsNotGeneric = (function () {
var obj = {};
var result = Array.prototype.push.call(obj, undefined);
return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0);
}());
defineProperties(ArrayPrototype, {
push: function push(item) {
if (isArray(this)) {
return array_push.apply(this, arguments);
}
return pushShim.apply(this, arguments);
}
}, pushIsNotGeneric);
// This fixes a very weird bug in Opera 10.6 when pushing `undefined
var pushUndefinedIsWeird = (function () {
var arr = [];
var result = arr.push(undefined);
return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0);
}());
defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird);
// ES5 15.2.3.14
// http://es5.github.io/#x15.4.4.10
// Fix boxed string bug
defineProperties(ArrayPrototype, {
slice: function (start, end) {
var arr = isString(this) ? strSplit(this, '') : this;
return arraySliceApply(arr, arguments);
}
}, splitString);
var sortIgnoresNonFunctions = (function () {
try {
[1, 2].sort(null);
[1, 2].sort({});
return true;
} catch (e) { /**/ }
return false;
}());
var sortThrowsOnRegex = (function () {
// this is a problem in Firefox 4, in which `typeof /a/ === 'function'`
try {
[1, 2].sort(/a/);
return false;
} catch (e) { /**/ }
return true;
}());
var sortIgnoresUndefined = (function () {
// applies in IE 8, for one.
try {
[1, 2].sort(undefined);
return true;
} catch (e) { /**/ }
return false;
}());
defineProperties(ArrayPrototype, {
sort: function sort(compareFn) {
if (typeof compareFn === 'undefined') {
return arraySort(this);
}
if (!isCallable(compareFn)) {
throw new TypeError('Array.prototype.sort callback must be a function');
}
return arraySort(this, compareFn);
}
}, sortIgnoresNonFunctions || !sortIgnoresUndefined || !sortThrowsOnRegex);
//
// Object
// ======
//
// ES5 15.2.3.14
// http://es5.github.com/#x15.2.3.14
// http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
var hasDontEnumBug = !({ 'toString': null }).propertyIsEnumerable('toString');
var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');
var hasStringEnumBug = !owns('x', '0');
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
};
var blacklistedKeys = {
$window: true,
$console: true,
$parent: true,
$self: true,
$frame: true,
$frames: true,
$frameElement: true,
$webkitIndexedDB: true,
$webkitStorageInfo: true,
$external: true
};
var hasAutomationEqualityBug = (function () {
/* globals window */
if (typeof window === 'undefined') { return false; }
for (var k in window) {
try {
if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') {
equalsConstructorPrototype(window[k]);
}
} catch (e) {
return true;
}
}
return false;
}());
var equalsConstructorPrototypeIfNotBuggy = function (object) {
if (typeof window === 'undefined' || !hasAutomationEqualityBug) { return equalsConstructorPrototype(object); }
try {
return equalsConstructorPrototype(object);
} catch (e) {
return false;
}
};
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var dontEnumsLength = dontEnums.length;
// taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js
// can be replaced with require('is-arguments') if we ever use a build process instead
var isStandardArguments = function isArguments(value) {
return toStr(value) === '[object Arguments]';
};
var isLegacyArguments = function isArguments(value) {
return value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
!isArray(value) &&
isCallable(value.callee);
};
var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments;
defineProperties($Object, {
keys: function keys(object) {
var isFn = isCallable(object);
var isArgs = isArguments(object);
var isObject = object !== null && typeof object === 'object';
var isStr = isObject && isString(object);
if (!isObject && !isFn && !isArgs) {
throw new TypeError('Object.keys called on a non-object');
}
var theKeys = [];
var skipProto = hasProtoEnumBug && isFn;
if ((isStr && hasStringEnumBug) || isArgs) {
for (var i = 0; i < object.length; ++i) {
pushCall(theKeys, $String(i));
}
}
if (!isArgs) {
for (var name in object) {
if (!(skipProto && name === 'prototype') && owns(object, name)) {
pushCall(theKeys, $String(name));
}
}
}
if (hasDontEnumBug) {
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
for (var j = 0; j < dontEnumsLength; j++) {
var dontEnum = dontEnums[j];
if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) {
pushCall(theKeys, dontEnum);
}
}
}
return theKeys;
}
});
var keysWorksWithArguments = $Object.keys && (function () {
// Safari 5.0 bug
return $Object.keys(arguments).length === 2;
}(1, 2));
var keysHasArgumentsLengthBug = $Object.keys && (function () {
var argKeys = $Object.keys(arguments);
return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1;
}(1));
var originalKeys = $Object.keys;
defineProperties($Object, {
keys: function keys(object) {
if (isArguments(object)) {
return originalKeys(arraySlice(object));
} else {
return originalKeys(object);
}
}
}, !keysWorksWithArguments || keysHasArgumentsLengthBug);
//
// Date
// ====
//
var hasNegativeMonthYearBug = new Date(-3509827329600292).getUTCMonth() !== 0;
var aNegativeTestDate = new Date(-1509842289600292);
var aPositiveTestDate = new Date(1449662400000);
var hasToUTCStringFormatBug = aNegativeTestDate.toUTCString() !== 'Mon, 01 Jan -45875 11:59:59 GMT';
var hasToDateStringFormatBug;
var hasToStringFormatBug;
var timeZoneOffset = aNegativeTestDate.getTimezoneOffset();
if (timeZoneOffset < -720) {
hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Tue Jan 02 -45875';
hasToStringFormatBug = !(/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString());
} else {
hasToDateStringFormatBug = aNegativeTestDate.toDateString() !== 'Mon Jan 01 -45875';
hasToStringFormatBug = !(/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/).test(aPositiveTestDate.toString());
}
var originalGetFullYear = call.bind(Date.prototype.getFullYear);
var originalGetMonth = call.bind(Date.prototype.getMonth);
var originalGetDate = call.bind(Date.prototype.getDate);
var originalGetUTCFullYear = call.bind(Date.prototype.getUTCFullYear);
var originalGetUTCMonth = call.bind(Date.prototype.getUTCMonth);
var originalGetUTCDate = call.bind(Date.prototype.getUTCDate);
var originalGetUTCDay = call.bind(Date.prototype.getUTCDay);
var originalGetUTCHours = call.bind(Date.prototype.getUTCHours);
var originalGetUTCMinutes = call.bind(Date.prototype.getUTCMinutes);
var originalGetUTCSeconds = call.bind(Date.prototype.getUTCSeconds);
var originalGetUTCMilliseconds = call.bind(Date.prototype.getUTCMilliseconds);
var dayName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var monthName = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var daysInMonth = function daysInMonth(month, year) {
return originalGetDate(new Date(year, month, 0));
};
defineProperties(Date.prototype, {
getFullYear: function getFullYear() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetFullYear(this);
if (year < 0 && originalGetMonth(this) > 11) {
return year + 1;
}
return year;
},
getMonth: function getMonth() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetFullYear(this);
var month = originalGetMonth(this);
if (year < 0 && month > 11) {
return 0;
}
return month;
},
getDate: function getDate() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetFullYear(this);
var month = originalGetMonth(this);
var date = originalGetDate(this);
if (year < 0 && month > 11) {
if (month === 12) {
return date;
}
var days = daysInMonth(0, year + 1);
return (days - date) + 1;
}
return date;
},
getUTCFullYear: function getUTCFullYear() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetUTCFullYear(this);
if (year < 0 && originalGetUTCMonth(this) > 11) {
return year + 1;
}
return year;
},
getUTCMonth: function getUTCMonth() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetUTCFullYear(this);
var month = originalGetUTCMonth(this);
if (year < 0 && month > 11) {
return 0;
}
return month;
},
getUTCDate: function getUTCDate() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var year = originalGetUTCFullYear(this);
var month = originalGetUTCMonth(this);
var date = originalGetUTCDate(this);
if (year < 0 && month > 11) {
if (month === 12) {
return date;
}
var days = daysInMonth(0, year + 1);
return (days - date) + 1;
}
return date;
}
}, hasNegativeMonthYearBug);
defineProperties(Date.prototype, {
toUTCString: function toUTCString() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var day = originalGetUTCDay(this);
var date = originalGetUTCDate(this);
var month = originalGetUTCMonth(this);
var year = originalGetUTCFullYear(this);
var hour = originalGetUTCHours(this);
var minute = originalGetUTCMinutes(this);
var second = originalGetUTCSeconds(this);
return dayName[day] + ', ' +
(date < 10 ? '0' + date : date) + ' ' +
monthName[month] + ' ' +
year + ' ' +
(hour < 10 ? '0' + hour : hour) + ':' +
(minute < 10 ? '0' + minute : minute) + ':' +
(second < 10 ? '0' + second : second) + ' GMT';
}
}, hasNegativeMonthYearBug || hasToUTCStringFormatBug);
// Opera 12 has `,`
defineProperties(Date.prototype, {
toDateString: function toDateString() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var day = this.getDay();
var date = this.getDate();
var month = this.getMonth();
var year = this.getFullYear();
return dayName[day] + ' ' +
monthName[month] + ' ' +
(date < 10 ? '0' + date : date) + ' ' +
year;
}
}, hasNegativeMonthYearBug || hasToDateStringFormatBug);
// can't use defineProperties here because of toString enumeration issue in IE <= 8
if (hasNegativeMonthYearBug || hasToStringFormatBug) {
Date.prototype.toString = function toString() {
if (!this || !(this instanceof Date)) {
throw new TypeError('this is not a Date object.');
}
var day = this.getDay();
var date = this.getDate();
var month = this.getMonth();
var year = this.getFullYear();
var hour = this.getHours();
var minute = this.getMinutes();
var second = this.getSeconds();
var timezoneOffset = this.getTimezoneOffset();
var hoursOffset = Math.floor(Math.abs(timezoneOffset) / 60);
var minutesOffset = Math.floor(Math.abs(timezoneOffset) % 60);
return dayName[day] + ' ' +
monthName[month] + ' ' +
(date < 10 ? '0' + date : date) + ' ' +
year + ' ' +
(hour < 10 ? '0' + hour : hour) + ':' +
(minute < 10 ? '0' + minute : minute) + ':' +
(second < 10 ? '0' + second : second) + ' GMT' +
(timezoneOffset > 0 ? '-' : '+') +
(hoursOffset < 10 ? '0' + hoursOffset : hoursOffset) +
(minutesOffset < 10 ? '0' + minutesOffset : minutesOffset);
};
if (supportsDescriptors) {
$Object.defineProperty(Date.prototype, 'toString', {
configurable: true,
enumerable: false,
writable: true
});
}
}
// ES5 15.9.5.43
// http://es5.github.com/#x15.9.5.43
// This function returns a String value represent the instance in time
// represented by this Date object. The format of the String is the Date Time
// string format defined in 15.9.1.15. All fields are present in the String.
// The time zone is always UTC, denoted by the suffix Z. If the time value of
// this object is not a finite Number a RangeError exception is thrown.
var negativeDate = -62198755200000;
var negativeYearString = '-000001';
var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1;
var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z';
var getTime = call.bind(Date.prototype.getTime);
defineProperties(Date.prototype, {
toISOString: function toISOString() {
if (!isFinite(this) || !isFinite(getTime(this))) {
// Adope Photoshop requires the second check.
throw new RangeError('Date.prototype.toISOString called on non-finite value.');
}
var year = originalGetUTCFullYear(this);
var month = originalGetUTCMonth(this);
// see https://github.com/es-shims/es5-shim/issues/111
year += Math.floor(month / 12);
month = (month % 12 + 12) % 12;
// the date time string format is specified in 15.9.1.15.
var result = [month + 1, originalGetUTCDate(this), originalGetUTCHours(this), originalGetUTCMinutes(this), originalGetUTCSeconds(this)];
year = (
(year < 0 ? '-' : (year > 9999 ? '+' : '')) +
strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6)
);
for (var i = 0; i < result.length; ++i) {
// pad months, days, hours, minutes, and seconds to have two digits.
result[i] = strSlice('00' + result[i], -2);
}
// pad milliseconds to have three digits.
return (
year + '-' + arraySlice(result, 0, 2).join('-') +
'T' + arraySlice(result, 2).join(':') + '.' +
strSlice('000' + originalGetUTCMilliseconds(this), -3) + 'Z'
);
}
}, hasNegativeDateBug || hasSafari51DateBug);
// ES5 15.9.5.44
// http://es5.github.com/#x15.9.5.44
// This function provides a String representation of a Date object for use by
// JSON.stringify (15.12.3).
var dateToJSONIsSupported = (function () {
try {
return Date.prototype.toJSON &&
new Date(NaN).toJSON() === null &&
new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 &&
Date.prototype.toJSON.call({ // generic
toISOString: function () { return true; }
});
} catch (e) {
return false;
}
}());
if (!dateToJSONIsSupported) {
Date.prototype.toJSON = function toJSON(key) {
// When the toJSON method is called with argument key, the following
// steps are taken:
// 1. Let O be the result of calling ToObject, giving it the this
// value as its argument.
// 2. Let tv be ES.ToPrimitive(O, hint Number).
var O = $Object(this);
var tv = ES.ToPrimitive(O);
// 3. If tv is a Number and is not finite, return null.
if (typeof tv === 'number' && !isFinite(tv)) {
return null;
}
// 4. Let toISO be the result of calling the [[Get]] internal method of
// O with argument "toISOString".
var toISO = O.toISOString;
// 5. If IsCallable(toISO) is false, throw a TypeError exception.
if (!isCallable(toISO)) {
throw new TypeError('toISOString property is not callable');
}
// 6. Return the result of calling the [[Call]] internal method of
// toISO with O as the this value and an empty argument list.
return toISO.call(O);
// NOTE 1 The argument is ignored.
// NOTE 2 The toJSON function is intentionally generic; it does not
// require that its this value be a Date object. Therefore, it can be
// transferred to other kinds of objects for use as a method. However,
// it does require that any such object have a toISOString method. An
// object is free to use the argument key to filter its
// stringification.
};
}
// ES5 15.9.4.2
// http://es5.github.com/#x15.9.4.2
// based on work shared by Daniel Friesen (dantman)
// http://gist.github.com/303249
var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15;
var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z'));
var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z'));
if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) {
// XXX global assignment won't work in embeddings that use
// an alternate object for the context.
/* global Date: true */
/* eslint-disable no-undef */
var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1;
var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime());
/* eslint-disable no-implicit-globals */
Date = (function (NativeDate) {
/* eslint-enable no-implicit-globals */
/* eslint-enable no-undef */
// Date.length === 7
var DateShim = function Date(Y, M, D, h, m, s, ms) {
var length = arguments.length;
var date;
if (this instanceof NativeDate) {
var seconds = s;
var millis = ms;
if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) {
// work around a Safari 8/9 bug where it treats the seconds as signed
var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit;
var sToShift = Math.floor(msToShift / 1e3);
seconds += sToShift;
millis -= sToShift * 1e3;
}
date = length === 1 && $String(Y) === Y ? // isString(Y)
// We explicitly pass it through parse:
new NativeDate(DateShim.parse(Y)) :
// We have to manually make calls depending on argument
// length here
length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) :
length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) :
length >= 5 ? new NativeDate(Y, M, D, h, m) :
length >= 4 ? new NativeDate(Y, M, D, h) :
length >= 3 ? new NativeDate(Y, M, D) :
length >= 2 ? new NativeDate(Y, M) :
length >= 1 ? new NativeDate(Y instanceof NativeDate ? +Y : Y) :
new NativeDate();
} else {
date = NativeDate.apply(this, arguments);
}
if (!isPrimitive(date)) {
// Prevent mixups with unfixed Date object
defineProperties(date, { constructor: DateShim }, true);
}
return date;
};
// 15.9.1.15 Date Time String Format.
var isoDateExpression = new RegExp('^' +
'(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign +
// 6-digit extended year
'(?:-(\\d{2})' + // optional month capture
'(?:-(\\d{2})' + // optional day capture
'(?:' + // capture hours:minutes:seconds.milliseconds
'T(\\d{2})' + // hours capture
':(\\d{2})' + // minutes capture
'(?:' + // optional :seconds.milliseconds
':(\\d{2})' + // seconds capture
'(?:(\\.\\d{1,}))?' + // milliseconds capture
')?' +
'(' + // capture UTC offset component
'Z|' + // UTC capture
'(?:' + // offset specifier +/-hours:minutes
'([-+])' + // sign capture
'(\\d{2})' + // hours offset capture
':(\\d{2})' + // minutes offset capture
')' +
')?)?)?)?' +
'$');
var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];
var dayFromMonth = function dayFromMonth(year, month) {
var t = month > 1 ? 1 : 0;
return (
months[month] +
Math.floor((year - 1969 + t) / 4) -
Math.floor((year - 1901 + t) / 100) +
Math.floor((year - 1601 + t) / 400) +
365 * (year - 1970)
);
};
var toUTC = function toUTC(t) {
var s = 0;
var ms = t;
if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) {
// work around a Safari 8/9 bug where it treats the seconds as signed
var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit;
var sToShift = Math.floor(msToShift / 1e3);
s += sToShift;
ms -= sToShift * 1e3;
}
return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms));
};
// Copy any custom methods a 3rd party library may have added
for (var key in NativeDate) {
if (owns(NativeDate, key)) {
DateShim[key] = NativeDate[key];
}
}
// Copy "native" methods explicitly; they may be non-enumerable
defineProperties(DateShim, {
now: NativeDate.now,
UTC: NativeDate.UTC
}, true);
DateShim.prototype = NativeDate.prototype;
defineProperties(DateShim.prototype, {
constructor: DateShim
}, true);
// Upgrade Date.parse to handle simplified ISO 8601 strings
var parseShim = function parse(string) {
var match = isoDateExpression.exec(string);
if (match) {
// parse months, days, hours, minutes, seconds, and milliseconds
// provide default values if necessary
// parse the UTC offset component
var year = $Number(match[1]),
month = $Number(match[2] || 1) - 1,
day = $Number(match[3] || 1) - 1,
hour = $Number(match[4] || 0),
minute = $Number(match[5] || 0),
second = $Number(match[6] || 0),
millisecond = Math.floor($Number(match[7] || 0) * 1000),
// When time zone is missed, local offset should be used
// (ES 5.1 bug)
// see https://bugs.ecmascript.org/show_bug.cgi?id=112
isLocalTime = Boolean(match[4] && !match[8]),
signOffset = match[9] === '-' ? 1 : -1,
hourOffset = $Number(match[10] || 0),
minuteOffset = $Number(match[11] || 0),
result;
var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0;
if (
hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) &&
minute < 60 && second < 60 && millisecond < 1000 &&
month > -1 && month < 12 && hourOffset < 24 &&
minuteOffset < 60 && // detect invalid offsets
day > -1 &&
day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month))
) {
result = (
(dayFromMonth(year, month) + day) * 24 +
hour +
hourOffset * signOffset
) * 60;
result = (
(result + minute + minuteOffset * signOffset) * 60 +
second
) * 1000 + millisecond;
if (isLocalTime) {
result = toUTC(result);
}
if (-8.64e15 <= result && result <= 8.64e15) {
return result;
}
}
return NaN;
}
return NativeDate.parse.apply(this, arguments);
};
defineProperties(DateShim, { parse: parseShim });
return DateShim;
}(Date));
/* global Date: false */
}
// ES5 15.9.4.4
// http://es5.github.com/#x15.9.4.4
if (!Date.now) {
Date.now = function now() {
return new Date().getTime();
};
}
//
// Number
// ======
//
// ES5.1 15.7.4.5
// http://es5.github.com/#x15.7.4.5
var hasToFixedBugs = NumberPrototype.toFixed && (
(0.00008).toFixed(3) !== '0.000' ||
(0.9).toFixed(0) !== '1' ||
(1.255).toFixed(2) !== '1.25' ||
(1000000000000000128).toFixed(0) !== '1000000000000000128'
);
var toFixedHelpers = {
base: 1e7,
size: 6,
data: [0, 0, 0, 0, 0, 0],
multiply: function multiply(n, c) {
var i = -1;
var c2 = c;
while (++i < toFixedHelpers.size) {
c2 += n * toFixedHelpers.data[i];
toFixedHelpers.data[i] = c2 % toFixedHelpers.base;
c2 = Math.floor(c2 / toFixedHelpers.base);
}
},
divide: function divide(n) {
var i = toFixedHelpers.size;
var c = 0;
while (--i >= 0) {
c += toFixedHelpers.data[i];
toFixedHelpers.data[i] = Math.floor(c / n);
c = (c % n) * toFixedHelpers.base;
}
},
numToString: function numToString() {
var i = toFixedHelpers.size;
var s = '';
while (--i >= 0) {
if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) {
var t = $String(toFixedHelpers.data[i]);
if (s === '') {
s = t;
} else {
s += strSlice('0000000', 0, 7 - t.length) + t;
}
}
}
return s;
},
pow: function pow(x, n, acc) {
return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc)));
},
log: function log(x) {
var n = 0;
var x2 = x;
while (x2 >= 4096) {
n += 12;
x2 /= 4096;
}
while (x2 >= 2) {
n += 1;
x2 /= 2;
}
return n;
}
};
var toFixedShim = function toFixed(fractionDigits) {
var f, x, s, m, e, z, j, k;
// Test for NaN and round fractionDigits down
f = $Number(fractionDigits);
f = isActualNaN(f) ? 0 : Math.floor(f);
if (f < 0 || f > 20) {
throw new RangeError('Number.toFixed called with invalid number of decimals');
}
x = $Number(this);
if (isActualNaN(x)) {
return 'NaN';
}
// If it is too big or small, return the string value of the number
if (x <= -1e21 || x >= 1e21) {
return $String(x);
}
s = '';
if (x < 0) {
s = '-';
x = -x;
}
m = '0';
if (x > 1e-21) {
// 1e-21 < x < 1e21
// -70 < log2(x) < 70
e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69;
z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1));
z *= 0x10000000000000; // Math.pow(2, 52);
e = 52 - e;
// -18 < e < 122
// x = z / 2 ^ e
if (e > 0) {
toFixedHelpers.multiply(0, z);
j = f;
while (j >= 7) {
toFixedHelpers.multiply(1e7, 0);
j -= 7;
}
toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0);
j = e - 1;
while (j >= 23) {
toFixedHelpers.divide(1 << 23);
j -= 23;
}
toFixedHelpers.divide(1 << j);
toFixedHelpers.multiply(1, 1);
toFixedHelpers.divide(2);
m = toFixedHelpers.numToString();
} else {
toFixedHelpers.multiply(0, z);
toFixedHelpers.multiply(1 << (-e), 0);
m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f);
}
}
if (f > 0) {
k = m.length;
if (k <= f) {
m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m;
} else {
m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f);
}
} else {
m = s + m;
}
return m;
};
defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs);
var hasToPrecisionUndefinedBug = (function () {
try {
return 1.0.toPrecision(undefined) === '1';
} catch (e) {
return true;
}
}());
var originalToPrecision = NumberPrototype.toPrecision;
defineProperties(NumberPrototype, {
toPrecision: function toPrecision(precision) {
return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision);
}
}, hasToPrecisionUndefinedBug);
//
// String
// ======
//
// ES5 15.5.4.14
// http://es5.github.com/#x15.5.4.14
// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers]
// Many browsers do not split properly with regular expressions or they
// do not perform the split correctly under obscure conditions.
// See http://blog.stevenlevithan.com/archives/cross-browser-split
// I've tested in many browsers and this seems to cover the deviant ones:
// 'ab'.split(/(?:ab)*/) should be ["", ""], not [""]
// '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""]
// 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not
// [undefined, "t", undefined, "e", ...]
// ''.split(/.?/) should be [], not [""]
// '.'.split(/()()/) should be ["."], not ["", "", "."]
if (
'ab'.split(/(?:ab)*/).length !== 2 ||
'.'.split(/(.?)(.?)/).length !== 4 ||
'tesst'.split(/(s)*/)[1] === 't' ||
'test'.split(/(?:)/, -1).length !== 4 ||
''.split(/.?/).length ||
'.'.split(/()()/).length > 1
) {
(function () {
var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group
var maxSafe32BitInt = Math.pow(2, 32) - 1;
StringPrototype.split = function (separator, limit) {
var string = String(this);
if (typeof separator === 'undefined' && limit === 0) {
return [];
}
// If `separator` is not a regex, use native split
if (!isRegex(separator)) {
return strSplit(this, separator, limit);
}
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') + // in ES6
(separator.sticky ? 'y' : ''), // Firefox 3+ and ES6
lastLastIndex = 0,
// Make `global` and avoid `lastIndex` issues by working with a copy
separator2, match, lastIndex, lastLength;
var separatorCopy = new RegExp(separator.source, flags + 'g');
if (!compliantExecNpcg) {
// Doesn't need flags gy, but they don't hurt
separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
}
/* Values for `limit`, per the spec:
* If undefined: 4294967295 // maxSafe32BitInt
* If 0, Infinity, or NaN: 0
* If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;
* If negative number: 4294967296 - Math.floor(Math.abs(limit))
* If other: Type-convert, then use the above rules
*/
var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit);
match = separatorCopy.exec(string);
while (match) {
// `separatorCopy.lastIndex` is not reliable cross-browser
lastIndex = match.index + match[0].length;
if (lastIndex > lastLastIndex) {
pushCall(output, strSlice(string, lastLastIndex, match.index));
// Fix browsers whose `exec` methods don't consistently return `undefined` for
// nonparticipating capturing groups
if (!compliantExecNpcg && match.length > 1) {
/* eslint-disable no-loop-func */
match[0].replace(separator2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (typeof arguments[i] === 'undefined') {
match[i] = void 0;
}
}
});
/* eslint-enable no-loop-func */
}
if (match.length > 1 && match.index < string.length) {
array_push.apply(output, arraySlice(match, 1));
}
lastLength = match[0].length;
lastLastIndex = lastIndex;
if (output.length >= splitLimit) {
break;
}
}
if (separatorCopy.lastIndex === match.index) {
separatorCopy.lastIndex++; // Avoid an infinite loop
}
match = separatorCopy.exec(string);
}
if (lastLastIndex === string.length) {
if (lastLength || !separatorCopy.test('')) {
pushCall(output, '');
}
} else {
pushCall(output, strSlice(string, lastLastIndex));
}
return output.length > splitLimit ? arraySlice(output, 0, splitLimit) : output;
};
}());
// [bugfix, chrome]
// If separator is undefined, then the result array contains just one String,
// which is the this value (converted to a String). If limit is not undefined,
// then the output array is truncated so that it contains no more than limit
// elements.
// "0".split(undefined, 0) -> []
} else if ('0'.split(void 0, 0).length) {
StringPrototype.split = function split(separator, limit) {
if (typeof separator === 'undefined' && limit === 0) { return []; }
return strSplit(this, separator, limit);
};
}
var str_replace = StringPrototype.replace;
var replaceReportsGroupsCorrectly = (function () {
var groups = [];
'x'.replace(/x(.)?/g, function (match, group) {
pushCall(groups, group);
});
return groups.length === 1 && typeof groups[0] === 'undefined';
}());
if (!replaceReportsGroupsCorrectly) {
StringPrototype.replace = function replace(searchValue, replaceValue) {
var isFn = isCallable(replaceValue);
var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source);
if (!isFn || !hasCapturingGroups) {
return str_replace.call(this, searchValue, replaceValue);
} else {
var wrappedReplaceValue = function (match) {
var length = arguments.length;
var originalLastIndex = searchValue.lastIndex;
searchValue.lastIndex = 0;
var args = searchValue.exec(match) || [];
searchValue.lastIndex = originalLastIndex;
pushCall(args, arguments[length - 2], arguments[length - 1]);
return replaceValue.apply(this, args);
};
return str_replace.call(this, searchValue, wrappedReplaceValue);
}
};
}
// ECMA-262, 3rd B.2.3
// Not an ECMAScript standard, although ECMAScript 3rd Edition has a
// non-normative section suggesting uniform semantics and it should be
// normalized across all browsers
// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE
var string_substr = StringPrototype.substr;
var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b';
defineProperties(StringPrototype, {
substr: function substr(start, length) {
var normalizedStart = start;
if (start < 0) {
normalizedStart = max(this.length + start, 0);
}
return string_substr.call(this, normalizedStart, length);
}
}, hasNegativeSubstrBug);
// ES5 15.5.4.20
// whitespace from: http://es5.github.io/#x15.5.4.20
var ws = '\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';
var zeroWidth = '\u200b';
var wsRegexChars = '[' + ws + ']';
var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*');
var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$');
var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim());
defineProperties(StringPrototype, {
// http://blog.stevenlevithan.com/archives/faster-trim-javascript
// http://perfectionkills.com/whitespace-deviations/
trim: function trim() {
if (typeof this === 'undefined' || this === null) {
throw new TypeError("can't convert " + this + ' to object');
}
return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, '');
}
}, hasTrimWhitespaceBug);
var trim = call.bind(String.prototype.trim);
var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1;
defineProperties(StringPrototype, {
lastIndexOf: function lastIndexOf(searchString) {
if (typeof this === 'undefined' || this === null) {
throw new TypeError("can't convert " + this + ' to object');
}
var S = $String(this);
var searchStr = $String(searchString);
var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN;
var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos);
var start = min(max(pos, 0), S.length);
var searchLen = searchStr.length;
var k = start + searchLen;
while (k > 0) {
k = max(0, k - searchLen);
var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr);
if (index !== -1) {
return k + index;
}
}
return -1;
}
}, hasLastIndexBug);
var originalLastIndexOf = StringPrototype.lastIndexOf;
defineProperties(StringPrototype, {
lastIndexOf: function lastIndexOf(searchString) {
return originalLastIndexOf.apply(this, arguments);
}
}, StringPrototype.lastIndexOf.length !== 1);
// ES-5 15.1.2.2
/* eslint-disable radix */
if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) {
/* eslint-enable radix */
/* global parseInt: true */
parseInt = (function (origParseInt) {
var hexRegex = /^[\-+]?0[xX]/;
return function parseInt(str, radix) {
var string = trim(str);
var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10);
return origParseInt(string, defaultedRadix);
};
}(parseInt));
}
// https://es5.github.io/#x15.1.2.3
if (1 / parseFloat('-0') !== -Infinity) {
/* global parseFloat: true */
parseFloat = (function (origParseFloat) {
return function parseFloat(string) {
var inputString = trim(string);
var result = origParseFloat(inputString);
return result === 0 && strSlice(inputString, 0, 1) === '-' ? -0 : result;
};
}(parseFloat));
}
if (String(new RangeError('test')) !== 'RangeError: test') {
var errorToStringShim = function toString() {
if (typeof this === 'undefined' || this === null) {
throw new TypeError("can't convert " + this + ' to object');
}
var name = this.name;
if (typeof name === 'undefined') {
name = 'Error';
} else if (typeof name !== 'string') {
name = $String(name);
}
var msg = this.message;
if (typeof msg === 'undefined') {
msg = '';
} else if (typeof msg !== 'string') {
msg = $String(msg);
}
if (!name) {
return msg;
}
if (!msg) {
return name;
}
return name + ': ' + msg;
};
// can't use defineProperties here because of toString enumeration issue in IE <= 8
Error.prototype.toString = errorToStringShim;
}
if (supportsDescriptors) {
var ensureNonEnumerable = function (obj, prop) {
if (isEnum(obj, prop)) {
var desc = Object.getOwnPropertyDescriptor(obj, prop);
desc.enumerable = false;
Object.defineProperty(obj, prop, desc);
}
};
ensureNonEnumerable(Error.prototype, 'message');
if (Error.prototype.message !== '') {
Error.prototype.message = '';
}
ensureNonEnumerable(Error.prototype, 'name');
}
if (String(/a/mig) !== '/a/gim') {
var regexToString = function toString() {
var str = '/' + this.source + '/';
if (this.global) {
str += 'g';
}
if (this.ignoreCase) {
str += 'i';
}
if (this.multiline) {
str += 'm';
}
return str;
};
// can't use defineProperties here because of toString enumeration issue in IE <= 8
RegExp.prototype.toString = regexToString;
}
}));
\ No newline at end of file
!function(t, e) {
"use strict";
"function" == typeof define && define.amd ? define(e) : "object" == typeof exports ? module.exports = e() : t.returnExports = e();
}(this, function() {
var t, e, r = Array, n = r.prototype, o = Object, i = o.prototype, a = Function, u = a.prototype, f = String, s = f.prototype, l = Number, c = l.prototype, h = n.slice, p = n.splice, y = n.push, d = n.unshift, g = n.concat, v = n.join, b = u.call, w = u.apply, T = Math.max, m = Math.min, D = i.toString, x = "function" == typeof Symbol && "symbol" == typeof Symbol.toStringTag, S = Function.prototype.toString, O = /^\s*class /, E = function(t) {
try {
var e = S.call(t), r = e.replace(/\/\/.*\n/g, ""), n = r.replace(/\/\*[.\s\S]*\*\//g, ""), o = n.replace(/\n/gm, " ").replace(/ {2}/g, " ");
return O.test(o);
} catch (t) {
return !1;
}
}, j = function(t) {
try {
return !E(t) && (S.call(t), !0);
} catch (t) {
return !1;
}
}, M = "[object Function]", I = "[object GeneratorFunction]", t = function(t) {
if (!t) return !1;
if ("function" != typeof t && "object" != typeof t) return !1;
if (x) return j(t);
if (E(t)) return !1;
var e = D.call(t);
return e === M || e === I;
}, U = RegExp.prototype.exec, F = function(t) {
try {
return U.call(t), !0;
} catch (t) {
return !1;
}
}, N = "[object RegExp]";
e = function(t) {
return "object" == typeof t && (x ? F(t) : D.call(t) === N);
};
var k, C = String.prototype.valueOf, R = function(t) {
try {
return C.call(t), !0;
} catch (t) {
return !1;
}
}, A = "[object String]";
k = function(t) {
return "string" == typeof t || "object" == typeof t && (x ? R(t) : D.call(t) === A);
};
var $ = o.defineProperty && function() {
try {
var t = {};
o.defineProperty(t, "x", {
enumerable: !1,
value: t
});
for (var e in t) return !1;
return t.x === t;
} catch (t) {
return !1;
}
}(), P = function(t) {
var e;
return e = $ ? function(t, e, r, n) {
!n && e in t || o.defineProperty(t, e, {
configurable: !0,
enumerable: !1,
writable: !0,
value: r
});
} : function(t, e, r, n) {
!n && e in t || (t[e] = r);
}, function(r, n, o) {
for (var i in n) t.call(n, i) && e(r, i, n[i], o);
};
}(i.hasOwnProperty), J = function(t) {
var e = typeof t;
return null === t || "object" !== e && "function" !== e;
}, Z = l.isNaN || function(t) {
return t !== t;
}, z = {
ToInteger: function(t) {
var e = +t;
return Z(e) ? e = 0 : 0 !== e && e !== 1 / 0 && e !== -(1 / 0) && (e = (e > 0 || -1) * Math.floor(Math.abs(e))),
e;
},
ToPrimitive: function(e) {
var r, n, o;
if (J(e)) return e;
if (n = e.valueOf, t(n) && (r = n.call(e), J(r))) return r;
if (o = e.toString, t(o) && (r = o.call(e), J(r))) return r;
throw new TypeError();
},
ToObject: function(t) {
if (null == t) throw new TypeError("can't convert " + t + " to object");
return o(t);
},
ToUint32: function(t) {
return t >>> 0;
}
}, G = function() {};
P(u, {
bind: function(e) {
var r = this;
if (!t(r)) throw new TypeError("Function.prototype.bind called on incompatible " + r);
for (var n, i = h.call(arguments, 1), u = function() {
if (this instanceof n) {
var t = w.call(r, this, g.call(i, h.call(arguments)));
return o(t) === t ? t : this;
}
return w.call(r, e, g.call(i, h.call(arguments)));
}, f = T(0, r.length - i.length), s = [], l = 0; l < f; l++) y.call(s, "$" + l);
return n = a("binder", "return function (" + v.call(s, ",") + "){ return binder.apply(this, arguments); }")(u),
r.prototype && (G.prototype = r.prototype, n.prototype = new G(), G.prototype = null),
n;
}
});
var Y = b.bind(i.hasOwnProperty), B = b.bind(i.toString), H = b.bind(h), W = w.bind(h), L = b.bind(s.slice), X = b.bind(s.split), q = b.bind(s.indexOf), K = b.bind(y), Q = b.bind(i.propertyIsEnumerable), V = b.bind(n.sort), _ = r.isArray || function(t) {
return "[object Array]" === B(t);
}, tt = 1 !== [].unshift(0);
P(n, {
unshift: function() {
return d.apply(this, arguments), this.length;
}
}, tt), P(r, {
isArray: _
});
var et = o("a"), rt = "a" !== et[0] || !(0 in et), nt = function(t) {
var e = !0, r = !0, n = !1;
if (t) try {
t.call("foo", function(t, r, n) {
"object" != typeof n && (e = !1);
}), t.call([ 1 ], function() {
"use strict";
r = "string" == typeof this;
}, "x");
} catch (t) {
n = !0;
}
return !!t && !n && e && r;
};
P(n, {
forEach: function(e) {
var r, n = z.ToObject(this), o = rt && k(this) ? X(this, "") : n, i = -1, a = z.ToUint32(o.length);
if (arguments.length > 1 && (r = arguments[1]), !t(e)) throw new TypeError("Array.prototype.forEach callback must be a function");
for (;++i < a; ) i in o && ("undefined" == typeof r ? e(o[i], i, n) : e.call(r, o[i], i, n));
}
}, !nt(n.forEach)), P(n, {
map: function(e) {
var n, o = z.ToObject(this), i = rt && k(this) ? X(this, "") : o, a = z.ToUint32(i.length), u = r(a);
if (arguments.length > 1 && (n = arguments[1]), !t(e)) throw new TypeError("Array.prototype.map callback must be a function");
for (var f = 0; f < a; f++) f in i && ("undefined" == typeof n ? u[f] = e(i[f], f, o) : u[f] = e.call(n, i[f], f, o));
return u;
}
}, !nt(n.map)), P(n, {
filter: function(e) {
var r, n, o = z.ToObject(this), i = rt && k(this) ? X(this, "") : o, a = z.ToUint32(i.length), u = [];
if (arguments.length > 1 && (n = arguments[1]), !t(e)) throw new TypeError("Array.prototype.filter callback must be a function");
for (var f = 0; f < a; f++) f in i && (r = i[f], ("undefined" == typeof n ? e(r, f, o) : e.call(n, r, f, o)) && K(u, r));
return u;
}
}, !nt(n.filter)), P(n, {
every: function(e) {
var r, n = z.ToObject(this), o = rt && k(this) ? X(this, "") : n, i = z.ToUint32(o.length);
if (arguments.length > 1 && (r = arguments[1]), !t(e)) throw new TypeError("Array.prototype.every callback must be a function");
for (var a = 0; a < i; a++) if (a in o && !("undefined" == typeof r ? e(o[a], a, n) : e.call(r, o[a], a, n))) return !1;
return !0;
}
}, !nt(n.every)), P(n, {
some: function(e) {
var r, n = z.ToObject(this), o = rt && k(this) ? X(this, "") : n, i = z.ToUint32(o.length);
if (arguments.length > 1 && (r = arguments[1]), !t(e)) throw new TypeError("Array.prototype.some callback must be a function");
for (var a = 0; a < i; a++) if (a in o && ("undefined" == typeof r ? e(o[a], a, n) : e.call(r, o[a], a, n))) return !0;
return !1;
}
}, !nt(n.some));
var ot = !1;
n.reduce && (ot = "object" == typeof n.reduce.call("es5", function(t, e, r, n) {
return n;
})), P(n, {
reduce: function(e) {
var r = z.ToObject(this), n = rt && k(this) ? X(this, "") : r, o = z.ToUint32(n.length);
if (!t(e)) throw new TypeError("Array.prototype.reduce callback must be a function");
if (0 === o && 1 === arguments.length) throw new TypeError("reduce of empty array with no initial value");
var i, a = 0;
if (arguments.length >= 2) i = arguments[1]; else for (;;) {
if (a in n) {
i = n[a++];
break;
}
if (++a >= o) throw new TypeError("reduce of empty array with no initial value");
}
for (;a < o; a++) a in n && (i = e(i, n[a], a, r));
return i;
}
}, !ot);
var it = !1;
n.reduceRight && (it = "object" == typeof n.reduceRight.call("es5", function(t, e, r, n) {
return n;
})), P(n, {
reduceRight: function(e) {
var r = z.ToObject(this), n = rt && k(this) ? X(this, "") : r, o = z.ToUint32(n.length);
if (!t(e)) throw new TypeError("Array.prototype.reduceRight callback must be a function");
if (0 === o && 1 === arguments.length) throw new TypeError("reduceRight of empty array with no initial value");
var i, a = o - 1;
if (arguments.length >= 2) i = arguments[1]; else for (;;) {
if (a in n) {
i = n[a--];
break;
}
if (--a < 0) throw new TypeError("reduceRight of empty array with no initial value");
}
if (a < 0) return i;
do a in n && (i = e(i, n[a], a, r)); while (a--);
return i;
}
}, !it);
var at = n.indexOf && [ 0, 1 ].indexOf(1, 2) !== -1;
P(n, {
indexOf: function(t) {
var e = rt && k(this) ? X(this, "") : z.ToObject(this), r = z.ToUint32(e.length);
if (0 === r) return -1;
var n = 0;
for (arguments.length > 1 && (n = z.ToInteger(arguments[1])), n = n >= 0 ? n : T(0, r + n); n < r; n++) if (n in e && e[n] === t) return n;
return -1;
}
}, at);
var ut = n.lastIndexOf && [ 0, 1 ].lastIndexOf(0, -3) !== -1;
P(n, {
lastIndexOf: function(t) {
var e = rt && k(this) ? X(this, "") : z.ToObject(this), r = z.ToUint32(e.length);
if (0 === r) return -1;
var n = r - 1;
for (arguments.length > 1 && (n = m(n, z.ToInteger(arguments[1]))), n = n >= 0 ? n : r - Math.abs(n); n >= 0; n--) if (n in e && t === e[n]) return n;
return -1;
}
}, ut);
var ft = function() {
var t = [ 1, 2 ], e = t.splice();
return 2 === t.length && _(e) && 0 === e.length;
}();
P(n, {
splice: function(t, e) {
return 0 === arguments.length ? [] : p.apply(this, arguments);
}
}, !ft);
var st = function() {
var t = {};
return n.splice.call(t, 0, 0, 1), 1 === t.length;
}();
P(n, {
splice: function(t, e) {
if (0 === arguments.length) return [];
var r = arguments;
return this.length = T(z.ToInteger(this.length), 0), arguments.length > 0 && "number" != typeof e && (r = H(arguments),
r.length < 2 ? K(r, this.length - t) : r[1] = z.ToInteger(e)), p.apply(this, r);
}
}, !st);
var lt = function() {
var t = new r(1e5);
return t[8] = "x", t.splice(1, 1), 7 === t.indexOf("x");
}(), ct = function() {
var t = 256, e = [];
return e[t] = "a", e.splice(t + 1, 0, "b"), "a" === e[t];
}();
P(n, {
splice: function(t, e) {
for (var r, n = z.ToObject(this), o = [], i = z.ToUint32(n.length), a = z.ToInteger(t), u = a < 0 ? T(i + a, 0) : m(a, i), s = m(T(z.ToInteger(e), 0), i - u), l = 0; l < s; ) r = f(u + l),
Y(n, r) && (o[l] = n[r]), l += 1;
var c, h = H(arguments, 2), p = h.length;
if (p < s) {
l = u;
for (var y = i - s; l < y; ) r = f(l + s), c = f(l + p), Y(n, r) ? n[c] = n[r] : delete n[c],
l += 1;
l = i;
for (var d = i - s + p; l > d; ) delete n[l - 1], l -= 1;
} else if (p > s) for (l = i - s; l > u; ) r = f(l + s - 1), c = f(l + p - 1), Y(n, r) ? n[c] = n[r] : delete n[c],
l -= 1;
l = u;
for (var g = 0; g < h.length; ++g) n[l] = h[g], l += 1;
return n.length = i - s + p, o;
}
}, !lt || !ct);
var ht, pt = n.join;
try {
ht = "1,2,3" !== Array.prototype.join.call("123", ",");
} catch (t) {
ht = !0;
}
ht && P(n, {
join: function(t) {
var e = "undefined" == typeof t ? "," : t;
return pt.call(k(this) ? X(this, "") : this, e);
}
}, ht);
var yt = "1,2" !== [ 1, 2 ].join(void 0);
yt && P(n, {
join: function(t) {
var e = "undefined" == typeof t ? "," : t;
return pt.call(this, e);
}
}, yt);
var dt = function(t) {
for (var e = z.ToObject(this), r = z.ToUint32(e.length), n = 0; n < arguments.length; ) e[r + n] = arguments[n],
n += 1;
return e.length = r + n, r + n;
}, gt = function() {
var t = {}, e = Array.prototype.push.call(t, void 0);
return 1 !== e || 1 !== t.length || "undefined" != typeof t[0] || !Y(t, 0);
}();
P(n, {
push: function(t) {
return _(this) ? y.apply(this, arguments) : dt.apply(this, arguments);
}
}, gt);
var vt = function() {
var t = [], e = t.push(void 0);
return 1 !== e || 1 !== t.length || "undefined" != typeof t[0] || !Y(t, 0);
}();
P(n, {
push: dt
}, vt), P(n, {
slice: function(t, e) {
var r = k(this) ? X(this, "") : this;
return W(r, arguments);
}
}, rt);
var bt = function() {
try {
return [ 1, 2 ].sort(null), [ 1, 2 ].sort({}), !0;
} catch (t) {}
return !1;
}(), wt = function() {
try {
return [ 1, 2 ].sort(/a/), !1;
} catch (t) {}
return !0;
}(), Tt = function() {
try {
return [ 1, 2 ].sort(void 0), !0;
} catch (t) {}
return !1;
}();
P(n, {
sort: function(e) {
if ("undefined" == typeof e) return V(this);
if (!t(e)) throw new TypeError("Array.prototype.sort callback must be a function");
return V(this, e);
}
}, bt || !Tt || !wt);
var mt = !{
toString: null
}.propertyIsEnumerable("toString"), Dt = function() {}.propertyIsEnumerable("prototype"), xt = !Y("x", "0"), St = function(t) {
var e = t.constructor;
return e && e.prototype === t;
}, Ot = {
$window: !0,
$console: !0,
$parent: !0,
$self: !0,
$frame: !0,
$frames: !0,
$frameElement: !0,
$webkitIndexedDB: !0,
$webkitStorageInfo: !0,
$external: !0
}, Et = function() {
if ("undefined" == typeof window) return !1;
for (var t in window) try {
!Ot["$" + t] && Y(window, t) && null !== window[t] && "object" == typeof window[t] && St(window[t]);
} catch (t) {
return !0;
}
return !1;
}(), jt = function(t) {
if ("undefined" == typeof window || !Et) return St(t);
try {
return St(t);
} catch (t) {
return !1;
}
}, Mt = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ], It = Mt.length, Ut = function(t) {
return "[object Arguments]" === B(t);
}, Ft = function(e) {
return null !== e && "object" == typeof e && "number" == typeof e.length && e.length >= 0 && !_(e) && t(e.callee);
}, Nt = Ut(arguments) ? Ut : Ft;
P(o, {
keys: function(e) {
var r = t(e), n = Nt(e), o = null !== e && "object" == typeof e, i = o && k(e);
if (!o && !r && !n) throw new TypeError("Object.keys called on a non-object");
var a = [], u = Dt && r;
if (i && xt || n) for (var s = 0; s < e.length; ++s) K(a, f(s));
if (!n) for (var l in e) u && "prototype" === l || !Y(e, l) || K(a, f(l));
if (mt) for (var c = jt(e), h = 0; h < It; h++) {
var p = Mt[h];
c && "constructor" === p || !Y(e, p) || K(a, p);
}
return a;
}
});
var kt = o.keys && function() {
return 2 === o.keys(arguments).length;
}(1, 2), Ct = o.keys && function() {
var t = o.keys(arguments);
return 1 !== arguments.length || 1 !== t.length || 1 !== t[0];
}(1), Rt = o.keys;
P(o, {
keys: function(t) {
return Rt(Nt(t) ? H(t) : t);
}
}, !kt || Ct);
var At, $t, Pt = 0 !== new Date((-0xc782b5b342b24)).getUTCMonth(), Jt = new Date((-0x55d318d56a724)), Zt = new Date(14496624e5), zt = "Mon, 01 Jan -45875 11:59:59 GMT" !== Jt.toUTCString(), Gt = Jt.getTimezoneOffset();
Gt < -720 ? (At = "Tue Jan 02 -45875" !== Jt.toDateString(), $t = !/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Zt.toString())) : (At = "Mon Jan 01 -45875" !== Jt.toDateString(),
$t = !/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Zt.toString()));
var Yt = b.bind(Date.prototype.getFullYear), Bt = b.bind(Date.prototype.getMonth), Ht = b.bind(Date.prototype.getDate), Wt = b.bind(Date.prototype.getUTCFullYear), Lt = b.bind(Date.prototype.getUTCMonth), Xt = b.bind(Date.prototype.getUTCDate), qt = b.bind(Date.prototype.getUTCDay), Kt = b.bind(Date.prototype.getUTCHours), Qt = b.bind(Date.prototype.getUTCMinutes), Vt = b.bind(Date.prototype.getUTCSeconds), _t = b.bind(Date.prototype.getUTCMilliseconds), te = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], ee = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], re = function(t, e) {
return Ht(new Date(e, t, 0));
};
P(Date.prototype, {
getFullYear: function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = Yt(this);
return t < 0 && Bt(this) > 11 ? t + 1 : t;
},
getMonth: function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = Yt(this), e = Bt(this);
return t < 0 && e > 11 ? 0 : e;
},
getDate: function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = Yt(this), e = Bt(this), r = Ht(this);
if (t < 0 && e > 11) {
if (12 === e) return r;
var n = re(0, t + 1);
return n - r + 1;
}
return r;
},
getUTCFullYear: function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = Wt(this);
return t < 0 && Lt(this) > 11 ? t + 1 : t;
},
getUTCMonth: function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = Wt(this), e = Lt(this);
return t < 0 && e > 11 ? 0 : e;
},
getUTCDate: function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = Wt(this), e = Lt(this), r = Xt(this);
if (t < 0 && e > 11) {
if (12 === e) return r;
var n = re(0, t + 1);
return n - r + 1;
}
return r;
}
}, Pt), P(Date.prototype, {
toUTCString: function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = qt(this), e = Xt(this), r = Lt(this), n = Wt(this), o = Kt(this), i = Qt(this), a = Vt(this);
return te[t] + ", " + (e < 10 ? "0" + e : e) + " " + ee[r] + " " + n + " " + (o < 10 ? "0" + o : o) + ":" + (i < 10 ? "0" + i : i) + ":" + (a < 10 ? "0" + a : a) + " GMT";
}
}, Pt || zt), P(Date.prototype, {
toDateString: function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = this.getDay(), e = this.getDate(), r = this.getMonth(), n = this.getFullYear();
return te[t] + " " + ee[r] + " " + (e < 10 ? "0" + e : e) + " " + n;
}
}, Pt || At), (Pt || $t) && (Date.prototype.toString = function() {
if (!(this && this instanceof Date)) throw new TypeError("this is not a Date object.");
var t = this.getDay(), e = this.getDate(), r = this.getMonth(), n = this.getFullYear(), o = this.getHours(), i = this.getMinutes(), a = this.getSeconds(), u = this.getTimezoneOffset(), f = Math.floor(Math.abs(u) / 60), s = Math.floor(Math.abs(u) % 60);
return te[t] + " " + ee[r] + " " + (e < 10 ? "0" + e : e) + " " + n + " " + (o < 10 ? "0" + o : o) + ":" + (i < 10 ? "0" + i : i) + ":" + (a < 10 ? "0" + a : a) + " GMT" + (u > 0 ? "-" : "+") + (f < 10 ? "0" + f : f) + (s < 10 ? "0" + s : s);
}, $ && o.defineProperty(Date.prototype, "toString", {
configurable: !0,
enumerable: !1,
writable: !0
}));
var ne = -621987552e5, oe = "-000001", ie = Date.prototype.toISOString && new Date(ne).toISOString().indexOf(oe) === -1, ae = Date.prototype.toISOString && "1969-12-31T23:59:59.999Z" !== new Date((-1)).toISOString(), ue = b.bind(Date.prototype.getTime);
P(Date.prototype, {
toISOString: function() {
if (!isFinite(this) || !isFinite(ue(this))) throw new RangeError("Date.prototype.toISOString called on non-finite value.");
var t = Wt(this), e = Lt(this);
t += Math.floor(e / 12), e = (e % 12 + 12) % 12;
var r = [ e + 1, Xt(this), Kt(this), Qt(this), Vt(this) ];
t = (t < 0 ? "-" : t > 9999 ? "+" : "") + L("00000" + Math.abs(t), 0 <= t && t <= 9999 ? -4 : -6);
for (var n = 0; n < r.length; ++n) r[n] = L("00" + r[n], -2);
return t + "-" + H(r, 0, 2).join("-") + "T" + H(r, 2).join(":") + "." + L("000" + _t(this), -3) + "Z";
}
}, ie || ae);
var fe = function() {
try {
return Date.prototype.toJSON && null === new Date(NaN).toJSON() && new Date(ne).toJSON().indexOf(oe) !== -1 && Date.prototype.toJSON.call({
toISOString: function() {
return !0;
}
});
} catch (t) {
return !1;
}
}();
fe || (Date.prototype.toJSON = function(e) {
var r = o(this), n = z.ToPrimitive(r);
if ("number" == typeof n && !isFinite(n)) return null;
var i = r.toISOString;
if (!t(i)) throw new TypeError("toISOString property is not callable");
return i.call(r);
});
var se = 1e15 === Date.parse("+033658-09-27T01:46:40.000Z"), le = !isNaN(Date.parse("2012-04-04T24:00:00.500Z")) || !isNaN(Date.parse("2012-11-31T23:59:59.000Z")) || !isNaN(Date.parse("2012-12-31T23:59:60.000Z")), ce = isNaN(Date.parse("2000-01-01T00:00:00.000Z"));
if (ce || le || !se) {
var he = Math.pow(2, 31) - 1, pe = Z(new Date(1970, 0, 1, 0, 0, 0, he + 1).getTime());
Date = function(t) {
var e = function(r, n, o, i, a, u, s) {
var l, c = arguments.length;
if (this instanceof t) {
var h = u, p = s;
if (pe && c >= 7 && s > he) {
var y = Math.floor(s / he) * he, d = Math.floor(y / 1e3);
h += d, p -= 1e3 * d;
}
l = 1 === c && f(r) === r ? new t(e.parse(r)) : c >= 7 ? new t(r, n, o, i, a, h, p) : c >= 6 ? new t(r, n, o, i, a, h) : c >= 5 ? new t(r, n, o, i, a) : c >= 4 ? new t(r, n, o, i) : c >= 3 ? new t(r, n, o) : c >= 2 ? new t(r, n) : c >= 1 ? new t(r instanceof t ? +r : r) : new t();
} else l = t.apply(this, arguments);
return J(l) || P(l, {
constructor: e
}, !0), l;
}, r = new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"), n = [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ], o = function(t, e) {
var r = e > 1 ? 1 : 0;
return n[e] + Math.floor((t - 1969 + r) / 4) - Math.floor((t - 1901 + r) / 100) + Math.floor((t - 1601 + r) / 400) + 365 * (t - 1970);
}, i = function(e) {
var r = 0, n = e;
if (pe && n > he) {
var o = Math.floor(n / he) * he, i = Math.floor(o / 1e3);
r += i, n -= 1e3 * i;
}
return l(new t(1970, 0, 1, 0, 0, r, n));
};
for (var a in t) Y(t, a) && (e[a] = t[a]);
P(e, {
now: t.now,
UTC: t.UTC
}, !0), e.prototype = t.prototype, P(e.prototype, {
constructor: e
}, !0);
var u = function(e) {
var n = r.exec(e);
if (n) {
var a, u = l(n[1]), f = l(n[2] || 1) - 1, s = l(n[3] || 1) - 1, c = l(n[4] || 0), h = l(n[5] || 0), p = l(n[6] || 0), y = Math.floor(1e3 * l(n[7] || 0)), d = Boolean(n[4] && !n[8]), g = "-" === n[9] ? 1 : -1, v = l(n[10] || 0), b = l(n[11] || 0), w = h > 0 || p > 0 || y > 0;
return c < (w ? 24 : 25) && h < 60 && p < 60 && y < 1e3 && f > -1 && f < 12 && v < 24 && b < 60 && s > -1 && s < o(u, f + 1) - o(u, f) && (a = 60 * (24 * (o(u, f) + s) + c + v * g),
a = 1e3 * (60 * (a + h + b * g) + p) + y, d && (a = i(a)), -864e13 <= a && a <= 864e13) ? a : NaN;
}
return t.parse.apply(this, arguments);
};
return P(e, {
parse: u
}), e;
}(Date);
}
Date.now || (Date.now = function() {
return new Date().getTime();
});
var ye = c.toFixed && ("0.000" !== 8e-5.toFixed(3) || "1" !== .9.toFixed(0) || "1.25" !== 1.255.toFixed(2) || "1000000000000000128" !== (0xde0b6b3a7640080).toFixed(0)), de = {
base: 1e7,
size: 6,
data: [ 0, 0, 0, 0, 0, 0 ],
multiply: function(t, e) {
for (var r = -1, n = e; ++r < de.size; ) n += t * de.data[r], de.data[r] = n % de.base,
n = Math.floor(n / de.base);
},
divide: function(t) {
for (var e = de.size, r = 0; --e >= 0; ) r += de.data[e], de.data[e] = Math.floor(r / t),
r = r % t * de.base;
},
numToString: function() {
for (var t = de.size, e = ""; --t >= 0; ) if ("" !== e || 0 === t || 0 !== de.data[t]) {
var r = f(de.data[t]);
"" === e ? e = r : e += L("0000000", 0, 7 - r.length) + r;
}
return e;
},
pow: function t(e, r, n) {
return 0 === r ? n : r % 2 === 1 ? t(e, r - 1, n * e) : t(e * e, r / 2, n);
},
log: function(t) {
for (var e = 0, r = t; r >= 4096; ) e += 12, r /= 4096;
for (;r >= 2; ) e += 1, r /= 2;
return e;
}
}, ge = function(t) {
var e, r, n, o, i, a, u, s;
if (e = l(t), e = Z(e) ? 0 : Math.floor(e), e < 0 || e > 20) throw new RangeError("Number.toFixed called with invalid number of decimals");
if (r = l(this), Z(r)) return "NaN";
if (r <= -1e21 || r >= 1e21) return f(r);
if (n = "", r < 0 && (n = "-", r = -r), o = "0", r > 1e-21) if (i = de.log(r * de.pow(2, 69, 1)) - 69,
a = i < 0 ? r * de.pow(2, -i, 1) : r / de.pow(2, i, 1), a *= 4503599627370496, i = 52 - i,
i > 0) {
for (de.multiply(0, a), u = e; u >= 7; ) de.multiply(1e7, 0), u -= 7;
for (de.multiply(de.pow(10, u, 1), 0), u = i - 1; u >= 23; ) de.divide(1 << 23),
u -= 23;
de.divide(1 << u), de.multiply(1, 1), de.divide(2), o = de.numToString();
} else de.multiply(0, a), de.multiply(1 << -i, 0), o = de.numToString() + L("0.00000000000000000000", 2, 2 + e);
return e > 0 ? (s = o.length, o = s <= e ? n + L("0.0000000000000000000", 0, e - s + 2) + o : n + L(o, 0, s - e) + "." + L(o, s - e)) : o = n + o,
o;
};
P(c, {
toFixed: ge
}, ye);
var ve = function() {
try {
return "1" === 1..toPrecision(void 0);
} catch (t) {
return !0;
}
}(), be = c.toPrecision;
P(c, {
toPrecision: function(t) {
return "undefined" == typeof t ? be.call(this) : be.call(this, t);
}
}, ve), 2 !== "ab".split(/(?:ab)*/).length || 4 !== ".".split(/(.?)(.?)/).length || "t" === "tesst".split(/(s)*/)[1] || 4 !== "test".split(/(?:)/, -1).length || "".split(/.?/).length || ".".split(/()()/).length > 1 ? !function() {
var t = "undefined" == typeof /()??/.exec("")[1], r = Math.pow(2, 32) - 1;
s.split = function(n, o) {
var i = String(this);
if ("undefined" == typeof n && 0 === o) return [];
if (!e(n)) return X(this, n, o);
var a, u, f, s, l = [], c = (n.ignoreCase ? "i" : "") + (n.multiline ? "m" : "") + (n.unicode ? "u" : "") + (n.sticky ? "y" : ""), h = 0, p = new RegExp(n.source, c + "g");
t || (a = new RegExp("^" + p.source + "$(?!\\s)", c));
var d = "undefined" == typeof o ? r : z.ToUint32(o);
for (u = p.exec(i); u && (f = u.index + u[0].length, !(f > h && (K(l, L(i, h, u.index)),
!t && u.length > 1 && u[0].replace(a, function() {
for (var t = 1; t < arguments.length - 2; t++) "undefined" == typeof arguments[t] && (u[t] = void 0);
}), u.length > 1 && u.index < i.length && y.apply(l, H(u, 1)), s = u[0].length,
h = f, l.length >= d))); ) p.lastIndex === u.index && p.lastIndex++, u = p.exec(i);
return h === i.length ? !s && p.test("") || K(l, "") : K(l, L(i, h)), l.length > d ? H(l, 0, d) : l;
};
}() : "0".split(void 0, 0).length && (s.split = function(t, e) {
return "undefined" == typeof t && 0 === e ? [] : X(this, t, e);
});
var we = s.replace, Te = function() {
var t = [];
return "x".replace(/x(.)?/g, function(e, r) {
K(t, r);
}), 1 === t.length && "undefined" == typeof t[0];
}();
Te || (s.replace = function(r, n) {
var o = t(n), i = e(r) && /\)[*?]/.test(r.source);
if (o && i) {
var a = function(t) {
var e = arguments.length, o = r.lastIndex;
r.lastIndex = 0;
var i = r.exec(t) || [];
return r.lastIndex = o, K(i, arguments[e - 2], arguments[e - 1]), n.apply(this, i);
};
return we.call(this, r, a);
}
return we.call(this, r, n);
});
var me = s.substr, De = "".substr && "b" !== "0b".substr(-1);
P(s, {
substr: function(t, e) {
var r = t;
return t < 0 && (r = T(this.length + t, 0)), me.call(this, r, e);
}
}, De);
var xe = "\t\n\v\f\r   ᠎              \u2028\u2029\ufeff", Se = "​", Oe = "[" + xe + "]", Ee = new RegExp("^" + Oe + Oe + "*"), je = new RegExp(Oe + Oe + "*$"), Me = s.trim && (xe.trim() || !Se.trim());
P(s, {
trim: function() {
if ("undefined" == typeof this || null === this) throw new TypeError("can't convert " + this + " to object");
return f(this).replace(Ee, "").replace(je, "");
}
}, Me);
var Ie = b.bind(String.prototype.trim), Ue = s.lastIndexOf && "abcあい".lastIndexOf("あい", 2) !== -1;
P(s, {
lastIndexOf: function(t) {
if ("undefined" == typeof this || null === this) throw new TypeError("can't convert " + this + " to object");
for (var e = f(this), r = f(t), n = arguments.length > 1 ? l(arguments[1]) : NaN, o = Z(n) ? 1 / 0 : z.ToInteger(n), i = m(T(o, 0), e.length), a = r.length, u = i + a; u > 0; ) {
u = T(0, u - a);
var s = q(L(e, u, i + a), r);
if (s !== -1) return u + s;
}
return -1;
}
}, Ue);
var Fe = s.lastIndexOf;
if (P(s, {
lastIndexOf: function(t) {
return Fe.apply(this, arguments);
}
}, 1 !== s.lastIndexOf.length), 8 === parseInt(xe + "08") && 22 === parseInt(xe + "0x16") || (parseInt = function(t) {
var e = /^[\-+]?0[xX]/;
return function(r, n) {
var o = Ie(r), i = l(n) || (e.test(o) ? 16 : 10);
return t(o, i);
};
}(parseInt)), 1 / parseFloat("-0") !== -(1 / 0) && (parseFloat = function(t) {
return function(e) {
var r = Ie(e), n = t(r);
return 0 === n && "-" === L(r, 0, 1) ? -0 : n;
};
}(parseFloat)), "RangeError: test" !== String(new RangeError("test"))) {
var Ne = function() {
if ("undefined" == typeof this || null === this) throw new TypeError("can't convert " + this + " to object");
var t = this.name;
"undefined" == typeof t ? t = "Error" : "string" != typeof t && (t = f(t));
var e = this.message;
return "undefined" == typeof e ? e = "" : "string" != typeof e && (e = f(e)), t ? e ? t + ": " + e : t : e;
};
Error.prototype.toString = Ne;
}
if ($) {
var ke = function(t, e) {
if (Q(t, e)) {
var r = Object.getOwnPropertyDescriptor(t, e);
r.enumerable = !1, Object.defineProperty(t, e, r);
}
};
ke(Error.prototype, "message"), "" !== Error.prototype.message && (Error.prototype.message = ""),
ke(Error.prototype, "name");
}
if ("/a/gim" !== String(/a/gim)) {
var Ce = function() {
var t = "/" + this.source + "/";
return this.global && (t += "g"), this.ignoreCase && (t += "i"), this.multiline && (t += "m"),
t;
};
RegExp.prototype.toString = Ce;
}
});
\ No newline at end of file
/**
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
;(function(window, document) {
/*jshint evil:true */
/** version */
var version = '3.7.3';
/** Preset options */
var options = window.html5 || {};
/** Used to skip problem elements */
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
/** Name of the expando, to work with multiple documents or to re-shiv one document */
var expando = '_html5shiv';
/** The id for the the documents expando */
var expanID = 0;
/** Cached data for each document */
var expandoData = {};
/** Detect whether the browser supports unknown elements */
var supportsUnknownElements;
(function() {
try {
var a = document.createElement('a');
a.innerHTML = '<xyz></xyz>';
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
supportsHtml5Styles = ('hidden' in a);
supportsUnknownElements = a.childNodes.length == 1 || (function() {
// assign a false positive if unable to shiv
(document.createElement)('a');
var frag = document.createDocumentFragment();
return (
typeof frag.cloneNode == 'undefined' ||
typeof frag.createDocumentFragment == 'undefined' ||
typeof frag.createElement == 'undefined'
);
}());
} catch(e) {
// assign a false positive if detection fails => unable to shiv
supportsHtml5Styles = true;
supportsUnknownElements = true;
}
}());
/*--------------------------------------------------------------------------*/
/**
* Creates a style sheet with the given CSS text and adds it to the document.
* @private
* @param {Document} ownerDocument The document.
* @param {String} cssText The CSS text.
* @returns {StyleSheet} The style element.
*/
function addStyleSheet(ownerDocument, cssText) {
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
/**
* Returns the value of `html5.elements` as an array.
* @private
* @returns {Array} An array of shived element node names.
*/
function getElements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements;
}
/**
* Extends the built-in list of html5 elements
* @memberOf html5
* @param {String|Array} newElements whitespace separated list or array of new element names to shiv
* @param {Document} ownerDocument The context document.
*/
function addElements(newElements, ownerDocument) {
var elements = html5.elements;
if(typeof elements != 'string'){
elements = elements.join(' ');
}
if(typeof newElements != 'string'){
newElements = newElements.join(' ');
}
html5.elements = elements +' '+ newElements;
shivDocument(ownerDocument);
}
/**
* Returns the data associated to the given document
* @private
* @param {Document} ownerDocument The document.
* @returns {Object} An object of data.
*/
function getExpandoData(ownerDocument) {
var data = expandoData[ownerDocument[expando]];
if (!data) {
data = {};
expanID++;
ownerDocument[expando] = expanID;
expandoData[expanID] = data;
}
return data;
}
/**
* returns a shived element for the given nodeName and document
* @memberOf html5
* @param {String} nodeName name of the element
* @param {Document|DocumentFragment} ownerDocument The context document.
* @returns {Object} The shived element.
*/
function createElement(nodeName, ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if (!data) {
data = getExpandoData(ownerDocument);
}
var node;
if (data.cache[nodeName]) {
node = data.cache[nodeName].cloneNode();
} else if (saveClones.test(nodeName)) {
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
} else {
node = data.createElem(nodeName);
}
// Avoid adding some elements to fragments in IE < 9 because
// * Attributes like `name` or `type` cannot be set/changed once an element
// is inserted into a document/fragment
// * Link elements with `src` attributes that are inaccessible, as with
// a 403 response, will cause the tab/window to crash
// * Script elements appended to fragments will execute when their `src`
// or `text` property is set
return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
}
/**
* returns a shived DocumentFragment for the given document
* @memberOf html5
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived DocumentFragment.
*/
function createDocumentFragment(ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data = data || getExpandoData(ownerDocument);
var clone = data.frag.cloneNode(),
i = 0,
elems = getElements(),
l = elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment,
//extends list of elements
addElements: addElements
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
if(typeof module == 'object' && module.exports){
module.exports = html5;
}
}(typeof window !== "undefined" ? window : this, document));
\ No newline at end of file
!function(e, t) {
function n(e, t) {
var n = e.createElement("p"), r = e.getElementsByTagName("head")[0] || e.documentElement;
return n.innerHTML = "x<style>" + t + "</style>", r.insertBefore(n.lastChild, r.firstChild);
}
function r() {
var e = E.elements;
return "string" == typeof e ? e.split(" ") : e;
}
function a(e, t) {
var n = E.elements;
"string" != typeof n && (n = n.join(" ")), "string" != typeof e && (e = e.join(" ")),
E.elements = n + " " + e, m(t);
}
function o(e) {
var t = y[e[g]];
return t || (t = {}, v++, e[g] = v, y[v] = t), t;
}
function c(e, n, r) {
if (n || (n = t), s) return n.createElement(e);
r || (r = o(n));
var a;
return a = r.cache[e] ? r.cache[e].cloneNode() : p.test(e) ? (r.cache[e] = r.createElem(e)).cloneNode() : r.createElem(e),
!a.canHaveChildren || h.test(e) || a.tagUrn ? a : r.frag.appendChild(a);
}
function i(e, n) {
if (e || (e = t), s) return e.createDocumentFragment();
n = n || o(e);
for (var a = n.frag.cloneNode(), c = 0, i = r(), l = i.length; c < l; c++) a.createElement(i[c]);
return a;
}
function l(e, t) {
t.cache || (t.cache = {}, t.createElem = e.createElement, t.createFrag = e.createDocumentFragment,
t.frag = t.createFrag()), e.createElement = function(n) {
return E.shivMethods ? c(n, e, t) : t.createElem(n);
}, e.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + r().join().replace(/[\w\-:]+/g, function(e) {
return t.createElem(e), t.frag.createElement(e), 'c("' + e + '")';
}) + ");return n}")(E, t.frag);
}
function m(e) {
e || (e = t);
var r = o(e);
return !E.shivCSS || u || r.hasCSS || (r.hasCSS = !!n(e, "article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),
s || l(e, r), e;
}
var u, s, d = "3.7.3", f = e.html5 || {}, h = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, p = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i, g = "_html5shiv", v = 0, y = {};
!function() {
try {
var e = t.createElement("a");
e.innerHTML = "<xyz></xyz>", u = "hidden" in e, s = 1 == e.childNodes.length || function() {
t.createElement("a");
var e = t.createDocumentFragment();
return "undefined" == typeof e.cloneNode || "undefined" == typeof e.createDocumentFragment || "undefined" == typeof e.createElement;
}();
} catch (e) {
u = !0, s = !0;
}
}();
var E = {
elements: f.elements || "abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",
version: d,
shivCSS: f.shivCSS !== !1,
supportsUnknownElements: s,
shivMethods: f.shivMethods !== !1,
type: "default",
shivDocument: m,
createElement: c,
createDocumentFragment: i,
addElements: a
};
e.html5 = E, m(t), "object" == typeof module && module.exports && (module.exports = E);
}("undefined" != typeof window ? window : this, document);
\ No newline at end of file
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return new Function("return "+t)();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff ")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),
r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){
return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);
\ No newline at end of file
/**
* Created by liaili on 16/8/1.
*/
(function(){var $form=$("#form");var $userName=$('input[name="userName"]',$form);var $userTel=$('input[name="userTel"]',$form);var $errorName=$(".appointment .errorName");var $errorTel=$(".appointment .errorTel");var $modalBox=$(".modal-box");var balance=$(".balance").html();var total=$(".total").html();var progress=$(".progress-bar i");progress.width(progress.data("width"));function valiUserName(userName){$errorName.html(userName?"":"请输入您的姓名!");return!userName}function filterNotNumber(mobile){if(/[^\d]/g.test(mobile)){$userTel.val(mobile.replace(/[^\d]/g,""));return false}return true}function valiMobile(mobile){if(/^[\d]{11}$/g.test(mobile)){$errorTel.html("");return false}$errorTel.html("手机号有误,请重新输入!");return true}$userName.on("keyup",function(){valiUserName($.trim($userName.val()+""))});$userTel.on("keyup",function(){var mobile=$userTel.val();filterNotNumber(mobile);valiMobile(mobile)});$form.on("submit",function(e){e.preventDefault();if(valiUserName($.trim($userName.val()+""))){$userName.focus();return}if(valiMobile($.trim($userTel.val()+""))){$userTel.focus();return}request();$modalBox.fadeIn(300)});$("#modalBoxHidden").click(function(e){e.preventDefault();$modalBox.fadeOut(300)})})();
\ No newline at end of file
!function() {
function t(t) {
return u.html(t ? "" : "请输入您的姓名!"), !t;
}
function n(t) {
return !/[^\d]/g.test(t) || (a.val(t.replace(/[^\d]/g, "")), !1);
}
function e(t) {
return /^[\d]{11}$/g.test(t) ? (i.html(""), !1) : (i.html("手机号有误,请重新输入!"), !0);
}
var r = $("#form"), o = $('input[name="userName"]', r), a = $('input[name="userTel"]', r), u = $(".appointment .errorName"), i = $(".appointment .errorTel"), l = $(".modal-box"), m = ($(".balance").html(),
$(".total").html(), $(".progress-bar i"));
m.width(m.data("width")), o.on("keyup", function() {
t($.trim(o.val() + ""));
}), a.on("keyup", function() {
var t = a.val();
n(t), e(t);
}), r.on("submit", function(n) {
return n.preventDefault(), t($.trim(o.val() + "")) ? void o.focus() : e($.trim(a.val() + "")) ? void a.focus() : (request(),
void l.fadeIn(300));
}), $("#modalBoxHidden").click(function(t) {
t.preventDefault(), l.fadeOut(300);
});
}();
\ No newline at end of file
{"version":3,"sources":["products.jsx"],"names":[],"mappings":"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","file":"products.js","sourcesContent":["// import \"babel-polyfill\";\n\nfunction fetch(query, panel) {\n const data = {...query, p: (parseInt(query.p, 10) || 1) - 1};\n\n request('/api/1.0/prod/hList.json', data).then(({hasNext, items})=> {\n if (items && items.length) {\n let html = items.map(item=> {\n return `<li data-id=\"${item.id}\" class=\"product-item status-${item.status}\">\n <i class=\"seal\">${\n (item.status == 11 && (item.fundRaisedTarget - item.fundRaisedOver > 0)) ?\n '<span>' + formatMoney(item.fundRaisedTarget - item.fundRaisedOver) + '</span>' : ''\n }</i>\n <div class=\"clear\">\n <div>\n <h2>${item.itemShortTitle}</h2>\n <h3>${formatMoney(item.fundRaisedTarget)}</h3>\n <div class=\"clear\">\n <span>\n <p>${item.commissionMaxDur}</p>\n </span>\n <span>\n <p>${formatMoney(item.minimumAmount)}</p>\n </span>\n <span>\n <p>${item.duration}</p>\n </span>\n </div>\n </div>\n <div>\n <div>\n <h4>项目亮点</h4>\n <p>${item.summary}</p>\n </div>\n </div>\n </div>\n <i class=\"corner\"></i>\n </li>`;\n }).join('');\n $('.products', panel).html(html);\n const pagination = [];\n if (hasNext) {\n pagination.push(`<a data-cate-id=\"${data.cateId}\" data-p=\"${data.p + 2}\" data-s=\"${data.s}\" href=\"javascript:void('下一页');\">下一页</a>`);\n }\n\n if (data.p >= 1) {\n pagination.unshift(`<a data-cate-id=\"${data.cateId}\" data-p=\"${data.p}\" data-s=\"${data.s}\" href=\"javascript:void('上一页');\">上一页</a>`);\n }\n $('.pagination', panel).html(pagination.join(''));\n history.replaceState && history.replaceState(null, null, location.pathname + '?' + serialize(query));\n }\n }).catch(err=> {\n console.log(err);\n });\n}\n\nfunction fetchCates(query) {\n request('/api/1.0/cate/cates.json').then(({pCates})=> {\n const cates = [];\n pCates.unshift({\n name: '全部',\n id: 'all'\n });\n pCates.forEach(cate=> {\n !cate.selfPick && cates.push(cate.name);\n });\n const tabs = new Tabs({\n container: '.tabs',\n headers: cates,\n initializePanel: function (index, header, panel) {\n let cate = pCates[index];\n let fetchQuery = cate.id == query.cateId ? query : {cateId: cate.id, p: 1, s: query.s || 10};\n panel.html('<ul class=\"products\"><li class=\"loading\">正在努力加载中...</li></ul><ul class=\"pagination\"></ul>');\n fetch(fetchQuery, panel);\n }\n });\n tabs.initialize();\n tabs.element.on('click', '.pagination a', function (e) {\n e.preventDefault();\n const data = $(this).data();\n fetch(data, tabs.findPanel(tabs.activeIndex));\n $(this).text('加载中...')\n }).on('click', '.product-item', function (e) {\n e.preventDefault();\n const id = $(this).data('id');\n location.href = location.pathname + '/' + id;\n })\n });\n}\n\nfetchCates(deserialize());\n\n\n\n\n\n\n\n\n\n\n\n\n\n"]}
\ No newline at end of file
{"version":3,"sources":["products.jsx"],"names":[],"mappings":"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","file":"products.js","sourcesContent":["// import \"babel-polyfill\";\n\nfunction fetch(query, panel) {\n const data = {...query, p: (parseInt(query.p, 10) || 1) - 1};\n\n request('/api/1.0/prod/hList.json', data).then(({hasNext, items})=> {\n if (items && items.length) {\n let html = items.map(item=> {\n return `<li data-id=\"${item.id}\" class=\"product-item status-${item.status}\">\n <i class=\"seal\">${\n (item.status == 11 && (item.fundRaisedTarget - item.fundRaisedOver > 0)) ?\n '<span>' + formatMoney(item.fundRaisedTarget - item.fundRaisedOver) + '</span>' : ''\n }</i>\n <div class=\"clear\">\n <div>\n <h2>${item.itemShortTitle}</h2>\n <h3>${formatMoney(item.fundRaisedTarget)}</h3>\n <div class=\"clear\">\n <span>\n <p>${item.commissionMaxDur}</p>\n </span>\n <span>\n <p>${formatMoney(item.minimumAmount)}</p>\n </span>\n <span>\n <p>${item.duration}</p>\n </span>\n </div>\n </div>\n <div>\n <div>\n <h4>项目亮点</h4>\n <p>${item.summary}</p>\n </div>\n </div>\n </div>\n <i class=\"corner\"></i>\n </li>`;\n }).join('');\n $('.products', panel).html(html);\n const pagination = [];\n if (hasNext) {\n pagination.push(`<a data-cate-id=\"${data.cateId}\" data-p=\"${data.p + 2}\" data-s=\"${data.s}\" href=\"javascript:void('下一页');\">下一页</a>`);\n }\n\n if (data.p >= 1) {\n pagination.unshift(`<a data-cate-id=\"${data.cateId}\" data-p=\"${data.p}\" data-s=\"${data.s}\" href=\"javascript:void('上一页');\">上一页</a>`);\n }\n $('.pagination', panel).html(pagination.join(''));\n history.replaceState && history.replaceState(null, null, location.pathname + '?' + serialize(query));\n }\n }).catch(err=> {\n console.log(err);\n });\n}\n\nfunction fetchCates(query) {\n request('/api/1.0/cate/cates.json').then(({pCates})=> {\n const cates = [];\n pCates.unshift({\n name: '全部',\n id: 'all'\n });\n pCates.forEach(cate=> {\n !cate.selfPick && cates.push(cate.name);\n });\n const tabs = new Tabs({\n container: '.tabs',\n headers: cates,\n initializePanel: function (index, header, panel) {\n let cate = pCates[index];\n let fetchQuery = cate.id == query.cateId ? query : {cateId: cate.id, p: 1, s: query.s || 10};\n panel.html('<ul class=\"products\"><li class=\"loading\">正在努力加载中...</li></ul><ul class=\"pagination\"></ul>');\n fetch(fetchQuery, panel);\n }\n });\n tabs.initialize();\n tabs.element.on('click', '.pagination a', function (e) {\n e.preventDefault();\n const data = $(this).data();\n fetch(data, tabs.findPanel(tabs.activeIndex));\n $(this).text('加载中...')\n }).on('click', '.product-item', function (e) {\n e.preventDefault();\n const id = $(this).data('id');\n location.href = location.pathname + '/' + id;\n })\n });\n}\n\nfetchCates(deserialize());\n"]}
\ No newline at end of file
......@@ -89,16 +89,3 @@ function fetchCates(query) {
}
fetchCates(deserialize());
"use strict";var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};function fetch(query,panel){var data=_extends({},query,{p:(parseInt(query.p,10)||1)-1});request("/api/1.0/prod/hList.json",data).then(function(_ref){var hasNext=_ref.hasNext;var items=_ref.items;if(items&&items.length){var html=items.map(function(item){return'<li data-id="'+item.id+'" class="product-item status-'+item.status+'">\n <i class="seal">'+(item.status==11&&item.fundRaisedTarget-item.fundRaisedOver>0?"<span>"+formatMoney(item.fundRaisedTarget-item.fundRaisedOver)+"</span>":"")+'</i>\n <div class="clear">\n <div>\n <h2>'+item.itemShortTitle+"</h2>\n <h3>"+formatMoney(item.fundRaisedTarget)+'</h3>\n <div class="clear">\n <span>\n <p>'+item.commissionMaxDur+"</p>\n </span>\n <span>\n <p>"+formatMoney(item.minimumAmount)+"</p>\n </span>\n <span>\n <p>"+item.duration+"</p>\n </span>\n </div>\n </div>\n <div>\n <div>\n <h4>项目亮点</h4>\n <p>"+item.summary+'</p>\n </div>\n </div>\n </div>\n <i class="corner"></i>\n </li>'}).join("");$(".products",panel).html(html);var pagination=[];if(hasNext){pagination.push('<a data-cate-id="'+data.cateId+'" data-p="'+(data.p+2)+'" data-s="'+data.s+'" href="javascript:void(\'下一页\');">下一页</a>')}if(data.p>=1){pagination.unshift('<a data-cate-id="'+data.cateId+'" data-p="'+data.p+'" data-s="'+data.s+'" href="javascript:void(\'上一页\');">上一页</a>')}$(".pagination",panel).html(pagination.join(""));history.replaceState&&history.replaceState(null,null,location.pathname+"?"+serialize(query))}}).catch(function(err){console.log(err)})}function fetchCates(query){request("/api/1.0/cate/cates.json").then(function(_ref2){var pCates=_ref2.pCates;var cates=[];pCates.unshift({name:"全部",id:"all"});pCates.forEach(function(cate){!cate.selfPick&&cates.push(cate.name)});var tabs=new Tabs({container:".tabs",headers:cates,initializePanel:function initializePanel(index,header,panel){var cate=pCates[index];var fetchQuery=cate.id==query.cateId?query:{cateId:cate.id,p:1,s:query.s||10};panel.html('<ul class="products"><li class="loading">正在努力加载中...</li></ul><ul class="pagination"></ul>');fetch(fetchQuery,panel)}});tabs.initialize();tabs.element.on("click",".pagination a",function(e){e.preventDefault();var data=$(this).data();fetch(data,tabs.findPanel(tabs.activeIndex));$(this).text("加载中...")}).on("click",".product-item",function(e){e.preventDefault();var id=$(this).data("id");location.href=location.pathname+"/"+id})})}fetchCates(deserialize());
\ No newline at end of file
"use strict";
function fetch(a, n) {
var t = _extends({}, a, {
p: (parseInt(a.p, 10) || 1) - 1
});
request("/api/1.0/prod/hList.json", t).then(function(i) {
var e = i.hasNext, s = i.items;
if (s && s.length) {
var r = s.map(function(a) {
return '<li data-id="' + a.id + '" class="product-item status-' + a.status + '">\n <i class="seal">' + (11 == a.status && a.fundRaisedTarget - a.fundRaisedOver > 0 ? "<span>" + formatMoney(a.fundRaisedTarget - a.fundRaisedOver) + "</span>" : "") + '</i>\n <div class="clear">\n <div>\n <h2>' + a.itemShortTitle + "</h2>\n <h3>" + formatMoney(a.fundRaisedTarget) + '</h3>\n <div class="clear">\n <span>\n <p>' + a.commissionMaxDur + "</p>\n </span>\n <span>\n <p>" + formatMoney(a.minimumAmount) + "</p>\n </span>\n <span>\n <p>" + a.duration + "</p>\n </span>\n </div>\n </div>\n <div>\n <div>\n <h4>项目亮点</h4>\n <p>" + a.summary + '</p>\n </div>\n </div>\n </div>\n <i class="corner"></i>\n </li>';
}).join("");
$(".products", n).html(r);
var c = [];
e && c.push('<a data-cate-id="' + t.cateId + '" data-p="' + (t.p + 2) + '" data-s="' + t.s + '" href="javascript:void(\'下一页\');">下一页</a>'),
t.p >= 1 && c.unshift('<a data-cate-id="' + t.cateId + '" data-p="' + t.p + '" data-s="' + t.s + '" href="javascript:void(\'上一页\');">上一页</a>'),
$(".pagination", n).html(c.join("")), history.replaceState && history.replaceState(null, null, location.pathname + "?" + serialize(a));
}
}).catch(function(a) {
console.log(a);
});
}
function fetchCates(a) {
request("/api/1.0/cate/cates.json").then(function(n) {
var t = n.pCates, i = [];
t.unshift({
name: "全部",
id: "all"
}), t.forEach(function(a) {
!a.selfPick && i.push(a.name);
});
var e = new Tabs({
container: ".tabs",
headers: i,
initializePanel: function(n, i, e) {
var s = t[n], r = s.id == a.cateId ? a : {
cateId: s.id,
p: 1,
s: a.s || 10
};
e.html('<ul class="products"><li class="loading">正在努力加载中...</li></ul><ul class="pagination"></ul>'),
fetch(r, e);
}
});
e.initialize(), e.element.on("click", ".pagination a", function(a) {
a.preventDefault();
var n = $(this).data();
fetch(n, e.findPanel(e.activeIndex)), $(this).text("加载中...");
}).on("click", ".product-item", function(a) {
a.preventDefault();
var n = $(this).data("id");
location.href = location.pathname + "/" + n;
});
});
}
var _extends = Object.assign || function(a) {
for (var n = 1; n < arguments.length; n++) {
var t = arguments[n];
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (a[i] = t[i]);
}
return a;
};
fetchCates(deserialize());
\ No newline at end of file
......@@ -148,43 +148,4 @@
});
})();
// (function () {
//
//
//
//
//
// var $modalBoxProject = $('.modal-box-project');
// var $modalBoxSuccess = $('.modal-box-success');
//
//
//
//
// /**
// * 地图项目地址弹框
// */
// $('.hot-project-address a').click(function (e) {
// e.preventDefault();
// $modalBox.fadeIn(300);
// });
// $('#modalBoxHidden').click(function (e) {
// e.preventDefault();
// $modalBox.fadeOut(300);
// });
//
// /**
// * 项目提交弹框
// */
// $submit.on('click',function(e){
// e.preventDefault();
// $modalBoxSuccess.fadeIn(300);
// });
// $('.modal-box-success a').on('click',function(e){
// e.preventDefault();
// $modalBoxSuccess.fadeOut(300);
// });
//
//
// })();
//# sourceMappingURL=project.js.map
\ No newline at end of file
{"version":3,"sources":["project.jsx"],"names":[],"mappings":";;AAAA;;;AAGA,CAAC,YAAK;AACF,QAAM,QAAQ,EAAE,wBAAF,CAAd;AACA,QAAM,UAAU,EAAE,sBAAF,EAA0B,KAA1B,CAAhB;AACA,QAAM,oBAAoB,EAAE,mBAAF,EAAuB,KAAvB,CAA1B;AACA,QAAM,sBAAsB,EAAE,qBAAF,EAAyB,KAAzB,CAA5B;AACA,QAAM,cAAc,EAAE,cAAF,EAAkB,KAAlB,CAApB;AACA,QAAM,oBAAoB,EAAE,oBAAF,EAAwB,KAAxB,CAA1B;AACA,QAAM,iBAAiB,EAAE,oBAAF,CAAvB;;AAEA,QAAM,oBAAoB,SAApB,iBAAoB,CAAC,OAAD,EAAY;AAClC,gBAAQ,GAAR,CAAY,CAAC,QAAQ,GAAR,KAAgB,EAAjB,EAAqB,OAArB,CAA6B,QAA7B,EAAuC,EAAvC,CAAZ;AACH,KAFD;;AAIA,QAAM,iBAAiB,SAAjB,cAAiB,GAAK;AACxB,YAAI,SAAS,EAAE,IAAF,CAAO,kBAAkB,GAAlB,KAA0B,EAAjC,CAAb;AACA,YAAI,cAAc,IAAd,CAAmB,MAAnB,CAAJ,EAAgC;AAC5B,wBAAY,KAAZ;AACA,mBAAO,MAAP;AACH,SAHD,MAGO;AACH,wBAAY,IAAZ,CAAiB,UAAjB;AACA,mBAAO,KAAP;AACH;AACJ,KATD;;AAWA,QAAM,sBAAsB,SAAtB,mBAAsB,GAAK;AAC7B,YAAI,cAAc,EAAE,IAAF,CAAO,oBAAoB,GAApB,KAA4B,EAAnC,CAAlB;AACA,YAAI,YAAY,MAAhB,EAAwB;AACpB,8BAAkB,KAAlB;AACA,mBAAO,WAAP;AACH,SAHD,MAGO;AACH,8BAAkB,IAAlB,CAAuB,YAAvB;AACA,mBAAO,KAAP;AACH;AACJ,KATD;;AAWA,sBAAkB,EAAlB,CAAqB,OAArB,EAA8B,UAAC,CAAD,EAAM;AAChC,0BAAkB,iBAAlB;AACH,KAFD,EAEG,EAFH,CAEM,aAFN,EAEqB,UAAC,CAAD,EAAM;AACvB;AACH,KAJD,EAIG,EAJH,CAIM,OAJN,EAIe,UAAC,CAAD,EAAM;AACjB,oBAAY,KAAZ;AACH,KAND;;AAQA,wBAAoB,EAApB,CAAuB,aAAvB,EAAsC,UAAC,CAAD,EAAM;AACxC;AACH,KAFD,EAEG,EAFH,CAEM,OAFN,EAEe,UAAC,CAAD,EAAM;AACjB,0BAAkB,KAAlB;AACH,KAJD;;AAOA,mBAAe,EAAf,CAAkB,OAAlB,EAA2B,qBAA3B,EAAkD,UAAC,CAAD,EAAM;AACpD,uBAAe,OAAf,CAAuB,GAAvB;AACH,KAFD;;AAIA,UAAM,EAAN,CAAS,QAAT,EAAmB,UAAC,CAAD,EAAM;AACrB,UAAE,cAAF;AACA,YAAI,SAAS,gBAAb;AACA,YAAI,cAAc,qBAAlB;AACA,YAAI,UAAU,WAAd,EAA2B;AACvB,oBAAQ,wBAAR,EAAkC;AAC9B,8BAD8B;AAE9B;AAF8B,aAAlC,EAGG,MAHH,EAGW,IAHX,CAGgB,YAAK;AACjB,+BAAe,MAAf,CAAsB,GAAtB;AACH,aALD,EAKG,KALH,CAKS,YAAK;AACV,sBAAM,cAAN;AACH,aAPD;AAQH;AACJ,KAdD;AAeH,CArED;;AAuEA,CAAC,YAAK;AACF,QAAM,YAAY,EAAE,YAAF,CAAlB;;AAEA,QAAI,eAAe,CACf;AACI,uBAAc,OADlB;AAEI,uBAAc,OAFlB;AAGI,uBAAc,IAHlB;AAII,uBAAc;AAJlB,KADe,EAOf;AACI,uBAAc,OADlB;AAEI,uBAAc,QAFlB;AAGI,uBAAc,IAHlB;AAII,uBAAc;AAJlB,KAPe,EAaf;AACI,uBAAc,QADlB;AAEI,uBAAc,MAFlB;AAGI,uBAAc,IAHlB;AAII,uBAAc;AAJlB,KAbe,EAmBf;AACI,uBAAc,OADlB;AAEI,uBAAc,QAFlB;AAGI,uBAAc,IAHlB;AAII,uBAAc;AAJlB,KAnBe,EAyBf;AACI,uBAAc,MADlB;AAEI,uBAAc,QAFlB;AAGI,uBAAc,IAHlB;AAII,uBAAc;AAJlB,KAzBe,EA+Bf;AACI,uBAAc,MADlB;AAEI,uBAAc,SAFlB;AAGI,uBAAc,MAHlB;AAII,uBAAc;AAJlB,KA/Be,EAqCf;AACI,uBAAc,MADlB;AAEI,uBAAc,QAFlB;AAGI,uBAAc,IAHlB;AAII,uBAAc;AAJlB,KArCe,EA2Cf;AACI,uBAAc,QADlB;AAEI,uBAAc,QAFlB;AAGI,uBAAc,IAHlB;AAII,uBAAc;AAJlB,KA3Ce,CAAnB;;AAmDA,QAAM,WAAW,SAAX,QAAW,OAAwD;AAAA,YAAtD,WAAsD,QAAtD,WAAsD;AAAA,YAAzC,WAAyC,QAAzC,WAAyC;AAAA,YAA5B,WAA4B,QAA5B,WAA4B;AAAA,YAAf,WAAe,QAAf,WAAe;;AACtE,wBAAc,WAAd,iBAAqC,WAArC,iBAA4D,WAA5D,gBAAkF,WAAlF;AAGF,KAJD;;AAMA,QAAM,eAAe,EAAE,eAAF,EAAkB,SAAlB,CAArB;;AAEA,MAAE,sBAAF,EAA0B,EAA1B,CAA6B,OAA7B,EAAqC,GAArC,EAA0C,UAAC,CAAD,EAAM;AAC5C,UAAE,cAAF;AACA,YAAI,SAAO,EAAE,MAAb;AACA,YAAI,OAAO,EAAX;AACA,YAAI,QAAQ,EAAE,MAAF,EAAU,IAAV,CAAe,KAAf,EAAsB,KAAlC;AACA,YAAI,UAAU,aAAa,KAAb,CAAd;AACA,YAAG,OAAH,EAAW;AACP,mBAAM,SAAS,OAAT,CAAN;AACA,yBAAa,IAAb,CAAkB,IAAlB;AACA,sBAAU,MAAV,CAAiB,GAAjB;AAEH;AACJ,KAZD;;AAcA,cAAU,EAAV,CAAa,OAAb,EAAsB,qBAAtB,EAA6C,UAAC,CAAD,EAAM;AAC/C,UAAE,cAAF;AACA,kBAAU,OAAV,CAAkB,GAAlB;AACH,KAHD;AAMH,CAlFD;;AAqFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"project.js","sourcesContent":["/**\n * Created by Administrator on 2016/7/27.\n */\n(()=> {\n const $form = $('#container .introducer');\n const $submit = $('input[type=\"submit\"]', $form);\n const $introducerMobile = $('#introducerMobile', $form);\n const $projectDescription = $('#projectDescription', $form);\n const $errorPhone = $('.error-phone', $form);\n const $errorDescription = $('.error-description', $form);\n const $successDialog = $('.modal-box-success');\n\n const filterMobileInput = ($mobile)=> {\n $mobile.val(($mobile.val() + '').replace(/[^\\d]/g, ''));\n };\n\n const validateMobile = ()=> {\n let mobile = $.trim($introducerMobile.val() + '');\n if (/^[\\d]{11}$/g.test(mobile)) {\n $errorPhone.empty();\n return mobile;\n } else {\n $errorPhone.html('手机号输入错误!');\n return false;\n }\n };\n\n const validateDescription = ()=> {\n let description = $.trim($projectDescription.val() + '');\n if (description.length) {\n $errorDescription.empty();\n return description;\n } else {\n $errorDescription.html('请输入项目描述内容!');\n return false;\n }\n };\n\n $introducerMobile.on('keyup', (e)=> {\n filterMobileInput($introducerMobile);\n }).on('change blur', (e)=> {\n validateMobile();\n }).on('focus', (e)=> {\n $errorPhone.empty();\n });\n\n $projectDescription.on('change blur', (e)=> {\n validateDescription();\n }).on('focus', (e)=> {\n $errorDescription.empty();\n });\n\n\n $successDialog.on('click', '.modal-dialog-close', (e)=> {\n $successDialog.fadeOut(300);\n });\n\n $form.on('submit', (e)=> {\n e.preventDefault();\n let mobile = validateMobile();\n let description = validateDescription();\n if (mobile && description) {\n request('/api/1.0/proj/add.json', {\n mobile,\n description\n }, 'POST').then(()=> {\n $successDialog.fadeIn(300);\n }).catch(()=> {\n alert('提交失败, 请稍后再试!');\n });\n }\n });\n})();\n\n(()=> {\n const $modalBox = $('.modal-box');\n\n let projectsList = [\n {\n 'projectName':'中电投天津',\n 'projectType':'保障房建设',\n 'projectTime':'2年',\n 'projectInfo':'用于补充公司现金流,承载天津市保障房建设。'\n },\n {\n 'projectName':'中电投西安',\n 'projectType':'基础建设项目',\n 'projectTime':'2年',\n 'projectInfo':'用于认购光大信托计划,用于向“绿源公司”发放信托贷款,用于建设西安绿源农产品批发市场项目。'\n },\n {\n 'projectName':'金元百利海安',\n 'projectType':'企业流贷',\n 'projectTime':'3年',\n 'projectInfo':'用于受让南通新沿海对海安经济技术开发区管委会的应收账款债 权,资金最终用于补充南通新沿海的流动资金。'\n },\n {\n 'projectName':'中电投金堂',\n 'projectType':'基础建设项目',\n 'projectTime':'2年',\n 'projectInfo':'用于认购光大信托先融锐金1号集合资金信托计划,补充公司流动资金,用于基础建设项目'\n },\n {\n 'projectName':'国信巴中',\n 'projectType':'基础建设项目',\n 'projectTime':'2年',\n 'projectInfo':'用于通江县壁州大道二期(高速连接道)建设项目用款。'\n },\n {\n 'projectName':'枢纽铜仁',\n 'projectType':'保障房建设项目',\n 'projectTime':'18个月',\n 'projectInfo':'用于贵州省铜仁市碧江区城市棚户区改造安置房项目'\n },\n {\n 'projectName':'枢纽余庆',\n 'projectType':'基础建设项目',\n 'projectTime':'1年',\n 'projectInfo':'用于贵州遵义市余庆县敖溪镇至关兴镇道路工程建设'\n },\n {\n 'projectName':'中电投黔南州',\n 'projectType':'基础建设项目',\n 'projectTime':'2年',\n 'projectInfo':'用于认购光大信托先融黔南1号集合资金信托计划,补充公司流 动资金,用于基础建设项目 '\n },\n ];\n\n const template = ({projectName, projectTime, projectType, projectInfo})=>{\n return `<h4>${projectName}</h4><h3>${projectTime}</h3><h6>${projectType}</h6><p>${projectInfo}</p>\n <img src=\"https://res.fudou6.com/c/4/20160801/zupNy5waWNfaGQ=_257x423.jpg\">\n <a href=\"javascript:void('close');\" class=\"modal-dialog-close\">×</a>`;\n };\n\n const $modalDialog = $('.modal-dialog',$modalBox);\n\n $('.hot-project-address').on('click','a', (e)=> {\n e.preventDefault();\n var target=e.target;\n let html = '';\n let index = $(target).data(index).index;\n let project = projectsList[index];\n if(project){\n html= template(project);\n $modalDialog.html(html);\n $modalBox.fadeIn(300);\n\n }\n });\n\n $modalBox.on('click', '.modal-dialog-close', (e)=> {\n e.preventDefault();\n $modalBox.fadeOut(300);\n });\n\n\n})();\n\n\n// (function () {\n//\n//\n//\n//\n//\n// var $modalBoxProject = $('.modal-box-project');\n// var $modalBoxSuccess = $('.modal-box-success');\n//\n//\n//\n//\n// /**\n// * 地图项目地址弹框\n// */\n// $('.hot-project-address a').click(function (e) {\n// e.preventDefault();\n// $modalBox.fadeIn(300);\n// });\n// $('#modalBoxHidden').click(function (e) {\n// e.preventDefault();\n// $modalBox.fadeOut(300);\n// });\n//\n// /**\n// * 项目提交弹框\n// */\n// $submit.on('click',function(e){\n// e.preventDefault();\n// $modalBoxSuccess.fadeIn(300);\n// });\n// $('.modal-box-success a').on('click',function(e){\n// e.preventDefault();\n// $modalBoxSuccess.fadeOut(300);\n// });\n//\n//\n// })();"]}
\ No newline at end of file
{"version":3,"sources":["project.jsx"],"names":[],"mappings":"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","file":"project.js","sourcesContent":["/**\n * Created by Administrator on 2016/7/27.\n */\n(()=> {\n const $form = $('#container .introducer');\n const $submit = $('input[type=\"submit\"]', $form);\n const $introducerMobile = $('#introducerMobile', $form);\n const $projectDescription = $('#projectDescription', $form);\n const $errorPhone = $('.error-phone', $form);\n const $errorDescription = $('.error-description', $form);\n const $successDialog = $('.modal-box-success');\n\n const filterMobileInput = ($mobile)=> {\n $mobile.val(($mobile.val() + '').replace(/[^\\d]/g, ''));\n };\n\n const validateMobile = ()=> {\n let mobile = $.trim($introducerMobile.val() + '');\n if (/^[\\d]{11}$/g.test(mobile)) {\n $errorPhone.empty();\n return mobile;\n } else {\n $errorPhone.html('手机号输入错误!');\n return false;\n }\n };\n\n const validateDescription = ()=> {\n let description = $.trim($projectDescription.val() + '');\n if (description.length) {\n $errorDescription.empty();\n return description;\n } else {\n $errorDescription.html('请输入项目描述内容!');\n return false;\n }\n };\n\n $introducerMobile.on('keyup', (e)=> {\n filterMobileInput($introducerMobile);\n }).on('change blur', (e)=> {\n validateMobile();\n }).on('focus', (e)=> {\n $errorPhone.empty();\n });\n\n $projectDescription.on('change blur', (e)=> {\n validateDescription();\n }).on('focus', (e)=> {\n $errorDescription.empty();\n });\n\n\n $successDialog.on('click', '.modal-dialog-close', (e)=> {\n $successDialog.fadeOut(300);\n });\n\n $form.on('submit', (e)=> {\n e.preventDefault();\n let mobile = validateMobile();\n let description = validateDescription();\n if (mobile && description) {\n request('/api/1.0/proj/add.json', {\n mobile,\n description\n }, 'POST').then(()=> {\n $successDialog.fadeIn(300);\n }).catch(()=> {\n alert('提交失败, 请稍后再试!');\n });\n }\n });\n})();\n\n(()=> {\n const $modalBox = $('.modal-box');\n\n let projectsList = [\n {\n 'projectName':'中电投天津',\n 'projectType':'保障房建设',\n 'projectTime':'2年',\n 'projectInfo':'用于补充公司现金流,承载天津市保障房建设。'\n },\n {\n 'projectName':'中电投西安',\n 'projectType':'基础建设项目',\n 'projectTime':'2年',\n 'projectInfo':'用于认购光大信托计划,用于向“绿源公司”发放信托贷款,用于建设西安绿源农产品批发市场项目。'\n },\n {\n 'projectName':'金元百利海安',\n 'projectType':'企业流贷',\n 'projectTime':'3年',\n 'projectInfo':'用于受让南通新沿海对海安经济技术开发区管委会的应收账款债 权,资金最终用于补充南通新沿海的流动资金。'\n },\n {\n 'projectName':'中电投金堂',\n 'projectType':'基础建设项目',\n 'projectTime':'2年',\n 'projectInfo':'用于认购光大信托先融锐金1号集合资金信托计划,补充公司流动资金,用于基础建设项目'\n },\n {\n 'projectName':'国信巴中',\n 'projectType':'基础建设项目',\n 'projectTime':'2年',\n 'projectInfo':'用于通江县壁州大道二期(高速连接道)建设项目用款。'\n },\n {\n 'projectName':'枢纽铜仁',\n 'projectType':'保障房建设项目',\n 'projectTime':'18个月',\n 'projectInfo':'用于贵州省铜仁市碧江区城市棚户区改造安置房项目'\n },\n {\n 'projectName':'枢纽余庆',\n 'projectType':'基础建设项目',\n 'projectTime':'1年',\n 'projectInfo':'用于贵州遵义市余庆县敖溪镇至关兴镇道路工程建设'\n },\n {\n 'projectName':'中电投黔南州',\n 'projectType':'基础建设项目',\n 'projectTime':'2年',\n 'projectInfo':'用于认购光大信托先融黔南1号集合资金信托计划,补充公司流 动资金,用于基础建设项目 '\n },\n ];\n\n const template = ({projectName, projectTime, projectType, projectInfo})=>{\n return `<h4>${projectName}</h4><h3>${projectTime}</h3><h6>${projectType}</h6><p>${projectInfo}</p>\n <img src=\"https://res.fudou6.com/c/4/20160801/zupNy5waWNfaGQ=_257x423.jpg\">\n <a href=\"javascript:void('close');\" class=\"modal-dialog-close\">×</a>`;\n };\n\n const $modalDialog = $('.modal-dialog',$modalBox);\n\n $('.hot-project-address').on('click','a', (e)=> {\n e.preventDefault();\n var target=e.target;\n let html = '';\n let index = $(target).data(index).index;\n let project = projectsList[index];\n if(project){\n html= template(project);\n $modalDialog.html(html);\n $modalBox.fadeIn(300);\n\n }\n });\n\n $modalBox.on('click', '.modal-dialog-close', (e)=> {\n e.preventDefault();\n $modalBox.fadeOut(300);\n });\n\n\n})();\n"]}
\ No newline at end of file
......@@ -127,7 +127,7 @@
];
const template = ({projectName, projectTime, projectType, projectInfo})=>{
return `<h4>${projectName}</h4><h3>${projectTime}</h3><h6>${projectType}</h6><p>${projectInfo}</p>
return `<h4>${projectName}</h4><h3>${projectTime}</h3><h6>${projectType}</h6><p>${projectInfo}</p>
<img src="https://res.fudou6.com/c/4/20160801/zupNy5waWNfaGQ=_257x423.jpg">
<a href="javascript:void('close');" class="modal-dialog-close">×</a>`;
};
......@@ -155,43 +155,3 @@
})();
// (function () {
//
//
//
//
//
// var $modalBoxProject = $('.modal-box-project');
// var $modalBoxSuccess = $('.modal-box-success');
//
//
//
//
// /**
// * 地图项目地址弹框
// */
// $('.hot-project-address a').click(function (e) {
// e.preventDefault();
// $modalBox.fadeIn(300);
// });
// $('#modalBoxHidden').click(function (e) {
// e.preventDefault();
// $modalBox.fadeOut(300);
// });
//
// /**
// * 项目提交弹框
// */
// $submit.on('click',function(e){
// e.preventDefault();
// $modalBoxSuccess.fadeIn(300);
// });
// $('.modal-box-success a').on('click',function(e){
// e.preventDefault();
// $modalBoxSuccess.fadeOut(300);
// });
//
//
// })();
\ No newline at end of file
"use strict";(function(){var $form=$("#container .introducer");var $submit=$('input[type="submit"]',$form);var $introducerMobile=$("#introducerMobile",$form);var $projectDescription=$("#projectDescription",$form);var $errorPhone=$(".error-phone",$form);var $errorDescription=$(".error-description",$form);var $successDialog=$(".modal-box-success");var filterMobileInput=function filterMobileInput($mobile){$mobile.val(($mobile.val()+"").replace(/[^\d]/g,""))};var validateMobile=function validateMobile(){var mobile=$.trim($introducerMobile.val()+"");if(/^[\d]{11}$/g.test(mobile)){$errorPhone.empty();return mobile}else{$errorPhone.html("手机号输入错误!");return false}};var validateDescription=function validateDescription(){var description=$.trim($projectDescription.val()+"");if(description.length){$errorDescription.empty();return description}else{$errorDescription.html("请输入项目描述内容!");return false}};$introducerMobile.on("keyup",function(e){filterMobileInput($introducerMobile)}).on("change blur",function(e){validateMobile()}).on("focus",function(e){$errorPhone.empty()});$projectDescription.on("change blur",function(e){validateDescription()}).on("focus",function(e){$errorDescription.empty()});$successDialog.on("click",".modal-dialog-close",function(e){$successDialog.fadeOut(300)});$form.on("submit",function(e){e.preventDefault();var mobile=validateMobile();var description=validateDescription();if(mobile&&description){request("/api/1.0/proj/add.json",{mobile:mobile,description:description},"POST").then(function(){$successDialog.fadeIn(300)}).catch(function(){alert("提交失败, 请稍后再试!")})}})})();(function(){var $modalBox=$(".modal-box");$(".hot-project-address").on("click","a",function(e){e.preventDefault();$modalBox.fadeIn(300)});$modalBox.on("click",".modal-dialog-close",function(e){e.preventDefault();$modalBox.fadeOut(300)})})();
\ No newline at end of file
"use strict";
!function() {
var e = $("#container .introducer"), o = ($('input[type="submit"]', e), $("#introducerMobile", e)), t = $("#projectDescription", e), c = $(".error-phone", e), r = $(".error-description", e), n = $(".modal-box-success"), p = function(e) {
e.val((e.val() + "").replace(/[^\d]/g, ""));
}, a = function() {
var e = $.trim(o.val() + "");
return /^[\d]{11}$/g.test(e) ? (c.empty(), e) : (c.html("手机号输入错误!"), !1);
}, i = function() {
var e = $.trim(t.val() + "");
return e.length ? (r.empty(), e) : (r.html("请输入项目描述内容!"), !1);
};
o.on("keyup", function(e) {
p(o);
}).on("change blur", function(e) {
a();
}).on("focus", function(e) {
c.empty();
}), t.on("change blur", function(e) {
i();
}).on("focus", function(e) {
r.empty();
}), n.on("click", ".modal-dialog-close", function(e) {
n.fadeOut(300);
}), e.on("submit", function(e) {
e.preventDefault();
var o = a(), t = i();
o && t && request("/api/1.0/proj/add.json", {
mobile: o,
description: t
}, "POST").then(function() {
n.fadeIn(300);
}).catch(function() {
alert("提交失败, 请稍后再试!");
});
});
}(), function() {
var e = $(".modal-box"), o = [ {
projectName: "中电投天津",
projectType: "保障房建设",
projectTime: "2年",
projectInfo: "用于补充公司现金流,承载天津市保障房建设。"
}, {
projectName: "中电投西安",
projectType: "基础建设项目",
projectTime: "2年",
projectInfo: "用于认购光大信托计划,用于向“绿源公司”发放信托贷款,用于建设西安绿源农产品批发市场项目。"
}, {
projectName: "金元百利海安",
projectType: "企业流贷",
projectTime: "3年",
projectInfo: "用于受让南通新沿海对海安经济技术开发区管委会的应收账款债 权,资金最终用于补充南通新沿海的流动资金。"
}, {
projectName: "中电投金堂",
projectType: "基础建设项目",
projectTime: "2年",
projectInfo: "用于认购光大信托先融锐金1号集合资金信托计划,补充公司流动资金,用于基础建设项目"
}, {
projectName: "国信巴中",
projectType: "基础建设项目",
projectTime: "2年",
projectInfo: "用于通江县壁州大道二期(高速连接道)建设项目用款。"
}, {
projectName: "枢纽铜仁",
projectType: "保障房建设项目",
projectTime: "18个月",
projectInfo: "用于贵州省铜仁市碧江区城市棚户区改造安置房项目"
}, {
projectName: "枢纽余庆",
projectType: "基础建设项目",
projectTime: "1年",
projectInfo: "用于贵州遵义市余庆县敖溪镇至关兴镇道路工程建设"
}, {
projectName: "中电投黔南州",
projectType: "基础建设项目",
projectTime: "2年",
projectInfo: "用于认购光大信托先融黔南1号集合资金信托计划,补充公司流 动资金,用于基础建设项目 "
} ], t = function(e) {
var o = e.projectName, t = e.projectTime, c = e.projectType, r = e.projectInfo;
return "<h4>" + o + "</h4><h3>" + t + "</h3><h6>" + c + "</h6><p>" + r + '</p>\n <img src="https://res.fudou6.com/c/4/20160801/zupNy5waWNfaGQ=_257x423.jpg">\n <a href="javascript:void(\'close\');" class="modal-dialog-close">×</a>';
}, c = $(".modal-dialog", e);
$(".hot-project-address").on("click", "a", function(r) {
r.preventDefault();
var n = r.target, p = "", a = $(n).data(a).index, i = o[a];
i && (p = t(i), c.html(p), e.fadeIn(300));
}), e.on("click", ".modal-dialog-close", function(o) {
o.preventDefault(), e.fadeOut(300);
});
}();
\ No newline at end of file
(function(global){
//
// Check for native Promise and it has correct interface
//
var NativePromise = global['Promise'];
var nativePromiseSupported =
NativePromise &&
// Some of these methods are missing from
// Firefox/Chrome experimental implementations
'resolve' in NativePromise &&
'reject' in NativePromise &&
'all' in NativePromise &&
'race' in NativePromise &&
// Older version of the spec had a resolver object
// as the arg rather than a function
(function(){
var resolve;
new NativePromise(function(r){ resolve = r; });
return typeof resolve === 'function';
})();
//
// export if necessary
//
if (typeof exports !== 'undefined' && exports)
{
// node.js
exports.Promise = nativePromiseSupported ? NativePromise : Promise;
exports.Polyfill = Promise;
}
else
{
// AMD
if (typeof define == 'function' && define.amd)
{
define(function(){
return nativePromiseSupported ? NativePromise : Promise;
});
}
else
{
// in browser add to global
if (!nativePromiseSupported)
global['Promise'] = Promise;
}
}
//
// Polyfill
//
var PENDING = 'pending';
var SEALED = 'sealed';
var FULFILLED = 'fulfilled';
var REJECTED = 'rejected';
var NOOP = function(){};
function isArray(value) {
return Object.prototype.toString.call(value) === '[object Array]';
}
// async calls
var asyncSetTimer = typeof setImmediate !== 'undefined' ? setImmediate : setTimeout;
var asyncQueue = [];
var asyncTimer;
function asyncFlush(){
// run promise callbacks
for (var i = 0; i < asyncQueue.length; i++)
asyncQueue[i][0](asyncQueue[i][1]);
// reset async asyncQueue
asyncQueue = [];
asyncTimer = false;
}
function asyncCall(callback, arg){
asyncQueue.push([callback, arg]);
if (!asyncTimer)
{
asyncTimer = true;
asyncSetTimer(asyncFlush, 0);
}
}
function invokeResolver(resolver, promise) {
function resolvePromise(value) {
resolve(promise, value);
}
function rejectPromise(reason) {
reject(promise, reason);
}
try {
resolver(resolvePromise, rejectPromise);
} catch(e) {
rejectPromise(e);
}
}
function invokeCallback(subscriber){
var owner = subscriber.owner;
var settled = owner.state_;
var value = owner.data_;
var callback = subscriber[settled];
var promise = subscriber.then;
if (typeof callback === 'function')
{
settled = FULFILLED;
try {
value = callback(value);
} catch(e) {
reject(promise, e);
}
}
if (!handleThenable(promise, value))
{
if (settled === FULFILLED)
resolve(promise, value);
if (settled === REJECTED)
reject(promise, value);
}
}
function handleThenable(promise, value) {
var resolved;
try {
if (promise === value)
throw new TypeError('A promises callback cannot return that same promise.');
if (value && (typeof value === 'function' || typeof value === 'object'))
{
var then = value.then; // then should be retrived only once
if (typeof then === 'function')
{
then.call(value, function(val){
if (!resolved)
{
resolved = true;
if (value !== val)
resolve(promise, val);
else
fulfill(promise, val);
}
}, function(reason){
if (!resolved)
{
resolved = true;
reject(promise, reason);
}
});
return true;
}
}
} catch (e) {
if (!resolved)
reject(promise, e);
return true;
}
return false;
}
function resolve(promise, value){
if (promise === value || !handleThenable(promise, value))
fulfill(promise, value);
}
function fulfill(promise, value){
if (promise.state_ === PENDING)
{
promise.state_ = SEALED;
promise.data_ = value;
asyncCall(publishFulfillment, promise);
}
}
function reject(promise, reason){
if (promise.state_ === PENDING)
{
promise.state_ = SEALED;
promise.data_ = reason;
asyncCall(publishRejection, promise);
}
}
function publish(promise) {
var callbacks = promise.then_;
promise.then_ = undefined;
for (var i = 0; i < callbacks.length; i++) {
invokeCallback(callbacks[i]);
}
}
function publishFulfillment(promise){
promise.state_ = FULFILLED;
publish(promise);
}
function publishRejection(promise){
promise.state_ = REJECTED;
publish(promise);
}
/**
* @class
*/
function Promise(resolver){
if (typeof resolver !== 'function')
throw new TypeError('Promise constructor takes a function argument');
if (this instanceof Promise === false)
throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
this.then_ = [];
invokeResolver(resolver, this);
}
Promise.prototype = {
constructor: Promise,
state_: PENDING,
then_: null,
data_: undefined,
then: function(onFulfillment, onRejection){
var subscriber = {
owner: this,
then: new this.constructor(NOOP),
fulfilled: onFulfillment,
rejected: onRejection
};
if (this.state_ === FULFILLED || this.state_ === REJECTED)
{
// already resolved, call callback async
asyncCall(invokeCallback, subscriber);
}
else
{
// subscribe
this.then_.push(subscriber);
}
return subscriber.then;
},
'catch': function(onRejection) {
return this.then(null, onRejection);
}
};
Promise.all = function(promises){
var Class = this;
if (!isArray(promises))
throw new TypeError('You must pass an array to Promise.all().');
return new Class(function(resolve, reject){
var results = [];
var remaining = 0;
function resolver(index){
remaining++;
return function(value){
results[index] = value;
if (!--remaining)
resolve(results);
};
}
for (var i = 0, promise; i < promises.length; i++)
{
promise = promises[i];
if (promise && typeof promise.then === 'function')
promise.then(resolver(i), reject);
else
results[i] = promise;
}
if (!remaining)
resolve(results);
});
};
Promise.race = function(promises){
var Class = this;
if (!isArray(promises))
throw new TypeError('You must pass an array to Promise.race().');
return new Class(function(resolve, reject) {
for (var i = 0, promise; i < promises.length; i++)
{
promise = promises[i];
if (promise && typeof promise.then === 'function')
promise.then(resolve, reject);
else
resolve(promise);
}
});
};
Promise.resolve = function(value){
var Class = this;
if (value && typeof value === 'object' && value.constructor === Class)
return value;
return new Class(function(resolve){
resolve(value);
});
};
Promise.reject = function(reason){
var Class = this;
return new Class(function(resolve, reject){
reject(reason);
});
};
})(typeof window != 'undefined' ? window : typeof global != 'undefined' ? global : typeof self != 'undefined' ? self : this);
\ No newline at end of file
!function(t) {
function n(t) {
return "[object Array]" === Object.prototype.toString.call(t);
}
function e() {
for (var t = 0; t < P.length; t++) P[t][0](P[t][1]);
P = [], w = !1;
}
function o(t, n) {
P.push([ t, n ]), w || (w = !0, j(e, 0));
}
function r(t, n) {
function e(t) {
c(n, t);
}
function o(t) {
a(n, t);
}
try {
t(e, o);
} catch (t) {
o(t);
}
}
function i(t) {
var n = t.owner, e = n.state_, o = n.data_, r = t[e], i = t.then;
if ("function" == typeof r) {
e = _;
try {
o = r(o);
} catch (t) {
a(i, t);
}
}
f(i, o) || (e === _ && c(i, o), e === b && a(i, o));
}
function f(t, n) {
var e;
try {
if (t === n) throw new TypeError("A promises callback cannot return that same promise.");
if (n && ("function" == typeof n || "object" == typeof n)) {
var o = n.then;
if ("function" == typeof o) return o.call(n, function(o) {
e || (e = !0, n !== o ? c(t, o) : u(t, o));
}, function(n) {
e || (e = !0, a(t, n));
}), !0;
}
} catch (n) {
return e || a(t, n), !0;
}
return !1;
}
function c(t, n) {
t !== n && f(t, n) || u(t, n);
}
function u(t, n) {
t.state_ === v && (t.state_ = m, t.data_ = n, o(h, t));
}
function a(t, n) {
t.state_ === v && (t.state_ = m, t.data_ = n, o(l, t));
}
function s(t) {
var n = t.then_;
t.then_ = void 0;
for (var e = 0; e < n.length; e++) i(n[e]);
}
function h(t) {
t.state_ = _, s(t);
}
function l(t) {
t.state_ = b, s(t);
}
function p(t) {
if ("function" != typeof t) throw new TypeError("Promise constructor takes a function argument");
if (this instanceof p == !1) throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
this.then_ = [], r(t, this);
}
var d = t.Promise, y = d && "resolve" in d && "reject" in d && "all" in d && "race" in d && function() {
var t;
return new d(function(n) {
t = n;
}), "function" == typeof t;
}();
"undefined" != typeof exports && exports ? (exports.Promise = y ? d : p, exports.Polyfill = p) : "function" == typeof define && define.amd ? define(function() {
return y ? d : p;
}) : y || (t.Promise = p);
var w, v = "pending", m = "sealed", _ = "fulfilled", b = "rejected", g = function() {}, j = "undefined" != typeof setImmediate ? setImmediate : setTimeout, P = [];
p.prototype = {
constructor: p,
state_: v,
then_: null,
data_: void 0,
then: function(t, n) {
var e = {
owner: this,
then: new this.constructor(g),
fulfilled: t,
rejected: n
};
return this.state_ === _ || this.state_ === b ? o(i, e) : this.then_.push(e), e.then;
},
catch: function(t) {
return this.then(null, t);
}
}, p.all = function(t) {
var e = this;
if (!n(t)) throw new TypeError("You must pass an array to Promise.all().");
return new e(function(n, e) {
function o(t) {
return f++, function(e) {
i[t] = e, --f || n(i);
};
}
for (var r, i = [], f = 0, c = 0; c < t.length; c++) r = t[c], r && "function" == typeof r.then ? r.then(o(c), e) : i[c] = r;
f || n(i);
});
}, p.race = function(t) {
var e = this;
if (!n(t)) throw new TypeError("You must pass an array to Promise.race().");
return new e(function(n, e) {
for (var o, r = 0; r < t.length; r++) o = t[r], o && "function" == typeof o.then ? o.then(n, e) : n(o);
});
}, p.resolve = function(t) {
var n = this;
return t && "object" == typeof t && t.constructor === n ? t : new n(function(n) {
n(t);
});
}, p.reject = function(t) {
var n = this;
return new n(function(n, e) {
e(t);
});
};
}("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this);
\ No newline at end of file
{"version":3,"sources":["utils.jsx"],"names":[],"mappings":"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","file":"utils.js","sourcesContent":[" function request(url, data, method = 'GET') {\n return new Promise((resolve, reject)=> {\n $.ajax(url, {\n type: method,\n dataType: 'json',\n data,\n success: res=> {\n if (res && res.status == 1) {\n resolve(res.result);\n } else {\n reject({\n code: res && res.code || 0,\n message: res && res.msg || res.message || '系统错误,请稍后再试!'\n });\n }\n },\n error: (xhr, status, text)=> {\n console.log(xhr, status, text);\n reject({\n code: xhr && xhr.status || status,\n message: text\n });\n }\n });\n });\n}\n\n function formatMoney(money = 0) {\n let ret;\n if (isNaN(money)) {\n ret = '0';\n } else if (money >= 1E10) {\n ret = (money / 1E10) + '亿';\n } else if (money >= 1E6) {\n ret = (money / 1E6) + '万';\n } else {\n ret = (money / 1E2);\n }\n return ret;\n}\n\n function deserialize(str = location.search) {\n const query = {};\n (str + '').replace(/^\\?/g, '').split('&').forEach(item=> {\n let tmp = (item + '').split('=');\n if (tmp.length) {\n query[decodeURIComponent(tmp[0])] = decodeURIComponent(tmp[1]);\n }\n });\n return query;\n}\n\n function serialize(obj, prefix) {\n var str = [];\n Object.keys(obj).map(p=> {\n let v = obj[p];\n if (p && typeof v !== 'undefined') {\n let k = prefix ? prefix + \".\" + p : p;\n if (typeof v == 'object') {\n v = serialize(v, k);\n if (v) {\n str.push(v);\n }\n } else {\n str.push(encodeURIComponent(k) + \"=\" + encodeURIComponent(v));\n }\n }\n });\n return str.length ? str.join(\"&\") : '';\n}\n\n class Tabs {\n constructor(options) {\n this.options = {activeClass: 'active', ...options};\n }\n\n initialize() {\n this.container = $(this.options.container || 'body').empty();\n this.render();\n return this;\n }\n\n findHeader(index) {\n return this.element.find('.tabs-headers-item:eq(' + index + ')');\n }\n\n findPanel(index) {\n return this.element.find('.tabs-panels-item:eq(' + index + ')');\n }\n\n selectIndex(index) {\n\n let header = this.findHeader(this.activeIndex);\n let panel = this.findPanel(this.activeIndex);\n\n if (typeof index === 'number' && index !== this.activeIndex) {\n const {activeClass, initializePanel} = this.options;\n header.removeClass(activeClass);\n panel.removeClass(activeClass);\n this.activeIndex = index;\n header = this.findHeader(index).addClass(activeClass);\n panel = this.findPanel(index).addClass(activeClass);\n if (!panel.attr('initialized')) {\n if (typeof initializePanel === 'function') {\n initializePanel.call(this, index, header, panel);\n }\n panel.attr('initialized', true);\n }\n }\n return {\n header,\n panel\n };\n }\n\n render() {\n const headers = [];\n const panels = [];\n const self = this;\n this.options.headers.forEach((item, index)=> {\n headers.push(`<a class=\"tabs-headers-item\" data-index=\"${index}\" href=\"javascript:void('${item}')\">${item}</a>`);\n panels.push(`<div class=\"tabs-panels-item\" data-index=\"${index}\"></div>`);\n });\n const html = `<div class=\"tabs\">\n <header class=\"tabs-header\">\n <div class=\"clear\">\n ${headers.join('')}\n </div>\n </header>\n <section>\n ${panels.join('')}\n </section>\n </div>`;\n this.element = $(html).appendTo(this.container);\n\n this.selectIndex(this.options.defaultIndex || 0);\n\n this.element.on('click', '.tabs-headers-item', function (e) {\n e.preventDefault();\n const tabHeader = $(this);\n const index = tabHeader.data('index');\n if (index != self.activeIndex) {\n self.selectIndex(index);\n }\n });\n return this;\n }\n\n\n}"]}
\ No newline at end of file
{"version":3,"sources":["utils.jsx"],"names":[],"mappings":"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","file":"utils.js","sourcesContent":["function request(url, data, method = 'GET') {\n return new Promise((resolve, reject)=> {\n $.ajax(url, {\n type: method,\n dataType: 'json',\n data,\n success: res=> {\n if (res && res.status == 1) {\n resolve(res.result);\n } else {\n reject({\n code: res && res.code || 0,\n message: res && res.msg || res.message || '系统错误,请稍后再试!'\n });\n }\n },\n error: (xhr, status, text)=> {\n console.log(xhr, status, text);\n reject({\n code: xhr && xhr.status || status,\n message: text\n });\n }\n });\n });\n}\n\nfunction formatMoney(money = 0) {\n let ret;\n if (isNaN(money)) {\n ret = '0';\n } else if (money >= 1E10) {\n ret = (money / 1E10) + '亿';\n } else if (money >= 1E6) {\n ret = (money / 1E6) + '万';\n } else {\n ret = (money / 1E2);\n }\n return ret;\n}\n\nfunction deserialize(str = location.search) {\n const query = {};\n (str + '').replace(/^\\?/g, '').split('&').forEach(item=> {\n let tmp = (item + '').split('=');\n if (tmp.length) {\n query[decodeURIComponent(tmp[0])] = decodeURIComponent(tmp[1]);\n }\n });\n return query;\n}\n\nfunction serialize(obj, prefix) {\n var str = [];\n Object.keys(obj).map(p=> {\n let v = obj[p];\n if (p && typeof v !== 'undefined') {\n let k = prefix ? prefix + \".\" + p : p;\n if (typeof v == 'object') {\n v = serialize(v, k);\n if (v) {\n str.push(v);\n }\n } else {\n str.push(encodeURIComponent(k) + \"=\" + encodeURIComponent(v));\n }\n }\n });\n return str.length ? str.join(\"&\") : '';\n}\n\nclass Tabs {\n constructor(options) {\n this.options = {activeClass: 'active', ...options};\n }\n\n initialize() {\n this.container = $(this.options.container || 'body').empty();\n this.render();\n return this;\n }\n\n findHeader(index) {\n return this.element.find('.tabs-headers-item:eq(' + index + ')');\n }\n\n findPanel(index) {\n return this.element.find('.tabs-panels-item:eq(' + index + ')');\n }\n\n selectIndex(index) {\n\n let header = this.findHeader(this.activeIndex);\n let panel = this.findPanel(this.activeIndex);\n\n if (typeof index === 'number' && index !== this.activeIndex) {\n const {activeClass, initializePanel} = this.options;\n header.removeClass(activeClass);\n panel.removeClass(activeClass);\n this.activeIndex = index;\n header = this.findHeader(index).addClass(activeClass);\n panel = this.findPanel(index).addClass(activeClass);\n if (!panel.attr('initialized')) {\n if (typeof initializePanel === 'function') {\n initializePanel.call(this, index, header, panel);\n }\n panel.attr('initialized', true);\n }\n }\n return {\n header,\n panel\n };\n }\n\n render() {\n const headers = [];\n const panels = [];\n const self = this;\n this.options.headers.forEach((item, index)=> {\n headers.push(`<a class=\"tabs-headers-item\" data-index=\"${index}\" href=\"javascript:void('${item}')\">${item}</a>`);\n panels.push(`<div class=\"tabs-panels-item\" data-index=\"${index}\"></div>`);\n });\n const html = `<div class=\"tabs\">\n <header class=\"tabs-header\">\n <div class=\"clear\">\n ${headers.join('')}\n </div>\n </header>\n <section>\n ${panels.join('')}\n </section>\n </div>`;\n this.element = $(html).appendTo(this.container);\n\n this.selectIndex(this.options.defaultIndex || 0);\n\n this.element.on('click', '.tabs-headers-item', function (e) {\n e.preventDefault();\n const tabHeader = $(this);\n const index = tabHeader.data('index');\n if (index != self.activeIndex) {\n self.selectIndex(index);\n }\n });\n return this;\n }\n\n\n}\n"]}
\ No newline at end of file
function request(url, data, method = 'GET') {
function request(url, data, method = 'GET') {
return new Promise((resolve, reject)=> {
$.ajax(url, {
type: method,
......@@ -25,7 +25,7 @@
});
}
function formatMoney(money = 0) {
function formatMoney(money = 0) {
let ret;
if (isNaN(money)) {
ret = '0';
......@@ -39,7 +39,7 @@
return ret;
}
function deserialize(str = location.search) {
function deserialize(str = location.search) {
const query = {};
(str + '').replace(/^\?/g, '').split('&').forEach(item=> {
let tmp = (item + '').split('=');
......@@ -50,7 +50,7 @@
return query;
}
function serialize(obj, prefix) {
function serialize(obj, prefix) {
var str = [];
Object.keys(obj).map(p=> {
let v = obj[p];
......@@ -69,7 +69,7 @@
return str.length ? str.join("&") : '';
}
class Tabs {
class Tabs {
constructor(options) {
this.options = {activeClass: 'active', ...options};
}
......@@ -147,4 +147,4 @@
}
}
\ No newline at end of file
}
"use strict";var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor}}();var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol?"symbol":typeof obj};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function request(url,data){var method=arguments.length<=2||arguments[2]===undefined?"GET":arguments[2];return new Promise(function(resolve,reject){$.ajax(url,{type:method,dataType:"json",data:data,success:function success(res){if(res&&res.status==1){resolve(res.result)}else{reject({code:res&&res.code||0,message:res&&res.msg||res.message||"系统错误,请稍后再试!"})}},error:function error(xhr,status,text){console.log(xhr,status,text);reject({code:xhr&&xhr.status||status,message:text})}})})}function formatMoney(){var money=arguments.length<=0||arguments[0]===undefined?0:arguments[0];var ret=void 0;if(isNaN(money)){ret="0"}else if(money>=1e10){ret=money/1e10+"亿"}else if(money>=1e6){ret=money/1e6+"万"}else{ret=money/100}return ret}function deserialize(){var str=arguments.length<=0||arguments[0]===undefined?location.search:arguments[0];var query={};(str+"").replace(/^\?/g,"").split("&").forEach(function(item){var tmp=(item+"").split("=");if(tmp.length){query[decodeURIComponent(tmp[0])]=decodeURIComponent(tmp[1])}});return query}function serialize(obj,prefix){var str=[];Object.keys(obj).map(function(p){var v=obj[p];if(p&&typeof v!=="undefined"){var k=prefix?prefix+"."+p:p;if((typeof v==="undefined"?"undefined":_typeof(v))=="object"){v=serialize(v,k);if(v){str.push(v)}}else{str.push(encodeURIComponent(k)+"="+encodeURIComponent(v))}}});return str.length?str.join("&"):""}var Tabs=function(){function Tabs(options){_classCallCheck(this,Tabs);this.options=_extends({activeClass:"active"},options)}_createClass(Tabs,[{key:"initialize",value:function initialize(){this.container=$(this.options.container||"body").empty();this.render();return this}},{key:"findHeader",value:function findHeader(index){return this.element.find(".tabs-headers-item:eq("+index+")")}},{key:"findPanel",value:function findPanel(index){return this.element.find(".tabs-panels-item:eq("+index+")")}},{key:"selectIndex",value:function selectIndex(index){var header=this.findHeader(this.activeIndex);var panel=this.findPanel(this.activeIndex);if(typeof index==="number"&&index!==this.activeIndex){var _options=this.options;var activeClass=_options.activeClass;var initializePanel=_options.initializePanel;header.removeClass(activeClass);panel.removeClass(activeClass);this.activeIndex=index;header=this.findHeader(index).addClass(activeClass);panel=this.findPanel(index).addClass(activeClass);if(!panel.attr("initialized")){if(typeof initializePanel==="function"){initializePanel.call(this,index,header,panel)}panel.attr("initialized",true)}}return{header:header,panel:panel}}},{key:"render",value:function render(){var headers=[];var panels=[];var self=this;this.options.headers.forEach(function(item,index){headers.push('<a class="tabs-headers-item" data-index="'+index+'" href="javascript:void(\''+item+"')\">"+item+"</a>");panels.push('<div class="tabs-panels-item" data-index="'+index+'"></div>')});var html='<div class="tabs">\n <header class="tabs-header">\n <div class="clear">\n '+headers.join("")+"\n </div>\n </header>\n <section>\n "+panels.join("")+"\n </section>\n </div>";this.element=$(html).appendTo(this.container);this.selectIndex(this.options.defaultIndex||0);this.element.on("click",".tabs-headers-item",function(e){e.preventDefault();var tabHeader=$(this);var index=tabHeader.data("index");if(index!=self.activeIndex){self.selectIndex(index)}});return this}}]);return Tabs}();
\ No newline at end of file
"use strict";
function _classCallCheck(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}
function request(e, t) {
var n = arguments.length <= 2 || void 0 === arguments[2] ? "GET" : arguments[2];
return new Promise(function(i, a) {
$.ajax(e, {
type: n,
dataType: "json",
data: t,
success: function(e) {
e && 1 == e.status ? i(e.result) : a({
code: e && e.code || 0,
message: e && e.msg || e.message || "系统错误,请稍后再试!"
});
},
error: function(e, t, n) {
console.log(e, t, n), a({
code: e && e.status || t,
message: n
});
}
});
});
}
function formatMoney() {
var e = arguments.length <= 0 || void 0 === arguments[0] ? 0 : arguments[0], t = void 0;
return t = isNaN(e) ? "0" : e >= 1e10 ? e / 1e10 + "亿" : e >= 1e6 ? e / 1e6 + "万" : e / 100;
}
function deserialize() {
var e = arguments.length <= 0 || void 0 === arguments[0] ? location.search : arguments[0], t = {};
return (e + "").replace(/^\?/g, "").split("&").forEach(function(e) {
var n = (e + "").split("=");
n.length && (t[decodeURIComponent(n[0])] = decodeURIComponent(n[1]));
}), t;
}
function serialize(e, t) {
var n = [];
return Object.keys(e).map(function(i) {
var a = e[i];
if (i && "undefined" != typeof a) {
var s = t ? t + "." + i : i;
"object" == ("undefined" == typeof a ? "undefined" : _typeof(a)) ? (a = serialize(a, s),
a && n.push(a)) : n.push(encodeURIComponent(s) + "=" + encodeURIComponent(a));
}
}), n.length ? n.join("&") : "";
}
var _extends = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
}
return e;
}, _createClass = function() {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0),
Object.defineProperty(e, i.key, i);
}
}
return function(t, n, i) {
return n && e(t.prototype, n), i && e(t, i), t;
};
}(), _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e;
}, Tabs = function() {
function e(t) {
_classCallCheck(this, e), this.options = _extends({
activeClass: "active"
}, t);
}
return _createClass(e, [ {
key: "initialize",
value: function() {
return this.container = $(this.options.container || "body").empty(), this.render(),
this;
}
}, {
key: "findHeader",
value: function(e) {
return this.element.find(".tabs-headers-item:eq(" + e + ")");
}
}, {
key: "findPanel",
value: function(e) {
return this.element.find(".tabs-panels-item:eq(" + e + ")");
}
}, {
key: "selectIndex",
value: function(e) {
var t = this.findHeader(this.activeIndex), n = this.findPanel(this.activeIndex);
if ("number" == typeof e && e !== this.activeIndex) {
var i = this.options, a = i.activeClass, s = i.initializePanel;
t.removeClass(a), n.removeClass(a), this.activeIndex = e, t = this.findHeader(e).addClass(a),
n = this.findPanel(e).addClass(a), n.attr("initialized") || ("function" == typeof s && s.call(this, e, t, n),
n.attr("initialized", !0));
}
return {
header: t,
panel: n
};
}
}, {
key: "render",
value: function() {
var e = [], t = [], n = this;
this.options.headers.forEach(function(n, i) {
e.push('<a class="tabs-headers-item" data-index="' + i + '" href="javascript:void(\'' + n + "')\">" + n + "</a>"),
t.push('<div class="tabs-panels-item" data-index="' + i + '"></div>');
});
var i = '<div class="tabs">\n <header class="tabs-header">\n <div class="clear">\n ' + e.join("") + "\n </div>\n </header>\n <section>\n " + t.join("") + "\n </section>\n </div>";
return this.element = $(i).appendTo(this.container), this.selectIndex(this.options.defaultIndex || 0),
this.element.on("click", ".tabs-headers-item", function(e) {
e.preventDefault();
var t = $(this), i = t.data("index");
i != n.activeIndex && n.selectIndex(i);
}), this;
}
} ]), e;
}();
\ No newline at end of file
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
font-family: sans-serif;
/* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%;
/* 2 */
}
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
* 2. Add the correct display in IE.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section,
summary {
/* 1 */
display: block;
}
/**
* Add the correct display in IE 9-.
*/
audio,
canvas,
progress,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Add the correct display in IE 10-.
* 1. Add the correct display in IE.
*/
template,
[hidden] {
display: none;
}
/* Links
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent;
/* 1 */
-webkit-text-decoration-skip: objects;
/* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none;
/* 1 */
text-decoration: underline;
/* 2 */
text-decoration: underline dotted;
/* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box;
/* 1 */
height: 0;
/* 1 */
overflow: visible;
/* 2 */
}
/* Forms
========================================================================== */
/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
select,
textarea {
font: inherit;
/* 1 */
margin: 0;
/* 2 */
}
/**
* Restore the font weight unset by the previous rule.
*/
optgroup {
font-weight: bold;
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
/* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box;
/* 1 */
color: inherit;
/* 2 */
display: table;
/* 1 */
max-width: 100%;
/* 1 */
padding: 0;
/* 3 */
white-space: normal;
/* 1 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Correct the text style of placeholders in Chrome, Edge, and Safari.
*/
::-webkit-input-placeholder {
color: inherit;
opacity: 0.54;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
......@@ -8,6 +8,7 @@ router.get('/', function (req, res) {
res.render('index', {
navIndex:'active',
styles: ['index'],
env: process.env.NODE_ENV === 'production' ? 'production': '',
scripts:[],
character: [
{
......@@ -84,6 +85,7 @@ router.get('/about', function (req, res) {
res.render('about', {
navAbout:'active',
styles: ['about'],
env: process.env.NODE_ENV === 'production' ? 'production': '',
});
});
......@@ -92,6 +94,7 @@ router.get('/project', function (req, res) {
navProject:'active',
styles: ['project'],
scripts:['utils','project'],
env: process.env.NODE_ENV === 'production' ? 'production': '',
});
});
......@@ -104,6 +107,7 @@ router.get('/products', function (req, res) {
navProducts:'active',
styles: ['products'],
scripts:['utils','products'],
env: process.env.NODE_ENV === 'production' ? 'production': '',
});
});
router.get('/products/:id', product);
......
......@@ -138,7 +138,8 @@ module.exports = function (req, res, next) {
res.render('product', _extends({
navProducts: 'active',
styles: ['product'],
scripts: ['utils', 'product']
scripts: ['utils', 'product'],
env: process.env.NODE_ENV === 'production' ? 'production': '',
}, item));
}).catch(function (err) {
console.log(err);
......
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['exports', 'isomorphic-fetch'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('isomorphic-fetch'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.isomorphicFetch);
global.xFetch = mod.exports;
}
})(this, function (exports, fetch) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
'use strict';
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
Object.defineProperty(exports, "__esModule", {
value: true
});
return target;
};
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
// import cookie from 'js-cookie';
var fetch = require('isomorphic-fetch');
// import cookie from 'js-cookie';
var errorMessages = function errorMessages(res) {
return res.status + ' ' + res.statusText;
};
var errorMessages = function errorMessages(res) {
return res.status + ' ' + res.statusText;
};
function check401(res) {
if (res.status === 401) {
// location.href = '/login';
console.log('401');
}
return res;
function check401(res) {
if (res.status === 401) {
// location.href = '/login';
console.log('401');
}
return res;
}
function check404(res) {
if (res.status === 404) {
// location.href='/404';
return Promise.reject(errorMessages(res));
}
return res;
}
function jsonParse(res) {
return res.json().then(function (json) {
return _extends({}, res, { json: json });
}).catch(function (err) {
return _extends({}, res, { json: { status: 0, message: '数据加载错误!' } });
});
function check404(res) {
if (res.status === 404) {
// location.href='/404';
return Promise.reject(errorMessages(res));
}
return res;
}
function jsonParse(res) {
return res.json().then(function (json) {
return _extends({}, res, { json: json });
}).catch(function (err) {
return _extends({}, res, { json: { status: 0, message: '数据加载错误!' } });
});
}
function errorMessageParse(res) {
var _res$json = res.json;
var status = _res$json.status;
var msg = _res$json.msg;
var message = _res$json.message;
var result = _res$json.result;
function errorMessageParse(res) {
var _res$json = res.json;
var status = _res$json.status;
var msg = _res$json.msg;
var message = _res$json.message;
var result = _res$json.result;
if (status != 1) {
return Promise.reject(msg || message);
}
return result;
if (status != 1) {
return Promise.reject(msg || message);
}
return result;
}
function xFetch(url, options) {
var opts = _extends({}, options);
if (opts.method != 'GET') {
opts.headers = _extends({}, opts.headers, {
'content-type': 'application/x-www-form-urlencoded'
});
}
function xFetch(url, options) {
var opts = _extends({}, options);
return fetch(url, opts).then(check401).then(check404).then(jsonParse).then(errorMessageParse);
if (opts.method != 'GET') {
opts.headers = _extends({}, opts.headers, {
'content-type': 'application/x-www-form-urlencoded'
});
}
exports.default = xFetch;
});
return fetch(url, opts).then(check401).then(check404).then(jsonParse).then(errorMessageParse);
}
exports.default = xFetch;
//# sourceMappingURL=xFetch.js.map
\ No newline at end of file
{"version":3,"sources":["xFetch.jsx"],"names":[],"mappings":";;2BAAqB,kB;;iCAAA,kB;;;;;;;;4BAAjB,K;;;;;;;;;;;;;;;;;;;;;AACJ;;AAEA,QAAM,gBAAgB,SAAhB,aAAgB,CAAC,GAAD;AAAA,eAAY,IAAI,MAAhB,SAA0B,IAAI,UAA9B;AAAA,KAAtB;;AAEA,aAAS,QAAT,CAAkB,GAAlB,EAAuB;AACnB,YAAI,IAAI,MAAJ,KAAe,GAAnB,EAAwB;AACpB;AACA,oBAAQ,GAAR,CAAY,KAAZ;AACH;AACD,eAAO,GAAP;AACH;;AAED,aAAS,QAAT,CAAkB,GAAlB,EAAuB;AACnB,YAAI,IAAI,MAAJ,KAAe,GAAnB,EAAwB;AACpB;AACA,mBAAO,QAAQ,MAAR,CAAe,cAAc,GAAd,CAAf,CAAP;AACH;AACD,eAAO,GAAP;AACH;;AAGD,aAAS,SAAT,CAAmB,GAAnB,EAAwB;AACpB,eAAO,IAAI,IAAJ,GAAW,IAAX,CAAgB;AAAA,gCAAa,GAAb,IAAkB,UAAlB;AAAA,SAAhB,EAA0C,KAA1C,CAAgD;AAAA,gCAAW,GAAX,IAAgB,MAAK,EAAC,QAAO,CAAR,EAAW,SAAS,SAApB,EAArB;AAAA,SAAhD,CAAP;AACH;;AAED,aAAS,iBAAT,CAA2B,GAA3B,EAAgC;AAAA,wBACW,IAAI,IADf;AAAA,YACrB,MADqB,aACrB,MADqB;AAAA,YACb,GADa,aACb,GADa;AAAA,YACR,OADQ,aACR,OADQ;AAAA,YACC,MADD,aACC,MADD;;AAE5B,YAAI,UAAU,CAAd,EAAiB;AACb,mBAAO,QAAQ,MAAR,CAAe,OAAO,OAAtB,CAAP;AACH;AACD,eAAO,MAAP;AACH;;AAED,aAAS,MAAT,CAAgB,GAAhB,EAAqB,OAArB,EAA8B;AAC1B,YAAM,oBAAW,OAAX,CAAN;;AAEA,YAAI,KAAK,MAAL,IAAe,KAAnB,EAA0B;AACtB,iBAAK,OAAL,gBACO,KAAK,OADZ;AAEI,gCAAgB;AAFpB;AAIH;;AAED,eAAO,MAAM,GAAN,EAAW,IAAX,EACF,IADE,CACG,QADH,EAEF,IAFE,CAEG,QAFH,EAGF,IAHE,CAGG,SAHH,EAIF,IAJE,CAIG,iBAJH,CAAP;AAMH;;sBAEc,M","file":"xFetch.js","sourcesContent":["var fetch = require('isomorphic-fetch');\n// import cookie from 'js-cookie';\n\nconst errorMessages = (res) => `${res.status} ${res.statusText}`;\n\nfunction check401(res) {\n if (res.status === 401) {\n // location.href = '/login';\n console.log('401');\n }\n return res;\n}\n\nfunction check404(res) {\n if (res.status === 404) {\n // location.href='/404';\n return Promise.reject(errorMessages(res));\n }\n return res;\n}\n\n\nfunction jsonParse(res) {\n return res.json().then(json => ({...res, json})).catch(err=> ({...res, json:{status:0, message: '数据加载错误!'}}));\n}\n\nfunction errorMessageParse(res) {\n const {status, msg, message, result} = res.json;\n if (status != 1) {\n return Promise.reject(msg || message);\n }\n return result;\n}\n\nfunction xFetch(url, options) {\n const opts = {...options};\n\n if (opts.method != 'GET') {\n opts.headers = {\n ...opts.headers,\n 'content-type': 'application/x-www-form-urlencoded'\n }\n }\n\n return fetch(url, opts)\n .then(check401)\n .then(check404)\n .then(jsonParse)\n .then(errorMessageParse);\n\n}\n\nexport default xFetch;\n"]}
\ No newline at end of file
{"version":3,"sources":["xFetch.jsx"],"names":[],"mappings":";;;;;;;;AAAA,IAAI,QAAS,QAAQ,kBAAR,CAAb;AACA;;AAEA,IAAM,gBAAgB,SAAhB,aAAgB,CAAC,GAAD;AAAA,WAAY,IAAI,MAAhB,SAA0B,IAAI,UAA9B;AAAA,CAAtB;;AAEA,SAAS,QAAT,CAAkB,GAAlB,EAAuB;AACnB,QAAI,IAAI,MAAJ,KAAe,GAAnB,EAAwB;AACpB;AACA,gBAAQ,GAAR,CAAY,KAAZ;AACH;AACD,WAAO,GAAP;AACH;;AAED,SAAS,QAAT,CAAkB,GAAlB,EAAuB;AACnB,QAAI,IAAI,MAAJ,KAAe,GAAnB,EAAwB;AACpB;AACA,eAAO,QAAQ,MAAR,CAAe,cAAc,GAAd,CAAf,CAAP;AACH;AACD,WAAO,GAAP;AACH;;AAGD,SAAS,SAAT,CAAmB,GAAnB,EAAwB;AACpB,WAAO,IAAI,IAAJ,GAAW,IAAX,CAAgB;AAAA,4BAAa,GAAb,IAAkB,UAAlB;AAAA,KAAhB,EAA0C,KAA1C,CAAgD;AAAA,4BAAW,GAAX,IAAgB,MAAK,EAAC,QAAO,CAAR,EAAW,SAAS,SAApB,EAArB;AAAA,KAAhD,CAAP;AACH;;AAED,SAAS,iBAAT,CAA2B,GAA3B,EAAgC;AAAA,oBACW,IAAI,IADf;AAAA,QACrB,MADqB,aACrB,MADqB;AAAA,QACb,GADa,aACb,GADa;AAAA,QACR,OADQ,aACR,OADQ;AAAA,QACC,MADD,aACC,MADD;;AAE5B,QAAI,UAAU,CAAd,EAAiB;AACb,eAAO,QAAQ,MAAR,CAAe,OAAO,OAAtB,CAAP;AACH;AACD,WAAO,MAAP;AACH;;AAED,SAAS,MAAT,CAAgB,GAAhB,EAAqB,OAArB,EAA8B;AAC1B,QAAM,oBAAW,OAAX,CAAN;;AAEA,QAAI,KAAK,MAAL,IAAe,KAAnB,EAA0B;AACtB,aAAK,OAAL,gBACO,KAAK,OADZ;AAEI,4BAAgB;AAFpB;AAIH;;AAED,WAAO,MAAM,GAAN,EAAW,IAAX,EACF,IADE,CACG,QADH,EAEF,IAFE,CAEG,QAFH,EAGF,IAHE,CAGG,SAHH,EAIF,IAJE,CAIG,iBAJH,CAAP;AAMH;;kBAEc,M","file":"xFetch.js","sourcesContent":["var fetch = require('isomorphic-fetch');\n// import cookie from 'js-cookie';\n\nconst errorMessages = (res) => `${res.status} ${res.statusText}`;\n\nfunction check401(res) {\n if (res.status === 401) {\n // location.href = '/login';\n console.log('401');\n }\n return res;\n}\n\nfunction check404(res) {\n if (res.status === 404) {\n // location.href='/404';\n return Promise.reject(errorMessages(res));\n }\n return res;\n}\n\n\nfunction jsonParse(res) {\n return res.json().then(json => ({...res, json})).catch(err=> ({...res, json:{status:0, message: '数据加载错误!'}}));\n}\n\nfunction errorMessageParse(res) {\n const {status, msg, message, result} = res.json;\n if (status != 1) {\n return Promise.reject(msg || message);\n }\n return result;\n}\n\nfunction xFetch(url, options) {\n const opts = {...options};\n\n if (opts.method != 'GET') {\n opts.headers = {\n ...opts.headers,\n 'content-type': 'application/x-www-form-urlencoded'\n }\n }\n\n return fetch(url, opts)\n .then(check401)\n .then(check404)\n .then(jsonParse)\n .then(errorMessageParse);\n\n}\n\nexport default xFetch;\n"]}
\ No newline at end of file
......@@ -4,10 +4,25 @@
<meta charset="UTF-8">
<title>富豆优投</title>
<link rel="icon" href="/favicon.ico"/>
<link rel="stylesheet" href="/stylesheets/style.css"/>
{{#each styles}}
<link rel="stylesheet" href="/stylesheets/{{this}}.css"/>
{{/each}}
<meta env="{{env}}"/>
{{#if env}}
<link rel="stylesheet" href="/stylesheets/style.css"/>
{{#each styles}}
<link rel="stylesheet" href="/stylesheets/{{this}}.css"/>
{{/each}}
{{else}}
<link rel="stylesheet" href="/stylesheets/style.css"/>
{{#each styles}}
<link rel="stylesheet" href="/stylesheets/{{this}}.css"/>
{{/each}}
{{/if}}
<!--[if lt IE 9]>
<script src="/javascripts/es5-shim.min.js"></script>
<script src="/javascripts/es5-sham.min.js"></script>
<script src="/javascripts/html5shiv.min.js"></script>
<script src="/javascripts/promise-polyfill.min.js"></script>
<![endif]-->
</head>
<body>
<header id="header">
......@@ -33,12 +48,19 @@
<address>上海市浦东新区福山路458号同盛大厦1808室</address>
</footer>
<script src="/javascripts/jquery-1.8.3.min.js"></script>
{{#each scripts}}
<script src="/javascripts/{{this}}.js"></script>
{{/each}}
{{#if env}}
{{#each scripts}}
<script src="/javascripts/{{this}}.min.js"></script>
{{/each}}
{{else}}
{{#each scripts}}
<script src="/javascripts/{{this}}.js"></script>
{{/each}}
{{/if}}
<script>
var _hmt = _hmt || [];
(function() {
(function () {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?4b407617527991fb96f9d8520f67e0e2";
var s = document.getElementsByTagName("script")[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment