msw 0.27.1 → 0.28.2

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/lib/iife/index.js CHANGED
@@ -1,11 +1,11 @@
1
- var MockServiceWorker=function(e){"use strict";var t={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};const n=(e,n)=>r=>(r.status=e,r.statusText=n||t[String(e)],r);var r=/[^a-z0-9\-#$%&'*+.^_`|~]/i,i=function(){function e(e){var t=this;this.map={},"Headers"===(null==e?void 0:e.constructor.name)?e.forEach((function(e,n){t.append(n,e)}),this):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];t.append(n,Array.isArray(r)?r.join(", "):r)})):e&&Object.getOwnPropertyNames(e).forEach((function(n){t.append(n,e[n])}))}return e.prototype.set=function(e,t){this.map[this.normalizeName(e)]=this.normalizeValue(t)},e.prototype.append=function(e,t){e=this.normalizeName(e),t=this.normalizeValue(t),this.map[e]=this.has(e)?this.map[e]+", "+t:t},e.prototype.delete=function(e){return delete this.map[this.normalizeName(e)],this},e.prototype.get=function(e){return this.map[this.normalizeName(e)]||null},e.prototype.getAllHeaders=function(){return this.map},e.prototype.has=function(e){return this.map.hasOwnProperty(this.normalizeName(e))},e.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},e.prototype.normalizeName=function(e){if("string"!=typeof e&&(e=String(e)),r.test(e)||""===e.trim())throw new TypeError("Invalid character in header field name");return e.toLowerCase()},e.prototype.normalizeValue=function(e){return"string"!=typeof e&&(e=String(e)),e},e}(),o=Object.defineProperty({Headers:i},"__esModule",{value:!0});var s=function(e){var t=[];return e.forEach((function(e,n){var r=e.includes(",")?e.split(",").map((function(e){return e.trim()})):e;t.push([n,r])})),t},a=Object.defineProperty({headersToList:s},"__esModule",{value:!0}),c=["user-agent"];var u=function(e){var t={};return e.forEach((function(e,n){var r=!c.includes(n.toLowerCase())&&e.includes(",");t[n]=r?e.split(",").map((function(e){return e.trim()})):e})),t},l=Object.defineProperty({headersToObject:u},"__esModule",{value:!0});var h=function(e){return e.trim().split(/[\r\n]+/).reduce((function(e,t){var n=t.split(": "),r=n.shift(),i=n.join(": ");return e.append(r,i),e}),new Headers)},p=Object.defineProperty({stringToHeaders:h},"__esModule",{value:!0});var f=function(e){var t=new Headers;return e.forEach((function(e){var n=e[0],r=e[1];[].concat(r).forEach((function(e){t.append(n,e)}))})),t},d=Object.defineProperty({listToHeaders:f},"__esModule",{value:!0});var v=function(e,t,n){return Object.keys(e).reduce((function(n,r){return t(n,r,e[r])}),n)},m=Object.defineProperty({reduceHeadersObject:v},"__esModule",{value:!0});var y=function(e){return m.reduceHeadersObject(e,(function(e,t,n){return[].concat(n).forEach((function(n){e.append(t,n)})),e}),new Headers)},E=Object.defineProperty({objectToHeaders:y},"__esModule",{value:!0});var g=function(e){return e.map((function(e){var t=e[0],n=e[1];return[t,[].concat(n).join("; ")]}))},T=Object.defineProperty({flattenHeadersList:g},"__esModule",{value:!0});var b=function(e){return m.reduceHeadersObject(e,(function(e,t,n){return e[t]=[].concat(n).join("; "),e}),{})},O=Object.defineProperty({flattenHeadersObject:b},"__esModule",{value:!0}),N=o.Headers,w=a.headersToList;l.headersToObject;var _=p.stringToHeaders,I=d.listToHeaders,k=E.objectToHeaders;function S(...e){return t=>{const[n,r]=e;if("string"==typeof n)t.headers.append(n,r);else{k(n).forEach(((e,n)=>{t.headers.append(n,e)}))}return t}}
1
+ var MockServiceWorker=function(e){"use strict";var t={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};const r=(e,r)=>n=>(n.status=e,n.statusText=r||t[String(e)],n);var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){var t={exports:{}};return e(t,t.exports),t.exports}var o=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeHeaderName=void 0;var r=/[^a-z0-9\-#$%&'*+.^_`|~]/i;t.normalizeHeaderName=function(e){if("string"!=typeof e&&(e=String(e)),r.test(e)||""===e.trim())throw new TypeError("Invalid character in header field name");return e.toLowerCase()}})),s=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeHeaderValue=void 0,t.normalizeHeaderValue=function(e){return"string"!=typeof e&&(e=String(e)),e}})),a=n&&n.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},c=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},u=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.")},l=function(){function e(t){var r=this;(this._headers={},this._names=new Map,["Headers","HeadersPolyfill"].includes(null==t?void 0:t.constructor.name)||t instanceof e)?t.forEach((function(e,t){r.append(t,e)}),this):Array.isArray(t)?t.forEach((function(e){var t=c(e,2),n=t[0],i=t[1];r.append(n,Array.isArray(i)?i.join(", "):i)})):t&&Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];r.append(e,Array.isArray(n)?n.join(", "):n)}))}return e.prototype[Symbol.iterator]=function(){return this.entries()},e.prototype.keys=function(){var e,t,r,n,i;return a(this,(function(o){switch(o.label){case 0:o.trys.push([0,5,6,7]),e=u(Object.keys(this._headers)),t=e.next(),o.label=1;case 1:return t.done?[3,4]:[4,t.value];case 2:o.sent(),o.label=3;case 3:return t=e.next(),[3,1];case 4:return[3,7];case 5:return r=o.sent(),n={error:r},[3,7];case 6:try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}return[7];case 7:return[2]}}))},e.prototype.values=function(){var e,t,r,n,i;return a(this,(function(o){switch(o.label){case 0:o.trys.push([0,5,6,7]),e=u(Object.values(this._headers)),t=e.next(),o.label=1;case 1:return t.done?[3,4]:[4,t.value];case 2:o.sent(),o.label=3;case 3:return t=e.next(),[3,1];case 4:return[3,7];case 5:return r=o.sent(),n={error:r},[3,7];case 6:try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}return[7];case 7:return[2]}}))},e.prototype.entries=function(){var e,t,r,n,i,o;return a(this,(function(s){switch(s.label){case 0:s.trys.push([0,5,6,7]),e=u(Object.keys(this._headers)),t=e.next(),s.label=1;case 1:return t.done?[3,4]:[4,[r=t.value,this.get(r)]];case 2:s.sent(),s.label=3;case 3:return t=e.next(),[3,1];case 4:return[3,7];case 5:return n=s.sent(),i={error:n},[3,7];case 6:try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(i)throw i.error}return[7];case 7:return[2]}}))},e.prototype.get=function(e){return this._headers[o.normalizeHeaderName(e)]||null},e.prototype.set=function(e,t){var r=o.normalizeHeaderName(e);this._headers[r]=s.normalizeHeaderValue(t),this._names.set(r,e)},e.prototype.append=function(e,t){var r=this.has(e)?this.get(e)+", "+t:t;this.set(e,r)},e.prototype.delete=function(e){if(!this.has(e))return this;var t=o.normalizeHeaderName(e);return delete this._headers[t],this._names.delete(t),this},e.prototype.all=function(){return this._headers},e.prototype.raw=function(){var e=this;return Object.entries(this._headers).reduce((function(t,r){var n=c(r,2),i=n[0],o=n[1];return t[e._names.get(i)]=o,t}),{})},e.prototype.has=function(e){return this._headers.hasOwnProperty(o.normalizeHeaderName(e))},e.prototype.forEach=function(e,t){for(var r in this._headers)this._headers.hasOwnProperty(r)&&e.call(t,this._headers[r],r,this)},e}(),h=Object.defineProperty({default:l},"__esModule",{value:!0}),p=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.headersToList=void 0,t.headersToList=function(e){var t=[];return e.forEach((function(e,r){var n=e.includes(",")?e.split(",").map((function(e){return e.trim()})):e;t.push([r,n])})),t}})),f=i((function(e,t){var r=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.headersToString=void 0,t.headersToString=function(e){return p.headersToList(e).map((function(e){var t=r(e,2),n=t[0],i=t[1];return n+": "+[].concat(i).join(", ")})).join("\r\n")}})),d=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.headersToObject=void 0;var r=["user-agent"];t.headersToObject=function(e){var t={};return e.forEach((function(e,n){var i=!r.includes(n.toLowerCase())&&e.includes(",");t[n]=i?e.split(",").map((function(e){return e.trim()})):e})),t}})),v=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringToHeaders=void 0,t.stringToHeaders=function(e){return e.trim().split(/[\r\n]+/).reduce((function(e,t){var r=t.split(": "),n=r.shift(),i=r.join(": ");return e.append(n,i),e}),new h.default)}})),y=i((function(e,t){var r=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.listToHeaders=void 0,t.listToHeaders=function(e){var t=new h.default;return e.forEach((function(e){var n=r(e,2),i=n[0],o=n[1];[].concat(o).forEach((function(e){t.append(i,e)}))})),t}})),m=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.reduceHeadersObject=void 0,t.reduceHeadersObject=function(e,t,r){return Object.keys(e).reduce((function(r,n){return t(r,n,e[n])}),r)}})),g=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.objectToHeaders=void 0,t.objectToHeaders=function(e){return m.reduceHeadersObject(e,(function(e,t,r){return[].concat(r).filter(Boolean).forEach((function(r){e.append(t,r)})),e}),new h.default)}})),E=i((function(e,t){var r=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.flattenHeadersList=void 0,t.flattenHeadersList=function(e){return e.map((function(e){var t=r(e,2),n=t[0],i=t[1];return[n,[].concat(i).join("; ")]}))}})),b=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.flattenHeadersObject=void 0,t.flattenHeadersObject=function(e){return m.reduceHeadersObject(e,(function(e,t,r){return e[t]=[].concat(r).join("; "),e}),{})}})),T=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.flattenHeadersObject=t.flattenHeadersList=t.reduceHeadersObject=t.objectToHeaders=t.listToHeaders=t.stringToHeaders=t.headersToObject=t.headersToList=t.headersToString=t.Headers=void 0,Object.defineProperty(t,"Headers",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"headersToString",{enumerable:!0,get:function(){return f.headersToString}}),Object.defineProperty(t,"headersToList",{enumerable:!0,get:function(){return p.headersToList}}),Object.defineProperty(t,"headersToObject",{enumerable:!0,get:function(){return d.headersToObject}}),Object.defineProperty(t,"stringToHeaders",{enumerable:!0,get:function(){return v.stringToHeaders}}),Object.defineProperty(t,"listToHeaders",{enumerable:!0,get:function(){return y.listToHeaders}}),Object.defineProperty(t,"objectToHeaders",{enumerable:!0,get:function(){return g.objectToHeaders}}),Object.defineProperty(t,"reduceHeadersObject",{enumerable:!0,get:function(){return m.reduceHeadersObject}}),Object.defineProperty(t,"flattenHeadersList",{enumerable:!0,get:function(){return E.flattenHeadersList}}),Object.defineProperty(t,"flattenHeadersObject",{enumerable:!0,get:function(){return b.flattenHeadersObject}})}));function O(...e){return t=>{const[r,n]=e;if("string"==typeof r)t.headers.append(r,n);else{T.objectToHeaders(r).forEach(((e,r)=>{t.headers.append(r,e)}))}return t}}
2
2
  /*!
3
3
  * cookie
4
4
  * Copyright(c) 2012-2014 Roman Shtylman
5
5
  * Copyright(c) 2015 Douglas Christopher Wilson
6
6
  * MIT Licensed
7
- */m.reduceHeadersObject,T.flattenHeadersList,O.flattenHeadersObject;var A=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},r=t||{},i=e.split(L),o=r.decode||R,s=0;s<i.length;s++){var a=i[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==n[u]&&(n[u]=j(l,o))}}return n},x=function(e,t,n){var r=n||{},i=r.encode||C;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!D.test(e))throw new TypeError("argument name is invalid");var o=i(t);if(o&&!D.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;if(null!=r.maxAge){var a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(r.domain){if(!D.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!D.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(s+="; HttpOnly");r.secure&&(s+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.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},R=decodeURIComponent,C=encodeURIComponent,L=/; */,D=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function j(e,t){try{return t(e)}catch(t){return e}}const P=(e,t,n)=>r=>{const i=x(e,t,n);return r.headers.set("Set-Cookie",i),"undefined"!=typeof document&&(document.cookie=i),r},M=e=>t=>(t.body=e,t);function F(e){try{return JSON.parse(e)}catch(e){return}}function U(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function q(e,t){return Object.entries(t).reduce(((e,[t,n])=>{const r=e[t];return Array.isArray(r)&&Array.isArray(n)?(e[t]=r.concat(n),e):U(r)&&U(n)?(e[t]=q(r,n),e):(e[t]=n,e)}),Object.assign({},e))}const B=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t),K=e=>t=>{const n=q(F(t.body)||{},{data:e});return B(n)(t)};function $(){return"object"==typeof global&&("[object process]"===Object.prototype.toString.call(global.process)||"ReactNative"===navigator.product||void 0)}const W=2147483647,H=()=>$()?5:Math.floor(300*Math.random()+100),V=e=>t=>{let n;if("string"==typeof e)switch(e){case"infinite":n=W;break;case"real":n=H();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)n=H();else{if(e>W)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.`);n=e}return t.delay=n,t},Y=e=>t=>{if(null==e)return t;const n=q(F(t.body)||{},{errors:e});return B(n)(t)},G=$()?require("node-fetch"):window.fetch,J=e=>{const t=new N(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.getAllHeaders()})},z=(e,t={})=>{if("string"==typeof e)return G(e,J(t));const n=(e=>{const{body:t,method:n}=e,r=Object.assign(Object.assign({},e),{body:void 0});return["GET","HEAD"].includes(n)||(r.body="object"==typeof t?JSON.stringify(t):t),r})(e),r=J(n);return G(e.url.href,r)},Q=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),X=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);var Z=Object.freeze({__proto__:null,status:n,set:S,cookie:P,body:M,data:K,delay:V,errors:Y,fetch:z,json:B,text:Q,xml:X}),ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function te(e){var t={exports:{}};return e(t,t.exports),t.exports}var ne,re="object"==typeof Reflect?Reflect:null,ie=re&&"function"==typeof re.apply?re.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};ne=re&&"function"==typeof re.ownKeys?re.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var oe=Number.isNaN||function(e){return e!=e};function se(){se.init.call(this)}var ae=se,ce=function(e,t){return new Promise((function(n,r){function i(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,i),r(n)},e.once("error",o)),e.once(t,i)}))};se.EventEmitter=se,se.prototype._events=void 0,se.prototype._eventsCount=0,se.prototype._maxListeners=void 0;var ue=10;function le(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function he(e){return void 0===e._maxListeners?se.defaultMaxListeners:e._maxListeners}function pe(e,t,n,r){var i,o,s,a;if(le(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=he(e))>0&&s.length>i&&!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 fe(){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 de(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=fe.bind(r);return i.listener=n,r.wrapFn=i,i}function ve(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):ye(i,i.length)}function me(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function ye(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(se,"defaultMaxListeners",{enumerable:!0,get:function(){return ue},set:function(e){if("number"!=typeof e||e<0||oe(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ue=e}}),se.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},se.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||oe(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},se.prototype.getMaxListeners=function(){return he(this)},se.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)ie(a,this,t);else{var c=a.length,u=ye(a,c);for(n=0;n<c;++n)ie(u[n],this,t)}return!0},se.prototype.addListener=function(e,t){return pe(this,e,t,!1)},se.prototype.on=se.prototype.addListener,se.prototype.prependListener=function(e,t){return pe(this,e,t,!0)},se.prototype.once=function(e,t){return le(t),this.on(e,de(this,e,t)),this},se.prototype.prependOnceListener=function(e,t){return le(t),this.prependListener(e,de(this,e,t)),this},se.prototype.removeListener=function(e,t){var n,r,i,o,s;if(le(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},se.prototype.off=se.prototype.removeListener,se.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},se.prototype.listeners=function(e){return ve(this,e,!0)},se.prototype.rawListeners=function(e){return ve(this,e,!1)},se.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):me.call(e,t)},se.prototype.listenerCount=me,se.prototype.eventNames=function(){return this._eventsCount>0?ne(this._events):[]},ae.once=ce;var Ee=te((function(e,t){var n,r=ee&&ee.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=ee&&ee.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};t.__esModule=!0,t.StrictEventEmitter=void 0;var o=function(e){function t(){return e.call(this)||this}return r(t,e),t.prototype.on=function(t,n){return e.prototype.on.call(this,t.toString(),n)},t.prototype.once=function(t,n){return e.prototype.on.call(this,t.toString(),n)},t.prototype.off=function(t,n){return e.prototype.off.call(this,t.toString(),n)},t.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.prototype.emit.apply(this,i([t.toString()],n))},t.prototype.addListener=function(t,n){return e.prototype.addListener.call(this,t.toString(),n)},t.prototype.removeListener=function(t,n){return e.prototype.removeListener.call(this,t.toString(),n)},t}(ae.EventEmitter);t.StrictEventEmitter=o})),ge=te((function(e,t){var n=ee&&ee.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]});t.__esModule=!0,t.StrictEventEmitter=void 0,n(t,Ee,"StrictEventEmitter")}));function Te(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}var be=Object.defineProperty({until:async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}}},"__esModule",{value:!0}).until;const Oe=(e,t,n)=>[e.active,e.installing,e.waiting].filter(Boolean).find((e=>n(e.scriptURL,t)))||null;const Ne=(e,t={},n)=>Te(void 0,void 0,void 0,(function*(){const r=new URL(e,location.origin).href;const i=yield navigator.serviceWorker.getRegistrations().then((e=>e.filter((e=>Oe(e,r,n)))));!navigator.serviceWorker.controller&&i.length>0&&location.reload();const[o]=i;if(o)return o.update().then((()=>[Oe(o,r,n),o]));const[s,a]=yield be((()=>Te(void 0,void 0,void 0,(function*(){const i=yield navigator.serviceWorker.register(e,t);return[Oe(i,r,n),i]}))));if(s){if(s.message.includes("(404)")){const e=new URL((null==t?void 0:t.scope)||"/",location.href);throw new Error(`[MSW] Failed to register a Service Worker for scope ('${e.href}') with script ('${r}'): 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(`[MSW] Failed to register a Service Worker:\n\n${s.message}`)}return a}));var we=function(){function e(e,t,n,r,i){return e<t||n<t?e>n?n+1:e+1:r===i?t:t+1}return function(t,n){if(t===n)return 0;if(t.length>n.length){var r=t;t=n,n=r}for(var i=t.length,o=n.length;i>0&&t.charCodeAt(i-1)===n.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&t.charCodeAt(s)===n.charCodeAt(s);)s++;if(o-=s,0===(i-=s)||o<3)return o;var a,c,u,l,h,p,f,d,v,m,y,E,g=0,T=[];for(a=0;a<i;a++)T.push(a+1),T.push(t.charCodeAt(s+a));for(var b=T.length-1;g<o-3;)for(v=n.charCodeAt(s+(c=g)),m=n.charCodeAt(s+(u=g+1)),y=n.charCodeAt(s+(l=g+2)),E=n.charCodeAt(s+(h=g+3)),p=g+=4,a=0;a<b;a+=2)c=e(f=T[a],c,u,v,d=T[a+1]),u=e(c,u,l,m,d),l=e(u,l,h,y,d),p=e(l,h,p,E,d),T[a]=p,h=l,l=u,u=c,c=f;for(;g<o;)for(v=n.charCodeAt(s+(c=g)),p=++g,a=0;a<b;a+=2)f=T[a],T[a]=p=e(f,c,p,v,T[a+1]),c=f;return p}}();function _e(e){return(_e="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 Ie="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function ke(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function Se(e){return Ae(e.source,ke(e.source,e.start))}function Ae(e,t){var n=e.locationOffset.column-1,r=Re(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?n:0,c=t.column+a,u="".concat(e.name,":").concat(s,":").concat(c,"\n"),l=r.split(/\r\n|[\n\r]/g),h=l[i];if(h.length>120){for(var p=Math.floor(c/80),f=c%80,d=[],v=0;v<h.length;v+=80)d.push(h.slice(v,v+80));return u+xe([["".concat(s),d[0]]].concat(d.slice(1,p+1).map((function(e){return["",e]})),[[" ",Re(f-1)+"^"],["",d[p+1]]]))}return u+xe([["".concat(s-1),l[i-1]],["".concat(s),h],["",Re(c-1)+"^"],["".concat(s+1),l[i+1]]])}function xe(e){var t=e.filter((function(e){return e[0],void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[0],i=e[1];return Re(n-(t=r).length)+t+(i?" | "+i:" |")})).join("\n")}function Re(e){return Array(e+1).join(" ")}function Ce(e){return(Ce="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 Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function De(e,t){return!t||"object"!==Ce(t)&&"function"!=typeof t?je(e):t}function je(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(e){var t="function"==typeof Map?new Map:void 0;return(Pe=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;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,r)}function r(){return Me(e,arguments,qe(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ue(r,e)})(e)}function Me(e,t,n){return(Me=Fe()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Ue(i,n.prototype),i}).apply(null,arguments)}function Fe(){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 Ue(e,t){return(Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Be=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&&Ue(e,t)}(a,e);var t,n,r,i,o,s=(t=a,n=Fe(),function(){var e,r=qe(t);if(n){var i=qe(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return De(this,e)});function a(e,t,n,r,i,o,c){var u,l,h,p,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 d,v=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,m=n;!m&&v&&(m=null===(d=v[0].loc)||void 0===d?void 0:d.source);var y,E=r;!E&&v&&(E=v.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),E&&0===E.length&&(E=void 0),r&&n?y=r.map((function(e){return ke(n,e)})):v&&(y=v.reduce((function(e,t){return t.loc&&e.push(ke(t.loc.source,t.loc.start)),e}),[]));var g,T=c;if(null==T&&null!=o){var b=o.extensions;"object"==_e(g=b)&&null!==g&&(T=b)}return Object.defineProperties(je(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!=i?i:void 0,enumerable:null!=i},nodes:{value:null!=v?v:void 0},source:{value:null!==(l=m)&&void 0!==l?l:void 0},positions:{value:null!==(h=E)&&void 0!==h?h:void 0},originalError:{value:o},extensions:{value:null!==(p=T)&&void 0!==p?p:void 0,enumerable:null!=T}}),null!=o&&o.stack?(Object.defineProperty(je(f),"stack",{value:o.stack,writable:!0,configurable:!0}),De(f)):(Error.captureStackTrace?Error.captureStackTrace(je(f),a):Object.defineProperty(je(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return r=a,(i=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var i=r[n];i.loc&&(t+="\n\n"+Se(i.loc))}else if(e.source&&e.locations)for(var o=0,s=e.locations;o<s.length;o++){var a=s[o];t+="\n\n"+Ae(e.source,a)}return t}(this)}},{key:Ie,get:function(){return"Object"}}])&&Le(r.prototype,i),o&&Le(r,o),a}(Pe(Error));function Ke(e,t,n){return new Be("Syntax Error: ".concat(n),void 0,e,[t])}var $e=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 We="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function He(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,We&&(e.prototype[We]=t)}var Ve=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();He(Ve);var Ye=function(){function e(e,t,n,r,i,o,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=s,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();He(Ye);var Ge=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 Je(e){return(Je="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 ze(e){return Qe(e,[])}function Qe(e,t){switch(Je(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 n=[].concat(t,[e]),r=function(e){var t=e[String(We)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:Qe(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o<n;++o)i.push(Qe(e[o],t));1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.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 n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+Qe(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function Xe(e,t){if(!Boolean(e))throw new Error(t)}function Ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var et=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||Xe(0,"Body must be a string. Received: ".concat(ze(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Xe(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Xe(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:Ie,get:function(){return"Source"}}])&&Ze(t.prototype,n),r&&Ze(t,r),e}();var tt=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 nt(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,o=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var i=0;i<t.length&&rt(t[i]);)++i;for(var o=t.length;o>i&&rt(t[o-1]);)--o;return t.slice(i,o).join("\n")}function rt(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var it=function(){function e(e){var t=new Ye(Ge.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!==Ge.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=st(this,e)}while(e.kind===Ge.COMMENT);return e},e}();function ot(e){return isNaN(e)?Ge.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function st(e,t){for(var n=e.source,r=n.body,i=r.length,o=t.end;o<i;){var s=r.charCodeAt(o),a=e.line,c=1+o-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===r.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new Ye(Ge.BANG,o,o+1,a,c,t);case 35:return ct(n,o,a,c,t);case 36:return new Ye(Ge.DOLLAR,o,o+1,a,c,t);case 38:return new Ye(Ge.AMP,o,o+1,a,c,t);case 40:return new Ye(Ge.PAREN_L,o,o+1,a,c,t);case 41:return new Ye(Ge.PAREN_R,o,o+1,a,c,t);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new Ye(Ge.SPREAD,o,o+3,a,c,t);break;case 58:return new Ye(Ge.COLON,o,o+1,a,c,t);case 61:return new Ye(Ge.EQUALS,o,o+1,a,c,t);case 64:return new Ye(Ge.AT,o,o+1,a,c,t);case 91:return new Ye(Ge.BRACKET_L,o,o+1,a,c,t);case 93:return new Ye(Ge.BRACKET_R,o,o+1,a,c,t);case 123:return new Ye(Ge.BRACE_L,o,o+1,a,c,t);case 124:return new Ye(Ge.PIPE,o,o+1,a,c,t);case 125:return new Ye(Ge.BRACE_R,o,o+1,a,c,t);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?pt(n,o,a,c,t,e):ht(n,o,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 ut(n,o,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 dt(n,o,a,c,t)}throw Ke(n,o,at(s))}var u=e.line,l=1+o-e.lineStart;return new Ye(Ge.EOF,i,i,u,l,t)}function at(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(ot(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(ot(e),".")}function ct(e,t,n,r,i){var o,s=e.body,a=t;do{o=s.charCodeAt(++a)}while(!isNaN(o)&&(o>31||9===o));return new Ye(Ge.COMMENT,t,a,n,r,i,s.slice(t+1,a))}function ut(e,t,n,r,i,o){var s=e.body,a=n,c=t,u=!1;if(45===a&&(a=s.charCodeAt(++c)),48===a){if((a=s.charCodeAt(++c))>=48&&a<=57)throw Ke(e,c,"Invalid number, unexpected digit after 0: ".concat(ot(a),"."))}else c=lt(e,c,a),a=s.charCodeAt(c);if(46===a&&(u=!0,a=s.charCodeAt(++c),c=lt(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=lt(e,c,a),a=s.charCodeAt(c)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw Ke(e,c,"Invalid number, expected digit but got: ".concat(ot(a),"."));return new Ye(u?Ge.FLOAT:Ge.INT,t,c,r,i,o,s.slice(t,c))}function lt(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw Ke(e,i,"Invalid number, expected digit but got: ".concat(ot(o),"."))}function ht(e,t,n,r,i){for(var o,s,a,c,u=e.body,l=t+1,h=l,p=0,f="";l<u.length&&!isNaN(p=u.charCodeAt(l))&&10!==p&&13!==p;){if(34===p)return f+=u.slice(h,l),new Ye(Ge.STRING,t,l+1,n,r,i,f);if(p<32&&9!==p)throw Ke(e,l,"Invalid character within String: ".concat(ot(p),"."));if(++l,92===p){switch(f+=u.slice(h,l-1),p=u.charCodeAt(l)){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+="\n";break;case 114:f+="\r";break;case 116:f+="\t";break;case 117:var d=(o=u.charCodeAt(l+1),s=u.charCodeAt(l+2),a=u.charCodeAt(l+3),c=u.charCodeAt(l+4),ft(o)<<12|ft(s)<<8|ft(a)<<4|ft(c));if(d<0){var v=u.slice(l+1,l+5);throw Ke(e,l,"Invalid character escape sequence: \\u".concat(v,"."))}f+=String.fromCharCode(d),l+=4;break;default:throw Ke(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(p),"."))}h=++l}}throw Ke(e,l,"Unterminated string.")}function pt(e,t,n,r,i,o){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 Ye(Ge.BLOCK_STRING,t,a+3,n,r,i,nt(l));if(u<32&&9!==u&&10!==u&&13!==u)throw Ke(e,a,"Invalid character within String: ".concat(ot(u),"."));10===u?(++a,++o.line,o.lineStart=a):13===u?(10===s.charCodeAt(a+1)?a+=2:++a,++o.line,o.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 Ke(e,a,"Unterminated string.")}function ft(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function dt(e,t,n,r,i){for(var o=e.body,s=o.length,a=t+1,c=0;a!==s&&!isNaN(c=o.charCodeAt(a))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++a;return new Ye(Ge.NAME,t,a,n,r,i,o.slice(t,a))}var vt=function(){function e(e,t){var n=function(e){return e instanceof et}(e)?e:new et(e);this._lexer=new it(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(Ge.NAME);return{kind:$e.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:$e.DOCUMENT,definitions:this.many(Ge.SOF,this.parseDefinition,Ge.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(Ge.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(Ge.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(Ge.BRACE_L))return{kind:$e.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(Ge.NAME)&&(t=this.parseName()),{kind:$e.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(Ge.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(Ge.PAREN_L,this.parseVariableDefinition,Ge.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:$e.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ge.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ge.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(Ge.DOLLAR),{kind:$e.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:$e.SELECTION_SET,selections:this.many(Ge.BRACE_L,this.parseSelection,Ge.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(Ge.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(Ge.COLON)?(e=r,t=this.parseName()):t=r,{kind:$e.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ge.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ge.PAREN_L,t,Ge.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(Ge.COLON),{kind:$e.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:$e.ARGUMENT,name:this.parseName(),value:(this.expectToken(Ge.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(Ge.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(Ge.NAME)?{kind:$e.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:$e.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:$e.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:$e.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 Ge.BRACKET_L:return this.parseList(e);case Ge.BRACE_L:return this.parseObject(e);case Ge.INT:return this._lexer.advance(),{kind:$e.INT,value:t.value,loc:this.loc(t)};case Ge.FLOAT:return this._lexer.advance(),{kind:$e.FLOAT,value:t.value,loc:this.loc(t)};case Ge.STRING:case Ge.BLOCK_STRING:return this.parseStringLiteral();case Ge.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:$e.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:$e.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:$e.NULL,loc:this.loc(t)};default:return{kind:$e.ENUM,value:t.value,loc:this.loc(t)}}case Ge.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:$e.STRING,value:e.value,block:e.kind===Ge.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:$e.LIST,values:this.any(Ge.BRACKET_L,(function(){return t.parseValueLiteral(e)}),Ge.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:$e.OBJECT,fields:this.any(Ge.BRACE_L,(function(){return t.parseObjectField(e)}),Ge.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(Ge.COLON),{kind:$e.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(Ge.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(Ge.AT),{kind:$e.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(Ge.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(Ge.BRACKET_R),e={kind:$e.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(Ge.BANG)?{kind:$e.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:$e.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===Ge.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(Ge.STRING)||this.peek(Ge.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 n=this.parseDirectives(!0),r=this.many(Ge.BRACE_L,this.parseOperationTypeDefinition,Ge.BRACE_R);return{kind:$e.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(Ge.COLON);var n=this.parseNamedType();return{kind:$e.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:$e.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:$e.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,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(Ge.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(Ge.AMP)||this.peek(Ge.NAME));return t}return this.delimitedMany(Ge.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(Ge.BRACE_L)&&this._lexer.lookahead().kind===Ge.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Ge.BRACE_L,this.parseFieldDefinition,Ge.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Ge.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:$e.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(Ge.PAREN_L,this.parseInputValueDef,Ge.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(Ge.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(Ge.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:$e.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:$e.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:$e.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(Ge.EQUALS)?this.delimitedMany(Ge.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:$e.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(Ge.BRACE_L,this.parseEnumValueDefinition,Ge.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:$e.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:$e.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(Ge.BRACE_L,this.parseInputValueDef,Ge.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===Ge.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),n=this.optionalMany(Ge.BRACE_L,this.parseOperationTypeDefinition,Ge.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:$e.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:$e.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:$e.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:$e.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:$e.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:$e.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:$e.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ge.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:$e.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(Ge.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==tt[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 Ve(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 Ke(this._lexer.source,t.start,"Expected ".concat(yt(e),", found ").concat(mt(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!==Ge.NAME||t.value!==e)throw Ke(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(mt(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===Ge.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return Ke(this._lexer.source,t.start,"Unexpected ".concat(mt(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function mt(e){var t=e.value;return yt(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function yt(e){return function(e){return e===Ge.BANG||e===Ge.DOLLAR||e===Ge.AMP||e===Ge.PAREN_L||e===Ge.PAREN_R||e===Ge.SPREAD||e===Ge.COLON||e===Ge.EQUALS||e===Ge.AT||e===Ge.BRACKET_L||e===Ge.BRACKET_R||e===Ge.BRACE_L||e===Ge.PIPE||e===Ge.BRACE_R}(e)?'"'.concat(e,'"'):e}
8
- /*! https://mths.be/punycode v1.3.2 by @mathias */var Et=te((function(e,t){!function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o="object"==typeof ee&&ee;o.global!==o&&o.window!==o&&o.self!==o||(n=o);var s,a,c=2147483647,u=36,l=/^xn--/,h=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,v=String.fromCharCode;function m(e){throw RangeError(f[e])}function y(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+y((e=e.replace(p,".")).split("."),t).join(".")}function g(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function T(e){return y(e,(function(e){var t="";return e>65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=v(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function O(e,t,n){var r=0;for(e=n?d(e/700):e>>1,e+=d(e/t);e>455;r+=u)e=d(e/35);return d(r+36*e/(e+38))}function N(e){var t,n,r,i,o,s,a,l,h,p,f,v=[],y=e.length,E=0,g=128,b=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&m("not-basic"),v.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<y;){for(o=E,s=1,a=u;i>=y&&m("invalid-input"),((l=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:u)>=u||l>d((c-E)/s))&&m("overflow"),E+=l*s,!(l<(h=a<=b?1:a>=b+26?26:a-b));a+=u)s>d(c/(p=u-h))&&m("overflow"),s*=p;b=O(E-o,t=v.length+1,0==o),d(E/t)>c-g&&m("overflow"),g+=d(E/t),E%=t,v.splice(E++,0,g)}return T(v)}function w(e){var t,n,r,i,o,s,a,l,h,p,f,y,E,T,N,w=[];for(y=(e=g(e)).length,t=128,n=0,o=72,s=0;s<y;++s)(f=e[s])<128&&w.push(v(f));for(r=i=w.length,i&&w.push("-");r<y;){for(a=c,s=0;s<y;++s)(f=e[s])>=t&&f<a&&(a=f);for(a-t>d((c-n)/(E=r+1))&&m("overflow"),n+=(a-t)*E,t=a,s=0;s<y;++s)if((f=e[s])<t&&++n>c&&m("overflow"),f==t){for(l=n,h=u;!(l<(p=h<=o?1:h>=o+26?26:h-o));h+=u)N=l-p,T=u-p,w.push(v(b(p+N%T,0))),l=d(N/T);w.push(v(b(l,0))),o=O(n,E,r==i),n=0,++r}++n,++t}return w.join("")}if(s={version:"1.3.2",ucs2:{decode:g,encode:T},decode:N,encode:w,toASCII:function(e){return E(e,(function(e){return h.test(e)?"xn--"+w(e):e}))},toUnicode:function(e){return E(e,(function(e){return l.test(e)?N(e.slice(4).toLowerCase()):e}))}},r&&i)if(e.exports==r)i.exports=s;else for(a in s)s.hasOwnProperty(a)&&(r[a]=s[a]);else n.punycode=s}(ee)})),gt=function(e){return"string"==typeof e},Tt=function(e){return"object"==typeof e&&null!==e},bt=function(e){return null===e},Ot=function(e){return null==e};function Nt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var wt=function(e,t,n,r){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=e.length;s>0&&a>s&&(a=s);for(var c=0;c<a;++c){var u,l,h,p,f=e[c].replace(o,"%20"),d=f.indexOf(n);d>=0?(u=f.substr(0,d),l=f.substr(d+1)):(u=f,l=""),h=decodeURIComponent(u),p=decodeURIComponent(l),Nt(i,h)?Array.isArray(i[h])?i[h].push(p):i[h]=[i[h],p]:i[h]=p}return i},_t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},It=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(r){var i=encodeURIComponent(_t(r))+n;return Array.isArray(e[r])?e[r].map((function(e){return i+encodeURIComponent(_t(e))})).join(t):i+encodeURIComponent(_t(e[r]))})).join(t):r?encodeURIComponent(_t(r))+n+encodeURIComponent(_t(e)):""},kt=te((function(e,t){t.decode=t.parse=wt,t.encode=t.stringify=It})),St=function(e){gt(e)&&(e=Kt(e));return e instanceof At?e.format():At.prototype.format.call(e)};function At(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var xt=/^([a-z0-9.+-]+:)/i,Rt=/:[0-9]*$/,Ct=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Lt=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Dt=["'"].concat(Lt),jt=["%","/","?",";","#"].concat(Dt),Pt=["/","?","#"],Mt=/^[+a-z0-9A-Z_-]{0,63}$/,Ft=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ut={javascript:!0,"javascript:":!0},qt={javascript:!0,"javascript:":!0},Bt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Kt(e,t,n){if(e&&Tt(e)&&e instanceof At)return e;var r=new At;return r.parse(e,t,n),r}At.prototype.parse=function(e,t,n){if(!gt(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r<e.indexOf("#")?"?":"#",o=e.split(i);o[0]=o[0].replace(/\\/g,"/");var s=e=o.join(i);if(s=s.trim(),!n&&1===e.split("#").length){var a=Ct.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=t?kt.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=xt.exec(s);if(c){var u=(c=c[0]).toLowerCase();this.protocol=u,s=s.substr(c.length)}if(n||c||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===s.substr(0,2);!l||c&&qt[c]||(s=s.substr(2),this.slashes=!0)}if(!qt[c]&&(l||c&&!Bt[c])){for(var h,p,f=-1,d=0;d<Pt.length;d++){-1!==(v=s.indexOf(Pt[d]))&&(-1===f||v<f)&&(f=v)}-1!==(p=-1===f?s.lastIndexOf("@"):s.lastIndexOf("@",f))&&(h=s.slice(0,p),s=s.slice(p+1),this.auth=decodeURIComponent(h)),f=-1;for(d=0;d<jt.length;d++){var v;-1!==(v=s.indexOf(jt[d]))&&(-1===f||v<f)&&(f=v)}-1===f&&(f=s.length),this.host=s.slice(0,f),s=s.slice(f),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var y=this.hostname.split(/\./),E=(d=0,y.length);d<E;d++){var g=y[d];if(g&&!g.match(Mt)){for(var T="",b=0,O=g.length;b<O;b++)g.charCodeAt(b)>127?T+="x":T+=g[b];if(!T.match(Mt)){var N=y.slice(0,d),w=y.slice(d+1),_=g.match(Ft);_&&(N.push(_[1]),w.unshift(_[2])),w.length&&(s="/"+w.join(".")+s),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Et.toASCII(this.hostname));var I=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+I,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Ut[u])for(d=0,E=Dt.length;d<E;d++){var S=Dt[d];if(-1!==s.indexOf(S)){var A=encodeURIComponent(S);A===S&&(A=escape(S)),s=s.split(S).join(A)}}var x=s.indexOf("#");-1!==x&&(this.hash=s.substr(x),s=s.slice(0,x));var R=s.indexOf("?");if(-1!==R?(this.search=s.substr(R),this.query=s.substr(R+1),t&&(this.query=kt.parse(this.query)),s=s.slice(0,R)):t&&(this.search="",this.query={}),s&&(this.pathname=s),Bt[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){I=this.pathname||"";var C=this.search||"";this.path=I+C}return this.href=this.format(),this},At.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&Tt(this.query)&&Object.keys(this.query).length&&(o=kt.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||Bt[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},At.prototype.resolve=function(e){return this.resolveObject(Kt(e,!1,!0)).format()},At.prototype.resolveObject=function(e){if(gt(e)){var t=new At;t.parse(e,!1,!0),e=t}for(var n=new At,r=Object.keys(this),i=0;i<r.length;i++){var o=r[i];n[o]=this[o]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),a=0;a<s.length;a++){var c=s[a];"protocol"!==c&&(n[c]=e[c])}return Bt[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!Bt[e.protocol]){for(var u=Object.keys(e),l=0;l<u.length;l++){var h=u[l];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||qt[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var f=n.pathname||"",d=n.search||"";n.path=f+d}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=m||v||n.host&&e.pathname,E=y,g=n.pathname&&n.pathname.split("/")||[],T=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!Bt[n.protocol]);if(T&&(n.hostname="",n.port=null,n.host&&(""===g[0]?g[0]=n.host:g.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),y=y&&(""===p[0]||""===g[0])),m)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,g=p;else if(p.length)g||(g=[]),g.pop(),g=g.concat(p),n.search=e.search,n.query=e.query;else if(!Ot(e.search)){if(T)n.hostname=n.host=g.shift(),(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift());return n.search=e.search,n.query=e.query,bt(n.pathname)&&bt(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!g.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var b=g.slice(-1)[0],O=(n.host||e.host||g.length>1)&&("."===b||".."===b)||""===b,N=0,w=g.length;w>=0;w--)"."===(b=g[w])?g.splice(w,1):".."===b?(g.splice(w,1),N++):N&&(g.splice(w,1),N--);if(!y&&!E)for(;N--;N)g.unshift("..");!y||""===g[0]||g[0]&&"/"===g[0].charAt(0)||g.unshift(""),O&&"/"!==g.join("/").substr(-1)&&g.push("");var _,I=""===g[0]||g[0]&&"/"===g[0].charAt(0);T&&(n.hostname=n.host=I?"":g.length?g.shift():"",(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.host=n.hostname=_.shift()));return(y=y||n.host&&g.length)&&!I&&g.unshift(""),g.length?n.pathname=g.join("/"):(n.pathname=null,n.path=null),bt(n.pathname)&&bt(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},At.prototype.parseHost=function(){var e=this.host,t=Rt.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const $t=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:St({protocol:e.url.protocol,host:e.url.host,pathname:e.url.pathname});function Wt(e){var t,n;try{const r=new vt(e,n).parseDocument().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}}catch(e){return e}}function Ht(e){var t,n;switch(e.method){case"GET":return{query:e.url.searchParams.get("query"),variables:F(e.url.searchParams.get("variables")||"")};case"POST":if(null===(t=e.body)||void 0===t?void 0:t.query){const{query:t,variables:n}=e.body;return{query:t,variables:n}}if(null===(n=e.body)||void 0===n?void 0:n.operations){const t=e.body,{operations:n,map:r}=t,i=
7
+ */var w=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},n=t||{},i=e.split(k),o=n.decode||N,s=0;s<i.length;s++){var a=i[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]=x(l,o))}}return r},_=function(e,t,r){var n=r||{},i=n.encode||S;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!I.test(e))throw new TypeError("argument name is invalid");var o=i(t);if(o&&!I.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;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(!I.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!I.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},N=decodeURIComponent,S=encodeURIComponent,k=/; */,I=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function x(e,t){try{return t(e)}catch(t){return e}}const A=(e,t,r)=>n=>{const i=_(e,t,r);return n.headers.set("Set-Cookie",i),"undefined"!=typeof document&&(document.cookie=i),n},R=e=>t=>(t.body=e,t);function C(e){try{return JSON.parse(e)}catch(e){return}}function L(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function j(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):L(n)&&L(r)?(e[t]=j(n,r),e):(e[t]=r,e)}),Object.assign({},e))}const D=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t),P=e=>t=>{const r=j(C(t.body)||{},{data:e});return D(r)(t)};function M(){return"object"==typeof global&&("[object process]"===Object.prototype.toString.call(global.process)||"ReactNative"===navigator.product||void 0)}const F=2147483647,U=()=>M()?5:Math.floor(300*Math.random()+100),q=e=>t=>{let r;if("string"==typeof e)switch(e){case"infinite":r=F;break;case"real":r=U();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=U();else{if(e>F)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},B=e=>t=>{if(null==e)return t;const r=j(C(t.body)||{},{errors:e});return D(r)(t)},H=M()?require("node-fetch"):window.fetch,K=e=>{const t=new T.Headers(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.all()})},$=(e,t={})=>{if("string"==typeof e)return H(e,K(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?JSON.stringify(t):t),n})(e),n=K(r);return H(e.url.href,n)},W=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),V=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);var Y,G=Object.freeze({__proto__:null,status:r,set:O,cookie:A,body:R,data:P,delay:q,errors:B,fetch:$,json:D,text:W,xml:V}),J="object"==typeof Reflect?Reflect:null,z=J&&"function"==typeof J.apply?J.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};Y=J&&"function"==typeof J.ownKeys?J.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Q=Number.isNaN||function(e){return e!=e};function X(){X.init.call(this)}var Z=X,ee=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}le(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&le(e,"error",t,r)}(e,i,{once:!0})}))};X.EventEmitter=X,X.prototype._events=void 0,X.prototype._eventsCount=0,X.prototype._maxListeners=void 0;var te=10;function re(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function ne(e){return void 0===e._maxListeners?X.defaultMaxListeners:e._maxListeners}function ie(e,t,r,n){var i,o,s,a;if(re(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=ne(e))>0&&s.length>i&&!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 oe(){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 se(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=oe.bind(n);return i.listener=r,n.wrapFn=i,i}function ae(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]: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}(i):ue(i,i.length)}function ce(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 ue(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function le(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 i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(X,"defaultMaxListeners",{enumerable:!0,get:function(){return te},set:function(e){if("number"!=typeof e||e<0||Q(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");te=e}}),X.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},X.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Q(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},X.prototype.getMaxListeners=function(){return ne(this)},X.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)z(a,this,t);else{var c=a.length,u=ue(a,c);for(r=0;r<c;++r)z(u[r],this,t)}return!0},X.prototype.addListener=function(e,t){return ie(this,e,t,!1)},X.prototype.on=X.prototype.addListener,X.prototype.prependListener=function(e,t){return ie(this,e,t,!0)},X.prototype.once=function(e,t){return re(t),this.on(e,se(this,e,t)),this},X.prototype.prependOnceListener=function(e,t){return re(t),this.prependListener(e,se(this,e,t)),this},X.prototype.removeListener=function(e,t){var r,n,i,o,s;if(re(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(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},X.prototype.off=X.prototype.removeListener,X.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 i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);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},X.prototype.listeners=function(e){return ae(this,e,!0)},X.prototype.rawListeners=function(e){return ae(this,e,!1)},X.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):ce.call(e,t)},X.prototype.listenerCount=ce,X.prototype.eventNames=function(){return this._eventsCount>0?Y(this._events):[]},Z.once=ee;var he=i((function(e,t){var r,i=n&&n.__extends||(r=function(e,t){return(r=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 n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n};t.__esModule=!0,t.StrictEventEmitter=void 0;var s=function(e){function t(){return e.call(this)||this}return i(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,o([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}(Z.EventEmitter);t.StrictEventEmitter=s})),pe=i((function(e,t){var r=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]});t.__esModule=!0,t.StrictEventEmitter=void 0,r(t,he,"StrictEventEmitter")}));function fe(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(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())}))}var de=Object.defineProperty({until:async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}}},"__esModule",{value:!0}).until;const ve=(e,t,r)=>[e.active,e.installing,e.waiting].filter(Boolean).find((e=>r(e.scriptURL,t)))||null;const ye=(e,t={},r)=>fe(void 0,void 0,void 0,(function*(){const n=new URL(e,location.origin).href;const i=yield navigator.serviceWorker.getRegistrations().then((e=>e.filter((e=>ve(e,n,r)))));!navigator.serviceWorker.controller&&i.length>0&&location.reload();const[o]=i;if(o)return o.update().then((()=>[ve(o,n,r),o]));const[s,a]=yield de((()=>fe(void 0,void 0,void 0,(function*(){const i=yield navigator.serviceWorker.register(e,t);return[ve(i,n,r),i]}))));if(s){if(s.message.includes("(404)")){const e=new URL((null==t?void 0:t.scope)||"/",location.href);throw new Error(`[MSW] 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(`[MSW] Failed to register a Service Worker:\n\n${s.message}`)}return a}));var me=function(){function e(e,t,r,n,i){return e<t||r<t?e>r?r+1:e+1:n===i?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 i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(o-=s,0===(i-=s)||o<3)return o;var a,c,u,l,h,p,f,d,v,y,m,g,E=0,b=[];for(a=0;a<i;a++)b.push(a+1),b.push(t.charCodeAt(s+a));for(var T=b.length-1;E<o-3;)for(v=r.charCodeAt(s+(c=E)),y=r.charCodeAt(s+(u=E+1)),m=r.charCodeAt(s+(l=E+2)),g=r.charCodeAt(s+(h=E+3)),p=E+=4,a=0;a<T;a+=2)c=e(f=b[a],c,u,v,d=b[a+1]),u=e(c,u,l,y,d),l=e(u,l,h,m,d),p=e(l,h,p,g,d),b[a]=p,h=l,l=u,u=c,c=f;for(;E<o;)for(v=r.charCodeAt(s+(c=E)),p=++E,a=0;a<T;a+=2)f=b[a],b[a]=p=e(f,c,p,v,b[a+1]),c=f;return p}}();function ge(e){return(ge="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 Ee="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function be(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,o=t+1;(r=n.exec(e.body))&&r.index<t;)i+=1,o=t+1-(r.index+r[0].length);return{line:i,column:o}}function Te(e){return Oe(e.source,be(e.source,e.start))}function Oe(e,t){var r=e.locationOffset.column-1,n=_e(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,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),h=l[i];if(h.length>120){for(var p=Math.floor(c/80),f=c%80,d=[],v=0;v<h.length;v+=80)d.push(h.slice(v,v+80));return u+we([["".concat(s),d[0]]].concat(d.slice(1,p+1).map((function(e){return["",e]})),[[" ",_e(f-1)+"^"],["",d[p+1]]]))}return u+we([["".concat(s-1),l[i-1]],["".concat(s),h],["",_e(c-1)+"^"],["".concat(s+1),l[i+1]]])}function we(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],i=e[1];return _e(r-(t=n).length)+t+(i?" | "+i:" |")})).join("\n")}function _e(e){return Array(e+1).join(" ")}function Ne(e){return(Ne="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 Se(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 ke(e,t){return!t||"object"!==Ne(t)&&"function"!=typeof t?Ie(e):t}function Ie(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xe(e){var t="function"==typeof Map?new Map:void 0;return(xe=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 Ae(e,arguments,Le(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ce(n,e)})(e)}function Ae(e,t,r){return(Ae=Re()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&Ce(i,r.prototype),i}).apply(null,arguments)}function Re(){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 Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var je=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&&Ce(e,t)}(a,e);var t,r,n,i,o,s=(t=a,r=Re(),function(){var e,n=Le(t);if(r){var i=Le(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return ke(this,e)});function a(e,t,r,n,i,o,c){var u,l,h,p,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 d,v=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,y=r;!y&&v&&(y=null===(d=v[0].loc)||void 0===d?void 0:d.source);var m,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?m=n.map((function(e){return be(r,e)})):v&&(m=v.reduce((function(e,t){return t.loc&&e.push(be(t.loc.source,t.loc.start)),e}),[]));var E,b=c;if(null==b&&null!=o){var T=o.extensions;"object"==ge(E=T)&&null!==E&&(b=T)}return Object.defineProperties(Ie(f),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(u=m)&&void 0!==u?u:void 0,enumerable:null!=m},path:{value:null!=i?i:void 0,enumerable:null!=i},nodes:{value:null!=v?v:void 0},source:{value:null!==(l=y)&&void 0!==l?l:void 0},positions:{value:null!==(h=g)&&void 0!==h?h:void 0},originalError:{value:o},extensions:{value:null!==(p=b)&&void 0!==p?p:void 0,enumerable:null!=b}}),null!=o&&o.stack?(Object.defineProperty(Ie(f),"stack",{value:o.stack,writable:!0,configurable:!0}),ke(f)):(Error.captureStackTrace?Error.captureStackTrace(Ie(f),a):Object.defineProperty(Ie(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return n=a,(i=[{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 i=n[r];i.loc&&(t+="\n\n"+Te(i.loc))}else if(e.source&&e.locations)for(var o=0,s=e.locations;o<s.length;o++){var a=s[o];t+="\n\n"+Oe(e.source,a)}return t}(this)}},{key:Ee,get:function(){return"Object"}}])&&Se(n.prototype,i),o&&Se(n,o),a}(xe(Error));function De(e,t,r){return new je("Syntax Error: ".concat(r),void 0,e,[t])}var Pe=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 Me="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function Fe(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,Me&&(e.prototype[Me]=t)}var Ue=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}();Fe(Ue);var qe=function(){function e(e,t,r,n,i,o,s){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=s,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();Fe(qe);var Be=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 He(e){return(He="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 Ke(e){return $e(e,[])}function $e(e,t){switch(He(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(Me)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==n){var i=n.call(e);if(i!==e)return"string"==typeof i?i:$e(i,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,i=[],o=0;o<r;++o)i.push($e(e[o],t));1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items"));return"["+i.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+": "+$e(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}function We(e,t){if(!Boolean(e))throw new Error(t)}function Ve(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 Ye=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||We(0,"Body must be a string. Received: ".concat(Ke(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||We(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||We(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:Ee,get:function(){return"Source"}}])&&Ve(t.prototype,r),n&&Ve(t,n),e}();var Ge=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 Je(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,i=0,o=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,i=0;break;case 9:case 32:++i;break;default:n&&!r&&(null===o||i<o)&&(o=i),n=!1}return null!==(t=o)&&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 i=0;i<t.length&&ze(t[i]);)++i;for(var o=t.length;o>i&&ze(t[o-1]);)--o;return t.slice(i,o).join("\n")}function ze(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var Qe=function(){function e(e){var t=new qe(Be.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!==Be.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=Ze(this,e)}while(e.kind===Be.COMMENT);return e},e}();function Xe(e){return isNaN(e)?Be.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function Ze(e,t){for(var r=e.source,n=r.body,i=n.length,o=t.end;o<i;){var s=n.charCodeAt(o),a=e.line,c=1+o-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===n.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new qe(Be.BANG,o,o+1,a,c,t);case 35:return tt(r,o,a,c,t);case 36:return new qe(Be.DOLLAR,o,o+1,a,c,t);case 38:return new qe(Be.AMP,o,o+1,a,c,t);case 40:return new qe(Be.PAREN_L,o,o+1,a,c,t);case 41:return new qe(Be.PAREN_R,o,o+1,a,c,t);case 46:if(46===n.charCodeAt(o+1)&&46===n.charCodeAt(o+2))return new qe(Be.SPREAD,o,o+3,a,c,t);break;case 58:return new qe(Be.COLON,o,o+1,a,c,t);case 61:return new qe(Be.EQUALS,o,o+1,a,c,t);case 64:return new qe(Be.AT,o,o+1,a,c,t);case 91:return new qe(Be.BRACKET_L,o,o+1,a,c,t);case 93:return new qe(Be.BRACKET_R,o,o+1,a,c,t);case 123:return new qe(Be.BRACE_L,o,o+1,a,c,t);case 124:return new qe(Be.PIPE,o,o+1,a,c,t);case 125:return new qe(Be.BRACE_R,o,o+1,a,c,t);case 34:return 34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)?ot(r,o,a,c,t,e):it(r,o,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 rt(r,o,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 at(r,o,a,c,t)}throw De(r,o,et(s))}var u=e.line,l=1+o-e.lineStart;return new qe(Be.EOF,i,i,u,l,t)}function et(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(Xe(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(Xe(e),".")}function tt(e,t,r,n,i){var o,s=e.body,a=t;do{o=s.charCodeAt(++a)}while(!isNaN(o)&&(o>31||9===o));return new qe(Be.COMMENT,t,a,r,n,i,s.slice(t+1,a))}function rt(e,t,r,n,i,o){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 De(e,c,"Invalid number, unexpected digit after 0: ".concat(Xe(a),"."))}else c=nt(e,c,a),a=s.charCodeAt(c);if(46===a&&(u=!0,a=s.charCodeAt(++c),c=nt(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=nt(e,c,a),a=s.charCodeAt(c)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw De(e,c,"Invalid number, expected digit but got: ".concat(Xe(a),"."));return new qe(u?Be.FLOAT:Be.INT,t,c,n,i,o,s.slice(t,c))}function nt(e,t,r){var n=e.body,i=t,o=r;if(o>=48&&o<=57){do{o=n.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw De(e,i,"Invalid number, expected digit but got: ".concat(Xe(o),"."))}function it(e,t,r,n,i){for(var o,s,a,c,u=e.body,l=t+1,h=l,p=0,f="";l<u.length&&!isNaN(p=u.charCodeAt(l))&&10!==p&&13!==p;){if(34===p)return f+=u.slice(h,l),new qe(Be.STRING,t,l+1,r,n,i,f);if(p<32&&9!==p)throw De(e,l,"Invalid character within String: ".concat(Xe(p),"."));if(++l,92===p){switch(f+=u.slice(h,l-1),p=u.charCodeAt(l)){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+="\n";break;case 114:f+="\r";break;case 116:f+="\t";break;case 117:var d=(o=u.charCodeAt(l+1),s=u.charCodeAt(l+2),a=u.charCodeAt(l+3),c=u.charCodeAt(l+4),st(o)<<12|st(s)<<8|st(a)<<4|st(c));if(d<0){var v=u.slice(l+1,l+5);throw De(e,l,"Invalid character escape sequence: \\u".concat(v,"."))}f+=String.fromCharCode(d),l+=4;break;default:throw De(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(p),"."))}h=++l}}throw De(e,l,"Unterminated string.")}function ot(e,t,r,n,i,o){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 qe(Be.BLOCK_STRING,t,a+3,r,n,i,Je(l));if(u<32&&9!==u&&10!==u&&13!==u)throw De(e,a,"Invalid character within String: ".concat(Xe(u),"."));10===u?(++a,++o.line,o.lineStart=a):13===u?(10===s.charCodeAt(a+1)?a+=2:++a,++o.line,o.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 De(e,a,"Unterminated string.")}function st(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function at(e,t,r,n,i){for(var o=e.body,s=o.length,a=t+1,c=0;a!==s&&!isNaN(c=o.charCodeAt(a))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++a;return new qe(Be.NAME,t,a,r,n,i,o.slice(t,a))}var ct=function(){function e(e,t){var r=function(e){return e instanceof Ye}(e)?e:new Ye(e);this._lexer=new Qe(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(Be.NAME);return{kind:Pe.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:Pe.DOCUMENT,definitions:this.many(Be.SOF,this.parseDefinition,Be.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(Be.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(Be.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(Be.BRACE_L))return{kind:Pe.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(Be.NAME)&&(t=this.parseName()),{kind:Pe.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(Be.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(Be.PAREN_L,this.parseVariableDefinition,Be.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:Pe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Be.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Be.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(Be.DOLLAR),{kind:Pe.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:Pe.SELECTION_SET,selections:this.many(Be.BRACE_L,this.parseSelection,Be.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(Be.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(Be.COLON)?(e=n,t=this.parseName()):t=n,{kind:Pe.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Be.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Be.PAREN_L,t,Be.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(Be.COLON),{kind:Pe.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:Pe.ARGUMENT,name:this.parseName(),value:(this.expectToken(Be.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(Be.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(Be.NAME)?{kind:Pe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:Pe.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:Pe.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:Pe.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 Be.BRACKET_L:return this.parseList(e);case Be.BRACE_L:return this.parseObject(e);case Be.INT:return this._lexer.advance(),{kind:Pe.INT,value:t.value,loc:this.loc(t)};case Be.FLOAT:return this._lexer.advance(),{kind:Pe.FLOAT,value:t.value,loc:this.loc(t)};case Be.STRING:case Be.BLOCK_STRING:return this.parseStringLiteral();case Be.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:Pe.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:Pe.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:Pe.NULL,loc:this.loc(t)};default:return{kind:Pe.ENUM,value:t.value,loc:this.loc(t)}}case Be.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:Pe.STRING,value:e.value,block:e.kind===Be.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:Pe.LIST,values:this.any(Be.BRACKET_L,(function(){return t.parseValueLiteral(e)}),Be.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:Pe.OBJECT,fields:this.any(Be.BRACE_L,(function(){return t.parseObjectField(e)}),Be.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(Be.COLON),{kind:Pe.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(Be.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(Be.AT),{kind:Pe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(Be.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(Be.BRACKET_R),e={kind:Pe.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(Be.BANG)?{kind:Pe.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:Pe.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===Be.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(Be.STRING)||this.peek(Be.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(Be.BRACE_L,this.parseOperationTypeDefinition,Be.BRACE_R);return{kind:Pe.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(Be.COLON);var r=this.parseNamedType();return{kind:Pe.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:Pe.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(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Pe.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o,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(Be.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(Be.AMP)||this.peek(Be.NAME));return t}return this.delimitedMany(Be.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(Be.BRACE_L)&&this._lexer.lookahead().kind===Be.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Be.BRACE_L,this.parseFieldDefinition,Be.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(Be.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:Pe.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(Be.PAREN_L,this.parseInputValueDef,Be.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(Be.COLON);var n,i=this.parseTypeReference();this.expectOptionalToken(Be.EQUALS)&&(n=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:Pe.INPUT_VALUE_DEFINITION,description:t,name:r,type:i,defaultValue:n,directives:o,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(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Pe.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o,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),i=this.parseUnionMemberTypes();return{kind:Pe.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(Be.EQUALS)?this.delimitedMany(Be.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),i=this.parseEnumValuesDefinition();return{kind:Pe.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(Be.BRACE_L,this.parseEnumValueDefinition,Be.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:Pe.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),i=this.parseInputFieldsDefinition();return{kind:Pe.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(Be.BRACE_L,this.parseInputValueDef,Be.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===Be.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(Be.BRACE_L,this.parseOperationTypeDefinition,Be.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:Pe.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:Pe.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),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:Pe.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,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),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return{kind:Pe.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i,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:Pe.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:Pe.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:Pe.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(Be.AT);var r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:Pe.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(Be.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==Ge[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 Ue(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 De(this._lexer.source,t.start,"Expected ".concat(lt(e),", found ").concat(ut(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!==Be.NAME||t.value!==e)throw De(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(ut(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===Be.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return De(this._lexer.source,t.start,"Unexpected ".concat(ut(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 ut(e){var t=e.value;return lt(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function lt(e){return function(e){return e===Be.BANG||e===Be.DOLLAR||e===Be.AMP||e===Be.PAREN_L||e===Be.PAREN_R||e===Be.SPREAD||e===Be.COLON||e===Be.EQUALS||e===Be.AT||e===Be.BRACKET_L||e===Be.BRACKET_R||e===Be.BRACE_L||e===Be.PIPE||e===Be.BRACE_R}(e)?'"'.concat(e,'"'):e}
8
+ /*! https://mths.be/punycode v1.3.2 by @mathias */var ht=i((function(e,t){!function(r){var i=t&&!t.nodeType&&t,o=e&&!e.nodeType&&e,s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self!==s||(r=s);var a,c,u=2147483647,l=36,h=/^xn--/,p=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,y=String.fromCharCode;function m(e){throw RangeError(d[e])}function g(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function E(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+g((e=e.replace(f,".")).split("."),t).join(".")}function b(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function T(e){return g(e,(function(e){var t="";return e>65535&&(t+=y((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=y(e)})).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,r){var n=0;for(e=r?v(e/700):e>>1,e+=v(e/t);e>455;n+=l)e=v(e/35);return v(n+36*e/(e+38))}function _(e){var t,r,n,i,o,s,a,c,h,p,f,d=[],y=e.length,g=0,E=128,b=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&m("not-basic"),d.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=g,s=1,a=l;i>=y&&m("invalid-input"),((c=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:l)>=l||c>v((u-g)/s))&&m("overflow"),g+=c*s,!(c<(h=a<=b?1:a>=b+26?26:a-b));a+=l)s>v(u/(p=l-h))&&m("overflow"),s*=p;b=w(g-o,t=d.length+1,0==o),v(g/t)>u-E&&m("overflow"),E+=v(g/t),g%=t,d.splice(g++,0,E)}return T(d)}function N(e){var t,r,n,i,o,s,a,c,h,p,f,d,g,E,T,_=[];for(d=(e=b(e)).length,t=128,r=0,o=72,s=0;s<d;++s)(f=e[s])<128&&_.push(y(f));for(n=i=_.length,i&&_.push("-");n<d;){for(a=u,s=0;s<d;++s)(f=e[s])>=t&&f<a&&(a=f);for(a-t>v((u-r)/(g=n+1))&&m("overflow"),r+=(a-t)*g,t=a,s=0;s<d;++s)if((f=e[s])<t&&++r>u&&m("overflow"),f==t){for(c=r,h=l;!(c<(p=h<=o?1:h>=o+26?26:h-o));h+=l)T=c-p,E=l-p,_.push(y(O(p+T%E,0))),c=v(T/E);_.push(y(O(c,0))),o=w(r,g,n==i),r=0,++n}++r,++t}return _.join("")}if(a={version:"1.3.2",ucs2:{decode:b,encode:T},decode:_,encode:N,toASCII:function(e){return E(e,(function(e){return p.test(e)?"xn--"+N(e):e}))},toUnicode:function(e){return E(e,(function(e){return h.test(e)?_(e.slice(4).toLowerCase()):e}))}},i&&o)if(e.exports==i)o.exports=a;else for(c in a)a.hasOwnProperty(c)&&(i[c]=a[c]);else r.punycode=a}(n)})),pt=function(e){return"string"==typeof e},ft=function(e){return"object"==typeof e&&null!==e},dt=function(e){return null===e},vt=function(e){return null==e};function yt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var mt=function(e,t,r,n){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var a=e.length;s>0&&a>s&&(a=s);for(var c=0;c<a;++c){var u,l,h,p,f=e[c].replace(o,"%20"),d=f.indexOf(r);d>=0?(u=f.substr(0,d),l=f.substr(d+1)):(u=f,l=""),h=decodeURIComponent(u),p=decodeURIComponent(l),yt(i,h)?Array.isArray(i[h])?i[h].push(p):i[h]=[i[h],p]:i[h]=p}return i},gt=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},Et=function(e,t,r,n){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(n){var i=encodeURIComponent(gt(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return i+encodeURIComponent(gt(e))})).join(t):i+encodeURIComponent(gt(e[n]))})).join(t):n?encodeURIComponent(gt(n))+r+encodeURIComponent(gt(e)):""},bt=i((function(e,t){t.decode=t.parse=mt,t.encode=t.stringify=Et})),Tt=function(e){pt(e)&&(e=Dt(e));return e instanceof Ot?e.format():Ot.prototype.format.call(e)};function Ot(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var wt=/^([a-z0-9.+-]+:)/i,_t=/:[0-9]*$/,Nt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,St=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),kt=["'"].concat(St),It=["%","/","?",";","#"].concat(kt),xt=["/","?","#"],At=/^[+a-z0-9A-Z_-]{0,63}$/,Rt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ct={javascript:!0,"javascript:":!0},Lt={javascript:!0,"javascript:":!0},jt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Dt(e,t,r){if(e&&ft(e)&&e instanceof Ot)return e;var n=new Ot;return n.parse(e,t,r),n}Ot.prototype.parse=function(e,t,r){if(!pt(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=-1!==n&&n<e.indexOf("#")?"?":"#",o=e.split(i);o[0]=o[0].replace(/\\/g,"/");var s=e=o.join(i);if(s=s.trim(),!r&&1===e.split("#").length){var a=Nt.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=t?bt.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=wt.exec(s);if(c){var u=(c=c[0]).toLowerCase();this.protocol=u,s=s.substr(c.length)}if(r||c||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===s.substr(0,2);!l||c&&Lt[c]||(s=s.substr(2),this.slashes=!0)}if(!Lt[c]&&(l||c&&!jt[c])){for(var h,p,f=-1,d=0;d<xt.length;d++){-1!==(v=s.indexOf(xt[d]))&&(-1===f||v<f)&&(f=v)}-1!==(p=-1===f?s.lastIndexOf("@"):s.lastIndexOf("@",f))&&(h=s.slice(0,p),s=s.slice(p+1),this.auth=decodeURIComponent(h)),f=-1;for(d=0;d<It.length;d++){var v;-1!==(v=s.indexOf(It[d]))&&(-1===f||v<f)&&(f=v)}-1===f&&(f=s.length),this.host=s.slice(0,f),s=s.slice(f),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var m=this.hostname.split(/\./),g=(d=0,m.length);d<g;d++){var E=m[d];if(E&&!E.match(At)){for(var b="",T=0,O=E.length;T<O;T++)E.charCodeAt(T)>127?b+="x":b+=E[T];if(!b.match(At)){var w=m.slice(0,d),_=m.slice(d+1),N=E.match(Rt);N&&(w.push(N[1]),_.unshift(N[2])),_.length&&(s="/"+_.join(".")+s),this.hostname=w.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=ht.toASCII(this.hostname));var S=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+S,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Ct[u])for(d=0,g=kt.length;d<g;d++){var I=kt[d];if(-1!==s.indexOf(I)){var x=encodeURIComponent(I);x===I&&(x=escape(I)),s=s.split(I).join(x)}}var A=s.indexOf("#");-1!==A&&(this.hash=s.substr(A),s=s.slice(0,A));var R=s.indexOf("?");if(-1!==R?(this.search=s.substr(R),this.query=s.substr(R+1),t&&(this.query=bt.parse(this.query)),s=s.slice(0,R)):t&&(this.search="",this.query={}),s&&(this.pathname=s),jt[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){S=this.pathname||"";var C=this.search||"";this.path=S+C}return this.href=this.format(),this},Ot.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&ft(this.query)&&Object.keys(this.query).length&&(o=bt.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||jt[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},Ot.prototype.resolve=function(e){return this.resolveObject(Dt(e,!1,!0)).format()},Ot.prototype.resolveObject=function(e){if(pt(e)){var t=new Ot;t.parse(e,!1,!0),e=t}for(var r=new Ot,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),a=0;a<s.length;a++){var c=s[a];"protocol"!==c&&(r[c]=e[c])}return jt[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!jt[e.protocol]){for(var u=Object.keys(e),l=0;l<u.length;l++){var h=u[l];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||Lt[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var f=r.pathname||"",d=r.search||"";r.path=f+d}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),m=y||v||r.host&&e.pathname,g=m,E=r.pathname&&r.pathname.split("/")||[],b=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!jt[r.protocol]);if(b&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),m=m&&(""===p[0]||""===E[0])),y)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),r.search=e.search,r.query=e.query;else if(!vt(e.search)){if(b)r.hostname=r.host=E.shift(),(N=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=N.shift(),r.host=r.hostname=N.shift());return r.search=e.search,r.query=e.query,dt(r.pathname)&&dt(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=E.slice(-1)[0],O=(r.host||e.host||E.length>1)&&("."===T||".."===T)||""===T,w=0,_=E.length;_>=0;_--)"."===(T=E[_])?E.splice(_,1):".."===T?(E.splice(_,1),w++):w&&(E.splice(_,1),w--);if(!m&&!g)for(;w--;w)E.unshift("..");!m||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),O&&"/"!==E.join("/").substr(-1)&&E.push("");var N,S=""===E[0]||E[0]&&"/"===E[0].charAt(0);b&&(r.hostname=r.host=S?"":E.length?E.shift():"",(N=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=N.shift(),r.host=r.hostname=N.shift()));return(m=m||r.host&&E.length)&&!S&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),dt(r.pathname)&&dt(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},Ot.prototype.parseHost=function(){var e=this.host,t=_t.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Pt=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:Tt({protocol:e.url.protocol,host:e.url.host,pathname:e.url.pathname});function Mt(e){var t,r;try{const n=new ct(e,r).parseDocument().definitions.find((e=>"OperationDefinition"===e.kind));return{operationType:null==n?void 0:n.operation,operationName:null===(t=null==n?void 0:n.name)||void 0===t?void 0:t.value}}catch(e){return e}}function Ft(e){var t,r;switch(e.method){case"GET":return{query:e.url.searchParams.get("query"),variables:C(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,i=
9
9
  /*! *****************************************************************************
10
10
  Copyright (c) Microsoft Corporation.
11
11
 
@@ -20,4 +20,4 @@ var MockServiceWorker=function(e){"use strict";var t={100:"Continue",101:"Switch
20
20
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
21
  PERFORMANCE OF THIS SOFTWARE.
22
22
  ***************************************************************************** */
23
- function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["operations","map"]),o=F(n)||{};if(!o.query)return null;const s=F(r||"")||{},a=o.variables?function(e,t,n){const r={variables:e};for(const[e,i]of Object.entries(t)){if(!(e in n))throw new Error(`Given files do not have a key '${e}' .`);for(const t of i){const[i,...o]=t.split(".").reverse(),s=o.reverse();let a=r;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[i]=n[e]}}return r.variables}(o.variables,s,i):{};return{query:o.query,variables:a}}default:return null}}function Vt(e){const t=Ht(e);if(!t||!t.query)return;const{query:n,variables:r}=t,i=Wt(n);if(i instanceof Error){const t=$t(e);return console.error(`[MSW] Failed to intercept a GraphQL request to "${e.method} ${t}": cannot parse query. See the error message from the parser below.`),void console.error(i)}return{operationType:i.operationType,operationName:i.operationName,variables:r}}function Yt(e,t){return e.toLowerCase()===t.toLowerCase()}function Gt(e){return e<300?"#69AB32":e<400?"#F0BB4B":"#E95F5D"}function Jt(){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 zt(e){return Object.assign(Object.assign({},e),{headers:e.headers.getAllHeaders()})}function Qt(e){var t,n;const r=_(e),i=r.get("content-type")||"text/plain",o=r.get("content-disposition");if(!o)throw new Error('"Content-Disposition" header is required.');const s=o.split(";").reduce(((e,t)=>{const[n,...r]=t.trim().split("=");return e[n]=r.join("="),e}),{});return{name:null===(t=s.name)||void 0===t?void 0:t.slice(1,-1),filename:null===(n=s.filename)||void 0===n?void 0:n.slice(1,-1),contentType:i}}function Xt(e,t){if(e){const n=null==t?void 0:t.get("content-type");if((null==n?void 0:n.startsWith("multipart/form-data"))&&"object"!=typeof e)return function(e,t){const n=null==t?void 0:t.get("content-type");if(!n)return;const[,...r]=n.split("; "),i=r.filter((e=>e.startsWith("boundary="))).map((e=>e.replace(/^boundary=/,"")))[0];if(!i)return;const o=new RegExp(`--+${i}`),s=e.split(o).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,...n]=e.split("\r\n\r\n"),r=n.join("\r\n\r\n"),{contentType:i,filename:o,name:s}=Qt(t),c=void 0===o?r:new File([r],o,{type:i}),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,t)||e;return(null==n?void 0:n.includes("json"))&&"object"!=typeof e&&F(e)||e}return e}function Zt(e){const t=I(e.headers);return Object.assign(Object.assign({},e),{body:Xt(e.body,t)})}const en=(e,t)=>{const n=(e instanceof RegExp?e:(e=>{const t=e.replace(/\./g,"\\.").replace(/\//g,"/").replace(/\?/g,"\\?").replace(/\/+$/,"").replace(/\*+/g,".*").replace(/:([^\d|^\/][a-zA-Z0-9_]*(?=(?:\/|\\.)|$))/g,((e,t)=>`(?<${t}>[^/]+?)`)).concat("(\\/|$)");return new RegExp(t,"gi")})(e)).exec(t)||!1,r=e instanceof RegExp?!!n:!!n&&n[0]===n.input;return{matches:r,params:n&&r&&n.groups||null}};var tn=te((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getCleanUrl=void 0,t.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")}}));const nn=e=>{const t="undefined"!=typeof location;return"string"==typeof e&&e.startsWith("/")?`${t?location.origin:""}${e}`:e};function rn(e){if(e instanceof RegExp||e.includes("*"))return e;try{return new URL(nn(e))}catch(t){return e}}function on(e,t){const n=function(e){return e instanceof URL?tn.getCleanUrl(e):e instanceof RegExp?e:nn(e)}(rn(t)),r=tn.getCleanUrl(e);return en(n,r)}function sn(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}class an extends Error{constructor(e){super(e),this.name="NetworkError"}}const cn={status:200,statusText:"OK",body:null,delay:0,once:!1},un=[];function ln(e,t=un){return(...n)=>Te(this,void 0,void 0,(function*(){const r=Object.assign({},cn,{headers:new N({"x-powered-by":"msw"})},e),i=[...t,...n].filter(Boolean);return i.length>0?sn(...i)(r):r}))}const hn=Object.assign(ln(),{once:ln({once:!0}),networkError(e){throw new an(e)}});const pn={status:n,set:S,delay:V,fetch:z};class fn{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||pn,this.resolver=e.resolver;const t=function(){const e=(new Error).stack.split("\n"),t=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/,n=e.slice(1).find((e=>!t.test(e)));if(!n)return;return n.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,"")}();this.info=Object.assign(Object.assign({},e.info),{callFrame:t})}parse(e){return null}test(e){return this.predicate(e,this.parse(e))}getPublicRequest(e,t){return e}markAsSkipped(e=!0){this.shouldSkip=e}run(e){return Te(this,void 0,void 0,(function*(){if(this.shouldSkip)return null;const t=this.parse(e);if(!this.predicate(e,t))return null;const n=this.getPublicRequest(e,t),r=yield this.resolver(n,hn,this.ctx);return this.createExecutionResult(t,n,r)}))}createExecutionResult(e,t,n){return{handler:this,parsedResult:e||null,request:t,response:n||null}}}var dn;e.RESTMethods=void 0,(dn=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",dn.GET="GET",dn.POST="POST",dn.PUT="PUT",dn.PATCH="PATCH",dn.OPTIONS="OPTIONS",dn.DELETE="DELETE";const vn={set:S,status:n,cookie:P,body:M,text:Q,json:B,xml:X,delay:V,fetch:z};class mn extends fn{constructor(e,t,n){super({info:{header:`${e} ${t}`,mask:t,method:e},ctx:vn,resolver:n}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,mask:t}=this.info,n=rn(t);if(n instanceof URL&&""!==n.search){const r=[];n.searchParams.forEach(((e,t)=>{r.push(t)})),console.warn(`[MSW] 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:\n\nrest.${e.toLowerCase()}("${n.pathname}", (req, res, ctx) => {\n const query = req.url.searchParams\n${r.map((e=>` const ${e} = query.get("${e}")`)).join("\n")}\n}) `)}}parse(e){return on(e.url,this.info.mask)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params})}predicate(e,t){return Yt(this.info.method,e.method)&&t.matches}log(e,t){const n=$t(e),r=zt(e),i=Zt(t);console.groupCollapsed("[MSW] %s %s %s (%c%s%c)",Jt(),e.method,n,`color:${Gt(t.status)}`,t.status,"color:inherit"),console.log("Request",r),console.log("Handler:",{mask:this.info.mask,resolver:this.resolver}),console.log("Response",i),console.groupEnd()}}const yn={set:S,status:n,delay:V,fetch:z,data:K,errors:Y};class En extends fn{constructor(e,t,n,r){super({info:{header:"all"===e?`${e} (origin: ${n.toString()})`:`${e} ${t} (origin: ${n.toString()})`,operationType:e,operationName:t},ctx:yn,resolver:r}),this.endpoint=n}parse(e){return Vt(e)}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){const t=$t(e);return console.warn(`[MSW] Failed to intercept a GraphQL request at "${e.method} ${t}": unnamed 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 n=on(e.url,this.endpoint),r="all"===this.info.operationType||t.operationType===this.info.operationType,i=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName):t.operationName===this.info.operationName;return n.matches&&r&&i}log(e,t){const n=zt(e),r=Zt(t);console.groupCollapsed("[MSW] %s %s (%c%s%c)",Jt(),this.info.operationName,`color:${Gt(t.status)}`,t.status,"color:inherit"),console.log("Request:",n),console.log("Handler:",this),console.log("Response:",r),console.groupEnd()}}function gn(e,t,n="bypass"){if("function"==typeof n)return void n(e);const r=Vt(e),i=function(e){return e.reduce(((e,t)=>(t instanceof mn&&e.rest.push(t),t instanceof En&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),o=function(e,t,n){return t.reduce(((t,r)=>{const i=n(e,r);return t.concat([[i,r]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,r?i.graphql:i.rest,r?(s=r,(e,t)=>{if(void 0===s.operationName)return 1/0;const{operationType:n,operationName:r}=t.info,i=s.operationType===n?.5:0;return we(s.operationName,r)-i}):(e,t)=>{const{mask:n,method:r}=t.info;if(n instanceof RegExp)return 1/0;const i=Yt(e.method,r)?.5:0,o=$t(e);return we(o,n)-i});var s;const a=o.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?`}(o):"",c=$t(e),u=["captured a request without a matching request handler:",` • ${r?`${r.operationType} ${r.operationName} (${e.method} ${c})`:`${e.method} ${c}`}`,a,"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(n){case"error":console.error(`[MSW] Error: ${u}`);break;case"warn":console.warn(`[MSW] Warning: ${u}`);break;default:return}}var Tn={decodeValues:!0,map:!1,silent:!1};function bn(e){return"string"==typeof e&&!!e.trim()}function On(e,t){var n=e.split(";").filter(bn),r=n.shift().split("="),i=r.shift(),o=r.join("=");t=t?Object.assign({},Tn,t):Tn;try{o=t.decodeValues?decodeURIComponent(o):o}catch(e){console.error(`set-cookie-parser encountered an error while decoding a cookie with value '${o}'. Set options.decodeValues to false to disable this feature.`,e)}var s={name:i,value:o};return n.forEach((function(e){var t=e.split("="),n=t.shift().trimLeft().toLowerCase(),r=t.join("=");"expires"===n?s.expires=new Date(r):"max-age"===n?s.maxAge=parseInt(r,10):"secure"===n?s.secure=!0:"httponly"===n?s.httpOnly=!0:"samesite"===n?s.sameSite=r:s[n]=r})),s}function Nn(e,t){if(t=t?Object.assign({},Tn,t):Tn,!e)return t.map?{}:[];if(e.headers&&e.headers["set-cookie"])e=e.headers["set-cookie"];else if(e.headers){var n=e.headers[Object.keys(e.headers).find((function(e){return"set-cookie"===e.toLowerCase()}))];n||!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=n}if(Array.isArray(e)||(e=[e]),(t=t?Object.assign({},Tn,t):Tn).map){return e.filter(bn).reduce((function(e,n){var r=On(n,t);return e[r.name]=r,e}),{})}return e.filter(bn).map((function(e){return On(e,t)}))}var wn=Nn,_n=Nn,In=On,kn=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,n,r,i,o,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,o=!1;c();)if(","===(n=e.charAt(a))){for(r=a,a+=1,c(),i=a;a<e.length&&"="!==(n=e.charAt(a))&&";"!==n&&","!==n;)a+=1;a<e.length&&"="===e.charAt(a)?(o=!0,a=i,s.push(e.substring(t,r)),t=a):a=r+1}else a+=1;(!o||a>=e.length)&&s.push(e.substring(t,e.length))}return s};wn.parse=_n,wn.parseString=In,wn.splitCookiesString=kn;var Sn=te((function(e,t){var n=ee&&ee.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.PERSISTENCY_KEY=void 0,t.PERSISTENCY_KEY="MSW_COOKIE_STORE";t.default=new class{constructor(){this.store=new Map,this.supportsPersistency="undefined"!=typeof window}add(e,t){if("omit"===e.credentials)return;const r=new URL(e.url),i=t.headers.get("set-cookie");if(!i)return;const o=Date.now(),s=wn.parse(i).map((e=>{var{maxAge:t}=e,r=n(e,["maxAge"]);return Object.assign(Object.assign({},r),{expires:void 0===t?r.expires:new Date(o+1e3*t),maxAge:t})})).filter((({expires:e})=>void 0===e||e.getTime()>o)),a=this.store.get(r.origin)||new Map;s.forEach((e=>{this.store.set(r.origin,a.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 wn.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(!this.supportsPersistency)return;const e=localStorage.getItem(t.PERSISTENCY_KEY);if(e)try{JSON.parse(e).forEach((([e,t])=>{this.store.set(e,new Map(t))}))}catch(e){console.warn(`\n[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${t.PERSISTENCY_KEY}").\n\nStored value:\n${localStorage.getItem(t.PERSISTENCY_KEY)}\n\nThrown exception:\n${e}\n\nInvalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(t.PERSISTENCY_KEY)}}persist(){if(!this.supportsPersistency)return;const e=Array.from(this.store.entries()).map((([e,t])=>[e,Array.from(t.entries())]));localStorage.setItem(t.PERSISTENCY_KEY,JSON.stringify(e))}deleteExpiredCookies(){const e=Date.now();this.store.forEach(((t,n)=>{t.forEach((({expires:n,name:r})=>{void 0!==n&&n.getTime()<=e&&t.delete(r)})),0===t.size&&this.store.delete(n)}))}}})),An=te((function(e,t){var n=ee&&ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PERSISTENCY_KEY=t.store=void 0,Object.defineProperty(t,"store",{enumerable:!0,get:function(){return n(Sn).default}}),Object.defineProperty(t,"PERSISTENCY_KEY",{enumerable:!0,get:function(){return Sn.PERSISTENCY_KEY}})}));function xn(){return A(document.cookie)}function Rn(e){var t;An.store.hydrate(),e.cookies=Object.assign(Object.assign({},function(e){if("undefined"==typeof location)return{};switch(e.credentials){case"same-origin":return location.origin===e.url.origin?xn():{};case"include":return xn();default:return{}}}(e)),Array.from(null===(t=An.store.get(Object.assign(Object.assign({},e),{url:e.url.toString()})))||void 0===t?void 0:t.entries()).reduce(((e,[t,{value:n}])=>Object.assign(e,{[t]:n})),{})),e.headers.set("cookie",Object.entries(e.cookies).map((([e,t])=>`${e}=${t}`)).join("; "))}function Cn(e){if(!e.method||!Yt(e.method,"GET")||""!==e.body)return e.body}const Ln=(e,t)=>(n,r)=>Te(void 0,void 0,void 0,(function*(){const i=(e=>{const t=e.ports[0];return{send(e){t&&t.postMessage(e)}}})(n);try{const n=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:Cn(e),bodyUsed:e.bodyUsed,headers:new N(e.headers)};return Rn(t),t.body=Xt(t.body,t.headers),t}(r.payload);e.emitter.emit("request:start",n),Rn(n);const{response:o,handler:s,publicRequest:a,parsedRequest:c}=yield((e,t)=>Te(void 0,void 0,void 0,(function*(){const n=t.filter((t=>t.test(e)));if(0===n.length)return{handler:void 0,response:void 0};const r=yield n.reduce(((t,n)=>Te(void 0,void 0,void 0,(function*(){const r=yield t;if(null==r?void 0:r.response)return t;const i=yield n.run(e);return null===i||!i.response||i.handler.shouldSkip?null:(i.response.once&&n.markAsSkipped(!0),i)}))),Promise.resolve(null));return r?{handler:r.handler,publicRequest:r.request,parsedRequest:r.parsedResult,response:r.response}:{handler:void 0,response:void 0}})))(n,e.requestHandlers);if(!s)return gn(n,e.requestHandlers,t.onUnhandledRequest),e.emitter.emit("request:unhandled",n),e.emitter.emit("request:end",n),i.send({type:"MOCK_NOT_FOUND"});if(e.emitter.emit("request:match",n),!o)return console.warn("[MSW] Expected a mocking resolver function to return a mocked response Object, but got: %s. Original response is going to be used instead.",o),e.emitter.emit("request:end",n),i.send({type:"MOCK_NOT_FOUND"});!function(e,t){An.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),An.store.persist()}(n,o);const u=Object.assign(Object.assign({},o),{headers:w(o.headers)});t.quiet||setTimeout((()=>{s.log(a,u,s,c)}),o.delay),e.emitter.emit("request:end",n),i.send({type:"MOCK_SUCCESS",payload:u})}catch(e){if(e instanceof an)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 Dn={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"bypass",findWorker:(e,t)=>e===t},jn=e=>function(t){const n=q(Dn,t||{});e.startOptions=n;const r=(()=>Te(this,void 0,void 0,(function*(){if(!("serviceWorker"in navigator))throw new Error("[MSW] Failed to register a Service Worker: this browser does not support Service Workers (see https://caniuse.com/serviceworkers), or your application is running on an insecure host (consider using HTTPS for custom hostnames).");e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Ln(e,n)),e.workerChannel.on("RESPONSE",function(e){return(t,n)=>{var r;const{payload:i}=n;if(null===(r=i.type)||void 0===r?void 0:r.includes("opaque"))return;const o=new Response(i.body||null,i);"msw"===o.headers.get("x-powered-by")?e.emitter.emit("response:mocked",o,i.requestId):e.emitter.emit("response:bypass",o,i.requestId)}}(e));const r=yield Ne(n.serviceWorker.url,n.serviceWorker.options,n.findWorker),[i,o]=r;if(!i){const e=(null==t?void 0:t.findWorker)?`[MSW] 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 "${n.serviceWorker.url}".\nMore details: https://mswjs.io/docs/api/setup-worker/start#findworker\n`:`[MSW] Failed to locate the Service Worker registration.\n\nThis most likely means that the worker script URL "${n.serviceWorker.url}" cannot resolve against the actual public hostname (${location.host}). 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`;throw new Error(e)}e.worker=i,e.registration=o,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==i.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield be((()=>function(e,t){return Te(this,void 0,void 0,(function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:n}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if("f7d0ed371e596d181f62c6f68c4b7baf"!==n)throw new Error(`Currently active Service Worker (${n}) is behind the latest published one (f7d0ed371e596d181f62c6f68c4b7baf).`);return t}))}(e,i)));return s&&console.error(`[MSW] 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((e,t)=>Te(void 0,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{(null==t?void 0:t.quiet)||(console.groupCollapsed("%c[MSW] Mocking enabled.","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())}))})))(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),o})))();return n.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...n){be((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...n)}))};const n=window.fetch;window.fetch=(...t)=>Te(this,void 0,void 0,(function*(){return yield be((()=>e)),window.fetch=n,window.fetch(...t)}))}(r),r},Pn=e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),e.events.removeAllListeners(),e.emitter.removeAllListeners(),window.clearInterval(e.keepAliveInterval),(null===(t=e.startOptions)||void 0===t?void 0:t.quiet)||console.log("%c[MSW] Mocking disabled.","color:orangered;font-weight:bold;")};let Mn=[];function Fn(e){return(t,n)=>new mn(e,t,n)}const Un={head:Fn(e.RESTMethods.HEAD),get:Fn(e.RESTMethods.GET),post:Fn(e.RESTMethods.POST),put:Fn(e.RESTMethods.PUT),delete:Fn(e.RESTMethods.DELETE),patch:Fn(e.RESTMethods.PATCH),options:Fn(e.RESTMethods.OPTIONS)};function qn(e,t){return(n,r)=>new En(e,n,t,r)}function Bn(e){return t=>new En("all",new RegExp(".*"),e,t)}const Kn={operation:Bn("*"),query:qn("query","*"),mutation:qn("mutation","*")};const $n=Object.assign(Object.assign({},Kn),{link:function(e){return{operation:Bn(e),query:qn("query",e),mutation:qn("mutation",e)}}});return e.GraphQLHandler=En,e.RequestHandler=fn,e.RestHandler=mn,e.compose=sn,e.context=Z,e.createResponseComposition=ln,e.defaultContext=pn,e.defaultResponse=cn,e.graphql=$n,e.graphqlContext=yn,e.matchRequestUrl=on,e.response=hn,e.rest=Un,e.restContext=vn,e.setupWorker=function(...e){e.forEach((e=>{if(Array.isArray(e))throw new Error('[MSW] Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).')}));const t={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:new ge.StrictEventEmitter,workerChannel:{on(e,n){t.events.addListener(navigator.serviceWorker,"message",(r=>{if(r.source!==t.worker)return;const i=F(r.data);i&&i.type===e&&n(r,i)}))},send(e){var n;null===(n=t.worker)||void 0===n||n.postMessage(e)}},events:{addListener:(e,t,n)=>(e.addEventListener(t,n),Mn.push({eventType:t,target:e,callback:n}),()=>{e.removeEventListener(t,n)}),removeAllListeners(){for(const{target:e,eventType:t,callback:n}of Mn)e.removeEventListener(t,n);Mn=[]},once(e){const n=[];return new Promise(((r,i)=>{n.push(t.events.addListener(navigator.serviceWorker,"message",(t=>{try{const n=JSON.parse(t.data);n.type===e&&r(n)}catch(e){i(e)}})),t.events.addListener(navigator.serviceWorker,"messageerror",i))})).finally((()=>{n.forEach((e=>e()))}))}}};if($())throw new Error("[MSW] Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead.");return{start:jn(t),stop:Pn(t),use(...e){console.log("adding new handlers",e),function(e,...t){e.unshift(...t)}(t.requestHandlers,...e)},restoreHandlers(){t.requestHandlers.forEach((e=>{e.markAsSkipped(!1)}))},resetHandlers(...n){t.requestHandlers=function(e,...t){return t.length>0?[...t]:[...e]}(e,...n)},printHandlers(){t.requestHandlers.forEach((e=>{const{header:t,callFrame:n}=e.info,r=e.info.hasOwnProperty("operationType")?"[graphql]":"[rest]";console.groupCollapsed(`${r} ${t}`),n&&console.log(`Declaration: ${n}`),console.log("Handler:",e),e instanceof mn&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.mask}`),console.groupEnd()}))},on(e,n){t.emitter.addListener(e,n)}}},e}({});
23
+ 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 i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(t,["operations","map"]),o=C(r)||{};if(!o.query)return null;const s=C(n||"")||{},a=o.variables?function(e,t,r){const n={variables:e};for(const[e,i]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of i){const[i,...o]=t.split(".").reverse(),s=o.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[i]=r[e]}}return n.variables}(o.variables,s,i):{};return{query:o.query,variables:a}}default:return null}}function Ut(e){const t=Ft(e);if(!t||!t.query)return;const{query:r,variables:n}=t,i=Mt(r);if(i instanceof Error){const t=Pt(e);return console.error(`[MSW] Failed to intercept a GraphQL request to "${e.method} ${t}": cannot parse query. See the error message from the parser below.`),void console.error(i)}return{operationType:i.operationType,operationName:i.operationName,variables:n}}function qt(e,t){return e.toLowerCase()===t.toLowerCase()}function Bt(e){return e<300?"#69AB32":e<400?"#F0BB4B":"#E95F5D"}function Ht(){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 Kt(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function $t(e){var t,r;const n=T.stringToHeaders(e),i=n.get("content-type")||"text/plain",o=n.get("content-disposition");if(!o)throw new Error('"Content-Disposition" header is required.');const s=o.split(";").reduce(((e,t)=>{const[r,...n]=t.trim().split("=");return e[r]=n.join("="),e}),{});return{name:null===(t=s.name)||void 0===t?void 0:t.slice(1,-1),filename:null===(r=s.filename)||void 0===r?void 0:r.slice(1,-1),contentType:i}}function Wt(e,t){if(e){const r=null==t?void 0:t.get("content-type");if((null==r?void 0:r.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(/; */),i=n.filter((e=>e.startsWith("boundary="))).map((e=>e.replace(/^boundary=/,"")))[0];if(!i)return;const o=new RegExp(`--+${i}`),s=e.split(o).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:i,filename:o,name:s}=$t(t),c=void 0===o?n:new File([n],o,{type:i}),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,t)||e;return(null==r?void 0:r.includes("json"))&&"object"!=typeof e&&C(e)||e}return e}function Vt(e){const t=T.listToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:Wt(e.body,t)})}const Yt=(e,t)=>{const r=(e instanceof RegExp?e:(e=>{const t=e.replace(/\./g,"\\.").replace(/\//g,"/").replace(/\?/g,"\\?").replace(/\/+$/,"").replace(/\*+/g,".*").replace(/:([^\d|^\/][a-zA-Z0-9_]*(?=(?:\/|\\.)|$))/g,((e,t)=>`(?<${t}>[^/]+?)`)).concat("(\\/|$)");return new RegExp(t,"gi")})(e)).exec(t)||!1,n=e instanceof RegExp?!!r:!!r&&r[0]===r.input;return{matches:n,params:r&&n&&r.groups||null}};var Gt=i((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getCleanUrl=void 0,t.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")}}));const Jt=e=>{const t="undefined"!=typeof location;return"string"==typeof e&&e.startsWith("/")?`${t?location.origin:""}${e}`:e};function zt(e){if(e instanceof RegExp||e.includes("*"))return e;try{return new URL(Jt(e))}catch(t){return e}}function Qt(e,t){const r=function(e){return e instanceof URL?Gt.getCleanUrl(e):e instanceof RegExp?e:Jt(e)}(zt(t)),n=Gt.getCleanUrl(e);return Yt(r,n)}function Xt(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}class Zt extends Error{constructor(e){super(e),this.name="NetworkError"}}const er={status:200,statusText:"OK",body:null,delay:0,once:!1},tr=[];function rr(e,t=tr){return(...r)=>fe(this,void 0,void 0,(function*(){const n=Object.assign({},er,{headers:new T.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?Xt(...i)(n):n}))}const nr=Object.assign(rr(),{once:rr({once:!0}),networkError(e){throw new Zt(e)}});const ir={status:r,set:O,delay:q,fetch:$};class or{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||ir,this.resolver=e.resolver;const t=function(){const e=((new Error).stack||"").split("\n"),t=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/,r=e.slice(1).find((e=>!t.test(e)));if(!r)return;return r.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,"")}();this.info=Object.assign(Object.assign({},e.info),{callFrame:t})}parse(e){return null}test(e){return this.predicate(e,this.parse(e))}getPublicRequest(e,t){return e}markAsSkipped(e=!0){this.shouldSkip=e}run(e){return fe(this,void 0,void 0,(function*(){if(this.shouldSkip)return null;const t=this.parse(e);if(!this.predicate(e,t))return null;const r=this.getPublicRequest(e,t),n=yield this.resolver(r,nr,this.ctx);return this.createExecutionResult(t,r,n)}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}var sr;e.RESTMethods=void 0,(sr=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",sr.GET="GET",sr.POST="POST",sr.PUT="PUT",sr.PATCH="PATCH",sr.OPTIONS="OPTIONS",sr.DELETE="DELETE";const ar={set:O,status:r,cookie:A,body:R,text:W,json:D,xml:V,delay:q,fetch:$};class cr extends or{constructor(e,t,r){super({info:{header:`${e} ${t}`,mask:t,method:e},ctx:ar,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,mask:t}=this.info,r=zt(t);if(r instanceof URL&&""!==r.search){const n=[];r.searchParams.forEach(((e,t)=>{n.push(t)})),console.warn(`[MSW] 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:\n\nrest.${e.toLowerCase()}("${r.pathname}", (req, res, ctx) => {\n const query = req.url.searchParams\n${n.map((e=>` const ${e} = query.get("${e}")`)).join("\n")}\n}) `)}}parse(e){return Qt(e.url,this.info.mask)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return qt(this.info.method,e.method)&&t.matches}log(e,t){const r=Pt(e),n=Kt(e),i=Vt(t);console.groupCollapsed("[MSW] %s %s %s (%c%s%c)",Ht(),e.method,r,`color:${Bt(t.status)}`,t.status,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.mask,resolver:this.resolver}),console.log("Response",i),console.groupEnd()}}const ur={set:O,status:r,delay:q,fetch:$,data:P,errors:B};class lr extends or{constructor(e,t,r,n){super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${t} (origin: ${r.toString()})`,operationType:e,operationName:t},ctx:ur,resolver:n}),this.endpoint=r}parse(e){return Ut(e)}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){const t=Pt(e);return console.warn(`[MSW] Failed to intercept a GraphQL request at "${e.method} ${t}": unnamed 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=Qt(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,i=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName):t.operationName===this.info.operationName;return r.matches&&n&&i}log(e,t){const r=Kt(e),n=Vt(t);console.groupCollapsed("[MSW] %s %s (%c%s%c)",Ht(),this.info.operationName,`color:${Bt(t.status)}`,t.status,"color:inherit"),console.log("Request:",r),console.log("Handler:",this),console.log("Response:",n),console.groupEnd()}}function hr(e,t,r="bypass"){if("function"==typeof r)return void r(e);const n=Ut(e),i=function(e){return e.reduce(((e,t)=>(t instanceof cr&&e.rest.push(t),t instanceof lr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),o=function(e,t,r){return t.reduce(((t,n)=>{const i=r(e,n);return t.concat([[i,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,n?i.graphql:i.rest,n?(s=n,(e,t)=>{if(void 0===s.operationName)return 1/0;const{operationType:r,operationName:n}=t.info,i=s.operationType===r?.5:0;return me(s.operationName,n)-i}):(e,t)=>{const{mask:r,method:n}=t.info;if(r instanceof RegExp)return 1/0;const i=qt(e.method,n)?.5:0,o=Pt(e);return me(o,r)-i});var s;const a=o.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?`}(o):"",c=Pt(e),u=["captured a request without a matching request handler:",` • ${n?`${n.operationType} ${n.operationName} (${e.method} ${c})`:`${e.method} ${c}`}`,a,"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":console.error(`[MSW] Error: ${u}`);break;case"warn":console.warn(`[MSW] Warning: ${u}`);break;default:return}}var pr={decodeValues:!0,map:!1,silent:!1};function fr(e){return"string"==typeof e&&!!e.trim()}function dr(e,t){var r=e.split(";").filter(fr),n=r.shift().split("="),i=n.shift(),o=n.join("=");t=t?Object.assign({},pr,t):pr;try{o=t.decodeValues?decodeURIComponent(o):o}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+o+"'. Set options.decodeValues to false to disable this feature.",e)}var s={name:i,value:o};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 vr(e,t){if(t=t?Object.assign({},pr,t):pr,!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({},pr,t):pr).map){return e.filter(fr).reduce((function(e,r){var n=dr(r,t);return e[n.name]=n,e}),{})}return e.filter(fr).map((function(e){return dr(e,t)}))}var yr=vr,mr=vr,gr=dr,Er=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,i,o,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,o=!1;c();)if(","===(r=e.charAt(a))){for(n=a,a+=1,c(),i=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(o=!0,a=i,s.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!o||a>=e.length)&&s.push(e.substring(t,e.length))}return s};yr.parse=mr,yr.parseString=gr,yr.splitCookiesString=Er;var br=i((function(e,t){var r=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 i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.PERSISTENCY_KEY=void 0,t.PERSISTENCY_KEY="MSW_COOKIE_STORE";t.default=new class{constructor(){this.store=new Map,this.supportsPersistency="undefined"!=typeof window}add(e,t){if("omit"===e.credentials)return;const n=new URL(e.url),i=t.headers.get("set-cookie");if(!i)return;const o=Date.now(),s=yr.parse(i).map((e=>{var{maxAge:t}=e,n=r(e,["maxAge"]);return Object.assign(Object.assign({},n),{expires:void 0===t?n.expires:new Date(o+1e3*t),maxAge:t})})).filter((({expires:e})=>void 0===e||e.getTime()>o)),a=this.store.get(n.origin)||new Map;s.forEach((e=>{this.store.set(n.origin,a.set(e.name,e))}))}get(e){this.deleteExpiredCookies();const t=new URL(e.url),r=this.store.get(t.origin)||new Map;switch(e.credentials){case"include":return yr.parse(document.cookie).forEach((e=>{r.set(e.name,e)})),r;case"same-origin":return r;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(!this.supportsPersistency)return;const e=localStorage.getItem(t.PERSISTENCY_KEY);if(e)try{JSON.parse(e).forEach((([e,t])=>{this.store.set(e,new Map(t.map((e=>{var[t,n]=e,{expires:i}=n,o=r(n,["expires"]);return[t,void 0===i?o:Object.assign(Object.assign({},o),{expires:new Date(i)})]}))))}))}catch(e){console.warn(`\n[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${t.PERSISTENCY_KEY}").\n\nStored value:\n${localStorage.getItem(t.PERSISTENCY_KEY)}\n\nThrown exception:\n${e}\n\nInvalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(t.PERSISTENCY_KEY)}}persist(){if(!this.supportsPersistency)return;const e=Array.from(this.store.entries()).map((([e,t])=>[e,Array.from(t.entries())]));localStorage.setItem(t.PERSISTENCY_KEY,JSON.stringify(e))}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)}))}}})),Tr=i((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PERSISTENCY_KEY=t.store=void 0,Object.defineProperty(t,"store",{enumerable:!0,get:function(){return r(br).default}}),Object.defineProperty(t,"PERSISTENCY_KEY",{enumerable:!0,get:function(){return br.PERSISTENCY_KEY}})}));function Or(){return w(document.cookie)}function wr(e){var t;Tr.store.hydrate(),e.cookies=Object.assign(Object.assign({},function(e){if("undefined"==typeof location)return{};switch(e.credentials){case"same-origin":return location.origin===e.url.origin?Or():{};case"include":return Or();default:return{}}}(e)),Array.from(null===(t=Tr.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 _r(e){if(!e.method||!qt(e.method,"GET")||""!==e.body)return e.body}const Nr=(e,t)=>(r,n)=>fe(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:_r(e),bodyUsed:e.bodyUsed,headers:new T.Headers(e.headers)};return wr(t),t.body=Wt(t.body,t.headers),t}(n.payload);e.emitter.emit("request:start",r),wr(r);const{response:o,handler:s,publicRequest:a,parsedRequest:c}=yield((e,t)=>fe(void 0,void 0,void 0,(function*(){const r=t.filter((t=>t.test(e)));if(0===r.length)return{handler:void 0,response:void 0};const n=yield r.reduce(((t,r)=>fe(void 0,void 0,void 0,(function*(){const n=yield t;if(null==n?void 0:n.response)return t;const i=yield r.run(e);return null===i||i.handler.shouldSkip?null:i.response?(i.response.once&&r.markAsSkipped(!0),i):{request:i.request,handler:i.handler,response:void 0,parsedResult:i.parsedResult}}))),Promise.resolve(null));return n?{handler:n.handler,publicRequest:n.request,parsedRequest:n.parsedResult,response:n.response}:{handler:void 0,response:void 0}})))(r,e.requestHandlers);if(!s)return hr(r,e.requestHandlers,t.onUnhandledRequest),e.emitter.emit("request:unhandled",r),e.emitter.emit("request:end",r),i.send({type:"MOCK_NOT_FOUND"});if(e.emitter.emit("request:match",r),!o)return console.warn("[MSW] Expected a mocking resolver function to return a mocked response Object, but got: %s. Original response is going to be used instead.",o),e.emitter.emit("request:end",r),i.send({type:"MOCK_NOT_FOUND"});!function(e,t){Tr.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),Tr.store.persist()}(r,o);const u=Object.assign(Object.assign({},o),{headers:T.headersToList(o.headers)});t.quiet||setTimeout((()=>{s.log(a,u,s,c)}),o.delay),e.emitter.emit("request:end",r),i.send({type:"MOCK_SUCCESS",payload:u})}catch(e){if(e instanceof Zt)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 Sr={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"bypass",findWorker:(e,t)=>e===t},kr=e=>function(t){const r=j(Sr,t||{});e.startOptions=r;const n=(()=>fe(this,void 0,void 0,(function*(){if(!("serviceWorker"in navigator))throw new Error("[MSW] Failed to register a Service Worker: this browser does not support Service Workers (see https://caniuse.com/serviceworkers), or your application is running on an insecure host (consider using HTTPS for custom hostnames).");e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Nr(e,r)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:i}=r;if(null===(n=i.type)||void 0===n?void 0:n.includes("opaque"))return;const o=new Response(i.body||null,i);"msw"===o.headers.get("x-powered-by")?e.emitter.emit("response:mocked",o,i.requestId):e.emitter.emit("response:bypass",o,i.requestId)}}(e));const n=yield ye(r.serviceWorker.url,r.serviceWorker.options,r.findWorker),[i,o]=n;if(!i){const e=(null==t?void 0:t.findWorker)?`[MSW] 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 "${r.serviceWorker.url}".\nMore details: https://mswjs.io/docs/api/setup-worker/start#findworker\n`:`[MSW] Failed to locate the Service Worker registration.\n\nThis most likely means that the worker script URL "${r.serviceWorker.url}" cannot resolve against the actual public hostname (${location.host}). 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`;throw new Error(e)}e.worker=i,e.registration=o,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==i.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield de((()=>function(e,t){return fe(this,void 0,void 0,(function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:r}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if("82ef9b96d8393b6da34527d1d6e19187"!==r)throw new Error(`Currently active Service Worker (${r}) is behind the latest published one (82ef9b96d8393b6da34527d1d6e19187).`);return t}))}(e,i)));return s&&console.error(`[MSW] 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((e,t)=>fe(void 0,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{(null==t?void 0:t.quiet)||(console.groupCollapsed("%c[MSW] Mocking enabled.","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())}))})))(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),o})))();return r.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)=>fe(this,void 0,void 0,(function*(){return yield de((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n},Ir=e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),e.events.removeAllListeners(),e.emitter.removeAllListeners(),window.clearInterval(e.keepAliveInterval),(null===(t=e.startOptions)||void 0===t?void 0:t.quiet)||console.log("%c[MSW] Mocking disabled.","color:orangered;font-weight:bold;")};let xr=[];function Ar(e){return(t,r)=>new cr(e,t,r)}const Rr={head:Ar(e.RESTMethods.HEAD),get:Ar(e.RESTMethods.GET),post:Ar(e.RESTMethods.POST),put:Ar(e.RESTMethods.PUT),delete:Ar(e.RESTMethods.DELETE),patch:Ar(e.RESTMethods.PATCH),options:Ar(e.RESTMethods.OPTIONS)};function Cr(e,t){return(r,n)=>new lr(e,r,t,n)}function Lr(e){return t=>new lr("all",new RegExp(".*"),e,t)}const jr={operation:Lr("*"),query:Cr("query","*"),mutation:Cr("mutation","*")};const Dr=Object.assign(Object.assign({},jr),{link:function(e){return{operation:Lr(e),query:Cr("query",e),mutation:Cr("mutation",e)}}});return e.GraphQLHandler=lr,e.RequestHandler=or,e.RestHandler=cr,e.compose=Xt,e.context=G,e.createResponseComposition=rr,e.defaultContext=ir,e.defaultResponse=er,e.graphql=Dr,e.graphqlContext=ur,e.matchRequestUrl=Qt,e.response=nr,e.rest=Rr,e.restContext=ar,e.setupWorker=function(...e){e.forEach((e=>{if(Array.isArray(e))throw new Error('[MSW] Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).')}));const t={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:new pe.StrictEventEmitter,workerChannel:{on(e,r){t.events.addListener(navigator.serviceWorker,"message",(n=>{if(n.source!==t.worker)return;const i=C(n.data);i&&i.type===e&&r(n,i)}))},send(e){var r;null===(r=t.worker)||void 0===r||r.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),xr.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of xr)e.removeEventListener(t,r);xr=[]},once(e){const r=[];return new Promise(((n,i)=>{r.push(t.events.addListener(navigator.serviceWorker,"message",(t=>{try{const r=JSON.parse(t.data);r.type===e&&n(r)}catch(e){i(e)}})),t.events.addListener(navigator.serviceWorker,"messageerror",i))})).finally((()=>{r.forEach((e=>e()))}))}}};if(M())throw new Error("[MSW] Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead.");return{start:kr(t),stop:Ir(t),use(...e){console.log("adding new handlers",e),function(e,...t){e.unshift(...t)}(t.requestHandlers,...e)},restoreHandlers(){t.requestHandlers.forEach((e=>{e.markAsSkipped(!1)}))},resetHandlers(...r){t.requestHandlers=function(e,...t){return t.length>0?[...t]:[...e]}(e,...r)},printHandlers(){t.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 cr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.mask}`),console.groupEnd()}))},on(e,r){t.emitter.addListener(e,r)}}},e}({});
@@ -7,7 +7,7 @@
7
7
  /* eslint-disable */
8
8
  /* tslint:disable */
9
9
 
10
- const INTEGRITY_CHECKSUM = 'f7d0ed371e596d181f62c6f68c4b7baf'
10
+ const INTEGRITY_CHECKSUM = '82ef9b96d8393b6da34527d1d6e19187'
11
11
  const bypassHeaderName = 'x-msw-bypass'
12
12
  const activeClientIds = new Set()
13
13
 
@@ -114,22 +114,24 @@ async function handleRequest(event, requestId) {
114
114
  // Send back the response clone for the "response:*" life-cycle events.
115
115
  // Ensure MSW is active and ready to handle the message, otherwise
116
116
  // this message will pend indefinitely.
117
- if (activeClientIds.has(client.id)) {
118
- const clonedResponse = response.clone()
119
-
120
- sendToClient(client, {
121
- type: 'RESPONSE',
122
- payload: {
123
- requestId,
124
- type: clonedResponse.type,
125
- ok: clonedResponse.ok,
126
- status: clonedResponse.status,
127
- statusText: clonedResponse.statusText,
128
- body: clonedResponse.body === null ? null : await clonedResponse.text(),
129
- headers: serializeHeaders(clonedResponse.headers),
130
- redirected: clonedResponse.redirected,
131
- },
132
- })
117
+ if (client && activeClientIds.has(client.id)) {
118
+ ;(async function () {
119
+ const clonedResponse = response.clone()
120
+ sendToClient(client, {
121
+ type: 'RESPONSE',
122
+ payload: {
123
+ requestId,
124
+ type: clonedResponse.type,
125
+ ok: clonedResponse.ok,
126
+ status: clonedResponse.status,
127
+ statusText: clonedResponse.statusText,
128
+ body:
129
+ clonedResponse.body === null ? null : await clonedResponse.text(),
130
+ headers: serializeHeaders(clonedResponse.headers),
131
+ redirected: clonedResponse.redirected,
132
+ },
133
+ })
134
+ })()
133
135
  }
134
136
 
135
137
  return response
@@ -1,4 +1,4 @@
1
- import { Interceptor } from 'node-request-interceptor';
1
+ import { Interceptor } from '@mswjs/interceptors';
2
2
  import { SetupServerApi } from './glossary';
3
3
  import { RequestHandler } from '../handlers/RequestHandler';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { MockedResponse as MockedInterceptedResponse } from 'node-request-interceptor';
1
+ import { IsomorphicResponse } from '@mswjs/interceptors';
2
2
  import { MockedRequest, RequestHandler } from '../handlers/RequestHandler';
3
3
  import { SharedOptions } from '../sharedOptions';
4
4
  export interface ServerLifecycleEventsMap {
@@ -6,8 +6,8 @@ export interface ServerLifecycleEventsMap {
6
6
  'request:match': (request: MockedRequest) => void;
7
7
  'request:unhandled': (request: MockedRequest) => void;
8
8
  'request:end': (request: MockedRequest) => void;
9
- 'response:mocked': (response: MockedInterceptedResponse, requestId: string) => void;
10
- 'response:bypass': (response: MockedInterceptedResponse, requestId: string) => void;
9
+ 'response:mocked': (response: IsomorphicResponse, requestId: string) => void;
10
+ 'response:bypass': (response: IsomorphicResponse, requestId: string) => void;
11
11
  }
12
12
  export interface SetupServerApi {
13
13
  /**
@@ -2,10 +2,7 @@ declare type ArityOneFunction = (arg: any) => any;
2
2
  declare type LengthOfTuple<Tuple extends any[]> = Tuple extends {
3
3
  length: infer L;
4
4
  } ? L : never;
5
- declare type DropFirstInTuple<Tuple extends any[]> = Tuple extends [
6
- arg: any,
7
- ...rest: infer LastArg
8
- ] ? LastArg : Tuple;
5
+ declare type DropFirstInTuple<Tuple extends any[]> = ((...args: Tuple) => any) extends (arg: any, ...rest: infer LastArg) => any ? LastArg : Tuple;
9
6
  declare type LastInTuple<Tuple extends any[]> = Tuple[LengthOfTuple<DropFirstInTuple<Tuple>>];
10
7
  declare type FirstFnParameterType<Functions extends ArityOneFunction[]> = Parameters<LastInTuple<Functions>>[any];
11
8
  declare type LastFnParameterType<Functions extends ArityOneFunction[]> = ReturnType<Functions[0]>;
@@ -13,5 +10,5 @@ declare type LastFnParameterType<Functions extends ArityOneFunction[]> = ReturnT
13
10
  * Composes a given list of functions into a new function that
14
11
  * executes from right to left.
15
12
  */
16
- export declare function compose<Functions extends ArityOneFunction[], LeftReturnType extends FirstFnParameterType<Functions>, RightReturnType extends LastFnParameterType<Functions>>(...fns: Functions): (...args: LeftReturnType extends never ? never[] : [LeftReturnType]) => RightReturnType;
13
+ export declare function compose<Functions extends ArityOneFunction[], LeftReturnType extends FirstFnParameterType<Functions>, RightReturnType extends LastFnParameterType<Functions>>(...fns: Functions): (...args: [LeftReturnType] extends [never] ? never[] : [LeftReturnType]) => RightReturnType;
17
14
  export {};