msw 0.36.5 → 0.36.7

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
+ <br />
2
+
1
3
  <p align="center">
2
- <img src="media/msw-logo.svg" width="120" alt="Mock Service Worker logo" />
4
+ <img src="media/msw-logo.svg" width="100" alt="Mock Service Worker logo" />
3
5
  </p>
4
6
 
5
7
  <h1 align="center">Mock Service Worker</h1>
@@ -974,7 +974,9 @@ const createFetchRequestParameters = (input) => {
974
974
  if (['GET', 'HEAD'].includes(method)) {
975
975
  return requestParameters;
976
976
  }
977
- if (typeof body === 'object' || typeof body === 'number') {
977
+ if (typeof body === 'object' ||
978
+ typeof body === 'number' ||
979
+ typeof body === 'boolean') {
978
980
  requestParameters.body = JSON.stringify(body);
979
981
  }
980
982
  else {
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.36.5).
5
+ * Mock Service Worker (0.36.7).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
package/lib/iife/index.js CHANGED
@@ -4,7 +4,7 @@ var MockServiceWorker=function(e){"use strict";var t={100:"Continue",101:"Switch
4
4
  * Copyright(c) 2012-2014 Roman Shtylman
5
5
  * Copyright(c) 2015 Douglas Christopher Wilson
6
6
  * MIT Licensed
7
- */k.flattenHeadersObject=function(e){return D.reduceHeadersObject(e,(function(e,t,r){return e[t]=[].concat(r).join("; "),e}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flattenHeadersObject=e.flattenHeadersList=e.reduceHeadersObject=e.objectToHeaders=e.listToHeaders=e.stringToHeaders=e.headersToObject=e.headersToList=e.headersToString=e.Headers=void 0;var t=i;Object.defineProperty(e,"Headers",{enumerable:!0,get:function(){return t.default}});var r=v;Object.defineProperty(e,"headersToString",{enumerable:!0,get:function(){return r.headersToString}});var n=m;Object.defineProperty(e,"headersToList",{enumerable:!0,get:function(){return n.headersToList}});var o=E;Object.defineProperty(e,"headersToObject",{enumerable:!0,get:function(){return o.headersToObject}});var s=w;Object.defineProperty(e,"stringToHeaders",{enumerable:!0,get:function(){return s.stringToHeaders}});var a=T;Object.defineProperty(e,"listToHeaders",{enumerable:!0,get:function(){return a.listToHeaders}});var c=O;Object.defineProperty(e,"objectToHeaders",{enumerable:!0,get:function(){return c.objectToHeaders}});var u=S;Object.defineProperty(e,"reduceHeadersObject",{enumerable:!0,get:function(){return u.reduceHeadersObject}});var l=A;Object.defineProperty(e,"flattenHeadersList",{enumerable:!0,get:function(){return l.flattenHeadersList}});var p=k;Object.defineProperty(e,"flattenHeadersObject",{enumerable:!0,get:function(){return p.flattenHeadersObject}})}(o);var P=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=e.split(U),i=n.decode||j,s=0;s<o.length;s++){var a=o[s],c=a.indexOf("=");if(!(c<0)){var u=a.substr(0,c).trim(),l=a.substr(++c,a.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),null==r[u]&&(r[u]=H(l,i))}}return r},M=function(e,t,r){var n=r||{},o=n.encode||F;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!q.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!q.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=n.maxAge){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!q.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!q.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(s+="; HttpOnly");n.secure&&(s+="; Secure");if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},j=decodeURIComponent,F=encodeURIComponent,U=/; */,q=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function H(e,t){try{return t(e)}catch(t){return e}}const B=(e,t,r)=>n=>{const o=M(e,t,r);return n.headers.set("Set-Cookie",o),"undefined"!=typeof document&&(document.cookie=o),n},$=e=>t=>(t.body=e,t);function V(e){try{return JSON.parse(e)}catch(e){return}}function G(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function K(e,t){return Object.entries(t).reduce(((e,[t,r])=>{const n=e[t];return Array.isArray(n)&&Array.isArray(r)?(e[t]=n.concat(r),e):G(n)&&G(r)?(e[t]=K(n,r),e):(e[t]=r,e)}),Object.assign({},e))}const Y=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t),X=e=>t=>{const r=K(V(t.body)||{},{data:e});return Y(r)(t)},W=e=>t=>{const r=K(V(t.body)||{},{extensions:e});return Y(r)(t)};var J={exports:{}};!function(e,t){!function(e){function t(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product||!("undefined"==typeof process||!process.versions||!process.versions.node)}e.isNodeProcess=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,J.exports);const z=2147483647,Q=()=>J.exports.isNodeProcess()?5:Math.floor(300*Math.random()+100),Z=e=>t=>{let r;if("string"==typeof e)switch(e){case"infinite":r=z;break;case"real":r=Q();break;default:throw new Error(`Failed to delay a response: unknown delay mode "${e}". Please make sure you provide one of the supported modes ("real", "infinite") or a number to "ctx.delay".`)}else if(void 0===e)r=Q();else{if(e>z)throw new Error(`Failed to delay a response: provided delay duration (${e}) exceeds the maximum allowed duration for "setTimeout" (2147483647). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);r=e}return t.delay=r,t},ee=e=>t=>{if(null==e)return t;const r=K(V(t.body)||{},{errors:e});return Y(r)(t)},te=J.exports.isNodeProcess()?require("node-fetch"):window.fetch,re=e=>{const t=new o.Headers(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.all()})},ne=(e,t={})=>{if("string"==typeof e)return te(e,re(t));const r=(e=>{const{body:t,method:r}=e,n=Object.assign(Object.assign({},e),{body:void 0});return["GET","HEAD"].includes(r)||(n.body="object"==typeof t||"number"==typeof t?JSON.stringify(t):t),n})(e),n=re(r);return te(e.url.href,n)},oe=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),ie=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);var se,ae=Object.freeze({__proto__:null,status:r,set:L,cookie:B,body:$,data:X,extensions:W,delay:Z,errors:ee,fetch:ne,json:Y,text:oe,xml:ie}),ce={},ue={},le={exports:{}},pe="object"==typeof Reflect?Reflect:null,de=pe&&"function"==typeof pe.apply?pe.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};se=pe&&"function"==typeof pe.ownKeys?pe.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var fe=Number.isNaN||function(e){return e!=e};function he(){he.init.call(this)}le.exports=he,le.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}_e(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&_e(e,"error",t,r)}(e,o,{once:!0})}))},he.EventEmitter=he,he.prototype._events=void 0,he.prototype._eventsCount=0,he.prototype._maxListeners=void 0;var ve=10;function me(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function ye(e){return void 0===e._maxListeners?he.defaultMaxListeners:e._maxListeners}function ge(e,t,r,n){var o,i,s,a;if(me(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=ye(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function Ee(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function be(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=Ee.bind(n);return o.listener=r,n.wrapFn=o,o}function we(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):Te(o,o.length)}function Ne(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function Te(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function _e(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(he,"defaultMaxListeners",{enumerable:!0,get:function(){return ve},set:function(e){if("number"!=typeof e||e<0||fe(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ve=e}}),he.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},he.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||fe(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},he.prototype.getMaxListeners=function(){return ye(this)},he.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)de(a,this,t);else{var c=a.length,u=Te(a,c);for(r=0;r<c;++r)de(u[r],this,t)}return!0},he.prototype.addListener=function(e,t){return ge(this,e,t,!1)},he.prototype.on=he.prototype.addListener,he.prototype.prependListener=function(e,t){return ge(this,e,t,!0)},he.prototype.once=function(e,t){return me(t),this.on(e,be(this,e,t)),this},he.prototype.prependOnceListener=function(e,t){return me(t),this.prependListener(e,be(this,e,t)),this},he.prototype.removeListener=function(e,t){var r,n,o,i,s;if(me(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},he.prototype.off=he.prototype.removeListener,he.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},he.prototype.listeners=function(e){return we(this,e,!0)},he.prototype.rawListeners=function(e){return we(this,e,!1)},he.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Ne.call(e,t)},he.prototype.listenerCount=Ne,he.prototype.eventNames=function(){return this._eventsCount>0?se(this._events):[]};var xe,Oe=n&&n.__extends||(xe=function(e,t){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Se=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n};ue.__esModule=!0,ue.StrictEventEmitter=void 0;var Ce=function(e){function t(){return e.call(this)||this}return Oe(t,e),t.prototype.on=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.once=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.off=function(t,r){return e.prototype.off.call(this,t.toString(),r)},t.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.prototype.emit.apply(this,Se([t.toString()],r))},t.prototype.addListener=function(t,r){return e.prototype.addListener.call(this,t.toString(),r)},t.prototype.removeListener=function(t,r){return e.prototype.removeListener.call(this,t.toString(),r)},t}(le.exports.EventEmitter);function Ie(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}ue.StrictEventEmitter=Ce,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]});e.__esModule=!0,e.StrictEventEmitter=void 0,t(e,ue,"StrictEventEmitter")}(ce);var Ae={},Re={};Object.defineProperty(Re,"__esModule",{value:!0}),Re.until=async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}},Object.defineProperty(Ae,"__esModule",{value:!0});var ke=Re,De=Ae.until=ke.until;const Le=(e,t,r)=>[e.active,e.installing,e.waiting].filter(Boolean).find((e=>r(e.scriptURL,t)))||null;var Pe={},Me={},je={};Object.defineProperty(je,"__esModule",{value:!0}),je.format=void 0;var Fe=/(%?)(%([sdjo]))/g;function Ue(e,t){switch(t){case"s":return e;case"d":case"i":return Number(e);case"j":return JSON.stringify(e);case"o":if("string"==typeof e)return e;var r=JSON.stringify(e);return"{}"===r||"[]"===r||/^\[object .+?\]$/.test(r)?e:r}}je.format=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(0===t.length)return e;var n=0,o=e.replace(Fe,(function(e,r,o,i){var s=Ue(t[n],i);return r?e:(n++,s)}));return n<t.length&&(o+=" "+t.slice(n).join(" ")),o=o.replace(/%{2,2}/g,"%")};var qe=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),He=n&&n.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Me,"__esModule",{value:!0}),Me.invariant=Me.InvariantError=void 0;var Be=je,$e=function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=e.call(this,t)||this;if(o.name="Invariant Violation",o.message=Be.format.apply(void 0,He([t],r)),o.stack){var i=o.stack.split("\n");i.splice(1,2),o.stack=i.join("\n")}return o}return qe(t,e),t}(Error);Me.InvariantError=$e,Me.invariant=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!e)throw new($e.bind.apply($e,He([void 0,t],r)))},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Me,e),r(je,e)}(Pe);function Ve(e,...t){return`[MSW] ${Pe.format(e,...t)}`}const Ge={formatMessage:Ve,warn:function(e,...t){console.warn(Ve(e,...t))},error:function(e,...t){console.error(Ve(e,...t))}},Ke=(e,t={},r)=>Ie(void 0,void 0,void 0,(function*(){const n=new URL(e,location.origin).href;const o=yield navigator.serviceWorker.getRegistrations().then((e=>e.filter((e=>Le(e,n,r)))));!navigator.serviceWorker.controller&&o.length>0&&location.reload();const[i]=o;if(i)return i.update().then((()=>[Le(i,n,r),i]));const[s,a]=yield De((()=>Ie(void 0,void 0,void 0,(function*(){const o=yield navigator.serviceWorker.register(e,t);return[Le(o,n,r),o]}))));if(s){if(s.message.includes("(404)")){const e=new URL((null==t?void 0:t.scope)||"/",location.href);throw new Error(Ge.formatMessage(`Failed to register a Service Worker for scope ('${e.href}') with script ('${n}'): Service Worker script does not exist at the given path.\n\nDid you forget to run "npx msw init <PUBLIC_DIR>"?\n\nLearn more about creating the Service Worker script: https://mswjs.io/docs/cli/init`))}throw new Error(Ge.formatMessage("Failed to register the Service Worker:\n\n%s",s.message))}return a}));function Ye(e={}){if(e.quiet)return;const t=e.message||"Mocking enabled.";console.groupCollapsed(`%c${Ge.formatMessage(t)}`,"color:orangered;font-weight:bold;"),console.log("%cDocumentation: %chttps://mswjs.io/docs","font-weight:bold","font-weight:normal"),console.log("Found an issue? https://github.com/mswjs/msw/issues"),console.groupEnd()}class Xe extends Error{constructor(e){super(e),this.name="NetworkError"}}var We={},Je={},ze={exports:{}},Qe={decodeValues:!0,map:!1,silent:!1};function Ze(e){return"string"==typeof e&&!!e.trim()}function et(e,t){var r=e.split(";").filter(Ze),n=r.shift().split("="),o=n.shift(),i=n.join("=");t=t?Object.assign({},Qe,t):Qe;try{i=t.decodeValues?decodeURIComponent(i):i}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",e)}var s={name:o,value:i};return r.forEach((function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?s.expires=new Date(n):"max-age"===r?s.maxAge=parseInt(n,10):"secure"===r?s.secure=!0:"httponly"===r?s.httpOnly=!0:"samesite"===r?s.sameSite=n:s[r]=n})),s}function tt(e,t){if(t=t?Object.assign({},Qe,t):Qe,!e)return t.map?{}:[];if(e.headers&&e.headers["set-cookie"])e=e.headers["set-cookie"];else if(e.headers){var r=e.headers[Object.keys(e.headers).find((function(e){return"set-cookie"===e.toLowerCase()}))];r||!e.headers.cookie||t.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),(t=t?Object.assign({},Qe,t):Qe).map){return e.filter(Ze).reduce((function(e,r){var n=et(r,t);return e[n.name]=n,e}),{})}return e.filter(Ze).map((function(e){return et(e,t)}))}function rt(){return P(document.cookie)}function nt(e){var t;We.store.hydrate(),e.cookies=Object.assign(Object.assign({},function(e){if("undefined"==typeof document||"undefined"==typeof location)return{};switch(e.credentials){case"same-origin":return location.origin===e.url.origin?rt():{};case"include":return rt();default:return{}}}(e)),Array.from(null===(t=We.store.get(Object.assign(Object.assign({},e),{url:e.url.toString()})))||void 0===t?void 0:t.entries()).reduce(((e,[t,{value:r}])=>Object.assign(e,{[t]:r})),{})),e.headers.set("cookie",Object.entries(e.cookies).map((([e,t])=>`${e}=${t}`)).join("; "))}function ot(e){var t,r;const n=o.stringToHeaders(e),i=n.get("content-type")||"text/plain",s=n.get("content-disposition");if(!s)throw new Error('"Content-Disposition" header is required.');const a=s.split(";").reduce(((e,t)=>{const[r,...n]=t.trim().split("=");return e[r]=n.join("="),e}),{});return{name:null===(t=a.name)||void 0===t?void 0:t.slice(1,-1),filename:null===(r=a.filename)||void 0===r?void 0:r.slice(1,-1),contentType:i}}function it(e,t){var r;if(!e)return e;const n=(null===(r=null==t?void 0:t.get("content-type"))||void 0===r?void 0:r.toLowerCase())||"";if(n.startsWith("multipart/form-data")&&"object"!=typeof e)return function(e,t){const r=null==t?void 0:t.get("content-type");if(!r)return;const[,...n]=r.split(/; */),o=n.filter((e=>e.startsWith("boundary="))).map((e=>e.replace(/^boundary=/,"")))[0];if(!o)return;const i=new RegExp(`--+${o}`),s=e.split(i).filter((e=>e.startsWith("\r\n")&&e.endsWith("\r\n"))).map((e=>e.trimStart().replace(/\r\n$/,"")));if(!s.length)return;const a={};try{for(const e of s){const[t,...r]=e.split("\r\n\r\n"),n=r.join("\r\n\r\n"),{contentType:o,filename:i,name:s}=ot(t),c=void 0===i?n:new File([n],i,{type:o}),u=a[s];void 0===u?a[s]=c:Array.isArray(u)?a[s]=[...u,c]:a[s]=[u,c]}return a}catch(e){return}}(e.toString(),t)||e;return n.includes("json")&&"object"!=typeof e&&V(e.toString())||e}function st(e,t){return e.toLowerCase()===t.toLowerCase()}function at(e){if(!e.method||!st(e.method,"GET")||""!==e.body)return e.body}ze.exports=tt,ze.exports.parse=tt,ze.exports.parseString=et,ze.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,o,i,s=[],a=0;function c(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,i=!1;c();)if(","===(r=e.charAt(a))){for(n=a,a+=1,c(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(i=!0,a=o,s.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!i||a>=e.length)&&s.push(e.substring(t,e.length))}return s},function(e){var t=n&&n.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.PERSISTENCY_KEY=void 0;const r=ze.exports;e.PERSISTENCY_KEY="MSW_COOKIE_STORE";const o="undefined"!=typeof localStorage;e.default=new class{constructor(){this.store=new Map}add(e,n){if("omit"===e.credentials)return;const o=new URL(e.url),i=n.headers.get("set-cookie");if(!i)return;const s=Date.now(),a=r.parse(i).map((e=>{var{maxAge:r}=e,n=t(e,["maxAge"]);return Object.assign(Object.assign({},n),{expires:void 0===r?n.expires:new Date(s+1e3*r),maxAge:r})})),c=this.store.get(o.origin)||new Map;a.forEach((e=>{this.store.set(o.origin,c.set(e.name,e))}))}get(e){this.deleteExpiredCookies();const t=new URL(e.url),n=this.store.get(t.origin)||new Map;switch(e.credentials){case"include":return r.parse(document.cookie).forEach((e=>{n.set(e.name,e)})),n;case"same-origin":return n;default:return new Map}}getAll(){return this.deleteExpiredCookies(),this.store}deleteAll(e){const t=new URL(e.url);this.store.delete(t.origin)}clear(){this.store.clear()}hydrate(){if(!o)return;const r=localStorage.getItem(e.PERSISTENCY_KEY);if(r)try{JSON.parse(r).forEach((([e,r])=>{this.store.set(e,new Map(r.map((e=>{var[r,n]=e,{expires:o}=n,i=t(n,["expires"]);return[r,void 0===o?i:Object.assign(Object.assign({},i),{expires:new Date(o)})]}))))}))}catch(t){console.warn(`\n[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${e.PERSISTENCY_KEY}").\n\nStored value:\n${localStorage.getItem(e.PERSISTENCY_KEY)}\n\nThrown exception:\n${t}\n\nInvalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(e.PERSISTENCY_KEY)}}persist(){if(!o)return;const t=Array.from(this.store.entries()).map((([e,t])=>[e,Array.from(t.entries())]));localStorage.setItem(e.PERSISTENCY_KEY,JSON.stringify(t))}deleteExpiredCookies(){const e=Date.now();this.store.forEach(((t,r)=>{t.forEach((({expires:r,name:n})=>{void 0!==r&&r.getTime()<=e&&t.delete(n)})),0===t.size&&this.store.delete(r)}))}}}(Je),function(e){var t=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.PERSISTENCY_KEY=e.store=void 0;var r=Je;Object.defineProperty(e,"store",{enumerable:!0,get:function(){return t(r).default}}),Object.defineProperty(e,"PERSISTENCY_KEY",{enumerable:!0,get:function(){return r.PERSISTENCY_KEY}})}(We);var ct=function(){function e(e,t,r,n,o){return e<t||r<t?e>r?r+1:e+1:n===o?t:t+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;s<o&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,0===(o-=s)||i<3)return i;var a,c,u,l,p,d,f,h,v,m,y,g,E=0,b=[];for(a=0;a<o;a++)b.push(a+1),b.push(t.charCodeAt(s+a));for(var w=b.length-1;E<i-3;)for(v=r.charCodeAt(s+(c=E)),m=r.charCodeAt(s+(u=E+1)),y=r.charCodeAt(s+(l=E+2)),g=r.charCodeAt(s+(p=E+3)),d=E+=4,a=0;a<w;a+=2)c=e(f=b[a],c,u,v,h=b[a+1]),u=e(c,u,l,m,h),l=e(u,l,p,y,h),d=e(l,p,d,g,h),b[a]=d,p=l,l=u,u=c,c=f;for(;E<i;)for(v=r.charCodeAt(s+(c=E)),d=++E,a=0;a<w;a+=2)f=b[a],b[a]=d=e(f,c,d,v,b[a+1]),c=f;return d}}();function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var lt="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function pt(e,t){for(var r,n=/\r\n|[\n\r]/g,o=1,i=t+1;(r=n.exec(e.body))&&r.index<t;)o+=1,i=t+1-(r.index+r[0].length);return{line:o,column:i}}function dt(e){return ft(e.source,pt(e.source,e.start))}function ft(e,t){var r=e.locationOffset.column-1,n=vt(r)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,a=1===t.line?r:0,c=t.column+a,u="".concat(e.name,":").concat(s,":").concat(c,"\n"),l=n.split(/\r\n|[\n\r]/g),p=l[o];if(p.length>120){for(var d=Math.floor(c/80),f=c%80,h=[],v=0;v<p.length;v+=80)h.push(p.slice(v,v+80));return u+ht([["".concat(s),h[0]]].concat(h.slice(1,d+1).map((function(e){return["",e]})),[[" ",vt(f-1)+"^"],["",h[d+1]]]))}return u+ht([["".concat(s-1),l[o-1]],["".concat(s),p],["",vt(c-1)+"^"],["".concat(s+1),l[o+1]]])}function ht(e){var t=e.filter((function(e){return e[0],void 0!==e[1]})),r=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,n=e[0],o=e[1];return vt(r-(t=n).length)+t+(o?" | "+o:" |")})).join("\n")}function vt(e){return Array(e+1).join(" ")}function mt(e){return(mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gt(e,t){return!t||"object"!==mt(t)&&"function"!=typeof t?Et(e):t}function Et(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bt(e){var t="function"==typeof Map?new Map:void 0;return(bt=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return wt(e,arguments,_t(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Tt(n,e)})(e)}function wt(e,t,r){return(wt=Nt()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&Tt(o,r.prototype),o}).apply(null,arguments)}function Nt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Tt(e,t){return(Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tt(e,t)}(a,e);var t,r,n,o,i,s=(t=a,r=Nt(),function(){var e,n=_t(t);if(r){var o=_t(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return gt(this,e)});function a(e,t,r,n,o,i,c){var u,l,p,d,f;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),f=s.call(this,e);var h,v=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,m=r;!m&&v&&(m=null===(h=v[0].loc)||void 0===h?void 0:h.source);var y,g=n;!g&&v&&(g=v.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),g&&0===g.length&&(g=void 0),n&&r?y=n.map((function(e){return pt(r,e)})):v&&(y=v.reduce((function(e,t){return t.loc&&e.push(pt(t.loc.source,t.loc.start)),e}),[]));var E,b=c;if(null==b&&null!=i){var w=i.extensions;"object"==ut(E=w)&&null!==E&&(b=w)}return Object.defineProperties(Et(f),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(u=y)&&void 0!==u?u:void 0,enumerable:null!=y},path:{value:null!=o?o:void 0,enumerable:null!=o},nodes:{value:null!=v?v:void 0},source:{value:null!==(l=m)&&void 0!==l?l:void 0},positions:{value:null!==(p=g)&&void 0!==p?p:void 0},originalError:{value:i},extensions:{value:null!==(d=b)&&void 0!==d?d:void 0,enumerable:null!=b}}),null!=i&&i.stack?(Object.defineProperty(Et(f),"stack",{value:i.stack,writable:!0,configurable:!0}),gt(f)):(Error.captureStackTrace?Error.captureStackTrace(Et(f),a):Object.defineProperty(Et(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return n=a,(o=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var o=n[r];o.loc&&(t+="\n\n"+dt(o.loc))}else if(e.source&&e.locations)for(var i=0,s=e.locations;i<s.length;i++){var a=s[i];t+="\n\n"+ft(e.source,a)}return t}(this)}},{key:lt,get:function(){return"Object"}}])&&yt(n.prototype,o),i&&yt(n,i),a}(bt(Error));function Ot(e,t,r){return new xt("Syntax Error: ".concat(r),void 0,e,[t])}var St=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});var Ct="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function It(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}(0),e.prototype.inspect=t,Ct&&(e.prototype[Ct]=t)}var At=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();It(At);var Rt=function(){function e(e,t,r,n,o,i,s){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=o,this.value=s,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();It(Rt);var kt=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Dt(e){return(Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lt(e){return Pt(e,[])}function Pt(e,t){switch(Dt(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(Ct)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:Pt(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var r=Math.min(10,e.length),n=e.length-r,o=[],i=0;i<r;++i)o.push(Pt(e[i],t));1===n?o.push("... 1 more item"):n>1&&o.push("... ".concat(n," more items"));return"["+o.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]";return"{ "+r.map((function(r){return r+": "+Pt(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}function Mt(e,t){if(!Boolean(e))throw new Error(t)}function jt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ft=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||Mt(0,"Body must be a string. Received: ".concat(Lt(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||Mt(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Mt(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:lt,get:function(){return"Source"}}])&&jt(t.prototype,r),n&&jt(t,n),e}();var Ut=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function qt(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,o=0,i=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:r=!1,n=!0,o=0;break;case 9:case 32:++o;break;default:n&&!r&&(null===i||o<i)&&(i=o),n=!1}return null!==(t=i)&&void 0!==t?t:0}(e);if(0!==r)for(var n=1;n<t.length;n++)t[n]=t[n].slice(r);for(var o=0;o<t.length&&Ht(t[o]);)++o;for(var i=t.length;i>o&&Ht(t[i-1]);)--i;return t.slice(o,i).join("\n")}function Ht(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var Bt=function(){function e(e){var t=new Rt(kt.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==kt.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=Vt(this,e)}while(e.kind===kt.COMMENT);return e},e}();function $t(e){return isNaN(e)?kt.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function Vt(e,t){for(var r=e.source,n=r.body,o=n.length,i=t.end;i<o;){var s=n.charCodeAt(i),a=e.line,c=1+i-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 33:return new Rt(kt.BANG,i,i+1,a,c,t);case 35:return Kt(r,i,a,c,t);case 36:return new Rt(kt.DOLLAR,i,i+1,a,c,t);case 38:return new Rt(kt.AMP,i,i+1,a,c,t);case 40:return new Rt(kt.PAREN_L,i,i+1,a,c,t);case 41:return new Rt(kt.PAREN_R,i,i+1,a,c,t);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return new Rt(kt.SPREAD,i,i+3,a,c,t);break;case 58:return new Rt(kt.COLON,i,i+1,a,c,t);case 61:return new Rt(kt.EQUALS,i,i+1,a,c,t);case 64:return new Rt(kt.AT,i,i+1,a,c,t);case 91:return new Rt(kt.BRACKET_L,i,i+1,a,c,t);case 93:return new Rt(kt.BRACKET_R,i,i+1,a,c,t);case 123:return new Rt(kt.BRACE_L,i,i+1,a,c,t);case 124:return new Rt(kt.PIPE,i,i+1,a,c,t);case 125:return new Rt(kt.BRACE_R,i,i+1,a,c,t);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?Jt(r,i,a,c,t,e):Wt(r,i,a,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Yt(r,i,s,a,c,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Zt(r,i,a,c,t)}throw Ot(r,i,Gt(s))}var u=e.line,l=1+i-e.lineStart;return new Rt(kt.EOF,o,o,u,l,t)}function Gt(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat($t(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat($t(e),".")}function Kt(e,t,r,n,o){var i,s=e.body,a=t;do{i=s.charCodeAt(++a)}while(!isNaN(i)&&(i>31||9===i));return new Rt(kt.COMMENT,t,a,r,n,o,s.slice(t+1,a))}function Yt(e,t,r,n,o,i){var s=e.body,a=r,c=t,u=!1;if(45===a&&(a=s.charCodeAt(++c)),48===a){if((a=s.charCodeAt(++c))>=48&&a<=57)throw Ot(e,c,"Invalid number, unexpected digit after 0: ".concat($t(a),"."))}else c=Xt(e,c,a),a=s.charCodeAt(c);if(46===a&&(u=!0,a=s.charCodeAt(++c),c=Xt(e,c,a),a=s.charCodeAt(c)),69!==a&&101!==a||(u=!0,43!==(a=s.charCodeAt(++c))&&45!==a||(a=s.charCodeAt(++c)),c=Xt(e,c,a),a=s.charCodeAt(c)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw Ot(e,c,"Invalid number, expected digit but got: ".concat($t(a),"."));return new Rt(u?kt.FLOAT:kt.INT,t,c,n,o,i,s.slice(t,c))}function Xt(e,t,r){var n=e.body,o=t,i=r;if(i>=48&&i<=57){do{i=n.charCodeAt(++o)}while(i>=48&&i<=57);return o}throw Ot(e,o,"Invalid number, expected digit but got: ".concat($t(i),"."))}function Wt(e,t,r,n,o){for(var i=e.body,s=t+1,a=s,c=0,u="";s<i.length&&!isNaN(c=i.charCodeAt(s))&&10!==c&&13!==c;){if(34===c)return u+=i.slice(a,s),new Rt(kt.STRING,t,s+1,r,n,o,u);if(c<32&&9!==c)throw Ot(e,s,"Invalid character within String: ".concat($t(c),"."));if(++s,92===c){switch(u+=i.slice(a,s-1),c=i.charCodeAt(s)){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+="\n";break;case 114:u+="\r";break;case 116:u+="\t";break;case 117:var l=zt(i.charCodeAt(s+1),i.charCodeAt(s+2),i.charCodeAt(s+3),i.charCodeAt(s+4));if(l<0){var p=i.slice(s+1,s+5);throw Ot(e,s,"Invalid character escape sequence: \\u".concat(p,"."))}u+=String.fromCharCode(l),s+=4;break;default:throw Ot(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(c),"."))}a=++s}}throw Ot(e,s,"Unterminated string.")}function Jt(e,t,r,n,o,i){for(var s=e.body,a=t+3,c=a,u=0,l="";a<s.length&&!isNaN(u=s.charCodeAt(a));){if(34===u&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2))return l+=s.slice(c,a),new Rt(kt.BLOCK_STRING,t,a+3,r,n,o,qt(l));if(u<32&&9!==u&&10!==u&&13!==u)throw Ot(e,a,"Invalid character within String: ".concat($t(u),"."));10===u?(++a,++i.line,i.lineStart=a):13===u?(10===s.charCodeAt(a+1)?a+=2:++a,++i.line,i.lineStart=a):92===u&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2)&&34===s.charCodeAt(a+3)?(l+=s.slice(c,a)+'"""',c=a+=4):++a}throw Ot(e,a,"Unterminated string.")}function zt(e,t,r,n){return Qt(e)<<12|Qt(t)<<8|Qt(r)<<4|Qt(n)}function Qt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Zt(e,t,r,n,o){for(var i=e.body,s=i.length,a=t+1,c=0;a!==s&&!isNaN(c=i.charCodeAt(a))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++a;return new Rt(kt.NAME,t,a,r,n,o,i.slice(t,a))}var er=function(){function e(e,t){var r=function(e){return e instanceof Ft}(e)?e:new Ft(e);this._lexer=new Bt(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(kt.NAME);return{kind:St.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:St.DOCUMENT,definitions:this.many(kt.SOF,this.parseDefinition,kt.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(kt.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(kt.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(kt.BRACE_L))return{kind:St.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(kt.NAME)&&(t=this.parseName()),{kind:St.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(kt.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(kt.PAREN_L,this.parseVariableDefinition,kt.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:St.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(kt.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(kt.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(kt.DOLLAR),{kind:St.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:St.SELECTION_SET,selections:this.many(kt.BRACE_L,this.parseSelection,kt.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(kt.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(kt.COLON)?(e=n,t=this.parseName()):t=n,{kind:St.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(kt.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(kt.PAREN_L,t,kt.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(kt.COLON),{kind:St.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:St.ARGUMENT,name:this.parseName(),value:(this.expectToken(kt.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(kt.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(kt.NAME)?{kind:St.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:St.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:St.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:St.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case kt.BRACKET_L:return this.parseList(e);case kt.BRACE_L:return this.parseObject(e);case kt.INT:return this._lexer.advance(),{kind:St.INT,value:t.value,loc:this.loc(t)};case kt.FLOAT:return this._lexer.advance(),{kind:St.FLOAT,value:t.value,loc:this.loc(t)};case kt.STRING:case kt.BLOCK_STRING:return this.parseStringLiteral();case kt.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:St.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:St.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:St.NULL,loc:this.loc(t)};default:return{kind:St.ENUM,value:t.value,loc:this.loc(t)}}case kt.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:St.STRING,value:e.value,block:e.kind===kt.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:St.LIST,values:this.any(kt.BRACKET_L,(function(){return t.parseValueLiteral(e)}),kt.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:St.OBJECT,fields:this.any(kt.BRACE_L,(function(){return t.parseObjectField(e)}),kt.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(kt.COLON),{kind:St.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(kt.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(kt.AT),{kind:St.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(kt.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(kt.BRACKET_R),e={kind:St.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(kt.BANG)?{kind:St.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:St.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===kt.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(kt.STRING)||this.peek(kt.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(kt.BRACE_L,this.parseOperationTypeDefinition,kt.BRACE_R);return{kind:St.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(kt.COLON);var r=this.parseNamedType();return{kind:St.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:St.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:St.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(kt.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(kt.AMP)||this.peek(kt.NAME));return t}return this.delimitedMany(kt.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(kt.BRACE_L)&&this._lexer.lookahead().kind===kt.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(kt.BRACE_L,this.parseFieldDefinition,kt.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(kt.COLON);var o=this.parseTypeReference(),i=this.parseDirectives(!0);return{kind:St.FIELD_DEFINITION,description:t,name:r,arguments:n,type:o,directives:i,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(kt.PAREN_L,this.parseInputValueDef,kt.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(kt.COLON);var n,o=this.parseTypeReference();this.expectOptionalToken(kt.EQUALS)&&(n=this.parseValueLiteral(!0));var i=this.parseDirectives(!0);return{kind:St.INPUT_VALUE_DEFINITION,description:t,name:r,type:o,defaultValue:n,directives:i,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:St.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseUnionMemberTypes();return{kind:St.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:o,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(kt.EQUALS)?this.delimitedMany(kt.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();return{kind:St.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:o,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(kt.BRACE_L,this.parseEnumValueDefinition,kt.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:St.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();return{kind:St.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:o,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(kt.BRACE_L,this.parseInputValueDef,kt.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===kt.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(kt.BRACE_L,this.parseOperationTypeDefinition,kt.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:St.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:St.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return{kind:St.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return{kind:St.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:St.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:St.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:St.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(kt.AT);var r=this.parseName(),n=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var i=this.parseDirectiveLocations();return{kind:St.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:o,locations:i,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(kt.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==Ut[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new At(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw Ot(this._lexer.source,t.start,"Expected ".concat(rr(e),", found ").concat(tr(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==kt.NAME||t.value!==e)throw Ot(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(tr(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===kt.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return Ot(this._lexer.source,t.start,"Unexpected ".concat(tr(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function tr(e){var t=e.value;return rr(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function rr(e){return function(e){return e===kt.BANG||e===kt.DOLLAR||e===kt.AMP||e===kt.PAREN_L||e===kt.PAREN_R||e===kt.SPREAD||e===kt.COLON||e===kt.EQUALS||e===kt.AT||e===kt.BRACKET_L||e===kt.BRACKET_R||e===kt.BRACE_L||e===kt.PIPE||e===kt.BRACE_R}(e)?'"'.concat(e,'"'):e}const nr=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:new URL(e.url.pathname,`${e.url.protocol}//${e.url.host}`).href;function or(e){var t;const r=e.definitions.find((e=>"OperationDefinition"===e.kind));return{operationType:null==r?void 0:r.operation,operationName:null===(t=null==r?void 0:r.name)||void 0===t?void 0:t.value}}function ir(e){try{return or(new er(e,t).parseDocument())}catch(e){return e}var t}function sr(e){var t,r;switch(e.method){case"GET":return{query:e.url.searchParams.get("query"),variables:V(e.url.searchParams.get("variables")||"")};case"POST":if(null===(t=e.body)||void 0===t?void 0:t.query){const{query:t,variables:r}=e.body;return{query:t,variables:r}}if(null===(r=e.body)||void 0===r?void 0:r.operations){const t=e.body,{operations:r,map:n}=t,o=
7
+ */k.flattenHeadersObject=function(e){return D.reduceHeadersObject(e,(function(e,t,r){return e[t]=[].concat(r).join("; "),e}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flattenHeadersObject=e.flattenHeadersList=e.reduceHeadersObject=e.objectToHeaders=e.listToHeaders=e.stringToHeaders=e.headersToObject=e.headersToList=e.headersToString=e.Headers=void 0;var t=i;Object.defineProperty(e,"Headers",{enumerable:!0,get:function(){return t.default}});var r=v;Object.defineProperty(e,"headersToString",{enumerable:!0,get:function(){return r.headersToString}});var n=m;Object.defineProperty(e,"headersToList",{enumerable:!0,get:function(){return n.headersToList}});var o=E;Object.defineProperty(e,"headersToObject",{enumerable:!0,get:function(){return o.headersToObject}});var s=w;Object.defineProperty(e,"stringToHeaders",{enumerable:!0,get:function(){return s.stringToHeaders}});var a=T;Object.defineProperty(e,"listToHeaders",{enumerable:!0,get:function(){return a.listToHeaders}});var c=O;Object.defineProperty(e,"objectToHeaders",{enumerable:!0,get:function(){return c.objectToHeaders}});var u=S;Object.defineProperty(e,"reduceHeadersObject",{enumerable:!0,get:function(){return u.reduceHeadersObject}});var l=A;Object.defineProperty(e,"flattenHeadersList",{enumerable:!0,get:function(){return l.flattenHeadersList}});var p=k;Object.defineProperty(e,"flattenHeadersObject",{enumerable:!0,get:function(){return p.flattenHeadersObject}})}(o);var P=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=e.split(U),i=n.decode||j,s=0;s<o.length;s++){var a=o[s],c=a.indexOf("=");if(!(c<0)){var u=a.substr(0,c).trim(),l=a.substr(++c,a.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),null==r[u]&&(r[u]=H(l,i))}}return r},M=function(e,t,r){var n=r||{},o=n.encode||F;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!q.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!q.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=n.maxAge){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!q.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!q.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(s+="; HttpOnly");n.secure&&(s+="; Secure");if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},j=decodeURIComponent,F=encodeURIComponent,U=/; */,q=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function H(e,t){try{return t(e)}catch(t){return e}}const B=(e,t,r)=>n=>{const o=M(e,t,r);return n.headers.set("Set-Cookie",o),"undefined"!=typeof document&&(document.cookie=o),n},$=e=>t=>(t.body=e,t);function V(e){try{return JSON.parse(e)}catch(e){return}}function G(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function K(e,t){return Object.entries(t).reduce(((e,[t,r])=>{const n=e[t];return Array.isArray(n)&&Array.isArray(r)?(e[t]=n.concat(r),e):G(n)&&G(r)?(e[t]=K(n,r),e):(e[t]=r,e)}),Object.assign({},e))}const X=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t),W=e=>t=>{const r=K(V(t.body)||{},{data:e});return X(r)(t)},Y=e=>t=>{const r=K(V(t.body)||{},{extensions:e});return X(r)(t)};var J={exports:{}};!function(e,t){!function(e){function t(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product||!("undefined"==typeof process||!process.versions||!process.versions.node)}e.isNodeProcess=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,J.exports);const z=2147483647,Q=()=>J.exports.isNodeProcess()?5:Math.floor(300*Math.random()+100),Z=e=>t=>{let r;if("string"==typeof e)switch(e){case"infinite":r=z;break;case"real":r=Q();break;default:throw new Error(`Failed to delay a response: unknown delay mode "${e}". Please make sure you provide one of the supported modes ("real", "infinite") or a number to "ctx.delay".`)}else if(void 0===e)r=Q();else{if(e>z)throw new Error(`Failed to delay a response: provided delay duration (${e}) exceeds the maximum allowed duration for "setTimeout" (2147483647). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);r=e}return t.delay=r,t},ee=e=>t=>{if(null==e)return t;const r=K(V(t.body)||{},{errors:e});return X(r)(t)},te=J.exports.isNodeProcess()?require("node-fetch"):window.fetch,re=e=>{const t=new o.Headers(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.all()})},ne=(e,t={})=>{if("string"==typeof e)return te(e,re(t));const r=(e=>{const{body:t,method:r}=e,n=Object.assign(Object.assign({},e),{body:void 0});return["GET","HEAD"].includes(r)||(n.body="object"==typeof t||"number"==typeof t||"boolean"==typeof t?JSON.stringify(t):t),n})(e),n=re(r);return te(e.url.href,n)},oe=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),ie=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);var se,ae=Object.freeze({__proto__:null,status:r,set:L,cookie:B,body:$,data:W,extensions:Y,delay:Z,errors:ee,fetch:ne,json:X,text:oe,xml:ie}),ce={},ue={},le={exports:{}},pe="object"==typeof Reflect?Reflect:null,de=pe&&"function"==typeof pe.apply?pe.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};se=pe&&"function"==typeof pe.ownKeys?pe.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var fe=Number.isNaN||function(e){return e!=e};function he(){he.init.call(this)}le.exports=he,le.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}_e(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&_e(e,"error",t,r)}(e,o,{once:!0})}))},he.EventEmitter=he,he.prototype._events=void 0,he.prototype._eventsCount=0,he.prototype._maxListeners=void 0;var ve=10;function me(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function ye(e){return void 0===e._maxListeners?he.defaultMaxListeners:e._maxListeners}function ge(e,t,r,n){var o,i,s,a;if(me(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=ye(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function Ee(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function be(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=Ee.bind(n);return o.listener=r,n.wrapFn=o,o}function we(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):Te(o,o.length)}function Ne(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function Te(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function _e(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(he,"defaultMaxListeners",{enumerable:!0,get:function(){return ve},set:function(e){if("number"!=typeof e||e<0||fe(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ve=e}}),he.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},he.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||fe(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},he.prototype.getMaxListeners=function(){return ye(this)},he.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)de(a,this,t);else{var c=a.length,u=Te(a,c);for(r=0;r<c;++r)de(u[r],this,t)}return!0},he.prototype.addListener=function(e,t){return ge(this,e,t,!1)},he.prototype.on=he.prototype.addListener,he.prototype.prependListener=function(e,t){return ge(this,e,t,!0)},he.prototype.once=function(e,t){return me(t),this.on(e,be(this,e,t)),this},he.prototype.prependOnceListener=function(e,t){return me(t),this.prependListener(e,be(this,e,t)),this},he.prototype.removeListener=function(e,t){var r,n,o,i,s;if(me(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},he.prototype.off=he.prototype.removeListener,he.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},he.prototype.listeners=function(e){return we(this,e,!0)},he.prototype.rawListeners=function(e){return we(this,e,!1)},he.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Ne.call(e,t)},he.prototype.listenerCount=Ne,he.prototype.eventNames=function(){return this._eventsCount>0?se(this._events):[]};var xe,Oe=n&&n.__extends||(xe=function(e,t){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Se=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n};ue.__esModule=!0,ue.StrictEventEmitter=void 0;var Ce=function(e){function t(){return e.call(this)||this}return Oe(t,e),t.prototype.on=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.once=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.off=function(t,r){return e.prototype.off.call(this,t.toString(),r)},t.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.prototype.emit.apply(this,Se([t.toString()],r))},t.prototype.addListener=function(t,r){return e.prototype.addListener.call(this,t.toString(),r)},t.prototype.removeListener=function(t,r){return e.prototype.removeListener.call(this,t.toString(),r)},t}(le.exports.EventEmitter);function Ie(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}ue.StrictEventEmitter=Ce,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]});e.__esModule=!0,e.StrictEventEmitter=void 0,t(e,ue,"StrictEventEmitter")}(ce);var Ae={},Re={};Object.defineProperty(Re,"__esModule",{value:!0}),Re.until=async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}},Object.defineProperty(Ae,"__esModule",{value:!0});var ke=Re,De=Ae.until=ke.until;const Le=(e,t,r)=>[e.active,e.installing,e.waiting].filter(Boolean).find((e=>r(e.scriptURL,t)))||null;var Pe={},Me={},je={};Object.defineProperty(je,"__esModule",{value:!0}),je.format=void 0;var Fe=/(%?)(%([sdjo]))/g;function Ue(e,t){switch(t){case"s":return e;case"d":case"i":return Number(e);case"j":return JSON.stringify(e);case"o":if("string"==typeof e)return e;var r=JSON.stringify(e);return"{}"===r||"[]"===r||/^\[object .+?\]$/.test(r)?e:r}}je.format=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(0===t.length)return e;var n=0,o=e.replace(Fe,(function(e,r,o,i){var s=Ue(t[n],i);return r?e:(n++,s)}));return n<t.length&&(o+=" "+t.slice(n).join(" ")),o=o.replace(/%{2,2}/g,"%")};var qe=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),He=n&&n.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Me,"__esModule",{value:!0}),Me.invariant=Me.InvariantError=void 0;var Be=je,$e=function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=e.call(this,t)||this;if(o.name="Invariant Violation",o.message=Be.format.apply(void 0,He([t],r)),o.stack){var i=o.stack.split("\n");i.splice(1,2),o.stack=i.join("\n")}return o}return qe(t,e),t}(Error);Me.InvariantError=$e,Me.invariant=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!e)throw new($e.bind.apply($e,He([void 0,t],r)))},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Me,e),r(je,e)}(Pe);function Ve(e,...t){return`[MSW] ${Pe.format(e,...t)}`}const Ge={formatMessage:Ve,warn:function(e,...t){console.warn(Ve(e,...t))},error:function(e,...t){console.error(Ve(e,...t))}},Ke=(e,t={},r)=>Ie(void 0,void 0,void 0,(function*(){const n=new URL(e,location.origin).href;const o=yield navigator.serviceWorker.getRegistrations().then((e=>e.filter((e=>Le(e,n,r)))));!navigator.serviceWorker.controller&&o.length>0&&location.reload();const[i]=o;if(i)return i.update().then((()=>[Le(i,n,r),i]));const[s,a]=yield De((()=>Ie(void 0,void 0,void 0,(function*(){const o=yield navigator.serviceWorker.register(e,t);return[Le(o,n,r),o]}))));if(s){if(s.message.includes("(404)")){const e=new URL((null==t?void 0:t.scope)||"/",location.href);throw new Error(Ge.formatMessage(`Failed to register a Service Worker for scope ('${e.href}') with script ('${n}'): Service Worker script does not exist at the given path.\n\nDid you forget to run "npx msw init <PUBLIC_DIR>"?\n\nLearn more about creating the Service Worker script: https://mswjs.io/docs/cli/init`))}throw new Error(Ge.formatMessage("Failed to register the Service Worker:\n\n%s",s.message))}return a}));function Xe(e={}){if(e.quiet)return;const t=e.message||"Mocking enabled.";console.groupCollapsed(`%c${Ge.formatMessage(t)}`,"color:orangered;font-weight:bold;"),console.log("%cDocumentation: %chttps://mswjs.io/docs","font-weight:bold","font-weight:normal"),console.log("Found an issue? https://github.com/mswjs/msw/issues"),console.groupEnd()}class We extends Error{constructor(e){super(e),this.name="NetworkError"}}var Ye={},Je={},ze={exports:{}},Qe={decodeValues:!0,map:!1,silent:!1};function Ze(e){return"string"==typeof e&&!!e.trim()}function et(e,t){var r=e.split(";").filter(Ze),n=r.shift().split("="),o=n.shift(),i=n.join("=");t=t?Object.assign({},Qe,t):Qe;try{i=t.decodeValues?decodeURIComponent(i):i}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",e)}var s={name:o,value:i};return r.forEach((function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?s.expires=new Date(n):"max-age"===r?s.maxAge=parseInt(n,10):"secure"===r?s.secure=!0:"httponly"===r?s.httpOnly=!0:"samesite"===r?s.sameSite=n:s[r]=n})),s}function tt(e,t){if(t=t?Object.assign({},Qe,t):Qe,!e)return t.map?{}:[];if(e.headers&&e.headers["set-cookie"])e=e.headers["set-cookie"];else if(e.headers){var r=e.headers[Object.keys(e.headers).find((function(e){return"set-cookie"===e.toLowerCase()}))];r||!e.headers.cookie||t.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),(t=t?Object.assign({},Qe,t):Qe).map){return e.filter(Ze).reduce((function(e,r){var n=et(r,t);return e[n.name]=n,e}),{})}return e.filter(Ze).map((function(e){return et(e,t)}))}function rt(){return P(document.cookie)}function nt(e){var t;Ye.store.hydrate(),e.cookies=Object.assign(Object.assign({},function(e){if("undefined"==typeof document||"undefined"==typeof location)return{};switch(e.credentials){case"same-origin":return location.origin===e.url.origin?rt():{};case"include":return rt();default:return{}}}(e)),Array.from(null===(t=Ye.store.get(Object.assign(Object.assign({},e),{url:e.url.toString()})))||void 0===t?void 0:t.entries()).reduce(((e,[t,{value:r}])=>Object.assign(e,{[t]:r})),{})),e.headers.set("cookie",Object.entries(e.cookies).map((([e,t])=>`${e}=${t}`)).join("; "))}function ot(e){var t,r;const n=o.stringToHeaders(e),i=n.get("content-type")||"text/plain",s=n.get("content-disposition");if(!s)throw new Error('"Content-Disposition" header is required.');const a=s.split(";").reduce(((e,t)=>{const[r,...n]=t.trim().split("=");return e[r]=n.join("="),e}),{});return{name:null===(t=a.name)||void 0===t?void 0:t.slice(1,-1),filename:null===(r=a.filename)||void 0===r?void 0:r.slice(1,-1),contentType:i}}function it(e,t){var r;if(!e)return e;const n=(null===(r=null==t?void 0:t.get("content-type"))||void 0===r?void 0:r.toLowerCase())||"";if(n.startsWith("multipart/form-data")&&"object"!=typeof e)return function(e,t){const r=null==t?void 0:t.get("content-type");if(!r)return;const[,...n]=r.split(/; */),o=n.filter((e=>e.startsWith("boundary="))).map((e=>e.replace(/^boundary=/,"")))[0];if(!o)return;const i=new RegExp(`--+${o}`),s=e.split(i).filter((e=>e.startsWith("\r\n")&&e.endsWith("\r\n"))).map((e=>e.trimStart().replace(/\r\n$/,"")));if(!s.length)return;const a={};try{for(const e of s){const[t,...r]=e.split("\r\n\r\n"),n=r.join("\r\n\r\n"),{contentType:o,filename:i,name:s}=ot(t),c=void 0===i?n:new File([n],i,{type:o}),u=a[s];void 0===u?a[s]=c:Array.isArray(u)?a[s]=[...u,c]:a[s]=[u,c]}return a}catch(e){return}}(e.toString(),t)||e;return n.includes("json")&&"object"!=typeof e&&V(e.toString())||e}function st(e,t){return e.toLowerCase()===t.toLowerCase()}function at(e){if(!e.method||!st(e.method,"GET")||""!==e.body)return e.body}ze.exports=tt,ze.exports.parse=tt,ze.exports.parseString=et,ze.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,o,i,s=[],a=0;function c(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,i=!1;c();)if(","===(r=e.charAt(a))){for(n=a,a+=1,c(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(i=!0,a=o,s.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!i||a>=e.length)&&s.push(e.substring(t,e.length))}return s},function(e){var t=n&&n.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.store=e.PERSISTENCY_KEY=void 0;const r=ze.exports;function o(){try{return null!=localStorage&&(localStorage.setItem("test","test"),localStorage.getItem("test"),!0)}catch(e){return!1}}e.PERSISTENCY_KEY="MSW_COOKIE_STORE";e.store=new class{constructor(){this.store=new Map}add(e,n){if("omit"===e.credentials)return;const o=new URL(e.url),i=n.headers.get("set-cookie");if(!i)return;const s=Date.now(),a=r.parse(i).map((e=>{var{maxAge:r}=e,n=t(e,["maxAge"]);return Object.assign(Object.assign({},n),{expires:void 0===r?n.expires:new Date(s+1e3*r),maxAge:r})})),c=this.store.get(o.origin)||new Map;a.forEach((e=>{this.store.set(o.origin,c.set(e.name,e))}))}get(e){this.deleteExpiredCookies();const t=new URL(e.url),n=this.store.get(t.origin)||new Map;switch(e.credentials){case"include":return r.parse(document.cookie).forEach((e=>{n.set(e.name,e)})),n;case"same-origin":return n;default:return new Map}}getAll(){return this.deleteExpiredCookies(),this.store}deleteAll(e){const t=new URL(e.url);this.store.delete(t.origin)}clear(){this.store.clear()}hydrate(){if(!o())return;const r=localStorage.getItem(e.PERSISTENCY_KEY);if(r)try{JSON.parse(r).forEach((([e,r])=>{this.store.set(e,new Map(r.map((e=>{var[r,n]=e,{expires:o}=n,i=t(n,["expires"]);return[r,void 0===o?i:Object.assign(Object.assign({},i),{expires:new Date(o)})]}))))}))}catch(t){console.warn(`\n[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${e.PERSISTENCY_KEY}").\n\nStored value:\n${localStorage.getItem(e.PERSISTENCY_KEY)}\n\nThrown exception:\n${t}\n\nInvalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(e.PERSISTENCY_KEY)}}persist(){if(!o())return;const t=Array.from(this.store.entries()).map((([e,t])=>[e,Array.from(t.entries())]));localStorage.setItem(e.PERSISTENCY_KEY,JSON.stringify(t))}deleteExpiredCookies(){const e=Date.now();this.store.forEach(((t,r)=>{t.forEach((({expires:r,name:n})=>{void 0!==r&&r.getTime()<=e&&t.delete(n)})),0===t.size&&this.store.delete(r)}))}}}(Je),function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Je,e)}(Ye);var ct=function(){function e(e,t,r,n,o){return e<t||r<t?e>r?r+1:e+1:n===o?t:t+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;s<o&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,0===(o-=s)||i<3)return i;var a,c,u,l,p,d,f,h,v,m,y,g,E=0,b=[];for(a=0;a<o;a++)b.push(a+1),b.push(t.charCodeAt(s+a));for(var w=b.length-1;E<i-3;)for(v=r.charCodeAt(s+(c=E)),m=r.charCodeAt(s+(u=E+1)),y=r.charCodeAt(s+(l=E+2)),g=r.charCodeAt(s+(p=E+3)),d=E+=4,a=0;a<w;a+=2)c=e(f=b[a],c,u,v,h=b[a+1]),u=e(c,u,l,m,h),l=e(u,l,p,y,h),d=e(l,p,d,g,h),b[a]=d,p=l,l=u,u=c,c=f;for(;E<i;)for(v=r.charCodeAt(s+(c=E)),d=++E,a=0;a<w;a+=2)f=b[a],b[a]=d=e(f,c,d,v,b[a+1]),c=f;return d}}();function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var lt="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function pt(e,t){for(var r,n=/\r\n|[\n\r]/g,o=1,i=t+1;(r=n.exec(e.body))&&r.index<t;)o+=1,i=t+1-(r.index+r[0].length);return{line:o,column:i}}function dt(e){return ft(e.source,pt(e.source,e.start))}function ft(e,t){var r=e.locationOffset.column-1,n=vt(r)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,a=1===t.line?r:0,c=t.column+a,u="".concat(e.name,":").concat(s,":").concat(c,"\n"),l=n.split(/\r\n|[\n\r]/g),p=l[o];if(p.length>120){for(var d=Math.floor(c/80),f=c%80,h=[],v=0;v<p.length;v+=80)h.push(p.slice(v,v+80));return u+ht([["".concat(s),h[0]]].concat(h.slice(1,d+1).map((function(e){return["",e]})),[[" ",vt(f-1)+"^"],["",h[d+1]]]))}return u+ht([["".concat(s-1),l[o-1]],["".concat(s),p],["",vt(c-1)+"^"],["".concat(s+1),l[o+1]]])}function ht(e){var t=e.filter((function(e){return e[0],void 0!==e[1]})),r=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,n=e[0],o=e[1];return vt(r-(t=n).length)+t+(o?" | "+o:" |")})).join("\n")}function vt(e){return Array(e+1).join(" ")}function mt(e){return(mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gt(e,t){return!t||"object"!==mt(t)&&"function"!=typeof t?Et(e):t}function Et(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bt(e){var t="function"==typeof Map?new Map:void 0;return(bt=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return wt(e,arguments,_t(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Tt(n,e)})(e)}function wt(e,t,r){return(wt=Nt()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&Tt(o,r.prototype),o}).apply(null,arguments)}function Nt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Tt(e,t){return(Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tt(e,t)}(a,e);var t,r,n,o,i,s=(t=a,r=Nt(),function(){var e,n=_t(t);if(r){var o=_t(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return gt(this,e)});function a(e,t,r,n,o,i,c){var u,l,p,d,f;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),f=s.call(this,e);var h,v=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,m=r;!m&&v&&(m=null===(h=v[0].loc)||void 0===h?void 0:h.source);var y,g=n;!g&&v&&(g=v.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),g&&0===g.length&&(g=void 0),n&&r?y=n.map((function(e){return pt(r,e)})):v&&(y=v.reduce((function(e,t){return t.loc&&e.push(pt(t.loc.source,t.loc.start)),e}),[]));var E,b=c;if(null==b&&null!=i){var w=i.extensions;"object"==ut(E=w)&&null!==E&&(b=w)}return Object.defineProperties(Et(f),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(u=y)&&void 0!==u?u:void 0,enumerable:null!=y},path:{value:null!=o?o:void 0,enumerable:null!=o},nodes:{value:null!=v?v:void 0},source:{value:null!==(l=m)&&void 0!==l?l:void 0},positions:{value:null!==(p=g)&&void 0!==p?p:void 0},originalError:{value:i},extensions:{value:null!==(d=b)&&void 0!==d?d:void 0,enumerable:null!=b}}),null!=i&&i.stack?(Object.defineProperty(Et(f),"stack",{value:i.stack,writable:!0,configurable:!0}),gt(f)):(Error.captureStackTrace?Error.captureStackTrace(Et(f),a):Object.defineProperty(Et(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return n=a,(o=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var o=n[r];o.loc&&(t+="\n\n"+dt(o.loc))}else if(e.source&&e.locations)for(var i=0,s=e.locations;i<s.length;i++){var a=s[i];t+="\n\n"+ft(e.source,a)}return t}(this)}},{key:lt,get:function(){return"Object"}}])&&yt(n.prototype,o),i&&yt(n,i),a}(bt(Error));function Ot(e,t,r){return new xt("Syntax Error: ".concat(r),void 0,e,[t])}var St=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});var Ct="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function It(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}(0),e.prototype.inspect=t,Ct&&(e.prototype[Ct]=t)}var At=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();It(At);var Rt=function(){function e(e,t,r,n,o,i,s){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=o,this.value=s,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();It(Rt);var kt=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Dt(e){return(Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lt(e){return Pt(e,[])}function Pt(e,t){switch(Dt(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(Ct)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:Pt(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var r=Math.min(10,e.length),n=e.length-r,o=[],i=0;i<r;++i)o.push(Pt(e[i],t));1===n?o.push("... 1 more item"):n>1&&o.push("... ".concat(n," more items"));return"["+o.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]";return"{ "+r.map((function(r){return r+": "+Pt(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}function Mt(e,t){if(!Boolean(e))throw new Error(t)}function jt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ft=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||Mt(0,"Body must be a string. Received: ".concat(Lt(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||Mt(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Mt(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:lt,get:function(){return"Source"}}])&&jt(t.prototype,r),n&&jt(t,n),e}();var Ut=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function qt(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,o=0,i=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:r=!1,n=!0,o=0;break;case 9:case 32:++o;break;default:n&&!r&&(null===i||o<i)&&(i=o),n=!1}return null!==(t=i)&&void 0!==t?t:0}(e);if(0!==r)for(var n=1;n<t.length;n++)t[n]=t[n].slice(r);for(var o=0;o<t.length&&Ht(t[o]);)++o;for(var i=t.length;i>o&&Ht(t[i-1]);)--i;return t.slice(o,i).join("\n")}function Ht(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var Bt=function(){function e(e){var t=new Rt(kt.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==kt.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=Vt(this,e)}while(e.kind===kt.COMMENT);return e},e}();function $t(e){return isNaN(e)?kt.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function Vt(e,t){for(var r=e.source,n=r.body,o=n.length,i=t.end;i<o;){var s=n.charCodeAt(i),a=e.line,c=1+i-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 33:return new Rt(kt.BANG,i,i+1,a,c,t);case 35:return Kt(r,i,a,c,t);case 36:return new Rt(kt.DOLLAR,i,i+1,a,c,t);case 38:return new Rt(kt.AMP,i,i+1,a,c,t);case 40:return new Rt(kt.PAREN_L,i,i+1,a,c,t);case 41:return new Rt(kt.PAREN_R,i,i+1,a,c,t);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return new Rt(kt.SPREAD,i,i+3,a,c,t);break;case 58:return new Rt(kt.COLON,i,i+1,a,c,t);case 61:return new Rt(kt.EQUALS,i,i+1,a,c,t);case 64:return new Rt(kt.AT,i,i+1,a,c,t);case 91:return new Rt(kt.BRACKET_L,i,i+1,a,c,t);case 93:return new Rt(kt.BRACKET_R,i,i+1,a,c,t);case 123:return new Rt(kt.BRACE_L,i,i+1,a,c,t);case 124:return new Rt(kt.PIPE,i,i+1,a,c,t);case 125:return new Rt(kt.BRACE_R,i,i+1,a,c,t);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?Jt(r,i,a,c,t,e):Yt(r,i,a,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Xt(r,i,s,a,c,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Zt(r,i,a,c,t)}throw Ot(r,i,Gt(s))}var u=e.line,l=1+i-e.lineStart;return new Rt(kt.EOF,o,o,u,l,t)}function Gt(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat($t(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat($t(e),".")}function Kt(e,t,r,n,o){var i,s=e.body,a=t;do{i=s.charCodeAt(++a)}while(!isNaN(i)&&(i>31||9===i));return new Rt(kt.COMMENT,t,a,r,n,o,s.slice(t+1,a))}function Xt(e,t,r,n,o,i){var s=e.body,a=r,c=t,u=!1;if(45===a&&(a=s.charCodeAt(++c)),48===a){if((a=s.charCodeAt(++c))>=48&&a<=57)throw Ot(e,c,"Invalid number, unexpected digit after 0: ".concat($t(a),"."))}else c=Wt(e,c,a),a=s.charCodeAt(c);if(46===a&&(u=!0,a=s.charCodeAt(++c),c=Wt(e,c,a),a=s.charCodeAt(c)),69!==a&&101!==a||(u=!0,43!==(a=s.charCodeAt(++c))&&45!==a||(a=s.charCodeAt(++c)),c=Wt(e,c,a),a=s.charCodeAt(c)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw Ot(e,c,"Invalid number, expected digit but got: ".concat($t(a),"."));return new Rt(u?kt.FLOAT:kt.INT,t,c,n,o,i,s.slice(t,c))}function Wt(e,t,r){var n=e.body,o=t,i=r;if(i>=48&&i<=57){do{i=n.charCodeAt(++o)}while(i>=48&&i<=57);return o}throw Ot(e,o,"Invalid number, expected digit but got: ".concat($t(i),"."))}function Yt(e,t,r,n,o){for(var i=e.body,s=t+1,a=s,c=0,u="";s<i.length&&!isNaN(c=i.charCodeAt(s))&&10!==c&&13!==c;){if(34===c)return u+=i.slice(a,s),new Rt(kt.STRING,t,s+1,r,n,o,u);if(c<32&&9!==c)throw Ot(e,s,"Invalid character within String: ".concat($t(c),"."));if(++s,92===c){switch(u+=i.slice(a,s-1),c=i.charCodeAt(s)){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+="\n";break;case 114:u+="\r";break;case 116:u+="\t";break;case 117:var l=zt(i.charCodeAt(s+1),i.charCodeAt(s+2),i.charCodeAt(s+3),i.charCodeAt(s+4));if(l<0){var p=i.slice(s+1,s+5);throw Ot(e,s,"Invalid character escape sequence: \\u".concat(p,"."))}u+=String.fromCharCode(l),s+=4;break;default:throw Ot(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(c),"."))}a=++s}}throw Ot(e,s,"Unterminated string.")}function Jt(e,t,r,n,o,i){for(var s=e.body,a=t+3,c=a,u=0,l="";a<s.length&&!isNaN(u=s.charCodeAt(a));){if(34===u&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2))return l+=s.slice(c,a),new Rt(kt.BLOCK_STRING,t,a+3,r,n,o,qt(l));if(u<32&&9!==u&&10!==u&&13!==u)throw Ot(e,a,"Invalid character within String: ".concat($t(u),"."));10===u?(++a,++i.line,i.lineStart=a):13===u?(10===s.charCodeAt(a+1)?a+=2:++a,++i.line,i.lineStart=a):92===u&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2)&&34===s.charCodeAt(a+3)?(l+=s.slice(c,a)+'"""',c=a+=4):++a}throw Ot(e,a,"Unterminated string.")}function zt(e,t,r,n){return Qt(e)<<12|Qt(t)<<8|Qt(r)<<4|Qt(n)}function Qt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Zt(e,t,r,n,o){for(var i=e.body,s=i.length,a=t+1,c=0;a!==s&&!isNaN(c=i.charCodeAt(a))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++a;return new Rt(kt.NAME,t,a,r,n,o,i.slice(t,a))}var er=function(){function e(e,t){var r=function(e){return e instanceof Ft}(e)?e:new Ft(e);this._lexer=new Bt(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(kt.NAME);return{kind:St.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:St.DOCUMENT,definitions:this.many(kt.SOF,this.parseDefinition,kt.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(kt.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(kt.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(kt.BRACE_L))return{kind:St.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(kt.NAME)&&(t=this.parseName()),{kind:St.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(kt.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(kt.PAREN_L,this.parseVariableDefinition,kt.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:St.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(kt.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(kt.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(kt.DOLLAR),{kind:St.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:St.SELECTION_SET,selections:this.many(kt.BRACE_L,this.parseSelection,kt.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(kt.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(kt.COLON)?(e=n,t=this.parseName()):t=n,{kind:St.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(kt.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(kt.PAREN_L,t,kt.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(kt.COLON),{kind:St.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:St.ARGUMENT,name:this.parseName(),value:(this.expectToken(kt.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(kt.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(kt.NAME)?{kind:St.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:St.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:St.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:St.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case kt.BRACKET_L:return this.parseList(e);case kt.BRACE_L:return this.parseObject(e);case kt.INT:return this._lexer.advance(),{kind:St.INT,value:t.value,loc:this.loc(t)};case kt.FLOAT:return this._lexer.advance(),{kind:St.FLOAT,value:t.value,loc:this.loc(t)};case kt.STRING:case kt.BLOCK_STRING:return this.parseStringLiteral();case kt.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:St.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:St.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:St.NULL,loc:this.loc(t)};default:return{kind:St.ENUM,value:t.value,loc:this.loc(t)}}case kt.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:St.STRING,value:e.value,block:e.kind===kt.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:St.LIST,values:this.any(kt.BRACKET_L,(function(){return t.parseValueLiteral(e)}),kt.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:St.OBJECT,fields:this.any(kt.BRACE_L,(function(){return t.parseObjectField(e)}),kt.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(kt.COLON),{kind:St.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(kt.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(kt.AT),{kind:St.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(kt.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(kt.BRACKET_R),e={kind:St.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(kt.BANG)?{kind:St.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:St.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===kt.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(kt.STRING)||this.peek(kt.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(kt.BRACE_L,this.parseOperationTypeDefinition,kt.BRACE_R);return{kind:St.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(kt.COLON);var r=this.parseNamedType();return{kind:St.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:St.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:St.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(kt.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(kt.AMP)||this.peek(kt.NAME));return t}return this.delimitedMany(kt.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(kt.BRACE_L)&&this._lexer.lookahead().kind===kt.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(kt.BRACE_L,this.parseFieldDefinition,kt.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(kt.COLON);var o=this.parseTypeReference(),i=this.parseDirectives(!0);return{kind:St.FIELD_DEFINITION,description:t,name:r,arguments:n,type:o,directives:i,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(kt.PAREN_L,this.parseInputValueDef,kt.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(kt.COLON);var n,o=this.parseTypeReference();this.expectOptionalToken(kt.EQUALS)&&(n=this.parseValueLiteral(!0));var i=this.parseDirectives(!0);return{kind:St.INPUT_VALUE_DEFINITION,description:t,name:r,type:o,defaultValue:n,directives:i,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:St.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseUnionMemberTypes();return{kind:St.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:o,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(kt.EQUALS)?this.delimitedMany(kt.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();return{kind:St.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:o,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(kt.BRACE_L,this.parseEnumValueDefinition,kt.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:St.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();return{kind:St.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:o,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(kt.BRACE_L,this.parseInputValueDef,kt.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===kt.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(kt.BRACE_L,this.parseOperationTypeDefinition,kt.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:St.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:St.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return{kind:St.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return{kind:St.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:St.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:St.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:St.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(kt.AT);var r=this.parseName(),n=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var i=this.parseDirectiveLocations();return{kind:St.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:o,locations:i,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(kt.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==Ut[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new At(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw Ot(this._lexer.source,t.start,"Expected ".concat(rr(e),", found ").concat(tr(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==kt.NAME||t.value!==e)throw Ot(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(tr(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===kt.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return Ot(this._lexer.source,t.start,"Unexpected ".concat(tr(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function tr(e){var t=e.value;return rr(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function rr(e){return function(e){return e===kt.BANG||e===kt.DOLLAR||e===kt.AMP||e===kt.PAREN_L||e===kt.PAREN_R||e===kt.SPREAD||e===kt.COLON||e===kt.EQUALS||e===kt.AT||e===kt.BRACKET_L||e===kt.BRACKET_R||e===kt.BRACE_L||e===kt.PIPE||e===kt.BRACE_R}(e)?'"'.concat(e,'"'):e}const nr=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:new URL(e.url.pathname,`${e.url.protocol}//${e.url.host}`).href;function or(e){var t;const r=e.definitions.find((e=>"OperationDefinition"===e.kind));return{operationType:null==r?void 0:r.operation,operationName:null===(t=null==r?void 0:r.name)||void 0===t?void 0:t.value}}function ir(e){try{return or(new er(e,t).parseDocument())}catch(e){return e}var t}function sr(e){var t,r;switch(e.method){case"GET":return{query:e.url.searchParams.get("query"),variables:V(e.url.searchParams.get("variables")||"")};case"POST":if(null===(t=e.body)||void 0===t?void 0:t.query){const{query:t,variables:r}=e.body;return{query:t,variables:r}}if(null===(r=e.body)||void 0===r?void 0:r.operations){const t=e.body,{operations:r,map:n}=t,o=
8
8
  /*! *****************************************************************************
9
9
  Copyright (c) Microsoft Corporation.
10
10
 
@@ -19,4 +19,4 @@ var MockServiceWorker=function(e){"use strict";var t={100:"Continue",101:"Switch
19
19
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
20
  PERFORMANCE OF THIS SOFTWARE.
21
21
  ***************************************************************************** */
22
- function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["operations","map"]),i=V(r)||{};if(!i.query)return null;const s=V(n||"")||{},a=i.variables?function(e,t,r){const n={variables:e};for(const[e,o]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of o){const[o,...i]=t.split(".").reverse(),s=i.reverse();let a=n;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[o]=r[e]}}return n.variables}(i.variables,s,o):{};return{query:i.query,variables:a}}default:return null}}function ar(e){const t=sr(e);if(!t||!t.query)return;const{query:r,variables:n}=t,o=ir(r);if(o instanceof Error){const t=nr(e);throw new Error(Ge.formatMessage('Failed to intercept a GraphQL request to "%s %s": cannot parse query. See the error message from the parser below.\n\n%s',e.method,t,o.message))}return{operationType:o.operationType,operationName:o.operationName,variables:n}}var cr;function ur(e){return e<300?cr.Success:e<400?cr.Warning:cr.Danger}function lr(){const e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].map(String).map((e=>e.slice(0,2))).map((e=>e.padStart(2,"0"))).join(":")}function pr(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function dr(e){const t=o.objectToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:it(e.body,t)})}function fr(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[a=r+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+r);if(!i)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:i}),r=a}else{for(var s="",a=r+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:s}),r=a}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,i="[^"+vr(t.delimiter||"/#?")+"]+?",s=[],a=0,c=0,u="",l=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=l(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=l("CHAR")||l("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=l("CHAR"),h=l("NAME"),v=l("PATTERN");if(h||v){var m=f||"";-1===o.indexOf(m)&&(u+=m,m=""),u&&(s.push(u),u=""),s.push({name:h||a++,prefix:m,suffix:"",pattern:v||i,modifier:l("MODIFIER")||""})}else{var y=f||l("ESCAPED_CHAR");if(y)u+=y;else if(u&&(s.push(u),u=""),l("OPEN")){m=d();var g=l("NAME")||"",E=l("PATTERN")||"",b=d();p("CLOSE"),s.push({name:g||(E?a++:""),pattern:g&&!E?i:E,prefix:m,suffix:b,modifier:l("MODIFIER")||""})}else p("END")}}return s}function hr(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],s=n.index,a=Object.create(null),c=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?a[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):a[r.name]=o(n[e],r)},u=1;u<n.length;u++)c(u);return{path:i,index:s,params:a}}}(gr(e,r,t),r,t)}function vr(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function mr(e){return e&&e.sensitive?"":"i"}function yr(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,i=r.start,s=void 0===i||i,a=r.end,c=void 0===a||a,u=r.encode,l=void 0===u?function(e){return e}:u,p="["+vr(r.endsWith||"")+"]|$",d="["+vr(r.delimiter||"/#?")+"]",f=s?"^":"",h=0,v=e;h<v.length;h++){var m=v[h];if("string"==typeof m)f+=vr(l(m));else{var y=vr(l(m.prefix)),g=vr(l(m.suffix));if(m.pattern)if(t&&t.push(m),y||g)if("+"===m.modifier||"*"===m.modifier){var E="*"===m.modifier?"?":"";f+="(?:"+y+"((?:"+m.pattern+")(?:"+g+y+"(?:"+m.pattern+"))*)"+g+")"+E}else f+="(?:"+y+"("+m.pattern+")"+g+")"+m.modifier;else f+="("+m.pattern+")"+m.modifier;else f+="(?:"+y+g+")"+m.modifier}}if(c)o||(f+=d+"?"),f+=r.endsWith?"(?="+p+")":"$";else{var b=e[e.length-1],w="string"==typeof b?d.indexOf(b[b.length-1])>-1:void 0===b;o||(f+="(?:"+d+"(?="+p+"))?"),w||(f+="(?="+d+"|"+p+")")}return new RegExp(f,mr(r))}(fr(e,r),t,r)}function gr(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return gr(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",mr(r))}(e,t,r):yr(e,t,r)}!function(e){e.Success="#69AB32",e.Warning="#F0BB4B",e.Danger="#E95F5D"}(cr||(cr={}));var Er={};Object.defineProperty(Er,"__esModule",{value:!0});var br=Er.getCleanUrl=void 0;br=Er.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")};const wr=/[\?|#].*$/g;function Nr(e){return e.replace(wr,"")}function Tr(e,t){if(e instanceof RegExp)return e;return Nr(function(e,t){if(/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e))return e;if(e.startsWith("*"))return e;const r=t||"undefined"!=typeof document&&document.baseURI;return r?decodeURI(new URL(encodeURI(e),r).href):e}(e,t))}function _r(e,t,r){const n=Tr(t,r),o="string"==typeof n?function(e){return e.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,((e,t,r)=>{const n="(.*)";return t?t.startsWith(":")?`${t}${r}`:`${t}(.*)`:n})).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}(n):n,i=br(e),s=hr(o,{decode:decodeURIComponent})(i);return{matches:!1!==s,params:s&&s.params||{}}}function xr(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}const Or={status:200,statusText:"OK",body:null,delay:0,once:!1},Sr=[];function Cr(e,t=Sr){return(...r)=>Ie(this,void 0,void 0,(function*(){const n=Object.assign({},Or,{headers:new o.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?xr(...i)(n):n}))}const Ir=Object.assign(Cr(),{once:Cr({once:!0}),networkError(e){throw new Xe(e)}}),Ar=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/;const Rr={status:r,set:L,delay:Z,fetch:ne};class kr{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||Rr,this.resolver=e.resolver;const t=function(e){const t=e.stack;if(!t)return;const r=t.split("\n").slice(1).find((e=>!Ar.test(e)));if(!r)return;return r.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,"")}(new Error);this.info=Object.assign(Object.assign({},e.info),{callFrame:t})}parse(e,t){return null}test(e,t){return this.predicate(e,this.parse(e,t),t)}getPublicRequest(e,t){return e}markAsSkipped(e=!0){this.shouldSkip=e}run(e,t){return Ie(this,void 0,void 0,(function*(){if(this.shouldSkip)return null;const r=this.parse(e,t);if(!this.predicate(e,r,t))return null;const n=this.getPublicRequest(e,r),o=this.wrapResolver(this.resolver),i=yield o(n,Ir,this.ctx);return this.createExecutionResult(r,n,i)}))}wrapResolver(e){return(t,r,n)=>Ie(this,void 0,void 0,(function*(){const o=this.resolverGenerator||(yield e(t,r,n));if((i=o)&&"function"==typeof i[Symbol.iterator]){const{value:e,done:t}=o[Symbol.iterator]().next(),r=yield e;return!r&&t?this.resolverGeneratorResult:(this.resolverGenerator||(this.resolverGenerator=o),this.resolverGeneratorResult=r,r)}var i;return o}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}var Dr;e.RESTMethods=void 0,(Dr=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",Dr.GET="GET",Dr.POST="POST",Dr.PUT="PUT",Dr.PATCH="PATCH",Dr.OPTIONS="OPTIONS",Dr.DELETE="DELETE";const Lr={set:L,status:r,cookie:B,body:$,text:oe,json:Y,xml:ie,delay:Z,fetch:ne};class Pr extends kr{constructor(e,t,r){super({info:{header:`${e} ${t}`,path:t,method:e},ctx:Lr,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:t}=this.info;if(t instanceof RegExp)return;if(Nr(t)===t)return;(function(e){return new URL(`/${e}`,"http://localhost").searchParams})(t).forEach(((e,t)=>{})),Ge.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${t}". Please match against a path instead and access query parameters in the response resolver function using "req.url.searchParams".`)}parse(e,t){return _r(e.url,this.info.path,null==t?void 0:t.baseUrl)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return(this.info.method instanceof RegExp?this.info.method.test(e.method):st(this.info.method,e.method))&&t.matches}log(e,t){const r=nr(e),n=pr(e),o=dr(t),i=ur(t.status);console.groupCollapsed(Ge.formatMessage("%s %s %s (%c%s%c)"),lr(),e.method,r,`color:${i}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.path,resolver:this.resolver}),console.log("Response",o),console.groupEnd()}}function Mr(e,t){try{return e()}catch(e){null==t||t(e)}}const jr={set:L,status:r,delay:Z,fetch:ne,data:X,extensions:W,errors:ee,cookie:B};class Fr extends kr{constructor(e,t,r,n){let o=t;if(null!=(i=t)&&"object"==typeof i&&"kind"in i&&"definitions"in i){const r=or(t);if(r.operationType!==e)throw new Error(`Failed to create a GraphQL handler: provided a DocumentNode with a mismatched operation type (expected "${e}", but got "${r.operationType}").`);if(!r.operationName)throw new Error("Failed to create a GraphQL handler: provided a DocumentNode with no operation name.");o=r.operationName}var i;super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${o} (origin: ${r.toString()})`,operationType:e,operationName:o},ctx:jr,resolver:n}),this.endpoint=r}parse(e){return Mr((()=>ar(e)),(e=>console.error(e.message)))}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{variables:(null==t?void 0:t.variables)||{}})}predicate(e,t){if(!t)return!1;if(!t.operationName&&"all"!==this.info.operationType){const t=nr(e);return Ge.warn(`Failed to intercept a GraphQL request at "${e.method} ${t}": anonymous GraphQL operations are not supported.\n\nConsider naming this operation or using "graphql.operation" request handler to intercept GraphQL requests regardless of their operation name/type. Read more: https://mswjs.io/docs/api/graphql/operation `),!1}const r=_r(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,o=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName||""):t.operationName===this.info.operationName;return r.matches&&n&&o}log(e,t,r,n){const o=pr(e),i=dr(t),s=ur(t.status),a=(null==n?void 0:n.operationName)?`${null==n?void 0:n.operationType} ${null==n?void 0:n.operationName}`:`anonymous ${null==n?void 0:n.operationType}`;console.groupCollapsed(Ge.formatMessage("%s %s (%c%s%c)"),lr(),`${a}`,`color:${s}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request:",o),console.log("Handler:",this),console.log("Response:",i),console.groupEnd()}}function Ur(e,t,r="warn"){if("function"==typeof r)return void r(e);const n=Mr((()=>ar(e))),o=function(e){return e.reduce(((e,t)=>(t instanceof Pr&&e.rest.push(t),t instanceof Fr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),i=n?o.graphql:o.rest,s=function(e,t,r){return t.reduce(((t,n)=>{const o=r(e,n);return t.concat([[o,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,i,n?(a=n,(e,t)=>{if(void 0===a.operationName)return 1/0;const{operationType:r,operationName:n}=t.info;if("string"!=typeof n)return 1/0;const o=a.operationType===r?.5:0;return ct(a.operationName,n)-o}):(e,t)=>{const{path:r,method:n}=t.info;if(r instanceof RegExp||n instanceof RegExp)return 1/0;const o=st(e.method,n)?.5:0,i=nr(e);return ct(i,r)-o});var a;const c=s.length>0?function(e){return e.length>1?`Did you mean to request one of the following resources instead?\n\n${e.map((e=>` • ${e.info.header}`)).join("\n")}`:`Did you mean to request "${e[0].info.header}" instead?`}(s):"",u=nr(e),l=["captured a request without a matching request handler:",` • ${n?`${n.operationType} ${n.operationName} (${e.method} ${u})`:`${e.method} ${u}`}`,c,"If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks"].filter(Boolean).join("\n\n");switch(r){case"error":throw Ge.error("Error: %s",l),new Error(Ge.formatMessage('Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'));case"warn":Ge.warn("Warning: %s",l);break;case"bypass":break;default:throw new Error(Ge.formatMessage('Failed to react to an unhandled request: unknown strategy "%s". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function as the value of the "onUnhandledRequest" option.',r))}}function qr(e,t,r,n,o){var i,s,a;return Ie(this,void 0,void 0,(function*(){if(n.emit("request:start",e),e.headers.get("x-msw-bypass"))return n.emit("request:end",e),void(null===(i=null==o?void 0:o.onBypassResponse)||void 0===i||i.call(o,e));const c=yield((e,t,r)=>Ie(void 0,void 0,void 0,(function*(){const n=t.filter((t=>t.test(e,r)));if(0===n.length)return{handler:void 0,response:void 0};const o=yield n.reduce(((t,n)=>Ie(void 0,void 0,void 0,(function*(){const o=yield t;if(null==o?void 0:o.response)return t;const i=yield n.run(e,r);return null===i||i.handler.shouldSkip?null:i.response?(i.response.once&&n.markAsSkipped(!0),i):{request:i.request,handler:i.handler,response:void 0,parsedResult:i.parsedResult}}))),Promise.resolve(null));return o?{handler:o.handler,publicRequest:o.request,parsedRequest:o.parsedResult,response:o.response}:{handler:void 0,response:void 0}})))(e,t,null==o?void 0:o.resolutionContext),{handler:u,response:l}=c;return u?l?(function(e,t){We.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),We.store.persist()}(e,l),n.emit("request:match",e),new Promise((t=>{var r,i,s;const a=c,u=(null===(r=null==o?void 0:o.transformResponse)||void 0===r?void 0:r.call(o,l))||l;null===(i=null==o?void 0:o.onMockedResponse)||void 0===i||i.call(o,u,a),setTimeout((()=>{var r;null===(r=null==o?void 0:o.onMockedResponseSent)||void 0===r||r.call(o,u,a),n.emit("request:end",e),t(u)}),null!==(s=l.delay)&&void 0!==s?s:0)}))):(Ge.warn("Expected response resolver to return a mocked response Object, but got %s. The original response is going to be used instead.\n\n • %s\n %s",l,u.info.header,u.info.callFrame),n.emit("request:end",e),void(null===(a=null==o?void 0:o.onBypassResponse)||void 0===a||a.call(o,e))):(Ur(e,t,r.onUnhandledRequest),n.emit("request:unhandled",e),n.emit("request:end",e),void(null===(s=null==o?void 0:o.onBypassResponse)||void 0===s||s.call(o,e)))}))}const Hr=(e,t)=>(r,n)=>Ie(void 0,void 0,void 0,(function*(){const i=(e=>{const t=e.ports[0];return{send(e){t&&t.postMessage(e)}}})(r);try{const r=function(e){const t={id:e.id,cache:e.cache,credentials:e.credentials,method:e.method,url:new URL(e.url),referrer:e.referrer,referrerPolicy:e.referrerPolicy,redirect:e.redirect,mode:e.mode,params:{},cookies:{},integrity:e.integrity,keepalive:e.keepalive,destination:e.destination,body:at(e),bodyUsed:e.bodyUsed,headers:new o.Headers(e.headers)};return nt(t),t.body=it(t.body,t.headers),t}(n.payload);yield qr(r,e.requestHandlers,t,e.emitter,{transformResponse:e=>Object.assign(Object.assign({},e),{headers:e.headers.all()}),onBypassResponse:()=>i.send({type:"MOCK_NOT_FOUND"}),onMockedResponse(e){i.send({type:"MOCK_SUCCESS",payload:e})},onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}catch(e){if(e instanceof Xe)return i.send({type:"NETWORK_ERROR",payload:{name:e.name,message:e.message}});i.send({type:"INTERNAL_ERROR",payload:{status:500,body:JSON.stringify({errorType:e.constructor.name,message:e.message,location:e.stack})}})}}));const Br=e=>function(t,r){const n=(()=>Ie(this,void 0,void 0,(function*(){e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Hr(e,t)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:o}=r;if(null===(n=o.type)||void 0===n?void 0:n.includes("opaque"))return;const i=new Response(o.body||null,o);"msw"===i.headers.get("x-powered-by")?e.emitter.emit("response:mocked",i,o.requestId):e.emitter.emit("response:bypass",i,o.requestId)}}(e));const n=yield Ke(t.serviceWorker.url,t.serviceWorker.options,t.findWorker),[o,i]=n;if(!o){const e=(null==r?void 0:r.findWorker)?Ge.formatMessage('Failed to locate the Service Worker registration using a custom "findWorker" predicate.\n\nPlease ensure that the custom predicate properly locates the Service Worker registration at "%s".\nMore details: https://mswjs.io/docs/api/setup-worker/start#findworker\n',t.serviceWorker.url):Ge.formatMessage('Failed to locate the Service Worker registration.\n\nThis most likely means that the worker script URL "%s" cannot resolve against the actual public hostname (%s). This may happen if your application runs behind a proxy, or has a dynamic hostname.\n\nPlease consider using a custom "serviceWorker.url" option to point to the actual worker script location, or a custom "findWorker" option to resolve the Service Worker registration manually. More details: https://mswjs.io/docs/api/setup-worker/start',t.serviceWorker.url,location.host);throw new Error(e)}e.worker=o,e.registration=i,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==o.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield De((()=>function(e,t){return Ie(this,void 0,void 0,(function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:r}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if("02f4ad4a2797f85668baf196e553d929"!==r)throw new Error(`Currently active Service Worker (${r}) is behind the latest published one (02f4ad4a2797f85668baf196e553d929).`);return t}))}(e,o)));return s&&Ge.error(`Detected outdated Service Worker: ${s.message}\n\nThe mocking is still enabled, but it's highly recommended that you update your Service Worker by running:\n\n$ npx msw init <PUBLIC_DIR>\n\nThis is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability.\nIf this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues `),yield function(e,t){return Ie(this,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{Ye({quiet:t.quiet})}))}))}(e,t).catch((e=>{throw new Error(`Failed to enable mocking: ${null==e?void 0:e.message}`)})),e.keepAliveInterval=window.setInterval((()=>e.workerChannel.send("KEEPALIVE_REQUEST")),5e3),function(e,t){(null==t?void 0:t.quiet)||location.href.startsWith(e.scope)||Ge.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.\n\n- (Recommended) Register the worker at the root level ("/") of your application.\n- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}(i,e.startOptions),i})))();return t.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...r){De((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...r)}))};const r=window.fetch;window.fetch=(...t)=>Ie(this,void 0,void 0,(function*(){return yield De((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n};function $r(e={}){e.quiet||console.log(`%c${Ge.formatMessage("Mocking disabled.")}`,"color:orangered;font-weight:bold;")}const Vr={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker:(e,t)=>e===t};function Gr(e,t){return r=>(t.startOptions=function(e){return K(Vr,e||{})}(r),e(t.startOptions,r||{}))}var Kr={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.createInterceptor=void 0;var Xr=ce;Yr.createInterceptor=function(e){var t=new Xr.StrictEventEmitter,r=[];return{apply:function(){r=e.modules.map((function(r){return r(t,e.resolver)}))},on:function(e,r){t.addListener(e,r)},restore:function(){if(t.removeAllListeners(),0===r.length)throw new Error('Failed to restore patched modules: no patches found. Did you forget to run ".apply()"?');r.forEach((function(e){return e()}))}}};var Wr={},Jr={},zr={},Qr={};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.format=void 0;var Zr=/(%?)(%([sdjo]))/g;function en(e,t){switch(t){case"s":return e;case"d":case"i":return Number(e);case"j":return JSON.stringify(e);case"o":if("string"==typeof e)return e;var r=JSON.stringify(e);return"{}"===r||"[]"===r||/^\[object .+?\]$/.test(r)?e:r}}Qr.format=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(0===t.length)return e;var n=0,o=e.replace(Zr,(function(e,r,o,i){var s=en(t[n],i);return r?e:(n++,s)}));return n<t.length&&(o+=" "+t.slice(n).join(" ")),o=o.replace(/%{2,2}/g,"%")};var tn=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rn=n&&n.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(zr,"__esModule",{value:!0}),zr.invariant=zr.InvariantError=void 0;var nn=Qr,on=function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=e.call(this,t)||this;if(o.name="Invariant Violation",o.message=nn.format.apply(void 0,rn([t],r)),o.stack){var i=o.stack;o.stack=i.split("\n").slice(2).join("\n")}return o}return tn(t,e),t}(Error);zr.InvariantError=on,zr.invariant=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!e)throw new(on.bind.apply(on,rn([void 0,t],r)))},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(zr,e),r(Qr,e)}(Jr);var sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.toIsoResponse=void 0;var an=o;sn.toIsoResponse=function(e){return{status:e.status||200,statusText:e.statusText||"OK",headers:an.objectToHeaders(e.headers||{}),body:e.body}};var cn=n&&n.__assign||function(){return(cn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},un=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ln=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},pn=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.createRemoteResolver=Wr.createRemoteInterceptor=void 0;var dn=o,fn=Jr,hn=ce,vn=Yr,mn=sn;function yn(e,t){switch(e){case"url":return new URL(t);case"headers":return new dn.Headers(t);default:return t}}Wr.createRemoteInterceptor=function(e){if(fn.invariant(process.connected,"Failed to create a remote interceptor: the current process (%s) does not have a parent. Please make sure you're spawning this process as a child process in order to use remote request interception.",process.pid),void 0===process.send)throw new Error("Failed to create a remote interceptor: the current process ("+process.pid+") does not have the IPC enabled. Please make sure you're spawning this process with the \"ipc\" stdio value set:\n\nspawn('node', ['module.js'], { stdio: ['ipc'] })");var t,r=vn.createInterceptor(cn(cn({},e),{resolver:function(e){var r,n=JSON.stringify(e);return null===(r=process.send)||void 0===r||r.call(process,"request:"+n),new Promise((function(r){t=function(t){if("string"==typeof t&&t.startsWith("response:"+e.id)){var n=pn(t.match(/^response:.+?:(.+)$/)||[],2)[1];if(!n)return r();var o=JSON.parse(n);return r(o)}},process.addListener("message",t)}))}}));return cn(cn({},r),{restore:function(){r.restore(),process.removeListener("message",t)}})},Wr.createRemoteResolver=function(e){var t=this,r=new hn.StrictEventEmitter,n=function(n){return un(t,void 0,void 0,(function(){var t,o,i,s,a;return ln(this,(function(c){switch(c.label){case 0:return"string"!=typeof n?[2]:n.startsWith("request:")?(t=pn(n.match(/^request:(.+)$/)||[],2),(o=t[1])?(i=JSON.parse(o,yn),r.emit("request",i),[4,e.resolver(i,void 0)]):[2]):[3,2];case 1:s=c.sent(),a=JSON.stringify(s),e.process.send("response:"+i.id+":"+a,(function(e){e||s&&r.emit("response",i,mn.toIsoResponse(s))})),c.label=2;case 2:return[2]}}))}))},o=function(){e.process.removeListener("message",n)};return e.process.addListener("message",n),e.process.addListener("disconnect",o),e.process.addListener("error",o),e.process.addListener("exit",o),{on:function(e,t){r.addListener(e,t)}}},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.getCleanUrl=void 0,r(Yr,e),r(Wr,e);var o=Er;Object.defineProperty(e,"getCleanUrl",{enumerable:!0,get:function(){return o.getCleanUrl}})}(Kr);var gn={},En={};Object.defineProperty(En,"__esModule",{value:!0}),En.uuidv4=void 0,En.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};var bn={exports:{}},wn=1e3,Nn=60*wn,Tn=60*Nn,_n=24*Tn,xn=7*_n,On=365.25*_n,Sn=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*On;case"weeks":case"week":case"w":return r*xn;case"days":case"day":case"d":return r*_n;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Tn;case"minutes":case"minute":case"mins":case"min":case"m":return r*Nn;case"seconds":case"second":case"secs":case"sec":case"s":return r*wn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=_n)return Cn(e,t,_n,"day");if(t>=Tn)return Cn(e,t,Tn,"hour");if(t>=Nn)return Cn(e,t,Nn,"minute");if(t>=wn)return Cn(e,t,wn,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=_n)return Math.round(e/_n)+"d";if(t>=Tn)return Math.round(e/Tn)+"h";if(t>=Nn)return Math.round(e/Nn)+"m";if(t>=wn)return Math.round(e/wn)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Cn(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var In=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=Sn,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=In(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(bn,bn.exports);var An=n&&n.__assign||function(){return(An=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Rn=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},kn=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(gn,"__esModule",{value:!0});var Dn=gn.interceptFetch=void 0,Ln=o,Pn=sn,Mn=En,jn=bn.exports("fetch");function Fn(e){return Rn(this,void 0,void 0,(function(){var t;return kn(this,(function(r){switch(r.label){case 0:return t={status:e.status,statusText:e.statusText,headers:Ln.objectToHeaders(Ln.headersToObject(e.headers))},[4,e.text()];case 1:return[2,(t.body=r.sent(),t)]}}))}))}Dn=gn.interceptFetch=function(e,t){var r=window.fetch;return jn('replacing "window.fetch"...'),window.fetch=function(n,o){return Rn(void 0,void 0,void 0,(function(){var i,s,a,c,u,l,p;return kn(this,(function(d){switch(d.label){case 0:return i=new Request(n,o),s="string"==typeof n?n:n.url,a=(null==o?void 0:o.method)||"GET",jn("[%s] %s",a,s),p={id:Mn.uuidv4(),url:new URL(s,location.origin),method:a,headers:new Ln.Headers((null==o?void 0:o.headers)||{})},[4,i.text()];case 1:return p.body=d.sent(),jn("isomorphic request",c=p),e.emit("request",c),jn("awaiting for the mocked response..."),[4,t(c,i)];case 2:return u=d.sent(),jn("mocked response",u),u?(l=Pn.toIsoResponse(u),jn("derived isomorphic response",l),e.emit("response",c,l),[2,new Response(u.body,An(An({},l),{headers:Ln.flattenHeadersObject(u.headers||{})}))]):(jn("no mocked response found, bypassing..."),[2,r(n,o).then((function(t){return Rn(void 0,void 0,void 0,(function(){var r,n,o,i;return kn(this,(function(s){switch(s.label){case 0:return r=t.clone(),jn("original fetch performed",r),o=(n=e).emit,i=["response",c],[4,Fn(r)];case 1:return o.apply(n,i.concat([s.sent()])),[2,t]}}))}))}))])}}))}))},function(){jn("restoring modules..."),window.fetch=r}};var Un={},qn={},Hn={},Bn={};function $n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var Vn=$n({HTML:"text/html",isHTML:function(e){return e===Vn.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Gn=$n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===Gn.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Bn.freeze=$n,Bn.MIME_TYPE=Vn,Bn.NAMESPACE=Gn;var Kn={};!function(e){var t=Bn.freeze;e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),e.entityMap=e.HTML_ENTITIES}(Kn);var Yn={},Xn=Bn.NAMESPACE,Wn=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Jn=new RegExp("[\\-\\.0-9"+Wn.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),zn=new RegExp("^"+Wn.source+Jn.source+"*(?::"+Wn.source+Jn.source+"*)?$");function Qn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Qn)}function Zn(){}function eo(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function to(e,t,r,n,o,i){function s(e,t,n){e in r.attributeNames&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t,n)}for(var a,c=++t,u=0;;){var l=e.charAt(c);switch(l){case"=":if(1===u)a=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),a=e.slice(t,c)),t=c+1,!((c=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t),i.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,c)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===u&&(p=a),4==u?(i.warning('attribute "'+p+'" missed quot(")!'),s(a,p.replace(/&#?\w+;/g,o),t)):(Xn.isHTML(n[""])&&p.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"€":l=" ";default:if(l<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:a=e.slice(t,c),u=2;break;case 4:var p=e.slice(t,c).replace(/&#?\w+;/g,o);i.warning('attribute "'+p+'" missed quot(")!!'),s(a,p,t);case 5:u=6}else switch(u){case 2:r.tagName,Xn.isHTML(n[""])&&a.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),s(a,a,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function ro(e,t,r){for(var n=e.tagName,o=null,i=e.length;i--;){var s=e[i],a=s.qName,c=s.value;if((d=a.indexOf(":"))>0)var u=s.prefix=a.slice(0,d),l=a.slice(d+1),p="xmlns"===u&&l;else l=a,u=null,p="xmlns"===a&&"";s.localName=l,!1!==p&&(null==o&&(o={},io(r,r={})),r[p]=o[p]=c,s.uri=Xn.XMLNS,t.startPrefixMapping(p,c))}for(i=e.length;i--;){(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri=Xn.XML),"xmlns"!==u&&(s.uri=r[u||""]))}var d;(d=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,d),l=e.localName=n.slice(d+1)):(u=null,l=e.localName=n);var f=e.uri=r[u||""];if(t.startElement(f,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(f,l,n),o)for(u in o)t.endPrefixMapping(u)}function no(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),s=e.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(o.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),o.characters(s,0,s.length),i)}return t+1}function oo(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function io(e,t){for(var r in e)t[r]=e[r]}function so(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,u=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[s-1];return r.startDTD(a,c,u),r.endDTD(),l.index+l[0].length}}return-1}function ao(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function co(){this.attributeNames={}}Qn.prototype=new Error,Qn.prototype.name=Qn.name,Zn.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),io(t,t={}),function(e,t,r,n,o){function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?i(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function a(t){if(t>v){var r=e.substring(v,t).replace(/&#?\w+;/g,s);d&&c(v),n.characters(r,0,t-v),v=t}}function c(t,r){for(;t>=l&&(r=p.exec(e));)u=r.index,l=u+r[0].length,d.lineNumber++;d.columnNumber=t-u+1}var u=0,l=0,p=/.*(?:\r\n?|\n)|.*$/g,d=n.locator,f=[{currentNSMap:t}],h={},v=0;for(;;){try{var m=e.indexOf("<",v);if(m<0){if(!e.substr(v).match(/^\s*$/)){var y=n.doc,g=y.createTextNode(e.substr(v));y.appendChild(g),n.currentElement=g}return}switch(m>v&&a(m),e.charAt(m+1)){case"/":var E=e.indexOf(">",m+3),b=e.substring(m+2,E).replace(/[ \t\n\r]+$/g,""),w=f.pop();E<0?(b=e.substring(m+2).replace(/[\s<].*/,""),o.error("end tag name: "+b+" is not complete:"+w.tagName),E=m+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),o.error("end tag name: "+b+" maybe not complete"),E=m+1+b.length);var N=w.localNSMap,T=w.tagName==b;if(T||w.tagName&&w.tagName.toLowerCase()==b.toLowerCase()){if(n.endElement(w.uri,w.localName,b),N)for(var _ in N)n.endPrefixMapping(_);T||o.fatalError("end tag name: "+b+" is not match the current start tagName:"+w.tagName)}else f.push(w);E++;break;case"?":d&&c(m),E=ao(e,m,n);break;case"!":d&&c(m),E=so(e,m,n,o);break;default:d&&c(m);var x=new co,O=f[f.length-1].currentNSMap,S=(E=to(e,m,x,O,s,o),x.length);if(!x.closed&&oo(e,E,x.tagName,h)&&(x.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),d&&S){for(var C=eo(d,{}),I=0;I<S;I++){var A=x[I];c(A.offset),A.locator=eo(d,{})}n.locator=C,ro(x,n,O)&&f.push(x),n.locator=d}else ro(x,n,O)&&f.push(x);Xn.isHTML(x.uri)&&!x.closed?E=no(e,E,x.tagName,s,n):E++}}catch(e){if(e instanceof Qn)throw e;o.error("element parse error: "+e),E=-1}E>v?v=E:a(Math.max(m,v)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},co.prototype={setTagName:function(e){if(!zn.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!zn.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Yn.XMLReader=Zn,Yn.ParseError=Qn;var uo={},lo=Bn.NAMESPACE;function po(e){return""!==e}function fo(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function ho(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(po):[]}(e);return Object.keys(t.reduce(fo,{}))}function vo(e,t){for(var r in e)t[r]=e[r]}function mo(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,vo(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var yo={},go=yo.ELEMENT_NODE=1,Eo=yo.ATTRIBUTE_NODE=2,bo=yo.TEXT_NODE=3,wo=yo.CDATA_SECTION_NODE=4,No=yo.ENTITY_REFERENCE_NODE=5,To=yo.ENTITY_NODE=6,_o=yo.PROCESSING_INSTRUCTION_NODE=7,xo=yo.COMMENT_NODE=8,Oo=yo.DOCUMENT_NODE=9,So=yo.DOCUMENT_TYPE_NODE=10,Co=yo.DOCUMENT_FRAGMENT_NODE=11,Io=yo.NOTATION_NODE=12,Ao={},Ro={};Ao.INDEX_SIZE_ERR=(Ro[1]="Index size error",1),Ao.DOMSTRING_SIZE_ERR=(Ro[2]="DOMString size error",2);var ko=Ao.HIERARCHY_REQUEST_ERR=(Ro[3]="Hierarchy request error",3);Ao.WRONG_DOCUMENT_ERR=(Ro[4]="Wrong document",4),Ao.INVALID_CHARACTER_ERR=(Ro[5]="Invalid character",5),Ao.NO_DATA_ALLOWED_ERR=(Ro[6]="No data allowed",6),Ao.NO_MODIFICATION_ALLOWED_ERR=(Ro[7]="No modification allowed",7);var Do=Ao.NOT_FOUND_ERR=(Ro[8]="Not found",8);Ao.NOT_SUPPORTED_ERR=(Ro[9]="Not supported",9);var Lo=Ao.INUSE_ATTRIBUTE_ERR=(Ro[10]="Attribute in use",10);function Po(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,Ro[e]),this.message=Ro[e],Error.captureStackTrace&&Error.captureStackTrace(this,Po);return r.code=e,t&&(this.message=this.message+": "+t),r}function Mo(){}function jo(e,t){this._node=e,this._refresh=t,Fo(this)}function Fo(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);yi(e,"length",r.length),vo(r,e),e._inc=t}}function Uo(){}function qo(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function Ho(e,t,r,n){if(n?t[qo(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&Xo(o,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===lo.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function Bo(e,t,r){var n=qo(t,r);if(!(n>=0))throw Po(Do,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(Xo(i,e,r),r.ownerElement=null)}}function $o(){}function Vo(){}function Go(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function Ko(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(Ko(e,t))return!0}while(e=e.nextSibling)}function Yo(){}function Xo(e,t,r,n){e&&e._inc++,r.namespaceURI===lo.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function Wo(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i}}}function Jo(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,Wo(e.ownerDocument,e),t}function zo(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Co){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return Wo(e.ownerDocument||e,e),t.nodeType==Co&&(t.firstChild=t.lastChild=null),t}function Qo(){this._nsMap={}}function Zo(){}function ei(){}function ti(){}function ri(){}function ni(){}function oi(){}function ii(){}function si(){}function ai(){}function ci(){}function ui(){}function li(){}function pi(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var s=[{namespace:i,prefix:null}];return hi(this,r,e,t,s),r.join("")}function di(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===lo.XML||o===lo.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==o}return!0}function fi(e,t,r){e.push(" ",t,'="',r.replace(/[<&"]/g,Go),'"')}function hi(e,t,r,n,o){if(o||(o=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case go:var i=e.attributes,s=i.length,a=e.firstChild,c=e.tagName,u=c;if(!(r=lo.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var l,p=0;p<i.length;p++)if("xmlns"===i.item(p).name){l=i.item(p).value;break}if(l!==e.namespaceURI)for(var d=o.length-1;d>=0;d--){var f=o[d];if(f.namespace===e.namespaceURI){f.prefix&&(u=f.prefix+":"+c);break}}}t.push("<",u);for(var h=0;h<s;h++){"xmlns"==(v=i.item(h)).prefix?o.push({prefix:v.localName,namespace:v.value}):"xmlns"==v.nodeName&&o.push({prefix:"",namespace:v.value})}for(h=0;h<s;h++){var v,m,y;if(di(v=i.item(h),0,o))fi(t,(m=v.prefix||"")?"xmlns:"+m:"xmlns",y=v.namespaceURI),o.push({prefix:m,namespace:y});hi(v,t,r,n,o)}if(c===u&&di(e,0,o))fi(t,(m=e.prefix||"")?"xmlns:"+m:"xmlns",y=e.namespaceURI),o.push({prefix:m,namespace:y});if(a||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;a;)a.data?t.push(a.data):hi(a,t,r,n,o.slice()),a=a.nextSibling;else for(;a;)hi(a,t,r,n,o.slice()),a=a.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Oo:case Co:for(a=e.firstChild;a;)hi(a,t,r,n,o.slice()),a=a.nextSibling;return;case Eo:return fi(t,e.name,e.value);case bo:return t.push(e.data.replace(/[<&]/g,Go).replace(/]]>/g,"]]&gt;"));case wo:return t.push("<![CDATA[",e.data,"]]>");case xo:return t.push("\x3c!--",e.data,"--\x3e");case So:var g=e.publicId,E=e.systemId;if(t.push("<!DOCTYPE ",e.name),g)t.push(" PUBLIC ",g),E&&"."!=E&&t.push(" ",E),t.push(">");else if(E&&"."!=E)t.push(" SYSTEM ",E,">");else{var b=e.internalSubset;b&&t.push(" [",b,"]"),t.push(">")}return;case _o:return t.push("<?",e.target," ",e.data,"?>");case No:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function vi(e,t,r){var n;switch(t.nodeType){case go:(n=t.cloneNode(!1)).ownerDocument=e;case Co:break;case Eo:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var o=t.firstChild;o;)n.appendChild(vi(e,o,r)),o=o.nextSibling;return n}function mi(e,t,r){var n=new t.constructor;for(var o in t){var i=t[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(t.childNodes&&(n.childNodes=new Mo),n.ownerDocument=e,n.nodeType){case go:var s=t.attributes,a=n.attributes=new Uo,c=s.length;a._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(mi(e,s.item(u),!0));break;case Eo:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild(mi(e,l,r)),l=l.nextSibling;return n}function yi(e,t,r){e[t]=r}Ao.INVALID_STATE_ERR=(Ro[11]="Invalid state",11),Ao.SYNTAX_ERR=(Ro[12]="Syntax error",12),Ao.INVALID_MODIFICATION_ERR=(Ro[13]="Invalid modification",13),Ao.NAMESPACE_ERR=(Ro[14]="Invalid namespace",14),Ao.INVALID_ACCESS_ERR=(Ro[15]="Invalid access",15),Po.prototype=Error.prototype,vo(Ao,Po),Mo.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)hi(this[n],r,e,t);return r.join("")}},jo.prototype.item=function(e){return Fo(this),this[e]},mo(jo,Mo),Uo.prototype={length:0,item:Mo.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new Po(Lo);var r=this.getNamedItem(e.nodeName);return Ho(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new Po(Lo);return t=this.getNamedItemNS(e.namespaceURI,e.localName),Ho(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return Bo(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return Bo(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},$o.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new Yo;if(n.implementation=this,n.childNodes=new Mo,n.doctype=r||null,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new oi;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},Vo.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return zo(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Jo(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return mi(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==bo&&e.nodeType==bo?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==Eo?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==Eo?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},vo(yo,Vo),vo(yo,Vo.prototype),Yo.prototype={nodeName:"#document",nodeType:Oo,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Co){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==go&&(this.documentElement=e),zo(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Jo(this,e)},importNode:function(e,t){return vi(this,e,t)},getElementById:function(e){var t=null;return Ko(this.documentElement,(function(r){if(r.nodeType==go&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=ho(e);return new jo(this,(function(r){var n=[];return t.length>0&&Ko(r.documentElement,(function(o){if(o!==r&&o.nodeType===go){var i=o.getAttribute("class");if(i){var s=e===i;if(!s){var a=ho(i);s=t.every((c=a,function(e){return c&&-1!==c.indexOf(e)}))}s&&n.push(o)}}var c})),n}))},createElement:function(e){var t=new Qo;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new Mo,(t.attributes=new Uo)._ownerElement=t,t},createDocumentFragment:function(){var e=new ci;return e.ownerDocument=this,e.childNodes=new Mo,e},createTextNode:function(e){var t=new ti;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ri;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ni;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new ui;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new Zo;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ai;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new Qo,n=t.split(":"),o=r.attributes=new Uo;return r.childNodes=new Mo,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new Zo,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},mo(Yo,Vo),Qo.prototype={nodeType:go,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Co?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,Wo(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new jo(this,(function(t){var r=[];return Ko(t,(function(n){n===t||n.nodeType!=go||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new jo(this,(function(r){var n=[];return Ko(r,(function(o){o===r||o.nodeType!==go||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},Yo.prototype.getElementsByTagName=Qo.prototype.getElementsByTagName,Yo.prototype.getElementsByTagNameNS=Qo.prototype.getElementsByTagNameNS,mo(Qo,Vo),Zo.prototype.nodeType=Eo,mo(Zo,Vo),ei.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(Ro[ko])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},mo(ei,Vo),ti.prototype={nodeName:"#text",nodeType:bo,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},mo(ti,ei),ri.prototype={nodeName:"#comment",nodeType:xo},mo(ri,ei),ni.prototype={nodeName:"#cdata-section",nodeType:wo},mo(ni,ei),oi.prototype.nodeType=So,mo(oi,Vo),ii.prototype.nodeType=Io,mo(ii,Vo),si.prototype.nodeType=To,mo(si,Vo),ai.prototype.nodeType=No,mo(ai,Vo),ci.prototype.nodeName="#document-fragment",ci.prototype.nodeType=Co,mo(ci,Vo),ui.prototype.nodeType=_o,mo(ui,Vo),li.prototype.serializeToString=function(e,t,r){return pi.call(e,t,r)},Vo.prototype.toString=pi;try{if(Object.defineProperty){function gi(e){switch(e.nodeType){case go:case Co:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(gi(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(jo.prototype,"length",{get:function(){return Fo(this),this.$$length}}),Object.defineProperty(Vo.prototype,"textContent",{get:function(){return gi(this)},set:function(e){switch(this.nodeType){case go:case Co:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),yi=function(e,t,r){e["$$"+t]=r}}}catch(e){}uo.DocumentType=oi,uo.DOMException=Po,uo.DOMImplementation=$o,uo.Element=Qo,uo.Node=Vo,uo.NodeList=Mo,uo.XMLSerializer=li;var Ei=Kn,bi=Bn.NAMESPACE;function wi(e){this.options=e||{locator:{}}}function Ni(){this.cdata=!1}function Ti(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function _i(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function xi(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function Oi(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wi.prototype.parseFromString=function(e,t){var r=this.options,n=new Ci,o=r.domBuilder||new Ni,i=r.errorHandler,s=r.locator,a=r.xmlns||{},c=/\/x?html?$/.test(t),u=c?Ei.HTML_ENTITIES:Ei.XML_ENTITIES;return s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof Ni)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+_i(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,c&&(a[""]=bi.HTML),a.xml=a.xml||bi.XML,e&&"string"==typeof e?n.parse(e,a,u):n.errorHandler.error("invalid doc source"),o.doc},Ni.prototype={startDocument:function(){this.doc=(new Ai).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;Oi(this,i),this.currentElement=i,this.locator&&Ti(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var c=n.getValue(a),u=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&Ti(n.getLocator(a),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&Ti(this.locator,r),Oi(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=xi.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&Ti(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=xi.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&Ti(this.locator,n),Oi(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&Ti(this.locator,o),Oi(this,o)}},warning:function(e){console.warn("[xmldom warning]\t"+e,_i(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,_i(this.locator))},fatalError:function(e){throw new Ii(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){Ni.prototype[e]=function(){return null}}));var Si=Yn,Ci=Si.XMLReader,Ii=Si.ParseError,Ai=Hn.DOMImplementation=uo.DOMImplementation;Hn.XMLSerializer=uo.XMLSerializer,Hn.DOMParser=wi,Hn.__DOMHandler=Ni;var Ri={};Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.parseJson=void 0,Ri.parseJson=function(e){try{return JSON.parse(e)}catch(e){return null}};var ki={};Object.defineProperty(ki,"__esModule",{value:!0}),ki.bufferFrom=void 0,ki.bufferFrom=function(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r};var Di={},Li={};Object.defineProperty(Li,"__esModule",{value:!0}),Li.EventPolyfill=void 0;var Pi=function(){function e(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,this.type="",this.srcElement=null,this.currentTarget=null,this.eventPhase=0,this.isTrusted=!0,this.composed=!1,this.cancelable=!0,this.defaultPrevented=!1,this.bubbles=!0,this.lengthComputable=!0,this.loaded=0,this.total=0,this.cancelBubble=!1,this.returnValue=!0,this.type=e,this.target=(null==t?void 0:t.target)||null,this.currentTarget=(null==t?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}return e.prototype.composedPath=function(){return[]},e.prototype.initEvent=function(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r},e.prototype.preventDefault=function(){this.defaultPrevented=!0},e.prototype.stopPropagation=function(){},e.prototype.stopImmediatePropagation=function(){},e}();Li.EventPolyfill=Pi;var Mi={},ji=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.ProgressEventPolyfill=void 0;var Fi=function(e){function t(t,r){var n=e.call(this,t)||this;return n.lengthComputable=(null==r?void 0:r.lengthComputable)||!1,n.composed=(null==r?void 0:r.composed)||!1,n.loaded=(null==r?void 0:r.loaded)||0,n.total=(null==r?void 0:r.total)||0,n}return ji(t,e),t}(Li.EventPolyfill);Mi.ProgressEventPolyfill=Fi,Object.defineProperty(Di,"__esModule",{value:!0}),Di.createEvent=void 0;var Ui=Li,qi=Mi,Hi="undefined"!=typeof ProgressEvent;Di.createEvent=function(e,t,r){var n=Hi?ProgressEvent:qi.ProgressEventPolyfill;return["error","progress","loadstart","loadend","load","timeout","abort"].includes(t)?new n(t,{lengthComputable:!0,loaded:(null==r?void 0:r.loaded)||0,total:(null==r?void 0:r.total)||0}):new Ui.EventPolyfill(t,{target:e,currentTarget:e})};var Bi=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},$i=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Vi=n&&n.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Gi=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(qn,"__esModule",{value:!0}),qn.createXMLHttpRequestOverride=void 0;var Ki=Ae,Yi=o,Xi=Hn,Wi=Ri,Ji=sn,zi=En,Qi=ki,Zi=Di,es=bn.exports;qn.createXMLHttpRequestOverride=function(e){var t,r=e.pureXMLHttpRequest,n=e.observer,o=e.resolver,i=es("XHR");return(t=function(){function e(){this._events=[],this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.onreadystatechange=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.url="",this.method="GET",this.readyState=this.UNSENT,this.withCredentials=!1,this.status=200,this.statusText="OK",this.data="",this.response="",this.responseType="text",this.responseText="",this.responseXML=null,this.responseURL="",this.upload=null,this.timeout=0,this._requestHeaders=new Yi.Headers,this._responseHeaders=new Yi.Headers}return e.prototype.setReadyState=function(e){e!==this.readyState&&(i("readyState change %d -> %d",this.readyState,e),this.readyState=e,e!==this.UNSENT&&(i("triggerring readystate change..."),this.trigger("readystatechange")))},e.prototype.trigger=function(e,t){var r,n;i('trigger "%s" (%d)',e,this.readyState),i('resolve listener for event "%s"',e);var o=this["on"+e];null==o||o.call(this,Zi.createEvent(this,e,t));try{for(var s=Vi(this._events),a=s.next();!a.done;a=s.next()){var c=a.value;c.name===e&&(i('calling mock event listener "%s" (%d)',e,this.readyState),c.listener.call(this,Zi.createEvent(this,e,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this},e.prototype.reset=function(){i("reset"),this.setReadyState(this.UNSENT),this.status=200,this.statusText="OK",this.data="",this.response=null,this.responseText=null,this.responseXML=null,this._requestHeaders=new Yi.Headers,this._responseHeaders=new Yi.Headers},e.prototype.open=function(e,t,r,n,o){return void 0===r&&(r=!0),Bi(this,void 0,void 0,(function(){return $i(this,(function(s){return(i=es("XHR "+e+" "+t))("open",{method:e,url:t,async:r,user:n,password:o}),this.reset(),this.setReadyState(this.OPENED),void 0===t?(this.url=e,this.method="GET"):(this.url=t,this.method=e,this.async=r,this.user=n,this.password=o),[2]}))}))},e.prototype.send=function(e){var t,s=this;i("send %s %s",this.method,this.url),this.data=e||"";try{t=new URL(this.url)}catch(e){t=new URL(this.url,window.location.href)}i("request headers",this._requestHeaders);var a={id:zi.uuidv4(),url:t,method:this.method,body:this.data,headers:this._requestHeaders};n.emit("request",a),i("awaiting mocked response..."),Promise.resolve(Ki.until((function(){return Bi(s,void 0,void 0,(function(){return $i(this,(function(e){return[2,o(a,this)]}))}))}))).then((function(e){var t,o=Gi(e,2),c=o[0],u=o[1];if(c)return i("middleware function threw an exception!",c),s.trigger("error"),void s.abort();if(u){if(i("received mocked response",u),s.trigger("loadstart"),s.status=u.status||200,s.statusText=u.statusText||"OK",s._responseHeaders=u.headers?Yi.objectToHeaders(u.headers):new Yi.Headers,i("set response status",s.status,s.statusText),i("set response headers",s._responseHeaders),s.setReadyState(s.HEADERS_RECEIVED),i("response type",s.responseType),s.response=s.getResponseBody(u.body),s.responseText=u.body||"",s.responseXML=s.getResponseXML(),i("set response body",s.response),u.body&&s.response){s.setReadyState(s.LOADING);var l=Qi.bufferFrom(u.body);s.trigger("progress",{loaded:l.length,total:l.length})}s.setReadyState(s.DONE),s.trigger("load"),s.trigger("loadend"),n.emit("response",a,Ji.toIsoResponse(u))}else{i("no mocked response received!");var p=new r;i("opening an original request %s %s",s.method,s.url),p.open(s.method,s.url,null===(t=s.async)||void 0===t||t,s.user,s.password),p.addEventListener("load",(function(){i('original "onload"'),s.status=p.status,s.statusText=p.statusText,s.responseURL=p.responseURL,s.responseType=p.responseType,s.response=p.response,s.responseText=p.responseText,s.responseXML=p.responseXML,i("set mock request readyState to DONE"),s.setReadyState(s.DONE),i("received original response",s.status,s.statusText),i("original response body:",s.response);var e=p.getAllResponseHeaders();i("original response headers:\n",e),s._responseHeaders=Yi.stringToHeaders(e),i("original response headers (normalized)",s._responseHeaders),i("original response finished"),n.emit("response",a,{status:p.status,statusText:p.statusText,headers:s._responseHeaders,body:p.response})})),s.propagateCallbacks(p),s.propagateListeners(p),s.propagateHeaders(p,s._requestHeaders),s.async&&(p.timeout=s.timeout),i("send",s.data),p.send(s.data)}}))},e.prototype.abort=function(){i("abort"),this.readyState>this.UNSENT&&this.readyState<this.DONE&&(this.setReadyState(this.UNSENT),this.trigger("abort"))},e.prototype.dispatchEvent=function(){return!1},e.prototype.setRequestHeader=function(e,t){i('set request header "%s" to "%s"',e,t),this._requestHeaders.append(e,t)},e.prototype.getResponseHeader=function(e){if(i('get response header "%s"',e),this.readyState<this.HEADERS_RECEIVED)return i("cannot return a header: headers not received (state: %s)",this.readyState),null;var t=this._responseHeaders.get(e);return i('resolved response header "%s" to "%s"',e,t,this._responseHeaders),t},e.prototype.getAllResponseHeaders=function(){return i("get all response headers"),this.readyState<this.HEADERS_RECEIVED?(i("cannot return headers: headers not received (state: %s)",this.readyState),""):Yi.headersToString(this._responseHeaders)},e.prototype.addEventListener=function(e,t){i("addEventListener",e,t),this._events.push({name:e,listener:t})},e.prototype.removeEventListener=function(e,t){i("removeEventListener",e,t),this._events=this._events.filter((function(r){return r.name!==e&&r.listener!==t}))},e.prototype.overrideMimeType=function(){},e.prototype.getResponseBody=function(e){var t=null!=e?e:"";switch(i("coerced response body to",t),this.responseType){case"json":return i("resolving response body as JSON"),Wi.parseJson(t);case"blob":var r=this.getResponseHeader("content-type")||"text/plain";return i("resolving response body as Blob",{type:r}),new Blob([t],{type:r});case"arraybuffer":return i("resolving response body as ArrayBuffer"),Qi.bufferFrom(t);default:return t}},e.prototype.getResponseXML=function(){var e=this.getResponseHeader("Content-Type");return"application/xml"===e||"text/xml"===e?(new Xi.DOMParser).parseFromString(this.responseText,e):null},e.prototype.propagateCallbacks=function(e){e.onabort=this.abort,e.onerror=this.onerror,e.ontimeout=this.ontimeout,e.onload=this.onload,e.onloadstart=this.onloadstart,e.onloadend=this.onloadend,e.onprogress=this.onprogress,e.onreadystatechange=this.onreadystatechange},e.prototype.propagateListeners=function(e){i("propagating request listeners (%d) to the original request",this._events.length,this._events),this._events.forEach((function(t){var r=t.name,n=t.listener;e.addEventListener(r,n)}))},e.prototype.propagateHeaders=function(e,t){i("propagating request headers to the original request",t),Object.entries(t.raw()).forEach((function(t){var r=Gi(t,2),n=r[0],o=r[1];i('setting "%s" (%s) header on the original request',n,o),e.setRequestHeader(n,o)}))},e}()).UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,t},Object.defineProperty(Un,"__esModule",{value:!0});var ts=Un.interceptXMLHttpRequest=void 0,rs=qn,ns=bn.exports("XHR"),os="undefined"==typeof window?void 0:window.XMLHttpRequest;function is(e){const t={id:e.id,url:e.url,method:e.method,body:it(e.body,e.headers),headers:e.headers,cookies:{},redirect:"manual",referrer:"",keepalive:!1,cache:"default",mode:"cors",referrerPolicy:"no-referrer",integrity:"",destination:"document",bodyUsed:!1,credentials:"same-origin"},r=e.headers.get("cookie");nt(t);const n=r?P(r):{};return t.cookies=Object.assign(Object.assign({},t.cookies),n),t}function ss(e){return function(t){return Ie(this,void 0,void 0,(function*(){e.fallbackInterceptor=function(e,t){const r=Kr.createInterceptor({modules:[Dn,ts],resolver(r){return Ie(this,void 0,void 0,(function*(){return qr(is(r),e.requestHandlers,t,e.emitter,{transformResponse:e=>({status:e.status,statusText:e.statusText,headers:e.headers.all(),body:e.body}),onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}))}});return r.apply(),r}(e,t),Ye({message:"Mocking enabled (fallback mode).",quiet:t.quiet})}))}}ts=Un.interceptXMLHttpRequest=function(e,t){if(os){ns('patching "XMLHttpRequest" module...');var r=rs.createXMLHttpRequestOverride({pureXMLHttpRequest:os,observer:e,resolver:t});window.XMLHttpRequest=r}return function(){os&&(ns("restoring modules..."),window.XMLHttpRequest=os)}};let as=[];function cs(e){return(t,r)=>new Pr(e,t,r)}const us={all:cs(/.+/),head:cs(e.RESTMethods.HEAD),get:cs(e.RESTMethods.GET),post:cs(e.RESTMethods.POST),put:cs(e.RESTMethods.PUT),delete:cs(e.RESTMethods.DELETE),patch:cs(e.RESTMethods.PATCH),options:cs(e.RESTMethods.OPTIONS)};function ls(e,t){return(r,n)=>new Fr(e,r,t,n)}function ps(e){return t=>new Fr("all",new RegExp(".*"),e,t)}const ds={operation:ps("*"),query:ls("query","*"),mutation:ls("mutation","*")};const fs=Object.assign(Object.assign({},ds),{link:function(e){return{operation:ps(e),query:ls("query",e),mutation:ls("mutation",e)}}});return e.GraphQLHandler=Fr,e.RequestHandler=kr,e.RestHandler=Pr,e.cleanUrl=Nr,e.compose=xr,e.context=ae,e.createResponseComposition=Cr,e.defaultContext=Rr,e.defaultResponse=Or,e.graphql=fs,e.graphqlContext=jr,e.handleRequest=qr,e.matchRequestUrl=_r,e.parseIsomorphicRequest=is,e.response=Ir,e.rest=us,e.restContext=Lr,e.setupWorker=function(...e){if(e.forEach((e=>{if(Array.isArray(e))throw new Error(Ge.formatMessage('Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).'))})),J.exports.isNodeProcess())throw new Error(Ge.formatMessage("Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead."));const t=new ce.StrictEventEmitter,r=new ce.StrictEventEmitter;!function(e,t){const r=e.emit;r._isPiped||(e.emit=function(e,...n){return t.emit(e,...n),r.call(this,e,...n)},e.emit._isPiped=!0)}(t,r);const n={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:t,workerChannel:{on(e,t){n.events.addListener(navigator.serviceWorker,"message",(r=>{if(r.source!==n.worker)return;const o=V(r.data);o&&o.type===e&&t(r,o)}))},send(e){var t;null===(t=n.worker)||void 0===t||t.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),as.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of as)e.removeEventListener(t,r);as=[]},once(e){const t=[];return new Promise(((r,o)=>{t.push(n.events.addListener(navigator.serviceWorker,"message",(t=>{try{const n=JSON.parse(t.data);n.type===e&&r(n)}catch(e){o(e)}})),n.events.addListener(navigator.serviceWorker,"messageerror",o))})).finally((()=>{t.forEach((e=>e()))}))}},useFallbackMode:!("serviceWorker"in navigator)||"file:"===location.protocol},o=n.useFallbackMode?ss(n):Br(n),i=n.useFallbackMode?function(e){return function(){var t,r;null===(t=e.fallbackInterceptor)||void 0===t||t.restore(),$r({quiet:null===(r=e.startOptions)||void 0===r?void 0:r.quiet})}}(n):(e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),window.clearInterval(e.keepAliveInterval),$r({quiet:null===(t=e.startOptions)||void 0===t?void 0:t.quiet})})(n);return{start:Gr(o,n),stop(){n.events.removeAllListeners(),n.emitter.removeAllListeners(),r.removeAllListeners(),i()},use(...e){!function(e,...t){e.unshift(...t)}(n.requestHandlers,...e)},restoreHandlers(){n.requestHandlers.forEach((e=>{e.markAsSkipped(!1)}))},resetHandlers(...t){n.requestHandlers=function(e,...t){return t.length>0?[...t]:[...e]}(e,...t)},printHandlers(){n.requestHandlers.forEach((e=>{const{header:t,callFrame:r}=e.info,n=e.info.hasOwnProperty("operationType")?"[graphql]":"[rest]";console.groupCollapsed(`${n} ${t}`),r&&console.log(`Declaration: ${r}`),console.log("Handler:",e),e instanceof Pr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.path}`),console.groupEnd()}))},events:{on:(...e)=>r.on(...e),removeListener:(...e)=>r.removeListener(...e),removeAllListeners:(...e)=>r.removeAllListeners(...e)}}},e}({});
22
+ function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["operations","map"]),i=V(r)||{};if(!i.query)return null;const s=V(n||"")||{},a=i.variables?function(e,t,r){const n={variables:e};for(const[e,o]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of o){const[o,...i]=t.split(".").reverse(),s=i.reverse();let a=n;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[o]=r[e]}}return n.variables}(i.variables,s,o):{};return{query:i.query,variables:a}}default:return null}}function ar(e){const t=sr(e);if(!t||!t.query)return;const{query:r,variables:n}=t,o=ir(r);if(o instanceof Error){const t=nr(e);throw new Error(Ge.formatMessage('Failed to intercept a GraphQL request to "%s %s": cannot parse query. See the error message from the parser below.\n\n%s',e.method,t,o.message))}return{operationType:o.operationType,operationName:o.operationName,variables:n}}var cr;function ur(e){return e<300?cr.Success:e<400?cr.Warning:cr.Danger}function lr(){const e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].map(String).map((e=>e.slice(0,2))).map((e=>e.padStart(2,"0"))).join(":")}function pr(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function dr(e){const t=o.objectToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:it(e.body,t)})}function fr(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[a=r+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+r);if(!i)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:i}),r=a}else{for(var s="",a=r+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:s}),r=a}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,i="[^"+vr(t.delimiter||"/#?")+"]+?",s=[],a=0,c=0,u="",l=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=l(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=l("CHAR")||l("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=l("CHAR"),h=l("NAME"),v=l("PATTERN");if(h||v){var m=f||"";-1===o.indexOf(m)&&(u+=m,m=""),u&&(s.push(u),u=""),s.push({name:h||a++,prefix:m,suffix:"",pattern:v||i,modifier:l("MODIFIER")||""})}else{var y=f||l("ESCAPED_CHAR");if(y)u+=y;else if(u&&(s.push(u),u=""),l("OPEN")){m=d();var g=l("NAME")||"",E=l("PATTERN")||"",b=d();p("CLOSE"),s.push({name:g||(E?a++:""),pattern:g&&!E?i:E,prefix:m,suffix:b,modifier:l("MODIFIER")||""})}else p("END")}}return s}function hr(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],s=n.index,a=Object.create(null),c=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?a[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):a[r.name]=o(n[e],r)},u=1;u<n.length;u++)c(u);return{path:i,index:s,params:a}}}(gr(e,r,t),r,t)}function vr(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function mr(e){return e&&e.sensitive?"":"i"}function yr(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,i=r.start,s=void 0===i||i,a=r.end,c=void 0===a||a,u=r.encode,l=void 0===u?function(e){return e}:u,p="["+vr(r.endsWith||"")+"]|$",d="["+vr(r.delimiter||"/#?")+"]",f=s?"^":"",h=0,v=e;h<v.length;h++){var m=v[h];if("string"==typeof m)f+=vr(l(m));else{var y=vr(l(m.prefix)),g=vr(l(m.suffix));if(m.pattern)if(t&&t.push(m),y||g)if("+"===m.modifier||"*"===m.modifier){var E="*"===m.modifier?"?":"";f+="(?:"+y+"((?:"+m.pattern+")(?:"+g+y+"(?:"+m.pattern+"))*)"+g+")"+E}else f+="(?:"+y+"("+m.pattern+")"+g+")"+m.modifier;else f+="("+m.pattern+")"+m.modifier;else f+="(?:"+y+g+")"+m.modifier}}if(c)o||(f+=d+"?"),f+=r.endsWith?"(?="+p+")":"$";else{var b=e[e.length-1],w="string"==typeof b?d.indexOf(b[b.length-1])>-1:void 0===b;o||(f+="(?:"+d+"(?="+p+"))?"),w||(f+="(?="+d+"|"+p+")")}return new RegExp(f,mr(r))}(fr(e,r),t,r)}function gr(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return gr(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",mr(r))}(e,t,r):yr(e,t,r)}!function(e){e.Success="#69AB32",e.Warning="#F0BB4B",e.Danger="#E95F5D"}(cr||(cr={}));var Er={};Object.defineProperty(Er,"__esModule",{value:!0});var br=Er.getCleanUrl=void 0;br=Er.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")};const wr=/[\?|#].*$/g;function Nr(e){return e.replace(wr,"")}function Tr(e,t){if(e instanceof RegExp)return e;return Nr(function(e,t){if(/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e))return e;if(e.startsWith("*"))return e;const r=t||"undefined"!=typeof document&&document.baseURI;return r?decodeURI(new URL(encodeURI(e),r).href):e}(e,t))}function _r(e,t,r){const n=Tr(t,r),o="string"==typeof n?function(e){return e.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,((e,t,r)=>{const n="(.*)";return t?t.startsWith(":")?`${t}${r}`:`${t}(.*)`:n})).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}(n):n,i=br(e),s=hr(o,{decode:decodeURIComponent})(i);return{matches:!1!==s,params:s&&s.params||{}}}function xr(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}const Or={status:200,statusText:"OK",body:null,delay:0,once:!1},Sr=[];function Cr(e,t=Sr){return(...r)=>Ie(this,void 0,void 0,(function*(){const n=Object.assign({},Or,{headers:new o.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?xr(...i)(n):n}))}const Ir=Object.assign(Cr(),{once:Cr({once:!0}),networkError(e){throw new We(e)}}),Ar=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/;const Rr={status:r,set:L,delay:Z,fetch:ne};class kr{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||Rr,this.resolver=e.resolver;const t=function(e){const t=e.stack;if(!t)return;const r=t.split("\n").slice(1).find((e=>!Ar.test(e)));if(!r)return;return r.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,"")}(new Error);this.info=Object.assign(Object.assign({},e.info),{callFrame:t})}parse(e,t){return null}test(e,t){return this.predicate(e,this.parse(e,t),t)}getPublicRequest(e,t){return e}markAsSkipped(e=!0){this.shouldSkip=e}run(e,t){return Ie(this,void 0,void 0,(function*(){if(this.shouldSkip)return null;const r=this.parse(e,t);if(!this.predicate(e,r,t))return null;const n=this.getPublicRequest(e,r),o=this.wrapResolver(this.resolver),i=yield o(n,Ir,this.ctx);return this.createExecutionResult(r,n,i)}))}wrapResolver(e){return(t,r,n)=>Ie(this,void 0,void 0,(function*(){const o=this.resolverGenerator||(yield e(t,r,n));if((i=o)&&"function"==typeof i[Symbol.iterator]){const{value:e,done:t}=o[Symbol.iterator]().next(),r=yield e;return!r&&t?this.resolverGeneratorResult:(this.resolverGenerator||(this.resolverGenerator=o),this.resolverGeneratorResult=r,r)}var i;return o}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}var Dr;e.RESTMethods=void 0,(Dr=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",Dr.GET="GET",Dr.POST="POST",Dr.PUT="PUT",Dr.PATCH="PATCH",Dr.OPTIONS="OPTIONS",Dr.DELETE="DELETE";const Lr={set:L,status:r,cookie:B,body:$,text:oe,json:X,xml:ie,delay:Z,fetch:ne};class Pr extends kr{constructor(e,t,r){super({info:{header:`${e} ${t}`,path:t,method:e},ctx:Lr,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:t}=this.info;if(t instanceof RegExp)return;if(Nr(t)===t)return;(function(e){return new URL(`/${e}`,"http://localhost").searchParams})(t).forEach(((e,t)=>{})),Ge.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${t}". Please match against a path instead and access query parameters in the response resolver function using "req.url.searchParams".`)}parse(e,t){return _r(e.url,this.info.path,null==t?void 0:t.baseUrl)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return(this.info.method instanceof RegExp?this.info.method.test(e.method):st(this.info.method,e.method))&&t.matches}log(e,t){const r=nr(e),n=pr(e),o=dr(t),i=ur(t.status);console.groupCollapsed(Ge.formatMessage("%s %s %s (%c%s%c)"),lr(),e.method,r,`color:${i}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.path,resolver:this.resolver}),console.log("Response",o),console.groupEnd()}}function Mr(e,t){try{return e()}catch(e){null==t||t(e)}}const jr={set:L,status:r,delay:Z,fetch:ne,data:W,extensions:Y,errors:ee,cookie:B};class Fr extends kr{constructor(e,t,r,n){let o=t;if(null!=(i=t)&&"object"==typeof i&&"kind"in i&&"definitions"in i){const r=or(t);if(r.operationType!==e)throw new Error(`Failed to create a GraphQL handler: provided a DocumentNode with a mismatched operation type (expected "${e}", but got "${r.operationType}").`);if(!r.operationName)throw new Error("Failed to create a GraphQL handler: provided a DocumentNode with no operation name.");o=r.operationName}var i;super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${o} (origin: ${r.toString()})`,operationType:e,operationName:o},ctx:jr,resolver:n}),this.endpoint=r}parse(e){return Mr((()=>ar(e)),(e=>console.error(e.message)))}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{variables:(null==t?void 0:t.variables)||{}})}predicate(e,t){if(!t)return!1;if(!t.operationName&&"all"!==this.info.operationType){const t=nr(e);return Ge.warn(`Failed to intercept a GraphQL request at "${e.method} ${t}": anonymous GraphQL operations are not supported.\n\nConsider naming this operation or using "graphql.operation" request handler to intercept GraphQL requests regardless of their operation name/type. Read more: https://mswjs.io/docs/api/graphql/operation `),!1}const r=_r(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,o=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName||""):t.operationName===this.info.operationName;return r.matches&&n&&o}log(e,t,r,n){const o=pr(e),i=dr(t),s=ur(t.status),a=(null==n?void 0:n.operationName)?`${null==n?void 0:n.operationType} ${null==n?void 0:n.operationName}`:`anonymous ${null==n?void 0:n.operationType}`;console.groupCollapsed(Ge.formatMessage("%s %s (%c%s%c)"),lr(),`${a}`,`color:${s}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request:",o),console.log("Handler:",this),console.log("Response:",i),console.groupEnd()}}function Ur(e,t,r="warn"){if("function"==typeof r)return void r(e);const n=Mr((()=>ar(e))),o=function(e){return e.reduce(((e,t)=>(t instanceof Pr&&e.rest.push(t),t instanceof Fr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),i=n?o.graphql:o.rest,s=function(e,t,r){return t.reduce(((t,n)=>{const o=r(e,n);return t.concat([[o,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,i,n?(a=n,(e,t)=>{if(void 0===a.operationName)return 1/0;const{operationType:r,operationName:n}=t.info;if("string"!=typeof n)return 1/0;const o=a.operationType===r?.5:0;return ct(a.operationName,n)-o}):(e,t)=>{const{path:r,method:n}=t.info;if(r instanceof RegExp||n instanceof RegExp)return 1/0;const o=st(e.method,n)?.5:0,i=nr(e);return ct(i,r)-o});var a;const c=s.length>0?function(e){return e.length>1?`Did you mean to request one of the following resources instead?\n\n${e.map((e=>` • ${e.info.header}`)).join("\n")}`:`Did you mean to request "${e[0].info.header}" instead?`}(s):"",u=nr(e),l=["captured a request without a matching request handler:",` • ${n?`${n.operationType} ${n.operationName} (${e.method} ${u})`:`${e.method} ${u}`}`,c,"If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks"].filter(Boolean).join("\n\n");switch(r){case"error":throw Ge.error("Error: %s",l),new Error(Ge.formatMessage('Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'));case"warn":Ge.warn("Warning: %s",l);break;case"bypass":break;default:throw new Error(Ge.formatMessage('Failed to react to an unhandled request: unknown strategy "%s". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function as the value of the "onUnhandledRequest" option.',r))}}function qr(e,t,r,n,o){var i,s,a;return Ie(this,void 0,void 0,(function*(){if(n.emit("request:start",e),e.headers.get("x-msw-bypass"))return n.emit("request:end",e),void(null===(i=null==o?void 0:o.onBypassResponse)||void 0===i||i.call(o,e));const c=yield((e,t,r)=>Ie(void 0,void 0,void 0,(function*(){const n=t.filter((t=>t.test(e,r)));if(0===n.length)return{handler:void 0,response:void 0};const o=yield n.reduce(((t,n)=>Ie(void 0,void 0,void 0,(function*(){const o=yield t;if(null==o?void 0:o.response)return t;const i=yield n.run(e,r);return null===i||i.handler.shouldSkip?null:i.response?(i.response.once&&n.markAsSkipped(!0),i):{request:i.request,handler:i.handler,response:void 0,parsedResult:i.parsedResult}}))),Promise.resolve(null));return o?{handler:o.handler,publicRequest:o.request,parsedRequest:o.parsedResult,response:o.response}:{handler:void 0,response:void 0}})))(e,t,null==o?void 0:o.resolutionContext),{handler:u,response:l}=c;return u?l?(function(e,t){Ye.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),Ye.store.persist()}(e,l),n.emit("request:match",e),new Promise((t=>{var r,i,s;const a=c,u=(null===(r=null==o?void 0:o.transformResponse)||void 0===r?void 0:r.call(o,l))||l;null===(i=null==o?void 0:o.onMockedResponse)||void 0===i||i.call(o,u,a),setTimeout((()=>{var r;null===(r=null==o?void 0:o.onMockedResponseSent)||void 0===r||r.call(o,u,a),n.emit("request:end",e),t(u)}),null!==(s=l.delay)&&void 0!==s?s:0)}))):(Ge.warn("Expected response resolver to return a mocked response Object, but got %s. The original response is going to be used instead.\n\n • %s\n %s",l,u.info.header,u.info.callFrame),n.emit("request:end",e),void(null===(a=null==o?void 0:o.onBypassResponse)||void 0===a||a.call(o,e))):(Ur(e,t,r.onUnhandledRequest),n.emit("request:unhandled",e),n.emit("request:end",e),void(null===(s=null==o?void 0:o.onBypassResponse)||void 0===s||s.call(o,e)))}))}const Hr=(e,t)=>(r,n)=>Ie(void 0,void 0,void 0,(function*(){const i=(e=>{const t=e.ports[0];return{send(e){t&&t.postMessage(e)}}})(r);try{const r=function(e){const t={id:e.id,cache:e.cache,credentials:e.credentials,method:e.method,url:new URL(e.url),referrer:e.referrer,referrerPolicy:e.referrerPolicy,redirect:e.redirect,mode:e.mode,params:{},cookies:{},integrity:e.integrity,keepalive:e.keepalive,destination:e.destination,body:at(e),bodyUsed:e.bodyUsed,headers:new o.Headers(e.headers)};return nt(t),t.body=it(t.body,t.headers),t}(n.payload);yield qr(r,e.requestHandlers,t,e.emitter,{transformResponse:e=>Object.assign(Object.assign({},e),{headers:e.headers.all()}),onBypassResponse:()=>i.send({type:"MOCK_NOT_FOUND"}),onMockedResponse(e){i.send({type:"MOCK_SUCCESS",payload:e})},onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}catch(e){if(e instanceof We)return i.send({type:"NETWORK_ERROR",payload:{name:e.name,message:e.message}});i.send({type:"INTERNAL_ERROR",payload:{status:500,body:JSON.stringify({errorType:e.constructor.name,message:e.message,location:e.stack})}})}}));const Br=e=>function(t,r){const n=(()=>Ie(this,void 0,void 0,(function*(){e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Hr(e,t)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:o}=r;if(null===(n=o.type)||void 0===n?void 0:n.includes("opaque"))return;const i=new Response(o.body||null,o);"msw"===i.headers.get("x-powered-by")?e.emitter.emit("response:mocked",i,o.requestId):e.emitter.emit("response:bypass",i,o.requestId)}}(e));const n=yield Ke(t.serviceWorker.url,t.serviceWorker.options,t.findWorker),[o,i]=n;if(!o){const e=(null==r?void 0:r.findWorker)?Ge.formatMessage('Failed to locate the Service Worker registration using a custom "findWorker" predicate.\n\nPlease ensure that the custom predicate properly locates the Service Worker registration at "%s".\nMore details: https://mswjs.io/docs/api/setup-worker/start#findworker\n',t.serviceWorker.url):Ge.formatMessage('Failed to locate the Service Worker registration.\n\nThis most likely means that the worker script URL "%s" cannot resolve against the actual public hostname (%s). This may happen if your application runs behind a proxy, or has a dynamic hostname.\n\nPlease consider using a custom "serviceWorker.url" option to point to the actual worker script location, or a custom "findWorker" option to resolve the Service Worker registration manually. More details: https://mswjs.io/docs/api/setup-worker/start',t.serviceWorker.url,location.host);throw new Error(e)}e.worker=o,e.registration=i,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==o.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield De((()=>function(e,t){return Ie(this,void 0,void 0,(function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:r}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if("02f4ad4a2797f85668baf196e553d929"!==r)throw new Error(`Currently active Service Worker (${r}) is behind the latest published one (02f4ad4a2797f85668baf196e553d929).`);return t}))}(e,o)));return s&&Ge.error(`Detected outdated Service Worker: ${s.message}\n\nThe mocking is still enabled, but it's highly recommended that you update your Service Worker by running:\n\n$ npx msw init <PUBLIC_DIR>\n\nThis is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability.\nIf this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues `),yield function(e,t){return Ie(this,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{Xe({quiet:t.quiet})}))}))}(e,t).catch((e=>{throw new Error(`Failed to enable mocking: ${null==e?void 0:e.message}`)})),e.keepAliveInterval=window.setInterval((()=>e.workerChannel.send("KEEPALIVE_REQUEST")),5e3),function(e,t){(null==t?void 0:t.quiet)||location.href.startsWith(e.scope)||Ge.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.\n\n- (Recommended) Register the worker at the root level ("/") of your application.\n- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}(i,e.startOptions),i})))();return t.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...r){De((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...r)}))};const r=window.fetch;window.fetch=(...t)=>Ie(this,void 0,void 0,(function*(){return yield De((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n};function $r(e={}){e.quiet||console.log(`%c${Ge.formatMessage("Mocking disabled.")}`,"color:orangered;font-weight:bold;")}const Vr={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker:(e,t)=>e===t};function Gr(e,t){return r=>(t.startOptions=function(e){return K(Vr,e||{})}(r),e(t.startOptions,r||{}))}var Kr={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.createInterceptor=void 0;var Wr=ce;Xr.createInterceptor=function(e){var t=new Wr.StrictEventEmitter,r=[];return{apply:function(){r=e.modules.map((function(r){return r(t,e.resolver)}))},on:function(e,r){t.addListener(e,r)},restore:function(){if(t.removeAllListeners(),0===r.length)throw new Error('Failed to restore patched modules: no patches found. Did you forget to run ".apply()"?');r.forEach((function(e){return e()}))}}};var Yr={},Jr={},zr={},Qr={};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.format=void 0;var Zr=/(%?)(%([sdjo]))/g;function en(e,t){switch(t){case"s":return e;case"d":case"i":return Number(e);case"j":return JSON.stringify(e);case"o":if("string"==typeof e)return e;var r=JSON.stringify(e);return"{}"===r||"[]"===r||/^\[object .+?\]$/.test(r)?e:r}}Qr.format=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(0===t.length)return e;var n=0,o=e.replace(Zr,(function(e,r,o,i){var s=en(t[n],i);return r?e:(n++,s)}));return n<t.length&&(o+=" "+t.slice(n).join(" ")),o=o.replace(/%{2,2}/g,"%")};var tn=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rn=n&&n.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(zr,"__esModule",{value:!0}),zr.invariant=zr.InvariantError=void 0;var nn=Qr,on=function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=e.call(this,t)||this;if(o.name="Invariant Violation",o.message=nn.format.apply(void 0,rn([t],r)),o.stack){var i=o.stack;o.stack=i.split("\n").slice(2).join("\n")}return o}return tn(t,e),t}(Error);zr.InvariantError=on,zr.invariant=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!e)throw new(on.bind.apply(on,rn([void 0,t],r)))},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(zr,e),r(Qr,e)}(Jr);var sn={};Object.defineProperty(sn,"__esModule",{value:!0}),sn.toIsoResponse=void 0;var an=o;sn.toIsoResponse=function(e){return{status:e.status||200,statusText:e.statusText||"OK",headers:an.objectToHeaders(e.headers||{}),body:e.body}};var cn=n&&n.__assign||function(){return(cn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},un=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ln=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},pn=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.createRemoteResolver=Yr.createRemoteInterceptor=void 0;var dn=o,fn=Jr,hn=ce,vn=Xr,mn=sn;function yn(e,t){switch(e){case"url":return new URL(t);case"headers":return new dn.Headers(t);default:return t}}Yr.createRemoteInterceptor=function(e){if(fn.invariant(process.connected,"Failed to create a remote interceptor: the current process (%s) does not have a parent. Please make sure you're spawning this process as a child process in order to use remote request interception.",process.pid),void 0===process.send)throw new Error("Failed to create a remote interceptor: the current process ("+process.pid+") does not have the IPC enabled. Please make sure you're spawning this process with the \"ipc\" stdio value set:\n\nspawn('node', ['module.js'], { stdio: ['ipc'] })");var t,r=vn.createInterceptor(cn(cn({},e),{resolver:function(e){var r,n=JSON.stringify(e);return null===(r=process.send)||void 0===r||r.call(process,"request:"+n),new Promise((function(r){t=function(t){if("string"==typeof t&&t.startsWith("response:"+e.id)){var n=pn(t.match(/^response:.+?:(.+)$/)||[],2)[1];if(!n)return r();var o=JSON.parse(n);return r(o)}},process.addListener("message",t)}))}}));return cn(cn({},r),{restore:function(){r.restore(),process.removeListener("message",t)}})},Yr.createRemoteResolver=function(e){var t=this,r=new hn.StrictEventEmitter,n=function(n){return un(t,void 0,void 0,(function(){var t,o,i,s,a;return ln(this,(function(c){switch(c.label){case 0:return"string"!=typeof n?[2]:n.startsWith("request:")?(t=pn(n.match(/^request:(.+)$/)||[],2),(o=t[1])?(i=JSON.parse(o,yn),r.emit("request",i),[4,e.resolver(i,void 0)]):[2]):[3,2];case 1:s=c.sent(),a=JSON.stringify(s),e.process.send("response:"+i.id+":"+a,(function(e){e||s&&r.emit("response",i,mn.toIsoResponse(s))})),c.label=2;case 2:return[2]}}))}))},o=function(){e.process.removeListener("message",n)};return e.process.addListener("message",n),e.process.addListener("disconnect",o),e.process.addListener("error",o),e.process.addListener("exit",o),{on:function(e,t){r.addListener(e,t)}}},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.getCleanUrl=void 0,r(Xr,e),r(Yr,e);var o=Er;Object.defineProperty(e,"getCleanUrl",{enumerable:!0,get:function(){return o.getCleanUrl}})}(Kr);var gn={},En={};Object.defineProperty(En,"__esModule",{value:!0}),En.uuidv4=void 0,En.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};var bn={exports:{}},wn=1e3,Nn=60*wn,Tn=60*Nn,_n=24*Tn,xn=7*_n,On=365.25*_n,Sn=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*On;case"weeks":case"week":case"w":return r*xn;case"days":case"day":case"d":return r*_n;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Tn;case"minutes":case"minute":case"mins":case"min":case"m":return r*Nn;case"seconds":case"second":case"secs":case"sec":case"s":return r*wn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=_n)return Cn(e,t,_n,"day");if(t>=Tn)return Cn(e,t,Tn,"hour");if(t>=Nn)return Cn(e,t,Nn,"minute");if(t>=wn)return Cn(e,t,wn,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=_n)return Math.round(e/_n)+"d";if(t>=Tn)return Math.round(e/Tn)+"h";if(t>=Nn)return Math.round(e/Nn)+"m";if(t>=wn)return Math.round(e/wn)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Cn(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var In=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=Sn,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=In(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(bn,bn.exports);var An=n&&n.__assign||function(){return(An=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Rn=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},kn=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(gn,"__esModule",{value:!0});var Dn=gn.interceptFetch=void 0,Ln=o,Pn=sn,Mn=En,jn=bn.exports("fetch");function Fn(e){return Rn(this,void 0,void 0,(function(){var t;return kn(this,(function(r){switch(r.label){case 0:return t={status:e.status,statusText:e.statusText,headers:Ln.objectToHeaders(Ln.headersToObject(e.headers))},[4,e.text()];case 1:return[2,(t.body=r.sent(),t)]}}))}))}Dn=gn.interceptFetch=function(e,t){var r=window.fetch;return jn('replacing "window.fetch"...'),window.fetch=function(n,o){return Rn(void 0,void 0,void 0,(function(){var i,s,a,c,u,l,p;return kn(this,(function(d){switch(d.label){case 0:return i=new Request(n,o),s="string"==typeof n?n:n.url,a=(null==o?void 0:o.method)||"GET",jn("[%s] %s",a,s),p={id:Mn.uuidv4(),url:new URL(s,location.origin),method:a,headers:new Ln.Headers((null==o?void 0:o.headers)||{})},[4,i.text()];case 1:return p.body=d.sent(),jn("isomorphic request",c=p),e.emit("request",c),jn("awaiting for the mocked response..."),[4,t(c,i)];case 2:return u=d.sent(),jn("mocked response",u),u?(l=Pn.toIsoResponse(u),jn("derived isomorphic response",l),e.emit("response",c,l),[2,new Response(u.body,An(An({},l),{headers:Ln.flattenHeadersObject(u.headers||{})}))]):(jn("no mocked response found, bypassing..."),[2,r(n,o).then((function(t){return Rn(void 0,void 0,void 0,(function(){var r,n,o,i;return kn(this,(function(s){switch(s.label){case 0:return r=t.clone(),jn("original fetch performed",r),o=(n=e).emit,i=["response",c],[4,Fn(r)];case 1:return o.apply(n,i.concat([s.sent()])),[2,t]}}))}))}))])}}))}))},function(){jn("restoring modules..."),window.fetch=r}};var Un={},qn={},Hn={},Bn={};function $n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var Vn=$n({HTML:"text/html",isHTML:function(e){return e===Vn.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Gn=$n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===Gn.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Bn.freeze=$n,Bn.MIME_TYPE=Vn,Bn.NAMESPACE=Gn;var Kn={};!function(e){var t=Bn.freeze;e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),e.entityMap=e.HTML_ENTITIES}(Kn);var Xn={},Wn=Bn.NAMESPACE,Yn=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Jn=new RegExp("[\\-\\.0-9"+Yn.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),zn=new RegExp("^"+Yn.source+Jn.source+"*(?::"+Yn.source+Jn.source+"*)?$");function Qn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Qn)}function Zn(){}function eo(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function to(e,t,r,n,o,i){function s(e,t,n){e in r.attributeNames&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t,n)}for(var a,c=++t,u=0;;){var l=e.charAt(c);switch(l){case"=":if(1===u)a=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),a=e.slice(t,c)),t=c+1,!((c=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t),i.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,c)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===u&&(p=a),4==u?(i.warning('attribute "'+p+'" missed quot(")!'),s(a,p.replace(/&#?\w+;/g,o),t)):(Wn.isHTML(n[""])&&p.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"€":l=" ";default:if(l<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:a=e.slice(t,c),u=2;break;case 4:var p=e.slice(t,c).replace(/&#?\w+;/g,o);i.warning('attribute "'+p+'" missed quot(")!!'),s(a,p,t);case 5:u=6}else switch(u){case 2:r.tagName,Wn.isHTML(n[""])&&a.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),s(a,a,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function ro(e,t,r){for(var n=e.tagName,o=null,i=e.length;i--;){var s=e[i],a=s.qName,c=s.value;if((d=a.indexOf(":"))>0)var u=s.prefix=a.slice(0,d),l=a.slice(d+1),p="xmlns"===u&&l;else l=a,u=null,p="xmlns"===a&&"";s.localName=l,!1!==p&&(null==o&&(o={},io(r,r={})),r[p]=o[p]=c,s.uri=Wn.XMLNS,t.startPrefixMapping(p,c))}for(i=e.length;i--;){(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri=Wn.XML),"xmlns"!==u&&(s.uri=r[u||""]))}var d;(d=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,d),l=e.localName=n.slice(d+1)):(u=null,l=e.localName=n);var f=e.uri=r[u||""];if(t.startElement(f,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(f,l,n),o)for(u in o)t.endPrefixMapping(u)}function no(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),s=e.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(o.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),o.characters(s,0,s.length),i)}return t+1}function oo(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function io(e,t){for(var r in e)t[r]=e[r]}function so(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,u=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[s-1];return r.startDTD(a,c,u),r.endDTD(),l.index+l[0].length}}return-1}function ao(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function co(){this.attributeNames={}}Qn.prototype=new Error,Qn.prototype.name=Qn.name,Zn.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),io(t,t={}),function(e,t,r,n,o){function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?i(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function a(t){if(t>v){var r=e.substring(v,t).replace(/&#?\w+;/g,s);d&&c(v),n.characters(r,0,t-v),v=t}}function c(t,r){for(;t>=l&&(r=p.exec(e));)u=r.index,l=u+r[0].length,d.lineNumber++;d.columnNumber=t-u+1}var u=0,l=0,p=/.*(?:\r\n?|\n)|.*$/g,d=n.locator,f=[{currentNSMap:t}],h={},v=0;for(;;){try{var m=e.indexOf("<",v);if(m<0){if(!e.substr(v).match(/^\s*$/)){var y=n.doc,g=y.createTextNode(e.substr(v));y.appendChild(g),n.currentElement=g}return}switch(m>v&&a(m),e.charAt(m+1)){case"/":var E=e.indexOf(">",m+3),b=e.substring(m+2,E).replace(/[ \t\n\r]+$/g,""),w=f.pop();E<0?(b=e.substring(m+2).replace(/[\s<].*/,""),o.error("end tag name: "+b+" is not complete:"+w.tagName),E=m+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),o.error("end tag name: "+b+" maybe not complete"),E=m+1+b.length);var N=w.localNSMap,T=w.tagName==b;if(T||w.tagName&&w.tagName.toLowerCase()==b.toLowerCase()){if(n.endElement(w.uri,w.localName,b),N)for(var _ in N)n.endPrefixMapping(_);T||o.fatalError("end tag name: "+b+" is not match the current start tagName:"+w.tagName)}else f.push(w);E++;break;case"?":d&&c(m),E=ao(e,m,n);break;case"!":d&&c(m),E=so(e,m,n,o);break;default:d&&c(m);var x=new co,O=f[f.length-1].currentNSMap,S=(E=to(e,m,x,O,s,o),x.length);if(!x.closed&&oo(e,E,x.tagName,h)&&(x.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),d&&S){for(var C=eo(d,{}),I=0;I<S;I++){var A=x[I];c(A.offset),A.locator=eo(d,{})}n.locator=C,ro(x,n,O)&&f.push(x),n.locator=d}else ro(x,n,O)&&f.push(x);Wn.isHTML(x.uri)&&!x.closed?E=no(e,E,x.tagName,s,n):E++}}catch(e){if(e instanceof Qn)throw e;o.error("element parse error: "+e),E=-1}E>v?v=E:a(Math.max(m,v)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},co.prototype={setTagName:function(e){if(!zn.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!zn.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Xn.XMLReader=Zn,Xn.ParseError=Qn;var uo={},lo=Bn.NAMESPACE;function po(e){return""!==e}function fo(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function ho(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(po):[]}(e);return Object.keys(t.reduce(fo,{}))}function vo(e,t){for(var r in e)t[r]=e[r]}function mo(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,vo(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var yo={},go=yo.ELEMENT_NODE=1,Eo=yo.ATTRIBUTE_NODE=2,bo=yo.TEXT_NODE=3,wo=yo.CDATA_SECTION_NODE=4,No=yo.ENTITY_REFERENCE_NODE=5,To=yo.ENTITY_NODE=6,_o=yo.PROCESSING_INSTRUCTION_NODE=7,xo=yo.COMMENT_NODE=8,Oo=yo.DOCUMENT_NODE=9,So=yo.DOCUMENT_TYPE_NODE=10,Co=yo.DOCUMENT_FRAGMENT_NODE=11,Io=yo.NOTATION_NODE=12,Ao={},Ro={};Ao.INDEX_SIZE_ERR=(Ro[1]="Index size error",1),Ao.DOMSTRING_SIZE_ERR=(Ro[2]="DOMString size error",2);var ko=Ao.HIERARCHY_REQUEST_ERR=(Ro[3]="Hierarchy request error",3);Ao.WRONG_DOCUMENT_ERR=(Ro[4]="Wrong document",4),Ao.INVALID_CHARACTER_ERR=(Ro[5]="Invalid character",5),Ao.NO_DATA_ALLOWED_ERR=(Ro[6]="No data allowed",6),Ao.NO_MODIFICATION_ALLOWED_ERR=(Ro[7]="No modification allowed",7);var Do=Ao.NOT_FOUND_ERR=(Ro[8]="Not found",8);Ao.NOT_SUPPORTED_ERR=(Ro[9]="Not supported",9);var Lo=Ao.INUSE_ATTRIBUTE_ERR=(Ro[10]="Attribute in use",10);function Po(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,Ro[e]),this.message=Ro[e],Error.captureStackTrace&&Error.captureStackTrace(this,Po);return r.code=e,t&&(this.message=this.message+": "+t),r}function Mo(){}function jo(e,t){this._node=e,this._refresh=t,Fo(this)}function Fo(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);yi(e,"length",r.length),vo(r,e),e._inc=t}}function Uo(){}function qo(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function Ho(e,t,r,n){if(n?t[qo(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&Wo(o,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===lo.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function Bo(e,t,r){var n=qo(t,r);if(!(n>=0))throw Po(Do,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(Wo(i,e,r),r.ownerElement=null)}}function $o(){}function Vo(){}function Go(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function Ko(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(Ko(e,t))return!0}while(e=e.nextSibling)}function Xo(){}function Wo(e,t,r,n){e&&e._inc++,r.namespaceURI===lo.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function Yo(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i}}}function Jo(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,Yo(e.ownerDocument,e),t}function zo(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Co){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return Yo(e.ownerDocument||e,e),t.nodeType==Co&&(t.firstChild=t.lastChild=null),t}function Qo(){this._nsMap={}}function Zo(){}function ei(){}function ti(){}function ri(){}function ni(){}function oi(){}function ii(){}function si(){}function ai(){}function ci(){}function ui(){}function li(){}function pi(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var s=[{namespace:i,prefix:null}];return hi(this,r,e,t,s),r.join("")}function di(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===lo.XML||o===lo.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==o}return!0}function fi(e,t,r){e.push(" ",t,'="',r.replace(/[<&"]/g,Go),'"')}function hi(e,t,r,n,o){if(o||(o=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case go:var i=e.attributes,s=i.length,a=e.firstChild,c=e.tagName,u=c;if(!(r=lo.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var l,p=0;p<i.length;p++)if("xmlns"===i.item(p).name){l=i.item(p).value;break}if(l!==e.namespaceURI)for(var d=o.length-1;d>=0;d--){var f=o[d];if(f.namespace===e.namespaceURI){f.prefix&&(u=f.prefix+":"+c);break}}}t.push("<",u);for(var h=0;h<s;h++){"xmlns"==(v=i.item(h)).prefix?o.push({prefix:v.localName,namespace:v.value}):"xmlns"==v.nodeName&&o.push({prefix:"",namespace:v.value})}for(h=0;h<s;h++){var v,m,y;if(di(v=i.item(h),0,o))fi(t,(m=v.prefix||"")?"xmlns:"+m:"xmlns",y=v.namespaceURI),o.push({prefix:m,namespace:y});hi(v,t,r,n,o)}if(c===u&&di(e,0,o))fi(t,(m=e.prefix||"")?"xmlns:"+m:"xmlns",y=e.namespaceURI),o.push({prefix:m,namespace:y});if(a||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;a;)a.data?t.push(a.data):hi(a,t,r,n,o.slice()),a=a.nextSibling;else for(;a;)hi(a,t,r,n,o.slice()),a=a.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Oo:case Co:for(a=e.firstChild;a;)hi(a,t,r,n,o.slice()),a=a.nextSibling;return;case Eo:return fi(t,e.name,e.value);case bo:return t.push(e.data.replace(/[<&]/g,Go).replace(/]]>/g,"]]&gt;"));case wo:return t.push("<![CDATA[",e.data,"]]>");case xo:return t.push("\x3c!--",e.data,"--\x3e");case So:var g=e.publicId,E=e.systemId;if(t.push("<!DOCTYPE ",e.name),g)t.push(" PUBLIC ",g),E&&"."!=E&&t.push(" ",E),t.push(">");else if(E&&"."!=E)t.push(" SYSTEM ",E,">");else{var b=e.internalSubset;b&&t.push(" [",b,"]"),t.push(">")}return;case _o:return t.push("<?",e.target," ",e.data,"?>");case No:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function vi(e,t,r){var n;switch(t.nodeType){case go:(n=t.cloneNode(!1)).ownerDocument=e;case Co:break;case Eo:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var o=t.firstChild;o;)n.appendChild(vi(e,o,r)),o=o.nextSibling;return n}function mi(e,t,r){var n=new t.constructor;for(var o in t){var i=t[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(t.childNodes&&(n.childNodes=new Mo),n.ownerDocument=e,n.nodeType){case go:var s=t.attributes,a=n.attributes=new Uo,c=s.length;a._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(mi(e,s.item(u),!0));break;case Eo:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild(mi(e,l,r)),l=l.nextSibling;return n}function yi(e,t,r){e[t]=r}Ao.INVALID_STATE_ERR=(Ro[11]="Invalid state",11),Ao.SYNTAX_ERR=(Ro[12]="Syntax error",12),Ao.INVALID_MODIFICATION_ERR=(Ro[13]="Invalid modification",13),Ao.NAMESPACE_ERR=(Ro[14]="Invalid namespace",14),Ao.INVALID_ACCESS_ERR=(Ro[15]="Invalid access",15),Po.prototype=Error.prototype,vo(Ao,Po),Mo.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)hi(this[n],r,e,t);return r.join("")}},jo.prototype.item=function(e){return Fo(this),this[e]},mo(jo,Mo),Uo.prototype={length:0,item:Mo.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new Po(Lo);var r=this.getNamedItem(e.nodeName);return Ho(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new Po(Lo);return t=this.getNamedItemNS(e.namespaceURI,e.localName),Ho(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return Bo(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return Bo(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},$o.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new Xo;if(n.implementation=this,n.childNodes=new Mo,n.doctype=r||null,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new oi;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},Vo.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return zo(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Jo(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return mi(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==bo&&e.nodeType==bo?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==Eo?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==Eo?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},vo(yo,Vo),vo(yo,Vo.prototype),Xo.prototype={nodeName:"#document",nodeType:Oo,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Co){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==go&&(this.documentElement=e),zo(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Jo(this,e)},importNode:function(e,t){return vi(this,e,t)},getElementById:function(e){var t=null;return Ko(this.documentElement,(function(r){if(r.nodeType==go&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=ho(e);return new jo(this,(function(r){var n=[];return t.length>0&&Ko(r.documentElement,(function(o){if(o!==r&&o.nodeType===go){var i=o.getAttribute("class");if(i){var s=e===i;if(!s){var a=ho(i);s=t.every((c=a,function(e){return c&&-1!==c.indexOf(e)}))}s&&n.push(o)}}var c})),n}))},createElement:function(e){var t=new Qo;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new Mo,(t.attributes=new Uo)._ownerElement=t,t},createDocumentFragment:function(){var e=new ci;return e.ownerDocument=this,e.childNodes=new Mo,e},createTextNode:function(e){var t=new ti;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ri;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ni;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new ui;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new Zo;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ai;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new Qo,n=t.split(":"),o=r.attributes=new Uo;return r.childNodes=new Mo,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new Zo,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},mo(Xo,Vo),Qo.prototype={nodeType:go,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Co?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,Yo(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new jo(this,(function(t){var r=[];return Ko(t,(function(n){n===t||n.nodeType!=go||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new jo(this,(function(r){var n=[];return Ko(r,(function(o){o===r||o.nodeType!==go||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},Xo.prototype.getElementsByTagName=Qo.prototype.getElementsByTagName,Xo.prototype.getElementsByTagNameNS=Qo.prototype.getElementsByTagNameNS,mo(Qo,Vo),Zo.prototype.nodeType=Eo,mo(Zo,Vo),ei.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(Ro[ko])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},mo(ei,Vo),ti.prototype={nodeName:"#text",nodeType:bo,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},mo(ti,ei),ri.prototype={nodeName:"#comment",nodeType:xo},mo(ri,ei),ni.prototype={nodeName:"#cdata-section",nodeType:wo},mo(ni,ei),oi.prototype.nodeType=So,mo(oi,Vo),ii.prototype.nodeType=Io,mo(ii,Vo),si.prototype.nodeType=To,mo(si,Vo),ai.prototype.nodeType=No,mo(ai,Vo),ci.prototype.nodeName="#document-fragment",ci.prototype.nodeType=Co,mo(ci,Vo),ui.prototype.nodeType=_o,mo(ui,Vo),li.prototype.serializeToString=function(e,t,r){return pi.call(e,t,r)},Vo.prototype.toString=pi;try{if(Object.defineProperty){function gi(e){switch(e.nodeType){case go:case Co:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(gi(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(jo.prototype,"length",{get:function(){return Fo(this),this.$$length}}),Object.defineProperty(Vo.prototype,"textContent",{get:function(){return gi(this)},set:function(e){switch(this.nodeType){case go:case Co:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),yi=function(e,t,r){e["$$"+t]=r}}}catch(e){}uo.DocumentType=oi,uo.DOMException=Po,uo.DOMImplementation=$o,uo.Element=Qo,uo.Node=Vo,uo.NodeList=Mo,uo.XMLSerializer=li;var Ei=Kn,bi=Bn.NAMESPACE;function wi(e){this.options=e||{locator:{}}}function Ni(){this.cdata=!1}function Ti(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function _i(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function xi(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function Oi(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}wi.prototype.parseFromString=function(e,t){var r=this.options,n=new Ci,o=r.domBuilder||new Ni,i=r.errorHandler,s=r.locator,a=r.xmlns||{},c=/\/x?html?$/.test(t),u=c?Ei.HTML_ENTITIES:Ei.XML_ENTITIES;return s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof Ni)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+_i(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,c&&(a[""]=bi.HTML),a.xml=a.xml||bi.XML,e&&"string"==typeof e?n.parse(e,a,u):n.errorHandler.error("invalid doc source"),o.doc},Ni.prototype={startDocument:function(){this.doc=(new Ai).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;Oi(this,i),this.currentElement=i,this.locator&&Ti(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var c=n.getValue(a),u=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&Ti(n.getLocator(a),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&Ti(this.locator,r),Oi(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=xi.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&Ti(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=xi.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&Ti(this.locator,n),Oi(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&Ti(this.locator,o),Oi(this,o)}},warning:function(e){console.warn("[xmldom warning]\t"+e,_i(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,_i(this.locator))},fatalError:function(e){throw new Ii(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){Ni.prototype[e]=function(){return null}}));var Si=Xn,Ci=Si.XMLReader,Ii=Si.ParseError,Ai=Hn.DOMImplementation=uo.DOMImplementation;Hn.XMLSerializer=uo.XMLSerializer,Hn.DOMParser=wi,Hn.__DOMHandler=Ni;var Ri={};Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.parseJson=void 0,Ri.parseJson=function(e){try{return JSON.parse(e)}catch(e){return null}};var ki={};Object.defineProperty(ki,"__esModule",{value:!0}),ki.bufferFrom=void 0,ki.bufferFrom=function(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r};var Di={},Li={};Object.defineProperty(Li,"__esModule",{value:!0}),Li.EventPolyfill=void 0;var Pi=function(){function e(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,this.type="",this.srcElement=null,this.currentTarget=null,this.eventPhase=0,this.isTrusted=!0,this.composed=!1,this.cancelable=!0,this.defaultPrevented=!1,this.bubbles=!0,this.lengthComputable=!0,this.loaded=0,this.total=0,this.cancelBubble=!1,this.returnValue=!0,this.type=e,this.target=(null==t?void 0:t.target)||null,this.currentTarget=(null==t?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}return e.prototype.composedPath=function(){return[]},e.prototype.initEvent=function(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r},e.prototype.preventDefault=function(){this.defaultPrevented=!0},e.prototype.stopPropagation=function(){},e.prototype.stopImmediatePropagation=function(){},e}();Li.EventPolyfill=Pi;var Mi={},ji=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.ProgressEventPolyfill=void 0;var Fi=function(e){function t(t,r){var n=e.call(this,t)||this;return n.lengthComputable=(null==r?void 0:r.lengthComputable)||!1,n.composed=(null==r?void 0:r.composed)||!1,n.loaded=(null==r?void 0:r.loaded)||0,n.total=(null==r?void 0:r.total)||0,n}return ji(t,e),t}(Li.EventPolyfill);Mi.ProgressEventPolyfill=Fi,Object.defineProperty(Di,"__esModule",{value:!0}),Di.createEvent=void 0;var Ui=Li,qi=Mi,Hi="undefined"!=typeof ProgressEvent;Di.createEvent=function(e,t,r){var n=Hi?ProgressEvent:qi.ProgressEventPolyfill;return["error","progress","loadstart","loadend","load","timeout","abort"].includes(t)?new n(t,{lengthComputable:!0,loaded:(null==r?void 0:r.loaded)||0,total:(null==r?void 0:r.total)||0}):new Ui.EventPolyfill(t,{target:e,currentTarget:e})};var Bi=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},$i=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Vi=n&&n.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Gi=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(qn,"__esModule",{value:!0}),qn.createXMLHttpRequestOverride=void 0;var Ki=Ae,Xi=o,Wi=Hn,Yi=Ri,Ji=sn,zi=En,Qi=ki,Zi=Di,es=bn.exports;qn.createXMLHttpRequestOverride=function(e){var t,r=e.pureXMLHttpRequest,n=e.observer,o=e.resolver,i=es("XHR");return(t=function(){function e(){this._events=[],this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.onreadystatechange=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.url="",this.method="GET",this.readyState=this.UNSENT,this.withCredentials=!1,this.status=200,this.statusText="OK",this.data="",this.response="",this.responseType="text",this.responseText="",this.responseXML=null,this.responseURL="",this.upload=null,this.timeout=0,this._requestHeaders=new Xi.Headers,this._responseHeaders=new Xi.Headers}return e.prototype.setReadyState=function(e){e!==this.readyState&&(i("readyState change %d -> %d",this.readyState,e),this.readyState=e,e!==this.UNSENT&&(i("triggerring readystate change..."),this.trigger("readystatechange")))},e.prototype.trigger=function(e,t){var r,n;i('trigger "%s" (%d)',e,this.readyState),i('resolve listener for event "%s"',e);var o=this["on"+e];null==o||o.call(this,Zi.createEvent(this,e,t));try{for(var s=Vi(this._events),a=s.next();!a.done;a=s.next()){var c=a.value;c.name===e&&(i('calling mock event listener "%s" (%d)',e,this.readyState),c.listener.call(this,Zi.createEvent(this,e,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this},e.prototype.reset=function(){i("reset"),this.setReadyState(this.UNSENT),this.status=200,this.statusText="OK",this.data="",this.response=null,this.responseText=null,this.responseXML=null,this._requestHeaders=new Xi.Headers,this._responseHeaders=new Xi.Headers},e.prototype.open=function(e,t,r,n,o){return void 0===r&&(r=!0),Bi(this,void 0,void 0,(function(){return $i(this,(function(s){return(i=es("XHR "+e+" "+t))("open",{method:e,url:t,async:r,user:n,password:o}),this.reset(),this.setReadyState(this.OPENED),void 0===t?(this.url=e,this.method="GET"):(this.url=t,this.method=e,this.async=r,this.user=n,this.password=o),[2]}))}))},e.prototype.send=function(e){var t,s=this;i("send %s %s",this.method,this.url),this.data=e||"";try{t=new URL(this.url)}catch(e){t=new URL(this.url,window.location.href)}i("request headers",this._requestHeaders);var a={id:zi.uuidv4(),url:t,method:this.method,body:this.data,headers:this._requestHeaders};n.emit("request",a),i("awaiting mocked response..."),Promise.resolve(Ki.until((function(){return Bi(s,void 0,void 0,(function(){return $i(this,(function(e){return[2,o(a,this)]}))}))}))).then((function(e){var t,o=Gi(e,2),c=o[0],u=o[1];if(c)return i("middleware function threw an exception!",c),s.trigger("error"),void s.abort();if(u){if(i("received mocked response",u),s.trigger("loadstart"),s.status=u.status||200,s.statusText=u.statusText||"OK",s._responseHeaders=u.headers?Xi.objectToHeaders(u.headers):new Xi.Headers,i("set response status",s.status,s.statusText),i("set response headers",s._responseHeaders),s.setReadyState(s.HEADERS_RECEIVED),i("response type",s.responseType),s.response=s.getResponseBody(u.body),s.responseText=u.body||"",s.responseXML=s.getResponseXML(),i("set response body",s.response),u.body&&s.response){s.setReadyState(s.LOADING);var l=Qi.bufferFrom(u.body);s.trigger("progress",{loaded:l.length,total:l.length})}s.setReadyState(s.DONE),s.trigger("load"),s.trigger("loadend"),n.emit("response",a,Ji.toIsoResponse(u))}else{i("no mocked response received!");var p=new r;i("opening an original request %s %s",s.method,s.url),p.open(s.method,s.url,null===(t=s.async)||void 0===t||t,s.user,s.password),p.addEventListener("load",(function(){i('original "onload"'),s.status=p.status,s.statusText=p.statusText,s.responseURL=p.responseURL,s.responseType=p.responseType,s.response=p.response,s.responseText=p.responseText,s.responseXML=p.responseXML,i("set mock request readyState to DONE"),s.setReadyState(s.DONE),i("received original response",s.status,s.statusText),i("original response body:",s.response);var e=p.getAllResponseHeaders();i("original response headers:\n",e),s._responseHeaders=Xi.stringToHeaders(e),i("original response headers (normalized)",s._responseHeaders),i("original response finished"),n.emit("response",a,{status:p.status,statusText:p.statusText,headers:s._responseHeaders,body:p.response})})),s.propagateCallbacks(p),s.propagateListeners(p),s.propagateHeaders(p,s._requestHeaders),s.async&&(p.timeout=s.timeout),i("send",s.data),p.send(s.data)}}))},e.prototype.abort=function(){i("abort"),this.readyState>this.UNSENT&&this.readyState<this.DONE&&(this.setReadyState(this.UNSENT),this.trigger("abort"))},e.prototype.dispatchEvent=function(){return!1},e.prototype.setRequestHeader=function(e,t){i('set request header "%s" to "%s"',e,t),this._requestHeaders.append(e,t)},e.prototype.getResponseHeader=function(e){if(i('get response header "%s"',e),this.readyState<this.HEADERS_RECEIVED)return i("cannot return a header: headers not received (state: %s)",this.readyState),null;var t=this._responseHeaders.get(e);return i('resolved response header "%s" to "%s"',e,t,this._responseHeaders),t},e.prototype.getAllResponseHeaders=function(){return i("get all response headers"),this.readyState<this.HEADERS_RECEIVED?(i("cannot return headers: headers not received (state: %s)",this.readyState),""):Xi.headersToString(this._responseHeaders)},e.prototype.addEventListener=function(e,t){i("addEventListener",e,t),this._events.push({name:e,listener:t})},e.prototype.removeEventListener=function(e,t){i("removeEventListener",e,t),this._events=this._events.filter((function(r){return r.name!==e&&r.listener!==t}))},e.prototype.overrideMimeType=function(){},e.prototype.getResponseBody=function(e){var t=null!=e?e:"";switch(i("coerced response body to",t),this.responseType){case"json":return i("resolving response body as JSON"),Yi.parseJson(t);case"blob":var r=this.getResponseHeader("content-type")||"text/plain";return i("resolving response body as Blob",{type:r}),new Blob([t],{type:r});case"arraybuffer":return i("resolving response body as ArrayBuffer"),Qi.bufferFrom(t);default:return t}},e.prototype.getResponseXML=function(){var e=this.getResponseHeader("Content-Type");return"application/xml"===e||"text/xml"===e?(new Wi.DOMParser).parseFromString(this.responseText,e):null},e.prototype.propagateCallbacks=function(e){e.onabort=this.abort,e.onerror=this.onerror,e.ontimeout=this.ontimeout,e.onload=this.onload,e.onloadstart=this.onloadstart,e.onloadend=this.onloadend,e.onprogress=this.onprogress,e.onreadystatechange=this.onreadystatechange},e.prototype.propagateListeners=function(e){i("propagating request listeners (%d) to the original request",this._events.length,this._events),this._events.forEach((function(t){var r=t.name,n=t.listener;e.addEventListener(r,n)}))},e.prototype.propagateHeaders=function(e,t){i("propagating request headers to the original request",t),Object.entries(t.raw()).forEach((function(t){var r=Gi(t,2),n=r[0],o=r[1];i('setting "%s" (%s) header on the original request',n,o),e.setRequestHeader(n,o)}))},e}()).UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,t},Object.defineProperty(Un,"__esModule",{value:!0});var ts=Un.interceptXMLHttpRequest=void 0,rs=qn,ns=bn.exports("XHR"),os="undefined"==typeof window?void 0:window.XMLHttpRequest;function is(e){const t={id:e.id,url:e.url,method:e.method,body:it(e.body,e.headers),headers:e.headers,cookies:{},redirect:"manual",referrer:"",keepalive:!1,cache:"default",mode:"cors",referrerPolicy:"no-referrer",integrity:"",destination:"document",bodyUsed:!1,credentials:"same-origin"},r=e.headers.get("cookie");nt(t);const n=r?P(r):{};return t.cookies=Object.assign(Object.assign({},t.cookies),n),t}function ss(e){return function(t){return Ie(this,void 0,void 0,(function*(){e.fallbackInterceptor=function(e,t){const r=Kr.createInterceptor({modules:[Dn,ts],resolver(r){return Ie(this,void 0,void 0,(function*(){return qr(is(r),e.requestHandlers,t,e.emitter,{transformResponse:e=>({status:e.status,statusText:e.statusText,headers:e.headers.all(),body:e.body}),onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}))}});return r.apply(),r}(e,t),Xe({message:"Mocking enabled (fallback mode).",quiet:t.quiet})}))}}ts=Un.interceptXMLHttpRequest=function(e,t){if(os){ns('patching "XMLHttpRequest" module...');var r=rs.createXMLHttpRequestOverride({pureXMLHttpRequest:os,observer:e,resolver:t});window.XMLHttpRequest=r}return function(){os&&(ns("restoring modules..."),window.XMLHttpRequest=os)}};let as=[];function cs(e){return(t,r)=>new Pr(e,t,r)}const us={all:cs(/.+/),head:cs(e.RESTMethods.HEAD),get:cs(e.RESTMethods.GET),post:cs(e.RESTMethods.POST),put:cs(e.RESTMethods.PUT),delete:cs(e.RESTMethods.DELETE),patch:cs(e.RESTMethods.PATCH),options:cs(e.RESTMethods.OPTIONS)};function ls(e,t){return(r,n)=>new Fr(e,r,t,n)}function ps(e){return t=>new Fr("all",new RegExp(".*"),e,t)}const ds={operation:ps("*"),query:ls("query","*"),mutation:ls("mutation","*")};const fs=Object.assign(Object.assign({},ds),{link:function(e){return{operation:ps(e),query:ls("query",e),mutation:ls("mutation",e)}}});return e.GraphQLHandler=Fr,e.RequestHandler=kr,e.RestHandler=Pr,e.cleanUrl=Nr,e.compose=xr,e.context=ae,e.createResponseComposition=Cr,e.defaultContext=Rr,e.defaultResponse=Or,e.graphql=fs,e.graphqlContext=jr,e.handleRequest=qr,e.matchRequestUrl=_r,e.parseIsomorphicRequest=is,e.response=Ir,e.rest=us,e.restContext=Lr,e.setupWorker=function(...e){if(e.forEach((e=>{if(Array.isArray(e))throw new Error(Ge.formatMessage('Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).'))})),J.exports.isNodeProcess())throw new Error(Ge.formatMessage("Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead."));const t=new ce.StrictEventEmitter,r=new ce.StrictEventEmitter;!function(e,t){const r=e.emit;r._isPiped||(e.emit=function(e,...n){return t.emit(e,...n),r.call(this,e,...n)},e.emit._isPiped=!0)}(t,r);const n={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:t,workerChannel:{on(e,t){n.events.addListener(navigator.serviceWorker,"message",(r=>{if(r.source!==n.worker)return;const o=V(r.data);o&&o.type===e&&t(r,o)}))},send(e){var t;null===(t=n.worker)||void 0===t||t.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),as.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of as)e.removeEventListener(t,r);as=[]},once(e){const t=[];return new Promise(((r,o)=>{t.push(n.events.addListener(navigator.serviceWorker,"message",(t=>{try{const n=JSON.parse(t.data);n.type===e&&r(n)}catch(e){o(e)}})),n.events.addListener(navigator.serviceWorker,"messageerror",o))})).finally((()=>{t.forEach((e=>e()))}))}},useFallbackMode:!("serviceWorker"in navigator)||"file:"===location.protocol},o=n.useFallbackMode?ss(n):Br(n),i=n.useFallbackMode?function(e){return function(){var t,r;null===(t=e.fallbackInterceptor)||void 0===t||t.restore(),$r({quiet:null===(r=e.startOptions)||void 0===r?void 0:r.quiet})}}(n):(e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),window.clearInterval(e.keepAliveInterval),$r({quiet:null===(t=e.startOptions)||void 0===t?void 0:t.quiet})})(n);return{start:Gr(o,n),stop(){n.events.removeAllListeners(),n.emitter.removeAllListeners(),r.removeAllListeners(),i()},use(...e){!function(e,...t){e.unshift(...t)}(n.requestHandlers,...e)},restoreHandlers(){n.requestHandlers.forEach((e=>{e.markAsSkipped(!1)}))},resetHandlers(...t){n.requestHandlers=function(e,...t){return t.length>0?[...t]:[...e]}(e,...t)},printHandlers(){n.requestHandlers.forEach((e=>{const{header:t,callFrame:r}=e.info,n=e.info.hasOwnProperty("operationType")?"[graphql]":"[rest]";console.groupCollapsed(`${n} ${t}`),r&&console.log(`Declaration: ${r}`),console.log("Handler:",e),e instanceof Pr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.path}`),console.groupEnd()}))},events:{on:(...e)=>r.on(...e),removeListener:(...e)=>r.removeListener(...e),removeAllListeners:(...e)=>r.removeAllListeners(...e)}}},e}({});
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.36.5).
5
+ * Mock Service Worker (0.36.7).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
@@ -10,7 +10,7 @@ export declare const defaultContext: {
10
10
  fetch: (input: string | MockedRequest<DefaultRequestBody>, requestInit?: RequestInit) => Promise<Response>;
11
11
  };
12
12
  export declare type DefaultRequestMultipartBody = Record<string, string | File | (string | File)[]>;
13
- export declare type DefaultRequestBody = Record<string, any> | DefaultRequestMultipartBody | string | number | undefined;
13
+ export declare type DefaultRequestBody = Record<string, any> | DefaultRequestMultipartBody | string | number | boolean | null | undefined;
14
14
  export interface MockedRequest<Body = DefaultRequestBody> {
15
15
  id: string;
16
16
  url: URL;
@@ -3,7 +3,7 @@ import { SerializedResponse } from '../../setupWorker/glossary';
3
3
  * Formats a mocked response for introspection in the browser's console.
4
4
  */
5
5
  export declare function prepareResponse(res: SerializedResponse<any>): {
6
- body: string | number | Record<string, any> | undefined;
6
+ body: string | number | boolean | Record<string, any> | null | undefined;
7
7
  status: number;
8
8
  statusText: string;
9
9
  headers: import("headers-utils").FlatHeadersObject;
@@ -2,4 +2,4 @@ import { MockedRequest } from '../../handlers/RequestHandler';
2
2
  /**
3
3
  * Parses a given request/response body based on the "Content-Type" header.
4
4
  */
5
- export declare function parseBody(body?: MockedRequest['body'], headers?: Headers): string | number | Record<string, any> | undefined;
5
+ export declare function parseBody(body?: MockedRequest['body'], headers?: Headers): string | number | boolean | Record<string, any> | null | undefined;
package/lib/umd/index.js CHANGED
@@ -1065,7 +1065,9 @@
1065
1065
  if (['GET', 'HEAD'].includes(method)) {
1066
1066
  return requestParameters;
1067
1067
  }
1068
- if (typeof body === 'object' || typeof body === 'number') {
1068
+ if (typeof body === 'object' ||
1069
+ typeof body === 'number' ||
1070
+ typeof body === 'boolean') {
1069
1071
  requestParameters.body = JSON.stringify(body);
1070
1072
  }
1071
1073
  else {
@@ -2259,10 +2261,22 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
2259
2261
  return t;
2260
2262
  };
2261
2263
  Object.defineProperty(exports, "__esModule", { value: true });
2262
- exports.PERSISTENCY_KEY = void 0;
2264
+ exports.store = exports.PERSISTENCY_KEY = void 0;
2263
2265
  const set_cookie_parser_1 = setCookie.exports;
2264
2266
  exports.PERSISTENCY_KEY = 'MSW_COOKIE_STORE';
2265
- const SUPPORTS_LOCAL_STORAGE = typeof localStorage !== 'undefined';
2267
+ function supportsLocalStorage() {
2268
+ try {
2269
+ if (localStorage == null) {
2270
+ return false;
2271
+ }
2272
+ localStorage.setItem('test', 'test');
2273
+ localStorage.getItem('test');
2274
+ return true;
2275
+ }
2276
+ catch (error) {
2277
+ return false;
2278
+ }
2279
+ }
2266
2280
  class CookieStore {
2267
2281
  constructor() {
2268
2282
  this.store = new Map();
@@ -2337,27 +2351,29 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
2337
2351
  * Hydrates the virtual cookie store from the `localStorage` if defined.
2338
2352
  */
2339
2353
  hydrate() {
2340
- if (!SUPPORTS_LOCAL_STORAGE) {
2354
+ if (!supportsLocalStorage()) {
2341
2355
  return;
2342
2356
  }
2343
2357
  const persistedCookies = localStorage.getItem(exports.PERSISTENCY_KEY);
2344
- if (persistedCookies) {
2345
- try {
2346
- const parsedCookies = JSON.parse(persistedCookies);
2347
- parsedCookies.forEach(([origin, cookies]) => {
2348
- this.store.set(origin, new Map(cookies.map((_a) => {
2349
- var [token, _b] = _a, { expires } = _b, cookie = __rest(_b, ["expires"]);
2350
- return [
2351
- token,
2352
- expires === undefined
2353
- ? cookie
2354
- : Object.assign(Object.assign({}, cookie), { expires: new Date(expires) }),
2355
- ];
2356
- })));
2357
- });
2358
- }
2359
- catch (error) {
2360
- console.warn(`
2358
+ if (!persistedCookies) {
2359
+ return;
2360
+ }
2361
+ try {
2362
+ const parsedCookies = JSON.parse(persistedCookies);
2363
+ parsedCookies.forEach(([origin, cookies]) => {
2364
+ this.store.set(origin, new Map(cookies.map((_a) => {
2365
+ var [token, _b] = _a, { expires } = _b, cookie = __rest(_b, ["expires"]);
2366
+ return [
2367
+ token,
2368
+ expires === undefined
2369
+ ? cookie
2370
+ : Object.assign(Object.assign({}, cookie), { expires: new Date(expires) }),
2371
+ ];
2372
+ })));
2373
+ });
2374
+ }
2375
+ catch (error) {
2376
+ console.warn(`
2361
2377
  [virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${exports.PERSISTENCY_KEY}").
2362
2378
 
2363
2379
  Stored value:
@@ -2367,8 +2383,7 @@ Thrown exception:
2367
2383
  ${error}
2368
2384
 
2369
2385
  Invalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`);
2370
- localStorage.removeItem(exports.PERSISTENCY_KEY);
2371
- }
2386
+ localStorage.removeItem(exports.PERSISTENCY_KEY);
2372
2387
  }
2373
2388
  }
2374
2389
  /**
@@ -2376,7 +2391,7 @@ Invalid value has been removed from localStorage to prevent subsequent failed pa
2376
2391
  * so they are available on the next page load.
2377
2392
  */
2378
2393
  persist() {
2379
- if (!SUPPORTS_LOCAL_STORAGE) {
2394
+ if (!supportsLocalStorage()) {
2380
2395
  return;
2381
2396
  }
2382
2397
  const serializedCookies = Array.from(this.store.entries()).map(([origin, cookies]) => {
@@ -2398,18 +2413,22 @@ Invalid value has been removed from localStorage to prevent subsequent failed pa
2398
2413
  });
2399
2414
  }
2400
2415
  }
2401
- exports.default = new CookieStore();
2416
+ exports.store = new CookieStore();
2402
2417
  }(CookieStore));
2403
2418
 
2404
2419
  (function (exports) {
2405
- var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
2406
- return (mod && mod.__esModule) ? mod : { "default": mod };
2420
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2421
+ if (k2 === undefined) k2 = k;
2422
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2423
+ }) : (function(o, m, k, k2) {
2424
+ if (k2 === undefined) k2 = k;
2425
+ o[k2] = m[k];
2426
+ }));
2427
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2428
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2407
2429
  };
2408
2430
  Object.defineProperty(exports, "__esModule", { value: true });
2409
- exports.PERSISTENCY_KEY = exports.store = void 0;
2410
- var CookieStore_1 = CookieStore;
2411
- Object.defineProperty(exports, "store", { enumerable: true, get: function () { return __importDefault(CookieStore_1).default; } });
2412
- Object.defineProperty(exports, "PERSISTENCY_KEY", { enumerable: true, get: function () { return CookieStore_1.PERSISTENCY_KEY; } });
2431
+ __exportStar(CookieStore, exports);
2413
2432
  }(lib$2));
2414
2433
 
2415
2434
  function getAllCookies() {
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (0.36.5).
5
+ * Mock Service Worker (0.36.7).
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
@@ -4931,7 +4931,9 @@ const createFetchRequestParameters = (input) => {
4931
4931
  if (['GET', 'HEAD'].includes(method)) {
4932
4932
  return requestParameters;
4933
4933
  }
4934
- if (typeof body === 'object' || typeof body === 'number') {
4934
+ if (typeof body === 'object' ||
4935
+ typeof body === 'number' ||
4936
+ typeof body === 'boolean') {
4935
4937
  requestParameters.body = JSON.stringify(body);
4936
4938
  }
4937
4939
  else {
package/node/lib/index.js CHANGED
@@ -6817,7 +6817,9 @@ const createFetchRequestParameters = (input) => {
6817
6817
  if (['GET', 'HEAD'].includes(method)) {
6818
6818
  return requestParameters;
6819
6819
  }
6820
- if (typeof body === 'object' || typeof body === 'number') {
6820
+ if (typeof body === 'object' ||
6821
+ typeof body === 'number' ||
6822
+ typeof body === 'boolean') {
6821
6823
  requestParameters.body = JSON.stringify(body);
6822
6824
  }
6823
6825
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "msw",
3
- "version": "0.36.5",
3
+ "version": "0.36.7",
4
4
  "description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",
5
5
  "main": "lib/umd/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -63,7 +63,7 @@
63
63
  ],
64
64
  "sideEffects": false,
65
65
  "dependencies": {
66
- "@mswjs/cookies": "^0.1.6",
66
+ "@mswjs/cookies": "^0.1.7",
67
67
  "@mswjs/interceptors": "^0.12.7",
68
68
  "@open-draft/until": "^1.0.3",
69
69
  "@types/cookie": "^0.4.1",
@@ -77,7 +77,7 @@
77
77
  "inquirer": "^8.2.0",
78
78
  "is-node-process": "^1.0.1",
79
79
  "js-levenshtein": "^1.1.6",
80
- "node-fetch": "^2.6.1",
80
+ "node-fetch": "^2.6.7",
81
81
  "path-to-regexp": "^6.2.0",
82
82
  "statuses": "^2.0.0",
83
83
  "strict-event-emitter": "^0.2.0",