@crystaldesign/diva-core 26.5.0-beta.30 → 26.5.0-beta.32

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.
@@ -1,4 +1,4 @@
1
- import { s as styleInject, u as useDivaCoreContext } from './index-baac0cf2.js';
1
+ import { s as styleInject, u as useDivaCoreContext } from './index-6965f5cf.js';
2
2
  import { useState, useEffect, useCallback } from 'react';
3
3
  import { observer } from 'mobx-react-lite';
4
4
  import Button from '@mui/material/Button';
@@ -1,4 +1,4 @@
1
- import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-baac0cf2.js';
1
+ import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-6965f5cf.js';
2
2
  import { forwardRef, useState, useRef, useEffect, useMemo } from 'react';
3
3
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
4
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -45,7 +45,7 @@ import { actions } from '@storybook/addon-actions';
45
45
  import * as Styles from '@mui/styles';
46
46
 
47
47
  (function() {
48
- const env = {"STAGE":"production","VERSION":"26.5.0-beta.30"};
48
+ const env = {"STAGE":"production","VERSION":"26.5.0-beta.32"};
49
49
  try {
50
50
  if (process) {
51
51
  process.env = Object.assign({}, process.env);
@@ -10371,7 +10371,7 @@ var DrawerMenu$1 = observer(DrawerMenu);
10371
10371
  function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10372
10372
  function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10373
10373
  var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
10374
- return import('./ModalsWrapper-1553b109.js');
10374
+ return import('./ModalsWrapper-7501dd28.js');
10375
10375
  });
10376
10376
  function Fullscreen(_ref) {
10377
10377
  var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
@@ -10831,10 +10831,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
10831
10831
  function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10832
10832
  var LOG$2 = getLogger('Framework', 'Root');
10833
10833
  var LazyAuth = /*#__PURE__*/React.lazy(function () {
10834
- return import('./index-b3dfc2d4.js');
10834
+ return import('./index-0d4eccfc.js');
10835
10835
  });
10836
10836
  var LazyModals = /*#__PURE__*/React.lazy(function () {
10837
- return import('./ModalsWrapper-1553b109.js');
10837
+ return import('./ModalsWrapper-7501dd28.js');
10838
10838
  });
10839
10839
  function ContentComponent() {
10840
10840
  var context = useDivaCoreContext();
@@ -1,4 +1,4 @@
1
- export { c as AnalyticsHandler, A as AuthorizationHandler, e as ClientArticleHandler, C as Content, f as DivaMockProvider, D as DrawerMenuComponent, H as HelpButton, O as ONE_DAY_UNIX, d as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, b as default, g as getLogger, i as i18n, h as storyBookCoreMock, a as useDivaCore } from './index-baac0cf2.js';
1
+ export { c as AnalyticsHandler, A as AuthorizationHandler, e as ClientArticleHandler, C as Content, f as DivaMockProvider, D as DrawerMenuComponent, H as HelpButton, O as ONE_DAY_UNIX, d as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, b as default, g as getLogger, i as i18n, h as storyBookCoreMock, a as useDivaCore } from './index-6965f5cf.js';
2
2
  export { DivaError, default as DivaUtils } from '@crystaldesign/diva-utils';
3
3
  export { Trans, useTranslation } from 'react-i18next';
4
4
  export * from '@crystaldesign/basket-model';
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 662.diva-core.umd.min.js.LICENSE.txt */
2
- (self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[662],{662:(e,t,r)=>{var o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,n=function(){function F(){this.fetch=!1,this.DOMException=o.DOMException}return F.prototype=o,new F}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,o="URLSearchParams"in r,n="Symbol"in r&&"iterator"in Symbol,s="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in r,a="ArrayBuffer"in r;if(a)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function normalizeName(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function normalizeValue(e){return"string"!=typeof e&&(e=String(e)),e}function iteratorFor(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function Headers(e){this.map={},e instanceof Headers?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function consumed(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function fileReaderReady(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function readBlobAsArrayBuffer(e){var t=new FileReader,r=fileReaderReady(t);return t.readAsArrayBuffer(e),r}function bufferClone(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Body(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&s&&function isDataView(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=bufferClone(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||f(e))?this._bodyArrayBuffer=bufferClone(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=consumed(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=consumed(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(readBlobAsArrayBuffer)}),this.text=function(){var e=consumed(this);if(e)return e;if(this._bodyBlob)return function readBlobAsText(e){var t=new FileReader,r=fileReaderReady(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function readArrayBufferAsText(e){for(var t=new Uint8Array(e),r=new Array(t.length),o=0;o<t.length;o++)r[o]=String.fromCharCode(t[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(decode)}),this.json=function(){return this.text().then(JSON.parse)},this}Headers.prototype.append=function(e,t){e=normalizeName(e),t=normalizeValue(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},Headers.prototype.delete=function(e){delete this.map[normalizeName(e)]},Headers.prototype.get=function(e){return e=normalizeName(e),this.has(e)?this.map[e]:null},Headers.prototype.has=function(e){return this.map.hasOwnProperty(normalizeName(e))},Headers.prototype.set=function(e,t){this.map[normalizeName(e)]=normalizeValue(t)},Headers.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},Headers.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),iteratorFor(e)},Headers.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),iteratorFor(e)},Headers.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),iteratorFor(e)},n&&(Headers.prototype[Symbol.iterator]=Headers.prototype.entries);var h=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Request(e,t){if(!(this instanceof Request))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r=(t=t||{}).body;if(e instanceof Request){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Headers(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Headers(t.headers)),this.method=function normalizeMethod(e){var t=e.toUpperCase();return h.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function decode(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(n))}})),t}function Response(e,t){if(!(this instanceof Response))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Headers(t.headers),this.url=t.url||"",this._initBody(e)}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit})},Body.call(Request.prototype),Body.call(Response.prototype),Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url})},Response.error=function(){var e=new Response(null,{status:0,statusText:""});return e.type="error",e};var d=[301,302,303,307,308];Response.redirect=function(e,t){if(-1===d.indexOf(t))throw new RangeError("Invalid status code");return new Response(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function fetch(e,o){return new Promise((function(n,i){var u=new Request(e,o);if(u.signal&&u.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var f=new XMLHttpRequest;function abortXhr(){f.abort()}f.onload=function(){var e,t,r={status:f.status,statusText:f.statusText,headers:(e=f.getAllResponseHeaders()||"",t=new Headers,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();t.append(o,n)}})),t)};r.url="responseURL"in f?f.responseURL:r.headers.get("X-Request-URL");var o="response"in f?f.response:f.responseText;setTimeout((function(){n(new Response(o,r))}),0)},f.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},f.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},f.onabort=function(){setTimeout((function(){i(new t.DOMException("Aborted","AbortError"))}),0)},f.open(u.method,function fixUrl(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?f.withCredentials=!0:"omit"===u.credentials&&(f.withCredentials=!1),"responseType"in f&&(s?f.responseType="blob":a&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(f.responseType="arraybuffer")),!o||"object"!=typeof o.headers||o.headers instanceof Headers?u.headers.forEach((function(e,t){f.setRequestHeader(t,e)})):Object.getOwnPropertyNames(o.headers).forEach((function(e){f.setRequestHeader(e,normalizeValue(o.headers[e]))})),u.signal&&(u.signal.addEventListener("abort",abortXhr),f.onreadystatechange=function(){4===f.readyState&&u.signal.removeEventListener("abort",abortXhr)}),f.send(void 0===u._bodyInit?null:u._bodyInit)}))}fetch.polyfill=!0,r.fetch||(r.fetch=fetch,r.Headers=Headers,r.Request=Request,r.Response=Response),t.Headers=Headers,t.Request=Request,t.Response=Response,t.fetch=fetch}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=o.fetch?o:n;(t=s.fetch).default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t}}]);
2
+ (self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[662],{662:(e,t,r)=>{var o=r(5108),n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,s=function(){function F(){this.fetch=!1,this.DOMException=n.DOMException}return F.prototype=n,new F}();!function(e){!function(t){var n=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r.g&&r.g||{},s="URLSearchParams"in n,i="Symbol"in n&&"iterator"in Symbol,a="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),u="FormData"in n,h="ArrayBuffer"in n;if(h)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(e){return e&&f.indexOf(Object.prototype.toString.call(e))>-1};function normalizeName(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function normalizeValue(e){return"string"!=typeof e&&(e=String(e)),e}function iteratorFor(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function Headers(e){this.map={},e instanceof Headers?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function consumed(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function fileReaderReady(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function readBlobAsArrayBuffer(e){var t=new FileReader,r=fileReaderReady(t);return t.readAsArrayBuffer(e),r}function bufferClone(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Body(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:s&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():h&&a&&function isDataView(e){return e&&DataView.prototype.isPrototypeOf(e)}(e)?(this._bodyArrayBuffer=bufferClone(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h&&(ArrayBuffer.prototype.isPrototypeOf(e)||d(e))?this._bodyArrayBuffer=bufferClone(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=consumed(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=consumed(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(a)return this.blob().then(readBlobAsArrayBuffer);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=consumed(this);if(e)return e;if(this._bodyBlob)return function readBlobAsText(e){var t=new FileReader,r=fileReaderReady(t),o=/charset=([A-Za-z0-9_-]+)/.exec(e.type),n=o?o[1]:"utf-8";return t.readAsText(e,n),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function readArrayBufferAsText(e){for(var t=new Uint8Array(e),r=new Array(t.length),o=0;o<t.length;o++)r[o]=String.fromCharCode(t[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u&&(this.formData=function(){return this.text().then(decode)}),this.json=function(){return this.text().then(JSON.parse)},this}Headers.prototype.append=function(e,t){e=normalizeName(e),t=normalizeValue(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},Headers.prototype.delete=function(e){delete this.map[normalizeName(e)]},Headers.prototype.get=function(e){return e=normalizeName(e),this.has(e)?this.map[e]:null},Headers.prototype.has=function(e){return this.map.hasOwnProperty(normalizeName(e))},Headers.prototype.set=function(e,t){this.map[normalizeName(e)]=normalizeValue(t)},Headers.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},Headers.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),iteratorFor(e)},Headers.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),iteratorFor(e)},Headers.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),iteratorFor(e)},i&&(Headers.prototype[Symbol.iterator]=Headers.prototype.entries);var c=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Request(e,t){if(!(this instanceof Request))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r=(t=t||{}).body;if(e instanceof Request){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Headers(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Headers(t.headers)),this.method=function normalizeMethod(e){var t=e.toUpperCase();return c.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function decode(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(n))}})),t}function Response(e,t){if(!(this instanceof Response))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Headers(t.headers),this.url=t.url||"",this._initBody(e)}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit})},Body.call(Request.prototype),Body.call(Response.prototype),Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url})},Response.error=function(){var e=new Response(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var l=[301,302,303,307,308];Response.redirect=function(e,t){if(-1===l.indexOf(t))throw new RangeError("Invalid status code");return new Response(null,{status:t,headers:{location:e}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function fetch(e,r){return new Promise((function(s,i){var u=new Request(e,r);if(u.signal&&u.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var f=new XMLHttpRequest;function abortXhr(){f.abort()}if(f.onload=function(){var e,t,r={statusText:f.statusText,headers:(e=f.getAllResponseHeaders()||"",t=new Headers,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var s=r.join(":").trim();try{t.append(n,s)}catch(e){o.warn("Response "+e.message)}}})),t)};0===u.url.indexOf("file://")&&(f.status<200||f.status>599)?r.status=200:r.status=f.status,r.url="responseURL"in f?f.responseURL:r.headers.get("X-Request-URL");var n="response"in f?f.response:f.responseText;setTimeout((function(){s(new Response(n,r))}),0)},f.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},f.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request timed out"))}),0)},f.onabort=function(){setTimeout((function(){i(new t.DOMException("Aborted","AbortError"))}),0)},f.open(u.method,function fixUrl(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?f.withCredentials=!0:"omit"===u.credentials&&(f.withCredentials=!1),"responseType"in f&&(a?f.responseType="blob":h&&(f.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof Headers||n.Headers&&r.headers instanceof n.Headers)){var d=[];Object.getOwnPropertyNames(r.headers).forEach((function(e){d.push(normalizeName(e)),f.setRequestHeader(e,normalizeValue(r.headers[e]))})),u.headers.forEach((function(e,t){-1===d.indexOf(t)&&f.setRequestHeader(t,e)}))}else u.headers.forEach((function(e,t){f.setRequestHeader(t,e)}));u.signal&&(u.signal.addEventListener("abort",abortXhr),f.onreadystatechange=function(){4===f.readyState&&u.signal.removeEventListener("abort",abortXhr)}),f.send(void 0===u._bodyInit?null:u._bodyInit)}))}fetch.polyfill=!0,n.fetch||(n.fetch=fetch,n.Headers=Headers,n.Request=Request,n.Response=Response),t.Headers=Headers,t.Request=Request,t.Response=Response,t.fetch=fetch}({})}(s),s.fetch.ponyfill=!0,delete s.fetch.polyfill;var i=n.fetch?n:s;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}}]);