/* axios v0.1.0 | (c) 2014 by Matt Zabriskie */ 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:n)(i.data,i.status,i.headers,i.config),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(n).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=/(msie|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