UNPKG

leancloud-storage

Version:
2 lines 152 kB
"use strict";function _defineProperty2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.AV=e()}}(function(){var e;return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return i(n?n:t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){var r={utf8:{stringToBytes:function(e){return r.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(r.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};t.exports=r},{}],3:[function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}"undefined"!=typeof t&&(t.exports=r),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],4:[function(e,t,n){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(t){for(var n=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?n.push(e.charAt(i>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&n.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return n}};t.exports=n}()},{}],5:[function(e,t,n){(function(r){function i(){return"undefined"!=typeof document&&"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 e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r),e}function s(){return"object"===("undefined"==typeof console?"undefined":_typeof(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(t){}}function u(){var e;try{e=n.storage.debug}catch(t){}return"env"in("undefined"==typeof r?{}:r)&&(e=r.env.DEBUG),e}function c(){try{return window.localStorage}catch(e){}}n=t.exports=e("./debug"),n.log=s,n.formatArgs=o,n.save=a,n.load=u,n.useColors=i,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(u())}).call(this,e("_process"))},{"./debug":6,_process:15}],6:[function(e,t,n){function r(){return n.colors[l++%n.colors.length]}function i(e){function t(){}function i(){var e=i,t=+new Date,o=t-(c||t);e.diff=o,e.prev=c,e.curr=t,c=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=r());for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var u=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,r){if("%%"===t)return t;u++;var i=n.formatters[r];if("function"==typeof i){var o=s[u];t=i.call(e,o),s.splice(u,1),u--}return t}),s=n.formatArgs.apply(e,s);var l=i.log||n.log||console.log.bind(console);l.apply(e,s)}t.enabled=!1,i.enabled=!0;var o=n.enabled(e)?i:t;return o.namespace=e,o}function o(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&(e=t[i].replace(/[\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function s(){n.enable("")}function a(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=i.debug=i,n.coerce=u,n.disable=s,n.enable=o,n.enabled=a,n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var c,l=0},{ms:14}],7:[function(e,t,n){var r=n.createUniqueKey="undefined"!=typeof Symbol?Symbol:function(e){return"[["+e+"_"+Math.random().toFixed(8).slice(2)+"]]"};n.LISTENERS=r("listeners"),n.CAPTURE=1,n.BUBBLE=2,n.ATTRIBUTE=3,n.newNode=function(e,t){return{listener:e,kind:t,next:null}}},{}],8:[function(e,t,n){function r(e,t){for(var n=e[s][t];null!=n;){if(n.kind===a)return n.listener;n=n.next}return null}function i(e,t,n){"function"!=typeof n&&"object"!==("undefined"==typeof n?"undefined":_typeof(n))&&(n=null);for(var r=null,i=e[s][t];null!=i;)i.kind===a?null==r?e[s][t]=i.next:r.next=i.next:r=i,i=i.next;null!=n&&(null==r?e[s][t]=u(n,a):r.next=u(n,a))}var o=e("./commons"),s=o.LISTENERS,a=o.ATTRIBUTE,u=o.newNode;n.defineCustomEventTarget=function(e,t){function n(){e.call(this)}var o={constructor:{value:n,configurable:!0,writable:!0}};return t.forEach(function(e){o["on"+e]={get:function(){return r(this,e)},set:function(t){i(this,e,t)},configurable:!0,enumerable:!0}}),n.prototype=Object.create(e.prototype,o),n}},{"./commons":7}],9:[function(e,t,n){var r=e("./commons"),i=e("./custom-event-target"),o=e("./event-wrapper"),s=r.LISTENERS,a=r.CAPTURE,u=r.BUBBLE,c=r.ATTRIBUTE,l=r.newNode,f=i.defineCustomEventTarget,h=o.createEventWrapper,d=o.STOP_IMMEDIATE_PROPAGATION_FLAG,p="undefined"!=typeof window&&"undefined"!=typeof window.EventTarget,_=t.exports=function v(){if(!(this instanceof v)){if(1===arguments.length&&Array.isArray(arguments[0]))return f(v,arguments[0]);if(arguments.length>0){for(var e=Array(arguments.length),t=0;t<arguments.length;++t)e[t]=arguments[t];return f(v,e)}throw new TypeError("Cannot call a class as a function")}Object.defineProperty(this,s,{value:Object.create(null)})};_.prototype=Object.create((p?window.EventTarget:Object).prototype,{constructor:{value:_,writable:!0,configurable:!0},addEventListener:{value:function(e,t,n){if(null==t)return!1;if("function"!=typeof t&&"object"!==("undefined"==typeof t?"undefined":_typeof(t)))throw new TypeError('"listener" is not an object.');var r=n?a:u,i=this[s][e];if(null==i)return this[s][e]=l(t,r),!0;for(var o=null;null!=i;){if(i.listener===t&&i.kind===r)return!1;o=i,i=i.next}return o.next=l(t,r),!0},configurable:!0,writable:!0},removeEventListener:{value:function(e,t,n){if(null==t)return!1;for(var r=n?a:u,i=null,o=this[s][e];null!=o;){if(o.listener===t&&o.kind===r)return null==i?this[s][e]=o.next:i.next=o.next,!0;i=o,o=o.next}return!1},configurable:!0,writable:!0},dispatchEvent:{value:function(e){var t=this[s][e.type];if(null==t)return!0;for(var n=h(e,this);null!=t&&("function"==typeof t.listener?t.listener.call(this,n):t.kind!==c&&"function"==typeof t.listener.handleEvent&&t.listener.handleEvent(n),!n[d]);)t=t.next;return!n.defaultPrevented},configurable:!0,writable:!0}})},{"./commons":7,"./custom-event-target":8,"./event-wrapper":10}],10:[function(e,t,n){var r=e("./commons").createUniqueKey,i=r("stop_immediate_propagation_flag"),o=r("canceled_flag"),s=r("original_event"),a=Object.freeze({stopPropagation:Object.freeze({value:function(){var e=this[s];"function"==typeof e.stopPropagation&&e.stopPropagation()},writable:!0,configurable:!0}),stopImmediatePropagation:Object.freeze({value:function(){this[i]=!0;var e=this[s];"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation()},writable:!0,configurable:!0}),preventDefault:Object.freeze({value:function(){this.cancelable===!0&&(this[o]=!0);var e=this[s];"function"==typeof e.preventDefault&&e.preventDefault()},writable:!0,configurable:!0}),defaultPrevented:Object.freeze({get:function(){return this[o]},enumerable:!0,configurable:!0})});n.STOP_IMMEDIATE_PROPAGATION_FLAG=i,n.createEventWrapper=function(e,t){var n="number"==typeof e.timeStamp?e.timeStamp:Date.now(),r={type:{value:e.type,enumerable:!0},target:{value:t,enumerable:!0},currentTarget:{value:t,enumerable:!0},eventPhase:{value:2,enumerable:!0},bubbles:{value:Boolean(e.bubbles),enumerable:!0},cancelable:{value:Boolean(e.cancelable),enumerable:!0},timeStamp:{value:n,enumerable:!0},isTrusted:{value:!1,enumerable:!0}};return r[i]={value:!1,writable:!0},r[o]={value:!1,writable:!0},r[s]={value:e},"undefined"!=typeof e.detail&&(r.detail={value:e.detail,enumerable:!0}),Object.create(Object.create(e,a),r)}},{"./commons":7}],11:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}t.exports=function(e){return null!=e&&(r(e)||i(e)||!!e._isBuffer)}},{}],12:[function(e,t,n){!function(e){var r={},i={};r.length=0,r.getItem=function(e){return i[e]||null},r.setItem=function(e,t){"undefined"==typeof t?r.removeItem(e):(i.hasOwnProperty(e)||r.length++,i[e]=""+t)},r.removeItem=function(e){i.hasOwnProperty(e)&&(delete i[e],r.length--)},r.key=function(e){return Object.keys(i)[e]||null},r.clear=function(){i={},r.length=0},"object"===("undefined"==typeof n?"undefined":_typeof(n))?t.exports=r:e.localStorageMemory=r}(this)},{}],13:[function(e,t,n){!function(){var n=e("crypt"),r=e("charenc").utf8,i=e("is-buffer"),o=e("charenc").bin,s=function a(e,t){e.constructor==String?e=t&&"binary"===t.encoding?o.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var s=n.bytesToWords(e),u=8*e.length,c=1732584193,l=-271733879,f=-1732584194,h=271733878,d=0;d<s.length;d++)s[d]=16711935&(s[d]<<8|s[d]>>>24)|4278255360&(s[d]<<24|s[d]>>>8);s[u>>>5]|=128<<u%32,s[(u+64>>>9<<4)+14]=u;for(var p=a._ff,_=a._gg,v=a._hh,m=a._ii,d=0;d<s.length;d+=16){var g=c,y=l,b=f,w=h;c=p(c,l,f,h,s[d+0],7,-680876936),h=p(h,c,l,f,s[d+1],12,-389564586),f=p(f,h,c,l,s[d+2],17,606105819),l=p(l,f,h,c,s[d+3],22,-1044525330),c=p(c,l,f,h,s[d+4],7,-176418897),h=p(h,c,l,f,s[d+5],12,1200080426),f=p(f,h,c,l,s[d+6],17,-1473231341),l=p(l,f,h,c,s[d+7],22,-45705983),c=p(c,l,f,h,s[d+8],7,1770035416),h=p(h,c,l,f,s[d+9],12,-1958414417),f=p(f,h,c,l,s[d+10],17,-42063),l=p(l,f,h,c,s[d+11],22,-1990404162),c=p(c,l,f,h,s[d+12],7,1804603682),h=p(h,c,l,f,s[d+13],12,-40341101),f=p(f,h,c,l,s[d+14],17,-1502002290),l=p(l,f,h,c,s[d+15],22,1236535329),c=_(c,l,f,h,s[d+1],5,-165796510),h=_(h,c,l,f,s[d+6],9,-1069501632),f=_(f,h,c,l,s[d+11],14,643717713),l=_(l,f,h,c,s[d+0],20,-373897302),c=_(c,l,f,h,s[d+5],5,-701558691),h=_(h,c,l,f,s[d+10],9,38016083),f=_(f,h,c,l,s[d+15],14,-660478335),l=_(l,f,h,c,s[d+4],20,-405537848),c=_(c,l,f,h,s[d+9],5,568446438),h=_(h,c,l,f,s[d+14],9,-1019803690),f=_(f,h,c,l,s[d+3],14,-187363961),l=_(l,f,h,c,s[d+8],20,1163531501),c=_(c,l,f,h,s[d+13],5,-1444681467),h=_(h,c,l,f,s[d+2],9,-51403784),f=_(f,h,c,l,s[d+7],14,1735328473),l=_(l,f,h,c,s[d+12],20,-1926607734),c=v(c,l,f,h,s[d+5],4,-378558),h=v(h,c,l,f,s[d+8],11,-2022574463),f=v(f,h,c,l,s[d+11],16,1839030562),l=v(l,f,h,c,s[d+14],23,-35309556),c=v(c,l,f,h,s[d+1],4,-1530992060),h=v(h,c,l,f,s[d+4],11,1272893353),f=v(f,h,c,l,s[d+7],16,-155497632),l=v(l,f,h,c,s[d+10],23,-1094730640),c=v(c,l,f,h,s[d+13],4,681279174),h=v(h,c,l,f,s[d+0],11,-358537222),f=v(f,h,c,l,s[d+3],16,-722521979),l=v(l,f,h,c,s[d+6],23,76029189),c=v(c,l,f,h,s[d+9],4,-640364487),h=v(h,c,l,f,s[d+12],11,-421815835),f=v(f,h,c,l,s[d+15],16,530742520),l=v(l,f,h,c,s[d+2],23,-995338651),c=m(c,l,f,h,s[d+0],6,-198630844),h=m(h,c,l,f,s[d+7],10,1126891415),f=m(f,h,c,l,s[d+14],15,-1416354905),l=m(l,f,h,c,s[d+5],21,-57434055),c=m(c,l,f,h,s[d+12],6,1700485571),h=m(h,c,l,f,s[d+3],10,-1894986606),f=m(f,h,c,l,s[d+10],15,-1051523),l=m(l,f,h,c,s[d+1],21,-2054922799),c=m(c,l,f,h,s[d+8],6,1873313359),h=m(h,c,l,f,s[d+15],10,-30611744),f=m(f,h,c,l,s[d+6],15,-1560198380),l=m(l,f,h,c,s[d+13],21,1309151649),c=m(c,l,f,h,s[d+4],6,-145523070),h=m(h,c,l,f,s[d+11],10,-1120210379),f=m(f,h,c,l,s[d+2],15,718787259),l=m(l,f,h,c,s[d+9],21,-343485551),c=c+g>>>0,l=l+y>>>0,f=f+b>>>0,h=h+w>>>0}return n.endian([c,l,f,h])};s._ff=function(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+(i>>>0)+s;return(a<<o|a>>>32-o)+t},s._gg=function(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+(i>>>0)+s;return(a<<o|a>>>32-o)+t},s._hh=function(e,t,n,r,i,o,s){var a=e+(t^n^r)+(i>>>0)+s;return(a<<o|a>>>32-o)+t},s._ii=function(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+(i>>>0)+s;return(a<<o|a>>>32-o)+t},s._blocksize=16,s._digestsize=16,t.exports=function(e,t){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(s(e,t));return t&&t.asBytes?r:t&&t.asString?o.bytesToString(r):n.bytesToHex(r)}}()},{charenc:2,crypt:4,"is-buffer":11}],14:[function(e,t,n){function r(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*u;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function i(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=u?Math.round(e/u)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function o(e){return s(e,l,"day")||s(e,c,"hour")||s(e,u,"minute")||s(e,a,"second")||e+" ms"}function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,u=60*a,c=60*u,l=24*c,f=365.25*l;t.exports=function(e,t){t=t||{};var n="undefined"==typeof e?"undefined":_typeof(e);if("string"===n&&e.length>0)return r(e);if("number"===n&&isNaN(e)===!1)return t["long"]?o(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],15:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function s(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function a(){v&&p&&(v=!1,p.length?_=p.concat(_):m=-1,_.length&&u())}function u(){if(!v){var e=o(a);v=!0;for(var t=_.length;t;){for(p=_,_=[];++m<t;)p&&p[m].run();m=-1,t=_.length}p=null,v=!1,s(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var f,h,d=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(e){h=i}}();var p,_=[],v=!1,m=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];_.push(new c(e,t)),1!==_.length||v||o(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=l,d.addListener=l,d.once=l,d.off=l,d.removeListener=l,d.removeAllListeners=l,d.emit=l,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],16:[function(t,n,r){(function(i,o){!function(t,i){"object"===("undefined"==typeof r?"undefined":_typeof(r))&&"undefined"!=typeof n?i(r):"function"==typeof e&&e.amd?e(["exports"],i):i(t.RSVP=t.RSVP||{})}(this,function(e){function n(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function r(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t}function s(e,t){return"onerror"===e?void Oe.on("error",t):2!==arguments.length?Oe[e]:void(Oe[e]=t)}function a(e){return"function"==typeof e||"object"===("undefined"==typeof e?"undefined":_typeof(e))&&null!==e}function u(e){return"function"==typeof e}function c(e){return"object"===("undefined"==typeof e?"undefined":_typeof(e))&&null!==e}function l(){}function f(){setTimeout(function(){for(var e=0;e<Ne.length;e++){var t=Ne[e],n=t.payload;n.guid=n.key+n.id,n.childGuid=n.key+n.childId,n.error&&(n.stack=n.error.stack),Oe.trigger(t.name,t.payload)}Ne.length=0},50)}function h(e,t,n){1===Ne.push({name:e,payload:{key:t._guidKey,id:t._id,eventName:e,detail:t._result,childId:n&&n._id,label:t._label,timeStamp:je(),error:Oe["instrument-with-stack"]?new Error(t._label):null}})&&f()}function d(e,t){var n=this;if(e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))&&e.constructor===n)return e;var r=new n(_,t);return w(r,e),r}function p(){return new TypeError("A promises callback cannot return that same promise.")}function _(){}function v(e){try{return e.then}catch(t){return ke.error=t,ke}}function m(e,t,n,r){try{e.call(t,n,r)}catch(i){return i}}function g(e,t,n){Oe.async(function(e){var r=!1,i=m(n,t,function(n){r||(r=!0,t!==n?w(e,n,void 0):A(e,n))},function(t){r||(r=!0,O(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,O(e,i))},e)}function y(e,t){t._state===Ie?A(e,t._result):t._state===Ue?(t._onError=null,O(e,t._result)):x(t,void 0,function(n){t!==n?w(e,n,void 0):A(e,n)},function(t){return O(e,t)})}function b(e,t,n){t.constructor===e.constructor&&n===I&&e.constructor.resolve===d?y(e,t):n===ke?O(e,ke.error):void 0===n?A(e,t):u(n)?g(e,t,n):A(e,t)}function w(e,t){e===t?A(e,t):a(t)?b(e,t,v(t)):A(e,t)}function S(e){e._onError&&e._onError(e._result),E(e)}function A(e,t){e._state===Ce&&(e._result=t,e._state=Ie,0===e._subscribers.length?Oe.instrument&&h("fulfilled",e):Oe.async(E,e))}function O(e,t){e._state===Ce&&(e._state=Ue,e._result=t,Oe.async(S,e))}function x(e,t,n,r){var i=e._subscribers,o=i.length;e._onError=null,i[o]=t,i[o+Ie]=n,i[o+Ue]=r,0===o&&e._state&&Oe.async(E,e)}function E(e){var t=e._subscribers,n=e._state;if(Oe.instrument&&h(n===Ie?"fulfilled":"rejected",e),0!==t.length){for(var r=void 0,i=void 0,o=e._result,s=0;s<t.length;s+=3)r=t[s],i=t[s+n],r?N(n,r,i,o):i(o);e._subscribers.length=0}}function j(){this.error=null}function T(e,t){try{return e(t)}catch(n){return Pe.error=n,Pe}}function N(e,t,n,r){var i=u(n),o=void 0,s=void 0,a=void 0,c=void 0;if(i){if(o=T(n,r),o===Pe?(c=!0,s=o.error,o=null):a=!0,t===o)return void O(t,p())}else o=r,a=!0;t._state!==Ce||(i&&a?w(t,o):c?O(t,s):e===Ie?A(t,o):e===Ue&&O(t,o))}function C(e,t){var n=!1;try{t(function(t){n||(n=!0,w(e,t))},function(t){n||(n=!0,O(e,t))})}catch(r){O(e,r)}}function I(e,t,n){var r=arguments,i=this,o=i._state;if(o===Ie&&!e||o===Ue&&!t)return Oe.instrument&&h("chained",i,i),i;i._onError=null;var s=new i.constructor(_,n),a=i._result;return Oe.instrument&&h("chained",i,s),o?!function(){var e=r[o-1];Oe.async(function(){return N(o,s,e,a)})}():x(i,s,e,t),s}function U(e,t,n){return e===Ie?{state:"fulfilled",value:n}:{state:"rejected",reason:n}}function k(e,t,n,r){this._instanceConstructor=e,this.promise=new e(_,r),this._abortOnReject=n,this._validateInput(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._init(),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&A(this.promise,this._result))):O(this.promise,this._validationError())}function P(e,t){return new k(this,e,(!0),t).promise}function R(e,t){var n=this,r=new n(_,t);if(!Ee(e))return O(r,new TypeError("You must pass an array to race.")),r;for(var i=0;r._state===Ce&&i<e.length;i++)x(n.resolve(e[i]),void 0,function(e){return w(r,e)},function(e){return O(r,e)});return r}function D(e,t){var n=this,r=new n(_,t);return O(r,e),r}function q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function L(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function M(e,t){this._id=De++,this._label=t,this._state=void 0,this._result=void 0,this._subscribers=[],Oe.instrument&&h("created",this),_!==e&&("function"!=typeof e&&q(),this instanceof M?C(this,e):L())}function F(){this.value=void 0}function B(e){try{return e.then}catch(t){return qe.value=t,qe}}function V(e,t,n){try{e.apply(t,n)}catch(r){return qe.value=r,qe}}function J(e,t){for(var n={},r=e.length,i=new Array(r),o=0;o<r;o++)i[o]=e[o];for(var s=0;s<t.length;s++){var a=t[s];n[a]=i[s+1]}return n}function W(e){for(var t=e.length,n=new Array(t-1),r=1;r<t;r++)n[r-1]=e[r];return n}function z(e,t){return{then:function(n,r){return e.call(t,n,r)}}}function Q(e,t){var n=function(){for(var n=this,r=arguments.length,i=new Array(r+1),o=!1,s=0;s<r;++s){var a=arguments[s];if(!o){if(o=H(a),o===Le){var u=new M(_);return O(u,Le.value),u}o&&o!==!0&&(a=z(o,a))}i[s]=a}var c=new M(_);return i[r]=function(e,n){e?O(c,e):void 0===t?w(c,n):t===!0?w(c,W(arguments)):Ee(t)?w(c,J(arguments,t)):w(c,n)},o?K(c,i,e,n):G(c,i,e,n)};return n.__proto__=e,n}function G(e,t,n,r){var i=V(n,r,t);return i===qe&&O(e,i.value),e}function K(e,t,n,r){return M.all(t).then(function(t){var i=V(n,r,t);return i===qe&&O(e,i.value),e})}function H(e){return!(!e||"object"!==("undefined"==typeof e?"undefined":_typeof(e)))&&(e.constructor===M||B(e))}function $(e,t){return M.all(e,t)}function X(e,t,n){this._superConstructor(e,t,!1,n)}function Y(e,t){return new X(M,e,t).promise}function Z(e,t){return M.race(e,t)}function ee(e,t,n){this._superConstructor(e,t,!0,n)}function te(e,t){return new ee(M,e,t).promise}function ne(e,t,n){this._superConstructor(e,t,!1,n)}function re(e,t){return new ne(M,e,t).promise}function ie(e){throw setTimeout(function(){throw e}),e}function oe(e){var t={resolve:void 0,reject:void 0};return t.promise=new M(function(e,n){t.resolve=e,t.reject=n},e),t}function se(e,t,n){return M.all(e,n).then(function(e){if(!u(t))throw new TypeError("You must pass a function as map's second argument.");for(var r=e.length,i=new Array(r),o=0;o<r;o++)i[o]=t(e[o]);return M.all(i,n)})}function ae(e,t){return M.resolve(e,t)}function ue(e,t){return M.reject(e,t)}function ce(e,t){return M.all(e,t)}function le(e,t){return M.resolve(e,t).then(function(e){return ce(e,t)})}function fe(e,t,n){var r=Ee(e)?ce(e,n):le(e,n);return r.then(function(e){if(!u(t))throw new TypeError("You must pass a function as filter's second argument.");for(var r=e.length,i=new Array(r),o=0;o<r;o++)i[o]=t(e[o]);return ce(i,n).then(function(t){for(var n=new Array(r),i=0,o=0;o<r;o++)t[o]&&(n[i]=e[o],i++);return n.length=i,n})})}function he(e,t){Qe[Me]=e,Qe[Me+1]=t,Me+=2,2===Me&&Ge()}function de(){var e=i.nextTick,t=i.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){return e(ge)}}function pe(){return"undefined"!=typeof Fe?function(){Fe(ge)}:me()}function _e(){var e=0,t=new Je(ge),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){return n.data=e=++e%2}}function ve(){var e=new MessageChannel;return e.port1.onmessage=ge,function(){return e.port2.postMessage(0)}}function me(){return function(){return setTimeout(ge,1)}}function ge(){for(var e=0;e<Me;e+=2){var t=Qe[e],n=Qe[e+1];t(n),Qe[e]=void 0,Qe[e+1]=void 0}Me=0}function ye(){try{var e=t,n=e("vertx");return Fe=n.runOnLoop||n.runOnContext,pe()}catch(r){return me()}}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(){Oe.on.apply(Oe,arguments)}function Se(){Oe.off.apply(Oe,arguments)}var Ae={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function");var i=r(this),o=void 0;o=i[e],o||(o=i[e]=[]),n(o,t)===-1&&o.push(t)},off:function(e,t){var i=r(this),o=void 0,s=void 0;return t?(o=i[e],s=n(o,t),void(s!==-1&&o.splice(s,1))):void(i[e]=[])},trigger:function(e,t,n){var i=r(this),o=void 0,s=void 0;if(o=i[e])for(var a=0;a<o.length;a++)(s=o[a])(t,n)}},Oe={instrument:!1};Ae.mixin(Oe);var xe=void 0;xe=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Ee=xe,je=Date.now||function(){return(new Date).getTime()},Te=Object.create||function(e){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!==("undefined"==typeof e?"undefined":_typeof(e)))throw new TypeError("Argument must be an object");return l.prototype=e,new l},Ne=[],Ce=void 0,Ie=1,Ue=2,ke=new j,Pe=new j;k.prototype._validateInput=function(e){return Ee(e)},k.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},k.prototype._init=function(){this._result=new Array(this.length)},k.prototype._enumerate=function(){for(var e=this.length,t=this.promise,n=this._input,r=0;t._state===Ce&&r<e;r++)this._eachEntry(n[r],r)},k.prototype._settleMaybeThenable=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===d){var i=v(e);if(i===I&&e._state!==Ce)e._onError=null,this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=this._makeResult(Ie,t,e);else if(n===M){var o=new n(_);b(o,e,i),this._willSettleAt(o,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},k.prototype._eachEntry=function(e,t){c(e)?this._settleMaybeThenable(e,t):(this._remaining--,this._result[t]=this._makeResult(Ie,t,e))},k.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===Ce&&(this._remaining--,this._abortOnReject&&e===Ue?O(r,n):this._result[t]=this._makeResult(e,t,n)),0===this._remaining&&A(r,this._result)},k.prototype._makeResult=function(e,t,n){return n},k.prototype._willSettleAt=function(e,t){var n=this;x(e,void 0,function(e){return n._settledAt(Ie,t,e)},function(e){return n._settledAt(Ue,t,e)})};var Re="rsvp_"+je()+"-",De=0;M.cast=d,M.all=P,M.race=R,M.resolve=d,M.reject=D,M.prototype={constructor:M,_guidKey:Re,_onError:function(e){var t=this;Oe.after(function(){t._onError&&Oe.trigger("error",e,t._label)})},then:I,"catch":function(e,t){return this.then(void 0,e,t)},"finally":function(e,t){var n=this,r=n.constructor;return n.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})},t)}};var qe=new F,Le=new F;X.prototype=Te(k.prototype),X.prototype._superConstructor=k,X.prototype._makeResult=U,X.prototype._validationError=function(){return new Error("allSettled must be called with an array")},ee.prototype=Te(k.prototype),ee.prototype._superConstructor=k,ee.prototype._init=function(){this._result={}},ee.prototype._validateInput=function(e){return e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))},ee.prototype._validationError=function(){return new Error("Promise.hash must be called with an object")},ee.prototype._enumerate=function(){var e=this,t=e.promise,n=e._input,r=[];for(var i in n)t._state===Ce&&Object.prototype.hasOwnProperty.call(n,i)&&r.push({position:i,entry:n[i]});var o=r.length;e._remaining=o;for(var s=void 0,a=0;t._state===Ce&&a<o;a++)s=r[a],e._eachEntry(s.entry,s.position)},ne.prototype=Te(ee.prototype),ne.prototype._superConstructor=k,ne.prototype._makeResult=U,ne.prototype._validationError=function(){return new Error("hashSettled must be called with an object")};var Me=0,Fe=void 0,Be="undefined"!=typeof window?window:void 0,Ve=Be||{},Je=Ve.MutationObserver||Ve.WebKitMutationObserver,We="undefined"==typeof self&&"undefined"!=typeof i&&"[object process]"==={}.toString.call(i),ze="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Qe=new Array(1e3),Ge=void 0;Ge=We?de():Je?_e():ze?ve():void 0===Be&&"function"==typeof t?ye():me();var Ke=void 0;if("object"===("undefined"==typeof self?"undefined":_typeof(self)))Ke=self;else{if("object"!==("undefined"==typeof o?"undefined":_typeof(o)))throw new Error("no global: `self` or `global` found");Ke=o}var He;Oe.async=he,Oe.after=function(e){return setTimeout(e,0)};var $e=ae,Xe=function(e,t){return Oe.async(e,t)};if("undefined"!=typeof window&&"object"===_typeof(window.__PROMISE_INSTRUMENTATION__)){var Ye=window.__PROMISE_INSTRUMENTATION__;s("instrument",!0); for(var Ze in Ye)Ye.hasOwnProperty(Ze)&&we(Ze,Ye[Ze])}var et=(He={cast:$e,Promise:M,EventTarget:Ae,all:$,allSettled:Y,race:Z,hash:te,hashSettled:re,rethrow:ie,defer:oe,denodeify:Q,configure:s,on:we,off:Se,resolve:ae,reject:ue,map:se},be(He,"async",Xe),be(He,"filter",fe),He);e["default"]=et,e.cast=$e,e.Promise=M,e.EventTarget=Ae,e.all=$,e.allSettled=Y,e.race=Z,e.hash=te,e.hashSettled=re,e.rethrow=ie,e.defer=oe,e.denodeify=Q,e.configure=s,e.on=we,e.off=Se,e.resolve=ae,e.reject=ue,e.map=se,e.async=Xe,e.filter=fe,Object.defineProperty(e,"__esModule",{value:!0})})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:15}],17:[function(e,t,n){function r(){}function i(e){if(!m(e))return e;var t=[];for(var n in e)o(t,n,e[n]);return t.join("&")}function o(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){o(e,t,n)});else if(m(n))for(var r in n)o(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function s(e){for(var t,n,r={},i=e.split("&"),o=0,s=i.length;o<s;++o)t=i[o],n=t.indexOf("="),n==-1?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function a(e){var t,n,r,i,o=e.split(/\r?\n/),s={};o.pop();for(var a=0,u=o.length;a<u;++a)n=o[a],t=n.indexOf(":"),r=n.slice(0,t).toLowerCase(),i=y(n.slice(t+1)),s[r]=i;return s}function u(e){return/[\/+]json\b/.test(e)}function c(e){return e.split(/ *; */).shift()}function l(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})}function f(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this._setStatusProperties(this.xhr.status),this.header=this.headers=a(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?this.text:this.xhr.response):null}function h(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new f(n)}catch(r){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=r,e.rawResponse=n.xhr&&n.xhr.responseText?n.xhr.responseText:null,e.statusCode=n.xhr&&n.xhr.status?n.xhr.status:null,n.callback(e)}n.emit("response",t);var i;try{(t.status<200||t.status>=300)&&(i=new Error(t.statusText||"Unsuccessful HTTP response"),i.original=e,i.response=t,i.status=t.status)}catch(r){i=r}i?n.callback(i,t):n.callback(null,t)})}function d(e,t){var n=g("DELETE",e);return t&&n.end(t),n}var p;"undefined"!=typeof window?p=window:"undefined"!=typeof self?p=self:(console.warn("Using browser-only version of superagent in non-browser environment"),p=this);var _=e("emitter"),v=e("./request-base"),m=e("./is-object"),g=t.exports=e("./request").bind(null,h);g.getXHR=function(){if(!(!p.XMLHttpRequest||p.location&&"file:"==p.location.protocol&&p.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var y="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};g.serializeObject=i,g.parseString=s,g.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"},g.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},g.parse={"application/x-www-form-urlencoded":s,"application/json":JSON.parse},f.prototype.get=function(e){return this.header[e.toLowerCase()]},f.prototype._setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=c(t);var n=l(t);for(var r in n)this[r]=n[r]},f.prototype._parseBody=function(e){var t=g.parse[this.type];return!t&&u(this.type)&&(t=g.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},f.prototype._setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},f.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},g.Response=f,_(h.prototype);for(var b in v)h.prototype[b]=v[b];h.prototype.type=function(e){return this.set("Content-Type",g.types[e]||e),this},h.prototype.responseType=function(e){return this._responseType=e,this},h.prototype.accept=function(e){return this.set("Accept",g.types[e]||e),this},h.prototype.auth=function(e,t,n){switch(n||(n={type:"basic"}),n.type){case"basic":var r=btoa(e+":"+t);this.set("Authorization","Basic "+r);break;case"auto":this.username=e,this.password=t}return this},h.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},h.prototype.attach=function(e,t,n){return this._getFormData().append(e,t,n||t.name),this},h.prototype._getFormData=function(){return this._formData||(this._formData=new p.FormData),this._formData},h.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},h.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},h.prototype._timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},h.prototype._appendQueryString=function(){var e=this._query.join("&");e&&(this.url+=~this.url.indexOf("?")?"&"+e:"?"+e)},h.prototype.end=function(e){var t=this,n=this.xhr=g.getXHR(),i=this._timeout,o=this._formData||this._data;this._callback=e||r,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(r){e=0}if(0==e){if(t.timedout)return t._timeoutError();if(t._aborted)return;return t.crossDomainError()}t.emit("end")}};var s=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{n.onprogress=s.bind(null,"download"),n.upload&&(n.upload.onprogress=s.bind(null,"upload"))}catch(a){}if(i&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},i)),this._appendQueryString(),this.username&&this.password?n.open(this.method,this.url,!0,this.username,this.password):n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof o&&!this._isHost(o)){var c=this._header["content-type"],l=this._serializer||g.serialize[c?c.split(";")[0]:""];!l&&u(c)&&(l=g.serialize["application/json"]),l&&(o=l(o))}for(var f in this.header)null!=this.header[f]&&n.setRequestHeader(f,this.header[f]);return this._responseType&&(n.responseType=this._responseType),this.emit("request",this),n.send("undefined"!=typeof o?o:null),this},g.Request=h,g.get=function(e,t,n){var r=g("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},g.head=function(e,t,n){var r=g("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},g.options=function(e,t,n){var r=g("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},g.del=d,g["delete"]=d,g.patch=function(e,t,n){var r=g("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},g.post=function(e,t,n){var r=g("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},g.put=function(e,t,n){var r=g("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},{"./is-object":18,"./request":20,"./request-base":19,emitter:3}],18:[function(e,t,n){function r(e){return null!==e&&"object"===("undefined"==typeof e?"undefined":_typeof(e))}t.exports=r},{}],19:[function(e,t,n){var r=e("./is-object");n.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},n.parse=function(e){return this._parser=e,this},n.serialize=function(e){return this._serializer=e,this},n.timeout=function(e){return this._timeout=e,this},n.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},n["catch"]=function(e){return this.then(void 0,e)},n.use=function(e){return e(this),this},n.get=function(e){return this._header[e.toLowerCase()]},n.getHeader=n.get,n.set=function(e,t){if(r(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},n.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},n.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(r(e)){for(var n in e)this.field(n,e[n]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return this._getFormData().append(e,t),this},n.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},n.withCredentials=function(){return this._withCredentials=!0,this},n.redirects=function(e){return this._maxRedirects=e,this},n.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},n._isHost=function(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}},n.send=function(e){var t=r(e),n=this._header["content-type"];if(t&&r(this._data))for(var i in e)this._data[i]=e[i];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)}},{"./is-object":18}],20:[function(e,t,n){function r(e,t,n){return"function"==typeof n?new e("GET",t).end(n):2==arguments.length?new e("GET",t):new e(t,n)}t.exports=r},{}],21:[function(t,n,r){(function(){function t(e){function t(t,n,r,i,o,s){for(;o>=0&&o<s;o+=e){var a=i?i[o]:o;r=n(r,t[a],a,t)}return r}return function(n,r,i,o){r=S(r,o,4);var s=!N(n)&&w.keys(n),a=(s||n).length,u=e>0?0:a-1;return arguments.length<3&&(i=n[s?s[u]:u],u+=e),t(n,r,i,s,u,a)}}function i(e){return function(t,n,r){n=A(n,r);for(var i=T(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}function o(e,t,n){return function(r,i,o){var s=0,a=T(r);if("number"==typeof o)e>0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=t(d.call(r,s,a),w.isNaN),o>=0?o+s:-1;for(o=e>0?s:a-1;o>=0&&o<a;o+=e)if(r[o]===i)return o;return-1}}function s(e,t){var n=P.length,r=e.constructor,i=w.isFunction(r)&&r.prototype||l,o="constructor";for(w.has(e,o)&&!w.contains(t,o)&&t.push(o);n--;)o=P[n],o in e&&e[o]!==i[o]&&!w.contains(t,o)&&t.push(o)}var a=this,u=a._,c=Array.prototype,l=Object.prototype,f=Function.prototype,h=c.push,d=c.slice,p=l.toString,_=l.hasOwnProperty,v=Array.isArray,m=Object.keys,g=f.bind,y=Object.create,b=function(){},w=function z(e){return e instanceof z?e:this instanceof z?void(this._wrapped=e):new z(e)};"undefined"!=typeof r?("undefined"!=typeof n&&n.exports&&(r=n.exports=w),r._=w):a._=w,w.VERSION="1.8.3";var S=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}},A=function(e,t,n){return null==e?w.identity:w.isFunction(e)?S(e,t,n):w.isObject(e)?w.matcher(e):w.property(e)};w.iteratee=function(e,t){return A(e,t,1/0)};var O=function(e,t){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=e(o),a=s.length,u=0;u<a;u++){var c=s[u];t&&void 0!==n[c]||(n[c]=o[c])}return n}},x=function(e){if(!w.isObject(e))return{};if(y)return y(e);b.prototype=e;var t=new b;return b.prototype=null,t},E=function(e){return function(t){return null==t?void 0:t[e]}},j=Math.pow(2,53)-1,T=E("length"),N=function(e){var t=T(e);return"number"==typeof t&&t>=0&&t<=j};w.each=w.forEach=function(e,t,n){t=S(t,n);var r,i;if(N(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=w.keys(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e},w.map=w.collect=function(e,t,n){t=A(t,n);for(var r=!N(e)&&w.keys(e),i=(r||e).length,o=Array(i),s=0;s<i;s++){var a=r?r[s]:s;o[s]=t(e[a],a,e)}return o},w.reduce=w.foldl=w.inject=t(1),w.reduceRight=w.foldr=t(-1),w.find=w.detect=function(e,t,n){var r;if(r=N(e)?w.findIndex(e,t,n):w.findKey(e,t,n),void 0!==r&&r!==-1)return e[r]},w.filter=w.select=function(e,t,n){var r=[];return t=A(t,n),w.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},w.reject=function(e,t,n){return w.filter(e,w.negate(A(t)),n)},w.every=w.all=function(e,t,n){t=A(t,n);for(var r=!N(e)&&w.keys(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(!t(e[s],s,e))return!1}return!0},w.some=w.any=function(e,t,n){t=A(t,n);for(var r=!N(e)&&w.keys(e),i=(r||e).length,o=0;o<i;o++){var s=r?r[o]:o;if(t(e[s],s,e))return!0}return!1},w.contains=w.includes=w.include=function(e,t,n,r){return N(e)||(e=w.values(e)),("number"!=typeof n||r)&&(n=0),w.indexOf(e,t,n)>=0},w.invoke=function(e,t){var n=d.call(arguments,2),r=w.isFunction(t);return w.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},w.pluck=function(e,t){return w.map(e,w.property(t))},w.where=function(e,t){return w.filter(e,w.matcher(t))},w.findWhere=function(e,t){return w.find(e,w.matcher(t))},w.max=function(e,t,n){var r,i,o=-(1/0),s=-(1/0);if(null==t&&null!=e){e=N(e)?e:w.values(e);for(var a=0,u=e.length;a<u;a++)r=e[a],r>o&&(o=r)}else t=A(t,n),w.each(e,function(e,n,r){i=t(e,n,r),(i>s||i===-(1/0)&&o===-(1/0))&&(o=e,s=i)});return o},w.min=function(e,t,n){var r,i,o=1/0,s=1/0;if(null==t&&null!=e){e=N(e)?e:w.values(e);for(var a=0,u=e.length;a<u;a++)r=e[a],r<o&&(o=r)}else t=A(t,n),w.each(e,function(e,n,r){i=t(e,n,r),(i<s||i===1/0&&o===1/0)&&(o=e,s=i)});return o},w.shuffle=function(e){for(var t,n=N(e)?e:w.values(e),r=n.length,i=Array(r),o=0;o<r;o++)t=w.random(0,o),t!==o&&(i[o]=i[t]),i[t]=n[o];return i},w.sample=function(e,t,n){return null==t||n?(N(e)||(e=w.values(e)),e[w.random(e.length-1)]):w.shuffle(e).slice(0,Math.max(0,t))},w.sortBy=function(e,t,n){return t=A(t,n),w.pluck(w.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),"value")};var C=function(e){return function(t,n,r){var i={};return n=A(n,r),w.each(t,function(r,o){var s=n(r,o,t);e(i,r,s)}),i}};w.groupBy=C(function(e,t,n){w.has(e,n)?e[n].push(t):e[n]=[t]}),w.indexBy=C(function(e,t,n){e[n]=t}),w.countBy=C(function(e,t,n){w.has(e,n)?e[n]++:e[n]=1}),w.toArray=function(e){return e?w.isArray(e)?d.call(e):N(e)?w.map(e,w.identity):w.values(e):[]},w.size=function(e){return null==e?0:N(e)?e.length:w.keys(e).length},w.partition=function(e,t,n){t=A(t,n);var r=[],i=[];return w.each(e,function(e,n,o){(t(e,n,o)?r:i).push(e)}),[r,i]},w.first=w.head=w.take=function(e,t,n){if(null!=e)return null==t||n?e[0]:w.initial(e,e.length-t)},w.initial=function(e,t,n){return d.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},w.last=function(e,t,n){if(null!=e)return null==t||n?e[e.length-1]:w.rest(e,Math.max(0,e.length-t))},w.rest=w.tail=w.drop=function(e,t,n){return d.call(e,null==t||n?1:t)},w.compact=function(e){return w.filter(e,w.identity)};var I=function Q(e,t,n,r){for(var i=[],o=0,s=r||0,a=T(e);s<a;s++){var u=e[s];if(N(u)&&(w.isArray(u)||w.isArguments(u))){t||(u=Q(u,t,n));var c=0,l=u.length;for(i.length+=l;c<l;)i[o++]=u[c++]}else n||(i[o++]=u)}return i};w.flatten=function(e,t){return I(e,t,!1)},w.without=function(e){return w.difference(e,d.call(arguments,1))},w.uniq=w.unique=function(e,t,n,r){w.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=A(n,r));for(var i=[],o=[],s=0,a=T(e);s<a;s++){var u=e[s],c=n?n(u,s,e):u;t?(s&&o===c||i.push(u),o=c):n?w.contains(o,c)||(o.push(c),i.push(u)):w.contains(i,u)||i.push(u)}return i},w.union=function(){return w.uniq(I(arguments,!0,!0))},w.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=T(e);r<i;r++){var o=e[r];if(!w.contains(t,o)){for(var s=1;s<n&&w.contains(arguments[s],o);s++);s===n&&t.push(o)}}return t},w.difference=function(e){var t=I(arguments,!0,!0,1);return w.filter(e,function(e){return!w.contains(t,e)})},w.zip=function(){return w.unzip(arguments)},w.unzip=function(e){for(var t=e&&w.max(e,T).length||0,n=Array(t),r=0;r<t;r++)n[r]=w.pluck(e,r);return n},w.object=function(e,t){for(var n={},r=0,i=T(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},w.findIndex=i(1),w.findLastIndex=i(-1),w.sortedIndex=function(e,t,n,r){n=A(n,r,1);for(var i=n(t),o=0,s=T(e);o<s;){var a=Math.floor((o+s)/2);n(e[a])<i?o=a+1:s=a}return o},w.indexOf=o(1,w.findIndex,w.sortedIndex),w.lastIndexOf=o(-1,w.findLastIndex),w.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var r