diff --git a/dist/axios.amd.js b/dist/axios.amd.js index daa106f..e1f0168 100644 --- a/dist/axios.amd.js +++ b/dist/axios.amd.js @@ -50,12 +50,14 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack /* 1 */ /***/ function(module, exports, __webpack_require__) { - var Promise = __webpack_require__(7).Promise; + var Promise = __webpack_require__(9).Promise; var buildUrl = __webpack_require__(2); - var defaults = __webpack_require__(3); - var parseHeaders = __webpack_require__(4); - var transformData = __webpack_require__(5); - var utils = __webpack_require__(6); + var cookies = __webpack_require__(3); + var defaults = __webpack_require__(4); + var parseHeaders = __webpack_require__(5); + var transformData = __webpack_require__(6); + var urlIsSameOrigin = __webpack_require__(7); + var utils = __webpack_require__(8); var axios = module.exports = function axios(options) { options = utils.merge({ @@ -114,9 +116,17 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack options.headers || {} ); + // Add xsrf header + var xsrfValue = urlIsSameOrigin(options.url) + ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName) + : undefined; + if (xsrfValue) { + headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue; + } + utils.forEach(headers, function (val, key) { // Remove Content-Type if data is undefined - if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') { + if (!data && key.toLowerCase() === 'content-type') { delete headers[key]; } // Otherwise add header to the request @@ -200,7 +210,7 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack 'use strict'; - var utils = __webpack_require__(6); + var utils = __webpack_require__(8); function encode(val) { return encodeURIComponent(val). @@ -250,7 +260,49 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack 'use strict'; - var utils = __webpack_require__(6); + var utils = __webpack_require__(8); + + module.exports = { + write: function (name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(exires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function (name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function (name) { + this.write(name, '', Date.now() - 86400000); + } + }; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(8); var JSON_START = /^\s*(\[|\{[^\{])/; var JSON_END = /[\}\]]\s*$/; @@ -286,17 +338,17 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack put: utils.merge(CONTENT_TYPE_APPLICATION_JSON) }, - xsrfCookiName: 'XSRF-TOKEN', + xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN' }; /***/ }, -/* 4 */ +/* 5 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var utils = __webpack_require__(6); + var utils = __webpack_require__(8); /** * Parse headers into an object @@ -330,12 +382,12 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack }; /***/ }, -/* 5 */ +/* 6 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var utils = __webpack_require__(6); + var utils = __webpack_require__(8); /** * Transform the data for a request or a response @@ -354,7 +406,62 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack }; /***/ }, -/* 6 */ +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var msie = /trident/i.test(navigator.userAgent); + var utils = __webpack_require__(8); + var urlParsingNode = document.createElement('a'); + var originUrl = urlResolve(window.location.href); + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function urlResolve(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') + ? urlParsingNode.pathname + : '/' + urlParsingNode.pathname + }; + } + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestUrl The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + module.exports = function urlIsSameOrigin(requestUrl) { + var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; + return (parsed.protocol === originUrl.protocol && + parsed.host === originUrl.host); + }; + +/***/ }, +/* 8 */ /***/ function(module, exports, __webpack_require__) { // utils is a library of generic helper functions non-specific to axios @@ -371,6 +478,26 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack return toString.call(val) === '[object Array]'; } + /** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ + function isString(val) { + return typeof val === 'string'; + } + + /** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ + function isNumber(val) { + return typeof val === 'number'; + } + /** * Determine if a value is an Object * @@ -408,7 +535,7 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack * @returns {boolean} True if value is a Blob, otherwise false */ function isBlob(val) { - return toString.call(val) !== '[object Blob]'; + return toString.call(val) === '[object Blob]'; } /** @@ -492,6 +619,8 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack module.exports = { isArray: isArray, + isString: isString, + isNumber: isNumber, isObject: isObject, isDate: isDate, isFile: isFile, @@ -502,30 +631,30 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack }; /***/ }, -/* 7 */ +/* 9 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var Promise = __webpack_require__(8).Promise; - var polyfill = __webpack_require__(9).polyfill; + var Promise = __webpack_require__(10).Promise; + var polyfill = __webpack_require__(11).polyfill; exports.Promise = Promise; exports.polyfill = polyfill; /***/ }, -/* 8 */ +/* 10 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var config = __webpack_require__(10).config; - var configure = __webpack_require__(10).configure; - var objectOrFunction = __webpack_require__(11).objectOrFunction; - var isFunction = __webpack_require__(11).isFunction; - var now = __webpack_require__(11).now; - var all = __webpack_require__(12).all; - var race = __webpack_require__(13).race; - var staticResolve = __webpack_require__(14).resolve; - var staticReject = __webpack_require__(15).reject; - var asap = __webpack_require__(16).asap; + var config = __webpack_require__(12).config; + var configure = __webpack_require__(12).configure; + var objectOrFunction = __webpack_require__(13).objectOrFunction; + var isFunction = __webpack_require__(13).isFunction; + var now = __webpack_require__(13).now; + var all = __webpack_require__(14).all; + var race = __webpack_require__(15).race; + var staticResolve = __webpack_require__(16).resolve; + var staticReject = __webpack_require__(17).reject; + var asap = __webpack_require__(18).asap; var counter = 0; @@ -728,13 +857,13 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack exports.Promise = Promise; /***/ }, -/* 9 */ +/* 11 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {"use strict"; /*global self*/ - var RSVPPromise = __webpack_require__(8).Promise; - var isFunction = __webpack_require__(11).isFunction; + var RSVPPromise = __webpack_require__(10).Promise; + var isFunction = __webpack_require__(13).isFunction; function polyfill() { var local; @@ -772,7 +901,7 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 10 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -792,7 +921,7 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack exports.configure = configure; /***/ }, -/* 11 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -819,14 +948,14 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack exports.now = now; /***/ }, -/* 12 */ +/* 14 */ /***/ function(module, exports, __webpack_require__) { "use strict"; /* global toString */ - var isArray = __webpack_require__(11).isArray; - var isFunction = __webpack_require__(11).isFunction; + var isArray = __webpack_require__(13).isArray; + var isFunction = __webpack_require__(13).isFunction; /** Returns a promise that is fulfilled when all the given promises have been @@ -917,12 +1046,12 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack exports.all = all; /***/ }, -/* 13 */ +/* 15 */ /***/ function(module, exports, __webpack_require__) { "use strict"; /* global toString */ - var isArray = __webpack_require__(11).isArray; + var isArray = __webpack_require__(13).isArray; /** `RSVP.race` allows you to watch a series of promises and act as soon as the @@ -1011,7 +1140,7 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack exports.race = race; /***/ }, -/* 14 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1031,7 +1160,7 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack exports.resolve = resolve; /***/ }, -/* 15 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1083,7 +1212,7 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack exports.reject = reject; /***/ }, -/* 16 */ +/* 18 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, process) {"use strict"; @@ -1147,10 +1276,10 @@ define("axios", [], function() { return /******/ (function(modules) { // webpack } exports.asap = asap; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(17))) + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(19))) /***/ }, -/* 17 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { // shim for using process in browser diff --git a/dist/axios.amd.map b/dist/axios.amd.map index 5db4991..b8802d7 100644 --- a/dist/axios.amd.map +++ b/dist/axios.amd.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 2ce2d6b6491e18c84da9","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/buildUrl.js","webpack:///./lib/defaults.js","webpack:///./lib/parseHeaders.js","webpack:///./lib/transformData.js","webpack:///./lib/utils.js","webpack:///./~/es6-promise/dist/commonjs/main.js","webpack:///./~/es6-promise/dist/commonjs/promise/promise.js","webpack:///./~/es6-promise/dist/commonjs/promise/polyfill.js","webpack:///./~/es6-promise/dist/commonjs/promise/config.js","webpack:///./~/es6-promise/dist/commonjs/promise/utils.js","webpack:///./~/es6-promise/dist/commonjs/promise/all.js","webpack:///./~/es6-promise/dist/commonjs/promise/race.js","webpack:///./~/es6-promise/dist/commonjs/promise/resolve.js","webpack:///./~/es6-promise/dist/commonjs/promise/reject.js","webpack:///./~/es6-promise/dist/commonjs/promise/asap.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,wC;;;;;;;ACtCA,yC;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH,E;;;;;;AC9IA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;;AAEA;AACA,G;;;;;;AC5CA;;AAEA;;AAEA,6BAA4B,IAAI;AAChC,oBAAmB;AACnB,iCAAgC;AAChC;AACA,qCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,G;;;;;;ACxCA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA,kBAAiB;;AAEjB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA,G;;;;;;ACjCA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,G;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AC9IA;AACA;AACA;AACA;AACA,6B;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAoB;;AAEpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAiB,wBAAwB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAwD;;AAExD;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAAyB,aAAa;AACtC;;AAEA;AACA;AACA,YAAW;AACX;AACA;AACA,UAAS;AACT,0BAAyB,aAAa;AACtC;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA,IAAG;AACH,oBAAmB,aAAa;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,oCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA,oCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2B;;;;;;AClNA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,aAAa,EAAE;AACpD;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA,6B;;;;;;;ACrCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,+B;;;;;;ACdA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC,6BAA6B;;;AAG/D;AACA;AACA;AACA,mB;;;;;;ACrBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;;AAEA,mB;;;;;;AC5FA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;;AAEA,qB;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA,2B;;;;;;ACdA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,IAAI;AACd,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA,yB;;;;;;AC9CA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA0B,sBAAsB;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,yCAAwC;AACxC;AACA,EAAC;AACD;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qB;;;;;;;AC5DA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA2B;AAC3B;AACA;AACA","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 2ce2d6b6491e18c84da9\n **/","module.exports = require('./lib/axios');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","var Promise = require('es6-promise').Promise;\nvar buildUrl = require('./buildUrl');\nvar defaults = require('./defaults');\nvar parseHeaders = require('./parseHeaders');\nvar transformData = require('./transformData');\nvar utils = require('./utils');\n\nvar axios = module.exports = function axios(options) {\n options = utils.merge({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n }, options);\n\n // Don't allow overriding defaults.withCredentials\n options.withCredentials = options.withCredentials || defaults.withCredentials;\n\n var promise = new Promise(function (resolve, reject) {\n // Create the request\n var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n var data = transformData(\n options.data,\n options.headers,\n options.transformRequest\n );\n\n // Open the request\n request.open(options.method, buildUrl(options.url, options.params), true);\n\n // Listen for ready state\n request.onreadystatechange = function () {\n if (request && request.readyState === 4) {\n // Prepare the response\n var headers = parseHeaders(request.getAllResponseHeaders());\n var response = {\n data: transformData(\n request.responseText,\n headers,\n options.transformResponse\n ),\n status: request.status,\n headers: headers,\n config: options\n };\n\n // Resolve or reject the Promise based on the status\n if (request.status >= 200 && request.status < 300) {\n resolve(response);\n } else {\n reject(response);\n }\n\n // Clean up request\n request = null;\n }\n };\n\n // Merge headers and add to request\n var headers = utils.merge(\n defaults.headers.common,\n defaults.headers[options.method] || {},\n options.headers || {}\n );\n\n utils.forEach(headers, function (val, key) {\n // Remove Content-Type if data is undefined\n if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') {\n delete headers[key];\n }\n // Otherwise add header to the request\n else {\n request.setRequestHeader(key, val);\n }\n });\n\n // Add withCredentials to request if needed\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (options.responseType) {\n try {\n request.responseType = options.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Send the request\n request.send(data);\n });\n\n // Provide alias for success\n promise.success = function success(fn) {\n promise.then(function(response) {\n fn(response);\n });\n return promise;\n };\n\n // Provide alias for error\n promise.error = function error(fn) {\n promise.then(null, function(response) {\n fn(response);\n });\n return promise;\n };\n\n return promise;\n};\n\n// Expose defaults\naxios.defaults = defaults;\n\n// Provide aliases for supported request methods\ncreateShortMethods('delete', 'get', 'head');\ncreateShortMethodsWithData('post', 'put', 'patch');\n\nfunction createShortMethods() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url\n }));\n };\n });\n}\n\nfunction createShortMethodsWithData() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, data, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/axios.js\n ** module id = 1\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+');\n}\n\nmodule.exports = function buildUrl(url, params) {\n if (!params) {\n return url;\n }\n\n var parts = [];\n\n utils.forEach(params, function (val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function (v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n }\n else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n if (parts.length > 0) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n }\n\n return url;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/buildUrl.js\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\nvar JSON_END = /[\\}\\]]\\s*$/;\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar CONTENT_TYPE_APPLICATION_JSON = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nmodule.exports = {\n transformRequest: [function (data) {\n return utils.isObject(data) &&\n !utils.isFile(data) &&\n !utils.isBlob(data) ?\n JSON.stringify(data) : null;\n }],\n\n transformResponse: [function (data) {\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data)) {\n data = JSON.parse(data);\n }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookiName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/defaults.js\n ** module id = 3\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n utils.forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/parseHeaders.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n utils.forEach(fns, function (fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/transformData.js\n ** module id = 5\n ** module chunks = 0\n **/","// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) !== '[object Blob]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array or arguments callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Check if obj is array-like\n var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray) {\n obj = [obj];\n }\n\n // Iterate over array values\n if (isArray) {\n for (var i=0, l=obj.length; i 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 17\n ** module chunks = 0\n **/"],"sourceRoot":"","file":"axios.amd.js"} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap eb064145f63bf0e8453b","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/buildUrl.js","webpack:///./lib/cookies.js","webpack:///./lib/defaults.js","webpack:///./lib/parseHeaders.js","webpack:///./lib/transformData.js","webpack:///./lib/urlIsSameOrigin.js","webpack:///./lib/utils.js","webpack:///./~/es6-promise/dist/commonjs/main.js","webpack:///./~/es6-promise/dist/commonjs/promise/promise.js","webpack:///./~/es6-promise/dist/commonjs/promise/polyfill.js","webpack:///./~/es6-promise/dist/commonjs/promise/config.js","webpack:///./~/es6-promise/dist/commonjs/promise/utils.js","webpack:///./~/es6-promise/dist/commonjs/promise/all.js","webpack:///./~/es6-promise/dist/commonjs/promise/race.js","webpack:///./~/es6-promise/dist/commonjs/promise/resolve.js","webpack:///./~/es6-promise/dist/commonjs/promise/reject.js","webpack:///./~/es6-promise/dist/commonjs/promise/asap.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,wC;;;;;;;ACtCA,yC;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH,E;;;;;;ACxJA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;;AAEA;AACA,G;;;;;;AC5CA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qCAAoC;AACpC,IAAG;;AAEH;AACA,uDAAsD,wBAAwB;AAC9E;AACA,IAAG;;AAEH;AACA;AACA;AACA,G;;;;;;ACpCA;;AAEA;;AAEA,6BAA4B,IAAI;AAChC,oBAAmB;AACnB,iCAAgC;AAChC;AACA,qCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,G;;;;;;ACxCA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA,kBAAiB;;AAEjB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA,G;;;;;;ACjCA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,G;;;;;;AClBA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACjDA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACpKA;AACA;AACA;AACA;AACA,6B;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAoB;;AAEpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAiB,wBAAwB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAwD;;AAExD;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAAyB,aAAa;AACtC;;AAEA;AACA;AACA,YAAW;AACX;AACA;AACA,UAAS;AACT,0BAAyB,aAAa;AACtC;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA,IAAG;AACH,oBAAmB,aAAa;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,oCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA,oCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2B;;;;;;AClNA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,aAAa,EAAE;AACpD;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA,6B;;;;;;;ACrCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,+B;;;;;;ACdA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC,6BAA6B;;;AAG/D;AACA;AACA;AACA,mB;;;;;;ACrBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;;AAEA,mB;;;;;;AC5FA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;;AAEA,qB;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA,2B;;;;;;ACdA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,IAAI;AACd,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA,yB;;;;;;AC9CA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA0B,sBAAsB;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,yCAAwC;AACxC;AACA,EAAC;AACD;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qB;;;;;;;AC5DA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA2B;AAC3B;AACA;AACA","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap eb064145f63bf0e8453b\n **/","module.exports = require('./lib/axios');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","var Promise = require('es6-promise').Promise;\nvar buildUrl = require('./buildUrl');\nvar cookies = require('./cookies');\nvar defaults = require('./defaults');\nvar parseHeaders = require('./parseHeaders');\nvar transformData = require('./transformData');\nvar urlIsSameOrigin = require('./urlIsSameOrigin');\nvar utils = require('./utils');\n\nvar axios = module.exports = function axios(options) {\n options = utils.merge({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n }, options);\n\n // Don't allow overriding defaults.withCredentials\n options.withCredentials = options.withCredentials || defaults.withCredentials;\n\n var promise = new Promise(function (resolve, reject) {\n // Create the request\n var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n var data = transformData(\n options.data,\n options.headers,\n options.transformRequest\n );\n\n // Open the request\n request.open(options.method, buildUrl(options.url, options.params), true);\n\n // Listen for ready state\n request.onreadystatechange = function () {\n if (request && request.readyState === 4) {\n // Prepare the response\n var headers = parseHeaders(request.getAllResponseHeaders());\n var response = {\n data: transformData(\n request.responseText,\n headers,\n options.transformResponse\n ),\n status: request.status,\n headers: headers,\n config: options\n };\n\n // Resolve or reject the Promise based on the status\n if (request.status >= 200 && request.status < 300) {\n resolve(response);\n } else {\n reject(response);\n }\n\n // Clean up request\n request = null;\n }\n };\n\n // Merge headers and add to request\n var headers = utils.merge(\n defaults.headers.common,\n defaults.headers[options.method] || {},\n options.headers || {}\n );\n\n // Add xsrf header\n var xsrfValue = urlIsSameOrigin(options.url)\n ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName)\n : undefined;\n if (xsrfValue) {\n headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue;\n }\n\n utils.forEach(headers, function (val, key) {\n // Remove Content-Type if data is undefined\n if (!data && key.toLowerCase() === 'content-type') {\n delete headers[key];\n }\n // Otherwise add header to the request\n else {\n request.setRequestHeader(key, val);\n }\n });\n\n // Add withCredentials to request if needed\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (options.responseType) {\n try {\n request.responseType = options.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Send the request\n request.send(data);\n });\n\n // Provide alias for success\n promise.success = function success(fn) {\n promise.then(function(response) {\n fn(response);\n });\n return promise;\n };\n\n // Provide alias for error\n promise.error = function error(fn) {\n promise.then(null, function(response) {\n fn(response);\n });\n return promise;\n };\n\n return promise;\n};\n\n// Expose defaults\naxios.defaults = defaults;\n\n// Provide aliases for supported request methods\ncreateShortMethods('delete', 'get', 'head');\ncreateShortMethodsWithData('post', 'put', 'patch');\n\nfunction createShortMethods() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url\n }));\n };\n });\n}\n\nfunction createShortMethodsWithData() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, data, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/axios.js\n ** module id = 1\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+');\n}\n\nmodule.exports = function buildUrl(url, params) {\n if (!params) {\n return url;\n }\n\n var parts = [];\n\n utils.forEach(params, function (val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function (v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n }\n else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n if (parts.length > 0) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n }\n\n return url;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/buildUrl.js\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nmodule.exports = {\n write: function (name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(exires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function (name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function (name) {\n this.write(name, '', Date.now() - 86400000);\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/cookies.js\n ** module id = 3\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\nvar JSON_END = /[\\}\\]]\\s*$/;\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar CONTENT_TYPE_APPLICATION_JSON = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nmodule.exports = {\n transformRequest: [function (data) {\n return utils.isObject(data) &&\n !utils.isFile(data) &&\n !utils.isBlob(data) ?\n JSON.stringify(data) : null;\n }],\n\n transformResponse: [function (data) {\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data)) {\n data = JSON.parse(data);\n }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/defaults.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n utils.forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/parseHeaders.js\n ** module id = 5\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n utils.forEach(fns, function (fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/transformData.js\n ** module id = 6\n ** module chunks = 0\n **/","'use strict';\n\nvar msie = /trident/i.test(navigator.userAgent);\nvar utils = require('./utils');\nvar urlParsingNode = document.createElement('a');\nvar originUrl = urlResolve(window.location.href);\n\n/**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\nfunction urlResolve(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestUrl The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\nmodule.exports = function urlIsSameOrigin(requestUrl) {\n var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/urlIsSameOrigin.js\n ** module id = 7\n ** module chunks = 0\n **/","// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array or arguments callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Check if obj is array-like\n var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray) {\n obj = [obj];\n }\n\n // Iterate over array values\n if (isArray) {\n for (var i=0, l=obj.length; i 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 19\n ** module chunks = 0\n **/"],"sourceRoot":"","file":"axios.amd.js"} \ No newline at end of file diff --git a/dist/axios.amd.min.js b/dist/axios.amd.min.js index c855454..0b7c437 100644 --- a/dist/axios.amd.min.js +++ b/dist/axios.amd.min.js @@ -1,3 +1,3 @@ /* axios v0.0.0 | (c) 2014 by Matt Zabriskie */ -define("axios",[],function(){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(1)},function(t,n,e){function r(){f.forEach(arguments,function(t){l[t]=function(n,e){return l(f.merge(e||{},{method:t,url:n}))}})}function o(){f.forEach(arguments,function(t){l[t]=function(n,e,r){return l(f.merge(r||{},{method:t,url:n,data:e}))}})}var i=e(7).Promise,s=e(2),c=e(3),u=e(4),a=e(5),f=e(6),l=t.exports=function(t){t=f.merge({method:"get",transformRequest:c.transformRequest,transformResponse:c.transformResponse},t),t.withCredentials=t.withCredentials||c.withCredentials;var n=new i(function(n,e){var r=new(XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP"),o=a(t.data,t.headers,t.transformRequest);r.open(t.method,s(t.url,t.params),!0),r.onreadystatechange=function(){if(r&&4===r.readyState){var o=u(r.getAllResponseHeaders()),i={data:a(r.responseText,o,t.transformResponse),status:r.status,headers:o,config:t};r.status>=200&&r.status<300?n(i):e(i),r=null}};var i=f.merge(c.headers.common,c.headers[t.method]||{},t.headers||{});if(f.forEach(i,function(t,n){"undefined"==typeof o&&"content-type"===n.toLowerCase()?delete i[n]:r.setRequestHeader(n,t)}),t.withCredentials&&(r.withCredentials=!0),t.responseType)try{r.responseType=t.responseType}catch(l){if("json"!==r.responseType)throw l}r.send(o)});return n.success=function(t){return n.then(function(n){t(n)}),n},n.error=function(t){return n.then(null,function(n){t(n)}),n},n};l.defaults=c,r("delete","get","head"),o("post","put","patch")},function(t,n,e){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}var o=e(6);t.exports=function(t,n){if(!n)return t;var e=[];return o.forEach(n,function(t,n){null!==t&&"undefined"!=typeof t&&(o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),e.push(r(n)+"="+r(t))}))}),e.length>0&&(t+=(-1===t.indexOf("?")?"?":"&")+e.join("&")),t}},function(t,n,e){"use strict";var r=e(6),o=/^\s*(\[|\{[^\{])/,i=/[\}\]]\s*$/,s=/^\)\]\}',?\n/,c={"Content-Type":"application/json;charset=utf-8"};t.exports={transformRequest:[function(t){return!r.isObject(t)||r.isFile(t)||r.isBlob(t)?null:JSON.stringify(t)}],transformResponse:[function(t){return"string"==typeof t&&(t=t.replace(s,""),o.test(t)&&i.test(t)&&(t=JSON.parse(t))),t}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:r.merge(c),post:r.merge(c),put:r.merge(c)},xsrfCookiName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"}},function(t,n,e){"use strict";var r=e(6);t.exports=function(t){var n,e,o,i={};return t?(r.forEach(t.split("\n"),function(t){o=t.indexOf(":"),n=r.trim(t.substr(0,o)).toLowerCase(),e=r.trim(t.substr(o+1)),n&&(i[n]=i[n]?i[n]+", "+e:e)}),i):i}},function(t,n,e){"use strict";var r=e(6);t.exports=function(t,n,e){return r.forEach(e,function(e){t=e(t,n)}),t}},function(t){function n(t){return"[object Array]"===a.call(t)}function e(t){return null!==t&&"object"==typeof t}function r(t){return"[object Date]"===a.call(t)}function o(t){return"[object File]"===a.call(t)}function i(t){return"[object Blob]"!==a.call(t)}function s(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function c(t,n){if(null!==t&&"undefined"!=typeof t){var e=t.constructor===Array||"function"==typeof t.callee;if("object"==typeof t||e||(t=[t]),e)for(var r=0,o=t.length;o>r;r++)n.call(null,t[r],r,t);else for(var i in t)t.hasOwnProperty(i)&&n.call(null,t[i],i,t)}}function u(){var t={};return c(arguments,function(n){c(n,function(n,e){t[e]=n})}),t}var a=Object.prototype.toString;t.exports={isArray:n,isObject:e,isDate:r,isFile:o,isBlob:i,forEach:c,merge:u,trim:s}},function(t,n,e){"use strict";var r=e(8).Promise,o=e(9).polyfill;n.Promise=r,n.polyfill=o},function(t,n,e){"use strict";function r(t){if(!m(t))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof r))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],o(t,this)}function o(t,n){function e(t){a(n,t)}function r(t){l(n,t)}try{t(e,r)}catch(o){r(o)}}function i(t,n,e,r){var o,i,s,c,f=m(e);if(f)try{o=e(r),s=!0}catch(p){c=!0,i=p}else o=r,s=!0;u(n,o)||(f&&s?a(n,o):c?l(n,i):t===_?a(n,o):t===E&&l(n,o))}function s(t,n,e,r){var o=t._subscribers,i=o.length;o[i]=n,o[i+_]=e,o[i+E]=r}function c(t,n){for(var e,r,o=t._subscribers,s=t._detail,c=0;c0)){var r=e.shift();r()}},!0),function(t){e.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=n,e.addListener=n,e.once=n,e.off=n,e.removeListener=n,e.removeAllListeners=n,e.emit=n,e.binding=function(){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(){throw new Error("process.chdir is not supported")}}])}); +define("axios",[],function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){function r(){p.forEach(arguments,function(t){h[t]=function(e,n){return h(p.merge(n||{},{method:t,url:e}))}})}function o(){p.forEach(arguments,function(t){h[t]=function(e,n,r){return h(p.merge(r||{},{method:t,url:e,data:n}))}})}var i=n(9).Promise,s=n(2),c=n(3),u=n(4),a=n(5),f=n(6),l=n(7),p=n(8),h=t.exports=function(t){t=p.merge({method:"get",transformRequest:u.transformRequest,transformResponse:u.transformResponse},t),t.withCredentials=t.withCredentials||u.withCredentials;var e=new i(function(e,n){var r=new(XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP"),o=f(t.data,t.headers,t.transformRequest);r.open(t.method,s(t.url,t.params),!0),r.onreadystatechange=function(){if(r&&4===r.readyState){var o=a(r.getAllResponseHeaders()),i={data:f(r.responseText,o,t.transformResponse),status:r.status,headers:o,config:t};r.status>=200&&r.status<300?e(i):n(i),r=null}};var i=p.merge(u.headers.common,u.headers[t.method]||{},t.headers||{}),h=l(t.url)?c.read(t.xsrfCookieName||u.xsrfCookieName):void 0;if(h&&(i[t.xsrfHeaderName||u.xsrfHeaderName]=h),p.forEach(i,function(t,e){o||"content-type"!==e.toLowerCase()?r.setRequestHeader(e,t):delete i[e]}),t.withCredentials&&(r.withCredentials=!0),t.responseType)try{r.responseType=t.responseType}catch(d){if("json"!==r.responseType)throw d}r.send(o)});return e.success=function(t){return e.then(function(e){t(e)}),e},e.error=function(t){return e.then(null,function(e){t(e)}),e},e};h.defaults=u,r("delete","get","head"),o("post","put","patch")},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}var o=n(8);t.exports=function(t,e){if(!e)return t;var n=[];return o.forEach(e,function(t,e){null!==t&&"undefined"!=typeof t&&(o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),n.push(r(e)+"="+r(t))}))}),n.length>0&&(t+=(-1===t.indexOf("?")?"?":"&")+n.join("&")),t}},function(t,e,n){"use strict";var r=n(8);t.exports={write:function(t,e,n,o,i,s){var c=[];c.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&c.push("expires="+new Date(exires).toGMTString()),r.isString(o)&&c.push("path="+o),r.isString(i)&&c.push("domain="+i),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}},function(t,e,n){"use strict";var r=n(8),o=/^\s*(\[|\{[^\{])/,i=/[\}\]]\s*$/,s=/^\)\]\}',?\n/,c={"Content-Type":"application/json;charset=utf-8"};t.exports={transformRequest:[function(t){return!r.isObject(t)||r.isFile(t)||r.isBlob(t)?null:JSON.stringify(t)}],transformResponse:[function(t){return"string"==typeof t&&(t=t.replace(s,""),o.test(t)&&i.test(t)&&(t=JSON.parse(t))),t}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:r.merge(c),post:r.merge(c),put:r.merge(c)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t){var e,n,o,i={};return t?(r.forEach(t.split("\n"),function(t){o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e&&(i[e]=i[e]?i[e]+", "+n:n)}),i):i}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";function r(t){var e=t;return o&&(s.setAttribute("href",e),e=s.href),s.setAttribute("href",e),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:"/"===s.pathname.charAt(0)?s.pathname:"/"+s.pathname}}var o=/trident/i.test(navigator.userAgent),i=n(8),s=document.createElement("a"),c=r(window.location.href);t.exports=function(t){var e=i.isString(t)?r(t):t;return e.protocol===c.protocol&&e.host===c.host}},function(t){function e(t){return"[object Array]"===l.call(t)}function n(t){return"string"==typeof t}function r(t){return"number"==typeof t}function o(t){return null!==t&&"object"==typeof t}function i(t){return"[object Date]"===l.call(t)}function s(t){return"[object File]"===l.call(t)}function c(t){return"[object Blob]"===l.call(t)}function u(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function a(t,e){if(null!==t&&"undefined"!=typeof t){var n=t.constructor===Array||"function"==typeof t.callee;if("object"==typeof t||n||(t=[t]),n)for(var r=0,o=t.length;o>r;r++)e.call(null,t[r],r,t);else for(var i in t)t.hasOwnProperty(i)&&e.call(null,t[i],i,t)}}function f(){var t={};return a(arguments,function(e){a(e,function(e,n){t[n]=e})}),t}var l=Object.prototype.toString;t.exports={isArray:e,isString:n,isNumber:r,isObject:o,isDate:i,isFile:s,isBlob:c,forEach:a,merge:f,trim:u}},function(t,e,n){"use strict";var r=n(10).Promise,o=n(11).polyfill;e.Promise=r,e.polyfill=o},function(t,e,n){"use strict";function r(t){if(!v(t))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof r))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],o(t,this)}function o(t,e){function n(t){a(e,t)}function r(t){l(e,t)}try{t(n,r)}catch(o){r(o)}}function i(t,e,n,r){var o,i,s,c,f=v(n);if(f)try{o=n(r),s=!0}catch(p){c=!0,i=p}else o=r,s=!0;u(e,o)||(f&&s?a(e,o):c?l(e,i):t===E?a(e,o):t===_&&l(e,o))}function s(t,e,n,r){var o=t._subscribers,i=o.length;o[i]=e,o[i+E]=n,o[i+_]=r}function c(t,e){for(var n,r,o=t._subscribers,s=t._detail,c=0;c0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=e,n.addListener=e,n.once=e,n.off=e,n.removeListener=e,n.removeAllListeners=e,n.emit=e,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}}])}); //# sourceMappingURL=axios.amd.min.map \ No newline at end of file diff --git a/dist/axios.amd.min.map b/dist/axios.amd.min.map index 05b06cc..36acce8 100644 --- a/dist/axios.amd.min.map +++ b/dist/axios.amd.min.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///axios.amd.min.js","webpack:///webpack/bootstrap 94d3485bad0d8b189e35","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/buildUrl.js","webpack:///./lib/defaults.js","webpack:///./lib/parseHeaders.js","webpack:///./lib/transformData.js","webpack:///./lib/utils.js","webpack:///./~/es6-promise/dist/commonjs/main.js","webpack:///./~/es6-promise/dist/commonjs/promise/promise.js","webpack:///./~/es6-promise/dist/commonjs/promise/polyfill.js","webpack:///./~/es6-promise/dist/commonjs/promise/config.js","webpack:///./~/es6-promise/dist/commonjs/promise/utils.js","webpack:///./~/es6-promise/dist/commonjs/promise/all.js","webpack:///./~/es6-promise/dist/commonjs/promise/race.js","webpack:///./~/es6-promise/dist/commonjs/promise/resolve.js","webpack:///./~/es6-promise/dist/commonjs/promise/reject.js","webpack:///./~/es6-promise/dist/commonjs/promise/asap.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js"],"names":["define","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","createShortMethods","utils","forEach","arguments","method","axios","url","options","merge","createShortMethodsWithData","data","Promise","buildUrl","defaults","parseHeaders","transformData","transformRequest","transformResponse","withCredentials","promise","resolve","reject","request","XMLHttpRequest","ActiveXObject","headers","open","params","onreadystatechange","readyState","getAllResponseHeaders","response","responseText","status","config","common","val","key","toLowerCase","setRequestHeader","responseType","e","send","success","fn","then","error","encode","encodeURIComponent","replace","parts","isArray","v","isDate","toISOString","isObject","JSON","stringify","push","length","indexOf","join","JSON_START","JSON_END","PROTECTION_PREFIX","CONTENT_TYPE_APPLICATION_JSON","Content-Type","isFile","isBlob","test","parse","Accept","patch","post","put","xsrfCookiName","xsrfHeaderName","i","parsed","split","line","trim","substr","fns","toString","str","obj","constructor","Array","callee","l","hasOwnProperty","result","Object","prototype","polyfill","resolver","isFunction","TypeError","this","_subscribers","invokeResolver","resolvePromise","value","rejectPromise","reason","invokeCallback","settled","callback","detail","succeeded","failed","hasCallback","handleThenable","FULFILLED","REJECTED","subscribe","parent","child","onFulfillment","onRejection","subscribers","publish","_detail","resolved","objectOrFunction","fulfill","_state","PENDING","SEALED","async","publishFulfillment","publishRejection","configure","all","now","race","staticResolve","staticReject","asap","undefined","thenPromise","callbacks","catch","global","local","window","document","self","es6PromiseSupport","r","RSVPPromise","name","instrument","x","Date","getTime","promises","index","resolveAll","results","remaining","process","useNextTick","nextTick","flush","useMutationObserver","iterations","observer","BrowserMutationObserver","node","createTextNode","observe","characterData","useSetTimeout","setTimeout","queue","tuple","arg","scheduleFlush","browserGlobal","MutationObserver","WebKitMutationObserver","noop","canSetImmediate","setImmediate","canPost","postMessage","addEventListener","f","ev","source","stopPropagation","shift","title","browser","env","argv","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","Error","cwd","chdir"],"mappings":"AAAAA,OAAO,WAAa,WAAa,MAAgB,UAAUC,GCI3D,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMM,SAASI,EAAQD,EAASH,GE5ChCI,EAAAD,QAAAH,EAAA,IFkDM,SAASI,EAAQD,EAASH,GGuEhC,QAAAW,KACAC,EAAAC,QAAAC,UAAA,SAAAC,GACAC,EAAAD,GAAA,SAAAE,EAAAC,GACA,MAAAF,GAAAJ,EAAAO,MAAAD,OACAH,SACAE,YAMA,QAAAG,KACAR,EAAAC,QAAAC,UAAA,SAAAC,GACAC,EAAAD,GAAA,SAAAE,EAAAI,EAAAH,GACA,MAAAF,GAAAJ,EAAAO,MAAAD,OACAH,SACAE,MACAI,aA1IA,GAAAC,GAAAtB,EAAA,GAAAsB,QACAC,EAAAvB,EAAA,GACAwB,EAAAxB,EAAA,GACAyB,EAAAzB,EAAA,GACA0B,EAAA1B,EAAA,GACAY,EAAAZ,EAAA,GAEAgB,EAAAZ,EAAAD,QAAA,SAAAe,GACAA,EAAAN,EAAAO,OACAJ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AAAsC,KAAAjB,EACArB,EAAAuC,IAAAlB,EACArB,EAAAwC,eAAAnB,EACArB,EAAAyC,mBAAApB,EACArB,EAAA0C,KAAArB,EAEArB,EAAA2C,QAAA,WACA,SAAAC,OAAA,qCAIA5C,EAAA6C,IAAA,WAA2B,WAC3B7C,EAAA8C,MAAA,WACA,SAAAF,OAAA","file":"axios.amd.min.js","sourcesContent":["define(\"axios\", [], function() { return /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Promise = __webpack_require__(7).Promise;\n\tvar buildUrl = __webpack_require__(2);\n\tvar defaults = __webpack_require__(3);\n\tvar parseHeaders = __webpack_require__(4);\n\tvar transformData = __webpack_require__(5);\n\tvar utils = __webpack_require__(6);\n\t\n\tvar axios = module.exports = function axios(options) {\n\t options = utils.merge({\n\t method: 'get',\n\t transformRequest: defaults.transformRequest,\n\t transformResponse: defaults.transformResponse\n\t }, options);\n\t\n\t // Don't allow overriding defaults.withCredentials\n\t options.withCredentials = options.withCredentials || defaults.withCredentials;\n\t\n\t var promise = new Promise(function (resolve, reject) {\n\t // Create the request\n\t var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n\t var data = transformData(\n\t options.data,\n\t options.headers,\n\t options.transformRequest\n\t );\n\t\n\t // Open the request\n\t request.open(options.method, buildUrl(options.url, options.params), true);\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function () {\n\t if (request && request.readyState === 4) {\n\t // Prepare the response\n\t var headers = parseHeaders(request.getAllResponseHeaders());\n\t var response = {\n\t data: transformData(\n\t request.responseText,\n\t headers,\n\t options.transformResponse\n\t ),\n\t status: request.status,\n\t headers: headers,\n\t config: options\n\t };\n\t\n\t // Resolve or reject the Promise based on the status\n\t if (request.status >= 200 && request.status < 300) {\n\t resolve(response);\n\t } else {\n\t reject(response);\n\t }\n\t\n\t // Clean up request\n\t request = null;\n\t }\n\t };\n\t\n\t // Merge headers and add to request\n\t var headers = utils.merge(\n\t defaults.headers.common,\n\t defaults.headers[options.method] || {},\n\t options.headers || {}\n\t );\n\t\n\t utils.forEach(headers, function (val, key) {\n\t // Remove Content-Type if data is undefined\n\t if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') {\n\t delete headers[key];\n\t }\n\t // Otherwise add header to the request\n\t else {\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t\n\t // Add withCredentials to request if needed\n\t if (options.withCredentials) {\n\t request.withCredentials = true;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (options.responseType) {\n\t try {\n\t request.responseType = options.responseType;\n\t } catch (e) {\n\t if (request.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Send the request\n\t request.send(data);\n\t });\n\t\n\t // Provide alias for success\n\t promise.success = function success(fn) {\n\t promise.then(function(response) {\n\t fn(response);\n\t });\n\t return promise;\n\t };\n\t\n\t // Provide alias for error\n\t promise.error = function error(fn) {\n\t promise.then(null, function(response) {\n\t fn(response);\n\t });\n\t return promise;\n\t };\n\t\n\t return promise;\n\t};\n\t\n\t// Expose defaults\n\taxios.defaults = defaults;\n\t\n\t// Provide aliases for supported request methods\n\tcreateShortMethods('delete', 'get', 'head');\n\tcreateShortMethodsWithData('post', 'put', 'patch');\n\t\n\tfunction createShortMethods() {\n\t utils.forEach(arguments, function (method) {\n\t axios[method] = function (url, options) {\n\t return axios(utils.merge(options || {}, {\n\t method: method,\n\t url: url\n\t }));\n\t };\n\t });\n\t}\n\t\n\tfunction createShortMethodsWithData() {\n\t utils.forEach(arguments, function (method) {\n\t axios[method] = function (url, data, options) {\n\t return axios(utils.merge(options || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t });\n\t}\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(6);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%40/gi, '@').\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+');\n\t}\n\t\n\tmodule.exports = function buildUrl(url, params) {\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var parts = [];\n\t\n\t utils.forEach(params, function (val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t if (!utils.isArray(val)) {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function (v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t }\n\t else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t if (parts.length > 0) {\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n\t }\n\t\n\t return url;\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(6);\n\t\n\tvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\n\tvar JSON_END = /[\\}\\]]\\s*$/;\n\tvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\n\tvar CONTENT_TYPE_APPLICATION_JSON = {\n\t 'Content-Type': 'application/json;charset=utf-8'\n\t};\n\t\n\tmodule.exports = {\n\t transformRequest: [function (data) {\n\t return utils.isObject(data) &&\n\t !utils.isFile(data) &&\n\t !utils.isBlob(data) ?\n\t JSON.stringify(data) : null;\n\t }],\n\t\n\t transformResponse: [function (data) {\n\t if (typeof data === 'string') {\n\t data = data.replace(PROTECTION_PREFIX, '');\n\t if (JSON_START.test(data) && JSON_END.test(data)) {\n\t data = JSON.parse(data);\n\t }\n\t }\n\t return data;\n\t }],\n\t\n\t headers: {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t },\n\t patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n\t post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n\t put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n\t },\n\t\n\t xsrfCookiName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN'\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(6);\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {}, key, val, i;\n\t\n\t if (!headers) return parsed;\n\t\n\t utils.forEach(headers.split('\\n'), function(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(6);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t utils.forEach(fns, function (fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) !== '[object Blob]';\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array or arguments callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Check if obj is array-like\n\t var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object' && !isArray) {\n\t obj = [obj];\n\t }\n\t\n\t // Iterate over array values\n\t if (isArray) {\n\t for (var i=0, l=obj.length; i 0) {\n\t var fn = queue.shift();\n\t fn();\n\t }\n\t }\n\t }, true);\n\t\n\t return function nextTick(fn) {\n\t queue.push(fn);\n\t window.postMessage('process-tick', '*');\n\t };\n\t }\n\t\n\t return function nextTick(fn) {\n\t setTimeout(fn, 0);\n\t };\n\t})();\n\t\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t}\n\t\n\t// TODO(shtylman)\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\n\n/***/ }\n/******/ ])});\n\n\n/** WEBPACK FOOTER **\n ** axios.amd.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 94d3485bad0d8b189e35\n **/","module.exports = require('./lib/axios');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","var Promise = require('es6-promise').Promise;\nvar buildUrl = require('./buildUrl');\nvar defaults = require('./defaults');\nvar parseHeaders = require('./parseHeaders');\nvar transformData = require('./transformData');\nvar utils = require('./utils');\n\nvar axios = module.exports = function axios(options) {\n options = utils.merge({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n }, options);\n\n // Don't allow overriding defaults.withCredentials\n options.withCredentials = options.withCredentials || defaults.withCredentials;\n\n var promise = new Promise(function (resolve, reject) {\n // Create the request\n var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n var data = transformData(\n options.data,\n options.headers,\n options.transformRequest\n );\n\n // Open the request\n request.open(options.method, buildUrl(options.url, options.params), true);\n\n // Listen for ready state\n request.onreadystatechange = function () {\n if (request && request.readyState === 4) {\n // Prepare the response\n var headers = parseHeaders(request.getAllResponseHeaders());\n var response = {\n data: transformData(\n request.responseText,\n headers,\n options.transformResponse\n ),\n status: request.status,\n headers: headers,\n config: options\n };\n\n // Resolve or reject the Promise based on the status\n if (request.status >= 200 && request.status < 300) {\n resolve(response);\n } else {\n reject(response);\n }\n\n // Clean up request\n request = null;\n }\n };\n\n // Merge headers and add to request\n var headers = utils.merge(\n defaults.headers.common,\n defaults.headers[options.method] || {},\n options.headers || {}\n );\n\n utils.forEach(headers, function (val, key) {\n // Remove Content-Type if data is undefined\n if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') {\n delete headers[key];\n }\n // Otherwise add header to the request\n else {\n request.setRequestHeader(key, val);\n }\n });\n\n // Add withCredentials to request if needed\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (options.responseType) {\n try {\n request.responseType = options.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Send the request\n request.send(data);\n });\n\n // Provide alias for success\n promise.success = function success(fn) {\n promise.then(function(response) {\n fn(response);\n });\n return promise;\n };\n\n // Provide alias for error\n promise.error = function error(fn) {\n promise.then(null, function(response) {\n fn(response);\n });\n return promise;\n };\n\n return promise;\n};\n\n// Expose defaults\naxios.defaults = defaults;\n\n// Provide aliases for supported request methods\ncreateShortMethods('delete', 'get', 'head');\ncreateShortMethodsWithData('post', 'put', 'patch');\n\nfunction createShortMethods() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url\n }));\n };\n });\n}\n\nfunction createShortMethodsWithData() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, data, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/axios.js\n ** module id = 1\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+');\n}\n\nmodule.exports = function buildUrl(url, params) {\n if (!params) {\n return url;\n }\n\n var parts = [];\n\n utils.forEach(params, function (val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function (v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n }\n else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n if (parts.length > 0) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n }\n\n return url;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/buildUrl.js\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\nvar JSON_END = /[\\}\\]]\\s*$/;\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar CONTENT_TYPE_APPLICATION_JSON = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nmodule.exports = {\n transformRequest: [function (data) {\n return utils.isObject(data) &&\n !utils.isFile(data) &&\n !utils.isBlob(data) ?\n JSON.stringify(data) : null;\n }],\n\n transformResponse: [function (data) {\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data)) {\n data = JSON.parse(data);\n }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookiName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/defaults.js\n ** module id = 3\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n utils.forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/parseHeaders.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n utils.forEach(fns, function (fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/transformData.js\n ** module id = 5\n ** module chunks = 0\n **/","// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) !== '[object Blob]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array or arguments callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Check if obj is array-like\n var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray) {\n obj = [obj];\n }\n\n // Iterate over array values\n if (isArray) {\n for (var i=0, l=obj.length; i 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 17\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///axios.amd.min.js","webpack:///webpack/bootstrap a48b29edb9b48f516a73","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/buildUrl.js","webpack:///./lib/cookies.js","webpack:///./lib/defaults.js","webpack:///./lib/parseHeaders.js","webpack:///./lib/transformData.js","webpack:///./lib/urlIsSameOrigin.js","webpack:///./lib/utils.js","webpack:///./~/es6-promise/dist/commonjs/main.js","webpack:///./~/es6-promise/dist/commonjs/promise/promise.js","webpack:///./~/es6-promise/dist/commonjs/promise/polyfill.js","webpack:///./~/es6-promise/dist/commonjs/promise/config.js","webpack:///./~/es6-promise/dist/commonjs/promise/utils.js","webpack:///./~/es6-promise/dist/commonjs/promise/all.js","webpack:///./~/es6-promise/dist/commonjs/promise/race.js","webpack:///./~/es6-promise/dist/commonjs/promise/resolve.js","webpack:///./~/es6-promise/dist/commonjs/promise/reject.js","webpack:///./~/es6-promise/dist/commonjs/promise/asap.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js"],"names":["define","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","createShortMethods","utils","forEach","arguments","method","axios","url","options","merge","createShortMethodsWithData","data","Promise","buildUrl","cookies","defaults","parseHeaders","transformData","urlIsSameOrigin","transformRequest","transformResponse","withCredentials","promise","resolve","reject","request","XMLHttpRequest","ActiveXObject","headers","open","params","onreadystatechange","readyState","getAllResponseHeaders","response","responseText","status","config","common","xsrfValue","read","xsrfCookieName","undefined","xsrfHeaderName","val","key","toLowerCase","setRequestHeader","responseType","e","send","success","fn","then","error","encode","encodeURIComponent","replace","parts","isArray","v","isDate","toISOString","isObject","JSON","stringify","push","length","indexOf","join","write","name","value","expires","path","domain","secure","cookie","isNumber","Date","exires","toGMTString","isString","document","match","RegExp","decodeURIComponent","remove","this","now","JSON_START","JSON_END","PROTECTION_PREFIX","CONTENT_TYPE_APPLICATION_JSON","Content-Type","isFile","isBlob","test","parse","Accept","patch","post","put","i","parsed","split","line","trim","substr","fns","urlResolve","href","msie","urlParsingNode","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","navigator","userAgent","createElement","originUrl","window","location","requestUrl","toString","str","obj","constructor","Array","callee","l","hasOwnProperty","result","Object","prototype","polyfill","resolver","isFunction","TypeError","_subscribers","invokeResolver","resolvePromise","rejectPromise","reason","invokeCallback","settled","callback","detail","succeeded","failed","hasCallback","handleThenable","FULFILLED","REJECTED","subscribe","parent","child","onFulfillment","onRejection","subscribers","publish","_detail","resolved","objectOrFunction","fulfill","_state","PENDING","SEALED","async","publishFulfillment","publishRejection","configure","all","race","staticResolve","staticReject","asap","thenPromise","callbacks","catch","global","local","self","es6PromiseSupport","r","RSVPPromise","instrument","x","getTime","promises","index","resolveAll","results","remaining","process","useNextTick","nextTick","flush","useMutationObserver","iterations","observer","BrowserMutationObserver","node","createTextNode","observe","characterData","useSetTimeout","setTimeout","queue","tuple","arg","scheduleFlush","browserGlobal","MutationObserver","WebKitMutationObserver","noop","canSetImmediate","setImmediate","canPost","postMessage","addEventListener","f","ev","source","stopPropagation","shift","title","browser","env","argv","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","Error","cwd","chdir"],"mappings":"AAAAA,OAAO,WAAa,WAAa,MAAgB,UAAUC,GCI3D,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WAC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AIAnC,EAAAoC,GAAAf,EACArB,EAAAqC,YAAAhB,EACArB,EAAAsC,KAAAjB,EACArB,EAAAuC,IAAAlB,EACArB,EAAAwC,eAAAnB,EACArB,EAAAyC,mBAAApB,EACArB,EAAA0C,KAAArB,EAEArB,EAAA2C,QAAA,WACA,SAAAC,OAAA,qCAIA5C,EAAA6C,IAAA,WAA2B,WAC3B7C,EAAA8C,MAAA,WACA,SAAAF,OAAA","file":"axios.amd.min.js","sourcesContent":["define(\"axios\", [], function() { return /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Promise = __webpack_require__(9).Promise;\n\tvar buildUrl = __webpack_require__(2);\n\tvar cookies = __webpack_require__(3);\n\tvar defaults = __webpack_require__(4);\n\tvar parseHeaders = __webpack_require__(5);\n\tvar transformData = __webpack_require__(6);\n\tvar urlIsSameOrigin = __webpack_require__(7);\n\tvar utils = __webpack_require__(8);\n\t\n\tvar axios = module.exports = function axios(options) {\n\t options = utils.merge({\n\t method: 'get',\n\t transformRequest: defaults.transformRequest,\n\t transformResponse: defaults.transformResponse\n\t }, options);\n\t\n\t // Don't allow overriding defaults.withCredentials\n\t options.withCredentials = options.withCredentials || defaults.withCredentials;\n\t\n\t var promise = new Promise(function (resolve, reject) {\n\t // Create the request\n\t var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n\t var data = transformData(\n\t options.data,\n\t options.headers,\n\t options.transformRequest\n\t );\n\t\n\t // Open the request\n\t request.open(options.method, buildUrl(options.url, options.params), true);\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function () {\n\t if (request && request.readyState === 4) {\n\t // Prepare the response\n\t var headers = parseHeaders(request.getAllResponseHeaders());\n\t var response = {\n\t data: transformData(\n\t request.responseText,\n\t headers,\n\t options.transformResponse\n\t ),\n\t status: request.status,\n\t headers: headers,\n\t config: options\n\t };\n\t\n\t // Resolve or reject the Promise based on the status\n\t if (request.status >= 200 && request.status < 300) {\n\t resolve(response);\n\t } else {\n\t reject(response);\n\t }\n\t\n\t // Clean up request\n\t request = null;\n\t }\n\t };\n\t\n\t // Merge headers and add to request\n\t var headers = utils.merge(\n\t defaults.headers.common,\n\t defaults.headers[options.method] || {},\n\t options.headers || {}\n\t );\n\t\n\t // Add xsrf header\n\t var xsrfValue = urlIsSameOrigin(options.url)\n\t ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName)\n\t : undefined;\n\t if (xsrfValue) {\n\t headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue;\n\t }\n\t\n\t utils.forEach(headers, function (val, key) {\n\t // Remove Content-Type if data is undefined\n\t if (!data && key.toLowerCase() === 'content-type') {\n\t delete headers[key];\n\t }\n\t // Otherwise add header to the request\n\t else {\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t\n\t // Add withCredentials to request if needed\n\t if (options.withCredentials) {\n\t request.withCredentials = true;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (options.responseType) {\n\t try {\n\t request.responseType = options.responseType;\n\t } catch (e) {\n\t if (request.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Send the request\n\t request.send(data);\n\t });\n\t\n\t // Provide alias for success\n\t promise.success = function success(fn) {\n\t promise.then(function(response) {\n\t fn(response);\n\t });\n\t return promise;\n\t };\n\t\n\t // Provide alias for error\n\t promise.error = function error(fn) {\n\t promise.then(null, function(response) {\n\t fn(response);\n\t });\n\t return promise;\n\t };\n\t\n\t return promise;\n\t};\n\t\n\t// Expose defaults\n\taxios.defaults = defaults;\n\t\n\t// Provide aliases for supported request methods\n\tcreateShortMethods('delete', 'get', 'head');\n\tcreateShortMethodsWithData('post', 'put', 'patch');\n\t\n\tfunction createShortMethods() {\n\t utils.forEach(arguments, function (method) {\n\t axios[method] = function (url, options) {\n\t return axios(utils.merge(options || {}, {\n\t method: method,\n\t url: url\n\t }));\n\t };\n\t });\n\t}\n\t\n\tfunction createShortMethodsWithData() {\n\t utils.forEach(arguments, function (method) {\n\t axios[method] = function (url, data, options) {\n\t return axios(utils.merge(options || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t });\n\t}\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%40/gi, '@').\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+');\n\t}\n\t\n\tmodule.exports = function buildUrl(url, params) {\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var parts = [];\n\t\n\t utils.forEach(params, function (val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t if (!utils.isArray(val)) {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function (v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t }\n\t else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t if (parts.length > 0) {\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n\t }\n\t\n\t return url;\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tmodule.exports = {\n\t write: function (name, value, expires, path, domain, secure) {\n\t var cookie = [];\n\t cookie.push(name + '=' + encodeURIComponent(value));\n\t\n\t if (utils.isNumber(expires)) {\n\t cookie.push('expires=' + new Date(exires).toGMTString());\n\t }\n\t\n\t if (utils.isString(path)) {\n\t cookie.push('path=' + path);\n\t }\n\t\n\t if (utils.isString(domain)) {\n\t cookie.push('domain=' + domain);\n\t }\n\t\n\t if (secure === true) {\n\t cookie.push('secure');\n\t }\n\t\n\t document.cookie = cookie.join('; ');\n\t },\n\t\n\t read: function (name) {\n\t var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t return (match ? decodeURIComponent(match[3]) : null);\n\t },\n\t\n\t remove: function (name) {\n\t this.write(name, '', Date.now() - 86400000);\n\t }\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\n\tvar JSON_END = /[\\}\\]]\\s*$/;\n\tvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\n\tvar CONTENT_TYPE_APPLICATION_JSON = {\n\t 'Content-Type': 'application/json;charset=utf-8'\n\t};\n\t\n\tmodule.exports = {\n\t transformRequest: [function (data) {\n\t return utils.isObject(data) &&\n\t !utils.isFile(data) &&\n\t !utils.isBlob(data) ?\n\t JSON.stringify(data) : null;\n\t }],\n\t\n\t transformResponse: [function (data) {\n\t if (typeof data === 'string') {\n\t data = data.replace(PROTECTION_PREFIX, '');\n\t if (JSON_START.test(data) && JSON_END.test(data)) {\n\t data = JSON.parse(data);\n\t }\n\t }\n\t return data;\n\t }],\n\t\n\t headers: {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t },\n\t patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n\t post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n\t put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n\t },\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN'\n\t};\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {}, key, val, i;\n\t\n\t if (!headers) return parsed;\n\t\n\t utils.forEach(headers.split('\\n'), function(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t utils.forEach(fns, function (fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar msie = /trident/i.test(navigator.userAgent);\n\tvar utils = __webpack_require__(8);\n\tvar urlParsingNode = document.createElement('a');\n\tvar originUrl = urlResolve(window.location.href);\n\t\n\t/**\n\t * Parse a URL to discover it's components\n\t *\n\t * @param {String} url The URL to be parsed\n\t * @returns {Object}\n\t */\n\tfunction urlResolve(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // IE needs attribute set twice to normalize properties\n\t urlParsingNode.setAttribute('href', href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/')\n\t ? urlParsingNode.pathname\n\t : '/' + urlParsingNode.pathname\n\t };\n\t}\n\t\n\t/**\n\t * Determine if a URL shares the same origin as the current location\n\t *\n\t * @param {String} requestUrl The URL to test\n\t * @returns {boolean} True if URL shares the same origin, otherwise false\n\t */\n\tmodule.exports = function urlIsSameOrigin(requestUrl) {\n\t var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n\t return (parsed.protocol === originUrl.protocol &&\n\t parsed.host === originUrl.host);\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t return typeof val === 'string';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t return typeof val === 'number';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) === '[object Blob]';\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array or arguments callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Check if obj is array-like\n\t var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object' && !isArray) {\n\t obj = [obj];\n\t }\n\t\n\t // Iterate over array values\n\t if (isArray) {\n\t for (var i=0, l=obj.length; i 0) {\n\t var fn = queue.shift();\n\t fn();\n\t }\n\t }\n\t }, true);\n\t\n\t return function nextTick(fn) {\n\t queue.push(fn);\n\t window.postMessage('process-tick', '*');\n\t };\n\t }\n\t\n\t return function nextTick(fn) {\n\t setTimeout(fn, 0);\n\t };\n\t})();\n\t\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t}\n\t\n\t// TODO(shtylman)\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\n\n/***/ }\n/******/ ])});\n\n\n/** WEBPACK FOOTER **\n ** axios.amd.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap a48b29edb9b48f516a73\n **/","module.exports = require('./lib/axios');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","var Promise = require('es6-promise').Promise;\nvar buildUrl = require('./buildUrl');\nvar cookies = require('./cookies');\nvar defaults = require('./defaults');\nvar parseHeaders = require('./parseHeaders');\nvar transformData = require('./transformData');\nvar urlIsSameOrigin = require('./urlIsSameOrigin');\nvar utils = require('./utils');\n\nvar axios = module.exports = function axios(options) {\n options = utils.merge({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n }, options);\n\n // Don't allow overriding defaults.withCredentials\n options.withCredentials = options.withCredentials || defaults.withCredentials;\n\n var promise = new Promise(function (resolve, reject) {\n // Create the request\n var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n var data = transformData(\n options.data,\n options.headers,\n options.transformRequest\n );\n\n // Open the request\n request.open(options.method, buildUrl(options.url, options.params), true);\n\n // Listen for ready state\n request.onreadystatechange = function () {\n if (request && request.readyState === 4) {\n // Prepare the response\n var headers = parseHeaders(request.getAllResponseHeaders());\n var response = {\n data: transformData(\n request.responseText,\n headers,\n options.transformResponse\n ),\n status: request.status,\n headers: headers,\n config: options\n };\n\n // Resolve or reject the Promise based on the status\n if (request.status >= 200 && request.status < 300) {\n resolve(response);\n } else {\n reject(response);\n }\n\n // Clean up request\n request = null;\n }\n };\n\n // Merge headers and add to request\n var headers = utils.merge(\n defaults.headers.common,\n defaults.headers[options.method] || {},\n options.headers || {}\n );\n\n // Add xsrf header\n var xsrfValue = urlIsSameOrigin(options.url)\n ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName)\n : undefined;\n if (xsrfValue) {\n headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue;\n }\n\n utils.forEach(headers, function (val, key) {\n // Remove Content-Type if data is undefined\n if (!data && key.toLowerCase() === 'content-type') {\n delete headers[key];\n }\n // Otherwise add header to the request\n else {\n request.setRequestHeader(key, val);\n }\n });\n\n // Add withCredentials to request if needed\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (options.responseType) {\n try {\n request.responseType = options.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Send the request\n request.send(data);\n });\n\n // Provide alias for success\n promise.success = function success(fn) {\n promise.then(function(response) {\n fn(response);\n });\n return promise;\n };\n\n // Provide alias for error\n promise.error = function error(fn) {\n promise.then(null, function(response) {\n fn(response);\n });\n return promise;\n };\n\n return promise;\n};\n\n// Expose defaults\naxios.defaults = defaults;\n\n// Provide aliases for supported request methods\ncreateShortMethods('delete', 'get', 'head');\ncreateShortMethodsWithData('post', 'put', 'patch');\n\nfunction createShortMethods() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url\n }));\n };\n });\n}\n\nfunction createShortMethodsWithData() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, data, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/axios.js\n ** module id = 1\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+');\n}\n\nmodule.exports = function buildUrl(url, params) {\n if (!params) {\n return url;\n }\n\n var parts = [];\n\n utils.forEach(params, function (val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function (v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n }\n else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n if (parts.length > 0) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n }\n\n return url;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/buildUrl.js\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nmodule.exports = {\n write: function (name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(exires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function (name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function (name) {\n this.write(name, '', Date.now() - 86400000);\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/cookies.js\n ** module id = 3\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\nvar JSON_END = /[\\}\\]]\\s*$/;\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar CONTENT_TYPE_APPLICATION_JSON = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nmodule.exports = {\n transformRequest: [function (data) {\n return utils.isObject(data) &&\n !utils.isFile(data) &&\n !utils.isBlob(data) ?\n JSON.stringify(data) : null;\n }],\n\n transformResponse: [function (data) {\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data)) {\n data = JSON.parse(data);\n }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/defaults.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n utils.forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/parseHeaders.js\n ** module id = 5\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n utils.forEach(fns, function (fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/transformData.js\n ** module id = 6\n ** module chunks = 0\n **/","'use strict';\n\nvar msie = /trident/i.test(navigator.userAgent);\nvar utils = require('./utils');\nvar urlParsingNode = document.createElement('a');\nvar originUrl = urlResolve(window.location.href);\n\n/**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\nfunction urlResolve(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestUrl The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\nmodule.exports = function urlIsSameOrigin(requestUrl) {\n var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/urlIsSameOrigin.js\n ** module id = 7\n ** module chunks = 0\n **/","// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array or arguments callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Check if obj is array-like\n var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray) {\n obj = [obj];\n }\n\n // Iterate over array values\n if (isArray) {\n for (var i=0, l=obj.length; i 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 19\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/axios.js b/dist/axios.js index 5314c60..fbbfad4 100644 --- a/dist/axios.js +++ b/dist/axios.js @@ -51,12 +51,14 @@ var axios = /* 1 */ /***/ function(module, exports, __webpack_require__) { - var Promise = __webpack_require__(7).Promise; + var Promise = __webpack_require__(9).Promise; var buildUrl = __webpack_require__(2); - var defaults = __webpack_require__(3); - var parseHeaders = __webpack_require__(4); - var transformData = __webpack_require__(5); - var utils = __webpack_require__(6); + var cookies = __webpack_require__(3); + var defaults = __webpack_require__(4); + var parseHeaders = __webpack_require__(5); + var transformData = __webpack_require__(6); + var urlIsSameOrigin = __webpack_require__(7); + var utils = __webpack_require__(8); var axios = module.exports = function axios(options) { options = utils.merge({ @@ -115,9 +117,17 @@ var axios = options.headers || {} ); + // Add xsrf header + var xsrfValue = urlIsSameOrigin(options.url) + ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName) + : undefined; + if (xsrfValue) { + headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue; + } + utils.forEach(headers, function (val, key) { // Remove Content-Type if data is undefined - if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') { + if (!data && key.toLowerCase() === 'content-type') { delete headers[key]; } // Otherwise add header to the request @@ -201,7 +211,7 @@ var axios = 'use strict'; - var utils = __webpack_require__(6); + var utils = __webpack_require__(8); function encode(val) { return encodeURIComponent(val). @@ -251,7 +261,49 @@ var axios = 'use strict'; - var utils = __webpack_require__(6); + var utils = __webpack_require__(8); + + module.exports = { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(8); var JSON_START = /^\s*(\[|\{[^\{])/; var JSON_END = /[\}\]]\s*$/; @@ -287,17 +339,17 @@ var axios = put: utils.merge(CONTENT_TYPE_APPLICATION_JSON) }, - xsrfCookiName: 'XSRF-TOKEN', + xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN' }; /***/ }, -/* 4 */ +/* 5 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var utils = __webpack_require__(6); + var utils = __webpack_require__(8); /** * Parse headers into an object @@ -331,12 +383,12 @@ var axios = }; /***/ }, -/* 5 */ +/* 6 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var utils = __webpack_require__(6); + var utils = __webpack_require__(8); /** * Transform the data for a request or a response @@ -355,7 +407,62 @@ var axios = }; /***/ }, -/* 6 */ +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var msie = /(msie|trident)/i.test(navigator.userAgent); + var utils = __webpack_require__(8); + var urlParsingNode = document.createElement('a'); + var originUrl = urlResolve(window.location.href); + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function urlResolve(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') + ? urlParsingNode.pathname + : '/' + urlParsingNode.pathname + }; + } + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestUrl The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + module.exports = function urlIsSameOrigin(requestUrl) { + var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; + return (parsed.protocol === originUrl.protocol && + parsed.host === originUrl.host); + }; + +/***/ }, +/* 8 */ /***/ function(module, exports, __webpack_require__) { // utils is a library of generic helper functions non-specific to axios @@ -372,6 +479,26 @@ var axios = return toString.call(val) === '[object Array]'; } + /** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ + function isString(val) { + return typeof val === 'string'; + } + + /** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ + function isNumber(val) { + return typeof val === 'number'; + } + /** * Determine if a value is an Object * @@ -409,7 +536,7 @@ var axios = * @returns {boolean} True if value is a Blob, otherwise false */ function isBlob(val) { - return toString.call(val) !== '[object Blob]'; + return toString.call(val) === '[object Blob]'; } /** @@ -493,6 +620,8 @@ var axios = module.exports = { isArray: isArray, + isString: isString, + isNumber: isNumber, isObject: isObject, isDate: isDate, isFile: isFile, @@ -503,30 +632,30 @@ var axios = }; /***/ }, -/* 7 */ +/* 9 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var Promise = __webpack_require__(8).Promise; - var polyfill = __webpack_require__(9).polyfill; + var Promise = __webpack_require__(10).Promise; + var polyfill = __webpack_require__(11).polyfill; exports.Promise = Promise; exports.polyfill = polyfill; /***/ }, -/* 8 */ +/* 10 */ /***/ function(module, exports, __webpack_require__) { "use strict"; - var config = __webpack_require__(10).config; - var configure = __webpack_require__(10).configure; - var objectOrFunction = __webpack_require__(11).objectOrFunction; - var isFunction = __webpack_require__(11).isFunction; - var now = __webpack_require__(11).now; - var all = __webpack_require__(12).all; - var race = __webpack_require__(13).race; - var staticResolve = __webpack_require__(14).resolve; - var staticReject = __webpack_require__(15).reject; - var asap = __webpack_require__(16).asap; + var config = __webpack_require__(12).config; + var configure = __webpack_require__(12).configure; + var objectOrFunction = __webpack_require__(13).objectOrFunction; + var isFunction = __webpack_require__(13).isFunction; + var now = __webpack_require__(13).now; + var all = __webpack_require__(14).all; + var race = __webpack_require__(15).race; + var staticResolve = __webpack_require__(16).resolve; + var staticReject = __webpack_require__(17).reject; + var asap = __webpack_require__(18).asap; var counter = 0; @@ -729,13 +858,13 @@ var axios = exports.Promise = Promise; /***/ }, -/* 9 */ +/* 11 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {"use strict"; /*global self*/ - var RSVPPromise = __webpack_require__(8).Promise; - var isFunction = __webpack_require__(11).isFunction; + var RSVPPromise = __webpack_require__(10).Promise; + var isFunction = __webpack_require__(13).isFunction; function polyfill() { var local; @@ -773,7 +902,7 @@ var axios = /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, -/* 10 */ +/* 12 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -793,7 +922,7 @@ var axios = exports.configure = configure; /***/ }, -/* 11 */ +/* 13 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -820,14 +949,14 @@ var axios = exports.now = now; /***/ }, -/* 12 */ +/* 14 */ /***/ function(module, exports, __webpack_require__) { "use strict"; /* global toString */ - var isArray = __webpack_require__(11).isArray; - var isFunction = __webpack_require__(11).isFunction; + var isArray = __webpack_require__(13).isArray; + var isFunction = __webpack_require__(13).isFunction; /** Returns a promise that is fulfilled when all the given promises have been @@ -918,12 +1047,12 @@ var axios = exports.all = all; /***/ }, -/* 13 */ +/* 15 */ /***/ function(module, exports, __webpack_require__) { "use strict"; /* global toString */ - var isArray = __webpack_require__(11).isArray; + var isArray = __webpack_require__(13).isArray; /** `RSVP.race` allows you to watch a series of promises and act as soon as the @@ -1012,7 +1141,7 @@ var axios = exports.race = race; /***/ }, -/* 14 */ +/* 16 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1032,7 +1161,7 @@ var axios = exports.resolve = resolve; /***/ }, -/* 15 */ +/* 17 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1084,7 +1213,7 @@ var axios = exports.reject = reject; /***/ }, -/* 16 */ +/* 18 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, process) {"use strict"; @@ -1148,10 +1277,10 @@ var axios = } exports.asap = asap; - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(17))) + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(19))) /***/ }, -/* 17 */ +/* 19 */ /***/ function(module, exports, __webpack_require__) { // shim for using process in browser diff --git a/dist/axios.map b/dist/axios.map index fb07aee..2242f76 100644 --- a/dist/axios.map +++ b/dist/axios.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap c8a37d6df2b02f9b9522","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/buildUrl.js","webpack:///./lib/defaults.js","webpack:///./lib/parseHeaders.js","webpack:///./lib/transformData.js","webpack:///./lib/utils.js","webpack:///./~/es6-promise/dist/commonjs/main.js","webpack:///./~/es6-promise/dist/commonjs/promise/promise.js","webpack:///./~/es6-promise/dist/commonjs/promise/polyfill.js","webpack:///./~/es6-promise/dist/commonjs/promise/config.js","webpack:///./~/es6-promise/dist/commonjs/promise/utils.js","webpack:///./~/es6-promise/dist/commonjs/promise/all.js","webpack:///./~/es6-promise/dist/commonjs/promise/race.js","webpack:///./~/es6-promise/dist/commonjs/promise/resolve.js","webpack:///./~/es6-promise/dist/commonjs/promise/reject.js","webpack:///./~/es6-promise/dist/commonjs/promise/asap.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,wC;;;;;;;ACtCA,yC;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH,E;;;;;;AC9IA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;;AAEA;AACA,G;;;;;;AC5CA;;AAEA;;AAEA,6BAA4B,IAAI;AAChC,oBAAmB;AACnB,iCAAgC;AAChC;AACA,qCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,G;;;;;;ACxCA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA,kBAAiB;;AAEjB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA,G;;;;;;ACjCA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,G;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;AC9IA;AACA;AACA;AACA;AACA,6B;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAoB;;AAEpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAiB,wBAAwB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAwD;;AAExD;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAAyB,aAAa;AACtC;;AAEA;AACA;AACA,YAAW;AACX;AACA;AACA,UAAS;AACT,0BAAyB,aAAa;AACtC;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA,IAAG;AACH,oBAAmB,aAAa;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,oCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA,oCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2B;;;;;;AClNA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,aAAa,EAAE;AACpD;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA,6B;;;;;;;ACrCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,+B;;;;;;ACdA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC,6BAA6B;;;AAG/D;AACA;AACA;AACA,mB;;;;;;ACrBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;;AAEA,mB;;;;;;AC5FA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;;AAEA,qB;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA,2B;;;;;;ACdA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,IAAI;AACd,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA,yB;;;;;;AC9CA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA0B,sBAAsB;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,yCAAwC;AACxC;AACA,EAAC;AACD;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qB;;;;;;;AC5DA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA2B;AAC3B;AACA;AACA","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap c8a37d6df2b02f9b9522\n **/","module.exports = require('./lib/axios');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","var Promise = require('es6-promise').Promise;\nvar buildUrl = require('./buildUrl');\nvar defaults = require('./defaults');\nvar parseHeaders = require('./parseHeaders');\nvar transformData = require('./transformData');\nvar utils = require('./utils');\n\nvar axios = module.exports = function axios(options) {\n options = utils.merge({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n }, options);\n\n // Don't allow overriding defaults.withCredentials\n options.withCredentials = options.withCredentials || defaults.withCredentials;\n\n var promise = new Promise(function (resolve, reject) {\n // Create the request\n var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n var data = transformData(\n options.data,\n options.headers,\n options.transformRequest\n );\n\n // Open the request\n request.open(options.method, buildUrl(options.url, options.params), true);\n\n // Listen for ready state\n request.onreadystatechange = function () {\n if (request && request.readyState === 4) {\n // Prepare the response\n var headers = parseHeaders(request.getAllResponseHeaders());\n var response = {\n data: transformData(\n request.responseText,\n headers,\n options.transformResponse\n ),\n status: request.status,\n headers: headers,\n config: options\n };\n\n // Resolve or reject the Promise based on the status\n if (request.status >= 200 && request.status < 300) {\n resolve(response);\n } else {\n reject(response);\n }\n\n // Clean up request\n request = null;\n }\n };\n\n // Merge headers and add to request\n var headers = utils.merge(\n defaults.headers.common,\n defaults.headers[options.method] || {},\n options.headers || {}\n );\n\n utils.forEach(headers, function (val, key) {\n // Remove Content-Type if data is undefined\n if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') {\n delete headers[key];\n }\n // Otherwise add header to the request\n else {\n request.setRequestHeader(key, val);\n }\n });\n\n // Add withCredentials to request if needed\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (options.responseType) {\n try {\n request.responseType = options.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Send the request\n request.send(data);\n });\n\n // Provide alias for success\n promise.success = function success(fn) {\n promise.then(function(response) {\n fn(response);\n });\n return promise;\n };\n\n // Provide alias for error\n promise.error = function error(fn) {\n promise.then(null, function(response) {\n fn(response);\n });\n return promise;\n };\n\n return promise;\n};\n\n// Expose defaults\naxios.defaults = defaults;\n\n// Provide aliases for supported request methods\ncreateShortMethods('delete', 'get', 'head');\ncreateShortMethodsWithData('post', 'put', 'patch');\n\nfunction createShortMethods() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url\n }));\n };\n });\n}\n\nfunction createShortMethodsWithData() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, data, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/axios.js\n ** module id = 1\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+');\n}\n\nmodule.exports = function buildUrl(url, params) {\n if (!params) {\n return url;\n }\n\n var parts = [];\n\n utils.forEach(params, function (val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function (v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n }\n else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n if (parts.length > 0) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n }\n\n return url;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/buildUrl.js\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\nvar JSON_END = /[\\}\\]]\\s*$/;\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar CONTENT_TYPE_APPLICATION_JSON = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nmodule.exports = {\n transformRequest: [function (data) {\n return utils.isObject(data) &&\n !utils.isFile(data) &&\n !utils.isBlob(data) ?\n JSON.stringify(data) : null;\n }],\n\n transformResponse: [function (data) {\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data)) {\n data = JSON.parse(data);\n }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookiName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/defaults.js\n ** module id = 3\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n utils.forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/parseHeaders.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n utils.forEach(fns, function (fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/transformData.js\n ** module id = 5\n ** module chunks = 0\n **/","// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) !== '[object Blob]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array or arguments callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Check if obj is array-like\n var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray) {\n obj = [obj];\n }\n\n // Iterate over array values\n if (isArray) {\n for (var i=0, l=obj.length; i 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 17\n ** module chunks = 0\n **/"],"sourceRoot":"","file":"axios.js"} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap effb80ab910600ba7db0","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/buildUrl.js","webpack:///./lib/cookies.js","webpack:///./lib/defaults.js","webpack:///./lib/parseHeaders.js","webpack:///./lib/transformData.js","webpack:///./lib/urlIsSameOrigin.js","webpack:///./lib/utils.js","webpack:///./~/es6-promise/dist/commonjs/main.js","webpack:///./~/es6-promise/dist/commonjs/promise/promise.js","webpack:///./~/es6-promise/dist/commonjs/promise/polyfill.js","webpack:///./~/es6-promise/dist/commonjs/promise/config.js","webpack:///./~/es6-promise/dist/commonjs/promise/utils.js","webpack:///./~/es6-promise/dist/commonjs/promise/all.js","webpack:///./~/es6-promise/dist/commonjs/promise/race.js","webpack:///./~/es6-promise/dist/commonjs/promise/resolve.js","webpack:///./~/es6-promise/dist/commonjs/promise/reject.js","webpack:///./~/es6-promise/dist/commonjs/promise/asap.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,wC;;;;;;;ACtCA,yC;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA,QAAO;AACP;AACA,IAAG;AACH,E;;;;;;ACxJA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;;AAEA;AACA,G;;;;;;AC5CA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qCAAoC;AACpC,IAAG;;AAEH;AACA,uDAAsD,wBAAwB;AAC9E;AACA,IAAG;;AAEH;AACA;AACA;AACA,G;;;;;;ACpCA;;AAEA;;AAEA,6BAA4B,IAAI;AAChC,oBAAmB;AACnB,iCAAgC;AAChC;AACA,qCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,G;;;;;;ACxCA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA,kBAAiB;;AAEjB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA,G;;;;;;ACjCA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,G;;;;;;AClBA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACjDA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACpKA;AACA;AACA;AACA;AACA,6B;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,qBAAoB;;AAEpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAiB,wBAAwB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAwD;;AAExD;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAAyB,aAAa;AACtC;;AAEA;AACA;AACA,YAAW;AACX;AACA;AACA,UAAS;AACT,0BAAyB,aAAa;AACtC;;AAEA;AACA,UAAS;;AAET;AACA;AACA;AACA,IAAG;AACH,oBAAmB,aAAa;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,oCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA,oCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2B;;;;;;AClNA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,aAAa,EAAE;AACpD;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA,6B;;;;;;;ACrCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,+B;;;;;;ACdA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAkC,6BAA6B;;;AAG/D;AACA;AACA;AACA,mB;;;;;;ACrBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;;AAEA,mB;;;;;;AC5FA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,MAAM;AAChB,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;AACH;;AAEA,qB;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA,2B;;;;;;ACdA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA,WAAU,IAAI;AACd,WAAU,OAAO;AACjB;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA,yB;;;;;;AC9CA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA0B,sBAAsB;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,yCAAwC;AACxC;AACA,EAAC;AACD;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qB;;;;;;;AC5DA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA2B;AAC3B;AACA;AACA","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap effb80ab910600ba7db0\n **/","module.exports = require('./lib/axios');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","var Promise = require('es6-promise').Promise;\nvar buildUrl = require('./buildUrl');\nvar cookies = require('./cookies');\nvar defaults = require('./defaults');\nvar parseHeaders = require('./parseHeaders');\nvar transformData = require('./transformData');\nvar urlIsSameOrigin = require('./urlIsSameOrigin');\nvar utils = require('./utils');\n\nvar axios = module.exports = function axios(options) {\n options = utils.merge({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n }, options);\n\n // Don't allow overriding defaults.withCredentials\n options.withCredentials = options.withCredentials || defaults.withCredentials;\n\n var promise = new Promise(function (resolve, reject) {\n // Create the request\n var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n var data = transformData(\n options.data,\n options.headers,\n options.transformRequest\n );\n\n // Open the request\n request.open(options.method, buildUrl(options.url, options.params), true);\n\n // Listen for ready state\n request.onreadystatechange = function () {\n if (request && request.readyState === 4) {\n // Prepare the response\n var headers = parseHeaders(request.getAllResponseHeaders());\n var response = {\n data: transformData(\n request.responseText,\n headers,\n options.transformResponse\n ),\n status: request.status,\n headers: headers,\n config: options\n };\n\n // Resolve or reject the Promise based on the status\n if (request.status >= 200 && request.status < 300) {\n resolve(response);\n } else {\n reject(response);\n }\n\n // Clean up request\n request = null;\n }\n };\n\n // Merge headers and add to request\n var headers = utils.merge(\n defaults.headers.common,\n defaults.headers[options.method] || {},\n options.headers || {}\n );\n\n // Add xsrf header\n var xsrfValue = urlIsSameOrigin(options.url)\n ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName)\n : undefined;\n if (xsrfValue) {\n headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue;\n }\n\n utils.forEach(headers, function (val, key) {\n // Remove Content-Type if data is undefined\n if (!data && key.toLowerCase() === 'content-type') {\n delete headers[key];\n }\n // Otherwise add header to the request\n else {\n request.setRequestHeader(key, val);\n }\n });\n\n // Add withCredentials to request if needed\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (options.responseType) {\n try {\n request.responseType = options.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Send the request\n request.send(data);\n });\n\n // Provide alias for success\n promise.success = function success(fn) {\n promise.then(function(response) {\n fn(response);\n });\n return promise;\n };\n\n // Provide alias for error\n promise.error = function error(fn) {\n promise.then(null, function(response) {\n fn(response);\n });\n return promise;\n };\n\n return promise;\n};\n\n// Expose defaults\naxios.defaults = defaults;\n\n// Provide aliases for supported request methods\ncreateShortMethods('delete', 'get', 'head');\ncreateShortMethodsWithData('post', 'put', 'patch');\n\nfunction createShortMethods() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url\n }));\n };\n });\n}\n\nfunction createShortMethodsWithData() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, data, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/axios.js\n ** module id = 1\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+');\n}\n\nmodule.exports = function buildUrl(url, params) {\n if (!params) {\n return url;\n }\n\n var parts = [];\n\n utils.forEach(params, function (val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function (v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n }\n else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n if (parts.length > 0) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n }\n\n return url;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/buildUrl.js\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nmodule.exports = {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/cookies.js\n ** module id = 3\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\nvar JSON_END = /[\\}\\]]\\s*$/;\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar CONTENT_TYPE_APPLICATION_JSON = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nmodule.exports = {\n transformRequest: [function (data) {\n return utils.isObject(data) &&\n !utils.isFile(data) &&\n !utils.isBlob(data) ?\n JSON.stringify(data) : null;\n }],\n\n transformResponse: [function (data) {\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data)) {\n data = JSON.parse(data);\n }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/defaults.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n utils.forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/parseHeaders.js\n ** module id = 5\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n utils.forEach(fns, function (fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/transformData.js\n ** module id = 6\n ** module chunks = 0\n **/","'use strict';\n\nvar msie = /(msie|trident)/i.test(navigator.userAgent);\nvar utils = require('./utils');\nvar urlParsingNode = document.createElement('a');\nvar originUrl = urlResolve(window.location.href);\n\n/**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\nfunction urlResolve(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestUrl The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\nmodule.exports = function urlIsSameOrigin(requestUrl) {\n var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/urlIsSameOrigin.js\n ** module id = 7\n ** module chunks = 0\n **/","// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array or arguments callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Check if obj is array-like\n var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray) {\n obj = [obj];\n }\n\n // Iterate over array values\n if (isArray) {\n for (var i=0, l=obj.length; i 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 19\n ** module chunks = 0\n **/"],"sourceRoot":"","file":"axios.js"} \ No newline at end of file diff --git a/dist/axios.min.js b/dist/axios.min.js index 764ac6f..a796481 100644 --- a/dist/axios.min.js +++ b/dist/axios.min.js @@ -1,3 +1,3 @@ /* axios v0.0.0 | (c) 2014 by Matt Zabriskie */ -var axios=function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(1)},function(t,n,e){function r(){f.forEach(arguments,function(t){l[t]=function(n,e){return l(f.merge(e||{},{method:t,url:n}))}})}function o(){f.forEach(arguments,function(t){l[t]=function(n,e,r){return l(f.merge(r||{},{method:t,url:n,data:e}))}})}var i=e(7).Promise,s=e(2),c=e(3),u=e(4),a=e(5),f=e(6),l=t.exports=function(t){t=f.merge({method:"get",transformRequest:c.transformRequest,transformResponse:c.transformResponse},t),t.withCredentials=t.withCredentials||c.withCredentials;var n=new i(function(n,e){var r=new(XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP"),o=a(t.data,t.headers,t.transformRequest);r.open(t.method,s(t.url,t.params),!0),r.onreadystatechange=function(){if(r&&4===r.readyState){var o=u(r.getAllResponseHeaders()),i={data:a(r.responseText,o,t.transformResponse),status:r.status,headers:o,config:t};r.status>=200&&r.status<300?n(i):e(i),r=null}};var i=f.merge(c.headers.common,c.headers[t.method]||{},t.headers||{});if(f.forEach(i,function(t,n){"undefined"==typeof o&&"content-type"===n.toLowerCase()?delete i[n]:r.setRequestHeader(n,t)}),t.withCredentials&&(r.withCredentials=!0),t.responseType)try{r.responseType=t.responseType}catch(l){if("json"!==r.responseType)throw l}r.send(o)});return n.success=function(t){return n.then(function(n){t(n)}),n},n.error=function(t){return n.then(null,function(n){t(n)}),n},n};l.defaults=c,r("delete","get","head"),o("post","put","patch")},function(t,n,e){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}var o=e(6);t.exports=function(t,n){if(!n)return t;var e=[];return o.forEach(n,function(t,n){null!==t&&"undefined"!=typeof t&&(o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),e.push(r(n)+"="+r(t))}))}),e.length>0&&(t+=(-1===t.indexOf("?")?"?":"&")+e.join("&")),t}},function(t,n,e){"use strict";var r=e(6),o=/^\s*(\[|\{[^\{])/,i=/[\}\]]\s*$/,s=/^\)\]\}',?\n/,c={"Content-Type":"application/json;charset=utf-8"};t.exports={transformRequest:[function(t){return!r.isObject(t)||r.isFile(t)||r.isBlob(t)?null:JSON.stringify(t)}],transformResponse:[function(t){return"string"==typeof t&&(t=t.replace(s,""),o.test(t)&&i.test(t)&&(t=JSON.parse(t))),t}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:r.merge(c),post:r.merge(c),put:r.merge(c)},xsrfCookiName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"}},function(t,n,e){"use strict";var r=e(6);t.exports=function(t){var n,e,o,i={};return t?(r.forEach(t.split("\n"),function(t){o=t.indexOf(":"),n=r.trim(t.substr(0,o)).toLowerCase(),e=r.trim(t.substr(o+1)),n&&(i[n]=i[n]?i[n]+", "+e:e)}),i):i}},function(t,n,e){"use strict";var r=e(6);t.exports=function(t,n,e){return r.forEach(e,function(e){t=e(t,n)}),t}},function(t){function n(t){return"[object Array]"===a.call(t)}function e(t){return null!==t&&"object"==typeof t}function r(t){return"[object Date]"===a.call(t)}function o(t){return"[object File]"===a.call(t)}function i(t){return"[object Blob]"!==a.call(t)}function s(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function c(t,n){if(null!==t&&"undefined"!=typeof t){var e=t.constructor===Array||"function"==typeof t.callee;if("object"==typeof t||e||(t=[t]),e)for(var r=0,o=t.length;o>r;r++)n.call(null,t[r],r,t);else for(var i in t)t.hasOwnProperty(i)&&n.call(null,t[i],i,t)}}function u(){var t={};return c(arguments,function(n){c(n,function(n,e){t[e]=n})}),t}var a=Object.prototype.toString;t.exports={isArray:n,isObject:e,isDate:r,isFile:o,isBlob:i,forEach:c,merge:u,trim:s}},function(t,n,e){"use strict";var r=e(8).Promise,o=e(9).polyfill;n.Promise=r,n.polyfill=o},function(t,n,e){"use strict";function r(t){if(!m(t))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof r))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],o(t,this)}function o(t,n){function e(t){a(n,t)}function r(t){l(n,t)}try{t(e,r)}catch(o){r(o)}}function i(t,n,e,r){var o,i,s,c,f=m(e);if(f)try{o=e(r),s=!0}catch(p){c=!0,i=p}else o=r,s=!0;u(n,o)||(f&&s?a(n,o):c?l(n,i):t===_?a(n,o):t===E&&l(n,o))}function s(t,n,e,r){var o=t._subscribers,i=o.length;o[i]=n,o[i+_]=e,o[i+E]=r}function c(t,n){for(var e,r,o=t._subscribers,s=t._detail,c=0;c0)){var r=e.shift();r()}},!0),function(t){e.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=n,e.addListener=n,e.once=n,e.off=n,e.removeListener=n,e.removeAllListeners=n,e.emit=n,e.binding=function(){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(){throw new Error("process.chdir is not supported")}}]); +var axios=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){function r(){p.forEach(arguments,function(t){h[t]=function(e,n){return h(p.merge(n||{},{method:t,url:e}))}})}function o(){p.forEach(arguments,function(t){h[t]=function(e,n,r){return h(p.merge(r||{},{method:t,url:e,data:n}))}})}var i=n(9).Promise,s=n(2),c=n(3),u=n(4),a=n(5),f=n(6),l=n(7),p=n(8),h=t.exports=function(t){t=p.merge({method:"get",transformRequest:u.transformRequest,transformResponse:u.transformResponse},t),t.withCredentials=t.withCredentials||u.withCredentials;var e=new i(function(e,n){var r=new(XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP"),o=f(t.data,t.headers,t.transformRequest);r.open(t.method,s(t.url,t.params),!0),r.onreadystatechange=function(){if(r&&4===r.readyState){var o=a(r.getAllResponseHeaders()),i={data:f(r.responseText,o,t.transformResponse),status:r.status,headers:o,config:t};r.status>=200&&r.status<300?e(i):n(i),r=null}};var i=p.merge(u.headers.common,u.headers[t.method]||{},t.headers||{}),h=l(t.url)?c.read(t.xsrfCookieName||u.xsrfCookieName):void 0;if(h&&(i[t.xsrfHeaderName||u.xsrfHeaderName]=h),p.forEach(i,function(t,e){o||"content-type"!==e.toLowerCase()?r.setRequestHeader(e,t):delete i[e]}),t.withCredentials&&(r.withCredentials=!0),t.responseType)try{r.responseType=t.responseType}catch(d){if("json"!==r.responseType)throw d}r.send(o)});return e.success=function(t){return e.then(function(e){t(e)}),e},e.error=function(t){return e.then(null,function(e){t(e)}),e},e};h.defaults=u,r("delete","get","head"),o("post","put","patch")},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}var o=n(8);t.exports=function(t,e){if(!e)return t;var n=[];return o.forEach(e,function(t,e){null!==t&&"undefined"!=typeof t&&(o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),n.push(r(e)+"="+r(t))}))}),n.length>0&&(t+=(-1===t.indexOf("?")?"?":"&")+n.join("&")),t}},function(t,e,n){"use strict";var r=n(8);t.exports={write:function(t,e,n,o,i,s){var c=[];c.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&c.push("expires="+new Date(exires).toGMTString()),r.isString(o)&&c.push("path="+o),r.isString(i)&&c.push("domain="+i),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}},function(t,e,n){"use strict";var r=n(8),o=/^\s*(\[|\{[^\{])/,i=/[\}\]]\s*$/,s=/^\)\]\}',?\n/,c={"Content-Type":"application/json;charset=utf-8"};t.exports={transformRequest:[function(t){return!r.isObject(t)||r.isFile(t)||r.isBlob(t)?null:JSON.stringify(t)}],transformResponse:[function(t){return"string"==typeof t&&(t=t.replace(s,""),o.test(t)&&i.test(t)&&(t=JSON.parse(t))),t}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:r.merge(c),post:r.merge(c),put:r.merge(c)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t){var e,n,o,i={};return t?(r.forEach(t.split("\n"),function(t){o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e&&(i[e]=i[e]?i[e]+", "+n:n)}),i):i}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";function r(t){var e=t;return o&&(s.setAttribute("href",e),e=s.href),s.setAttribute("href",e),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:"/"===s.pathname.charAt(0)?s.pathname:"/"+s.pathname}}var o=/trident/i.test(navigator.userAgent),i=n(8),s=document.createElement("a"),c=r(window.location.href);t.exports=function(t){var e=i.isString(t)?r(t):t;return e.protocol===c.protocol&&e.host===c.host}},function(t){function e(t){return"[object Array]"===l.call(t)}function n(t){return"string"==typeof t}function r(t){return"number"==typeof t}function o(t){return null!==t&&"object"==typeof t}function i(t){return"[object Date]"===l.call(t)}function s(t){return"[object File]"===l.call(t)}function c(t){return"[object Blob]"===l.call(t)}function u(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function a(t,e){if(null!==t&&"undefined"!=typeof t){var n=t.constructor===Array||"function"==typeof t.callee;if("object"==typeof t||n||(t=[t]),n)for(var r=0,o=t.length;o>r;r++)e.call(null,t[r],r,t);else for(var i in t)t.hasOwnProperty(i)&&e.call(null,t[i],i,t)}}function f(){var t={};return a(arguments,function(e){a(e,function(e,n){t[n]=e})}),t}var l=Object.prototype.toString;t.exports={isArray:e,isString:n,isNumber:r,isObject:o,isDate:i,isFile:s,isBlob:c,forEach:a,merge:f,trim:u}},function(t,e,n){"use strict";var r=n(10).Promise,o=n(11).polyfill;e.Promise=r,e.polyfill=o},function(t,e,n){"use strict";function r(t){if(!v(t))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof r))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],o(t,this)}function o(t,e){function n(t){a(e,t)}function r(t){l(e,t)}try{t(n,r)}catch(o){r(o)}}function i(t,e,n,r){var o,i,s,c,f=v(n);if(f)try{o=n(r),s=!0}catch(p){c=!0,i=p}else o=r,s=!0;u(e,o)||(f&&s?a(e,o):c?l(e,i):t===E?a(e,o):t===_&&l(e,o))}function s(t,e,n,r){var o=t._subscribers,i=o.length;o[i]=e,o[i+E]=n,o[i+_]=r}function c(t,e){for(var n,r,o=t._subscribers,s=t._detail,c=0;c0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=e,n.addListener=e,n.once=e,n.off=e,n.removeListener=e,n.removeAllListeners=e,n.emit=e,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}}]); //# sourceMappingURL=axios.min.map \ No newline at end of file diff --git a/dist/axios.min.map b/dist/axios.min.map index f7a11b1..da8ae3a 100644 --- a/dist/axios.min.map +++ b/dist/axios.min.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///axios.min.js","webpack:///webpack/bootstrap 11e2e11ac66fc8f1d97f","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/buildUrl.js","webpack:///./lib/defaults.js","webpack:///./lib/parseHeaders.js","webpack:///./lib/transformData.js","webpack:///./lib/utils.js","webpack:///./~/es6-promise/dist/commonjs/main.js","webpack:///./~/es6-promise/dist/commonjs/promise/promise.js","webpack:///./~/es6-promise/dist/commonjs/promise/polyfill.js","webpack:///./~/es6-promise/dist/commonjs/promise/config.js","webpack:///./~/es6-promise/dist/commonjs/promise/utils.js","webpack:///./~/es6-promise/dist/commonjs/promise/all.js","webpack:///./~/es6-promise/dist/commonjs/promise/race.js","webpack:///./~/es6-promise/dist/commonjs/promise/resolve.js","webpack:///./~/es6-promise/dist/commonjs/promise/reject.js","webpack:///./~/es6-promise/dist/commonjs/promise/asap.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js"],"names":["axios","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","createShortMethods","utils","forEach","arguments","method","url","options","merge","createShortMethodsWithData","data","Promise","buildUrl","defaults","parseHeaders","transformData","transformRequest","transformResponse","withCredentials","promise","resolve","reject","request","XMLHttpRequest","ActiveXObject","headers","open","params","onreadystatechange","readyState","getAllResponseHeaders","response","responseText","status","config","common","val","key","toLowerCase","setRequestHeader","responseType","e","send","success","fn","then","error","encode","encodeURIComponent","replace","parts","isArray","v","isDate","toISOString","isObject","JSON","stringify","push","length","indexOf","join","JSON_START","JSON_END","PROTECTION_PREFIX","CONTENT_TYPE_APPLICATION_JSON","Content-Type","isFile","isBlob","test","parse","Accept","patch","post","put","xsrfCookiName","xsrfHeaderName","i","parsed","split","line","trim","substr","fns","toString","str","obj","constructor","Array","callee","l","hasOwnProperty","result","Object","prototype","polyfill","resolver","isFunction","TypeError","this","_subscribers","invokeResolver","resolvePromise","value","rejectPromise","reason","invokeCallback","settled","callback","detail","succeeded","failed","hasCallback","handleThenable","FULFILLED","REJECTED","subscribe","parent","child","onFulfillment","onRejection","subscribers","publish","_detail","resolved","objectOrFunction","fulfill","_state","PENDING","SEALED","async","publishFulfillment","publishRejection","configure","all","now","race","staticResolve","staticReject","asap","undefined","thenPromise","callbacks","catch","global","local","window","document","self","es6PromiseSupport","r","RSVPPromise","name","instrument","x","Date","getTime","promises","index","resolveAll","results","remaining","process","useNextTick","nextTick","flush","useMutationObserver","iterations","observer","BrowserMutationObserver","node","createTextNode","observe","characterData","useSetTimeout","setTimeout","queue","tuple","arg","scheduleFlush","browserGlobal","MutationObserver","WebKitMutationObserver","noop","canSetImmediate","setImmediate","canPost","postMessage","addEventListener","f","ev","source","stopPropagation","shift","title","browser","env","argv","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","Error","cwd","chdir"],"mappings":"AAAA,GAAIA,OACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDOM,SAASI,EAAQD,EAASH,GE7ChCI,EAAAD,QAAAH,EAAA,IFmDM,SAASI,EAAQD,EAASH,GGsEhC,QAAAW,KACAC,EAAAC,QAAAC,UAAA,SAAAC,GACAjB,EAAAiB,GAAA,SAAAC,EAAAC,GACA,MAAAnB,GAAAc,EAAAM,MAAAD,OACAF,SACAC,YAMA,QAAAG,KACAP,EAAAC,QAAAC,UAAA,SAAAC,GACAjB,EAAAiB,GAAA,SAAAC,EAAAI,EAAAH,GACA,MAAAnB,GAAAc,EAAAM,MAAAD,OACAF,SACAC,MACAI,aA1IA,GAAAC,GAAArB,EAAA,GAAAqB,QACAC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qBAIA,gBAAA/I,GACAmI,WAAAnI,EAAA,OAIAsH,EAAAgC,MAAA,UACAhC,EAAAiC,SAAA,EACAjC,EAAAkC,OACAlC,EAAAmC,QAIAnC,EAAAoC,GAAAf,EACArB,EAAAqC,YAAAhB,EACArB,EAAAsC,KAAAjB,EACArB,EAAAuC,IAAAlB,EACArB,EAAAwC,eAAAnB,EACArB,EAAAyC,mBAAApB,EACArB,EAAA0C,KAAArB,EAEArB,EAAA2C,QAAA,WACA,SAAAC,OAAA,qCAIA5C,EAAA6C,IAAA,WAA2B,WAC3B7C,EAAA8C,MAAA,WACA,SAAAF,OAAA","file":"axios.min.js","sourcesContent":["var axios =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Promise = __webpack_require__(7).Promise;\n\tvar buildUrl = __webpack_require__(2);\n\tvar defaults = __webpack_require__(3);\n\tvar parseHeaders = __webpack_require__(4);\n\tvar transformData = __webpack_require__(5);\n\tvar utils = __webpack_require__(6);\n\t\n\tvar axios = module.exports = function axios(options) {\n\t options = utils.merge({\n\t method: 'get',\n\t transformRequest: defaults.transformRequest,\n\t transformResponse: defaults.transformResponse\n\t }, options);\n\t\n\t // Don't allow overriding defaults.withCredentials\n\t options.withCredentials = options.withCredentials || defaults.withCredentials;\n\t\n\t var promise = new Promise(function (resolve, reject) {\n\t // Create the request\n\t var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n\t var data = transformData(\n\t options.data,\n\t options.headers,\n\t options.transformRequest\n\t );\n\t\n\t // Open the request\n\t request.open(options.method, buildUrl(options.url, options.params), true);\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function () {\n\t if (request && request.readyState === 4) {\n\t // Prepare the response\n\t var headers = parseHeaders(request.getAllResponseHeaders());\n\t var response = {\n\t data: transformData(\n\t request.responseText,\n\t headers,\n\t options.transformResponse\n\t ),\n\t status: request.status,\n\t headers: headers,\n\t config: options\n\t };\n\t\n\t // Resolve or reject the Promise based on the status\n\t if (request.status >= 200 && request.status < 300) {\n\t resolve(response);\n\t } else {\n\t reject(response);\n\t }\n\t\n\t // Clean up request\n\t request = null;\n\t }\n\t };\n\t\n\t // Merge headers and add to request\n\t var headers = utils.merge(\n\t defaults.headers.common,\n\t defaults.headers[options.method] || {},\n\t options.headers || {}\n\t );\n\t\n\t utils.forEach(headers, function (val, key) {\n\t // Remove Content-Type if data is undefined\n\t if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') {\n\t delete headers[key];\n\t }\n\t // Otherwise add header to the request\n\t else {\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t\n\t // Add withCredentials to request if needed\n\t if (options.withCredentials) {\n\t request.withCredentials = true;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (options.responseType) {\n\t try {\n\t request.responseType = options.responseType;\n\t } catch (e) {\n\t if (request.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Send the request\n\t request.send(data);\n\t });\n\t\n\t // Provide alias for success\n\t promise.success = function success(fn) {\n\t promise.then(function(response) {\n\t fn(response);\n\t });\n\t return promise;\n\t };\n\t\n\t // Provide alias for error\n\t promise.error = function error(fn) {\n\t promise.then(null, function(response) {\n\t fn(response);\n\t });\n\t return promise;\n\t };\n\t\n\t return promise;\n\t};\n\t\n\t// Expose defaults\n\taxios.defaults = defaults;\n\t\n\t// Provide aliases for supported request methods\n\tcreateShortMethods('delete', 'get', 'head');\n\tcreateShortMethodsWithData('post', 'put', 'patch');\n\t\n\tfunction createShortMethods() {\n\t utils.forEach(arguments, function (method) {\n\t axios[method] = function (url, options) {\n\t return axios(utils.merge(options || {}, {\n\t method: method,\n\t url: url\n\t }));\n\t };\n\t });\n\t}\n\t\n\tfunction createShortMethodsWithData() {\n\t utils.forEach(arguments, function (method) {\n\t axios[method] = function (url, data, options) {\n\t return axios(utils.merge(options || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t });\n\t}\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(6);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%40/gi, '@').\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+');\n\t}\n\t\n\tmodule.exports = function buildUrl(url, params) {\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var parts = [];\n\t\n\t utils.forEach(params, function (val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t if (!utils.isArray(val)) {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function (v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t }\n\t else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t if (parts.length > 0) {\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n\t }\n\t\n\t return url;\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(6);\n\t\n\tvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\n\tvar JSON_END = /[\\}\\]]\\s*$/;\n\tvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\n\tvar CONTENT_TYPE_APPLICATION_JSON = {\n\t 'Content-Type': 'application/json;charset=utf-8'\n\t};\n\t\n\tmodule.exports = {\n\t transformRequest: [function (data) {\n\t return utils.isObject(data) &&\n\t !utils.isFile(data) &&\n\t !utils.isBlob(data) ?\n\t JSON.stringify(data) : null;\n\t }],\n\t\n\t transformResponse: [function (data) {\n\t if (typeof data === 'string') {\n\t data = data.replace(PROTECTION_PREFIX, '');\n\t if (JSON_START.test(data) && JSON_END.test(data)) {\n\t data = JSON.parse(data);\n\t }\n\t }\n\t return data;\n\t }],\n\t\n\t headers: {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t },\n\t patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n\t post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n\t put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n\t },\n\t\n\t xsrfCookiName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN'\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(6);\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {}, key, val, i;\n\t\n\t if (!headers) return parsed;\n\t\n\t utils.forEach(headers.split('\\n'), function(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(6);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t utils.forEach(fns, function (fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) !== '[object Blob]';\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array or arguments callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Check if obj is array-like\n\t var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object' && !isArray) {\n\t obj = [obj];\n\t }\n\t\n\t // Iterate over array values\n\t if (isArray) {\n\t for (var i=0, l=obj.length; i 0) {\n\t var fn = queue.shift();\n\t fn();\n\t }\n\t }\n\t }, true);\n\t\n\t return function nextTick(fn) {\n\t queue.push(fn);\n\t window.postMessage('process-tick', '*');\n\t };\n\t }\n\t\n\t return function nextTick(fn) {\n\t setTimeout(fn, 0);\n\t };\n\t})();\n\t\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t}\n\t\n\t// TODO(shtylman)\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\n\n/***/ }\n/******/ ])\n\n\n/** WEBPACK FOOTER **\n ** axios.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 11e2e11ac66fc8f1d97f\n **/","module.exports = require('./lib/axios');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","var Promise = require('es6-promise').Promise;\nvar buildUrl = require('./buildUrl');\nvar defaults = require('./defaults');\nvar parseHeaders = require('./parseHeaders');\nvar transformData = require('./transformData');\nvar utils = require('./utils');\n\nvar axios = module.exports = function axios(options) {\n options = utils.merge({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n }, options);\n\n // Don't allow overriding defaults.withCredentials\n options.withCredentials = options.withCredentials || defaults.withCredentials;\n\n var promise = new Promise(function (resolve, reject) {\n // Create the request\n var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n var data = transformData(\n options.data,\n options.headers,\n options.transformRequest\n );\n\n // Open the request\n request.open(options.method, buildUrl(options.url, options.params), true);\n\n // Listen for ready state\n request.onreadystatechange = function () {\n if (request && request.readyState === 4) {\n // Prepare the response\n var headers = parseHeaders(request.getAllResponseHeaders());\n var response = {\n data: transformData(\n request.responseText,\n headers,\n options.transformResponse\n ),\n status: request.status,\n headers: headers,\n config: options\n };\n\n // Resolve or reject the Promise based on the status\n if (request.status >= 200 && request.status < 300) {\n resolve(response);\n } else {\n reject(response);\n }\n\n // Clean up request\n request = null;\n }\n };\n\n // Merge headers and add to request\n var headers = utils.merge(\n defaults.headers.common,\n defaults.headers[options.method] || {},\n options.headers || {}\n );\n\n utils.forEach(headers, function (val, key) {\n // Remove Content-Type if data is undefined\n if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') {\n delete headers[key];\n }\n // Otherwise add header to the request\n else {\n request.setRequestHeader(key, val);\n }\n });\n\n // Add withCredentials to request if needed\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (options.responseType) {\n try {\n request.responseType = options.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Send the request\n request.send(data);\n });\n\n // Provide alias for success\n promise.success = function success(fn) {\n promise.then(function(response) {\n fn(response);\n });\n return promise;\n };\n\n // Provide alias for error\n promise.error = function error(fn) {\n promise.then(null, function(response) {\n fn(response);\n });\n return promise;\n };\n\n return promise;\n};\n\n// Expose defaults\naxios.defaults = defaults;\n\n// Provide aliases for supported request methods\ncreateShortMethods('delete', 'get', 'head');\ncreateShortMethodsWithData('post', 'put', 'patch');\n\nfunction createShortMethods() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url\n }));\n };\n });\n}\n\nfunction createShortMethodsWithData() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, data, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/axios.js\n ** module id = 1\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+');\n}\n\nmodule.exports = function buildUrl(url, params) {\n if (!params) {\n return url;\n }\n\n var parts = [];\n\n utils.forEach(params, function (val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function (v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n }\n else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n if (parts.length > 0) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n }\n\n return url;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/buildUrl.js\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\nvar JSON_END = /[\\}\\]]\\s*$/;\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar CONTENT_TYPE_APPLICATION_JSON = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nmodule.exports = {\n transformRequest: [function (data) {\n return utils.isObject(data) &&\n !utils.isFile(data) &&\n !utils.isBlob(data) ?\n JSON.stringify(data) : null;\n }],\n\n transformResponse: [function (data) {\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data)) {\n data = JSON.parse(data);\n }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookiName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/defaults.js\n ** module id = 3\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n utils.forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/parseHeaders.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n utils.forEach(fns, function (fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/transformData.js\n ** module id = 5\n ** module chunks = 0\n **/","// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) !== '[object Blob]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array or arguments callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Check if obj is array-like\n var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray) {\n obj = [obj];\n }\n\n // Iterate over array values\n if (isArray) {\n for (var i=0, l=obj.length; i 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 17\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///axios.min.js","webpack:///webpack/bootstrap b72c8518bbfa05488900","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/buildUrl.js","webpack:///./lib/cookies.js","webpack:///./lib/defaults.js","webpack:///./lib/parseHeaders.js","webpack:///./lib/transformData.js","webpack:///./lib/urlIsSameOrigin.js","webpack:///./lib/utils.js","webpack:///./~/es6-promise/dist/commonjs/main.js","webpack:///./~/es6-promise/dist/commonjs/promise/promise.js","webpack:///./~/es6-promise/dist/commonjs/promise/polyfill.js","webpack:///./~/es6-promise/dist/commonjs/promise/config.js","webpack:///./~/es6-promise/dist/commonjs/promise/utils.js","webpack:///./~/es6-promise/dist/commonjs/promise/all.js","webpack:///./~/es6-promise/dist/commonjs/promise/race.js","webpack:///./~/es6-promise/dist/commonjs/promise/resolve.js","webpack:///./~/es6-promise/dist/commonjs/promise/reject.js","webpack:///./~/es6-promise/dist/commonjs/promise/asap.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js"],"names":["axios","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","createShortMethods","utils","forEach","arguments","method","url","options","merge","createShortMethodsWithData","data","Promise","buildUrl","cookies","defaults","parseHeaders","transformData","urlIsSameOrigin","transformRequest","transformResponse","withCredentials","promise","resolve","reject","request","XMLHttpRequest","ActiveXObject","headers","open","params","onreadystatechange","readyState","getAllResponseHeaders","response","responseText","status","config","common","xsrfValue","read","xsrfCookieName","undefined","xsrfHeaderName","val","key","toLowerCase","setRequestHeader","responseType","e","send","success","fn","then","error","encode","encodeURIComponent","replace","parts","isArray","v","isDate","toISOString","isObject","JSON","stringify","push","length","indexOf","join","write","name","value","expires","path","domain","secure","cookie","isNumber","Date","exires","toGMTString","isString","document","match","RegExp","decodeURIComponent","remove","this","now","JSON_START","JSON_END","PROTECTION_PREFIX","CONTENT_TYPE_APPLICATION_JSON","Content-Type","isFile","isBlob","test","parse","Accept","patch","post","put","i","parsed","split","line","trim","substr","fns","urlResolve","href","msie","urlParsingNode","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","navigator","userAgent","createElement","originUrl","window","location","requestUrl","toString","str","obj","constructor","Array","callee","l","hasOwnProperty","result","Object","prototype","polyfill","resolver","isFunction","TypeError","_subscribers","invokeResolver","resolvePromise","rejectPromise","reason","invokeCallback","settled","callback","detail","succeeded","failed","hasCallback","handleThenable","FULFILLED","REJECTED","subscribe","parent","child","onFulfillment","onRejection","subscribers","publish","_detail","resolved","objectOrFunction","fulfill","_state","PENDING","SEALED","async","publishFulfillment","publishRejection","configure","all","race","staticResolve","staticReject","asap","thenPromise","callbacks","catch","global","local","self","es6PromiseSupport","r","RSVPPromise","instrument","x","getTime","promises","index","resolveAll","results","remaining","process","useNextTick","nextTick","flush","useMutationObserver","iterations","observer","BrowserMutationObserver","node","createTextNode","observe","characterData","useSetTimeout","setTimeout","queue","tuple","arg","scheduleFlush","browserGlobal","MutationObserver","WebKitMutationObserver","noop","canSetImmediate","setImmediate","canPost","postMessage","addEventListener","f","ev","source","stopPropagation","shift","title","browser","env","argv","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","Error","cwd","chdir"],"mappings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,OAAAkG,YAAA,qBAIA,gBAAA7K,GACAiK,WAAAjK,EAAA,OAIAoJ,EAAAgC,MAAA,UACAhC,EAAAiC,SAAA,EACAjC,EAAAkC,OACAlC,EAAAmC,QAIAnC,EAAAoC,GAAAf,EACArB,EAAAqC,YAAAhB,EACArB,EAAAsC,KAAAjB,EACArB,EAAAuC,IAAAlB,EACArB,EAAAwC,eAAAnB,EACArB,EAAAyC,mBAAApB,EACArB,EAAA0C,KAAArB,EAEArB,EAAA2C,QAAA,WACA,SAAAC,OAAA,qCAIA5C,EAAA6C,IAAA,WAA2B,WAC3B7C,EAAA8C,MAAA,WACA,SAAAF,OAAA","file":"axios.min.js","sourcesContent":["var axios =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Promise = __webpack_require__(9).Promise;\n\tvar buildUrl = __webpack_require__(2);\n\tvar cookies = __webpack_require__(3);\n\tvar defaults = __webpack_require__(4);\n\tvar parseHeaders = __webpack_require__(5);\n\tvar transformData = __webpack_require__(6);\n\tvar urlIsSameOrigin = __webpack_require__(7);\n\tvar utils = __webpack_require__(8);\n\t\n\tvar axios = module.exports = function axios(options) {\n\t options = utils.merge({\n\t method: 'get',\n\t transformRequest: defaults.transformRequest,\n\t transformResponse: defaults.transformResponse\n\t }, options);\n\t\n\t // Don't allow overriding defaults.withCredentials\n\t options.withCredentials = options.withCredentials || defaults.withCredentials;\n\t\n\t var promise = new Promise(function (resolve, reject) {\n\t // Create the request\n\t var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n\t var data = transformData(\n\t options.data,\n\t options.headers,\n\t options.transformRequest\n\t );\n\t\n\t // Open the request\n\t request.open(options.method, buildUrl(options.url, options.params), true);\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function () {\n\t if (request && request.readyState === 4) {\n\t // Prepare the response\n\t var headers = parseHeaders(request.getAllResponseHeaders());\n\t var response = {\n\t data: transformData(\n\t request.responseText,\n\t headers,\n\t options.transformResponse\n\t ),\n\t status: request.status,\n\t headers: headers,\n\t config: options\n\t };\n\t\n\t // Resolve or reject the Promise based on the status\n\t if (request.status >= 200 && request.status < 300) {\n\t resolve(response);\n\t } else {\n\t reject(response);\n\t }\n\t\n\t // Clean up request\n\t request = null;\n\t }\n\t };\n\t\n\t // Merge headers and add to request\n\t var headers = utils.merge(\n\t defaults.headers.common,\n\t defaults.headers[options.method] || {},\n\t options.headers || {}\n\t );\n\t\n\t // Add xsrf header\n\t var xsrfValue = urlIsSameOrigin(options.url)\n\t ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName)\n\t : undefined;\n\t if (xsrfValue) {\n\t headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue;\n\t }\n\t\n\t utils.forEach(headers, function (val, key) {\n\t // Remove Content-Type if data is undefined\n\t if (!data && key.toLowerCase() === 'content-type') {\n\t delete headers[key];\n\t }\n\t // Otherwise add header to the request\n\t else {\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t\n\t // Add withCredentials to request if needed\n\t if (options.withCredentials) {\n\t request.withCredentials = true;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (options.responseType) {\n\t try {\n\t request.responseType = options.responseType;\n\t } catch (e) {\n\t if (request.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Send the request\n\t request.send(data);\n\t });\n\t\n\t // Provide alias for success\n\t promise.success = function success(fn) {\n\t promise.then(function(response) {\n\t fn(response);\n\t });\n\t return promise;\n\t };\n\t\n\t // Provide alias for error\n\t promise.error = function error(fn) {\n\t promise.then(null, function(response) {\n\t fn(response);\n\t });\n\t return promise;\n\t };\n\t\n\t return promise;\n\t};\n\t\n\t// Expose defaults\n\taxios.defaults = defaults;\n\t\n\t// Provide aliases for supported request methods\n\tcreateShortMethods('delete', 'get', 'head');\n\tcreateShortMethodsWithData('post', 'put', 'patch');\n\t\n\tfunction createShortMethods() {\n\t utils.forEach(arguments, function (method) {\n\t axios[method] = function (url, options) {\n\t return axios(utils.merge(options || {}, {\n\t method: method,\n\t url: url\n\t }));\n\t };\n\t });\n\t}\n\t\n\tfunction createShortMethodsWithData() {\n\t utils.forEach(arguments, function (method) {\n\t axios[method] = function (url, data, options) {\n\t return axios(utils.merge(options || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t });\n\t}\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%40/gi, '@').\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+');\n\t}\n\t\n\tmodule.exports = function buildUrl(url, params) {\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var parts = [];\n\t\n\t utils.forEach(params, function (val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t if (!utils.isArray(val)) {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function (v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t }\n\t else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t if (parts.length > 0) {\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n\t }\n\t\n\t return url;\n\t};\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tmodule.exports = {\n\t write: function (name, value, expires, path, domain, secure) {\n\t var cookie = [];\n\t cookie.push(name + '=' + encodeURIComponent(value));\n\t\n\t if (utils.isNumber(expires)) {\n\t cookie.push('expires=' + new Date(exires).toGMTString());\n\t }\n\t\n\t if (utils.isString(path)) {\n\t cookie.push('path=' + path);\n\t }\n\t\n\t if (utils.isString(domain)) {\n\t cookie.push('domain=' + domain);\n\t }\n\t\n\t if (secure === true) {\n\t cookie.push('secure');\n\t }\n\t\n\t document.cookie = cookie.join('; ');\n\t },\n\t\n\t read: function (name) {\n\t var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t return (match ? decodeURIComponent(match[3]) : null);\n\t },\n\t\n\t remove: function (name) {\n\t this.write(name, '', Date.now() - 86400000);\n\t }\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\tvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\n\tvar JSON_END = /[\\}\\]]\\s*$/;\n\tvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\n\tvar CONTENT_TYPE_APPLICATION_JSON = {\n\t 'Content-Type': 'application/json;charset=utf-8'\n\t};\n\t\n\tmodule.exports = {\n\t transformRequest: [function (data) {\n\t return utils.isObject(data) &&\n\t !utils.isFile(data) &&\n\t !utils.isBlob(data) ?\n\t JSON.stringify(data) : null;\n\t }],\n\t\n\t transformResponse: [function (data) {\n\t if (typeof data === 'string') {\n\t data = data.replace(PROTECTION_PREFIX, '');\n\t if (JSON_START.test(data) && JSON_END.test(data)) {\n\t data = JSON.parse(data);\n\t }\n\t }\n\t return data;\n\t }],\n\t\n\t headers: {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t },\n\t patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n\t post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n\t put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n\t },\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN'\n\t};\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {}, key, val, i;\n\t\n\t if (!headers) return parsed;\n\t\n\t utils.forEach(headers.split('\\n'), function(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(8);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t utils.forEach(fns, function (fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar msie = /trident/i.test(navigator.userAgent);\n\tvar utils = __webpack_require__(8);\n\tvar urlParsingNode = document.createElement('a');\n\tvar originUrl = urlResolve(window.location.href);\n\t\n\t/**\n\t * Parse a URL to discover it's components\n\t *\n\t * @param {String} url The URL to be parsed\n\t * @returns {Object}\n\t */\n\tfunction urlResolve(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // IE needs attribute set twice to normalize properties\n\t urlParsingNode.setAttribute('href', href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/')\n\t ? urlParsingNode.pathname\n\t : '/' + urlParsingNode.pathname\n\t };\n\t}\n\t\n\t/**\n\t * Determine if a URL shares the same origin as the current location\n\t *\n\t * @param {String} requestUrl The URL to test\n\t * @returns {boolean} True if URL shares the same origin, otherwise false\n\t */\n\tmodule.exports = function urlIsSameOrigin(requestUrl) {\n\t var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n\t return (parsed.protocol === originUrl.protocol &&\n\t parsed.host === originUrl.host);\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t return typeof val === 'string';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t return typeof val === 'number';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) === '[object Blob]';\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array or arguments callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Check if obj is array-like\n\t var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object' && !isArray) {\n\t obj = [obj];\n\t }\n\t\n\t // Iterate over array values\n\t if (isArray) {\n\t for (var i=0, l=obj.length; i 0) {\n\t var fn = queue.shift();\n\t fn();\n\t }\n\t }\n\t }, true);\n\t\n\t return function nextTick(fn) {\n\t queue.push(fn);\n\t window.postMessage('process-tick', '*');\n\t };\n\t }\n\t\n\t return function nextTick(fn) {\n\t setTimeout(fn, 0);\n\t };\n\t})();\n\t\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t}\n\t\n\t// TODO(shtylman)\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\n\n/***/ }\n/******/ ])\n\n\n/** WEBPACK FOOTER **\n ** axios.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap b72c8518bbfa05488900\n **/","module.exports = require('./lib/axios');\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","var Promise = require('es6-promise').Promise;\nvar buildUrl = require('./buildUrl');\nvar cookies = require('./cookies');\nvar defaults = require('./defaults');\nvar parseHeaders = require('./parseHeaders');\nvar transformData = require('./transformData');\nvar urlIsSameOrigin = require('./urlIsSameOrigin');\nvar utils = require('./utils');\n\nvar axios = module.exports = function axios(options) {\n options = utils.merge({\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n }, options);\n\n // Don't allow overriding defaults.withCredentials\n options.withCredentials = options.withCredentials || defaults.withCredentials;\n\n var promise = new Promise(function (resolve, reject) {\n // Create the request\n var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP');\n var data = transformData(\n options.data,\n options.headers,\n options.transformRequest\n );\n\n // Open the request\n request.open(options.method, buildUrl(options.url, options.params), true);\n\n // Listen for ready state\n request.onreadystatechange = function () {\n if (request && request.readyState === 4) {\n // Prepare the response\n var headers = parseHeaders(request.getAllResponseHeaders());\n var response = {\n data: transformData(\n request.responseText,\n headers,\n options.transformResponse\n ),\n status: request.status,\n headers: headers,\n config: options\n };\n\n // Resolve or reject the Promise based on the status\n if (request.status >= 200 && request.status < 300) {\n resolve(response);\n } else {\n reject(response);\n }\n\n // Clean up request\n request = null;\n }\n };\n\n // Merge headers and add to request\n var headers = utils.merge(\n defaults.headers.common,\n defaults.headers[options.method] || {},\n options.headers || {}\n );\n\n // Add xsrf header\n var xsrfValue = urlIsSameOrigin(options.url)\n ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName)\n : undefined;\n if (xsrfValue) {\n headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue;\n }\n\n utils.forEach(headers, function (val, key) {\n // Remove Content-Type if data is undefined\n if (!data && key.toLowerCase() === 'content-type') {\n delete headers[key];\n }\n // Otherwise add header to the request\n else {\n request.setRequestHeader(key, val);\n }\n });\n\n // Add withCredentials to request if needed\n if (options.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (options.responseType) {\n try {\n request.responseType = options.responseType;\n } catch (e) {\n if (request.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Send the request\n request.send(data);\n });\n\n // Provide alias for success\n promise.success = function success(fn) {\n promise.then(function(response) {\n fn(response);\n });\n return promise;\n };\n\n // Provide alias for error\n promise.error = function error(fn) {\n promise.then(null, function(response) {\n fn(response);\n });\n return promise;\n };\n\n return promise;\n};\n\n// Expose defaults\naxios.defaults = defaults;\n\n// Provide aliases for supported request methods\ncreateShortMethods('delete', 'get', 'head');\ncreateShortMethodsWithData('post', 'put', 'patch');\n\nfunction createShortMethods() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url\n }));\n };\n });\n}\n\nfunction createShortMethodsWithData() {\n utils.forEach(arguments, function (method) {\n axios[method] = function (url, data, options) {\n return axios(utils.merge(options || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n });\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/axios.js\n ** module id = 1\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+');\n}\n\nmodule.exports = function buildUrl(url, params) {\n if (!params) {\n return url;\n }\n\n var parts = [];\n\n utils.forEach(params, function (val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function (v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n }\n else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n if (parts.length > 0) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&');\n }\n\n return url;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/buildUrl.js\n ** module id = 2\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nmodule.exports = {\n write: function (name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(exires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function (name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function (name) {\n this.write(name, '', Date.now() - 86400000);\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/cookies.js\n ** module id = 3\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\nvar JSON_START = /^\\s*(\\[|\\{[^\\{])/;\nvar JSON_END = /[\\}\\]]\\s*$/;\nvar PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/;\nvar CONTENT_TYPE_APPLICATION_JSON = {\n 'Content-Type': 'application/json;charset=utf-8'\n};\n\nmodule.exports = {\n transformRequest: [function (data) {\n return utils.isObject(data) &&\n !utils.isFile(data) &&\n !utils.isBlob(data) ?\n JSON.stringify(data) : null;\n }],\n\n transformResponse: [function (data) {\n if (typeof data === 'string') {\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data)) {\n data = JSON.parse(data);\n }\n }\n return data;\n }],\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n post: utils.merge(CONTENT_TYPE_APPLICATION_JSON),\n put: utils.merge(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/defaults.js\n ** module id = 4\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n utils.forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/parseHeaders.js\n ** module id = 5\n ** module chunks = 0\n **/","'use strict';\n\nvar utils = require('./utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n utils.forEach(fns, function (fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/transformData.js\n ** module id = 6\n ** module chunks = 0\n **/","'use strict';\n\nvar msie = /trident/i.test(navigator.userAgent);\nvar utils = require('./utils');\nvar urlParsingNode = document.createElement('a');\nvar originUrl = urlResolve(window.location.href);\n\n/**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\nfunction urlResolve(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestUrl The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\nmodule.exports = function urlIsSameOrigin(requestUrl) {\n var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/urlIsSameOrigin.js\n ** module id = 7\n ** module chunks = 0\n **/","// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array or arguments callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Check if obj is array-like\n var isArray = obj.constructor === Array || typeof obj.callee === 'function';\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object' && !isArray) {\n obj = [obj];\n }\n\n // Iterate over array values\n if (isArray) {\n for (var i=0, l=obj.length; i 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n}\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 19\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/axios.js b/lib/axios.js index 2a36e76..c7bbb9d 100644 --- a/lib/axios.js +++ b/lib/axios.js @@ -1,8 +1,10 @@ var Promise = require('es6-promise').Promise; var buildUrl = require('./buildUrl'); +var cookies = require('./cookies'); var defaults = require('./defaults'); var parseHeaders = require('./parseHeaders'); var transformData = require('./transformData'); +var urlIsSameOrigin = require('./urlIsSameOrigin'); var utils = require('./utils'); var axios = module.exports = function axios(options) { @@ -62,9 +64,17 @@ var axios = module.exports = function axios(options) { options.headers || {} ); + // Add xsrf header + var xsrfValue = urlIsSameOrigin(options.url) + ? cookies.read(options.xsrfCookieName || defaults.xsrfCookieName) + : undefined; + if (xsrfValue) { + headers[options.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue; + } + utils.forEach(headers, function (val, key) { // Remove Content-Type if data is undefined - if (typeof data === 'undefined' && key.toLowerCase() === 'content-type') { + if (!data && key.toLowerCase() === 'content-type') { delete headers[key]; } // Otherwise add header to the request diff --git a/lib/cookies.js b/lib/cookies.js new file mode 100644 index 0000000..7dd54ea --- /dev/null +++ b/lib/cookies.js @@ -0,0 +1,37 @@ +'use strict'; + +var utils = require('./utils'); + +module.exports = { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } +}; \ No newline at end of file diff --git a/lib/urlIsSameOrigin.js b/lib/urlIsSameOrigin.js new file mode 100644 index 0000000..8eab6e0 --- /dev/null +++ b/lib/urlIsSameOrigin.js @@ -0,0 +1,50 @@ +'use strict'; + +var msie = /(msie|trident)/i.test(navigator.userAgent); +var utils = require('./utils'); +var urlParsingNode = document.createElement('a'); +var originUrl = urlResolve(window.location.href); + +/** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ +function urlResolve(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') + ? urlParsingNode.pathname + : '/' + urlParsingNode.pathname + }; +} + +/** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestUrl The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ +module.exports = function urlIsSameOrigin(requestUrl) { + var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; + return (parsed.protocol === originUrl.protocol && + parsed.host === originUrl.host); +}; \ No newline at end of file diff --git a/lib/utils.js b/lib/utils.js index 8c323a1..823e76f 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -12,6 +12,26 @@ function isArray(val) { return toString.call(val) === '[object Array]'; } +/** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ +function isString(val) { + return typeof val === 'string'; +} + +/** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ +function isNumber(val) { + return typeof val === 'number'; +} + /** * Determine if a value is an Object * @@ -49,7 +69,7 @@ function isFile(val) { * @returns {boolean} True if value is a Blob, otherwise false */ function isBlob(val) { - return toString.call(val) !== '[object Blob]'; + return toString.call(val) === '[object Blob]'; } /** @@ -133,6 +153,8 @@ function merge(obj1/*, obj2, obj3, ...*/) { module.exports = { isArray: isArray, + isString: isString, + isNumber: isNumber, isObject: isObject, isDate: isDate, isFile: isFile, diff --git a/test/specs/axios.spec.js b/test/specs/axios.spec.js index 9c9b29b..bdf00f0 100644 --- a/test/specs/axios.spec.js +++ b/test/specs/axios.spec.js @@ -39,7 +39,9 @@ describe('axios', function () { }); it('should default common headers', function () { - axios(); + axios({ + url: '/foo' + }); var request = jasmine.Ajax.requests.mostRecent(); var headers = axios.defaults.headers.common; @@ -52,7 +54,12 @@ describe('axios', function () { it('should add extra headers for post', function () { axios({ - method: 'post' + method: 'post', + url: '/foo', + data: { + firstName: 'foo', + lastName: 'bar' + } }); var request = jasmine.Ajax.requests.mostRecent(); @@ -63,6 +70,16 @@ describe('axios', function () { } } }); + + it('should remove content-type if data is empty', function () { + axios({ + method: 'post', + url: '/foo' + }); + + var request = jasmine.Ajax.requests.mostRecent(); + expect(request.requestHeaders['content-type']).toEqual(undefined); + }); }); describe('options', function () { @@ -71,7 +88,9 @@ describe('axios', function () { }); it('should default method to get', function () { - axios(); + axios({ + url: '/foo' + }); var request = jasmine.Ajax.requests.mostRecent(); expect(request.method).toBe('get'); @@ -79,6 +98,7 @@ describe('axios', function () { it('should accept headers', function () { axios({ + url: '/foo', headers: { 'X-Requested-With': 'XMLHttpRequest' } @@ -103,6 +123,7 @@ describe('axios', function () { it('should allow overriding default headers', function () { axios({ + url: '/foo', headers: { 'Accept': 'foo/bar' } @@ -112,4 +133,29 @@ describe('axios', function () { expect(request.requestHeaders['Accept']).toEqual('foo/bar'); }); }); + + describe('xsrf', function () { + afterEach(function () { + document.cookie = axios.defaults.xsrfCookieName + '=;expires=' + new Date(Date.now() - 86400000).toGMTString(); + }); + + it('should not set xsrf header if cookie is null', function () { + axios({ + url: '/foo' + }); + + var request = jasmine.Ajax.requests.mostRecent(); + expect(request.requestHeaders[axios.defaults.xsrfHeaderName]).toEqual(undefined); + }); + + it('should set xsrf header if cookie is set', function () { + document.cookie = axios.defaults.xsrfCookieName + '=12345'; + axios({ + url: '/foo' + }); + + var request = jasmine.Ajax.requests.mostRecent(); + expect(request.requestHeaders[axios.defaults.xsrfHeaderName]).toEqual('12345'); + }); + }); }); \ No newline at end of file diff --git a/test/unit/utils/isX.js b/test/unit/utils/isX.js index efe77ea..306ce3b 100644 --- a/test/unit/utils/isX.js +++ b/test/unit/utils/isX.js @@ -7,6 +7,18 @@ module.exports = { test.done(); }, + testIsString: function (test) { + test.equals(utils.isString(''), true); + test.equals(utils.isString({toString: function () { return ''; }}), false); + test.done(); + }, + + testIsNumber: function (test) { + test.equals(utils.isNumber(123), true); + test.equals(utils.isNumber('123'), false); + test.done(); + }, + testIsObject: function (test) { test.equals(utils.isObject({}), true); test.equals(utils.isObject(null), false);