From f38094664cec77ad3195e916497787f8b044e770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81sar=20Andreu?= Date: Wed, 6 Aug 2014 18:09:33 -0700 Subject: [PATCH] chore(release): td.js version 1.1.0 --- CHANGELOG.md | 7 +++ README.md | 6 +- bower.json | 2 +- dist/td.js | 151 +++++++++++++++++++++++++++++-------------------- dist/td.min.js | 6 +- lib/version.js | 2 +- package.json | 2 +- 7 files changed, 105 insertions(+), 71 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b57829c6..c89e7ef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 1.1.0 + +* Fix issue where domain and expiration were not passed to tracking cookie setter +* Tracking cookie is now always set on the top level qualified domain +* `expiration` key renamed to `expires` +* Remove `none` option from cookie domain settings + ## 1.0.0 * Convert to CommonJS with Browserify diff --git a/README.md b/README.md index fcaeccd4..6e4146ec 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Install the td-js-sdk on your page by copying the JavaScript snippet below and p ```html ``` @@ -164,8 +164,8 @@ If the database does not exist and you have permissions, it will be created for * **config.clientId** : String (optional) - uuid for this client. When undefined it will attempt fetching the value from a cookie if storage is enabled, if none is found it will generate a v4 uuid * **config.storage** : Object | String (optional) - storage configuration object. When `none` it will disable cookie storage * **config.storage.name** : String (optional) - cookie name. Default: `_td` -* **config.storage.expiration** : Number (optional) - cookie expiration in seconds. When 0 it will expire with the session. Default: `63072000` (2 years) -* **config.storage.domain** : String (optional) - cookie domain. Set to `none` to use the browser default. Default: result of `tldjs.getDomain(document.location.host)`, [tldjs](https://github.com/oncletom/tld.js) is a library to get the qualified domain from a host string +* **config.storage.expires** : Number (optional) - cookie expiration in seconds. When 0 it will expire with the session. Default: `63072000` (2 years) +* **config.storage.domain** : String (optional) - cookie domain. Default: result of `document.location.hostname` **Returns:** diff --git a/bower.json b/bower.json index 150b22e0..17eb8498 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "td-js-sdk", - "version": "1.0.0", + "version": "1.1.0", "homepage": "https://github.com/treasure-data/td-js-sdk", "authors": [ "Cesar Andreu " diff --git a/dist/td.js b/dist/td.js index e925f2f3..7d9b99c0 100755 --- a/dist/td.js +++ b/dist/td.js @@ -327,14 +327,10 @@ function configureStorage (storage) { storage = _.isObject(storage) ? storage : {}; _.defaults(storage, { name: '_td', - expiration: 63072000, + expires: 63072000, domain: document.location.hostname }); - if (storage.domain === 'none') { - storage.domain = undefined; - } - return storage; } @@ -360,13 +356,12 @@ function generateUUID () { * config.storage.name (String) * - cookie name * - defaults to _td - * config.storage.expiration (Number) + * config.storage.expires (Number) * - cookie duration in seconds * - when 0 no cookie gets set * - defaults to 63072000 (2 years) * config.storage.domain (String) * - domain on which to set the cookie - * - when 'none' it will use browser default * - defaults to document.location.hostname * config.track (Object) * - tracking configuration object @@ -398,13 +393,32 @@ exports.configure = function configure (config) { } this.client.track.uuid = config.clientId; - // We only save cookies if storage is enabled and expiration is non-zero - // Future work: save on top level domain that gets allowed - // For example: www.google.com and foo.google.com, should save to google.com + // Expire all domain cookies + var expireCookie = function (storage) { + var max = (storage.domain || '').split('.').length; + for (var i = 0; i <= max; i++) { + cookie.expire(storage.name); + } + }; + + // Keep trying to set cookie on top level domain until it's allowed + var setCookie = function (storage, uuid) { + var clone = _.clone(storage); + var max = storage.domain.split('.').length; + for (var i = 0; i <= max; i++) { + clone.domain = storage.domain.split('.').slice(0 - i); + cookie(storage.name, uuid, clone); + if (cookie.get(storage.name)) { + break; + } + } + }; + + // Only save cookies if storage is enabled and expires is non-zero if (config.storage) { - cookie.expire(config.storage.name); - if (config.storage.expiration) { - cookie.set(config.storage.name, this.client.track.uuid); + if (config.storage.expires) { + expireCookie(config.storage); + setCookie(config.storage, this.client.track.uuid); } } @@ -749,7 +763,7 @@ module.exports = Treasure; },{"./configurator":1,"./lodash":4,"./plugins/track":5,"./record":6,"./version":8,"domready":18}],8:[function(require,module,exports){ 'use strict'; -module.exports = '1.0.0'; +module.exports = '1.1.0'; },{}],9:[function(require,module,exports){ /*! @@ -768,22 +782,35 @@ exports.INSPECT_MAX_BYTES = 50 Buffer.poolSize = 8192 /** - * If `Buffer._useTypedArrays`: + * If `TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (compatible down to IE6) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Note: + * + * - Implementation must support adding new properties to `Uint8Array` instances. + * Firefox 4-29 lacked support, fixed in Firefox 30+. + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + * + * We detect these buggy browsers and set `TYPED_ARRAY_SUPPORT` to `false` so they will + * get the Object implementation, which is slower but will work correctly. */ -Buffer._useTypedArrays = (function () { - // Detect if browser supports Typed Arrays. Supported browsers are IE 10+, Firefox 4+, - // Chrome 7+, Safari 5.1+, Opera 11.6+, iOS 4.2+. If the browser does not support adding - // properties to `Uint8Array` instances, then that's the same as no `Uint8Array` support - // because we need to be able to add all the node Buffer API methods. This is an issue - // in Firefox 4-29. Now fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=695438 +var TYPED_ARRAY_SUPPORT = (function () { try { var buf = new ArrayBuffer(0) var arr = new Uint8Array(buf) arr.foo = function () { return 42 } - return 42 === arr.foo() && - typeof arr.subarray === 'function' // Chrome 9-10 lack `subarray` + return 42 === arr.foo() && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) { return false } @@ -807,23 +834,23 @@ function Buffer (subject, encoding, noZero) { var type = typeof subject - if (encoding === 'base64' && type === 'string') { - subject = base64clean(subject) - } - // Find the length var length if (type === 'number') - length = coerce(subject) - else if (type === 'string') + length = subject > 0 ? subject >>> 0 : 0 + else if (type === 'string') { + if (encoding === 'base64') + subject = base64clean(subject) length = Buffer.byteLength(subject, encoding) - else if (type === 'object') - length = coerce(subject.length) // assume that object is array-like - else + } else if (type === 'object' && subject !== null) { // assume object is array-like + if (subject.type === 'Buffer' && isArray(subject.data)) + subject = subject.data + length = +subject.length > 0 ? Math.floor(+subject.length) : 0 + } else throw new Error('First argument needs to be a number, array or string.') var buf - if (Buffer._useTypedArrays) { + if (TYPED_ARRAY_SUPPORT) { // Preferred: Return an augmented `Uint8Array` instance for best performance buf = Buffer._augment(new Uint8Array(length)) } else { @@ -834,7 +861,7 @@ function Buffer (subject, encoding, noZero) { } var i - if (Buffer._useTypedArrays && typeof subject.byteLength === 'number') { + if (TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') { // Speed optimization -- use set if we're copying from a typed array buf._set(subject) } else if (isArrayish(subject)) { @@ -848,7 +875,7 @@ function Buffer (subject, encoding, noZero) { } } else if (type === 'string') { buf.write(subject, 0, encoding) - } else if (type === 'number' && !Buffer._useTypedArrays && !noZero) { + } else if (type === 'number' && !TYPED_ARRAY_SUPPORT && !noZero) { for (i = 0; i < length; i++) { buf[i] = 0 } @@ -880,7 +907,7 @@ Buffer.isEncoding = function (encoding) { } Buffer.isBuffer = function (b) { - return !!(b !== null && b !== undefined && b._isBuffer) + return !!(b != null && b._isBuffer) } Buffer.byteLength = function (str, encoding) { @@ -1155,7 +1182,7 @@ Buffer.prototype.copy = function (target, target_start, start, end) { var len = end - start - if (len < 100 || !Buffer._useTypedArrays) { + if (len < 100 || !TYPED_ARRAY_SUPPORT) { for (var i = 0; i < len; i++) { target[i + target_start] = this[i + start] } @@ -1227,10 +1254,29 @@ function utf16leSlice (buf, start, end) { Buffer.prototype.slice = function (start, end) { var len = this.length - start = clamp(start, len, 0) - end = clamp(end, len, len) + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len; + if (start < 0) + start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) + end = 0 + } else if (end > len) { + end = len + } + + if (end < start) + end = start - if (Buffer._useTypedArrays) { + if (TYPED_ARRAY_SUPPORT) { return Buffer._augment(this.subarray(start, end)) } else { var sliceLen = end - start @@ -1689,7 +1735,7 @@ Buffer.prototype.inspect = function () { */ Buffer.prototype.toArrayBuffer = function () { if (typeof Uint8Array !== 'undefined') { - if (Buffer._useTypedArrays) { + if (TYPED_ARRAY_SUPPORT) { return (new Buffer(this)).buffer } else { var buf = new Uint8Array(this.length) @@ -1782,25 +1828,6 @@ function stringtrim (str) { return str.replace(/^\s+|\s+$/g, '') } -// slice(start, end) -function clamp (index, len, defaultValue) { - if (typeof index !== 'number') return defaultValue - index = ~~index; // Coerce to integer. - if (index >= len) return len - if (index >= 0) return index - index += len - if (index >= 0) return index - return 0 -} - -function coerce (length) { - // Coerce length to a number (possibly NaN), round up - // in case it's fractional (e.g. 123.456) then do a - // double negate to coerce a NaN to 0. Easy, right? - length = ~~Math.ceil(+length) - return length < 0 ? 0 : length -} - function isArray (subject) { return (Array.isArray || function (subject) { return Object.prototype.toString.call(subject) === '[object Array]' @@ -3787,7 +3814,7 @@ var isArguments = function isArguments(value) { var str = _toString.call(value); var isArgs = str === '[object Arguments]'; if (!isArgs) { - isArgs = !isArray(str) + isArgs = !isArray(value) && value !== null && typeof value === 'object' && typeof value.length === 'number' diff --git a/dist/td.min.js b/dist/td.min.js index bb75a74c..9b96ba3b 100755 --- a/dist/td.min.js +++ b/dist/td.min.js @@ -1,4 +1,4 @@ -!function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return o(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a=e;e++)t.push(arguments[e]);n.isObject(console)&&this.client.logging&&console.log.apply(console,t)},e.prototype.configure=r.configure,e.prototype.set=r.set,e.prototype.get=r.get,e.prototype.ready=t("domready"),n.mixin(e.prototype,o),e.Plugins={Track:t("./plugins/track")},n.forIn(e.Plugins,function(t){n.forIn(t,function(t,n){e.prototype[n]||(e.prototype[n]=t)})}),e}();e.exports=i},{"./configurator":1,"./lodash":4,"./plugins/track":5,"./record":6,"./version":8,domready:18}],8:[function(t,e){"use strict";e.exports="1.0.0"},{}],9:[function(t,e,n){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);var o=typeof t;"base64"===e&&"string"===o&&(t=O(t));var i;if("number"===o)i=A(t);else if("string"===o)i=r.byteLength(t,e);else{if("object"!==o)throw new Error("First argument needs to be a number, array or string.");i=A(t.length)}var a;r._useTypedArrays?a=r._augment(new Uint8Array(i)):(a=this,a.length=i,a._isBuffer=!0);var u;if(r._useTypedArrays&&"number"==typeof t.byteLength)a._set(t);else if(N(t))if(r.isBuffer(t))for(u=0;i>u;u++)a[u]=t.readUInt8(u);else for(u=0;i>u;u++)a[u]=(t[u]%256+256)%256;else if("string"===o)a.write(t,0,e);else if("number"===o&&!r._useTypedArrays&&!n)for(u=0;i>u;u++)a[u]=0;return a}function o(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=e.length;J(i%2===0,"Invalid hex string"),r>i/2&&(r=i/2);for(var a=0;r>a;a++){var u=parseInt(e.substr(2*a,2),16);J(!isNaN(u),"Invalid hex string"),t[n+a]=u}return a}function i(t,e,n,r){var o=F(D(e),t,n,r);return o}function a(t,e,n,r){var o=F(L(e),t,n,r);return o}function u(t,e,n,r){return a(t,e,n,r)}function s(t,e,n,r){var o=F(R(e),t,n,r);return o}function c(t,e,n,r){var o=F(M(e),t,n,r);return o}function f(t,e,n){return z.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function l(t,e,n){var r="",o="";n=Math.min(t.length,n);for(var i=e;n>i;i++)t[i]<=127?(r+=q(o)+String.fromCharCode(t[i]),o=""):o+="%"+t[i].toString(16);return r+q(o)}function h(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(t[o]);return r}function p(t,e,n){return h(t,e,n)}function d(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=e;n>i;i++)o+=B(t[i]);return o}function g(t,e,n){for(var r=t.slice(e,n),o="",i=0;i=o)){var i;return n?(i=t[e],o>e+1&&(i|=t[e+1]<<8)):(i=t[e]<<8,o>e+1&&(i|=t[e+1])),i}}function y(t,e,n,r){r||(J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==e&&null!==e,"missing offset"),J(e+3=o)){var i;return n?(o>e+2&&(i=t[e+2]<<16),o>e+1&&(i|=t[e+1]<<8),i|=t[e],o>e+3&&(i+=t[e+3]<<24>>>0)):(o>e+1&&(i=t[e+1]<<16),o>e+2&&(i|=t[e+2]<<8),o>e+3&&(i|=t[e+3]),i+=t[e]<<24>>>0),i}}function m(t,e,n,r){r||(J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==e&&null!==e,"missing offset"),J(e+1=o)){var i=v(t,e,n,!0),a=32768&i;return a?-1*(65535-i+1):i}}function b(t,e,n,r){r||(J("boolean"==typeof n,"missing or invalid endian"),J(void 0!==e&&null!==e,"missing offset"),J(e+3=o)){var i=y(t,e,n,!0),a=2147483648&i;return a?-1*(4294967295-i+1):i}}function w(t,e,n,r){return r||(J("boolean"==typeof n,"missing or invalid endian"),J(e+3=i)){for(var a=0,u=Math.min(i-n,2);u>a;a++)t[n+a]=(e&255<<8*(r?a:1-a))>>>8*(r?a:1-a);return n+2}}function j(t,e,n,r,o){o||(J(void 0!==e&&null!==e,"missing value"),J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==n&&null!==n,"missing offset"),J(n+3=i)){for(var a=0,u=Math.min(i-n,4);u>a;a++)t[n+a]=e>>>8*(r?a:3-a)&255;return n+4}}function E(t,e,n,r,o){o||(J(void 0!==e&&null!==e,"missing value"),J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==n&&null!==n,"missing offset"),J(n+1=i))return e>=0?x(t,e,n,r,o):x(t,65535+e+1,n,r,o),n+2}function C(t,e,n,r,o){o||(J(void 0!==e&&null!==e,"missing value"),J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==n&&null!==n,"missing offset"),J(n+3=i))return e>=0?j(t,e,n,r,o):j(t,4294967295+e+1,n,r,o),n+4}function k(t,e,n,r,o){o||(J(void 0!==e&&null!==e,"missing value"),J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==n&&null!==n,"missing offset"),J(n+3=i))return X.write(t,e,n,r,23,4),n+4}function S(t,e,n,r,o){o||(J(void 0!==e&&null!==e,"missing value"),J("boolean"==typeof r,"missing or invalid endian"),J(void 0!==n&&null!==n,"missing offset"),J(n+7=i))return X.write(t,e,n,r,52,8),n+8}function O(t){for(t=I(t).replace(K,"");t.length%4!==0;)t+="=";return t}function I(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function T(t,e,n){return"number"!=typeof t?n:(t=~~t,t>=e?e:t>=0?t:(t+=e,t>=0?t:0))}function A(t){return t=~~Math.ceil(+t),0>t?0:t}function U(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function N(t){return U(t)||r.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function B(t){return 16>t?"0"+t.toString(16):t.toString(16)}function D(t){for(var e=[],n=0;n=r)e.push(r);else{var o=n;r>=55296&&57343>=r&&n++;for(var i=encodeURIComponent(t.slice(o,n+1)).substr(1).split("%"),a=0;a>8,r=e%256,o.push(r),o.push(n);return o}function R(t){return z.toByteArray(t)}function F(t,e,n,r){for(var o=0;r>o&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}function q(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function P(t,e){J("number"==typeof t,"cannot write a non-number as a number"),J(t>=0,"specified a negative value for writing an unsigned value"),J(e>=t,"value is larger than maximum value for type"),J(Math.floor(t)===t,"value has a fractional component")}function $(t,e,n){J("number"==typeof t,"cannot write a non-number as a number"),J(e>=t,"value larger than maximum allowed value"),J(t>=n,"value smaller than minimum allowed value"),J(Math.floor(t)===t,"value has a fractional component")}function H(t,e,n){J("number"==typeof t,"cannot write a non-number as a number"),J(e>=t,"value larger than maximum allowed value"),J(t>=n,"value smaller than minimum allowed value")}function J(t,e){if(!t)throw new Error(e||"Failed assertion")}var z=t("base64-js"),X=t("ieee754");n.Buffer=r,n.SlowBuffer=r,n.INSPECT_MAX_BYTES=50,r.poolSize=8192,r._useTypedArrays=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray}catch(n){return!1}}(),r.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.isBuffer=function(t){return!(null===t||void 0===t||!t._isBuffer)},r.byteLength=function(t,e){var n;switch(t=t.toString(),e||"utf8"){case"hex":n=t.length/2;break;case"utf8":case"utf-8":n=D(t).length;break;case"ascii":case"binary":case"raw":n=t.length;break;case"base64":n=R(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*t.length;break;default:throw new Error("Unknown encoding")}return n},r.concat=function(t,e){if(J(U(t),"Usage: Buffer.concat(list[, length])"),0===t.length)return new r(0);if(1===t.length)return t[0];var n;if(void 0===e)for(e=0,n=0;ni&&t[i]===e[i];i++);return i!==a&&(n=t[i],o=e[i]),o>n?-1:n>o?1:0},r.prototype.write=function(t,e,n,r){if(isFinite(e))isFinite(n)||(r=n,n=void 0);else{var f=r;r=e,e=n,n=f}e=Number(e)||0;var l=this.length-e;n?(n=Number(n),n>l&&(n=l)):n=l,r=String(r||"utf8").toLowerCase();var h;switch(r){case"hex":h=o(this,t,e,n);break;case"utf8":case"utf-8":h=i(this,t,e,n);break;case"ascii":h=a(this,t,e,n);break;case"binary":h=u(this,t,e,n);break;case"base64":h=s(this,t,e,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=c(this,t,e,n);break;default:throw new Error("Unknown encoding")}return h},r.prototype.toString=function(t,e,n){var r=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,n=void 0===n?r.length:Number(n),n===e)return"";var o;switch(t){case"hex":o=d(r,e,n);break;case"utf8":case"utf-8":o=l(r,e,n);break;case"ascii":o=h(r,e,n);break;case"binary":o=p(r,e,n);break;case"base64":o=f(r,e,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=g(r,e,n);break;default:throw new Error("Unknown encoding")}return o},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.equals=function(t){return J(r.isBuffer(t),"Argument must be a Buffer"),0===r.compare(this,t)},r.prototype.compare=function(t){return J(r.isBuffer(t),"Argument must be a Buffer"),r.compare(this,t)},r.prototype.copy=function(t,e,n,o){var i=this;if(n||(n=0),o||0===o||(o=this.length),e||(e=0),o!==n&&0!==t.length&&0!==i.length){J(o>=n,"sourceEnd < sourceStart"),J(e>=0&&e=0&&n=0&&o<=i.length,"sourceEnd out of bounds"),o>this.length&&(o=this.length),t.length-ea||!r._useTypedArrays)for(var u=0;a>u;u++)t[u+e]=this[u+n];else t._set(this.subarray(n,n+a),e)}},r.prototype.slice=function(t,e){var n=this.length;if(t=T(t,n,0),e=T(e,n,n),r._useTypedArrays)return r._augment(this.subarray(t,e));for(var o=e-t,i=new r(o,void 0,!0),a=0;o>a;a++)i[a]=this[a+t];return i},r.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},r.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},r.prototype.readUInt8=function(t,e){return e||(J(void 0!==t&&null!==t,"missing offset"),J(t=this.length?void 0:this[t]},r.prototype.readUInt16LE=function(t,e){return v(this,t,!0,e)},r.prototype.readUInt16BE=function(t,e){return v(this,t,!1,e)},r.prototype.readUInt32LE=function(t,e){return y(this,t,!0,e)},r.prototype.readUInt32BE=function(t,e){return y(this,t,!1,e)},r.prototype.readInt8=function(t,e){if(e||(J(void 0!==t&&null!==t,"missing offset"),J(t=this.length)){var n=128&this[t];return n?-1*(255-this[t]+1):this[t]}},r.prototype.readInt16LE=function(t,e){return m(this,t,!0,e)},r.prototype.readInt16BE=function(t,e){return m(this,t,!1,e)},r.prototype.readInt32LE=function(t,e){return b(this,t,!0,e)},r.prototype.readInt32BE=function(t,e){return b(this,t,!1,e)},r.prototype.readFloatLE=function(t,e){return w(this,t,!0,e)},r.prototype.readFloatBE=function(t,e){return w(this,t,!1,e)},r.prototype.readDoubleLE=function(t,e){return _(this,t,!0,e)},r.prototype.readDoubleBE=function(t,e){return _(this,t,!1,e)},r.prototype.writeUInt8=function(t,e,n){return n||(J(void 0!==t&&null!==t,"missing value"),J(void 0!==e&&null!==e,"missing offset"),J(e=this.length?void 0:(this[e]=t,e+1)},r.prototype.writeUInt16LE=function(t,e,n){return x(this,t,e,!0,n)},r.prototype.writeUInt16BE=function(t,e,n){return x(this,t,e,!1,n)},r.prototype.writeUInt32LE=function(t,e,n){return j(this,t,e,!0,n)},r.prototype.writeUInt32BE=function(t,e,n){return j(this,t,e,!1,n)},r.prototype.writeInt8=function(t,e,n){return n||(J(void 0!==t&&null!==t,"missing value"),J(void 0!==e&&null!==e,"missing offset"),J(e=this.length?void 0:(t>=0?this.writeUInt8(t,e,n):this.writeUInt8(255+t+1,e,n),e+1)},r.prototype.writeInt16LE=function(t,e,n){return E(this,t,e,!0,n)},r.prototype.writeInt16BE=function(t,e,n){return E(this,t,e,!1,n)},r.prototype.writeInt32LE=function(t,e,n){return C(this,t,e,!0,n)},r.prototype.writeInt32BE=function(t,e,n){return C(this,t,e,!1,n)},r.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},r.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},r.prototype.writeDoubleLE=function(t,e,n){return S(this,t,e,!0,n)},r.prototype.writeDoubleBE=function(t,e,n){return S(this,t,e,!1,n)},r.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),J(n>=e,"end < start"),n!==e&&0!==this.length){J(e>=0&&e=0&&n<=this.length,"end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var o=D(t.toString()),i=o.length;for(r=e;n>r;r++)this[r]=o[r%i]}return this}},r.prototype.inspect=function(){for(var t=[],e=this.length,r=0;e>r;r++)if(t[r]=B(this[r]),r===n.INSPECT_MAX_BYTES){t[r+1]="...";break}return""},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r._useTypedArrays)return new r(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;n>e;e+=1)t[e]=this[e];return t.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var Z=r.prototype;r._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.equals=Z.equals,t.compare=Z.compare,t.copy=Z.copy,t.slice=Z.slice,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t};var K=/[^+\/0-9A-z]/g},{"base64-js":10,ieee754:11}],10:[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===a?62:e===u?63:s>e?-1:s+10>e?e-s+26+26:f+26>e?e-f:c+26>e?e-c+26:void 0}function n(t){function n(t){c[l++]=t}var r,o,a,u,s,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;s="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,c=new i(3*t.length/4-s),a=s>0?t.length-4:t.length;var l=0;for(r=0,o=0;a>r;r+=4,o+=3)u=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&u)>>16),n((65280&u)>>8),n(255&u);return 2===s?(u=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&u)):1===s&&(u=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(u>>8&255),n(255&u)),c}function o(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var o,i,a,u=t.length%3,s="";for(o=0,a=t.length-u;a>o;o+=3)i=(t[o]<<16)+(t[o+1]<<8)+t[o+2],s+=n(i);switch(u){case 1:i=t[t.length-1],s+=e(i>>2),s+=e(i<<4&63),s+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],s+=e(i>>10),s+=e(i>>4&63),s+=e(i<<2&63),s+="="}return s}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),u="/".charCodeAt(0),s="0".charCodeAt(0),c="a".charCodeAt(0),f="A".charCodeAt(0);t.toByteArray=n,t.fromByteArray=o}("undefined"==typeof n?this.base64js={}:n)},{}],11:[function(t,e,n){n.read=function(t,e,n,r,o){var i,a,u=8*o-r-1,s=(1<>1,f=-7,l=n?o-1:0,h=n?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=u;f>0;i=256*i+t[e+l],l+=h,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===s)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},n.write=function(t,e,n,r,o,i){var a,u,s,c=8*i-o-1,f=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),e+=a+l>=1?h/s:h*Math.pow(2,1-l),e*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,o),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[n+p]=255&u,p+=d,u/=256,o-=8);for(a=a<0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*g}},{}],12:[function(t,e,n){(function(t){!function(r){function o(t){throw RangeError(N[t])}function i(t,e){for(var n=t.length;n--;)t[n]=e(t[n]);return t}function a(t,e){return i(t.split(U),e).join(".")}function u(t){for(var e,n,r=[],o=0,i=t.length;i>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&i>o?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function s(t){return i(t,function(t){var e="";return t>65535&&(t-=65536,e+=L(t>>>10&1023|55296),t=56320|1023&t),e+=L(t)}).join("")}function c(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:x}function f(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function l(t,e,n){var r=0;for(t=n?D(t/k):t>>1,t+=D(t/e);t>B*E>>1;r+=x)t=D(t/B);return D(r+(B+1)*t/(t+C))}function h(t){var e,n,r,i,a,u,f,h,p,d,g=[],v=t.length,y=0,m=O,b=S;for(n=t.lastIndexOf(I),0>n&&(n=0),r=0;n>r;++r)t.charCodeAt(r)>=128&&o("not-basic"),g.push(t.charCodeAt(r));for(i=n>0?n+1:0;v>i;){for(a=y,u=1,f=x;i>=v&&o("invalid-input"),h=c(t.charCodeAt(i++)),(h>=x||h>D((_-y)/u))&&o("overflow"),y+=h*u,p=b>=f?j:f>=b+E?E:f-b,!(p>h);f+=x)d=x-p,u>D(_/d)&&o("overflow"),u*=d;e=g.length+1,b=l(y-a,e,0==a),D(y/e)>_-m&&o("overflow"),m+=D(y/e),y%=e,g.splice(y++,0,m)}return s(g)}function p(t){var e,n,r,i,a,s,c,h,p,d,g,v,y,m,b,w=[];for(t=u(t),v=t.length,e=O,n=0,a=S,s=0;v>s;++s)g=t[s],128>g&&w.push(L(g));for(r=i=w.length,i&&w.push(I);v>r;){for(c=_,s=0;v>s;++s)g=t[s],g>=e&&c>g&&(c=g);for(y=r+1,c-e>D((_-n)/y)&&o("overflow"),n+=(c-e)*y,e=c,s=0;v>s;++s)if(g=t[s],e>g&&++n>_&&o("overflow"),g==e){for(h=n,p=x;d=a>=p?j:p>=a+E?E:p-a,!(d>h);p+=x)b=h-d,m=x-d,w.push(L(f(d+b%m,0))),h=D(b/m);w.push(L(f(h,0))),a=l(n,y,r==i),n=0,++r}++n,++e}return w.join("")}function d(t){return a(t,function(t){return T.test(t)?h(t.slice(4).toLowerCase()):t})}function g(t){return a(t,function(t){return A.test(t)?"xn--"+p(t):t})}var v="object"==typeof n&&n,y="object"==typeof e&&e&&e.exports==v&&e,m="object"==typeof t&&t;(m.global===m||m.window===m)&&(r=m);var b,w,_=2147483647,x=36,j=1,E=26,C=38,k=700,S=72,O=128,I="-",T=/^xn--/,A=/[^ -~]/,U=/\x2E|\u3002|\uFF0E|\uFF61/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=x-j,D=Math.floor,L=String.fromCharCode;if(b={version:"1.2.4",ucs2:{decode:u,encode:s},decode:h,encode:p,toASCII:g,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return b});else if(v&&!v.nodeType)if(y)y.exports=b;else for(w in b)b.hasOwnProperty(w)&&(v[w]=b[w]);else r.punycode=b}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(t,e){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,o,i){e=e||"&",o=o||"=";var a={};if("string"!=typeof t||0===t.length)return a;var u=/\+/g;t=t.split(e);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var c=t.length;s>0&&c>s&&(c=s);for(var f=0;c>f;++f){var l,h,p,d,g=t[f].replace(u,"%20"),v=g.indexOf(o);v>=0?(l=g.substr(0,v),h=g.substr(v+1)):(l=g,h=""),p=decodeURIComponent(l),d=decodeURIComponent(h),n(a,p)?r(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],14:[function(t,e){"use strict";function n(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(g),y=["'"].concat(v),m=["%","/","?",";","#"].concat(y),b=["/","?","#"],w=255,_=/^[a-z0-9A-Z_-]{0,63}$/,x=/^([a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=t("querystring");r.prototype.parse=function(t,e,n){if(!s(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t;r=r.trim();var o=p.exec(r);if(o){o=o[0];var i=o.toLowerCase();this.protocol=i,r=r.substr(o.length)}if(n||o||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===r.substr(0,2);!a||o&&E[o]||(r=r.substr(2),this.slashes=!0)}if(!E[o]&&(a||o&&!C[o])){for(var u=-1,c=0;cf)&&(u=f)}var l,d;d=-1===u?r.lastIndexOf("@"):r.lastIndexOf("@",u),-1!==d&&(l=r.slice(0,d),r=r.slice(d+1),this.auth=decodeURIComponent(l)),u=-1;for(var c=0;cf)&&(u=f)}-1===u&&(u=r.length),this.host=r.slice(0,u),r=r.slice(u),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var v=this.hostname.split(/\./),c=0,S=v.length;S>c;c++){var O=v[c];if(O&&!O.match(_)){for(var I="",T=0,A=O.length;A>T;T++)I+=O.charCodeAt(T)>127?"x":O[T];if(!I.match(_)){var U=v.slice(0,c),N=v.slice(c+1),B=O.match(x);B&&(U.push(B[1]),N.unshift(B[2])),N.length&&(r="/"+N.join(".")+r),this.hostname=U.join(".");break}}}if(this.hostname=this.hostname.length>w?"":this.hostname.toLowerCase(),!g){for(var D=this.hostname.split("."),L=[],c=0;cc;c++){var q=y[c],P=encodeURIComponent(q);P===q&&(P=escape(q)),r=r.split(q).join(P)}var $=r.indexOf("#");-1!==$&&(this.hash=r.substr($),r=r.slice(0,$));var H=r.indexOf("?");if(-1!==H?(this.search=r.substr(H),this.query=r.substr(H+1),e&&(this.query=k.parse(this.query)),r=r.slice(0,H)):e&&(this.search="",this.query={}),r&&(this.pathname=r),C[i]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var R=this.pathname||"",M=this.search||"";this.path=R+M}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(i=k.stringify(this.query));var a=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||C[e])&&o!==!1?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+o+n+a+r},r.prototype.resolve=function(t){return this.resolveObject(o(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(s(t)){var e=new r;e.parse(t,!1,!0),t=e}var n=new r;if(Object.keys(this).forEach(function(t){n[t]=this[t]},this),n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(n[e]=t[e])}),C[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(t.protocol&&t.protocol!==n.protocol){if(!C[t.protocol])return Object.keys(t).forEach(function(e){n[e]=t[e]}),n.href=n.format(),n;if(n.protocol=t.protocol,t.host||E[t.protocol])n.pathname=t.pathname;else{for(var o=(t.pathname||"").split("/");o.length&&!(t.host=o.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),n.pathname=o.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var i=n.pathname||"",a=n.search||"";n.path=i+a}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var u=n.pathname&&"/"===n.pathname.charAt(0),c=t.host||t.pathname&&"/"===t.pathname.charAt(0),h=c||u||n.host&&t.pathname,p=h,d=n.pathname&&n.pathname.split("/")||[],o=t.pathname&&t.pathname.split("/")||[],g=n.protocol&&!C[n.protocol];if(g&&(n.hostname="",n.port=null,n.host&&(""===d[0]?d[0]=n.host:d.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===o[0]?o[0]=t.host:o.unshift(t.host)),t.host=null),h=h&&(""===o[0]||""===d[0])),c)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,d=o;else if(o.length)d||(d=[]),d.pop(),d=d.concat(o),n.search=t.search,n.query=t.query;else if(!l(t.search)){if(g){n.hostname=n.host=d.shift();var v=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;v&&(n.auth=v.shift(),n.host=n.hostname=v.shift())}return n.search=t.search,n.query=t.query,f(n.pathname)&&f(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!d.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var y=d.slice(-1)[0],m=(n.host||t.host)&&("."===y||".."===y)||""===y,b=0,w=d.length;w>=0;w--)y=d[w],"."==y?d.splice(w,1):".."===y?(d.splice(w,1),b++):b&&(d.splice(w,1),b--);if(!h&&!p)for(;b--;b)d.unshift("..");!h||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),m&&"/"!==d.join("/").substr(-1)&&d.push("");var _=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(g){n.hostname=n.host=_?"":d.length?d.shift():"";var v=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;v&&(n.auth=v.shift(),n.host=n.hostname=v.shift())}return h=h||n.host&&d.length,h&&!_&&d.unshift(""),d.length?n.pathname=d.join("/"):(n.pathname=null,n.path=null),f(n.pathname)&&f(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{punycode:12,querystring:15}],17:[function(t,e,n){!function(t){"use strict";var r=function(t,e,n){return 1===arguments.length?r.get(t):r.set(t,e,n)};r._document=document,r._navigator=navigator,r.defaults={path:"/"},r.get=function(t){return r._cachedDocumentCookie!==r._document.cookie&&r._renewCache(),r._cache[t]},r.set=function(e,n,o){return o=r._getExtendedOptions(o),o.expires=r._getExpiresDate(n===t?-1:o.expires),r._document.cookie=r._generateCookieString(e,n,o),r},r.expire=function(e,n){return r.set(e,t,n)},r._getExtendedOptions=function(e){return{path:e&&e.path||r.defaults.path,domain:e&&e.domain||r.defaults.domain,expires:e&&e.expires||r.defaults.expires,secure:e&&e.secure!==t?e.secure:r.defaults.secure}},r._isValidDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())},r._getExpiresDate=function(t,e){switch(e=e||new Date,typeof t){case"number":t=new Date(e.getTime()+1e3*t);break;case"string":t=new Date(t)}if(t&&!r._isValidDate(t))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return t},r._generateCookieString=function(t,e,n){t=t.replace(/[^#$&+\^`|]/g,encodeURIComponent),t=t.replace(/\(/g,"%28").replace(/\)/g,"%29"),e=(e+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent),n=n||{};var r=t+"="+e;return r+=n.path?";path="+n.path:"",r+=n.domain?";domain="+n.domain:"",r+=n.expires?";expires="+n.expires.toUTCString():"",r+=n.secure?";secure":""},r._getCookieObjectFromString=function(e){for(var n={},o=e?e.split("; "):[],i=0;ie?t.length:e,{key:decodeURIComponent(t.substr(0,e)),value:decodeURIComponent(t.substr(e+1))}},r._renewCache=function(){r._cache=r._getCookieObjectFromString(r._document.cookie),r._cachedDocumentCookie=r._document.cookie},r._areEnabled=function(){var t="cookies.js",e="1"===r.set(t,1).get(t);return r.expire(t),e},r.enabled=r._areEnabled(),"function"==typeof define&&define.amd?define(function(){return r}):"undefined"!=typeof n?("undefined"!=typeof e&&e.exports&&(n=e.exports=r),n.Cookies=r):window.Cookies=r}()},{}],18:[function(t,e){!function(t,n){"undefined"!=typeof e?e.exports=n():"function"==typeof define&&"object"==typeof define.amd?define(n):this[t]=n()}("domready",function(t){function e(t){for(p=1;t=r.shift();)t()}var n,r=[],o=!1,i=document,a=i.documentElement,u=a.doScroll,s="DOMContentLoaded",c="addEventListener",f="onreadystatechange",l="readyState",h=u?/^loaded|^c/:/^loaded|c/,p=h.test(i[l]);return i[c]&&i[c](s,n=function(){i.removeEventListener(s,n,o),e()},o),u&&i.attachEvent(f,n=function(){/^c/.test(i[l])&&(i.detachEvent(f,n),e())}),t=u?function(e){self!=top?p?e():r.push(e):function(){try{a.doScroll("left")}catch(n){return setTimeout(function(){t(e)},50)}e()}()}:function(t){p?t():r.push(t)}})},{}],19:[function(t,e,n){!function(t,r){"function"==typeof define&&define.amd?define(r):"object"==typeof n?e.exports=r():t.returnExports=r()}(this,function(){function t(t){return t=+t,t!==t?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function e(t){var e=typeof t;return null===t||"undefined"===e||"boolean"===e||"number"===e||"string"===e}function n(t){var n,r,o;if(e(t))return t;if(r=t.valueOf,g(r)&&(n=r.call(t),e(n)))return n;if(o=t.toString,g(o)&&(n=o.call(t),e(n)))return n;throw new TypeError}function r(){}var o,i=Array.prototype,a=Object.prototype,u=Function.prototype,s=String.prototype,c=Number.prototype,f=i.slice,l=i.splice,h=(i.push,i.unshift),p=u.call,d=a.toString,g=function(t){return"[object Function]"===a.toString.call(t)},v=function(t){return"[object RegExp]"===a.toString.call(t)},y=function(t){return"[object Array]"===d.call(t)},m=function(t){return"[object String]"===d.call(t)},b=function(t){var e=d.call(t),n="[object Arguments]"===e;return n||(n=!y(e)&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&g(t.callee)),n},w=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}();o=w?function(t,e,n,r){!r&&e in t||Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(t,e,n,r){!r&&e in t||(t[e]=n)};var _=function(t,e,n){for(var r in e)a.hasOwnProperty.call(e,r)&&o(t,r,e[r],n)},x=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)},j=function(t){return t>>>0};_(u,{bind:function(t){var e=this;if(!g(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n=f.call(arguments,1),o=function(){if(this instanceof s){var r=e.apply(this,n.concat(f.call(arguments)));return Object(r)===r?r:this}return e.apply(t,n.concat(f.call(arguments)))},i=Math.max(0,e.length-n.length),a=[],u=0;i>u;u++)a.push("$"+u);var s=Function("binder","return function ("+a.join(",")+"){return binder.apply(this,arguments)}")(o);return e.prototype&&(r.prototype=e.prototype,s.prototype=new r,r.prototype=null),s}});var E,C,k,S,O,I=p.bind(a.hasOwnProperty);(O=I(a,"__defineGetter__"))&&(E=p.bind(a.__defineGetter__),C=p.bind(a.__defineSetter__),k=p.bind(a.__lookupGetter__),S=p.bind(a.__lookupSetter__));var T=function(){var t=[1,2],e=t.splice();return 2===t.length&&y(e)&&0===e.length}();_(i,{splice:function(){return 0===arguments.length?[]:l.apply(this,arguments)}},T);var A=function(){var t={};return i.splice.call(t,0,0,1),1===t.length}();_(i,{splice:function(e,n){if(0===arguments.length)return[];var r=arguments;return this.length=Math.max(t(this.length),0),arguments.length>0&&"number"!=typeof n&&(r=f.call(arguments),r.length<2?r.push(this.length-e):r[1]=t(n)),l.apply(this,r)}},!A);var U=1!==[].unshift(0);_(i,{unshift:function(){return h.apply(this,arguments),this.length}},U),_(Array,{isArray:y});var N=Object("a"),B="a"!==N[0]||!(0 in N),D=function(t){var e=!0,n=!0;return t&&(t.call("foo",function(t,n,r){"object"!=typeof r&&(e=!1)}),t.call([1],function(){"use strict";n="string"==typeof this},"x")),!!t&&e&&n};_(i,{forEach:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=arguments[1],o=-1,i=n.length>>>0;if(!g(t))throw new TypeError;for(;++o>>0,o=Array(r),i=arguments[1];if(!g(t))throw new TypeError(t+" is not a function");for(var a=0;r>a;a++)a in n&&(o[a]=t.call(i,n[a],a,e));return o}},!D(i.map)),_(i,{filter:function(t){var e,n=x(this),r=B&&m(this)?this.split(""):n,o=r.length>>>0,i=[],a=arguments[1];if(!g(t))throw new TypeError(t+" is not a function");for(var u=0;o>u;u++)u in r&&(e=r[u],t.call(a,e,u,n)&&i.push(e));return i}},!D(i.filter)),_(i,{every:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=n.length>>>0,o=arguments[1];if(!g(t))throw new TypeError(t+" is not a function");for(var i=0;r>i;i++)if(i in n&&!t.call(o,n[i],i,e))return!1;return!0}},!D(i.every)),_(i,{some:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=n.length>>>0,o=arguments[1];if(!g(t))throw new TypeError(t+" is not a function");for(var i=0;r>i;i++)if(i in n&&t.call(o,n[i],i,e))return!0;return!1}},!D(i.some));var L=!1;i.reduce&&(L="object"==typeof i.reduce.call("es5",function(t,e,n,r){return r})),_(i,{reduce:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=n.length>>>0;if(!g(t))throw new TypeError(t+" is not a function");if(!r&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,i=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(i in n){o=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}for(;r>i;i++)i in n&&(o=t.call(void 0,o,n[i],i,e));return o}},!L);var M=!1;i.reduceRight&&(M="object"==typeof i.reduceRight.call("es5",function(t,e,n,r){return r})),_(i,{reduceRight:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=n.length>>>0;if(!g(t))throw new TypeError(t+" is not a function");if(!r&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,i=r-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(i in n){o=n[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>i)return o;do i in n&&(o=t.call(void 0,o,n[i],i,e));while(i--);return o}},!M);var R=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);_(i,{indexOf:function(e){var n=B&&m(this)?this.split(""):x(this),r=n.length>>>0;if(!r)return-1;var o=0;for(arguments.length>1&&(o=t(arguments[1])),o=o>=0?o:Math.max(0,r+o);r>o;o++)if(o in n&&n[o]===e)return o;return-1}},R);var F=Array.prototype.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);_(i,{lastIndexOf:function(e){var n=B&&m(this)?this.split(""):x(this),r=n.length>>>0;if(!r)return-1;var o=r-1;for(arguments.length>1&&(o=Math.min(o,t(arguments[1]))),o=o>=0?o:r-Math.abs(o);o>=0;o--)if(o in n&&e===n[o])return o;return-1}},F);var q=!{toString:null}.propertyIsEnumerable("toString"),P=function(){}.propertyIsEnumerable("prototype"),$=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],H=$.length;_(Object,{keys:function(t){var e=g(t),n=b(t),r=null!==t&&"object"==typeof t,o=r&&m(t);if(!r&&!e&&!n)throw new TypeError("Object.keys called on a non-object");var i=[],a=P&&e;if(o||n)for(var u=0;ul;l++){var h=$[l];f&&"constructor"===h||!I(t,h)||i.push(h)}return i}});var J=Object.keys&&function(){return 2===Object.keys(arguments).length}(1,2),z=Object.keys;_(Object,{keys:function(t){return z(b(t)?i.slice.call(t):t)}},!J);var X=-621987552e5,Z="-000001",K=Date.prototype.toISOString&&-1===new Date(X).toISOString().indexOf(Z);_(Date.prototype,{toISOString:function(){var t,e,n,r,o;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(r=this.getUTCFullYear(),o=this.getUTCMonth(),r+=Math.floor(o/12),o=(o%12+12)%12,t=[o+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],r=(0>r?"-":r>9999?"+":"")+("00000"+Math.abs(r)).slice(r>=0&&9999>=r?-4:-6),e=t.length;e--;)n=t[e],10>n&&(t[e]="0"+n);return r+"-"+t.slice(0,2).join("-")+"T"+t.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}},K);var W=!1;try{W=Date.prototype.toJSON&&null===new Date(0/0).toJSON()&&-1!==new Date(X).toJSON().indexOf(Z)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(V){}W||(Date.prototype.toJSON=function(){var t,e=Object(this),r=n(e);if("number"==typeof r&&!isFinite(r))return null;if(t=e.toISOString,"function"!=typeof t)throw new TypeError("toISOString property is not callable");return t.call(e)});var Y=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),G=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z")),Q=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));(!Date.parse||Q||G||!Y)&&(Date=function(t){function e(n,r,o,i,a,u,s){var c=arguments.length;if(this instanceof t){var f=1===c&&String(n)===n?new t(e.parse(n)):c>=7?new t(n,r,o,i,a,u,s):c>=6?new t(n,r,o,i,a,u):c>=5?new t(n,r,o,i,a):c>=4?new t(n,r,o,i):c>=3?new t(n,r,o):c>=2?new t(n,r):c>=1?new t(n):new t;return f.constructor=e,f}return t.apply(this,arguments)}function n(t,e){var n=e>1?1:0;return i[e]+Math.floor((t-1969+n)/4)-Math.floor((t-1901+n)/100)+Math.floor((t-1601+n)/400)+365*(t-1970)}function r(e){return Number(new t(1970,0,1,0,0,0,e))}var o=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),i=[0,31,59,90,120,151,181,212,243,273,304,334,365];for(var a in t)e[a]=t[a];return e.now=t.now,e.UTC=t.UTC,e.prototype=t.prototype,e.prototype.constructor=e,e.parse=function(e){var i=o.exec(e);if(i){var a,u=Number(i[1]),s=Number(i[2]||1)-1,c=Number(i[3]||1)-1,f=Number(i[4]||0),l=Number(i[5]||0),h=Number(i[6]||0),p=Math.floor(1e3*Number(i[7]||0)),d=Boolean(i[4]&&!i[8]),g="-"===i[9]?1:-1,v=Number(i[10]||0),y=Number(i[11]||0);return(l>0||h>0||p>0?24:25)>f&&60>l&&60>h&&1e3>p&&s>-1&&12>s&&24>v&&60>y&&c>-1&&c=-864e13&&864e13>=a)?a:0/0}return t.parse.apply(this,arguments)},e}(Date)),Date.now||(Date.now=function(){return(new Date).getTime()});var te=c.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),ee={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(t,e){for(var n=-1;++n=0;)n+=ee.data[e],ee.data[e]=Math.floor(n/t),n=n%t*ee.base},numToString:function(){for(var t=ee.size,e="";--t>=0;)if(""!==e||0===t||0!==ee.data[t]){var n=String(ee.data[t]);""===e?e=n:e+="0000000".slice(0,7-n.length)+n}return e},pow:function pe(t,e,n){return 0===e?n:e%2===1?pe(t,e-1,n*t):pe(t*t,e/2,n)},log:function(t){for(var e=0;t>=4096;)e+=12,t/=4096;for(;t>=2;)e+=1,t/=2;return e}};_(c,{toFixed:function(t){var e,n,r,o,i,a,u,s;if(e=Number(t),e=e!==e?0:Math.floor(e),0>e||e>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=Number(this),n!==n)return"NaN";if(-1e21>=n||n>=1e21)return String(n);if(r="",0>n&&(r="-",n=-n),o="0",n>1e-21)if(i=ee.log(n*ee.pow(2,69,1))-69,a=0>i?n*ee.pow(2,-i,1):n/ee.pow(2,i,1),a*=4503599627370496,i=52-i,i>0){for(ee.multiply(0,a),u=e;u>=7;)ee.multiply(1e7,0),u-=7;for(ee.multiply(ee.pow(10,u,1),0),u=i-1;u>=23;)ee.divide(1<<23),u-=23;ee.divide(1<0?(s=o.length,o=e>=s?r+"0.0000000000000000000".slice(0,e-s+2)+o:r+o.slice(0,s-e)+"."+o.slice(s-e)):o=r+o,o}},te);var ne=s.split;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=void 0===/()??/.exec("")[1];s.split=function(e,n){var r=this;if(void 0===e&&0===n)return[];if("[object RegExp]"!==d.call(e))return ne.call(this,e,n);var o,a,u,s,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),l=0;for(e=new RegExp(e.source,f+"g"),r+="",t||(o=new RegExp("^"+e.source+"$(?!\\s)",f)),n=void 0===n?-1>>>0:j(n);(a=e.exec(r))&&(u=a.index+a[0].length,!(u>l&&(c.push(r.slice(l,a.index)),!t&&a.length>1&&a[0].replace(o,function(){for(var t=1;t1&&a.index=n)));)e.lastIndex===a.index&&e.lastIndex++;return l===r.length?(s||!e.test(""))&&c.push(""):c.push(r.slice(l)),c.length>n?c.slice(0,n):c}}():"0".split(void 0,0).length&&(s.split=function(t,e){return void 0===t&&0===e?[]:ne.call(this,t,e)});var re=s.replace,oe=function(){var t=[];return"x".replace(/x(.)?/g,function(e,n){t.push(n)}),1===t.length&&"undefined"==typeof t[0]}();oe||(s.replace=function(t,e){var n=g(e),r=v(t)&&/\)[*?]/.test(t.source);if(n&&r){var o=function(n){var r=arguments.length,o=t.lastIndex;t.lastIndex=0;var i=t.exec(n);return t.lastIndex=o,i.push(arguments[r-2],arguments[r-1]),e.apply(this,i)};return re.call(this,t,o)}return re.call(this,t,e)});var ie=s.substr,ae="".substr&&"b"!=="0b".substr(-1);_(s,{substr:function(t,e){return ie.call(this,0>t&&(t=this.length+t)<0?0:t,e)}},ae);var ue=" \n \f\r   ᠎              \u2028\u2029",se="​",ce="["+ue+"]",fe=new RegExp("^"+ce+ce+"*"),le=new RegExp(ce+ce+"*$"),he=s.trim&&(ue.trim()||!se.trim());_(s,{trim:function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(fe,"").replace(le,"")}},he),(8!==parseInt(ue+"08")||22!==parseInt(ue+"0x16"))&&(parseInt=function(t){var e=/^0[xX]/;return function(n,r){return n=String(n).trim(),Number(r)||(r=e.test(n)?16:10),t(n,r)}}(parseInt))})},{}],20:[function(t,e){var n=t("global");try{e.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch(r){e.exports=!1}},{global:21}],21:[function(t,e){e.exports=function(){return this}()},{}],22:[function(t,e,n){(function(t){(function(){function r(t,e){function n(t){if(n[t]!==v)return n[t];var r;if("bug-string-char-index"==t)r="a"!="a"[0];else if("json"==t)r=n("json-stringify")&&n("json-parse");else{var i,u='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var s=e.stringify,f="function"==typeof s&&b;if(f){(i=function(){return 1}).toJSON=i;try{f="0"===s(0)&&"0"===s(new o)&&'""'==s(new a)&&s(m)===v&&s(v)===v&&s()===v&&"1"===s(i)&&"[1]"==s([i])&&"[null]"==s([v])&&"null"==s(null)&&"[null,null,null]"==s([v,m,null])&&s({a:[i,!0,!1,null,"\x00\b\n\f\r "]})==u&&"1"===s(null,i)&&"[\n 1,\n 2\n]"==s([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==s(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==s(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==s(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==s(new c(-1))}catch(l){f=!1}}r=f}if("json-parse"==t){var h=e.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){i=h(u);var p=5==i.a.length&&1===i.a[0];if(p){try{p=!h('" "')}catch(l){}if(p)try{p=1!==h("01")}catch(l){}if(p)try{p=1!==h("1.")}catch(l){}}}}catch(l){p=!1}r=p}}return n[t]=!!r}t||(t=u.Object()),e||(e=u.Object());var o=t.Number||u.Number,a=t.String||u.String,s=t.Object||u.Object,c=t.Date||u.Date,f=t.SyntaxError||u.SyntaxError,l=t.TypeError||u.TypeError,h=t.Math||u.Math,p=t.JSON||u.JSON;"object"==typeof p&&p&&(e.stringify=p.stringify,e.parse=p.parse);var d,g,v,y=s.prototype,m=y.toString,b=new c(-0xc782b5b800cec);try{b=-109252==b.getUTCFullYear()&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(w){}if(!n("json")){var _="[object Function]",x="[object Date]",j="[object Number]",E="[object String]",C="[object Array]",k="[object Boolean]",S=n("bug-string-char-index");if(!b)var O=h.floor,I=[0,31,59,90,120,151,181,212,243,273,304,334],T=function(t,e){return I[e]+365*(t-1970)+O((t-1969+(e=+(e>1)))/4)-O((t-1901+e)/100)+O((t-1601+e)/400)};if((d=y.hasOwnProperty)||(d=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=m?d=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,d=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,d.call(this,t)}),g=function(t,e){var n,r,o,a=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)d.call(r,o)&&a++;return n=r=null,a?g=2==a?function(t,e){var n,r={},o=m.call(t)==_;for(n in t)o&&"prototype"==n||d.call(r,n)||!(r[n]=1)||!d.call(t,n)||e(n)}:function(t,e){var n,r,o=m.call(t)==_;for(n in t)o&&"prototype"==n||!d.call(t,n)||(r="constructor"===n)||e(n);(r||d.call(t,n="constructor"))&&e(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],g=function(t,e){var n,o,a=m.call(t)==_,u=!a&&"function"!=typeof t.constructor&&i[typeof t.hasOwnProperty]&&t.hasOwnProperty||d;for(n in t)a&&"prototype"==n||!u.call(t,n)||e(n);for(o=r.length;n=r[--o];u.call(t,n)&&e(n));}),g(t,e)},!n("json-stringify")){var A={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},U="000000",N=function(t,e){return(U+(e||0)).slice(-t)},B="\\u00",D=function(t){for(var e='"',n=0,r=t.length,o=!S||r>10,i=o&&(S?t.split(""):t);r>n;n++){var a=t.charCodeAt(n);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=A[a];break;default:if(32>a){e+=B+N(2,a.toString(16));break}e+=o?i[n]:t.charAt(n)}}return e+'"'},L=function(t,e,n,r,o,i,a){var u,s,c,f,h,p,y,b,w,_,S,I,A,U,B,M;try{u=e[t]}catch(R){}if("object"==typeof u&&u)if(s=m.call(u),s!=x||d.call(u,"toJSON"))"function"==typeof u.toJSON&&(s!=j&&s!=E&&s!=C||d.call(u,"toJSON"))&&(u=u.toJSON(t));else if(u>-1/0&&1/0>u){if(T){for(h=O(u/864e5),c=O(h/365.2425)+1970-1;T(c+1,0)<=h;c++);for(f=O((h-T(c,0))/30.42);T(c,f+1)<=h;f++);h=1+h-T(c,f),p=(u%864e5+864e5)%864e5,y=O(p/36e5)%24,b=O(p/6e4)%60,w=O(p/1e3)%60,_=p%1e3}else c=u.getUTCFullYear(),f=u.getUTCMonth(),h=u.getUTCDate(),y=u.getUTCHours(),b=u.getUTCMinutes(),w=u.getUTCSeconds(),_=u.getUTCMilliseconds();u=(0>=c||c>=1e4?(0>c?"-":"+")+N(6,0>c?-c:c):N(4,c))+"-"+N(2,f+1)+"-"+N(2,h)+"T"+N(2,y)+":"+N(2,b)+":"+N(2,w)+"."+N(3,_)+"Z"}else u=null;if(n&&(u=n.call(e,t,u)),null===u)return"null";if(s=m.call(u),s==k)return""+u;if(s==j)return u>-1/0&&1/0>u?""+u:"null";if(s==E)return D(""+u);if("object"==typeof u){for(U=a.length;U--;)if(a[U]===u)throw l();if(a.push(u),S=[],B=i,i+=o,s==C){for(A=0,U=u.length;U>A;A++)I=L(A,u,n,r,o,i,a),S.push(I===v?"null":I);M=S.length?o?"[\n"+i+S.join(",\n"+i)+"\n"+B+"]":"["+S.join(",")+"]":"[]"}else g(r||u,function(t){var e=L(t,u,n,r,o,i,a);e!==v&&S.push(D(t)+":"+(o?" ":"")+e)}),M=S.length?o?"{\n"+i+S.join(",\n"+i)+"\n"+B+"}":"{"+S.join(",")+"}":"{}";return a.pop(),M}};e.stringify=function(t,e,n){var r,o,a,u;if(i[typeof e]&&e)if((u=m.call(e))==_)o=e;else if(u==C){a={};for(var s,c=0,f=e.length;f>c;s=e[c++],u=m.call(s),(u==E||u==j)&&(a[s]=1));}if(n)if((u=m.call(n))==j){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.lengthM;)switch(o=i.charCodeAt(M)){case 9:case 10:case 13:case 32:M++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=S?i.charAt(M):i[M],M++,t;case 34:for(t="@",M++;a>M;)if(o=i.charCodeAt(M),32>o)P();else if(92==o)switch(o=i.charCodeAt(++M)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=q[o],M++;break;case 117:for(e=++M,n=M+4;n>M;M++)o=i.charCodeAt(M),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||P();t+=F("0x"+i.slice(e,M));break;default:P()}else{if(34==o)break;for(o=i.charCodeAt(M),e=M;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++M);t+=i.slice(e,M)}if(34==i.charCodeAt(M))return M++,t;P();default:if(e=M,45==o&&(r=!0,o=i.charCodeAt(++M)),o>=48&&57>=o){for(48==o&&(o=i.charCodeAt(M+1),o>=48&&57>=o)&&P(),r=!1;a>M&&(o=i.charCodeAt(M),o>=48&&57>=o);M++);if(46==i.charCodeAt(M)){for(n=++M;a>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==M&&P(),M=n}if(o=i.charCodeAt(M),101==o||69==o){for(o=i.charCodeAt(++M),(43==o||45==o)&&M++,n=M;a>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==M&&P(),M=n}return+i.slice(e,M)}if(r&&P(),"true"==i.slice(M,M+4))return M+=4,!0;if("false"==i.slice(M,M+5))return M+=5,!1;if("null"==i.slice(M,M+4))return M+=4,null;P()}return"$"},H=function(t){var e,n;if("$"==t&&P(),"string"==typeof t){if("@"==(S?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=$(),"]"!=t;n||(n=!0))n&&(","==t?(t=$(),"]"==t&&P()):P()),","==t&&P(),e.push(H(t));return e}if("{"==t){for(e={};t=$(),"}"!=t;n||(n=!0))n&&(","==t?(t=$(),"}"==t&&P()):P()),(","==t||"string"!=typeof t||"@"!=(S?t.charAt(0):t[0])||":"!=$())&&P(),e[t.slice(1)]=H($());return e}P()}return t},J=function(t,e,n){var r=z(t,e,n);r===v?delete t[e]:t[e]=r},z=function(t,e,n){var r,o=t[e];if("object"==typeof o&&o)if(m.call(o)==C)for(r=o.length;r--;)J(o,r,n);else g(o,function(t){J(o,t,n)});return n.call(t,e,o)};e.parse=function(t,e){var n,r;return M=0,R=""+t,n=H($()),"$"!=$()&&P(),M=R=null,e&&m.call(e)==_?z((r={},r[""]=n,r),"",e):n}}}return e.runInContext=r,e}var o="function"==typeof define&&define.amd,i={"function":!0,object:!0},a=i[typeof n]&&n&&!n.nodeType&&n,u=i[typeof window]&&window||this,s=a&&i[typeof e]&&e&&!e.nodeType&&"object"==typeof t&&t;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(u=s),a&&!o)r(u,a);else{var c=u.JSON,f=u.JSON3,l=!1,h=r(u,u.JSON3={noConflict:function(){return l||(l=!0,u.JSON=c,u.JSON3=f,c=f=null),h}});u.JSON={parse:h.parse,stringify:h.stringify}}o&&define(function(){return h})}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(t,e){function n(){}function r(t,e,r){function a(){u.parentNode.removeChild(u),window[d]=n}"function"==typeof e&&(r=e,e={}),e||(e={});var u,s,c=e.prefix||"__jp",f=e.param||"callback",l=null!=e.timeout?e.timeout:6e4,h=encodeURIComponent,p=document.getElementsByTagName("script")[0]||document.head,d=c+i++;l&&(s=setTimeout(function(){a(),r&&r(new Error("Timeout"))},l)),window[d]=function(t){o("jsonp got",t),s&&clearTimeout(s),a(),r&&r(null,t)},t+=(~t.indexOf("?")?"&":"?")+f+"="+h(d),t=t.replace("?&","?"),o('jsonp req "%s"',t),u=document.createElement("script"),u.src=t,p.parentNode.insertBefore(u,p)}var o=t("debug")("jsonp");e.exports=r;var i=0},{debug:24}],24:[function(t,e,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var t=arguments,e=this.useColors;if(t[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+t[0]+(e?"%c ":" ")+"+"+n.humanize(this.diff),!e)return t;var r="color: "+this.color;t=[t[0],r,"color: inherit"].concat(Array.prototype.slice.call(t,1));var o=0,i=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r),t}function i(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?localStorage.removeItem("debug"):localStorage.debug=t}catch(e){}}function u(){var t;try{t=localStorage.debug}catch(e){}return t}n=e.exports=t("./debug"),n.log=i,n.formatArgs=o,n.save=a,n.load=u,n.useColors=r,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(t){return JSON.stringify(t)},n.enable(u())},{"./debug":25}],25:[function(t,e,n){function r(){return n.colors[f++%n.colors.length]}function o(t){function e(){}function o(){var t=o,e=+new Date,i=e-(c||e);t.diff=i,t.prev=c,t.curr=e,c=e,null==t.useColors&&(t.useColors=n.useColors()),null==t.color&&t.useColors&&(t.color=r());var a=Array.prototype.slice.call(arguments);a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var u=0;a[0]=a[0].replace(/%([a-z%])/g,function(e,r){if("%%"===e)return e;u++;var o=n.formatters[r];if("function"==typeof o){var i=a[u];e=o.call(t,i),a.splice(u,1),u--}return e}),"function"==typeof n.formatArgs&&(a=n.formatArgs.apply(t,a));var s=o.log||n.log||console.log.bind(console);s.apply(t,a)}e.enabled=!1,o.enabled=!0;var i=n.enabled(t)?o:e;return i.namespace=t,i}function i(t){n.save(t);for(var e=(t||"").split(/[\s,]+/),r=e.length,o=0;r>o;o++)e[o]&&(t=e[o].replace(/\*/g,".*?"),"-"===t[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$")))}function a(){n.enable("")}function u(t){var e,r;for(e=0,r=n.skips.length;r>e;e++)if(n.skips[e].test(t))return!1;for(e=0,r=n.names.length;r>e;e++)if(n.names[e].test(t))return!0;return!1}function s(t){return t instanceof Error?t.stack||t.message:t}n=e.exports=o,n.coerce=s,n.disable=a,n.enable=i,n.enabled=u,n.humanize=t("ms"),n.names=[],n.skips=[],n.formatters={}; -var c,f=0},{ms:26}],26:[function(t,e){function n(t){var e=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"y":return n*f;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"h":return n*s;case"minutes":case"minute":case"m":return n*u;case"seconds":case"second":case"s":return n*a;case"ms":return n}}}function r(t){return t>=c?Math.round(t/c)+"d":t>=s?Math.round(t/s)+"h":t>=u?Math.round(t/u)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function o(t){return i(t,c,"day")||i(t,s,"hour")||i(t,u,"minute")||i(t,a,"second")||t+" ms"}function i(t,e,n){return e>t?void 0:1.5*e>t?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var a=1e3,u=60*a,s=60*u,c=24*s,f=365.25*c;e.exports=function(t,e){return e=e||{},"string"==typeof t?n(t):e.long?o(t):r(t)}},{}],27:[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,o=t?t.length:0;++r-1?0:-1:t?0:-1}function i(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:w+t,o=e[n]||(e[n]={});"object"==n?(o[r]||(o[r]=[])).push(t):o[r]=!0}}function a(t){return t.charCodeAt(0)}function u(t,e){for(var n=t.criteria,r=e.criteria,o=-1,i=n.length;++ou||"undefined"==typeof a)return 1;if(u>a||"undefined"==typeof u)return-1}}return t.index-e.index}function s(t){var e=-1,n=t.length,r=t[0],o=t[n/2|0],a=t[n-1];if(r&&"object"==typeof r&&o&&"object"==typeof o&&a&&"object"==typeof a)return!1;var u=l();u["false"]=u["null"]=u["true"]=u.undefined=!1;var s=l();for(s.array=t,s.cache=u,s.push=i;++eo?0:o);++r=_&&i===r,c=[];if(u){var f=s(e);f?(i=o,e=f):u=!1}for(;++n-1:void 0});return o.pop(),i.pop(),m&&(h(o),h(i)),a}function ee(t,e,n,r,o){(Gr(e)?Ve:so)(e,function(e,i){var a,u,s=e,c=t[i];if(e&&((u=Gr(e))||co(e))){for(var f=r.length;f--;)if(a=r[f]==e){c=o[f];break}if(!a){var l;n&&(s=n(c,e),(l="undefined"!=typeof s)&&(c=s)),l||(c=u?Gr(c)?c:[]:co(c)?c:{}),r.push(e),o.push(c),l||ee(c,e,n,r,o)}}else n&&(s=n(c,e),"undefined"==typeof s&&(s=e)),"undefined"!=typeof s&&(c=s);t[i]=c})}function re(t,e){return t+Ar(Kr()*(e-t+1))}function oe(t,e,n){var i=-1,a=se(),u=t?t.length:0,c=[],l=!e&&u>=_&&a===r,d=n||l?f():c;if(l){var g=s(d);a=o,d=g}for(;++i3&&"function"==typeof e[n-2])var r=x(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var o=d(arguments,1,n),i=-1,a=f(),u=f();++in?zr(0,i+n):n)||0,Gr(t)?a=o(t,e,n)>-1:"number"==typeof i?a=(De(t)?t.indexOf(e,n):o(t,e,n))>-1:so(t,function(t){return++r>=n?!(a=t===e):void 0}),a}function Xe(t,n,r){var o=!0;n=e.createCallback(n,r,3);var i=-1,a=t?t.length:0;if("number"==typeof a)for(;++ii&&(i=c)}else n=null==n&&De(t)?a:e.createCallback(n,r,3),Ve(t,function(t,e,r){var a=n(t,e,r);a>o&&(o=a,i=t)});return i}function en(t,n,r){var o=1/0,i=o;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Gr(t))for(var u=-1,s=t.length;++uc&&(i=c)}else n=null==n&&De(t)?a:e.createCallback(n,r,3),Ve(t,function(t,e,r){var a=n(t,e,r);o>a&&(o=a,i=t)});return i}function nn(t,n,r,o){if(!t)return r;var i=arguments.length<3;n=e.createCallback(n,o,4);var a=-1,u=t.length;if("number"==typeof u)for(i&&(r=t[++a]);++an?zr(0,o+n):n||0}else if(n){var i=Sn(t,e);return t[i]===e?i:-1}return r(t,e,n)}function bn(t,n,r){var o=0,i=t?t.length:0;if("number"!=typeof n&&null!=n){var a=i;for(n=e.createCallback(n,r,3);a--&&n(t[a],a,t);)o++}else o=null==n||r?1:n||o;return d(t,0,Xr(zr(0,i-o),i))}function wn(){for(var t=[],e=-1,n=arguments.length,i=f(),a=se(),u=a===r,c=f();++e=_&&s(e?t[e]:c)))}var d=t[0],g=-1,v=d?d.length:0,y=[];t:for(;++gn?zr(0,r+n):Xr(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function jn(t){for(var e=arguments,n=0,r=e.length,o=t?t.length:0;++ni;){var u=i+a>>>1;r(t[u])1?arguments:arguments[0],e=-1,n=t?tn(po(t,"length")):0,r=dr(0>n?0:n);++e2?ae(t,17,d(arguments,2),null,e):ae(t,1,null,null,e)}function Ln(t){for(var e=arguments.length>1?Q(arguments,!0,!1,1):we(t),n=-1,r=e.length;++n2?ae(e,19,d(arguments,2),null,t):ae(e,3,null,null,t)}function Rn(){for(var t=arguments,e=t.length;e--;)if(!Ie(t[e]))throw new jr;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function Fn(t,e){return e="number"==typeof e?e:+e||t.length,ae(t,4,null,null,null,e)}function qn(t,e,n){var r,o,i,a,u,s,c,f=0,l=!1,h=!0;if(!Ie(t))throw new jr;if(e=zr(0,e)||0,n===!0){var p=!0;h=!1}else Te(n)&&(p=n.leading,l="maxWait"in n&&(zr(e,n.maxWait)||0),h="trailing"in n?n.trailing:h);var d=function(){var n=e-(vo()-a);if(0>=n){o&&Tr(o);var l=c;o=s=c=v,l&&(f=vo(),i=t.apply(u,r),s||o||(r=u=null))}else s=Lr(d,n)},g=function(){s&&Tr(s),o=s=c=v,(h||l!==e)&&(f=vo(),i=t.apply(u,r),s||o||(r=u=null))};return function(){if(r=arguments,a=vo(),u=this,c=h&&(s||!p),l===!1)var n=p&&!s;else{o||p||(f=a);var v=l-(a-f),y=0>=v;y?(o&&(o=Tr(o)),f=a,i=t.apply(u,r)):o||(o=Lr(g,v))}return y&&s?s=Tr(s):s||e===l||(s=Lr(d,e)),n&&(y=!0,i=t.apply(u,r)),!y||s||o||(r=u=null),i}}function Pn(t){if(!Ie(t))throw new jr;var e=d(arguments,1);return Lr(function(){t.apply(v,e)},1)}function $n(t,e){if(!Ie(t))throw new jr;var n=d(arguments,2);return Lr(function(){t.apply(v,n)},e)}function Hn(t,e){if(!Ie(t))throw new jr;var n=function(){var r=n.cache,o=e?e.apply(this,arguments):w+arguments[0];return Br.call(r,o)?r[o]:r[o]=t.apply(this,arguments)};return n.cache={},n}function Jn(t){var e,n;if(!Ie(t))throw new jr;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function zn(t){return ae(t,16,d(arguments,1))}function Xn(t){return ae(t,32,null,d(arguments,1))}function Zn(t,e,n){var r=!0,o=!0;if(!Ie(t))throw new jr;return n===!1?r=!1:Te(n)&&(r="leading"in n?n.leading:r,o="trailing"in n?n.trailing:o),Z.leading=r,Z.maxWait=e,Z.trailing=o,qn(t,e,Z)}function Kn(t,e){return ae(e,16,[t])}function Wn(t){return function(){return t}}function Vn(t,e,n){var r=typeof t;if(null==t||"function"==r)return x(t,e,n);if("object"!=r)return nr(t);var o=to(t),i=o[0],a=t[i];return 1!=o.length||a!==a||Te(a)?function(e){for(var n=o.length,r=!1;n--&&(r=te(e[o[n]],t[o[n]],null,!0)););return r}:function(t){var e=t[i];return a===e&&(0!==a||1/a==1/e)}}function Yn(t){return null==t?"":xr(t).replace(oo,ue)}function Gn(t){return t}function Qn(t,r,o){var i=!0,a=r&&we(r);r&&(o||a.length)||(null==o&&(o=r),u=n,r=t,t=e,a=we(r)),o===!1?i=!1:Te(o)&&"chain"in o&&(i=o.chain);var u=t,s=Ie(u);Ve(a,function(e){var n=t[e]=r[e];s&&(u.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,o=[r];Dr.apply(o,arguments);var a=n.apply(t,o);if(i||e){if(r===a&&Te(a))return this;a=new u(a),a.__chain__=e}return a})})}function tr(){return t._=kr,this}function er(){}function nr(t){return function(e){return e[t]}}function rr(t,e,n){var r=null==t,o=null==e;if(null==n&&("boolean"==typeof t&&o?(n=t,t=1):o||"boolean"!=typeof e||(n=e,o=!0)),r&&o&&(e=1),t=+t||0,o?(e=t,t=0):e=+e||0,n||t%1||e%1){var i=Kr();return Xr(t+i*(e-t+parseFloat("1e-"+((i+"").length-1))),e)}return re(t,e)}function or(t,e){if(t){var n=t[e];return Ie(n)?t[e]():n}}function ir(t,n,r){var o=e.templateSettings;t=xr(t||""),r=ao({},r,o);var i,a=ao({},r.imports,o.imports),u=to(a),s=He(a),f=0,l=r.interpolate||U,h="__p += '",p=_r((r.escape||U).source+"|"+l.source+"|"+(l===T?S:U).source+"|"+(r.evaluate||U).source+"|$","g");t.replace(p,function(e,n,r,o,a,u){return r||(r=o),h+=t.slice(f,u).replace(B,c),n&&(h+="' +\n__e("+n+") +\n'"),a&&(i=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e}),h+="';\n";var d=r.variable,g=d;g||(d="obj",h="with ("+d+") {\n"+h+"\n}\n"),h=(i?h.replace(E,""):h).replace(C,"$1").replace(k,"$1;"),h="function("+d+") {\n"+(g?"":d+" || ("+d+" = {});\n")+"var __t, __p = '', __e = _.escape"+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+L++ +"]")+"\n*/";try{var m=yr(u,"return "+h+y).apply(v,s)}catch(b){throw b.source=h,b}return n?m(n):(m.source=h,m)}function ar(t,e,n){t=(t=+t)>-1?t:0;var r=-1,o=dr(t);for(e=x(e,n,1);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:e}},qr||(m=function(){function e(){}return function(n){if(Te(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var Yr=Fr?function(t,e){K.value=e,Fr(t,"__bindData__",K)}:er,Gr=Pr||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Sr.call(t)==R||!1},Qr=function(t){var e,n=t,r=[];if(!n)return r;if(!W[typeof t])return r;for(e in n)Br.call(n,e)&&r.push(e);return r},to=Jr?function(t){return Te(t)?Jr(t):[]}:Qr,eo={"&":"&","<":"<",">":">",'"':""","'":"'"},no=xe(eo),ro=_r("("+to(no).join("|")+")","g"),oo=_r("["+to(eo).join("")+"]","g"),io=function(t,e,n){var r,o=t,i=o;if(!o)return i;var a=arguments,u=0,s="number"==typeof n?2:a.length;if(s>3&&"function"==typeof a[s-2])var c=x(a[--s-1],a[s--],2);else s>2&&"function"==typeof a[s-1]&&(c=a[--s]);for(;++u/g,A=RegExp("^["+j+"]*0+(?=.$)"),U=/($^)/,N=/\bthis\b/,B=/['\n\r\t\u2028\u2029\\]/g,D=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],L=0,M="[object Arguments]",R="[object Array]",F="[object Boolean]",q="[object Date]",P="[object Function]",$="[object Number]",H="[object Object]",J="[object RegExp]",z="[object String]",X={};X[P]=!1,X[M]=X[R]=X[F]=X[q]=X[$]=X[H]=X[J]=X[z]=!0;var Z={leading:!1,maxWait:0,trailing:!1},K={configurable:!1,enumerable:!1,value:null,writable:!1},W={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},V={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},Y=W[typeof window]&&window||this,G=W[typeof n]&&n&&!n.nodeType&&n,Q=W[typeof e]&&e&&!e.nodeType&&e,te=Q&&Q.exports===G&&G,ee=W[typeof t]&&t;!ee||ee.global!==ee&&ee.window!==ee||(Y=ee);var ne=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Y._=ne,define(function(){return ne})):G&&Q?te?(Q.exports=ne)._=ne:G._=ne:Y._=ne}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(t,e){function n(){}function r(t){var e={}.toString.call(t);switch(e){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function o(){if(v.XMLHttpRequest&&("file:"!=v.location.protocol||!v.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}return!1}function i(t){return t===Object(t)}function a(t){if(!i(t))return t;var e=[];for(var n in t)null!=t[n]&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.join("&")}function u(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;a>i;++i)n=o[i],e=n.split("="),r[decodeURIComponent(e[0])]=decodeURIComponent(e[1]);return r}function s(t){var e,n,r,o,i=t.split(/\r?\n/),a={};i.pop();for(var u=0,s=i.length;s>u;++u)n=i[u],e=n.indexOf(":"),r=n.slice(0,e).toLowerCase(),o=y(n.slice(e+1)),a[r]=o;return a}function c(t){return t.split(/ *; */).shift()}function f(t){return g(t.split(/ *; */),function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t},{})}function l(t,e){e=e||{},this.req=t,this.xhr=this.req.xhr,this.text=this.xhr.responseText,this.setStatusProperties(this.xhr.status),this.header=this.headers=s(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text):null}function h(t,e){var n=this;d.call(this),this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var e=new l(n);"HEAD"==t&&(e.text=null),n.callback(null,e)})}function p(t,e){return"function"==typeof e?new h("GET",t).end(e):1==arguments.length?new h("GET",t):new h(t,e)}var d=t("emitter"),g=t("reduce"),v="undefined"==typeof window?this:window,y="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};p.serializeObject=a,p.parseString=u,p.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},p.serialize={"application/x-www-form-urlencoded":a,"application/json":JSON.stringify},p.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},l.prototype.get=function(t){return this.header[t.toLowerCase()] +!function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return o(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a=n;n++)s.expire(t.name)},n=function(t,e){for(var n=u.clone(t),r=t.domain.split(".").length,o=0;r>=o&&(n.domain=t.domain.split(".").slice(0-o),s(t.name,e,n),!s.get(t.name));o++);};return t.storage&&t.storage.expires&&(e(t.storage),n(t.storage,this.client.track.uuid)),u.defaults(this.client.track.values,r(this.client.track,this.version)),this},n.trackEvent=function(t,e,n,r){return t||(t=this.client.track.events),e=e||{},u.defaults(e,this.getTrackValues()),this.addRecord(t,e,n,r),this},n.trackPageview=function(t,e,n){return t||(t=this.client.track.pageviews),this.trackEvent(t,{},e,n),this},n.getTrackValues=function(){var t={};return u.forIn(this.client.track.values,function(e,n){e&&(u.isString(e)?t[n]=e:u.isFunction(e)&&(t[n]=e()))}),t}},{"../lodash":4,"cookies-js":17,verge:31}],6:[function(t,e,n){(function(e){"use strict";function r(t){return new e(JSON.stringify(t)).toString("base64")}function o(t,e){if(!i.isString(t))throw new Error("Must provide a table");if(!/^[a-z0-9_]{3,255}$/.test(t))throw new Error("Table must be between 3 and 255 characters and must consist only of lower case letters, numbers, and _");if(!i.isObject(e))throw new Error("Must provide a record")}var i=t("./lodash"),a=t("url"),u=t("querystring"),s=t("superagent"),c=t("jsonp");n._sendRecord=function(t,e,n){if(e=i.isFunction(e)?e:i.noop,n=i.isFunction(n)?n:i.noop,"xhr"===t.type)s.post(t.url).send(t.record).set("X-TD-WRITE-KEY",t.apikey).end(function(t,r){t?n(t):r.error?n(r.error):e(r.body?r.body:r)});else{if("jsonp"!==t.type)throw new Error("Request type "+t.type+" not supported");var o=t.url+"?"+u.stringify({api_key:t.apikey,data:r(t.record),modified:(new Date).getTime()});c(o,{prefix:"TreasureJSONPCallback",timeout:1e4},function(t,r){return t?n(t):e(r)})}},n.applyProperties=function(t,e){var n={};return i.assign(n,this.get("$global")),i.assign(n,this.get(t)),i.assign(n,e),n},n.addRecord=function(t,e,n,r){o(t,e);var i={url:a.resolve(this.client.endpoint,this.client.database+"/"+t),record:this.applyProperties(t,e),type:this.client.requestType,apikey:this.client.writeKey};this.client.development?this.log("addRecord",i):this._sendRecord(i,n,r)},n._objectToBase64=r,n._validateRecord=o}).call(this,t("buffer").Buffer)},{"./lodash":4,buffer:9,jsonp:23,querystring:15,superagent:28,url:16}],7:[function(t,e){"use strict";var n=t("./lodash"),r=t("./configurator"),o=t("./record"),i=function(){function e(t){return this instanceof e?(this.init(t),this):new e(t)}return e.prototype.init=function(t){this.configure(t);for(var n in e.Plugins)e.Plugins[n].configure.call(this,t)},e.version=e.prototype.version=t("./version"),e.prototype.log=function(){for(var t=["[Treasure]"],e=0,r=arguments.length-1;r>=e;e++)t.push(arguments[e]);n.isObject(console)&&this.client.logging&&console.log.apply(console,t)},e.prototype.configure=r.configure,e.prototype.set=r.set,e.prototype.get=r.get,e.prototype.ready=t("domready"),n.mixin(e.prototype,o),e.Plugins={Track:t("./plugins/track")},n.forIn(e.Plugins,function(t){n.forIn(t,function(t,n){e.prototype[n]||(e.prototype[n]=t)})}),e}();e.exports=i},{"./configurator":1,"./lodash":4,"./plugins/track":5,"./record":6,"./version":8,domready:18}],8:[function(t,e){"use strict";e.exports="1.1.0"},{}],9:[function(t,e,n){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);var o,i=typeof t;if("number"===i)o=t>0?t>>>0:0;else if("string"===i)"base64"===e&&(t=O(t)),o=r.byteLength(t,e);else{if("object"!==i||null===t)throw new Error("First argument needs to be a number, array or string.");"Buffer"===t.type&&T(t.data)&&(t=t.data),o=+t.length>0?Math.floor(+t.length):0}var a;z?a=r._augment(new Uint8Array(o)):(a=this,a.length=o,a._isBuffer=!0);var u;if(z&&"number"==typeof t.byteLength)a._set(t);else if(A(t))if(r.isBuffer(t))for(u=0;o>u;u++)a[u]=t.readUInt8(u);else for(u=0;o>u;u++)a[u]=(t[u]%256+256)%256;else if("string"===i)a.write(t,0,e);else if("number"===i&&!z&&!n)for(u=0;o>u;u++)a[u]=0;return a}function o(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=e.length;$(i%2===0,"Invalid hex string"),r>i/2&&(r=i/2);for(var a=0;r>a;a++){var u=parseInt(e.substr(2*a,2),16);$(!isNaN(u),"Invalid hex string"),t[n+a]=u}return a}function i(t,e,n,r){var o=M(N(e),t,n,r);return o}function a(t,e,n,r){var o=M(B(e),t,n,r);return o}function u(t,e,n,r){return a(t,e,n,r)}function s(t,e,n,r){var o=M(L(e),t,n,r);return o}function c(t,e,n,r){var o=M(D(e),t,n,r);return o}function f(t,e,n){return H.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function l(t,e,n){var r="",o="";n=Math.min(t.length,n);for(var i=e;n>i;i++)t[i]<=127?(r+=R(o)+String.fromCharCode(t[i]),o=""):o+="%"+t[i].toString(16);return r+R(o)}function h(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(t[o]);return r}function p(t,e,n){return h(t,e,n)}function d(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=e;n>i;i++)o+=U(t[i]);return o}function g(t,e,n){for(var r=t.slice(e,n),o="",i=0;i=o)){var i;return n?(i=t[e],o>e+1&&(i|=t[e+1]<<8)):(i=t[e]<<8,o>e+1&&(i|=t[e+1])),i}}function y(t,e,n,r){r||($("boolean"==typeof n,"missing or invalid endian"),$(void 0!==e&&null!==e,"missing offset"),$(e+3=o)){var i;return n?(o>e+2&&(i=t[e+2]<<16),o>e+1&&(i|=t[e+1]<<8),i|=t[e],o>e+3&&(i+=t[e+3]<<24>>>0)):(o>e+1&&(i=t[e+1]<<16),o>e+2&&(i|=t[e+2]<<8),o>e+3&&(i|=t[e+3]),i+=t[e]<<24>>>0),i}}function m(t,e,n,r){r||($("boolean"==typeof n,"missing or invalid endian"),$(void 0!==e&&null!==e,"missing offset"),$(e+1=o)){var i=v(t,e,n,!0),a=32768&i;return a?-1*(65535-i+1):i}}function b(t,e,n,r){r||($("boolean"==typeof n,"missing or invalid endian"),$(void 0!==e&&null!==e,"missing offset"),$(e+3=o)){var i=y(t,e,n,!0),a=2147483648&i;return a?-1*(4294967295-i+1):i}}function w(t,e,n,r){return r||($("boolean"==typeof n,"missing or invalid endian"),$(e+3=i)){for(var a=0,u=Math.min(i-n,2);u>a;a++)t[n+a]=(e&255<<8*(r?a:1-a))>>>8*(r?a:1-a);return n+2}}function j(t,e,n,r,o){o||($(void 0!==e&&null!==e,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i)){for(var a=0,u=Math.min(i-n,4);u>a;a++)t[n+a]=e>>>8*(r?a:3-a)&255;return n+4}}function E(t,e,n,r,o){o||($(void 0!==e&&null!==e,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+1=i))return e>=0?x(t,e,n,r,o):x(t,65535+e+1,n,r,o),n+2}function C(t,e,n,r,o){o||($(void 0!==e&&null!==e,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i))return e>=0?j(t,e,n,r,o):j(t,4294967295+e+1,n,r,o),n+4}function k(t,e,n,r,o){o||($(void 0!==e&&null!==e,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+3=i))return J.write(t,e,n,r,23,4),n+4}function S(t,e,n,r,o){o||($(void 0!==e&&null!==e,"missing value"),$("boolean"==typeof r,"missing or invalid endian"),$(void 0!==n&&null!==n,"missing offset"),$(n+7=i))return J.write(t,e,n,r,52,8),n+8}function O(t){for(t=I(t).replace(Z,"");t.length%4!==0;)t+="=";return t}function I(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function T(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function A(t){return T(t)||r.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function U(t){return 16>t?"0"+t.toString(16):t.toString(16)}function N(t){for(var e=[],n=0;n=r)e.push(r);else{var o=n;r>=55296&&57343>=r&&n++;for(var i=encodeURIComponent(t.slice(o,n+1)).substr(1).split("%"),a=0;a>8,r=e%256,o.push(r),o.push(n);return o}function L(t){return H.toByteArray(t)}function M(t,e,n,r){for(var o=0;r>o&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}function R(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function F(t,e){$("number"==typeof t,"cannot write a non-number as a number"),$(t>=0,"specified a negative value for writing an unsigned value"),$(e>=t,"value is larger than maximum value for type"),$(Math.floor(t)===t,"value has a fractional component")}function q(t,e,n){$("number"==typeof t,"cannot write a non-number as a number"),$(e>=t,"value larger than maximum allowed value"),$(t>=n,"value smaller than minimum allowed value"),$(Math.floor(t)===t,"value has a fractional component")}function P(t,e,n){$("number"==typeof t,"cannot write a non-number as a number"),$(e>=t,"value larger than maximum allowed value"),$(t>=n,"value smaller than minimum allowed value")}function $(t,e){if(!t)throw new Error(e||"Failed assertion")}var H=t("base64-js"),J=t("ieee754");n.Buffer=r,n.SlowBuffer=r,n.INSPECT_MAX_BYTES=50,r.poolSize=8192;var z=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(n){return!1}}();r.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.isBuffer=function(t){return!(null==t||!t._isBuffer)},r.byteLength=function(t,e){var n;switch(t=t.toString(),e||"utf8"){case"hex":n=t.length/2;break;case"utf8":case"utf-8":n=N(t).length;break;case"ascii":case"binary":case"raw":n=t.length;break;case"base64":n=L(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*t.length;break;default:throw new Error("Unknown encoding")}return n},r.concat=function(t,e){if($(T(t),"Usage: Buffer.concat(list[, length])"),0===t.length)return new r(0);if(1===t.length)return t[0];var n;if(void 0===e)for(e=0,n=0;ni&&t[i]===e[i];i++);return i!==a&&(n=t[i],o=e[i]),o>n?-1:n>o?1:0},r.prototype.write=function(t,e,n,r){if(isFinite(e))isFinite(n)||(r=n,n=void 0);else{var f=r;r=e,e=n,n=f}e=Number(e)||0;var l=this.length-e;n?(n=Number(n),n>l&&(n=l)):n=l,r=String(r||"utf8").toLowerCase();var h;switch(r){case"hex":h=o(this,t,e,n);break;case"utf8":case"utf-8":h=i(this,t,e,n);break;case"ascii":h=a(this,t,e,n);break;case"binary":h=u(this,t,e,n);break;case"base64":h=s(this,t,e,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":h=c(this,t,e,n);break;default:throw new Error("Unknown encoding")}return h},r.prototype.toString=function(t,e,n){var r=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,n=void 0===n?r.length:Number(n),n===e)return"";var o;switch(t){case"hex":o=d(r,e,n);break;case"utf8":case"utf-8":o=l(r,e,n);break;case"ascii":o=h(r,e,n);break;case"binary":o=p(r,e,n);break;case"base64":o=f(r,e,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=g(r,e,n);break;default:throw new Error("Unknown encoding")}return o},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.equals=function(t){return $(r.isBuffer(t),"Argument must be a Buffer"),0===r.compare(this,t)},r.prototype.compare=function(t){return $(r.isBuffer(t),"Argument must be a Buffer"),r.compare(this,t)},r.prototype.copy=function(t,e,n,r){var o=this;if(n||(n=0),r||0===r||(r=this.length),e||(e=0),r!==n&&0!==t.length&&0!==o.length){$(r>=n,"sourceEnd < sourceStart"),$(e>=0&&e=0&&n=0&&r<=o.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),t.length-ei||!z)for(var a=0;i>a;a++)t[a+e]=this[a+n];else t._set(this.subarray(n,n+i),e)}},r.prototype.slice=function(t,e){var n=this.length;if(t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t),z)return r._augment(this.subarray(t,e));for(var o=e-t,i=new r(o,void 0,!0),a=0;o>a;a++)i[a]=this[a+t];return i},r.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},r.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},r.prototype.readUInt8=function(t,e){return e||($(void 0!==t&&null!==t,"missing offset"),$(t=this.length?void 0:this[t]},r.prototype.readUInt16LE=function(t,e){return v(this,t,!0,e)},r.prototype.readUInt16BE=function(t,e){return v(this,t,!1,e)},r.prototype.readUInt32LE=function(t,e){return y(this,t,!0,e)},r.prototype.readUInt32BE=function(t,e){return y(this,t,!1,e)},r.prototype.readInt8=function(t,e){if(e||($(void 0!==t&&null!==t,"missing offset"),$(t=this.length)){var n=128&this[t];return n?-1*(255-this[t]+1):this[t]}},r.prototype.readInt16LE=function(t,e){return m(this,t,!0,e)},r.prototype.readInt16BE=function(t,e){return m(this,t,!1,e)},r.prototype.readInt32LE=function(t,e){return b(this,t,!0,e)},r.prototype.readInt32BE=function(t,e){return b(this,t,!1,e)},r.prototype.readFloatLE=function(t,e){return w(this,t,!0,e)},r.prototype.readFloatBE=function(t,e){return w(this,t,!1,e)},r.prototype.readDoubleLE=function(t,e){return _(this,t,!0,e)},r.prototype.readDoubleBE=function(t,e){return _(this,t,!1,e)},r.prototype.writeUInt8=function(t,e,n){return n||($(void 0!==t&&null!==t,"missing value"),$(void 0!==e&&null!==e,"missing offset"),$(e=this.length?void 0:(this[e]=t,e+1)},r.prototype.writeUInt16LE=function(t,e,n){return x(this,t,e,!0,n)},r.prototype.writeUInt16BE=function(t,e,n){return x(this,t,e,!1,n)},r.prototype.writeUInt32LE=function(t,e,n){return j(this,t,e,!0,n)},r.prototype.writeUInt32BE=function(t,e,n){return j(this,t,e,!1,n)},r.prototype.writeInt8=function(t,e,n){return n||($(void 0!==t&&null!==t,"missing value"),$(void 0!==e&&null!==e,"missing offset"),$(e=this.length?void 0:(t>=0?this.writeUInt8(t,e,n):this.writeUInt8(255+t+1,e,n),e+1)},r.prototype.writeInt16LE=function(t,e,n){return E(this,t,e,!0,n)},r.prototype.writeInt16BE=function(t,e,n){return E(this,t,e,!1,n)},r.prototype.writeInt32LE=function(t,e,n){return C(this,t,e,!0,n)},r.prototype.writeInt32BE=function(t,e,n){return C(this,t,e,!1,n)},r.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},r.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},r.prototype.writeDoubleLE=function(t,e,n){return S(this,t,e,!0,n)},r.prototype.writeDoubleBE=function(t,e,n){return S(this,t,e,!1,n)},r.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),$(n>=e,"end < start"),n!==e&&0!==this.length){$(e>=0&&e=0&&n<=this.length,"end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var o=N(t.toString()),i=o.length;for(r=e;n>r;r++)this[r]=o[r%i]}return this}},r.prototype.inspect=function(){for(var t=[],e=this.length,r=0;e>r;r++)if(t[r]=U(this[r]),r===n.INSPECT_MAX_BYTES){t[r+1]="...";break}return""},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(z)return new r(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;n>e;e+=1)t[e]=this[e];return t.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var X=r.prototype;r._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=X.get,t.set=X.set,t.write=X.write,t.toString=X.toString,t.toLocaleString=X.toString,t.toJSON=X.toJSON,t.equals=X.equals,t.compare=X.compare,t.copy=X.copy,t.slice=X.slice,t.readUInt8=X.readUInt8,t.readUInt16LE=X.readUInt16LE,t.readUInt16BE=X.readUInt16BE,t.readUInt32LE=X.readUInt32LE,t.readUInt32BE=X.readUInt32BE,t.readInt8=X.readInt8,t.readInt16LE=X.readInt16LE,t.readInt16BE=X.readInt16BE,t.readInt32LE=X.readInt32LE,t.readInt32BE=X.readInt32BE,t.readFloatLE=X.readFloatLE,t.readFloatBE=X.readFloatBE,t.readDoubleLE=X.readDoubleLE,t.readDoubleBE=X.readDoubleBE,t.writeUInt8=X.writeUInt8,t.writeUInt16LE=X.writeUInt16LE,t.writeUInt16BE=X.writeUInt16BE,t.writeUInt32LE=X.writeUInt32LE,t.writeUInt32BE=X.writeUInt32BE,t.writeInt8=X.writeInt8,t.writeInt16LE=X.writeInt16LE,t.writeInt16BE=X.writeInt16BE,t.writeInt32LE=X.writeInt32LE,t.writeInt32BE=X.writeInt32BE,t.writeFloatLE=X.writeFloatLE,t.writeFloatBE=X.writeFloatBE,t.writeDoubleLE=X.writeDoubleLE,t.writeDoubleBE=X.writeDoubleBE,t.fill=X.fill,t.inspect=X.inspect,t.toArrayBuffer=X.toArrayBuffer,t};var Z=/[^+\/0-9A-z]/g},{"base64-js":10,ieee754:11}],10:[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===a?62:e===u?63:s>e?-1:s+10>e?e-s+26+26:f+26>e?e-f:c+26>e?e-c+26:void 0}function n(t){function n(t){c[l++]=t}var r,o,a,u,s,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;s="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,c=new i(3*t.length/4-s),a=s>0?t.length-4:t.length;var l=0;for(r=0,o=0;a>r;r+=4,o+=3)u=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&u)>>16),n((65280&u)>>8),n(255&u);return 2===s?(u=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&u)):1===s&&(u=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(u>>8&255),n(255&u)),c}function o(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var o,i,a,u=t.length%3,s="";for(o=0,a=t.length-u;a>o;o+=3)i=(t[o]<<16)+(t[o+1]<<8)+t[o+2],s+=n(i);switch(u){case 1:i=t[t.length-1],s+=e(i>>2),s+=e(i<<4&63),s+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],s+=e(i>>10),s+=e(i>>4&63),s+=e(i<<2&63),s+="="}return s}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),u="/".charCodeAt(0),s="0".charCodeAt(0),c="a".charCodeAt(0),f="A".charCodeAt(0);t.toByteArray=n,t.fromByteArray=o}("undefined"==typeof n?this.base64js={}:n)},{}],11:[function(t,e,n){n.read=function(t,e,n,r,o){var i,a,u=8*o-r-1,s=(1<>1,f=-7,l=n?o-1:0,h=n?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=u;f>0;i=256*i+t[e+l],l+=h,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===s)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},n.write=function(t,e,n,r,o,i){var a,u,s,c=8*i-o-1,f=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),e+=a+l>=1?h/s:h*Math.pow(2,1-l),e*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,o),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[n+p]=255&u,p+=d,u/=256,o-=8);for(a=a<0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*g}},{}],12:[function(t,e,n){(function(t){!function(r){function o(t){throw RangeError(N[t])}function i(t,e){for(var n=t.length;n--;)t[n]=e(t[n]);return t}function a(t,e){return i(t.split(U),e).join(".")}function u(t){for(var e,n,r=[],o=0,i=t.length;i>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&i>o?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function s(t){return i(t,function(t){var e="";return t>65535&&(t-=65536,e+=L(t>>>10&1023|55296),t=56320|1023&t),e+=L(t)}).join("")}function c(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:x}function f(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function l(t,e,n){var r=0;for(t=n?D(t/k):t>>1,t+=D(t/e);t>B*E>>1;r+=x)t=D(t/B);return D(r+(B+1)*t/(t+C))}function h(t){var e,n,r,i,a,u,f,h,p,d,g=[],v=t.length,y=0,m=O,b=S;for(n=t.lastIndexOf(I),0>n&&(n=0),r=0;n>r;++r)t.charCodeAt(r)>=128&&o("not-basic"),g.push(t.charCodeAt(r));for(i=n>0?n+1:0;v>i;){for(a=y,u=1,f=x;i>=v&&o("invalid-input"),h=c(t.charCodeAt(i++)),(h>=x||h>D((_-y)/u))&&o("overflow"),y+=h*u,p=b>=f?j:f>=b+E?E:f-b,!(p>h);f+=x)d=x-p,u>D(_/d)&&o("overflow"),u*=d;e=g.length+1,b=l(y-a,e,0==a),D(y/e)>_-m&&o("overflow"),m+=D(y/e),y%=e,g.splice(y++,0,m)}return s(g)}function p(t){var e,n,r,i,a,s,c,h,p,d,g,v,y,m,b,w=[];for(t=u(t),v=t.length,e=O,n=0,a=S,s=0;v>s;++s)g=t[s],128>g&&w.push(L(g));for(r=i=w.length,i&&w.push(I);v>r;){for(c=_,s=0;v>s;++s)g=t[s],g>=e&&c>g&&(c=g);for(y=r+1,c-e>D((_-n)/y)&&o("overflow"),n+=(c-e)*y,e=c,s=0;v>s;++s)if(g=t[s],e>g&&++n>_&&o("overflow"),g==e){for(h=n,p=x;d=a>=p?j:p>=a+E?E:p-a,!(d>h);p+=x)b=h-d,m=x-d,w.push(L(f(d+b%m,0))),h=D(b/m);w.push(L(f(h,0))),a=l(n,y,r==i),n=0,++r}++n,++e}return w.join("")}function d(t){return a(t,function(t){return T.test(t)?h(t.slice(4).toLowerCase()):t})}function g(t){return a(t,function(t){return A.test(t)?"xn--"+p(t):t})}var v="object"==typeof n&&n,y="object"==typeof e&&e&&e.exports==v&&e,m="object"==typeof t&&t;(m.global===m||m.window===m)&&(r=m);var b,w,_=2147483647,x=36,j=1,E=26,C=38,k=700,S=72,O=128,I="-",T=/^xn--/,A=/[^ -~]/,U=/\x2E|\u3002|\uFF0E|\uFF61/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=x-j,D=Math.floor,L=String.fromCharCode;if(b={version:"1.2.4",ucs2:{decode:u,encode:s},decode:h,encode:p,toASCII:g,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return b});else if(v&&!v.nodeType)if(y)y.exports=b;else for(w in b)b.hasOwnProperty(w)&&(v[w]=b[w]);else r.punycode=b}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(t,e){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,o,i){e=e||"&",o=o||"=";var a={};if("string"!=typeof t||0===t.length)return a;var u=/\+/g;t=t.split(e);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var c=t.length;s>0&&c>s&&(c=s);for(var f=0;c>f;++f){var l,h,p,d,g=t[f].replace(u,"%20"),v=g.indexOf(o);v>=0?(l=g.substr(0,v),h=g.substr(v+1)):(l=g,h=""),p=decodeURIComponent(l),d=decodeURIComponent(h),n(a,p)?r(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],14:[function(t,e){"use strict";function n(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(g),y=["'"].concat(v),m=["%","/","?",";","#"].concat(y),b=["/","?","#"],w=255,_=/^[a-z0-9A-Z_-]{0,63}$/,x=/^([a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=t("querystring");r.prototype.parse=function(t,e,n){if(!s(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t;r=r.trim();var o=p.exec(r);if(o){o=o[0];var i=o.toLowerCase();this.protocol=i,r=r.substr(o.length)}if(n||o||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===r.substr(0,2);!a||o&&E[o]||(r=r.substr(2),this.slashes=!0)}if(!E[o]&&(a||o&&!C[o])){for(var u=-1,c=0;cf)&&(u=f)}var l,d;d=-1===u?r.lastIndexOf("@"):r.lastIndexOf("@",u),-1!==d&&(l=r.slice(0,d),r=r.slice(d+1),this.auth=decodeURIComponent(l)),u=-1;for(var c=0;cf)&&(u=f)}-1===u&&(u=r.length),this.host=r.slice(0,u),r=r.slice(u),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var v=this.hostname.split(/\./),c=0,S=v.length;S>c;c++){var O=v[c];if(O&&!O.match(_)){for(var I="",T=0,A=O.length;A>T;T++)I+=O.charCodeAt(T)>127?"x":O[T];if(!I.match(_)){var U=v.slice(0,c),N=v.slice(c+1),B=O.match(x);B&&(U.push(B[1]),N.unshift(B[2])),N.length&&(r="/"+N.join(".")+r),this.hostname=U.join("."); +break}}}if(this.hostname=this.hostname.length>w?"":this.hostname.toLowerCase(),!g){for(var D=this.hostname.split("."),L=[],c=0;cc;c++){var q=y[c],P=encodeURIComponent(q);P===q&&(P=escape(q)),r=r.split(q).join(P)}var $=r.indexOf("#");-1!==$&&(this.hash=r.substr($),r=r.slice(0,$));var H=r.indexOf("?");if(-1!==H?(this.search=r.substr(H),this.query=r.substr(H+1),e&&(this.query=k.parse(this.query)),r=r.slice(0,H)):e&&(this.search="",this.query={}),r&&(this.pathname=r),C[i]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var R=this.pathname||"",M=this.search||"";this.path=R+M}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(i=k.stringify(this.query));var a=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||C[e])&&o!==!1?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+o+n+a+r},r.prototype.resolve=function(t){return this.resolveObject(o(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(s(t)){var e=new r;e.parse(t,!1,!0),t=e}var n=new r;if(Object.keys(this).forEach(function(t){n[t]=this[t]},this),n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(n[e]=t[e])}),C[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(t.protocol&&t.protocol!==n.protocol){if(!C[t.protocol])return Object.keys(t).forEach(function(e){n[e]=t[e]}),n.href=n.format(),n;if(n.protocol=t.protocol,t.host||E[t.protocol])n.pathname=t.pathname;else{for(var o=(t.pathname||"").split("/");o.length&&!(t.host=o.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),n.pathname=o.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var i=n.pathname||"",a=n.search||"";n.path=i+a}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var u=n.pathname&&"/"===n.pathname.charAt(0),c=t.host||t.pathname&&"/"===t.pathname.charAt(0),h=c||u||n.host&&t.pathname,p=h,d=n.pathname&&n.pathname.split("/")||[],o=t.pathname&&t.pathname.split("/")||[],g=n.protocol&&!C[n.protocol];if(g&&(n.hostname="",n.port=null,n.host&&(""===d[0]?d[0]=n.host:d.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===o[0]?o[0]=t.host:o.unshift(t.host)),t.host=null),h=h&&(""===o[0]||""===d[0])),c)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,d=o;else if(o.length)d||(d=[]),d.pop(),d=d.concat(o),n.search=t.search,n.query=t.query;else if(!l(t.search)){if(g){n.hostname=n.host=d.shift();var v=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;v&&(n.auth=v.shift(),n.host=n.hostname=v.shift())}return n.search=t.search,n.query=t.query,f(n.pathname)&&f(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!d.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var y=d.slice(-1)[0],m=(n.host||t.host)&&("."===y||".."===y)||""===y,b=0,w=d.length;w>=0;w--)y=d[w],"."==y?d.splice(w,1):".."===y?(d.splice(w,1),b++):b&&(d.splice(w,1),b--);if(!h&&!p)for(;b--;b)d.unshift("..");!h||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),m&&"/"!==d.join("/").substr(-1)&&d.push("");var _=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(g){n.hostname=n.host=_?"":d.length?d.shift():"";var v=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;v&&(n.auth=v.shift(),n.host=n.hostname=v.shift())}return h=h||n.host&&d.length,h&&!_&&d.unshift(""),d.length?n.pathname=d.join("/"):(n.pathname=null,n.path=null),f(n.pathname)&&f(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{punycode:12,querystring:15}],17:[function(t,e,n){!function(t){"use strict";var r=function(t,e,n){return 1===arguments.length?r.get(t):r.set(t,e,n)};r._document=document,r._navigator=navigator,r.defaults={path:"/"},r.get=function(t){return r._cachedDocumentCookie!==r._document.cookie&&r._renewCache(),r._cache[t]},r.set=function(e,n,o){return o=r._getExtendedOptions(o),o.expires=r._getExpiresDate(n===t?-1:o.expires),r._document.cookie=r._generateCookieString(e,n,o),r},r.expire=function(e,n){return r.set(e,t,n)},r._getExtendedOptions=function(e){return{path:e&&e.path||r.defaults.path,domain:e&&e.domain||r.defaults.domain,expires:e&&e.expires||r.defaults.expires,secure:e&&e.secure!==t?e.secure:r.defaults.secure}},r._isValidDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())},r._getExpiresDate=function(t,e){switch(e=e||new Date,typeof t){case"number":t=new Date(e.getTime()+1e3*t);break;case"string":t=new Date(t)}if(t&&!r._isValidDate(t))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return t},r._generateCookieString=function(t,e,n){t=t.replace(/[^#$&+\^`|]/g,encodeURIComponent),t=t.replace(/\(/g,"%28").replace(/\)/g,"%29"),e=(e+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent),n=n||{};var r=t+"="+e;return r+=n.path?";path="+n.path:"",r+=n.domain?";domain="+n.domain:"",r+=n.expires?";expires="+n.expires.toUTCString():"",r+=n.secure?";secure":""},r._getCookieObjectFromString=function(e){for(var n={},o=e?e.split("; "):[],i=0;ie?t.length:e,{key:decodeURIComponent(t.substr(0,e)),value:decodeURIComponent(t.substr(e+1))}},r._renewCache=function(){r._cache=r._getCookieObjectFromString(r._document.cookie),r._cachedDocumentCookie=r._document.cookie},r._areEnabled=function(){var t="cookies.js",e="1"===r.set(t,1).get(t);return r.expire(t),e},r.enabled=r._areEnabled(),"function"==typeof define&&define.amd?define(function(){return r}):"undefined"!=typeof n?("undefined"!=typeof e&&e.exports&&(n=e.exports=r),n.Cookies=r):window.Cookies=r}()},{}],18:[function(t,e){!function(t,n){"undefined"!=typeof e?e.exports=n():"function"==typeof define&&"object"==typeof define.amd?define(n):this[t]=n()}("domready",function(t){function e(t){for(p=1;t=r.shift();)t()}var n,r=[],o=!1,i=document,a=i.documentElement,u=a.doScroll,s="DOMContentLoaded",c="addEventListener",f="onreadystatechange",l="readyState",h=u?/^loaded|^c/:/^loaded|c/,p=h.test(i[l]);return i[c]&&i[c](s,n=function(){i.removeEventListener(s,n,o),e()},o),u&&i.attachEvent(f,n=function(){/^c/.test(i[l])&&(i.detachEvent(f,n),e())}),t=u?function(e){self!=top?p?e():r.push(e):function(){try{a.doScroll("left")}catch(n){return setTimeout(function(){t(e)},50)}e()}()}:function(t){p?t():r.push(t)}})},{}],19:[function(t,e,n){!function(t,r){"function"==typeof define&&define.amd?define(r):"object"==typeof n?e.exports=r():t.returnExports=r()}(this,function(){function t(t){return t=+t,t!==t?t=0:0!==t&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function e(t){var e=typeof t;return null===t||"undefined"===e||"boolean"===e||"number"===e||"string"===e}function n(t){var n,r,o;if(e(t))return t;if(r=t.valueOf,g(r)&&(n=r.call(t),e(n)))return n;if(o=t.toString,g(o)&&(n=o.call(t),e(n)))return n;throw new TypeError}function r(){}var o,i=Array.prototype,a=Object.prototype,u=Function.prototype,s=String.prototype,c=Number.prototype,f=i.slice,l=i.splice,h=(i.push,i.unshift),p=u.call,d=a.toString,g=function(t){return"[object Function]"===a.toString.call(t)},v=function(t){return"[object RegExp]"===a.toString.call(t)},y=function(t){return"[object Array]"===d.call(t)},m=function(t){return"[object String]"===d.call(t)},b=function(t){var e=d.call(t),n="[object Arguments]"===e;return n||(n=!y(t)&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&g(t.callee)),n},w=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}();o=w?function(t,e,n,r){!r&&e in t||Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(t,e,n,r){!r&&e in t||(t[e]=n)};var _=function(t,e,n){for(var r in e)a.hasOwnProperty.call(e,r)&&o(t,r,e[r],n)},x=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)},j=function(t){return t>>>0};_(u,{bind:function(t){var e=this;if(!g(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n=f.call(arguments,1),o=function(){if(this instanceof s){var r=e.apply(this,n.concat(f.call(arguments)));return Object(r)===r?r:this}return e.apply(t,n.concat(f.call(arguments)))},i=Math.max(0,e.length-n.length),a=[],u=0;i>u;u++)a.push("$"+u);var s=Function("binder","return function ("+a.join(",")+"){return binder.apply(this,arguments)}")(o);return e.prototype&&(r.prototype=e.prototype,s.prototype=new r,r.prototype=null),s}});var E,C,k,S,O,I=p.bind(a.hasOwnProperty);(O=I(a,"__defineGetter__"))&&(E=p.bind(a.__defineGetter__),C=p.bind(a.__defineSetter__),k=p.bind(a.__lookupGetter__),S=p.bind(a.__lookupSetter__));var T=function(){var t=[1,2],e=t.splice();return 2===t.length&&y(e)&&0===e.length}();_(i,{splice:function(){return 0===arguments.length?[]:l.apply(this,arguments)}},T);var A=function(){var t={};return i.splice.call(t,0,0,1),1===t.length}();_(i,{splice:function(e,n){if(0===arguments.length)return[];var r=arguments;return this.length=Math.max(t(this.length),0),arguments.length>0&&"number"!=typeof n&&(r=f.call(arguments),r.length<2?r.push(this.length-e):r[1]=t(n)),l.apply(this,r)}},!A);var U=1!==[].unshift(0);_(i,{unshift:function(){return h.apply(this,arguments),this.length}},U),_(Array,{isArray:y});var N=Object("a"),B="a"!==N[0]||!(0 in N),D=function(t){var e=!0,n=!0;return t&&(t.call("foo",function(t,n,r){"object"!=typeof r&&(e=!1)}),t.call([1],function(){"use strict";n="string"==typeof this},"x")),!!t&&e&&n};_(i,{forEach:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=arguments[1],o=-1,i=n.length>>>0;if(!g(t))throw new TypeError;for(;++o>>0,o=Array(r),i=arguments[1];if(!g(t))throw new TypeError(t+" is not a function");for(var a=0;r>a;a++)a in n&&(o[a]=t.call(i,n[a],a,e));return o}},!D(i.map)),_(i,{filter:function(t){var e,n=x(this),r=B&&m(this)?this.split(""):n,o=r.length>>>0,i=[],a=arguments[1];if(!g(t))throw new TypeError(t+" is not a function");for(var u=0;o>u;u++)u in r&&(e=r[u],t.call(a,e,u,n)&&i.push(e));return i}},!D(i.filter)),_(i,{every:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=n.length>>>0,o=arguments[1];if(!g(t))throw new TypeError(t+" is not a function");for(var i=0;r>i;i++)if(i in n&&!t.call(o,n[i],i,e))return!1;return!0}},!D(i.every)),_(i,{some:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=n.length>>>0,o=arguments[1];if(!g(t))throw new TypeError(t+" is not a function");for(var i=0;r>i;i++)if(i in n&&t.call(o,n[i],i,e))return!0;return!1}},!D(i.some));var L=!1;i.reduce&&(L="object"==typeof i.reduce.call("es5",function(t,e,n,r){return r})),_(i,{reduce:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=n.length>>>0;if(!g(t))throw new TypeError(t+" is not a function");if(!r&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,i=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(i in n){o=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}for(;r>i;i++)i in n&&(o=t.call(void 0,o,n[i],i,e));return o}},!L);var M=!1;i.reduceRight&&(M="object"==typeof i.reduceRight.call("es5",function(t,e,n,r){return r})),_(i,{reduceRight:function(t){var e=x(this),n=B&&m(this)?this.split(""):e,r=n.length>>>0;if(!g(t))throw new TypeError(t+" is not a function");if(!r&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,i=r-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(i in n){o=n[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>i)return o;do i in n&&(o=t.call(void 0,o,n[i],i,e));while(i--);return o}},!M);var R=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);_(i,{indexOf:function(e){var n=B&&m(this)?this.split(""):x(this),r=n.length>>>0;if(!r)return-1;var o=0;for(arguments.length>1&&(o=t(arguments[1])),o=o>=0?o:Math.max(0,r+o);r>o;o++)if(o in n&&n[o]===e)return o;return-1}},R);var F=Array.prototype.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);_(i,{lastIndexOf:function(e){var n=B&&m(this)?this.split(""):x(this),r=n.length>>>0;if(!r)return-1;var o=r-1;for(arguments.length>1&&(o=Math.min(o,t(arguments[1]))),o=o>=0?o:r-Math.abs(o);o>=0;o--)if(o in n&&e===n[o])return o;return-1}},F);var q=!{toString:null}.propertyIsEnumerable("toString"),P=function(){}.propertyIsEnumerable("prototype"),$=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],H=$.length;_(Object,{keys:function(t){var e=g(t),n=b(t),r=null!==t&&"object"==typeof t,o=r&&m(t);if(!r&&!e&&!n)throw new TypeError("Object.keys called on a non-object");var i=[],a=P&&e;if(o||n)for(var u=0;ul;l++){var h=$[l];f&&"constructor"===h||!I(t,h)||i.push(h)}return i}});var J=Object.keys&&function(){return 2===Object.keys(arguments).length}(1,2),z=Object.keys;_(Object,{keys:function(t){return z(b(t)?i.slice.call(t):t)}},!J);var X=-621987552e5,Z="-000001",K=Date.prototype.toISOString&&-1===new Date(X).toISOString().indexOf(Z);_(Date.prototype,{toISOString:function(){var t,e,n,r,o;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(r=this.getUTCFullYear(),o=this.getUTCMonth(),r+=Math.floor(o/12),o=(o%12+12)%12,t=[o+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],r=(0>r?"-":r>9999?"+":"")+("00000"+Math.abs(r)).slice(r>=0&&9999>=r?-4:-6),e=t.length;e--;)n=t[e],10>n&&(t[e]="0"+n);return r+"-"+t.slice(0,2).join("-")+"T"+t.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}},K);var W=!1;try{W=Date.prototype.toJSON&&null===new Date(0/0).toJSON()&&-1!==new Date(X).toJSON().indexOf(Z)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(V){}W||(Date.prototype.toJSON=function(){var t,e=Object(this),r=n(e);if("number"==typeof r&&!isFinite(r))return null;if(t=e.toISOString,"function"!=typeof t)throw new TypeError("toISOString property is not callable");return t.call(e)});var Y=1e15===Date.parse("+033658-09-27T01:46:40.000Z"),G=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z")),Q=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));(!Date.parse||Q||G||!Y)&&(Date=function(t){function e(n,r,o,i,a,u,s){var c=arguments.length;if(this instanceof t){var f=1===c&&String(n)===n?new t(e.parse(n)):c>=7?new t(n,r,o,i,a,u,s):c>=6?new t(n,r,o,i,a,u):c>=5?new t(n,r,o,i,a):c>=4?new t(n,r,o,i):c>=3?new t(n,r,o):c>=2?new t(n,r):c>=1?new t(n):new t;return f.constructor=e,f}return t.apply(this,arguments)}function n(t,e){var n=e>1?1:0;return i[e]+Math.floor((t-1969+n)/4)-Math.floor((t-1901+n)/100)+Math.floor((t-1601+n)/400)+365*(t-1970)}function r(e){return Number(new t(1970,0,1,0,0,0,e))}var o=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),i=[0,31,59,90,120,151,181,212,243,273,304,334,365];for(var a in t)e[a]=t[a];return e.now=t.now,e.UTC=t.UTC,e.prototype=t.prototype,e.prototype.constructor=e,e.parse=function(e){var i=o.exec(e);if(i){var a,u=Number(i[1]),s=Number(i[2]||1)-1,c=Number(i[3]||1)-1,f=Number(i[4]||0),l=Number(i[5]||0),h=Number(i[6]||0),p=Math.floor(1e3*Number(i[7]||0)),d=Boolean(i[4]&&!i[8]),g="-"===i[9]?1:-1,v=Number(i[10]||0),y=Number(i[11]||0);return(l>0||h>0||p>0?24:25)>f&&60>l&&60>h&&1e3>p&&s>-1&&12>s&&24>v&&60>y&&c>-1&&c=-864e13&&864e13>=a)?a:0/0}return t.parse.apply(this,arguments)},e}(Date)),Date.now||(Date.now=function(){return(new Date).getTime()});var te=c.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),ee={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(t,e){for(var n=-1;++n=0;)n+=ee.data[e],ee.data[e]=Math.floor(n/t),n=n%t*ee.base},numToString:function(){for(var t=ee.size,e="";--t>=0;)if(""!==e||0===t||0!==ee.data[t]){var n=String(ee.data[t]);""===e?e=n:e+="0000000".slice(0,7-n.length)+n}return e},pow:function pe(t,e,n){return 0===e?n:e%2===1?pe(t,e-1,n*t):pe(t*t,e/2,n)},log:function(t){for(var e=0;t>=4096;)e+=12,t/=4096;for(;t>=2;)e+=1,t/=2;return e}};_(c,{toFixed:function(t){var e,n,r,o,i,a,u,s;if(e=Number(t),e=e!==e?0:Math.floor(e),0>e||e>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(n=Number(this),n!==n)return"NaN";if(-1e21>=n||n>=1e21)return String(n);if(r="",0>n&&(r="-",n=-n),o="0",n>1e-21)if(i=ee.log(n*ee.pow(2,69,1))-69,a=0>i?n*ee.pow(2,-i,1):n/ee.pow(2,i,1),a*=4503599627370496,i=52-i,i>0){for(ee.multiply(0,a),u=e;u>=7;)ee.multiply(1e7,0),u-=7;for(ee.multiply(ee.pow(10,u,1),0),u=i-1;u>=23;)ee.divide(1<<23),u-=23;ee.divide(1<0?(s=o.length,o=e>=s?r+"0.0000000000000000000".slice(0,e-s+2)+o:r+o.slice(0,s-e)+"."+o.slice(s-e)):o=r+o,o}},te);var ne=s.split;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=void 0===/()??/.exec("")[1];s.split=function(e,n){var r=this;if(void 0===e&&0===n)return[];if("[object RegExp]"!==d.call(e))return ne.call(this,e,n);var o,a,u,s,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),l=0;for(e=new RegExp(e.source,f+"g"),r+="",t||(o=new RegExp("^"+e.source+"$(?!\\s)",f)),n=void 0===n?-1>>>0:j(n);(a=e.exec(r))&&(u=a.index+a[0].length,!(u>l&&(c.push(r.slice(l,a.index)),!t&&a.length>1&&a[0].replace(o,function(){for(var t=1;t1&&a.index=n)));)e.lastIndex===a.index&&e.lastIndex++;return l===r.length?(s||!e.test(""))&&c.push(""):c.push(r.slice(l)),c.length>n?c.slice(0,n):c}}():"0".split(void 0,0).length&&(s.split=function(t,e){return void 0===t&&0===e?[]:ne.call(this,t,e)});var re=s.replace,oe=function(){var t=[];return"x".replace(/x(.)?/g,function(e,n){t.push(n)}),1===t.length&&"undefined"==typeof t[0]}();oe||(s.replace=function(t,e){var n=g(e),r=v(t)&&/\)[*?]/.test(t.source);if(n&&r){var o=function(n){var r=arguments.length,o=t.lastIndex;t.lastIndex=0;var i=t.exec(n);return t.lastIndex=o,i.push(arguments[r-2],arguments[r-1]),e.apply(this,i)};return re.call(this,t,o)}return re.call(this,t,e)});var ie=s.substr,ae="".substr&&"b"!=="0b".substr(-1);_(s,{substr:function(t,e){return ie.call(this,0>t&&(t=this.length+t)<0?0:t,e)}},ae);var ue=" \n \f\r   ᠎              \u2028\u2029",se="​",ce="["+ue+"]",fe=new RegExp("^"+ce+ce+"*"),le=new RegExp(ce+ce+"*$"),he=s.trim&&(ue.trim()||!se.trim());_(s,{trim:function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(fe,"").replace(le,"")}},he),(8!==parseInt(ue+"08")||22!==parseInt(ue+"0x16"))&&(parseInt=function(t){var e=/^0[xX]/;return function(n,r){return n=String(n).trim(),Number(r)||(r=e.test(n)?16:10),t(n,r)}}(parseInt))})},{}],20:[function(t,e){var n=t("global");try{e.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch(r){e.exports=!1}},{global:21}],21:[function(t,e){e.exports=function(){return this}()},{}],22:[function(t,e,n){(function(t){(function(){function r(t,e){function n(t){if(n[t]!==v)return n[t];var r;if("bug-string-char-index"==t)r="a"!="a"[0];else if("json"==t)r=n("json-stringify")&&n("json-parse");else{var i,u='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var s=e.stringify,f="function"==typeof s&&b;if(f){(i=function(){return 1}).toJSON=i;try{f="0"===s(0)&&"0"===s(new o)&&'""'==s(new a)&&s(m)===v&&s(v)===v&&s()===v&&"1"===s(i)&&"[1]"==s([i])&&"[null]"==s([v])&&"null"==s(null)&&"[null,null,null]"==s([v,m,null])&&s({a:[i,!0,!1,null,"\x00\b\n\f\r "]})==u&&"1"===s(null,i)&&"[\n 1,\n 2\n]"==s([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==s(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==s(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==s(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==s(new c(-1))}catch(l){f=!1}}r=f}if("json-parse"==t){var h=e.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){i=h(u);var p=5==i.a.length&&1===i.a[0];if(p){try{p=!h('" "')}catch(l){}if(p)try{p=1!==h("01")}catch(l){}if(p)try{p=1!==h("1.")}catch(l){}}}}catch(l){p=!1}r=p}}return n[t]=!!r}t||(t=u.Object()),e||(e=u.Object());var o=t.Number||u.Number,a=t.String||u.String,s=t.Object||u.Object,c=t.Date||u.Date,f=t.SyntaxError||u.SyntaxError,l=t.TypeError||u.TypeError,h=t.Math||u.Math,p=t.JSON||u.JSON;"object"==typeof p&&p&&(e.stringify=p.stringify,e.parse=p.parse);var d,g,v,y=s.prototype,m=y.toString,b=new c(-0xc782b5b800cec);try{b=-109252==b.getUTCFullYear()&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(w){}if(!n("json")){var _="[object Function]",x="[object Date]",j="[object Number]",E="[object String]",C="[object Array]",k="[object Boolean]",S=n("bug-string-char-index");if(!b)var O=h.floor,I=[0,31,59,90,120,151,181,212,243,273,304,334],T=function(t,e){return I[e]+365*(t-1970)+O((t-1969+(e=+(e>1)))/4)-O((t-1901+e)/100)+O((t-1601+e)/400)};if((d=y.hasOwnProperty)||(d=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=m?d=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,d=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,d.call(this,t)}),g=function(t,e){var n,r,o,a=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)d.call(r,o)&&a++;return n=r=null,a?g=2==a?function(t,e){var n,r={},o=m.call(t)==_;for(n in t)o&&"prototype"==n||d.call(r,n)||!(r[n]=1)||!d.call(t,n)||e(n)}:function(t,e){var n,r,o=m.call(t)==_;for(n in t)o&&"prototype"==n||!d.call(t,n)||(r="constructor"===n)||e(n);(r||d.call(t,n="constructor"))&&e(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],g=function(t,e){var n,o,a=m.call(t)==_,u=!a&&"function"!=typeof t.constructor&&i[typeof t.hasOwnProperty]&&t.hasOwnProperty||d;for(n in t)a&&"prototype"==n||!u.call(t,n)||e(n);for(o=r.length;n=r[--o];u.call(t,n)&&e(n));}),g(t,e)},!n("json-stringify")){var A={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},U="000000",N=function(t,e){return(U+(e||0)).slice(-t)},B="\\u00",D=function(t){for(var e='"',n=0,r=t.length,o=!S||r>10,i=o&&(S?t.split(""):t);r>n;n++){var a=t.charCodeAt(n);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=A[a];break;default:if(32>a){e+=B+N(2,a.toString(16));break}e+=o?i[n]:t.charAt(n)}}return e+'"'},L=function(t,e,n,r,o,i,a){var u,s,c,f,h,p,y,b,w,_,S,I,A,U,B,M;try{u=e[t]}catch(R){}if("object"==typeof u&&u)if(s=m.call(u),s!=x||d.call(u,"toJSON"))"function"==typeof u.toJSON&&(s!=j&&s!=E&&s!=C||d.call(u,"toJSON"))&&(u=u.toJSON(t));else if(u>-1/0&&1/0>u){if(T){for(h=O(u/864e5),c=O(h/365.2425)+1970-1;T(c+1,0)<=h;c++);for(f=O((h-T(c,0))/30.42);T(c,f+1)<=h;f++);h=1+h-T(c,f),p=(u%864e5+864e5)%864e5,y=O(p/36e5)%24,b=O(p/6e4)%60,w=O(p/1e3)%60,_=p%1e3}else c=u.getUTCFullYear(),f=u.getUTCMonth(),h=u.getUTCDate(),y=u.getUTCHours(),b=u.getUTCMinutes(),w=u.getUTCSeconds(),_=u.getUTCMilliseconds();u=(0>=c||c>=1e4?(0>c?"-":"+")+N(6,0>c?-c:c):N(4,c))+"-"+N(2,f+1)+"-"+N(2,h)+"T"+N(2,y)+":"+N(2,b)+":"+N(2,w)+"."+N(3,_)+"Z"}else u=null;if(n&&(u=n.call(e,t,u)),null===u)return"null";if(s=m.call(u),s==k)return""+u;if(s==j)return u>-1/0&&1/0>u?""+u:"null";if(s==E)return D(""+u);if("object"==typeof u){for(U=a.length;U--;)if(a[U]===u)throw l();if(a.push(u),S=[],B=i,i+=o,s==C){for(A=0,U=u.length;U>A;A++)I=L(A,u,n,r,o,i,a),S.push(I===v?"null":I);M=S.length?o?"[\n"+i+S.join(",\n"+i)+"\n"+B+"]":"["+S.join(",")+"]":"[]"}else g(r||u,function(t){var e=L(t,u,n,r,o,i,a);e!==v&&S.push(D(t)+":"+(o?" ":"")+e)}),M=S.length?o?"{\n"+i+S.join(",\n"+i)+"\n"+B+"}":"{"+S.join(",")+"}":"{}";return a.pop(),M}};e.stringify=function(t,e,n){var r,o,a,u;if(i[typeof e]&&e)if((u=m.call(e))==_)o=e;else if(u==C){a={};for(var s,c=0,f=e.length;f>c;s=e[c++],u=m.call(s),(u==E||u==j)&&(a[s]=1));}if(n)if((u=m.call(n))==j){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.lengthM;)switch(o=i.charCodeAt(M)){case 9:case 10:case 13:case 32:M++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=S?i.charAt(M):i[M],M++,t;case 34:for(t="@",M++;a>M;)if(o=i.charCodeAt(M),32>o)P();else if(92==o)switch(o=i.charCodeAt(++M)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=q[o],M++;break;case 117:for(e=++M,n=M+4;n>M;M++)o=i.charCodeAt(M),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||P();t+=F("0x"+i.slice(e,M));break;default:P()}else{if(34==o)break;for(o=i.charCodeAt(M),e=M;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++M);t+=i.slice(e,M)}if(34==i.charCodeAt(M))return M++,t;P();default:if(e=M,45==o&&(r=!0,o=i.charCodeAt(++M)),o>=48&&57>=o){for(48==o&&(o=i.charCodeAt(M+1),o>=48&&57>=o)&&P(),r=!1;a>M&&(o=i.charCodeAt(M),o>=48&&57>=o);M++);if(46==i.charCodeAt(M)){for(n=++M;a>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==M&&P(),M=n}if(o=i.charCodeAt(M),101==o||69==o){for(o=i.charCodeAt(++M),(43==o||45==o)&&M++,n=M;a>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==M&&P(),M=n}return+i.slice(e,M)}if(r&&P(),"true"==i.slice(M,M+4))return M+=4,!0;if("false"==i.slice(M,M+5))return M+=5,!1;if("null"==i.slice(M,M+4))return M+=4,null;P()}return"$"},H=function(t){var e,n;if("$"==t&&P(),"string"==typeof t){if("@"==(S?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=$(),"]"!=t;n||(n=!0))n&&(","==t?(t=$(),"]"==t&&P()):P()),","==t&&P(),e.push(H(t));return e}if("{"==t){for(e={};t=$(),"}"!=t;n||(n=!0))n&&(","==t?(t=$(),"}"==t&&P()):P()),(","==t||"string"!=typeof t||"@"!=(S?t.charAt(0):t[0])||":"!=$())&&P(),e[t.slice(1)]=H($());return e}P()}return t},J=function(t,e,n){var r=z(t,e,n);r===v?delete t[e]:t[e]=r},z=function(t,e,n){var r,o=t[e];if("object"==typeof o&&o)if(m.call(o)==C)for(r=o.length;r--;)J(o,r,n);else g(o,function(t){J(o,t,n)});return n.call(t,e,o)};e.parse=function(t,e){var n,r;return M=0,R=""+t,n=H($()),"$"!=$()&&P(),M=R=null,e&&m.call(e)==_?z((r={},r[""]=n,r),"",e):n}}}return e.runInContext=r,e}var o="function"==typeof define&&define.amd,i={"function":!0,object:!0},a=i[typeof n]&&n&&!n.nodeType&&n,u=i[typeof window]&&window||this,s=a&&i[typeof e]&&e&&!e.nodeType&&"object"==typeof t&&t;if(!s||s.global!==s&&s.window!==s&&s.self!==s||(u=s),a&&!o)r(u,a);else{var c=u.JSON,f=u.JSON3,l=!1,h=r(u,u.JSON3={noConflict:function(){return l||(l=!0,u.JSON=c,u.JSON3=f,c=f=null),h}});u.JSON={parse:h.parse,stringify:h.stringify}}o&&define(function(){return h})}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(t,e){function n(){}function r(t,e,r){function a(){u.parentNode.removeChild(u),window[d]=n}"function"==typeof e&&(r=e,e={}),e||(e={});var u,s,c=e.prefix||"__jp",f=e.param||"callback",l=null!=e.timeout?e.timeout:6e4,h=encodeURIComponent,p=document.getElementsByTagName("script")[0]||document.head,d=c+i++;l&&(s=setTimeout(function(){a(),r&&r(new Error("Timeout"))},l)),window[d]=function(t){o("jsonp got",t),s&&clearTimeout(s),a(),r&&r(null,t)},t+=(~t.indexOf("?")?"&":"?")+f+"="+h(d),t=t.replace("?&","?"),o('jsonp req "%s"',t),u=document.createElement("script"),u.src=t,p.parentNode.insertBefore(u,p)}var o=t("debug")("jsonp");e.exports=r;var i=0},{debug:24}],24:[function(t,e,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var t=arguments,e=this.useColors;if(t[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+t[0]+(e?"%c ":" ")+"+"+n.humanize(this.diff),!e)return t;var r="color: "+this.color;t=[t[0],r,"color: inherit"].concat(Array.prototype.slice.call(t,1));var o=0,i=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r),t}function i(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?localStorage.removeItem("debug"):localStorage.debug=t}catch(e){}}function u(){var t;try{t=localStorage.debug}catch(e){}return t}n=e.exports=t("./debug"),n.log=i,n.formatArgs=o,n.save=a,n.load=u,n.useColors=r,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(t){return JSON.stringify(t)},n.enable(u())},{"./debug":25}],25:[function(t,e,n){function r(){return n.colors[f++%n.colors.length]}function o(t){function e(){}function o(){var t=o,e=+new Date,i=e-(c||e);t.diff=i,t.prev=c,t.curr=e,c=e,null==t.useColors&&(t.useColors=n.useColors()),null==t.color&&t.useColors&&(t.color=r());var a=Array.prototype.slice.call(arguments);a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var u=0;a[0]=a[0].replace(/%([a-z%])/g,function(e,r){if("%%"===e)return e;u++;var o=n.formatters[r];if("function"==typeof o){var i=a[u];e=o.call(t,i),a.splice(u,1),u--}return e}),"function"==typeof n.formatArgs&&(a=n.formatArgs.apply(t,a));var s=o.log||n.log||console.log.bind(console);s.apply(t,a)}e.enabled=!1,o.enabled=!0;var i=n.enabled(t)?o:e;return i.namespace=t,i}function i(t){n.save(t);for(var e=(t||"").split(/[\s,]+/),r=e.length,o=0;r>o;o++)e[o]&&(t=e[o].replace(/\*/g,".*?"),"-"===t[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$")))}function a(){n.enable("")}function u(t){var e,r;for(e=0,r=n.skips.length;r>e;e++)if(n.skips[e].test(t))return!1;for(e=0,r=n.names.length;r>e;e++)if(n.names[e].test(t))return!0;return!1}function s(t){return t instanceof Error?t.stack||t.message:t +}n=e.exports=o,n.coerce=s,n.disable=a,n.enable=i,n.enabled=u,n.humanize=t("ms"),n.names=[],n.skips=[],n.formatters={};var c,f=0},{ms:26}],26:[function(t,e){function n(t){var e=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"y":return n*f;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"h":return n*s;case"minutes":case"minute":case"m":return n*u;case"seconds":case"second":case"s":return n*a;case"ms":return n}}}function r(t){return t>=c?Math.round(t/c)+"d":t>=s?Math.round(t/s)+"h":t>=u?Math.round(t/u)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function o(t){return i(t,c,"day")||i(t,s,"hour")||i(t,u,"minute")||i(t,a,"second")||t+" ms"}function i(t,e,n){return e>t?void 0:1.5*e>t?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var a=1e3,u=60*a,s=60*u,c=24*s,f=365.25*c;e.exports=function(t,e){return e=e||{},"string"==typeof t?n(t):e.long?o(t):r(t)}},{}],27:[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,o=t?t.length:0;++r-1?0:-1:t?0:-1}function i(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:w+t,o=e[n]||(e[n]={});"object"==n?(o[r]||(o[r]=[])).push(t):o[r]=!0}}function a(t){return t.charCodeAt(0)}function u(t,e){for(var n=t.criteria,r=e.criteria,o=-1,i=n.length;++ou||"undefined"==typeof a)return 1;if(u>a||"undefined"==typeof u)return-1}}return t.index-e.index}function s(t){var e=-1,n=t.length,r=t[0],o=t[n/2|0],a=t[n-1];if(r&&"object"==typeof r&&o&&"object"==typeof o&&a&&"object"==typeof a)return!1;var u=l();u["false"]=u["null"]=u["true"]=u.undefined=!1;var s=l();for(s.array=t,s.cache=u,s.push=i;++eo?0:o);++r=_&&i===r,c=[];if(u){var f=s(e);f?(i=o,e=f):u=!1}for(;++n-1:void 0});return o.pop(),i.pop(),m&&(h(o),h(i)),a}function ee(t,e,n,r,o){(Gr(e)?Ve:so)(e,function(e,i){var a,u,s=e,c=t[i];if(e&&((u=Gr(e))||co(e))){for(var f=r.length;f--;)if(a=r[f]==e){c=o[f];break}if(!a){var l;n&&(s=n(c,e),(l="undefined"!=typeof s)&&(c=s)),l||(c=u?Gr(c)?c:[]:co(c)?c:{}),r.push(e),o.push(c),l||ee(c,e,n,r,o)}}else n&&(s=n(c,e),"undefined"==typeof s&&(s=e)),"undefined"!=typeof s&&(c=s);t[i]=c})}function re(t,e){return t+Ar(Kr()*(e-t+1))}function oe(t,e,n){var i=-1,a=se(),u=t?t.length:0,c=[],l=!e&&u>=_&&a===r,d=n||l?f():c;if(l){var g=s(d);a=o,d=g}for(;++i3&&"function"==typeof e[n-2])var r=x(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var o=d(arguments,1,n),i=-1,a=f(),u=f();++in?zr(0,i+n):n)||0,Gr(t)?a=o(t,e,n)>-1:"number"==typeof i?a=(De(t)?t.indexOf(e,n):o(t,e,n))>-1:so(t,function(t){return++r>=n?!(a=t===e):void 0}),a}function Xe(t,n,r){var o=!0;n=e.createCallback(n,r,3);var i=-1,a=t?t.length:0;if("number"==typeof a)for(;++ii&&(i=c)}else n=null==n&&De(t)?a:e.createCallback(n,r,3),Ve(t,function(t,e,r){var a=n(t,e,r);a>o&&(o=a,i=t)});return i}function en(t,n,r){var o=1/0,i=o;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Gr(t))for(var u=-1,s=t.length;++uc&&(i=c)}else n=null==n&&De(t)?a:e.createCallback(n,r,3),Ve(t,function(t,e,r){var a=n(t,e,r);o>a&&(o=a,i=t)});return i}function nn(t,n,r,o){if(!t)return r;var i=arguments.length<3;n=e.createCallback(n,o,4);var a=-1,u=t.length;if("number"==typeof u)for(i&&(r=t[++a]);++an?zr(0,o+n):n||0}else if(n){var i=Sn(t,e);return t[i]===e?i:-1}return r(t,e,n)}function bn(t,n,r){var o=0,i=t?t.length:0;if("number"!=typeof n&&null!=n){var a=i;for(n=e.createCallback(n,r,3);a--&&n(t[a],a,t);)o++}else o=null==n||r?1:n||o;return d(t,0,Xr(zr(0,i-o),i))}function wn(){for(var t=[],e=-1,n=arguments.length,i=f(),a=se(),u=a===r,c=f();++e=_&&s(e?t[e]:c)))}var d=t[0],g=-1,v=d?d.length:0,y=[];t:for(;++gn?zr(0,r+n):Xr(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function jn(t){for(var e=arguments,n=0,r=e.length,o=t?t.length:0;++ni;){var u=i+a>>>1;r(t[u])1?arguments:arguments[0],e=-1,n=t?tn(po(t,"length")):0,r=dr(0>n?0:n);++e2?ae(t,17,d(arguments,2),null,e):ae(t,1,null,null,e)}function Ln(t){for(var e=arguments.length>1?Q(arguments,!0,!1,1):we(t),n=-1,r=e.length;++n2?ae(e,19,d(arguments,2),null,t):ae(e,3,null,null,t)}function Rn(){for(var t=arguments,e=t.length;e--;)if(!Ie(t[e]))throw new jr;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function Fn(t,e){return e="number"==typeof e?e:+e||t.length,ae(t,4,null,null,null,e)}function qn(t,e,n){var r,o,i,a,u,s,c,f=0,l=!1,h=!0;if(!Ie(t))throw new jr;if(e=zr(0,e)||0,n===!0){var p=!0;h=!1}else Te(n)&&(p=n.leading,l="maxWait"in n&&(zr(e,n.maxWait)||0),h="trailing"in n?n.trailing:h);var d=function(){var n=e-(vo()-a);if(0>=n){o&&Tr(o);var l=c;o=s=c=v,l&&(f=vo(),i=t.apply(u,r),s||o||(r=u=null))}else s=Lr(d,n)},g=function(){s&&Tr(s),o=s=c=v,(h||l!==e)&&(f=vo(),i=t.apply(u,r),s||o||(r=u=null))};return function(){if(r=arguments,a=vo(),u=this,c=h&&(s||!p),l===!1)var n=p&&!s;else{o||p||(f=a);var v=l-(a-f),y=0>=v;y?(o&&(o=Tr(o)),f=a,i=t.apply(u,r)):o||(o=Lr(g,v))}return y&&s?s=Tr(s):s||e===l||(s=Lr(d,e)),n&&(y=!0,i=t.apply(u,r)),!y||s||o||(r=u=null),i}}function Pn(t){if(!Ie(t))throw new jr;var e=d(arguments,1);return Lr(function(){t.apply(v,e)},1)}function $n(t,e){if(!Ie(t))throw new jr;var n=d(arguments,2);return Lr(function(){t.apply(v,n)},e)}function Hn(t,e){if(!Ie(t))throw new jr;var n=function(){var r=n.cache,o=e?e.apply(this,arguments):w+arguments[0];return Br.call(r,o)?r[o]:r[o]=t.apply(this,arguments)};return n.cache={},n}function Jn(t){var e,n;if(!Ie(t))throw new jr;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function zn(t){return ae(t,16,d(arguments,1))}function Xn(t){return ae(t,32,null,d(arguments,1))}function Zn(t,e,n){var r=!0,o=!0;if(!Ie(t))throw new jr;return n===!1?r=!1:Te(n)&&(r="leading"in n?n.leading:r,o="trailing"in n?n.trailing:o),Z.leading=r,Z.maxWait=e,Z.trailing=o,qn(t,e,Z)}function Kn(t,e){return ae(e,16,[t])}function Wn(t){return function(){return t}}function Vn(t,e,n){var r=typeof t;if(null==t||"function"==r)return x(t,e,n);if("object"!=r)return nr(t);var o=to(t),i=o[0],a=t[i];return 1!=o.length||a!==a||Te(a)?function(e){for(var n=o.length,r=!1;n--&&(r=te(e[o[n]],t[o[n]],null,!0)););return r}:function(t){var e=t[i];return a===e&&(0!==a||1/a==1/e)}}function Yn(t){return null==t?"":xr(t).replace(oo,ue)}function Gn(t){return t}function Qn(t,r,o){var i=!0,a=r&&we(r);r&&(o||a.length)||(null==o&&(o=r),u=n,r=t,t=e,a=we(r)),o===!1?i=!1:Te(o)&&"chain"in o&&(i=o.chain);var u=t,s=Ie(u);Ve(a,function(e){var n=t[e]=r[e];s&&(u.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,o=[r];Dr.apply(o,arguments);var a=n.apply(t,o);if(i||e){if(r===a&&Te(a))return this;a=new u(a),a.__chain__=e}return a})})}function tr(){return t._=kr,this}function er(){}function nr(t){return function(e){return e[t]}}function rr(t,e,n){var r=null==t,o=null==e;if(null==n&&("boolean"==typeof t&&o?(n=t,t=1):o||"boolean"!=typeof e||(n=e,o=!0)),r&&o&&(e=1),t=+t||0,o?(e=t,t=0):e=+e||0,n||t%1||e%1){var i=Kr();return Xr(t+i*(e-t+parseFloat("1e-"+((i+"").length-1))),e)}return re(t,e)}function or(t,e){if(t){var n=t[e];return Ie(n)?t[e]():n}}function ir(t,n,r){var o=e.templateSettings;t=xr(t||""),r=ao({},r,o);var i,a=ao({},r.imports,o.imports),u=to(a),s=He(a),f=0,l=r.interpolate||U,h="__p += '",p=_r((r.escape||U).source+"|"+l.source+"|"+(l===T?S:U).source+"|"+(r.evaluate||U).source+"|$","g");t.replace(p,function(e,n,r,o,a,u){return r||(r=o),h+=t.slice(f,u).replace(B,c),n&&(h+="' +\n__e("+n+") +\n'"),a&&(i=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e}),h+="';\n";var d=r.variable,g=d;g||(d="obj",h="with ("+d+") {\n"+h+"\n}\n"),h=(i?h.replace(E,""):h).replace(C,"$1").replace(k,"$1;"),h="function("+d+") {\n"+(g?"":d+" || ("+d+" = {});\n")+"var __t, __p = '', __e = _.escape"+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+L++ +"]")+"\n*/";try{var m=yr(u,"return "+h+y).apply(v,s)}catch(b){throw b.source=h,b}return n?m(n):(m.source=h,m)}function ar(t,e,n){t=(t=+t)>-1?t:0;var r=-1,o=dr(t);for(e=x(e,n,1);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:e}},qr||(m=function(){function e(){}return function(n){if(Te(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var Yr=Fr?function(t,e){K.value=e,Fr(t,"__bindData__",K)}:er,Gr=Pr||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Sr.call(t)==R||!1},Qr=function(t){var e,n=t,r=[];if(!n)return r;if(!W[typeof t])return r;for(e in n)Br.call(n,e)&&r.push(e);return r},to=Jr?function(t){return Te(t)?Jr(t):[]}:Qr,eo={"&":"&","<":"<",">":">",'"':""","'":"'"},no=xe(eo),ro=_r("("+to(no).join("|")+")","g"),oo=_r("["+to(eo).join("")+"]","g"),io=function(t,e,n){var r,o=t,i=o;if(!o)return i;var a=arguments,u=0,s="number"==typeof n?2:a.length;if(s>3&&"function"==typeof a[s-2])var c=x(a[--s-1],a[s--],2);else s>2&&"function"==typeof a[s-1]&&(c=a[--s]);for(;++u/g,A=RegExp("^["+j+"]*0+(?=.$)"),U=/($^)/,N=/\bthis\b/,B=/['\n\r\t\u2028\u2029\\]/g,D=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],L=0,M="[object Arguments]",R="[object Array]",F="[object Boolean]",q="[object Date]",P="[object Function]",$="[object Number]",H="[object Object]",J="[object RegExp]",z="[object String]",X={};X[P]=!1,X[M]=X[R]=X[F]=X[q]=X[$]=X[H]=X[J]=X[z]=!0;var Z={leading:!1,maxWait:0,trailing:!1},K={configurable:!1,enumerable:!1,value:null,writable:!1},W={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},V={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},Y=W[typeof window]&&window||this,G=W[typeof n]&&n&&!n.nodeType&&n,Q=W[typeof e]&&e&&!e.nodeType&&e,te=Q&&Q.exports===G&&G,ee=W[typeof t]&&t;!ee||ee.global!==ee&&ee.window!==ee||(Y=ee);var ne=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Y._=ne,define(function(){return ne})):G&&Q?te?(Q.exports=ne)._=ne:G._=ne:Y._=ne}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(t,e){function n(){}function r(t){var e={}.toString.call(t);switch(e){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function o(){if(v.XMLHttpRequest&&("file:"!=v.location.protocol||!v.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}return!1}function i(t){return t===Object(t)}function a(t){if(!i(t))return t;var e=[];for(var n in t)null!=t[n]&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.join("&")}function u(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;a>i;++i)n=o[i],e=n.split("="),r[decodeURIComponent(e[0])]=decodeURIComponent(e[1]);return r}function s(t){var e,n,r,o,i=t.split(/\r?\n/),a={};i.pop();for(var u=0,s=i.length;s>u;++u)n=i[u],e=n.indexOf(":"),r=n.slice(0,e).toLowerCase(),o=y(n.slice(e+1)),a[r]=o;return a}function c(t){return t.split(/ *; */).shift()}function f(t){return g(t.split(/ *; */),function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t},{})}function l(t,e){e=e||{},this.req=t,this.xhr=this.req.xhr,this.text=this.xhr.responseText,this.setStatusProperties(this.xhr.status),this.header=this.headers=s(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text):null}function h(t,e){var n=this;d.call(this),this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var e=new l(n);"HEAD"==t&&(e.text=null),n.callback(null,e)})}function p(t,e){return"function"==typeof e?new h("GET",t).end(e):1==arguments.length?new h("GET",t):new h(t,e)}var d=t("emitter"),g=t("reduce"),v="undefined"==typeof window?this:window,y="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};p.serializeObject=a,p.parseString=u,p.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},p.serialize={"application/x-www-form-urlencoded":a,"application/json":JSON.stringify},p.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},l.prototype.get=function(t){return this.header[t.toLowerCase()] },l.prototype.setHeaderProperties=function(){var t=this.header["content-type"]||"";this.type=c(t);var e=f(t);for(var n in e)this[n]=e[n]},l.prototype.parseBody=function(t){var e=p.parse[this.type];return e?e(t):null},l.prototype.setStatusProperties=function(t){var e=t/100|0;this.status=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.clientError=4==e,this.serverError=5==e,this.error=4==e||5==e?this.toError():!1,this.accepted=202==t,this.noContent=204==t||1223==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.notFound=404==t,this.forbidden=403==t},l.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot "+e+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},p.Response=l,d(h.prototype),h.prototype.use=function(t){return t(this),this},h.prototype.timeout=function(t){return this._timeout=t,this},h.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},h.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},h.prototype.set=function(t,e){if(i(t)){for(var n in t)this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},h.prototype.getHeader=function(t){return this._header[t.toLowerCase()]},h.prototype.type=function(t){return this.set("Content-Type",p.types[t]||t),this},h.prototype.accept=function(t){return this.set("Accept",p.types[t]||t),this},h.prototype.auth=function(t,e){var n=btoa(t+":"+e);return this.set("Authorization","Basic "+n),this},h.prototype.query=function(t){return"string"!=typeof t&&(t=a(t)),t&&this._query.push(t),this},h.prototype.field=function(t,e){return this._formData||(this._formData=new FormData),this._formData.append(t,e),this},h.prototype.attach=function(t,e,n){return this._formData||(this._formData=new FormData),this._formData.append(t,e,n),this},h.prototype.send=function(t){var e=i(t),n=this.getHeader("Content-Type");if(e&&i(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(n||this.type("form"),n=this.getHeader("Content-Type"),this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return e?(n||this.type("json"),this):this},h.prototype.callback=function(t,e){var n=this._callback;return 2==n.length?n(t,e):t?this.emit("error",t):void n(e)},h.prototype.crossDomainError=function(){var t=new Error("Origin is not allowed by Access-Control-Allow-Origin");t.crossDomain=!0,this.callback(t)},h.prototype.timeoutError=function(){var t=this._timeout,e=new Error("timeout of "+t+"ms exceeded");e.timeout=t,this.callback(e)},h.prototype.withCredentials=function(){return this._withCredentials=!0,this},h.prototype.end=function(t){var e=this,i=this.xhr=o(),a=this._query.join("&"),u=this._timeout,s=this._formData||this._data;if(this._callback=t||n,i.onreadystatechange=function(){return 4==i.readyState?0==i.status?e.aborted?e.timeoutError():e.crossDomainError():void e.emit("end"):void 0},i.upload&&(i.upload.onprogress=function(t){t.percent=t.loaded/t.total*100,e.emit("progress",t)}),u&&!this._timer&&(this._timer=setTimeout(function(){e.abort()},u)),a&&(a=p.serializeObject(a),this.url+=~this.url.indexOf("?")?"&"+a:"?"+a),i.open(this.method,this.url,!0),this._withCredentials&&(i.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof s&&!r(s)){var c=p.serialize[this.getHeader("Content-Type")];c&&(s=c(s))}for(var f in this.header)null!=this.header[f]&&i.setRequestHeader(f,this.header[f]);return this.emit("request",this),i.send(s),this},p.Request=h,p.get=function(t,e,n){var r=p("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},p.head=function(t,e,n){var r=p("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.del=function(t,e){var n=p("DELETE",t);return e&&n.end(e),n},p.patch=function(t,e,n){var r=p("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.post=function(t,e,n){var r=p("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},p.put=function(t,e,n){var r=p("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},e.exports=p},{emitter:29,reduce:30}],29:[function(t,e){function n(t){return t?r(t):void 0}function r(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},n.prototype.once=function(t,e){function n(){r.off(t,n),e.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=e,this.on(t,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r,o=0;or;++r)n[r].apply(this,e)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],30:[function(t,e){e.exports=function(t,e,n){for(var r=0,o=t.length,i=3==arguments.length?n:t[r++];o>r;)i=e.call(null,i,t[r],++r,t);return i}},{}],31:[function(t,e){!function(t,n,r){"undefined"!=typeof e&&e.exports?e.exports=r():t[n]=r()}(this,"verge",function(){function t(){return{width:f(),height:l()}}function e(t,e){var n={};return e=+e||0,n.width=(n.right=t.right+e)-(n.left=t.left-e),n.height=(n.bottom=t.bottom+e)-(n.top=t.top-e),n}function n(t,n){return t=t&&!t.nodeType?t[0]:t,t&&1===t.nodeType?e(t.getBoundingClientRect(),n):!1}function r(e){e=null==e?t():1===e.nodeType?n(e):e;var r=e.height,o=e.width;return r="function"==typeof r?r.call(e):r,o="function"==typeof o?o.call(e):o,o/r}var o={},i="undefined"!=typeof window&&window,a="undefined"!=typeof document&&document,u=a&&a.documentElement,s=i.matchMedia||i.msMatchMedia,c=s?function(t){return!!s.call(i,t).matches}:function(){return!1},f=o.viewportW=function(){var t=u.clientWidth,e=i.innerWidth;return e>t?e:t},l=o.viewportH=function(){var t=u.clientHeight,e=i.innerHeight;return e>t?e:t};return o.mq=c,o.matchMedia=s?function(){return s.apply(i,arguments)}:function(){return{}},o.viewport=t,o.scrollX=function(){return i.pageXOffset||u.scrollLeft},o.scrollY=function(){return i.pageYOffset||u.scrollTop},o.rectangle=n,o.aspect=r,o.inX=function(t,e){var r=n(t,e);return!!r&&r.right>=0&&r.left<=f()},o.inY=function(t,e){var r=n(t,e);return!!r&&r.bottom>=0&&r.top<=l()},o.inViewport=function(t,e){var r=n(t,e);return!!r&&r.bottom>=0&&r.right>=0&&r.top<=l()&&r.left<=f()},o})},{}]},{},[2]); \ No newline at end of file diff --git a/lib/version.js b/lib/version.js index 36efffc5..a1fc07d8 100644 --- a/lib/version.js +++ b/lib/version.js @@ -1,3 +1,3 @@ 'use strict'; -module.exports = '1.0.0'; +module.exports = '1.1.0'; diff --git a/package.json b/package.json index 670bd563..2181d85f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "td-js-sdk", - "version": "1.0.0", + "version": "1.1.0", "bugs": "https://github.com/treasure-data/td-js-sdk/issues", "description": "Browser JS library for sending events to your Treasure Data account", "main": "dist/td.js",