@metamask/interactive-ui-example-snap 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,9 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.2]
10
+ ### Fixed
11
+ - Fix a crash when submitting an empty string ([#2333](https://github.com/MetaMask/snaps/pull/2333))
12
+
13
+ ## [1.0.1]
14
+ ### Changed
15
+ - Use error wrappers ([#2178](https://github.com/MetaMask/snaps/pull/2178))
16
+
9
17
  ## [1.0.0]
10
18
  ### Added
11
19
  - Add interactive UI example Snap ([#2171](https://github.com/MetaMask/snaps/pull/2171))
12
20
 
13
- [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/interactive-ui-example-snap@1.0.0...HEAD
21
+ [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/interactive-ui-example-snap@1.0.2...HEAD
22
+ [1.0.2]: https://github.com/MetaMask/snaps/compare/@metamask/interactive-ui-example-snap@1.0.1...@metamask/interactive-ui-example-snap@1.0.2
23
+ [1.0.1]: https://github.com/MetaMask/snaps/compare/@metamask/interactive-ui-example-snap@1.0.0...@metamask/interactive-ui-example-snap@1.0.1
14
24
  [1.0.0]: https://github.com/MetaMask/snaps/releases/tag/@metamask/interactive-ui-example-snap@1.0.0
package/README.md CHANGED
@@ -22,8 +22,5 @@ is sent by the user. It shows a user interface with details about the transactio
22
22
 
23
23
  The snap exposes an `onHomePage` handler, which shows a user interface.
24
24
 
25
- ```
26
-
27
25
  For more information, you can refer to
28
26
  [the end-to-end tests](./src/index.test.ts).
29
- ```
package/dist/bundle.js CHANGED
@@ -1 +1 @@
1
- (()=>{var e={5497:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.JsonRpcError=void 0;const o=r(6500),i=n(r(5012)),s=r(9849);class a extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,o.isPlainObject)(this.data)&&(e.data.cause=(0,s.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,i.default)(this.serialize(),c,2)}}t.JsonRpcError=a;function c(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=class extends a{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},1532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerErrors=t.rpcErrors=void 0;const n=r(5497),o=r(117),i=r(9849);function s(e,t){const[r,o]=c(t);return new n.JsonRpcError(e,r??(0,i.getMessageFromCode)(e),o)}function a(e,t){const[r,o]=c(t);return new n.EthereumProviderError(e,r??(0,i.getMessageFromCode)(e),o)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}t.rpcErrors={parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},t.providerErrors={userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,o)}}},9917:(e,t,r)=>{"use strict";t.PY=void 0;var n=r(5497);var o=r(9849);var i=r(1532);Object.defineProperty(t,"PY",{enumerable:!0,get:function(){return i.rpcErrors}});var s=r(117)},9849:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCause=t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(6500),o=r(117),i=o.errorCodes.rpc.internal,s={code:i,message:a(i)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(c(e)){const r=e.toString();if((0,n.hasProperty)(o.errorValues,r))return o.errorValues[r].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,n.isValidJson)(e)?e:(0,n.isObject)(e)?l(e):null)):(0,n.isObject)(e)?l(e):(0,n.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const o=e[r];return(0,n.isValidJson)(o)&&(t[r]=o),t}),{})}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=c,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!0}={}){if(!(0,n.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const o=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,n.isJsonRpcError)(e))return e;const r=u(e),o={...t,data:{cause:r}};return o}(e,t);return r||delete o.stack,o},t.serializeCause=u},9182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(5579),i=((n=o)&&n.__esModule?n:{default:n}).default.call(void 0,"metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},4316:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};t.__privateGet=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),t.__privateAdd=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},t.__privateSet=(e,t,n,o)=>(r(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n)},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4087),o=r(5825),i=r(6291),s=i.refine.call(void 0,i.string.call(void 0),"Version",(e=>null!==o.valid.call(void 0,e)||`Expected SemVer version, got "${e}"`)),a=i.refine.call(void 0,i.string.call(void 0),"Version range",(e=>null!==o.validRange.call(void 0,e)||`Expected SemVer range, got "${e}"`));t.VersionStruct=s,t.VersionRangeStruct=a,t.isValidSemVerVersion=function(e){return i.is.call(void 0,e,s)},t.isValidSemVerRange=function(e){return i.is.call(void 0,e,a)},t.assertIsSemVerVersion=function(e){n.assertStruct.call(void 0,e,s)},t.assertIsSemVerRange=function(e){n.assertStruct.call(void 0,e,a)},t.gtVersion=function(e,t){return o.gt.call(void 0,e,t)},t.gtRange=function(e,t){return o.gtr.call(void 0,e,t)},t.satisfiesVersionRange=function(e,t){return o.satisfies.call(void 0,e,t,{includePrerelease:!0})}},6704:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}},9568:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=((r=n||{})[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year",r),o=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.Duration=n,t.inMilliseconds=function(e,t){return o(e,"count"),e*t},t.timeSince=function(e){return o(e,"timestamp"),Date.now()-e}},3530:()=>{},7811:(e,t,r)=>{"use strict";function n(e,t){return null!=e?e:t()}Object.defineProperty(t,"__esModule",{value:!0});var o=r(4087),i=r(6291);t.base64=(e,t={})=>{const r=n(t.paddingRequired,(()=>!1)),s=n(t.characterSet,(()=>"base64"));let a,c;return"base64"===s?a=String.raw`[A-Za-z0-9+\/]`:(o.assert.call(void 0,"base64url"===s),a=String.raw`[-_A-Za-z0-9]`),c=r?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),i.pattern.call(void 0,e,c)}},4087:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1054),o=r(6291);function i(e,t){return Boolean("string"==typeof function(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i(((...e)=>r.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.prototype,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name]))?new e({message:t}):e({message:t})}var s=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};t.AssertionError=s,t.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",a=s){try{o.assert.call(void 0,e,t)}catch(e){throw i(a,`${r}: ${function(e){return n.getErrorMessage.call(void 0,e).replace(/\.$/u,"")}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},2806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1714),o=r(4087),i=r(6291),s=i.union.call(void 0,[i.number.call(void 0),i.bigint.call(void 0),i.string.call(void 0),n.StrictHexStruct]),a=i.coerce.call(void 0,i.number.call(void 0),s,Number),c=i.coerce.call(void 0,i.bigint.call(void 0),s,BigInt),u=(i.union.call(void 0,[n.StrictHexStruct,i.instance.call(void 0,Uint8Array)]),i.coerce.call(void 0,i.instance.call(void 0,Uint8Array),i.union.call(void 0,[n.StrictHexStruct]),n.hexToBytes)),l=i.coerce.call(void 0,n.StrictHexStruct,i.instance.call(void 0,Uint8Array),n.bytesToHex);t.createNumber=function(e){try{const t=i.create.call(void 0,e,a);return o.assert.call(void 0,Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof i.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return i.create.call(void 0,e,c)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return i.create.call(void 0,e,u)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return i.create.call(void 0,e,l)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},4772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7811),o=r(6291),i=o.size.call(void 0,n.base64.call(void 0,o.string.call(void 0),{paddingRequired:!0}),44,44);t.ChecksumStruct=i},3057:()=>{},1054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3692),o=r(9163);function i(e){return"object"==typeof e&&null!==e&&"code"in e}function s(e){return"object"==typeof e&&null!==e&&"message"in e}t.isErrorWithCode=i,t.isErrorWithMessage=s,t.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},t.getErrorMessage=function(e){return s(e)&&"string"==typeof e.message?e.message:n.isNullOrUndefined.call(void 0,e)?"":String(e)},t.wrapError=function(e,t){if((r=e)instanceof Error||n.isObject.call(void 0,r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new(0,o.ErrorWithCause)(t,{cause:e}),i(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},1467:()=>{},6320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4087),o=r(3692),i=r(6291),s=e=>i.object.call(void 0,e);function a({path:e,branch:t}){const r=e[e.length-1];return o.hasProperty.call(void 0,t[t.length-2],r)}function c(e){return new(0,i.Struct)({...e,type:`optional ${e.type}`,validator:(t,r)=>!a(r)||e.validator(t,r),refiner:(t,r)=>!a(r)||e.refiner(t,r)})}var u=i.union.call(void 0,[i.literal.call(void 0,null),i.boolean.call(void 0),i.define.call(void 0,"finite number",(e=>i.is.call(void 0,e,i.number.call(void 0))&&Number.isFinite(e))),i.string.call(void 0),i.array.call(void 0,i.lazy.call(void 0,(()=>u))),i.record.call(void 0,i.string.call(void 0),i.lazy.call(void 0,(()=>u)))]),l=i.coerce.call(void 0,u,i.any.call(void 0),(e=>(n.assertStruct.call(void 0,e,u),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))));function f(e){return i.create.call(void 0,e,l)}var p=i.literal.call(void 0,"2.0"),d=i.nullable.call(void 0,i.union.call(void 0,[i.number.call(void 0),i.string.call(void 0)])),h=s({code:i.integer.call(void 0),message:i.string.call(void 0),data:c(l),stack:c(i.string.call(void 0))}),g=i.union.call(void 0,[i.record.call(void 0,i.string.call(void 0),l),i.array.call(void 0,l)]),y=s({id:d,jsonrpc:p,method:i.string.call(void 0),params:c(g)}),m=s({jsonrpc:p,method:i.string.call(void 0),params:c(g)});var v=i.object.call(void 0,{id:d,jsonrpc:p,result:i.optional.call(void 0,i.unknown.call(void 0)),error:i.optional.call(void 0,h)}),b=s({id:d,jsonrpc:p,result:l}),E=s({id:d,jsonrpc:p,error:h}),w=i.union.call(void 0,[b,E]);t.object=s,t.exactOptional=c,t.UnsafeJsonStruct=u,t.JsonStruct=l,t.isValidJson=function(e){try{return f(e),!0}catch(e){return!1}},t.getSafeJson=f,t.getJsonSize=function(e){n.assertStruct.call(void 0,e,l,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=p,t.JsonRpcIdStruct=d,t.JsonRpcErrorStruct=h,t.JsonRpcParamsStruct=g,t.JsonRpcRequestStruct=y,t.JsonRpcNotificationStruct=m,t.isJsonRpcNotification=function(e){return i.is.call(void 0,e,m)},t.assertIsJsonRpcNotification=function(e,t){n.assertStruct.call(void 0,e,m,"Invalid JSON-RPC notification",t)},t.isJsonRpcRequest=function(e){return i.is.call(void 0,e,y)},t.assertIsJsonRpcRequest=function(e,t){n.assertStruct.call(void 0,e,y,"Invalid JSON-RPC request",t)},t.PendingJsonRpcResponseStruct=v,t.JsonRpcSuccessStruct=b,t.JsonRpcFailureStruct=E,t.JsonRpcResponseStruct=w,t.isPendingJsonRpcResponse=function(e){return i.is.call(void 0,e,v)},t.assertIsPendingJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,v,"Invalid pending JSON-RPC response",t)},t.isJsonRpcResponse=function(e){return i.is.call(void 0,e,w)},t.assertIsJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,w,"Invalid JSON-RPC response",t)},t.isJsonRpcSuccess=function(e){return i.is.call(void 0,e,b)},t.assertIsJsonRpcSuccess=function(e,t){n.assertStruct.call(void 0,e,b,"Invalid JSON-RPC success response",t)},t.isJsonRpcFailure=function(e){return i.is.call(void 0,e,E)},t.assertIsJsonRpcFailure=function(e,t){n.assertStruct.call(void 0,e,E,"Invalid JSON-RPC failure response",t)},t.isJsonRpcError=function(e){return i.is.call(void 0,e,h)},t.assertIsJsonRpcError=function(e,t){n.assertStruct.call(void 0,e,h,"Invalid JSON-RPC error",t)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},1714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4087),o=r(1647),i=r(6291),s=r(8269),a=48,c=58,u=87;var l=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function f(e){return e instanceof Uint8Array}function p(e){n.assert.call(void 0,f(e),"Value must be a Uint8Array.")}function d(e){if(p(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return j(r.join(""))}function h(e){p(e);const t=d(e);return BigInt(t)}function g(e){if("0x"===function(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i(((...e)=>r.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.toLowerCase,"optionalCall",e=>e()]))return new Uint8Array;I(e);const t=C(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),o=r.charCodeAt(2*e+1),i=t-(t<c?a:u),s=o-(o<c?a:u);n[e]=16*i+s}return n}function y(e){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,e>=BigInt(0),"Value must be a non-negative bigint.");return g(e.toString(16))}function m(e){n.assert.call(void 0,"number"==typeof e,"Value must be a number."),n.assert.call(void 0,e>=0,"Value must be a non-negative number."),n.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return g(e.toString(16))}function v(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return y(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?g(e):v(e);if(f(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}var E=i.pattern.call(void 0,i.string.call(void 0),/^(?:0x)?[0-9a-f]+$/iu),w=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]+$/iu),S=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]{40}$/u),x=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-fA-F]{40}$/u);function A(e){return i.is.call(void 0,e,E)}function O(e){return i.is.call(void 0,e,w)}function I(e){n.assert.call(void 0,A(e),"Value must be a hexadecimal string.")}function N(e){n.assert.call(void 0,i.is.call(void 0,e,x),"Invalid hex address.");const t=C(e.toLowerCase()),r=C(d(o.keccak_256.call(void 0,t)));return`0x${t.split("").map(((e,t)=>{const o=r[t];return n.assert.call(void 0,i.is.call(void 0,o,i.string.call(void 0)),"Hash shorter than address."),parseInt(o,16)>7?e.toUpperCase():e})).join("")}`}function R(e){return!!i.is.call(void 0,e,x)&&N(e)===e}function j(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function C(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}t.HexStruct=E,t.StrictHexStruct=w,t.HexAddressStruct=S,t.HexChecksumAddressStruct=x,t.isHexString=A,t.isStrictHexString=O,t.assertIsHexString=I,t.assertIsStrictHexString=function(e){n.assert.call(void 0,O(e),'Value must be a hexadecimal string, starting with "0x".')},t.isValidHexAddress=function(e){return i.is.call(void 0,e,S)||R(e)},t.getChecksumAddress=N,t.isValidChecksumAddress=R,t.add0x=j,t.remove0x=C,t.isBytes=f,t.assertIsBytes=p,t.bytesToHex=d,t.bytesToBigInt=h,t.bytesToSignedBigInt=function(e){p(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){p(e);const t=h(e);return n.assert.call(void 0,t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return p(e),(new TextDecoder).decode(e)},t.bytesToBase64=function(e){return p(e),s.base64.encode(e)},t.hexToBytes=g,t.bigIntToBytes=y,t.signedBigIntToBytes=function(e,t){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,"number"==typeof t,"Byte length must be a number."),n.assert.call(void 0,t>0,"Byte length must be greater than 0."),n.assert.call(void 0,function(e,t){n.assert.call(void 0,t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const o=new Uint8Array(t);for(let e=0;e<o.length;e++)o[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return o.reverse()},t.numberToBytes=m,t.stringToBytes=v,t.base64ToBytes=function(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),s.base64.decode(e)},t.valueToBytes=b,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const o=b(e[n]);t[n]=o,r+=o.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},t.createDataView=function(e){if("undefined"!=typeof Buffer&&e instanceof Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}},3692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=((r=n||{})[r.Null=4]="Null",r[r.Comma=1]="Comma",r[r.Wrapper=1]="Wrapper",r[r.True=4]="True",r[r.False=5]="False",r[r.Quote=1]="Quote",r[r.Colon=1]="Colon",r[r.Date=24]="Date",r),o=/"|\\|\n|\r|\t/gu;function i(e){return e.charCodeAt(0)<=127}t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),t.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},t.JsonSize=n,t.ESCAPE_CHARACTERS_REGEXP=o,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=i,t.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>i(t)?e+1:e+2),0)+(t=e.match(o),r=()=>[],null!=t?t:r()).length;var t,r},t.calculateNumberSize=function(e){return e.toString().length}},6546:()=>{},2292:(e,t,r)=>{"use strict";function n(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i(((...e)=>r.call(t,...e))),t=void 0)}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(6291),i=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,s=/^[-a-z0-9]{3,8}$/u,a=/^[-_a-zA-Z0-9]{1,32}$/u,c=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,u=/^[-.%a-zA-Z0-9]{1,128}$/u,l=o.pattern.call(void 0,o.string.call(void 0),i),f=o.pattern.call(void 0,o.string.call(void 0),s),p=o.pattern.call(void 0,o.string.call(void 0),a),d=o.pattern.call(void 0,o.string.call(void 0),c),h=o.pattern.call(void 0,o.string.call(void 0),u);t.CAIP_CHAIN_ID_REGEX=i,t.CAIP_NAMESPACE_REGEX=s,t.CAIP_REFERENCE_REGEX=a,t.CAIP_ACCOUNT_ID_REGEX=c,t.CAIP_ACCOUNT_ADDRESS_REGEX=u,t.CaipChainIdStruct=l,t.CaipNamespaceStruct=f,t.CaipReferenceStruct=p,t.CaipAccountIdStruct=d,t.CaipAccountAddressStruct=h,t.isCaipChainId=function(e){return o.is.call(void 0,e,l)},t.isCaipNamespace=function(e){return o.is.call(void 0,e,f)},t.isCaipReference=function(e){return o.is.call(void 0,e,p)},t.isCaipAccountId=function(e){return o.is.call(void 0,e,d)},t.isCaipAccountAddress=function(e){return o.is.call(void 0,e,h)},t.parseCaipChainId=function(e){const t=i.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},t.parseCaipAccountId=function(e){const t=c.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}},8154:()=>{},9958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1714),o=r(4087);t.numberToHex=e=>(o.assert.call(void 0,"number"==typeof e,"Value must be a number."),o.assert.call(void 0,e>=0,"Value must be a non-negative number."),o.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),n.add0x.call(void 0,e.toString(16))),t.bigIntToHex=e=>(o.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),o.assert.call(void 0,e>=0,"Value must be a non-negative bigint."),n.add0x.call(void 0,e.toString(16))),t.hexToNumber=e=>{n.assertIsHexString.call(void 0,e);const t=parseInt(e,16);return o.assert.call(void 0,Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>(n.assertIsHexString.call(void 0,e),BigInt(n.add0x.call(void 0,e)))},3424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o,i=r(4316),s=class{constructor(e){i.__privateAdd.call(void 0,this,n,void 0),i.__privateSet.call(void 0,this,n,new Map(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,n).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,n)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,n).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,n).forEach(((r,n,o)=>e.call(t,r,n,this)))}get(e){return i.__privateGet.call(void 0,this,n).get(e)}has(e){return i.__privateGet.call(void 0,this,n).has(e)}keys(){return i.__privateGet.call(void 0,this,n).keys()}values(){return i.__privateGet.call(void 0,this,n).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}};n=new WeakMap;var a=class{constructor(e){i.__privateAdd.call(void 0,this,o,void 0),i.__privateSet.call(void 0,this,o,new Set(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,o).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,o)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,o).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,o).forEach(((r,n,o)=>e.call(t,r,n,this)))}has(e){return i.__privateGet.call(void 0,this,o).has(e)}keys(){return i.__privateGet.call(void 0,this,o).keys()}values(){return i.__privateGet.call(void 0,this,o).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}};o=new WeakMap,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype),t.FrozenMap=s,t.FrozenSet=a},6500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(3530);var n=r(9958);r(1467);var o=r(6704),i=r(9568);r(8154);var s=r(9900),a=r(6320);r(6546);var c=r(9182),u=r(2292),l=r(4772),f=r(7811),p=r(2806),d=r(1714),h=r(4087),g=r(1054),y=r(3692),m=r(3424);r(4316),r(3057),t.AssertionError=h.AssertionError,t.CAIP_ACCOUNT_ADDRESS_REGEX=u.CAIP_ACCOUNT_ADDRESS_REGEX,t.CAIP_ACCOUNT_ID_REGEX=u.CAIP_ACCOUNT_ID_REGEX,t.CAIP_CHAIN_ID_REGEX=u.CAIP_CHAIN_ID_REGEX,t.CAIP_NAMESPACE_REGEX=u.CAIP_NAMESPACE_REGEX,t.CAIP_REFERENCE_REGEX=u.CAIP_REFERENCE_REGEX,t.CaipAccountAddressStruct=u.CaipAccountAddressStruct,t.CaipAccountIdStruct=u.CaipAccountIdStruct,t.CaipChainIdStruct=u.CaipChainIdStruct,t.CaipNamespaceStruct=u.CaipNamespaceStruct,t.CaipReferenceStruct=u.CaipReferenceStruct,t.ChecksumStruct=l.ChecksumStruct,t.Duration=i.Duration,t.ESCAPE_CHARACTERS_REGEXP=y.ESCAPE_CHARACTERS_REGEXP,t.FrozenMap=m.FrozenMap,t.FrozenSet=m.FrozenSet,t.HexAddressStruct=d.HexAddressStruct,t.HexChecksumAddressStruct=d.HexChecksumAddressStruct,t.HexStruct=d.HexStruct,t.JsonRpcErrorStruct=a.JsonRpcErrorStruct,t.JsonRpcFailureStruct=a.JsonRpcFailureStruct,t.JsonRpcIdStruct=a.JsonRpcIdStruct,t.JsonRpcNotificationStruct=a.JsonRpcNotificationStruct,t.JsonRpcParamsStruct=a.JsonRpcParamsStruct,t.JsonRpcRequestStruct=a.JsonRpcRequestStruct,t.JsonRpcResponseStruct=a.JsonRpcResponseStruct,t.JsonRpcSuccessStruct=a.JsonRpcSuccessStruct,t.JsonRpcVersionStruct=a.JsonRpcVersionStruct,t.JsonSize=y.JsonSize,t.JsonStruct=a.JsonStruct,t.PendingJsonRpcResponseStruct=a.PendingJsonRpcResponseStruct,t.StrictHexStruct=d.StrictHexStruct,t.UnsafeJsonStruct=a.UnsafeJsonStruct,t.VersionRangeStruct=s.VersionRangeStruct,t.VersionStruct=s.VersionStruct,t.add0x=d.add0x,t.assert=h.assert,t.assertExhaustive=h.assertExhaustive,t.assertIsBytes=d.assertIsBytes,t.assertIsHexString=d.assertIsHexString,t.assertIsJsonRpcError=a.assertIsJsonRpcError,t.assertIsJsonRpcFailure=a.assertIsJsonRpcFailure,t.assertIsJsonRpcNotification=a.assertIsJsonRpcNotification,t.assertIsJsonRpcRequest=a.assertIsJsonRpcRequest,t.assertIsJsonRpcResponse=a.assertIsJsonRpcResponse,t.assertIsJsonRpcSuccess=a.assertIsJsonRpcSuccess,t.assertIsPendingJsonRpcResponse=a.assertIsPendingJsonRpcResponse,t.assertIsSemVerRange=s.assertIsSemVerRange,t.assertIsSemVerVersion=s.assertIsSemVerVersion,t.assertIsStrictHexString=d.assertIsStrictHexString,t.assertStruct=h.assertStruct,t.base64=f.base64,t.base64ToBytes=d.base64ToBytes,t.bigIntToBytes=d.bigIntToBytes,t.bigIntToHex=n.bigIntToHex,t.bytesToBase64=d.bytesToBase64,t.bytesToBigInt=d.bytesToBigInt,t.bytesToHex=d.bytesToHex,t.bytesToNumber=d.bytesToNumber,t.bytesToSignedBigInt=d.bytesToSignedBigInt,t.bytesToString=d.bytesToString,t.calculateNumberSize=y.calculateNumberSize,t.calculateStringSize=y.calculateStringSize,t.concatBytes=d.concatBytes,t.createBigInt=p.createBigInt,t.createBytes=p.createBytes,t.createDataView=d.createDataView,t.createDeferredPromise=o.createDeferredPromise,t.createHex=p.createHex,t.createModuleLogger=c.createModuleLogger,t.createNumber=p.createNumber,t.createProjectLogger=c.createProjectLogger,t.exactOptional=a.exactOptional,t.getChecksumAddress=d.getChecksumAddress,t.getErrorMessage=g.getErrorMessage,t.getJsonRpcIdValidator=a.getJsonRpcIdValidator,t.getJsonSize=a.getJsonSize,t.getKnownPropertyNames=y.getKnownPropertyNames,t.getSafeJson=a.getSafeJson,t.gtRange=s.gtRange,t.gtVersion=s.gtVersion,t.hasProperty=y.hasProperty,t.hexToBigInt=n.hexToBigInt,t.hexToBytes=d.hexToBytes,t.hexToNumber=n.hexToNumber,t.inMilliseconds=i.inMilliseconds,t.isASCII=y.isASCII,t.isBytes=d.isBytes,t.isCaipAccountAddress=u.isCaipAccountAddress,t.isCaipAccountId=u.isCaipAccountId,t.isCaipChainId=u.isCaipChainId,t.isCaipNamespace=u.isCaipNamespace,t.isCaipReference=u.isCaipReference,t.isErrorWithCode=g.isErrorWithCode,t.isErrorWithMessage=g.isErrorWithMessage,t.isErrorWithStack=g.isErrorWithStack,t.isHexString=d.isHexString,t.isJsonRpcError=a.isJsonRpcError,t.isJsonRpcFailure=a.isJsonRpcFailure,t.isJsonRpcNotification=a.isJsonRpcNotification,t.isJsonRpcRequest=a.isJsonRpcRequest,t.isJsonRpcResponse=a.isJsonRpcResponse,t.isJsonRpcSuccess=a.isJsonRpcSuccess,t.isNonEmptyArray=y.isNonEmptyArray,t.isNullOrUndefined=y.isNullOrUndefined,t.isObject=y.isObject,t.isPendingJsonRpcResponse=a.isPendingJsonRpcResponse,t.isPlainObject=y.isPlainObject,t.isStrictHexString=d.isStrictHexString,t.isValidChecksumAddress=d.isValidChecksumAddress,t.isValidHexAddress=d.isValidHexAddress,t.isValidJson=a.isValidJson,t.isValidSemVerRange=s.isValidSemVerRange,t.isValidSemVerVersion=s.isValidSemVerVersion,t.jsonrpc2=a.jsonrpc2,t.numberToBytes=d.numberToBytes,t.numberToHex=n.numberToHex,t.object=a.object,t.parseCaipAccountId=u.parseCaipAccountId,t.parseCaipChainId=u.parseCaipChainId,t.remove0x=d.remove0x,t.satisfiesVersionRange=s.satisfiesVersionRange,t.signedBigIntToBytes=d.signedBigIntToBytes,t.stringToBytes=d.stringToBytes,t.timeSince=i.timeSince,t.valueToBytes=d.valueToBytes,t.wrapError=g.wrapError},4514:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function i(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=o,t.hash=i,t.exists=s,t.output=a;const c={number:r,bool:n,bytes:o,hash:i,exists:s,output:a};t.default=c},4834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function o(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function i(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:s,l:a}=o(e[i],t);[r[i],n[i]]=[s,a]}return[r,n]}t.fromBig=o,t.split=i;const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const p=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=p;const d=(e,t)=>t;t.rotr32H=d;const h=(e,t)=>e;t.rotr32L=h;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const y=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=y;const m=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=m;const v=(e,t,r)=>e<<r-32|t>>>64-r;function b(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}}t.rotlBL=v,t.add=b;const E=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=E;const w=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=w;const S=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=S;const x=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0;t.add4H=x;const A=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0);t.add5L=A;const O=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0;t.add5H=O;const I={fromBig:o,split:i,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:f,rotrBL:p,rotr32H:d,rotr32L:h,rotlSH:g,rotlSL:y,rotlBH:m,rotlBL:v,add:b,add3L:E,add3H:w,add4L:S,add4H:x,add5H:O,add5L:A};t.default=I},4877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},1647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(4514),o=r(4834),i=r(2912),[s,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),f=BigInt(2),p=BigInt(7),d=BigInt(256),h=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let o=u;for(let e=0;e<7;e++)t=(t<<l^(t>>p)*h)%d,t&f&&(o^=l<<(l<<BigInt(e))-l);c.push(o)}const[g,y]=(0,o.split)(c,!0),m=(e,t,r)=>r>32?(0,o.rotlBH)(e,t,r):(0,o.rotlSH)(e,t,r),v=(e,t,r)=>r>32?(0,o.rotlBL)(e,t,r):(0,o.rotlSL)(e,t,r);function b(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,i=r[o],s=r[o+1],a=m(i,s,1)^r[n],c=v(i,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=a[r],i=m(t,o,n),c=v(t,o,n),u=s[r];t=e[u],o=e[u+1],e[u]=i,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}t.keccakP=b;class E extends i.Hash{constructor(e,t,r,o=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=o,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){b(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,o=(e=(0,i.toBytes)(e)).length;for(let n=0;n<o;){const i=Math.min(t-this.pos,o-n);for(let t=0;t<i;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:i}=this;return e||(e=new E(t,r,n,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=E;const w=(e,t,r)=>(0,i.wrapConstructor)((()=>new E(t,e,r)));t.sha3_224=w(6,144,28),t.sha3_256=w(6,136,32),t.sha3_384=w(6,104,48),t.sha3_512=w(6,72,64),t.keccak_224=w(1,144,28),t.keccak_256=w(1,136,32),t.keccak_384=w(1,104,48),t.keccak_512=w(1,72,64);const S=(e,t,r)=>(0,i.wrapXOFConstructorWithOpts)(((n={})=>new E(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=S(31,168,16),t.shake256=S(31,136,32)},2912:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(4877),o=e=>e instanceof Uint8Array;t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,o=e.slice(n,n+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");r[t]=i}return r};function s(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=s(e)),!o(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let o=Date.now();for(let i=0;i<e;i++){n(i);const e=Date.now()-o;e>=0&&e<r||(await(0,t.nextTick)(),o+=e)}},t.utf8ToBytes=s,t.toBytes=a,t.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t};t.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},8269:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(...e){const t=(e,t)=>r=>e(t(r)),r=Array.from(e).reverse().reduce(((e,r)=>e?t(e,r.encode):r.encode),void 0),n=e.reduce(((e,r)=>e?t(e,r.decode):r.decode),void 0);return{encode:r,decode:n}}function o(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}}function i(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function s(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function a(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function c(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let o=0;const i=[],s=Array.from(e);for(s.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let i=o;i<s.length;i++){const a=s[i],c=t*e+a;if(!Number.isSafeInteger(c)||t*e/t!==e||c-a!=t*e)throw new Error("convertRadix: carry overflow");e=c%n;const u=Math.floor(c/n);if(s[i]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw new Error("convertRadix: carry overflow");r&&(u?r=!1:o=i)}if(i.push(e),r)break}for(let t=0;t<e.length-1&&0===e[t];t++)i.push(0);return i.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64urlnopad=t.base64url=t.base64=t.base32crockford=t.base32hex=t.base32=t.base16=t.utils=t.assertNumber=void 0,t.assertNumber=r;const u=(e,t)=>t?u(t,e%t):e,l=(e,t)=>e+(t-u(e,t));function f(e,t,n,o){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(l(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${l(t,n)}`);let i=0,s=0;const a=2**n-1,c=[];for(const o of e){if(r(o),o>=2**t)throw new Error(`convertRadix2: invalid data word=${o} from=${t}`);if(i=i<<t|o,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=n;s-=n)c.push((i>>s-n&a)>>>0);i&=2**s-1}if(i=i<<n-s&a,!o&&s>=t)throw new Error("Excess padding");if(!o&&i)throw new Error(`Non-zero padding: ${i}`);return o&&s>0&&c.push(i>>>0),c}function p(e){return r(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return c(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(c(t,e,256))}}}function d(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(l(8,e)>32||l(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return f(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(f(r,e,8,t))}}}function h(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function g(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const n=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(n,r.length),o},decode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const n=r.slice(0,-e),o=t(n).slice(0,e),i=r.slice(-e);for(let t=0;t<e;t++)if(o[t]!==i[t])throw new Error("Invalid checksum");return n}}}t.utils={alphabet:o,chain:n,checksum:g,radix:p,radix2:d,join:i,padding:s},t.base16=n(d(4),o("0123456789ABCDEF"),i("")),t.base32=n(d(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),s(5),i("")),t.base32hex=n(d(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),s(5),i("")),t.base32crockford=n(d(5),o("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),i(""),a((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.base64=n(d(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),s(6),i("")),t.base64url=n(d(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),s(6),i("")),t.base64urlnopad=n(d(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),i(""));const y=e=>n(p(58),o(e),i(""));t.base58=y("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=y("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=y("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const m=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;n<e.length;n+=8){const o=e.subarray(n,n+8);r+=t.base58.encode(o).padStart(m[o.length],"1")}return r},decode(e){let r=[];for(let n=0;n<e.length;n+=11){const o=e.slice(n,n+11),i=m.indexOf(o.length),s=t.base58.decode(o);for(let e=0;e<s.length-i;e++)if(0!==s[e])throw new Error("base58xmr: wrong padding");r=r.concat(Array.from(s.slice(s.length-i)))}return Uint8Array.from(r)}};t.base58check=e=>n(g(4,(t=>e(e(t)))),t.base58);const v=n(o("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),i("")),b=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<b.length;e++)1==(t>>e&1)&&(r^=b[e]);return r}function w(e,t,r=1){const n=e.length;let o=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);o=E(o)^r>>5}o=E(o);for(let t=0;t<n;t++)o=E(o)^31&e.charCodeAt(t);for(let e of t)o=E(o)^e;for(let e=0;e<6;e++)o=E(o);return o^=r,v.encode(f([o%2**30],30,5,!1))}function S(e){const t="bech32"===e?1:734539939,r=d(5),n=r.decode,o=r.encode,i=h(n);function s(e,r=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==r&&e.length>r)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const o=(e=n).lastIndexOf("1");if(0===o||-1===o)throw new Error('Letter "1" must be present between prefix and data only');const i=e.slice(0,o),s=e.slice(o+1);if(s.length<6)throw new Error("Data must be at least 6 characters long");const a=v.decode(s).slice(0,-6),c=w(i,a,t);if(!s.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:i,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);const o=e.length+7+r.length;if(!1!==n&&o>n)throw new TypeError(`Length ${o} exceeds limit ${n}`);const i=e.toLowerCase(),s=w(i,r,t);return`${i}1${v.encode(r)}${s}`},decode:s,decodeToBytes:function(e){const{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:h(s),fromWords:n,fromWordsUnsafe:i,toWords:o}}t.bech32=S("bech32"),t.bech32m=S("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.hex=n(d(4),o("0123456789abcdef"),i(""),a((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const x={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},A="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!x.hasOwnProperty(e))throw new TypeError(A);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return x[e].encode(t)},t.str=t.bytesToString;t.stringToBytes=(e,t)=>{if(!x.hasOwnProperty(e))throw new TypeError(A);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return x[e].decode(t)},t.bytes=t.stringToBytes},5247:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}var o,i,s=r(409).codes,a=s.ERR_AMBIGUOUS_ARGUMENT,c=s.ERR_INVALID_ARG_TYPE,u=s.ERR_INVALID_ARG_VALUE,l=s.ERR_INVALID_RETURN_VALUE,f=s.ERR_MISSING_ARGS,p=r(5685),d=r(862).inspect,h=r(862).types,g=h.isPromise,y=h.isRegExp,m=Object.assign?Object.assign:r(5021).assign,v=Object.is?Object.is:r(5031);new Map;function b(){var e=r(5872);o=e.isDeepEqual,i=e.isDeepStrictEqual}var E=!1,w=e.exports=O,S={};function x(e){if(e.message instanceof Error)throw e.message;throw new p(e)}function A(e,t,r,n){if(!r){var o=!1;if(0===t)o=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new p({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=o,i}}function O(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];A.apply(void 0,[O,t.length].concat(t))}w.fail=function e(t,r,n,o,i){var s,a=arguments.length;if(0===a)s="Failed";else if(1===a)n=t,t=void 0;else{if(!1===E)E=!0,(process.emitWarning?process.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===a&&(o="!=")}if(n instanceof Error)throw n;var c={actual:t,expected:r,operator:void 0===o?"fail":o,stackStartFn:i||e};void 0!==n&&(c.message=n);var u=new p(c);throw s&&(u.message=s,u.generatedMessage=!0),u},w.AssertionError=p,w.ok=O,w.equal=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");t!=r&&x({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},w.notEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");t==r&&x({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},w.deepEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===o&&b(),o(t,r)||x({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},w.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===o&&b(),o(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},w.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===o&&b(),i(t,r)||x({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},w.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===o&&b();i(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},w.strictEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");v(t,r)||x({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},w.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");v(t,r)&&x({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var I=function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&y(t[e])&&t[e].test(n[e])?o[e]=n[e]:o[e]=t[e])}))};function N(e,t,r,s){if("function"!=typeof t){if(y(t))return t.test(e);if(2===arguments.length)throw new c("expected",["Function","RegExp"],t);if("object"!==n(e)||null===e){var a=new p({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:s});throw a.operator=s.name,a}var l=Object.keys(t);if(t instanceof Error)l.push("name","message");else if(0===l.length)throw new u("error",t,"may not be an empty object");return void 0===o&&b(),l.forEach((function(n){"string"==typeof e[n]&&y(t[n])&&t[n].test(e[n])||function(e,t,r,n,o,s){if(!(r in e)||!i(e[r],t[r])){if(!n){var a=new I(e,o),c=new I(t,o,e),u=new p({actual:a,expected:c,operator:"deepStrictEqual",stackStartFn:s});throw u.actual=e,u.expected=t,u.operator=s.name,u}x({actual:e,expected:t,message:n,operator:s.name,stackStartFn:s})}}(e,t,n,r,l,s)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function R(e){if("function"!=typeof e)throw new c("fn","Function",e);try{e()}catch(e){return e}return S}function j(e){return g(e)||null!==e&&"object"===n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function C(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!j(t=e()))throw new l("instance of Promise","promiseFn",t)}else{if(!j(e))throw new c("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return S})).catch((function(e){return e}))}))}function P(e,t,r,o){if("string"==typeof r){if(4===arguments.length)throw new c("error",["Object","Error","Function","RegExp"],r);if("object"===n(t)&&null!==t){if(t.message===r)throw new a("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new a("error/message",'The error "'.concat(t,'" is identical to the message.'));o=r,r=void 0}else if(null!=r&&"object"!==n(r)&&"function"!=typeof r)throw new c("error",["Object","Error","Function","RegExp"],r);if(t===S){var i="";r&&r.name&&(i+=" (".concat(r.name,")")),i+=o?": ".concat(o):".";var s="rejects"===e.name?"rejection":"exception";x({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(s).concat(i),stackStartFn:e})}if(r&&!N(t,r,o,e))throw t}function T(e,t,r,n){if(t!==S){if("string"==typeof r&&(n=r,r=void 0),!r||N(t,r)){var o=n?": ".concat(n):".",i="doesNotReject"===e.name?"rejection":"exception";x({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(i).concat(o,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function $(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];A.apply(void 0,[$,t.length].concat(t))}w.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];P.apply(void 0,[e,R(t)].concat(n))},w.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return C(t).then((function(t){return P.apply(void 0,[e,t].concat(n))}))},w.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];T.apply(void 0,[e,R(t)].concat(n))},w.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return C(t).then((function(t){return T.apply(void 0,[e,t].concat(n))}))},w.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===n(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=d(t);var o=new p({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),i=t.stack;if("string"==typeof i){var s=i.split("\n");s.shift();for(var a=o.stack.split("\n"),c=0;c<s.length;c++){var u=a.indexOf(s[c]);if(-1!==u){a=a.slice(0,u);break}}o.stack="".concat(a.join("\n"),"\n").concat(s.join("\n"))}throw o}},w.strict=m($,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict},5685:(e,t,r)=>{"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(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 i(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){var t="function"==typeof Map?new Map:void 0;return a=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 c(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},a(e)}function c(e,t,r){return c=function(){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}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},c.apply(null,arguments)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e){return f="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},f(e)}var p=r(862).inspect,d=r(409).codes.ERR_INVALID_ARG_TYPE;function h(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var g="",y="",m="",v="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function E(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function w(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function S(e,t,r){var n="",o="",i=0,s="",a=!1,c=w(e),u=c.split("\n"),l=w(t).split("\n"),p=0,d="";if("strictEqual"===r&&"object"===f(e)&&"object"===f(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===u.length&&1===l.length&&u[0]!==l[0]){var E=u[0].length+l[0].length;if(E<=10){if(!("object"===f(e)&&null!==e||"object"===f(t)&&null!==t||0===e&&0===t))return"".concat(b[r],"\n\n")+"".concat(u[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==r){if(E<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;u[0][p]===l[0][p];)p++;p>2&&(d="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",p),"^"),p=0)}}}for(var S=u[u.length-1],x=l[l.length-1];S===x&&(p++<2?s="\n ".concat(S).concat(s):n=S,u.pop(),l.pop(),0!==u.length&&0!==l.length);)S=u[u.length-1],x=l[l.length-1];var A=Math.max(u.length,l.length);if(0===A){var O=c.split("\n");if(O.length>30)for(O[26]="".concat(g,"...").concat(v);O.length>27;)O.pop();return"".concat(b.notIdentical,"\n\n").concat(O.join("\n"),"\n")}p>3&&(s="\n".concat(g,"...").concat(v).concat(s),a=!0),""!==n&&(s="\n ".concat(n).concat(s),n="");var I=0,N=b[r]+"\n".concat(y,"+ actual").concat(v," ").concat(m,"- expected").concat(v),R=" ".concat(g,"...").concat(v," Lines skipped");for(p=0;p<A;p++){var j=p-i;if(u.length<p+1)j>1&&p>2&&(j>4?(o+="\n".concat(g,"...").concat(v),a=!0):j>3&&(o+="\n ".concat(l[p-2]),I++),o+="\n ".concat(l[p-1]),I++),i=p,n+="\n".concat(m,"-").concat(v," ").concat(l[p]),I++;else if(l.length<p+1)j>1&&p>2&&(j>4?(o+="\n".concat(g,"...").concat(v),a=!0):j>3&&(o+="\n ".concat(u[p-2]),I++),o+="\n ".concat(u[p-1]),I++),i=p,o+="\n".concat(y,"+").concat(v," ").concat(u[p]),I++;else{var C=l[p],P=u[p],T=P!==C&&(!h(P,",")||P.slice(0,-1)!==C);T&&h(C,",")&&C.slice(0,-1)===P&&(T=!1,P+=","),T?(j>1&&p>2&&(j>4?(o+="\n".concat(g,"...").concat(v),a=!0):j>3&&(o+="\n ".concat(u[p-2]),I++),o+="\n ".concat(u[p-1]),I++),i=p,o+="\n".concat(y,"+").concat(v," ").concat(P),n+="\n".concat(m,"-").concat(v," ").concat(C),I+=2):(o+=n,n="",1!==j&&0!==p||(o+="\n ".concat(P),I++))}if(I>20&&p<A-2)return"".concat(N).concat(R,"\n").concat(o,"\n").concat(g,"...").concat(v).concat(n,"\n")+"".concat(g,"...").concat(v)}return"".concat(N).concat(a?R:"","\n").concat(o).concat(n).concat(s).concat(d)}var x=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==f(e)||null===e)throw new d("options","Object",e);var n=e.message,o=e.operator,a=e.stackStartFn,c=e.actual,u=e.expected,p=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)r=i(this,l(t).call(this,String(n)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(g="",y="",v="",m=""):(g="",y="",v="",m="")),"object"===f(c)&&null!==c&&"object"===f(u)&&null!==u&&"stack"in c&&c instanceof Error&&"stack"in u&&u instanceof Error&&(c=E(c),u=E(u)),"deepStrictEqual"===o||"strictEqual"===o)r=i(this,l(t).call(this,S(c,u,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var h=b[o],x=w(c).split("\n");if("notStrictEqual"===o&&"object"===f(c)&&null!==c&&(h=b.notStrictEqualObject),x.length>30)for(x[26]="".concat(g,"...").concat(v);x.length>27;)x.pop();r=1===x.length?i(this,l(t).call(this,"".concat(h," ").concat(x[0]))):i(this,l(t).call(this,"".concat(h,"\n\n").concat(x.join("\n"),"\n")))}else{var A=w(c),O="",I=b[o];"notDeepEqual"===o||"notEqual"===o?(A="".concat(b[o],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(O="".concat(w(u)),A.length>512&&(A="".concat(A.slice(0,509),"...")),O.length>512&&(O="".concat(O.slice(0,509),"...")),"deepEqual"===o||"equal"===o?A="".concat(I,"\n\n").concat(A,"\n\nshould equal\n\n"):O=" ".concat(o," ").concat(O)),r=i(this,l(t).call(this,"".concat(A).concat(O)))}return Error.stackTraceLimit=p,r.generatedMessage=!n,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=u,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(s(r),a),r.stack,r.name="AssertionError",i(r)}var r,a,c;return 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&&u(e,t)}(t,e),r=t,a=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(e,t){return p(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){n(e,t,r[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}],a&&o(r.prototype,a),c&&o(r,c),t}(a(Error));e.exports=x},409:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}var a,c,u={};function l(e,t,r){r||(r=Error);var n=function(r){function n(r,s,a){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),c=o(this,i(n).call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,s,a))),c.code=e,c}return 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&&s(e,t)}(n,r),n}(r);u[e]=n}function f(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(e,t,o){var i,s,c,u;if(void 0===a&&(a=r(5247)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(s="not ",t.substr(!c||c<0?0:+c,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))u="The ".concat(e," ").concat(i," ").concat(f(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";u='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(f(t,"type"))}return u+=". Received type ".concat(n(o))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=r(862));var o=c.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===a&&(a=r(5247)),a(t.length>0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=u},5872:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return o="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},o(e)}var i=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},a=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},c=Object.is?Object.is:r(5031),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(9987);function f(e){return e.call.bind(e)}var p=f(Object.prototype.hasOwnProperty),d=f(Object.prototype.propertyIsEnumerable),h=f(Object.prototype.toString),g=r(862).types,y=g.isAnyArrayBuffer,m=g.isArrayBufferView,v=g.isDate,b=g.isMap,E=g.isRegExp,w=g.isSet,S=g.isNativeError,x=g.isBoxedPrimitive,A=g.isNumberObject,O=g.isStringObject,I=g.isBooleanObject,N=g.isBigIntObject,R=g.isSymbolObject,j=g.isFloat32Array,C=g.isFloat64Array;function P(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function T(e){return Object.keys(e).filter(P).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function $(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}var _=0,k=1,F=2,L=3;function B(e,t,r,n){if(e===t)return 0!==e||(!r||c(e,t));if(r){if("object"!==o(e))return"number"==typeof e&&l(e)&&l(t);if("object"!==o(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==o(e))return(null===t||"object"!==o(t))&&e==t;if(null===t||"object"!==o(t))return!1}var s,a,u,f,p=h(e);if(p!==h(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var d=T(e),g=T(t);return d.length===g.length&&D(e,t,r,n,k,d)}if("[object Object]"===p&&(!b(e)&&b(t)||!w(e)&&w(t)))return!1;if(v(e)){if(!v(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(E(e)){if(!E(t)||(u=e,f=t,!(i?u.source===f.source&&u.flags===f.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(f))))return!1}else if(S(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(m(e)){if(r||!j(e)&&!C(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===$(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var P=T(e),B=T(t);return P.length===B.length&&D(e,t,r,n,_,P)}if(w(e))return!(!w(t)||e.size!==t.size)&&D(e,t,r,n,F);if(b(e))return!(!b(t)||e.size!==t.size)&&D(e,t,r,n,L);if(y(e)){if(a=t,(s=e).byteLength!==a.byteLength||0!==$(new Uint8Array(s),new Uint8Array(a)))return!1}else if(x(e)&&!function(e,t){return A(e)?A(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):O(e)?O(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):I(e)?I(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):N(e)?N(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):R(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return D(e,t,r,n,_)}function M(e,t){return t.filter((function(t){return d(e,t)}))}function D(e,t,r,i,c,l){if(5===arguments.length){l=Object.keys(e);var f=Object.keys(t);if(l.length!==f.length)return!1}for(var h=0;h<l.length;h++)if(!p(t,l[h]))return!1;if(r&&5===arguments.length){var g=u(e);if(0!==g.length){var y=0;for(h=0;h<g.length;h++){var m=g[h];if(d(e,m)){if(!d(t,m))return!1;l.push(m),y++}else if(d(t,m))return!1}var v=u(t);if(g.length!==v.length&&M(t,v).length!==y)return!1}else{var b=u(t);if(0!==b.length&&0!==M(t,b).length)return!1}}if(0===l.length&&(c===_||c===k&&0===e.length||0===e.size))return!0;if(void 0===i)i={val1:new Map,val2:new Map,position:0};else{var E=i.val1.get(e);if(void 0!==E){var w=i.val2.get(t);if(void 0!==w)return E===w}i.position++}i.val1.set(e,i.position),i.val2.set(t,i.position);var S=function(e,t,r,i,c,u){var l=0;if(u===F){if(!function(e,t,r,n){for(var i=null,a=s(e),c=0;c<a.length;c++){var u=a[c];if("object"===o(u)&&null!==u)null===i&&(i=new Set),i.add(u);else if(!t.has(u)){if(r)return!1;if(!G(e,t,u))return!1;null===i&&(i=new Set),i.add(u)}}if(null!==i){for(var l=s(t),f=0;f<l.length;f++){var p=l[f];if("object"===o(p)&&null!==p){if(!U(i,p,r,n))return!1}else if(!r&&!e.has(p)&&!U(i,p,r,n))return!1}return 0===i.size}return!0}(e,t,r,c))return!1}else if(u===L){if(!function(e,t,r,i){for(var s=null,c=a(e),u=0;u<c.length;u++){var l=n(c[u],2),f=l[0],p=l[1];if("object"===o(f)&&null!==f)null===s&&(s=new Set),s.add(f);else{var d=t.get(f);if(void 0===d&&!t.has(f)||!B(p,d,r,i)){if(r)return!1;if(!J(e,t,f,p,i))return!1;null===s&&(s=new Set),s.add(f)}}}if(null!==s){for(var h=a(t),g=0;g<h.length;g++){var y=n(h[g],2),m=(f=y[0],y[1]);if("object"===o(f)&&null!==f){if(!H(s,e,f,m,r,i))return!1}else if(!(r||e.has(f)&&B(e.get(f),m,!1,i)||H(s,e,f,m,!1,i)))return!1}return 0===s.size}return!0}(e,t,r,c))return!1}else if(u===k)for(;l<e.length;l++){if(!p(e,l)){if(p(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var d=f[l];if(!p(t,d)||!B(e[d],t[d],r,c))return!1}return f.length===Object.keys(t).length}if(!p(t,l)||!B(e[l],t[l],r,c))return!1}for(l=0;l<i.length;l++){var h=i[l];if(!B(e[h],t[h],r,c))return!1}return!0}(e,t,r,l,i,c);return i.val1.delete(e),i.val2.delete(t),S}function U(e,t,r,n){for(var o=s(e),i=0;i<o.length;i++){var a=o[i];if(B(t,a,r,n))return e.delete(a),!0}return!1}function V(e){switch(o(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(l(e))return!1}return!0}function G(e,t,r){var n=V(r);return null!=n?n:t.has(n)&&!e.has(n)}function J(e,t,r,n,o){var i=V(r);if(null!=i)return i;var s=t.get(i);return!(void 0===s&&!t.has(i)||!B(n,s,!1,o))&&(!e.has(i)&&B(n,s,!1,o))}function H(e,t,r,n,o,i){for(var a=s(e),c=0;c<a.length;c++){var u=a[c];if(B(r,u,o,i)&&B(n,t.get(u),o,i))return e.delete(u),!0}return!1}e.exports={isDeepEqual:function(e,t){return B(e,t,false)},isDeepStrictEqual:function(e,t){return B(e,t,true)}}},3734:(e,t,r)=>{"use strict";var n=r(1308),o=r(8907),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},8907:(e,t,r)=>{"use strict";var n=r(2786),o=r(1308),i=r(6551),s=r(7266),a=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||n.call(c,a),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new s("a function is required");var t=u(n,c,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return u(n,a,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},7154:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,i=7*o,s=365.25*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\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(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var i=Math.abs(e);if(i>=o)return a(e,i,o,"day");if(i>=n)return a(e,i,n,"hour");if(i>=r)return a(e,i,r,"minute");if(i>=t)return a(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=o)return Math.round(e/o)+"d";if(i>=n)return Math.round(e/n)+"h";if(i>=r)return Math.round(e/r)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5579:(e,t,r)=>{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="false");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=r(3847)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},3847:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];r=i.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(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(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(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=r(7154),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}},9581:(e,t,r)=>{"use strict";var n=r(8027)(),o=r(1308),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var s=r(3910),a=r(7266),c=r(1322);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(e,t);if(i)i(e,t,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},6844:(e,t,r)=>{"use strict";var n=r(7395),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,c=r(8027)(),u=a&&c,l=function(e,t,r,n){var o;(!(t in e)||"function"==typeof(o=n)&&"[object Function]"===i.call(o)&&n())&&(u?a(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},f=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);o&&(i=s.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)l(e,i[a],t[i[a]],r[i[a]])};f.supportsDescriptors=!!u,e.exports=f},9436:e=>{"use strict";e.exports=EvalError},7321:e=>{"use strict";e.exports=Error},5831:e=>{"use strict";e.exports=RangeError},4420:e=>{"use strict";e.exports=ReferenceError},3910:e=>{"use strict";e.exports=SyntaxError},7266:e=>{"use strict";e.exports=TypeError},8751:e=>{"use strict";e.exports=URIError},5021:e=>{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];if(null!=o)for(var i=Object.keys(Object(o)),s=0,a=i.length;s<a;s++){var c=i[s],u=Object.getOwnPropertyDescriptor(o,c);void 0!==u&&u.enumerable&&(r[c]=o[c])}}return r}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},5012:e=>{e.exports=s,s.default=s,s.stable=l,s.stableStringify=l;var t="[...]",r="[Circular]",n=[],o=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=i()),c(e,"",0,[],void 0,0,s);try{a=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function a(e,t,r,i){var s=Object.getOwnPropertyDescriptor(i,r);void 0!==s.get?s.configurable?(Object.defineProperty(i,r,{value:e}),n.push([i,r,t,s])):o.push([t,r,e]):(i[r]=e,n.push([i,r,t]))}function c(e,n,o,i,s,u,l){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;f<i.length;f++)if(i[f]===e)return void a(r,e,n,s);if(void 0!==l.depthLimit&&u>l.depthLimit)return void a(t,e,n,s);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void a(t,e,n,s);if(i.push(e),Array.isArray(e))for(f=0;f<e.length;f++)c(e[f],f,f,i,e,u,l);else{var p=Object.keys(e);for(f=0;f<p.length;f++){var d=p[f];c(e[d],d,f,i,e,u,l)}}i.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,s){void 0===s&&(s=i());var a,c=f(e,"",0,[],void 0,0,s)||e;try{a=0===o.length?JSON.stringify(c,t,r):JSON.stringify(c,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function f(e,o,i,s,c,l,p){var d;if(l+=1,"object"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void a(r,e,o,c);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==p.depthLimit&&l>p.depthLimit)return void a(t,e,o,c);if(void 0!==p.edgesLimit&&i+1>p.edgesLimit)return void a(t,e,o,c);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)f(e[d],d,d,s,e,l,p);else{var h={},g=Object.keys(e).sort(u);for(d=0;d<g.length;d++){var y=g[d];f(e[y],y,d,s,e,l,p),h[y]=e[y]}if(void 0===c)return h;n.push([c,o,e]),c[o]=h}s.pop()}}function p(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var i=o[n];if(i[1]===t&&i[0]===r){r=i[2],o.splice(n,1);break}}return e.call(this,t,r)}}},9525:(e,t,r)=>{"use strict";const n=r(5730),o=r(7702),i=r(1653);e.exports={XMLParser:o,XMLValidator:n,XMLBuilder:i}},8768:(e,t)=>{"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+r+"]["+(r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",o=new RegExp("^"+n+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){const t=o.exec(e);return!(null==t)},t.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r},t.nameRegexp=n},5730:(e,t,r)=>{"use strict";const n=r(8768),o={allowBooleanAttributes:!1,unpairedTags:[]};function i(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function s(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return h("InvalidXml","XML declaration allowed only at the start of the document.",y(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},o,t);const r=[];let c=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o<e.length;o++)if("<"===e[o]&&"?"===e[o+1]){if(o+=2,o=s(e,o),o.err)return o}else{if("<"!==e[o]){if(i(e[o]))continue;return h("InvalidChar","char '"+e[o]+"' is not expected.",y(e,o))}{let g=o;if(o++,"!"===e[o]){o=a(e,o);continue}{let m=!1;"/"===e[o]&&(m=!0,o++);let v="";for(;o<e.length&&">"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)v+=e[o];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),o--),f=v,!n.isName(f)){let t;return t=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",h("InvalidTag",t,y(e,o))}const b=l(e,o);if(!1===b)return h("InvalidAttr","Attributes for '"+v+"' have open quote.",y(e,o));let E=b.value;if(o=b.index,"/"===E[E.length-1]){const r=o-E.length;E=E.substring(0,E.length-1);const n=p(E,t);if(!0!==n)return h(n.err.code,n.err.msg,y(e,r+n.err.line));c=!0}else if(m){if(!b.tagClosed)return h("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",y(e,o));if(E.trim().length>0)return h("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",y(e,g));{const t=r.pop();if(v!==t.tagName){let r=y(e,t.tagStartPos);return h("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+v+"'.",y(e,g))}0==r.length&&(u=!0)}}else{const n=p(E,t);if(!0!==n)return h(n.err.code,n.err.msg,y(e,o-E.length+n.err.line));if(!0===u)return h("InvalidXml","Multiple possible root nodes found.",y(e,o));-1!==t.unpairedTags.indexOf(v)||r.push({tagName:v,tagStartPos:g}),c=!0}for(o++;o<e.length;o++)if("<"===e[o]){if("!"===e[o+1]){o++,o=a(e,o);continue}if("?"!==e[o+1])break;if(o=s(e,++o),o.err)return o}else if("&"===e[o]){const t=d(e,o);if(-1==t)return h("InvalidChar","char '&' is not expected.",y(e,o));o=t}else if(!0===u&&!i(e[o]))return h("InvalidXml","Extra text at the end",y(e,o));"<"===e[o]&&o--}}}var f;return c?1==r.length?h("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",y(e,r[0].tagStartPos)):!(r.length>0)||h("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if(e[t]===c||e[t]===u)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const f=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(e,t){const r=n.getAllMatches(e,f),o={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return h("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",m(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return h("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",m(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return h("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",m(r[e]));const n=r[e][2];if(!g(n))return h("InvalidAttr","Attribute '"+n+"' is an invalid name.",m(r[e]));if(o.hasOwnProperty(n))return h("InvalidAttr","Attribute '"+n+"' is repeated.",m(r[e]));o[n]=1}return!0}function d(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function h(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function g(e){return n.isName(e)}function y(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function m(e){return e.startIndex+e[1].length}},1653:(e,t,r)=>{"use strict";const n=r(6292),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function i(e){this.options=Object.assign({},o,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=s,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(e,t,r){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function a(e){return this.options.indentBy.repeat(e)}function c(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}i.prototype.build=function(e){return this.options.preserveOrder?n(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},i.prototype.j2x=function(e,t){let r="",n="";for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(void 0===e[o])this.isAttribute(o)&&(n+="");else if(null===e[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+e[o]);else if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;let i="";for(let s=0;s<r;s++){const r=e[o][s];void 0===r||(null===r?"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,t+1).val:i+=this.processTextOrObjNode(r,o,t):i+=this.buildTextValNode(r,o,"",t))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",t)),n+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else n+=this.processTextOrObjNode(e[o],o,t);return{attrStr:r,val:n}},i.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},i.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+i+">"+e+o}},i.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},i.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},i.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e},e.exports=i},6292:e=>{function t(e,s,a,c){let u="",l=!1;for(let f=0;f<e.length;f++){const p=e[f],d=r(p);if(void 0===d)continue;let h="";if(h=0===a.length?d:`${a}.${d}`,d===s.textNodeName){let e=p[d];o(h,s)||(e=s.tagValueProcessor(d,e),e=i(e,s)),l&&(u+=c),u+=e,l=!1;continue}if(d===s.cdataPropName){l&&(u+=c),u+=`<![CDATA[${p[d][0][s.textNodeName]}]]>`,l=!1;continue}if(d===s.commentPropName){u+=c+`\x3c!--${p[d][0][s.textNodeName]}--\x3e`,l=!0;continue}if("?"===d[0]){const e=n(p[":@"],s),t="?xml"===d?"":c;let r=p[d][0][s.textNodeName];r=0!==r.length?" "+r:"",u+=t+`<${d}${r}${e}?>`,l=!0;continue}let g=c;""!==g&&(g+=s.indentBy);const y=c+`<${d}${n(p[":@"],s)}`,m=t(p[d],s,h,g);-1!==s.unpairedTags.indexOf(d)?s.suppressUnpairedNode?u+=y+">":u+=y+"/>":m&&0!==m.length||!s.suppressEmptyNode?m&&m.endsWith(">")?u+=y+`>${m}${c}</${d}>`:(u+=y+">",m&&""!==c&&(m.includes("/>")||m.includes("</"))?u+=c+s.indentBy+m+c:u+=m,u+=`</${d}>`):u+=y+"/>",l=!0}return u}function r(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function n(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let o=t.attributeValueProcessor(n,e[n]);o=i(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function o(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function i(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}e.exports=function(e,r){let n="";return r.format&&r.indentBy.length>0&&(n="\n"),t(e,r,"",n)}},6534:(e,t,r)=>{const n=r(8768);function o(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let o="";for(;t<e.length&&e[t]!==n;t++)o+=e[t];return[r,o,t]}function i(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function u(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function l(e){if(n.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}e.exports=function(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,f=!1,p=!1,d="";for(;t<e.length;t++)if("<"!==e[t]||p)if(">"===e[t]){if(p?"-"===e[t-1]&&"-"===e[t-2]&&(p=!1,n--):n--,0===n)break}else"["===e[t]?f=!0:d+=e[t];else{if(f&&s(e,t))t+=7,[entityName,val,t]=o(e,t+1),-1===val.indexOf("&")&&(r[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(f&&a(e,t))t+=8;else if(f&&c(e,t))t+=8;else if(f&&u(e,t))t+=9;else{if(!i)throw new Error("Invalid DOCTYPE");p=!0}n++,d=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}},2911:(e,t)=>{const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};t.buildOptions=function(e){return Object.assign({},r,e)},t.defaultOptions=r},9575:(e,t,r)=>{"use strict";const n=r(8768),o=r(3601),i=r(6534),s=r(7396);function a(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function c(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return E(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?E(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function f(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=n.getAllMatches(e,l),o=r.length,i={};for(let e=0;e<o;e++){const n=this.resolveNameSpace(r[e][1]);let o=r[e][4],s=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const e=this.options.attributeValueProcessor(n,o,t);i[s]=null==e?o:typeof e!=typeof o||e!==o?e:E(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[s]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new o("!xml");let r=t,n="",s="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=m(e,">",a,"Closing Tag is not closed.");let o=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),r&&(n=this.saveTextToParentTag(n,r,s));const i=s.substring(s.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let c=0;i&&-1!==this.options.unpairedTags.indexOf(i)?(c=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=s.lastIndexOf("."),s=s.substring(0,c),r=this.tagsNodeStack.pop(),n="",a=t}else if("?"===e[a+1]){let t=v(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,s),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new o(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,s,t.tagName)),this.addChild(r,e,s)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=m(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(a+4,t-2);n=this.saveTextToParentTag(n,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}a=t}else if("!D"===e.substr(a+1,2)){const t=i(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=m(e,"]]>",a,"CDATA is not closed.")-2,o=e.substring(a+9,t);n=this.saveTextToParentTag(n,r,s);let i=this.parseTextData(o,r.tagname,s,!0,!1,!0,!0);null==i&&(i=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):r.add(this.options.textNodeName,i),a=t+2}else{let i=v(e,a,this.options.removeNSPrefix),c=i.tagName;const u=i.rawTagName;let l=i.tagExp,f=i.attrExpPresent,p=i.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,s,!1));const d=r;if(d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==t.tagname&&(s+=s?"."+c:c),this.isItStopNode(this.options.stopNodes,s,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)a=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=i.closeIndex;else{const r=this.readStopNodeData(e,u,p+1);if(!r)throw new Error(`Unexpected end of ${u}`);a=r.i,t=r.tagContent}const n=new o(c);c!==l&&f&&(n[":@"]=this.buildAttributesMap(l,s,c)),t&&(t=this.parseTextData(t,c,s,!0,f,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,s)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new o(c);c!==l&&f&&(e[":@"]=this.buildAttributesMap(l,s,c)),this.addChild(r,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new o(c);this.tagsNodeStack.push(r),c!==l&&f&&(e[":@"]=this.buildAttributesMap(l,s,c)),this.addChild(r,e,s),r=e}n="",a=p}}else n+=e[a]}return t.child};function d(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const h=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function g(e,t,r,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function y(e,t,r){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}function m(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function v(e,t,r,n=">"){const o=function(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,a=i.search(/\s/);let c=i,u=!0;-1!==a&&(c=i.substring(0,a),i=i.substring(a+1).trimStart());const l=c;if(r){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),u=c!==o.data.substr(e+1))}return{tagName:c,tagExp:i,closeIndex:s,attrExpPresent:u,rawTagName:l}}function b(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=m(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i};r=i}else if("?"===e[r+1]){r=m(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=m(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=m(e,"]]>",r,"StopNode is not closed.")-2}else{const n=v(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function E(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&s(e,r)}return n.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=a,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=f,this.isItStopNode=y,this.replaceEntitiesValue=h,this.readStopNodeData=b,this.saveTextToParentTag=g,this.addChild=d}}},7702:(e,t,r)=>{const{buildOptions:n}=r(2911),o=r(9575),{prettify:i}=r(4625),s=r(5730);e.exports=class{constructor(e){this.externalEntities={},this.options=n(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=s.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new o(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:i(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},4625:(e,t)=>{"use strict";function r(e,t,s){let a;const c={};for(let u=0;u<e.length;u++){const l=e[u],f=n(l);let p="";if(p=void 0===s?f:s+"."+f,f===t.textNodeName)void 0===a?a=l[f]:a+=""+l[f];else{if(void 0===f)continue;if(l[f]){let e=r(l[f],t,p);const n=i(e,t);l[":@"]?o(e,l[":@"],p,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==c[f]&&c.hasOwnProperty(f)?(Array.isArray(c[f])||(c[f]=[c[f]]),c[f].push(e)):t.isArray(f,p,n)?c[f]=[e]:c[f]=e}}}return"string"==typeof a?a.length>0&&(c[t.textNodeName]=a):void 0!==a&&(c[t.textNodeName]=a),c}function n(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function o(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function i(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}t.prettify=function(e,t){return r(e,t)}},3601:e=>{"use strict";e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},4067:(e,t,r)=>{"use strict";var n=r(5938),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===o.call(e)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,s):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s)}},6494:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),a=r(0,o.length-s.length),c=[],u=0;u<a;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(s,arguments));return Object(t)===t?t:this}return o.apply(e,n(s,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},2786:(e,t,r)=>{"use strict";var n=r(6494);e.exports=Function.prototype.bind||n},1308:(e,t,r)=>{"use strict";var n,o=r(7321),i=r(9436),s=r(5831),a=r(4420),c=r(3910),u=r(7266),l=r(8751),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch(e){d=null}var h=function(){throw new u},g=d?function(){try{return h}catch(e){try{return d(arguments,"callee").get}catch(e){return h}}}():h,y=r(8813)(),m=r(5083)(),v=Object.getPrototypeOf||(m?function(e){return e.__proto__}:null),b={},E="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":y&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&v?v(""[Symbol.iterator]()):n,"%Symbol%":y?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":g,"%TypedArray%":E,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var S=v(v(e));w["%Error.prototype%"]=S}var x=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return w[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=r(2786),I=r(7360),N=O.call(Function.call,Array.prototype.concat),R=O.call(Function.apply,Array.prototype.splice),j=O.call(Function.call,String.prototype.replace),C=O.call(Function.call,String.prototype.slice),P=O.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$=/\\(\\)?/g,_=function(e,t){var r,n=e;if(I(A,n)&&(n="%"+(r=A[n])[0]+"%"),I(w,n)){var o=w[n];if(o===b&&(o=x(n)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=C(e,0,1),r=C(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return j(e,T,(function(e,t,r,o){n[n.length]=r?j(o,$,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=_("%"+n+"%",t),i=o.name,s=o.value,a=!1,l=o.alias;l&&(n=l[0],R(r,N([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var h=r[f],g=C(h,0,1),y=C(h,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&p||(a=!0),I(w,i="%"+(n+="."+h)+"%"))s=w[i];else if(null!=s){if(!(h in s)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(d&&f+1>=r.length){var m=d(s,h);s=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:s[h]}else p=I(s,h),s=s[h];p&&!a&&(w[i]=s)}}return s}},1322:(e,t,r)=>{"use strict";var n=r(1308)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8027:(e,t,r)=>{"use strict";var n=r(1308)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},5083:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},8813:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(7722);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},7722:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},1593:(e,t,r)=>{"use strict";var n=r(7722);e.exports=function(){return n()&&!!Symbol.toStringTag}},7360:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(2786);e.exports=i.call(n,o)},2400:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},6076:(e,t,r)=>{"use strict";var n=r(1593)(),o=r(3734)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=s,e.exports=a?i:s},5938:e=>{"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,s=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(n.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)&&a(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return a(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},3724:(e,t,r)=>{"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(1593)(),c=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(s.test(i.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===o.call(e);if(!c)return!1;if(void 0===n){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&c(t)}return c(e)===n}},7695:e=>{"use strict";e.exports=function(e){return e!=e}},9987:(e,t,r)=>{"use strict";var n=r(8907),o=r(6844),i=r(7695),s=r(7144),a=r(1223),c=n(s(),Number);o(c,{getPolyfill:s,implementation:i,shim:a}),e.exports=c},7144:(e,t,r)=>{"use strict";var n=r(7695);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},1223:(e,t,r)=>{"use strict";var n=r(6844),o=r(7144);e.exports=function(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},3459:(e,t,r)=>{"use strict";var n=r(4067),o=r(797),i=r(3734),s=i("Object.prototype.toString"),a=r(1593)(),c=r(1322),u="undefined"==typeof globalThis?r.g:globalThis,l=o(),f=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},p=i("String.prototype.slice"),d={},h=Object.getPrototypeOf;a&&c&&h&&n(l,(function(e){var t=new u[e];if(Symbol.toStringTag in t){var r=h(t),n=c(r,Symbol.toStringTag);if(!n){var o=h(r);n=c(o,Symbol.toStringTag)}d[e]=n.get}}));e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=p(s(e),8,-1);return f(l,t)>-1}return!!c&&function(e){var t=!1;return n(d,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},6633:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},5031:(e,t,r)=>{"use strict";var n=r(6844),o=r(8907),i=r(6633),s=r(1753),a=r(3238),c=o(s(),Object);n(c,{getPolyfill:s,implementation:i,shim:a}),e.exports=c},1753:(e,t,r)=>{"use strict";var n=r(6633);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},3238:(e,t,r)=>{"use strict";var n=r(1753),o=r(6844);e.exports=function(){var e=n();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},1219:(e,t,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,s=r(3401),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),u=a.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),n=s(e),a=t&&"[object String]"===i.call(e),p=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var h=u&&r;if(a&&e.length>0&&!o.call(e,0))for(var g=0;g<e.length;++g)p.push(String(g));if(n&&e.length>0)for(var y=0;y<e.length;++y)p.push(String(y));else for(var m in e)h&&"prototype"===m||!o.call(e,m)||p.push(String(m));if(c)for(var v=function(e){if("undefined"==typeof window||!d)return f(e);try{return f(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!o.call(e,l[b])||p.push(l[b]);return p}}e.exports=n},7395:(e,t,r)=>{"use strict";var n=Array.prototype.slice,o=r(3401),i=Object.keys,s=i?function(e){return i(e)}:r(1219),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?a(n.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},3401:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},9163:(e,t,r)=>{"use strict";const{ErrorWithCause:n}=r(8868),{findCauseByReference:o,getErrorCause:i,messageWithCauses:s,stackWithCauses:a}=r(1871);e.exports={ErrorWithCause:n,findCauseByReference:o,getErrorCause:i,stackWithCauses:a,messageWithCauses:s}},8868:e=>{"use strict";class t extends Error{constructor(e,{cause:r}={}){super(e),this.name=t.name,r&&(this.cause=r),this.message=e}}e.exports={ErrorWithCause:t}},1871:e=>{"use strict";const t=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:void 0}return e.cause instanceof Error?e.cause:void 0}},r=(e,n)=>{if(!(e instanceof Error))return"";const o=e.stack||"";if(n.has(e))return o+"\ncauses have become circular...";const i=t(e);return i?(n.add(e),o+"\ncaused by: "+r(i,n)):o},n=(e,r,o)=>{if(!(e instanceof Error))return"";const i=o?"":e.message||"";if(r.has(e))return i+": ...";const s=t(e);if(s){r.add(e);const t="cause"in e&&"function"==typeof e.cause;return i+(t?"":": ")+n(s,r,t)}return i};e.exports={findCauseByReference:(e,r)=>{if(!e||!r)return;if(!(e instanceof Error))return;if(!(r.prototype instanceof Error)&&r!==Error)return;const n=new Set;let o=e;for(;o&&!n.has(o);){if(n.add(o),o instanceof r)return o;o=t(o)}},getErrorCause:t,stackWithCauses:e=>r(e,new Set),messageWithCauses:e=>n(e,new Set)}},9931:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new f(e.value,t).test(this.value):""===e.operator?""===e.value||new f(this.value,t).test(e.semver):(!(t=i(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}e.exports=o;const i=r(4424),{safeRe:s,t:a}=r(2619),c=r(7712),u=r(4607),l=r(4740),f=r(1959)},1959:(e,t,r)=>{class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;const n=this.options.loose,i=n?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(i,j(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],f),a("comparator trim",e),e=e.replace(u[l.TILDETRIM],p),a("tilde trim",e),e=e.replace(u[l.CARETTRIM],d),a("caret trim",e);let c=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options)));n&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),a("range list",c);const m=new Map,v=c.map((e=>new s(e,this.options)));for(const e of v){if(y(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const E=[...m.values()];return o.set(t,E),E}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>v(r,t)&&e.set.some((e=>v(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(C(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const o=new(r(4850))({max:1e3}),i=r(4424),s=r(9931),a=r(4607),c=r(4740),{safeRe:u,t:l,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:d}=r(2619),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=r(9268),y=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},b=(e,t)=>(a("comp",e,t),e=x(e,t),a("caret",e),e=w(e,t),a("tildes",e),e=O(e,t),a("xrange",e),e=N(e,t),a("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,n,o,i)=>{let s;return a("tilde",e,t,r,n,o,i),E(r)?s="":E(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:E(o)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),s=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,o,i,s)=>{let c;return a("caret",e,t,r,o,i,s),E(r)?c="":E(o)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(i)?c="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===r?"0"===o?`>=${r}.${o}.${i}-${s} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${s} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),a("caret return",c),c}))},O=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>I(e,t))).join(" ")),I=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,n,o,i,s,c)=>{a("xRange",e,r,n,o,i,s,c);const u=E(o),l=u||E(i),f=l||E(s),p=f;return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+o}.${i}.${s}${c}`):l?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(r=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),a("xRange return",r),r}))},N=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),R=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),j=e=>(t,r,n,o,i,s,a,c,u,l,f,p,d)=>`${r=E(n)?"":E(o)?`>=${n}.0.0${e?"-0":""}`:E(i)?`>=${n}.${o}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=E(u)?"":E(l)?`<${+u+1}.0.0-0`:E(f)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${f}-${p}`:e?`<${u}.${l}.${+f+1}-0`:`<=${c}`}`.trim(),C=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},4740:(e,t,r)=>{const n=r(4607),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(9268),{safeRe:s,t:a}=r(2619),c=r(4424),{compareIdentifiers:u}=r(1582);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return u(r,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return u(r,o)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},3693:(e,t,r)=>{const n=r(9203);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},7712:(e,t,r)=>{const n=r(7083),o=r(4471),i=r(1410),s=r(2384),a=r(7627),c=r(9927);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return i(e,r,u);case">=":return s(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},4787:(e,t,r)=>{const n=r(4740),o=r(9203),{safeRe:i,t:s}=r(2619);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?i[s.COERCERTLFULL]:i[s.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?i[s.COERCEFULL]:i[s.COERCE]);if(null===r)return null;const a=r[2],c=r[3]||"0",u=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",f=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${a}.${c}.${u}${l}${f}`,t)}},3338:(e,t,r)=>{const n=r(4740);e.exports=(e,t,r)=>{const o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},9017:(e,t,r)=>{const n=r(2014);e.exports=(e,t)=>n(e,t,!0)},2014:(e,t,r)=>{const n=r(4740);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},309:(e,t,r)=>{const n=r(9203);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;const s=i>0,a=s?r:o,c=s?o:r,u=!!a.prerelease.length;if(!!c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return r.major!==o.major?l+"major":r.minor!==o.minor?l+"minor":r.patch!==o.patch?l+"patch":"prerelease"}},7083:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>0===n(e,t,r)},1410:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(e,t,r)>0},2384:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(e,t,r)>=0},8498:(e,t,r)=>{const n=r(4740);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},7627:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(e,t,r)<0},9927:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(e,t,r)<=0},2646:(e,t,r)=>{const n=r(4740);e.exports=(e,t)=>new n(e,t).major},1709:(e,t,r)=>{const n=r(4740);e.exports=(e,t)=>new n(e,t).minor},4471:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>0!==n(e,t,r)},9203:(e,t,r)=>{const n=r(4740);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},2923:(e,t,r)=>{const n=r(4740);e.exports=(e,t)=>new n(e,t).patch},8759:(e,t,r)=>{const n=r(9203);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},6677:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(t,e,r)},277:(e,t,r)=>{const n=r(3338);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},1307:(e,t,r)=>{const n=r(1959);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},4808:(e,t,r)=>{const n=r(3338);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},8914:(e,t,r)=>{const n=r(9203);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},5825:(e,t,r)=>{const n=r(2619),o=r(9268),i=r(4740),s=r(1582),a=r(9203),c=r(8914),u=r(3693),l=r(8498),f=r(309),p=r(2646),d=r(1709),h=r(2923),g=r(8759),y=r(2014),m=r(6677),v=r(9017),b=r(3338),E=r(4808),w=r(277),S=r(1410),x=r(7627),A=r(7083),O=r(4471),I=r(2384),N=r(9927),R=r(7712),j=r(4787),C=r(9931),P=r(1959),T=r(1307),$=r(2931),_=r(8536),k=r(2504),F=r(5800),L=r(4866),B=r(921),M=r(2398),D=r(5174),U=r(8773),V=r(669),G=r(7438);e.exports={parse:a,valid:c,clean:u,inc:l,diff:f,major:p,minor:d,patch:h,prerelease:g,compare:y,rcompare:m,compareLoose:v,compareBuild:b,sort:E,rsort:w,gt:S,lt:x,eq:A,neq:O,gte:I,lte:N,cmp:R,coerce:j,Comparator:C,Range:P,satisfies:T,toComparators:$,maxSatisfying:_,minSatisfying:k,minVersion:F,validRange:L,outside:B,gtr:M,ltr:D,intersects:U,simplifyRange:V,subset:G,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},9268:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},4607:e=>{const t="object"==typeof process&&process.env&&/\bsemver\b/i.test("false")?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1582:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},4424:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},2619:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=r(9268),s=r(4607),a=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.t={};let f=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[p,o]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of d)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;s(e,o,t),l[e]=o,u[o]=t,a[o]=new RegExp(t,r?"g":void 0),c[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),h("FULL",`^${u[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),h("LOOSE",`^${u[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),h("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?`+`(?:${u[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",u[l.COERCE],!0),h("COERCERTLFULL",u[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},4850:(e,t,r)=>{"use strict";const n=r(6239),o=Symbol("max"),i=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),d=Symbol("updateAgeOnGet"),h=()=>1;const g=(e,t,r)=>{const n=e[p].get(t);if(n){const t=n.value;if(y(e,t)){if(v(e,n),!e[a])return}else r&&(e[d]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},m=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const r=t.prev;v(e,t),t=r}},v=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[i]-=r.length,e[p].delete(r.key),e[f].removeNode(t)}};class b{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}const E=(e,t,r,n)=>{let o=r.value;y(e,o)&&(v(e,r),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[s]="function"!=typeof t?h:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,m(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,m(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[s]&&(this[s]=e,this[i]=0,this[f].forEach((e=>{e.length=this[s](e.value,e.key),this[i]+=e.length}))),m(this)}get lengthCalculator(){return this[s]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;E(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;E(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[u]&&this[f]&&this[f].length&&this[f].forEach((e=>this[u](e.key,e.value))),this[p]=new Map,this[f]=new n,this[i]=0}dump(){return this[f].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[p].has(e)){if(a>this[o])return v(this,this[p].get(e)),!1;const s=this[p].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[i]+=a-s.length,s.length=a,this.get(e),m(this),!0}const d=new b(e,t,a,n,r);return d.length>this[o]?(this[u]&&this[u](e,t),!1):(this[i]+=d.length,this[f].unshift(d),this[p].set(e,this[f].head),m(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!y(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[f].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[p].forEach(((e,t)=>g(this,t,!1)))}}},2398:(e,t,r)=>{const n=r(921);e.exports=(e,t,r)=>n(e,t,">",r)},8773:(e,t,r)=>{const n=r(1959);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5174:(e,t,r)=>{const n=r(921);e.exports=(e,t,r)=>n(e,t,"<",r)},8536:(e,t,r)=>{const n=r(4740),o=r(1959);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},2504:(e,t,r)=>{const n=r(4740),o=r(1959);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},5800:(e,t,r)=>{const n=r(4740),o=r(1959),i=r(1410);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let s=null;o.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!i(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!i(r,s)||(r=s)}return r&&e.test(r)?r:null}},921:(e,t,r)=>{const n=r(4740),o=r(9931),{ANY:i}=o,s=r(1959),a=r(1307),c=r(1410),u=r(7627),l=r(9927),f=r(2384);e.exports=(e,t,r,p)=>{let d,h,g,y,m;switch(e=new n(e,p),t=new s(t,p),r){case">":d=c,h=l,g=u,y=">",m=">=";break;case"<":d=u,h=f,g=c,y="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,p))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let s=null,a=null;if(n.forEach((e=>{e.semver===i&&(e=new o(">=0.0.0")),s=s||e,a=a||e,d(e.semver,s.semver,p)?s=e:g(e.semver,a.semver,p)&&(a=e)})),s.operator===y||s.operator===m)return!1;if((!a.operator||a.operator===y)&&h(e,a.semver))return!1;if(a.operator===m&&g(e,a.semver))return!1}return!0}},669:(e,t,r)=>{const n=r(1307),o=r(2014);e.exports=(e,t,r)=>{const i=[];let s=null,a=null;const c=e.sort(((e,t)=>o(e,t,r)));for(const e of c){n(e,t,r)?(a=e,s||(s=e)):(a&&i.push([s,a]),a=null,s=null)}s&&i.push([s,null]);const u=[];for(const[e,t]of i)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},7438:(e,t,r)=>{const n=r(1959),o=r(9931),{ANY:i}=o,s=r(1307),a=r(2014),c=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=u}const n=new Set;let o,l,d,h,g,y,m;for(const t of e)">"===t.operator||">="===t.operator?o=f(o,t,r):"<"===t.operator||"<="===t.operator?l=p(l,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&l){if(d=a(o.semver,l.semver,r),d>0)return null;if(0===d&&(">="!==o.operator||"<="!==l.operator))return null}for(const e of n){if(o&&!s(e,String(o),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let v=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,b=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;v&&1===v.prerelease.length&&"<"===l.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,o)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(h=f(o,e,r),h===e&&h!==o)return!1}else if(">="===o.operator&&!s(o.semver,String(e),r))return!1;if(l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(g=p(l,e,r),g===e&&g!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(e),r))return!1;if(!e.operator&&(l||o)&&0!==d)return!1}return!(o&&y&&!l&&0!==d)&&(!(l&&m&&!o&&0!==d)&&(!b&&!v))},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},2931:(e,t,r)=>{const n=r(1959);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},4866:(e,t,r)=>{const n=r(1959);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},6551:(e,t,r)=>{"use strict";var n=r(1308),o=r(9581),i=r(8027)(),s=r(1322),a=r(7266),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&s){var l=s(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(u=!1)}return(n||u||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},7396:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,r=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,o={}){if(o=Object.assign({},n,o),!e||"string"!=typeof e)return e;let i=e.trim();if(void 0!==o.skipLike&&o.skipLike.test(i))return e;if(o.hex&&t.test(i))return Number.parseInt(i,16);{const t=r.exec(i);if(t){const r=t[1],n=t[2];let s=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(t[3]);const a=t[4]||t[6];if(!o.leadingZeros&&n.length>0&&r&&"."!==i[2])return e;if(!o.leadingZeros&&n.length>0&&!r&&"."!==i[1])return e;{const t=Number(i),c=""+t;return-1!==c.search(/[eE]/)||a?o.eNotation?t:e:-1!==i.indexOf(".")?"0"===c&&""===s||c===s||r&&c==="-"+s?t:e:n?s===c||r+s===c?t:e:i===c||i===r+c?t:e}}return e}}},5362:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},813:(e,t,r)=>{"use strict";var n=r(6076),o=r(3724),i=r(8469),s=r(3459);function a(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,l=a(Object.prototype.toString),f=a(Number.prototype.valueOf),p=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(c)var h=a(BigInt.prototype.valueOf);if(u)var g=a(Symbol.prototype.valueOf);function y(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===l(e)}function v(e){return"[object Set]"===l(e)}function b(e){return"[object WeakMap]"===l(e)}function E(e){return"[object WeakSet]"===l(e)}function w(e){return"[object ArrayBuffer]"===l(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function x(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(x.working?x(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},m.working="undefined"!=typeof Map&&m(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},E.working="undefined"!=typeof WeakSet&&E(new WeakSet),t.isWeakSet=function(e){return E(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),t.isArrayBuffer=S,x.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&x(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var O="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function I(e){return"[object SharedArrayBuffer]"===l(e)}function N(e){return void 0!==O&&(void 0===I.working&&(I.working=I(new O)),I.working?I(e):e instanceof O)}function R(e){return y(e,f)}function j(e){return y(e,p)}function C(e){return y(e,d)}function P(e){return c&&y(e,h)}function T(e){return u&&y(e,g)}t.isSharedArrayBuffer=N,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=R,t.isStringObject=j,t.isBooleanObject=C,t.isBigIntObject=P,t.isSymbolObject=T,t.isBoxedPrimitive=function(e){return R(e)||j(e)||C(e)||P(e)||T(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||N(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},862:(e,t,r)=>{var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r<i;a=n[++r])y(a)||!w(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if("undefined"!=typeof process&&!0===process.noDeprecation)return e;if("undefined"==typeof process)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var i={},s=/^$/,a="false";function c(e,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function l(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return v(o)||(o=f(e,o,n)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(g(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(i)return i;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(A(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(E(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return p(r)}var u,l="",w=!1,O=["{","}"];(h(r)&&(w=!0,O=["[","]"]),A(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return E(r)&&(l=" "+RegExp.prototype.toString.call(r)),S(r)&&(l=" "+Date.prototype.toUTCString.call(r)),x(r)&&(l=" "+p(r)),0!==s.length||w&&0!=r.length?n<0?E(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=w?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s<a;++s)R(t,String(s))?i.push(d(e,t,r,n,String(s),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))})),i}(e,r,n,a,s):s.map((function(t){return d(e,r,n,a,t,w)})),e.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,O)):O[0]+l+O[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),R(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(c.value)<0?(a=y(r)?f(e,c.value,null):f(e,c.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function E(e){return w(e)&&"[object RegExp]"===O(e)}function w(e){return"object"==typeof e&&null!==e}function S(e){return w(e)&&"[object Date]"===O(e)}function x(e){return w(e)&&("[object Error]"===O(e)||e instanceof Error)}function A(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+a+"$","i"),t.debuglog=function(e){if(e=e.toUpperCase(),!i[e])if(s.test(e)){var r=process.pid;i[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else i[e]=function(){};return i[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(813),t.isArray=h,t.isBoolean=g,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=E,t.types.isRegExp=E,t.isObject=w,t.isDate=S,t.types.isDate=S,t.isError=x,t.types.isNativeError=x,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(5362);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),N[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(2400),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(j&&e[j]){var t;if("function"!=typeof(t=e[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),j&&Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=j,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var o=this,i=function(){return n.apply(o,arguments)};e.apply(this,t).then((function(e){process.nextTick(i.bind(null,null,e))}),(function(e){process.nextTick(C.bind(null,e,i))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,n(e)),t}},8469:(e,t,r)=>{"use strict";var n=r(4067),o=r(797),i=r(3734),s=r(1322),a=i("Object.prototype.toString"),c=r(1593)(),u="undefined"==typeof globalThis?r.g:globalThis,l=o(),f=i("String.prototype.slice"),p={},d=Object.getPrototypeOf;c&&s&&d&&n(l,(function(e){if("function"==typeof u[e]){var t=new u[e];if(Symbol.toStringTag in t){var r=d(t),n=s(r,Symbol.toStringTag);if(!n){var o=d(r);n=s(o,Symbol.toStringTag)}p[e]=n.get}}}));var h=r(3459);e.exports=function(e){return!!h(e)&&(c&&Symbol.toStringTag in e?function(e){var t=!1;return n(p,(function(r,n){if(!t)try{var o=r.call(e);o===n&&(t=o)}catch(e){}})),t}(e):f(a(e),8,-1))}},6377:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},6239:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var o=0;null!==n;o++)r=e(r,n.value,o),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var o=this.length-1;null!==n;o--)r=e(r,n.value,o),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var s=[];for(n=0;i&&n<t;n++)s.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(n=0;n<r.length;n++)i=o(this,i,r[n]);return s},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(6377)(n)}catch(e){}},797:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}},6291:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>l,StructError:()=>n,any:()=>O,array:()=>I,assert:()=>f,assign:()=>y,bigint:()=>N,boolean:()=>R,coerce:()=>Y,create:()=>p,date:()=>j,defaulted:()=>Z,define:()=>m,deprecated:()=>v,dynamic:()=>b,empty:()=>Q,enums:()=>C,func:()=>P,instance:()=>T,integer:()=>$,intersection:()=>_,is:()=>h,lazy:()=>E,literal:()=>k,map:()=>F,mask:()=>d,max:()=>te,min:()=>re,never:()=>L,nonempty:()=>ne,nullable:()=>B,number:()=>M,object:()=>D,omit:()=>w,optional:()=>U,partial:()=>S,pattern:()=>oe,pick:()=>x,record:()=>V,refine:()=>se,regexp:()=>G,set:()=>J,size:()=>ie,string:()=>H,struct:()=>A,trimmed:()=>K,tuple:()=>z,type:()=>q,union:()=>W,unknown:()=>X,validate:()=>g});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:o,...i}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(o??a),null!=o&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function o(e){return"object"==typeof e&&null!=e}function i(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:o[o.length-1],path:o,branch:i,...e,message:u}}function*c(e,t,r,n){var i;o(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=a(o,t,r,n);e&&(yield e)}}function*u(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,c={path:n,branch:i};if(s&&(e=t.coercer(e,c),a&&"type"!==t.type&&o(t.schema)&&o(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(const n of t.validator(e,c))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[f,p,d]of t.entries(e,c)){const t=u(p,d,{path:void 0===f?n:[...n,f],branch:void 0===f?i:[...i,p],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(p=r[1],void 0===f?e=p:e instanceof Map?e.set(f,p):e instanceof Set?e.add(p):o(e)&&(void 0!==p||f in e)&&(e[f]=p))}if("not_valid"!==l)for(const n of t.refiner(e,c))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:i=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=i,this.validator=n?(e,t)=>c(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>c(o(e,t),t,this,e):()=>[]}assert(e,t){return f(e,this,t)}create(e,t){return p(e,this,t)}is(e){return h(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return g(e,this,t)}}function f(e,t,r){const n=g(e,t,{message:r});if(n[0])throw n[0]}function p(e,t,r){const n=g(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=g(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function h(e,t){return!g(e,t)[0]}function g(e,t,r={}){const o=u(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(o);if(i[0]){return[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]}return[void 0,i[1]]}function y(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?q(n):D(n)}function m(e,t){return new l({type:e,schema:null,validator:t})}function v(e,t){return new l({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function b(e){return new l({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})}function E(e){let t;return new l({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function w(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?q(n):D(n)}function S(e){const t=e instanceof l?{...e.schema}:{...e};for(const e in t)t[e]=U(t[e]);return D(t)}function x(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return D(n)}function A(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),m(e,t)}function O(){return m("any",(()=>!0))}function I(e){return new l({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function N(){return m("bigint",(e=>"bigint"==typeof e))}function R(){return m("boolean",(e=>"boolean"==typeof e))}function j(){return m("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function C(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function P(){return m("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function T(e){return m("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function $(){return m("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function _(e){return new l({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function k(e){const t=s(e),r=typeof e;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function F(e,t){return new l({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,o]of r.entries())yield[n,n,e],yield[n,o,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function L(){return m("never",(()=>!1))}function B(e){return new l({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function M(){return m("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function D(e){const t=e?Object.keys(e):[],r=L();return new l({type:"object",schema:e||null,*entries(n){if(e&&o(n)){const o=new Set(Object.keys(n));for(const r of t)o.delete(r),yield[r,n[r],e[r]];for(const e of o)yield[e,n[e],r]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function U(e){return new l({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function V(e,t){return new l({type:"record",schema:null,*entries(r){if(o(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`})}function G(){return m("regexp",(e=>e instanceof RegExp))}function J(e){return new l({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})}function H(){return m("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function z(e){const t=L();return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let o=0;o<n;o++)yield[o,r[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})}function q(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(r){if(o(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function W(e){const t=e.map((e=>e.type)).join(" | ");return new l({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const o=[];for(const t of e){const[...e]=u(r,t,n),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...o]}})}function X(){return m("unknown",(()=>!0))}function Y(e,t,r){return new l({...e,coercer:(n,o)=>h(n,t)?e.coercer(r(n,o),o):e.coercer(n,o)})}function Z(e,t,r={}){return Y(e,X(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&i(e)&&i(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function K(e){return Y(e,H(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))}function re(e,t,r={}){const{exclusive:n}=r;return se(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function oe(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function ie(e,t,r=t){const n=`Expected a ${e.type}`,o=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${o} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${o} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${o} but received one with a length of \`${i}\``}}))}function se(e,t,r){return new l({...e,*refiner(n,o){yield*e.refiner(n,o);const i=c(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{onHomePage:()=>ae,onRpcRequest:()=>se,onTransaction:()=>ce,onUserInput:()=>ue});var e,t=r(9917);!function(e){e.ClearState="clear",e.GetState="get",e.UpdateState="update"}(e||(e={}));var o=(e,t)=>Object.hasOwnProperty.call(e,t);var i,s=((i=s||{})[i.Null=4]="Null",i[i.Comma=1]="Comma",i[i.Wrapper=1]="Wrapper",i[i.True=4]="True",i[i.False=5]="False",i[i.Quote=1]="Quote",i[i.Colon=1]="Colon",i[i.Date=24]="Date",i);var a=r(6291);function c(e){return function(e){return function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)&&"string"==typeof e.message?e.message:null==e?"":String(e)}(e).replace(/\.$/u,"")}function u(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}var l,f=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};function p(e,t="Assertion failed.",r=f){if(!e){if(t instanceof Error)throw t;throw u(r,t)}}function d(e,t,r="Assertion failed",n=f){try{(0,a.assert)(e,t)}catch(e){throw u(n,`${r}: ${c(e)}.`)}}!function(e){e.ButtonClickEvent="ButtonClickEvent",e.FormSubmitEvent="FormSubmitEvent"}(l||(l={}));const h=(0,a.object)({type:(0,a.string)(),name:(0,a.optional)((0,a.string)())}),g=(0,a.assign)(h,(0,a.object)({type:(0,a.literal)(l.ButtonClickEvent)})),y=(0,a.assign)(h,(0,a.object)({type:(0,a.literal)(l.FormSubmitEvent),value:(0,a.record)((0,a.string)(),(0,a.string)()),name:(0,a.string)()}));(0,a.union)([g,y]);function m(e,t,r=[]){return(...n)=>{if(1===n.length&&function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(n[0])){const r={...n[0],type:e};return d(r,t,`Invalid ${e} component`),r}const o=r.reduce(((e,t,r)=>void 0!==n[r]?{...e,[t]:n[r]}:e),{type:e});return d(o,t,`Invalid ${e} component`),o}}var v;!function(e){e.Copyable="copyable",e.Divider="divider",e.Heading="heading",e.Panel="panel",e.Spinner="spinner",e.Text="text",e.Image="image",e.Row="row",e.Address="address",e.Button="button",e.Input="input",e.Form="form"}(v||(v={}));const b=(0,a.object)({type:(0,a.string)()}),E=(0,a.assign)(b,(0,a.object)({value:(0,a.unknown)()})),w=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Address),value:(0,a.pattern)((0,a.string)(),/0x[a-fA-F0-9]{40}/u)})),S=m(v.Address,w,["value"]);function x(e){return t=e,(0,a.define)(JSON.stringify(t),(0,a.literal)(t).validator);var t}var A,O;!function(e){e.Primary="primary",e.Secondary="secondary"}(A||(A={})),function(e){e.Button="button",e.Submit="submit"}(O||(O={}));const I=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Button),value:(0,a.string)(),variant:(0,a.optional)((0,a.union)([x(A.Primary),x(A.Secondary)])),buttonType:(0,a.optional)((0,a.union)([x(O.Button),x(O.Submit)])),name:(0,a.optional)((0,a.string)())})),N=m(v.Button,I,["value","buttonType","name","variant"]),R=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Copyable),value:(0,a.string)(),sensitive:(0,a.optional)((0,a.boolean)())})),j=m(v.Copyable,R,["value","sensitive"]),C=(0,a.assign)(b,(0,a.object)({type:(0,a.literal)(v.Divider)}));m(v.Divider,C);var P;!function(e){e.Text="text",e.Number="number",e.Password="password"}(P||(P={}));const T=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Input),value:(0,a.optional)((0,a.string)()),name:(0,a.string)(),inputType:(0,a.optional)((0,a.union)([x(P.Text),x(P.Password),x(P.Number)])),placeholder:(0,a.optional)((0,a.string)()),label:(0,a.optional)((0,a.string)())})),$=m(v.Input,T,["name","inputType","placeholder","value","label"]),_=(0,a.union)([T,I]),k=(0,a.assign)(b,(0,a.object)({type:(0,a.literal)(v.Form),children:(0,a.array)(_),name:(0,a.string)()})),F=m(v.Form,k,["name","children"]),L=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Heading),value:(0,a.string)()})),B=m(v.Heading,L,["value"]);var M=r(9525);function D(e){try{const r=e.trim();p(r.length>0);const n=new M.XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}).parse(r,!0);return p(o(n,"svg")),t=n.svg,!Boolean(t)||"object"!=typeof t||Array.isArray(t)?{}:n.svg}catch{throw new Error("Snap icon must be a valid SVG.")}var t}const U=(0,a.assign)(b,(0,a.object)({type:(0,a.literal)(v.Image),value:(0,a.refine)((0,a.string)(),"SVG",(e=>!!function(e){try{return D(e),!0}catch{return!1}}(e)||"Value is not a valid SVG."))})),V=(m(v.Image,U,["value"]),(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Text),value:(0,a.string)(),markdown:(0,a.optional)((0,a.boolean)())}))),G=m(v.Text,V,["value","markdown"]);var J;!function(e){e.Default="default",e.Critical="critical",e.Warning="warning"}(J||(J={}));const H=(0,a.union)([U,V,w]),z=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Row),variant:(0,a.optional)((0,a.union)([x(J.Default),x(J.Critical),x(J.Warning)])),label:(0,a.string)(),value:H})),q=m(v.Row,z,["label","value","variant"]),W=(0,a.assign)(b,(0,a.object)({type:(0,a.literal)(v.Spinner)})),X=(m(v.Spinner,W),(0,a.assign)(b,(0,a.object)({children:(0,a.array)((0,a.lazy)((()=>K)))}))),Y=(0,a.assign)(X,(0,a.object)({type:(0,a.literal)(v.Panel)})),Z=m(v.Panel,Y,["children"]),K=(0,a.union)([R,C,L,U,Y,W,V,z,w,T,k,I]);var Q=r(5247),ee=r.n(Q);!function(){const e=[]}();(0,a.pattern)((0,a.string)(),/^(?:0x)?[0-9a-f]+$/iu),(0,a.pattern)((0,a.string)(),/^0x[0-9a-f]+$/iu),(0,a.pattern)((0,a.string)(),/^0x[0-9a-f]{40}$/u),(0,a.pattern)((0,a.string)(),/^0x[0-9a-fA-F]{40}$/u);function te(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}const re=[{name:"ERC-20",signature:"a9059cbb"},{name:"ERC-721",signature:"23b872dd"},{name:"ERC-1155",signature:"f242432a"}];async function ne(){return await snap.request({method:"snap_createInterface",params:{ui:Z([B("Interactive UI Example Snap"),N({value:"Update UI",name:"update"})])}})}async function oe(){var t;const r=await snap.request({method:"snap_manageState",params:{operation:e.GetState}});ee()(null===(t=r)||void 0===t?void 0:t.transaction,"No transaction found in Snap state.");const{from:n,to:o}=r.transaction;return Z([q("From",S(n)),q("To",o?S(o):G("None")),N({value:"See transaction type",name:"transaction-type"})])}async function ie(t){var r;const n=await snap.request({method:"snap_manageState",params:{operation:e.GetState}});ee()(null===(r=n)||void 0===r?void 0:r.transaction,"No transaction found in Snap state.");const o=function(e){if(e&&"string"==typeof e){var t;const r=te(e).slice(0,8);return(null===(t=re.find((e=>e.signature===r)))||void 0===t?void 0:t.name)??"Unknown"}return"Unknown"}(n.transaction.data);await snap.request({method:"snap_updateInterface",params:{id:t,ui:Z([q("Transaction type",G(o)),N({value:"Go back",name:"go-back"})])}})}const se=async({request:r})=>{switch(r.method){case"dialog":try{const t=await ne();return await snap.request({method:"snap_manageState",params:{operation:e.UpdateState,newState:{interfaceId:t},encrypted:!1}}),await snap.request({method:"snap_dialog",params:{type:"confirmation",id:t}})}finally{await snap.request({method:"snap_manageState",params:{operation:e.ClearState,encrypted:!1}})}case"getState":{var n;const t=await snap.request({method:"snap_manageState",params:{operation:e.GetState,encrypted:!1}});p(null===(n=t)||void 0===n?void 0:n.interfaceId,"No interface ID found in state.");return await snap.request({method:"snap_getInterfaceState",params:{id:t.interfaceId}})}default:throw t.PY.methodNotFound({data:{method:r.method}})}},ae=async()=>({id:await ne()}),ce=async({transaction:t})=>{await snap.request({method:"snap_manageState",params:{operation:e.UpdateState,newState:{transaction:t}}});return{id:await snap.request({method:"snap_createInterface",params:{ui:await oe()}})}},ue=async({id:e,event:t})=>{if(t.type===l.ButtonClickEvent)switch(t.name){case"update":await async function(e){await snap.request({method:"snap_updateInterface",params:{id:e,ui:Z([B("Interactive UI Example Snap"),F({name:"example-form",children:[$({name:"example-input",placeholder:"Enter something..."}),N("Submit",O.Submit,"sumbit")]})])}})}(e);break;case"transaction-type":await ie(e);break;case"go-back":await snap.request({method:"snap_updateInterface",params:{id:e,ui:await oe()}})}if(t.type===l.FormSubmitEvent&&"example-form"===t.name){const r=t.value["example-input"];await async function(e,t){await snap.request({method:"snap_updateInterface",params:{id:e,ui:Z([B("Interactive UI Example Snap"),G("The submitted value is:"),j(t)])}})}(e,r)}}})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
1
+ (()=>{var t={12:t=>{t.exports=a,a.default=a,a.stable=l,a.stableStringify=l;var e="[...]",n="[Circular]",r=[],i=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(t,e,n,a){var o;void 0===a&&(a=s()),u(t,"",0,[],void 0,0,a);try{o=0===i.length?JSON.stringify(t,e,n):JSON.stringify(t,p(e),n)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var c=r.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return o}function o(t,e,n,s){var a=Object.getOwnPropertyDescriptor(s,n);void 0!==a.get?a.configurable?(Object.defineProperty(s,n,{value:t}),r.push([s,n,e,a])):i.push([e,n,t]):(s[n]=t,r.push([s,n,e]))}function u(t,r,i,s,a,c,l){var d;if(c+=1,"object"==typeof t&&null!==t){for(d=0;d<s.length;d++)if(s[d]===t)return void o(n,t,r,a);if(void 0!==l.depthLimit&&c>l.depthLimit)return void o(e,t,r,a);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void o(e,t,r,a);if(s.push(t),Array.isArray(t))for(d=0;d<t.length;d++)u(t[d],d,d,s,t,c,l);else{var p=Object.keys(t);for(d=0;d<p.length;d++){var f=p[d];u(t[f],f,d,s,t,c,l)}}s.pop()}}function c(t,e){return t<e?-1:t>e?1:0}function l(t,e,n,a){void 0===a&&(a=s());var o,u=d(t,"",0,[],void 0,0,a)||t;try{o=0===i.length?JSON.stringify(u,e,n):JSON.stringify(u,p(e),n)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var c=r.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return o}function d(t,i,s,a,u,l,p){var f;if(l+=1,"object"==typeof t&&null!==t){for(f=0;f<a.length;f++)if(a[f]===t)return void o(n,t,i,u);try{if("function"==typeof t.toJSON)return}catch(t){return}if(void 0!==p.depthLimit&&l>p.depthLimit)return void o(e,t,i,u);if(void 0!==p.edgesLimit&&s+1>p.edgesLimit)return void o(e,t,i,u);if(a.push(t),Array.isArray(t))for(f=0;f<t.length;f++)d(t[f],f,f,a,t,l,p);else{var h={},g=Object.keys(t).sort(c);for(f=0;f<g.length;f++){var m=g[f];d(t[m],m,f,a,t,l,p),h[m]=t[m]}if(void 0===u)return h;r.push([u,i,t]),u[i]=h}a.pop()}}function p(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(i.length>0)for(var r=0;r<i.length;r++){var s=i[r];if(s[1]===e&&s[0]===n){n=s[2],i.splice(r,1);break}}return t.call(this,e,n)}}},525:(t,e,n)=>{"use strict";const r=n(730),i=n(702),s=n(653);t.exports={XMLParser:i,XMLValidator:r,XMLBuilder:s}},768:(t,e)=>{"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+(n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",i=new RegExp("^"+r+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,n){if(e){const r=Object.keys(e),i=r.length;for(let s=0;s<i;s++)t[r[s]]="strict"===n?[e[r[s]]]:e[r[s]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(t){const e=i.exec(t);return!(null==e)},e.getAllMatches=function(t,e){const n=[];let r=e.exec(t);for(;r;){const i=[];i.startIndex=e.lastIndex-r[0].length;const s=r.length;for(let t=0;t<s;t++)i.push(r[t]);n.push(i),r=e.exec(t)}return n},e.nameRegexp=r},730:(t,e,n)=>{"use strict";const r=n(768),i={allowBooleanAttributes:!1,unpairedTags:[]};function s(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function a(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const r=t.substr(n,e-n);if(e>5&&"xml"===r)return h("InvalidXml","XML declaration allowed only at the start of the document.",m(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function o(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=Object.assign({},i,e);const n=[];let u=!1,c=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let i=0;i<t.length;i++)if("<"===t[i]&&"?"===t[i+1]){if(i+=2,i=a(t,i),i.err)return i}else{if("<"!==t[i]){if(s(t[i]))continue;return h("InvalidChar","char '"+t[i]+"' is not expected.",m(t,i))}{let g=i;if(i++,"!"===t[i]){i=o(t,i);continue}{let v=!1;"/"===t[i]&&(v=!0,i++);let b="";for(;i<t.length&&">"!==t[i]&&" "!==t[i]&&"\t"!==t[i]&&"\n"!==t[i]&&"\r"!==t[i];i++)b+=t[i];if(b=b.trim(),"/"===b[b.length-1]&&(b=b.substring(0,b.length-1),i--),d=b,!r.isName(d)){let e;return e=0===b.trim().length?"Invalid space after '<'.":"Tag '"+b+"' is an invalid name.",h("InvalidTag",e,m(t,i))}const y=l(t,i);if(!1===y)return h("InvalidAttr","Attributes for '"+b+"' have open quote.",m(t,i));let x=y.value;if(i=y.index,"/"===x[x.length-1]){const n=i-x.length;x=x.substring(0,x.length-1);const r=p(x,e);if(!0!==r)return h(r.err.code,r.err.msg,m(t,n+r.err.line));u=!0}else if(v){if(!y.tagClosed)return h("InvalidTag","Closing tag '"+b+"' doesn't have proper closing.",m(t,i));if(x.trim().length>0)return h("InvalidTag","Closing tag '"+b+"' can't have attributes or invalid starting.",m(t,g));{const e=n.pop();if(b!==e.tagName){let n=m(t,e.tagStartPos);return h("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+b+"'.",m(t,g))}0==n.length&&(c=!0)}}else{const r=p(x,e);if(!0!==r)return h(r.err.code,r.err.msg,m(t,i-x.length+r.err.line));if(!0===c)return h("InvalidXml","Multiple possible root nodes found.",m(t,i));-1!==e.unpairedTags.indexOf(b)||n.push({tagName:b,tagStartPos:g}),u=!0}for(i++;i<t.length;i++)if("<"===t[i]){if("!"===t[i+1]){i++,i=o(t,i);continue}if("?"!==t[i+1])break;if(i=a(t,++i),i.err)return i}else if("&"===t[i]){const e=f(t,i);if(-1==e)return h("InvalidChar","char '&' is not expected.",m(t,i));i=e}else if(!0===c&&!s(t[i]))return h("InvalidXml","Extra text at the end",m(t,i));"<"===t[i]&&i--}}}var d;return u?1==n.length?h("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",m(t,n[0].tagStartPos)):!(n.length>0)||h("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const u='"',c="'";function l(t,e){let n="",r="",i=!1;for(;e<t.length;e++){if(t[e]===u||t[e]===c)""===r?r=t[e]:r!==t[e]||(r="");else if(">"===t[e]&&""===r){i=!0;break}n+=t[e]}return""===r&&{value:n,index:e,tagClosed:i}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(t,e){const n=r.getAllMatches(t,d),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return h("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",v(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return h("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",v(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return h("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",v(n[t]));const r=n[t][2];if(!g(r))return h("InvalidAttr","Attribute '"+r+"' is an invalid name.",v(n[t]));if(i.hasOwnProperty(r))return h("InvalidAttr","Attribute '"+r+"' is repeated.",v(n[t]));i[r]=1}return!0}function f(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function h(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function g(t){return r.isName(t)}function m(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function v(t){return t.startIndex+t[1].length}},653:(t,e,n)=>{"use strict";const r=n(292),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function s(t){this.options=Object.assign({},i,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=u),this.processTextOrObjNode=a,this.options.format?(this.indentate=o,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function a(t,e,n){const r=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,n):this.buildObjectNode(r.val,e,r.attrStr,n)}function o(t){return this.options.indentBy.repeat(t)}function u(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}s.prototype.build=function(t){return this.options.preserveOrder?r(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},s.prototype.j2x=function(t,e){let n="",r="";for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i))if(void 0===t[i])this.isAttribute(i)&&(r+="");else if(null===t[i])this.isAttribute(i)?r+="":"?"===i[0]?r+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+i+"/"+this.tagEndChar;else if(t[i]instanceof Date)r+=this.buildTextValNode(t[i],i,"",e);else if("object"!=typeof t[i]){const s=this.isAttribute(i);if(s)n+=this.buildAttrPairStr(s,""+t[i]);else if(i===this.options.textNodeName){let e=this.options.tagValueProcessor(i,""+t[i]);r+=this.replaceEntitiesValue(e)}else r+=this.buildTextValNode(t[i],i,"",e)}else if(Array.isArray(t[i])){const n=t[i].length;let s="";for(let a=0;a<n;a++){const n=t[i][a];void 0===n||(null===n?"?"===i[0]?r+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+i+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?s+=this.j2x(n,e+1).val:s+=this.processTextOrObjNode(n,i,e):s+=this.buildTextValNode(n,i,"",e))}this.options.oneListGroup&&(s=this.buildObjectNode(s,i,"",e)),r+=s}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const e=Object.keys(t[i]),r=e.length;for(let s=0;s<r;s++)n+=this.buildAttrPairStr(e[s],""+t[i][e[s]])}else r+=this.processTextOrObjNode(t[i],i,e);return{attrStr:n,val:r}},s.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},s.prototype.buildObjectNode=function(t,e,n,r){if(""===t)return"?"===e[0]?this.indentate(r)+"<"+e+n+"?"+this.tagEndChar:this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",i=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(r)+"<"+e+n+s+this.tagEndChar+t+this.indentate(r)+i:this.indentate(r)+"<"+e+n+s+">"+t+i}},s.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},s.prototype.buildTextValNode=function(t,e,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+i+"</"+e+this.tagEndChar}},s.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t},t.exports=s},292:t=>{function e(t,a,o,u){let c="",l=!1;for(let d=0;d<t.length;d++){const p=t[d],f=n(p);if(void 0===f)continue;let h="";if(h=0===o.length?f:`${o}.${f}`,f===a.textNodeName){let t=p[f];i(h,a)||(t=a.tagValueProcessor(f,t),t=s(t,a)),l&&(c+=u),c+=t,l=!1;continue}if(f===a.cdataPropName){l&&(c+=u),c+=`<![CDATA[${p[f][0][a.textNodeName]}]]>`,l=!1;continue}if(f===a.commentPropName){c+=u+`\x3c!--${p[f][0][a.textNodeName]}--\x3e`,l=!0;continue}if("?"===f[0]){const t=r(p[":@"],a),e="?xml"===f?"":u;let n=p[f][0][a.textNodeName];n=0!==n.length?" "+n:"",c+=e+`<${f}${n}${t}?>`,l=!0;continue}let g=u;""!==g&&(g+=a.indentBy);const m=u+`<${f}${r(p[":@"],a)}`,v=e(p[f],a,h,g);-1!==a.unpairedTags.indexOf(f)?a.suppressUnpairedNode?c+=m+">":c+=m+"/>":v&&0!==v.length||!a.suppressEmptyNode?v&&v.endsWith(">")?c+=m+`>${v}${u}</${f}>`:(c+=m+">",v&&""!==u&&(v.includes("/>")||v.includes("</"))?c+=u+a.indentBy+v+u:c+=v,c+=`</${f}>`):c+=m+"/>",l=!0}return c}function n(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(t.hasOwnProperty(r)&&":@"!==r)return r}}function r(t,e){let n="";if(t&&!e.ignoreAttributes)for(let r in t){if(!t.hasOwnProperty(r))continue;let i=e.attributeValueProcessor(r,t[r]);i=s(i,e),!0===i&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}="${i}"`}return n}function i(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let r in e.stopNodes)if(e.stopNodes[r]===t||e.stopNodes[r]==="*."+n)return!0;return!1}function s(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}t.exports=function(t,n){let r="";return n.format&&n.indentBy.length>0&&(r="\n"),e(t,n,"",r)}},534:(t,e,n)=>{const r=n(768);function i(t,e){let n="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)n+=t[e];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=t[e++];let i="";for(;e<t.length&&t[e]!==r;e++)i+=t[e];return[n,i,e]}function s(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function a(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function o(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function u(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function c(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function l(t){if(r.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}t.exports=function(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let r=1,d=!1,p=!1,f="";for(;e<t.length;e++)if("<"!==t[e]||p)if(">"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,r--):r--,0===r)break}else"["===t[e]?d=!0:f+=t[e];else{if(d&&a(t,e))e+=7,[entityName,val,e]=i(t,e+1),-1===val.indexOf("&")&&(n[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(d&&o(t,e))e+=8;else if(d&&u(t,e))e+=8;else if(d&&c(t,e))e+=9;else{if(!s)throw new Error("Invalid DOCTYPE");p=!0}r++,f=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}},911:(t,e)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};e.buildOptions=function(t){return Object.assign({},n,t)},e.defaultOptions=n},575:(t,e,n)=>{"use strict";const r=n(768),i=n(601),s=n(534),a=n(396);function o(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:t[r]}}}function u(t,e,n,r,i,s,a){if(void 0!==t&&(this.options.trimValues&&!r&&(t=t.trim()),t.length>0)){a||(t=this.replaceEntitiesValue(t));const r=this.options.tagValueProcessor(e,t,n,i,s);if(null==r)return t;if(typeof r!=typeof t||r!==t)return r;if(this.options.trimValues)return x(t,this.options.parseTagValue,this.options.numberParseOptions);return t.trim()===t?x(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function c(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(t,e,n){if(!this.options.ignoreAttributes&&"string"==typeof t){const n=r.getAllMatches(t,l),i=n.length,s={};for(let t=0;t<i;t++){const r=this.resolveNameSpace(n[t][1]);let i=n[t][4],a=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const t=this.options.attributeValueProcessor(r,i,e);s[a]=null==t?i:typeof t!=typeof i||t!==i?t:x(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[a]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=s,t}return s}}const p=function(t){t=t.replace(/\r\n?/g,"\n");const e=new i("!xml");let n=e,r="",a="";for(let o=0;o<t.length;o++){if("<"===t[o])if("/"===t[o+1]){const e=v(t,">",o,"Closing Tag is not closed.");let i=t.substring(o+2,e).trim();if(this.options.removeNSPrefix){const t=i.indexOf(":");-1!==t&&(i=i.substr(t+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,a));const s=a.substring(a.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let u=0;s&&-1!==this.options.unpairedTags.indexOf(s)?(u=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=a.lastIndexOf("."),a=a.substring(0,u),n=this.tagsNodeStack.pop(),r="",o=e}else if("?"===t[o+1]){let e=b(t,o,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,a),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new i(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,a,e.tagName)),this.addChild(n,t,a)}o=e.closeIndex+1}else if("!--"===t.substr(o+1,3)){const e=v(t,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const i=t.substring(o+4,e-2);r=this.saveTextToParentTag(r,n,a),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}o=e}else if("!D"===t.substr(o+1,2)){const e=s(t,o);this.docTypeEntities=e.entities,o=e.i}else if("!["===t.substr(o+1,2)){const e=v(t,"]]>",o,"CDATA is not closed.")-2,i=t.substring(o+9,e);r=this.saveTextToParentTag(r,n,a);let s=this.parseTextData(i,n.tagname,a,!0,!1,!0,!0);null==s&&(s=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,s),o=e+2}else{let s=b(t,o,this.options.removeNSPrefix),u=s.tagName;const c=s.rawTagName;let l=s.tagExp,d=s.attrExpPresent,p=s.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,a,!1));const f=n;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),u!==e.tagname&&(a+=a?"."+u:u),this.isItStopNode(this.options.stopNodes,a,u)){let e="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)o=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(u))o=s.closeIndex;else{const n=this.readStopNodeData(t,c,p+1);if(!n)throw new Error(`Unexpected end of ${c}`);o=n.i,e=n.tagContent}const r=new i(u);u!==l&&d&&(r[":@"]=this.buildAttributesMap(l,a,u)),e&&(e=this.parseTextData(e,u,a,!0,d,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),r.add(this.options.textNodeName,e),this.addChild(n,r,a)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===u[u.length-1]?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),l=u):l=l.substr(0,l.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));const t=new i(u);u!==l&&d&&(t[":@"]=this.buildAttributesMap(l,a,u)),this.addChild(n,t,a),a=a.substr(0,a.lastIndexOf("."))}else{const t=new i(u);this.tagsNodeStack.push(n),u!==l&&d&&(t[":@"]=this.buildAttributesMap(l,a,u)),this.addChild(n,t,a),n=t}r="",o=p}}else r+=t[o]}return e.child};function f(t,e,n){const r=this.options.updateTag(e.tagname,n,e[":@"]);!1===r||("string"==typeof r?(e.tagname=r,t.addChild(e)):t.addChild(e))}const h=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function g(t,e,n,r){return t&&(void 0===r&&(r=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,r))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function m(t,e,n){const r="*."+n;for(const n in t){const i=t[n];if(r===i||e===i)return!0}return!1}function v(t,e,n,r){const i=t.indexOf(e,n);if(-1===i)throw new Error(r);return i+e.length-1}function b(t,e,n,r=">"){const i=function(t,e,n=">"){let r,i="";for(let s=e;s<t.length;s++){let e=t[s];if(r)e===r&&(r="");else if('"'===e||"'"===e)r=e;else if(e===n[0]){if(!n[1])return{data:i,index:s};if(t[s+1]===n[1])return{data:i,index:s}}else"\t"===e&&(e=" ");i+=e}}(t,e+1,r);if(!i)return;let s=i.data;const a=i.index,o=s.search(/\s/);let u=s,c=!0;-1!==o&&(u=s.substring(0,o),s=s.substring(o+1).trimStart());const l=u;if(n){const t=u.indexOf(":");-1!==t&&(u=u.substr(t+1),c=u!==i.data.substr(t+1))}return{tagName:u,tagExp:s,closeIndex:a,attrExpPresent:c,rawTagName:l}}function y(t,e,n){const r=n;let i=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const s=v(t,">",n,`${e} is not closed`);if(t.substring(n+2,s).trim()===e&&(i--,0===i))return{tagContent:t.substring(r,n),i:s};n=s}else if("?"===t[n+1]){n=v(t,"?>",n+1,"StopNode is not closed.")}else if("!--"===t.substr(n+1,3)){n=v(t,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===t.substr(n+1,2)){n=v(t,"]]>",n,"StopNode is not closed.")-2}else{const r=b(t,n,">");if(r){(r&&r.tagName)===e&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex}}}function x(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&a(t,n)}return r.isExist(t)?t:""}t.exports=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=o,this.parseXml=p,this.parseTextData=u,this.resolveNameSpace=c,this.buildAttributesMap=d,this.isItStopNode=m,this.replaceEntitiesValue=h,this.readStopNodeData=y,this.saveTextToParentTag=g,this.addChild=f}}},702:(t,e,n)=>{const{buildOptions:r}=n(911),i=n(575),{prettify:s}=n(625),a=n(730);t.exports=class{constructor(t){this.externalEntities={},this.options=r(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=a.validate(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(t);return this.options.preserveOrder||void 0===r?r:s(r,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},625:(t,e)=>{"use strict";function n(t,e,a){let o;const u={};for(let c=0;c<t.length;c++){const l=t[c],d=r(l);let p="";if(p=void 0===a?d:a+"."+d,d===e.textNodeName)void 0===o?o=l[d]:o+=""+l[d];else{if(void 0===d)continue;if(l[d]){let t=n(l[d],e,p);const r=s(t,e);l[":@"]?i(t,l[":@"],p,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==u[d]&&u.hasOwnProperty(d)?(Array.isArray(u[d])||(u[d]=[u[d]]),u[d].push(t)):e.isArray(d,p,r)?u[d]=[t]:u[d]=t}}}return"string"==typeof o?o.length>0&&(u[e.textNodeName]=o):void 0!==o&&(u[e.textNodeName]=o),u}function r(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function i(t,e,n,r){if(e){const i=Object.keys(e),s=i.length;for(let a=0;a<s;a++){const s=i[a];r.isArray(s,n+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function s(t,e){const{textNodeName:n}=e,r=Object.keys(t).length;return 0===r||!(1!==r||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}e.prettify=function(t,e){return n(t,e)}},601:t=>{"use strict";t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},396:t=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t,i={}){if(i=Object.assign({},r,i),!t||"string"!=typeof t)return t;let s=t.trim();if(void 0!==i.skipLike&&i.skipLike.test(s))return t;if(i.hex&&e.test(s))return Number.parseInt(s,16);{const e=n.exec(s);if(e){const n=e[1],r=e[2];let a=function(t){if(t&&-1!==t.indexOf("."))return"."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1)),t;return t}(e[3]);const o=e[4]||e[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==s[2])return t;if(!i.leadingZeros&&r.length>0&&!n&&"."!==s[1])return t;{const e=Number(s),u=""+e;return-1!==u.search(/[eE]/)||o?i.eNotation?e:t:-1!==s.indexOf(".")?"0"===u&&""===a||u===a||n&&u==="-"+a?e:t:r?a===u||n+a===u?e:t:s===u||s===n+u?e:t}}return t}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r](s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";function t(t){return Boolean(t)&&"object"==typeof t&&!Array.isArray(t)}n.r(r),n.d(r,{onHomePage:()=>tn,onRpcRequest:()=>Ke,onTransaction:()=>en,onUserInput:()=>nn});var e=(t,e)=>Object.hasOwnProperty.call(t,e);var i,s=((i=s||{})[i.Null=4]="Null",i[i.Comma=1]="Comma",i[i.Wrapper=1]="Wrapper",i[i.True=4]="True",i[i.False=5]="False",i[i.Quote=1]="Quote",i[i.Colon=1]="Colon",i[i.Date=24]="Date",i);function a(t){if("object"!=typeof t||null===t)return!1;try{let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch(t){return!1}}class o extends TypeError{constructor(t,e){let n;const{message:r,explanation:i,...s}=t,{path:a}=t,o=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(i??o),null!=i&&(this.cause=o),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...e()])}}function u(t){return"object"==typeof t&&null!=t}function c(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function l(t,e,n,r){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:i,branch:s}=e,{type:a}=n,{refinement:o,message:u=`Expected a value of type \`${a}\`${o?` with refinement \`${o}\``:""}, but received: \`${c(r)}\``}=t;return{value:r,type:a,refinement:o,key:i[i.length-1],path:i,branch:s,...t,message:u}}function*d(t,e,n,r){var i;u(i=t)&&"function"==typeof i[Symbol.iterator]||(t=[t]);for(const i of t){const t=l(i,e,n,r);t&&(yield t)}}function*p(t,e,n={}){const{path:r=[],branch:i=[t],coerce:s=!1,mask:a=!1}=n,o={path:r,branch:i};if(s&&(t=e.coercer(t,o),a&&"type"!==e.type&&u(e.schema)&&u(t)&&!Array.isArray(t)))for(const n in t)void 0===e.schema[n]&&delete t[n];let c="valid";for(const r of e.validator(t,o))r.explanation=n.message,c="not_valid",yield[r,void 0];for(let[l,d,f]of e.entries(t,o)){const e=p(d,f,{path:void 0===l?r:[...r,l],branch:void 0===l?i:[...i,d],coerce:s,mask:a,message:n.message});for(const n of e)n[0]?(c=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):s&&(d=n[1],void 0===l?t=d:t instanceof Map?t.set(l,d):t instanceof Set?t.add(d):u(t)&&(void 0!==d||l in t)&&(t[l]=d))}if("not_valid"!==c)for(const r of e.refiner(t,o))r.explanation=n.message,c="not_refined",yield[r,void 0];"valid"===c&&(yield[void 0,t])}class f{constructor(t){const{type:e,schema:n,validator:r,refiner:i,coercer:s=(t=>t),entries:a=function*(){}}=t;this.type=e,this.schema=n,this.entries=a,this.coercer=s,this.validator=r?(t,e)=>d(r(t,e),e,this,t):()=>[],this.refiner=i?(t,e)=>d(i(t,e),e,this,t):()=>[]}assert(t,e){return h(t,this,e)}create(t,e){return g(t,this,e)}is(t){return m(t,this)}mask(t,e){return function(t,e,n){const r=v(t,e,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(t,this,e)}validate(t,e={}){return v(t,this,e)}}function h(t,e,n){const r=v(t,e,{message:n});if(r[0])throw r[0]}function g(t,e,n){const r=v(t,e,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function m(t,e){return!v(t,e)[0]}function v(t,e,n={}){const r=p(t,e,n),i=function(t){const{done:e,value:n}=t.next();return e?void 0:n}(r);if(i[0]){return[new o(i[0],(function*(){for(const t of r)t[0]&&(yield t[0])})),void 0]}return[void 0,i[1]]}function b(...t){const e="type"===t[0].type,n=t.map((t=>t.schema)),r=Object.assign({},...n);return e?C(r):P(r)}function y(t,e){return new f({type:t,schema:null,validator:e})}function x(t){let e;return new f({type:"lazy",schema:null,*entries(n,r){e??(e=t()),yield*e.entries(n,r)},validator:(n,r)=>(e??(e=t()),e.validator(n,r)),coercer:(n,r)=>(e??(e=t()),e.coercer(n,r)),refiner:(n,r)=>(e??(e=t()),e.refiner(n,r))})}function N(t){return new f({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[n,r]of e.entries())yield[n,r,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${c(t)}`})}function E(){return y("boolean",(t=>"boolean"==typeof t))}function w(t){const e=c(t),n=typeof t;return new f({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?t:null,validator:n=>n===t||`Expected the literal \`${e}\`, but received: ${c(n)}`})}function O(){return y("never",(()=>!1))}function T(t){return new f({...t,validator:(e,n)=>null===e||t.validator(e,n),refiner:(e,n)=>null===e||t.refiner(e,n)})}function S(){return y("number",(t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${c(t)}`))}function P(t){const e=t?Object.keys(t):[],n=O();return new f({type:"object",schema:t||null,*entries(r){if(t&&u(r)){const i=new Set(Object.keys(r));for(const n of e)i.delete(n),yield[n,r[n],t[n]];for(const t of i)yield[t,r[t],n]}},validator:t=>u(t)||`Expected an object, but received: ${c(t)}`,coercer:t=>u(t)?{...t}:t})}function A(t){return new f({...t,validator:(e,n)=>void 0===e||t.validator(e,n),refiner:(e,n)=>void 0===e||t.refiner(e,n)})}function I(t,e){return new f({type:"record",schema:null,*entries(n){if(u(n))for(const r in n){const i=n[r];yield[r,r,t],yield[r,i,e]}},validator:t=>u(t)||`Expected an object, but received: ${c(t)}`})}function j(){return y("string",(t=>"string"==typeof t||`Expected a string, but received: ${c(t)}`))}function C(t){const e=Object.keys(t);return new f({type:"type",schema:t,*entries(n){if(u(n))for(const r of e)yield[r,n[r],t[r]]},validator:t=>u(t)||`Expected an object, but received: ${c(t)}`,coercer:t=>u(t)?{...t}:t})}function k(t){const e=t.map((t=>t.type)).join(" | ");return new f({type:"union",schema:null,coercer(e){for(const n of t){const[t,r]=n.validate(e,{coerce:!0});if(!t)return r}return e},validator(n,r){const i=[];for(const e of t){const[...t]=p(n,e,r),[s]=t;if(!s[0])return[];for(const[e]of t)e&&i.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${c(n)}`,...i]}})}function $(){return y("unknown",(()=>!0))}function _(t,e,n){return new f({...t,coercer:(r,i)=>m(r,e)?t.coercer(n(r,i),i):t.coercer(r,i)})}function F(t,e){return R(t,"pattern",(n=>e.test(n)||`Expected a ${t.type} matching \`/${e.source}/\` but received "${n}"`))}function R(t,e,n){return new f({...t,*refiner(r,i){yield*t.refiner(r,i);const s=d(n(r,i),i,t,r);for(const t of s)yield{...t,refinement:e}}})}function V(t){return function(t){return function(t){return"object"==typeof t&&null!==t&&"message"in t}(t)&&"string"==typeof t.message?t.message:null==t?"":String(t)}(t).replace(/\.$/u,"")}function D(t,e){return n=t,Boolean("string"==typeof n?.prototype?.constructor?.name)?new t({message:e}):t({message:e});var n}var M=class extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}};function L(t,e="Assertion failed.",n=M){if(!t){if(e instanceof Error)throw e;throw D(n,e)}}function q(t,e,n="Assertion failed",r=M){try{h(t,e)}catch(t){throw D(r,`${n}: ${V(t)}.`)}}var B=t=>P(t);function U({path:t,branch:n}){const r=t[t.length-1];return e(n[n.length-2],r)}function J(t){return new f({...t,type:`optional ${t.type}`,validator:(e,n)=>!U(n)||t.validator(e,n),refiner:(e,n)=>!U(n)||t.refiner(e,n)})}var G=k([w(null),E(),y("finite number",(t=>m(t,S())&&Number.isFinite(t))),j(),N(x((()=>G))),I(j(),x((()=>G)))]),X=_(G,y("any",(()=>!0)),(t=>(q(t,G),JSON.parse(JSON.stringify(t,((t,e)=>{if("__proto__"!==t&&"constructor"!==t)return e}))))));function z(t){try{return function(t){g(t,X)}(t),!0}catch{return!1}}var W=w("2.0"),Y=T(k([S(),j()])),Z=B({code:y("integer",(t=>"number"==typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${c(t)}`)),message:j(),data:J(X),stack:J(j())}),H=k([I(j(),X),N(X)]);B({id:Y,jsonrpc:W,method:j(),params:J(H)}),B({jsonrpc:W,method:j(),params:J(H)});P({id:Y,jsonrpc:W,result:A($()),error:A(Z)});var Q=B({id:Y,jsonrpc:W,result:X}),K=B({id:Y,jsonrpc:W,error:Z});k([Q,K]);var tt=n(525),et={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},nt={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},rt={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},it=et.internal,st="Unspecified error message. This is a bug, please report it.",at=(ot(it),"Unspecified server error.");function ot(t,n=st){if(function(t){return Number.isInteger(t)}(t)){const n=t.toString();if(e(rt,n))return rt[n].message;if(function(t){return t>=-32099&&t<=-32e3}(t))return at}return n}function ut(e){return Array.isArray(e)?e.map((e=>z(e)?e:t(e)?ct(e):null)):t(e)?ct(e):z(e)?e:null}function ct(t){return Object.getOwnPropertyNames(t).reduce(((e,n)=>{const r=t[n];return z(r)&&(e[n]=r),e}),{})}var lt=n(12),dt=class extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a non-empty string.');super(e),this.code=t,void 0!==n&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data,a(this.data)&&(t.data.cause=ut(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return lt(this.serialize(),ft,2)}},pt=class extends dt{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n)}};function ft(t,e){if("[Circular]"!==e)return e}var ht=t=>jt(et.parse,t),gt=t=>jt(et.invalidRequest,t),mt=t=>jt(et.invalidParams,t),vt=t=>jt(et.methodNotFound,t),bt=t=>jt(et.internal,t),yt=t=>jt(et.invalidInput,t),xt=t=>jt(et.resourceNotFound,t),Nt=t=>jt(et.resourceUnavailable,t),Et=t=>jt(et.transactionRejected,t),wt=t=>jt(et.methodNotSupported,t),Ot=t=>jt(et.limitExceeded,t),Tt=t=>Ct(nt.userRejectedRequest,t),St=t=>Ct(nt.unauthorized,t),Pt=t=>Ct(nt.unsupportedMethod,t),At=t=>Ct(nt.disconnected,t),It=t=>Ct(nt.chainDisconnected,t);function jt(t,e){const[n,r]=kt(e);return new dt(t,n??ot(t),r)}function Ct(t,e){const[n,r]=kt(e);return new pt(t,n??ot(t),r)}function kt(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e??void 0,n]}}return[]}!function(){const t=[]}();F(j(),/^(?:0x)?[0-9a-f]+$/iu),F(j(),/^0x[0-9a-f]+$/iu),F(j(),/^0x[0-9a-f]{40}$/u);var $t=F(j(),/^0x[0-9a-fA-F]{40}$/u);function _t(t){return t.startsWith("0x")||t.startsWith("0X")?t.substring(2):t}var Ft,Rt,Vt,Dt,Mt=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Lt=(t,e,n)=>(Mt(t,e,"read from private field"),n?n.call(t):e.get(t)),qt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Bt=(t,e,n,r)=>(Mt(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Ut=class extends Error{constructor(n,r={}){const i=function(n){if(t(n)&&e(n,"message")&&"string"==typeof n.message)return n.message;return String(n)}(n);super(i),qt(this,Ft,void 0),qt(this,Rt,void 0),qt(this,Vt,void 0),qt(this,Dt,void 0),Bt(this,Rt,i),Bt(this,Ft,function(n){if(t(n)&&e(n,"code")&&"number"==typeof n.code&&Number.isInteger(n.code))return n.code;return-32603}(n));const s={...zt(n),...r};Object.keys(s).length>0&&Bt(this,Vt,s),Bt(this,Dt,super.stack)}get name(){return"SnapError"}get code(){return Lt(this,Ft)}get message(){return Lt(this,Rt)}get data(){return Lt(this,Vt)}get stack(){return Lt(this,Dt)}toJSON(){return{code:Gt,message:Xt,data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}};function Jt(t){return class extends Ut{constructor(e,n){if("object"==typeof e){const n=t();return void super({code:n.code,message:n.message,data:e})}const r=t(e);super({code:r.code,message:r.message,data:n})}}}Ft=new WeakMap,Rt=new WeakMap,Vt=new WeakMap,Dt=new WeakMap;var Gt=-31002,Xt="Snap Error";function zt(n){return t(n)&&e(n,"data")&&"object"==typeof n.data&&null!==n.data&&z(n.data)&&!Array.isArray(n.data)?n.data:{}}function Wt(t){return e=t,y(JSON.stringify(e),w(e).validator);var e}function Yt(n){try{return function(n){try{const r=n.trim();L(r.length>0);const i=new tt.XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}).parse(r,!0);return L(e(i,"svg")),t(i.svg)?i.svg:{}}catch{throw new Error("Snap icon must be a valid SVG.")}}(n),!0}catch{return!1}}Jt(bt),Jt(yt),Jt(mt),Jt(gt),Jt(Ot);var Zt=Jt(vt);Jt(wt),Jt(ht),Jt(xt),Jt(Nt),Jt(Et),Jt(It),Jt(At),Jt(St),Jt(Pt),Jt(Tt);function Ht(t,e,n=[]){return(...r)=>{if(1===r.length&&a(r[0])){const n={...r[0],type:t};return q(n,e,`Invalid ${t} component`),n}const i=n.reduce(((t,e,n)=>void 0!==r[n]?{...t,[e]:r[n]}:t),{type:t});return q(i,e,`Invalid ${t} component`),i}}var Qt,Kt=((Qt=Kt||{}).Copyable="copyable",Qt.Divider="divider",Qt.Heading="heading",Qt.Panel="panel",Qt.Spinner="spinner",Qt.Text="text",Qt.Image="image",Qt.Row="row",Qt.Address="address",Qt.Button="button",Qt.Input="input",Qt.Form="form",Qt),te=P({type:j()}),ee=b(te,P({value:$()})),ne=b(ee,P({type:w("address"),value:$t})),re=Ht("address",ne,["value"]),ie=b(ee,P({type:w("copyable"),value:j(),sensitive:A(E())})),se=Ht("copyable",ie,["value","sensitive"]),ae=b(te,P({type:w("divider")})),oe=(Ht("divider",ae),b(ee,P({type:w("heading"),value:j()}))),ue=Ht("heading",oe,["value"]);var ce,le,de,pe,fe=b(te,P({type:w("image"),value:R(j(),"SVG",(t=>!!Yt(t)||"Value is not a valid SVG."))})),he=(Ht("image",fe,["value"]),(ce=he||{}).Primary="primary",ce.Secondary="secondary",ce),ge=((le=ge||{}).Button="button",le.Submit="submit",le),me=b(ee,P({type:w("button"),value:j(),variant:A(k([Wt("primary"),Wt("secondary")])),buttonType:A(k([Wt("button"),Wt("submit")])),name:A(j())})),ve=Ht("button",me,["value","buttonType","name","variant"]),be=((de=be||{}).Text="text",de.Number="number",de.Password="password",de),ye=b(ee,P({type:w("input"),value:A(j()),name:j(),inputType:A(k([Wt("text"),Wt("password"),Wt("number")])),placeholder:A(j()),label:A(j()),error:A(j())})),xe=Ht("input",ye,["name","inputType","placeholder","value","label"]),Ne=k([ye,me]),Ee=b(te,P({type:w("form"),children:N(Ne),name:j()})),we=Ht("form",Ee,["name","children"]),Oe=b(ee,P({type:w("text"),value:j(),markdown:A(E())})),Te=Ht("text",Oe,["value","markdown"]),Se=((pe=Se||{}).Default="default",pe.Critical="critical",pe.Warning="warning",pe),Pe=k([fe,Oe,ne]),Ae=b(ee,P({type:w("row"),variant:A(k([Wt("default"),Wt("critical"),Wt("warning")])),label:j(),value:Pe})),Ie=Ht("row",Ae,["label","value","variant"]),je=b(te,P({type:w("spinner")})),Ce=(Ht("spinner",je),b(te,P({children:N(x((()=>_e)))}))),ke=b(Ce,P({type:w("panel")})),$e=Ht("panel",ke,["children"]),_e=k([ie,ae,oe,fe,ke,je,Oe,Ae,ne,ye,Ee,me]);var Fe,Re,Ve,De,Me,Le,qe=((Fe=qe||{}).Critical="critical",Fe),Be=((Re=Be||{}).ButtonClickEvent="ButtonClickEvent",Re.FormSubmitEvent="FormSubmitEvent",Re.InputChangeEvent="InputChangeEvent",Re),Ue=P({type:j(),name:A(j())}),Je=(k([b(Ue,P({type:w("ButtonClickEvent"),name:A(j())})),b(Ue,P({type:w("FormSubmitEvent"),value:I(j(),T(j())),name:j()})),b(Ue,P({type:w("InputChangeEvent"),name:j(),value:j()}))]),(Ve=Je||{}).Alert="alert",Ve.Confirmation="confirmation",Ve.Prompt="prompt",Ve),Ge=((De=Ge||{}).Base64="base64",De.Hex="hex",De.Utf8="utf8",De),Xe=((Me=Xe||{}).ClearState="clear",Me.GetState="get",Me.UpdateState="update",Me),ze=((Le=ze||{}).InApp="inApp",Le.Native="native",Le),We=I(j(),T(j()));I(j(),k([We,T(j())]));const Ye=[{name:"ERC-20",signature:"a9059cbb"},{name:"ERC-721",signature:"23b872dd"},{name:"ERC-1155",signature:"f242432a"}];async function Ze(){return await snap.request({method:"snap_createInterface",params:{ui:$e([ue("Interactive UI Example Snap"),ve({value:"Update UI",name:"update"})])}})}async function He(){var t;const e=await snap.request({method:"snap_manageState",params:{operation:Xe.GetState}});L(null===(t=e)||void 0===t?void 0:t.transaction,"No transaction found in Snap state.");const{from:n,to:r}=e.transaction;return $e([Ie("From",re(n)),Ie("To",r?re(r):Te("None")),ve({value:"See transaction type",name:"transaction-type"})])}async function Qe(t){var e;const n=await snap.request({method:"snap_manageState",params:{operation:Xe.GetState}});L(null===(e=n)||void 0===e?void 0:e.transaction,"No transaction found in Snap state.");const r=function(t){if(t&&"string"==typeof t){var e;const n=_t(t).slice(0,8);return(null===(e=Ye.find((t=>t.signature===n)))||void 0===e?void 0:e.name)??"Unknown"}return"Unknown"}(n.transaction.data);await snap.request({method:"snap_updateInterface",params:{id:t,ui:$e([Ie("Transaction type",Te(r)),ve({value:"Go back",name:"go-back"})])}})}const Ke=async({request:t})=>{switch(t.method){case"dialog":try{const t=await Ze();return await snap.request({method:"snap_manageState",params:{operation:Xe.UpdateState,newState:{interfaceId:t},encrypted:!1}}),await snap.request({method:"snap_dialog",params:{type:"confirmation",id:t}})}finally{await snap.request({method:"snap_manageState",params:{operation:Xe.ClearState,encrypted:!1}})}case"getState":{var e;const t=await snap.request({method:"snap_manageState",params:{operation:Xe.GetState,encrypted:!1}});L(null===(e=t)||void 0===e?void 0:e.interfaceId,"No interface ID found in state.");return await snap.request({method:"snap_getInterfaceState",params:{id:t.interfaceId}})}default:throw new Zt({method:t.method})}},tn=async()=>({id:await Ze()}),en=async({transaction:t})=>{await snap.request({method:"snap_manageState",params:{operation:Xe.UpdateState,newState:{transaction:t}}});return{id:await snap.request({method:"snap_createInterface",params:{ui:await He()}})}},nn=async({id:t,event:e})=>{if(e.type===Be.ButtonClickEvent)switch(e.name){case"update":await async function(t){await snap.request({method:"snap_updateInterface",params:{id:t,ui:$e([ue("Interactive UI Example Snap"),we({name:"example-form",children:[xe({name:"example-input",placeholder:"Enter something..."}),ve("Submit",ge.Submit,"submit")]})])}})}(t);break;case"transaction-type":await Qe(t);break;case"go-back":await snap.request({method:"snap_updateInterface",params:{id:t,ui:await He()}})}if(e.type===Be.FormSubmitEvent&&"example-form"===e.name){const n=e.value["example-input"];await async function(t,e){await snap.request({method:"snap_updateInterface",params:{id:t,ui:$e([ue("Interactive UI Example Snap"),Te("The submitted value is:"),se(e)])}})}(t,n??"")}}})();var i=exports;for(var s in r)i[s]=r[s];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/interactive-ui-example-snap",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "MetaMask example snap demonstrating the use of interactive UI.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,20 +30,19 @@
30
30
  "lint:dependencies": "depcheck"
31
31
  },
32
32
  "dependencies": {
33
- "@metamask/rpc-errors": "^6.1.0",
34
- "@metamask/snaps-sdk": "^2.1.0",
33
+ "@metamask/snaps-sdk": "^4.0.1",
35
34
  "@metamask/utils": "^8.3.0"
36
35
  },
37
36
  "devDependencies": {
38
37
  "@jest/globals": "^29.5.0",
39
- "@lavamoat/allow-scripts": "^3.0.2",
38
+ "@lavamoat/allow-scripts": "^3.0.3",
40
39
  "@metamask/auto-changelog": "^3.4.4",
41
40
  "@metamask/eslint-config": "^12.1.0",
42
41
  "@metamask/eslint-config-jest": "^12.1.0",
43
42
  "@metamask/eslint-config-nodejs": "^12.1.0",
44
43
  "@metamask/eslint-config-typescript": "^12.1.0",
45
- "@metamask/snaps-cli": "^5.1.0",
46
- "@metamask/snaps-jest": "^5.0.0",
44
+ "@metamask/snaps-cli": "^6.1.0",
45
+ "@metamask/snaps-jest": "^7.0.1",
47
46
  "@swc/core": "1.3.78",
48
47
  "@swc/jest": "^0.2.26",
49
48
  "@typescript-eslint/eslint-plugin": "^5.42.1",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0",
2
+ "version": "1.0.2",
3
3
  "description": "MetaMask example snap demonstrating the use of interactive UI",
4
4
  "proposedName": "Interactive UI Example Snap",
5
5
  "repository": {
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/MetaMask/snaps.git"
8
8
  },
9
9
  "source": {
10
- "shasum": "GYviPuR6+daL3dTw5GNeb8alDHJYBmc6Jf0JEJVQ5ms=",
10
+ "shasum": "hwxuorPU9EqinXS2GRl8aIDAonawqBxoeKW8xhUsG/U=",
11
11
  "location": {
12
12
  "npm": {
13
13
  "filePath": "dist/bundle.js",