instruct-request-axios
Version:
1 lines • 101 kB
JavaScript
var e={669:(e,t,r)=>{e.exports=r(609)},448:(e,t,r)=>{var n=r(867),i=r(26),o=r(372),a=r(327),s=r(97),u=r(109),c=r(985),l=r(61);e.exports=function(e){return new Promise((function(t,r){var f=e.data,p=e.headers,h=e.responseType;n.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(g+":"+y)}var v=s(e.baseURL,e.url);function m(){if(d){var n="getAllResponseHeaders"in d?u(d.getAllResponseHeaders()):null,o={data:h&&"text"!==h&&"json"!==h?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};i(t,r,o),d=null}}if(d.open(e.method.toUpperCase(),a(v,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(m)},d.onabort=function(){d&&(r(l("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){r(l("Network Error",e,null,d)),d=null},d.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||c(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;b&&(p[e.xsrfHeaderName]=b)}"setRequestHeader"in d&&n.forEach(p,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),h&&"json"!==h&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){d&&(d.abort(),r(e),d=null)})),f||(f=null),d.send(f)}))}},609:(e,t,r)=>{var n=r(867),i=r(849),o=r(321),a=r(185);function s(e){var t=new o(e),r=i(o.prototype.request,t);return n.extend(r,o.prototype,t),n.extend(r,t),r}var u=s(r(655));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=r(263),u.CancelToken=r(972),u.isCancel=r(502),u.all=function(e){return Promise.all(e)},u.spread=r(713),u.isAxiosError=r(268),e.exports=u,e.exports.default=u},263:e=>{function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:(e,t,r)=>{var n=r(263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},502:e=>{e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{var n=r(867),i=r(327),o=r(782),a=r(572),s=r(185),u=r(875),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!n){var l=[a,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(o),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var f=e;r.length;){var p=r.shift(),h=r.shift();try{f=p(f)}catch(e){h(e);break}}try{i=a(f)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=l},782:(e,t,r)=>{var n=r(867);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},97:(e,t,r)=>{var n=r(793),i=r(303);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},61:(e,t,r)=>{var n=r(481);e.exports=function(e,t,r,i,o){var a=new Error(e);return n(a,t,r,i,o)}},572:(e,t,r)=>{var n=r(867),i=r(527),o=r(502),a=r(655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:(e,t,r)=>{var n=r(867);e.exports=function(e,t){t=t||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=u(void 0,e[i])):r[i]=u(e[i],t[i])}n.forEach(i,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(o,c),n.forEach(a,(function(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=u(void 0,e[i])):r[i]=u(void 0,t[i])})),n.forEach(s,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var l=i.concat(o).concat(a).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return n.forEach(f,c),r}},26:(e,t,r)=>{var n=r(61);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},527:(e,t,r)=>{var n=r(867),i=r(655);e.exports=function(e,t,r){var o=this||i;return n.forEach(r,(function(r){e=r.call(o,e,t)})),e}},655:(e,t,r)=>{var n=r(867),i=r(16),o=r(481),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(448)),u),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||i&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(a)})),e.exports=c},849:e=>{e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},327:(e,t,r)=>{var n=r(867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},303:e=>{e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:(e,t,r)=>{var n=r(867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:e=>{e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:e=>{e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:(e,t,r)=>{var n=r(867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16:(e,t,r)=>{var n=r(867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},109:(e,t,r)=>{var n=r(867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.substr(0,o)).toLowerCase(),r=n.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},713:e=>{e.exports=function(e){return function(t){return e.apply(null,t)}}},875:(e,t,r)=>{var n=r(593),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var o={},a=n.version.split(".");function s(e,t){for(var r=t?t.split("."):a,n=e.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}i.transitional=function(e,t,r){var i=t&&s(t);function a(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new Error(a(n," has been removed in "+t));return i&&!o[n]&&(o[n]=!0,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+o)}},validators:i}},867:(e,t,r)=>{var n=r(849),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):o(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,i){e[i]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},322:e=>{e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],i=e[2],o=e[3];n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|o>>>20)+r|0)&r|~o&n)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|o>>>20)+r|0)&r|~o&n)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|o>>>20)+r|0)&r|~o&n)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|o>>>20)+r|0)&r|~o&n)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|o>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+o|0)&r|o&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|o>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+o|0)&r|o&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|o>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+o|0)&r|o&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|o>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&r|o&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|o>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|o>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|o>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|o>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function i(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function o(e){var t,i,o,a,s,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(l,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(l,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,r(l,o),l}function a(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function s(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function l(){this.reset()}return s(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,r){var n,i,o,a,s=this.byteLength,u=e(t,s),c=s;return undefined!==r&&(c=e(r,s)),u>c?new ArrayBuffer(0):(n=c-u,i=new ArrayBuffer(n),o=new Uint8Array(i),a=new Uint8Array(this,u,n),o.set(a),i)}}(),l.prototype.append=function(e){return this.appendBinary(u(e)),this},l.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},l.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),r=s(this._hash),e&&(r=c(r)),this.reset(),r},l.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},l.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},l.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},l.prototype._finish=function(e,t){var n,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(r(this._hash,e),a=0;a<16;a+=1)e[a]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=i,e[15]=o,r(this._hash,e)},l.hash=function(e,t){return l.hashBinary(u(e),t)},l.hashBinary=function(e,t){var r=s(o(e));return t?c(r):r},l.ArrayBuffer=function(){this.reset()},l.ArrayBuffer.prototype.append=function(e){var t,n,o,a,s,u=(n=this._buff.buffer,o=e,a=!0,(s=new Uint8Array(n.byteLength+o.byteLength)).set(new Uint8Array(n)),s.set(new Uint8Array(o),n.byteLength),a?s:s.buffer),c=u.length;for(this._length+=e.byteLength,t=64;t<=c;t+=64)r(this._hash,i(u.subarray(t-64,t)));return this._buff=t-64<c?new Uint8Array(u.buffer.slice(t-64)):new Uint8Array(0),this},l.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n[t]<<(t%4<<3);return this._finish(o,i),r=s(this._hash),e&&(r=c(r)),this.reset(),r},l.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.ArrayBuffer.prototype.getState=function(){var e,t=l.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},l.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,i=new ArrayBuffer(n),o=new Uint8Array(i);for(r=0;r<n;r+=1)o[r]=e.charCodeAt(r);return t?o:i}(e.buff,!0),l.prototype.setState.call(this,e)},l.ArrayBuffer.prototype.destroy=l.prototype.destroy,l.ArrayBuffer.prototype._finish=l.prototype._finish,l.ArrayBuffer.hash=function(e,t){var n=s(function(e){var t,n,o,a,s,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(l,i(e.subarray(t-64,t)));for(n=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(l,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,r(l,o),l}(new Uint8Array(e)));return t?c(n):n},l}()},593:e=>{e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};(()=>{r.d(n,{yT:()=>Y,td:()=>s,ip:()=>ce,Ad:()=>ht,n4:()=>Ve,uc:()=>Ue,od:()=>t(),ZP:()=>dt});var e=r(669),t=r.n(e);function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}const s=function(){function e(){var t,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=void 0,(t="container")in this?Object.defineProperty(this,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[t]=r}var t,r;return t=e,r=[{key:"delete",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"front",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.container[n],a=!1;if(o)if(r){var s=o[r];s&&s[e]&&(delete s[e],a=!0)}else for(var u in o)if(o.hasOwnProperty(u)&&o)if(o[u][e]instanceof Array)if(t||i){if(o[u][e].length<=1||!t&&i)delete o[u][e],a=!0;else if(t){var c=o[u][e].indexOf(t);c>=0&&o[u][e].splice(c,1),a||(a=c>=0)}}else console.error("this "+e+" is has many callback",o[u][e]);else a=!0,delete o[u][e];return a}},{key:"push",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"function"==typeof e?t={trigger:e,name:r,zIndex:i,triggerType:n}:r=(t=e).name||r,t.zIndex=void 0===t.zIndex?0:t.zIndex,void 0===t.triggerType&&(t.triggerType="has");var o=t.type||"front";void 0===this.container&&(this.container={}),void 0===this.container[o]&&(this.container[o]={}),void 0===this.container[o][t.triggerType]&&(this.container[o][t.triggerType]={});var a=this.container[o][t.triggerType];return void 0===a[r]?a[r]=t:(a[r]instanceof Array||(a[r]=[a[r]]),a[r].push(t)),t}},{key:"search",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"front";if(void 0===this.container)return[];var o=this.container[n];if(void 0===o)return[];var a=[];if(o.skip){var s=o.skip;for(var u in s)if(s.hasOwnProperty(u)){var c=this.searchTriggerWhere(s[u],t);c&&c.length>0&&a.push.apply(a,i(c))}}if(o.has){var l=Object.keys(e),f=o.has;l.map((function(e){if(f[e]){var n=r.searchTriggerWhere(f[e],t);n&&n.length>0&&a.push.apply(a,i(n))}}))}return a.length>1&&a.sort((function(e,t){return e.zIndex>t.zIndex?-1:1})),a}},{key:"trigger",value:function(e,t){if(e)return e.map((function(e){return e.trigger(t)}))}},{key:"searchTrigger",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"front";return this.trigger(this.search(e,t,r))}},{key:"searchTriggerWhere",value:function(e,t){return e instanceof Array?e.filter((function(e){return void 0===e.where||e.where(t)})):void 0===e.where||e.where(t)?[e]:void 0}}],r&&a(t.prototype,r),e}();var u=r(322),c=r.n(u);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,"options",void 0),f(this,"snapshotOptions",void 0),f(this,"imageOptions",void 0),f(this,"optionUpdate",void 0),f(this,"asyncOptionUpdateTime",void 0),f(this,"getParamsConfig",{data:{function:!0,next:"dataTrigger"},sign:{next:"id"},dataTrigger:{function:!0}}),this.options=t,t&&(this.imageOptions=Object.assign({},t)),["sign","skip","data","groupId","replace","where","option"].map((function(e){r[e]=function(t){return r.addRollBack(e,t)}}))}var t,r;return t=e,r=[{key:"addRollBack",value:function(e,t){var r=this;return null===e&&null===t||(void 0===this.imageOptions&&(this.imageOptions={}),null!==e&&this.imageOptions[e]===t||(null===e?this.imageOptions=Object.assign({},t):this.imageOptions[e]=t,clearTimeout(this.asyncOptionUpdateTime),this.optionUpdate=!0,this.asyncOptionUpdateTime=setTimeout((function(){return r.completeRollBack()})))),this}},{key:"completeRollBack",value:function(){this.optionUpdate&&(clearTimeout(this.asyncOptionUpdateTime),this.optionUpdate=!1,null===this.snapshotOptions?this.snapshotOptions=void 0:this.snapshotOptions=Object.assign({},this.options),this.options=Object.assign({},this.imageOptions))}},{key:"rollBack",value:function(){var e=this.snapshotOptions;return null===e?this:(this.snapshotOptions=null,this.addRollBack(null,e))}},{key:"getParams",value:function(e){this.completeRollBack();var t=e?Object.assign({},this.options,e):this.options;return t.replace&&(this.triggerReplace(t.replace,t),this.completeRollBack()),t}},{key:"triggerReplace",value:function(e,t){if("function"!=typeof e)return this.addRollBack(null,t);for(var r in t)t.hasOwnProperty(r)&&t[r]!==this.options[r]&&e(r,t[r],this.options[r])&&this.addRollBack(r,t[r])}},{key:"map",value:function(e,t,r){return t&&t instanceof Array?t.map(r):"function"==typeof t?e.map((function(e,n,i){return t(e)&&r&&r(e,n,i)})):e.map(r)}},{key:"getParamsValue",value:function(e,t){if(!e)return e.option&&e.option[t]?e.option[t]:void 0;var r=this.getParamsConfig[t];if(r&&r.function&&"function"==typeof e[t])return e[t](e,this.options);if(void 0===e[t]&&r.next)for(var n="string"==typeof r.next?[r.next]:r.next,i=0,o=n.length;i<o;i++)if(void 0!==e[n[i]])return this.getParamsValue(e,n[i]);return e[t]}},{key:"triggerWhere",value:function(e,t){return"function"==typeof e?e(t):!!(e&&e instanceof Array)&&e.includes(t)}}],r&&l(t.prototype,r),e}();function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function v(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(n);if(i){var r=b(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return v(this,e)});function a(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0;return d(this,a),O(m(t=o.call(this,e)),"cacheRole",void 0),O(m(t),"cache",void 0),O(m(t),"roles",{noUpdate:{update:!1,updateAll:!1,updateAllGroup:!1,updateGroup:!1}}),t.cacheRole=r,t.cache=n,t}return t=a,(r=[{key:"getRole",value:function(e){return!this.roles[this.cacheRole]||!1!==this.roles[this.cacheRole][e]}},{key:"updateGroup",value:function(e){if(this.getRole("updateGroup")){var t=this.getParams(e);return void 0===t.data?console.error("update cache fail data is ",t.data,"but this arg need Object"):t.groupId?t.option||t.skip?(this.cache.setGroupItem(this.getParamsValue(t,"groupId"),this.getParamsValue(t,"data"),this.getParamsValue(t,"option")),this):this.updateAllGroup(e):console.error("groupId not use",t.groupId)}}},{key:"updateAllGroup",value:function(e){var t=this;if(this.getRole("updateAllGroup")){var r=this.getParams(e);return void 0===r.data?console.error("update cache fail data is ",r.data,"but this arg need Object"):(this.map(this.cache,r.where,(function(e){return t.updateGroup(Object.assign({},r,{option:r.option?Object.assign({},r.option,{storage:e}):{storage:e}}))})),this)}}},{key:"updateAll",value:function(e){var t=this;if(this.getRole("updateAll")){var r=this.getParams(e);return void 0===r.data?console.error("update cache fail data is ",r.data,"but this arg need Object"):(this.map(this.cache,r.where,(function(e){return t.update(Object.assign({},r,{option:r.option?Object.assign({},r.option,{storage:e}):{storage:e}}))})),this)}}},{key:"update",value:function(e){if(this.getRole("update")){var t=this.getParams(e);return void 0===t.data?console.error("update cache fail data is ",t.data,"but this arg need Object"):t.option||t.skip?(this.cache.setItem(this.getParamsValue(t,"sign"),this.getParamsValue(t,"data"),this.getParamsValue(t,"option")),this):this.updateAll(e)}}},{key:"deleteAll",value:function(e){var t=this;if(this.getRole("deleteAll")){var r=this.getParams(e);return this.map(this.cache,r.where,(function(e){return t.delete(Object.assign({},r,{option:r.option?Object.assign({},r.option,{storage:e}):{storage:e}}))})),this}}},{key:"delete",value:function(e){if(this.getRole("delete")){var t=this.getParams(e);return t.option||t.skip?(this.cache.removeItem(this.getParamsValue(t,"sign"),this.getParamsValue(t,"option")),this):this.deleteAll(e)}}},{key:"deleteGroup",value:function(e){if(this.getRole("deleteGroup")){var t=this.getParams(e);return t.option||t.skip?(this.cache.removeGroup(this.getParamsValue(t,"groupId"),this.getParamsValue(t,"option")),this):this.deleteAll(e)}}},{key:"deleteAllGroup",value:function(e){var t=this;if(this.getRole("deleteAllGroup")){var r=this.getParams(e);return this.map(this.cache,r.where,(function(e){return t.deleteGroup(Object.assign({},r,{option:r.option?Object.assign({},r.option,{storage:e}):{storage:e}}))})),this}}},{key:"getData",value:function(e){if(this.getRole("getData")){var t;t="string"==typeof e?{sign:e}:this.getParams(e);var r=this.cache.getItem(this.getParamsValue(t,"sign"),this.getParamsValue(t,"option"));return r&&r.data}}},{key:"getDataAll",value:function(e){var t,r=this;if(this.getRole("getDataAll"))return t="string"==typeof e?{sign:e}:this.getParams(e),this.map(this.cache,t.where,(function(e){return r.getData(Object.assign({},t,{option:t.option?Object.assign({},t.option,{storage:e}):{storage:e}}))}))}},{key:"getGroupData",value:function(e){var t;if(this.getRole("getGroupData"))return t="string"==typeof e?{groupId:e}:this.getParams(e),this.cache.getGroupItem(this.getParamsValue(t,"groupId"),this.getParamsValue(t,"option"))}},{key:"getGroupDataAll",value:function(e){var t,r=this;if(this.getRole("getGroupDataAll"))return t="string"==typeof e?{groupId:e}:this.getParams(e),this.map(this.cache,t.where,(function(e){return r.getDataAll(Object.assign({},t,{option:t.option?Object.assign({},t.option,{storage:e}):{storage:e}}))}))}}])&&g(t.prototype,r),a}(p);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function j(e,t){return j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},j(e,t)}function S(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(n);if(i){var r=P(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return S(this,e)});function a(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e,"superset",t)}return t=a,(r=[{key:"clear",value:function(e){return this.cache.clear({storage:e}),this}},{key:"clearAll",value:function(e){var t=this,r=this.getParams(e);return this.map(this.cache,r.where,(function(e){return t.clear(e)})),this}}])&&x(t.prototype,r),a}(k);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function R(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var D=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A(this,"data",void 0),A(this,"storageOption",void 0),A(this,"groups",void 0)}var t,r;return t=e,(r=[{key:"keys",get:function(){return void 0===this.storageOption&&(this.storageOption={}),this.storageOption.keys},set:function(e){void 0===this.storageOption&&(this.storageOption={}),this.storageOption.keys=e,this.updateStorageOption()}},{key:"id",get:function(){return void 0===this.storageOption&&(this.storageOption={}),this.storageOption.id},set:function(e){void 0===this.storageOption&&(this.storageOption={}),this.storageOption.id=e,this.updateStorageOption()}},{key:"expires",get:function(){return void 0===this.storageOption&&(this.storageOption={}),this.storageOption.expires},set:function(e){void 0===this.storageOption&&(this.storageOption={}),this.storageOption.expires=e,this.updateStorageOption()}},{key:"updateStorageOption",value:function(){}},{key:"updateExpire",value:function(){var e=!1;if(this.storageOption&&this.expires){var t=+new Date;for(var r in this.expires)this.expires.hasOwnProperty(r)&&t>=this.expires[r]&&(this.removeItem(r),e=!0)}return e}},{key:"createGroups",value:function(){if(void 0!==this.keys){var e=void 0;for(var t in this.keys)this.keys.hasOwnProperty(t)&&"number"!=typeof this.keys[t]&&(void 0===e&&(e={}),("string"==typeof this.keys[t]?[this.keys[t]]:this.keys[t]).map((function(t){void 0===e[t]?e[t]=[t]:e[t].push(t)})));e&&(this.groups=e)}}},{key:"setKey",value:function(e,t){void 0===this.keys&&(this.keys={});var r=t.groupId;void 0===this.keys[e]&&(this.keys[e]=r||1),void 0===this.id&&(this.id={}),t.id&&(this.id[t.id]=e),r&&(void 0===this.groups&&(this.groups={}),void 0===this.groups[r]?this.groups[r]=[e]:this.groups[r].includes(e)||this.groups[r].push(e)),this.keys[e]&&("string"==typeof this.keys[e]?this.keys[e]=[this.keys[e],r]:this.keys[e]instanceof Array&&this.keys[e].push(r))}},{key:"deleteKey",value:function(e,t){var r=this;if(void 0!==this.keys&&(this.id[e]&&(e=this.id[e]),this.keys[e])){var n=_(this.keys[e]);return"number"!==n&&this.groups&&("string"===n?[this.keys[e]]:this.keys[e]).map((function(t){if(r.groups[t])if(r.groups[t].length<=1)delete r.groups[t];else{var n=r.groups[t].indexOf(e);n>=0&&r.groups[t].splice(n,1)}})),delete this.storageOption.keys[e],Object.keys(this.keys).length<=0&&delete this.storageOption.keys,this.expires&&(this.expires[e]&&delete this.storageOption.expires[e],Object.keys(this.expires).length<=0&&delete this.storageOption.expires),t&&t()}}},{key:"deleteGroup",value:function(e,t){var r=this;if(void 0!==this.keys&&void 0!==this.groups&&void 0!==this.groups[e]){var n=this.groups[e];delete this.groups[e],Object.keys(this.groups).length<=0&&(this.groups=void 0),n.map((function(n){if(r.keys[n])if(r.keys[n]instanceof Array&&r.keys[n].length>1){var i=r.keys[n].indexOf(e);i>=0&&r.keys[n].splice(i,1)}else t&&t(n),delete r.keys[n],r.expires&&r.expires[n]&&delete r.expires[n]}))}}},{key:"getItem",value:function(e){var t=this.getId(e,void 0);return t&&(e=t),this.data&&this.data[e]?this.data[e].expire>0&&this.getDateTime()>this.data[e].expire?this.removeItem(e):JSON.parse(this.data[e].data):void 0}},{key:"getGroup",value:function(e){var t=this;return this.searchGroup(e)?this.groups[e].map((function(e){return t.getItem(e)})):[]}},{key:"setExpire",value:function(e,t){e&&t>0&&(this.expires||(this.expires={}),this.expires[e]!==t&&(this.expires[e]=t))}},{key:"getExpire",value:function(e,t,r){return"function"==typeof e?e(t,this.data[r]?this.getItem(r):void 0,r):e}},{key:"getId",value:function(e,t){if(this.id){var r=void 0;return t&&t.id&&!e&&(r=this.id[t.id]),r||(r=this.id[e]),r}}},{key:"setItem",value:function(e,t,r){void 0===this.data&&(this.data={});var n=this.getId(e,r);n&&(e=n);var i=this.getExpire(r.expire,t,e),o=i&&i>0,a=o?this.getDateTime()+i:0;return this.data[e]&&this.data[e].beginExpire==i&&(a=this.data[e].expire),this.data[e]={expire:a,data:"string"==typeof t?t:JSON.stringify(t)},this.setExpire(e,a),o&&(this.data[e].beginExpire=i),this.setKey(e,r)}},{key:"setGroup",value:function(e,t,r){var n=this;this.searchGroup(e)&&this.groups[e].map((function(i){if("function"==typeof t){var o=n.getItem(i);return n.setItem(i,t({groupId:e,id:e,expire:r.expire,sign:i,data:o}),r)}return n.groups[e].map((function(e){return n.setItem(e,t,r)}))}))}},{key:"removeItem",value:function(e){var t=this,r=this.getId(e,void 0);return r&&(e=r),this.deleteKey(e,void 0===this.data?void 0:function(){t.data[e]&&delete t.data[e]})}},{key:"removeGroup",value:function(e){var t=this;if(void 0!==this.data)return this.deleteGroup(e,(function(e){t.data[e]&&delete t.data[e]}))}},{key:"search",value:function(e){var t=this.getId(e,void 0);return t&&(e=t),!!(this.data&&this.data[e]||this.keys&&this.keys[e])}},{key:"searchGroup",value:function(e){return!(!this.groups||!this.groups[e])}},{key:"clear",value:function(){this.storageOption=void 0,this.data=void 0,this.groups=void 0}},{key:"getDateTime",value:function(){return+new Date}}])&&R(t.prototype,r),e}();const E=new function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";this.encode=function(r){var n,i,o,a,s,u,c,l="",f=0;for(r=t(r);f<r.length;)a=(n=r.charCodeAt(f++))>>2,s=(3&n)<<4|(i=r.charCodeAt(f++))>>4,u=(15&i)<<2|(o=r.charCodeAt(f++))>>6,c=63&o,isNaN(i)?u=c=64:isNaN(o)&&(c=64),l=l+e.charAt(a)+e.charAt(s)+e.charAt(u)+e.charAt(c);return l},this.decode=function(t){var n,i,o,a,s,u,c="",l=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<t.length;)n=e.indexOf(t.charAt(l++))<<2|(a=e.indexOf(t.charAt(l++)))>>4,i=(15&a)<<4|(s=e.indexOf(t.charAt(l++)))>>2,o=(3&s)<<6|(u=e.indexOf(t.charAt(l++))),c+=String.fromCharCode(n),64!=s&&(c+=String.fromCharCode(i)),64!=u&&(c+=String.fromCharCode(o));return r(c)};var t=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},r=function(e){var t,r,n,i="",o=0;for(t=r=0;o<e.length;)(t=e.charCodeAt(o))<128?(i+=String.fromCharCode(t),o++):t>191&&t<224?(r=e.charCodeAt(o+1),i+=String.fromCharCode((31&t)<<6|63&r),o+=2):(r=e.charCodeAt(o+1),n=e.charCodeAt(o+2),i+=String.fromCharCode((15&t)<<12|(63&r)<<6|63&n),o+=3);return i}};function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(){return I="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=N(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},I.apply(this,arguments)}function N(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$(e)););return e}function U(e,t){return U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},U(e,t)}function B(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return V(e)}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&U(e,t)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$(n);if(i){var r=$(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return B(this,e)});function a(e,t){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),F(V(r=o.call(this)),"example",void 0),F(V(r),"key","X19yZXF1ZXN0X2NhY2hlX2tleV9f"),F(V(r),"timeObject",void 0),F(V(r),"setOptionTime",void 0),r.example=e,t&&(r.key=t);try{var n=r.example.getItem(r.key);n&&(r.storageOption=JSON.parse(E.decode(n)),r.updateExpire(),r.createGroups())}catch(e){}return r}return t=a,(r=[{key:"getItem",value:function(e,t){var r=this.getId(e,void 0);if(r&&(e=r),this.keys&&this.keys[e]&&(!this.data||!this.data[e])){var n=this.example.getItem(e);try{if(n){var i=JSON.parse(E.decode(n));i.expire>0&&(i.expire=i.expire-this.getDateTime()),i.expire>=0&&(I($(a.prototype),"setItem",this).call(this,e,i.data,{expire:i.expire}),t&&t(e,i))}}catch(e){}