@myinterview/widget-react 1.1.66 → 1.1.68-beta-b3392f3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1615 -993
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1615 -993
- package/dist/esm/index.js.map +1 -1
- package/package.json +5 -5
package/dist/cjs/index.js
CHANGED
|
@@ -1299,7 +1299,7 @@ function c(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r
|
|
|
1299
1299
|
*
|
|
1300
1300
|
* This source code is licensed under the MIT license found in the
|
|
1301
1301
|
* LICENSE file in the root directory of this source tree.
|
|
1302
|
-
*/!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(R)return I;R=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case o:case d:case s:return e;default:switch(e=e&&e.$$typeof){case i:case u:case y:case p:case a:return e;default:return f}}case n:return f}}}function b(e){return v(e)===c}return I.AsyncMode=l,I.ConcurrentMode=c,I.ContextConsumer=i,I.ContextProvider=a,I.Element=t,I.ForwardRef=u,I.Fragment=r,I.Lazy=y,I.Memo=p,I.Portal=n,I.Profiler=o,I.StrictMode=d,I.Suspense=s,I.isAsyncMode=function(e){return b(e)||v(e)===l},I.isConcurrentMode=b,I.isContextConsumer=function(e){return v(e)===i},I.isContextProvider=function(e){return v(e)===a},I.isElement=function(e){return "object"==typeof e&&null!==e&&e.$$typeof===t},I.isForwardRef=function(e){return v(e)===u},I.isFragment=function(e){return v(e)===r},I.isLazy=function(e){return v(e)===y},I.isMemo=function(e){return v(e)===p},I.isPortal=function(e){return v(e)===n},I.isProfiler=function(e){return v(e)===o},I.isStrictMode=function(e){return v(e)===d},I.isSuspense=function(e){return v(e)===s},I.isValidElementType=function(e){return "string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===d||e===s||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===g||e.$$typeof===$)},I.typeOf=v,I}():e.exports=(B||(B=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var $=e.type;switch($){case l:case c:case r:case o:case d:case s:return $;default:var h=$&&$.$$typeof;switch(h){case i:case u:case y:case p:case a:return h;default:return f}}case n:return f}}}var b=l,w=c,C=i,P=a,E=t,S=u,O=r,A=y,k=p,M=n,j=o,_=d,x=s,T=!1;function R(e){return v(e)===c}V.AsyncMode=b,V.ConcurrentMode=w,V.ContextConsumer=C,V.ContextProvider=P,V.Element=E,V.ForwardRef=S,V.Fragment=O,V.Lazy=A,V.Memo=k,V.Portal=M,V.Profiler=j,V.StrictMode=_,V.Suspense=x,V.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(e)||v(e)===l},V.isConcurrentMode=R,V.isContextConsumer=function(e){return v(e)===i},V.isContextProvider=function(e){return v(e)===a},V.isElement=function(e){return "object"==typeof e&&null!==e&&e.$$typeof===t},V.isForwardRef=function(e){return v(e)===u},V.isFragment=function(e){return v(e)===r},V.isLazy=function(e){return v(e)===y},V.isMemo=function(e){return v(e)===p},V.isPortal=function(e){return v(e)===n},V.isProfiler=function(e){return v(e)===o},V.isStrictMode=function(e){return v(e)===d},V.isSuspense=function(e){return v(e)===s},V.isValidElementType=function(e){return "string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===d||e===s||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===g||e.$$typeof===$)},V.typeOf=v;}()),V);}(N);var H=N.exports,U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},G={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F={};function Z(e){return H.isMemo(e)?G:F[e.$$typeof]||U}F[H.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F[H.Memo]=G;var Q=Object.defineProperty,K=Object.getOwnPropertyNames,W=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,J=Object.getPrototypeOf,q=Object.prototype;var X=function e(t,n,r){if("string"!=typeof n){if(q){var d=J(n);d&&d!==q&&e(t,d,r);}var o=K(n);W&&(o=o.concat(W(n)));for(var a=Z(t),i=Z(n),l=0;l<o.length;++l){var c=o[l];if(!(z[c]||r&&r[c]||i&&i[c]||a&&a[c])){var u=Y(n,c);try{Q(t,c,u);}catch(e){}}}}return t};function ee(){return (ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}var te=function(e,t){for(var n=[e[0]],r=0,d=t.length;r<d;r+=1)n.push(t[r],e[r+1]);return n},ne=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!A.exports.typeOf(e)},re=Object.freeze([]),de=Object.freeze({});function oe(e){return "function"==typeof e}function ae(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function ie(e){return e&&"string"==typeof e.styledComponentId}var le="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ce="undefined"!=typeof window&&"HTMLElement"in window,ue=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),se="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function fe(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t);})),e}function pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw "production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(fe.apply(void 0,[se[e]].concat(n)).trim())}var ye=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,d=r;e>=d;)(d<<=1)<0&&pe(16,""+e);this.groupSizes=new Uint32Array(d),this.groupSizes.set(n),this.length=d;for(var o=r;o<d;o++)this.groupSizes[o]=0;}for(var a=this.indexOfGroup(e+1),i=0,l=t.length;i<l;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++);},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var d=n;d<r;d++)this.tag.deleteRule(n);}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),d=r+n,o=r;o<d;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),$e=new Map,he=new Map,me=1,ge=function(e){if($e.has(e))return $e.get(e);for(;he.has(me);)me++;var t=me++;return "production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&pe(16,""+t),$e.set(e,t),he.set(t,e),t},ve=function(e){return he.get(e)},be=function(e,t){t>=me&&(me=t+1),$e.set(e,t),he.set(t,e);},we="style["+le+'][data-styled-version="5.3.6"]',Ce=new RegExp("^"+le+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Pe=function(e,t,n){for(var r,d=n.split(","),o=0,a=d.length;o<a;o++)(r=d[o])&&e.registerName(t,r);},Ee=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],d=0,o=n.length;d<o;d++){var a=n[d].trim();if(a){var i=a.match(Ce);if(i){var l=0|parseInt(i[1],10),c=i[2];0!==l&&(be(c,l),Pe(e,c,i[3]),e.getTag().insertRules(l,r)),r.length=0;}else r.push(a);}}},Se=function(e){var t=document.head,n=e||t,r=document.createElement("style"),d=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(le))return r}}(n),o=void 0!==d?d.nextSibling:null;r.setAttribute(le,"active"),r.setAttribute("data-styled-version","5.3.6");var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},Oe=function(){function e(e){var t=this.element=Se(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var d=t[n];if(d.ownerNode===e)return d}pe(17);}(t),this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Ae=function(){function e(e){var t=this.element=Se(e);this.nodes=t.childNodes,this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return !1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ke=function(){function e(e){this.rules=[],this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--;},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Me=ce,je={isServer:!ce,useCSSOMInjection:!ue},_e$1=function(){function e(e,t,n){void 0===e&&(e=de),void 0===t&&(t={}),this.options=ee({},je,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&ce&&Me&&(Me=!1,function(e){for(var t=document.querySelectorAll(we),n=0,r=t.length;n<r;n++){var d=t[n];d&&"active"!==d.getAttribute(le)&&(Ee(e,d),d.parentNode&&d.parentNode.removeChild(d));}}(this));}e.registerId=function(e){return ge(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(ee({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,d=t.target,e=n?new ke(d):r?new Oe(d):new Ae(d),new ye(e)));var e,t,n,r,d;},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(ge(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ge(e),n);},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},t.clearRules=function(e){this.getTag().clearGroup(ge(e)),this.clearNames(e);},t.clearTag=function(){this.tag=void 0;},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",d=0;d<n;d++){var o=ve(d);if(void 0!==o){var a=e.names.get(o),i=t.getGroup(d);if(a&&i&&a.size){var l=le+".g"+d+'[id="'+o+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",");})),r+=""+i+l+'{content:"'+c+'"}/*!sc*/\n';}}}return r}(this)},e}(),xe=/(a)(d)/gi,Te=function(e){return String.fromCharCode(e+(e>25?39:97))};function Re(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Te(t%52)+n;return (Te(t%52)+n).replace(xe,"$1-$2")}var Le=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},De=function(e){return Le(5381,e)};var Ne=De("5.3.6"),Ie=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oe(n)&&!ie(n))return !1}return !0}(e),this.componentId=t,this.baseHash=Le(Ne,t),this.baseStyle=n,_e$1.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,d=[];if(this.baseStyle&&d.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))d.push(this.staticRulesId);else {var o=qe(this.rules,e,t,n).join(""),a=Re(Le(this.baseHash,o)>>>0);if(!t.hasNameForId(r,a)){var i=n(o,"."+a,void 0,r);t.insertRules(r,a,i);}d.push(a),this.staticRulesId=a;}else {for(var l=this.rules.length,c=Le(this.baseHash,n.hash),u="",s=0;s<l;s++){var f=this.rules[s];if("string"==typeof f)u+=f,"production"!==process.env.NODE_ENV&&(c=Le(c,f+s));else if(f){var p=qe(f,e,t,n),y=Array.isArray(p)?p.join(""):p;c=Le(c,y+s),u+=y;}}if(u){var $=Re(c>>>0);if(!t.hasNameForId(r,$)){var h=n(u,"."+$,void 0,r);t.insertRules(r,$,h);}d.push($);}}return d.join(" ")},e}(),Be=/^\s*\/\/.*$/gm,Ve=[":","[",".","#"];var He=React__default["default"].createContext();He.Consumer;var Ue=React__default["default"].createContext(),ze=(Ue.Consumer,new _e$1),Ge=function(e){var t,n,r,d,o=void 0===e?de:e,a=o.options,i=void 0===a?de:a,l=o.plugins,c=void 0===l?re:l,u=new _(i),s=[],f=function(e){function t(t){if(t)try{e(t+"}");}catch(e){}}return function(n,r,d,o,a,i,l,c,u,s){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(d[0]+r),"";default:return r+(0===s?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t);}}}((function(e){s.push(e);})),p=function(e,r,o){return 0===r&&-1!==Ve.indexOf(o[n.length])||o.match(d)?e:"."+t};function y(e,o,a,i){void 0===i&&(i="&");var l=e.replace(Be,""),c=o&&a?a+" "+o+" { "+l+" }":l;return t=i,n=o,r=new RegExp("\\"+n+"\\b","g"),d=new RegExp("(\\"+n+"\\b){2,}"),u(a||!o?"":o,c)}return u.use([].concat(c,[function(e,t,d){2===e&&d.length&&d[0].lastIndexOf(n)>0&&(d[0]=d[0].replace(r,p));},f,function(e){if(-2===e){var t=s;return s=[],t}}])),y.hash=c.length?c.reduce((function(e,t){return t.name||pe(15),Le(e,t.name)}),5381).toString():"",y}();var Fe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ge);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.toString=function(){return pe(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t;}return e.prototype.getName=function(e){return void 0===e&&(e=Ge),this.name+e.hash},e}(),Ze=/([A-Z])/,Qe=/([A-Z])/g,Ke=/^ms-/,We=function(e){return "-"+e.toLowerCase()};function Ye(e){return Ze.test(e)?e.replace(Qe,We).replace(Ke,"-ms-"):e}var Je=function(e){return null==e||!1===e||""===e};function qe(e,t,n,r){if(Array.isArray(e)){for(var d,o=[],a=0,i=e.length;a<i;a+=1)""!==(d=qe(e[a],t,n,r))&&(Array.isArray(d)?o.push.apply(o,d):o.push(d));return o}if(Je(e))return "";if(ie(e))return "."+e.styledComponentId;if(oe(e)){if("function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return "production"!==process.env.NODE_ENV&&A.exports.isElement(l)&&console.warn(ae(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),qe(l,t,n,r)}var c;return e instanceof Fe?n?(e.inject(n,r),e.getName(r)):e:ne(e)?function e(t,n){var r,d,o=[];for(var a in t)t.hasOwnProperty(a)&&!Je(t[a])&&(Array.isArray(t[a])&&t[a].isCss||oe(t[a])?o.push(Ye(a)+":",t[a],";"):ne(t[a])?o.push.apply(o,e(t[a],a)):o.push(Ye(a)+": "+(r=a,(null==(d=t[a])||"boolean"==typeof d||""===d?"":"number"!=typeof d||0===d||r in x?String(d).trim():d+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString()}var Xe=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function et(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return oe(e)||ne(e)?Xe(qe(te(re,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Xe(qe(te(e,n)))}var tt=/invalid hook call/i,nt=new Set,rt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,dt=/(^-|-$)/g;function ot(e){return e.replace(rt,"-").replace(dt,"")}function at(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var it=function(e){return "function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},lt=function(e){return "__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ct(e,t,n){var r=e[n];it(t)&&it(r)?ut(r,t):e[n]=t;}function ut(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var d=0,o=n;d<o.length;d++){var a=o[d];if(it(a))for(var i in a)lt(i)&&ct(e,a[i],i);}return e}var st=React__default["default"].createContext();st.Consumer;var ft={};function pt(o,a,i){var l=ie(o),c=!at(o),u=a.attrs,s=void 0===u?re:u,f=a.componentId,p=void 0===f?function(e,t){var n="string"!=typeof e?"sc":ot(e);ft[n]=(ft[n]||0)+1;var r=n+"-"+function(e){return Re(De(e)>>>0)}("5.3.6"+n+ft[n]);return t?t+"-"+r:r}(a.displayName,a.parentComponentId):f,y=a.displayName,$=void 0===y?function(e){return at(e)?"styled."+e:"Styled("+ae(e)+")"}(o):y,h=a.displayName&&a.componentId?ot(a.displayName)+"-"+a.componentId:a.componentId||p,m=l&&o.attrs?Array.prototype.concat(o.attrs,s).filter(Boolean):s,g=a.shouldForwardProp;l&&o.shouldForwardProp&&(g=a.shouldForwardProp?function(e,t,n){return o.shouldForwardProp(e,t,n)&&a.shouldForwardProp(e,t,n)}:o.shouldForwardProp);var v,b=new Ie(i,h,l?o.componentStyle:void 0),w=b.isStatic&&0===s.length,C=function(e,t){return function(e,t,o,a){var i=e.attrs,l=e.componentStyle,c=e.defaultProps,u=e.foldedComponentIds,s=e.shouldForwardProp,f=e.styledComponentId,p=e.target;"production"!==process.env.NODE_ENV&&React.useDebugValue(f);var y=function(e,t,n){void 0===e&&(e=de);var r=ee({},t,{theme:e}),d={};return n.forEach((function(e){var t,n,o,a=e;for(t in oe(a)&&(a=a(r)),a)r[t]=d[t]="className"===t?(n=d[t],o=a[t],n&&o?n+" "+o:n||o):a[t];})),[r,d]}(function(e,t,n){return void 0===n&&(n=de),e.theme!==n.theme&&e.theme||t||n.theme}(t,React.useContext(st),c)||de,t,i),$=y[0],h=y[1],m=function(e,t,d,o){var a=React.useContext(He)||ze,i=React.useContext(Ue)||Ge,l=t?e.generateAndInjectStyles(de,a,i):e.generateAndInjectStyles(d,a,i);return "production"!==process.env.NODE_ENV&&React.useDebugValue(l),"production"!==process.env.NODE_ENV&&!t&&o&&o(l),l}(l,a,$,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),g=o,v=h.$as||t.$as||h.as||t.as||p,b=at(v),w=h!==t?ee({},t,{},h):t,C={};for(var P in w)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?C.as=w[P]:(s?s(P,D,v):!b||D(P))&&(C[P]=w[P]));return t.style&&h.style!==t.style&&(C.style=ee({},t.style,{},h.style)),C.className=Array.prototype.concat(u,f,m!==f?m:null,t.className,h.className).filter(Boolean).join(" "),C.ref=g,React.createElement(v,C)}(v,e,t,w)};return C.displayName=$,(v=React__default["default"].forwardRef(C)).attrs=m,v.componentStyle=b,v.displayName=$,v.shouldForwardProp=g,v.foldedComponentIds=l?Array.prototype.concat(o.foldedComponentIds,o.styledComponentId):re,v.styledComponentId=h,v.target=l?o.target:o,v.withComponent=function(e){var t=a.componentId,n=function(e,t){if(null==e)return {};var n,r,d={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(d[n]=e[n]);return d}(a,["componentId"]),r=t&&t+"-"+(at(e)?e:ot(ae(e)));return pt(e,ee({},n,{attrs:m,componentId:r}),i)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=l?ut({},o.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(function(e,n){if("production"!==process.env.NODE_ENV){var r="The component "+e+(n?' with the id of "'+n+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",d=console.error;try{var o=!0;console.error=function(e){if(tt.test(e))o=!1,nt.delete(r);else {for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];d.apply(void 0,[e].concat(n));}},React.useRef(),o&&!nt.has(r)&&(console.warn(r),nt.add(r));}catch(e){tt.test(e.message)&&nt.delete(r);}finally{console.error=d;}}}($,h),v.warnTooManyClasses=function(e,t){var n={},r=!1;return function(d){if(!r&&(n[d]=!0,Object.keys(n).length>=200)){var o=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+o+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={};}}}($,h)),v.toString=function(){return "."+v.styledComponentId},c&&X(v,o,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var yt=function(e){return function e(t,n,r){if(void 0===r&&(r=de),!A.exports.isValidElementType(n))return pe(1,String(n));var d=function(){return t(n,r,et.apply(void 0,arguments))};return d.withConfig=function(d){return e(t,n,ee({},r,{},d))},d.attrs=function(d){return e(t,n,ee({},r,{attrs:Array.prototype.concat(r.attrs,d).filter(Boolean)}))},d}(pt,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){yt[e]=yt(e);})),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);const $t=yt.div`
|
|
1302
|
+
*/!function(e){"production"===process.env.NODE_ENV?e.exports=function(){if(R)return I;R=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case o:case d:case s:return e;default:switch(e=e&&e.$$typeof){case i:case u:case y:case p:case a:return e;default:return f}}case n:return f}}}function b(e){return v(e)===c}return I.AsyncMode=l,I.ConcurrentMode=c,I.ContextConsumer=i,I.ContextProvider=a,I.Element=t,I.ForwardRef=u,I.Fragment=r,I.Lazy=y,I.Memo=p,I.Portal=n,I.Profiler=o,I.StrictMode=d,I.Suspense=s,I.isAsyncMode=function(e){return b(e)||v(e)===l},I.isConcurrentMode=b,I.isContextConsumer=function(e){return v(e)===i},I.isContextProvider=function(e){return v(e)===a},I.isElement=function(e){return "object"==typeof e&&null!==e&&e.$$typeof===t},I.isForwardRef=function(e){return v(e)===u},I.isFragment=function(e){return v(e)===r},I.isLazy=function(e){return v(e)===y},I.isMemo=function(e){return v(e)===p},I.isPortal=function(e){return v(e)===n},I.isProfiler=function(e){return v(e)===o},I.isStrictMode=function(e){return v(e)===d},I.isSuspense=function(e){return v(e)===s},I.isValidElementType=function(e){return "string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===d||e===s||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===g||e.$$typeof===$)},I.typeOf=v,I}():e.exports=(B||(B=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,d=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,s=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var $=e.type;switch($){case l:case c:case r:case o:case d:case s:return $;default:var h=$&&$.$$typeof;switch(h){case i:case u:case y:case p:case a:return h;default:return f}}case n:return f}}}var b=l,w=c,C=i,P=a,E=t,S=u,O=r,A=y,k=p,M=n,j=o,_=d,x=s,T=!1;function R(e){return v(e)===c}V.AsyncMode=b,V.ConcurrentMode=w,V.ContextConsumer=C,V.ContextProvider=P,V.Element=E,V.ForwardRef=S,V.Fragment=O,V.Lazy=A,V.Memo=k,V.Portal=M,V.Profiler=j,V.StrictMode=_,V.Suspense=x,V.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(e)||v(e)===l},V.isConcurrentMode=R,V.isContextConsumer=function(e){return v(e)===i},V.isContextProvider=function(e){return v(e)===a},V.isElement=function(e){return "object"==typeof e&&null!==e&&e.$$typeof===t},V.isForwardRef=function(e){return v(e)===u},V.isFragment=function(e){return v(e)===r},V.isLazy=function(e){return v(e)===y},V.isMemo=function(e){return v(e)===p},V.isPortal=function(e){return v(e)===n},V.isProfiler=function(e){return v(e)===o},V.isStrictMode=function(e){return v(e)===d},V.isSuspense=function(e){return v(e)===s},V.isValidElementType=function(e){return "string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===d||e===s||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===u||e.$$typeof===h||e.$$typeof===m||e.$$typeof===g||e.$$typeof===$)},V.typeOf=v;}()),V);}(N);var H=N.exports,U={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},G$1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},F={};function Z(e){return H.isMemo(e)?G$1:F[e.$$typeof]||U}F[H.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},F[H.Memo]=G$1;var Q=Object.defineProperty,K=Object.getOwnPropertyNames,W=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,J=Object.getPrototypeOf,q=Object.prototype;var X=function e(t,n,r){if("string"!=typeof n){if(q){var d=J(n);d&&d!==q&&e(t,d,r);}var o=K(n);W&&(o=o.concat(W(n)));for(var a=Z(t),i=Z(n),l=0;l<o.length;++l){var c=o[l];if(!(z[c]||r&&r[c]||i&&i[c]||a&&a[c])){var u=Y(n,c);try{Q(t,c,u);}catch(e){}}}}return t};function ee(){return (ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}return e}).apply(this,arguments)}var te=function(e,t){for(var n=[e[0]],r=0,d=t.length;r<d;r+=1)n.push(t[r],e[r+1]);return n},ne=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!A.exports.typeOf(e)},re=Object.freeze([]),de=Object.freeze({});function oe(e){return "function"==typeof e}function ae(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function ie(e){return e&&"string"==typeof e.styledComponentId}var le="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ce="undefined"!=typeof window&&"HTMLElement"in window,ue=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),se="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function fe(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t);})),e}function pe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw "production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(fe.apply(void 0,[se[e]].concat(n)).trim())}var ye=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,d=r;e>=d;)(d<<=1)<0&&pe(16,""+e);this.groupSizes=new Uint32Array(d),this.groupSizes.set(n),this.length=d;for(var o=r;o<d;o++)this.groupSizes[o]=0;}for(var a=this.indexOfGroup(e+1),i=0,l=t.length;i<l;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++);},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var d=n;d<r;d++)this.tag.deleteRule(n);}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),d=r+n,o=r;o<d;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),$e=new Map,he=new Map,me=1,ge=function(e){if($e.has(e))return $e.get(e);for(;he.has(me);)me++;var t=me++;return "production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&pe(16,""+t),$e.set(e,t),he.set(t,e),t},ve=function(e){return he.get(e)},be=function(e,t){t>=me&&(me=t+1),$e.set(e,t),he.set(t,e);},we="style["+le+'][data-styled-version="5.3.6"]',Ce=new RegExp("^"+le+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Pe=function(e,t,n){for(var r,d=n.split(","),o=0,a=d.length;o<a;o++)(r=d[o])&&e.registerName(t,r);},Ee=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],d=0,o=n.length;d<o;d++){var a=n[d].trim();if(a){var i=a.match(Ce);if(i){var l=0|parseInt(i[1],10),c=i[2];0!==l&&(be(c,l),Pe(e,c,i[3]),e.getTag().insertRules(l,r)),r.length=0;}else r.push(a);}}},Se=function(e){var t=document.head,n=e||t,r=document.createElement("style"),d=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(le))return r}}(n),o=void 0!==d?d.nextSibling:null;r.setAttribute(le,"active"),r.setAttribute("data-styled-version","5.3.6");var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},Oe=function(){function e(e){var t=this.element=Se(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var d=t[n];if(d.ownerNode===e)return d}pe(17);}(t),this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Ae=function(){function e(e){var t=this.element=Se(e);this.nodes=t.childNodes,this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return !1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),ke=function(){function e(e){this.rules=[],this.length=0;}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--;},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Me=ce,je={isServer:!ce,useCSSOMInjection:!ue},_e$1=function(){function e(e,t,n){void 0===e&&(e=de),void 0===t&&(t={}),this.options=ee({},je,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&ce&&Me&&(Me=!1,function(e){for(var t=document.querySelectorAll(we),n=0,r=t.length;n<r;n++){var d=t[n];d&&"active"!==d.getAttribute(le)&&(Ee(e,d),d.parentNode&&d.parentNode.removeChild(d));}}(this));}e.registerId=function(e){return ge(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(ee({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,d=t.target,e=n?new ke(d):r?new Oe(d):new Ae(d),new ye(e)));var e,t,n,r,d;},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(ge(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(ge(e),n);},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},t.clearRules=function(e){this.getTag().clearGroup(ge(e)),this.clearNames(e);},t.clearTag=function(){this.tag=void 0;},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",d=0;d<n;d++){var o=ve(d);if(void 0!==o){var a=e.names.get(o),i=t.getGroup(d);if(a&&i&&a.size){var l=le+".g"+d+'[id="'+o+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",");})),r+=""+i+l+'{content:"'+c+'"}/*!sc*/\n';}}}return r}(this)},e}(),xe=/(a)(d)/gi,Te=function(e){return String.fromCharCode(e+(e>25?39:97))};function Re(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Te(t%52)+n;return (Te(t%52)+n).replace(xe,"$1-$2")}var Le=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},De=function(e){return Le(5381,e)};var Ne=De("5.3.6"),Ie=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oe(n)&&!ie(n))return !1}return !0}(e),this.componentId=t,this.baseHash=Le(Ne,t),this.baseStyle=n,_e$1.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,d=[];if(this.baseStyle&&d.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))d.push(this.staticRulesId);else {var o=qe(this.rules,e,t,n).join(""),a=Re(Le(this.baseHash,o)>>>0);if(!t.hasNameForId(r,a)){var i=n(o,"."+a,void 0,r);t.insertRules(r,a,i);}d.push(a),this.staticRulesId=a;}else {for(var l=this.rules.length,c=Le(this.baseHash,n.hash),u="",s=0;s<l;s++){var f=this.rules[s];if("string"==typeof f)u+=f,"production"!==process.env.NODE_ENV&&(c=Le(c,f+s));else if(f){var p=qe(f,e,t,n),y=Array.isArray(p)?p.join(""):p;c=Le(c,y+s),u+=y;}}if(u){var $=Re(c>>>0);if(!t.hasNameForId(r,$)){var h=n(u,"."+$,void 0,r);t.insertRules(r,$,h);}d.push($);}}return d.join(" ")},e}(),Be=/^\s*\/\/.*$/gm,Ve=[":","[",".","#"];var He=React__default["default"].createContext();He.Consumer;var Ue=React__default["default"].createContext(),ze=(Ue.Consumer,new _e$1),Ge=function(e){var t,n,r,d,o=void 0===e?de:e,a=o.options,i=void 0===a?de:a,l=o.plugins,c=void 0===l?re:l,u=new _(i),s=[],f=function(e){function t(t){if(t)try{e(t+"}");}catch(e){}}return function(n,r,d,o,a,i,l,c,u,s){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(d[0]+r),"";default:return r+(0===s?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t);}}}((function(e){s.push(e);})),p=function(e,r,o){return 0===r&&-1!==Ve.indexOf(o[n.length])||o.match(d)?e:"."+t};function y(e,o,a,i){void 0===i&&(i="&");var l=e.replace(Be,""),c=o&&a?a+" "+o+" { "+l+" }":l;return t=i,n=o,r=new RegExp("\\"+n+"\\b","g"),d=new RegExp("(\\"+n+"\\b){2,}"),u(a||!o?"":o,c)}return u.use([].concat(c,[function(e,t,d){2===e&&d.length&&d[0].lastIndexOf(n)>0&&(d[0]=d[0].replace(r,p));},f,function(e){if(-2===e){var t=s;return s=[],t}}])),y.hash=c.length?c.reduce((function(e,t){return t.name||pe(15),Le(e,t.name)}),5381).toString():"",y}();var Fe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Ge);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.toString=function(){return pe(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t;}return e.prototype.getName=function(e){return void 0===e&&(e=Ge),this.name+e.hash},e}(),Ze=/([A-Z])/,Qe=/([A-Z])/g,Ke=/^ms-/,We=function(e){return "-"+e.toLowerCase()};function Ye(e){return Ze.test(e)?e.replace(Qe,We).replace(Ke,"-ms-"):e}var Je=function(e){return null==e||!1===e||""===e};function qe(e,t,n,r){if(Array.isArray(e)){for(var d,o=[],a=0,i=e.length;a<i;a+=1)""!==(d=qe(e[a],t,n,r))&&(Array.isArray(d)?o.push.apply(o,d):o.push(d));return o}if(Je(e))return "";if(ie(e))return "."+e.styledComponentId;if(oe(e)){if("function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t)return e;var l=e(t);return "production"!==process.env.NODE_ENV&&A.exports.isElement(l)&&console.warn(ae(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),qe(l,t,n,r)}var c;return e instanceof Fe?n?(e.inject(n,r),e.getName(r)):e:ne(e)?function e(t,n){var r,d,o=[];for(var a in t)t.hasOwnProperty(a)&&!Je(t[a])&&(Array.isArray(t[a])&&t[a].isCss||oe(t[a])?o.push(Ye(a)+":",t[a],";"):ne(t[a])?o.push.apply(o,e(t[a],a)):o.push(Ye(a)+": "+(r=a,(null==(d=t[a])||"boolean"==typeof d||""===d?"":"number"!=typeof d||0===d||r in x?String(d).trim():d+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString()}var Xe=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function et(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return oe(e)||ne(e)?Xe(qe(te(re,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:Xe(qe(te(e,n)))}var tt=/invalid hook call/i,nt=new Set,rt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,dt=/(^-|-$)/g;function ot(e){return e.replace(rt,"-").replace(dt,"")}function at(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var it=function(e){return "function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},lt=function(e){return "__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ct(e,t,n){var r=e[n];it(t)&&it(r)?ut(r,t):e[n]=t;}function ut(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var d=0,o=n;d<o.length;d++){var a=o[d];if(it(a))for(var i in a)lt(i)&&ct(e,a[i],i);}return e}var st=React__default["default"].createContext();st.Consumer;var ft={};function pt(o,a,i){var l=ie(o),c=!at(o),u=a.attrs,s=void 0===u?re:u,f=a.componentId,p=void 0===f?function(e,t){var n="string"!=typeof e?"sc":ot(e);ft[n]=(ft[n]||0)+1;var r=n+"-"+function(e){return Re(De(e)>>>0)}("5.3.6"+n+ft[n]);return t?t+"-"+r:r}(a.displayName,a.parentComponentId):f,y=a.displayName,$=void 0===y?function(e){return at(e)?"styled."+e:"Styled("+ae(e)+")"}(o):y,h=a.displayName&&a.componentId?ot(a.displayName)+"-"+a.componentId:a.componentId||p,m=l&&o.attrs?Array.prototype.concat(o.attrs,s).filter(Boolean):s,g=a.shouldForwardProp;l&&o.shouldForwardProp&&(g=a.shouldForwardProp?function(e,t,n){return o.shouldForwardProp(e,t,n)&&a.shouldForwardProp(e,t,n)}:o.shouldForwardProp);var v,b=new Ie(i,h,l?o.componentStyle:void 0),w=b.isStatic&&0===s.length,C=function(e,t){return function(e,t,o,a){var i=e.attrs,l=e.componentStyle,c=e.defaultProps,u=e.foldedComponentIds,s=e.shouldForwardProp,f=e.styledComponentId,p=e.target;"production"!==process.env.NODE_ENV&&React.useDebugValue(f);var y=function(e,t,n){void 0===e&&(e=de);var r=ee({},t,{theme:e}),d={};return n.forEach((function(e){var t,n,o,a=e;for(t in oe(a)&&(a=a(r)),a)r[t]=d[t]="className"===t?(n=d[t],o=a[t],n&&o?n+" "+o:n||o):a[t];})),[r,d]}(function(e,t,n){return void 0===n&&(n=de),e.theme!==n.theme&&e.theme||t||n.theme}(t,React.useContext(st),c)||de,t,i),$=y[0],h=y[1],m=function(e,t,d,o){var a=React.useContext(He)||ze,i=React.useContext(Ue)||Ge,l=t?e.generateAndInjectStyles(de,a,i):e.generateAndInjectStyles(d,a,i);return "production"!==process.env.NODE_ENV&&React.useDebugValue(l),"production"!==process.env.NODE_ENV&&!t&&o&&o(l),l}(l,a,$,"production"!==process.env.NODE_ENV?e.warnTooManyClasses:void 0),g=o,v=h.$as||t.$as||h.as||t.as||p,b=at(v),w=h!==t?ee({},t,{},h):t,C={};for(var P in w)"$"!==P[0]&&"as"!==P&&("forwardedAs"===P?C.as=w[P]:(s?s(P,D,v):!b||D(P))&&(C[P]=w[P]));return t.style&&h.style!==t.style&&(C.style=ee({},t.style,{},h.style)),C.className=Array.prototype.concat(u,f,m!==f?m:null,t.className,h.className).filter(Boolean).join(" "),C.ref=g,React.createElement(v,C)}(v,e,t,w)};return C.displayName=$,(v=React__default["default"].forwardRef(C)).attrs=m,v.componentStyle=b,v.displayName=$,v.shouldForwardProp=g,v.foldedComponentIds=l?Array.prototype.concat(o.foldedComponentIds,o.styledComponentId):re,v.styledComponentId=h,v.target=l?o.target:o,v.withComponent=function(e){var t=a.componentId,n=function(e,t){if(null==e)return {};var n,r,d={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(d[n]=e[n]);return d}(a,["componentId"]),r=t&&t+"-"+(at(e)?e:ot(ae(e)));return pt(e,ee({},n,{attrs:m,componentId:r}),i)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=l?ut({},o.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(function(e,n){if("production"!==process.env.NODE_ENV){var r="The component "+e+(n?' with the id of "'+n+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",d=console.error;try{var o=!0;console.error=function(e){if(tt.test(e))o=!1,nt.delete(r);else {for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];d.apply(void 0,[e].concat(n));}},React.useRef(),o&&!nt.has(r)&&(console.warn(r),nt.add(r));}catch(e){tt.test(e.message)&&nt.delete(r);}finally{console.error=d;}}}($,h),v.warnTooManyClasses=function(e,t){var n={},r=!1;return function(d){if(!r&&(n[d]=!0,Object.keys(n).length>=200)){var o=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+o+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={};}}}($,h)),v.toString=function(){return "."+v.styledComponentId},c&&X(v,o,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var yt=function(e){return function e(t,n,r){if(void 0===r&&(r=de),!A.exports.isValidElementType(n))return pe(1,String(n));var d=function(){return t(n,r,et.apply(void 0,arguments))};return d.withConfig=function(d){return e(t,n,ee({},r,{},d))},d.attrs=function(d){return e(t,n,ee({},r,{attrs:Array.prototype.concat(r.attrs,d).filter(Boolean)}))},d}(pt,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){yt[e]=yt(e);})),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);const $t=yt.div`
|
|
1303
1303
|
height: ${e=>e.size};
|
|
1304
1304
|
width: ${e=>e.size};
|
|
1305
1305
|
svg {
|
|
@@ -2437,7 +2437,7 @@ function toArray$1(value) {
|
|
|
2437
2437
|
function mapContext(mapper, context, _event) {
|
|
2438
2438
|
var e_5, _a;
|
|
2439
2439
|
|
|
2440
|
-
if (isFunction$
|
|
2440
|
+
if (isFunction$3(mapper)) {
|
|
2441
2441
|
return mapper(context, _event.data);
|
|
2442
2442
|
}
|
|
2443
2443
|
|
|
@@ -2448,7 +2448,7 @@ function mapContext(mapper, context, _event) {
|
|
|
2448
2448
|
var key = _c.value;
|
|
2449
2449
|
var subMapper = mapper[key];
|
|
2450
2450
|
|
|
2451
|
-
if (isFunction$
|
|
2451
|
+
if (isFunction$3(subMapper)) {
|
|
2452
2452
|
result[key] = subMapper(context, _event.data);
|
|
2453
2453
|
} else {
|
|
2454
2454
|
result[key] = subMapper;
|
|
@@ -2477,7 +2477,7 @@ function isPromiseLike(value) {
|
|
|
2477
2477
|
} // Check if shape matches the Promise/A+ specification for a "thenable".
|
|
2478
2478
|
|
|
2479
2479
|
|
|
2480
|
-
if (value !== null && (isFunction$
|
|
2480
|
+
if (value !== null && (isFunction$3(value) || typeof value === 'object') && isFunction$3(value.then)) {
|
|
2481
2481
|
return true;
|
|
2482
2482
|
}
|
|
2483
2483
|
|
|
@@ -2557,14 +2557,14 @@ function updateContext(context, _event, assignActions, state) {
|
|
|
2557
2557
|
};
|
|
2558
2558
|
var partialUpdate = {};
|
|
2559
2559
|
|
|
2560
|
-
if (isFunction$
|
|
2560
|
+
if (isFunction$3(assignment)) {
|
|
2561
2561
|
partialUpdate = assignment(acc, _event.data, meta);
|
|
2562
2562
|
} else {
|
|
2563
2563
|
try {
|
|
2564
2564
|
for (var _b = __values$1(Object.keys(assignment)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2565
2565
|
var key = _c.value;
|
|
2566
2566
|
var propAssignment = assignment[key];
|
|
2567
|
-
partialUpdate[key] = isFunction$
|
|
2567
|
+
partialUpdate[key] = isFunction$3(propAssignment) ? propAssignment(acc, _event.data, meta) : propAssignment;
|
|
2568
2568
|
}
|
|
2569
2569
|
} catch (e_7_1) {
|
|
2570
2570
|
e_7 = {
|
|
@@ -2610,7 +2610,7 @@ function isArray$1(value) {
|
|
|
2610
2610
|
return Array.isArray(value);
|
|
2611
2611
|
} // tslint:disable-next-line:ban-types
|
|
2612
2612
|
|
|
2613
|
-
function isFunction$
|
|
2613
|
+
function isFunction$3(value) {
|
|
2614
2614
|
return typeof value === 'function';
|
|
2615
2615
|
}
|
|
2616
2616
|
function isString$2(value) {
|
|
@@ -2629,7 +2629,7 @@ function toGuard(condition, guardMap) {
|
|
|
2629
2629
|
};
|
|
2630
2630
|
}
|
|
2631
2631
|
|
|
2632
|
-
if (isFunction$
|
|
2632
|
+
if (isFunction$3(condition)) {
|
|
2633
2633
|
return {
|
|
2634
2634
|
type: DEFAULT_GUARD_TYPE$1,
|
|
2635
2635
|
name: condition.name,
|
|
@@ -2641,7 +2641,7 @@ function toGuard(condition, guardMap) {
|
|
|
2641
2641
|
}
|
|
2642
2642
|
function isObservable(value) {
|
|
2643
2643
|
try {
|
|
2644
|
-
return 'subscribe' in value && isFunction$
|
|
2644
|
+
return 'subscribe' in value && isFunction$3(value.subscribe);
|
|
2645
2645
|
} catch (e) {
|
|
2646
2646
|
return false;
|
|
2647
2647
|
}
|
|
@@ -2786,7 +2786,7 @@ function toActionObject$1(action, actionFunctionMap) {
|
|
|
2786
2786
|
if (isString$2(action) || typeof action === 'number') {
|
|
2787
2787
|
var exec = getActionFunction$1(action, actionFunctionMap);
|
|
2788
2788
|
|
|
2789
|
-
if (isFunction$
|
|
2789
|
+
if (isFunction$3(exec)) {
|
|
2790
2790
|
actionObject = {
|
|
2791
2791
|
type: action,
|
|
2792
2792
|
exec: exec
|
|
@@ -2799,7 +2799,7 @@ function toActionObject$1(action, actionFunctionMap) {
|
|
|
2799
2799
|
exec: undefined
|
|
2800
2800
|
};
|
|
2801
2801
|
}
|
|
2802
|
-
} else if (isFunction$
|
|
2802
|
+
} else if (isFunction$3(action)) {
|
|
2803
2803
|
actionObject = {
|
|
2804
2804
|
// Convert action to string if unnamed
|
|
2805
2805
|
type: action.name || action.toString(),
|
|
@@ -2808,7 +2808,7 @@ function toActionObject$1(action, actionFunctionMap) {
|
|
|
2808
2808
|
} else {
|
|
2809
2809
|
var exec = getActionFunction$1(action.type, actionFunctionMap);
|
|
2810
2810
|
|
|
2811
|
-
if (isFunction$
|
|
2811
|
+
if (isFunction$3(exec)) {
|
|
2812
2812
|
actionObject = __assign$2(__assign$2({}, action), {
|
|
2813
2813
|
exec: exec
|
|
2814
2814
|
});
|
|
@@ -2861,14 +2861,14 @@ function resolveRaise$1(action, ctx, _event, delaysMap) {
|
|
|
2861
2861
|
var meta = {
|
|
2862
2862
|
_event: _event
|
|
2863
2863
|
};
|
|
2864
|
-
var resolvedEvent = toSCXMLEvent(isFunction$
|
|
2864
|
+
var resolvedEvent = toSCXMLEvent(isFunction$3(action.event) ? action.event(ctx, _event.data, meta) : action.event);
|
|
2865
2865
|
var resolvedDelay;
|
|
2866
2866
|
|
|
2867
2867
|
if (isString$2(action.delay)) {
|
|
2868
2868
|
var configDelay = delaysMap && delaysMap[action.delay];
|
|
2869
|
-
resolvedDelay = isFunction$
|
|
2869
|
+
resolvedDelay = isFunction$3(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
|
|
2870
2870
|
} else {
|
|
2871
|
-
resolvedDelay = isFunction$
|
|
2871
|
+
resolvedDelay = isFunction$3(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
|
|
2872
2872
|
}
|
|
2873
2873
|
|
|
2874
2874
|
return __assign$2(__assign$2({}, action), {
|
|
@@ -2894,11 +2894,11 @@ function send$3(event, options) {
|
|
|
2894
2894
|
return {
|
|
2895
2895
|
to: options ? options.to : undefined,
|
|
2896
2896
|
type: send$4,
|
|
2897
|
-
event: isFunction$
|
|
2897
|
+
event: isFunction$3(event) ? event : toEventObject(event),
|
|
2898
2898
|
delay: options ? options.delay : undefined,
|
|
2899
2899
|
// TODO: don't auto-generate IDs here like that
|
|
2900
2900
|
// there is too big chance of the ID collision
|
|
2901
|
-
id: options && options.id !== undefined ? options.id : isFunction$
|
|
2901
|
+
id: options && options.id !== undefined ? options.id : isFunction$3(event) ? event.name : getEventType(event)
|
|
2902
2902
|
};
|
|
2903
2903
|
}
|
|
2904
2904
|
function resolveSend$1(action, ctx, _event, delaysMap) {
|
|
@@ -2906,17 +2906,17 @@ function resolveSend$1(action, ctx, _event, delaysMap) {
|
|
|
2906
2906
|
_event: _event
|
|
2907
2907
|
}; // TODO: helper function for resolving Expr
|
|
2908
2908
|
|
|
2909
|
-
var resolvedEvent = toSCXMLEvent(isFunction$
|
|
2909
|
+
var resolvedEvent = toSCXMLEvent(isFunction$3(action.event) ? action.event(ctx, _event.data, meta) : action.event);
|
|
2910
2910
|
var resolvedDelay;
|
|
2911
2911
|
|
|
2912
2912
|
if (isString$2(action.delay)) {
|
|
2913
2913
|
var configDelay = delaysMap && delaysMap[action.delay];
|
|
2914
|
-
resolvedDelay = isFunction$
|
|
2914
|
+
resolvedDelay = isFunction$3(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
|
|
2915
2915
|
} else {
|
|
2916
|
-
resolvedDelay = isFunction$
|
|
2916
|
+
resolvedDelay = isFunction$3(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
|
|
2917
2917
|
}
|
|
2918
2918
|
|
|
2919
|
-
var resolvedTarget = isFunction$
|
|
2919
|
+
var resolvedTarget = isFunction$3(action.to) ? action.to(ctx, _event.data, meta) : action.to;
|
|
2920
2920
|
return __assign$2(__assign$2({}, action), {
|
|
2921
2921
|
to: resolvedTarget,
|
|
2922
2922
|
_event: resolvedEvent,
|
|
@@ -2978,7 +2978,7 @@ function start$2(activity) {
|
|
|
2978
2978
|
*/
|
|
2979
2979
|
|
|
2980
2980
|
function stop$2(actorRef) {
|
|
2981
|
-
var activity = isFunction$
|
|
2981
|
+
var activity = isFunction$3(actorRef) ? actorRef : toActivityDefinition$1(actorRef);
|
|
2982
2982
|
return {
|
|
2983
2983
|
type: ActionTypes.Stop,
|
|
2984
2984
|
activity: activity,
|
|
@@ -2986,7 +2986,7 @@ function stop$2(actorRef) {
|
|
|
2986
2986
|
};
|
|
2987
2987
|
}
|
|
2988
2988
|
function resolveStop$1(action, context, _event) {
|
|
2989
|
-
var actorRefOrString = isFunction$
|
|
2989
|
+
var actorRefOrString = isFunction$3(action.activity) ? action.activity(context, _event.data) : action.activity;
|
|
2990
2990
|
var resolvedActorRef = typeof actorRefOrString === 'string' ? {
|
|
2991
2991
|
id: actorRefOrString
|
|
2992
2992
|
} : actorRefOrString;
|
|
@@ -4010,7 +4010,7 @@ var registry = {
|
|
|
4010
4010
|
}
|
|
4011
4011
|
};
|
|
4012
4012
|
|
|
4013
|
-
function getGlobal$
|
|
4013
|
+
function getGlobal$2() {
|
|
4014
4014
|
if (typeof globalThis !== 'undefined') {
|
|
4015
4015
|
return globalThis;
|
|
4016
4016
|
}
|
|
@@ -4033,7 +4033,7 @@ function getGlobal$1() {
|
|
|
4033
4033
|
}
|
|
4034
4034
|
|
|
4035
4035
|
function getDevTools() {
|
|
4036
|
-
var global = getGlobal$
|
|
4036
|
+
var global = getGlobal$2();
|
|
4037
4037
|
|
|
4038
4038
|
if (global && '__xstate__' in global) {
|
|
4039
4039
|
return global.__xstate__;
|
|
@@ -4043,7 +4043,7 @@ function getDevTools() {
|
|
|
4043
4043
|
}
|
|
4044
4044
|
|
|
4045
4045
|
function registerService(service) {
|
|
4046
|
-
if (!getGlobal$
|
|
4046
|
+
if (!getGlobal$2()) {
|
|
4047
4047
|
return;
|
|
4048
4048
|
}
|
|
4049
4049
|
|
|
@@ -4260,7 +4260,7 @@ function () {
|
|
|
4260
4260
|
}
|
|
4261
4261
|
|
|
4262
4262
|
var actionOrExec = action.exec || getActionFunction$1(action.type, actionFunctionMap);
|
|
4263
|
-
var exec = isFunction$
|
|
4263
|
+
var exec = isFunction$3(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec;
|
|
4264
4264
|
|
|
4265
4265
|
if (exec) {
|
|
4266
4266
|
try {
|
|
@@ -4362,7 +4362,7 @@ function () {
|
|
|
4362
4362
|
return;
|
|
4363
4363
|
}
|
|
4364
4364
|
|
|
4365
|
-
var source = isFunction$
|
|
4365
|
+
var source = isFunction$3(serviceCreator) ? serviceCreator(context, _event.data, {
|
|
4366
4366
|
data: resolvedData,
|
|
4367
4367
|
src: invokeSource,
|
|
4368
4368
|
meta: activity.meta
|
|
@@ -4776,7 +4776,7 @@ function () {
|
|
|
4776
4776
|
Interpreter.prototype._stopChildren = function () {
|
|
4777
4777
|
// TODO: think about converting those to actions
|
|
4778
4778
|
this.children.forEach(function (child) {
|
|
4779
|
-
if (isFunction$
|
|
4779
|
+
if (isFunction$3(child.stop)) {
|
|
4780
4780
|
child.stop();
|
|
4781
4781
|
}
|
|
4782
4782
|
});
|
|
@@ -5141,7 +5141,7 @@ function () {
|
|
|
5141
5141
|
|
|
5142
5142
|
this.removeChild(childId);
|
|
5143
5143
|
|
|
5144
|
-
if (isFunction$
|
|
5144
|
+
if (isFunction$3(child.stop)) {
|
|
5145
5145
|
child.stop();
|
|
5146
5146
|
}
|
|
5147
5147
|
};
|
|
@@ -5153,7 +5153,7 @@ function () {
|
|
|
5153
5153
|
|
|
5154
5154
|
if (isPromiseLike(entity)) {
|
|
5155
5155
|
return this.spawnPromise(Promise.resolve(entity), name);
|
|
5156
|
-
} else if (isFunction$
|
|
5156
|
+
} else if (isFunction$3(entity)) {
|
|
5157
5157
|
return this.spawnCallback(entity, name);
|
|
5158
5158
|
} else if (isSpawnedActor(entity)) {
|
|
5159
5159
|
return this.spawnActor(entity, name);
|
|
@@ -5375,7 +5375,7 @@ function () {
|
|
|
5375
5375
|
stop: function () {
|
|
5376
5376
|
canceled = true;
|
|
5377
5377
|
|
|
5378
|
-
if (isFunction$
|
|
5378
|
+
if (isFunction$3(callbackStop)) {
|
|
5379
5379
|
callbackStop();
|
|
5380
5380
|
}
|
|
5381
5381
|
},
|
|
@@ -5497,7 +5497,7 @@ function () {
|
|
|
5497
5497
|
};
|
|
5498
5498
|
|
|
5499
5499
|
Interpreter.prototype.attachDev = function () {
|
|
5500
|
-
var global = getGlobal$
|
|
5500
|
+
var global = getGlobal$2();
|
|
5501
5501
|
|
|
5502
5502
|
if (this.options.devTools && global) {
|
|
5503
5503
|
if (global.__REDUX_DEVTOOLS_EXTENSION__) {
|
|
@@ -5585,7 +5585,7 @@ function spawn(entity, nameOrOptions) {
|
|
|
5585
5585
|
var resolvedOptions = resolveSpawnOptions(nameOrOptions);
|
|
5586
5586
|
return consume(function (service) {
|
|
5587
5587
|
if (!IS_PRODUCTION$1) {
|
|
5588
|
-
var isLazyEntity = isMachine(entity) || isFunction$
|
|
5588
|
+
var isLazyEntity = isMachine(entity) || isFunction$3(entity);
|
|
5589
5589
|
warn$1(!!service || isLazyEntity, "Attempted to spawn an Actor (ID: \"".concat(isMachine(entity) ? entity.id : 'undefined', "\") outside of a service. This will have no effect."));
|
|
5590
5590
|
}
|
|
5591
5591
|
|
|
@@ -5798,7 +5798,7 @@ function () {
|
|
|
5798
5798
|
id: invokeId,
|
|
5799
5799
|
src: invokeConfig.src
|
|
5800
5800
|
}));
|
|
5801
|
-
} else if (isMachine(invokeConfig.src) || isFunction$
|
|
5801
|
+
} else if (isMachine(invokeConfig.src) || isFunction$3(invokeConfig.src)) {
|
|
5802
5802
|
var invokeId = invokeConfig.id || createInvokeId(_this.id, i);
|
|
5803
5803
|
_this.machine.options.services = __assign$2((_b = {}, _b[invokeId] = invokeConfig.src, _b), _this.machine.options.services);
|
|
5804
5804
|
return toInvokeDefinition(__assign$2(__assign$2({
|
|
@@ -5871,7 +5871,7 @@ function () {
|
|
|
5871
5871
|
|
|
5872
5872
|
Object.defineProperty(StateNode.prototype, "context", {
|
|
5873
5873
|
get: function () {
|
|
5874
|
-
return isFunction$
|
|
5874
|
+
return isFunction$3(this._context) ? this._context() : this._context;
|
|
5875
5875
|
},
|
|
5876
5876
|
enumerable: false,
|
|
5877
5877
|
configurable: true
|
|
@@ -5979,7 +5979,7 @@ function () {
|
|
|
5979
5979
|
}
|
|
5980
5980
|
|
|
5981
5981
|
var mutateEntryExit = function (delay, i) {
|
|
5982
|
-
var delayRef = isFunction$
|
|
5982
|
+
var delayRef = isFunction$3(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
|
|
5983
5983
|
var eventType = after$2(delayRef, _this.id);
|
|
5984
5984
|
|
|
5985
5985
|
_this.onEntry.push(send$3(eventType, {
|
|
@@ -35037,7 +35037,7 @@ const prod_config = {
|
|
|
35037
35037
|
const config$1 = (configEnv) => {
|
|
35038
35038
|
let env = configEnv;
|
|
35039
35039
|
try {
|
|
35040
|
-
env !== null && env !== void 0 ? env : (env = "
|
|
35040
|
+
env !== null && env !== void 0 ? env : (env = "staging");
|
|
35041
35041
|
}
|
|
35042
35042
|
catch (_a) { }
|
|
35043
35043
|
switch (env) {
|
|
@@ -35056,8 +35056,8 @@ const configGenerator = () => {
|
|
|
35056
35056
|
let environment;
|
|
35057
35057
|
let release;
|
|
35058
35058
|
try {
|
|
35059
|
-
environment !== null && environment !== void 0 ? environment : (environment = "
|
|
35060
|
-
release !== null && release !== void 0 ? release : (release = "1.1.
|
|
35059
|
+
environment !== null && environment !== void 0 ? environment : (environment = "staging");
|
|
35060
|
+
release !== null && release !== void 0 ? release : (release = "1.1.68");
|
|
35061
35061
|
}
|
|
35062
35062
|
catch (_a) {
|
|
35063
35063
|
console.error('sentry configGenerator error');
|
|
@@ -36004,7 +36004,7 @@ function queryString(object) {
|
|
|
36004
36004
|
}).join('&');
|
|
36005
36005
|
}
|
|
36006
36006
|
|
|
36007
|
-
function getGlobal(key) {
|
|
36007
|
+
function getGlobal$1(key) {
|
|
36008
36008
|
if (window[key]) {
|
|
36009
36009
|
return window[key];
|
|
36010
36010
|
}
|
|
@@ -36030,7 +36030,7 @@ function getSDK(url, sdkGlobal) {
|
|
|
36030
36030
|
return true;
|
|
36031
36031
|
};
|
|
36032
36032
|
var fetchScript = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : _loadScript["default"];
|
|
36033
|
-
var existingGlobal = getGlobal(sdkGlobal);
|
|
36033
|
+
var existingGlobal = getGlobal$1(sdkGlobal);
|
|
36034
36034
|
|
|
36035
36035
|
if (existingGlobal && isLoaded(existingGlobal)) {
|
|
36036
36036
|
return Promise.resolve(existingGlobal);
|
|
@@ -36064,7 +36064,7 @@ function getSDK(url, sdkGlobal) {
|
|
|
36064
36064
|
|
|
36065
36065
|
window[sdkReady] = function () {
|
|
36066
36066
|
if (previousOnReady) previousOnReady();
|
|
36067
|
-
onLoaded(getGlobal(sdkGlobal));
|
|
36067
|
+
onLoaded(getGlobal$1(sdkGlobal));
|
|
36068
36068
|
};
|
|
36069
36069
|
}
|
|
36070
36070
|
|
|
@@ -36077,7 +36077,7 @@ function getSDK(url, sdkGlobal) {
|
|
|
36077
36077
|
});
|
|
36078
36078
|
requests[url] = null;
|
|
36079
36079
|
} else if (!sdkReady) {
|
|
36080
|
-
onLoaded(getGlobal(sdkGlobal));
|
|
36080
|
+
onLoaded(getGlobal$1(sdkGlobal));
|
|
36081
36081
|
}
|
|
36082
36082
|
});
|
|
36083
36083
|
});
|
|
@@ -41365,6 +41365,13 @@ const VideoTimeBar = ({ duration, currentTime, isThinkingTime, onChangeTime, })
|
|
|
41365
41365
|
`, style: { width: `${isTimeChangeable ? indicatorPosition : progress}%` } })));
|
|
41366
41366
|
};
|
|
41367
41367
|
|
|
41368
|
+
/**
|
|
41369
|
+
* Create a bound version of a function with a specified `this` context
|
|
41370
|
+
*
|
|
41371
|
+
* @param {Function} fn - The function to bind
|
|
41372
|
+
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
41373
|
+
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
41374
|
+
*/
|
|
41368
41375
|
function bind$1(fn, thisArg) {
|
|
41369
41376
|
return function wrap() {
|
|
41370
41377
|
return fn.apply(thisArg, arguments);
|
|
@@ -41373,30 +41380,30 @@ function bind$1(fn, thisArg) {
|
|
|
41373
41380
|
|
|
41374
41381
|
// utils is a library of generic helper functions non-specific to axios
|
|
41375
41382
|
|
|
41376
|
-
const {toString} = Object.prototype;
|
|
41377
|
-
const {getPrototypeOf} = Object;
|
|
41378
|
-
const {iterator, toStringTag} = Symbol;
|
|
41383
|
+
const { toString } = Object.prototype;
|
|
41384
|
+
const { getPrototypeOf } = Object;
|
|
41385
|
+
const { iterator, toStringTag } = Symbol;
|
|
41379
41386
|
|
|
41380
|
-
const kindOf = (cache => thing => {
|
|
41381
|
-
|
|
41382
|
-
|
|
41387
|
+
const kindOf = ((cache) => (thing) => {
|
|
41388
|
+
const str = toString.call(thing);
|
|
41389
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
41383
41390
|
})(Object.create(null));
|
|
41384
41391
|
|
|
41385
41392
|
const kindOfTest = (type) => {
|
|
41386
41393
|
type = type.toLowerCase();
|
|
41387
|
-
return (thing) => kindOf(thing) === type
|
|
41394
|
+
return (thing) => kindOf(thing) === type;
|
|
41388
41395
|
};
|
|
41389
41396
|
|
|
41390
|
-
const typeOfTest = type => thing => typeof thing === type;
|
|
41397
|
+
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
41391
41398
|
|
|
41392
41399
|
/**
|
|
41393
|
-
* Determine if a value is
|
|
41400
|
+
* Determine if a value is a non-null object
|
|
41394
41401
|
*
|
|
41395
41402
|
* @param {Object} val The value to test
|
|
41396
41403
|
*
|
|
41397
41404
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
41398
41405
|
*/
|
|
41399
|
-
const {isArray} = Array;
|
|
41406
|
+
const { isArray } = Array;
|
|
41400
41407
|
|
|
41401
41408
|
/**
|
|
41402
41409
|
* Determine if a value is undefined
|
|
@@ -41415,8 +41422,14 @@ const isUndefined = typeOfTest('undefined');
|
|
|
41415
41422
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
41416
41423
|
*/
|
|
41417
41424
|
function isBuffer(val) {
|
|
41418
|
-
return
|
|
41419
|
-
|
|
41425
|
+
return (
|
|
41426
|
+
val !== null &&
|
|
41427
|
+
!isUndefined(val) &&
|
|
41428
|
+
val.constructor !== null &&
|
|
41429
|
+
!isUndefined(val.constructor) &&
|
|
41430
|
+
isFunction$2(val.constructor.isBuffer) &&
|
|
41431
|
+
val.constructor.isBuffer(val)
|
|
41432
|
+
);
|
|
41420
41433
|
}
|
|
41421
41434
|
|
|
41422
41435
|
/**
|
|
@@ -41428,7 +41441,6 @@ function isBuffer(val) {
|
|
|
41428
41441
|
*/
|
|
41429
41442
|
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
41430
41443
|
|
|
41431
|
-
|
|
41432
41444
|
/**
|
|
41433
41445
|
* Determine if a value is a view on an ArrayBuffer
|
|
41434
41446
|
*
|
|
@@ -41438,10 +41450,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
|
41438
41450
|
*/
|
|
41439
41451
|
function isArrayBufferView(val) {
|
|
41440
41452
|
let result;
|
|
41441
|
-
if (
|
|
41453
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
41442
41454
|
result = ArrayBuffer.isView(val);
|
|
41443
41455
|
} else {
|
|
41444
|
-
result =
|
|
41456
|
+
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
41445
41457
|
}
|
|
41446
41458
|
return result;
|
|
41447
41459
|
}
|
|
@@ -41461,7 +41473,7 @@ const isString = typeOfTest('string');
|
|
|
41461
41473
|
* @param {*} val The value to test
|
|
41462
41474
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
41463
41475
|
*/
|
|
41464
|
-
const isFunction$
|
|
41476
|
+
const isFunction$2 = typeOfTest('function');
|
|
41465
41477
|
|
|
41466
41478
|
/**
|
|
41467
41479
|
* Determine if a value is a Number
|
|
@@ -41487,7 +41499,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
|
41487
41499
|
* @param {*} thing The value to test
|
|
41488
41500
|
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
41489
41501
|
*/
|
|
41490
|
-
const isBoolean = thing => thing === true || thing === false;
|
|
41502
|
+
const isBoolean = (thing) => thing === true || thing === false;
|
|
41491
41503
|
|
|
41492
41504
|
/**
|
|
41493
41505
|
* Determine if a value is a plain Object
|
|
@@ -41502,7 +41514,34 @@ const isPlainObject = (val) => {
|
|
|
41502
41514
|
}
|
|
41503
41515
|
|
|
41504
41516
|
const prototype = getPrototypeOf(val);
|
|
41505
|
-
return (
|
|
41517
|
+
return (
|
|
41518
|
+
(prototype === null ||
|
|
41519
|
+
prototype === Object.prototype ||
|
|
41520
|
+
Object.getPrototypeOf(prototype) === null) &&
|
|
41521
|
+
!(toStringTag in val) &&
|
|
41522
|
+
!(iterator in val)
|
|
41523
|
+
);
|
|
41524
|
+
};
|
|
41525
|
+
|
|
41526
|
+
/**
|
|
41527
|
+
* Determine if a value is an empty object (safely handles Buffers)
|
|
41528
|
+
*
|
|
41529
|
+
* @param {*} val The value to test
|
|
41530
|
+
*
|
|
41531
|
+
* @returns {boolean} True if value is an empty object, otherwise false
|
|
41532
|
+
*/
|
|
41533
|
+
const isEmptyObject = (val) => {
|
|
41534
|
+
// Early return for non-objects or Buffers to prevent RangeError
|
|
41535
|
+
if (!isObject(val) || isBuffer(val)) {
|
|
41536
|
+
return false;
|
|
41537
|
+
}
|
|
41538
|
+
|
|
41539
|
+
try {
|
|
41540
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
41541
|
+
} catch (e) {
|
|
41542
|
+
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
41543
|
+
return false;
|
|
41544
|
+
}
|
|
41506
41545
|
};
|
|
41507
41546
|
|
|
41508
41547
|
/**
|
|
@@ -41523,6 +41562,31 @@ const isDate = kindOfTest('Date');
|
|
|
41523
41562
|
*/
|
|
41524
41563
|
const isFile = kindOfTest('File');
|
|
41525
41564
|
|
|
41565
|
+
/**
|
|
41566
|
+
* Determine if a value is a React Native Blob
|
|
41567
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
41568
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
41569
|
+
*
|
|
41570
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
41571
|
+
*
|
|
41572
|
+
* @param {*} value The value to test
|
|
41573
|
+
*
|
|
41574
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
41575
|
+
*/
|
|
41576
|
+
const isReactNativeBlob = (value) => {
|
|
41577
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
41578
|
+
};
|
|
41579
|
+
|
|
41580
|
+
/**
|
|
41581
|
+
* Determine if environment is React Native
|
|
41582
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
41583
|
+
*
|
|
41584
|
+
* @param {*} formData The formData to test
|
|
41585
|
+
*
|
|
41586
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
41587
|
+
*/
|
|
41588
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
41589
|
+
|
|
41526
41590
|
/**
|
|
41527
41591
|
* Determine if a value is a Blob
|
|
41528
41592
|
*
|
|
@@ -41548,7 +41612,7 @@ const isFileList = kindOfTest('FileList');
|
|
|
41548
41612
|
*
|
|
41549
41613
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
41550
41614
|
*/
|
|
41551
|
-
const isStream = (val) => isObject(val) && isFunction$
|
|
41615
|
+
const isStream = (val) => isObject(val) && isFunction$2(val.pipe);
|
|
41552
41616
|
|
|
41553
41617
|
/**
|
|
41554
41618
|
* Determine if a value is a FormData
|
|
@@ -41557,17 +41621,28 @@ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
|
|
|
41557
41621
|
*
|
|
41558
41622
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
41559
41623
|
*/
|
|
41624
|
+
function getGlobal() {
|
|
41625
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
41626
|
+
if (typeof self !== 'undefined') return self;
|
|
41627
|
+
if (typeof window !== 'undefined') return window;
|
|
41628
|
+
if (typeof global !== 'undefined') return global;
|
|
41629
|
+
return {};
|
|
41630
|
+
}
|
|
41631
|
+
|
|
41632
|
+
const G = getGlobal();
|
|
41633
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
41634
|
+
|
|
41560
41635
|
const isFormData = (thing) => {
|
|
41561
|
-
|
|
41562
|
-
|
|
41563
|
-
|
|
41564
|
-
|
|
41565
|
-
|
|
41566
|
-
|
|
41567
|
-
|
|
41568
|
-
|
|
41569
|
-
|
|
41570
|
-
|
|
41636
|
+
if (!thing) return false;
|
|
41637
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
41638
|
+
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData (GHSA-6chq-wfr3-2hj9).
|
|
41639
|
+
const proto = getPrototypeOf(thing);
|
|
41640
|
+
if (!proto || proto === Object.prototype) return false;
|
|
41641
|
+
if (!isFunction$2(thing.append)) return false;
|
|
41642
|
+
const kind = kindOf(thing);
|
|
41643
|
+
return kind === 'formdata' ||
|
|
41644
|
+
// detect form-data instance
|
|
41645
|
+
(kind === 'object' && isFunction$2(thing.toString) && thing.toString() === '[object FormData]');
|
|
41571
41646
|
};
|
|
41572
41647
|
|
|
41573
41648
|
/**
|
|
@@ -41579,7 +41654,12 @@ const isFormData = (thing) => {
|
|
|
41579
41654
|
*/
|
|
41580
41655
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
41581
41656
|
|
|
41582
|
-
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
41657
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
41658
|
+
'ReadableStream',
|
|
41659
|
+
'Request',
|
|
41660
|
+
'Response',
|
|
41661
|
+
'Headers',
|
|
41662
|
+
].map(kindOfTest);
|
|
41583
41663
|
|
|
41584
41664
|
/**
|
|
41585
41665
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -41588,9 +41668,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
|
|
|
41588
41668
|
*
|
|
41589
41669
|
* @returns {String} The String freed of excess whitespace
|
|
41590
41670
|
*/
|
|
41591
|
-
const trim = (str) =>
|
|
41592
|
-
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
41593
|
-
|
|
41671
|
+
const trim = (str) => {
|
|
41672
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
41673
|
+
};
|
|
41594
41674
|
/**
|
|
41595
41675
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
41596
41676
|
*
|
|
@@ -41600,13 +41680,14 @@ const trim = (str) => str.trim ?
|
|
|
41600
41680
|
* If 'obj' is an Object callback will be called passing
|
|
41601
41681
|
* the value, key, and complete object for each property.
|
|
41602
41682
|
*
|
|
41603
|
-
* @param {Object|Array} obj The object to iterate
|
|
41683
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
41604
41684
|
* @param {Function} fn The callback to invoke for each item
|
|
41605
41685
|
*
|
|
41606
|
-
* @param {
|
|
41686
|
+
* @param {Object} [options]
|
|
41687
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
41607
41688
|
* @returns {any}
|
|
41608
41689
|
*/
|
|
41609
|
-
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
41690
|
+
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
41610
41691
|
// Don't bother if no value provided
|
|
41611
41692
|
if (obj === null || typeof obj === 'undefined') {
|
|
41612
41693
|
return;
|
|
@@ -41627,6 +41708,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
41627
41708
|
fn.call(null, obj[i], i, obj);
|
|
41628
41709
|
}
|
|
41629
41710
|
} else {
|
|
41711
|
+
// Buffer check
|
|
41712
|
+
if (isBuffer(obj)) {
|
|
41713
|
+
return;
|
|
41714
|
+
}
|
|
41715
|
+
|
|
41630
41716
|
// Iterate over object keys
|
|
41631
41717
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
41632
41718
|
const len = keys.length;
|
|
@@ -41639,7 +41725,19 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
41639
41725
|
}
|
|
41640
41726
|
}
|
|
41641
41727
|
|
|
41728
|
+
/**
|
|
41729
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
41730
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
41731
|
+
*
|
|
41732
|
+
* @param {Object} obj - The object to search.
|
|
41733
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
41734
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
41735
|
+
*/
|
|
41642
41736
|
function findKey(obj, key) {
|
|
41737
|
+
if (isBuffer(obj)) {
|
|
41738
|
+
return null;
|
|
41739
|
+
}
|
|
41740
|
+
|
|
41643
41741
|
key = key.toLowerCase();
|
|
41644
41742
|
const keys = Object.keys(obj);
|
|
41645
41743
|
let i = keys.length;
|
|
@@ -41655,8 +41753,8 @@ function findKey(obj, key) {
|
|
|
41655
41753
|
|
|
41656
41754
|
const _global = (() => {
|
|
41657
41755
|
/*eslint no-undef:0*/
|
|
41658
|
-
if (typeof globalThis !==
|
|
41659
|
-
return typeof self !==
|
|
41756
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
41757
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
|
|
41660
41758
|
})();
|
|
41661
41759
|
|
|
41662
41760
|
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
@@ -41671,7 +41769,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
41671
41769
|
* Example:
|
|
41672
41770
|
*
|
|
41673
41771
|
* ```js
|
|
41674
|
-
*
|
|
41772
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
41675
41773
|
* console.log(result.foo); // outputs 456
|
|
41676
41774
|
* ```
|
|
41677
41775
|
*
|
|
@@ -41680,17 +41778,22 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
41680
41778
|
* @returns {Object} Result of all merge properties
|
|
41681
41779
|
*/
|
|
41682
41780
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
41683
|
-
const {caseless} = isContextDefined(this) && this || {};
|
|
41781
|
+
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
41684
41782
|
const result = {};
|
|
41685
41783
|
const assignValue = (val, key) => {
|
|
41686
|
-
|
|
41784
|
+
// Skip dangerous property names to prevent prototype pollution
|
|
41785
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
41786
|
+
return;
|
|
41787
|
+
}
|
|
41788
|
+
|
|
41789
|
+
const targetKey = (caseless && findKey(result, key)) || key;
|
|
41687
41790
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
41688
41791
|
result[targetKey] = merge(result[targetKey], val);
|
|
41689
41792
|
} else if (isPlainObject(val)) {
|
|
41690
41793
|
result[targetKey] = merge({}, val);
|
|
41691
41794
|
} else if (isArray(val)) {
|
|
41692
41795
|
result[targetKey] = val.slice();
|
|
41693
|
-
} else {
|
|
41796
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
41694
41797
|
result[targetKey] = val;
|
|
41695
41798
|
}
|
|
41696
41799
|
};
|
|
@@ -41708,17 +41811,32 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
41708
41811
|
* @param {Object} b The object to copy properties from
|
|
41709
41812
|
* @param {Object} thisArg The object to bind function to
|
|
41710
41813
|
*
|
|
41711
|
-
* @param {
|
|
41814
|
+
* @param {Object} [options]
|
|
41815
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
41712
41816
|
* @returns {Object} The resulting value of object a
|
|
41713
41817
|
*/
|
|
41714
|
-
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
41715
|
-
forEach(
|
|
41716
|
-
|
|
41717
|
-
|
|
41718
|
-
|
|
41719
|
-
|
|
41720
|
-
|
|
41721
|
-
|
|
41818
|
+
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
41819
|
+
forEach(
|
|
41820
|
+
b,
|
|
41821
|
+
(val, key) => {
|
|
41822
|
+
if (thisArg && isFunction$2(val)) {
|
|
41823
|
+
Object.defineProperty(a, key, {
|
|
41824
|
+
value: bind$1(val, thisArg),
|
|
41825
|
+
writable: true,
|
|
41826
|
+
enumerable: true,
|
|
41827
|
+
configurable: true,
|
|
41828
|
+
});
|
|
41829
|
+
} else {
|
|
41830
|
+
Object.defineProperty(a, key, {
|
|
41831
|
+
value: val,
|
|
41832
|
+
writable: true,
|
|
41833
|
+
enumerable: true,
|
|
41834
|
+
configurable: true,
|
|
41835
|
+
});
|
|
41836
|
+
}
|
|
41837
|
+
},
|
|
41838
|
+
{ allOwnKeys }
|
|
41839
|
+
);
|
|
41722
41840
|
return a;
|
|
41723
41841
|
};
|
|
41724
41842
|
|
|
@@ -41730,7 +41848,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
|
41730
41848
|
* @returns {string} content value without BOM
|
|
41731
41849
|
*/
|
|
41732
41850
|
const stripBOM = (content) => {
|
|
41733
|
-
if (content.charCodeAt(0) ===
|
|
41851
|
+
if (content.charCodeAt(0) === 0xfeff) {
|
|
41734
41852
|
content = content.slice(1);
|
|
41735
41853
|
}
|
|
41736
41854
|
return content;
|
|
@@ -41747,9 +41865,14 @@ const stripBOM = (content) => {
|
|
|
41747
41865
|
*/
|
|
41748
41866
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
41749
41867
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
41750
|
-
constructor.prototype
|
|
41868
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
41869
|
+
value: constructor,
|
|
41870
|
+
writable: true,
|
|
41871
|
+
enumerable: false,
|
|
41872
|
+
configurable: true,
|
|
41873
|
+
});
|
|
41751
41874
|
Object.defineProperty(constructor, 'super', {
|
|
41752
|
-
value: superConstructor.prototype
|
|
41875
|
+
value: superConstructor.prototype,
|
|
41753
41876
|
});
|
|
41754
41877
|
props && Object.assign(constructor.prototype, props);
|
|
41755
41878
|
};
|
|
@@ -41808,7 +41931,6 @@ const endsWith = (str, searchString, position) => {
|
|
|
41808
41931
|
return lastIndex !== -1 && lastIndex === position;
|
|
41809
41932
|
};
|
|
41810
41933
|
|
|
41811
|
-
|
|
41812
41934
|
/**
|
|
41813
41935
|
* Returns new array from array like object or null if failed
|
|
41814
41936
|
*
|
|
@@ -41837,9 +41959,9 @@ const toArray = (thing) => {
|
|
|
41837
41959
|
* @returns {Array}
|
|
41838
41960
|
*/
|
|
41839
41961
|
// eslint-disable-next-line func-names
|
|
41840
|
-
const isTypedArray = (TypedArray => {
|
|
41962
|
+
const isTypedArray = ((TypedArray) => {
|
|
41841
41963
|
// eslint-disable-next-line func-names
|
|
41842
|
-
return thing => {
|
|
41964
|
+
return (thing) => {
|
|
41843
41965
|
return TypedArray && thing instanceof TypedArray;
|
|
41844
41966
|
};
|
|
41845
41967
|
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
@@ -41887,16 +42009,18 @@ const matchAll = (regExp, str) => {
|
|
|
41887
42009
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
41888
42010
|
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
41889
42011
|
|
|
41890
|
-
const toCamelCase = str => {
|
|
41891
|
-
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
41892
|
-
|
|
41893
|
-
|
|
41894
|
-
}
|
|
41895
|
-
);
|
|
42012
|
+
const toCamelCase = (str) => {
|
|
42013
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
42014
|
+
return p1.toUpperCase() + p2;
|
|
42015
|
+
});
|
|
41896
42016
|
};
|
|
41897
42017
|
|
|
41898
42018
|
/* Creating a function that will check if an object has a property. */
|
|
41899
|
-
const hasOwnProperty = (
|
|
42019
|
+
const hasOwnProperty = (
|
|
42020
|
+
({ hasOwnProperty }) =>
|
|
42021
|
+
(obj, prop) =>
|
|
42022
|
+
hasOwnProperty.call(obj, prop)
|
|
42023
|
+
)(Object.prototype);
|
|
41900
42024
|
|
|
41901
42025
|
/**
|
|
41902
42026
|
* Determine if a value is a RegExp object
|
|
@@ -41929,13 +42053,13 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
41929
42053
|
const freezeMethods = (obj) => {
|
|
41930
42054
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
41931
42055
|
// skip restricted props in strict mode
|
|
41932
|
-
if (isFunction$
|
|
42056
|
+
if (isFunction$2(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
41933
42057
|
return false;
|
|
41934
42058
|
}
|
|
41935
42059
|
|
|
41936
42060
|
const value = obj[name];
|
|
41937
42061
|
|
|
41938
|
-
if (!isFunction$
|
|
42062
|
+
if (!isFunction$2(value)) return;
|
|
41939
42063
|
|
|
41940
42064
|
descriptor.enumerable = false;
|
|
41941
42065
|
|
|
@@ -41946,17 +42070,25 @@ const freezeMethods = (obj) => {
|
|
|
41946
42070
|
|
|
41947
42071
|
if (!descriptor.set) {
|
|
41948
42072
|
descriptor.set = () => {
|
|
41949
|
-
throw Error(
|
|
42073
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
41950
42074
|
};
|
|
41951
42075
|
}
|
|
41952
42076
|
});
|
|
41953
42077
|
};
|
|
41954
42078
|
|
|
42079
|
+
/**
|
|
42080
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
42081
|
+
* Useful for fast membership checks.
|
|
42082
|
+
*
|
|
42083
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
42084
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
42085
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
42086
|
+
*/
|
|
41955
42087
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
41956
42088
|
const obj = {};
|
|
41957
42089
|
|
|
41958
42090
|
const define = (arr) => {
|
|
41959
|
-
arr.forEach(value => {
|
|
42091
|
+
arr.forEach((value) => {
|
|
41960
42092
|
obj[value] = true;
|
|
41961
42093
|
});
|
|
41962
42094
|
};
|
|
@@ -41969,7 +42101,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
|
|
|
41969
42101
|
const noop$1 = () => {};
|
|
41970
42102
|
|
|
41971
42103
|
const toFiniteNumber = (value, defaultValue) => {
|
|
41972
|
-
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
42104
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
41973
42105
|
};
|
|
41974
42106
|
|
|
41975
42107
|
/**
|
|
@@ -41980,20 +42112,35 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
41980
42112
|
* @returns {boolean}
|
|
41981
42113
|
*/
|
|
41982
42114
|
function isSpecCompliantForm(thing) {
|
|
41983
|
-
return !!(
|
|
42115
|
+
return !!(
|
|
42116
|
+
thing &&
|
|
42117
|
+
isFunction$2(thing.append) &&
|
|
42118
|
+
thing[toStringTag] === 'FormData' &&
|
|
42119
|
+
thing[iterator]
|
|
42120
|
+
);
|
|
41984
42121
|
}
|
|
41985
42122
|
|
|
42123
|
+
/**
|
|
42124
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
42125
|
+
*
|
|
42126
|
+
* @param {Object} obj - The object to convert.
|
|
42127
|
+
* @returns {Object} The JSON-compatible object.
|
|
42128
|
+
*/
|
|
41986
42129
|
const toJSONObject = (obj) => {
|
|
41987
42130
|
const stack = new Array(10);
|
|
41988
42131
|
|
|
41989
42132
|
const visit = (source, i) => {
|
|
41990
|
-
|
|
41991
42133
|
if (isObject(source)) {
|
|
41992
42134
|
if (stack.indexOf(source) >= 0) {
|
|
41993
42135
|
return;
|
|
41994
42136
|
}
|
|
41995
42137
|
|
|
41996
|
-
|
|
42138
|
+
//Buffer check
|
|
42139
|
+
if (isBuffer(source)) {
|
|
42140
|
+
return source;
|
|
42141
|
+
}
|
|
42142
|
+
|
|
42143
|
+
if (!('toJSON' in source)) {
|
|
41997
42144
|
stack[i] = source;
|
|
41998
42145
|
const target = isArray(source) ? [] : {};
|
|
41999
42146
|
|
|
@@ -42014,44 +42161,76 @@ const toJSONObject = (obj) => {
|
|
|
42014
42161
|
return visit(obj, 0);
|
|
42015
42162
|
};
|
|
42016
42163
|
|
|
42164
|
+
/**
|
|
42165
|
+
* Determines if a value is an async function.
|
|
42166
|
+
*
|
|
42167
|
+
* @param {*} thing - The value to test.
|
|
42168
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
42169
|
+
*/
|
|
42017
42170
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
42018
42171
|
|
|
42172
|
+
/**
|
|
42173
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
42174
|
+
*
|
|
42175
|
+
* @param {*} thing - The value to test.
|
|
42176
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
42177
|
+
*/
|
|
42019
42178
|
const isThenable = (thing) =>
|
|
42020
|
-
thing &&
|
|
42179
|
+
thing &&
|
|
42180
|
+
(isObject(thing) || isFunction$2(thing)) &&
|
|
42181
|
+
isFunction$2(thing.then) &&
|
|
42182
|
+
isFunction$2(thing.catch);
|
|
42021
42183
|
|
|
42022
42184
|
// original code
|
|
42023
42185
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
42024
42186
|
|
|
42187
|
+
/**
|
|
42188
|
+
* Provides a cross-platform setImmediate implementation.
|
|
42189
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
42190
|
+
*
|
|
42191
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
42192
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
42193
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
42194
|
+
*/
|
|
42025
42195
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
42026
42196
|
if (setImmediateSupported) {
|
|
42027
42197
|
return setImmediate;
|
|
42028
42198
|
}
|
|
42029
42199
|
|
|
42030
|
-
return postMessageSupported
|
|
42031
|
-
|
|
42032
|
-
|
|
42033
|
-
|
|
42034
|
-
|
|
42035
|
-
|
|
42200
|
+
return postMessageSupported
|
|
42201
|
+
? ((token, callbacks) => {
|
|
42202
|
+
_global.addEventListener(
|
|
42203
|
+
'message',
|
|
42204
|
+
({ source, data }) => {
|
|
42205
|
+
if (source === _global && data === token) {
|
|
42206
|
+
callbacks.length && callbacks.shift()();
|
|
42207
|
+
}
|
|
42208
|
+
},
|
|
42209
|
+
false
|
|
42210
|
+
);
|
|
42036
42211
|
|
|
42037
|
-
|
|
42038
|
-
|
|
42039
|
-
|
|
42040
|
-
|
|
42041
|
-
|
|
42042
|
-
|
|
42043
|
-
|
|
42044
|
-
isFunction$1(_global.postMessage)
|
|
42045
|
-
);
|
|
42212
|
+
return (cb) => {
|
|
42213
|
+
callbacks.push(cb);
|
|
42214
|
+
_global.postMessage(token, '*');
|
|
42215
|
+
};
|
|
42216
|
+
})(`axios@${Math.random()}`, [])
|
|
42217
|
+
: (cb) => setTimeout(cb);
|
|
42218
|
+
})(typeof setImmediate === 'function', isFunction$2(_global.postMessage));
|
|
42046
42219
|
|
|
42047
|
-
|
|
42048
|
-
|
|
42220
|
+
/**
|
|
42221
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
42222
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
42223
|
+
*
|
|
42224
|
+
* @type {Function}
|
|
42225
|
+
*/
|
|
42226
|
+
const asap =
|
|
42227
|
+
typeof queueMicrotask !== 'undefined'
|
|
42228
|
+
? queueMicrotask.bind(_global)
|
|
42229
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
42049
42230
|
|
|
42050
42231
|
// *********************
|
|
42051
42232
|
|
|
42052
|
-
|
|
42053
|
-
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
42054
|
-
|
|
42233
|
+
const isIterable = (thing) => thing != null && isFunction$2(thing[iterator]);
|
|
42055
42234
|
|
|
42056
42235
|
var utils$3 = {
|
|
42057
42236
|
isArray,
|
|
@@ -42064,6 +42243,7 @@ var utils$3 = {
|
|
|
42064
42243
|
isBoolean,
|
|
42065
42244
|
isObject,
|
|
42066
42245
|
isPlainObject,
|
|
42246
|
+
isEmptyObject,
|
|
42067
42247
|
isReadableStream,
|
|
42068
42248
|
isRequest,
|
|
42069
42249
|
isResponse,
|
|
@@ -42071,9 +42251,11 @@ var utils$3 = {
|
|
|
42071
42251
|
isUndefined,
|
|
42072
42252
|
isDate,
|
|
42073
42253
|
isFile,
|
|
42254
|
+
isReactNativeBlob,
|
|
42255
|
+
isReactNative,
|
|
42074
42256
|
isBlob,
|
|
42075
42257
|
isRegExp,
|
|
42076
|
-
isFunction: isFunction$
|
|
42258
|
+
isFunction: isFunction$2,
|
|
42077
42259
|
isStream,
|
|
42078
42260
|
isURLSearchParams,
|
|
42079
42261
|
isTypedArray,
|
|
@@ -42109,42 +42291,60 @@ var utils$3 = {
|
|
|
42109
42291
|
isThenable,
|
|
42110
42292
|
setImmediate: _setImmediate,
|
|
42111
42293
|
asap,
|
|
42112
|
-
isIterable
|
|
42294
|
+
isIterable,
|
|
42113
42295
|
};
|
|
42114
42296
|
|
|
42115
|
-
|
|
42116
|
-
|
|
42117
|
-
|
|
42118
|
-
|
|
42119
|
-
|
|
42120
|
-
* @param {Object} [config] The config.
|
|
42121
|
-
* @param {Object} [request] The request.
|
|
42122
|
-
* @param {Object} [response] The response.
|
|
42123
|
-
*
|
|
42124
|
-
* @returns {Error} The created error.
|
|
42125
|
-
*/
|
|
42126
|
-
function AxiosError(message, code, config, request, response) {
|
|
42127
|
-
Error.call(this);
|
|
42297
|
+
class AxiosError extends Error {
|
|
42298
|
+
static from(error, code, config, request, response, customProps) {
|
|
42299
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
42300
|
+
axiosError.cause = error;
|
|
42301
|
+
axiosError.name = error.name;
|
|
42128
42302
|
|
|
42129
|
-
|
|
42130
|
-
|
|
42131
|
-
|
|
42132
|
-
|
|
42303
|
+
// Preserve status from the original error if not already set from response
|
|
42304
|
+
if (error.status != null && axiosError.status == null) {
|
|
42305
|
+
axiosError.status = error.status;
|
|
42306
|
+
}
|
|
42307
|
+
|
|
42308
|
+
customProps && Object.assign(axiosError, customProps);
|
|
42309
|
+
return axiosError;
|
|
42133
42310
|
}
|
|
42134
42311
|
|
|
42135
|
-
|
|
42136
|
-
|
|
42137
|
-
|
|
42138
|
-
|
|
42139
|
-
|
|
42140
|
-
|
|
42141
|
-
|
|
42142
|
-
|
|
42312
|
+
/**
|
|
42313
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
42314
|
+
*
|
|
42315
|
+
* @param {string} message The error message.
|
|
42316
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
42317
|
+
* @param {Object} [config] The config.
|
|
42318
|
+
* @param {Object} [request] The request.
|
|
42319
|
+
* @param {Object} [response] The response.
|
|
42320
|
+
*
|
|
42321
|
+
* @returns {Error} The created error.
|
|
42322
|
+
*/
|
|
42323
|
+
constructor(message, code, config, request, response) {
|
|
42324
|
+
super(message);
|
|
42325
|
+
|
|
42326
|
+
// Make message enumerable to maintain backward compatibility
|
|
42327
|
+
// The native Error constructor sets message as non-enumerable,
|
|
42328
|
+
// but axios < v1.13.3 had it as enumerable
|
|
42329
|
+
Object.defineProperty(this, 'message', {
|
|
42330
|
+
value: message,
|
|
42331
|
+
enumerable: true,
|
|
42332
|
+
writable: true,
|
|
42333
|
+
configurable: true,
|
|
42334
|
+
});
|
|
42335
|
+
|
|
42336
|
+
this.name = 'AxiosError';
|
|
42337
|
+
this.isAxiosError = true;
|
|
42338
|
+
code && (this.code = code);
|
|
42339
|
+
config && (this.config = config);
|
|
42340
|
+
request && (this.request = request);
|
|
42341
|
+
if (response) {
|
|
42342
|
+
this.response = response;
|
|
42343
|
+
this.status = response.status;
|
|
42344
|
+
}
|
|
42143
42345
|
}
|
|
42144
|
-
}
|
|
42145
42346
|
|
|
42146
|
-
|
|
42147
|
-
toJSON: function toJSON() {
|
|
42347
|
+
toJSON() {
|
|
42148
42348
|
return {
|
|
42149
42349
|
// Standard
|
|
42150
42350
|
message: this.message,
|
|
@@ -42160,55 +42360,25 @@ utils$3.inherits(AxiosError, Error, {
|
|
|
42160
42360
|
// Axios
|
|
42161
42361
|
config: utils$3.toJSONObject(this.config),
|
|
42162
42362
|
code: this.code,
|
|
42163
|
-
status: this.status
|
|
42363
|
+
status: this.status,
|
|
42164
42364
|
};
|
|
42165
42365
|
}
|
|
42166
|
-
}
|
|
42167
|
-
|
|
42168
|
-
const prototype$1 = AxiosError.prototype;
|
|
42169
|
-
const descriptors = {};
|
|
42170
|
-
|
|
42171
|
-
[
|
|
42172
|
-
'ERR_BAD_OPTION_VALUE',
|
|
42173
|
-
'ERR_BAD_OPTION',
|
|
42174
|
-
'ECONNABORTED',
|
|
42175
|
-
'ETIMEDOUT',
|
|
42176
|
-
'ERR_NETWORK',
|
|
42177
|
-
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
42178
|
-
'ERR_DEPRECATED',
|
|
42179
|
-
'ERR_BAD_RESPONSE',
|
|
42180
|
-
'ERR_BAD_REQUEST',
|
|
42181
|
-
'ERR_CANCELED',
|
|
42182
|
-
'ERR_NOT_SUPPORT',
|
|
42183
|
-
'ERR_INVALID_URL'
|
|
42184
|
-
// eslint-disable-next-line func-names
|
|
42185
|
-
].forEach(code => {
|
|
42186
|
-
descriptors[code] = {value: code};
|
|
42187
|
-
});
|
|
42188
|
-
|
|
42189
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
42190
|
-
Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
42191
|
-
|
|
42192
|
-
// eslint-disable-next-line func-names
|
|
42193
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
42194
|
-
const axiosError = Object.create(prototype$1);
|
|
42195
|
-
|
|
42196
|
-
utils$3.toFlatObject(error, axiosError, function filter(obj) {
|
|
42197
|
-
return obj !== Error.prototype;
|
|
42198
|
-
}, prop => {
|
|
42199
|
-
return prop !== 'isAxiosError';
|
|
42200
|
-
});
|
|
42201
|
-
|
|
42202
|
-
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
42203
|
-
|
|
42204
|
-
axiosError.cause = error;
|
|
42205
|
-
|
|
42206
|
-
axiosError.name = error.name;
|
|
42207
|
-
|
|
42208
|
-
customProps && Object.assign(axiosError, customProps);
|
|
42366
|
+
}
|
|
42209
42367
|
|
|
42210
|
-
|
|
42211
|
-
|
|
42368
|
+
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
42369
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
42370
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
42371
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
42372
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
42373
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
42374
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
42375
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
42376
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
42377
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
42378
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
42379
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
42380
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
42381
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
42212
42382
|
|
|
42213
42383
|
// eslint-disable-next-line strict
|
|
42214
42384
|
var httpAdapter = null;
|
|
@@ -42246,11 +42416,14 @@ function removeBrackets(key) {
|
|
|
42246
42416
|
*/
|
|
42247
42417
|
function renderKey(path, key, dots) {
|
|
42248
42418
|
if (!path) return key;
|
|
42249
|
-
return path
|
|
42250
|
-
|
|
42251
|
-
|
|
42252
|
-
|
|
42253
|
-
|
|
42419
|
+
return path
|
|
42420
|
+
.concat(key)
|
|
42421
|
+
.map(function each(token, i) {
|
|
42422
|
+
// eslint-disable-next-line no-param-reassign
|
|
42423
|
+
token = removeBrackets(token);
|
|
42424
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
42425
|
+
})
|
|
42426
|
+
.join(dots ? '.' : '');
|
|
42254
42427
|
}
|
|
42255
42428
|
|
|
42256
42429
|
/**
|
|
@@ -42300,21 +42473,27 @@ function toFormData(obj, formData, options) {
|
|
|
42300
42473
|
formData = formData || new (FormData)();
|
|
42301
42474
|
|
|
42302
42475
|
// eslint-disable-next-line no-param-reassign
|
|
42303
|
-
options = utils$3.toFlatObject(
|
|
42304
|
-
|
|
42305
|
-
|
|
42306
|
-
|
|
42307
|
-
|
|
42308
|
-
|
|
42309
|
-
|
|
42310
|
-
|
|
42476
|
+
options = utils$3.toFlatObject(
|
|
42477
|
+
options,
|
|
42478
|
+
{
|
|
42479
|
+
metaTokens: true,
|
|
42480
|
+
dots: false,
|
|
42481
|
+
indexes: false,
|
|
42482
|
+
},
|
|
42483
|
+
false,
|
|
42484
|
+
function defined(option, source) {
|
|
42485
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
42486
|
+
return !utils$3.isUndefined(source[option]);
|
|
42487
|
+
}
|
|
42488
|
+
);
|
|
42311
42489
|
|
|
42312
42490
|
const metaTokens = options.metaTokens;
|
|
42313
42491
|
// eslint-disable-next-line no-use-before-define
|
|
42314
42492
|
const visitor = options.visitor || defaultVisitor;
|
|
42315
42493
|
const dots = options.dots;
|
|
42316
42494
|
const indexes = options.indexes;
|
|
42317
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
42495
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
42496
|
+
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
42318
42497
|
const useBlob = _Blob && utils$3.isSpecCompliantForm(formData);
|
|
42319
42498
|
|
|
42320
42499
|
if (!utils$3.isFunction(visitor)) {
|
|
@@ -42356,6 +42535,11 @@ function toFormData(obj, formData, options) {
|
|
|
42356
42535
|
function defaultVisitor(value, key, path) {
|
|
42357
42536
|
let arr = value;
|
|
42358
42537
|
|
|
42538
|
+
if (utils$3.isReactNative(formData) && utils$3.isReactNativeBlob(value)) {
|
|
42539
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
42540
|
+
return false;
|
|
42541
|
+
}
|
|
42542
|
+
|
|
42359
42543
|
if (value && !path && typeof value === 'object') {
|
|
42360
42544
|
if (utils$3.endsWith(key, '{}')) {
|
|
42361
42545
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -42364,17 +42548,22 @@ function toFormData(obj, formData, options) {
|
|
|
42364
42548
|
value = JSON.stringify(value);
|
|
42365
42549
|
} else if (
|
|
42366
42550
|
(utils$3.isArray(value) && isFlatArray(value)) ||
|
|
42367
|
-
((utils$3.isFileList(value) || utils$3.endsWith(key, '[]')) && (arr = utils$3.toArray(value))
|
|
42368
|
-
|
|
42551
|
+
((utils$3.isFileList(value) || utils$3.endsWith(key, '[]')) && (arr = utils$3.toArray(value)))
|
|
42552
|
+
) {
|
|
42369
42553
|
// eslint-disable-next-line no-param-reassign
|
|
42370
42554
|
key = removeBrackets(key);
|
|
42371
42555
|
|
|
42372
42556
|
arr.forEach(function each(el, index) {
|
|
42373
|
-
!(utils$3.isUndefined(el) || el === null) &&
|
|
42374
|
-
|
|
42375
|
-
|
|
42376
|
-
|
|
42377
|
-
|
|
42557
|
+
!(utils$3.isUndefined(el) || el === null) &&
|
|
42558
|
+
formData.append(
|
|
42559
|
+
// eslint-disable-next-line no-nested-ternary
|
|
42560
|
+
indexes === true
|
|
42561
|
+
? renderKey([key], index, dots)
|
|
42562
|
+
: indexes === null
|
|
42563
|
+
? key
|
|
42564
|
+
: key + '[]',
|
|
42565
|
+
convertValue(el)
|
|
42566
|
+
);
|
|
42378
42567
|
});
|
|
42379
42568
|
return false;
|
|
42380
42569
|
}
|
|
@@ -42394,12 +42583,19 @@ function toFormData(obj, formData, options) {
|
|
|
42394
42583
|
const exposedHelpers = Object.assign(predicates, {
|
|
42395
42584
|
defaultVisitor,
|
|
42396
42585
|
convertValue,
|
|
42397
|
-
isVisitable
|
|
42586
|
+
isVisitable,
|
|
42398
42587
|
});
|
|
42399
42588
|
|
|
42400
|
-
function build(value, path) {
|
|
42589
|
+
function build(value, path, depth = 0) {
|
|
42401
42590
|
if (utils$3.isUndefined(value)) return;
|
|
42402
42591
|
|
|
42592
|
+
if (depth > maxDepth) {
|
|
42593
|
+
throw new AxiosError(
|
|
42594
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
42595
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
42596
|
+
);
|
|
42597
|
+
}
|
|
42598
|
+
|
|
42403
42599
|
if (stack.indexOf(value) !== -1) {
|
|
42404
42600
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
42405
42601
|
}
|
|
@@ -42407,12 +42603,12 @@ function toFormData(obj, formData, options) {
|
|
|
42407
42603
|
stack.push(value);
|
|
42408
42604
|
|
|
42409
42605
|
utils$3.forEach(value, function each(el, key) {
|
|
42410
|
-
const result =
|
|
42411
|
-
|
|
42412
|
-
|
|
42606
|
+
const result =
|
|
42607
|
+
!(utils$3.isUndefined(el) || el === null) &&
|
|
42608
|
+
visitor.call(formData, el, utils$3.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
42413
42609
|
|
|
42414
42610
|
if (result === true) {
|
|
42415
|
-
build(el, path ? path.concat(key) : [key]);
|
|
42611
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
42416
42612
|
}
|
|
42417
42613
|
});
|
|
42418
42614
|
|
|
@@ -42444,9 +42640,8 @@ function encode$1(str) {
|
|
|
42444
42640
|
')': '%29',
|
|
42445
42641
|
'~': '%7E',
|
|
42446
42642
|
'%20': '+',
|
|
42447
|
-
'%00': '\x00'
|
|
42448
42643
|
};
|
|
42449
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20
|
|
42644
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
42450
42645
|
return charMap[match];
|
|
42451
42646
|
});
|
|
42452
42647
|
}
|
|
@@ -42472,31 +42667,33 @@ prototype.append = function append(name, value) {
|
|
|
42472
42667
|
};
|
|
42473
42668
|
|
|
42474
42669
|
prototype.toString = function toString(encoder) {
|
|
42475
|
-
const _encode = encoder
|
|
42476
|
-
|
|
42477
|
-
|
|
42670
|
+
const _encode = encoder
|
|
42671
|
+
? function (value) {
|
|
42672
|
+
return encoder.call(this, value, encode$1);
|
|
42673
|
+
}
|
|
42674
|
+
: encode$1;
|
|
42478
42675
|
|
|
42479
|
-
return this._pairs
|
|
42480
|
-
|
|
42481
|
-
|
|
42676
|
+
return this._pairs
|
|
42677
|
+
.map(function each(pair) {
|
|
42678
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
42679
|
+
}, '')
|
|
42680
|
+
.join('&');
|
|
42482
42681
|
};
|
|
42483
42682
|
|
|
42484
42683
|
/**
|
|
42485
|
-
* It replaces
|
|
42486
|
-
*
|
|
42684
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
42685
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
42487
42686
|
*
|
|
42488
42687
|
* @param {string} val The value to be encoded.
|
|
42489
42688
|
*
|
|
42490
42689
|
* @returns {string} The encoded value.
|
|
42491
42690
|
*/
|
|
42492
42691
|
function encode(val) {
|
|
42493
|
-
return encodeURIComponent(val)
|
|
42494
|
-
replace(/%3A/gi, ':')
|
|
42495
|
-
replace(/%24/g, '$')
|
|
42496
|
-
replace(/%2C/gi, ',')
|
|
42497
|
-
replace(/%20/g, '+')
|
|
42498
|
-
replace(/%5B/gi, '[').
|
|
42499
|
-
replace(/%5D/gi, ']');
|
|
42692
|
+
return encodeURIComponent(val)
|
|
42693
|
+
.replace(/%3A/gi, ':')
|
|
42694
|
+
.replace(/%24/g, '$')
|
|
42695
|
+
.replace(/%2C/gi, ',')
|
|
42696
|
+
.replace(/%20/g, '+');
|
|
42500
42697
|
}
|
|
42501
42698
|
|
|
42502
42699
|
/**
|
|
@@ -42509,33 +42706,32 @@ function encode(val) {
|
|
|
42509
42706
|
* @returns {string} The formatted url
|
|
42510
42707
|
*/
|
|
42511
42708
|
function buildURL(url, params, options) {
|
|
42512
|
-
/*eslint no-param-reassign:0*/
|
|
42513
42709
|
if (!params) {
|
|
42514
42710
|
return url;
|
|
42515
42711
|
}
|
|
42516
|
-
|
|
42517
|
-
const _encode = options && options.encode || encode;
|
|
42518
42712
|
|
|
42519
|
-
|
|
42520
|
-
|
|
42521
|
-
|
|
42522
|
-
|
|
42523
|
-
|
|
42713
|
+
const _encode = (options && options.encode) || encode;
|
|
42714
|
+
|
|
42715
|
+
const _options = utils$3.isFunction(options)
|
|
42716
|
+
? {
|
|
42717
|
+
serialize: options,
|
|
42718
|
+
}
|
|
42719
|
+
: options;
|
|
42524
42720
|
|
|
42525
|
-
const serializeFn =
|
|
42721
|
+
const serializeFn = _options && _options.serialize;
|
|
42526
42722
|
|
|
42527
42723
|
let serializedParams;
|
|
42528
42724
|
|
|
42529
42725
|
if (serializeFn) {
|
|
42530
|
-
serializedParams = serializeFn(params,
|
|
42726
|
+
serializedParams = serializeFn(params, _options);
|
|
42531
42727
|
} else {
|
|
42532
|
-
serializedParams = utils$3.isURLSearchParams(params)
|
|
42533
|
-
params.toString()
|
|
42534
|
-
new AxiosURLSearchParams(params,
|
|
42728
|
+
serializedParams = utils$3.isURLSearchParams(params)
|
|
42729
|
+
? params.toString()
|
|
42730
|
+
: new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
42535
42731
|
}
|
|
42536
42732
|
|
|
42537
42733
|
if (serializedParams) {
|
|
42538
|
-
const hashmarkIndex = url.indexOf(
|
|
42734
|
+
const hashmarkIndex = url.indexOf('#');
|
|
42539
42735
|
|
|
42540
42736
|
if (hashmarkIndex !== -1) {
|
|
42541
42737
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -42556,6 +42752,7 @@ class InterceptorManager {
|
|
|
42556
42752
|
*
|
|
42557
42753
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
42558
42754
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
42755
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
42559
42756
|
*
|
|
42560
42757
|
* @return {Number} An ID used to remove interceptor later
|
|
42561
42758
|
*/
|
|
@@ -42564,7 +42761,7 @@ class InterceptorManager {
|
|
|
42564
42761
|
fulfilled,
|
|
42565
42762
|
rejected,
|
|
42566
42763
|
synchronous: options ? options.synchronous : false,
|
|
42567
|
-
runWhen: options ? options.runWhen : null
|
|
42764
|
+
runWhen: options ? options.runWhen : null,
|
|
42568
42765
|
});
|
|
42569
42766
|
return this.handlers.length - 1;
|
|
42570
42767
|
}
|
|
@@ -42574,7 +42771,7 @@ class InterceptorManager {
|
|
|
42574
42771
|
*
|
|
42575
42772
|
* @param {Number} id The ID that was returned by `use`
|
|
42576
42773
|
*
|
|
42577
|
-
* @returns {
|
|
42774
|
+
* @returns {void}
|
|
42578
42775
|
*/
|
|
42579
42776
|
eject(id) {
|
|
42580
42777
|
if (this.handlers[id]) {
|
|
@@ -42615,7 +42812,8 @@ class InterceptorManager {
|
|
|
42615
42812
|
var transitionalDefaults = {
|
|
42616
42813
|
silentJSONParsing: true,
|
|
42617
42814
|
forcedJSONParsing: true,
|
|
42618
|
-
clarifyTimeoutError: false
|
|
42815
|
+
clarifyTimeoutError: false,
|
|
42816
|
+
legacyInterceptorReqResOrdering: true,
|
|
42619
42817
|
};
|
|
42620
42818
|
|
|
42621
42819
|
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
@@ -42629,14 +42827,14 @@ var platform$1 = {
|
|
|
42629
42827
|
classes: {
|
|
42630
42828
|
URLSearchParams: URLSearchParams$1,
|
|
42631
42829
|
FormData: FormData$1,
|
|
42632
|
-
Blob: Blob$1
|
|
42830
|
+
Blob: Blob$1,
|
|
42633
42831
|
},
|
|
42634
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
42832
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
42635
42833
|
};
|
|
42636
42834
|
|
|
42637
42835
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
42638
42836
|
|
|
42639
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
42837
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
42640
42838
|
|
|
42641
42839
|
/**
|
|
42642
42840
|
* Determine if we're running in a standard browser environment
|
|
@@ -42655,7 +42853,8 @@ const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
|
42655
42853
|
*
|
|
42656
42854
|
* @returns {boolean}
|
|
42657
42855
|
*/
|
|
42658
|
-
const hasStandardBrowserEnv =
|
|
42856
|
+
const hasStandardBrowserEnv =
|
|
42857
|
+
hasBrowserEnv &&
|
|
42659
42858
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
42660
42859
|
|
|
42661
42860
|
/**
|
|
@@ -42676,7 +42875,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
42676
42875
|
);
|
|
42677
42876
|
})();
|
|
42678
42877
|
|
|
42679
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
42878
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
42680
42879
|
|
|
42681
42880
|
var utils$2 = /*#__PURE__*/Object.freeze({
|
|
42682
42881
|
__proto__: null,
|
|
@@ -42689,20 +42888,21 @@ var utils$2 = /*#__PURE__*/Object.freeze({
|
|
|
42689
42888
|
|
|
42690
42889
|
var platform = {
|
|
42691
42890
|
...utils$2,
|
|
42692
|
-
...platform$1
|
|
42891
|
+
...platform$1,
|
|
42693
42892
|
};
|
|
42694
42893
|
|
|
42695
42894
|
function toURLEncodedForm(data, options) {
|
|
42696
|
-
return toFormData(data, new platform.classes.URLSearchParams(),
|
|
42697
|
-
visitor: function(value, key, path, helpers) {
|
|
42895
|
+
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
42896
|
+
visitor: function (value, key, path, helpers) {
|
|
42698
42897
|
if (platform.isNode && utils$3.isBuffer(value)) {
|
|
42699
42898
|
this.append(key, value.toString('base64'));
|
|
42700
42899
|
return false;
|
|
42701
42900
|
}
|
|
42702
42901
|
|
|
42703
42902
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
42704
|
-
}
|
|
42705
|
-
|
|
42903
|
+
},
|
|
42904
|
+
...options,
|
|
42905
|
+
});
|
|
42706
42906
|
}
|
|
42707
42907
|
|
|
42708
42908
|
/**
|
|
@@ -42717,7 +42917,7 @@ function parsePropPath(name) {
|
|
|
42717
42917
|
// foo.x.y.z
|
|
42718
42918
|
// foo-x-y-z
|
|
42719
42919
|
// foo x y z
|
|
42720
|
-
return utils$3.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
42920
|
+
return utils$3.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
42721
42921
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
42722
42922
|
});
|
|
42723
42923
|
}
|
|
@@ -42761,7 +42961,9 @@ function formDataToJSON(formData) {
|
|
|
42761
42961
|
|
|
42762
42962
|
if (isLast) {
|
|
42763
42963
|
if (utils$3.hasOwnProp(target, name)) {
|
|
42764
|
-
target[name] =
|
|
42964
|
+
target[name] = utils$3.isArray(target[name])
|
|
42965
|
+
? target[name].concat(value)
|
|
42966
|
+
: [target[name], value];
|
|
42765
42967
|
} else {
|
|
42766
42968
|
target[name] = value;
|
|
42767
42969
|
}
|
|
@@ -42795,6 +42997,8 @@ function formDataToJSON(formData) {
|
|
|
42795
42997
|
return null;
|
|
42796
42998
|
}
|
|
42797
42999
|
|
|
43000
|
+
const own = (obj, key) => (obj != null && utils$3.hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
43001
|
+
|
|
42798
43002
|
/**
|
|
42799
43003
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
42800
43004
|
* of the input
|
|
@@ -42821,96 +43025,110 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
42821
43025
|
}
|
|
42822
43026
|
|
|
42823
43027
|
const defaults = {
|
|
42824
|
-
|
|
42825
43028
|
transitional: transitionalDefaults,
|
|
42826
43029
|
|
|
42827
43030
|
adapter: ['xhr', 'http', 'fetch'],
|
|
42828
43031
|
|
|
42829
|
-
transformRequest: [
|
|
42830
|
-
|
|
42831
|
-
|
|
42832
|
-
|
|
43032
|
+
transformRequest: [
|
|
43033
|
+
function transformRequest(data, headers) {
|
|
43034
|
+
const contentType = headers.getContentType() || '';
|
|
43035
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
43036
|
+
const isObjectPayload = utils$3.isObject(data);
|
|
42833
43037
|
|
|
42834
|
-
|
|
42835
|
-
|
|
42836
|
-
|
|
43038
|
+
if (isObjectPayload && utils$3.isHTMLForm(data)) {
|
|
43039
|
+
data = new FormData(data);
|
|
43040
|
+
}
|
|
42837
43041
|
|
|
42838
|
-
|
|
43042
|
+
const isFormData = utils$3.isFormData(data);
|
|
42839
43043
|
|
|
42840
|
-
|
|
42841
|
-
|
|
42842
|
-
|
|
43044
|
+
if (isFormData) {
|
|
43045
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
43046
|
+
}
|
|
42843
43047
|
|
|
42844
|
-
|
|
42845
|
-
|
|
42846
|
-
|
|
42847
|
-
|
|
42848
|
-
|
|
42849
|
-
|
|
42850
|
-
|
|
42851
|
-
|
|
42852
|
-
|
|
42853
|
-
|
|
42854
|
-
|
|
42855
|
-
|
|
42856
|
-
|
|
42857
|
-
|
|
42858
|
-
|
|
42859
|
-
|
|
43048
|
+
if (
|
|
43049
|
+
utils$3.isArrayBuffer(data) ||
|
|
43050
|
+
utils$3.isBuffer(data) ||
|
|
43051
|
+
utils$3.isStream(data) ||
|
|
43052
|
+
utils$3.isFile(data) ||
|
|
43053
|
+
utils$3.isBlob(data) ||
|
|
43054
|
+
utils$3.isReadableStream(data)
|
|
43055
|
+
) {
|
|
43056
|
+
return data;
|
|
43057
|
+
}
|
|
43058
|
+
if (utils$3.isArrayBufferView(data)) {
|
|
43059
|
+
return data.buffer;
|
|
43060
|
+
}
|
|
43061
|
+
if (utils$3.isURLSearchParams(data)) {
|
|
43062
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
43063
|
+
return data.toString();
|
|
43064
|
+
}
|
|
42860
43065
|
|
|
42861
|
-
|
|
43066
|
+
let isFileList;
|
|
42862
43067
|
|
|
42863
|
-
|
|
42864
|
-
|
|
42865
|
-
|
|
42866
|
-
|
|
43068
|
+
if (isObjectPayload) {
|
|
43069
|
+
const formSerializer = own(this, 'formSerializer');
|
|
43070
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
43071
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
43072
|
+
}
|
|
42867
43073
|
|
|
42868
|
-
|
|
42869
|
-
|
|
43074
|
+
if (
|
|
43075
|
+
(isFileList = utils$3.isFileList(data)) ||
|
|
43076
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
43077
|
+
) {
|
|
43078
|
+
const env = own(this, 'env');
|
|
43079
|
+
const _FormData = env && env.FormData;
|
|
42870
43080
|
|
|
42871
|
-
|
|
42872
|
-
|
|
42873
|
-
|
|
42874
|
-
|
|
42875
|
-
|
|
43081
|
+
return toFormData(
|
|
43082
|
+
isFileList ? { 'files[]': data } : data,
|
|
43083
|
+
_FormData && new _FormData(),
|
|
43084
|
+
formSerializer
|
|
43085
|
+
);
|
|
43086
|
+
}
|
|
42876
43087
|
}
|
|
42877
|
-
}
|
|
42878
43088
|
|
|
42879
|
-
|
|
42880
|
-
|
|
42881
|
-
|
|
42882
|
-
|
|
43089
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
43090
|
+
headers.setContentType('application/json', false);
|
|
43091
|
+
return stringifySafely(data);
|
|
43092
|
+
}
|
|
42883
43093
|
|
|
42884
|
-
|
|
42885
|
-
|
|
43094
|
+
return data;
|
|
43095
|
+
},
|
|
43096
|
+
],
|
|
42886
43097
|
|
|
42887
|
-
transformResponse: [
|
|
42888
|
-
|
|
42889
|
-
|
|
42890
|
-
|
|
43098
|
+
transformResponse: [
|
|
43099
|
+
function transformResponse(data) {
|
|
43100
|
+
const transitional = own(this, 'transitional') || defaults.transitional;
|
|
43101
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
43102
|
+
const responseType = own(this, 'responseType');
|
|
43103
|
+
const JSONRequested = responseType === 'json';
|
|
42891
43104
|
|
|
42892
|
-
|
|
42893
|
-
|
|
42894
|
-
|
|
43105
|
+
if (utils$3.isResponse(data) || utils$3.isReadableStream(data)) {
|
|
43106
|
+
return data;
|
|
43107
|
+
}
|
|
42895
43108
|
|
|
42896
|
-
|
|
42897
|
-
|
|
42898
|
-
|
|
43109
|
+
if (
|
|
43110
|
+
data &&
|
|
43111
|
+
utils$3.isString(data) &&
|
|
43112
|
+
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
43113
|
+
) {
|
|
43114
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
43115
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
42899
43116
|
|
|
42900
|
-
|
|
42901
|
-
|
|
42902
|
-
|
|
42903
|
-
|
|
42904
|
-
|
|
42905
|
-
|
|
43117
|
+
try {
|
|
43118
|
+
return JSON.parse(data, own(this, 'parseReviver'));
|
|
43119
|
+
} catch (e) {
|
|
43120
|
+
if (strictJSONParsing) {
|
|
43121
|
+
if (e.name === 'SyntaxError') {
|
|
43122
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
43123
|
+
}
|
|
43124
|
+
throw e;
|
|
42906
43125
|
}
|
|
42907
|
-
throw e;
|
|
42908
43126
|
}
|
|
42909
43127
|
}
|
|
42910
|
-
}
|
|
42911
43128
|
|
|
42912
|
-
|
|
42913
|
-
|
|
43129
|
+
return data;
|
|
43130
|
+
},
|
|
43131
|
+
],
|
|
42914
43132
|
|
|
42915
43133
|
/**
|
|
42916
43134
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -42926,7 +43144,7 @@ const defaults = {
|
|
|
42926
43144
|
|
|
42927
43145
|
env: {
|
|
42928
43146
|
FormData: platform.classes.FormData,
|
|
42929
|
-
Blob: platform.classes.Blob
|
|
43147
|
+
Blob: platform.classes.Blob,
|
|
42930
43148
|
},
|
|
42931
43149
|
|
|
42932
43150
|
validateStatus: function validateStatus(status) {
|
|
@@ -42935,10 +43153,10 @@ const defaults = {
|
|
|
42935
43153
|
|
|
42936
43154
|
headers: {
|
|
42937
43155
|
common: {
|
|
42938
|
-
|
|
42939
|
-
'Content-Type': undefined
|
|
42940
|
-
}
|
|
42941
|
-
}
|
|
43156
|
+
Accept: 'application/json, text/plain, */*',
|
|
43157
|
+
'Content-Type': undefined,
|
|
43158
|
+
},
|
|
43159
|
+
},
|
|
42942
43160
|
};
|
|
42943
43161
|
|
|
42944
43162
|
utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
@@ -42948,10 +43166,23 @@ utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
|
42948
43166
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
42949
43167
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
42950
43168
|
const ignoreDuplicateOf = utils$3.toObjectSet([
|
|
42951
|
-
'age',
|
|
42952
|
-
'
|
|
42953
|
-
'
|
|
42954
|
-
'
|
|
43169
|
+
'age',
|
|
43170
|
+
'authorization',
|
|
43171
|
+
'content-length',
|
|
43172
|
+
'content-type',
|
|
43173
|
+
'etag',
|
|
43174
|
+
'expires',
|
|
43175
|
+
'from',
|
|
43176
|
+
'host',
|
|
43177
|
+
'if-modified-since',
|
|
43178
|
+
'if-unmodified-since',
|
|
43179
|
+
'last-modified',
|
|
43180
|
+
'location',
|
|
43181
|
+
'max-forwards',
|
|
43182
|
+
'proxy-authorization',
|
|
43183
|
+
'referer',
|
|
43184
|
+
'retry-after',
|
|
43185
|
+
'user-agent',
|
|
42955
43186
|
]);
|
|
42956
43187
|
|
|
42957
43188
|
/**
|
|
@@ -42968,47 +43199,81 @@ const ignoreDuplicateOf = utils$3.toObjectSet([
|
|
|
42968
43199
|
*
|
|
42969
43200
|
* @returns {Object} Headers parsed into an object
|
|
42970
43201
|
*/
|
|
42971
|
-
var parseHeaders = rawHeaders => {
|
|
43202
|
+
var parseHeaders = (rawHeaders) => {
|
|
42972
43203
|
const parsed = {};
|
|
42973
43204
|
let key;
|
|
42974
43205
|
let val;
|
|
42975
43206
|
let i;
|
|
42976
43207
|
|
|
42977
|
-
rawHeaders &&
|
|
42978
|
-
|
|
42979
|
-
|
|
42980
|
-
|
|
43208
|
+
rawHeaders &&
|
|
43209
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
43210
|
+
i = line.indexOf(':');
|
|
43211
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
43212
|
+
val = line.substring(i + 1).trim();
|
|
42981
43213
|
|
|
42982
|
-
|
|
42983
|
-
|
|
42984
|
-
|
|
43214
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
43215
|
+
return;
|
|
43216
|
+
}
|
|
42985
43217
|
|
|
42986
|
-
|
|
42987
|
-
|
|
42988
|
-
|
|
43218
|
+
if (key === 'set-cookie') {
|
|
43219
|
+
if (parsed[key]) {
|
|
43220
|
+
parsed[key].push(val);
|
|
43221
|
+
} else {
|
|
43222
|
+
parsed[key] = [val];
|
|
43223
|
+
}
|
|
42989
43224
|
} else {
|
|
42990
|
-
parsed[key] = [val
|
|
43225
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
42991
43226
|
}
|
|
42992
|
-
}
|
|
42993
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
42994
|
-
}
|
|
42995
|
-
});
|
|
43227
|
+
});
|
|
42996
43228
|
|
|
42997
43229
|
return parsed;
|
|
42998
43230
|
};
|
|
42999
43231
|
|
|
43000
43232
|
const $internals = Symbol('internals');
|
|
43001
43233
|
|
|
43234
|
+
const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
43235
|
+
|
|
43236
|
+
function trimSPorHTAB(str) {
|
|
43237
|
+
let start = 0;
|
|
43238
|
+
let end = str.length;
|
|
43239
|
+
|
|
43240
|
+
while (start < end) {
|
|
43241
|
+
const code = str.charCodeAt(start);
|
|
43242
|
+
|
|
43243
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
43244
|
+
break;
|
|
43245
|
+
}
|
|
43246
|
+
|
|
43247
|
+
start += 1;
|
|
43248
|
+
}
|
|
43249
|
+
|
|
43250
|
+
while (end > start) {
|
|
43251
|
+
const code = str.charCodeAt(end - 1);
|
|
43252
|
+
|
|
43253
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
43254
|
+
break;
|
|
43255
|
+
}
|
|
43256
|
+
|
|
43257
|
+
end -= 1;
|
|
43258
|
+
}
|
|
43259
|
+
|
|
43260
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
43261
|
+
}
|
|
43262
|
+
|
|
43002
43263
|
function normalizeHeader(header) {
|
|
43003
43264
|
return header && String(header).trim().toLowerCase();
|
|
43004
43265
|
}
|
|
43005
43266
|
|
|
43267
|
+
function sanitizeHeaderValue(str) {
|
|
43268
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
|
|
43269
|
+
}
|
|
43270
|
+
|
|
43006
43271
|
function normalizeValue(value) {
|
|
43007
43272
|
if (value === false || value == null) {
|
|
43008
43273
|
return value;
|
|
43009
43274
|
}
|
|
43010
43275
|
|
|
43011
|
-
return utils$3.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
43276
|
+
return utils$3.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
43012
43277
|
}
|
|
43013
43278
|
|
|
43014
43279
|
function parseTokens(str) {
|
|
@@ -43046,8 +43311,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
43046
43311
|
}
|
|
43047
43312
|
|
|
43048
43313
|
function formatHeader(header) {
|
|
43049
|
-
return header
|
|
43050
|
-
.
|
|
43314
|
+
return header
|
|
43315
|
+
.trim()
|
|
43316
|
+
.toLowerCase()
|
|
43317
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
43051
43318
|
return char.toUpperCase() + str;
|
|
43052
43319
|
});
|
|
43053
43320
|
}
|
|
@@ -43055,12 +43322,12 @@ function formatHeader(header) {
|
|
|
43055
43322
|
function buildAccessors(obj, header) {
|
|
43056
43323
|
const accessorName = utils$3.toCamelCase(' ' + header);
|
|
43057
43324
|
|
|
43058
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
43325
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
43059
43326
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
43060
|
-
value: function(arg1, arg2, arg3) {
|
|
43327
|
+
value: function (arg1, arg2, arg3) {
|
|
43061
43328
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
43062
43329
|
},
|
|
43063
|
-
configurable: true
|
|
43330
|
+
configurable: true,
|
|
43064
43331
|
});
|
|
43065
43332
|
});
|
|
43066
43333
|
}
|
|
@@ -43082,7 +43349,12 @@ class AxiosHeaders {
|
|
|
43082
43349
|
|
|
43083
43350
|
const key = utils$3.findKey(self, lHeader);
|
|
43084
43351
|
|
|
43085
|
-
if
|
|
43352
|
+
if (
|
|
43353
|
+
!key ||
|
|
43354
|
+
self[key] === undefined ||
|
|
43355
|
+
_rewrite === true ||
|
|
43356
|
+
(_rewrite === undefined && self[key] !== false)
|
|
43357
|
+
) {
|
|
43086
43358
|
self[key || _header] = normalizeValue(_value);
|
|
43087
43359
|
}
|
|
43088
43360
|
}
|
|
@@ -43092,17 +43364,22 @@ class AxiosHeaders {
|
|
|
43092
43364
|
|
|
43093
43365
|
if (utils$3.isPlainObject(header) || header instanceof this.constructor) {
|
|
43094
43366
|
setHeaders(header, valueOrRewrite);
|
|
43095
|
-
} else if(utils$3.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
43367
|
+
} else if (utils$3.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
43096
43368
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
43097
43369
|
} else if (utils$3.isObject(header) && utils$3.isIterable(header)) {
|
|
43098
|
-
let obj = {},
|
|
43370
|
+
let obj = {},
|
|
43371
|
+
dest,
|
|
43372
|
+
key;
|
|
43099
43373
|
for (const entry of header) {
|
|
43100
43374
|
if (!utils$3.isArray(entry)) {
|
|
43101
43375
|
throw TypeError('Object iterator must return a key-value pair');
|
|
43102
43376
|
}
|
|
43103
43377
|
|
|
43104
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
43105
|
-
|
|
43378
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
43379
|
+
? utils$3.isArray(dest)
|
|
43380
|
+
? [...dest, entry[1]]
|
|
43381
|
+
: [dest, entry[1]]
|
|
43382
|
+
: entry[1];
|
|
43106
43383
|
}
|
|
43107
43384
|
|
|
43108
43385
|
setHeaders(obj, valueOrRewrite);
|
|
@@ -43149,7 +43426,11 @@ class AxiosHeaders {
|
|
|
43149
43426
|
if (header) {
|
|
43150
43427
|
const key = utils$3.findKey(this, header);
|
|
43151
43428
|
|
|
43152
|
-
return !!(
|
|
43429
|
+
return !!(
|
|
43430
|
+
key &&
|
|
43431
|
+
this[key] !== undefined &&
|
|
43432
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
43433
|
+
);
|
|
43153
43434
|
}
|
|
43154
43435
|
|
|
43155
43436
|
return false;
|
|
@@ -43189,7 +43470,7 @@ class AxiosHeaders {
|
|
|
43189
43470
|
|
|
43190
43471
|
while (i--) {
|
|
43191
43472
|
const key = keys[i];
|
|
43192
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
43473
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
43193
43474
|
delete this[key];
|
|
43194
43475
|
deleted = true;
|
|
43195
43476
|
}
|
|
@@ -43233,7 +43514,9 @@ class AxiosHeaders {
|
|
|
43233
43514
|
const obj = Object.create(null);
|
|
43234
43515
|
|
|
43235
43516
|
utils$3.forEach(this, (value, header) => {
|
|
43236
|
-
value != null &&
|
|
43517
|
+
value != null &&
|
|
43518
|
+
value !== false &&
|
|
43519
|
+
(obj[header] = asStrings && utils$3.isArray(value) ? value.join(', ') : value);
|
|
43237
43520
|
});
|
|
43238
43521
|
|
|
43239
43522
|
return obj;
|
|
@@ -43244,11 +43527,13 @@ class AxiosHeaders {
|
|
|
43244
43527
|
}
|
|
43245
43528
|
|
|
43246
43529
|
toString() {
|
|
43247
|
-
return Object.entries(this.toJSON())
|
|
43530
|
+
return Object.entries(this.toJSON())
|
|
43531
|
+
.map(([header, value]) => header + ': ' + value)
|
|
43532
|
+
.join('\n');
|
|
43248
43533
|
}
|
|
43249
43534
|
|
|
43250
43535
|
getSetCookie() {
|
|
43251
|
-
return this.get(
|
|
43536
|
+
return this.get('set-cookie') || [];
|
|
43252
43537
|
}
|
|
43253
43538
|
|
|
43254
43539
|
get [Symbol.toStringTag]() {
|
|
@@ -43268,9 +43553,12 @@ class AxiosHeaders {
|
|
|
43268
43553
|
}
|
|
43269
43554
|
|
|
43270
43555
|
static accessor(header) {
|
|
43271
|
-
const internals =
|
|
43272
|
-
|
|
43273
|
-
|
|
43556
|
+
const internals =
|
|
43557
|
+
(this[$internals] =
|
|
43558
|
+
this[$internals] =
|
|
43559
|
+
{
|
|
43560
|
+
accessors: {},
|
|
43561
|
+
});
|
|
43274
43562
|
|
|
43275
43563
|
const accessors = internals.accessors;
|
|
43276
43564
|
const prototype = this.prototype;
|
|
@@ -43290,17 +43578,24 @@ class AxiosHeaders {
|
|
|
43290
43578
|
}
|
|
43291
43579
|
}
|
|
43292
43580
|
|
|
43293
|
-
AxiosHeaders.accessor([
|
|
43581
|
+
AxiosHeaders.accessor([
|
|
43582
|
+
'Content-Type',
|
|
43583
|
+
'Content-Length',
|
|
43584
|
+
'Accept',
|
|
43585
|
+
'Accept-Encoding',
|
|
43586
|
+
'User-Agent',
|
|
43587
|
+
'Authorization',
|
|
43588
|
+
]);
|
|
43294
43589
|
|
|
43295
43590
|
// reserved names hotfix
|
|
43296
|
-
utils$3.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
43591
|
+
utils$3.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
43297
43592
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
43298
43593
|
return {
|
|
43299
43594
|
get: () => value,
|
|
43300
43595
|
set(headerValue) {
|
|
43301
43596
|
this[mapped] = headerValue;
|
|
43302
|
-
}
|
|
43303
|
-
}
|
|
43597
|
+
},
|
|
43598
|
+
};
|
|
43304
43599
|
});
|
|
43305
43600
|
|
|
43306
43601
|
utils$3.freezeMethods(AxiosHeaders);
|
|
@@ -43332,25 +43627,23 @@ function isCancel(value) {
|
|
|
43332
43627
|
return !!(value && value.__CANCEL__);
|
|
43333
43628
|
}
|
|
43334
43629
|
|
|
43335
|
-
|
|
43336
|
-
|
|
43337
|
-
|
|
43338
|
-
|
|
43339
|
-
|
|
43340
|
-
|
|
43341
|
-
|
|
43342
|
-
|
|
43343
|
-
|
|
43344
|
-
|
|
43345
|
-
|
|
43346
|
-
|
|
43347
|
-
|
|
43630
|
+
class CanceledError extends AxiosError {
|
|
43631
|
+
/**
|
|
43632
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
43633
|
+
*
|
|
43634
|
+
* @param {string=} message The message.
|
|
43635
|
+
* @param {Object=} config The config.
|
|
43636
|
+
* @param {Object=} request The request.
|
|
43637
|
+
*
|
|
43638
|
+
* @returns {CanceledError} The created error.
|
|
43639
|
+
*/
|
|
43640
|
+
constructor(message, config, request) {
|
|
43641
|
+
super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
|
43642
|
+
this.name = 'CanceledError';
|
|
43643
|
+
this.__CANCEL__ = true;
|
|
43644
|
+
}
|
|
43348
43645
|
}
|
|
43349
43646
|
|
|
43350
|
-
utils$3.inherits(CanceledError, AxiosError, {
|
|
43351
|
-
__CANCEL__: true
|
|
43352
|
-
});
|
|
43353
|
-
|
|
43354
43647
|
/**
|
|
43355
43648
|
* Resolve or reject a Promise based on response status.
|
|
43356
43649
|
*
|
|
@@ -43365,19 +43658,23 @@ function settle(resolve, reject, response) {
|
|
|
43365
43658
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
43366
43659
|
resolve(response);
|
|
43367
43660
|
} else {
|
|
43368
|
-
reject(
|
|
43369
|
-
|
|
43370
|
-
|
|
43371
|
-
|
|
43372
|
-
|
|
43373
|
-
|
|
43374
|
-
|
|
43661
|
+
reject(
|
|
43662
|
+
new AxiosError(
|
|
43663
|
+
'Request failed with status code ' + response.status,
|
|
43664
|
+
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][
|
|
43665
|
+
Math.floor(response.status / 100) - 4
|
|
43666
|
+
],
|
|
43667
|
+
response.config,
|
|
43668
|
+
response.request,
|
|
43669
|
+
response
|
|
43670
|
+
)
|
|
43671
|
+
);
|
|
43375
43672
|
}
|
|
43376
43673
|
}
|
|
43377
43674
|
|
|
43378
43675
|
function parseProtocol(url) {
|
|
43379
43676
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
43380
|
-
return match && match[1] || '';
|
|
43677
|
+
return (match && match[1]) || '';
|
|
43381
43678
|
}
|
|
43382
43679
|
|
|
43383
43680
|
/**
|
|
@@ -43428,7 +43725,7 @@ function speedometer(samplesCount, min) {
|
|
|
43428
43725
|
|
|
43429
43726
|
const passed = startedAt && now - startedAt;
|
|
43430
43727
|
|
|
43431
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
43728
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
43432
43729
|
};
|
|
43433
43730
|
}
|
|
43434
43731
|
|
|
@@ -43451,13 +43748,13 @@ function throttle(fn, freq) {
|
|
|
43451
43748
|
clearTimeout(timer);
|
|
43452
43749
|
timer = null;
|
|
43453
43750
|
}
|
|
43454
|
-
fn
|
|
43751
|
+
fn(...args);
|
|
43455
43752
|
};
|
|
43456
43753
|
|
|
43457
43754
|
const throttled = (...args) => {
|
|
43458
43755
|
const now = Date.now();
|
|
43459
43756
|
const passed = now - timestamp;
|
|
43460
|
-
if (
|
|
43757
|
+
if (passed >= threshold) {
|
|
43461
43758
|
invoke(args, now);
|
|
43462
43759
|
} else {
|
|
43463
43760
|
lastArgs = args;
|
|
@@ -43479,25 +43776,25 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
43479
43776
|
let bytesNotified = 0;
|
|
43480
43777
|
const _speedometer = speedometer(50, 250);
|
|
43481
43778
|
|
|
43482
|
-
return throttle(e => {
|
|
43483
|
-
const
|
|
43779
|
+
return throttle((e) => {
|
|
43780
|
+
const rawLoaded = e.loaded;
|
|
43484
43781
|
const total = e.lengthComputable ? e.total : undefined;
|
|
43485
|
-
const
|
|
43782
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
43783
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
43486
43784
|
const rate = _speedometer(progressBytes);
|
|
43487
|
-
const inRange = loaded <= total;
|
|
43488
43785
|
|
|
43489
|
-
bytesNotified = loaded;
|
|
43786
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
43490
43787
|
|
|
43491
43788
|
const data = {
|
|
43492
43789
|
loaded,
|
|
43493
43790
|
total,
|
|
43494
|
-
progress: total ?
|
|
43791
|
+
progress: total ? loaded / total : undefined,
|
|
43495
43792
|
bytes: progressBytes,
|
|
43496
43793
|
rate: rate ? rate : undefined,
|
|
43497
|
-
estimated: rate && total
|
|
43794
|
+
estimated: rate && total ? (total - loaded) / rate : undefined,
|
|
43498
43795
|
event: e,
|
|
43499
43796
|
lengthComputable: total != null,
|
|
43500
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
43797
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
43501
43798
|
};
|
|
43502
43799
|
|
|
43503
43800
|
listener(data);
|
|
@@ -43507,66 +43804,82 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
43507
43804
|
const progressEventDecorator = (total, throttled) => {
|
|
43508
43805
|
const lengthComputable = total != null;
|
|
43509
43806
|
|
|
43510
|
-
return [
|
|
43511
|
-
|
|
43512
|
-
|
|
43513
|
-
|
|
43514
|
-
|
|
43807
|
+
return [
|
|
43808
|
+
(loaded) =>
|
|
43809
|
+
throttled[0]({
|
|
43810
|
+
lengthComputable,
|
|
43811
|
+
total,
|
|
43812
|
+
loaded,
|
|
43813
|
+
}),
|
|
43814
|
+
throttled[1],
|
|
43815
|
+
];
|
|
43515
43816
|
};
|
|
43516
43817
|
|
|
43517
|
-
const asyncDecorator =
|
|
43818
|
+
const asyncDecorator =
|
|
43819
|
+
(fn) =>
|
|
43820
|
+
(...args) =>
|
|
43821
|
+
utils$3.asap(() => fn(...args));
|
|
43518
43822
|
|
|
43519
|
-
var isURLSameOrigin = platform.hasStandardBrowserEnv
|
|
43520
|
-
|
|
43521
|
-
|
|
43522
|
-
return (
|
|
43523
|
-
origin.protocol === url.protocol &&
|
|
43524
|
-
origin.host === url.host &&
|
|
43525
|
-
(isMSIE || origin.port === url.port)
|
|
43526
|
-
);
|
|
43527
|
-
})(
|
|
43528
|
-
new URL(platform.origin),
|
|
43529
|
-
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
43530
|
-
) : () => true;
|
|
43531
|
-
|
|
43532
|
-
var cookies = platform.hasStandardBrowserEnv ?
|
|
43533
|
-
|
|
43534
|
-
// Standard browser envs support document.cookie
|
|
43535
|
-
{
|
|
43536
|
-
write(name, value, expires, path, domain, secure) {
|
|
43537
|
-
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
43823
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv
|
|
43824
|
+
? ((origin, isMSIE) => (url) => {
|
|
43825
|
+
url = new URL(url, platform.origin);
|
|
43538
43826
|
|
|
43539
|
-
|
|
43827
|
+
return (
|
|
43828
|
+
origin.protocol === url.protocol &&
|
|
43829
|
+
origin.host === url.host &&
|
|
43830
|
+
(isMSIE || origin.port === url.port)
|
|
43831
|
+
);
|
|
43832
|
+
})(
|
|
43833
|
+
new URL(platform.origin),
|
|
43834
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
43835
|
+
)
|
|
43836
|
+
: () => true;
|
|
43540
43837
|
|
|
43541
|
-
|
|
43838
|
+
var cookies = platform.hasStandardBrowserEnv
|
|
43839
|
+
? // Standard browser envs support document.cookie
|
|
43840
|
+
{
|
|
43841
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
43842
|
+
if (typeof document === 'undefined') return;
|
|
43542
43843
|
|
|
43543
|
-
|
|
43844
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
43544
43845
|
|
|
43545
|
-
|
|
43846
|
+
if (utils$3.isNumber(expires)) {
|
|
43847
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
43848
|
+
}
|
|
43849
|
+
if (utils$3.isString(path)) {
|
|
43850
|
+
cookie.push(`path=${path}`);
|
|
43851
|
+
}
|
|
43852
|
+
if (utils$3.isString(domain)) {
|
|
43853
|
+
cookie.push(`domain=${domain}`);
|
|
43854
|
+
}
|
|
43855
|
+
if (secure === true) {
|
|
43856
|
+
cookie.push('secure');
|
|
43857
|
+
}
|
|
43858
|
+
if (utils$3.isString(sameSite)) {
|
|
43859
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
43860
|
+
}
|
|
43546
43861
|
|
|
43547
|
-
|
|
43548
|
-
|
|
43862
|
+
document.cookie = cookie.join('; ');
|
|
43863
|
+
},
|
|
43549
43864
|
|
|
43550
|
-
|
|
43551
|
-
|
|
43552
|
-
|
|
43553
|
-
|
|
43865
|
+
read(name) {
|
|
43866
|
+
if (typeof document === 'undefined') return null;
|
|
43867
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
43868
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
43869
|
+
},
|
|
43554
43870
|
|
|
43555
|
-
|
|
43556
|
-
|
|
43871
|
+
remove(name) {
|
|
43872
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
43873
|
+
},
|
|
43557
43874
|
}
|
|
43558
|
-
|
|
43559
|
-
|
|
43560
|
-
|
|
43561
|
-
|
|
43562
|
-
|
|
43563
|
-
|
|
43564
|
-
|
|
43565
|
-
|
|
43566
|
-
return null;
|
|
43567
|
-
},
|
|
43568
|
-
remove() {}
|
|
43569
|
-
};
|
|
43875
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
43876
|
+
{
|
|
43877
|
+
write() {},
|
|
43878
|
+
read() {
|
|
43879
|
+
return null;
|
|
43880
|
+
},
|
|
43881
|
+
remove() {},
|
|
43882
|
+
};
|
|
43570
43883
|
|
|
43571
43884
|
/**
|
|
43572
43885
|
* Determines whether the specified URL is absolute
|
|
@@ -43579,6 +43892,10 @@ function isAbsoluteURL(url) {
|
|
|
43579
43892
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
43580
43893
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
43581
43894
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
43895
|
+
if (typeof url !== 'string') {
|
|
43896
|
+
return false;
|
|
43897
|
+
}
|
|
43898
|
+
|
|
43582
43899
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
43583
43900
|
}
|
|
43584
43901
|
|
|
@@ -43608,13 +43925,13 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
43608
43925
|
*/
|
|
43609
43926
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
43610
43927
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
43611
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
43928
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
43612
43929
|
return combineURLs(baseURL, requestedURL);
|
|
43613
43930
|
}
|
|
43614
43931
|
return requestedURL;
|
|
43615
43932
|
}
|
|
43616
43933
|
|
|
43617
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
|
43934
|
+
const headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);
|
|
43618
43935
|
|
|
43619
43936
|
/**
|
|
43620
43937
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -43628,11 +43945,22 @@ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing }
|
|
|
43628
43945
|
function mergeConfig(config1, config2) {
|
|
43629
43946
|
// eslint-disable-next-line no-param-reassign
|
|
43630
43947
|
config2 = config2 || {};
|
|
43631
|
-
|
|
43948
|
+
|
|
43949
|
+
// Use a null-prototype object so that downstream reads such as `config.auth`
|
|
43950
|
+
// or `config.baseURL` cannot inherit polluted values from Object.prototype
|
|
43951
|
+
// (see GHSA-q8qp-cvcw-x6jj). `hasOwnProperty` is restored as a non-enumerable
|
|
43952
|
+
// own slot to preserve ergonomics for user code that relies on it.
|
|
43953
|
+
const config = Object.create(null);
|
|
43954
|
+
Object.defineProperty(config, 'hasOwnProperty', {
|
|
43955
|
+
value: Object.prototype.hasOwnProperty,
|
|
43956
|
+
enumerable: false,
|
|
43957
|
+
writable: true,
|
|
43958
|
+
configurable: true,
|
|
43959
|
+
});
|
|
43632
43960
|
|
|
43633
43961
|
function getMergedValue(target, source, prop, caseless) {
|
|
43634
43962
|
if (utils$3.isPlainObject(target) && utils$3.isPlainObject(source)) {
|
|
43635
|
-
return utils$3.merge.call({caseless}, target, source);
|
|
43963
|
+
return utils$3.merge.call({ caseless }, target, source);
|
|
43636
43964
|
} else if (utils$3.isPlainObject(source)) {
|
|
43637
43965
|
return utils$3.merge({}, source);
|
|
43638
43966
|
} else if (utils$3.isArray(source)) {
|
|
@@ -43641,12 +43969,11 @@ function mergeConfig(config1, config2) {
|
|
|
43641
43969
|
return source;
|
|
43642
43970
|
}
|
|
43643
43971
|
|
|
43644
|
-
|
|
43645
|
-
function mergeDeepProperties(a, b, prop , caseless) {
|
|
43972
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
43646
43973
|
if (!utils$3.isUndefined(b)) {
|
|
43647
|
-
return getMergedValue(a, b, prop
|
|
43974
|
+
return getMergedValue(a, b, prop, caseless);
|
|
43648
43975
|
} else if (!utils$3.isUndefined(a)) {
|
|
43649
|
-
return getMergedValue(undefined, a, prop
|
|
43976
|
+
return getMergedValue(undefined, a, prop, caseless);
|
|
43650
43977
|
}
|
|
43651
43978
|
}
|
|
43652
43979
|
|
|
@@ -43668,9 +43995,9 @@ function mergeConfig(config1, config2) {
|
|
|
43668
43995
|
|
|
43669
43996
|
// eslint-disable-next-line consistent-return
|
|
43670
43997
|
function mergeDirectKeys(a, b, prop) {
|
|
43671
|
-
if (prop
|
|
43998
|
+
if (utils$3.hasOwnProp(config2, prop)) {
|
|
43672
43999
|
return getMergedValue(a, b);
|
|
43673
|
-
} else if (prop
|
|
44000
|
+
} else if (utils$3.hasOwnProp(config1, prop)) {
|
|
43674
44001
|
return getMergedValue(undefined, a);
|
|
43675
44002
|
}
|
|
43676
44003
|
}
|
|
@@ -43702,14 +44029,19 @@ function mergeConfig(config1, config2) {
|
|
|
43702
44029
|
httpsAgent: defaultToConfig2,
|
|
43703
44030
|
cancelToken: defaultToConfig2,
|
|
43704
44031
|
socketPath: defaultToConfig2,
|
|
44032
|
+
allowedSocketPaths: defaultToConfig2,
|
|
43705
44033
|
responseEncoding: defaultToConfig2,
|
|
43706
44034
|
validateStatus: mergeDirectKeys,
|
|
43707
|
-
headers: (a, b
|
|
44035
|
+
headers: (a, b, prop) =>
|
|
44036
|
+
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
43708
44037
|
};
|
|
43709
44038
|
|
|
43710
|
-
utils$3.forEach(Object.keys(
|
|
43711
|
-
|
|
43712
|
-
const
|
|
44039
|
+
utils$3.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
44040
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
44041
|
+
const merge = utils$3.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
44042
|
+
const a = utils$3.hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
44043
|
+
const b = utils$3.hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
44044
|
+
const configValue = merge(a, b, prop);
|
|
43713
44045
|
(utils$3.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
43714
44046
|
});
|
|
43715
44047
|
|
|
@@ -43719,28 +44051,54 @@ function mergeConfig(config1, config2) {
|
|
|
43719
44051
|
var resolveConfig = (config) => {
|
|
43720
44052
|
const newConfig = mergeConfig({}, config);
|
|
43721
44053
|
|
|
43722
|
-
|
|
44054
|
+
// Read only own properties to prevent prototype pollution gadgets
|
|
44055
|
+
// (e.g. Object.prototype.baseURL = 'https://evil.com'). See GHSA-q8qp-cvcw-x6jj.
|
|
44056
|
+
const own = (key) => (utils$3.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
|
|
44057
|
+
|
|
44058
|
+
const data = own('data');
|
|
44059
|
+
let withXSRFToken = own('withXSRFToken');
|
|
44060
|
+
const xsrfHeaderName = own('xsrfHeaderName');
|
|
44061
|
+
const xsrfCookieName = own('xsrfCookieName');
|
|
44062
|
+
let headers = own('headers');
|
|
44063
|
+
const auth = own('auth');
|
|
44064
|
+
const baseURL = own('baseURL');
|
|
44065
|
+
const allowAbsoluteUrls = own('allowAbsoluteUrls');
|
|
44066
|
+
const url = own('url');
|
|
43723
44067
|
|
|
43724
44068
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
43725
44069
|
|
|
43726
|
-
newConfig.url = buildURL(
|
|
44070
|
+
newConfig.url = buildURL(
|
|
44071
|
+
buildFullPath(baseURL, url, allowAbsoluteUrls),
|
|
44072
|
+
config.params,
|
|
44073
|
+
config.paramsSerializer
|
|
44074
|
+
);
|
|
43727
44075
|
|
|
43728
44076
|
// HTTP basic authentication
|
|
43729
44077
|
if (auth) {
|
|
43730
|
-
headers.set(
|
|
43731
|
-
|
|
44078
|
+
headers.set(
|
|
44079
|
+
'Authorization',
|
|
44080
|
+
'Basic ' +
|
|
44081
|
+
btoa(
|
|
44082
|
+
(auth.username || '') +
|
|
44083
|
+
':' +
|
|
44084
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
44085
|
+
)
|
|
43732
44086
|
);
|
|
43733
44087
|
}
|
|
43734
44088
|
|
|
43735
|
-
let contentType;
|
|
43736
|
-
|
|
43737
44089
|
if (utils$3.isFormData(data)) {
|
|
43738
44090
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
43739
|
-
headers.setContentType(undefined); //
|
|
43740
|
-
} else if ((
|
|
43741
|
-
//
|
|
43742
|
-
const
|
|
43743
|
-
headers
|
|
44091
|
+
headers.setContentType(undefined); // browser handles it
|
|
44092
|
+
} else if (utils$3.isFunction(data.getHeaders)) {
|
|
44093
|
+
// Node.js FormData (like form-data package)
|
|
44094
|
+
const formHeaders = data.getHeaders();
|
|
44095
|
+
// Only set safe headers to avoid overwriting security headers
|
|
44096
|
+
const allowedHeaders = ['content-type', 'content-length'];
|
|
44097
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
44098
|
+
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
44099
|
+
headers.set(key, val);
|
|
44100
|
+
}
|
|
44101
|
+
});
|
|
43744
44102
|
}
|
|
43745
44103
|
}
|
|
43746
44104
|
|
|
@@ -43749,10 +44107,18 @@ var resolveConfig = (config) => {
|
|
|
43749
44107
|
// Specifically not if we're in a web worker, or react-native.
|
|
43750
44108
|
|
|
43751
44109
|
if (platform.hasStandardBrowserEnv) {
|
|
43752
|
-
|
|
44110
|
+
if (utils$3.isFunction(withXSRFToken)) {
|
|
44111
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
44112
|
+
}
|
|
43753
44113
|
|
|
43754
|
-
|
|
43755
|
-
|
|
44114
|
+
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
44115
|
+
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
44116
|
+
// the XSRF token cross-origin. See GHSA-xx6v-rp6x-q39c.
|
|
44117
|
+
const shouldSendXSRF =
|
|
44118
|
+
withXSRFToken === true ||
|
|
44119
|
+
(withXSRFToken == null && isURLSameOrigin(newConfig.url));
|
|
44120
|
+
|
|
44121
|
+
if (shouldSendXSRF) {
|
|
43756
44122
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
43757
44123
|
|
|
43758
44124
|
if (xsrfValue) {
|
|
@@ -43766,193 +44132,218 @@ var resolveConfig = (config) => {
|
|
|
43766
44132
|
|
|
43767
44133
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
43768
44134
|
|
|
43769
|
-
var xhrAdapter = isXHRAdapterSupported &&
|
|
43770
|
-
|
|
43771
|
-
|
|
43772
|
-
|
|
43773
|
-
|
|
43774
|
-
|
|
43775
|
-
|
|
43776
|
-
|
|
43777
|
-
|
|
44135
|
+
var xhrAdapter = isXHRAdapterSupported &&
|
|
44136
|
+
function (config) {
|
|
44137
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
44138
|
+
const _config = resolveConfig(config);
|
|
44139
|
+
let requestData = _config.data;
|
|
44140
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
44141
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
44142
|
+
let onCanceled;
|
|
44143
|
+
let uploadThrottled, downloadThrottled;
|
|
44144
|
+
let flushUpload, flushDownload;
|
|
43778
44145
|
|
|
43779
|
-
|
|
43780
|
-
|
|
43781
|
-
|
|
44146
|
+
function done() {
|
|
44147
|
+
flushUpload && flushUpload(); // flush events
|
|
44148
|
+
flushDownload && flushDownload(); // flush events
|
|
43782
44149
|
|
|
43783
|
-
|
|
44150
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
43784
44151
|
|
|
43785
|
-
|
|
43786
|
-
|
|
44152
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
44153
|
+
}
|
|
43787
44154
|
|
|
43788
|
-
|
|
44155
|
+
let request = new XMLHttpRequest();
|
|
43789
44156
|
|
|
43790
|
-
|
|
44157
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
43791
44158
|
|
|
43792
|
-
|
|
43793
|
-
|
|
44159
|
+
// Set the request timeout in MS
|
|
44160
|
+
request.timeout = _config.timeout;
|
|
43794
44161
|
|
|
43795
|
-
|
|
43796
|
-
|
|
43797
|
-
|
|
44162
|
+
function onloadend() {
|
|
44163
|
+
if (!request) {
|
|
44164
|
+
return;
|
|
44165
|
+
}
|
|
44166
|
+
// Prepare the response
|
|
44167
|
+
const responseHeaders = AxiosHeaders.from(
|
|
44168
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
44169
|
+
);
|
|
44170
|
+
const responseData =
|
|
44171
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
44172
|
+
? request.responseText
|
|
44173
|
+
: request.response;
|
|
44174
|
+
const response = {
|
|
44175
|
+
data: responseData,
|
|
44176
|
+
status: request.status,
|
|
44177
|
+
statusText: request.statusText,
|
|
44178
|
+
headers: responseHeaders,
|
|
44179
|
+
config,
|
|
44180
|
+
request,
|
|
44181
|
+
};
|
|
44182
|
+
|
|
44183
|
+
settle(
|
|
44184
|
+
function _resolve(value) {
|
|
44185
|
+
resolve(value);
|
|
44186
|
+
done();
|
|
44187
|
+
},
|
|
44188
|
+
function _reject(err) {
|
|
44189
|
+
reject(err);
|
|
44190
|
+
done();
|
|
44191
|
+
},
|
|
44192
|
+
response
|
|
44193
|
+
);
|
|
44194
|
+
|
|
44195
|
+
// Clean up request
|
|
44196
|
+
request = null;
|
|
43798
44197
|
}
|
|
43799
|
-
// Prepare the response
|
|
43800
|
-
const responseHeaders = AxiosHeaders.from(
|
|
43801
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
43802
|
-
);
|
|
43803
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
43804
|
-
request.responseText : request.response;
|
|
43805
|
-
const response = {
|
|
43806
|
-
data: responseData,
|
|
43807
|
-
status: request.status,
|
|
43808
|
-
statusText: request.statusText,
|
|
43809
|
-
headers: responseHeaders,
|
|
43810
|
-
config,
|
|
43811
|
-
request
|
|
43812
|
-
};
|
|
43813
44198
|
|
|
43814
|
-
|
|
43815
|
-
|
|
43816
|
-
|
|
43817
|
-
}
|
|
43818
|
-
|
|
43819
|
-
|
|
43820
|
-
|
|
44199
|
+
if ('onloadend' in request) {
|
|
44200
|
+
// Use onloadend if available
|
|
44201
|
+
request.onloadend = onloadend;
|
|
44202
|
+
} else {
|
|
44203
|
+
// Listen for ready state to emulate onloadend
|
|
44204
|
+
request.onreadystatechange = function handleLoad() {
|
|
44205
|
+
if (!request || request.readyState !== 4) {
|
|
44206
|
+
return;
|
|
44207
|
+
}
|
|
43821
44208
|
|
|
43822
|
-
|
|
43823
|
-
|
|
43824
|
-
|
|
44209
|
+
// The request errored out and we didn't get a response, this will be
|
|
44210
|
+
// handled by onerror instead
|
|
44211
|
+
// With one exception: request that using file: protocol, most browsers
|
|
44212
|
+
// will return status as 0 even though it's a successful request
|
|
44213
|
+
if (
|
|
44214
|
+
request.status === 0 &&
|
|
44215
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
44216
|
+
) {
|
|
44217
|
+
return;
|
|
44218
|
+
}
|
|
44219
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
44220
|
+
// so we should call onloadend on the next 'tick'
|
|
44221
|
+
setTimeout(onloadend);
|
|
44222
|
+
};
|
|
44223
|
+
}
|
|
43825
44224
|
|
|
43826
|
-
|
|
43827
|
-
|
|
43828
|
-
|
|
43829
|
-
} else {
|
|
43830
|
-
// Listen for ready state to emulate onloadend
|
|
43831
|
-
request.onreadystatechange = function handleLoad() {
|
|
43832
|
-
if (!request || request.readyState !== 4) {
|
|
44225
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
44226
|
+
request.onabort = function handleAbort() {
|
|
44227
|
+
if (!request) {
|
|
43833
44228
|
return;
|
|
43834
44229
|
}
|
|
43835
44230
|
|
|
43836
|
-
|
|
43837
|
-
// handled by onerror instead
|
|
43838
|
-
// With one exception: request that using file: protocol, most browsers
|
|
43839
|
-
// will return status as 0 even though it's a successful request
|
|
43840
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
43841
|
-
return;
|
|
43842
|
-
}
|
|
43843
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
43844
|
-
// so we should call onloadend on the next 'tick'
|
|
43845
|
-
setTimeout(onloadend);
|
|
43846
|
-
};
|
|
43847
|
-
}
|
|
44231
|
+
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
43848
44232
|
|
|
43849
|
-
|
|
43850
|
-
|
|
43851
|
-
|
|
43852
|
-
return;
|
|
43853
|
-
}
|
|
44233
|
+
// Clean up request
|
|
44234
|
+
request = null;
|
|
44235
|
+
};
|
|
43854
44236
|
|
|
43855
|
-
|
|
44237
|
+
// Handle low level network errors
|
|
44238
|
+
request.onerror = function handleError(event) {
|
|
44239
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
44240
|
+
// (message may be empty; when present, surface it)
|
|
44241
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
44242
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
44243
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
44244
|
+
// attach the underlying event for consumers who want details
|
|
44245
|
+
err.event = event || null;
|
|
44246
|
+
reject(err);
|
|
44247
|
+
request = null;
|
|
44248
|
+
};
|
|
43856
44249
|
|
|
43857
|
-
//
|
|
43858
|
-
request =
|
|
43859
|
-
|
|
44250
|
+
// Handle timeout
|
|
44251
|
+
request.ontimeout = function handleTimeout() {
|
|
44252
|
+
let timeoutErrorMessage = _config.timeout
|
|
44253
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
44254
|
+
: 'timeout exceeded';
|
|
44255
|
+
const transitional = _config.transitional || transitionalDefaults;
|
|
44256
|
+
if (_config.timeoutErrorMessage) {
|
|
44257
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
44258
|
+
}
|
|
44259
|
+
reject(
|
|
44260
|
+
new AxiosError(
|
|
44261
|
+
timeoutErrorMessage,
|
|
44262
|
+
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
44263
|
+
config,
|
|
44264
|
+
request
|
|
44265
|
+
)
|
|
44266
|
+
);
|
|
43860
44267
|
|
|
43861
|
-
|
|
43862
|
-
|
|
43863
|
-
|
|
43864
|
-
// onerror should only fire if it's a network error
|
|
43865
|
-
reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
|
|
44268
|
+
// Clean up request
|
|
44269
|
+
request = null;
|
|
44270
|
+
};
|
|
43866
44271
|
|
|
43867
|
-
//
|
|
43868
|
-
|
|
43869
|
-
};
|
|
44272
|
+
// Remove Content-Type if data is undefined
|
|
44273
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
43870
44274
|
|
|
43871
|
-
|
|
43872
|
-
|
|
43873
|
-
|
|
43874
|
-
|
|
43875
|
-
|
|
43876
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
44275
|
+
// Add headers to the request
|
|
44276
|
+
if ('setRequestHeader' in request) {
|
|
44277
|
+
utils$3.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
44278
|
+
request.setRequestHeader(key, val);
|
|
44279
|
+
});
|
|
43877
44280
|
}
|
|
43878
|
-
reject(new AxiosError(
|
|
43879
|
-
timeoutErrorMessage,
|
|
43880
|
-
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
43881
|
-
config,
|
|
43882
|
-
request));
|
|
43883
44281
|
|
|
43884
|
-
//
|
|
43885
|
-
|
|
43886
|
-
|
|
43887
|
-
|
|
43888
|
-
// Remove Content-Type if data is undefined
|
|
43889
|
-
requestData === undefined && requestHeaders.setContentType(null);
|
|
43890
|
-
|
|
43891
|
-
// Add headers to the request
|
|
43892
|
-
if ('setRequestHeader' in request) {
|
|
43893
|
-
utils$3.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
43894
|
-
request.setRequestHeader(key, val);
|
|
43895
|
-
});
|
|
43896
|
-
}
|
|
44282
|
+
// Add withCredentials to request if needed
|
|
44283
|
+
if (!utils$3.isUndefined(_config.withCredentials)) {
|
|
44284
|
+
request.withCredentials = !!_config.withCredentials;
|
|
44285
|
+
}
|
|
43897
44286
|
|
|
43898
|
-
|
|
43899
|
-
|
|
43900
|
-
|
|
43901
|
-
|
|
44287
|
+
// Add responseType to request if needed
|
|
44288
|
+
if (responseType && responseType !== 'json') {
|
|
44289
|
+
request.responseType = _config.responseType;
|
|
44290
|
+
}
|
|
43902
44291
|
|
|
43903
|
-
|
|
43904
|
-
|
|
43905
|
-
|
|
43906
|
-
|
|
44292
|
+
// Handle progress if needed
|
|
44293
|
+
if (onDownloadProgress) {
|
|
44294
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
44295
|
+
request.addEventListener('progress', downloadThrottled);
|
|
44296
|
+
}
|
|
43907
44297
|
|
|
43908
|
-
|
|
43909
|
-
|
|
43910
|
-
|
|
43911
|
-
request.addEventListener('progress', downloadThrottled);
|
|
43912
|
-
}
|
|
44298
|
+
// Not all browsers support upload events
|
|
44299
|
+
if (onUploadProgress && request.upload) {
|
|
44300
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
43913
44301
|
|
|
43914
|
-
|
|
43915
|
-
if (onUploadProgress && request.upload) {
|
|
43916
|
-
([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
|
|
44302
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
43917
44303
|
|
|
43918
|
-
|
|
44304
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
44305
|
+
}
|
|
43919
44306
|
|
|
43920
|
-
|
|
43921
|
-
|
|
44307
|
+
if (_config.cancelToken || _config.signal) {
|
|
44308
|
+
// Handle cancellation
|
|
44309
|
+
// eslint-disable-next-line func-names
|
|
44310
|
+
onCanceled = (cancel) => {
|
|
44311
|
+
if (!request) {
|
|
44312
|
+
return;
|
|
44313
|
+
}
|
|
44314
|
+
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
44315
|
+
request.abort();
|
|
44316
|
+
request = null;
|
|
44317
|
+
};
|
|
43922
44318
|
|
|
43923
|
-
|
|
43924
|
-
|
|
43925
|
-
|
|
43926
|
-
|
|
43927
|
-
|
|
43928
|
-
return;
|
|
44319
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
44320
|
+
if (_config.signal) {
|
|
44321
|
+
_config.signal.aborted
|
|
44322
|
+
? onCanceled()
|
|
44323
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
43929
44324
|
}
|
|
43930
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
43931
|
-
request.abort();
|
|
43932
|
-
request = null;
|
|
43933
|
-
};
|
|
43934
|
-
|
|
43935
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
43936
|
-
if (_config.signal) {
|
|
43937
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
43938
44325
|
}
|
|
43939
|
-
}
|
|
43940
|
-
|
|
43941
|
-
const protocol = parseProtocol(_config.url);
|
|
43942
44326
|
|
|
43943
|
-
|
|
43944
|
-
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
43945
|
-
return;
|
|
43946
|
-
}
|
|
44327
|
+
const protocol = parseProtocol(_config.url);
|
|
43947
44328
|
|
|
44329
|
+
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
44330
|
+
reject(
|
|
44331
|
+
new AxiosError(
|
|
44332
|
+
'Unsupported protocol ' + protocol + ':',
|
|
44333
|
+
AxiosError.ERR_BAD_REQUEST,
|
|
44334
|
+
config
|
|
44335
|
+
)
|
|
44336
|
+
);
|
|
44337
|
+
return;
|
|
44338
|
+
}
|
|
43948
44339
|
|
|
43949
|
-
|
|
43950
|
-
|
|
43951
|
-
|
|
43952
|
-
};
|
|
44340
|
+
// Send the request
|
|
44341
|
+
request.send(requestData || null);
|
|
44342
|
+
});
|
|
44343
|
+
};
|
|
43953
44344
|
|
|
43954
44345
|
const composeSignals = (signals, timeout) => {
|
|
43955
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
44346
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
43956
44347
|
|
|
43957
44348
|
if (timeout || length) {
|
|
43958
44349
|
let controller = new AbortController();
|
|
@@ -43964,21 +44355,29 @@ const composeSignals = (signals, timeout) => {
|
|
|
43964
44355
|
aborted = true;
|
|
43965
44356
|
unsubscribe();
|
|
43966
44357
|
const err = reason instanceof Error ? reason : this.reason;
|
|
43967
|
-
controller.abort(
|
|
44358
|
+
controller.abort(
|
|
44359
|
+
err instanceof AxiosError
|
|
44360
|
+
? err
|
|
44361
|
+
: new CanceledError(err instanceof Error ? err.message : err)
|
|
44362
|
+
);
|
|
43968
44363
|
}
|
|
43969
44364
|
};
|
|
43970
44365
|
|
|
43971
|
-
let timer =
|
|
43972
|
-
|
|
43973
|
-
|
|
43974
|
-
|
|
44366
|
+
let timer =
|
|
44367
|
+
timeout &&
|
|
44368
|
+
setTimeout(() => {
|
|
44369
|
+
timer = null;
|
|
44370
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
44371
|
+
}, timeout);
|
|
43975
44372
|
|
|
43976
44373
|
const unsubscribe = () => {
|
|
43977
44374
|
if (signals) {
|
|
43978
44375
|
timer && clearTimeout(timer);
|
|
43979
44376
|
timer = null;
|
|
43980
|
-
signals.forEach(signal => {
|
|
43981
|
-
signal.unsubscribe
|
|
44377
|
+
signals.forEach((signal) => {
|
|
44378
|
+
signal.unsubscribe
|
|
44379
|
+
? signal.unsubscribe(onabort)
|
|
44380
|
+
: signal.removeEventListener('abort', onabort);
|
|
43982
44381
|
});
|
|
43983
44382
|
signals = null;
|
|
43984
44383
|
}
|
|
@@ -43986,7 +44385,7 @@ const composeSignals = (signals, timeout) => {
|
|
|
43986
44385
|
|
|
43987
44386
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
43988
44387
|
|
|
43989
|
-
const {signal} = controller;
|
|
44388
|
+
const { signal } = controller;
|
|
43990
44389
|
|
|
43991
44390
|
signal.unsubscribe = () => utils$3.asap(unsubscribe);
|
|
43992
44391
|
|
|
@@ -44027,7 +44426,7 @@ const readStream = async function* (stream) {
|
|
|
44027
44426
|
const reader = stream.getReader();
|
|
44028
44427
|
try {
|
|
44029
44428
|
for (;;) {
|
|
44030
|
-
const {done, value} = await reader.read();
|
|
44429
|
+
const { done, value } = await reader.read();
|
|
44031
44430
|
if (done) {
|
|
44032
44431
|
break;
|
|
44033
44432
|
}
|
|
@@ -44050,327 +44449,501 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
44050
44449
|
}
|
|
44051
44450
|
};
|
|
44052
44451
|
|
|
44053
|
-
return new ReadableStream(
|
|
44054
|
-
|
|
44055
|
-
|
|
44056
|
-
|
|
44452
|
+
return new ReadableStream(
|
|
44453
|
+
{
|
|
44454
|
+
async pull(controller) {
|
|
44455
|
+
try {
|
|
44456
|
+
const { done, value } = await iterator.next();
|
|
44057
44457
|
|
|
44058
|
-
|
|
44059
|
-
|
|
44060
|
-
|
|
44061
|
-
|
|
44062
|
-
|
|
44458
|
+
if (done) {
|
|
44459
|
+
_onFinish();
|
|
44460
|
+
controller.close();
|
|
44461
|
+
return;
|
|
44462
|
+
}
|
|
44063
44463
|
|
|
44064
|
-
|
|
44065
|
-
|
|
44066
|
-
|
|
44067
|
-
|
|
44464
|
+
let len = value.byteLength;
|
|
44465
|
+
if (onProgress) {
|
|
44466
|
+
let loadedBytes = (bytes += len);
|
|
44467
|
+
onProgress(loadedBytes);
|
|
44468
|
+
}
|
|
44469
|
+
controller.enqueue(new Uint8Array(value));
|
|
44470
|
+
} catch (err) {
|
|
44471
|
+
_onFinish(err);
|
|
44472
|
+
throw err;
|
|
44068
44473
|
}
|
|
44069
|
-
|
|
44070
|
-
|
|
44071
|
-
_onFinish(
|
|
44072
|
-
|
|
44073
|
-
}
|
|
44474
|
+
},
|
|
44475
|
+
cancel(reason) {
|
|
44476
|
+
_onFinish(reason);
|
|
44477
|
+
return iterator.return();
|
|
44478
|
+
},
|
|
44074
44479
|
},
|
|
44075
|
-
|
|
44076
|
-
|
|
44077
|
-
return iterator.return();
|
|
44480
|
+
{
|
|
44481
|
+
highWaterMark: 2,
|
|
44078
44482
|
}
|
|
44079
|
-
|
|
44080
|
-
highWaterMark: 2
|
|
44081
|
-
})
|
|
44483
|
+
);
|
|
44082
44484
|
};
|
|
44083
44485
|
|
|
44084
|
-
const
|
|
44085
|
-
|
|
44486
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
44487
|
+
|
|
44488
|
+
const { isFunction: isFunction$1 } = utils$3;
|
|
44086
44489
|
|
|
44087
|
-
|
|
44088
|
-
|
|
44089
|
-
|
|
44090
|
-
|
|
44091
|
-
|
|
44490
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
44491
|
+
Request,
|
|
44492
|
+
Response,
|
|
44493
|
+
}))(utils$3.global);
|
|
44494
|
+
|
|
44495
|
+
const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = utils$3.global;
|
|
44092
44496
|
|
|
44093
44497
|
const test = (fn, ...args) => {
|
|
44094
44498
|
try {
|
|
44095
44499
|
return !!fn(...args);
|
|
44096
44500
|
} catch (e) {
|
|
44097
|
-
return false
|
|
44501
|
+
return false;
|
|
44098
44502
|
}
|
|
44099
44503
|
};
|
|
44100
44504
|
|
|
44101
|
-
const
|
|
44102
|
-
|
|
44103
|
-
|
|
44104
|
-
|
|
44105
|
-
body: new ReadableStream(),
|
|
44106
|
-
method: 'POST',
|
|
44107
|
-
get duplex() {
|
|
44108
|
-
duplexAccessed = true;
|
|
44109
|
-
return 'half';
|
|
44505
|
+
const factory = (env) => {
|
|
44506
|
+
env = utils$3.merge.call(
|
|
44507
|
+
{
|
|
44508
|
+
skipUndefined: true,
|
|
44110
44509
|
},
|
|
44111
|
-
|
|
44510
|
+
globalFetchAPI,
|
|
44511
|
+
env
|
|
44512
|
+
);
|
|
44112
44513
|
|
|
44113
|
-
|
|
44114
|
-
|
|
44514
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
44515
|
+
const isFetchSupported = envFetch ? isFunction$1(envFetch) : typeof fetch === 'function';
|
|
44516
|
+
const isRequestSupported = isFunction$1(Request);
|
|
44517
|
+
const isResponseSupported = isFunction$1(Response);
|
|
44115
44518
|
|
|
44116
|
-
|
|
44519
|
+
if (!isFetchSupported) {
|
|
44520
|
+
return false;
|
|
44521
|
+
}
|
|
44117
44522
|
|
|
44118
|
-
const
|
|
44119
|
-
test(() => utils$3.isReadableStream(new Response('').body));
|
|
44523
|
+
const isReadableStreamSupported = isFetchSupported && isFunction$1(ReadableStream$1);
|
|
44120
44524
|
|
|
44525
|
+
const encodeText =
|
|
44526
|
+
isFetchSupported &&
|
|
44527
|
+
(typeof TextEncoder$1 === 'function'
|
|
44528
|
+
? (
|
|
44529
|
+
(encoder) => (str) =>
|
|
44530
|
+
encoder.encode(str)
|
|
44531
|
+
)(new TextEncoder$1())
|
|
44532
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
44121
44533
|
|
|
44122
|
-
const
|
|
44123
|
-
|
|
44124
|
-
|
|
44534
|
+
const supportsRequestStream =
|
|
44535
|
+
isRequestSupported &&
|
|
44536
|
+
isReadableStreamSupported &&
|
|
44537
|
+
test(() => {
|
|
44538
|
+
let duplexAccessed = false;
|
|
44125
44539
|
|
|
44126
|
-
|
|
44127
|
-
|
|
44128
|
-
|
|
44129
|
-
|
|
44130
|
-
|
|
44540
|
+
const request = new Request(platform.origin, {
|
|
44541
|
+
body: new ReadableStream$1(),
|
|
44542
|
+
method: 'POST',
|
|
44543
|
+
get duplex() {
|
|
44544
|
+
duplexAccessed = true;
|
|
44545
|
+
return 'half';
|
|
44546
|
+
},
|
|
44131
44547
|
});
|
|
44132
|
-
});
|
|
44133
|
-
})(new Response));
|
|
44134
44548
|
|
|
44135
|
-
const
|
|
44136
|
-
if (body == null) {
|
|
44137
|
-
return 0;
|
|
44138
|
-
}
|
|
44549
|
+
const hasContentType = request.headers.has('Content-Type');
|
|
44139
44550
|
|
|
44140
|
-
|
|
44141
|
-
|
|
44142
|
-
|
|
44551
|
+
if (request.body != null) {
|
|
44552
|
+
request.body.cancel();
|
|
44553
|
+
}
|
|
44143
44554
|
|
|
44144
|
-
|
|
44145
|
-
const _request = new Request(platform.origin, {
|
|
44146
|
-
method: 'POST',
|
|
44147
|
-
body,
|
|
44555
|
+
return duplexAccessed && !hasContentType;
|
|
44148
44556
|
});
|
|
44149
|
-
return (await _request.arrayBuffer()).byteLength;
|
|
44150
|
-
}
|
|
44151
44557
|
|
|
44152
|
-
|
|
44153
|
-
|
|
44154
|
-
|
|
44558
|
+
const supportsResponseStream =
|
|
44559
|
+
isResponseSupported &&
|
|
44560
|
+
isReadableStreamSupported &&
|
|
44561
|
+
test(() => utils$3.isReadableStream(new Response('').body));
|
|
44155
44562
|
|
|
44156
|
-
|
|
44157
|
-
|
|
44158
|
-
}
|
|
44563
|
+
const resolvers = {
|
|
44564
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
44565
|
+
};
|
|
44159
44566
|
|
|
44160
|
-
|
|
44161
|
-
|
|
44162
|
-
|
|
44163
|
-
|
|
44567
|
+
isFetchSupported &&
|
|
44568
|
+
(() => {
|
|
44569
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
44570
|
+
!resolvers[type] &&
|
|
44571
|
+
(resolvers[type] = (res, config) => {
|
|
44572
|
+
let method = res && res[type];
|
|
44164
44573
|
|
|
44165
|
-
|
|
44166
|
-
|
|
44574
|
+
if (method) {
|
|
44575
|
+
return method.call(res);
|
|
44576
|
+
}
|
|
44167
44577
|
|
|
44168
|
-
|
|
44169
|
-
}
|
|
44578
|
+
throw new AxiosError(
|
|
44579
|
+
`Response type '${type}' is not supported`,
|
|
44580
|
+
AxiosError.ERR_NOT_SUPPORT,
|
|
44581
|
+
config
|
|
44582
|
+
);
|
|
44583
|
+
});
|
|
44584
|
+
});
|
|
44585
|
+
})();
|
|
44170
44586
|
|
|
44171
|
-
|
|
44172
|
-
|
|
44173
|
-
|
|
44174
|
-
|
|
44175
|
-
data,
|
|
44176
|
-
signal,
|
|
44177
|
-
cancelToken,
|
|
44178
|
-
timeout,
|
|
44179
|
-
onDownloadProgress,
|
|
44180
|
-
onUploadProgress,
|
|
44181
|
-
responseType,
|
|
44182
|
-
headers,
|
|
44183
|
-
withCredentials = 'same-origin',
|
|
44184
|
-
fetchOptions
|
|
44185
|
-
} = resolveConfig(config);
|
|
44587
|
+
const getBodyLength = async (body) => {
|
|
44588
|
+
if (body == null) {
|
|
44589
|
+
return 0;
|
|
44590
|
+
}
|
|
44186
44591
|
|
|
44187
|
-
|
|
44592
|
+
if (utils$3.isBlob(body)) {
|
|
44593
|
+
return body.size;
|
|
44594
|
+
}
|
|
44188
44595
|
|
|
44189
|
-
|
|
44596
|
+
if (utils$3.isSpecCompliantForm(body)) {
|
|
44597
|
+
const _request = new Request(platform.origin, {
|
|
44598
|
+
method: 'POST',
|
|
44599
|
+
body,
|
|
44600
|
+
});
|
|
44601
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
44602
|
+
}
|
|
44190
44603
|
|
|
44191
|
-
|
|
44604
|
+
if (utils$3.isArrayBufferView(body) || utils$3.isArrayBuffer(body)) {
|
|
44605
|
+
return body.byteLength;
|
|
44606
|
+
}
|
|
44192
44607
|
|
|
44193
|
-
|
|
44194
|
-
|
|
44195
|
-
|
|
44608
|
+
if (utils$3.isURLSearchParams(body)) {
|
|
44609
|
+
body = body + '';
|
|
44610
|
+
}
|
|
44196
44611
|
|
|
44197
|
-
|
|
44612
|
+
if (utils$3.isString(body)) {
|
|
44613
|
+
return (await encodeText(body)).byteLength;
|
|
44614
|
+
}
|
|
44615
|
+
};
|
|
44198
44616
|
|
|
44199
|
-
|
|
44200
|
-
|
|
44201
|
-
|
|
44202
|
-
|
|
44203
|
-
|
|
44204
|
-
|
|
44205
|
-
|
|
44206
|
-
|
|
44207
|
-
|
|
44617
|
+
const resolveBodyLength = async (headers, body) => {
|
|
44618
|
+
const length = utils$3.toFiniteNumber(headers.getContentLength());
|
|
44619
|
+
|
|
44620
|
+
return length == null ? getBodyLength(body) : length;
|
|
44621
|
+
};
|
|
44622
|
+
|
|
44623
|
+
return async (config) => {
|
|
44624
|
+
let {
|
|
44625
|
+
url,
|
|
44626
|
+
method,
|
|
44627
|
+
data,
|
|
44628
|
+
signal,
|
|
44629
|
+
cancelToken,
|
|
44630
|
+
timeout,
|
|
44631
|
+
onDownloadProgress,
|
|
44632
|
+
onUploadProgress,
|
|
44633
|
+
responseType,
|
|
44634
|
+
headers,
|
|
44635
|
+
withCredentials = 'same-origin',
|
|
44636
|
+
fetchOptions,
|
|
44637
|
+
} = resolveConfig(config);
|
|
44638
|
+
|
|
44639
|
+
let _fetch = envFetch || fetch;
|
|
44640
|
+
|
|
44641
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
44642
|
+
|
|
44643
|
+
let composedSignal = composeSignals(
|
|
44644
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
44645
|
+
timeout
|
|
44646
|
+
);
|
|
44647
|
+
|
|
44648
|
+
let request = null;
|
|
44649
|
+
|
|
44650
|
+
const unsubscribe =
|
|
44651
|
+
composedSignal &&
|
|
44652
|
+
composedSignal.unsubscribe &&
|
|
44653
|
+
(() => {
|
|
44654
|
+
composedSignal.unsubscribe();
|
|
44208
44655
|
});
|
|
44209
44656
|
|
|
44210
|
-
|
|
44657
|
+
let requestContentLength;
|
|
44211
44658
|
|
|
44212
|
-
|
|
44213
|
-
|
|
44659
|
+
try {
|
|
44660
|
+
if (
|
|
44661
|
+
onUploadProgress &&
|
|
44662
|
+
supportsRequestStream &&
|
|
44663
|
+
method !== 'get' &&
|
|
44664
|
+
method !== 'head' &&
|
|
44665
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
44666
|
+
) {
|
|
44667
|
+
let _request = new Request(url, {
|
|
44668
|
+
method: 'POST',
|
|
44669
|
+
body: data,
|
|
44670
|
+
duplex: 'half',
|
|
44671
|
+
});
|
|
44672
|
+
|
|
44673
|
+
let contentTypeHeader;
|
|
44674
|
+
|
|
44675
|
+
if (utils$3.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
44676
|
+
headers.setContentType(contentTypeHeader);
|
|
44677
|
+
}
|
|
44678
|
+
|
|
44679
|
+
if (_request.body) {
|
|
44680
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
44681
|
+
requestContentLength,
|
|
44682
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
44683
|
+
);
|
|
44684
|
+
|
|
44685
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
44686
|
+
}
|
|
44214
44687
|
}
|
|
44215
44688
|
|
|
44216
|
-
if (
|
|
44217
|
-
|
|
44218
|
-
|
|
44219
|
-
|
|
44220
|
-
|
|
44689
|
+
if (!utils$3.isString(withCredentials)) {
|
|
44690
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
44691
|
+
}
|
|
44692
|
+
|
|
44693
|
+
// Cloudflare Workers throws when credentials are defined
|
|
44694
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
44695
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
44221
44696
|
|
|
44222
|
-
|
|
44697
|
+
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
44698
|
+
// delete it so fetch can set it correctly with the boundary
|
|
44699
|
+
if (utils$3.isFormData(data)) {
|
|
44700
|
+
const contentType = headers.getContentType();
|
|
44701
|
+
if (
|
|
44702
|
+
contentType &&
|
|
44703
|
+
/^multipart\/form-data/i.test(contentType) &&
|
|
44704
|
+
!/boundary=/i.test(contentType)
|
|
44705
|
+
) {
|
|
44706
|
+
headers.delete('content-type');
|
|
44707
|
+
}
|
|
44223
44708
|
}
|
|
44224
|
-
}
|
|
44225
44709
|
|
|
44226
|
-
|
|
44227
|
-
|
|
44228
|
-
|
|
44710
|
+
const resolvedOptions = {
|
|
44711
|
+
...fetchOptions,
|
|
44712
|
+
signal: composedSignal,
|
|
44713
|
+
method: method.toUpperCase(),
|
|
44714
|
+
headers: headers.normalize().toJSON(),
|
|
44715
|
+
body: data,
|
|
44716
|
+
duplex: 'half',
|
|
44717
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
44718
|
+
};
|
|
44229
44719
|
|
|
44230
|
-
|
|
44231
|
-
// see https://github.com/cloudflare/workerd/issues/902
|
|
44232
|
-
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
44233
|
-
request = new Request(url, {
|
|
44234
|
-
...fetchOptions,
|
|
44235
|
-
signal: composedSignal,
|
|
44236
|
-
method: method.toUpperCase(),
|
|
44237
|
-
headers: headers.normalize().toJSON(),
|
|
44238
|
-
body: data,
|
|
44239
|
-
duplex: "half",
|
|
44240
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
44241
|
-
});
|
|
44720
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
44242
44721
|
|
|
44243
|
-
|
|
44722
|
+
let response = await (isRequestSupported
|
|
44723
|
+
? _fetch(request, fetchOptions)
|
|
44724
|
+
: _fetch(url, resolvedOptions));
|
|
44244
44725
|
|
|
44245
|
-
|
|
44726
|
+
const isStreamResponse =
|
|
44727
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
44246
44728
|
|
|
44247
|
-
|
|
44248
|
-
|
|
44729
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
44730
|
+
const options = {};
|
|
44249
44731
|
|
|
44250
|
-
|
|
44251
|
-
|
|
44252
|
-
|
|
44732
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
44733
|
+
options[prop] = response[prop];
|
|
44734
|
+
});
|
|
44253
44735
|
|
|
44254
|
-
|
|
44736
|
+
const responseContentLength = utils$3.toFiniteNumber(response.headers.get('content-length'));
|
|
44255
44737
|
|
|
44256
|
-
|
|
44257
|
-
|
|
44258
|
-
|
|
44259
|
-
|
|
44738
|
+
const [onProgress, flush] =
|
|
44739
|
+
(onDownloadProgress &&
|
|
44740
|
+
progressEventDecorator(
|
|
44741
|
+
responseContentLength,
|
|
44742
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
44743
|
+
)) ||
|
|
44744
|
+
[];
|
|
44260
44745
|
|
|
44261
|
-
|
|
44262
|
-
|
|
44263
|
-
|
|
44264
|
-
|
|
44265
|
-
|
|
44266
|
-
|
|
44267
|
-
|
|
44268
|
-
|
|
44746
|
+
response = new Response(
|
|
44747
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
44748
|
+
flush && flush();
|
|
44749
|
+
unsubscribe && unsubscribe();
|
|
44750
|
+
}),
|
|
44751
|
+
options
|
|
44752
|
+
);
|
|
44753
|
+
}
|
|
44269
44754
|
|
|
44270
|
-
|
|
44755
|
+
responseType = responseType || 'text';
|
|
44271
44756
|
|
|
44272
|
-
|
|
44757
|
+
let responseData = await resolvers[utils$3.findKey(resolvers, responseType) || 'text'](
|
|
44758
|
+
response,
|
|
44759
|
+
config
|
|
44760
|
+
);
|
|
44273
44761
|
|
|
44274
|
-
|
|
44762
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
44275
44763
|
|
|
44276
|
-
|
|
44277
|
-
|
|
44278
|
-
|
|
44279
|
-
|
|
44280
|
-
|
|
44281
|
-
|
|
44282
|
-
|
|
44283
|
-
|
|
44764
|
+
return await new Promise((resolve, reject) => {
|
|
44765
|
+
settle(resolve, reject, {
|
|
44766
|
+
data: responseData,
|
|
44767
|
+
headers: AxiosHeaders.from(response.headers),
|
|
44768
|
+
status: response.status,
|
|
44769
|
+
statusText: response.statusText,
|
|
44770
|
+
config,
|
|
44771
|
+
request,
|
|
44772
|
+
});
|
|
44284
44773
|
});
|
|
44285
|
-
})
|
|
44286
|
-
|
|
44287
|
-
|
|
44774
|
+
} catch (err) {
|
|
44775
|
+
unsubscribe && unsubscribe();
|
|
44776
|
+
|
|
44777
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
44778
|
+
throw Object.assign(
|
|
44779
|
+
new AxiosError(
|
|
44780
|
+
'Network Error',
|
|
44781
|
+
AxiosError.ERR_NETWORK,
|
|
44782
|
+
config,
|
|
44783
|
+
request,
|
|
44784
|
+
err && err.response
|
|
44785
|
+
),
|
|
44786
|
+
{
|
|
44787
|
+
cause: err.cause || err,
|
|
44788
|
+
}
|
|
44789
|
+
);
|
|
44790
|
+
}
|
|
44288
44791
|
|
|
44289
|
-
|
|
44290
|
-
throw Object.assign(
|
|
44291
|
-
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
|
44292
|
-
{
|
|
44293
|
-
cause: err.cause || err
|
|
44294
|
-
}
|
|
44295
|
-
)
|
|
44792
|
+
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
44296
44793
|
}
|
|
44794
|
+
};
|
|
44795
|
+
};
|
|
44297
44796
|
|
|
44298
|
-
|
|
44797
|
+
const seedCache = new Map();
|
|
44798
|
+
|
|
44799
|
+
const getFetch = (config) => {
|
|
44800
|
+
let env = (config && config.env) || {};
|
|
44801
|
+
const { fetch, Request, Response } = env;
|
|
44802
|
+
const seeds = [Request, Response, fetch];
|
|
44803
|
+
|
|
44804
|
+
let len = seeds.length,
|
|
44805
|
+
i = len,
|
|
44806
|
+
seed,
|
|
44807
|
+
target,
|
|
44808
|
+
map = seedCache;
|
|
44809
|
+
|
|
44810
|
+
while (i--) {
|
|
44811
|
+
seed = seeds[i];
|
|
44812
|
+
target = map.get(seed);
|
|
44813
|
+
|
|
44814
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
44815
|
+
|
|
44816
|
+
map = target;
|
|
44299
44817
|
}
|
|
44300
|
-
});
|
|
44301
44818
|
|
|
44819
|
+
return target;
|
|
44820
|
+
};
|
|
44821
|
+
|
|
44822
|
+
getFetch();
|
|
44823
|
+
|
|
44824
|
+
/**
|
|
44825
|
+
* Known adapters mapping.
|
|
44826
|
+
* Provides environment-specific adapters for Axios:
|
|
44827
|
+
* - `http` for Node.js
|
|
44828
|
+
* - `xhr` for browsers
|
|
44829
|
+
* - `fetch` for fetch API-based requests
|
|
44830
|
+
*
|
|
44831
|
+
* @type {Object<string, Function|Object>}
|
|
44832
|
+
*/
|
|
44302
44833
|
const knownAdapters = {
|
|
44303
44834
|
http: httpAdapter,
|
|
44304
44835
|
xhr: xhrAdapter,
|
|
44305
|
-
fetch:
|
|
44836
|
+
fetch: {
|
|
44837
|
+
get: getFetch,
|
|
44838
|
+
},
|
|
44306
44839
|
};
|
|
44307
44840
|
|
|
44841
|
+
// Assign adapter names for easier debugging and identification
|
|
44308
44842
|
utils$3.forEach(knownAdapters, (fn, value) => {
|
|
44309
44843
|
if (fn) {
|
|
44310
44844
|
try {
|
|
44311
|
-
Object.defineProperty(fn, 'name', {value});
|
|
44845
|
+
Object.defineProperty(fn, 'name', { value });
|
|
44312
44846
|
} catch (e) {
|
|
44313
44847
|
// eslint-disable-next-line no-empty
|
|
44314
44848
|
}
|
|
44315
|
-
Object.defineProperty(fn, 'adapterName', {value});
|
|
44849
|
+
Object.defineProperty(fn, 'adapterName', { value });
|
|
44316
44850
|
}
|
|
44317
44851
|
});
|
|
44318
44852
|
|
|
44853
|
+
/**
|
|
44854
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
44855
|
+
*
|
|
44856
|
+
* @param {string} reason
|
|
44857
|
+
* @returns {string}
|
|
44858
|
+
*/
|
|
44319
44859
|
const renderReason = (reason) => `- ${reason}`;
|
|
44320
44860
|
|
|
44321
|
-
|
|
44322
|
-
|
|
44323
|
-
|
|
44324
|
-
|
|
44325
|
-
|
|
44861
|
+
/**
|
|
44862
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
44863
|
+
*
|
|
44864
|
+
* @param {Function|null|false} adapter
|
|
44865
|
+
* @returns {boolean}
|
|
44866
|
+
*/
|
|
44867
|
+
const isResolvedHandle = (adapter) =>
|
|
44868
|
+
utils$3.isFunction(adapter) || adapter === null || adapter === false;
|
|
44326
44869
|
|
|
44327
|
-
|
|
44328
|
-
|
|
44329
|
-
|
|
44870
|
+
/**
|
|
44871
|
+
* Get the first suitable adapter from the provided list.
|
|
44872
|
+
* Tries each adapter in order until a supported one is found.
|
|
44873
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
44874
|
+
*
|
|
44875
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
44876
|
+
* @param {Object} config - Axios request configuration
|
|
44877
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
44878
|
+
* @returns {Function} The resolved adapter function
|
|
44879
|
+
*/
|
|
44880
|
+
function getAdapter(adapters, config) {
|
|
44881
|
+
adapters = utils$3.isArray(adapters) ? adapters : [adapters];
|
|
44330
44882
|
|
|
44331
|
-
|
|
44883
|
+
const { length } = adapters;
|
|
44884
|
+
let nameOrAdapter;
|
|
44885
|
+
let adapter;
|
|
44332
44886
|
|
|
44333
|
-
|
|
44334
|
-
nameOrAdapter = adapters[i];
|
|
44335
|
-
let id;
|
|
44887
|
+
const rejectedReasons = {};
|
|
44336
44888
|
|
|
44337
|
-
|
|
44889
|
+
for (let i = 0; i < length; i++) {
|
|
44890
|
+
nameOrAdapter = adapters[i];
|
|
44891
|
+
let id;
|
|
44338
44892
|
|
|
44339
|
-
|
|
44340
|
-
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
44893
|
+
adapter = nameOrAdapter;
|
|
44341
44894
|
|
|
44342
|
-
|
|
44343
|
-
|
|
44344
|
-
}
|
|
44345
|
-
}
|
|
44895
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
44896
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
44346
44897
|
|
|
44347
|
-
if (adapter) {
|
|
44348
|
-
|
|
44898
|
+
if (adapter === undefined) {
|
|
44899
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
44349
44900
|
}
|
|
44901
|
+
}
|
|
44350
44902
|
|
|
44351
|
-
|
|
44903
|
+
if (adapter && (utils$3.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
44904
|
+
break;
|
|
44352
44905
|
}
|
|
44353
44906
|
|
|
44354
|
-
|
|
44907
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
44908
|
+
}
|
|
44355
44909
|
|
|
44356
|
-
|
|
44357
|
-
|
|
44358
|
-
|
|
44359
|
-
|
|
44910
|
+
if (!adapter) {
|
|
44911
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
44912
|
+
([id, state]) =>
|
|
44913
|
+
`adapter ${id} ` +
|
|
44914
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
44915
|
+
);
|
|
44360
44916
|
|
|
44361
|
-
|
|
44362
|
-
|
|
44363
|
-
'
|
|
44917
|
+
let s = length
|
|
44918
|
+
? reasons.length > 1
|
|
44919
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
44920
|
+
: ' ' + renderReason(reasons[0])
|
|
44921
|
+
: 'as no adapter specified';
|
|
44364
44922
|
|
|
44365
|
-
|
|
44366
|
-
|
|
44367
|
-
|
|
44368
|
-
|
|
44369
|
-
|
|
44923
|
+
throw new AxiosError(
|
|
44924
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
44925
|
+
'ERR_NOT_SUPPORT'
|
|
44926
|
+
);
|
|
44927
|
+
}
|
|
44370
44928
|
|
|
44371
|
-
|
|
44372
|
-
|
|
44373
|
-
|
|
44929
|
+
return adapter;
|
|
44930
|
+
}
|
|
44931
|
+
|
|
44932
|
+
/**
|
|
44933
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
44934
|
+
*/
|
|
44935
|
+
var adapters = {
|
|
44936
|
+
/**
|
|
44937
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
44938
|
+
* @type {Function}
|
|
44939
|
+
*/
|
|
44940
|
+
getAdapter,
|
|
44941
|
+
|
|
44942
|
+
/**
|
|
44943
|
+
* Exposes all known adapters
|
|
44944
|
+
* @type {Object<string, Function|Object>}
|
|
44945
|
+
*/
|
|
44946
|
+
adapters: knownAdapters,
|
|
44374
44947
|
};
|
|
44375
44948
|
|
|
44376
44949
|
/**
|
|
@@ -44403,50 +44976,46 @@ function dispatchRequest(config) {
|
|
|
44403
44976
|
config.headers = AxiosHeaders.from(config.headers);
|
|
44404
44977
|
|
|
44405
44978
|
// Transform request data
|
|
44406
|
-
config.data = transformData.call(
|
|
44407
|
-
config,
|
|
44408
|
-
config.transformRequest
|
|
44409
|
-
);
|
|
44979
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
44410
44980
|
|
|
44411
44981
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
44412
44982
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
44413
44983
|
}
|
|
44414
44984
|
|
|
44415
|
-
const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
|
|
44985
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
44416
44986
|
|
|
44417
|
-
return adapter(config).then(
|
|
44418
|
-
|
|
44419
|
-
|
|
44420
|
-
// Transform response data
|
|
44421
|
-
response.data = transformData.call(
|
|
44422
|
-
config,
|
|
44423
|
-
config.transformResponse,
|
|
44424
|
-
response
|
|
44425
|
-
);
|
|
44426
|
-
|
|
44427
|
-
response.headers = AxiosHeaders.from(response.headers);
|
|
44428
|
-
|
|
44429
|
-
return response;
|
|
44430
|
-
}, function onAdapterRejection(reason) {
|
|
44431
|
-
if (!isCancel(reason)) {
|
|
44987
|
+
return adapter(config).then(
|
|
44988
|
+
function onAdapterResolution(response) {
|
|
44432
44989
|
throwIfCancellationRequested(config);
|
|
44433
44990
|
|
|
44434
44991
|
// Transform response data
|
|
44435
|
-
|
|
44436
|
-
|
|
44437
|
-
|
|
44438
|
-
|
|
44439
|
-
|
|
44440
|
-
|
|
44441
|
-
|
|
44992
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
44993
|
+
|
|
44994
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
44995
|
+
|
|
44996
|
+
return response;
|
|
44997
|
+
},
|
|
44998
|
+
function onAdapterRejection(reason) {
|
|
44999
|
+
if (!isCancel(reason)) {
|
|
45000
|
+
throwIfCancellationRequested(config);
|
|
45001
|
+
|
|
45002
|
+
// Transform response data
|
|
45003
|
+
if (reason && reason.response) {
|
|
45004
|
+
reason.response.data = transformData.call(
|
|
45005
|
+
config,
|
|
45006
|
+
config.transformResponse,
|
|
45007
|
+
reason.response
|
|
45008
|
+
);
|
|
45009
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
45010
|
+
}
|
|
44442
45011
|
}
|
|
44443
|
-
}
|
|
44444
45012
|
|
|
44445
|
-
|
|
44446
|
-
|
|
45013
|
+
return Promise.reject(reason);
|
|
45014
|
+
}
|
|
45015
|
+
);
|
|
44447
45016
|
}
|
|
44448
45017
|
|
|
44449
|
-
const VERSION = "1.
|
|
45018
|
+
const VERSION = "1.15.2";
|
|
44450
45019
|
|
|
44451
45020
|
const validators$1 = {};
|
|
44452
45021
|
|
|
@@ -44470,7 +45039,15 @@ const deprecatedWarnings = {};
|
|
|
44470
45039
|
*/
|
|
44471
45040
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
44472
45041
|
function formatMessage(opt, desc) {
|
|
44473
|
-
return
|
|
45042
|
+
return (
|
|
45043
|
+
'[Axios v' +
|
|
45044
|
+
VERSION +
|
|
45045
|
+
"] Transitional option '" +
|
|
45046
|
+
opt +
|
|
45047
|
+
"'" +
|
|
45048
|
+
desc +
|
|
45049
|
+
(message ? '. ' + message : '')
|
|
45050
|
+
);
|
|
44474
45051
|
}
|
|
44475
45052
|
|
|
44476
45053
|
// eslint-disable-next-line func-names
|
|
@@ -44502,7 +45079,7 @@ validators$1.spelling = function spelling(correctSpelling) {
|
|
|
44502
45079
|
// eslint-disable-next-line no-console
|
|
44503
45080
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
44504
45081
|
return true;
|
|
44505
|
-
}
|
|
45082
|
+
};
|
|
44506
45083
|
};
|
|
44507
45084
|
|
|
44508
45085
|
/**
|
|
@@ -44523,12 +45100,17 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
44523
45100
|
let i = keys.length;
|
|
44524
45101
|
while (i-- > 0) {
|
|
44525
45102
|
const opt = keys[i];
|
|
44526
|
-
|
|
45103
|
+
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
45104
|
+
// a non-function validator and cause a TypeError. See GHSA-q8qp-cvcw-x6jj.
|
|
45105
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
44527
45106
|
if (validator) {
|
|
44528
45107
|
const value = options[opt];
|
|
44529
45108
|
const result = value === undefined || validator(value, opt, options);
|
|
44530
45109
|
if (result !== true) {
|
|
44531
|
-
throw new AxiosError(
|
|
45110
|
+
throw new AxiosError(
|
|
45111
|
+
'option ' + opt + ' must be ' + result,
|
|
45112
|
+
AxiosError.ERR_BAD_OPTION_VALUE
|
|
45113
|
+
);
|
|
44532
45114
|
}
|
|
44533
45115
|
continue;
|
|
44534
45116
|
}
|
|
@@ -44540,7 +45122,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
44540
45122
|
|
|
44541
45123
|
var validator = {
|
|
44542
45124
|
assertOptions,
|
|
44543
|
-
validators: validators$1
|
|
45125
|
+
validators: validators$1,
|
|
44544
45126
|
};
|
|
44545
45127
|
|
|
44546
45128
|
const validators = validator.validators;
|
|
@@ -44557,7 +45139,7 @@ class Axios {
|
|
|
44557
45139
|
this.defaults = instanceConfig || {};
|
|
44558
45140
|
this.interceptors = {
|
|
44559
45141
|
request: new InterceptorManager(),
|
|
44560
|
-
response: new InterceptorManager()
|
|
45142
|
+
response: new InterceptorManager(),
|
|
44561
45143
|
};
|
|
44562
45144
|
}
|
|
44563
45145
|
|
|
@@ -44579,13 +45161,29 @@ class Axios {
|
|
|
44579
45161
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
44580
45162
|
|
|
44581
45163
|
// slice off the Error: ... line
|
|
44582
|
-
const stack =
|
|
45164
|
+
const stack = (() => {
|
|
45165
|
+
if (!dummy.stack) {
|
|
45166
|
+
return '';
|
|
45167
|
+
}
|
|
45168
|
+
|
|
45169
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
45170
|
+
|
|
45171
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
45172
|
+
})();
|
|
44583
45173
|
try {
|
|
44584
45174
|
if (!err.stack) {
|
|
44585
45175
|
err.stack = stack;
|
|
44586
45176
|
// match without the 2 top stack lines
|
|
44587
|
-
} else if (stack
|
|
44588
|
-
|
|
45177
|
+
} else if (stack) {
|
|
45178
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
45179
|
+
const secondNewlineIndex =
|
|
45180
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
45181
|
+
const stackWithoutTwoTopLines =
|
|
45182
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
45183
|
+
|
|
45184
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
45185
|
+
err.stack += '\n' + stack;
|
|
45186
|
+
}
|
|
44589
45187
|
}
|
|
44590
45188
|
} catch (e) {
|
|
44591
45189
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -44608,26 +45206,35 @@ class Axios {
|
|
|
44608
45206
|
|
|
44609
45207
|
config = mergeConfig(this.defaults, config);
|
|
44610
45208
|
|
|
44611
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
45209
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
44612
45210
|
|
|
44613
45211
|
if (transitional !== undefined) {
|
|
44614
|
-
validator.assertOptions(
|
|
44615
|
-
|
|
44616
|
-
|
|
44617
|
-
|
|
44618
|
-
|
|
45212
|
+
validator.assertOptions(
|
|
45213
|
+
transitional,
|
|
45214
|
+
{
|
|
45215
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
45216
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
45217
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
45218
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
45219
|
+
},
|
|
45220
|
+
false
|
|
45221
|
+
);
|
|
44619
45222
|
}
|
|
44620
45223
|
|
|
44621
45224
|
if (paramsSerializer != null) {
|
|
44622
45225
|
if (utils$3.isFunction(paramsSerializer)) {
|
|
44623
45226
|
config.paramsSerializer = {
|
|
44624
|
-
serialize: paramsSerializer
|
|
45227
|
+
serialize: paramsSerializer,
|
|
44625
45228
|
};
|
|
44626
45229
|
} else {
|
|
44627
|
-
validator.assertOptions(
|
|
44628
|
-
|
|
44629
|
-
|
|
44630
|
-
|
|
45230
|
+
validator.assertOptions(
|
|
45231
|
+
paramsSerializer,
|
|
45232
|
+
{
|
|
45233
|
+
encode: validators.function,
|
|
45234
|
+
serialize: validators.function,
|
|
45235
|
+
},
|
|
45236
|
+
true
|
|
45237
|
+
);
|
|
44631
45238
|
}
|
|
44632
45239
|
}
|
|
44633
45240
|
|
|
@@ -44638,26 +45245,25 @@ class Axios {
|
|
|
44638
45245
|
config.allowAbsoluteUrls = true;
|
|
44639
45246
|
}
|
|
44640
45247
|
|
|
44641
|
-
validator.assertOptions(
|
|
44642
|
-
|
|
44643
|
-
|
|
44644
|
-
|
|
45248
|
+
validator.assertOptions(
|
|
45249
|
+
config,
|
|
45250
|
+
{
|
|
45251
|
+
baseUrl: validators.spelling('baseURL'),
|
|
45252
|
+
withXsrfToken: validators.spelling('withXSRFToken'),
|
|
45253
|
+
},
|
|
45254
|
+
true
|
|
45255
|
+
);
|
|
44645
45256
|
|
|
44646
45257
|
// Set config.method
|
|
44647
45258
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
44648
45259
|
|
|
44649
45260
|
// Flatten headers
|
|
44650
|
-
let contextHeaders = headers && utils$3.merge(
|
|
44651
|
-
headers.common,
|
|
44652
|
-
headers[config.method]
|
|
44653
|
-
);
|
|
45261
|
+
let contextHeaders = headers && utils$3.merge(headers.common, headers[config.method]);
|
|
44654
45262
|
|
|
44655
|
-
headers &&
|
|
44656
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
44657
|
-
(method) => {
|
|
45263
|
+
headers &&
|
|
45264
|
+
utils$3.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
44658
45265
|
delete headers[method];
|
|
44659
|
-
}
|
|
44660
|
-
);
|
|
45266
|
+
});
|
|
44661
45267
|
|
|
44662
45268
|
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
44663
45269
|
|
|
@@ -44671,7 +45277,15 @@ class Axios {
|
|
|
44671
45277
|
|
|
44672
45278
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
44673
45279
|
|
|
44674
|
-
|
|
45280
|
+
const transitional = config.transitional || transitionalDefaults;
|
|
45281
|
+
const legacyInterceptorReqResOrdering =
|
|
45282
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
45283
|
+
|
|
45284
|
+
if (legacyInterceptorReqResOrdering) {
|
|
45285
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
45286
|
+
} else {
|
|
45287
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
45288
|
+
}
|
|
44675
45289
|
});
|
|
44676
45290
|
|
|
44677
45291
|
const responseInterceptorChain = [];
|
|
@@ -44685,8 +45299,8 @@ class Axios {
|
|
|
44685
45299
|
|
|
44686
45300
|
if (!synchronousRequestInterceptors) {
|
|
44687
45301
|
const chain = [dispatchRequest.bind(this), undefined];
|
|
44688
|
-
chain.unshift
|
|
44689
|
-
chain.push
|
|
45302
|
+
chain.unshift(...requestInterceptorChain);
|
|
45303
|
+
chain.push(...responseInterceptorChain);
|
|
44690
45304
|
len = chain.length;
|
|
44691
45305
|
|
|
44692
45306
|
promise = Promise.resolve(config);
|
|
@@ -44702,8 +45316,6 @@ class Axios {
|
|
|
44702
45316
|
|
|
44703
45317
|
let newConfig = config;
|
|
44704
45318
|
|
|
44705
|
-
i = 0;
|
|
44706
|
-
|
|
44707
45319
|
while (i < len) {
|
|
44708
45320
|
const onFulfilled = requestInterceptorChain[i++];
|
|
44709
45321
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -44741,28 +45353,32 @@ class Axios {
|
|
|
44741
45353
|
// Provide aliases for supported request methods
|
|
44742
45354
|
utils$3.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
44743
45355
|
/*eslint func-names:0*/
|
|
44744
|
-
Axios.prototype[method] = function(url, config) {
|
|
44745
|
-
return this.request(
|
|
44746
|
-
|
|
44747
|
-
|
|
44748
|
-
|
|
44749
|
-
|
|
45356
|
+
Axios.prototype[method] = function (url, config) {
|
|
45357
|
+
return this.request(
|
|
45358
|
+
mergeConfig(config || {}, {
|
|
45359
|
+
method,
|
|
45360
|
+
url,
|
|
45361
|
+
data: (config || {}).data,
|
|
45362
|
+
})
|
|
45363
|
+
);
|
|
44750
45364
|
};
|
|
44751
45365
|
});
|
|
44752
45366
|
|
|
44753
45367
|
utils$3.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
44754
|
-
/*eslint func-names:0*/
|
|
44755
|
-
|
|
44756
45368
|
function generateHTTPMethod(isForm) {
|
|
44757
45369
|
return function httpMethod(url, data, config) {
|
|
44758
|
-
return this.request(
|
|
44759
|
-
|
|
44760
|
-
|
|
44761
|
-
|
|
44762
|
-
|
|
44763
|
-
|
|
44764
|
-
|
|
44765
|
-
|
|
45370
|
+
return this.request(
|
|
45371
|
+
mergeConfig(config || {}, {
|
|
45372
|
+
method,
|
|
45373
|
+
headers: isForm
|
|
45374
|
+
? {
|
|
45375
|
+
'Content-Type': 'multipart/form-data',
|
|
45376
|
+
}
|
|
45377
|
+
: {},
|
|
45378
|
+
url,
|
|
45379
|
+
data,
|
|
45380
|
+
})
|
|
45381
|
+
);
|
|
44766
45382
|
};
|
|
44767
45383
|
}
|
|
44768
45384
|
|
|
@@ -44793,7 +45409,7 @@ class CancelToken {
|
|
|
44793
45409
|
const token = this;
|
|
44794
45410
|
|
|
44795
45411
|
// eslint-disable-next-line func-names
|
|
44796
|
-
this.promise.then(cancel => {
|
|
45412
|
+
this.promise.then((cancel) => {
|
|
44797
45413
|
if (!token._listeners) return;
|
|
44798
45414
|
|
|
44799
45415
|
let i = token._listeners.length;
|
|
@@ -44805,10 +45421,10 @@ class CancelToken {
|
|
|
44805
45421
|
});
|
|
44806
45422
|
|
|
44807
45423
|
// eslint-disable-next-line func-names
|
|
44808
|
-
this.promise.then = onfulfilled => {
|
|
45424
|
+
this.promise.then = (onfulfilled) => {
|
|
44809
45425
|
let _resolve;
|
|
44810
45426
|
// eslint-disable-next-line func-names
|
|
44811
|
-
const promise = new Promise(resolve => {
|
|
45427
|
+
const promise = new Promise((resolve) => {
|
|
44812
45428
|
token.subscribe(resolve);
|
|
44813
45429
|
_resolve = resolve;
|
|
44814
45430
|
}).then(onfulfilled);
|
|
@@ -44896,7 +45512,7 @@ class CancelToken {
|
|
|
44896
45512
|
});
|
|
44897
45513
|
return {
|
|
44898
45514
|
token,
|
|
44899
|
-
cancel
|
|
45515
|
+
cancel,
|
|
44900
45516
|
};
|
|
44901
45517
|
}
|
|
44902
45518
|
}
|
|
@@ -44908,7 +45524,7 @@ class CancelToken {
|
|
|
44908
45524
|
*
|
|
44909
45525
|
* ```js
|
|
44910
45526
|
* function f(x, y, z) {}
|
|
44911
|
-
*
|
|
45527
|
+
* const args = [1, 2, 3];
|
|
44912
45528
|
* f.apply(null, args);
|
|
44913
45529
|
* ```
|
|
44914
45530
|
*
|
|
@@ -44936,7 +45552,7 @@ function spread(callback) {
|
|
|
44936
45552
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
44937
45553
|
*/
|
|
44938
45554
|
function isAxiosError(payload) {
|
|
44939
|
-
return utils$3.isObject(payload) &&
|
|
45555
|
+
return utils$3.isObject(payload) && payload.isAxiosError === true;
|
|
44940
45556
|
}
|
|
44941
45557
|
|
|
44942
45558
|
const HttpStatusCode = {
|
|
@@ -45003,6 +45619,12 @@ const HttpStatusCode = {
|
|
|
45003
45619
|
LoopDetected: 508,
|
|
45004
45620
|
NotExtended: 510,
|
|
45005
45621
|
NetworkAuthenticationRequired: 511,
|
|
45622
|
+
WebServerIsDown: 521,
|
|
45623
|
+
ConnectionTimedOut: 522,
|
|
45624
|
+
OriginIsUnreachable: 523,
|
|
45625
|
+
TimeoutOccurred: 524,
|
|
45626
|
+
SslHandshakeFailed: 525,
|
|
45627
|
+
InvalidSslCertificate: 526,
|
|
45006
45628
|
};
|
|
45007
45629
|
|
|
45008
45630
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
@@ -45021,10 +45643,10 @@ function createInstance(defaultConfig) {
|
|
|
45021
45643
|
const instance = bind$1(Axios.prototype.request, context);
|
|
45022
45644
|
|
|
45023
45645
|
// Copy axios.prototype to instance
|
|
45024
|
-
utils$3.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
|
45646
|
+
utils$3.extend(instance, Axios.prototype, context, { allOwnKeys: true });
|
|
45025
45647
|
|
|
45026
45648
|
// Copy context to instance
|
|
45027
|
-
utils$3.extend(instance, context, null, {allOwnKeys: true});
|
|
45649
|
+
utils$3.extend(instance, context, null, { allOwnKeys: true });
|
|
45028
45650
|
|
|
45029
45651
|
// Factory for creating new instances
|
|
45030
45652
|
instance.create = function create(instanceConfig) {
|
|
@@ -45068,7 +45690,7 @@ axios.mergeConfig = mergeConfig;
|
|
|
45068
45690
|
|
|
45069
45691
|
axios.AxiosHeaders = AxiosHeaders;
|
|
45070
45692
|
|
|
45071
|
-
axios.formToJSON = thing => formDataToJSON(utils$3.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
45693
|
+
axios.formToJSON = (thing) => formDataToJSON(utils$3.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
45072
45694
|
|
|
45073
45695
|
axios.getAdapter = adapters.getAdapter;
|
|
45074
45696
|
|
|
@@ -55517,7 +56139,7 @@ const FOCUSABLE_SELECTORS = Object.freeze([
|
|
|
55517
56139
|
'a[href]', 'button:not([disabled]):not([tabindex="-1"])', 'textarea', 'input', 'select', '[tabindex]:not([tabindex="-1"])',
|
|
55518
56140
|
]);
|
|
55519
56141
|
const Widget = React.forwardRef(({ candidate, job, video, config, disabled = false, buttonText = 'START INTERVIEW', buttonStyle = {}, children, styleUrls = [], fontsUrls = [], }, clientRef) => {
|
|
55520
|
-
const widget_version = "1.1.
|
|
56142
|
+
const widget_version = "1.1.68";
|
|
55521
56143
|
const [isWidgetOpen, setIsWidgetOpen] = React.useState(false);
|
|
55522
56144
|
const [isWidgetMinimized, setIsWidgetMinimized] = React.useState(false);
|
|
55523
56145
|
const [isIncognitoMode, setIsIncognitoMode] = React.useState(false);
|