msw 0.30.0 → 0.30.1
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/esm/index.js +1247 -140
- package/lib/esm/mockServiceWorker.js +1 -1
- package/lib/iife/index.js +4 -4
- package/lib/iife/mockServiceWorker.js +1 -1
- package/lib/umd/index.js +1400 -293
- package/lib/umd/mockServiceWorker.js +1 -1
- package/package.json +2 -2
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 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:{},o={},i={},s={};Object.defineProperty(s,"__esModule",{value:!0}),s.normalizeHeaderName=void 0;var a=/[^a-z0-9\-#$%&'*+.^_`|~]/i;s.normalizeHeaderName=function(e){if("string"!=typeof e&&(e=String(e)),a.test(e)||""===e.trim())throw new TypeError("Invalid character in header field name");return e.toLowerCase()};var c={};Object.defineProperty(c,"__esModule",{value:!0}),c.normalizeHeaderValue=void 0,c.normalizeHeaderValue=function(e){return"string"!=typeof e&&(e=String(e)),e};var u=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},l=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},
|
|
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:{},o={},i={},s={};Object.defineProperty(s,"__esModule",{value:!0}),s.normalizeHeaderName=void 0;var a=/[^a-z0-9\-#$%&'*+.^_`|~]/i;s.normalizeHeaderName=function(e){if("string"!=typeof e&&(e=String(e)),a.test(e)||""===e.trim())throw new TypeError("Invalid character in header field name");return e.toLowerCase()};var c={};Object.defineProperty(c,"__esModule",{value:!0}),c.normalizeHeaderValue=void 0,c.normalizeHeaderValue=function(e){return"string"!=typeof e&&(e=String(e)),e};var u=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},l=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},p=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.")};Object.defineProperty(i,"__esModule",{value:!0});var h=s,d=c,f=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=l(e,2),n=t[0],o=t[1];r.append(n,Array.isArray(o)?o.join(", "):o)})):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,o;return u(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,7]),e=p(Object.keys(this._headers)),t=e.next(),i.label=1;case 1:return t.done?[3,4]:[4,t.value];case 2:i.sent(),i.label=3;case 3:return t=e.next(),[3,1];case 4:return[3,7];case 5:return r=i.sent(),n={error:r},[3,7];case 6:try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(n)throw n.error}return[7];case 7:return[2]}}))},e.prototype.values=function(){var e,t,r,n,o;return u(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,7]),e=p(Object.values(this._headers)),t=e.next(),i.label=1;case 1:return t.done?[3,4]:[4,t.value];case 2:i.sent(),i.label=3;case 3:return t=e.next(),[3,1];case 4:return[3,7];case 5:return r=i.sent(),n={error:r},[3,7];case 6:try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(n)throw n.error}return[7];case 7:return[2]}}))},e.prototype.entries=function(){var e,t,r,n,o,i;return u(this,(function(s){switch(s.label){case 0:s.trys.push([0,5,6,7]),e=p(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(),o={error:n},[3,7];case 6:try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(o)throw o.error}return[7];case 7:return[2]}}))},e.prototype.get=function(e){return this._headers[h.normalizeHeaderName(e)]||null},e.prototype.set=function(e,t){var r=h.normalizeHeaderName(e);this._headers[r]=d.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=h.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=l(r,2),o=n[0],i=n[1];return t[e._names.get(o)]=i,t}),{})},e.prototype.has=function(e){return this._headers.hasOwnProperty(h.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}();i.default=f;var v={},m={};Object.defineProperty(m,"__esModule",{value:!0}),m.headersToList=void 0,m.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};var y=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(v,"__esModule",{value:!0}),v.headersToString=void 0;var g=m;v.headersToString=function(e){return g.headersToList(e).map((function(e){var t=y(e,2),r=t[0],n=t[1];return r+": "+[].concat(n).join(", ")})).join("\r\n")};var b={};Object.defineProperty(b,"__esModule",{value:!0}),b.headersToObject=void 0;var E=["user-agent"];b.headersToObject=function(e){var t={};return e.forEach((function(e,r){var n=!E.includes(r.toLowerCase())&&e.includes(",");t[r]=n?e.split(",").map((function(e){return e.trim()})):e})),t};var w={};Object.defineProperty(w,"__esModule",{value:!0}),w.stringToHeaders=void 0;var N=i;w.stringToHeaders=function(e){return e.trim().split(/[\r\n]+/).reduce((function(e,t){var r=t.split(": "),n=r.shift(),o=r.join(": ");return e.append(n,o),e}),new N.default)};var T={},_=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(T,"__esModule",{value:!0}),T.listToHeaders=void 0;var O=i;T.listToHeaders=function(e){var t=new O.default;return e.forEach((function(e){var r=_(e,2),n=r[0],o=r[1];[].concat(o).forEach((function(e){t.append(n,e)}))})),t};var x={},S={};Object.defineProperty(S,"__esModule",{value:!0}),S.reduceHeadersObject=void 0,S.reduceHeadersObject=function(e,t,r){return Object.keys(e).reduce((function(r,n){return t(r,n,e[n])}),r)},Object.defineProperty(x,"__esModule",{value:!0}),x.objectToHeaders=void 0;var C=i,I=S;x.objectToHeaders=function(e){return I.reduceHeadersObject(e,(function(e,t,r){return[].concat(r).filter(Boolean).forEach((function(r){e.append(t,r)})),e}),new C.default)};var A={},R=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(A,"__esModule",{value:!0}),A.flattenHeadersList=void 0,A.flattenHeadersList=function(e){return e.map((function(e){var t=R(e,2),r=t[0],n=t[1];return[r,[].concat(n).join("; ")]}))};var k={};Object.defineProperty(k,"__esModule",{value:!0}),k.flattenHeadersObject=void 0;var D=S;function L(...e){return t=>{const[r,n]=e;if("string"==typeof r)t.headers.append(r,n);else{o.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
|
-
*/R.flattenHeadersObject=function(e){return D.reduceHeadersObject(e,(function(e,t,r){return e[t]=[].concat(r).join("; "),e}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flattenHeadersObject=e.flattenHeadersList=e.reduceHeadersObject=e.objectToHeaders=e.listToHeaders=e.stringToHeaders=e.headersToObject=e.headersToList=e.headersToString=e.Headers=void 0;var t=i;Object.defineProperty(e,"Headers",{enumerable:!0,get:function(){return t.default}});var r=m;Object.defineProperty(e,"headersToString",{enumerable:!0,get:function(){return r.headersToString}});var n=v;Object.defineProperty(e,"headersToList",{enumerable:!0,get:function(){return n.headersToList}});var o=b;Object.defineProperty(e,"headersToObject",{enumerable:!0,get:function(){return o.headersToObject}});var s=w;Object.defineProperty(e,"stringToHeaders",{enumerable:!0,get:function(){return s.stringToHeaders}});var a=T;Object.defineProperty(e,"listToHeaders",{enumerable:!0,get:function(){return a.listToHeaders}});var c=_;Object.defineProperty(e,"objectToHeaders",{enumerable:!0,get:function(){return c.objectToHeaders}});var u=S;Object.defineProperty(e,"reduceHeadersObject",{enumerable:!0,get:function(){return u.reduceHeadersObject}});var l=A;Object.defineProperty(e,"flattenHeadersList",{enumerable:!0,get:function(){return l.flattenHeadersList}});var h=R;Object.defineProperty(e,"flattenHeadersObject",{enumerable:!0,get:function(){return h.flattenHeadersObject}})}(o);var P=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=e.split(q),i=n.decode||F,s=0;s<o.length;s++){var a=o[s],c=a.indexOf("=");if(!(c<0)){var u=a.substr(0,c).trim(),l=a.substr(++c,a.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),null==r[u]&&(r[u]=H(l,i))}}return r},j=function(e,t,r){var n=r||{},o=n.encode||M;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!U.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!U.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=n.maxAge){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!U.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!U.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},F=decodeURIComponent,M=encodeURIComponent,q=/; */,U=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function H(e,t){try{return t(e)}catch(t){return e}}const B=(e,t,r)=>n=>{const o=j(e,t,r);return n.headers.set("Set-Cookie",o),"undefined"!=typeof document&&(document.cookie=o),n},$=e=>t=>(t.body=e,t);function V(e){try{return JSON.parse(e)}catch(e){return}}function K(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function G(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):K(n)&&K(r)?(e[t]=G(n,r),e):(e[t]=r,e)}),Object.assign({},e))}const W=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t),Y=e=>t=>{const r=G(V(t.body)||{},{data:e});return W(r)(t)};function X(){return"object"==typeof global&&("[object process]"===Object.prototype.toString.call(global.process)||"ReactNative"===navigator.product||void 0)}const z=2147483647,J=()=>X()?5:Math.floor(300*Math.random()+100),Q=e=>t=>{let r;if("string"==typeof e)switch(e){case"infinite":r=z;break;case"real":r=J();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=J();else{if(e>z)throw new Error(`Failed to delay a response: provided delay duration (${e}) exceeds the maximum allowed duration for "setTimeout" (2147483647). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);r=e}return t.delay=r,t},Z=e=>t=>{if(null==e)return t;const r=G(V(t.body)||{},{errors:e});return W(r)(t)},ee=X()?require("node-fetch"):window.fetch,te=e=>{const t=new o.Headers(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.all()})},re=(e,t={})=>{if("string"==typeof e)return ee(e,te(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=te(r);return ee(e.url.href,n)},ne=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),oe=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);var ie,se=Object.freeze({__proto__:null,status:r,set:L,cookie:B,body:$,data:Y,delay:Q,errors:Z,fetch:re,json:W,text:ne,xml:oe}),ae={},ce={},ue={exports:{}},le="object"==typeof Reflect?Reflect:null,he=le&&"function"==typeof le.apply?le.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};ie=le&&"function"==typeof le.ownKeys?le.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var pe=Number.isNaN||function(e){return e!=e};function de(){de.init.call(this)}ue.exports=de,ue.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}Te(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&Te(e,"error",t,r)}(e,o,{once:!0})}))},de.EventEmitter=de,de.prototype._events=void 0,de.prototype._eventsCount=0,de.prototype._maxListeners=void 0;var fe=10;function me(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function ve(e){return void 0===e._maxListeners?de.defaultMaxListeners:e._maxListeners}function ye(e,t,r,n){var o,i,s,a;if(me(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=ve(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function ge(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function be(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=ge.bind(n);return o.listener=r,n.wrapFn=o,o}function Ee(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):Ne(o,o.length)}function we(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 Ne(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function Te(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(de,"defaultMaxListeners",{enumerable:!0,get:function(){return fe},set:function(e){if("number"!=typeof e||e<0||pe(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");fe=e}}),de.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},de.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||pe(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},de.prototype.getMaxListeners=function(){return ve(this)},de.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)he(a,this,t);else{var c=a.length,u=Ne(a,c);for(r=0;r<c;++r)he(u[r],this,t)}return!0},de.prototype.addListener=function(e,t){return ye(this,e,t,!1)},de.prototype.on=de.prototype.addListener,de.prototype.prependListener=function(e,t){return ye(this,e,t,!0)},de.prototype.once=function(e,t){return me(t),this.on(e,be(this,e,t)),this},de.prototype.prependOnceListener=function(e,t){return me(t),this.prependListener(e,be(this,e,t)),this},de.prototype.removeListener=function(e,t){var r,n,o,i,s;if(me(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},de.prototype.off=de.prototype.removeListener,de.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},de.prototype.listeners=function(e){return Ee(this,e,!0)},de.prototype.rawListeners=function(e){return Ee(this,e,!1)},de.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):we.call(e,t)},de.prototype.listenerCount=we,de.prototype.eventNames=function(){return this._eventsCount>0?ie(this._events):[]};var xe,Oe=n&&n.__extends||(xe=function(e,t){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),_e=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n};ce.__esModule=!0,ce.StrictEventEmitter=void 0;var Se=function(e){function t(){return e.call(this)||this}return Oe(t,e),t.prototype.on=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.once=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.off=function(t,r){return e.prototype.off.call(this,t.toString(),r)},t.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.prototype.emit.apply(this,_e([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}(ue.exports.EventEmitter);function Ce(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}ce.StrictEventEmitter=Se,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]});e.__esModule=!0,e.StrictEventEmitter=void 0,t(e,ce,"StrictEventEmitter")}(ae);var Ie={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.until=async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}},Object.defineProperty(Ie,"__esModule",{value:!0});var ke=Ae,Re=Ie.until=ke.until;const De=(e,t,r)=>[e.active,e.installing,e.waiting].filter(Boolean).find((e=>r(e.scriptURL,t)))||null;const Le=(e,t={},r)=>Ce(void 0,void 0,void 0,(function*(){const n=new URL(e,location.origin).href;const o=yield navigator.serviceWorker.getRegistrations().then((e=>e.filter((e=>De(e,n,r)))));!navigator.serviceWorker.controller&&o.length>0&&location.reload();const[i]=o;if(i)return i.update().then((()=>[De(i,n,r),i]));const[s,a]=yield Re((()=>Ce(void 0,void 0,void 0,(function*(){const o=yield navigator.serviceWorker.register(e,t);return[De(o,n,r),o]}))));if(s){if(s.message.includes("(404)")){const e=new URL((null==t?void 0:t.scope)||"/",location.href);throw new Error(`[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}));function Pe(e={}){if(e.quiet)return;const t=e.message||"Mocking enabled.";console.groupCollapsed(`%c[MSW] ${t}`,"color:orangered;font-weight:bold;"),console.log("%cDocumentation: %chttps://mswjs.io/docs","font-weight:bold","font-weight:normal"),console.log("Found an issue? https://github.com/mswjs/msw/issues"),console.groupEnd()}class je extends Error{constructor(e){super(e),this.name="NetworkError"}}var Fe={},Me={},qe={exports:{}},Ue={decodeValues:!0,map:!1,silent:!1};function He(e){return"string"==typeof e&&!!e.trim()}function Be(e,t){var r=e.split(";").filter(He),n=r.shift().split("="),o=n.shift(),i=n.join("=");t=t?Object.assign({},Ue,t):Ue;try{i=t.decodeValues?decodeURIComponent(i):i}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",e)}var s={name:o,value:i};return r.forEach((function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?s.expires=new Date(n):"max-age"===r?s.maxAge=parseInt(n,10):"secure"===r?s.secure=!0:"httponly"===r?s.httpOnly=!0:"samesite"===r?s.sameSite=n:s[r]=n})),s}function $e(e,t){if(t=t?Object.assign({},Ue,t):Ue,!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({},Ue,t):Ue).map){return e.filter(He).reduce((function(e,r){var n=Be(r,t);return e[n.name]=n,e}),{})}return e.filter(He).map((function(e){return Be(e,t)}))}function Ve(){return P(document.cookie)}function Ke(e){var t;Fe.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?Ve():{};case"include":return Ve();default:return{}}}(e)),Array.from(null===(t=Fe.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 Ge(e){var t,r;const n=o.stringToHeaders(e),i=n.get("content-type")||"text/plain",s=n.get("content-disposition");if(!s)throw new Error('"Content-Disposition" header is required.');const a=s.split(";").reduce(((e,t)=>{const[r,...n]=t.trim().split("=");return e[r]=n.join("="),e}),{});return{name:null===(t=a.name)||void 0===t?void 0:t.slice(1,-1),filename:null===(r=a.filename)||void 0===r?void 0:r.slice(1,-1),contentType:i}}function We(e,t){if(!e)return 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(/; */),o=n.filter((e=>e.startsWith("boundary="))).map((e=>e.replace(/^boundary=/,"")))[0];if(!o)return;const i=new RegExp(`--+${o}`),s=e.split(i).filter((e=>e.startsWith("\r\n")&&e.endsWith("\r\n"))).map((e=>e.trimStart().replace(/\r\n$/,"")));if(!s.length)return;const a={};try{for(const e of s){const[t,...r]=e.split("\r\n\r\n"),n=r.join("\r\n\r\n"),{contentType:o,filename:i,name:s}=Ge(t),c=void 0===i?n:new File([n],i,{type:o}),u=a[s];void 0===u?a[s]=c:Array.isArray(u)?a[s]=[...u,c]:a[s]=[u,c]}return a}catch(e){return}}(e,t)||e;return(null==r?void 0:r.includes("json"))&&"object"!=typeof e&&V(e)||e}function Ye(e,t){return e.toLowerCase()===t.toLowerCase()}function Xe(e){if(!e.method||!Ye(e.method,"GET")||""!==e.body)return e.body}qe.exports=$e,qe.exports.parse=$e,qe.exports.parseString=Be,qe.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,o,i,s=[],a=0;function c(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,i=!1;c();)if(","===(r=e.charAt(a))){for(n=a,a+=1,c(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(i=!0,a=o,s.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!i||a>=e.length)&&s.push(e.substring(t,e.length))}return s},function(e){var t=n&&n.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.PERSISTENCY_KEY=void 0;const r=qe.exports;e.PERSISTENCY_KEY="MSW_COOKIE_STORE";e.default=new class{constructor(){this.store=new Map,this.supportsPersistency="undefined"!=typeof window}add(e,n){if("omit"===e.credentials)return;const o=new URL(e.url),i=n.headers.get("set-cookie");if(!i)return;const s=Date.now(),a=r.parse(i).map((e=>{var{maxAge:r}=e,n=t(e,["maxAge"]);return Object.assign(Object.assign({},n),{expires:void 0===r?n.expires:new Date(s+1e3*r),maxAge:r})})),c=this.store.get(o.origin)||new Map;a.forEach((e=>{this.store.set(o.origin,c.set(e.name,e))}))}get(e){this.deleteExpiredCookies();const t=new URL(e.url),n=this.store.get(t.origin)||new Map;switch(e.credentials){case"include":return r.parse(document.cookie).forEach((e=>{n.set(e.name,e)})),n;case"same-origin":return n;default:return new Map}}getAll(){return this.deleteExpiredCookies(),this.store}deleteAll(e){const t=new URL(e.url);this.store.delete(t.origin)}clear(){this.store.clear()}hydrate(){if(!this.supportsPersistency)return;const r=localStorage.getItem(e.PERSISTENCY_KEY);if(r)try{JSON.parse(r).forEach((([e,r])=>{this.store.set(e,new Map(r.map((e=>{var[r,n]=e,{expires:o}=n,i=t(n,["expires"]);return[r,void 0===o?i:Object.assign(Object.assign({},i),{expires:new Date(o)})]}))))}))}catch(t){console.warn(`\n[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${e.PERSISTENCY_KEY}").\n\nStored value:\n${localStorage.getItem(e.PERSISTENCY_KEY)}\n\nThrown exception:\n${t}\n\nInvalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(e.PERSISTENCY_KEY)}}persist(){if(!this.supportsPersistency)return;const t=Array.from(this.store.entries()).map((([e,t])=>[e,Array.from(t.entries())]));localStorage.setItem(e.PERSISTENCY_KEY,JSON.stringify(t))}deleteExpiredCookies(){const e=Date.now();this.store.forEach(((t,r)=>{t.forEach((({expires:r,name:n})=>{void 0!==r&&r.getTime()<=e&&t.delete(n)})),0===t.size&&this.store.delete(r)}))}}}(Me),function(e){var t=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.PERSISTENCY_KEY=e.store=void 0;var r=Me;Object.defineProperty(e,"store",{enumerable:!0,get:function(){return t(r).default}}),Object.defineProperty(e,"PERSISTENCY_KEY",{enumerable:!0,get:function(){return r.PERSISTENCY_KEY}})}(Fe);var ze=function(){function e(e,t,r,n,o){return e<t||r<t?e>r?r+1:e+1:n===o?t:t+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;s<o&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,0===(o-=s)||i<3)return i;var a,c,u,l,h,p,d,f,m,v,y,g,b=0,E=[];for(a=0;a<o;a++)E.push(a+1),E.push(t.charCodeAt(s+a));for(var w=E.length-1;b<i-3;)for(m=r.charCodeAt(s+(c=b)),v=r.charCodeAt(s+(u=b+1)),y=r.charCodeAt(s+(l=b+2)),g=r.charCodeAt(s+(h=b+3)),p=b+=4,a=0;a<w;a+=2)c=e(d=E[a],c,u,m,f=E[a+1]),u=e(c,u,l,v,f),l=e(u,l,h,y,f),p=e(l,h,p,g,f),E[a]=p,h=l,l=u,u=c,c=d;for(;b<i;)for(m=r.charCodeAt(s+(c=b)),p=++b,a=0;a<w;a+=2)d=E[a],E[a]=p=e(d,c,p,m,E[a+1]),c=d;return p}}();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)}var Qe="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function Ze(e,t){for(var r,n=/\r\n|[\n\r]/g,o=1,i=t+1;(r=n.exec(e.body))&&r.index<t;)o+=1,i=t+1-(r.index+r[0].length);return{line:o,column:i}}function et(e){return tt(e.source,Ze(e.source,e.start))}function tt(e,t){var r=e.locationOffset.column-1,n=nt(r)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,a=1===t.line?r:0,c=t.column+a,u="".concat(e.name,":").concat(s,":").concat(c,"\n"),l=n.split(/\r\n|[\n\r]/g),h=l[o];if(h.length>120){for(var p=Math.floor(c/80),d=c%80,f=[],m=0;m<h.length;m+=80)f.push(h.slice(m,m+80));return u+rt([["".concat(s),f[0]]].concat(f.slice(1,p+1).map((function(e){return["",e]})),[[" ",nt(d-1)+"^"],["",f[p+1]]]))}return u+rt([["".concat(s-1),l[o-1]],["".concat(s),h],["",nt(c-1)+"^"],["".concat(s+1),l[o+1]]])}function rt(e){var t=e.filter((function(e){return e[0],void 0!==e[1]})),r=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,n=e[0],o=e[1];return nt(r-(t=n).length)+t+(o?" | "+o:" |")})).join("\n")}function nt(e){return Array(e+1).join(" ")}function ot(e){return(ot="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 it(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 st(e,t){return!t||"object"!==ot(t)&&"function"!=typeof t?at(e):t}function at(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ct(e){var t="function"==typeof Map?new Map:void 0;return(ct=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 ut(e,arguments,pt(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ht(n,e)})(e)}function ut(e,t,r){return(ut=lt()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&ht(o,r.prototype),o}).apply(null,arguments)}function lt(){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 ht(e,t){return(ht=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dt=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&&ht(e,t)}(a,e);var t,r,n,o,i,s=(t=a,r=lt(),function(){var e,n=pt(t);if(r){var o=pt(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return st(this,e)});function a(e,t,r,n,o,i,c){var u,l,h,p,d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),d=s.call(this,e);var f,m=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,v=r;!v&&m&&(v=null===(f=m[0].loc)||void 0===f?void 0:f.source);var y,g=n;!g&&m&&(g=m.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),g&&0===g.length&&(g=void 0),n&&r?y=n.map((function(e){return Ze(r,e)})):m&&(y=m.reduce((function(e,t){return t.loc&&e.push(Ze(t.loc.source,t.loc.start)),e}),[]));var b,E=c;if(null==E&&null!=i){var w=i.extensions;"object"==Je(b=w)&&null!==b&&(E=w)}return Object.defineProperties(at(d),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(u=y)&&void 0!==u?u:void 0,enumerable:null!=y},path:{value:null!=o?o:void 0,enumerable:null!=o},nodes:{value:null!=m?m:void 0},source:{value:null!==(l=v)&&void 0!==l?l:void 0},positions:{value:null!==(h=g)&&void 0!==h?h:void 0},originalError:{value:i},extensions:{value:null!==(p=E)&&void 0!==p?p:void 0,enumerable:null!=E}}),null!=i&&i.stack?(Object.defineProperty(at(d),"stack",{value:i.stack,writable:!0,configurable:!0}),st(d)):(Error.captureStackTrace?Error.captureStackTrace(at(d),a):Object.defineProperty(at(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return n=a,(o=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var o=n[r];o.loc&&(t+="\n\n"+et(o.loc))}else if(e.source&&e.locations)for(var i=0,s=e.locations;i<s.length;i++){var a=s[i];t+="\n\n"+tt(e.source,a)}return t}(this)}},{key:Qe,get:function(){return"Object"}}])&&it(n.prototype,o),i&&it(n,i),a}(ct(Error));function ft(e,t,r){return new dt("Syntax Error: ".concat(r),void 0,e,[t])}var mt=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 vt="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function yt(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,vt&&(e.prototype[vt]=t)}var gt=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}();yt(gt);var bt=function(){function e(e,t,r,n,o,i,s){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=o,this.value=s,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();yt(bt);var Et=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 wt(e){return(wt="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 Nt(e){return Tt(e,[])}function Tt(e,t){switch(wt(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(vt)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:Tt(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var r=Math.min(10,e.length),n=e.length-r,o=[],i=0;i<r;++i)o.push(Tt(e[i],t));1===n?o.push("... 1 more item"):n>1&&o.push("... ".concat(n," more items"));return"["+o.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]";return"{ "+r.map((function(r){return r+": "+Tt(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}function xt(e,t){if(!Boolean(e))throw new Error(t)}function Ot(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 _t=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||xt(0,"Body must be a string. Received: ".concat(Nt(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||xt(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||xt(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:Qe,get:function(){return"Source"}}])&&Ot(t.prototype,r),n&&Ot(t,n),e}();var St=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 Ct(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,o=0,i=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:r=!1,n=!0,o=0;break;case 9:case 32:++o;break;default:n&&!r&&(null===i||o<i)&&(i=o),n=!1}return null!==(t=i)&&void 0!==t?t:0}(e);if(0!==r)for(var n=1;n<t.length;n++)t[n]=t[n].slice(r);for(var o=0;o<t.length&&It(t[o]);)++o;for(var i=t.length;i>o&&It(t[i-1]);)--i;return t.slice(o,i).join("\n")}function It(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var At=function(){function e(e){var t=new bt(Et.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!==Et.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=Rt(this,e)}while(e.kind===Et.COMMENT);return e},e}();function kt(e){return isNaN(e)?Et.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function Rt(e,t){for(var r=e.source,n=r.body,o=n.length,i=t.end;i<o;){var s=n.charCodeAt(i),a=e.line,c=1+i-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 33:return new bt(Et.BANG,i,i+1,a,c,t);case 35:return Lt(r,i,a,c,t);case 36:return new bt(Et.DOLLAR,i,i+1,a,c,t);case 38:return new bt(Et.AMP,i,i+1,a,c,t);case 40:return new bt(Et.PAREN_L,i,i+1,a,c,t);case 41:return new bt(Et.PAREN_R,i,i+1,a,c,t);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return new bt(Et.SPREAD,i,i+3,a,c,t);break;case 58:return new bt(Et.COLON,i,i+1,a,c,t);case 61:return new bt(Et.EQUALS,i,i+1,a,c,t);case 64:return new bt(Et.AT,i,i+1,a,c,t);case 91:return new bt(Et.BRACKET_L,i,i+1,a,c,t);case 93:return new bt(Et.BRACKET_R,i,i+1,a,c,t);case 123:return new bt(Et.BRACE_L,i,i+1,a,c,t);case 124:return new bt(Et.PIPE,i,i+1,a,c,t);case 125:return new bt(Et.BRACE_R,i,i+1,a,c,t);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?Mt(r,i,a,c,t,e):Ft(r,i,a,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Pt(r,i,s,a,c,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Ht(r,i,a,c,t)}throw ft(r,i,Dt(s))}var u=e.line,l=1+i-e.lineStart;return new bt(Et.EOF,o,o,u,l,t)}function Dt(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(kt(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(kt(e),".")}function Lt(e,t,r,n,o){var i,s=e.body,a=t;do{i=s.charCodeAt(++a)}while(!isNaN(i)&&(i>31||9===i));return new bt(Et.COMMENT,t,a,r,n,o,s.slice(t+1,a))}function Pt(e,t,r,n,o,i){var s=e.body,a=r,c=t,u=!1;if(45===a&&(a=s.charCodeAt(++c)),48===a){if((a=s.charCodeAt(++c))>=48&&a<=57)throw ft(e,c,"Invalid number, unexpected digit after 0: ".concat(kt(a),"."))}else c=jt(e,c,a),a=s.charCodeAt(c);if(46===a&&(u=!0,a=s.charCodeAt(++c),c=jt(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=jt(e,c,a),a=s.charCodeAt(c)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw ft(e,c,"Invalid number, expected digit but got: ".concat(kt(a),"."));return new bt(u?Et.FLOAT:Et.INT,t,c,n,o,i,s.slice(t,c))}function jt(e,t,r){var n=e.body,o=t,i=r;if(i>=48&&i<=57){do{i=n.charCodeAt(++o)}while(i>=48&&i<=57);return o}throw ft(e,o,"Invalid number, expected digit but got: ".concat(kt(i),"."))}function Ft(e,t,r,n,o){for(var i=e.body,s=t+1,a=s,c=0,u="";s<i.length&&!isNaN(c=i.charCodeAt(s))&&10!==c&&13!==c;){if(34===c)return u+=i.slice(a,s),new bt(Et.STRING,t,s+1,r,n,o,u);if(c<32&&9!==c)throw ft(e,s,"Invalid character within String: ".concat(kt(c),"."));if(++s,92===c){switch(u+=i.slice(a,s-1),c=i.charCodeAt(s)){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+="\n";break;case 114:u+="\r";break;case 116:u+="\t";break;case 117:var l=qt(i.charCodeAt(s+1),i.charCodeAt(s+2),i.charCodeAt(s+3),i.charCodeAt(s+4));if(l<0){var h=i.slice(s+1,s+5);throw ft(e,s,"Invalid character escape sequence: \\u".concat(h,"."))}u+=String.fromCharCode(l),s+=4;break;default:throw ft(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(c),"."))}a=++s}}throw ft(e,s,"Unterminated string.")}function Mt(e,t,r,n,o,i){for(var s=e.body,a=t+3,c=a,u=0,l="";a<s.length&&!isNaN(u=s.charCodeAt(a));){if(34===u&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2))return l+=s.slice(c,a),new bt(Et.BLOCK_STRING,t,a+3,r,n,o,Ct(l));if(u<32&&9!==u&&10!==u&&13!==u)throw ft(e,a,"Invalid character within String: ".concat(kt(u),"."));10===u?(++a,++i.line,i.lineStart=a):13===u?(10===s.charCodeAt(a+1)?a+=2:++a,++i.line,i.lineStart=a):92===u&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2)&&34===s.charCodeAt(a+3)?(l+=s.slice(c,a)+'"""',c=a+=4):++a}throw ft(e,a,"Unterminated string.")}function qt(e,t,r,n){return Ut(e)<<12|Ut(t)<<8|Ut(r)<<4|Ut(n)}function Ut(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ht(e,t,r,n,o){for(var i=e.body,s=i.length,a=t+1,c=0;a!==s&&!isNaN(c=i.charCodeAt(a))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++a;return new bt(Et.NAME,t,a,r,n,o,i.slice(t,a))}var Bt=function(){function e(e,t){var r=function(e){return e instanceof _t}(e)?e:new _t(e);this._lexer=new At(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(Et.NAME);return{kind:mt.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:mt.DOCUMENT,definitions:this.many(Et.SOF,this.parseDefinition,Et.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(Et.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(Et.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(Et.BRACE_L))return{kind:mt.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(Et.NAME)&&(t=this.parseName()),{kind:mt.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(Et.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(Et.PAREN_L,this.parseVariableDefinition,Et.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:mt.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Et.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Et.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(Et.DOLLAR),{kind:mt.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:mt.SELECTION_SET,selections:this.many(Et.BRACE_L,this.parseSelection,Et.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(Et.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(Et.COLON)?(e=n,t=this.parseName()):t=n,{kind:mt.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Et.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Et.PAREN_L,t,Et.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(Et.COLON),{kind:mt.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:mt.ARGUMENT,name:this.parseName(),value:(this.expectToken(Et.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(Et.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(Et.NAME)?{kind:mt.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:mt.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:mt.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:mt.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 Et.BRACKET_L:return this.parseList(e);case Et.BRACE_L:return this.parseObject(e);case Et.INT:return this._lexer.advance(),{kind:mt.INT,value:t.value,loc:this.loc(t)};case Et.FLOAT:return this._lexer.advance(),{kind:mt.FLOAT,value:t.value,loc:this.loc(t)};case Et.STRING:case Et.BLOCK_STRING:return this.parseStringLiteral();case Et.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:mt.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:mt.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:mt.NULL,loc:this.loc(t)};default:return{kind:mt.ENUM,value:t.value,loc:this.loc(t)}}case Et.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:mt.STRING,value:e.value,block:e.kind===Et.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:mt.LIST,values:this.any(Et.BRACKET_L,(function(){return t.parseValueLiteral(e)}),Et.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:mt.OBJECT,fields:this.any(Et.BRACE_L,(function(){return t.parseObjectField(e)}),Et.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(Et.COLON),{kind:mt.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(Et.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(Et.AT),{kind:mt.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(Et.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(Et.BRACKET_R),e={kind:mt.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(Et.BANG)?{kind:mt.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:mt.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===Et.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(Et.STRING)||this.peek(Et.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(Et.BRACE_L,this.parseOperationTypeDefinition,Et.BRACE_R);return{kind:mt.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(Et.COLON);var r=this.parseNamedType();return{kind:mt.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:mt.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:mt.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(Et.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(Et.AMP)||this.peek(Et.NAME));return t}return this.delimitedMany(Et.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(Et.BRACE_L)&&this._lexer.lookahead().kind===Et.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Et.BRACE_L,this.parseFieldDefinition,Et.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(Et.COLON);var o=this.parseTypeReference(),i=this.parseDirectives(!0);return{kind:mt.FIELD_DEFINITION,description:t,name:r,arguments:n,type:o,directives:i,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(Et.PAREN_L,this.parseInputValueDef,Et.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(Et.COLON);var n,o=this.parseTypeReference();this.expectOptionalToken(Et.EQUALS)&&(n=this.parseValueLiteral(!0));var i=this.parseDirectives(!0);return{kind:mt.INPUT_VALUE_DEFINITION,description:t,name:r,type:o,defaultValue:n,directives:i,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:mt.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseUnionMemberTypes();return{kind:mt.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:o,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(Et.EQUALS)?this.delimitedMany(Et.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();return{kind:mt.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:o,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(Et.BRACE_L,this.parseEnumValueDefinition,Et.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:mt.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();return{kind:mt.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:o,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(Et.BRACE_L,this.parseInputValueDef,Et.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===Et.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(Et.BRACE_L,this.parseOperationTypeDefinition,Et.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:mt.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:mt.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return{kind:mt.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return{kind:mt.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:mt.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:mt.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:mt.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(Et.AT);var r=this.parseName(),n=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var i=this.parseDirectiveLocations();return{kind:mt.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:o,locations:i,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(Et.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==St[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 gt(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 ft(this._lexer.source,t.start,"Expected ".concat(Vt(e),", found ").concat($t(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!==Et.NAME||t.value!==e)throw ft(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat($t(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===Et.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return ft(this._lexer.source,t.start,"Unexpected ".concat($t(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 $t(e){var t=e.value;return Vt(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function Vt(e){return function(e){return e===Et.BANG||e===Et.DOLLAR||e===Et.AMP||e===Et.PAREN_L||e===Et.PAREN_R||e===Et.SPREAD||e===Et.COLON||e===Et.EQUALS||e===Et.AT||e===Et.BRACKET_L||e===Et.BRACKET_R||e===Et.BRACE_L||e===Et.PIPE||e===Et.BRACE_R}(e)?'"'.concat(e,'"'):e}var Kt={exports:{}};
|
|
8
|
-
/*! https://mths.be/punycode v1.3.2 by @mathias */!function(e,t){!function(r){var o=t&&!t.nodeType&&t,i=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]/,d=/[\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"},m=Math.floor,v=String.fromCharCode;function y(e){throw RangeError(f[e])}function g(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+g((e=e.replace(d,".")).split("."),t).join(".")}function E(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function w(e){return g(e,(function(e){var t="";return e>65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=v(e)})).join("")}function N(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;n+=l)e=m(e/35);return m(n+36*e/(e+38))}function x(e){var t,r,n,o,i,s,a,c,h,p,d,f=[],v=e.length,g=0,b=128,E=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&y("not-basic"),f.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<v;){for(i=g,s=1,a=l;o>=v&&y("invalid-input"),((c=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:l)>=l||c>m((u-g)/s))&&y("overflow"),g+=c*s,!(c<(h=a<=E?1:a>=E+26?26:a-E));a+=l)s>m(u/(p=l-h))&&y("overflow"),s*=p;E=T(g-i,t=f.length+1,0==i),m(g/t)>u-b&&y("overflow"),b+=m(g/t),g%=t,f.splice(g++,0,b)}return w(f)}function O(e){var t,r,n,o,i,s,a,c,h,p,d,f,g,b,w,x=[];for(f=(e=E(e)).length,t=128,r=0,i=72,s=0;s<f;++s)(d=e[s])<128&&x.push(v(d));for(n=o=x.length,o&&x.push("-");n<f;){for(a=u,s=0;s<f;++s)(d=e[s])>=t&&d<a&&(a=d);for(a-t>m((u-r)/(g=n+1))&&y("overflow"),r+=(a-t)*g,t=a,s=0;s<f;++s)if((d=e[s])<t&&++r>u&&y("overflow"),d==t){for(c=r,h=l;!(c<(p=h<=i?1:h>=i+26?26:h-i));h+=l)w=c-p,b=l-p,x.push(v(N(p+w%b,0))),c=m(w/b);x.push(v(N(c,0))),i=T(r,g,n==o),r=0,++n}++r,++t}return x.join("")}if(a={version:"1.3.2",ucs2:{decode:E,encode:w},decode:x,encode:O,toASCII:function(e){return b(e,(function(e){return p.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return b(e,(function(e){return h.test(e)?x(e.slice(4).toLowerCase()):e}))}},o&&i)if(e.exports==o)i.exports=a;else for(c in a)a.hasOwnProperty(c)&&(o[c]=a[c]);else r.punycode=a}(n)}(Kt,Kt.exports);var Gt={};function Wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Yt=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};Gt.decode=Gt.parse=function(e,t,r,n){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/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,d=e[c].replace(i,"%20"),f=d.indexOf(r);f>=0?(u=d.substr(0,f),l=d.substr(f+1)):(u=d,l=""),h=decodeURIComponent(u),p=decodeURIComponent(l),Wt(o,h)?Array.isArray(o[h])?o[h].push(p):o[h]=[o[h],p]:o[h]=p}return o},Gt.encode=Gt.stringify=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 o=encodeURIComponent(Yt(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return o+encodeURIComponent(Yt(e))})).join(t):o+encodeURIComponent(Yt(e[n]))})).join(t):n?encodeURIComponent(Yt(n))+r+encodeURIComponent(Yt(e)):""};var Xt=Kt.exports,zt={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}},Jt=function(e){zt.isString(e)&&(e=pr(e));return e instanceof Qt?e.format():Qt.prototype.format.call(e)};function Qt(){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 Zt=/^([a-z0-9.+-]+:)/i,er=/:[0-9]*$/,tr=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,rr=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),nr=["'"].concat(rr),or=["%","/","?",";","#"].concat(nr),ir=["/","?","#"],sr=/^[+a-z0-9A-Z_-]{0,63}$/,ar=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,cr={javascript:!0,"javascript:":!0},ur={javascript:!0,"javascript:":!0},lr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},hr=Gt;function pr(e,t,r){if(e&&zt.isObject(e)&&e instanceof Qt)return e;var n=new Qt;return n.parse(e,t,r),n}Qt.prototype.parse=function(e,t,r){if(!zt.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),o=-1!==n&&n<e.indexOf("#")?"?":"#",i=e.split(o);i[0]=i[0].replace(/\\/g,"/");var s=e=i.join(o);if(s=s.trim(),!r&&1===e.split("#").length){var a=tr.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=t?hr.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=Zt.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&&ur[c]||(s=s.substr(2),this.slashes=!0)}if(!ur[c]&&(l||c&&!lr[c])){for(var h,p,d=-1,f=0;f<ir.length;f++){-1!==(m=s.indexOf(ir[f]))&&(-1===d||m<d)&&(d=m)}-1!==(p=-1===d?s.lastIndexOf("@"):s.lastIndexOf("@",d))&&(h=s.slice(0,p),s=s.slice(p+1),this.auth=decodeURIComponent(h)),d=-1;for(f=0;f<or.length;f++){var m;-1!==(m=s.indexOf(or[f]))&&(-1===d||m<d)&&(d=m)}-1===d&&(d=s.length),this.host=s.slice(0,d),s=s.slice(d),this.parseHost(),this.hostname=this.hostname||"";var v="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!v)for(var y=this.hostname.split(/\./),g=(f=0,y.length);f<g;f++){var b=y[f];if(b&&!b.match(sr)){for(var E="",w=0,N=b.length;w<N;w++)b.charCodeAt(w)>127?E+="x":E+=b[w];if(!E.match(sr)){var T=y.slice(0,f),x=y.slice(f+1),O=b.match(ar);O&&(T.push(O[1]),x.unshift(O[2])),x.length&&(s="/"+x.join(".")+s),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),v||(this.hostname=Xt.toASCII(this.hostname));var _=this.port?":"+this.port:"",S=this.hostname||"";this.host=S+_,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!cr[u])for(f=0,g=nr.length;f<g;f++){var C=nr[f];if(-1!==s.indexOf(C)){var I=encodeURIComponent(C);I===C&&(I=escape(C)),s=s.split(C).join(I)}}var A=s.indexOf("#");-1!==A&&(this.hash=s.substr(A),s=s.slice(0,A));var k=s.indexOf("?");if(-1!==k?(this.search=s.substr(k),this.query=s.substr(k+1),t&&(this.query=hr.parse(this.query)),s=s.slice(0,k)):t&&(this.search="",this.query={}),s&&(this.pathname=s),lr[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){_=this.pathname||"";var R=this.search||"";this.path=_+R}return this.href=this.format(),this},Qt.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||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&zt.isObject(this.query)&&Object.keys(this.query).length&&(i=hr.stringify(this.query));var s=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||lr[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},Qt.prototype.resolve=function(e){return this.resolveObject(pr(e,!1,!0)).format()},Qt.prototype.resolveObject=function(e){if(zt.isString(e)){var t=new Qt;t.parse(e,!1,!0),e=t}for(var r=new Qt,n=Object.keys(this),o=0;o<n.length;o++){var i=n[o];r[i]=this[i]}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 lr[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!lr[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||ur[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 d=r.pathname||"",f=r.search||"";r.path=d+f}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var m=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=v||m||r.host&&e.pathname,g=y,b=r.pathname&&r.pathname.split("/")||[],E=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!lr[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===b[0]?b[0]=r.host:b.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),y=y&&(""===p[0]||""===b[0])),v)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,b=p;else if(p.length)b||(b=[]),b.pop(),b=b.concat(p),r.search=e.search,r.query=e.query;else if(!zt.isNullOrUndefined(e.search)){if(E)r.hostname=r.host=b.shift(),(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift());return r.search=e.search,r.query=e.query,zt.isNull(r.pathname)&&zt.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!b.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var w=b.slice(-1)[0],N=(r.host||e.host||b.length>1)&&("."===w||".."===w)||""===w,T=0,x=b.length;x>=0;x--)"."===(w=b[x])?b.splice(x,1):".."===w?(b.splice(x,1),T++):T&&(b.splice(x,1),T--);if(!y&&!g)for(;T--;T)b.unshift("..");!y||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),N&&"/"!==b.join("/").substr(-1)&&b.push("");var O,_=""===b[0]||b[0]&&"/"===b[0].charAt(0);E&&(r.hostname=r.host=_?"":b.length?b.shift():"",(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift()));return(y=y||r.host&&b.length)&&!_&&b.unshift(""),b.length?r.pathname=b.join("/"):(r.pathname=null,r.path=null),zt.isNull(r.pathname)&&zt.isNull(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},Qt.prototype.parseHost=function(){var e=this.host,t=er.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const dr=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:Jt({protocol:e.url.protocol,host:e.url.host,pathname:e.url.pathname});function fr(e){var t,r;try{const n=new Bt(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 mr(e){var t,r;switch(e.method){case"GET":return{query:e.url.searchParams.get("query"),variables:V(e.url.searchParams.get("variables")||"")};case"POST":if(null===(t=e.body)||void 0===t?void 0:t.query){const{query:t,variables:r}=e.body;return{query:t,variables:r}}if(null===(r=e.body)||void 0===r?void 0:r.operations){const t=e.body,{operations:r,map:n}=t,o=
|
|
7
|
+
*/k.flattenHeadersObject=function(e){return D.reduceHeadersObject(e,(function(e,t,r){return e[t]=[].concat(r).join("; "),e}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flattenHeadersObject=e.flattenHeadersList=e.reduceHeadersObject=e.objectToHeaders=e.listToHeaders=e.stringToHeaders=e.headersToObject=e.headersToList=e.headersToString=e.Headers=void 0;var t=i;Object.defineProperty(e,"Headers",{enumerable:!0,get:function(){return t.default}});var r=v;Object.defineProperty(e,"headersToString",{enumerable:!0,get:function(){return r.headersToString}});var n=m;Object.defineProperty(e,"headersToList",{enumerable:!0,get:function(){return n.headersToList}});var o=b;Object.defineProperty(e,"headersToObject",{enumerable:!0,get:function(){return o.headersToObject}});var s=w;Object.defineProperty(e,"stringToHeaders",{enumerable:!0,get:function(){return s.stringToHeaders}});var a=T;Object.defineProperty(e,"listToHeaders",{enumerable:!0,get:function(){return a.listToHeaders}});var c=x;Object.defineProperty(e,"objectToHeaders",{enumerable:!0,get:function(){return c.objectToHeaders}});var u=S;Object.defineProperty(e,"reduceHeadersObject",{enumerable:!0,get:function(){return u.reduceHeadersObject}});var l=A;Object.defineProperty(e,"flattenHeadersList",{enumerable:!0,get:function(){return l.flattenHeadersList}});var p=k;Object.defineProperty(e,"flattenHeadersObject",{enumerable:!0,get:function(){return p.flattenHeadersObject}})}(o);var j=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=e.split(H),i=n.decode||M,s=0;s<o.length;s++){var a=o[s],c=a.indexOf("=");if(!(c<0)){var u=a.substr(0,c).trim(),l=a.substr(++c,a.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),null==r[u]&&(r[u]=U(l,i))}}return r},P=function(e,t,r){var n=r||{},o=n.encode||F;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!q.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!q.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=n.maxAge){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!q.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!q.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(s+="; HttpOnly");n.secure&&(s+="; Secure");if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},M=decodeURIComponent,F=encodeURIComponent,H=/; */,q=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function U(e,t){try{return t(e)}catch(t){return e}}const B=(e,t,r)=>n=>{const o=P(e,t,r);return n.headers.set("Set-Cookie",o),"undefined"!=typeof document&&(document.cookie=o),n},$=e=>t=>(t.body=e,t);function V(e){try{return JSON.parse(e)}catch(e){return}}function K(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function G(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):K(n)&&K(r)?(e[t]=G(n,r),e):(e[t]=r,e)}),Object.assign({},e))}const W=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t),Y=e=>t=>{const r=G(V(t.body)||{},{data:e});return W(r)(t)};function z(){return"object"==typeof global&&("[object process]"===Object.prototype.toString.call(global.process)||"ReactNative"===navigator.product||void 0)}const X=2147483647,J=()=>z()?5:Math.floor(300*Math.random()+100),Q=e=>t=>{let r;if("string"==typeof e)switch(e){case"infinite":r=X;break;case"real":r=J();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=J();else{if(e>X)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},Z=e=>t=>{if(null==e)return t;const r=G(V(t.body)||{},{errors:e});return W(r)(t)},ee=z()?require("node-fetch"):window.fetch,te=e=>{const t=new o.Headers(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.all()})},re=(e,t={})=>{if("string"==typeof e)return ee(e,te(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=te(r);return ee(e.url.href,n)},ne=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),oe=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);var ie,se=Object.freeze({__proto__:null,status:r,set:L,cookie:B,body:$,data:Y,delay:Q,errors:Z,fetch:re,json:W,text:ne,xml:oe}),ae={},ce={},ue={exports:{}},le="object"==typeof Reflect?Reflect:null,pe=le&&"function"==typeof le.apply?le.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};ie=le&&"function"==typeof le.ownKeys?le.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var he=Number.isNaN||function(e){return e!=e};function de(){de.init.call(this)}ue.exports=de,ue.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}Te(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&Te(e,"error",t,r)}(e,o,{once:!0})}))},de.EventEmitter=de,de.prototype._events=void 0,de.prototype._eventsCount=0,de.prototype._maxListeners=void 0;var fe=10;function ve(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function me(e){return void 0===e._maxListeners?de.defaultMaxListeners:e._maxListeners}function ye(e,t,r,n){var o,i,s,a;if(ve(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=me(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function ge(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function be(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=ge.bind(n);return o.listener=r,n.wrapFn=o,o}function Ee(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):Ne(o,o.length)}function we(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 Ne(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function Te(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(de,"defaultMaxListeners",{enumerable:!0,get:function(){return fe},set:function(e){if("number"!=typeof e||e<0||he(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");fe=e}}),de.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},de.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||he(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},de.prototype.getMaxListeners=function(){return me(this)},de.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)pe(a,this,t);else{var c=a.length,u=Ne(a,c);for(r=0;r<c;++r)pe(u[r],this,t)}return!0},de.prototype.addListener=function(e,t){return ye(this,e,t,!1)},de.prototype.on=de.prototype.addListener,de.prototype.prependListener=function(e,t){return ye(this,e,t,!0)},de.prototype.once=function(e,t){return ve(t),this.on(e,be(this,e,t)),this},de.prototype.prependOnceListener=function(e,t){return ve(t),this.prependListener(e,be(this,e,t)),this},de.prototype.removeListener=function(e,t){var r,n,o,i,s;if(ve(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},de.prototype.off=de.prototype.removeListener,de.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},de.prototype.listeners=function(e){return Ee(this,e,!0)},de.prototype.rawListeners=function(e){return Ee(this,e,!1)},de.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):we.call(e,t)},de.prototype.listenerCount=we,de.prototype.eventNames=function(){return this._eventsCount>0?ie(this._events):[]};var _e,Oe=n&&n.__extends||(_e=function(e,t){return(_e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}_e(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),xe=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n};ce.__esModule=!0,ce.StrictEventEmitter=void 0;var Se=function(e){function t(){return e.call(this)||this}return Oe(t,e),t.prototype.on=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.once=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.off=function(t,r){return e.prototype.off.call(this,t.toString(),r)},t.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.prototype.emit.apply(this,xe([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}(ue.exports.EventEmitter);function Ce(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}ce.StrictEventEmitter=Se,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]});e.__esModule=!0,e.StrictEventEmitter=void 0,t(e,ce,"StrictEventEmitter")}(ae);var Ie={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.until=async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}},Object.defineProperty(Ie,"__esModule",{value:!0});var Re=Ae,ke=Ie.until=Re.until;const De=(e,t,r)=>[e.active,e.installing,e.waiting].filter(Boolean).find((e=>r(e.scriptURL,t)))||null;const Le=(e,t={},r)=>Ce(void 0,void 0,void 0,(function*(){const n=new URL(e,location.origin).href;const o=yield navigator.serviceWorker.getRegistrations().then((e=>e.filter((e=>De(e,n,r)))));!navigator.serviceWorker.controller&&o.length>0&&location.reload();const[i]=o;if(i)return i.update().then((()=>[De(i,n,r),i]));const[s,a]=yield ke((()=>Ce(void 0,void 0,void 0,(function*(){const o=yield navigator.serviceWorker.register(e,t);return[De(o,n,r),o]}))));if(s){if(s.message.includes("(404)")){const e=new URL((null==t?void 0:t.scope)||"/",location.href);throw new Error(`[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}));function je(e={}){if(e.quiet)return;const t=e.message||"Mocking enabled.";console.groupCollapsed(`%c[MSW] ${t}`,"color:orangered;font-weight:bold;"),console.log("%cDocumentation: %chttps://mswjs.io/docs","font-weight:bold","font-weight:normal"),console.log("Found an issue? https://github.com/mswjs/msw/issues"),console.groupEnd()}class Pe extends Error{constructor(e){super(e),this.name="NetworkError"}}var Me={},Fe={},He={exports:{}},qe={decodeValues:!0,map:!1,silent:!1};function Ue(e){return"string"==typeof e&&!!e.trim()}function Be(e,t){var r=e.split(";").filter(Ue),n=r.shift().split("="),o=n.shift(),i=n.join("=");t=t?Object.assign({},qe,t):qe;try{i=t.decodeValues?decodeURIComponent(i):i}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",e)}var s={name:o,value:i};return r.forEach((function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?s.expires=new Date(n):"max-age"===r?s.maxAge=parseInt(n,10):"secure"===r?s.secure=!0:"httponly"===r?s.httpOnly=!0:"samesite"===r?s.sameSite=n:s[r]=n})),s}function $e(e,t){if(t=t?Object.assign({},qe,t):qe,!e)return t.map?{}:[];if(e.headers&&e.headers["set-cookie"])e=e.headers["set-cookie"];else if(e.headers){var r=e.headers[Object.keys(e.headers).find((function(e){return"set-cookie"===e.toLowerCase()}))];r||!e.headers.cookie||t.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),(t=t?Object.assign({},qe,t):qe).map){return e.filter(Ue).reduce((function(e,r){var n=Be(r,t);return e[n.name]=n,e}),{})}return e.filter(Ue).map((function(e){return Be(e,t)}))}function Ve(){return j(document.cookie)}function Ke(e){var t;Me.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?Ve():{};case"include":return Ve();default:return{}}}(e)),Array.from(null===(t=Me.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 Ge(e){var t,r;const n=o.stringToHeaders(e),i=n.get("content-type")||"text/plain",s=n.get("content-disposition");if(!s)throw new Error('"Content-Disposition" header is required.');const a=s.split(";").reduce(((e,t)=>{const[r,...n]=t.trim().split("=");return e[r]=n.join("="),e}),{});return{name:null===(t=a.name)||void 0===t?void 0:t.slice(1,-1),filename:null===(r=a.filename)||void 0===r?void 0:r.slice(1,-1),contentType:i}}function We(e,t){if(!e)return 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(/; */),o=n.filter((e=>e.startsWith("boundary="))).map((e=>e.replace(/^boundary=/,"")))[0];if(!o)return;const i=new RegExp(`--+${o}`),s=e.split(i).filter((e=>e.startsWith("\r\n")&&e.endsWith("\r\n"))).map((e=>e.trimStart().replace(/\r\n$/,"")));if(!s.length)return;const a={};try{for(const e of s){const[t,...r]=e.split("\r\n\r\n"),n=r.join("\r\n\r\n"),{contentType:o,filename:i,name:s}=Ge(t),c=void 0===i?n:new File([n],i,{type:o}),u=a[s];void 0===u?a[s]=c:Array.isArray(u)?a[s]=[...u,c]:a[s]=[u,c]}return a}catch(e){return}}(e,t)||e;return(null==r?void 0:r.includes("json"))&&"object"!=typeof e&&V(e)||e}function Ye(e,t){return e.toLowerCase()===t.toLowerCase()}function ze(e){if(!e.method||!Ye(e.method,"GET")||""!==e.body)return e.body}He.exports=$e,He.exports.parse=$e,He.exports.parseString=Be,He.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,o,i,s=[],a=0;function c(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,i=!1;c();)if(","===(r=e.charAt(a))){for(n=a,a+=1,c(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(i=!0,a=o,s.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!i||a>=e.length)&&s.push(e.substring(t,e.length))}return s},function(e){var t=n&&n.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.PERSISTENCY_KEY=void 0;const r=He.exports;e.PERSISTENCY_KEY="MSW_COOKIE_STORE";e.default=new class{constructor(){this.store=new Map,this.supportsPersistency="undefined"!=typeof window}add(e,n){if("omit"===e.credentials)return;const o=new URL(e.url),i=n.headers.get("set-cookie");if(!i)return;const s=Date.now(),a=r.parse(i).map((e=>{var{maxAge:r}=e,n=t(e,["maxAge"]);return Object.assign(Object.assign({},n),{expires:void 0===r?n.expires:new Date(s+1e3*r),maxAge:r})})),c=this.store.get(o.origin)||new Map;a.forEach((e=>{this.store.set(o.origin,c.set(e.name,e))}))}get(e){this.deleteExpiredCookies();const t=new URL(e.url),n=this.store.get(t.origin)||new Map;switch(e.credentials){case"include":return r.parse(document.cookie).forEach((e=>{n.set(e.name,e)})),n;case"same-origin":return n;default:return new Map}}getAll(){return this.deleteExpiredCookies(),this.store}deleteAll(e){const t=new URL(e.url);this.store.delete(t.origin)}clear(){this.store.clear()}hydrate(){if(!this.supportsPersistency)return;const r=localStorage.getItem(e.PERSISTENCY_KEY);if(r)try{JSON.parse(r).forEach((([e,r])=>{this.store.set(e,new Map(r.map((e=>{var[r,n]=e,{expires:o}=n,i=t(n,["expires"]);return[r,void 0===o?i:Object.assign(Object.assign({},i),{expires:new Date(o)})]}))))}))}catch(t){console.warn(`\n[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${e.PERSISTENCY_KEY}").\n\nStored value:\n${localStorage.getItem(e.PERSISTENCY_KEY)}\n\nThrown exception:\n${t}\n\nInvalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(e.PERSISTENCY_KEY)}}persist(){if(!this.supportsPersistency)return;const t=Array.from(this.store.entries()).map((([e,t])=>[e,Array.from(t.entries())]));localStorage.setItem(e.PERSISTENCY_KEY,JSON.stringify(t))}deleteExpiredCookies(){const e=Date.now();this.store.forEach(((t,r)=>{t.forEach((({expires:r,name:n})=>{void 0!==r&&r.getTime()<=e&&t.delete(n)})),0===t.size&&this.store.delete(r)}))}}}(Fe),function(e){var t=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.PERSISTENCY_KEY=e.store=void 0;var r=Fe;Object.defineProperty(e,"store",{enumerable:!0,get:function(){return t(r).default}}),Object.defineProperty(e,"PERSISTENCY_KEY",{enumerable:!0,get:function(){return r.PERSISTENCY_KEY}})}(Me);var Xe=function(){function e(e,t,r,n,o){return e<t||r<t?e>r?r+1:e+1:n===o?t:t+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;s<o&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,0===(o-=s)||i<3)return i;var a,c,u,l,p,h,d,f,v,m,y,g,b=0,E=[];for(a=0;a<o;a++)E.push(a+1),E.push(t.charCodeAt(s+a));for(var w=E.length-1;b<i-3;)for(v=r.charCodeAt(s+(c=b)),m=r.charCodeAt(s+(u=b+1)),y=r.charCodeAt(s+(l=b+2)),g=r.charCodeAt(s+(p=b+3)),h=b+=4,a=0;a<w;a+=2)c=e(d=E[a],c,u,v,f=E[a+1]),u=e(c,u,l,m,f),l=e(u,l,p,y,f),h=e(l,p,h,g,f),E[a]=h,p=l,l=u,u=c,c=d;for(;b<i;)for(v=r.charCodeAt(s+(c=b)),h=++b,a=0;a<w;a+=2)d=E[a],E[a]=h=e(d,c,h,v,E[a+1]),c=d;return h}}();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)}var Qe="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function Ze(e,t){for(var r,n=/\r\n|[\n\r]/g,o=1,i=t+1;(r=n.exec(e.body))&&r.index<t;)o+=1,i=t+1-(r.index+r[0].length);return{line:o,column:i}}function et(e){return tt(e.source,Ze(e.source,e.start))}function tt(e,t){var r=e.locationOffset.column-1,n=nt(r)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,a=1===t.line?r:0,c=t.column+a,u="".concat(e.name,":").concat(s,":").concat(c,"\n"),l=n.split(/\r\n|[\n\r]/g),p=l[o];if(p.length>120){for(var h=Math.floor(c/80),d=c%80,f=[],v=0;v<p.length;v+=80)f.push(p.slice(v,v+80));return u+rt([["".concat(s),f[0]]].concat(f.slice(1,h+1).map((function(e){return["",e]})),[[" ",nt(d-1)+"^"],["",f[h+1]]]))}return u+rt([["".concat(s-1),l[o-1]],["".concat(s),p],["",nt(c-1)+"^"],["".concat(s+1),l[o+1]]])}function rt(e){var t=e.filter((function(e){return e[0],void 0!==e[1]})),r=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,n=e[0],o=e[1];return nt(r-(t=n).length)+t+(o?" | "+o:" |")})).join("\n")}function nt(e){return Array(e+1).join(" ")}function ot(e){return(ot="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 it(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 st(e,t){return!t||"object"!==ot(t)&&"function"!=typeof t?at(e):t}function at(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ct(e){var t="function"==typeof Map?new Map:void 0;return(ct=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 ut(e,arguments,ht(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),pt(n,e)})(e)}function ut(e,t,r){return(ut=lt()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&pt(o,r.prototype),o}).apply(null,arguments)}function lt(){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 pt(e,t){return(pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ht(e){return(ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dt=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&&pt(e,t)}(a,e);var t,r,n,o,i,s=(t=a,r=lt(),function(){var e,n=ht(t);if(r){var o=ht(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return st(this,e)});function a(e,t,r,n,o,i,c){var u,l,p,h,d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),d=s.call(this,e);var f,v=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,m=r;!m&&v&&(m=null===(f=v[0].loc)||void 0===f?void 0:f.source);var y,g=n;!g&&v&&(g=v.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),g&&0===g.length&&(g=void 0),n&&r?y=n.map((function(e){return Ze(r,e)})):v&&(y=v.reduce((function(e,t){return t.loc&&e.push(Ze(t.loc.source,t.loc.start)),e}),[]));var b,E=c;if(null==E&&null!=i){var w=i.extensions;"object"==Je(b=w)&&null!==b&&(E=w)}return Object.defineProperties(at(d),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(u=y)&&void 0!==u?u:void 0,enumerable:null!=y},path:{value:null!=o?o:void 0,enumerable:null!=o},nodes:{value:null!=v?v:void 0},source:{value:null!==(l=m)&&void 0!==l?l:void 0},positions:{value:null!==(p=g)&&void 0!==p?p:void 0},originalError:{value:i},extensions:{value:null!==(h=E)&&void 0!==h?h:void 0,enumerable:null!=E}}),null!=i&&i.stack?(Object.defineProperty(at(d),"stack",{value:i.stack,writable:!0,configurable:!0}),st(d)):(Error.captureStackTrace?Error.captureStackTrace(at(d),a):Object.defineProperty(at(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return n=a,(o=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r<n.length;r++){var o=n[r];o.loc&&(t+="\n\n"+et(o.loc))}else if(e.source&&e.locations)for(var i=0,s=e.locations;i<s.length;i++){var a=s[i];t+="\n\n"+tt(e.source,a)}return t}(this)}},{key:Qe,get:function(){return"Object"}}])&&it(n.prototype,o),i&&it(n,i),a}(ct(Error));function ft(e,t,r){return new dt("Syntax Error: ".concat(r),void 0,e,[t])}var vt=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 mt="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function yt(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,mt&&(e.prototype[mt]=t)}var gt=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}();yt(gt);var bt=function(){function e(e,t,r,n,o,i,s){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=o,this.value=s,this.prev=i,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();yt(bt);var Et=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 wt(e){return(wt="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 Nt(e){return Tt(e,[])}function Tt(e,t){switch(wt(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(mt)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:Tt(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var r=Math.min(10,e.length),n=e.length-r,o=[],i=0;i<r;++i)o.push(Tt(e[i],t));1===n?o.push("... 1 more item"):n>1&&o.push("... ".concat(n," more items"));return"["+o.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]";return"{ "+r.map((function(r){return r+": "+Tt(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}function _t(e,t){if(!Boolean(e))throw new Error(t)}function Ot(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 xt=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||_t(0,"Body must be a string. Received: ".concat(Nt(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||_t(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||_t(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r,n;return t=e,(r=[{key:Qe,get:function(){return"Source"}}])&&Ot(t.prototype,r),n&&Ot(t,n),e}();var St=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 Ct(e){var t=e.split(/\r\n|[\n\r]/g),r=function(e){for(var t,r=!0,n=!0,o=0,i=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:r=!1,n=!0,o=0;break;case 9:case 32:++o;break;default:n&&!r&&(null===i||o<i)&&(i=o),n=!1}return null!==(t=i)&&void 0!==t?t:0}(e);if(0!==r)for(var n=1;n<t.length;n++)t[n]=t[n].slice(r);for(var o=0;o<t.length&&It(t[o]);)++o;for(var i=t.length;i>o&&It(t[i-1]);)--i;return t.slice(o,i).join("\n")}function It(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var At=function(){function e(e){var t=new bt(Et.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!==Et.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=kt(this,e)}while(e.kind===Et.COMMENT);return e},e}();function Rt(e){return isNaN(e)?Et.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function kt(e,t){for(var r=e.source,n=r.body,o=n.length,i=t.end;i<o;){var s=n.charCodeAt(i),a=e.line,c=1+i-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 33:return new bt(Et.BANG,i,i+1,a,c,t);case 35:return Lt(r,i,a,c,t);case 36:return new bt(Et.DOLLAR,i,i+1,a,c,t);case 38:return new bt(Et.AMP,i,i+1,a,c,t);case 40:return new bt(Et.PAREN_L,i,i+1,a,c,t);case 41:return new bt(Et.PAREN_R,i,i+1,a,c,t);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return new bt(Et.SPREAD,i,i+3,a,c,t);break;case 58:return new bt(Et.COLON,i,i+1,a,c,t);case 61:return new bt(Et.EQUALS,i,i+1,a,c,t);case 64:return new bt(Et.AT,i,i+1,a,c,t);case 91:return new bt(Et.BRACKET_L,i,i+1,a,c,t);case 93:return new bt(Et.BRACKET_R,i,i+1,a,c,t);case 123:return new bt(Et.BRACE_L,i,i+1,a,c,t);case 124:return new bt(Et.PIPE,i,i+1,a,c,t);case 125:return new bt(Et.BRACE_R,i,i+1,a,c,t);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?Ft(r,i,a,c,t,e):Mt(r,i,a,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return jt(r,i,s,a,c,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Ut(r,i,a,c,t)}throw ft(r,i,Dt(s))}var u=e.line,l=1+i-e.lineStart;return new bt(Et.EOF,o,o,u,l,t)}function Dt(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(Rt(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(Rt(e),".")}function Lt(e,t,r,n,o){var i,s=e.body,a=t;do{i=s.charCodeAt(++a)}while(!isNaN(i)&&(i>31||9===i));return new bt(Et.COMMENT,t,a,r,n,o,s.slice(t+1,a))}function jt(e,t,r,n,o,i){var s=e.body,a=r,c=t,u=!1;if(45===a&&(a=s.charCodeAt(++c)),48===a){if((a=s.charCodeAt(++c))>=48&&a<=57)throw ft(e,c,"Invalid number, unexpected digit after 0: ".concat(Rt(a),"."))}else c=Pt(e,c,a),a=s.charCodeAt(c);if(46===a&&(u=!0,a=s.charCodeAt(++c),c=Pt(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=Pt(e,c,a),a=s.charCodeAt(c)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw ft(e,c,"Invalid number, expected digit but got: ".concat(Rt(a),"."));return new bt(u?Et.FLOAT:Et.INT,t,c,n,o,i,s.slice(t,c))}function Pt(e,t,r){var n=e.body,o=t,i=r;if(i>=48&&i<=57){do{i=n.charCodeAt(++o)}while(i>=48&&i<=57);return o}throw ft(e,o,"Invalid number, expected digit but got: ".concat(Rt(i),"."))}function Mt(e,t,r,n,o){for(var i=e.body,s=t+1,a=s,c=0,u="";s<i.length&&!isNaN(c=i.charCodeAt(s))&&10!==c&&13!==c;){if(34===c)return u+=i.slice(a,s),new bt(Et.STRING,t,s+1,r,n,o,u);if(c<32&&9!==c)throw ft(e,s,"Invalid character within String: ".concat(Rt(c),"."));if(++s,92===c){switch(u+=i.slice(a,s-1),c=i.charCodeAt(s)){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+="\n";break;case 114:u+="\r";break;case 116:u+="\t";break;case 117:var l=Ht(i.charCodeAt(s+1),i.charCodeAt(s+2),i.charCodeAt(s+3),i.charCodeAt(s+4));if(l<0){var p=i.slice(s+1,s+5);throw ft(e,s,"Invalid character escape sequence: \\u".concat(p,"."))}u+=String.fromCharCode(l),s+=4;break;default:throw ft(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(c),"."))}a=++s}}throw ft(e,s,"Unterminated string.")}function Ft(e,t,r,n,o,i){for(var s=e.body,a=t+3,c=a,u=0,l="";a<s.length&&!isNaN(u=s.charCodeAt(a));){if(34===u&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2))return l+=s.slice(c,a),new bt(Et.BLOCK_STRING,t,a+3,r,n,o,Ct(l));if(u<32&&9!==u&&10!==u&&13!==u)throw ft(e,a,"Invalid character within String: ".concat(Rt(u),"."));10===u?(++a,++i.line,i.lineStart=a):13===u?(10===s.charCodeAt(a+1)?a+=2:++a,++i.line,i.lineStart=a):92===u&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2)&&34===s.charCodeAt(a+3)?(l+=s.slice(c,a)+'"""',c=a+=4):++a}throw ft(e,a,"Unterminated string.")}function Ht(e,t,r,n){return qt(e)<<12|qt(t)<<8|qt(r)<<4|qt(n)}function qt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ut(e,t,r,n,o){for(var i=e.body,s=i.length,a=t+1,c=0;a!==s&&!isNaN(c=i.charCodeAt(a))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++a;return new bt(Et.NAME,t,a,r,n,o,i.slice(t,a))}var Bt=function(){function e(e,t){var r=function(e){return e instanceof xt}(e)?e:new xt(e);this._lexer=new At(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(Et.NAME);return{kind:vt.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:vt.DOCUMENT,definitions:this.many(Et.SOF,this.parseDefinition,Et.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(Et.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(Et.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(Et.BRACE_L))return{kind:vt.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(Et.NAME)&&(t=this.parseName()),{kind:vt.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(Et.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(Et.PAREN_L,this.parseVariableDefinition,Et.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:vt.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Et.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Et.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(Et.DOLLAR),{kind:vt.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:vt.SELECTION_SET,selections:this.many(Et.BRACE_L,this.parseSelection,Et.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(Et.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(Et.COLON)?(e=n,t=this.parseName()):t=n,{kind:vt.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Et.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Et.PAREN_L,t,Et.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(Et.COLON),{kind:vt.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:vt.ARGUMENT,name:this.parseName(),value:(this.expectToken(Et.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(Et.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(Et.NAME)?{kind:vt.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:vt.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:vt.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:vt.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 Et.BRACKET_L:return this.parseList(e);case Et.BRACE_L:return this.parseObject(e);case Et.INT:return this._lexer.advance(),{kind:vt.INT,value:t.value,loc:this.loc(t)};case Et.FLOAT:return this._lexer.advance(),{kind:vt.FLOAT,value:t.value,loc:this.loc(t)};case Et.STRING:case Et.BLOCK_STRING:return this.parseStringLiteral();case Et.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:vt.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:vt.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:vt.NULL,loc:this.loc(t)};default:return{kind:vt.ENUM,value:t.value,loc:this.loc(t)}}case Et.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:vt.STRING,value:e.value,block:e.kind===Et.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:vt.LIST,values:this.any(Et.BRACKET_L,(function(){return t.parseValueLiteral(e)}),Et.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:vt.OBJECT,fields:this.any(Et.BRACE_L,(function(){return t.parseObjectField(e)}),Et.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(Et.COLON),{kind:vt.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(Et.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(Et.AT),{kind:vt.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(Et.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(Et.BRACKET_R),e={kind:vt.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(Et.BANG)?{kind:vt.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:vt.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===Et.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(Et.STRING)||this.peek(Et.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(Et.BRACE_L,this.parseOperationTypeDefinition,Et.BRACE_R);return{kind:vt.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(Et.COLON);var r=this.parseNamedType();return{kind:vt.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:vt.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:vt.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(Et.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(Et.AMP)||this.peek(Et.NAME));return t}return this.delimitedMany(Et.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(Et.BRACE_L)&&this._lexer.lookahead().kind===Et.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Et.BRACE_L,this.parseFieldDefinition,Et.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(Et.COLON);var o=this.parseTypeReference(),i=this.parseDirectives(!0);return{kind:vt.FIELD_DEFINITION,description:t,name:r,arguments:n,type:o,directives:i,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(Et.PAREN_L,this.parseInputValueDef,Et.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(Et.COLON);var n,o=this.parseTypeReference();this.expectOptionalToken(Et.EQUALS)&&(n=this.parseValueLiteral(!0));var i=this.parseDirectives(!0);return{kind:vt.INPUT_VALUE_DEFINITION,description:t,name:r,type:o,defaultValue:n,directives:i,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),i=this.parseFieldsDefinition();return{kind:vt.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseUnionMemberTypes();return{kind:vt.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:o,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(Et.EQUALS)?this.delimitedMany(Et.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();return{kind:vt.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:o,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(Et.BRACE_L,this.parseEnumValueDefinition,Et.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:vt.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();return{kind:vt.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:o,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(Et.BRACE_L,this.parseInputValueDef,Et.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===Et.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(Et.BRACE_L,this.parseOperationTypeDefinition,Et.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:vt.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:vt.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return{kind:vt.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return{kind:vt.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:vt.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:vt.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:vt.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(Et.AT);var r=this.parseName(),n=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var i=this.parseDirectiveLocations();return{kind:vt.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:o,locations:i,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(Et.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==St[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 gt(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 ft(this._lexer.source,t.start,"Expected ".concat(Vt(e),", found ").concat($t(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!==Et.NAME||t.value!==e)throw ft(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat($t(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===Et.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return ft(this._lexer.source,t.start,"Unexpected ".concat($t(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 $t(e){var t=e.value;return Vt(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function Vt(e){return function(e){return e===Et.BANG||e===Et.DOLLAR||e===Et.AMP||e===Et.PAREN_L||e===Et.PAREN_R||e===Et.SPREAD||e===Et.COLON||e===Et.EQUALS||e===Et.AT||e===Et.BRACKET_L||e===Et.BRACKET_R||e===Et.BRACE_L||e===Et.PIPE||e===Et.BRACE_R}(e)?'"'.concat(e,'"'):e}var Kt={exports:{}};
|
|
8
|
+
/*! https://mths.be/punycode v1.3.2 by @mathias */!function(e,t){!function(r){var o=t&&!t.nodeType&&t,i=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,p=/^xn--/,h=/[^\x20-\x7E]/,d=/[\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"},v=Math.floor,m=String.fromCharCode;function y(e){throw RangeError(f[e])}function g(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+g((e=e.replace(d,".")).split("."),t).join(".")}function E(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function w(e){return g(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function N(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(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,o,i,s,a,c,p,h,d,f=[],m=e.length,g=0,b=128,E=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&y("not-basic"),f.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<m;){for(i=g,s=1,a=l;o>=m&&y("invalid-input"),((c=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:l)>=l||c>v((u-g)/s))&&y("overflow"),g+=c*s,!(c<(p=a<=E?1:a>=E+26?26:a-E));a+=l)s>v(u/(h=l-p))&&y("overflow"),s*=h;E=T(g-i,t=f.length+1,0==i),v(g/t)>u-b&&y("overflow"),b+=v(g/t),g%=t,f.splice(g++,0,b)}return w(f)}function O(e){var t,r,n,o,i,s,a,c,p,h,d,f,g,b,w,_=[];for(f=(e=E(e)).length,t=128,r=0,i=72,s=0;s<f;++s)(d=e[s])<128&&_.push(m(d));for(n=o=_.length,o&&_.push("-");n<f;){for(a=u,s=0;s<f;++s)(d=e[s])>=t&&d<a&&(a=d);for(a-t>v((u-r)/(g=n+1))&&y("overflow"),r+=(a-t)*g,t=a,s=0;s<f;++s)if((d=e[s])<t&&++r>u&&y("overflow"),d==t){for(c=r,p=l;!(c<(h=p<=i?1:p>=i+26?26:p-i));p+=l)w=c-h,b=l-h,_.push(m(N(h+w%b,0))),c=v(w/b);_.push(m(N(c,0))),i=T(r,g,n==o),r=0,++n}++r,++t}return _.join("")}if(a={version:"1.3.2",ucs2:{decode:E,encode:w},decode:_,encode:O,toASCII:function(e){return b(e,(function(e){return h.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return b(e,(function(e){return p.test(e)?_(e.slice(4).toLowerCase()):e}))}},o&&i)if(e.exports==o)i.exports=a;else for(c in a)a.hasOwnProperty(c)&&(o[c]=a[c]);else r.punycode=a}(n)}(Kt,Kt.exports);var Gt={};function Wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Yt=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};Gt.decode=Gt.parse=function(e,t,r,n){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/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,p,h,d=e[c].replace(i,"%20"),f=d.indexOf(r);f>=0?(u=d.substr(0,f),l=d.substr(f+1)):(u=d,l=""),p=decodeURIComponent(u),h=decodeURIComponent(l),Wt(o,p)?Array.isArray(o[p])?o[p].push(h):o[p]=[o[p],h]:o[p]=h}return o},Gt.encode=Gt.stringify=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 o=encodeURIComponent(Yt(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return o+encodeURIComponent(Yt(e))})).join(t):o+encodeURIComponent(Yt(e[n]))})).join(t):n?encodeURIComponent(Yt(n))+r+encodeURIComponent(Yt(e)):""};var zt=Kt.exports,Xt={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}},Jt=function(e){Xt.isString(e)&&(e=hr(e));return e instanceof Qt?e.format():Qt.prototype.format.call(e)};function Qt(){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 Zt=/^([a-z0-9.+-]+:)/i,er=/:[0-9]*$/,tr=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,rr=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),nr=["'"].concat(rr),or=["%","/","?",";","#"].concat(nr),ir=["/","?","#"],sr=/^[+a-z0-9A-Z_-]{0,63}$/,ar=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,cr={javascript:!0,"javascript:":!0},ur={javascript:!0,"javascript:":!0},lr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},pr=Gt;function hr(e,t,r){if(e&&Xt.isObject(e)&&e instanceof Qt)return e;var n=new Qt;return n.parse(e,t,r),n}Qt.prototype.parse=function(e,t,r){if(!Xt.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),o=-1!==n&&n<e.indexOf("#")?"?":"#",i=e.split(o);i[0]=i[0].replace(/\\/g,"/");var s=e=i.join(o);if(s=s.trim(),!r&&1===e.split("#").length){var a=tr.exec(s);if(a)return this.path=s,this.href=s,this.pathname=a[1],a[2]?(this.search=a[2],this.query=t?pr.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=Zt.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&&ur[c]||(s=s.substr(2),this.slashes=!0)}if(!ur[c]&&(l||c&&!lr[c])){for(var p,h,d=-1,f=0;f<ir.length;f++){-1!==(v=s.indexOf(ir[f]))&&(-1===d||v<d)&&(d=v)}-1!==(h=-1===d?s.lastIndexOf("@"):s.lastIndexOf("@",d))&&(p=s.slice(0,h),s=s.slice(h+1),this.auth=decodeURIComponent(p)),d=-1;for(f=0;f<or.length;f++){var v;-1!==(v=s.indexOf(or[f]))&&(-1===d||v<d)&&(d=v)}-1===d&&(d=s.length),this.host=s.slice(0,d),s=s.slice(d),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(/\./),g=(f=0,y.length);f<g;f++){var b=y[f];if(b&&!b.match(sr)){for(var E="",w=0,N=b.length;w<N;w++)b.charCodeAt(w)>127?E+="x":E+=b[w];if(!E.match(sr)){var T=y.slice(0,f),_=y.slice(f+1),O=b.match(ar);O&&(T.push(O[1]),_.unshift(O[2])),_.length&&(s="/"+_.join(".")+s),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=zt.toASCII(this.hostname));var x=this.port?":"+this.port:"",S=this.hostname||"";this.host=S+x,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!cr[u])for(f=0,g=nr.length;f<g;f++){var C=nr[f];if(-1!==s.indexOf(C)){var I=encodeURIComponent(C);I===C&&(I=escape(C)),s=s.split(C).join(I)}}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=pr.parse(this.query)),s=s.slice(0,R)):t&&(this.search="",this.query={}),s&&(this.pathname=s),lr[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){x=this.pathname||"";var k=this.search||"";this.path=x+k}return this.href=this.format(),this},Qt.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||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&Xt.isObject(this.query)&&Object.keys(this.query).length&&(i=pr.stringify(this.query));var s=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||lr[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},Qt.prototype.resolve=function(e){return this.resolveObject(hr(e,!1,!0)).format()},Qt.prototype.resolveObject=function(e){if(Xt.isString(e)){var t=new Qt;t.parse(e,!1,!0),e=t}for(var r=new Qt,n=Object.keys(this),o=0;o<n.length;o++){var i=n[o];r[i]=this[i]}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 lr[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!lr[e.protocol]){for(var u=Object.keys(e),l=0;l<u.length;l++){var p=u[l];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||ur[e.protocol])r.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),r.pathname=h.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 d=r.pathname||"",f=r.search||"";r.path=d+f}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=m||v||r.host&&e.pathname,g=y,b=r.pathname&&r.pathname.split("/")||[],E=(h=e.pathname&&e.pathname.split("/")||[],r.protocol&&!lr[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===b[0]?b[0]=r.host:b.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),y=y&&(""===h[0]||""===b[0])),m)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,b=h;else if(h.length)b||(b=[]),b.pop(),b=b.concat(h),r.search=e.search,r.query=e.query;else if(!Xt.isNullOrUndefined(e.search)){if(E)r.hostname=r.host=b.shift(),(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift());return r.search=e.search,r.query=e.query,Xt.isNull(r.pathname)&&Xt.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!b.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var w=b.slice(-1)[0],N=(r.host||e.host||b.length>1)&&("."===w||".."===w)||""===w,T=0,_=b.length;_>=0;_--)"."===(w=b[_])?b.splice(_,1):".."===w?(b.splice(_,1),T++):T&&(b.splice(_,1),T--);if(!y&&!g)for(;T--;T)b.unshift("..");!y||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),N&&"/"!==b.join("/").substr(-1)&&b.push("");var O,x=""===b[0]||b[0]&&"/"===b[0].charAt(0);E&&(r.hostname=r.host=x?"":b.length?b.shift():"",(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift()));return(y=y||r.host&&b.length)&&!x&&b.unshift(""),b.length?r.pathname=b.join("/"):(r.pathname=null,r.path=null),Xt.isNull(r.pathname)&&Xt.isNull(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},Qt.prototype.parseHost=function(){var e=this.host,t=er.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const dr=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:Jt({protocol:e.url.protocol,host:e.url.host,pathname:e.url.pathname});function fr(e){var t,r;try{const n=new Bt(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 vr(e){var t,r;switch(e.method){case"GET":return{query:e.url.searchParams.get("query"),variables:V(e.url.searchParams.get("variables")||"")};case"POST":if(null===(t=e.body)||void 0===t?void 0:t.query){const{query:t,variables:r}=e.body;return{query:t,variables:r}}if(null===(r=e.body)||void 0===r?void 0:r.operations){const t=e.body,{operations:r,map:n}=t,o=
|
|
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 r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["operations","map"]),i=V(r)||{};if(!i.query)return null;const s=V(n||"")||{},a=i.variables?function(e,t,r){const n={variables:e};for(const[e,o]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of o){const[o,...i]=t.split(".").reverse(),s=i.reverse();let a=n;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[o]=r[e]}}return n.variables}(i.variables,s,o):{};return{query:i.query,variables:a}}default:return null}}function vr(e){const t=mr(e);if(!t||!t.query)return;const{query:r,variables:n}=t,o=fr(r);if(o instanceof Error){const t=dr(e);throw new Error(`[MSW] Failed to intercept a GraphQL request to "${e.method} ${t}": cannot parse query. See the error message from the parser below.\n\n${o}`)}return{operationType:o.operationType,operationName:o.operationName,variables:n}}function yr(e){return e<300?"#69AB32":e<400?"#F0BB4B":"#E95F5D"}function gr(){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 br(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function Er(e){const t=o.objectToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:We(e.body,t)})}const wr=(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 Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});var Tr=Nr.getCleanUrl=void 0;Tr=Nr.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")};const xr=e=>{const t="undefined"!=typeof location;return"string"==typeof e&&e.startsWith("/")?`${t?location.origin:""}${e}`:e};function Or(e){if(e instanceof RegExp||e.includes("*"))return e;try{return new URL(xr(e))}catch(t){return e}}function _r(e,t){const r=function(e){return e instanceof URL?Tr(e):e instanceof RegExp?e:xr(e)}(Or(t)),n=Tr(e);return wr(r,n)}function Sr(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}const Cr={status:200,statusText:"OK",body:null,delay:0,once:!1},Ir=[];function Ar(e,t=Ir){return(...r)=>Ce(this,void 0,void 0,(function*(){const n=Object.assign({},Cr,{headers:new o.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?Sr(...i)(n):n}))}const kr=Object.assign(Ar(),{once:Ar({once:!0}),networkError(e){throw new je(e)}});const Rr={status:r,set:L,delay:Q,fetch:re};class Dr{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||Rr,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 Ce(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=this.wrapResolver(this.resolver),o=yield n(r,kr,this.ctx);return this.createExecutionResult(t,r,o)}))}wrapResolver(e){return(t,r,n)=>Ce(this,void 0,void 0,(function*(){const o=this.resolverGenerator||(yield e(t,r,n));if((i=o)&&"function"==typeof i[Symbol.iterator]){const{value:e,done:t}=o[Symbol.iterator]().next(),r=yield e;return!r&&t?this.resolverGeneratorResult:(this.resolverGenerator||(this.resolverGenerator=o),this.resolverGeneratorResult=r,r)}var i;return o}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}var Lr;e.RESTMethods=void 0,(Lr=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",Lr.GET="GET",Lr.POST="POST",Lr.PUT="PUT",Lr.PATCH="PATCH",Lr.OPTIONS="OPTIONS",Lr.DELETE="DELETE";const Pr={set:L,status:r,cookie:B,body:$,text:ne,json:W,xml:oe,delay:Q,fetch:re};class jr extends Dr{constructor(e,t,r){super({info:{header:`${e} ${t}`,mask:t,method:e},ctx:Pr,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,mask:t}=this.info,r=Or(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 _r(e.url,this.info.mask)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return Ye(this.info.method,e.method)&&t.matches}log(e,t){const r=dr(e),n=br(e),o=Er(t);console.groupCollapsed("[MSW] %s %s %s (%c%s%c)",gr(),e.method,r,`color:${yr(t.status)}`,t.status,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.mask,resolver:this.resolver}),console.log("Response",o),console.groupEnd()}}function Fr(e,t){try{return e()}catch(e){null==t||t(e)}}const Mr={set:L,status:r,delay:Q,fetch:re,data:Y,errors:Z,cookie:B};class qr extends Dr{constructor(e,t,r,n){super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${t} (origin: ${r.toString()})`,operationType:e,operationName:t},ctx:Mr,resolver:n}),this.endpoint=r}parse(e){return Fr((()=>vr(e)),(e=>console.error(e.message)))}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{variables:(null==t?void 0:t.variables)||{}})}predicate(e,t){if(!t)return!1;if(!t.operationName){const t=dr(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=_r(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,o=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName):t.operationName===this.info.operationName;return r.matches&&n&&o}log(e,t){const r=br(e),n=Er(t);console.groupCollapsed("[MSW] %s %s (%c%s%c)",gr(),this.info.operationName,`color:${yr(t.status)}`,t.status,"color:inherit"),console.log("Request:",r),console.log("Handler:",this),console.log("Response:",n),console.groupEnd()}}function Ur(e,t,r="warn"){if("function"==typeof r)return void r(e);const n=Fr((()=>vr(e))),o=function(e){return e.reduce(((e,t)=>(t instanceof jr&&e.rest.push(t),t instanceof qr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),i=n?o.graphql:o.rest,s=function(e,t,r){return t.reduce(((t,n)=>{const o=r(e,n);return t.concat([[o,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,i,n?(a=n,(e,t)=>{if(void 0===a.operationName)return 1/0;const{operationType:r,operationName:n}=t.info,o=a.operationType===r?.5:0;return ze(a.operationName,n)-o}):(e,t)=>{const{mask:r,method:n}=t.info;if(r instanceof RegExp)return 1/0;const o=Ye(e.method,n)?.5:0,i=dr(e);return ze(i,r)-o});var a;const c=s.length>0?function(e){return e.length>1?`Did you mean to request one of the following resources instead?\n\n${e.map((e=>` • ${e.info.header}`)).join("\n")}`:`Did you mean to request "${e[0].info.header}" instead?`}(s):"",u=dr(e),l=["captured a request without a matching request handler:",` • ${n?`${n.operationType} ${n.operationName} (${e.method} ${u})`:`${e.method} ${u}`}`,c,"If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks"].filter(Boolean).join("\n\n");switch(r){case"error":console.error(`[MSW] Error: ${l}`);break;case"warn":console.warn(`[MSW] Warning: ${l}`);break;case"bypass":break;default:throw new Error(`[MSW] Failed to react to an unhandled request: unknown strategy "${r}". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function.`)}}function Hr(e,t,r,n,o){var i,s,a;return Ce(this,void 0,void 0,(function*(){if(n.emit("request:start",e),e.headers.get("x-msw-bypass"))return n.emit("request:end",e),void(null===(i=null==o?void 0:o.onBypassResponse)||void 0===i||i.call(o,e));const c=yield((e,t)=>Ce(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)=>Ce(void 0,void 0,void 0,(function*(){const n=yield t;if(null==n?void 0:n.response)return t;const o=yield r.run(e);return null===o||o.handler.shouldSkip?null:o.response?(o.response.once&&r.markAsSkipped(!0),o):{request:o.request,handler:o.handler,response:void 0,parsedResult:o.parsedResult}}))),Promise.resolve(null));return n?{handler:n.handler,publicRequest:n.request,parsedRequest:n.parsedResult,response:n.response}:{handler:void 0,response:void 0}})))(e,t),{handler:u,response:l}=c;return u?l?(function(e,t){Fe.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),Fe.store.persist()}(e,l),n.emit("request:match",e),new Promise((t=>{var r,i,s;const a=c,u=(null===(r=null==o?void 0:o.transformResponse)||void 0===r?void 0:r.call(o,l))||l;null===(i=null==o?void 0:o.onMockedResponse)||void 0===i||i.call(o,u,a),setTimeout((()=>{var r;null===(r=null==o?void 0:o.onMockedResponseSent)||void 0===r||r.call(o,u,a),n.emit("request:end",e),t(u)}),null!==(s=l.delay)&&void 0!==s?s:0)}))):(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.",l),n.emit("request:end",e),void(null===(a=null==o?void 0:o.onBypassResponse)||void 0===a||a.call(o,e))):(Ur(e,t,r.onUnhandledRequest),n.emit("request:unhandled",e),n.emit("request:end",e),void(null===(s=null==o?void 0:o.onBypassResponse)||void 0===s||s.call(o,e)))}))}const Br=(e,t)=>(r,n)=>Ce(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:Xe(e),bodyUsed:e.bodyUsed,headers:new o.Headers(e.headers)};return Ke(t),t.body=We(t.body,t.headers),t}(n.payload);yield Hr(r,e.requestHandlers,t,e.emitter,{transformResponse:e=>Object.assign(Object.assign({},e),{headers:e.headers.all()}),onBypassResponse:()=>i.send({type:"MOCK_NOT_FOUND"}),onMockedResponse(e){i.send({type:"MOCK_SUCCESS",payload:e})},onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}catch(e){if(e instanceof je)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 $r=e=>function(t,r){const n=(()=>Ce(this,void 0,void 0,(function*(){e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Br(e,t)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:o}=r;if(null===(n=o.type)||void 0===n?void 0:n.includes("opaque"))return;const i=new Response(o.body||null,o);"msw"===i.headers.get("x-powered-by")?e.emitter.emit("response:mocked",i,o.requestId):e.emitter.emit("response:bypass",i,o.requestId)}}(e));const n=yield Le(t.serviceWorker.url,t.serviceWorker.options,t.findWorker),[o,i]=n;if(!o){const e=(null==r?void 0:r.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 "${t.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 "${t.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=o,e.registration=i,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==o.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield Re((()=>function(e,t){return Ce(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,o)));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 function(e,t){return Ce(this,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{Pe({quiet:t.quiet})}))}))}(e,t).catch((e=>{throw new Error(`Failed to enable mocking: ${null==e?void 0:e.message}`)})),e.keepAliveInterval=window.setInterval((()=>e.workerChannel.send("KEEPALIVE_REQUEST")),5e3),function(e,t){(null==t?void 0:t.quiet)||location.href.startsWith(e.scope)||console.warn(`[MSW] Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.\n\n- (Recommended) Register the worker at the root level ("/") of your application.\n- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}(i,e.startOptions),i})))();return t.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...r){Re((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...r)}))};const r=window.fetch;window.fetch=(...t)=>Ce(this,void 0,void 0,(function*(){return yield Re((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n};function Vr(e={}){e.quiet||console.log("%c[MSW] Mocking disabled.","color:orangered;font-weight:bold;")}const Kr={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker:(e,t)=>e===t};function Gr(e,t){return r=>(t.startOptions=function(e){return G(Kr,e||{})}(r),e(t.startOptions,r||{}))}var Wr={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.createInterceptor=void 0;var Xr=ae;Yr.createInterceptor=function(e){var t=new Xr.StrictEventEmitter,r=[];return{apply:function(){r=e.modules.map((function(r){return r(t,e.resolver)}))},on:function(e,r){t.addListener(e,r)},restore:function(){if(t.removeAllListeners(),0===r.length)throw new Error('Failed to restore patched modules: no patches found. Did you forget to run ".apply()"?');r.forEach((function(e){return e()}))}}},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.getCleanUrl=void 0,r(Yr,e);var o=Nr;Object.defineProperty(e,"getCleanUrl",{enumerable:!0,get:function(){return o.getCleanUrl}})}(Wr);var zr={},Jr={exports:{}},Qr=1e3,Zr=60*Qr,en=60*Zr,tn=24*en,rn=7*tn,nn=365.25*tn,on=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*nn;case"weeks":case"week":case"w":return r*rn;case"days":case"day":case"d":return r*tn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*en;case"minutes":case"minute":case"mins":case"min":case"m":return r*Zr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Qr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=tn)return sn(e,t,tn,"day");if(t>=en)return sn(e,t,en,"hour");if(t>=Zr)return sn(e,t,Zr,"minute");if(t>=Qr)return sn(e,t,Qr,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=tn)return Math.round(e/tn)+"d";if(t>=en)return Math.round(e/en)+"h";if(t>=Zr)return Math.round(e/Zr)+"m";if(t>=Qr)return Math.round(e/Qr)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function sn(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var an=function(e){function t(e){let n,o=null;function i(...e){if(!i.enabled)return;const r=i,o=Number(new Date),s=o-(n||o);r.diff=s,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=r,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?t.enabled(e):o,set:e=>{o=e}}),"function"==typeof t.init&&t.init(i),i}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=on,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=an(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Jr,Jr.exports);var cn=n&&n.__assign||function(){return(cn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},un=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ln=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(zr,"__esModule",{value:!0});var hn=zr.interceptFetch=void 0,pn=o,dn=Jr.exports("fetch");function fn(e){return un(this,void 0,void 0,(function(){var t;return ln(this,(function(r){switch(r.label){case 0:return t={status:e.status,statusText:e.statusText,headers:pn.objectToHeaders(pn.headersToObject(e.headers))},[4,e.text()];case 1:return[2,(t.body=r.sent(),t)]}}))}))}hn=zr.interceptFetch=function(e,t){var r=window.fetch;return dn('replacing "window.fetch"...'),window.fetch=function(n,o){return un(void 0,void 0,void 0,(function(){var i,s,a,c,u,l,h;return ln(this,(function(p){switch(p.label){case 0:return i=new Request(n,o),s="string"==typeof n?n:n.url,a=(null==o?void 0:o.method)||"GET",dn("[%s] %s",a,s),h={url:new URL(s,location.origin),method:a,headers:new pn.Headers((null==o?void 0:o.headers)||{})},[4,i.text()];case 1:return h.body=p.sent(),dn("isomorphic request",c=h),e.emit("request",c),dn("awaiting for the mocked response..."),[4,t(c,i)];case 2:return u=p.sent(),dn("mocked response",u),u?(l=function(e){return{status:e.status||200,statusText:e.statusText||"OK",headers:pn.objectToHeaders(e.headers||{}),body:e.body}}(u),dn("derived isomorphic response",l),e.emit("response",c,l),[2,new Response(u.body,cn(cn({},l),{headers:pn.flattenHeadersObject(u.headers||{})}))]):(dn("no mocked response found, bypassing..."),[2,r(n,o).then((function(t){return un(void 0,void 0,void 0,(function(){var r,n,o;return ln(this,(function(i){switch(i.label){case 0:return dn("original fetch performed",t),n=(r=e).emit,o=["response",c],[4,fn(t)];case 1:return n.apply(r,o.concat([i.sent()])),[2,t]}}))}))}))])}}))}))},function(){dn("restoring modules..."),window.fetch=r}};var mn={},vn={},yn={},gn={entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},bn={},En=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,wn=new RegExp("[\\-\\.0-9"+En.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Nn=new RegExp("^"+En.source+wn.source+"*(?::"+En.source+wn.source+"*)?$");function Tn(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Tn)}function xn(){}function On(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function _n(e,t,r,n,o,i){function s(e,t,n){e in r.attributeNames&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t,n)}for(var a,c=++t,u=0;;){var l=e.charAt(c);switch(l){case"=":if(1===u)a=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),a=e.slice(t,c)),t=c+1,!((c=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");s(a,h=e.slice(t,c).replace(/&#?\w+;/g,o),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(a,h=e.slice(t,c).replace(/&#?\w+;/g,o),t),i.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,c)).slice(-1)&&(r.closed=!0,h=h.slice(0,-1));case 2:2===u&&(h=a),4==u?(i.warning('attribute "'+h+'" missed quot(")!'),s(a,h.replace(/&#?\w+;/g,o),t)):("http://www.w3.org/1999/xhtml"===n[""]&&h.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),s(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"":l=" ";default:if(l<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:a=e.slice(t,c),u=2;break;case 4:var h=e.slice(t,c).replace(/&#?\w+;/g,o);i.warning('attribute "'+h+'" missed quot(")!!'),s(a,h,t);case 5:u=6}else switch(u){case 2:r.tagName,"http://www.w3.org/1999/xhtml"===n[""]&&a.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),s(a,a,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Sn(e,t,r){for(var n=e.tagName,o=null,i=e.length;i--;){var s=e[i],a=s.qName,c=s.value;if((p=a.indexOf(":"))>0)var u=s.prefix=a.slice(0,p),l=a.slice(p+1),h="xmlns"===u&&l;else l=a,u=null,h="xmlns"===a&&"";s.localName=l,!1!==h&&(null==o&&(o={},An(r,r={})),r[h]=o[h]=c,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,c))}for(i=e.length;i--;){(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==u&&(s.uri=r[u||""]))}var p;(p=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,p),l=e.localName=n.slice(p+1)):(u=null,l=e.localName=n);var d=e.uri=r[u||""];if(t.startElement(d,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(d,l,n),o)for(u in o)t.endPrefixMapping(u)}function Cn(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),s=e.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(o.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),o.characters(s,0,s.length),i)}return t+1}function In(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function An(e,t){for(var r in e)t[r]=e[r]}function kn(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,u=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[s-1];return r.startDTD(a,c,u),r.endDTD(),l.index+l[0].length}}return-1}function Rn(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function Dn(){this.attributeNames={}}Tn.prototype=new Error,Tn.prototype.name=Tn.name,xn.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),An(t,t={}),function(e,t,r,n,o){function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?i(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function a(t){if(t>m){var r=e.substring(m,t).replace(/&#?\w+;/g,s);p&&c(m),n.characters(r,0,t-m),m=t}}function c(t,r){for(;t>=l&&(r=h.exec(e));)u=r.index,l=u+r[0].length,p.lineNumber++;p.columnNumber=t-u+1}var u=0,l=0,h=/.*(?:\r\n?|\n)|.*$/g,p=n.locator,d=[{currentNSMap:t}],f={},m=0;for(;;){try{var v=e.indexOf("<",m);if(v<0){if(!e.substr(m).match(/^\s*$/)){var y=n.doc,g=y.createTextNode(e.substr(m));y.appendChild(g),n.currentElement=g}return}switch(v>m&&a(v),e.charAt(v+1)){case"/":var b=e.indexOf(">",v+3),E=e.substring(v+2,b),w=d.pop();b<0?(E=e.substring(v+2).replace(/[\s<].*/,""),o.error("end tag name: "+E+" is not complete:"+w.tagName),b=v+1+E.length):E.match(/\s</)&&(E=E.replace(/[\s<].*/,""),o.error("end tag name: "+E+" maybe not complete"),b=v+1+E.length);var N=w.localNSMap,T=w.tagName==E;if(T||w.tagName&&w.tagName.toLowerCase()==E.toLowerCase()){if(n.endElement(w.uri,w.localName,E),N)for(var x in N)n.endPrefixMapping(x);T||o.fatalError("end tag name: "+E+" is not match the current start tagName:"+w.tagName)}else d.push(w);b++;break;case"?":p&&c(v),b=Rn(e,v,n);break;case"!":p&&c(v),b=kn(e,v,n,o);break;default:p&&c(v);var O=new Dn,_=d[d.length-1].currentNSMap,S=(b=_n(e,v,O,_,s,o),O.length);if(!O.closed&&In(e,b,O.tagName,f)&&(O.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),p&&S){for(var C=On(p,{}),I=0;I<S;I++){var A=O[I];c(A.offset),A.locator=On(p,{})}n.locator=C,Sn(O,n,_)&&d.push(O),n.locator=p}else Sn(O,n,_)&&d.push(O);"http://www.w3.org/1999/xhtml"!==O.uri||O.closed?b++:b=Cn(e,b,O.tagName,s,n)}}catch(e){if(e instanceof Tn)throw e;o.error("element parse error: "+e),b=-1}b>m?m=b:a(Math.max(v,m)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},Dn.prototype={setTagName:function(e){if(!Nn.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!Nn.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},bn.XMLReader=xn,bn.ParseError=Tn;var Ln={};function Pn(e,t){for(var r in e)t[r]=e[r]}function jn(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,Pn(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var Fn={},Mn=Fn.ELEMENT_NODE=1,qn=Fn.ATTRIBUTE_NODE=2,Un=Fn.TEXT_NODE=3,Hn=Fn.CDATA_SECTION_NODE=4,Bn=Fn.ENTITY_REFERENCE_NODE=5,$n=Fn.ENTITY_NODE=6,Vn=Fn.PROCESSING_INSTRUCTION_NODE=7,Kn=Fn.COMMENT_NODE=8,Gn=Fn.DOCUMENT_NODE=9,Wn=Fn.DOCUMENT_TYPE_NODE=10,Yn=Fn.DOCUMENT_FRAGMENT_NODE=11,Xn=Fn.NOTATION_NODE=12,zn={},Jn={};zn.INDEX_SIZE_ERR=(Jn[1]="Index size error",1),zn.DOMSTRING_SIZE_ERR=(Jn[2]="DOMString size error",2);var Qn=zn.HIERARCHY_REQUEST_ERR=(Jn[3]="Hierarchy request error",3);zn.WRONG_DOCUMENT_ERR=(Jn[4]="Wrong document",4),zn.INVALID_CHARACTER_ERR=(Jn[5]="Invalid character",5),zn.NO_DATA_ALLOWED_ERR=(Jn[6]="No data allowed",6),zn.NO_MODIFICATION_ALLOWED_ERR=(Jn[7]="No modification allowed",7);var Zn=zn.NOT_FOUND_ERR=(Jn[8]="Not found",8);zn.NOT_SUPPORTED_ERR=(Jn[9]="Not supported",9);var eo=zn.INUSE_ATTRIBUTE_ERR=(Jn[10]="Attribute in use",10);function to(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,Jn[e]),this.message=Jn[e],Error.captureStackTrace&&Error.captureStackTrace(this,to);return r.code=e,t&&(this.message=this.message+": "+t),r}function ro(){}function no(e,t){this._node=e,this._refresh=t,oo(this)}function oo(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);Fo(e,"length",r.length),Pn(r,e),e._inc=t}}function io(){}function so(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function ao(e,t,r,n){if(n?t[so(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&mo(o,e,n),function(e,t,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function co(e,t,r){var n=so(t,r);if(!(n>=0))throw to(Zn,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(mo(i,e,r),r.ownerElement=null)}}function uo(e){if(this._features={},e)for(var t in e)this._features=e[t]}function lo(){}function ho(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function po(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(po(e,t))return!0}while(e=e.nextSibling)}function fo(){}function mo(e,t,r,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&delete t._nsMap[r.prefix?r.localName:""]}function vo(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i}}}function yo(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,vo(e.ownerDocument,e),t}function go(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Yn){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return vo(e.ownerDocument||e,e),t.nodeType==Yn&&(t.firstChild=t.lastChild=null),t}function bo(){this._nsMap={}}function Eo(){}function wo(){}function No(){}function To(){}function xo(){}function Oo(){}function _o(){}function So(){}function Co(){}function Io(){}function Ao(){}function ko(){}function Ro(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var s=[{namespace:i,prefix:null}];return Lo(this,r,e,t,s),r.join("")}function Do(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!n&&!o)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===o||"http://www.w3.org/2000/xmlns/"==o)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix==n)return s.namespace!=o}return!0}function Lo(e,t,r,n,o){if(n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Mn:o||(o=[]),o.length;var i=e.attributes,s=i.length,a=e.firstChild,c=e.tagName;r="http://www.w3.org/1999/xhtml"===e.namespaceURI||r,t.push("<",c);for(var u=0;u<s;u++){"xmlns"==(l=i.item(u)).prefix?o.push({prefix:l.localName,namespace:l.value}):"xmlns"==l.nodeName&&o.push({prefix:"",namespace:l.value})}for(u=0;u<s;u++){var l;if(Do(l=i.item(u),0,o)){var h=l.prefix||"",p=l.namespaceURI,d=h?" xmlns:"+h:" xmlns";t.push(d,'="',p,'"'),o.push({prefix:h,namespace:p})}Lo(l,t,r,n,o)}if(Do(e,0,o)){h=e.prefix||"";if(p=e.namespaceURI){d=h?" xmlns:"+h:" xmlns";t.push(d,'="',p,'"'),o.push({prefix:h,namespace:p})}}if(a||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;a;)a.data?t.push(a.data):Lo(a,t,r,n,o),a=a.nextSibling;else for(;a;)Lo(a,t,r,n,o),a=a.nextSibling;t.push("</",c,">")}else t.push("/>");return;case Gn:case Yn:for(a=e.firstChild;a;)Lo(a,t,r,n,o),a=a.nextSibling;return;case qn:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,ho),'"');case Un:return t.push(e.data.replace(/[<&]/g,ho).replace(/]]>/g,"]]>"));case Hn:return t.push("<![CDATA[",e.data,"]]>");case Kn:return t.push("\x3c!--",e.data,"--\x3e");case Wn:var f=e.publicId,m=e.systemId;if(t.push("<!DOCTYPE ",e.name),f)t.push(" PUBLIC ",f),m&&"."!=m&&t.push(" ",m),t.push(">");else if(m&&"."!=m)t.push(" SYSTEM ",m,">");else{var v=e.internalSubset;v&&t.push(" [",v,"]"),t.push(">")}return;case Vn:return t.push("<?",e.target," ",e.data,"?>");case Bn:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Po(e,t,r){var n;switch(t.nodeType){case Mn:(n=t.cloneNode(!1)).ownerDocument=e;case Yn:break;case qn:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var o=t.firstChild;o;)n.appendChild(Po(e,o,r)),o=o.nextSibling;return n}function jo(e,t,r){var n=new t.constructor;for(var o in t){var i=t[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(t.childNodes&&(n.childNodes=new ro),n.ownerDocument=e,n.nodeType){case Mn:var s=t.attributes,a=n.attributes=new io,c=s.length;a._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(jo(e,s.item(u),!0));break;case qn:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild(jo(e,l,r)),l=l.nextSibling;return n}function Fo(e,t,r){e[t]=r}zn.INVALID_STATE_ERR=(Jn[11]="Invalid state",11),zn.SYNTAX_ERR=(Jn[12]="Syntax error",12),zn.INVALID_MODIFICATION_ERR=(Jn[13]="Invalid modification",13),zn.NAMESPACE_ERR=(Jn[14]="Invalid namespace",14),zn.INVALID_ACCESS_ERR=(Jn[15]="Invalid access",15),to.prototype=Error.prototype,Pn(zn,to),ro.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)Lo(this[n],r,e,t);return r.join("")}},no.prototype.item=function(e){return oo(this),this[e]},jn(no,ro),io.prototype={length:0,item:ro.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new to(eo);var r=this.getNamedItem(e.nodeName);return ao(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new to(eo);return t=this.getNamedItemNS(e.namespaceURI,e.localName),ao(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return co(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return co(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},uo.prototype={hasFeature:function(e,t){var r=this._features[e.toLowerCase()];return!(!r||t&&!(t in r))},createDocument:function(e,t,r){var n=new fo;if(n.implementation=this,n.childNodes=new ro,n.doctype=r,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new Oo;return n.name=e,n.nodeName=e,n.publicId=t,n.systemId=r,n}},lo.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return go(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return yo(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return jo(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Un&&e.nodeType==Un?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==qn?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Pn(Fn,lo),Pn(Fn,lo.prototype),fo.prototype={nodeName:"#document",nodeType:Gn,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Yn){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==Mn&&(this.documentElement=e),go(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),yo(this,e)},importNode:function(e,t){return Po(this,e,t)},getElementById:function(e){var t=null;return po(this.documentElement,(function(r){if(r.nodeType==Mn&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new no(this,(function(e){var r=[];return po(e.documentElement,(function(n){n!==e&&n.nodeType==Mn&&t.test(n.getAttribute("class"))&&r.push(n)})),r}))},createElement:function(e){var t=new bo;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new ro,(t.attributes=new io)._ownerElement=t,t},createDocumentFragment:function(){var e=new Io;return e.ownerDocument=this,e.childNodes=new ro,e},createTextNode:function(e){var t=new No;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new To;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new xo;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new Ao;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new Eo;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Co;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new bo,n=t.split(":"),o=r.attributes=new io;return r.childNodes=new ro,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new Eo,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},jn(fo,lo),bo.prototype={nodeType:Mn,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Yn?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,vo(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new no(this,(function(t){var r=[];return po(t,(function(n){n===t||n.nodeType!=Mn||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new no(this,(function(r){var n=[];return po(r,(function(o){o===r||o.nodeType!==Mn||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},fo.prototype.getElementsByTagName=bo.prototype.getElementsByTagName,fo.prototype.getElementsByTagNameNS=bo.prototype.getElementsByTagNameNS,jn(bo,lo),Eo.prototype.nodeType=qn,jn(Eo,lo),wo.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(Jn[Qn])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},jn(wo,lo),No.prototype={nodeName:"#text",nodeType:Un,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},jn(No,wo),To.prototype={nodeName:"#comment",nodeType:Kn},jn(To,wo),xo.prototype={nodeName:"#cdata-section",nodeType:Hn},jn(xo,wo),Oo.prototype.nodeType=Wn,jn(Oo,lo),_o.prototype.nodeType=Xn,jn(_o,lo),So.prototype.nodeType=$n,jn(So,lo),Co.prototype.nodeType=Bn,jn(Co,lo),Io.prototype.nodeName="#document-fragment",Io.prototype.nodeType=Yn,jn(Io,lo),Ao.prototype.nodeType=Vn,jn(Ao,lo),ko.prototype.serializeToString=function(e,t,r){return Ro.call(e,t,r)},lo.prototype.toString=Ro;try{if(Object.defineProperty){function Mo(e){switch(e.nodeType){case Mn:case Yn:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Mo(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(no.prototype,"length",{get:function(){return oo(this),this.$$length}}),Object.defineProperty(lo.prototype,"textContent",{get:function(){return Mo(this)},set:function(e){switch(this.nodeType){case Mn:case Yn:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Fo=function(e,t,r){e["$$"+t]=r}}}catch(e){}function qo(e){this.options=e||{locator:{}}}function Uo(){this.cdata=!1}function Ho(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function Bo(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function $o(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function Vo(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}Ln.Node=lo,Ln.DOMException=to,Ln.DOMImplementation=uo,Ln.XMLSerializer=ko,qo.prototype.parseFromString=function(e,t){var r=this.options,n=new Wo,o=r.domBuilder||new Uo,i=r.errorHandler,s=r.locator,a=r.xmlns||{},c=/\/x?html?$/.test(t),u=c?Ko.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof Uo)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+Bo(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,c&&(a[""]="http://www.w3.org/1999/xhtml"),a.xml=a.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?n.parse(e,a,u):n.errorHandler.error("invalid doc source"),o.doc},Uo.prototype={startDocument:function(){this.doc=(new Xo).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;Vo(this,i),this.currentElement=i,this.locator&&Ho(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var c=n.getValue(a),u=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&Ho(n.getLocator(a),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&Ho(this.locator,r),Vo(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=$o.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&Ho(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=$o.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&Ho(this.locator,n),Vo(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&Ho(this.locator,o),Vo(this,o)}},warning:function(e){console.warn("[xmldom warning]\t"+e,Bo(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,Bo(this.locator))},fatalError:function(e){throw new Yo(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){Uo.prototype[e]=function(){return null}}));var Ko=gn,Go=bn,Wo=Go.XMLReader,Yo=Go.ParseError,Xo=yn.DOMImplementation=Ln.DOMImplementation;yn.XMLSerializer=Ln.XMLSerializer,yn.DOMParser=qo,yn.__DOMHandler=Uo;var zo={};Object.defineProperty(zo,"__esModule",{value:!0}),zo.parseJson=void 0,zo.parseJson=function(e){try{return JSON.parse(e)}catch(e){return null}};var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.bufferFrom=void 0,Jo.bufferFrom=function(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r};var Qo={},Zo={};Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.EventPolyfill=void 0;var ei=function(){function e(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,this.type="",this.srcElement=null,this.currentTarget=null,this.eventPhase=0,this.isTrusted=!0,this.composed=!1,this.cancelable=!0,this.defaultPrevented=!1,this.bubbles=!0,this.lengthComputable=!0,this.loaded=0,this.total=0,this.cancelBubble=!1,this.returnValue=!0,this.type=e,this.target=(null==t?void 0:t.target)||null,this.currentTarget=(null==t?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}return e.prototype.composedPath=function(){return[]},e.prototype.initEvent=function(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r},e.prototype.preventDefault=function(){this.defaultPrevented=!0},e.prototype.stopPropagation=function(){},e.prototype.stopImmediatePropagation=function(){},e}();Zo.EventPolyfill=ei;var ti={},ri=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ti,"__esModule",{value:!0}),ti.ProgressEventPolyfill=void 0;var ni=function(e){function t(t,r){var n=e.call(this,t)||this;return n.lengthComputable=(null==r?void 0:r.lengthComputable)||!1,n.composed=(null==r?void 0:r.composed)||!1,n.loaded=(null==r?void 0:r.loaded)||0,n.total=(null==r?void 0:r.total)||0,n}return ri(t,e),t}(Zo.EventPolyfill);ti.ProgressEventPolyfill=ni,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.createEvent=void 0;var oi=Zo,ii=ti,si="undefined"!=typeof ProgressEvent;Qo.createEvent=function(e,t,r){var n=si?ProgressEvent:ii.ProgressEventPolyfill;return["error","progress","loadstart","loadend","load","timeout","abort"].includes(t)?new n(t,{lengthComputable:!0,loaded:(null==r?void 0:r.loaded)||0,total:(null==r?void 0:r.total)||0}):new oi.EventPolyfill(t,{target:e,currentTarget:e})};var ai=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ci=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},ui=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.")},li=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(vn,"__esModule",{value:!0}),vn.createXMLHttpRequestOverride=void 0;var hi=Ie,pi=o,di=yn,fi=zo,mi=Jo,vi=Qo,yi=Jr.exports;vn.createXMLHttpRequestOverride=function(e){var t,r=e.pureXMLHttpRequest,n=e.observer,o=e.resolver,i=yi("XHR");return(t=function(){function e(){this._events=[],this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.onreadystatechange=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.url="",this.method="GET",this.readyState=this.UNSENT,this.withCredentials=!1,this.status=200,this.statusText="OK",this.data="",this.response="",this.responseType="text",this.responseText="",this.responseXML=null,this.responseURL="",this.upload=null,this.timeout=0,this._requestHeaders=new pi.Headers,this._responseHeaders=new pi.Headers}return e.prototype.setReadyState=function(e){e!==this.readyState&&(i("readyState change %d -> %d",this.readyState,e),this.readyState=e,e!==this.UNSENT&&(i("triggerring readystate change..."),this.trigger("readystatechange")))},e.prototype.trigger=function(e,t){var r,n;i('trigger "%s" (%d)',e,this.readyState),i('resolve listener for event "%s"',e);var o=this["on"+e];null==o||o.call(this,vi.createEvent(this,e,t));try{for(var s=ui(this._events),a=s.next();!a.done;a=s.next()){var c=a.value;c.name===e&&(i('calling mock event listener "%s" (%d)',e,this.readyState),c.listener.call(this,vi.createEvent(this,e,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this},e.prototype.reset=function(){i("reset"),this.setReadyState(this.UNSENT),this.status=200,this.statusText="OK",this.data="",this.response=null,this.responseText=null,this.responseXML=null,this._requestHeaders=new pi.Headers,this._responseHeaders=new pi.Headers},e.prototype.open=function(e,t,r,n,o){return void 0===r&&(r=!0),ai(this,void 0,void 0,(function(){return ci(this,(function(s){return(i=yi("XHR "+e+" "+t))("open",{method:e,url:t,async:r,user:n,password:o}),this.reset(),this.setReadyState(this.OPENED),void 0===t?(this.url=e,this.method="GET"):(this.url=t,this.method=e,this.async=r,this.user=n,this.password=o),[2]}))}))},e.prototype.send=function(e){var t,s=this;i("send %s %s",this.method,this.url),this.data=e||"";try{t=new URL(this.url)}catch(e){t=new URL(this.url,window.location.href)}i("request headers",this._requestHeaders);var a={url:t,method:this.method,body:this.data,headers:this._requestHeaders};n.emit("request",a),i("awaiting mocked response..."),Promise.resolve(hi.until((function(){return ai(s,void 0,void 0,(function(){return ci(this,(function(e){return[2,o(a,this)]}))}))}))).then((function(e){var t,o=li(e,2),c=o[0],u=o[1];if(c)return i("middleware function threw an exception!",c),s.trigger("error"),void s.abort();if(u){if(i("received mocked response",u),s.trigger("loadstart"),s.status=u.status||200,s.statusText=u.statusText||"OK",s._responseHeaders=u.headers?pi.objectToHeaders(u.headers):new pi.Headers,i("set response status",s.status,s.statusText),i("set response headers",s._responseHeaders),s.setReadyState(s.HEADERS_RECEIVED),i("response type",s.responseType),s.response=s.getResponseBody(u.body),s.responseText=u.body||"",s.responseXML=s.getResponseXML(),i("set response body",s.response),u.body&&s.response){s.setReadyState(s.LOADING);var l=mi.bufferFrom(u.body);s.trigger("progress",{loaded:l.length,total:l.length})}s.setReadyState(s.DONE),s.trigger("load"),s.trigger("loadend"),n.emit("response",a,{status:s.status,statusText:s.statusText,headers:pi.objectToHeaders(u.headers||{}),body:u.body})}else{i("no mocked response received!");var h=new r;i("opening an original request %s %s",s.method,s.url),h.open(s.method,s.url,null===(t=s.async)||void 0===t||t,s.user,s.password),h.addEventListener("load",(function(){i('original "onload"'),s.status=h.status,s.statusText=h.statusText,s.responseURL=h.responseURL,s.responseType=h.responseType,s.response=h.response,s.responseText=h.responseText,s.responseXML=h.responseXML,i("set mock request readyState to DONE"),s.setReadyState(s.DONE),i("received original response",s.status,s.statusText),i("original response body:",s.response);var e=h.getAllResponseHeaders();i("original response headers",e),s._responseHeaders=pi.stringToHeaders(e),i("original response headers (normalized)",s._responseHeaders),i("original response finished"),n.emit("response",a,{status:h.status,statusText:h.statusText,headers:s._responseHeaders,body:h.response})})),s.propagateCallbacks(h),s.propagateListeners(h),s.propagateHeaders(h,s._requestHeaders),s.async&&(h.timeout=s.timeout),i("send",s.data),h.send(s.data)}}))},e.prototype.abort=function(){i("abort"),this.readyState>this.UNSENT&&this.readyState<this.DONE&&(this.setReadyState(this.UNSENT),this.trigger("abort"))},e.prototype.dispatchEvent=function(){return!1},e.prototype.setRequestHeader=function(e,t){i('set request header "%s" to "%s"',e,t),this._requestHeaders.append(e,t)},e.prototype.getResponseHeader=function(e){if(i('get response header "%s"',e),this.readyState<this.HEADERS_RECEIVED)return i("cannot return a header: headers not received (state: %s)",this.readyState),null;var t=this._responseHeaders.get(e);return i('resolved response header "%s" to "%s"',e,t,this._responseHeaders),t},e.prototype.getAllResponseHeaders=function(){return i("get all response headers"),this.readyState<this.HEADERS_RECEIVED?(i("cannot return headers: headers not received (state: %s)",this.readyState),""):pi.headersToString(this._responseHeaders)},e.prototype.addEventListener=function(e,t){i("addEventListener",e,t),this._events.push({name:e,listener:t})},e.prototype.removeEventListener=function(e,t){i("removeEventListener",e,t),this._events=this._events.filter((function(r){return r.name!==e&&r.listener!==t}))},e.prototype.overrideMimeType=function(){},e.prototype.getResponseBody=function(e){var t=null!=e?e:"";switch(i("coerced response body to",t),this.responseType){case"json":return i("resolving response body as JSON"),fi.parseJson(t);case"blob":var r=this.getResponseHeader("content-type")||"text/plain";return i("resolving response body as Blob",{type:r}),new Blob([t],{type:r});case"arraybuffer":return i("resolving response body as ArrayBuffer"),mi.bufferFrom(t);default:return t}},e.prototype.getResponseXML=function(){var e=this.getResponseHeader("Content-Type");return"application/xml"===e||"text/xml"===e?(new di.DOMParser).parseFromString(this.responseText,e):null},e.prototype.propagateCallbacks=function(e){e.onabort=this.abort,e.onerror=this.onerror,e.ontimeout=this.ontimeout,e.onload=this.onload,e.onloadstart=this.onloadstart,e.onloadend=this.onloadend,e.onprogress=this.onprogress,e.onreadystatechange=this.onreadystatechange},e.prototype.propagateListeners=function(e){i("propagating request listeners (%d) to the original request",this._events.length,this._events),this._events.forEach((function(t){var r=t.name,n=t.listener;e.addEventListener(r,n)}))},e.prototype.propagateHeaders=function(e,t){i("propagating request headers to the original request",t),Object.entries(t.raw()).forEach((function(t){var r=li(t,2),n=r[0],o=r[1];i('setting "%s" (%s) header on the original request',n,o),e.setRequestHeader(n,o)}))},e}()).UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,t},Object.defineProperty(mn,"__esModule",{value:!0});var gi=mn.interceptXMLHttpRequest=void 0,bi=vn,Ei=Jr.exports("XHR"),wi="undefined"==typeof window?void 0:window.XMLHttpRequest;function Ni(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));e.headers.set("x-msw-request-id",t);const r={id:t,url:e.url,method:e.method,body:We(e.body,e.headers),headers:e.headers,cookies:{},redirect:"manual",referrer:"",keepalive:!1,cache:"default",mode:"cors",referrerPolicy:"no-referrer",integrity:"",destination:"document",bodyUsed:!1,credentials:"same-origin"},n=e.headers.get("cookie");Ke(r);const o=n?P(n):{};return r.cookies=Object.assign(Object.assign({},r.cookies),o),r}function Ti(e){return function(t){return Ce(this,void 0,void 0,(function*(){e.fallbackInterceptor=function(e,t){const r=Wr.createInterceptor({modules:[hn,gi],resolver(r){return Ce(this,void 0,void 0,(function*(){return Hr(Ni(r),e.requestHandlers,t,e.emitter,{transformResponse:e=>({status:e.status,statusText:e.statusText,headers:e.headers.all(),body:e.body}),onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}))}});return r.apply(),r}(e,t),Pe({message:"Mocking enabled (fallback mode).",quiet:t.quiet})}))}}gi=mn.interceptXMLHttpRequest=function(e,t){if(wi){Ei('patching "XMLHttpRequest" module...');var r=bi.createXMLHttpRequestOverride({pureXMLHttpRequest:wi,observer:e,resolver:t});window.XMLHttpRequest=r}return function(){wi&&(Ei("restoring modules..."),window.XMLHttpRequest=wi)}};let xi=[];function Oi(e){return(t,r)=>new jr(e,t,r)}const _i={head:Oi(e.RESTMethods.HEAD),get:Oi(e.RESTMethods.GET),post:Oi(e.RESTMethods.POST),put:Oi(e.RESTMethods.PUT),delete:Oi(e.RESTMethods.DELETE),patch:Oi(e.RESTMethods.PATCH),options:Oi(e.RESTMethods.OPTIONS)};function Si(e,t){return(r,n)=>new qr(e,r,t,n)}function Ci(e){return t=>new qr("all",new RegExp(".*"),e,t)}const Ii={operation:Ci("*"),query:Si("query","*"),mutation:Si("mutation","*")};const Ai=Object.assign(Object.assign({},Ii),{link:function(e){return{operation:Ci(e),query:Si("query",e),mutation:Si("mutation",e)}}});return e.GraphQLHandler=qr,e.RequestHandler=Dr,e.RestHandler=jr,e.compose=Sr,e.context=se,e.createResponseComposition=Ar,e.defaultContext=Rr,e.defaultResponse=Cr,e.graphql=Ai,e.graphqlContext=Mr,e.matchRequestUrl=_r,e.response=kr,e.rest=_i,e.restContext=Pr,e.setupWorker=function(...e){if(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).')})),X())throw new Error("[MSW] Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead.");const t={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:new ae.StrictEventEmitter,workerChannel:{on(e,r){t.events.addListener(navigator.serviceWorker,"message",(n=>{if(n.source!==t.worker)return;const o=V(n.data);o&&o.type===e&&r(n,o)}))},send(e){var r;null===(r=t.worker)||void 0===r||r.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),xi.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of xi)e.removeEventListener(t,r);xi=[]},once(e){const r=[];return new Promise(((n,o)=>{r.push(t.events.addListener(navigator.serviceWorker,"message",(t=>{try{const r=JSON.parse(t.data);r.type===e&&n(r)}catch(e){o(e)}})),t.events.addListener(navigator.serviceWorker,"messageerror",o))})).finally((()=>{r.forEach((e=>e()))}))}},useFallbackMode:!("serviceWorker"in navigator)||"file:"===location.protocol},r=t.useFallbackMode?Ti(t):$r(t),n=t.useFallbackMode?function(e){return function(){var t,r;null===(t=e.fallbackInterceptor)||void 0===t||t.restore(),Vr({quiet:null===(r=e.startOptions)||void 0===r?void 0:r.quiet})}}(t):(e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),e.events.removeAllListeners(),e.emitter.removeAllListeners(),window.clearInterval(e.keepAliveInterval),Vr({quiet:null===(t=e.startOptions)||void 0===t?void 0:t.quiet})})(t);return{start:Gr(r,t),stop:n,use(...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 jr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.mask}`),console.groupEnd()}))},on(e,r){t.emitter.addListener(e,r)}}},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 o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["operations","map"]),i=V(r)||{};if(!i.query)return null;const s=V(n||"")||{},a=i.variables?function(e,t,r){const n={variables:e};for(const[e,o]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of o){const[o,...i]=t.split(".").reverse(),s=i.reverse();let a=n;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[o]=r[e]}}return n.variables}(i.variables,s,o):{};return{query:i.query,variables:a}}default:return null}}function mr(e){const t=vr(e);if(!t||!t.query)return;const{query:r,variables:n}=t,o=fr(r);if(o instanceof Error){const t=dr(e);throw new Error(`[MSW] Failed to intercept a GraphQL request to "${e.method} ${t}": cannot parse query. See the error message from the parser below.\n\n${o}`)}return{operationType:o.operationType,operationName:o.operationName,variables:n}}function yr(e){return e<300?"#69AB32":e<400?"#F0BB4B":"#E95F5D"}function gr(){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 br(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function Er(e){const t=o.objectToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:We(e.body,t)})}const wr=(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 Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});var Tr=Nr.getCleanUrl=void 0;Tr=Nr.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")};const _r=e=>{const t="undefined"!=typeof location;return"string"==typeof e&&e.startsWith("/")?`${t?location.origin:""}${e}`:e};function Or(e){if(e instanceof RegExp||e.includes("*"))return e;try{return new URL(_r(e))}catch(t){return e}}function xr(e,t){const r=function(e){return e instanceof URL?Tr(e):e instanceof RegExp?e:_r(e)}(Or(t)),n=Tr(e);return wr(r,n)}function Sr(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}const Cr={status:200,statusText:"OK",body:null,delay:0,once:!1},Ir=[];function Ar(e,t=Ir){return(...r)=>Ce(this,void 0,void 0,(function*(){const n=Object.assign({},Cr,{headers:new o.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?Sr(...i)(n):n}))}const Rr=Object.assign(Ar(),{once:Ar({once:!0}),networkError(e){throw new Pe(e)}});const kr={status:r,set:L,delay:Q,fetch:re};class Dr{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||kr,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 Ce(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=this.wrapResolver(this.resolver),o=yield n(r,Rr,this.ctx);return this.createExecutionResult(t,r,o)}))}wrapResolver(e){return(t,r,n)=>Ce(this,void 0,void 0,(function*(){const o=this.resolverGenerator||(yield e(t,r,n));if((i=o)&&"function"==typeof i[Symbol.iterator]){const{value:e,done:t}=o[Symbol.iterator]().next(),r=yield e;return!r&&t?this.resolverGeneratorResult:(this.resolverGenerator||(this.resolverGenerator=o),this.resolverGeneratorResult=r,r)}var i;return o}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}var Lr;e.RESTMethods=void 0,(Lr=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",Lr.GET="GET",Lr.POST="POST",Lr.PUT="PUT",Lr.PATCH="PATCH",Lr.OPTIONS="OPTIONS",Lr.DELETE="DELETE";const jr={set:L,status:r,cookie:B,body:$,text:ne,json:W,xml:oe,delay:Q,fetch:re};class Pr extends Dr{constructor(e,t,r){super({info:{header:`${e} ${t}`,mask:t,method:e},ctx:jr,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,mask:t}=this.info,r=Or(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 xr(e.url,this.info.mask)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return Ye(this.info.method,e.method)&&t.matches}log(e,t){const r=dr(e),n=br(e),o=Er(t);console.groupCollapsed("[MSW] %s %s %s (%c%s%c)",gr(),e.method,r,`color:${yr(t.status)}`,t.status,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.mask,resolver:this.resolver}),console.log("Response",o),console.groupEnd()}}function Mr(e,t){try{return e()}catch(e){null==t||t(e)}}const Fr={set:L,status:r,delay:Q,fetch:re,data:Y,errors:Z,cookie:B};class Hr extends Dr{constructor(e,t,r,n){super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${t} (origin: ${r.toString()})`,operationType:e,operationName:t},ctx:Fr,resolver:n}),this.endpoint=r}parse(e){return Mr((()=>mr(e)),(e=>console.error(e.message)))}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{variables:(null==t?void 0:t.variables)||{}})}predicate(e,t){if(!t)return!1;if(!t.operationName){const t=dr(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=xr(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,o=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName):t.operationName===this.info.operationName;return r.matches&&n&&o}log(e,t){const r=br(e),n=Er(t);console.groupCollapsed("[MSW] %s %s (%c%s%c)",gr(),this.info.operationName,`color:${yr(t.status)}`,t.status,"color:inherit"),console.log("Request:",r),console.log("Handler:",this),console.log("Response:",n),console.groupEnd()}}function qr(e,t,r="warn"){if("function"==typeof r)return void r(e);const n=Mr((()=>mr(e))),o=function(e){return e.reduce(((e,t)=>(t instanceof Pr&&e.rest.push(t),t instanceof Hr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),i=n?o.graphql:o.rest,s=function(e,t,r){return t.reduce(((t,n)=>{const o=r(e,n);return t.concat([[o,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,i,n?(a=n,(e,t)=>{if(void 0===a.operationName)return 1/0;const{operationType:r,operationName:n}=t.info,o=a.operationType===r?.5:0;return Xe(a.operationName,n)-o}):(e,t)=>{const{mask:r,method:n}=t.info;if(r instanceof RegExp)return 1/0;const o=Ye(e.method,n)?.5:0,i=dr(e);return Xe(i,r)-o});var a;const c=s.length>0?function(e){return e.length>1?`Did you mean to request one of the following resources instead?\n\n${e.map((e=>` • ${e.info.header}`)).join("\n")}`:`Did you mean to request "${e[0].info.header}" instead?`}(s):"",u=dr(e),l=["captured a request without a matching request handler:",` • ${n?`${n.operationType} ${n.operationName} (${e.method} ${u})`:`${e.method} ${u}`}`,c,"If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks"].filter(Boolean).join("\n\n");switch(r){case"error":console.error(`[MSW] Error: ${l}`);break;case"warn":console.warn(`[MSW] Warning: ${l}`);break;case"bypass":break;default:throw new Error(`[MSW] Failed to react to an unhandled request: unknown strategy "${r}". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function.`)}}function Ur(e,t,r,n,o){var i,s,a;return Ce(this,void 0,void 0,(function*(){if(n.emit("request:start",e),e.headers.get("x-msw-bypass"))return n.emit("request:end",e),void(null===(i=null==o?void 0:o.onBypassResponse)||void 0===i||i.call(o,e));const c=yield((e,t)=>Ce(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)=>Ce(void 0,void 0,void 0,(function*(){const n=yield t;if(null==n?void 0:n.response)return t;const o=yield r.run(e);return null===o||o.handler.shouldSkip?null:o.response?(o.response.once&&r.markAsSkipped(!0),o):{request:o.request,handler:o.handler,response:void 0,parsedResult:o.parsedResult}}))),Promise.resolve(null));return n?{handler:n.handler,publicRequest:n.request,parsedRequest:n.parsedResult,response:n.response}:{handler:void 0,response:void 0}})))(e,t),{handler:u,response:l}=c;return u?l?(function(e,t){Me.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),Me.store.persist()}(e,l),n.emit("request:match",e),new Promise((t=>{var r,i,s;const a=c,u=(null===(r=null==o?void 0:o.transformResponse)||void 0===r?void 0:r.call(o,l))||l;null===(i=null==o?void 0:o.onMockedResponse)||void 0===i||i.call(o,u,a),setTimeout((()=>{var r;null===(r=null==o?void 0:o.onMockedResponseSent)||void 0===r||r.call(o,u,a),n.emit("request:end",e),t(u)}),null!==(s=l.delay)&&void 0!==s?s:0)}))):(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.",l),n.emit("request:end",e),void(null===(a=null==o?void 0:o.onBypassResponse)||void 0===a||a.call(o,e))):(qr(e,t,r.onUnhandledRequest),n.emit("request:unhandled",e),n.emit("request:end",e),void(null===(s=null==o?void 0:o.onBypassResponse)||void 0===s||s.call(o,e)))}))}const Br=(e,t)=>(r,n)=>Ce(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:ze(e),bodyUsed:e.bodyUsed,headers:new o.Headers(e.headers)};return Ke(t),t.body=We(t.body,t.headers),t}(n.payload);yield Ur(r,e.requestHandlers,t,e.emitter,{transformResponse:e=>Object.assign(Object.assign({},e),{headers:e.headers.all()}),onBypassResponse:()=>i.send({type:"MOCK_NOT_FOUND"}),onMockedResponse(e){i.send({type:"MOCK_SUCCESS",payload:e})},onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}catch(e){if(e instanceof Pe)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 $r=e=>function(t,r){const n=(()=>Ce(this,void 0,void 0,(function*(){e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Br(e,t)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:o}=r;if(null===(n=o.type)||void 0===n?void 0:n.includes("opaque"))return;const i=new Response(o.body||null,o);"msw"===i.headers.get("x-powered-by")?e.emitter.emit("response:mocked",i,o.requestId):e.emitter.emit("response:bypass",i,o.requestId)}}(e));const n=yield Le(t.serviceWorker.url,t.serviceWorker.options,t.findWorker),[o,i]=n;if(!o){const e=(null==r?void 0:r.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 "${t.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 "${t.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=o,e.registration=i,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==o.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield ke((()=>function(e,t){return Ce(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,o)));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 function(e,t){return Ce(this,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{je({quiet:t.quiet})}))}))}(e,t).catch((e=>{throw new Error(`Failed to enable mocking: ${null==e?void 0:e.message}`)})),e.keepAliveInterval=window.setInterval((()=>e.workerChannel.send("KEEPALIVE_REQUEST")),5e3),function(e,t){(null==t?void 0:t.quiet)||location.href.startsWith(e.scope)||console.warn(`[MSW] Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.\n\n- (Recommended) Register the worker at the root level ("/") of your application.\n- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}(i,e.startOptions),i})))();return t.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...r){ke((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...r)}))};const r=window.fetch;window.fetch=(...t)=>Ce(this,void 0,void 0,(function*(){return yield ke((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n};function Vr(e={}){e.quiet||console.log("%c[MSW] Mocking disabled.","color:orangered;font-weight:bold;")}const Kr={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker:(e,t)=>e===t};function Gr(e,t){return r=>(t.startOptions=function(e){return G(Kr,e||{})}(r),e(t.startOptions,r||{}))}var Wr,Yr={},zr={},Xr={},Jr={},Qr={exports:{}},Zr="object"==typeof Reflect?Reflect:null,en=Zr&&"function"==typeof Zr.apply?Zr.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};Wr=Zr&&"function"==typeof Zr.ownKeys?Zr.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var tn=Number.isNaN||function(e){return e!=e};function rn(){rn.init.call(this)}Qr.exports=rn,Qr.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}dn(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&dn(e,"error",t,r)}(e,o,{once:!0})}))},rn.EventEmitter=rn,rn.prototype._events=void 0,rn.prototype._eventsCount=0,rn.prototype._maxListeners=void 0;var nn=10;function on(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function sn(e){return void 0===e._maxListeners?rn.defaultMaxListeners:e._maxListeners}function an(e,t,r,n){var o,i,s,a;if(on(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=sn(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function cn(){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 un(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=cn.bind(n);return o.listener=r,n.wrapFn=o,o}function ln(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):hn(o,o.length)}function pn(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 hn(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function dn(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(rn,"defaultMaxListeners",{enumerable:!0,get:function(){return nn},set:function(e){if("number"!=typeof e||e<0||tn(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");nn=e}}),rn.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},rn.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||tn(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},rn.prototype.getMaxListeners=function(){return sn(this)},rn.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)en(a,this,t);else{var c=a.length,u=hn(a,c);for(r=0;r<c;++r)en(u[r],this,t)}return!0},rn.prototype.addListener=function(e,t){return an(this,e,t,!1)},rn.prototype.on=rn.prototype.addListener,rn.prototype.prependListener=function(e,t){return an(this,e,t,!0)},rn.prototype.once=function(e,t){return on(t),this.on(e,un(this,e,t)),this},rn.prototype.prependOnceListener=function(e,t){return on(t),this.prependListener(e,un(this,e,t)),this},rn.prototype.removeListener=function(e,t){var r,n,o,i,s;if(on(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},rn.prototype.off=rn.prototype.removeListener,rn.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},rn.prototype.listeners=function(e){return ln(this,e,!0)},rn.prototype.rawListeners=function(e){return ln(this,e,!1)},rn.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):pn.call(e,t)},rn.prototype.listenerCount=pn,rn.prototype.eventNames=function(){return this._eventsCount>0?Wr(this._events):[]};var fn=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),vn=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n};Jr.__esModule=!0,Jr.StrictEventEmitter=void 0;var mn=function(e){function t(){return e.call(this)||this}return fn(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,vn([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}(Qr.exports.EventEmitter);Jr.StrictEventEmitter=mn,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]});e.__esModule=!0,e.StrictEventEmitter=void 0,t(e,Jr,"StrictEventEmitter")}(Xr),Object.defineProperty(zr,"__esModule",{value:!0}),zr.createInterceptor=void 0;var yn=Xr;zr.createInterceptor=function(e){var t=new yn.StrictEventEmitter,r=[];return{apply:function(){r=e.modules.map((function(r){return r(t,e.resolver)}))},on:function(e,r){t.addListener(e,r)},restore:function(){if(t.removeAllListeners(),0===r.length)throw new Error('Failed to restore patched modules: no patches found. Did you forget to run ".apply()"?');r.forEach((function(e){return e()}))}}},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.getCleanUrl=void 0,r(zr,e);var o=Nr;Object.defineProperty(e,"getCleanUrl",{enumerable:!0,get:function(){return o.getCleanUrl}})}(Yr);var gn={},bn={},En={},wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn.normalizeHeaderName=void 0;var Nn=/[^a-z0-9\-#$%&'*+.^_`|~]/i;wn.normalizeHeaderName=function(e){if("string"!=typeof e&&(e=String(e)),Nn.test(e)||""===e.trim())throw new TypeError("Invalid character in header field name");return e.toLowerCase()};var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.normalizeHeaderValue=void 0,Tn.normalizeHeaderValue=function(e){return"string"!=typeof e&&(e=String(e)),e};var _n=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},On=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},xn=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.")};Object.defineProperty(En,"__esModule",{value:!0});var Sn=wn,Cn=Tn,In=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=On(e,2),n=t[0],o=t[1];r.append(n,Array.isArray(o)?o.join(", "):o)})):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,o;return _n(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,7]),e=xn(Object.keys(this._headers)),t=e.next(),i.label=1;case 1:return t.done?[3,4]:[4,t.value];case 2:i.sent(),i.label=3;case 3:return t=e.next(),[3,1];case 4:return[3,7];case 5:return r=i.sent(),n={error:r},[3,7];case 6:try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(n)throw n.error}return[7];case 7:return[2]}}))},e.prototype.values=function(){var e,t,r,n,o;return _n(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,7]),e=xn(Object.values(this._headers)),t=e.next(),i.label=1;case 1:return t.done?[3,4]:[4,t.value];case 2:i.sent(),i.label=3;case 3:return t=e.next(),[3,1];case 4:return[3,7];case 5:return r=i.sent(),n={error:r},[3,7];case 6:try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(n)throw n.error}return[7];case 7:return[2]}}))},e.prototype.entries=function(){var e,t,r,n,o,i;return _n(this,(function(s){switch(s.label){case 0:s.trys.push([0,5,6,7]),e=xn(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(),o={error:n},[3,7];case 6:try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(o)throw o.error}return[7];case 7:return[2]}}))},e.prototype.get=function(e){return this._headers[Sn.normalizeHeaderName(e)]||null},e.prototype.set=function(e,t){var r=Sn.normalizeHeaderName(e);this._headers[r]=Cn.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=Sn.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=On(r,2),o=n[0],i=n[1];return t[e._names.get(o)]=i,t}),{})},e.prototype.has=function(e){return this._headers.hasOwnProperty(Sn.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}();En.default=In;var An={},Rn={};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.headersToList=void 0,Rn.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};var kn=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(An,"__esModule",{value:!0}),An.headersToString=void 0;var Dn=Rn;An.headersToString=function(e){return Dn.headersToList(e).map((function(e){var t=kn(e,2),r=t[0],n=t[1];return r+": "+[].concat(n).join(", ")})).join("\r\n")};var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.headersToObject=void 0;var jn=["user-agent"];Ln.headersToObject=function(e){var t={};return e.forEach((function(e,r){var n=!jn.includes(r.toLowerCase())&&e.includes(",");t[r]=n?e.split(",").map((function(e){return e.trim()})):e})),t};var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.stringToHeaders=void 0;var Mn=En;Pn.stringToHeaders=function(e){return e.trim().split(/[\r\n]+/).reduce((function(e,t){var r=t.split(": "),n=r.shift(),o=r.join(": ");return e.append(n,o),e}),new Mn.default)};var Fn={},Hn=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.listToHeaders=void 0;var qn=En;Fn.listToHeaders=function(e){var t=new qn.default;return e.forEach((function(e){var r=Hn(e,2),n=r[0],o=r[1];[].concat(o).forEach((function(e){t.append(n,e)}))})),t};var Un={},Bn={};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.reduceHeadersObject=void 0,Bn.reduceHeadersObject=function(e,t,r){return Object.keys(e).reduce((function(r,n){return t(r,n,e[n])}),r)},Object.defineProperty(Un,"__esModule",{value:!0}),Un.objectToHeaders=void 0;var $n=En,Vn=Bn;Un.objectToHeaders=function(e){return Vn.reduceHeadersObject(e,(function(e,t,r){return[].concat(r).filter(Boolean).forEach((function(r){e.append(t,r)})),e}),new $n.default)};var Kn={},Gn=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.flattenHeadersList=void 0,Kn.flattenHeadersList=function(e){return e.map((function(e){var t=Gn(e,2),r=t[0],n=t[1];return[r,[].concat(n).join("; ")]}))};var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.flattenHeadersObject=void 0;var Yn=Bn;Wn.flattenHeadersObject=function(e){return Yn.reduceHeadersObject(e,(function(e,t,r){return e[t]=[].concat(r).join("; "),e}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flattenHeadersObject=e.flattenHeadersList=e.reduceHeadersObject=e.objectToHeaders=e.listToHeaders=e.stringToHeaders=e.headersToObject=e.headersToList=e.headersToString=e.Headers=void 0;var t=En;Object.defineProperty(e,"Headers",{enumerable:!0,get:function(){return t.default}});var r=An;Object.defineProperty(e,"headersToString",{enumerable:!0,get:function(){return r.headersToString}});var n=Rn;Object.defineProperty(e,"headersToList",{enumerable:!0,get:function(){return n.headersToList}});var o=Ln;Object.defineProperty(e,"headersToObject",{enumerable:!0,get:function(){return o.headersToObject}});var i=Pn;Object.defineProperty(e,"stringToHeaders",{enumerable:!0,get:function(){return i.stringToHeaders}});var s=Fn;Object.defineProperty(e,"listToHeaders",{enumerable:!0,get:function(){return s.listToHeaders}});var a=Un;Object.defineProperty(e,"objectToHeaders",{enumerable:!0,get:function(){return a.objectToHeaders}});var c=Bn;Object.defineProperty(e,"reduceHeadersObject",{enumerable:!0,get:function(){return c.reduceHeadersObject}});var u=Kn;Object.defineProperty(e,"flattenHeadersList",{enumerable:!0,get:function(){return u.flattenHeadersList}});var l=Wn;Object.defineProperty(e,"flattenHeadersObject",{enumerable:!0,get:function(){return l.flattenHeadersObject}})}(bn);var zn={};Object.defineProperty(zn,"__esModule",{value:!0}),zn.toIsoResponse=void 0;var Xn=bn;zn.toIsoResponse=function(e){return{status:e.status||200,statusText:e.statusText||"OK",headers:Xn.objectToHeaders(e.headers||{}),body:e.body}};var Jn={exports:{}},Qn=1e3,Zn=60*Qn,eo=60*Zn,to=24*eo,ro=7*to,no=365.25*to,oo=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*no;case"weeks":case"week":case"w":return r*ro;case"days":case"day":case"d":return r*to;case"hours":case"hour":case"hrs":case"hr":case"h":return r*eo;case"minutes":case"minute":case"mins":case"min":case"m":return r*Zn;case"seconds":case"second":case"secs":case"sec":case"s":return r*Qn;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=to)return io(e,t,to,"day");if(t>=eo)return io(e,t,eo,"hour");if(t>=Zn)return io(e,t,Zn,"minute");if(t>=Qn)return io(e,t,Qn,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=to)return Math.round(e/to)+"d";if(t>=eo)return Math.round(e/eo)+"h";if(t>=Zn)return Math.round(e/Zn)+"m";if(t>=Qn)return Math.round(e/Qn)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function io(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var so=function(e){function t(e){let n,o=null;function i(...e){if(!i.enabled)return;const r=i,o=Number(new Date),s=o-(n||o);r.diff=s,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=r,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?t.enabled(e):o,set:e=>{o=e}}),"function"==typeof t.init&&t.init(i),i}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=oo,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=so(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Jn,Jn.exports);var ao=n&&n.__assign||function(){return(ao=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},co=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},uo=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(gn,"__esModule",{value:!0});var lo=gn.interceptFetch=void 0,po=bn,ho=zn,fo=Jn.exports("fetch");function vo(e){return co(this,void 0,void 0,(function(){var t;return uo(this,(function(r){switch(r.label){case 0:return t={status:e.status,statusText:e.statusText,headers:po.objectToHeaders(po.headersToObject(e.headers))},[4,e.text()];case 1:return[2,(t.body=r.sent(),t)]}}))}))}lo=gn.interceptFetch=function(e,t){var r=window.fetch;return fo('replacing "window.fetch"...'),window.fetch=function(n,o){return co(void 0,void 0,void 0,(function(){var i,s,a,c,u,l,p;return uo(this,(function(h){switch(h.label){case 0:return i=new Request(n,o),s="string"==typeof n?n:n.url,a=(null==o?void 0:o.method)||"GET",fo("[%s] %s",a,s),p={url:new URL(s,location.origin),method:a,headers:new po.Headers((null==o?void 0:o.headers)||{})},[4,i.text()];case 1:return p.body=h.sent(),fo("isomorphic request",c=p),e.emit("request",c),fo("awaiting for the mocked response..."),[4,t(c,i)];case 2:return u=h.sent(),fo("mocked response",u),u?(l=ho.toIsoResponse(u),fo("derived isomorphic response",l),e.emit("response",c,l),[2,new Response(u.body,ao(ao({},l),{headers:po.flattenHeadersObject(u.headers||{})}))]):(fo("no mocked response found, bypassing..."),[2,r(n,o).then((function(t){return co(void 0,void 0,void 0,(function(){var r,n,o;return uo(this,(function(i){switch(i.label){case 0:return fo("original fetch performed",t),n=(r=e).emit,o=["response",c],[4,vo(t)];case 1:return n.apply(r,o.concat([i.sent()])),[2,t]}}))}))}))])}}))}))},function(){fo("restoring modules..."),window.fetch=r}};var mo={},yo={},go={},bo={};Object.defineProperty(bo,"__esModule",{value:!0}),bo.until=async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}},Object.defineProperty(go,"__esModule",{value:!0});var Eo=bo;go.until=Eo.until;var wo={},No={entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},To={},_o=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Oo=new RegExp("[\\-\\.0-9"+_o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),xo=new RegExp("^"+_o.source+Oo.source+"*(?::"+_o.source+Oo.source+"*)?$");function So(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,So)}function Co(){}function Io(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Ao(e,t,r,n,o,i){function s(e,t,n){e in r.attributeNames&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t,n)}for(var a,c=++t,u=0;;){var l=e.charAt(c);switch(l){case"=":if(1===u)a=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),a=e.slice(t,c)),t=c+1,!((c=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(a,p=e.slice(t,c).replace(/&#?\w+;/g,o),t),i.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,c)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===u&&(p=a),4==u?(i.warning('attribute "'+p+'" missed quot(")!'),s(a,p.replace(/&#?\w+;/g,o),t)):("http://www.w3.org/1999/xhtml"===n[""]&&p.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"":l=" ";default:if(l<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:a=e.slice(t,c),u=2;break;case 4:var p=e.slice(t,c).replace(/&#?\w+;/g,o);i.warning('attribute "'+p+'" missed quot(")!!'),s(a,p,t);case 5:u=6}else switch(u){case 2:r.tagName,"http://www.w3.org/1999/xhtml"===n[""]&&a.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),s(a,a,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Ro(e,t,r){for(var n=e.tagName,o=null,i=e.length;i--;){var s=e[i],a=s.qName,c=s.value;if((h=a.indexOf(":"))>0)var u=s.prefix=a.slice(0,h),l=a.slice(h+1),p="xmlns"===u&&l;else l=a,u=null,p="xmlns"===a&&"";s.localName=l,!1!==p&&(null==o&&(o={},Lo(r,r={})),r[p]=o[p]=c,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(p,c))}for(i=e.length;i--;){(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==u&&(s.uri=r[u||""]))}var h;(h=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,h),l=e.localName=n.slice(h+1)):(u=null,l=e.localName=n);var d=e.uri=r[u||""];if(t.startElement(d,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(d,l,n),o)for(u in o)t.endPrefixMapping(u)}function ko(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),s=e.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(o.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),o.characters(s,0,s.length),i)}return t+1}function Do(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function Lo(e,t){for(var r in e)t[r]=e[r]}function jo(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,u=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[s-1];return r.startDTD(a,c,u),r.endDTD(),l.index+l[0].length}}return-1}function Po(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function Mo(){this.attributeNames={}}So.prototype=new Error,So.prototype.name=So.name,Co.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),Lo(t,t={}),function(e,t,r,n,o){function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?i(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function a(t){if(t>v){var r=e.substring(v,t).replace(/&#?\w+;/g,s);h&&c(v),n.characters(r,0,t-v),v=t}}function c(t,r){for(;t>=l&&(r=p.exec(e));)u=r.index,l=u+r[0].length,h.lineNumber++;h.columnNumber=t-u+1}var u=0,l=0,p=/.*(?:\r\n?|\n)|.*$/g,h=n.locator,d=[{currentNSMap:t}],f={},v=0;for(;;){try{var m=e.indexOf("<",v);if(m<0){if(!e.substr(v).match(/^\s*$/)){var y=n.doc,g=y.createTextNode(e.substr(v));y.appendChild(g),n.currentElement=g}return}switch(m>v&&a(m),e.charAt(m+1)){case"/":var b=e.indexOf(">",m+3),E=e.substring(m+2,b),w=d.pop();b<0?(E=e.substring(m+2).replace(/[\s<].*/,""),o.error("end tag name: "+E+" is not complete:"+w.tagName),b=m+1+E.length):E.match(/\s</)&&(E=E.replace(/[\s<].*/,""),o.error("end tag name: "+E+" maybe not complete"),b=m+1+E.length);var N=w.localNSMap,T=w.tagName==E;if(T||w.tagName&&w.tagName.toLowerCase()==E.toLowerCase()){if(n.endElement(w.uri,w.localName,E),N)for(var _ in N)n.endPrefixMapping(_);T||o.fatalError("end tag name: "+E+" is not match the current start tagName:"+w.tagName)}else d.push(w);b++;break;case"?":h&&c(m),b=Po(e,m,n);break;case"!":h&&c(m),b=jo(e,m,n,o);break;default:h&&c(m);var O=new Mo,x=d[d.length-1].currentNSMap,S=(b=Ao(e,m,O,x,s,o),O.length);if(!O.closed&&Do(e,b,O.tagName,f)&&(O.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),h&&S){for(var C=Io(h,{}),I=0;I<S;I++){var A=O[I];c(A.offset),A.locator=Io(h,{})}n.locator=C,Ro(O,n,x)&&d.push(O),n.locator=h}else Ro(O,n,x)&&d.push(O);"http://www.w3.org/1999/xhtml"!==O.uri||O.closed?b++:b=ko(e,b,O.tagName,s,n)}}catch(e){if(e instanceof So)throw e;o.error("element parse error: "+e),b=-1}b>v?v=b:a(Math.max(m,v)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},Mo.prototype={setTagName:function(e){if(!xo.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!xo.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},To.XMLReader=Co,To.ParseError=So;var Fo={};function Ho(e,t){for(var r in e)t[r]=e[r]}function qo(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,Ho(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var Uo={},Bo=Uo.ELEMENT_NODE=1,$o=Uo.ATTRIBUTE_NODE=2,Vo=Uo.TEXT_NODE=3,Ko=Uo.CDATA_SECTION_NODE=4,Go=Uo.ENTITY_REFERENCE_NODE=5,Wo=Uo.ENTITY_NODE=6,Yo=Uo.PROCESSING_INSTRUCTION_NODE=7,zo=Uo.COMMENT_NODE=8,Xo=Uo.DOCUMENT_NODE=9,Jo=Uo.DOCUMENT_TYPE_NODE=10,Qo=Uo.DOCUMENT_FRAGMENT_NODE=11,Zo=Uo.NOTATION_NODE=12,ei={},ti={};ei.INDEX_SIZE_ERR=(ti[1]="Index size error",1),ei.DOMSTRING_SIZE_ERR=(ti[2]="DOMString size error",2);var ri=ei.HIERARCHY_REQUEST_ERR=(ti[3]="Hierarchy request error",3);ei.WRONG_DOCUMENT_ERR=(ti[4]="Wrong document",4),ei.INVALID_CHARACTER_ERR=(ti[5]="Invalid character",5),ei.NO_DATA_ALLOWED_ERR=(ti[6]="No data allowed",6),ei.NO_MODIFICATION_ALLOWED_ERR=(ti[7]="No modification allowed",7);var ni=ei.NOT_FOUND_ERR=(ti[8]="Not found",8);ei.NOT_SUPPORTED_ERR=(ti[9]="Not supported",9);var oi=ei.INUSE_ATTRIBUTE_ERR=(ti[10]="Attribute in use",10);function ii(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,ti[e]),this.message=ti[e],Error.captureStackTrace&&Error.captureStackTrace(this,ii);return r.code=e,t&&(this.message=this.message+": "+t),r}function si(){}function ai(e,t){this._node=e,this._refresh=t,ci(this)}function ci(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);qi(e,"length",r.length),Ho(r,e),e._inc=t}}function ui(){}function li(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function pi(e,t,r,n){if(n?t[li(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&gi(o,e,n),function(e,t,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function hi(e,t,r){var n=li(t,r);if(!(n>=0))throw ii(ni,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(gi(i,e,r),r.ownerElement=null)}}function di(e){if(this._features={},e)for(var t in e)this._features=e[t]}function fi(){}function vi(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function mi(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(mi(e,t))return!0}while(e=e.nextSibling)}function yi(){}function gi(e,t,r,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&delete t._nsMap[r.prefix?r.localName:""]}function bi(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i}}}function Ei(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,bi(e.ownerDocument,e),t}function wi(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Qo){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return bi(e.ownerDocument||e,e),t.nodeType==Qo&&(t.firstChild=t.lastChild=null),t}function Ni(){this._nsMap={}}function Ti(){}function _i(){}function Oi(){}function xi(){}function Si(){}function Ci(){}function Ii(){}function Ai(){}function Ri(){}function ki(){}function Di(){}function Li(){}function ji(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var s=[{namespace:i,prefix:null}];return Mi(this,r,e,t,s),r.join("")}function Pi(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!n&&!o)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===o||"http://www.w3.org/2000/xmlns/"==o)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix==n)return s.namespace!=o}return!0}function Mi(e,t,r,n,o){if(n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Bo:o||(o=[]),o.length;var i=e.attributes,s=i.length,a=e.firstChild,c=e.tagName;r="http://www.w3.org/1999/xhtml"===e.namespaceURI||r,t.push("<",c);for(var u=0;u<s;u++){"xmlns"==(l=i.item(u)).prefix?o.push({prefix:l.localName,namespace:l.value}):"xmlns"==l.nodeName&&o.push({prefix:"",namespace:l.value})}for(u=0;u<s;u++){var l;if(Pi(l=i.item(u),0,o)){var p=l.prefix||"",h=l.namespaceURI,d=p?" xmlns:"+p:" xmlns";t.push(d,'="',h,'"'),o.push({prefix:p,namespace:h})}Mi(l,t,r,n,o)}if(Pi(e,0,o)){p=e.prefix||"";if(h=e.namespaceURI){d=p?" xmlns:"+p:" xmlns";t.push(d,'="',h,'"'),o.push({prefix:p,namespace:h})}}if(a||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;a;)a.data?t.push(a.data):Mi(a,t,r,n,o),a=a.nextSibling;else for(;a;)Mi(a,t,r,n,o),a=a.nextSibling;t.push("</",c,">")}else t.push("/>");return;case Xo:case Qo:for(a=e.firstChild;a;)Mi(a,t,r,n,o),a=a.nextSibling;return;case $o:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,vi),'"');case Vo:return t.push(e.data.replace(/[<&]/g,vi).replace(/]]>/g,"]]>"));case Ko:return t.push("<![CDATA[",e.data,"]]>");case zo:return t.push("\x3c!--",e.data,"--\x3e");case Jo:var f=e.publicId,v=e.systemId;if(t.push("<!DOCTYPE ",e.name),f)t.push(" PUBLIC ",f),v&&"."!=v&&t.push(" ",v),t.push(">");else if(v&&"."!=v)t.push(" SYSTEM ",v,">");else{var m=e.internalSubset;m&&t.push(" [",m,"]"),t.push(">")}return;case Yo:return t.push("<?",e.target," ",e.data,"?>");case Go:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Fi(e,t,r){var n;switch(t.nodeType){case Bo:(n=t.cloneNode(!1)).ownerDocument=e;case Qo:break;case $o:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var o=t.firstChild;o;)n.appendChild(Fi(e,o,r)),o=o.nextSibling;return n}function Hi(e,t,r){var n=new t.constructor;for(var o in t){var i=t[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(t.childNodes&&(n.childNodes=new si),n.ownerDocument=e,n.nodeType){case Bo:var s=t.attributes,a=n.attributes=new ui,c=s.length;a._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(Hi(e,s.item(u),!0));break;case $o:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild(Hi(e,l,r)),l=l.nextSibling;return n}function qi(e,t,r){e[t]=r}ei.INVALID_STATE_ERR=(ti[11]="Invalid state",11),ei.SYNTAX_ERR=(ti[12]="Syntax error",12),ei.INVALID_MODIFICATION_ERR=(ti[13]="Invalid modification",13),ei.NAMESPACE_ERR=(ti[14]="Invalid namespace",14),ei.INVALID_ACCESS_ERR=(ti[15]="Invalid access",15),ii.prototype=Error.prototype,Ho(ei,ii),si.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)Mi(this[n],r,e,t);return r.join("")}},ai.prototype.item=function(e){return ci(this),this[e]},qo(ai,si),ui.prototype={length:0,item:si.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new ii(oi);var r=this.getNamedItem(e.nodeName);return pi(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new ii(oi);return t=this.getNamedItemNS(e.namespaceURI,e.localName),pi(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return hi(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return hi(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},di.prototype={hasFeature:function(e,t){var r=this._features[e.toLowerCase()];return!(!r||t&&!(t in r))},createDocument:function(e,t,r){var n=new yi;if(n.implementation=this,n.childNodes=new si,n.doctype=r,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new Ci;return n.name=e,n.nodeName=e,n.publicId=t,n.systemId=r,n}},fi.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return wi(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Ei(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Hi(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Vo&&e.nodeType==Vo?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==$o?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==$o?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Ho(Uo,fi),Ho(Uo,fi.prototype),yi.prototype={nodeName:"#document",nodeType:Xo,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Qo){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==Bo&&(this.documentElement=e),wi(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Ei(this,e)},importNode:function(e,t){return Fi(this,e,t)},getElementById:function(e){var t=null;return mi(this.documentElement,(function(r){if(r.nodeType==Bo&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new ai(this,(function(e){var r=[];return mi(e.documentElement,(function(n){n!==e&&n.nodeType==Bo&&t.test(n.getAttribute("class"))&&r.push(n)})),r}))},createElement:function(e){var t=new Ni;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new si,(t.attributes=new ui)._ownerElement=t,t},createDocumentFragment:function(){var e=new ki;return e.ownerDocument=this,e.childNodes=new si,e},createTextNode:function(e){var t=new Oi;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new xi;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Si;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new Di;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new Ti;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Ri;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new Ni,n=t.split(":"),o=r.attributes=new ui;return r.childNodes=new si,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new Ti,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},qo(yi,fi),Ni.prototype={nodeType:Bo,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Qo?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,bi(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new ai(this,(function(t){var r=[];return mi(t,(function(n){n===t||n.nodeType!=Bo||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new ai(this,(function(r){var n=[];return mi(r,(function(o){o===r||o.nodeType!==Bo||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},yi.prototype.getElementsByTagName=Ni.prototype.getElementsByTagName,yi.prototype.getElementsByTagNameNS=Ni.prototype.getElementsByTagNameNS,qo(Ni,fi),Ti.prototype.nodeType=$o,qo(Ti,fi),_i.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ti[ri])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},qo(_i,fi),Oi.prototype={nodeName:"#text",nodeType:Vo,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},qo(Oi,_i),xi.prototype={nodeName:"#comment",nodeType:zo},qo(xi,_i),Si.prototype={nodeName:"#cdata-section",nodeType:Ko},qo(Si,_i),Ci.prototype.nodeType=Jo,qo(Ci,fi),Ii.prototype.nodeType=Zo,qo(Ii,fi),Ai.prototype.nodeType=Wo,qo(Ai,fi),Ri.prototype.nodeType=Go,qo(Ri,fi),ki.prototype.nodeName="#document-fragment",ki.prototype.nodeType=Qo,qo(ki,fi),Di.prototype.nodeType=Yo,qo(Di,fi),Li.prototype.serializeToString=function(e,t,r){return ji.call(e,t,r)},fi.prototype.toString=ji;try{if(Object.defineProperty){function Ui(e){switch(e.nodeType){case Bo:case Qo:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Ui(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(ai.prototype,"length",{get:function(){return ci(this),this.$$length}}),Object.defineProperty(fi.prototype,"textContent",{get:function(){return Ui(this)},set:function(e){switch(this.nodeType){case Bo:case Qo:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),qi=function(e,t,r){e["$$"+t]=r}}}catch(e){}function Bi(e){this.options=e||{locator:{}}}function $i(){this.cdata=!1}function Vi(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function Ki(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function Gi(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function Wi(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}Fo.Node=fi,Fo.DOMException=ii,Fo.DOMImplementation=di,Fo.XMLSerializer=Li,Bi.prototype.parseFromString=function(e,t){var r=this.options,n=new Xi,o=r.domBuilder||new $i,i=r.errorHandler,s=r.locator,a=r.xmlns||{},c=/\/x?html?$/.test(t),u=c?Yi.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof $i)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+Ki(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,c&&(a[""]="http://www.w3.org/1999/xhtml"),a.xml=a.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?n.parse(e,a,u):n.errorHandler.error("invalid doc source"),o.doc},$i.prototype={startDocument:function(){this.doc=(new Qi).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;Wi(this,i),this.currentElement=i,this.locator&&Vi(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var c=n.getValue(a),u=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&Vi(n.getLocator(a),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&Vi(this.locator,r),Wi(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=Gi.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&Vi(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=Gi.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&Vi(this.locator,n),Wi(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&Vi(this.locator,o),Wi(this,o)}},warning:function(e){console.warn("[xmldom warning]\t"+e,Ki(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,Ki(this.locator))},fatalError:function(e){throw new Ji(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){$i.prototype[e]=function(){return null}}));var Yi=No,zi=To,Xi=zi.XMLReader,Ji=zi.ParseError,Qi=wo.DOMImplementation=Fo.DOMImplementation;wo.XMLSerializer=Fo.XMLSerializer,wo.DOMParser=Bi,wo.__DOMHandler=$i;var Zi={};Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.parseJson=void 0,Zi.parseJson=function(e){try{return JSON.parse(e)}catch(e){return null}};var es={};Object.defineProperty(es,"__esModule",{value:!0}),es.bufferFrom=void 0,es.bufferFrom=function(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r};var ts={},rs={};Object.defineProperty(rs,"__esModule",{value:!0}),rs.EventPolyfill=void 0;var ns=function(){function e(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,this.type="",this.srcElement=null,this.currentTarget=null,this.eventPhase=0,this.isTrusted=!0,this.composed=!1,this.cancelable=!0,this.defaultPrevented=!1,this.bubbles=!0,this.lengthComputable=!0,this.loaded=0,this.total=0,this.cancelBubble=!1,this.returnValue=!0,this.type=e,this.target=(null==t?void 0:t.target)||null,this.currentTarget=(null==t?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}return e.prototype.composedPath=function(){return[]},e.prototype.initEvent=function(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r},e.prototype.preventDefault=function(){this.defaultPrevented=!0},e.prototype.stopPropagation=function(){},e.prototype.stopImmediatePropagation=function(){},e}();rs.EventPolyfill=ns;var os={},is=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(os,"__esModule",{value:!0}),os.ProgressEventPolyfill=void 0;var ss=function(e){function t(t,r){var n=e.call(this,t)||this;return n.lengthComputable=(null==r?void 0:r.lengthComputable)||!1,n.composed=(null==r?void 0:r.composed)||!1,n.loaded=(null==r?void 0:r.loaded)||0,n.total=(null==r?void 0:r.total)||0,n}return is(t,e),t}(rs.EventPolyfill);os.ProgressEventPolyfill=ss,Object.defineProperty(ts,"__esModule",{value:!0}),ts.createEvent=void 0;var as=rs,cs=os,us="undefined"!=typeof ProgressEvent;ts.createEvent=function(e,t,r){var n=us?ProgressEvent:cs.ProgressEventPolyfill;return["error","progress","loadstart","loadend","load","timeout","abort"].includes(t)?new n(t,{lengthComputable:!0,loaded:(null==r?void 0:r.loaded)||0,total:(null==r?void 0:r.total)||0}):new as.EventPolyfill(t,{target:e,currentTarget:e})};var ls=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},ps=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},hs=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.")},ds=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(yo,"__esModule",{value:!0}),yo.createXMLHttpRequestOverride=void 0;var fs=go,vs=bn,ms=wo,ys=Zi,gs=zn,bs=es,Es=ts,ws=Jn.exports;yo.createXMLHttpRequestOverride=function(e){var t,r=e.pureXMLHttpRequest,n=e.observer,o=e.resolver,i=ws("XHR");return(t=function(){function e(){this._events=[],this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.onreadystatechange=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.url="",this.method="GET",this.readyState=this.UNSENT,this.withCredentials=!1,this.status=200,this.statusText="OK",this.data="",this.response="",this.responseType="text",this.responseText="",this.responseXML=null,this.responseURL="",this.upload=null,this.timeout=0,this._requestHeaders=new vs.Headers,this._responseHeaders=new vs.Headers}return e.prototype.setReadyState=function(e){e!==this.readyState&&(i("readyState change %d -> %d",this.readyState,e),this.readyState=e,e!==this.UNSENT&&(i("triggerring readystate change..."),this.trigger("readystatechange")))},e.prototype.trigger=function(e,t){var r,n;i('trigger "%s" (%d)',e,this.readyState),i('resolve listener for event "%s"',e);var o=this["on"+e];null==o||o.call(this,Es.createEvent(this,e,t));try{for(var s=hs(this._events),a=s.next();!a.done;a=s.next()){var c=a.value;c.name===e&&(i('calling mock event listener "%s" (%d)',e,this.readyState),c.listener.call(this,Es.createEvent(this,e,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this},e.prototype.reset=function(){i("reset"),this.setReadyState(this.UNSENT),this.status=200,this.statusText="OK",this.data="",this.response=null,this.responseText=null,this.responseXML=null,this._requestHeaders=new vs.Headers,this._responseHeaders=new vs.Headers},e.prototype.open=function(e,t,r,n,o){return void 0===r&&(r=!0),ls(this,void 0,void 0,(function(){return ps(this,(function(s){return(i=ws("XHR "+e+" "+t))("open",{method:e,url:t,async:r,user:n,password:o}),this.reset(),this.setReadyState(this.OPENED),void 0===t?(this.url=e,this.method="GET"):(this.url=t,this.method=e,this.async=r,this.user=n,this.password=o),[2]}))}))},e.prototype.send=function(e){var t,s=this;i("send %s %s",this.method,this.url),this.data=e||"";try{t=new URL(this.url)}catch(e){t=new URL(this.url,window.location.href)}i("request headers",this._requestHeaders);var a={url:t,method:this.method,body:this.data,headers:this._requestHeaders};n.emit("request",a),i("awaiting mocked response..."),Promise.resolve(fs.until((function(){return ls(s,void 0,void 0,(function(){return ps(this,(function(e){return[2,o(a,this)]}))}))}))).then((function(e){var t,o=ds(e,2),c=o[0],u=o[1];if(c)return i("middleware function threw an exception!",c),s.trigger("error"),void s.abort();if(u){if(i("received mocked response",u),s.trigger("loadstart"),s.status=u.status||200,s.statusText=u.statusText||"OK",s._responseHeaders=u.headers?vs.objectToHeaders(u.headers):new vs.Headers,i("set response status",s.status,s.statusText),i("set response headers",s._responseHeaders),s.setReadyState(s.HEADERS_RECEIVED),i("response type",s.responseType),s.response=s.getResponseBody(u.body),s.responseText=u.body||"",s.responseXML=s.getResponseXML(),i("set response body",s.response),u.body&&s.response){s.setReadyState(s.LOADING);var l=bs.bufferFrom(u.body);s.trigger("progress",{loaded:l.length,total:l.length})}s.setReadyState(s.DONE),s.trigger("load"),s.trigger("loadend"),n.emit("response",a,gs.toIsoResponse(u))}else{i("no mocked response received!");var p=new r;i("opening an original request %s %s",s.method,s.url),p.open(s.method,s.url,null===(t=s.async)||void 0===t||t,s.user,s.password),p.addEventListener("load",(function(){i('original "onload"'),s.status=p.status,s.statusText=p.statusText,s.responseURL=p.responseURL,s.responseType=p.responseType,s.response=p.response,s.responseText=p.responseText,s.responseXML=p.responseXML,i("set mock request readyState to DONE"),s.setReadyState(s.DONE),i("received original response",s.status,s.statusText),i("original response body:",s.response);var e=p.getAllResponseHeaders();i("original response headers",e),s._responseHeaders=vs.stringToHeaders(e),i("original response headers (normalized)",s._responseHeaders),i("original response finished"),n.emit("response",a,{status:p.status,statusText:p.statusText,headers:s._responseHeaders,body:p.response})})),s.propagateCallbacks(p),s.propagateListeners(p),s.propagateHeaders(p,s._requestHeaders),s.async&&(p.timeout=s.timeout),i("send",s.data),p.send(s.data)}}))},e.prototype.abort=function(){i("abort"),this.readyState>this.UNSENT&&this.readyState<this.DONE&&(this.setReadyState(this.UNSENT),this.trigger("abort"))},e.prototype.dispatchEvent=function(){return!1},e.prototype.setRequestHeader=function(e,t){i('set request header "%s" to "%s"',e,t),this._requestHeaders.append(e,t)},e.prototype.getResponseHeader=function(e){if(i('get response header "%s"',e),this.readyState<this.HEADERS_RECEIVED)return i("cannot return a header: headers not received (state: %s)",this.readyState),null;var t=this._responseHeaders.get(e);return i('resolved response header "%s" to "%s"',e,t,this._responseHeaders),t},e.prototype.getAllResponseHeaders=function(){return i("get all response headers"),this.readyState<this.HEADERS_RECEIVED?(i("cannot return headers: headers not received (state: %s)",this.readyState),""):vs.headersToString(this._responseHeaders)},e.prototype.addEventListener=function(e,t){i("addEventListener",e,t),this._events.push({name:e,listener:t})},e.prototype.removeEventListener=function(e,t){i("removeEventListener",e,t),this._events=this._events.filter((function(r){return r.name!==e&&r.listener!==t}))},e.prototype.overrideMimeType=function(){},e.prototype.getResponseBody=function(e){var t=null!=e?e:"";switch(i("coerced response body to",t),this.responseType){case"json":return i("resolving response body as JSON"),ys.parseJson(t);case"blob":var r=this.getResponseHeader("content-type")||"text/plain";return i("resolving response body as Blob",{type:r}),new Blob([t],{type:r});case"arraybuffer":return i("resolving response body as ArrayBuffer"),bs.bufferFrom(t);default:return t}},e.prototype.getResponseXML=function(){var e=this.getResponseHeader("Content-Type");return"application/xml"===e||"text/xml"===e?(new ms.DOMParser).parseFromString(this.responseText,e):null},e.prototype.propagateCallbacks=function(e){e.onabort=this.abort,e.onerror=this.onerror,e.ontimeout=this.ontimeout,e.onload=this.onload,e.onloadstart=this.onloadstart,e.onloadend=this.onloadend,e.onprogress=this.onprogress,e.onreadystatechange=this.onreadystatechange},e.prototype.propagateListeners=function(e){i("propagating request listeners (%d) to the original request",this._events.length,this._events),this._events.forEach((function(t){var r=t.name,n=t.listener;e.addEventListener(r,n)}))},e.prototype.propagateHeaders=function(e,t){i("propagating request headers to the original request",t),Object.entries(t.raw()).forEach((function(t){var r=ds(t,2),n=r[0],o=r[1];i('setting "%s" (%s) header on the original request',n,o),e.setRequestHeader(n,o)}))},e}()).UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,t},Object.defineProperty(mo,"__esModule",{value:!0});var Ns=mo.interceptXMLHttpRequest=void 0,Ts=yo,_s=Jn.exports("XHR"),Os="undefined"==typeof window?void 0:window.XMLHttpRequest;function xs(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));e.headers.set("x-msw-request-id",t);const r={id:t,url:e.url,method:e.method,body:We(e.body,e.headers),headers:e.headers,cookies:{},redirect:"manual",referrer:"",keepalive:!1,cache:"default",mode:"cors",referrerPolicy:"no-referrer",integrity:"",destination:"document",bodyUsed:!1,credentials:"same-origin"},n=e.headers.get("cookie");Ke(r);const o=n?j(n):{};return r.cookies=Object.assign(Object.assign({},r.cookies),o),r}function Ss(e){return function(t){return Ce(this,void 0,void 0,(function*(){e.fallbackInterceptor=function(e,t){const r=Yr.createInterceptor({modules:[lo,Ns],resolver(r){return Ce(this,void 0,void 0,(function*(){return Ur(xs(r),e.requestHandlers,t,e.emitter,{transformResponse:e=>({status:e.status,statusText:e.statusText,headers:e.headers.all(),body:e.body}),onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}))}});return r.apply(),r}(e,t),je({message:"Mocking enabled (fallback mode).",quiet:t.quiet})}))}}Ns=mo.interceptXMLHttpRequest=function(e,t){if(Os){_s('patching "XMLHttpRequest" module...');var r=Ts.createXMLHttpRequestOverride({pureXMLHttpRequest:Os,observer:e,resolver:t});window.XMLHttpRequest=r}return function(){Os&&(_s("restoring modules..."),window.XMLHttpRequest=Os)}};let Cs=[];function Is(e){return(t,r)=>new Pr(e,t,r)}const As={head:Is(e.RESTMethods.HEAD),get:Is(e.RESTMethods.GET),post:Is(e.RESTMethods.POST),put:Is(e.RESTMethods.PUT),delete:Is(e.RESTMethods.DELETE),patch:Is(e.RESTMethods.PATCH),options:Is(e.RESTMethods.OPTIONS)};function Rs(e,t){return(r,n)=>new Hr(e,r,t,n)}function ks(e){return t=>new Hr("all",new RegExp(".*"),e,t)}const Ds={operation:ks("*"),query:Rs("query","*"),mutation:Rs("mutation","*")};const Ls=Object.assign(Object.assign({},Ds),{link:function(e){return{operation:ks(e),query:Rs("query",e),mutation:Rs("mutation",e)}}});return e.GraphQLHandler=Hr,e.RequestHandler=Dr,e.RestHandler=Pr,e.compose=Sr,e.context=se,e.createResponseComposition=Ar,e.defaultContext=kr,e.defaultResponse=Cr,e.graphql=Ls,e.graphqlContext=Fr,e.matchRequestUrl=xr,e.response=Rr,e.rest=As,e.restContext=jr,e.setupWorker=function(...e){if(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).')})),z())throw new Error("[MSW] Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead.");const t={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:new ae.StrictEventEmitter,workerChannel:{on(e,r){t.events.addListener(navigator.serviceWorker,"message",(n=>{if(n.source!==t.worker)return;const o=V(n.data);o&&o.type===e&&r(n,o)}))},send(e){var r;null===(r=t.worker)||void 0===r||r.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),Cs.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of Cs)e.removeEventListener(t,r);Cs=[]},once(e){const r=[];return new Promise(((n,o)=>{r.push(t.events.addListener(navigator.serviceWorker,"message",(t=>{try{const r=JSON.parse(t.data);r.type===e&&n(r)}catch(e){o(e)}})),t.events.addListener(navigator.serviceWorker,"messageerror",o))})).finally((()=>{r.forEach((e=>e()))}))}},useFallbackMode:!("serviceWorker"in navigator)||"file:"===location.protocol},r=t.useFallbackMode?Ss(t):$r(t),n=t.useFallbackMode?function(e){return function(){var t,r;null===(t=e.fallbackInterceptor)||void 0===t||t.restore(),Vr({quiet:null===(r=e.startOptions)||void 0===r?void 0:r.quiet})}}(t):(e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),e.events.removeAllListeners(),e.emitter.removeAllListeners(),window.clearInterval(e.keepAliveInterval),Vr({quiet:null===(t=e.startOptions)||void 0===t?void 0:t.quiet})})(t);return{start:Gr(r,t),stop:n,use(...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 Pr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.mask}`),console.groupEnd()}))},on(e,r){t.emitter.addListener(e,r)}}},e}({});
|