PageSourceSearch

https://cdn.decentraland.org/@dcl/sites/0.70.1/assets/vendor-crypto-BM1UzVOG.js

js decentraland.org collected 2026-10-02 02:14:03 UTC 426,775 bytes, 10 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`[email protected]`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`e2a8e691-d9ed-42d4-92d9-63b2b8ca7386`,e._sentryDebugIdIdentifier=`sentry-dbid-e2a8e691-d9ed-42d4-92d9-63b2b8ca7386`)}catch{}})();import{n as e,o as t,r as n,t as r}from"./rolldown-runtime-Cpl18Eun.js";import{U as i,W as a}from"./vendor-auth-DhvMORXY.js";var o=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??(this._str=this._items.reduce((e,t)=>`${e}${t}`,``))}get names(){return this._names??(this._names=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{}))}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),s=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=o(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var s=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>
1{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),c=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=o(),n=s(),r=o();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`strConcat`,{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`getProperty`,{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`regexpCode`,{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}});var i=s();Object.defineProperty(e,`Scope`,{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,`ValueScope`,{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,`ValueScopeName`,{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,`varKinds`,{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},c=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},l=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=j(this.rhs,e,n),this}get names(){return A(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},u=class extends l{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},d=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},f=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},p=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},m=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=j(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},h=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(M(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>
1k(e,t.names),{})}},g=class extends h{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},_=class extends h{},v=class extends g{};v.kind=`else`;var y=class e extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new v(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(N(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=j(this.condition,e,t),this}get names(){let e=super.names;return A(e,this.condition),this.else&&k(e,this.else.names),e}};y.kind=`if`;var b=class extends g{};b.kind=`for`;var x=class extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=j(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}},S=class extends b{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return A(A(super.names,this.from),this.to)}},C=class extends b{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=j(this.iterable,e,t),this}get names(){return k(super.names,this.iterable.names)}},w=class extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};w.kind=`func`;var T=class extends h{render(e){return`return `+super.render(e)}};T.kind=`return`;var E=class extends g{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&k(e,this.catch.names),this.finally&&k(e,this.finally.names),e}},D=class extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};D.kind=`catch`;var O=class extends g{render(e){return`finally`+super.render(e)}};O.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
2`:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new c(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new l(e,t,n))}add(t,n){return this._leafNode(new u(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new m(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}
2if(e,t,n){if(this._blockNode(new y(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new y(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new x(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new S(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new C(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new C(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new f(e))}return(e){let t=new T;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(T)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new E;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new D(e),t(e)}return n&&(this._currNode=r.finally=new O,this.code(n)),this._endBlockNode(D,O)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new w(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof y))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function k(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function A(e,n){return n instanceof t._CodeOrName?k(e,n.names):e}function j(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function M(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function N(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${ee(e)}`}e.not=N;var P=R(e.operators.AND);function F(...e){return e.reduce(P)}e.and=F;var I=R(e.operators.OR);function L(...e){return e.reduce(I)}e.or=L;function R(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${ee(n)} ${e} ${ee(r)}`}function ee(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),l=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=c(),n=o();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!s(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||C(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=s;function l(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=l;function u({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=u;function d(e){return m(decodeURIComponent(e))}e.unescapeFragment=d;function f(e){return encodeURIComponent(p(e))}e.escapeFragment=f;function p(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=p;function m(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=m;function h(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=h;function g({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}
2){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:g({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),v(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:_}),items:g({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function _(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&v(e,r,n),r}e.evaluatedPropsToName=_;function v(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=v;var y={};function b(e,t){return e.scopeValue(`func`,{ref:t,code:y[t.code]||(y[t.code]=new n._Code(t.code))})}e.useFunc=b;var x;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(x||(e.Type=x={}));function S(e,n,r){if(e instanceof t.Name){let i=n===x.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+p(e)}e.getErrorPath=S;function C(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=C})),u=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),d=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=c(),n=l(),r=u();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:c,allErrors:l}=o,u=m(n,r,i);a??(c||l)?d(s,u):f(o,(0,t._)`[${u}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:c}=a;d(o,m(t,n,i)),s||c||f(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function d(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function f(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}
2var p={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function m(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:h(e,n,r)}function h(e,t,n={}){let{gen:r,it:i}=e,a=[g(i,n),_(e,n)];return v(e,t,a),r.object(...a)}function g({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function _({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[p.schemaPath,o]}function v(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:u,propertyName:d,topSchemaRef:f,schemaPath:m}=l;a.push([p.keyword,o],[p.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),u.messages&&a.push([p.message,typeof i==`function`?i(e):i]),u.verbose&&a.push([p.schema,c],[p.parentSchema,(0,t._)`${f}${m}`],[r.default.data,s]),d&&a.push([p.propertyName,d])}})),f=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=d(),n=c(),r=u(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),p=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),m=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),h=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=p(),n=m(),r=d(),i=c(),a=l(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=u(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function u(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=u;function f(e,t){let{gen:r,data:i,opts:a}=e,s=g(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=b(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?_(e,t,s):S(e)})}return c}e.coerceAndCheckDataType=f;var h=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function g(e,t){return t?e.filter(e=>h.has(e)||t===`array`&&e===`array`):[]}function _(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(b(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(h.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),S(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),v(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
3              || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
4              || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a}
4 === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
5              || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function v({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function y(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=y;function b(e,t,n,r){if(e.length===1)return y(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,y(e,t,n,r));return o}e.checkDataTypes=b;var x={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function S(e){let t=C(e);(0,r.reportError)(t,x)}e.reportTypeError=S;function C(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),g=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assignDefaults=void 0;var t=c(),n=l();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),_=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=c(),n=l(),r=u(),i=l();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(m(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(m(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function d(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=d;function f(e,n,r){return(0,t._)`${d(e)}.call(${n}, ${r})`}e.isOwnProperty=f;function p(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${f(e,n,r)}`:a}e.propertyInData=p;function m(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(f(e,n,r))):a}e.noPropertyInData=m;function h(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=h;function g(e,t){return h(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=g;function _({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=_;var v=(0,t._)`new RegExp`;function y({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?v:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=y;function b(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=b;function x(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=x})),v=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=c(),n=u(),r=_(),i=d();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=p(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let u=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:c,parentSchema:u,$data:d,it:m}=e;f(m,i);let h=p(a,o,!d&&i.compile?i.compile.call(m.self,c,u,m):i.validate),g=
5a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>l(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!d||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function l(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function f({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function p(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function m(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=m;function h({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=h})),y=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=c(),n=l();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),b=r(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),x=r(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else (p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),S=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=l(),n=b(),r=x(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function u(e,t=``,n){return n!==!1&&(t=p(t)),d(e,e.parse(t))}e.getFullPath=u;function d(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=d;var f=/#\/?$/;function p(e){return e?e.replace(f,``):``}e.normalizeId=p;function m(e,t,n){return n=p(n),e.resolve(t,n)}e.resolveUrl=m;var h=/^[a-z_][-a-z0-9._]*$/i;function g(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=p(e[i]||t),s={"":o},c=u(a,o,!1),l={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=u.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function u(t){let n=this.opts.uriResolver.resolve;if(t=p(o?n(o,t):t),d.has(t))throw m(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?f(e,r.schema,t):t!==p(a)&&(t[0]===`#`?(f(e,l[t],t),l[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!h.test(e))throw Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}}),l;function f(e,t,r){if(t!==void 0&&!n(e,t))throw m(r)}function m(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=g})),C=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=f(),n=h(),r=m(),i=h(),a=g(),o=v(),s=y(),p=c(),_=u(),b=S(),x=l(),C=d();function w(e){if(N(e)&&(F(e),M(e))){O(e);return}T(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=w;function T({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,p._)`${_.default.data}, ${_.default.valCxt}`,r.$async,()=>{e.code((0,p._)`"use strict"; ${A(n,i)}`),D(e,i),e.code(a)}):e.func(t,(0,p._)`${_.default.data}, ${E(i)}`,r.$async,()=>e.code(A(n,i)).code(a))}function E(e){return(0,p._)`{${_.default.instancePath}="", ${_.default.parentData}, ${_.default.parentDataProperty}, ${_.default.rootData}=${_.default.data}${e.dynamicRef?(0,p._)`, ${_.default.dynamicAnchors}={}`:p.nil}}={}`}
5function D(e,t){e.if(_.default.valCxt,()=>{e.var(_.default.instancePath,(0,p._)`${_.default.valCxt}.${_.default.instancePath}`),e.var(_.default.parentData,(0,p._)`${_.default.valCxt}.${_.default.parentData}`),e.var(_.default.parentDataProperty,(0,p._)`${_.default.valCxt}.${_.default.parentDataProperty}`),e.var(_.default.rootData,(0,p._)`${_.default.valCxt}.${_.default.rootData}`),t.dynamicRef&&e.var(_.default.dynamicAnchors,(0,p._)`${_.default.valCxt}.${_.default.dynamicAnchors}`)},()=>{e.var(_.default.instancePath,(0,p._)`""`),e.var(_.default.parentData,(0,p._)`undefined`),e.var(_.default.parentDataProperty,(0,p._)`undefined`),e.var(_.default.rootData,_.default.data),t.dynamicRef&&e.var(_.default.dynamicAnchors,(0,p._)`{}`)})}function O(e){let{schema:t,opts:n,gen:r}=e;T(e,()=>{n.$comment&&t.$comment&&ne(e),R(e),r.let(_.default.vErrors,null),r.let(_.default.errors,0),n.unevaluated&&k(e),I(e),re(e)})}function k(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,p._)`${n}.evaluated`),t.if((0,p._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,p._)`${e.evaluated}.props`,(0,p._)`undefined`)),t.if((0,p._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,p._)`${e.evaluated}.items`,(0,p._)`undefined`))}function A(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,p._)`/*# sourceURL=${n} */`:p.nil}function j(e,n){if(N(e)&&(F(e),M(e))){P(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function M({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function N(e){return typeof e.schema!=`boolean`}function P(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&ne(e),ee(e),te(e);let a=r.const(`_errs`,_.default.errors);I(e,a),r.var(t,(0,p._)`${a} === ${_.default.errors}`)}function F(e){(0,x.checkUnknownRules)(e),L(e)}function I(e,t){if(e.opts.jtd)return B(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);B(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function L(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,x.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function R(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,x.checkStrictMode)(e,`default is ignored in the schema root`)}function ee(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,b.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function te(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function ne({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,p._)`${_.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,p.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,p._)`${_.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function re(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,p._)`${_.default.errors} === 0`,()=>t.return(_.default.data),()=>t.throw((0,p._)`new ${i}(${_.default.vErrors})`)):(t.assign((0,p._)`${r}.errors`,_.default.vErrors),a.unevaluated&&z(e),t.return((0,p._)`${_.default.errors} === 0`))}function z({gen:e,evaluated:t,props:n,items:r}){n instanceof p.Name&&e.assign((0,p._)`${t}.props`,n),r instanceof p.Name&&e.assign((0,p._)`${t}.items`,r)}function B(e,t,n,a){let{gen:o,schema:s,data:c,allErrors:l,opts:u,self:d}=e,{RULES:f}=d;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,x.schemaHasRulesButRef)(s,f))){o.block(()=>le(e,`$ref`,f.all.$ref.definition));return}u.jtd||ie(e,t),o.block(()=>{for(let e of f.rules)m(e);m(f.post)});function m(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,c,u.strictNumbers)),V(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):V(e,d),l||o.if((0,p._)`${_.default.errors} === ${a||0}`))}}function V(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&le(e,n.keyword,n.definition,t.type)})}function ie(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(H(e,t),e.opts.allowUnionTypes||U(e,t),W(e,e.dataTypes))}function H(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{G(e.dataTypes,t)||se(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),oe(e,t)}}function U(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&se(e,`use allowUnionTypes to allow union type keyword`)}function W(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>ae(t,e))&&se(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function ae(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function G(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function oe(e,t){let n=[];for(let r of e.dataTypes)G(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}
5function se(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,x.checkStrictMode)(e,t,e.opts.strictTypes)}var ce=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,x.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,fe(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,_.default.errors))}result(e,t,n){this.failResult((0,p.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,p.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,p._)`${t} !== undefined && (${(0,p.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?C.reportExtraError:C.reportError)(this,this.def.error,t)}$dataError(){(0,C.reportError)(this,this.def.$dataError||C.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,C.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=p.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=p.nil,t=p.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,p.or)((0,p._)`${r} === undefined`,t)),e!==p.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==p.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,p.or)(o(),s());function o(){if(n.length){if(!(t instanceof p.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,p._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return p.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,p._)`!${n}(${t})`}return p.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return j(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=x.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=x.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,p.Name)),!0}};e.KeywordCxt=ce;function le(e,t,n,r){let i=new ce(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var ue=/^\/(?:[^~]|~0|~1)*$/,de=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fe(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return _.default.rootData;if(e[0]===`/`){if(!ue.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=_.default.rootData}else{let o=de.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(c(`property/index`,s));return r[t-s]}if(s>t)throw Error(c(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,p._)`${a}${(0,p.getProperty)((0,x.unescapeJsonPointer)(e))}`,o=(0,p._)`${o} && ${a}`);return o;function c(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=fe})),w=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}
5),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),T=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=S();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),E=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=c(),n=w(),r=u(),i=S(),a=l(),o=C(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function d(e){let a=m.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,d=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),f;e.$async&&(f=d.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let p=d.scopeName(`validate`);e.validateName=p;let h={gen:d,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),d.optimize(this.opts.code.optimize);let n=d.toString();g=`${d.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(p,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:p,validateCode:n,scopeValues:d._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=d;function f(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=g.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=p.call(this,a)}e.resolveRef=f;function p(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function m(e){for(let t of this._compilations)if(h(t,e))return t}e.getCompilingSchema=m;function h(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function g(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||_.call(this,e,t)}function _(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return y.call(this,n,e);let o=(0,i.normalizeId)(r),c=this.refs[o]||this.schemas[o];if(typeof c==`string`){let t=_.call(this,e,c);return typeof t?.schema==`object`?y.call(this,n,t):void 0}if(typeof c?.schema==`object`){if(c.validate||d.call(this,c),o===(0,i.normalizeId)(t)){let{schema:t}=c,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}
5return y.call(this,n,c)}}e.resolveSchema=_;var v=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function y(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!v.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=_.call(this,r,e)}let{schemaId:c}=this.opts;if(o=o||new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),D=n({$id:()=>O,additionalProperties:()=>!1,default:()=>N,description:()=>k,properties:()=>M,required:()=>j,type:()=>A}),O,k,A,j,M,N,P=e((()=>{O=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,k=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,A=`object`,j=[`$data`],M={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},N={$id:O,description:k,type:A,required:j,properties:M,additionalProperties:!1}})),F=r(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=s(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function d(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,c=u;for(let s=0;s<e.length;s++){let u=e[s];if(!(u===`[`||u===`]`))if(u===`:`){if(a===!0&&(o=!0),!c(i,r,n))break;if(++t>7){n.error=!0;break}s>0&&e[s-1]===`:`&&(a=!0),r.push(`:`);continue}else if(u===`%`){if(!c(i,r,n))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?n.zone=i.join(``):o?r.push(i.join(``)):r.push(s(i))),n.address=r.join(``),n}function f(e){if(p(e,`:`)<2)return{host:e,isIPV6:!1};let t=d(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function p(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function m(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}
5else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var h={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},g=/[@/?#:]/g,_=/[@/?#]/g;function v(e,t){let n=t?_:g;return n.lastIndex=0,e.replace(n,e=>h[e])}function y(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function b(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}o(e[n])?t+=e[n]:t+=escape(e[n])}return t}function x(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function S(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=f(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:v(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:c,recomposeAuthority:S,reescapeHostDelimiters:v,normalizePercentEncoding:y,normalizePathEncoding:b,escapePreservingEscapes:x,removeDotSegments:m,isIPv4:r,isUUID:n,normalizeIPv6:f,stringArrayToHexStripped:s}})),I=r(((e,t)=>{var{isUUID:n}=F(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||(e.path=`/`),e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),L=r(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=F(),{SCHEMES:d,getSchemeHandler:f}=I();function p(e,t){return typeof e==`string`?e=S(e,t):typeof e==`object`&&(e=x(_(e,t),t)),e}
5function m(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=h(x(e,r),x(t,r),r,!0);return r.skipEscape=!0,_(i,r)}function h(e,t,n,i){let a={};return i||(e=x(_(e,n),n),t=x(_(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function g(e,t,n){let r=w(e,n),i=w(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function _(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[],l=f(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=s(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&c.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(u),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,n.query),n.fragment!==void 0&&c.push(`#`,n.fragment),c.join(``)}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function b(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,s=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let d=e.match(v);if(d){i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||``,i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]);let t=y(i,d);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(l(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let p=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&i.host&&(r.domainHost||p&&p.domainHost)&&s===!1&&u(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}if((!p||p&&!p.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=c(unescape(i.host),s))),i.path&&(i.path=o(i.path)),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||`URI malformed`}p&&p.parse&&p.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function x(e,t){return b(e,t).parsed}function S(e,t){return C(e,t).normalized}function C(e,t){let{parsed:n,malformedAuthorityOrPort:r}=b(e,t);return{normalized:r?e:_(n,t),malformedAuthorityOrPort:r}}function w(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=C(e,t);return r?void 0:n}if(typeof e==`object`)return _(e,t)}
5var T={SCHEMES:d,normalize:p,resolve:m,resolveComponent:h,equal:g,serialize:_,parse:x};t.exports=T,t.exports.default=T,t.exports.fastUri=T})),R=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=L();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),ee=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var n=C();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return n.KeywordCxt}});var r=c();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return r.CodeGen}});var i=w(),a=T(),o=p(),s=E(),u=c(),d=S(),f=h(),m=l(),g=(P(),t(D).default),_=R(),v=(e,t)=>new RegExp(e,t);v.code=`new RegExp`;var y=[`removeAdditional`,`useDefaults`,`coerceTypes`],b=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),x={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},O={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},k=200;function A(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??v,a=e.uriResolver??_.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??k,loopEnum:e.loopEnum??k,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var j=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...A(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:b,es5:t,lines:n}),this.logger=ne(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,o.getRules)(),M.call(this,x,e,`NOT SUPPORTED`),M.call(this,O,e,`DEPRECATED`,`warn`),this._metaOpts=ee.call(this),e.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&L.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),F.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=g;n===`id`&&(r={...g},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await i.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function i(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await i.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;
5if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=N.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new s.SchemaEnv({schema:{},schemaId:n});if(t=s.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=N.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,d.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(z.call(this,n,t),!t)return(0,m.eachItem)(n,e=>B.call(this,e)),this;ie.call(this,t);let r={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,m.eachItem)(n,r.type.length===0?e=>B.call(this,e,r):e=>r.type.forEach(t=>B.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=U(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:o}=this.opts;if(typeof e==`object`)a=e[o];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let c=this._cache.get(e);if(c!==void 0)return c;n=(0,d.normalizeId)(a||n);let l=d.getSchemaRefs.call(this,e,n);return c=new s.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:l}),this._cache.set(c.schema,c),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=c),r&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):s.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,e)}finally{this.opts=t}}};j.ValidationError=i.default,j.MissingRefError=a.default,e.default=j;function M(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function N(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function F(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function I(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function L(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function ee(){let e={...this.opts};for(let t of y)delete e[t];return e}var te={log(){},warn(){},error(){}};function ne(e){if(e===!1)return te;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var re=/^[a-z_$][a-z0-9_$:-]*$/i;function z(e,t){let{RULES:n}=this;if((0,m.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!re.test(e))throw Error(`Keyword ${e}
5 has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function B(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?V.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function V(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function ie(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=U(t)),e.validateSchema=this.compile(t,!0))}var H={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function U(e){return{anyOf:[e,H]}}})),te=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),ne=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callRef=e.getValidate=void 0;var t=T(),n=_(),r=c(),i=u(),a=E(),o=l(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:c,validateName:l,opts:u,self:p}=o,{root:m}=c;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(c===m)return f(e,l,c,c.$async);let t=n.scopeValue(`root`,{ref:m});return f(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){f(e,d(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,u.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function d(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=d;function f(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=f,e.default=s})),re=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=te(),n=ne();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),z=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}}
5)),B=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),V=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),ie=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=l(),r=V();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),H=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=_(),n=l(),r=c();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),U=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),W=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=_(),n=c(),r=l();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),ae=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`}
5,code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),G=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=b();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),oe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=h(),n=c(),r=l(),i=G();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),se=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=l(),r=G();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),ce=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=l(),r=G();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??(d=(0,n.useFunc)(i,r.default)),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),le=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=z(),n=B(),r=ie(),i=H(),a=U(),o=W(),s=ae(),c=oe(),l=se(),u=ce();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),ue=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateAdditionalItems=void 0;var t=c(),n=l(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),de=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateTuple=void 0;var t=c(),n=l(),r=_(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);
5i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),fe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=de();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),pe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=l(),r=_(),i=ue();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),me=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=l();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),he=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=c(),n=l(),r=_();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
6    missingProperty: ${i},
7    depsCount: ${n},
8    deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),ge=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=l();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`}
8,code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),_e=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=_(),n=c(),r=u(),i=l();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),ve=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=C(),n=_(),r=l(),i=_e();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),ye=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=_(),n=c(),r=l(),i=l();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),be=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=l();
8e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),xe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:_().validateUnion,error:{message:`must match a schema in anyOf`}}})),Se=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=l();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Ce=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=l();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),we=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=l(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Te=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=l();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Ee=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=ue(),n=fe(),r=de(),i=pe(),a=me(),o=he(),s=ge(),c=_e(),l=ve(),u=ye(),d=be(),f=xe(),p=Se(),m=Ce(),h=we(),g=Te();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),De=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());
8function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Oe=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=[De().default]})),K=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),ke=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=re(),n=le(),r=Ee(),i=Oe(),a=K();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Ae=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),je=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=c(),n=Ae(),r=E(),i=T(),a=l();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(t||o(c)),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),Me=n({$id:()=>Pe,$schema:()=>Ne,default:()=>ze,definitions:()=>Ie,properties:()=>Re,title:()=>Fe,type:()=>Le}),Ne,Pe,Fe,Ie,Le,Re,ze,Be=e((()=>{Ne=`http://json-schema.org/draft-07/schema#`,Pe=`http://json-schema.org/draft-07/schema#`,Fe=`Core schema meta-schema`,Ie={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},Le=[`object`,`boolean`],Re={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},ze={$schema:Ne,$id:Pe,title:Fe,definitions:Ie,type:Le,properties:Re,default:!0}}
8)),Ve=r(((e,n)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var r=ee(),i=ke(),a=je(),o=(Be(),t(Me).default),s=[`/properties`],l=`http://json-schema.org/draft-07/schema`,u=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(e,l,!1),this.refs[`http://json-schema.org/schema`]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}};e.Ajv=u,n.exports=e=u,n.exports.Ajv=u,Object.defineProperty(e,`__esModule`,{value:!0}),e.default=u;var d=C();Object.defineProperty(e,`KeywordCxt`,{enumerable:!0,get:function(){return d.KeywordCxt}});var f=c();Object.defineProperty(e,`_`,{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,`str`,{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,`nil`,{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,`Name`,{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,`CodeGen`,{enumerable:!0,get:function(){return f.CodeGen}});var p=w();Object.defineProperty(e,`ValidationError`,{enumerable:!0,get:function(){return p.default}});var m=T();Object.defineProperty(e,`MissingRefError`,{enumerable:!0,get:function(){return m.default}})})),He=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=c(),r=[`undefined`,`string`,`number`,`object`,`function`,`boolean`,`symbol`];function i(){return{keyword:`typeof`,schemaType:[`string`,`array`],code(e){let{data:t,schema:r,schemaValue:i}=e;e.fail(typeof r==`string`?(0,n._)`typeof ${t} != ${r}`:(0,n._)`${i}.indexOf(typeof ${t}) < 0`)},metaSchema:{anyOf:[{type:`string`,enum:r},{type:`array`,items:{type:`string`,enum:r}}]}}}e.default=i,t.exports=i})),Ue=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(He()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),We=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer<`u`&&(n.Buffer=Buffer),typeof Promise<`u`&&(n.Promise=Promise);var r=Object.assign(i,{CONSTRUCTORS:n});function i(){return{keyword:`instanceof`,schemaType:[`string`,`array`],compile(e){if(typeof e==`string`){let t=a(e);return e=>e instanceof t}if(Array.isArray(e)){let t=e.map(a);return e=>{for(let n of t)if(e instanceof n)return!0;return!1}}throw Error(`ajv implementation error`)},metaSchema:{anyOf:[{type:`string`},{type:`array`,items:{type:`string`}}]}}}function a(e){let t=n[e];if(t)return t;throw Error(`invalid "instanceof" keyword value ${e}`)}e.default=r,t.exports=r})),Ge=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(We()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),Ke=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){return()=>({keyword:e,type:`number`,schemaType:`array`,macro:function([n,r]){return t(n,r),e===`range`?{minimum:n,maximum:r}:{exclusiveMinimum:n,exclusiveMaximum:r}},metaSchema:{type:`array`,minItems:2,maxItems:2,items:{type:`number`}}});function t(t,n){if(t>n||e===`exclusiveRange`&&t===n)throw Error(`There are no numbers in range`)}}e.default=t})),qe=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=(0,n(Ke()).default)(`range`);e.default=r,t.exports=r})),Je=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(qe()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),Ye=r(((e,t)=>
8{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=(0,n(Ke()).default)(`exclusiveRange`);e.default=r,t.exports=r})),Xe=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(Ye()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),Ze=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.usePattern=e.metaSchemaRef=void 0;var t=c(),n=`http://json-schema.org/schema`;function r({defaultMeta:e}={}){return e===!1?{}:{$ref:e||n}}e.metaSchemaRef=r;function i({gen:e,it:{opts:n}},r,i=n.unicodeRegExp?`u`:``){let a=new RegExp(r,i);return e.scopeValue(`pattern`,{key:a.toString(),ref:a,code:(0,t._)`new RegExp(${r}, ${i})`})}e.usePattern=i})),Qe=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=c(),r=Ze(),i={type:`object`,properties:{pattern:{type:`string`},flags:{type:`string`,nullable:!0}},required:[`pattern`],additionalProperties:!1},a=/^\/(.*)\/([gimuy]*)$/;function o(){return{keyword:`regexp`,type:`string`,schemaType:[`string`,`object`],code(e){let{data:t,schema:i}=e,o=s(i);e.pass((0,n._)`${o}.test(${t})`);function s(t){if(typeof t==`object`)return(0,r.usePattern)(e,t.pattern,t.flags);let n=a.exec(t);if(n)return(0,r.usePattern)(e,n[1],n[2]);throw Error(`cannot parse string into RegExp`)}},metaSchema:{anyOf:[{type:`string`},i]}}}e.default=o,t.exports=o})),$e=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(Qe()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),et=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=c(),r={trimStart:e=>e.trimStart(),trimEnd:e=>e.trimEnd(),trimLeft:e=>e.trimStart(),trimRight:e=>e.trimEnd(),trim:e=>e.trim(),toLowerCase:e=>e.toLowerCase(),toUpperCase:e=>e.toUpperCase(),toEnumCase:(e,t)=>t?.hash[s(e)]||e},i=Object.assign(a,{transform:r});function a(){return{keyword:`transform`,schemaType:`array`,before:`enum`,code(e){let{gen:t,data:i,schema:a,parentSchema:s,it:c}=e,{parentData:l,parentDataProperty:u}=c,d=a;if(!d.length)return;let f;if(d.includes(`toEnumCase`)){let e=o(s);f=t.scopeValue(`obj`,{ref:e,code:(0,n.stringify)(e)})}t.if((0,n._)`typeof ${i} == "string" && ${l} !== undefined`,()=>{t.assign(i,p(d.slice())),t.assign((0,n._)`${l}[${u}]`,i)});function p(e){if(!e.length)return i;let a=e.pop();if(!(a in r))throw Error(`transform: unknown transformation ${a}`);let o=t.scopeValue(`func`,{ref:r[a],code:(0,n._)`require("ajv-keywords/dist/definitions/transform").transform${(0,n.getProperty)(a)}`}),s=p(e);return f&&a===`toEnumCase`?(0,n._)`${o}(${s}, ${f})`:(0,n._)`${o}(${s})`}},metaSchema:{type:`array`,items:{type:`string`,enum:Object.keys(r)}}}}function o(e){let t={hash:{}};if(!e.enum)throw Error(`transform: "toEnumCase" requires "enum"`);for(let n of e.enum){if(typeof n!=`string`)continue;let e=s(n);if(t.hash[e])throw Error(`transform: "toEnumCase" requires all lowercased "enum" values to be unique`);t.hash[e]=n}return t}function s(e){return e.toLowerCase()}e.default=i,t.exports=i})),tt=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(et()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),nt=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=b(),r=[`number`,`integer`,`string`,`boolean`,`null`];function i(){return{keyword:`uniqueItemProperties`,type:`array`,schemaType:`array`,compile(e,t){let r=a(e,t);return t=>{if(t.length<=1)return!0;for(let i=0;i<e.length;i++){let a=e[i];if(r[i]){let e={};for(let n of t){if(!n||typeof n!=`object`)continue;let t=n[a];if(!(t&&typeof t==`object`)){if(typeof t==`string`&&(t=`"`+t),e[t])return!1;e[t]=!0}}}else for(let e=t.length;e--;){let r=t[e];if(!(!r||typeof r!=`object`))for(let i=e;i--;){let e=t[i];if(e&&typeof e==`object`&&n(r[a],e[a]))return!1}}}return!0}},metaSchema:{type:`array`,items:{type:`string`}}}}e.default=i;function a(e,t){return e.map(e=>{let n=t.items?.properties?.[e]?.type;return Array.isArray(n)?!n.includes(`object`)&&!n.includes(`array`):r.includes(n)})}t.exports=i})),rt=r(((e,t)=>
8{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(nt()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),it=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});function n(){return{keyword:`allRequired`,type:`object`,schemaType:`boolean`,macro(e,t){if(!e)return!0;let n=Object.keys(t.properties);return n.length===0?!0:{required:n}},dependencies:[`properties`]}}e.default=n,t.exports=n})),at=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(it()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),ot=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(e){return()=>({keyword:e,type:`object`,schemaType:`array`,macro(t){return t.length===0?!0:t.length===1?{required:t}:{[e===`anyRequired`?`anyOf`:`oneOf`]:t.map(e=>({required:[e]}))}},metaSchema:{type:`array`,items:{type:`string`}}})}e.default=t})),st=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=(0,n(ot()).default)(`anyRequired`);e.default=r,t.exports=r})),ct=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(st()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),lt=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=(0,n(ot()).default)(`oneRequired`);e.default=r,t.exports=r})),ut=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(lt()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),dt=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=c(),r=Ze(),i={message:({params:{missingPattern:e}})=>(0,n.str)`should have property matching pattern '${e}'`,params:({params:{missingPattern:e}})=>(0,n._)`{missingPattern: ${e}}`};function a(){return{keyword:`patternRequired`,type:`object`,schemaType:`array`,error:i,code(e){let{gen:t,schema:i,data:a}=e;if(i.length===0)return;let o=t.let(`valid`,!0);for(let e of i)s(e);function s(i){let s=t.let(`matched`,!1);t.forIn(`key`,a,a=>{t.assign(s,(0,n._)`${(0,r.usePattern)(e,i)}.test(${a})`),t.if(s,()=>t.break())}),e.setParams({missingPattern:i}),t.assign(o,(0,n.and)(o,s)),e.pass(o)}},metaSchema:{type:`array`,items:{type:`string`,format:`regex`},uniqueItems:!0}}}e.default=a,t.exports=a})),ft=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(dt()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),pt=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});function n(){return{keyword:`prohibited`,type:`object`,schemaType:`array`,macro:function(e){return e.length===0?!0:e.length===1?{not:{required:e}}:{not:{anyOf:e.map(e=>({required:[e]}))}}},metaSchema:{type:`array`,items:{type:`string`}}}}e.default=n,t.exports=n})),mt=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(pt()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),ht=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=Ze();function r(e){return{keyword:`deepProperties`,type:`object`,schemaType:`object`,macro:function(e){let t=[];for(let n in e)t.push(i(n,e[n]));return{allOf:t}},metaSchema:{type:`object`,propertyNames:{type:`string`,format:`json-pointer`},additionalProperties:(0,n.metaSchemaRef)(e)}}}e.default=r;function i(e,t){let n=e.split(`/`),r={},i=r;for(let e=1;e<n.length;e++){let r=n[e],o=e===n.length-1;r=a(r);let s=i.properties={},c;if(/[0-9]+/.test(r)){let e=+r;for(c=i.items=[],i.type=[`object`,`array`];e--;)c.push({})}else i.type=`object`;i=o?t:{},s[r]=i,c&&c.push(i)}return r}function a(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}t.exports=r})),q=r(((e,t)=>
8{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(ht()),i=(e,t)=>e.addKeyword((0,r.default)(t));e.default=i,t.exports=i})),J=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=c();function r(){return{keyword:`deepRequired`,type:`object`,schemaType:`array`,code(e){let{schema:t,data:r}=e,a=t.map(e=>(0,n._)`(${o(e)}) === undefined`);e.fail((0,n.or)(...a));function o(e){if(e===``)throw Error(`empty JSON pointer not allowed`);let t=e.split(`/`),a=r,o=t.map((e,t)=>t?a=(0,n._)`${a}${(0,n.getProperty)(i(e))}`:a);return(0,n.and)(...o)}},metaSchema:{type:`array`,items:{type:`string`,format:`json-pointer`}}}}e.default=r;function i(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}t.exports=r})),Y=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(J()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),X=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n={},r={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:e=>{let t=e?.max??2;return()=>Math.floor(Math.random()*t)},seq:e=>{let t=e?.name??``;return n[t]||(n[t]=0),()=>n[t]++}},i=Object.assign(a,{DEFAULTS:r});function a(){return{keyword:`dynamicDefaults`,type:`object`,schemaType:[`string`,`object`],modifying:!0,valid:!0,compile(e,t,n){if(!n.opts.useDefaults||n.compositeRule)return()=>!0;let r={};for(let t in e)r[t]=o(e[t]);let i=n.opts.useDefaults===`empty`;return t=>{for(let n in e)(t[n]===void 0||i&&(t[n]===null||t[n]===``))&&(t[n]=r[n]());return!0}},metaSchema:{type:`object`,additionalProperties:{anyOf:[{type:`string`},{type:`object`,additionalProperties:!1,required:[`func`,`args`],properties:{func:{type:`string`},args:{type:`object`}}}]}}}}function o(e){return typeof e==`object`?s(e):c(e)}function s({func:e,args:t}){let n=r[e];return l(e,n),n(t)}function c(e=``){let t=r[e];return l(e,t),t()}function l(e,t){if(!t)throw Error(`invalid "dynamicDefaults" keyword property value: ${e}`)}e.default=i,t.exports=i})),gt=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(X()),i=e=>e.addKeyword((0,r.default)());e.default=i,t.exports=i})),_t=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=c(),r=Ze(),i={message:({params:{schemaProp:e}})=>e?(0,n.str)`should match case "${e}" schema`:(0,n.str)`should match default case schema`,params:({params:{schemaProp:e}})=>e?(0,n._)`{failingCase: ${e}}`:(0,n._)`{failingDefault: true}`};function a(e){let t=(0,r.metaSchemaRef)(e);return[{keyword:`select`,schemaType:[`string`,`number`,`boolean`,`null`],$data:!0,error:i,dependencies:[`selectCases`],code(e){let{gen:t,schemaCode:r,parentSchema:i}=e;e.block$data(n.nil,()=>{let a=t.let(`valid`,!0),o=t.name(`_valid`),s=t.const(`value`,(0,n._)`${r} === null ? "null" : ${r}`);t.if(!1);for(let r in i.selectCases){e.setParams({schemaProp:r}),t.elseIf((0,n._)`"" + ${s} == ${r}`);let i=e.subschema({keyword:`selectCases`,schemaProp:r},o);e.mergeEvaluated(i,n.Name),t.assign(a,o)}if(t.else(),i.selectDefault!==void 0){e.setParams({schemaProp:void 0});let r=e.subschema({keyword:`selectDefault`},o);e.mergeEvaluated(r,n.Name),t.assign(a,o)}t.endIf(),e.pass(a)})}},{keyword:`selectCases`,dependencies:[`select`],metaSchema:{type:`object`,additionalProperties:t}},{keyword:`selectDefault`,dependencies:[`select`,`selectCases`],metaSchema:t}]}e.default=a,t.exports=a})),Z=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(_t()),i=(e,t)=>((0,r.default)(t).forEach(t=>e.addKeyword(t)),e);e.default=i,t.exports=i})),Q=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(Ue()),i=n(Ge()),a=n(Je()),o=n(Xe()),s=n($e()),c=n(tt()),l=n(rt()),u=n(at()),d=n(ct()),f=n(ut()),p=n(ft()),m=n(mt()),h=n(q()),g=n(Y()),_=n(gt()),v=n(Z()),y={typeof:r.default,instanceof:i.default,range:a.default,exclusiveRange:o.default,regexp:s.default,transform:c.default,uniqueItemProperties:l.default,allRequired:u.default,anyRequired:d.default,oneRequired:f.default,pattern
8Required:p.default,prohibited:m.default,deepProperties:h.default,deepRequired:g.default,dynamicDefaults:_.default,select:v.default};e.default=y,t.exports=y})),vt=r(((e,t)=>{var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0});var r=n(Q()),i=(e,t)=>{if(Array.isArray(t)){for(let n of t)a(n)(e);return e}if(t)return a(t)(e),e;for(t in r.default)a(t)(e);return e};i.get=a;function a(e){let t=r.default[e];if(!t)throw Error(`Unknown keyword `+e);return t}e.default=i,t.exports=i,t.exports.default=i})),yt=r(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=Ve(),r=c(),i=o(),a=C(),s=d(),l=u(),f=`errorMessage`,p=new n.Name(`emUsed`),m={required:`missingProperty`,dependencies:`property`,dependentRequired:`property`},h=/\$\{[^}]+\}/,g=/\$\{([^}]+)\}/g,_=/^""\s*\+\s*|\s*\+\s*""$/g;function v(e){return{keyword:f,schemaType:[`string`,`object`],post:!0,code(t){let{gen:o,data:c,schema:u,schemaValue:d,it:v}=t;if(v.createErrors===!1)return;let y=u,b=r.strConcat(l.default.instancePath,v.errorPath);o.if(n._`${l.default.errors} > 0`,()=>{if(typeof y==`object`){let[e,t]=S(y);t&&C(t),e&&w(e),T(x(y))}let t=typeof y==`string`?y:y._;t&&E(t),e.keepErrors||D()});function x({properties:e,items:t}){let n={};if(e){n.props={};for(let t in e)n.props[t]=[]}if(t){n.items={};for(let e=0;e<t.length;e++)n.items[e]=[]}return n}function S(e){let t,n;for(let r in e){if(r===`properties`||r===`items`)continue;let i=e[r];if(typeof i==`object`){t||(t={});let e=t[r]={};for(let t in i)e[t]=[]}else n||(n={}),n[r]=[]}return[t,n]}function C(r){let i=o.const(`emErrors`,n.stringify(r)),a=o.const(`templates`,j(r,u));o.forOf(`err`,l.default.vErrors,e=>o.if(O(e,i),()=>o.code(n._`${i}[${e}.keyword].push(${e})`).assign(n._`${e}.${p}`,!0)));let{singleError:c}=e;if(c){let e=o.let(`message`,n._`""`),r=o.let(`paramsErrors`,n._`[]`);f(t=>{o.if(e,()=>o.code(n._`${e} += ${typeof c==`string`?c:`;`}`)),o.code(n._`${e} += ${m(t)}`),o.assign(r,n._`${r}.concat(${i}[${t}])`)}),s.reportError(t,{message:e,params:n._`{errors: ${r}}`})}else f(e=>s.reportError(t,{message:m(e),params:n._`{errors: ${i}[${e}]}`}));function f(e){o.forIn(`key`,i,t=>o.if(n._`${i}[${t}].length`,()=>e(t)))}function m(e){return n._`${e} in ${a} ? ${a}[${e}]() : ${d}[${e}]`}}function w(e){let r=o.const(`emErrors`,n.stringify(e)),i=[];for(let t in e)i.push([t,j(e[t],u[t])]);let a=o.const(`templates`,o.object(...i)),c=o.scopeValue(`obj`,{ref:m,code:n.stringify(m)}),f=o.let(`emPropParams`),h=o.let(`emParamsErrors`);o.forOf(`err`,l.default.vErrors,e=>o.if(O(e,r),()=>{o.assign(f,n._`${c}[${e}.keyword]`),o.assign(h,n._`${r}[${e}.keyword][${e}.params[${f}]]`),o.if(h,()=>o.code(n._`${h}.push(${e})`).assign(n._`${e}.${p}`,!0))})),o.forIn(`key`,r,e=>o.forIn(`keyProp`,n._`${r}[${e}]`,i=>{o.assign(h,n._`${r}[${e}][${i}]`),o.if(n._`${h}.length`,()=>{let r=o.const(`tmpl`,n._`${a}[${e}] && ${a}[${e}][${i}]`);s.reportError(t,{message:n._`${r} ? ${r}() : ${d}[${e}][${i}]`,params:n._`{errors: ${h}}`})})}))}function T(e){let{props:i,items:a}=e;if(!i&&!a)return;let f=n._`typeof ${c} == "object"`,m=n._`Array.isArray(${c})`,h=o.let(`emErrors`),g,_,v=o.let(`templates`);i&&a?(g=o.let(`emChildKwd`),o.if(f),o.if(m,()=>{y(a,u.items),o.assign(g,n.str`items`)},()=>{y(i,u.properties),o.assign(g,n.str`properties`)}),_=n._`[${g}]`):a?(o.if(m),y(a,u.items),_=n._`.items`):i&&(o.if(r.and(f,r.not(m))),y(i,u.properties),_=n._`.properties`),o.forOf(`err`,l.default.vErrors,e=>k(e,h,t=>o.code(n._`${h}[${t}].push(${e})`).assign(n._`${e}.${p}`,!0))),o.forIn(`key`,h,e=>o.if(n._`${h}[${e}].length`,()=>{s.reportError(t,{message:n._`${e} in ${v} ? ${v}[${e}]() : ${d}${_}[${e}]`,params:n._`{errors: ${h}[${e}]}`}),o.assign(n._`${l.default.vErrors}[${l.default.errors}-1].instancePath`,n._`${b} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),o.endIf();function y(e,t){o.assign(h,n.stringify(e)),o.assign(v,j(e,t))}}function E(e){let r=o.const(`emErrs`,n._`[]`);o.forOf(`err`,l.default.vErrors,e=>o.if(A(e),()=>o.code(n._`${r}.push(${e})`).assign(n._`${e}.${p}`,!0))),o.if(n._`${r}.length`,()=>s.reportError(t,{message:M(e),params:n._`{errors: ${r}}`}))}function D(){let e=o.const(`emErrs`,n._`[]`);o.forOf(`err`,l.default.vErrors,t=>o.if(n._`!${t}.${p}`,()=>o.code(n._`${e}.push(${t})`))),o.assign(l.default.vErrors,e).assign(l.default.errors,n._`${e}.length`)}function O(e,t){return r.and(n._`${e}.keyword !== ${f}`,n._`!${e}.${p}`,n._`${e}.instancePath === ${b}`,n._`${e}.keyword in ${t}`,n._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,n._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${v.errSchemaPath.length}))`)}function k(e,t,i){o.if(r.and(n._`${e}.keyword !== ${f}`,n._`!${e}.${p}`,n._`${e}.instancePath.indexOf(${b}) === 0`),()=>
8{let r=o.scopeValue(`pattern`,{ref:/^\/([^/]*)(?:\/|$)/,code:n._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),a=o.const(`emMatches`,n._`${r}.exec(${e}.instancePath.slice(${b}.length))`),s=o.const(`emChild`,n._`${a} && ${a}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);o.if(n._`${s} !== undefined && ${s} in ${t}`,()=>i(s))})}function A(e){return r.and(n._`${e}.keyword !== ${f}`,n._`!${e}.${p}`,r.or(n._`${e}.instancePath === ${b}`,r.and(n._`${e}.instancePath.indexOf(${b}) === 0`,n._`${e}.instancePath[${b}.length] === "/"`)),n._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,n._`${e}.schemaPath[${v.errSchemaPath}.length] === "/"`)}function j(e,t){let n=[];for(let r in e){let e=t[r];h.test(e)&&n.push([r,N(e)])}return o.object(...n)}function M(e){return h.test(e)?new i._Code(i.safeStringify(e).replace(g,(e,t)=>`" + JSON.stringify(${a.getData(t,v)}) + "`).replace(_,``)):n.stringify(e)}function N(e){return n._`function(){return ${M(e)}}`}},metaSchema:{anyOf:[{type:`string`},{type:`object`,properties:{properties:{$ref:`#/$defs/stringMap`},items:{$ref:`#/$defs/stringList`},required:{$ref:`#/$defs/stringOrMap`},dependencies:{$ref:`#/$defs/stringOrMap`}},additionalProperties:{type:`string`}}],$defs:{stringMap:{type:`object`,additionalProperties:{type:`string`}},stringOrMap:{anyOf:[{type:`string`},{$ref:`#/$defs/stringMap`}]},stringList:{type:`array`,items:{type:`string`}}}}}}var y=(e,t={})=>{if(!e.opts.allErrors)throw Error(`ajv-errors: Ajv option allErrors must be true`);if(e.opts.jsPropertySyntax)throw Error(`ajv-errors: ajv option jsPropertySyntax is not supported`);return e.addKeyword(v(t))};e.default=y,t.exports=y,t.exports.default=y})),bt=r(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define(`eth-connect`,[`exports`],r):r((n=typeof globalThis<`u`?globalThis:n||self).ethconnect={})})(e,(function(e){function t(e){if(e.jsonrpc=`2.0`,!e.id||typeof e.id!=`number`||Math.floor(e.id)!==e.id)throw Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(e)}`);if(!e.method||typeof e.method!=`string`||e.method.trim().length===0)throw Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(e)}`);if(!e.params||typeof e.params!=`object`)throw Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(e)}`);return e}var n={};function r(){let e,t,n=new Promise(((r,i)=>{e=e=>{r(e),n.isPending=!1},t=e=>{i(e),n.isPending=!1}})).catch((e=>Promise.reject(e)));return n.resolve=e,n.reject=t,`finally`in n||(n.finally=e=>{n.then(e),n.catch(e)}),n.isPending=!0,n}Object.defineProperty(n,`__esModule`,{value:!0});var i=n.future=r;n.default=r;var a={exports:{}};(function(e){(function(){var t=`input is invalid type`,n=typeof window==`object`,r=n?window:{};
vendor: 4,388 bytes, line 8
8r.JS_SHA3_NO_WINDOW&&(n=!1);var i=!n&&typeof self==`object`;!r.JS_SHA3_NO_NODE_JS&&typeof process==`object`&&process.versions&&process.versions.node?r=global:i&&(r=self);var a=!r.JS_SHA3_NO_COMMON_JS&&e.exports,o=!r.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,s=`0123456789abcdef`.split(``),c=[4,1024,262144,67108864],l=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],d=[224,256,384,512],f=[128,256],p=[`hex`,`buffer`,`arrayBuffer`,`array`,`digest`],m={128:168,256:136};!r.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return Object.prototype.toString.call(e)===`[object Array]`}),!o||!r.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var h=function(e,t,n){return function(r){return new A(e,t,e).update(r)[n]()}},g=function(e,t,n){return function(r,i){return new A(e,t,i).update(r)[n]()}},_=function(e,t,n){return function(t,r,i,a){return S[`cshake`+e].update(t,r,i,a)[n]()}},v=function(e,t,n){return function(t,r,i,a){return S[`kmac`+e].update(t,r,i,a)[n]()}},y=function(e,t,n,r){for(var i=0;i<p.length;++i){var a=p[i];e[a]=t(n,r,a)}return e},b=function(e,t){var n=h(e,t,`hex`);return n.create=function(){return new A(e,t,e)},n.update=function(e){return n.create().update(e)},y(n,h,e,t)},x=[{name:`keccak`,padding:[1,256,65536,16777216],bits:d,createMethod:b},{name:`sha3`,padding:[6,1536,393216,100663296],bits:d,createMethod:b},{name:`shake`,padding:[31,7936,2031616,520093696],bits:f,createMethod:function(e,t){var n=g(e,t,`hex`);return n.create=function(n){return new A(e,t,n)},n.update=function(e,t){return n.create(t).update(e)},y(n,g,e,t)}},{name:`cshake`,padding:c,bits:f,createMethod:function(e,t){var n=m[e],r=_(e,0,`hex`);return r.create=function(r,i,a){return i||a?new A(e,t,r).bytepad([i,a],n):S[`shake`+e].create(r)},r.update=function(e,t,n,i){return r.create(t,n,i).update(e)},y(r,_,e,t)}},{name:`kmac`,padding:c,bits:f,createMethod:function(e,t){var n=m[e],r=v(e,0,`hex`);return r.create=function(r,i,a){return new j(e,t,i).bytepad([`KMAC`,a],n).bytepad([r],n)},r.update=function(e,t,n,i){return r.create(e,n,i).update(t)},y(r,v,e,t)}}],S={},C=[],w=0;w<x.length;++w)for(var T=x[w],E=T.bits,D=0;D<E.length;++D){var O=T.name+`_`+E[D];if(C.push(O),S[O]=T.createMethod(E[D],T.padding),T.name!==`sha3`){var k=T.name+E[D];C.push(k),S[k]=S[O]}}function A(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function j(e,t,n){A.call(this,e,t,n)}A.prototype.update=function(e){if(this.finalized)throw Error(`finalize already called`);var n,r=typeof e;if(r!==`string`){if(r!==`object`||e===null)throw Error(t);if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||o&&ArrayBuffer.isView(e)))throw Error(t);n=!0}for(var i,a,s=this.blocks,c=this.byteCount,u=e.length,d=this.blockCount,f=0,p=this.s;f<u;){if(this.reset)for(this.reset=!1,s[0]=this.block,i=1;i<d+1;++i)s[i]=0;if(n)for(i=this.start;f<u&&i<c;++f)s[i>>2]|=e[f]<<l[3&i++];else for(i=this.start;f<u&&i<c;++f)(a=e.charCodeAt(f))<128?s[i>>2]|=a<<l[3&i++]:a<2048?(s[i>>2]|=(192|a>>6)<<l[3&i++],s[i>>2]|=(128|63&a)<<l[3&i++]):a<55296||a>=57344?(s[i>>2]|=(224|a>>12)<<l[3&i++],s[i>>2]|=(128|a>>6&63)<<l[3&i++],s[i>>2]|=(128|63&a)<<l[3&i++]):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++f)),s[i>>2]|=(240|a>>18)<<l[3&i++],s[i>>2]|=(128|a>>12&63)<<l[3&i++],s[i>>2]|=(128|a>>6&63)<<l[3&i++],s[i>>2]|=(128|63&a)<<l[3&i++]);if(this.lastByteIndex=i,i>=c){for(this.start=i-c,this.block=s[d],i=0;i<d;++i)p[i]^=s[i];M(p),this.reset=!0}else this.start=i}return this},A.prototype.encode=function(e,t){var n=255&e,r=1,i=[n];for(n=255&(e>>=8);n>0;)i.unshift(n),n=255&(e>>=8),++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},A.prototype.encodeString=function(e){var n,r=typeof e;if(r!==`string`){if(r!==`object`||e===null)throw Error(t);
8if(o&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||o&&ArrayBuffer.isView(e)))throw Error(t);n=!0}var i=0,a=e.length;if(n)i=a;else for(var s=0;s<e.length;++s){var c=e.charCodeAt(s);c<128?i+=1:c<2048?i+=2:c<55296||c>=57344?i+=3:(c=65536+((1023&c)<<10|1023&e.charCodeAt(++s)),i+=4)}return i+=this.encode(8*i),this.update(e),i},A.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r<e.length;++r)n+=this.encodeString(e[r]);var i=t-n%t,a=[];return a.length=i,this.update(a),this},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];M(r)}},A.prototype.toString=A.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,a=0,o=0,c=``;o<r;){for(a=0;a<t&&o<r;++a,++o)e=n[a],c+=s[e>>4&15]+s[15&e]+s[e>>12&15]+s[e>>8&15]+s[e>>20&15]+s[e>>16&15]+s[e>>28&15]+s[e>>24&15];o%t==0&&(M(n),a=0)}return i&&(e=n[a],c+=s[e>>4&15]+s[15&e],i>1&&(c+=s[e>>12&15]+s[e>>8&15]),i>2&&(c+=s[e>>20&15]+s[e>>16&15])),c},A.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,a=0,o=0,s=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);o<r;){for(a=0;a<t&&o<r;++a,++o)c[o]=n[a];o%t==0&&M(n)}return i&&(c[a]=n[a],e=e.slice(0,s)),e},A.prototype.buffer=A.prototype.arrayBuffer,A.prototype.digest=A.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,i=this.outputBlocks,a=this.extraBytes,o=0,s=0,c=[];s<i;){for(o=0;o<n&&s<i;++o,++s)e=s<<2,t=r[o],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%n==0&&M(r)}return a&&(e=s<<2,t=r[o],c[e]=255&t,a>1&&(c[e+1]=t>>8&255),a>2&&(c[e+2]=t>>16&255)),c},j.prototype=new A,j.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var M=function(e){var t,n,r,i,a,o,s,c,l,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te,ne,re,z,B,V,ie,H,U,W,ae,G,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),n=(m=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(c<<1|l>>>31),n=a^(l<<1|c>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=o^(d<<1|f>>>31),n=s^(f<<1|d>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=c^(p<<1|m>>>31),n=l^(m<<1|p>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=d^(i<<1|a>>>31),n=f^(a<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,h=e[0],g=e[1],H=e[11]<<4|e[10]>>>28,U=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,A=e[21]<<3|e[20]>>>29,he=e[31]<<9|e[30]>>>23,ge=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,B=e[41]<<18|e[40]>>>14,F=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,_=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,ae=e[23]<<10|e[22]>>>22,j=e[33]<<13|e[32]>>>19,M=e[32]<<13|e[33]>>>19,_e=e[42]<<2|e[43]>>>30,ve=e[43]<<2|e[42]>>>30,le=e[5]<<30|e[4]>>>2,ue=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,R=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,b=e[24]<<11|e[25]>>>21,G=e[34]<<15|e[35]>>>17,oe=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,P=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,de=e[17]<<23|e[16]>>>9,fe=e[16]<<23|e[17]>>>9,ee=e[26]<<25|e[27]>>>7,te=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,se=e[47]<<24|e[46]>>>8,ce=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,ie=e[9]<<27|e[8]>>>5,D=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,pe=e[29]<<7|e[28]>>>25,me=e[28]<<7|e[29]>>>25,ne=e[38]<<8|e[39]>>>24,re=e[39]<<8|e[38]>>>24,C=e[48]<<14|e[49]>>>18,w=e[49]<<14|e[48]>>>18,e[0]=h^~_&y,e[1]=g^~v&b,e[10]=T^~D&k,e[11]=E^~O&A,e[20]=F^~L&ee,e[21]=I^~R&te,e[30]=V^~H&W,e[31]=ie^~U&ae,e[40]=le^~de&pe,e[41]=ue^~fe&me,e[2]=_^~y&x,e[3]=v^~b&S,e[12]=D^~k&j,e[13]=O^~A&M,e[22]=L^~ee&ne,e[23]=R^~te&re,e[32]=H^~W&G,e[33]=U^~ae&oe,e[42]=de^~pe&he,e[43]=fe^~me&ge,e[4]=y^~x&C,e[5]=b^~S&w,e[14]=k^~j&N,e[15]=A^~M&P,e[24]=ee^~ne&z,e[25]=te^~re&B,e[34]=W^~G&se,e[35]=ae^~oe&ce,e[44]=pe^~he&_e,e[45]=me^~ge&ve,e[6]=x^~C&h,e[7]=S^~w&g,e[16]=j^~N&T,e[17]=M^~P&E,e[26]=ne^~z&F,e[27]=re^~B&I,e[36]=G^~se&V,e[37]=oe^~ce&ie,e[46]=he^~_e&le,e[47]=ge^~ve&ue,e[8]=C^~h&_,e[9]=w^~g&v,e[18]=N^~T&D,e[19]=P^~E&O,e[28]=z^~F&L,e[29]=B^~I&R,e[38]=se^~V&H,e[39]=ce^~ie&U,e[48]=_e^~le&de,e[49]=ve^~ue&fe,e[0]^=u[r],e[1]^=u[r+1]};if(a)e.exports=S;else for(w=0;w<C.length;++w)r[C[w]]=S[C[w]]})()})(a);var o=a.exports,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,c=Math.ceil,l=Math.floor,u=`[BigNumber Error] `,d=u+`Number primitive has more than 15 significant digits: `,f=0x5af3107a4000,p=14,m=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],g=1e7,_=1e9;function v(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=p-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function b(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function x(e,t,n,r){if(e<t||e>n||e!==l(e))throw Error(u+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function S(e){var t=e.c.length-1;return v(e.e/p)==t&&e.c[t]%2!=0}function C(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function w(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var T=function e(t){var n,r,i,a,o,T,E,D,O,k,A=B.prototype={constructor:B,toString:null,valueOf:null},j=new B(1),M=20,N=4,P=-7,F=21,I=-1e7,L=1e7,R=!1,ee=1,te=0,ne={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},re=`0123456789abcdefghijklmnopqrstuvwxyz`,z=!0;function B(e,t){var n,a,o,c,u,f,h,g,_=this;if(!(_ instanceof B))return new B(e,t);if(t==null){if(e&&!0===e._isBigNumber)return _.s=e.s,void(!e.c||e.e>L?_.c=_.e=null:e.e<I?_.c=[_.e=0]:(_.e=e.e,_.c=e.c.slice()));if((f=typeof e==`number`)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,u=e;u>=10;u/=10,c++);c>L?_.c=_.e=null:(_.e=c,_.c=[e]);return}g=String(e)}else{if(!s.test(g=String(e)))return i(_,g,f);_.s=g.charCodeAt(0)==45?(g=g.slice(1),-1):1}(c=g.indexOf(`.`))>-1&&(g=g.replace(`.`,``)),(u=g.search(/e/i))>0?(c<0&&(c=u),c+=+g.slice(u+1),g=g.substring(0,u)):c<0&&(c=g.length)}else{if(x(t,2,re.length,`Base`),t==10&&z)return U(_=new B(e),M+_.e+1,N);if(g=String(e),f=typeof e==`number`){if(0*e!=0)return i(_,g,f,t);if(_.s=1/e<0?(g=g.slice(1),-1):1,B.DEBUG&&g.replace(/^0\.0*|\./,``).length>15)throw Error(d+e)}else _.s=g.charCodeAt(0)===45?(g=g.slice(1),-1):1;for(n=re.slice(0,t),c=u=0,h=g.length;u<h;u++)if(n.indexOf(a=g.charAt(u))<0){if(a==`.`){if(u>c){c=h;continue}}else if(!o&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){o=!0,u=-1,c=0;continue}return i(_,String(e),f,t)}f=!1,(c=(g=r(g,t,10,_.s)).indexOf(`.`))>-1?g=g.replace(`.`,``):c=g.length}for(u=0;g.charCodeAt(u)===48;u++);for(h=g.length;g.charCodeAt(--h)===48;);if(g=g.slice(u,++h)){if(h-=u,f&&B.DEBUG&&h>15&&(e>m||e!==l(e)))throw Error(d+_.s*e);if((c=c-u-1)>L)_.c=_.e=null;else if(c<I)_.c=[_.e=0];else{if(_.e=c,_.c=[],u=(c+1)%p,c<0&&(u+=p),u<h){for(u&&_.c.push(+g.slice(0,u)),h-=p;u<h;)_.c.push(+g.slice(u,u+=p));u=p-(g=g.slice(u)).length}else u-=h;for(;u--;g+=`0`);_.c.push(+g)}}else _.c=[_.e=0]}function V(e,t,n,r){var i,a,o,s,c;if(n==null?n=N:x(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)c=y(e.c),c=r==1||r==2&&(o<=P||o>=F)?C(c,o):w(c,o,`0`);else if(a=(e=U(new B(e),t,n)).e,s=(c=y(e.c)).length,r==1||r==2&&(t<=a||a<=P)){for(;s<t;c+=`0`,s++);c=C(c,a)}else if(t-=o,c=w(c,a,`0`),a+1>s){if(--t>0)for(c+=`.`;t--;c+=`0`);}else if((t+=a-s)>0)for(a+1==s&&(c+=`.`);t--;c+=`0`);return e.s<0&&i?`-`+c:c}function ie(e,t){for(var n,r=1,i=new B(e[0]);r<e.length;r++){if(!(n=new B(e[r])).s){i=n;break}t.call(i,n)&&(i=n)}return i}function H(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*p-1)>L?e.c=e.e=null:n<I?e.c=[e.e=0]:(e.e=n,e.c=t),e}function U(e,t,n,r){var i,a,o,s,u,d,m,g=e.c,_=h;if(g){t:{for(i=1,s=g[0];s>=10;s/=10,i++);
vendor: 4,630 bytes, line 8
8if((a=t-i)<0)a+=p,o=t,m=(u=g[d=0])/_[i-o-1]%10|0;else if((d=c((a+1)/p))>=g.length){if(!r)break t;for(;g.length<=d;g.push(0));u=m=0,i=1,o=(a%=p)-p+1}else{for(u=s=g[d],i=1;s>=10;s/=10,i++);m=(o=(a%=p)-p+i)<0?0:u/_[i-o-1]%10|0}if(r=r||t<0||g[d+1]!=null||(o<0?u:u%_[i-o-1]),r=n<4?(m||r)&&(n==0||n==(e.s<0?3:2)):m>5||m==5&&(n==4||r||n==6&&(a>0?o>0?u/_[i-o]:0:g[d-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=_[(p-t%p)%p],e.e=-t||0):g[0]=e.e=0,e;if(a==0?(g.length=d,s=1,d--):(g.length=d+1,s=_[p-a],g[d]=o>0?l(u/_[i-o]%_[o])*s:0),r)for(;;){if(d==0){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,g[0]==f&&(g[0]=1));break}if(g[d]+=s,g[d]!=f)break;g[d--]=0,s=1}for(a=g.length;g[--a]===0;g.pop());}e.e>L?e.c=e.e=null:e.e<I&&(e.c=[e.e=0])}return e}function W(e){var t,n=e.e;return n===null?e.toString():(t=y(e.c),t=n<=P||n>=F?C(t,n):w(t,n,`0`),e.s<0?`-`+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(e!=null){if(typeof e!=`object`)throw Error(u+`Object expected: `+e);if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(x(n=e[t],0,_,t),M=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(x(n=e[t],0,8,t),N=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&((n=e[t])&&n.pop?(x(n[0],-_,0,t),x(n[1],0,_,t),P=n[0],F=n[1]):(x(n,-_,_,t),P=-(F=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if((n=e[t])&&n.pop)x(n[0],-_,-1,t),x(n[1],1,_,t),I=n[0],L=n[1];else{if(x(n,-_,_,t),!n)throw Error(u+t+` cannot be zero: `+n);I=-(L=n<0?-n:n)}if(e.hasOwnProperty(t=`CRYPTO`)){if((n=e[t])!==!!n)throw Error(u+t+` not true or false: `+n);if(n){if(typeof crypto>`u`||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw R=!n,Error(u+`crypto unavailable`);R=n}else R=n}if(e.hasOwnProperty(t=`MODULO_MODE`)&&(x(n=e[t],0,9,t),ee=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(x(n=e[t],0,_,t),te=n),e.hasOwnProperty(t=`FORMAT`)){if(typeof(n=e[t])!=`object`)throw Error(u+t+` not an object: `+n);ne=n}if(e.hasOwnProperty(t=`ALPHABET`)){if(typeof(n=e[t])!=`string`||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(u+t+` invalid: `+n);z=n.slice(0,10)==`0123456789`,re=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:N,EXPONENTIAL_AT:[P,F],RANGE:[I,L],CRYPTO:R,MODULO_MODE:ee,POW_PRECISION:te,FORMAT:ne,ALPHABET:re}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;t:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-_&&i<=_&&i===l(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break t}if((t=(i+1)%p)<1&&(t+=p),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=f||n!==l(n))break t;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(u+`Invalid BigNumber: `+e)},B.maximum=B.max=function(){return ie(arguments,A.lt)},B.minimum=B.min=function(){return ie(arguments,A.gt)},B.random=(a=9007199254740992,o=Math.random()*a&2097151?function(){return l(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,s=0,d=[],f=new B(j);if(e==null?e=M:x(e,0,_),i=c(e/p),R)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(d.push(a%0x5af3107a4000),s+=2);s=i/2}else{if(!crypto.randomBytes)throw R=!1,Error(u+`crypto unavailable`);for(t=crypto.randomBytes(i*=7);s<i;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(d.push(a%0x5af3107a4000),s+=7);s=i/7}if(!R)for(;s<i;)(a=o())<9e15&&(d[s++]=a%0x5af3107a4000);for(i=d[--s],e%=p,i&&e&&(a=h[p-e],d[s]=l(i/a)*a);d[s]===0;d.pop(),s--);if(s<0)d=[r=0];else{for(r=-1;d[0]===0;d.splice(0,1),r-=p);for(s=1,a=d[0];a>=10;a/=10,s++);s<p&&(r-=p-s)}return f.e=r,f.c=d,f}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e=`0123456789`;function t(e,t,n,r){for(var i,a,o=[0],s=0,c=e.length;s<c;){for(a=o.length;a--;o[a]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>n-1&&(o[i+1]??(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g=r.indexOf(`.`),_=M,v=N;for(g>=0&&(d=te,te=0,r=r.replace(`.`,``),p=(h=new B(i)).pow(r.length-g),te=d,h.c=t(w(y(p.c),p.e,`0`),10,a,e),h.e=h.c.length),u=d=(m=t(r,i,a,s?(c=re,e):(c=e,re))).length;m[--d]==0;m.pop());if(!m[0])return c.charAt(0);
vendor: 6,004 bytes, line 8
8if(g<0?--u:(p.c=m,p.e=u,p.s=o,m=(p=n(p,h,_,v,a)).c,f=p.r,u=p.e),g=m[l=u+_+1],d=a/2,f=f||l<0||m[l+1]!=null,f=v<4?(g!=null||f)&&(v==0||v==(p.s<0?3:2)):g>d||g==d&&(v==4||f||v==6&&1&m[l-1]||v==(p.s<0?8:7)),l<1||!m[0])r=f?w(c.charAt(1),-_,c.charAt(0)):c.charAt(0);else{if(m.length=l,f)for(--a;++m[--l]>a;)m[l]=0,l||(++u,m=[1].concat(m));for(d=m.length;!m[--d];);for(g=0,r=``;g<=d;r+=c.charAt(m[g++]));r=w(r,u,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%g,u=t/g|0;for(e=e.slice();c--;)s=((i=l*(a=e[c]%g)+(r=u*a+(o=e[c]/g|0)*l)%g*g+s)/n|0)+(r/g|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,u,d,m,h,g,_,y,b,x,S,C,w,T,E,D,O,k=r.s==i.s?1:-1,A=r.c,j=i.c;if(!(A&&A[0]&&j&&j[0]))return new B(r.s&&i.s&&(A?!j||A[0]!=j[0]:j)?A&&A[0]==0||!j?0*k:k/0:NaN);for(b=(y=new B(k)).c=[],k=a+(u=r.e-i.e)+1,s||(s=f,u=v(r.e/p)-v(i.e/p),k=k/p|0),d=0;j[d]==(A[d]||0);d++);if(j[d]>(A[d]||0)&&u--,k<0)b.push(1),m=!0;else{for(T=A.length,D=j.length,d=0,k+=2,(h=l(s/(j[0]+1)))>1&&(j=e(j,h,s),A=e(A,h,s),D=j.length,T=A.length),w=D,S=(x=A.slice(0,D)).length;S<D;x[S++]=0);O=j.slice(),O=[0].concat(O),E=j[0],j[1]>=s/2&&E++;do{if(h=0,(c=t(j,x,D,S))<0){if(C=x[0],D!=S&&(C=C*s+(x[1]||0)),(h=l(C/E))>1)for(h>=s&&(h=s-1),_=(g=e(j,h,s)).length,S=x.length;t(g,x,_,S)==1;)h--,n(g,D<_?O:j,_,s),_=g.length,c=1;else h==0&&(c=h=1),_=(g=j.slice()).length;if(_<S&&(g=[0].concat(g)),n(x,g,S,s),S=x.length,c==-1)for(;t(j,x,D,S)<1;)h++,n(x,D<S?O:j,S,s),S=x.length}else c===0&&(h++,x=[0]);b[d++]=h,x[0]?x[S++]=A[w]||0:(x=[A[w]],S=1)}while((w++<T||x[0]!=null)&&k--);m=x[0]!=null,b[0]||b.splice(0,1)}if(s==f){for(d=1,k=b[0];k>=10;k/=10,d++);U(y,a+(y.e=d+u*p-1)+1,o,m)}else y.e=u,y.r=+m;return y}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,D=/^\.([^.]+)$/,O=/^-?(Infinity|NaN)$/,k=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(k,``);if(O.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(T,(function(e,t,n){return i=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(E,`$1`).replace(D,`0.$1`)),t!=a))return new B(a,i);if(B.DEBUG)throw Error(u+`Not a`+(r?` base `+r:``)+` number: `+t);e.s=null}e.c=e.e=null},A.absoluteValue=A.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},A.comparedTo=function(e,t){return b(this,new B(e,t))},A.decimalPlaces=A.dp=function(e,t){var n,r,i,a=this;if(e!=null)return x(e,0,_),t==null?t=N:x(t,0,8),U(new B(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-v(this.e/p))*p,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},A.dividedBy=A.div=function(e,t){return n(this,new B(e,t),M,N)},A.dividedToIntegerBy=A.idiv=function(e,t){return n(this,new B(e,t),0,1)},A.exponentiatedBy=A.pow=function(e,t){var n,r,i,a,o,s,d,f,m=this;if((e=new B(e)).c&&!e.isInteger())throw Error(u+`Exponent not an integer: `+W(e));if(t!=null&&(t=new B(t)),o=e.e>14,!m.c||!m.c[0]||m.c[0]==1&&!m.e&&m.c.length==1||!e.c||!e.c[0])return f=new B(W(m)**(o?e.s*(2-S(e)):+W(e))),t?f.mod(t):f;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!s&&m.isInteger()&&t.isInteger())&&(m=m.mod(t))}else{if(e.e>9&&(m.e>0||m.e<-1||(m.e==0?m.c[0]>1||o&&m.c[1]>=24e7:m.c[0]<8e13||o&&m.c[0]<=9999975e7)))return a=m.s<0&&S(e)?-0:0,m.e>-1&&(a=1/a),new B(s?1/a:a);te&&(a=c(te/p+2))}for(o?(n=new B(.5),s&&(e.s=1),d=S(e)):d=(i=Math.abs(+W(e)))%2,f=new B(j);;){if(d){if(!(f=f.times(m)).c)break;a?f.c.length>a&&(f.c.length=a):r&&(f=f.mod(t))}if(i){if((i=l(i/2))===0)break;d=i%2}else if(U(e=e.times(n),e.e+1,1),e.e>14)d=S(e);else{if((i=+W(e))==0)break;d=i%2}m=m.times(m),a?m.c&&m.c.length>a&&(m.c.length=a):r&&(m=m.mod(t))}return r?f:(s&&(f=j.div(f)),t?f.mod(t):a?U(f,te,N,void 0):f)},A.integerValue=function(e){var t=new B(this);return e==null?e=N:x(e,0,8),U(t,t.e+1,e)},A.isEqualTo=A.eq=function(e,t){return b(this,new B(e,t))===0},A.isFinite=function(){return!!this.c},A.isGreaterThan=A.gt=function(e,t){return b(this,new B(e,t))>0},A.isGreaterThanOrEqualTo=A.gte=function(e,t){return(t=b(this,new B(e,t)))===1||t===0},A.isInteger=function(){return!!this.c&&v(this.e/p)>this.c.length-2},A.isLessThan=A.lt=function(e,t){return b(this,new B(e,t))<0},A.isLessThanOrEqualTo=A.lte=function(e,t){return(t=b(this,new B(e,t)))===-1||t===0},A.isNaN=function(){return!this.s},A.isNegative=function(){return this.s<0},A.isPositive=function(){return this.s>0},A.isZero=function(){return!!this.c&&this.c[0]==0},A.minus=function(e,t){var n,r,i,a,o=this,s=o.s;if(t=(e=new B(e,t)).s,!s||!t)return new B(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/p,l=e.e/p,u=o.c,d=e.c;if(!c||!l){if(!u||!d)return u?(e.s=-t,e):new B(d?o:NaN);if(!u[0]||!d[0])return d[0]?(e.s=-t,e):new B(u[0]?o:N==3?-0:0)}if(c=v(c),l=v(l),u=u.slice(),s=c-l){for((a=s<0)?(s=-s,i=u):(l=c,i=d),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(a=(s=u.length)<(t=d.length))?s:t,s=t=0;t<r;t++)if(u[t]!=d[t]){a=u[t]<d[t];break}if(a&&(i=u,u=d,d=i,e.s=-e.s),(t=(r=d.length)-(n=u.length))>0)for(;t--;u[n++]=0);for(t=f-1;r>s;){if(u[--r]<d[r]){for(n=r;n&&!u[--n];u[n]=t);--u[n],u[r]+=f}u[r]-=d[r]}for(;u[0]==0;u.splice(0,1),--l);return u[0]?H(e,u,l):(e.s=N==3?-1:1,e.c=[e.e=0],e)},A.modulo=A.mod=function(e,t){var r,i,a=this;return e=new B(e,t),!a.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||a.c&&!a.c[0]?new B(a):(ee==9?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,ee),(e=a.minus(r.times(e))).c[0]||ee!=1||(e.s=a.s),e)},A.multipliedBy=A.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,m,h,_,y,b,x=this,S=x.c,C=(e=new B(e,t)).c;if(!(S&&C&&S[0]&&C[0]))return!x.s||!e.s||S&&!S[0]&&!C||C&&!C[0]&&!S?e.c=e.e=e.s=null:(e.s*=x.s,S&&C?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=v(x.e/p)+v(e.e/p),e.s*=x.s,(c=S.length)<(d=C.length)&&(_=S,S=C,C=_,i=c,c=d,d=i),i=c+d,_=[];i--;_.push(0));for(y=f,b=g,i=d;--i>=0;){for(n=0,m=C[i]%b,h=C[i]/b|0,a=i+(o=c);a>i;
8)n=((l=m*(l=S[--o]%b)+(s=h*l+(u=S[o]/b|0)*m)%b*b+_[a]+n)/y|0)+(s/b|0)+h*u,_[a--]=l%y;_[a]=n}return n?++r:_.splice(0,1),H(e,_,r)},A.negated=function(){var e=new B(this);return e.s=-e.s||null,e},A.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/p,o=e.e/p,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new B(i/0);if(!s[0]||!c[0])return c[0]?e:new B(s[0]?r:0*i)}if(a=v(a),o=v(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/f|0,s[t]=f===s[t]?0:s[t]%f;return i&&(s=[i].concat(s),++o),H(e,s,o)},A.precision=A.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return x(e,1,_),t==null?t=N:x(t,0,8),U(new B(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*p+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},A.shiftedBy=function(e){return x(e,-9007199254740991,m),this.times(`1e`+e)},A.squareRoot=A.sqrt=function(){var e,t,r,i,a,o=this,s=o.c,c=o.s,l=o.e,u=M+4,d=new B(`0.5`);if(c!==1||!s||!s[0])return new B(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if((c=Math.sqrt(+W(o)))==0||c==1/0?(((t=y(s)).length+l)%2==0&&(t+=`0`),c=Math.sqrt(+t),l=v((l+1)/2)-(l<0||l%2),r=new B(t=c==1/0?`5e`+l:(t=c.toExponential()).slice(0,t.indexOf(`e`)+1)+l)):r=new B(c+``),r.c[0]){for((c=(l=r.e)+u)<3&&(c=0);;)if(a=r,r=d.times(a.plus(n(o,a,u,1))),y(a.c).slice(0,c)===(t=y(r.c)).slice(0,c)){if(r.e<l&&--c,(t=t.slice(c-3,c+1))!=`9999`&&(i||t!=`4999`)){+t&&(+t.slice(1)||t.charAt(0)!=`5`)||(U(r,r.e+M+2,1),e=!r.times(r).eq(o));break}if(!i&&(U(a,a.e+M+2,0),a.times(a).eq(o))){r=a;break}u+=4,c+=4,i=1}}return U(r,r.e+M+1,N,e)},A.toExponential=function(e,t){return e!=null&&(x(e,0,_),e++),V(this,e,t,1)},A.toFixed=function(e,t){return e!=null&&(x(e,0,_),e=e+this.e+1),V(this,e,t)},A.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=ne;else if(typeof n!=`object`)throw Error(u+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,d=o[0],f=o[1],p=i.s<0,m=p?d.slice(1):d,h=m.length;if(c&&(a=s,s=c,c=a,h-=a),s>0&&h>0){for(a=h%s||s,d=m.substr(0,a);a<h;a+=s)d+=l+m.substr(a,s);c>0&&(d+=l+m.slice(a)),p&&(d=`-`+d)}r=f?d+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?f.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):f):d}return(n.prefix||``)+r+(n.suffix||``)},A.toFraction=function(e){var t,r,i,a,o,s,c,l,d,f,m,g,_=this,v=_.c;if(e!=null&&(!(c=new B(e)).isInteger()&&(c.c||c.s!==1)||c.lt(j)))throw Error(u+`Argument `+(c.isInteger()?`out of range: `:`not an integer: `)+W(c));if(!v)return new B(_);for(t=new B(j),d=r=new B(j),i=l=new B(j),g=y(v),o=t.e=g.length-_.e-1,t.c[0]=h[(s=o%p)<0?p+s:s],e=!e||c.comparedTo(t)>0?o>0?t:d:c,s=L,L=1/0,c=new B(g),l.c[0]=0;f=n(c,t,0,1),(a=r.plus(f.times(i))).comparedTo(e)!=1;)r=i,i=a,d=l.plus(f.times(a=d)),l=a,t=c.minus(f.times(a=t)),c=a;return a=n(e.minus(r),i,0,1),l=l.plus(a.times(d)),r=r.plus(a.times(i)),l.s=d.s=_.s,m=n(d,i,o*=2,N).minus(_).abs().comparedTo(n(l,r,o,N).minus(_).abs())<1?[d,i]:[l,r],L=s,m},A.toNumber=function(){return+W(this)},A.toPrecision=function(e,t){return e!=null&&x(e,1,_),V(this,e,t,2)},A.toString=function(e){var t,n=this,i=n.s,a=n.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=P||a>=F?C(y(n.c),a):w(y(n.c),a,`0`):e===10&&z?t=w(y((n=U(new B(n),M+a+1,N)).c),n.e,`0`):(x(e,2,re.length,`Base`),t=r(w(y(n.c),a,`0`),10,e,i,!0)),i<0&&n.c[0]&&(t=`-`+t)),t},A.valueOf=A.toJSON=function(){return W(this)},A._isBigNumber=!0,A[Symbol.toStringTag]=`BigNumber`,A[Symbol.for(`nodejs.util.inspect.custom`)]=A.valueOf,t!=null&&B.set(t),B}();let E={ROUNDING_MODE:T.ROUND_DOWN};function D(e){return new TextEncoder().encode(e)}function O(e){return typeof e==`string`?O(j(e)):new TextDecoder().decode(e)}T.config(E);let k=`INVALID_ARGUMENT`;function A(e,t=`UNKNOWN_ERROR`,n={}){let r=[];Object.keys(n).forEach((e=>{try{r.push(e+`=`+JSON.stringify(n[e]))}catch{r.push(e+`=`+JSON.stringify(n[e].toString()))}}));let i=e;r.length&&(e+=` (`+r.join(`, `)+`)`);let a=Error(e);
8return a.reason=i,a.code=t,Object.keys(n).forEach((function(e){a[e]=n[e]})),a}function j(e){if(typeof e!=`string`)throw Error(`hexToBytes only accept strings, got: `+typeof e);if(e.substr(0,2)===`0x`)return j(e.substr(2));let t=new Uint8Array(Math.ceil(e.length/2)),n=0;for(let r=0;r<e.length;r+=2){let i=parseInt(e.substr(r,2),16);if(isNaN(i))throw Error(`Cannot read hex string:`+JSON.stringify(e));t[n]=i,n++}return t}function M(e){return Array.from(e).map((e=>e.toString(16).padStart(2,`0`))).join(``)}function N(e,t){if(typeof e==`string`){if(t&&t.encoding===`hex`&&typeof e==`string`){let t=e;t.length>2&&t.substr(0,2)===`0x`&&(t=t.substr(2));let n=j(t);return o.keccak256(n)}return o.keccak256(D(e))}return o.keccak256(e)}let P={noether:`0`,wei:`1`,kwei:`1000`,Kwei:`1000`,babbage:`1000`,femtoether:`1000`,mwei:`1000000`,Mwei:`1000000`,lovelace:`1000000`,picoether:`1000000`,gwei:`1000000000`,Gwei:`1000000000`,shannon:`1000000000`,nanoether:`1000000000`,nano:`1000000000`,szabo:`1000000000000`,microether:`1000000000000`,micro:`1000000000000`,finney:`1000000000000000`,milliether:`1000000000000000`,milli:`1000000000000000`,ether:`1000000000000000000`,kether:`1000000000000000000000`,grand:`1000000000000000000000`,mether:`1000000000000000000000000`,gether:`1000000000000000000000000000`,tether:`1000000000000000000000000000000`};function F(e,t,n){return Array(t-e.length+1).join(n||`0`)+e}function I(e){let t=``,n=0,r=e.length;for(e.substring(0,2)===`0x`&&(n=2);n<r;n+=2){let r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t}function L(e){return ye(e)&&e.name&&e.name.indexOf(`(`)!==-1?e.name:e.name+`(`+ee(!1,e.inputs||[]).join(`,`)+`)`}function R(...e){let t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function ee(e,t){let n=[];return t.forEach((function(t){if(typeof t.components==`object`){if(t.type.substring(0,5)!==`tuple`)throw Error(`components found but type is not tuple; report on GitHub`);let r=``,i=t.type.indexOf(`[`);i>=0&&(r=t.type.substring(i));let a=ee(e,t.components);xe(a)&&e?n.push(`tuple(`+a.join(`,`)+`)`+r):e?n.push(`(`+a+`)`):n.push(`(`+a.join(`,`)+`)`+r)}else n.push(t.type)})),n}function te(e){let t=e.indexOf(`(`),n=e.indexOf(`)`);return t!==-1&&n!==-1?e.substr(0,t):e}function ne(e){let t=e.indexOf(`(`),n=e.indexOf(`)`);return t!==-1&&n!==-1?e.substr(t+1,n-t-1).replace(` `,``):``}function re(e){return e==null?e:G(e).toNumber()}function z(e){return G(e).toNumber()}function B(e){return _e(e)?e.toString(10):``+e}function V(e){return typeof e==`string`&&!e.startsWith(`0x`)&&/^[A-Za-z0-9]+$/.test(e)?`0x`+e:W(e)}function ie(e){if(typeof e==`string`)return e.startsWith(`0x`)&&/^[A-Za-z0-9]+$/.test(e)?W(e):`0x`+M(D(e));if(e instanceof Uint8Array)return`0x`+M(e);throw Error(`toStringData: Error trying to convert ${e} (${typeof e}) to a hex string.`)}function H(e){return typeof e==`boolean`?e:G(e).toNumber()!==0}function U(e){let t=G(e),n=t.toString(16);return t.isLessThan(0)?`-0x`+n.substr(1):`0x`+n}function W(e){if(be(e))return U(+e);if(_e(e))return U(e);if(ve(e)){let t=e;if(t.indexOf(`-0x`)===0)return U(t);if(t.indexOf(`0x`)===0)return t;if(!isFinite(t))return M(D(t))}if(e instanceof Uint8Array)return`0x`+M(e);if(xe(e)||ye(e))throw Error(`toHex can only be called with scalar values, not objects or arrays`);return U(e)}function ae(e){let t=P[e?e.toLowerCase():`ether`];if(t===void 0)throw Error(`This unit doesn't exists, please use the one of the following units`+JSON.stringify(P,null,2));return new T(t,10)}function G(e){let t=e||0;return _e(t)?t:(typeof t==`string`&&(t=t.trim()),typeof t!=`string`||t.indexOf(`0x`)!==0&&t.indexOf(`-0x`)!==0?t instanceof Uint8Array?new T(M(t),16):new T(t,10):new T(t.replace(`0x`,``).toLowerCase(),16))}function oe(e){return new T(Array(e).fill(`1`).join(``),2)}function se(e,t=256){let n=G(e).integerValue();return n.isLessThan(0)?oe(t).plus(n).plus(1):n}function ce(e,t){return F(e.toString(2),t,`0`)[0]===`1`}function le(e){if(typeof e!=`string`)throw A(`invalid address`,k,{arg:`address`,value:e});if(e.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return e.trim().substring(0,2)!==`0x`&&(e=`0x`+e),me(e);throw A(`invalid address`,k,{arg:`address`,value:e})}function ue(e,t=256){if(ce(e,t)){let n=oe(t);return e.minus(n).minus(1)}return e}function de(e){return/^0x[0-9a-f]{40}$/i.test(e)}function fe(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e))||pe(e))}function pe(e){let t=e.replace(`0x`,``),n=N(t.toLowerCase());for(let e=0;e<40;e++)if(parseInt(n[e],16)>7&&t[e].toUpperCase()!==t[e]||parseInt(n[e],16)<=7&&t[e].toLowerCase()!==t[e])return!1;return!0}function me(e){if(e===void 0)return``;let t=e.toLowerCase().replace(`0x`,``),n=N(t),r=`0x`;for(let e=0;e<t.length;e++)parseInt(n[e],16)>7?r+=t[e].toUpperCase():r+=t[e];return r}function he(e){if(!Array.isArray(e))throw Error(`Value was not an array: ${JSON.stringify(e)}`);return e}function ge(e){return de(e)?e:/^[0-9a-f]{40}$/.test(e)?`0x`+e:`0x`+F(W(e).substr(2),40)}function _e(e){return e instanceof T}function ve(e){return typeof e==`string`||e&&e.constructor&&e.constructor.name===`String`}function ye(e){return e!==null&&!Array.isArray(e)&&typeof e==`object`}function be(e){return typeof e==`boolean`}function xe(e){return Array.isArray(e)}var Se,Ce;function we(t,n){if(!t)throw Error(`jsonrpc method should be specified!`);if(typeof t!=`string`)throw Error(`jsonrpc must be a string, got ${typeof t}!`);return e.messageId++,{jsonrpc:`2.0`,id:e.messageId,method:t,params:n||[]}}function Te(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!!e&&(e.error===void 0||e.error===null)&&e.jsonrpc===`2.0`&&e.id!==null&&`result`in e&&e.result!==void 0}}e.TransactionStatus=void 0,(Se=e.TransactionStatus||(e.TransactionStatus={})).pending=`pending`,Se.confirmed=`confirmed`,Se.failed=`failed`,e.TransactionType=void 0,(Ce=e.TransactionType||(e.TransactionType={})).queued=`queued`,Ce.dropped=`dropped`,Ce.replaced=`replaced`,Ce.pending=`pending`,Ce.reverted=`reverted`,Ce.confirmed=`confirmed`,e.messageId=0;function Ee(e){return G(e)}function De(e){return e===`latest`||e===`pending`||e===`earliest`}function Oe(e){return e===void 0?`latest`:K(e)}function K(e){return e==null?null:De(e)?e:W(e)}function ke(e){return e.from&&(e.from=Ie(e.from)),e.to&&(e.to=Ie(e.to)),e.gasPrice!==void 0&&(e.gasPrice=U(e.gasPrice)),e.gas!==void 0&&(e.gas=U(e.gas)),e.value!==void 0&&(e.value=U(e.value)),e.nonce!==void 0&&(e.nonce=U(e.nonce)),e.data&&!e.data.startsWith(`0x`)&&/^[A-Za-z0-9]+$/.test(e.data)&&(e.data=`0x`+e.data),e}function Ae(e){if(typeof e!=`string`)throw Error(`The provided input for transactionId is not a string, got: `+JSON.stringify(e));if(e.indexOf(`0x`)!==0)throw Error(`TransactionID must start with 0x, got: `+JSON.stringify(e));if(e.length!==66)throw Error(`TransactionID must be a 32 byte hex, got: `+JSON.stringify(e));return e}function je(e){if(typeof e!=`object`)throw Error(`Did not provide transaction options`);if(!e.from)throw Error(`Missing "from" in transaction options`);return e.from=Ie(e.from),e.to&&(e.to=Ie(e.to)),e.gasPrice!==void 0&&(e.gasPrice=U(e.gasPrice)),e.gas!==void 0&&(e.gas=U(e.gas)),e.value!==void 0&&(e.value=U(e.value)),e.nonce!==void 0&&(e.nonce=U(e.nonce)),e.data&&!e.data.startsWith(`0x`)&&/^[A-Za-z0-9]+$/.test(e.data)&&(e.data=`0x`+e.data),e}function Me(e){return e?(e.blockNumber!==null&&(e.blockNumber=z(e.blockNumber)),e.transactionIndex!==null&&(e.transactionIndex=z(e.transactionIndex)),e.nonce=z(e.nonce),e.gas=z(e.gas),e.gasPrice=G(e.gasPrice),e.value=G(e.value),e):null}function Ne(e){return e?(e.blockNumber!==null&&(e.blockNumber=z(e.blockNumber)),e.transactionIndex!==null&&(e.transactionIndex=z(e.transactionIndex)),e.cumulativeGasUsed=z(e.cumulativeGasUsed),e.gasUsed=z(e.gasUsed),e.logs&&xe(e.logs)&&(e.logs=e.logs.map((function(e){return Fe(e)}))),e.status=z(e.status||``),e):null}
8function Pe(e){return e?(e.gasLimit=z(e.gasLimit),e.gasUsed=z(e.gasUsed),e.size=z(e.size),e.timestamp=z(e.timestamp),e.number!==null&&(e.number=z(e.number)),e.difficulty=G(e.difficulty),e.totalDifficulty=G(e.totalDifficulty),xe(e.transactions)&&e.transactions.forEach((function(t,n){ve(t)||(e.transactions[n]=Me(t)||e.transactions[n])})),e):null}function Fe(e){return e&&(e.blockNumber&&(e.blockNumber=z(e.blockNumber)),e.transactionIndex&&(e.transactionIndex=z(e.transactionIndex)),e.logIndex&&(e.logIndex=z(e.logIndex)),e)}function Ie(e){if(de(e))return e;if(fe(e))return`0x`+e;throw Error(`Invalid address: ${JSON.stringify(e)}`)}function Le(e){return e}function Re(e){return e&&(e.startingBlock=z(e.startingBlock),e.currentBlock=z(e.currentBlock),e.highestBlock=z(e.highestBlock),e.knownStates&&(e.knownStates=z(e.knownStates),e.pulledStates=z(e.pulledStates)),e)}function ze(e){if(e===null)throw A(`cannot convert null value to array`,k,{arg:`value`,value:e});if(e instanceof Uint8Array)return new Uint8Array(e);if(typeof e==`string`){let t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw A(`invalid hexidecimal string`,k,{arg:`value`,value:e});if(t[1]!==`0x`)throw A(`hex string must have 0x prefix`,k,{arg:`value`,value:e});(e=e.substring(2)).length%2&&(e=`0`+e);let n=[];for(let t=0;t<e.length;t+=2)n.push(parseInt(e.substr(t,2),16));return new Uint8Array(n)}if(function(e){if(!e||parseInt(String(e.length))!==e.length||typeof e==`string`)return!1;for(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>=256||parseInt(String(n))!==n)return!1}return!0}(e))return new Uint8Array(e);throw A(`invalid arrayify value`,void 0,{arg:`value`,value:e,type:typeof e})}function Be(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})}let Ve=new T(-1),He=new T(0),Ue=new T(1),We=new T(`0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff`);function Ge(e){return function(e,t){function n(t){return Error(`unexpected character "`+e[t]+`" at position `+t+` in "`+e+`"`)}let r={type:``,name:``,state:{allowType:!0}},i=r;for(let r=0;r<e.length;r++){let a=e[r];switch(a){case`(`:if(!i.state.allowParams)throw n(r);i.state.allowType=!1,i.type=Ke(i.type),i.components=[{type:``,name:``,parent:i,state:{allowType:!0}}],i=i.components[0];break;case`)`:delete i.state,t&&i.name===`indexed`&&(i.indexed=!0,i.name=``),i.type=Ke(i.type);let e=i;if(i=i.parent,!i)throw n(r);delete e.parent,i.state.allowParams=!1,i.state.allowName=!0,i.state.allowArray=!0;break;case`,`:delete i.state,t&&i.name===`indexed`&&(i.indexed=!0,i.name=``),i.type=Ke(i.type);let o={type:``,name:``,parent:i.parent,state:{allowType:!0}};i.parent.components.push(o),delete i.parent,i=o;break;case` `:i.state.allowType&&i.type!==``&&(i.type=Ke(i.type),delete i.state.allowType,i.state.allowName=!0,i.state.allowParams=!0),i.state.allowName&&i.name!==``&&(t&&i.name===`indexed`?(i.indexed=!0,i.name=``):i.state.allowName=!1);break;case`[`:if(!i.state.allowArray)throw n(r);i.type+=a,i.state.allowArray=!1,i.state.allowName=!1,i.state.readArray=!0;break;case`]`:if(!i.state.readArray)throw n(r);i.type+=a,i.state.readArray=!1,i.state.allowArray=!0,i.state.allowName=!0;break;default:if(i.state.allowType)i.type+=a,i.state.allowParams=!0,i.state.allowArray=!0;else if(i.state.allowName)i.name+=a,delete i.state.allowArray;else{if(!i.state.readArray)throw n(r);i.type+=a}}}if(i.parent)throw Error(`unexpected eof`);return delete r.state,t&&i.name===`indexed`&&(i.indexed=!0,i.name=``),r.type=Ke(r.type),r}(e,!0)}function Ke(e){return e.match(/^uint($|[^1-9])/)?e=`uint256`+e.substring(4):e.match(/^int($|[^1-9])/)&&(e=`int256`+e.substring(3)),e}let qe=new RegExp(/^bytes([0-9]*)$/),Je=new RegExp(/^(u?int)([0-9]*)$/),Ye=new RegExp(/^(.*)\[([0-9]*)\]$/),Xe=function(e,t){let n=e.match(Je);return n&&parseInt(n[2])<=48?t.toNumber():t};class Ze{constructor(e,t,n,r=``,i){this.coerceFunc=e,this.name=t,this.type=n,this.localName=r,this.dynamic=i}}class Qe extends Ze{constructor(e){super(e.coerceFunc,e.name,e.type,void 0,e.dynamic),Be(this,`coder`,e)}encode(e){return this.coder.encode(e)}decode(e,t){return this.coder.decode(e,t)}}class $e extends Ze{constructor(e,t){super(e,`null`,``,t,!1)}encode(e){return ze([])}decode(e,t){if(t>e.length)throw Error(`invalid null`);return{consumed:0,value:this.coerceFunc(`null`,void 0)}}}function et(e,t){return new T(e.toString(2).substr(-t),2)}class tt extends Ze{constructor(e,t,n,r){let i=(n?`int`:`uint`)+8*t;super(e,i,i,r,!1),this.size=t,this.signed=n}encode(e){try{let t=G(e);
8if(this.signed){let e=et(We,8*this.size-1);if(t.gt(e)||(e=e.plus(Ue).multipliedBy(Ve),t.lt(e)))throw Error(`out-of-bounds`)}else if(t.lt(He)||t.gt(et(We,8*this.size)))throw Error(`out-of-bounds`);t=et(se(t,8*this.size),8*this.size),this.signed&&(t=se(ue(t,8*this.size),256));let n=F(se(t).toString(16),64);if(n.indexOf(`NaN`)!==-1)throw A(`invalid number value, NaN`,k,{arg:this.localName,coderType:this.name,value:e,v:t,twosComplement:se(t),twosComplement16:se(t).toString(16),pad:F(se(t).toString(16),64),size:this.size});return j(n)}catch(t){throw A(`invalid number value`,k,{arg:this.localName,coderType:this.name,value:e,message:t.toString()})}}decode(e,t){if(e.length<t+32)throw A(`insufficient data for `+this.name+` type`,k,{arg:this.localName,coderType:this.name,value:W(e.slice(t,t+32))});let n=32-this.size,r=new T(M(e.slice(t+n,t+32)),16);return r=this.signed?ue(r,8*this.size):et(r,8*this.size),{consumed:32,value:this.coerceFunc(this.name,r)}}}let nt=new tt((function(e,t){return t}),32,!1,`none`);class rt extends Ze{constructor(e,t,n){let r=`bytes`+t;super(e,r,r,n,!1),this.length=t}encode(e){let t=new Uint8Array(32);try{if(typeof e==`string`&&e.length%2!=0)throw Error(`hex string cannot be odd-length`);let n=ze(e);if(n.length>this.length)throw Error(`incorrect data length`);t.set(n)}catch(t){throw A(`invalid `+this.name+` value. Use hex strings or Uint8Array`,k,{arg:this.localName,coderType:this.name,value:t.value||e,details:t.message})}return t}decode(e,t){if(e.length<t+32)throw A(`insufficient data for `+this.name+` type`,k,{arg:this.localName,coderType:this.name,value:W(e.slice(t,t+32))});return{consumed:32,value:this.coerceFunc(this.name,e.slice(t,t+this.length))}}}function it(e){let t=32*Math.ceil(e.length/32),n=new Uint8Array(t-e.length);return R(nt.encode(e.length),e,n)}function at(e,t,n){if(e.length<t+32)throw A(`insufficient data for dynamicBytes length`,k,{arg:n,coderType:`dynamicBytes`,value:W(e.slice(t,t+32))});let r=nt.decode(e,t).value;try{r=r.toNumber()}catch(e){throw e(`dynamic bytes count too large`,k,{arg:n,coderType:`dynamicBytes`,value:r.toString()})}if(e.length<t+32+r)throw A(`insufficient data for dynamicBytes type`,k,{arg:n,coderType:`dynamicBytes`,value:W(e.slice(t,t+32+r))});return{consumed:32+32*Math.ceil(r/32),value:e.slice(t+32,t+32+r)}}function ot(e){return 32*Math.ceil(e/32)}function st(e,t){if(!Array.isArray(t)){if(!t||typeof t!=`object`)throw A(`invalid tuple value`,k,{coderType:`tuple`,value:t});{let n=[];e.forEach((function(e){n.push(t[e.localName])})),t=n}}if(e.length!==t.length)throw A(`types/value length mismatch`,k,{coderType:`tuple`,value:t});let n=[];e.forEach((function(e,r){n.push({dynamic:e.dynamic,value:e.encode(t[r])})}));let r=0,i=0;n.forEach((function(e){e.dynamic?(r+=32,i+=ot(e.value.length)):r+=ot(e.value.length)}));let a=0,o=r,s=new Uint8Array(r+i);return n.forEach((function(e){e.dynamic?(s.set(nt.encode(o),a),a+=32,s.set(e.value,o),o+=ot(e.value.length)):(s.set(e.value,a),a+=ot(e.value.length))})),s}class ct extends Array{}class lt extends Ze{constructor(e,t,n,r){super(e,`array`,t.type+`[`+(n>=0?n:``)+`]`,r,n===-1||t.dynamic),this.coder=t,this.length=n}encode(e){if(!Array.isArray(e))throw A(`expected array value`,k,{arg:this.localName,coderType:`array`,value:e});let t=this.length,n=new Uint8Array;t===-1&&(t=e.length,n=nt.encode(t)),function(e,t,n){if(n||(n=``),e<t)throw A(`missing argument`+n,`MISSING_ARGUMENT`,{count:e,expectedCount:t});if(e>t)throw A(`too many arguments`+n,`UNEXPECTED_ARGUMENT`,{count:e,expectedCount:t})}(t,e.length,`in coder array`+(this.localName?` `+this.localName:``));let r=[];for(let t=0;t<e.length;t++)r.push(this.coder);return R(n,st(r,e))}decode(e,t){let n=0,r=this.length;if(r===-1){let i;try{i=nt.decode(e,t)}catch(e){throw A(`insufficient data for dynamic array length`,k,{arg:this.localName,coderType:`array`,value:e.value})}try{r=i.value.toNumber()}catch{throw A(`array count too large`,k,{arg:this.localName,coderType:`array`,value:i.value.toString()})}n+=i.consumed,t+=i.consumed}let i=[];for(let e=0;e<r;e++)i.push(new Qe(this.coder));let a=function(e,t,n){let r=n,i=0,a=[];return e.forEach((function(e){let o;if(e.dynamic){let i=nt.decode(t,n);o=e.decode(t,r+i.value.toNumber()),o.consumed=i.consumed}else o=e.decode(t,n);o.value!==void 0&&a.push(o.value),n+=o.consumed,i+=o.consumed})),{value:a,consumed:i}}(i,e,t);return a.consumed+=n,a.value=this.coerceFunc(this.type,a.value),a}}class ut extends Ze{constructor(e,t,n){let r=!1,i=[];t.forEach((function(e){e.dynamic&&(r=!0),i.push(e.type)})),super(e,`tuple`,`tuple(`+i.join(`,`)+`)`,n,r),this.coders=t}encode(e){return st(this.coders,e)}decode(e,t){let n=function(e,t,n){let r=n,i=0,a=new ct;return e.forEach((function(e){let o;if(e.dynamic){let i=nt.decode(t,n);o=e.decode(t,r+i.value.toNumber()),o.consumed=i.consumed}else o=e.decode(t,n);o.value!==void 0&&a.push(o.value),n+=o.consumed,i+=o.consumed})),e.forEach((function(e,t){let n=e.localName;n&&(n===`length`&&(n=`_length`),a[n]!==null&&a[n]!==void 0||(a[n]=a[t]))})),{value:a,consumed:i}}(this.coders,e,t);return n.value=this.coerceFunc(this.type,n.value),n}}let dt={address:class extends Ze{constructor(e,t){super(e,`address`,`address`,t,!1)}encode(e){let t=new Uint8Array(32),n=e.trim();if(!fe(n))throw A(`invalid address format`,k,{arg:this.localName,coderType:`address`,value:e});try{t.set(j(Ie(n)),12)}catch(t){throw A(`invalid address (${t.message})`,k,{arg:this.localName,coderType:`address`,value:e})}return t}decode(e,t){if(e.length<t+32)throw A(`insufficuent data for address type`,k,{arg:this.localName,coderType:`address`,value:W(e.slice(t,t+32)),missingBytes:t+32-e.length});return{consumed:32,value:this.coerceFunc(`address`,le(W(e.slice(t+12,t+32))))}}},bool:class extends Ze{constructor(e,t){super(e,`bool`,`bool`,t,!1)}encode(e){return nt.encode(+!!e)}decode(e,t){try{let n=nt.decode(e,t);return{consumed:n.consumed,value:this.coerceFunc(`bool`,!n.value.isZero())}}catch(e){throw e.reason===`insufficient data for uint256 type`?A(`insufficient data for boolean type`,k,{arg:this.localName,coderType:`boolean`,value:e.value}):e}}},string:class extends Ze{constructor(e,t){super(e,`string`,`string`,t,!0)}encode(e){if(typeof e!=`string`)throw A(`invalid string value`,k,{arg:this.localName,coderType:`string`,value:e});return it(D(e))}decode(e,t){let n=at(e,t,this.localName);return n.value=this.coerceFunc(`string`,O(n.value)),n}},bytes:class extends Ze{constructor(e,t){super(e,`bytes`,`bytes`,t,!0)}encode(e){try{return it(ze(e))}catch(e){throw e(`invalid bytes value`,k,{arg:this.localName,coderType:`bytes`,value:e.value})}}decode(e,t){let n=at(e,t,this.localName);return n.value=this.coerceFunc(`bytes`,n.value),n}},function:class extends rt{constructor(e,t){super(e,24,t)}}};function ft(e,t){let n=dt[t.type];if(n)return new n(e,t.name);let r=t.type.match(Je);if(r){let n=parseInt(r[2]||`256`);if(n===0||n>256||n%8!=0)throw A(`invalid `+r[1]+` bit length`,k,{arg:`param`,value:t});return new tt(e,n/8,r[1]===`int`,t.name)}if(r=t.type.match(qe),r){let n=parseInt(r[1]);if(n===0||n>32)throw A(`invalid bytes length`,k,{arg:`param`,value:t});return new rt(e,n,t.name)}
8if(r=t.type.match(Ye),r){let n=Object.assign({},t),i=parseInt(r[2]||`-1`);return n.type=r[1],new lt(e,ft(e,n),i,t.name)}if(t.type.substring(0,5)===`tuple`)return function(e,t,n){return t||(t=[]),new ut(e,t.map((t=>ft(e,t))),n)}(e,t.components,t.name);if(t.type===``)return new $e(e,t.name);throw A(`invalid type`,k,{arg:`type`,value:t.type,fullType:t})}class pt{constructor(e){(function(e,t){if(!(e instanceof t))throw A(`missing new`,`MISSING_NEW`,{name:t.name})})(this,pt),e||(e=Xe),Be(this,`coerceFunc`,e)}encode(e,t){if(e.length!==t.length)throw A(`types/values length mismatch`,k,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let n=e.map((e=>typeof e==`string`?Ge(e):e)).map((e=>ft(this.coerceFunc,e)));return new ut(this.coerceFunc,n,`_`).encode(t)}decode(e,t){let n=e.map((e=>typeof e==`string`?Ge(e):e)).map((e=>ft(this.coerceFunc,e)));return new ut(this.coerceFunc,n,`_`).decode(t,0).value}}let mt=new pt;var ht,q;function J(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function Y(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}e.coder=void 0,(ht=e.coder||(e.coder={})).encodeParams=function(e,t){return M(mt.encode(e,t))},ht.decodeParams=function(e,t){if(e.length>0&&(!t||t===`0x`||t===`0X`))throw Error(`Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.`);return mt.decode(e,j(`0x`+t.replace(/0x/i,``)))};class X{constructor(e){this.callName=e.callName,this.params=e.params||0,this.inputFormatter=e.inputFormatter||null,this.outputFormatter=e.outputFormatter}validateArgs(e){if(e.length!==this.params)throw t=this.callName,n=e.length,r=this.params,Error(`Invalid number of input parameters to RPC method "${t}" given: ${n}, expected: ${r}`);var t,n,r}formatInput(e){return this.inputFormatter?this.inputFormatter.map((function(t,n){return t?t(e[n]):e[n]})):e}formatOutput(e){return e===null?null:this.outputFormatter(e)}toPayload(e){let t=this.formatInput(e);return this.validateArgs(t),{method:this.callName,params:t}}async execute(e,...t){let n=this.toPayload(t);if(!e)throw Error(`Missing RequestManager in method#exec`);let r=await e.sendAsync(n);return this.formatOutput(r)}}class gt{constructor(e){this.getter=e.getter,this.outputFormatter=e.outputFormatter}formatOutput(e){return this.outputFormatter(e)}async execute(e,...t){let n=await e.sendAsync({method:this.getter,params:[]});return this.formatOutput(n)}}function _t(e){return new Promise((t=>setTimeout(t,e)))}e.eth=void 0,(q=e.eth||(e.eth={})).eth_getBalance=new X({callName:`eth_getBalance`,params:2,inputFormatter:[Ie,Oe],outputFormatter:Ee}),q.eth_getStorageAt=new X({callName:`eth_getStorageAt`,params:3,inputFormatter:[Ie,W,Oe],outputFormatter:V}),q.eth_getCode=new X({callName:`eth_getCode`,params:2,inputFormatter:[Ie,Oe],outputFormatter:V}),q.eth_getBlockByHash=new X({callName:`eth_getBlockByHash`,params:2,inputFormatter:[K,function(e){return!!e}],outputFormatter:Pe}),q.eth_getBlockByNumber=new X({callName:`eth_getBlockByNumber`,params:2,inputFormatter:[K,function(e){return!!e}],outputFormatter:Pe}),q.eth_getUncleByBlockHashAndIndex=new X({callName:`eth_getUncleByBlockHashAndIndex`,params:2,inputFormatter:[K,W],outputFormatter:Pe}),q.eth_getUncleByBlockNumberAndIndex=new X({callName:`eth_getUncleByBlockNumberAndIndex`,params:2,inputFormatter:[K,W],outputFormatter:Pe}),q.eth_getBlockTransactionCountByHash=new X({callName:`eth_getBlockTransactionCountByHash`,params:1,inputFormatter:[K],outputFormatter:z}),q.eth_getBlockTransactionCountByNumber=new X({callName:`eth_getBlockTransactionCountByNumber`,params:1,inputFormatter:[K],outputFormatter:z}),q.eth_getUncleCountByBlockHash=new X({callName:`eth_getUncleCountByBlockHash`,params:1,inputFormatter:[K],outputFormatter:z}),q.eth_getUncleCountByBlockNumber=new X({callName:`eth_getUncleCountByBlockNumber`,params:1,inputFormatter:[K],outputFormatter:z}),q.eth_getTransactionByHash=new X({callName:`eth_getTransactionByHash`,params:1,inputFormatter:[Ae],outputFormatter:Me}),q.eth_getTransactionByBlockHashAndIndex=new X({callName:`eth_getTransactionByBlockHashAndIndex`,params:2,inputFormatter:[K,W],outputFormatter:Me}),q.eth_getTransactionByBlockNumberAndIndex=new X({callName:`eth_getTransactionByBlockNumberAndIndex`,params:2,inputFormatter:[K,W],outputFormatter:Me}
8),q.eth_getTransactionReceipt=new X({callName:`eth_getTransactionReceipt`,params:1,inputFormatter:[Ae],outputFormatter:Ne}),q.eth_getTransactionCount=new X({callName:`eth_getTransactionCount`,params:2,inputFormatter:[Ie,Oe],outputFormatter:z}),q.eth_sendRawTransaction=new X({callName:`eth_sendRawTransaction`,params:1,inputFormatter:[null],outputFormatter:V}),q.web3_sha3=new X({callName:`web3_sha3`,params:1,inputFormatter:[null],outputFormatter:V}),q.eth_sendTransaction=new X({callName:`eth_sendTransaction`,params:1,inputFormatter:[je],outputFormatter:V}),q.eth_sign=new X({callName:`eth_sign`,params:2,inputFormatter:[Ie,null],outputFormatter:V}),q.eth_call=new X({callName:`eth_call`,params:2,inputFormatter:[ke,Oe],outputFormatter:V}),q.eth_estimateGas=new X({callName:`eth_estimateGas`,params:1,inputFormatter:[ke],outputFormatter:z}),q.eth_submitWork=new X({callName:`eth_submitWork`,params:3,inputFormatter:[null,null,null],outputFormatter:H}),q.eth_getWork=new X({callName:`eth_getWork`,params:0,inputFormatter:[],outputFormatter:he}),q.eth_coinbase=new gt({getter:`eth_coinbase`,outputFormatter:ge}),q.eth_mining=new gt({getter:`eth_mining`,outputFormatter:H}),q.eth_hashrate=new gt({getter:`eth_hashrate`,outputFormatter:z}),q.eth_syncing=new gt({getter:`eth_syncing`,outputFormatter:Re}),q.eth_gasPrice=new gt({getter:`eth_gasPrice`,outputFormatter:Ee}),q.eth_accounts=new gt({getter:`eth_accounts`,outputFormatter:he}),q.eth_blockNumber=new gt({getter:`eth_blockNumber`,outputFormatter:z}),q.eth_protocolVersion=new gt({getter:`eth_protocolVersion`,outputFormatter:z}),q.web3_clientVersion=new gt({getter:`web3_clientVersion`,outputFormatter:B}),q.net_version=new gt({getter:`net_version`,outputFormatter:B}),q.shh_version=new X({callName:`shh_version`,params:0,inputFormatter:[],outputFormatter:z}),q.shh_post=new X({callName:`shh_post`,params:1,inputFormatter:[null],outputFormatter:H}),q.personal_newAccount=new X({callName:`personal_newAccount`,params:1,inputFormatter:[null],outputFormatter:ge}),q.personal_importRawKey=new X({callName:`personal_importRawKey`,params:2,inputFormatter:[null,null],outputFormatter:ge}),q.personal_sign=new X({callName:`personal_sign`,params:3,inputFormatter:[ie,Ie,null],outputFormatter:V}),q.personal_ecRecover=new X({callName:`personal_ecRecover`,params:2,inputFormatter:[ie,null],outputFormatter:ge}),q.personal_unlockAccount=new X({callName:`personal_unlockAccount`,params:3,inputFormatter:[Ie,null,re],outputFormatter:H}),q.personal_sendTransaction=new X({callName:`personal_sendTransaction`,params:2,inputFormatter:[je,null],outputFormatter:V}),q.personal_lockAccount=new X({callName:`personal_lockAccount`,params:1,inputFormatter:[Ie],outputFormatter:H}),q.personal_listAccounts=new gt({getter:`personal_listAccounts`,outputFormatter:he}),q.net_listening=new gt({getter:`net_listening`,outputFormatter:H}),q.net_peerCount=new gt({getter:`net_peerCount`,outputFormatter:z}),q.eth_newFilter=new X({callName:`eth_newFilter`,params:1,inputFormatter:[Le],outputFormatter:W}),q.eth_getLogs=new X({callName:`eth_getLogs`,params:1,inputFormatter:[he],outputFormatter:he}),q.eth_newBlockFilter=new X({callName:`eth_newBlockFilter`,params:0,inputFormatter:[],outputFormatter:W}),q.eth_newPendingTransactionFilter=new X({callName:`eth_newPendingTransactionFilter`,params:0,inputFormatter:[],outputFormatter:W}),q.eth_uninstallFilter=new X({callName:`eth_uninstallFilter`,params:1,inputFormatter:[W],outputFormatter:H}),q.eth_getFilterLogs=new X({callName:`eth_getFilterLogs`,params:1,inputFormatter:[W],outputFormatter:he}),q.eth_getFilterChanges=new X({callName:`eth_getFilterChanges`,params:1,inputFormatter:[W],outputFormatter:he}),q.eth_submitHashrate=new X({callName:`eth_submitHashrate`,params:2,inputFormatter:[null,null],outputFormatter:H}),q.shh_newIdentity=new X({callName:`shh_newIdentity`,params:0,inputFormatter:[],outputFormatter:V}),q.shh_hasIdentity=new X({callName:`shh_hasIdentity`,params:1,inputFormatter:[null],outputFormatter:H}),q.shh_newGroup=new X({callName:`shh_newGroup`,params:0,inputFormatter:[],outputFormatter:V}),q.shh_addToGroup=new X({callName:`shh_addToGroup`,params:1,inputFormatter:[null],outputFormatter:H}),q.shh_newFilter=new X({callName:`shh_newFilter`,params:1,inputFormatter:[null],outputFormatter:W}),q.shh_uninstallFilter=new X({callName:`shh_uninstallFilter`,params:1,inputFormatter:[null],outputFormatter:H}),q.shh_getLogs=new X({callName:`shh_getLogs`,params:1,inputFormatter:[null],outputFormatter:he}),q.shh_getFilterMessages=new X({callName:`shh_getFilterMessages`,params:1,inputFormatter:[null],outputFormatter:he}),q.shh_getFilterChanges=new X({callName:`shh_getFilterChanges`,params:1,inputFormatter:[null],outputFormatter:he}),q.shh_getMessages=new X({callName:`shh_getMessages`,params:1,inputFormatter:[null],outputFormatter:he});function Z(t,n){let r=e.eth[n];if(!r)throw Error(`Could not find the method/property named ${n.toString()}`);Object.defineProperty(t,n,{value:function(...e){return r.execute(this,...e)}})}class Q{constructor(e){this.provider=e,this.requests=new Map}async sendAsync(e){let t=await this.provider;if(!t)throw Error(`Provider not set or invalid`);let n=we(e.method,e.params),r=i();return this.requests.set(n.id,r),t.sendAsync(n,((e,t)=>{this.requests.delete(n.id),e?r.reject(e):Te(t)?r.resolve(t.result):r.reject(function(e){let t=e&&e.error&&e.error.message?e.error.message:`Invalid JSON RPC response: `+JSON.stringify(e);return Error(t)}(t))})),r}setProvider(e){this.provider=e}async getConfirmedTransaction(e){let t=await this.waitForCompletion(e);if(this.isFailure(t))throw Error(`Transaction "${e}" failed`);return t}async waitForCompletion(t,n){let r=Ae(t);if(await this.isTxDropped(r,n)){let t=await this.getTransactionAndReceipt(r);return Object.assign(Object.assign({},t),{status:e.TransactionStatus.failed})}for(;;){let t=await this.getTransactionAndReceipt(r);if(!this.isPending(t)&&t.receipt)return Object.assign(Object.assign({},t),{status:this.isFailure(t)?e.TransactionStatus.failed:e.TransactionStatus.confirmed});await _t(2e3)}}async getTransaction(t){let n,r=null,i=Ae(t);try{let e=(await this.eth_accounts())[0];e&&(r=await this.eth_getTransactionCount(e,`latest`))}catch{r=null}try{if(n=await this.eth_getTransactionByHash(i),n===null)return null}catch{return null}if(n.blockNumber===null){if(r!==null){if(n.nonce<r)return{hash:i,type:e.TransactionType.replaced,nonce:n.nonce};if(n.nonce>r)return{hash:i,type:e.TransactionType.queued,nonce:n.nonce}}return Object.assign({type:e.TransactionType.pending},n)}let a;try{if(a=await this.eth_getTransactionReceipt(i),a===null||a.status===0)return Object.assign({type:e.TransactionType.reverted},n)}catch{return null}return Object.assign(Object.assign({type:e.TransactionType.confirmed},n),{receipt:a})}async isTxDropped(e,t=15){let n=t;for(;n>0;){if(await this.getTransactionAndReceipt(e)!==null)return!1;--n,await _t(2e3)}return!0}async getTransactionAndReceipt(e){e=Ae(e);let[t,n]=await Promise.all([this.eth_getTransactionByHash(e),this.eth_getTransactionReceipt(e)
8]);return Object.assign(Object.assign({},t),{receipt:n})}isPending(e){return e&&e.blockNumber===null}isFailure(e){return e&&(!e.receipt||e.receipt.status===0)}}J([Z,Y(`design:type`,Function)],Q.prototype,`web3_clientVersion`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`web3_sha3`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`net_version`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`net_peerCount`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`net_listening`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_protocolVersion`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_syncing`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_coinbase`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_mining`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_hashrate`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_gasPrice`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_accounts`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_blockNumber`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getBalance`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getStorageAt`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getTransactionCount`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getBlockTransactionCountByHash`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getBlockTransactionCountByNumber`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getUncleCountByBlockHash`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getUncleCountByBlockNumber`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getCode`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_sign`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_sendTransaction`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_sendRawTransaction`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_call`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_estimateGas`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getBlockByHash`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getBlockByNumber`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getTransactionByHash`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getTransactionByBlockHashAndIndex`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getTransactionByBlockNumberAndIndex`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getTransactionReceipt`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getUncleByBlockHashAndIndex`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getUncleByBlockNumberAndIndex`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_newFilter`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_newBlockFilter`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_newPendingTransactionFilter`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_uninstallFilter`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getFilterChanges`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getFilterLogs`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getLogs`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_getWork`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_submitWork`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`eth_submitHashrate`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_post`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_version`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_newIdentity`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_hasIdentity`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_newGroup`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_addToGroup`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_newFilter`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_uninstallFilter`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_getFilterChanges`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`shh_getMessages`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`personal_unlockAccount`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`personal_newAccount`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`personal_listAccounts`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`personal_lockAccount`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`personal_importRawKey`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`personal_sendTransaction`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`personal_sign`,void 0),J([Z,Y(`design:type`,Function)],Q.prototype,`personal_ecRecover`,void 0);class vt{constructor(e){this.json=e,this._inputTypes=e.inputs||[],this._outputTypes=e.outputs||[],this._constant=!!e.constant,this._payable=!!e.payable||e.stateMutability===`payable`,this.needsToBeTransaction=this._payable||`constant`in e&&!e.constant||e.stateMutability===`nonpayable`,this._name=L(e)}extractDefaultBlock(e){return e.length>this._inputTypes.length&&!ye(e[e.length-1])&&Oe(e.pop())||`latest`}validateArgs(e){if(e.some((e=>e===void 0)))throw Error(`Invalid call, some arguments are undefined`);let t=e.filter((function(e){return!(!0===ye(e)&&!1===xe(e)&&!1===_e(e)&&!(e instanceof Uint8Array))}));if(t.length!==this._inputTypes.length)throw n=t.length,r=this._inputTypes.length,Error(`Invalid number of arguments to Solidity function. given: ${n}, expected: ${r}`);var n,r}toPayload(t){let n={to:void 0,data:void 0,value:void 0,from:void 0};t.length>this._inputTypes.length&&ye(t[t.length-1])&&(n=t.pop()),this.validateArgs(t);let r=this.signature(),i=e.coder.encodeParams(this._inputTypes,t);return i.indexOf(`0x`)===0&&(i=i.substr(2)),n.data=`0x`+r+i,n}signature(){return N(this._name).slice(0,8)}unpackOutput(t){if(!t)return;let n=t.length>=2?t.slice(2):t,r=e.coder.decodeParams(this._outputTypes,n);return r.length===1?r[0]:r}async execute(e,t,...n){if(!e)throw Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){let r=this.toPayload(n);if(r.to=t,r.value>0&&!this._payable)throw Error(`Cannot send value to non-payable function`);if(!r.from)throw Error(`Missing "from" in transaction options`);return await e.eth_sendTransaction(r)}{let r=this.extractDefaultBlock(n),i=this.toPayload(n);i.to=t;let a=await e.eth_call(i,r);return this.unpackOutput(a)}}estimateGas(e,t,...n){if(!(e instanceof Q))throw Error(`estimateGas needs to receive a RequestManager as first argument`);let r=this.toPayload(n);return r.to=t,e.eth_estimateGas(r)}displayName(){return te(this._name)}typeName(){return ne(this._name)||`void`}attachToContract(e){let t=this.displayName(),n=Object.assign(((...t)=>this.execute(e.requestManager,e.address,...t)),{estimateGas:this.estimateGas.bind(this,e.requestManager,e.address),toPayload:(...e)=>this.toPayload(e),toRPCMessage:(...t)=>{let n=this.extractDefaultBlock(t),r=this.toPayload(t);return r.to=e.address,{method:`eth_call`,params:[r,n]}},unpackOutput:e=>this.unpackOutput(e)});e[t]||(e[t]=n),e[t][this.typeName()]=n}}function yt(e){if(e==null)return null;let t=String(e).toString();return t.indexOf(`0x`)===0?t:M(D(t))}class bt{constructor(e){this.requestManager=e,this.isStarted=!1,this.isDisposed=!1,this.formatter=e=>e,this.filterId=i(),this.callbacks=[],this.stopSemaphore=i()}async watch(e){if(this.isDisposed)throw Error(`The filter was disposed`);e&&(this.callbacks.push(e),this.isStarted||await this.start())}
8async start(){if(this.isDisposed)throw Error(`The filter was disposed`);if(!this.isStarted){this.isStarted=!0;try{let e=await this.getNewFilter();if(!e)throw Error(`Could not create a filter, response: `+JSON.stringify(e));this.filterId.resolve(e)}catch(e){throw e}this.stopSemaphore=i(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;let e=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,!0!==await this.uninstall())throw Error(`Couldn't stop the eth filter: ${e}`)}async poll(){if(this.isStarted){if(this.callbacks.length){let e=await this.getChanges();e&&this.callbacks.forEach((t=>{this.formatter?e.forEach((e=>{t(this.formatter(e))})):e.forEach((e=>t(e)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=i(),setTimeout((e=()=>this.poll(),function(){e().catch((e=>console.error(e)))}),500))}else this.stopSemaphore.resolve(1);var e}}class xt extends bt{constructor(e,t,n=(e=>e)){super(e),this.requestManager=e,this.options=t,this.formatter=n,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(e){return yt(e)})),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock==`number`||typeof this.options.fromBlock==`string`?K(this.options.fromBlock)||void 0:`latest`,toBlock:typeof this.options.toBlock==`number`||typeof this.options.toBlock==`string`?K(this.options.toBlock)||void 0:`latest`}}async getLogs(){this.isStarted||await this.start();let e=await this.filterId;return this.requestManager.eth_getFilterLogs(e)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){let e=await this.filterId;return this.requestManager.eth_getFilterChanges(e)}async uninstall(){let e=await this.filterId;return this.requestManager.eth_uninstallFilter(e)}}class St{constructor(e,t,n){this.requestManager=e,this.address=n,this._anonymous=!1,this._params=t.
8inputs||[],this._name=L(t),this._anonymous=t.anonymous||!1}types(e){return this._params.filter((function(t){return t.indexed===e}))}displayName(){return te(this._name)}typeName(){return ne(this._name)||`void`}signature(){return N(this._name)}encode(t={},n={}){let r={topics:[],address:this.address};n.fromBlock!==void 0&&(r.fromBlock=K(n.fromBlock)||void 0),n.toBlock!==void 0&&(r.toBlock=K(n.toBlock)||void 0),r.topics=r.topics||[],this._anonymous||r.topics.push(`0x`+this.signature());let i=this._params.filter((function(e){return!0===e.indexed})).map((function(n){let r=t[n.name];return r==null?null:xe(r)?r.map((function(t){return`0x`+e.coder.encodeParams([n],[t])})):`0x`+e.coder.encodeParams([n],[r])}));return r.topics=r.topics.concat(i),r}decode(t){t.data=t.data||``,t.topics=t.topics||[];let n=(this._anonymous?t.topics:t.topics.slice(1)).map((function(e){return e.slice(2)})).join(``),r=e.coder.decodeParams(this.types(!0),n),i=t.data.slice(2),a=e.coder.decodeParams(this.types(!1),i),o=this._params.reduce((function(e,t){return e[t.name]=t.indexed?r.shift():a.shift(),e}),{});return Object.assign(Object.assign({},Fe(t)),{event:this.displayName(),address:t.address,args:o})}async execute(e,t){let n=this.encode(e,t),r=this.decode.bind(this);return new xt(this.requestManager,n,r)}attachToContract(e){let t=this.execute.bind(this),n=this.displayName();e.events[n]||(e.events[n]=t),e.events[n][this.typeName()]=this.execute.bind(this,e)}}class Ct{constructor(e,t,n){this._requestManager=e,this._json=t,this._address=n}encode(e={}){let t={address:this._address};return e.fromBlock!==void 0&&(t.fromBlock=K(e.fromBlock)||void 0),e.toBlock!==void 0&&(t.toBlock=K(e.toBlock)||void 0),t}decode(e){e.data=e.data||``;let t=xe(e.topics)&&ve(e.topics[0])?e.topics[0].slice(2):``,n=this._json.filter((function(e){return t===N(L(e))}))[0];return n?new St(this._requestManager,n,this._address).decode(e):Fe(e)}async execute(e){let t=this.encode(e),n=this.decode.bind(this);return new xt(this._requestManager,t,n)}getAllEventsFunction(){return this.execute.bind(this)}}class wt{constructor(e,t,n){var r;this.requestManager=e,this.abi=t,this.address=n,this.events={},this.transactionHash=null,this.address=n,this.abi=t,(r=this).abi.filter((function(e){return e.type===`function`})).map((function(e){return new vt(e)})).forEach((function(e){e.attachToContract(r)})),this.allEvents=function(e){let t=e.abi.filter((function(e){return e.type===`event`})),n=new Ct(e.requestManager,t,e.address);return t.map((function(t){return new St(e.requestManager,t,e.address)})).forEach((function(t){t.attachToContract(e)})),n.getAllEventsFunction()}(this)}}e.AbstractFilter=bt,e.BigNumber=T,e.Contract=wt,e.ContractFactory=class{constructor(e,t){this.requestManager=e,this.abi=t}async deploy(...t){let n,r=t[t.length-1];if(ye(r)&&!xe(r)&&(n=t.pop()),!n)throw Error(`Missing options object`);if(!n.data||typeof n.data!=`string`)throw Error(`Invalid options.data`);if(z(n.value)>0&&!(this.abi.filter((function(e){return e.type===`constructor`&&e.inputs.length===t.length}))[0]||{}).payable)throw Error(`Cannot send value to non-payable constructor`);let a=(o=this.abi,s=t,o.filter((function(e){return e.type===`constructor`&&e.inputs&&e.inputs.length===s.length})).map((function(e){return e.inputs||[]})).map((function(t){return e.coder.encodeParams(t,s)}))[0]||``);var o,s;n.data+=a,n.gas||(n.gas=await this.requestManager.eth_estimateGas(n));let c=await this.requestManager.eth_sendTransaction(n);if(!c)throw Error(`Error while sending contract creation transaction. A TxHash was not retrieved`);let l=await async function(e,t){let n=i(),r=0,a=()=>{r++,r>50?n.reject(Error(`Contract transaction couldn't be found after 50 blocks`)):e.eth_getTransactionReceipt(t).then((e=>{e&&e.blockHash?n.resolve(e):setTimeout(a,1e3)}),(e=>n.reject(e)))};a();let o=await n,s=await e.eth_getCode(o.contractAddress,`latest`);if(s&&s.length>3)return o.contractAddress;throw Object.assign(Error(`The contract code couldn't be stored, please check your gas amount.`),{response:s,receipt:o})}(this.requestManager,c),u=await this.at(l);return u.transactionHash=c,u}async at(e){if(!fe(e))throw TypeError(`Invalid address ${JSON.stringify(e)}`);return new wt(this.requestManager,this.abi,e)}},e.EthBlockFilter=class extends xt{constructor(e){super(e,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},e.EthFilter=xt,e.EthPendingTransactionFilter=class extends xt{constructor(e){super(e,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},e.HTTPProvider=class{constructor(e,t={}){this.host=e,this.options=t,this.debug=!1,this.host=e||`http://localhost:8545`}send(){throw Error(`Sync requests are deprecated`)}sendAsync(e,n){try{let r=null;r=e instanceof Array?e.map((e=>t(e))):t(e);let i=this.options.fetch||globalThis.fetch;if(i===void 0)throw Error(`There is no global fetch object nor it was provided. Please install and import isomorphic-fetch`);let a={body:JSON.stringify(r),method:`POST`,headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":`application/json`})};this.debug&&console.log(`SEND >> `+a.body),i(this.host,a).then((async e=>{if(e.ok){let t=await e.json();this.debug&&console.log(`RECV << `+JSON.stringify(t)),t.error?n(Object.assign(Error(t.error.json||t.error),t.error)):n(null,t)}else this.debug&&console.log(`ERR << `+JSON.stringify(e)),n(Error(`External error. response code: `+e.status))}),(e=>{this.debug&&console.log(`ERR << `+JSON.stringify(e)),n(e)}))}catch(e){this.debug&&console.log(`ERR << `+JSON.stringify(e)),n(e)}}},e.Method=X,e.Property=gt,e.RequestManager=Q,e.SHHFilter=class extends bt{constructor(e,t){super(e),this.requestManager=e,this.options=t,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(e){return yt(e)})),this.options={topics:this.options.topics,to:this.options.to}}
8async getMessages(){let e=await this.filterId;return this.requestManager.shh_getMessages(e)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){let e=await this.filterId;return this.requestManager.shh_getFilterChanges(e)}async uninstall(){let e=await this.filterId;return this.requestManager.shh_uninstallFilter(e)}},e.SolidityEvent=St,e.SolidityFunction=vt,e.WebSocketProvider=class{constructor(e,t={}){this.url=e,this.options=t,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk=``,this.connect()}dispose(){this.isDisposed=!0;let e=this.connection;this.timeout(Error(`Provider disposed.`)),e.then((e=>e.close())).catch((e=>{this.debug&&console.error(e)}))}send(){throw Error(`Sync requests are deprecated`)}sendAsync(e,n){let r=[],a;if(e instanceof Array)a=Promise.all(e.map((e=>{let n=i();try{let i=t(e);r.push(i),this.responseCallbacks.set(i.id,n)}catch(e){n.reject(e)}return n})));else{let n=i();try{let i=t(e);r.push(i),this.responseCallbacks.set(i.id,n)}catch(e){n.reject(e)}a=n}a.then((e=>n(null,e)),(e=>n(e))),this.connection.then((e=>{r.forEach((t=>{let n=JSON.stringify(t);this.debug&&console.log(`SEND >> `+n),e.send(n)}))}),(e=>{n(e)}))}parseResponse(e){let t=[];return e.replace(/\}[\n\r]?\{/g,`}|--|{`).replace(/\}\][\n\r]?\[\{/g,`}]|--|[{`).replace(/\}[\n\r]?\[\{/g,`}|--|[{`).replace(/\}\][\n\r]?\{/g,`}]|--|{`).split(`|--|`).forEach((e=>{let n=e;this.lastChunk&&(n=this.lastChunk+n);let r=null;try{r=JSON.parse(n)}catch{this.lastChunk=n,clearTimeout(this.lastChunkTimeout),this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3);return}clearTimeout(this.lastChunkTimeout),this.lastChunk=``,r&&t.push(r)})),t}processMessage(e){if(`id`in e){let t=e.id,n=this.responseCallbacks.get(t);if(!n)return void console.error(`Error: Received a response for an unknown request`,e);this.responseCallbacks.delete(t),e.error!==void 0&&e.error!==null?n.reject(Object.assign(Error(e.error.message||e.error),e.error)):`result`in e&&n.resolve(e)}else this.notificationCallbacks.forEach((t=>t(null,e)))}timeout(e){this.connection&&this.connection.isPending||(this.connection=i());let t=e||Error(`Connection timeout`);this.responseCallbacks.forEach((e=>e.reject(t))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((e=>e.close())).catch((e=>{this.debug&&console.error(e)})),this.connection&&this.connection.isPending||(this.connection=i()),this.lastChunk=``;let e=this.options.WebSocketConstructor||(typeof WebSocket<`u`?WebSocket:void 0);if(!e)throw Error(`Please provide a WebSocketConstructor`);let t=new e(this.url,this.options.protocol);t.onopen=()=>{this.connection.resolve(t)},t.onerror=e=>{let t=Error(`Error in web socket`);t.data=e,this.timeout(t)},t.onclose=e=>{this.timeout(Error(`Connection closed (${e&&e.reason||`Unknown reason`})`))},t.onmessage=e=>{let t=typeof e.data==`string`?e.data:``;this.debug&&console.log(`RECV << `+e.data),this.parseResponse(t).forEach((e=>{e instanceof Array?e.forEach((e=>this.processMessage(e))):this.processMessage(e)}))}}},e.bytesToHex=M,e.bytesToUtf8String=O,e.concatBytes=R,e.default=Q,e.extractDisplayName=te,e.extractTypeName=ne,e.fromAscii=function(e,t=0){let n=``;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t).toString(16);n+=r.length<2?`0`+r:r}return`0x`+n.padEnd(t,`0`)},e.fromDecimal=U,e.fromTwosComplement=ue,e.fromWei=function(e,t){let n=G(e).dividedBy(ae(t));return _e(e)?n:n.toString(10)},e.getAddress=le,e.getValueOfUnit=ae,e.hexToBytes=j,e.inputAddressFormatter=Ie,e.inputBlockNumberFormatter=K,e.inputCallFormatter=ke,e.inputDefaultBlockNumberFormatter=Oe,e.inputFilterOptions=Le,e.inputPostFormatter=function(e){return e?(e.ttl=U(e.ttl),e.workToProve=U(e.workToProve),e.priority=U(e.priority),xe(e.topics)||(e.topics=e.topics?[e.topics]:[]),e.topics=e.topics.map((function(e){return e.indexOf(`0x`)===0?e:`0x`+M(D(e))})),e):null},e.inputTransactionFormatter=je,e.inputTransactionId=Ae,e.isAddress=fe,e.isArray=xe,e.isBigNumber=_e,e.isBloom=function(e){return!!/^(0x)?[0-9a-f]{512}$/i.test(e)&&!!/^(0x)?[0-9a-f]{512}$/i.test(e)}
8,e.isBoolean=be,e.isChecksumAddress=pe,e.isFunction=function(e){return typeof e==`function`},e.isHex=function(e){return typeof e==`string`&&/^0x[0-9a-fA-F]+$/.test(e)},e.isJson=function(e){try{return!!JSON.parse(e)}catch{return!1}},e.isObject=ye,e.isPredefinedBlockNumber=De,e.isStrictAddress=de,e.isString=ve,e.isTopic=function(e){return!!/^(0x)?[0-9a-f]{64}$/i.test(e)&&!!/^(0x)?[0-9a-f]{64}$/i.test(e)},e.isValidResponse=Te,e.outputBigNumberFormatter=Ee,e.outputBlockFormatter=Pe,e.outputLogFormatter=Fe,e.outputPostFormatter=function(e){return e?(e.expiry=z(e.expiry),e.sent=z(e.sent),e.ttl=z(e.ttl),e.workProved=z(e.workProved),e.topics||(e.topics=[]),e.topics=e.topics.map((function(e){return I(e)})),e):null},e.outputSyncingFormatter=Re,e.outputTransactionFormatter=Me,e.outputTransactionReceiptFormatter=Ne,e.padLeft=F,e.padRight=function(e,t,n){return e+Array(t-e.length+1).join(n||`0`)},e.sha3=N,e.signedIsNegative=ce,e.stringToUtf8Bytes=D,e.toAddress=ge,e.toArray=he,e.toAscii=I,e.toBatchPayload=function(e){return e.map((function(e){return we(e.method,e.params)}))},e.toBigNumber=G,e.toBoolean=H,e.toChecksumAddress=me,e.toData=V,e.toDecimal=z,e.toHex=W,e.toJsonRpcRequest=we,e.toNullDecimal=re,e.toString=B,e.toStringData=ie,e.toTwosComplement=se,e.toWei=function(e,t){let n=G(e).times(ae(t));return _e(e)?n:n.toString(10)},e.transformToFullName=L,Object.defineProperty(e,`__esModule`,{value:!0})}))})),xt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SignatureValidator=n;var t=bt();async function n(e,n){return await new t.ContractFactory(e,[{constant:!0,inputs:[{name:`hash`,type:`bytes32`},{name:`_signature`,type:`bytes`}],name:`isValidSignature`,outputs:[{name:`magicValue`,type:`bytes4`}],payable:!1,stateMutability:`view`,type:`function`}]).at(n)}})),St=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.output=e.exists=e.hash=e.bytes=e.bool=e.number=e.isBytes=void 0;function t(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, not ${e}`)}e.number=t;function n(e){if(typeof e!=`boolean`)throw Error(`boolean expected, not ${e}`)}e.bool=n;function r(e){return e instanceof Uint8Array||typeof e==`object`&&!!e&&e.constructor.name===`Uint8Array`}e.isBytes=r;function i(e,...t){if(!r(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}e.bytes=i;function a(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash should be wrapped by utils.wrapConstructor`);t(e.outputLen),t(e.blockLen)}e.hash=a;function o(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}e.exists=o;function s(e,t){i(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least ${n}`)}e.output=s,e.default={number:t,bool:n,bytes:i,hash:a,exists:o,output:s}})),Ct=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.crypto=void 0,e.crypto=typeof globalThis==`object`&&`crypto`in globalThis?globalThis.crypto:void 0})),wt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;var t=Ct(),n=St();function r(e){return e instanceof Uint8Array||typeof e==`object`&&!!e&&e.constructor.name===`Uint8Array`}e.isBytes=r,e.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),e.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),e.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),e.rotr=(e,t)=>e<<32-t|e>>>t,e.rotl=(e,t)=>
8e<<t|e>>>32-t>>>0,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,e.byteSwap=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255,e.byteSwapIfBE=e.isLE?e=>e:t=>(0,e.byteSwap)(t);function i(t){for(let n=0;n<t.length;n++)t[n]=(0,e.byteSwap)(t[n])}e.byteSwap32=i;var a=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function o(e){(0,n.bytes)(e);let t=``;for(let n=0;n<e.length;n++)t+=a[e[n]];return t}e.bytesToHex=o;var s={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function c(e){if(e>=s._0&&e<=s._9)return e-s._0;if(e>=s._A&&e<=s._F)return e-(s._A-10);if(e>=s._a&&e<=s._f)return e-(s._a-10)}function l(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);let t=e.length,n=t/2;if(t%2)throw Error(`padded hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=c(e.charCodeAt(i)),a=c(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw Error(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}e.hexToBytes=l,e.nextTick=async()=>{};async function u(t,n,r){let i=Date.now();for(let a=0;a<t;a++){r(a);let t=Date.now()-i;t>=0&&t<n||(await(0,e.nextTick)(),i+=t)}}e.asyncLoop=u;function d(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}e.utf8ToBytes=d;function f(e){return typeof e==`string`&&(e=d(e)),(0,n.bytes)(e),e}e.toBytes=f;function p(...e){let t=0;for(let r=0;r<e.length;r++){let i=e[r];(0,n.bytes)(i),t+=i.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}e.concatBytes=p,e.Hash=class{clone(){return this._cloneInto()}};var m={}.toString;function h(e,t){if(t!==void 0&&m.call(t)!==`[object Object]`)throw Error(`Options should be object or undefined`);return Object.assign(e,t)}e.checkOpts=h;function g(e){let t=t=>e().update(f(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}e.wrapConstructor=g;function _(e){let t=(t,n)=>e(n).update(f(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}e.wrapConstructorWithOpts=_;function v(e){let t=(t,n)=>e(n).update(f(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}e.wrapXOFConstructorWithOpts=v;function y(e=32){if(t.crypto&&typeof t.crypto.getRandomValues==`function`)return t.crypto.getRandomValues(new Uint8Array(e));throw Error(`crypto.getRandomValues must be defined`)}e.randomBytes=y})),Tt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.HashMD=e.Maj=e.Chi=void 0;var t=St(),n=wt();function r(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}e.Chi=(e,t,n)=>e&t^~e&n,e.Maj=(e,t,n)=>
8e&t^e&n^t&n,e.HashMD=class extends n.Hash{constructor(e,t,r,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,t.exists)(this);let{view:r,buffer:i,blockLen:a}=this;e=(0,n.toBytes)(e);let o=e.length;for(let t=0;t<o;){let s=Math.min(a-this.pos,o-t);if(s===a){let r=(0,n.createView)(e);for(;a<=o-t;t+=a)this.process(r,t);continue}i.set(e.subarray(t,t+s),this.pos),this.pos+=s,t+=s,this.pos===a&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,t.exists)(this),(0,t.output)(e,this),this.finished=!0;let{buffer:i,view:a,blockLen:o,isLE:s}=this,{pos:c}=this;i[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>o-c&&(this.process(a,0),c=0);for(let e=c;e<o;e++)i[e]=0;r(a,o-8,BigInt(this.length*8),s),this.process(a,0);let l=(0,n.createView)(e),u=this.outputLen;if(u%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let d=u/4,f=this.get();if(d>f.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<d;e++)l.setUint32(4*e,f[e],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=a,r%t&&e.buffer.set(n),e}}})),Et=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.sha224=e.sha256=void 0;var t=Tt(),n=wt(),r=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),i=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64),o=class extends t.HashMD{constructor(){super(64,32,8,!1),this.A=i[0]|0,this.B=i[1]|0,this.C=i[2]|0,this.D=i[3]|0,this.E=i[4]|0,this.F=i[5]|0,this.G=i[6]|0,this.H=i[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,i){for(let t=0;t<16;t++,i+=4)a[t]=e.getUint32(i,!1);for(let e=16;e<64;e++){let t=a[e-15],r=a[e-2],i=(0,n.rotr)(t,7)^(0,n.rotr)(t,18)^t>>>3;a[e]=((0,n.rotr)(r,17)^(0,n.rotr)(r,19)^r>>>10)+a[e-7]+i+a[e-16]|0}let{A:o,B:s,C:c,D:l,E:u,F:d,G:f,H:p}=this;for(let e=0;e<64;e++){let i=(0,n.rotr)(u,6)^(0,n.rotr)(u,11)^(0,n.rotr)(u,25),m=p+i+(0,t.Chi)(u,d,f)+r[e]+a[e]|0,h=((0,n.rotr)(o,2)^(0,n.rotr)(o,13)^(0,n.rotr)(o,22))+(0,t.Maj)(o,s,c)|0;p=f,f=d,d=u,u=l+m|0,l=c,c=s,s=o,o=m+h|0}o=o+this.A|0,s=s+this.B|0,c=c+this.C|0,l=l+this.D|0,u=u+this.E|0,d=d+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(o,s,c,l,u,d,f,p)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},s=class extends o{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}};e.sha256=(0,n.wrapConstructor)(()=>new o),e.sha224=(0,n.wrapConstructor)(()=>new s)})),Dt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hmac=e.HMAC=void 0;var t=St(),n=wt(),r=class extends n.Hash{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(e);let i=(0,n.toBytes)(r);if(this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let a=this.blockLen,o=new Uint8Array(a);o.set(i.length>a?e.create().update(i).digest():i);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return(0,t.exists)(this),this.iHash.update(e),this}digestInto(e){(0,t.exists)(this),(0,t.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};e.HMAC=r,e.hmac=(e,t,n)=>new r(e,t).update(n).digest(),e.hmac.create=(e,t)=>
8new r(e,t)})),Ot=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.bitMask=void 0,e.isBytes=i,e.abytes=a,e.bytesToHex=s,e.numberToHexUnpadded=c,e.hexToNumber=l,e.hexToBytes=f,e.bytesToNumberBE=p,e.bytesToNumberLE=m,e.numberToBytesBE=h,e.numberToBytesLE=g,e.numberToVarBytesBE=_,e.ensureBytes=v,e.concatBytes=y,e.equalBytes=b,e.utf8ToBytes=x,e.bitLen=S,e.bitGet=C,e.bitSet=w,e.createHmacDrbg=D,e.validateObject=k;var t=BigInt(0),n=BigInt(1),r=BigInt(2);function i(e){return e instanceof Uint8Array||typeof e==`object`&&!!e&&e.constructor.name===`Uint8Array`}function a(e){if(!i(e))throw Error(`Uint8Array expected`)}var o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function s(e){a(e);let t=``;for(let n=0;n<e.length;n++)t+=o[e[n]];return t}function c(e){let t=e.toString(16);return t.length&1?`0${t}`:t}function l(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);return BigInt(e===``?`0`:`0x${e}`)}var u={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function d(e){if(e>=u._0&&e<=u._9)return e-u._0;if(e>=u._A&&e<=u._F)return e-(u._A-10);if(e>=u._a&&e<=u._f)return e-(u._a-10)}function f(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);let t=e.length,n=t/2;if(t%2)throw Error(`padded hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=d(e.charCodeAt(i)),a=d(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw Error(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function p(e){return l(s(e))}function m(e){return a(e),l(s(Uint8Array.from(e).reverse()))}function h(e,t){return f(e.toString(16).padStart(t*2,`0`))}function g(e,t){return h(e,t).reverse()}function _(e){return f(c(e))}function v(e,t,n){let r;if(typeof t==`string`)try{r=f(t)}catch(n){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${n}`)}else if(i(t))r=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let a=r.length;if(typeof n==`number`&&a!==n)throw Error(`${e} expected ${n} bytes, got ${a}`);return r}function y(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];a(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}function b(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function x(e){if(typeof e!=`string`)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function S(e){let r;for(r=0;e>t;e>>=n,r+=1);return r}function C(e,t){return e>>BigInt(t)&n}
8function w(e,r,i){return e|(i?n:t)<<BigInt(r)}e.bitMask=e=>(r<<BigInt(e-1))-n;var T=e=>new Uint8Array(e),E=e=>Uint8Array.from(e);function D(e,t,n){if(typeof e!=`number`||e<2)throw Error(`hashLen must be a number`);if(typeof t!=`number`||t<2)throw Error(`qByteLen must be a number`);if(typeof n!=`function`)throw Error(`hmacFn must be a function`);let r=T(e),i=T(e),a=0,o=()=>{r.fill(1),i.fill(0),a=0},s=(...e)=>n(i,r,...e),c=(e=T())=>{i=s(E([0]),e),r=s(),e.length!==0&&(i=s(E([1]),e),r=s())},l=()=>{if(a++>=1e3)throw Error(`drbg: tried 1000 values`);let e=0,n=[];for(;e<t;){r=s();let t=r.slice();n.push(t),e+=r.length}return y(...n)};return(e,t)=>{o(),c(e);let n;for(;!(n=t(l()));)c();return o(),n}}var O={bigint:e=>typeof e==`bigint`,function:e=>typeof e==`function`,boolean:e=>typeof e==`boolean`,string:e=>typeof e==`string`,stringOrUint8Array:e=>typeof e==`string`||i(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e==`function`&&Number.isSafeInteger(e.outputLen)};function k(e,t,n={}){let r=(t,n,r)=>{let i=O[n];if(typeof i!=`function`)throw Error(`Invalid validator "${n}", expected function`);let a=e[t];if(!(r&&a===void 0)&&!i(a,e))throw Error(`Invalid param ${String(t)}=${a} (${typeof a}), expected ${n}`)};for(let[e,n]of Object.entries(t))r(e,n,!1);for(let[e,t]of Object.entries(n))r(e,t,!0);return e}})),kt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isNegativeLE=void 0,e.mod=u,e.pow=d,e.pow2=f,e.invert=p,e.tonelliShanks=m,e.FpSqrt=h,e.validateField=_,e.FpPow=v,e.FpInvertBatch=y,e.FpDiv=b,e.FpIsSquare=x,e.nLength=S,e.Field=C,e.FpSqrtOdd=w,e.FpSqrtEven=T,e.hashToPrivateScalar=E,e.getFieldBytesLength=D,e.getMinHashLength=O,e.mapHashToField=k;var t=Ot(),n=BigInt(0),r=BigInt(1),i=BigInt(2),a=BigInt(3),o=BigInt(4),s=BigInt(5),c=BigInt(8),l=BigInt(16);function u(e,t){let r=e%t;return r>=n?r:t+r}function d(e,t,i){if(i<=n||t<n)throw Error(`Expected power/modulo > 0`);if(i===r)return n;let a=r;for(;t>n;)t&r&&(a=a*e%i),e=e*e%i,t>>=r;return a}function f(e,t,r){let i=e;for(;t-- >n;)i*=i,i%=r;return i}function p(e,t){if(e===n||t<=n)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let i=u(e,t),a=t,o=n,s=r,c=r,l=n;for(;i!==n;){let e=a/i,t=a%i,n=o-c*e,r=s-l*e;a=i,i=t,o=c,s=l,c=n,l=r}if(a!==r)throw Error(`invert: does not exist`);return u(o,t)}function m(e){let t=(e-r)/i,a,s,c;for(a=e-r,s=0;a%i===n;a/=i,s++);for(c=i;c<e&&d(c,t,e)!==e-r;c++);if(s===1){let t=(e+r)/o;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error(`Cannot find square root`);return r}}let l=(a+r)/i;return function(e,n){if(e.pow(n,t)===e.neg(e.ONE))throw Error(`Cannot find square root`);let i=s,o=e.pow(e.mul(e.ONE,c),a),u=e.pow(n,l),d=e.pow(n,a);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let n=e.sqr(d);t<i&&!e.eql(n,e.ONE);t++)n=e.sqr(n);let n=e.pow(o,r<<BigInt(i-t-1));o=e.sqr(n),u=e.mul(u,n),d=e.mul(d,o),i=t}return u}}function h(e){if(e%o===a){let t=(e+r)/o;return function(e,n){let r=e.pow(n,t);if(!e.eql(e.sqr(r),n))throw Error(`Cannot find square root`);return r}}if(e%c===s){let t=(e-s)/c;return function(e,n){let r=e.mul(n,i),a=e.pow(r,t),o=e.mul(n,a),s=e.mul(e.mul(o,i),a),c=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(c),n))throw Error(`Cannot find square root`);return c}}return e%l,m(e)}e.isNegativeLE=(e,t)=>(u(e,t)&r)===r;var g=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function _(e){let n=g.reduce((e,t)=>(e[t]=`function`,e),{ORDER:`bigint`,MASK:`bigint`,BYTES:`isSafeInteger`,BITS:`isSafeInteger`});return(0,t.validateObject)(e,n)}function v(e,t,i){if(i<n)throw Error(`Expected power > 0`);if(i===n)return e.ONE;if(i===r)return t;let a=e.ONE,o=t;for(;i>n;)i&r&&(a=e.mul(a,o)),o=e.sqr(o),i>>=r;return a}function y(e,t){let n=Array(t.length),r=t.reduce((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r)),e.ONE),i=e.inv(r);return t.reduceRight((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r)),i),n}function b(e,t,n){return e.mul(t,typeof n==`bigint`?p(n,e.ORDER):e.inv(n))}function x(e){let t=(e.ORDER-r)/i;return n=>{let r=e.pow(n,t);return e.eql(r,e.ZERO)||e.eql(r,e.ONE)}}function S(e,t){let n=t===void 0?e.toString(2).length:t;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function C(e,i,a=!1,o={}){if(e<=n)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:s,nByteLength:c}=S(e,i);if(c>2048)throw Error(`Field lengths over 2048 bytes are not supported`);let l=h(e),d=Object.freeze({ORDER:e,BITS:s,BYTES:c,MASK:(0,t.bitMask)(s),ZERO:n,ONE:r,create:t=>u(t,e),isValid:t=>{if(typeof t!=`bigint`)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return n<=t&&t<e},is0:e=>e===n,isOdd:e=>(e&r)===r,neg:t=>u(-t,e),eql:(e,t)=>
8e===t,sqr:t=>u(t*t,e),add:(t,n)=>u(t+n,e),sub:(t,n)=>u(t-n,e),mul:(t,n)=>u(t*n,e),pow:(e,t)=>v(d,e,t),div:(t,n)=>u(t*p(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:o.sqrt||(e=>l(d,e)),invertBatch:e=>y(d,e),cmov:(e,t,n)=>n?t:e,toBytes:e=>a?(0,t.numberToBytesLE)(e,c):(0,t.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return a?(0,t.bytesToNumberLE)(e):(0,t.bytesToNumberBE)(e)}});return Object.freeze(d)}function w(e,t){if(!e.isOdd)throw Error(`Field doesn't have isOdd`);let n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)}function T(e,t){if(!e.isOdd)throw Error(`Field doesn't have isOdd`);let n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n}function E(e,n,i=!1){e=(0,t.ensureBytes)(`privateHash`,e);let a=e.length,o=S(n).nByteLength+8;if(o<24||a<o||a>1024)throw Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${a}`);return u(i?(0,t.bytesToNumberLE)(e):(0,t.bytesToNumberBE)(e),n-r)+r}function D(e){if(typeof e!=`bigint`)throw Error(`field order must be bigint`);let t=e.toString(2).length;return Math.ceil(t/8)}function O(e){let t=D(e);return t+Math.ceil(t/2)}function k(e,n,i=!1){let a=e.length,o=D(n),s=O(n);if(a<16||a<s||a>1024)throw Error(`expected ${s}-1024 bytes of input, got ${a}`);let c=u(i?(0,t.bytesToNumberBE)(e):(0,t.bytesToNumberLE)(e),n-r)+r;return i?(0,t.numberToBytesLE)(c,o):(0,t.numberToBytesBE)(c,o)}})),At=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.wNAF=a,e.validateBasic=o;var t=kt(),n=Ot(),r=BigInt(0),i=BigInt(1);function a(e,t){let n=(e,t)=>{let n=t.negate();return e?n:t},a=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:n,unsafeLadder(t,n){let a=e.ZERO,o=t;for(;n>r;)n&i&&(a=a.add(o)),o=o.double(),n>>=i;return a},precomputeWindow(e,t){let{windows:n,windowSize:r}=a(t),i=[],o=e,s=o;for(let e=0;e<n;e++){s=o,i.push(s);for(let e=1;e<r;e++)s=s.add(o),i.push(s);o=s.double()}return i},wNAF(t,r,o){let{windows:s,windowSize:c}=a(t),l=e.ZERO,u=e.BASE,d=BigInt(2**t-1),f=2**t,p=BigInt(t);for(let e=0;e<s;e++){let t=e*c,a=Number(o&d);o>>=p,a>c&&(a-=f,o+=i);let s=t,m=t+Math.abs(a)-1,h=e%2!=0,g=a<0;a===0?u=u.add(n(h,r[s])):l=l.add(n(g,r[m]))}return{p:l,f:u}},wNAFCached(e,t,n,r){let i=e._WINDOW_SIZE||1,a=t.get(e);return a||(a=this.precomputeWindow(e,i),i!==1&&t.set(e,r(a))),this.wNAF(i,a,n)}}}function o(e){return(0,t.validateField)(e.Fp),(0,n.validateObject)(e,{n:`bigint`,h:`bigint`,Gx:`field`,Gy:`field`},{nBitLength:`isSafeInteger`,nByteLength:`isSafeInteger`}),Object.freeze({...(0,t.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}})),jt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DER=void 0,e.weierstrassPoints=p,e.weierstrass=h,e.SWUFpSqrtRatio=g,e.mapToCurveSimpleSWU=_;var t=At(),n=kt(),r=Ot(),i=Ot();function a(e){let n=(0,t.validateBasic)(e);r.validateObject(n,{a:`field`,b:`field`},{allowedPrivateKeyLengths:`array`,wrapPrivateKey:`boolean`,isTorsionFree:`function`,clearCofactor:`function`,allowInfinityPoint:`boolean`,fromBytes:`function`,toBytes:`function`});let{endo:i,Fp:a,a:o}=n;if(i){if(!a.eql(o,a.ZERO))throw Error(`Endomorphism can only be defined for Koblitz curves that have a=0`);if(typeof i!=`object`||typeof i.beta!=`bigint`||typeof i.splitScalar!=`function`)throw Error(`Expected endomorphism with beta: bigint and splitScalar: function`)}return Object.freeze({...n})}var{bytesToNumberBE:o,hexToBytes:s}=r;e.DER={Err:class extends Error{constructor(e=``){super(e)}},_parseInt(t){let{Err:n}=e.DER;if(t.length<2||t[0]!==2)throw new n(`Invalid signature integer tag`);let r=t[1],i=t.subarray(2,r+2);if(!r||i.length!==r)throw new n(`Invalid signature integer: wrong length`);if(i[0]&128)throw new n(`Invalid signature integer: negative`);if(i[0]===0&&!(i[1]&128))throw new n(`Invalid signature integer: unnecessary leading zero`);return{d:o(i),l:t.subarray(r+2)}},toSig(t){let{Err:n}=e.DER,i=typeof t==`string`?s(t):t;r.abytes(i);let a=i.length;if(a<2||i[0]!=48)throw new n(`Invalid signature tag`);if(i[1]!==a-2)throw new n(`Invalid signature: incorrect length`);let{d:o,l:c}=e.DER._parseInt(i.subarray(2)),{d:l,l:u}=e.DER._parseInt(c);if(u.length)throw new n(`Invalid signature: left bytes after parsing`);return{r:o,s:l}},hexFromSig(e){let t=e=>Number.parseInt(e[0],16)&8?`00`+e:e,n=e=>{let t=e.toString(16);return t.length&1?`0${t}`:t},r=t(n(e.s)),i=t(n(e.r)),a=r.length/2,o=i.length/2,s=n(a),c=n(o);return`30${n(o+a+4)}02${c}${i}02${s}${r}`}};var c=BigInt(0),l=BigInt(1),u=BigInt(2),d=BigInt(3),f=BigInt(4);function p(e){let o=a(e),{Fp:s}=o,u=o.toBytes||((e,t,n)=>{let i=t.toAffine();return r.concatBytes(Uint8Array.from([4]),s.toBytes(i.x),s.toBytes(i.y))}),f=o.fromBytes||(e=>{let t=e.subarray(1);return{x:s.fromBytes(t.subarray(0,s.BYTES)),y:s.fromBytes(t.subarray(s.BYTES,2*s.BYTES))}});function p(e){let{a:t,b:n}=o,r=s.sqr(e),i=s.mul(r,e);return s.add(s.add(i,s.mul(e,t)),n)}if(!s.eql(s.sqr(o.Gy),p(o.Gx)))throw Error(`bad generator point: equation left != right`);function m(e){return typeof e==`bigint`&&c<e&&e<o.n}function h(e){if(!m(e))throw Error(`Expected valid bigint: 0 < bigint < curve.n`)}function g(e){let{allowedPrivateKeyLengths:t,nByteLength:a,wrapPrivateKey:s,n:c}=o;if(t&&typeof e!=`bigint`){if(r.isBytes(e)&&(e=r.bytesToHex(e)),typeof e!=`string`||!t.includes(e.length))throw Error(`Invalid key`);e=e.padStart(a*2,`0`)}let l;try{l=typeof e==`bigint`?e:r.bytesToNumberBE((0,i.ensureBytes)(`private key`,e,a))}catch{throw Error(`private key must be ${a} bytes, hex or bigint, not ${typeof e}`)}return s&&(l=n.mod(l,c)),h(l),l}let _=new Map;function v(e){if(!(e instanceof y))throw Error(`ProjectivePoint expected`)}class y{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,e==null||!s.isValid(e))throw Error(`x required`);if(t==null||!s.isValid(t))throw Error(`y required`);if(n==null||!s.isValid(n))throw Error(`z required`)}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!s.isValid(t)||!s.isValid(n))throw Error(`invalid affine point`);if(e instanceof y)throw Error(`projective point not allowed`);let r=e=>s.eql(e,s.ZERO);return r(t)&&r(n)?y.ZERO:new y(t,n,s.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=s.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(y.fromAffine)}static fromHex(e){let t=y.fromAffine(f((0,i.ensureBytes)(`pointHex`,e)));return t.assertValidity(),t}static fromPrivateKey(e){return y.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,_.delete(this)}
8assertValidity(){if(this.is0()){if(o.allowInfinityPoint&&!s.is0(this.py))return;throw Error(`bad point: ZERO`)}let{x:e,y:t}=this.toAffine();if(!s.isValid(e)||!s.isValid(t))throw Error(`bad point: x or y not FE`);let n=s.sqr(t),r=p(e);if(!s.eql(n,r))throw Error(`bad point: equation left != right`);if(!this.isTorsionFree())throw Error(`bad point: not in prime-order subgroup`)}hasEvenY(){let{y:e}=this.toAffine();if(s.isOdd)return!s.isOdd(e);throw Error(`Field doesn't support isOdd`)}equals(e){v(e);let{px:t,py:n,pz:r}=this,{px:i,py:a,pz:o}=e,c=s.eql(s.mul(t,o),s.mul(i,r)),l=s.eql(s.mul(n,o),s.mul(a,r));return c&&l}negate(){return new y(this.px,s.neg(this.py),this.pz)}double(){let{a:e,b:t}=o,n=s.mul(t,d),{px:r,py:i,pz:a}=this,c=s.ZERO,l=s.ZERO,u=s.ZERO,f=s.mul(r,r),p=s.mul(i,i),m=s.mul(a,a),h=s.mul(r,i);return h=s.add(h,h),u=s.mul(r,a),u=s.add(u,u),c=s.mul(e,u),l=s.mul(n,m),l=s.add(c,l),c=s.sub(p,l),l=s.add(p,l),l=s.mul(c,l),c=s.mul(h,c),u=s.mul(n,u),m=s.mul(e,m),h=s.sub(f,m),h=s.mul(e,h),h=s.add(h,u),u=s.add(f,f),f=s.add(u,f),f=s.add(f,m),f=s.mul(f,h),l=s.add(l,f),m=s.mul(i,a),m=s.add(m,m),f=s.mul(m,h),c=s.sub(c,f),u=s.mul(m,p),u=s.add(u,u),u=s.add(u,u),new y(c,l,u)}add(e){v(e);let{px:t,py:n,pz:r}=this,{px:i,py:a,pz:c}=e,l=s.ZERO,u=s.ZERO,f=s.ZERO,p=o.a,m=s.mul(o.b,d),h=s.mul(t,i),g=s.mul(n,a),_=s.mul(r,c),b=s.add(t,n),x=s.add(i,a);b=s.mul(b,x),x=s.add(h,g),b=s.sub(b,x),x=s.add(t,r);let S=s.add(i,c);return x=s.mul(x,S),S=s.add(h,_),x=s.sub(x,S),S=s.add(n,r),l=s.add(a,c),S=s.mul(S,l),l=s.add(g,_),S=s.sub(S,l),f=s.mul(p,x),l=s.mul(m,_),f=s.add(l,f),l=s.sub(g,f),f=s.add(g,f),u=s.mul(l,f),g=s.add(h,h),g=s.add(g,h),_=s.mul(p,_),x=s.mul(m,x),g=s.add(g,_),_=s.sub(h,_),_=s.mul(p,_),x=s.add(x,_),h=s.mul(g,x),u=s.add(u,h),h=s.mul(S,x),l=s.mul(b,l),l=s.sub(l,h),h=s.mul(b,g),f=s.mul(S,f),f=s.add(f,h),new y(l,u,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(y.ZERO)}wNAF(e){return x.wNAFCached(this,_,e,e=>{let t=s.invertBatch(e.map(e=>e.pz));return e.map((e,n)=>e.toAffine(t[n])).map(y.fromAffine)})}multiplyUnsafe(e){let t=y.ZERO;if(e===c)return t;if(h(e),e===l)return this;let{endo:n}=o;if(!n)return x.unsafeLadder(this,e);let{k1neg:r,k1:i,k2neg:a,k2:u}=n.splitScalar(e),d=t,f=t,p=this;for(;i>c||u>c;)i&l&&(d=d.add(p)),u&l&&(f=f.add(p)),p=p.double(),i>>=l,u>>=l;return r&&(d=d.negate()),a&&(f=f.negate()),f=new y(s.mul(f.px,n.beta),f.py,f.pz),d.add(f)}multiply(e){h(e);let t=e,n,r,{endo:i}=o;if(i){let{k1neg:e,k1:a,k2neg:o,k2:c}=i.splitScalar(t),{p:l,f:u}=this.wNAF(a),{p:d,f}=this.wNAF(c);l=x.constTimeNegate(e,l),d=x.constTimeNegate(o,d),d=new y(s.mul(d.px,i.beta),d.py,d.pz),n=l.add(d),r=u.add(f)}else{let{p:e,f:i}=this.wNAF(t);n=e,r=i}return y.normalizeZ([n,r])[0]}multiplyAndAddUnsafe(e,t,n){let r=y.BASE,i=(e,t)=>t===c||t===l||!e.equals(r)?e.multiplyUnsafe(t):e.multiply(t),a=i(this,t).add(i(e,n));return a.is0()?void 0:a}toAffine(e){let{px:t,py:n,pz:r}=this,i=this.is0();e??(e=i?s.ONE:s.inv(r));let a=s.mul(t,e),o=s.mul(n,e),c=s.mul(r,e);if(i)return{x:s.ZERO,y:s.ZERO};if(!s.eql(c,s.ONE))throw Error(`invZ was invalid`);return{x:a,y:o}}isTorsionFree(){let{h:e,isTorsionFree:t}=o;if(e===l)return!0;if(t)return t(y,this);throw Error(`isTorsionFree() has not been declared for the elliptic curve`)}clearCofactor(){let{h:e,clearCofactor:t}=o;return e===l?this:t?t(y,this):this.multiplyUnsafe(o.h)}toRawBytes(e=!0){return this.assertValidity(),u(y,this,e)}toHex(e=!0){return r.bytesToHex(this.toRawBytes(e))}}y.BASE=new y(o.Gx,o.Gy,s.ONE),y.ZERO=new y(s.ZERO,s.ONE,s.ZERO);let b=o.nBitLength,x=(0,t.wNAF)(y,o.endo?Math.ceil(b/2):b);return{CURVE:o,ProjectivePoint:y,normPrivateKeyToScalar:g,weierstrassEquation:p,isWithinCurveOrder:m}}function m(e){let n=(0,t.validateBasic)(e);return r.validateObject(n,{hash:`hash`,hmac:`function`,randomBytes:`function`},{bits2int:`function`,bits2int_modN:`function`,lowS:`boolean`}),Object.freeze({lowS:!0,...n})}function h(t){let a=m(t),{Fp:o,n:s}=a,u=o.BYTES+1,d=2*o.BYTES+1;function f(e){return c<e&&e<o.ORDER}function h(e){return n.mod(e,s)}function g(e){return n.invert(e,s)}let{ProjectivePoint:_,normPrivateKeyToScalar:v,weierstrassEquation:y,isWithinCurveOrder:b}
8=p({...a,toBytes(e,t,n){let i=t.toAffine(),a=o.toBytes(i.x),s=r.concatBytes;return n?s(Uint8Array.from([t.hasEvenY()?2:3]),a):s(Uint8Array.from([4]),a,o.toBytes(i.y))},fromBytes(e){let t=e.length,n=e[0],i=e.subarray(1);if(t===u&&(n===2||n===3)){let e=r.bytesToNumberBE(i);if(!f(e))throw Error(`Point is not on curve`);let t=y(e),a;try{a=o.sqrt(t)}catch(e){let t=e instanceof Error?`: `+e.message:``;throw Error(`Point is not on curve`+t)}let s=(a&l)===l;return(n&1)==1!==s&&(a=o.neg(a)),{x:e,y:a}}else if(t===d&&n===4)return{x:o.fromBytes(i.subarray(0,o.BYTES)),y:o.fromBytes(i.subarray(o.BYTES,2*o.BYTES))};else throw Error(`Point of length ${t} was invalid. Expected ${u} compressed bytes or ${d} uncompressed bytes`)}}),x=e=>r.bytesToHex(r.numberToBytesBE(e,a.nByteLength));function S(e){return e>s>>l}function C(e){return S(e)?h(-e):e}let w=(e,t,n)=>r.bytesToNumberBE(e.slice(t,n));class T{constructor(e,t,n){this.r=e,this.s=t,this.recovery=n,this.assertValidity()}static fromCompact(e){let t=a.nByteLength;return e=(0,i.ensureBytes)(`compactSignature`,e,t*2),new T(w(e,0,t),w(e,t,2*t))}static fromDER(t){let{r:n,s:r}=e.DER.toSig((0,i.ensureBytes)(`DER`,t));return new T(n,r)}assertValidity(){if(!b(this.r))throw Error(`r must be 0 < r < CURVE.n`);if(!b(this.s))throw Error(`s must be 0 < s < CURVE.n`)}addRecoveryBit(e){return new T(this.r,this.s,e)}recoverPublicKey(e){let{r:t,s:n,recovery:r}=this,s=j((0,i.ensureBytes)(`msgHash`,e));if(r==null||![0,1,2,3].includes(r))throw Error(`recovery id invalid`);let c=r===2||r===3?t+a.n:t;if(c>=o.ORDER)throw Error(`recovery id 2 or 3 invalid`);let l=r&1?`03`:`02`,u=_.fromHex(l+x(c)),d=g(c),f=h(-s*d),p=h(n*d),m=_.BASE.multiplyAndAddUnsafe(u,f,p);if(!m)throw Error(`point at infinify`);return m.assertValidity(),m}hasHighS(){return S(this.s)}normalizeS(){return this.hasHighS()?new T(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return r.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return r.hexToBytes(this.toCompactHex())}toCompactHex(){return x(this.r)+x(this.s)}}let E={isValidPrivateKey(e){try{return v(e),!0}catch{return!1}},normPrivateKeyToScalar:v,randomPrivateKey:()=>{let e=n.getMinHashLength(a.n);return n.mapHashToField(a.randomBytes(e),a.n)},precompute(e=8,t=_.BASE){return t._setWindowSize(e),t.multiply(BigInt(3)),t}};function D(e,t=!0){return _.fromPrivateKey(e).toRawBytes(t)}function O(e){let t=r.isBytes(e),n=typeof e==`string`,i=(t||n)&&e.length;return t?i===u||i===d:n?i===2*u||i===2*d:e instanceof _}function k(e,t,n=!0){if(O(e))throw Error(`first arg must be private key`);if(!O(t))throw Error(`second arg must be public key`);return _.fromHex(t).multiply(v(e)).toRawBytes(n)}let A=a.bits2int||function(e){let t=r.bytesToNumberBE(e),n=e.length*8-a.nBitLength;return n>0?t>>BigInt(n):t},j=a.bits2int_modN||function(e){return h(A(e))},M=r.bitMask(a.nBitLength);function N(e){if(typeof e!=`bigint`)throw Error(`bigint expected`);if(!(c<=e&&e<M))throw Error(`bigint expected < 2^${a.nBitLength}`);return r.numberToBytesBE(e,a.nByteLength)}function P(e,t,n=F){if([`recovered`,`canonical`].some(e=>e in n))throw Error(`sign() legacy options not supported`);let{hash:s,randomBytes:u}=a,{lowS:d,prehash:f,extraEntropy:p}=n;d??(d=!0),e=(0,i.ensureBytes)(`msgHash`,e),f&&(e=(0,i.ensureBytes)(`prehashed msgHash`,s(e)));let m=j(e),y=v(t),x=[N(y),N(m)];if(p!=null&&p!==!1){let e=p===!0?u(o.BYTES):p;x.push((0,i.ensureBytes)(`extraEntropy`,e))}let w=r.concatBytes(...x),E=m;function D(e){let t=A(e);if(!b(t))return;let n=g(t),r=_.BASE.multiply(t).toAffine(),i=h(r.x);if(i===c)return;let a=h(n*h(E+i*y));if(a===c)return;let o=(r.x===i?0:2)|Number(r.y&l),s=a;return d&&S(a)&&(s=C(a),o^=1),new T(i,s,o)}return{seed:w,k2sig:D}}let F={lowS:a.lowS,prehash:!1},I={lowS:a.lowS,prehash:!1};function L(e,t,n=F){let{seed:i,k2sig:o}=P(e,t,n),s=a;return r.createHmacDrbg(s.hash.outputLen,s.nByteLength,s.hmac)(i,o)}_.BASE._setWindowSize(8);function R(t,n,o,s=I){let c=t;if(n=(0,i.ensureBytes)(`msgHash`,n),o=(0,i.ensureBytes)(`publicKey`,o),`strict`in s)throw Error(`options.strict was renamed to lowS`);let{lowS:l,prehash:u}=s,d,f;try{if(typeof c==`string`||r.isBytes(c))try{d=T.fromDER(c)}catch(t){if(!(t instanceof e.DER.Err))throw t;d=T.fromCompact(c)}else if(typeof c==`object`&&typeof c.r==`bigint`&&typeof c.s==`bigint`){let{r
8:e,s:t}=c;d=new T(e,t)}else throw Error(`PARSE`);f=_.fromHex(o)}catch(e){if(e.message===`PARSE`)throw Error(`signature must be Signature instance, Uint8Array or hex string`);return!1}if(l&&d.hasHighS())return!1;u&&(n=a.hash(n));let{r:p,s:m}=d,v=j(n),y=g(m),b=h(v*y),x=h(p*y),S=_.BASE.multiplyAndAddUnsafe(f,b,x)?.toAffine();return S?h(S.x)===p:!1}return{CURVE:a,getPublicKey:D,getSharedSecret:k,sign:L,verify:R,ProjectivePoint:_,Signature:T,utils:E}}function g(e,t){let n=e.ORDER,r=c;for(let e=n-l;e%u===c;e/=u)r+=l;let i=r,a=u<<i-l-l,o=a*u,s=(n-l)/o,p=(s-l)/u,m=o-l,h=a,g=e.pow(t,s),_=e.pow(t,(s+l)/u),v=(t,n)=>{let r=g,a=e.pow(n,m),o=e.sqr(a);o=e.mul(o,n);let s=e.mul(t,o);s=e.pow(s,p),s=e.mul(s,a),a=e.mul(s,n),o=e.mul(s,t);let c=e.mul(o,a);s=e.pow(c,h);let d=e.eql(s,e.ONE);a=e.mul(o,_),s=e.mul(c,r),o=e.cmov(a,o,d),c=e.cmov(s,c,d);for(let t=i;t>l;t--){let n=t-u;n=u<<n-l;let i=e.pow(c,n),s=e.eql(i,e.ONE);a=e.mul(o,r),r=e.mul(r,r),i=e.mul(c,r),o=e.cmov(a,o,s),c=e.cmov(i,c,s)}return{isValid:d,value:o}};if(e.ORDER%f===d){let n=(e.ORDER-d)/f,r=e.sqrt(e.neg(t));v=(t,i)=>{let a=e.sqr(i),o=e.mul(t,i);a=e.mul(a,o);let s=e.pow(a,n);s=e.mul(s,o);let c=e.mul(s,r),l=e.mul(e.sqr(s),i),u=e.eql(l,t);return{isValid:u,value:e.cmov(c,s,u)}}}return v}function _(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw Error(`mapToCurveSimpleSWU: invalid opts`);let r=g(e,t.Z);if(!e.isOdd)throw Error(`Fp.isOdd is not implemented!`);return n=>{let i,a,o,s,c,l,u,d;i=e.sqr(n),i=e.mul(i,t.Z),a=e.sqr(i),a=e.add(a,i),o=e.add(a,e.ONE),o=e.mul(o,t.B),s=e.cmov(t.Z,e.neg(a),!e.eql(a,e.ZERO)),s=e.mul(s,t.A),a=e.sqr(o),l=e.sqr(s),c=e.mul(l,t.A),a=e.add(a,c),a=e.mul(a,o),l=e.mul(l,s),c=e.mul(l,t.B),a=e.add(a,c),u=e.mul(i,o);let{isValid:f,value:p}=r(a,l);d=e.mul(i,n),d=e.mul(d,p),u=e.cmov(u,o,f),d=e.cmov(d,p,f);let m=e.isOdd(n)===e.isOdd(d);return d=e.cmov(e.neg(d),d,m),u=e.div(u,s),{x:u,y:d}}}})),Mt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getHash=i,e.createCurve=a;var t=Dt(),n=wt(),r=jt();function i(e){return{hash:e,hmac:(r,...i)=>(0,t.hmac)(e,r,(0,n.concatBytes)(...i)),randomBytes:n.randomBytes}}function a(e,t){let n=t=>(0,r.weierstrass)({...e,...i(t)});return Object.freeze({...n(t),create:n})}})),Nt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.expand_message_xmd=s,e.expand_message_xof=c,e.hash_to_field=l,e.isogenyMap=u,e.createHasher=d;var t=kt(),n=Ot(),r=n.bytesToNumberBE;function i(e,t){if(e<0||e>=1<<8*t)throw Error(`bad I2OSP call: value=${e} length=${t}`);let n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=e&255,e>>>=8;return new Uint8Array(n)}function a(e,t){let n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function o(e){if(!Number.isSafeInteger(e))throw Error(`number expected`)}function s(e,t,r,s){(0,n.abytes)(e),(0,n.abytes)(t),o(r),t.length>255&&(t=s((0,n.concatBytes)((0,n.utf8ToBytes)(`H2C-OVERSIZE-DST-`),t)));let{outputLen:c,blockLen:l}=s,u=Math.ceil(r/c);if(u>255)throw Error(`Invalid xmd length`);let d=(0,n.concatBytes)(t,i(t.length,1)),f=i(0,l),p=i(r,2),m=Array(u),h=s((0,n.concatBytes)(f,e,p,i(0,1),d));m[0]=s((0,n.concatBytes)(h,i(1,1),d));for(let e=1;e<=u;e++){let t=[a(h,m[e-1]),i(e+1,1),d];m[e]=s((0,n.concatBytes)(...t))}return(0,n.concatBytes)(...m).slice(0,r)}function c(e,t,r,a,s){if((0,n.abytes)(e),(0,n.abytes)(t),o(r),t.length>255){let e=Math.ceil(2*a/8);t=s.create({dkLen:e}).update((0,n.utf8ToBytes)(`H2C-OVERSIZE-DST-`)).update(t).digest()}if(r>65535||t.length>255)throw Error(`expand_message_xof: invalid lenInBytes`);return s.create({dkLen:r}).update(e).update(i(r,2)).update(t).update(i(t.length,1)).digest()}function l(e,i,a){(0,n.validateObject)(a,{DST:`stringOrUint8Array`,p:`bigint`,m:`isSafeInteger`,k:`isSafeInteger`,hash:`hash`});let{p:l,k:u,m:d,hash:f,expand:p,DST:m}=a;(0,n.abytes)(e),o(i);let h=typeof m==`string`?(0,n.utf8ToBytes)(m):m,g=l.toString(2).length,_=Math.ceil((g+u)/8),v=i*d*_,y;if(p===`xmd`)y=s(e,h,v,f);else if(p===`xof`)y=c(e,h,v,u,f);else if(p===`_internal_pass`)y=e;else throw Error(`expand must be "xmd" or "xof"`);let b=Array(i);for(let e=0;e<i;e++){let n=Array(d);for(let i=0;i<d;i++){let a=_*(i+e*d),o=y.subarray(a,a+_);n[i]=(0,t.mod)(r(o),l)}b[e]=n}return b}function u(e,t){let n=t.map(e=>Array.from(e).reverse());return(t,r)=>{let[i,a,o,s]=n.map(n=>n.reduce((n,r)=>e.add(e.mul(n,t),r)));return t=e.div(i,a),r=e.mul(r,e.div(o,s)),{x:t,y:r}}}function d(e,t,n){if(typeof t!=`function`)throw Error(`mapToCurve() must be defined`);return{hashToCurve(r,i){let a=l(r,2,{...n,DST:n.DST,...i}),o=e.fromAffine(t(a[0])),s=e.fromAffine(t(a[1])),c=o.add(s).clearCofactor();return c.assertValidity(),c},encodeToCurve(r,i){let a=l(r,1,{...n,DST:n.encodeDST,...i}),o=e.fromAffine(t(a[0])).clearCofactor();return o.assertValidity(),o},mapToCurve(n){if(!Array.isArray(n))throw Error(`mapToCurve: expected array of bigints`);for(let e of n)if(typeof e!=`bigint`)throw Error(`mapToCurve: expected array of bigints, got ${e} in array`);let r=e.fromAffine(t(n)).clearCofactor();return r.assertValidity(),r}}}})),Pt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;var t=Et(),n=wt(),r=Mt(),i=Nt(),a=kt(),o=Ot(),s=jt(),c=BigInt(`0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f`),l=BigInt(`0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141`),u=BigInt(1),d=BigInt(2),f=(e,t)=>(e+t/d)/t;function p(e){let t=c,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),l=BigInt(44),u=BigInt(88),f=e*e*e%t,p=f*f*e%t,h=(0,a.pow2)(p,n,t)*p%t,g=(0,a.pow2)(h,n,t)*p%t,_=(0,a.pow2)(g,d,t)*f%t,v=(0,a.pow2)(_,i,t)*_%t,y=(0,a.pow2)(v,o,t)*v%t,b=(0,a.pow2)(y,l,t)*y%t,x=(0,a.pow2)(b,u,t)*b%t,S=(0,a.pow2)(x,l,t)*y%t,C=(0,a.pow2)(S,n,t)*p%t,w=(0,a.pow2)(C,s,t)*v%t,T=(0,a.pow2)(w,r,t)*f%t,E=(0,a.pow2)(T,d,t);if(!m.eql(m.sqr(E),e))throw Error(`Cannot find square root`);return E}var m=(0,a.Field)(c,void 0,void 0,{sqrt:p});e.secp256k1=(0,r.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:l,Gx:BigInt(`55066263022277343669578718895168534326250603453777594175500187360389116729240`),Gy:BigInt(`32670510020758816978083085130507043184471273380659243275938904335757337482424`),h:BigInt(1),lowS:!0,endo:{beta:BigInt(`0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee`),splitScalar:e=>{let t=l,n=BigInt(`0x3086d221a7d46bcde86c90e49284eb15`),r=-u*BigInt(`0xe4437ed6010e88286f547fa90abfe4c3`),i=BigInt(`0x114ca50f7a8e2f3f657c1108d9d44cfd8`),o=n,s=BigInt(`0x100000000000000000000000000000000`),c=f(o*e,t),d=f(-r*e,t),p=(0,a.mod)(e-c*n-d*i,t),m=(0,a.mod)(-c*r-d*o,t),h=p>s,g=m>s;
8if(h&&(p=t-p),g&&(m=t-m),p>s||m>s)throw Error(`splitScalar: Endomorphism failed, k=`+e);return{k1neg:h,k1:p,k2neg:g,k2:m}}}},t.sha256);var h=BigInt(0),g=e=>typeof e==`bigint`&&h<e&&e<c,_=e=>typeof e==`bigint`&&h<e&&e<l,v={};function y(e,...n){let r=v[e];if(r===void 0){let n=(0,t.sha256)(Uint8Array.from(e,e=>e.charCodeAt(0)));r=(0,o.concatBytes)(n,n),v[e]=r}return(0,t.sha256)((0,o.concatBytes)(r,...n))}var b=e=>e.toRawBytes(!0).slice(1),x=e=>(0,o.numberToBytesBE)(e,32),S=e=>(0,a.mod)(e,c),C=e=>(0,a.mod)(e,l),w=e.secp256k1.ProjectivePoint,T=(e,t,n)=>w.BASE.multiplyAndAddUnsafe(e,t,n);function E(t){let n=e.secp256k1.utils.normPrivateKeyToScalar(t),r=w.fromPrivateKey(n);return{scalar:r.hasEvenY()?n:C(-n),bytes:b(r)}}function D(e){if(!g(e))throw Error(`bad x: need 0 < x < p`);let t=p(S(S(e*e)*e+BigInt(7)));t%d!==h&&(t=S(-t));let n=new w(e,t,u);return n.assertValidity(),n}function O(...e){return C((0,o.bytesToNumberBE)(y(`BIP0340/challenge`,...e)))}function k(e){return E(e).bytes}function A(e,t,r=(0,n.randomBytes)(32)){let i=(0,o.ensureBytes)(`message`,e),{bytes:a,scalar:s}=E(t),c=(0,o.ensureBytes)(`auxRand`,r,32),l=y(`BIP0340/nonce`,x(s^(0,o.bytesToNumberBE)(y(`BIP0340/aux`,c))),a,i),u=C((0,o.bytesToNumberBE)(l));if(u===h)throw Error(`sign failed: k is zero`);let{bytes:d,scalar:f}=E(u),p=O(d,a,i),m=new Uint8Array(64);if(m.set(d,0),m.set(x(C(f+p*s)),32),!j(m,i,a))throw Error(`sign: Invalid signature produced`);return m}function j(e,t,n){let r=(0,o.ensureBytes)(`signature`,e,64),i=(0,o.ensureBytes)(`message`,t),a=(0,o.ensureBytes)(`publicKey`,n,32);try{let e=D((0,o.bytesToNumberBE)(a)),t=(0,o.bytesToNumberBE)(r.subarray(0,32));if(!g(t))return!1;let n=(0,o.bytesToNumberBE)(r.subarray(32,64));if(!_(n))return!1;let s=T(e,n,C(-O(x(t),b(e),i)));return!(!s||!s.hasEvenY()||s.toAffine().x!==t)}catch{return!1}}e.schnorr={getPublicKey:k,sign:A,verify:j,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:D,pointToBytes:b,numberToBytesBE:o.numberToBytesBE,bytesToNumberBE:o.bytesToNumberBE,taggedHash:y,mod:a.mod}};var M=(0,i.isogenyMap)(m,[[`0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7`,`0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581`,`0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262`,`0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c`],[`0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b`,`0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14`,`0x0000000000000000000000000000000000000000000000000000000000000001`],[`0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c`,`0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3`,`0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931`,`0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84`],[`0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b`,`0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573`,`0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f`,`0x0000000000000000000000000000000000000000000000000000000000000001`]].map(e=>e.map(e=>BigInt(e)))),N=(0,s.mapToCurveSimpleSWU)(m,{A:BigInt(`0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533`),B:BigInt(`1771`),Z:m.create(BigInt(`-11`))}),P=(0,i.createHasher)(e.secp256k1.ProjectivePoint,e=>{let{x:t,y:n}=N(m.create(e[0]));return M(t,n)},{DST:`secp256k1_XMD:SHA-256_SSWU_RO_`,encodeDST:`secp256k1_XMD:SHA-256_SSWU_NU_`,p:m.ORDER,m:1,k:128,expand:`xmd`,hash:t.sha256});e.hashToCurve=P.hashToCurve,e.encodeToCurve=P.encodeToCurve})),Ft=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.secp256k1=void 0;var t=Pt();Object.defineProperty(e,`secp256k1`,{enumerable:!0,get:function(){return t.secp256k1}})})),It=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.recoverPublicKey=r,e.recoverAddressFromEthSignature=a,e.sign=o,e.createEthereumMessageHash=s,e.ethSign=c,e.computeAddress=l,e.createUnsafeIdentity=u;var t=bt(),n=Ft();function r(e,t){if(e.length!==65)throw Error(`Invalid signature length `+e.length);let r=e[64];if(r!==27&&r!==28)throw Error(`Invalid signature recovery value: ${r}
8. Expected 27 or 28.`);let i=e.slice(0,e.length-1),a=+(r===28);return n.secp256k1.Signature.fromCompact(i).addRecoveryBit(a).recoverPublicKey(t).toRawBytes(!1).slice(1)}function i(e){if(e.length!==65)throw Error(`Invalid ethereum signature`);let t=e[64];if(t===0||t===1){let n=new Uint8Array(e);return n[64]=t+27,n}return e}function a(e,n){if(typeof e==`string`){if((0,t.isHex)(e))return a((0,t.hexToBytes)(e),n);throw Error(`String signatures must be encoded in hex`)}return l(r(i(e),s(n)))}function o(e,t){let r=n.secp256k1.sign(t,e),i=r.recovery===1?`1c`:`1b`;return`0x`+r.toCompactHex()+i}function s(e){let n=typeof e==`string`?(0,t.stringToUtf8Bytes)(e):e,r=(0,t.concatBytes)((0,t.stringToUtf8Bytes)(`�Ethereum Signed Message:
9`),(0,t.stringToUtf8Bytes)(String(n.length)),n);return(0,t.hexToBytes)((0,t.sha3)(r))}function c(e,t){return o(e,s(t))}function l(e){let n;if(e.length===65&&e[0]===4)n=e.slice(1);else if(e.length===64)n=e;else throw Error(`Invalid public key length: ${e.length}. Expected 64 bytes, or 65 bytes with a leading 0x04 uncompressed prefix.`);return(0,t.getAddress)((0,t.sha3)(n).substring(24))}function u(){let e=n.secp256k1.utils.randomPrivateKey(),r=n.secp256k1.getPublicKey(e,!1).slice(1),i=l(r);return{privateKey:(0,t.bytesToHex)(e),publicKey:(0,t.bytesToHex)(r),address:i}}})),Lt=r((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0});var t=bt();e.default=class{constructor(e,t=!0){i(this,`requestManager`,void 0),i(this,`checkedBlocks`,void 0),i(this,`saveBlocks`,void 0),i(this,`savedBlocks`,void 0),i(this,`requests`,void 0),i(this,`blockTime`,void 0),i(this,`firstTimestamp`,void 0),this.requestManager=e,this.checkedBlocks={},this.saveBlocks=t,this.savedBlocks={},this.requests=0}async fillBlockTime(){let e=await this.getBlockWrapper(`latest`),t=await this.getBlockWrapper(1);return this.blockTime=(e.timestamp-t.timestamp)/(Number(e.number)-1),this.firstTimestamp=t.timestamp,{blockTime:this.blockTime,firstTimestamp:this.firstTimestamp}}async getDate(e,n=!0){let r=e/1e3,i=Date.now()/1e3,a=this.firstTimestamp,o=this.blockTime;if((a===void 0||o===void 0)&&({firstTimestamp:a,blockTime:o}=await this.fillBlockTime()),r<a)return{block:1,timestamp:r};let s=this.savedBlocks.latest;if(r>=i||s&&r>s.timestamp)return{block:(0,t.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:r};this.checkedBlocks[r]=[];let c=await this.getBlockWrapper(Math.ceil((r-a)/o));return{block:await this.findBetter(r,c,n,o),timestamp:r}}async findBetter(e,t,n,r){let i=r??this.blockTime??(await this.fillBlockTime()).blockTime;if(await this.isBetterBlock(e,t,n))return t.number;let a=e-t.timestamp,o=Math.ceil(a/i);o===0&&(o=a<0?-1:1);let s=await this.getBlockWrapper(this.getNextBlock(e,t.number,o));return i=Math.abs((t.timestamp-s.timestamp)/(t.number-s.number)),this.findBetter(e,s,n,i)}async isBetterBlock(e,t,n){let r=t.timestamp;if(n){if(r<e)return!1;let n=await this.getBlockWrapper(t.number-1);if(r>=e&&n.timestamp<e)return!0}else{if(r>=e)return!1;let n=await this.getBlockWrapper(t.number+1);if(r<e&&n.timestamp>=e)return!0}return!1}getNextBlock(e,t,n){let r=t+n;if(this.checkedBlocks[e].includes(r)){let r=n<0?n+1:n-1;if(r===0)throw Error(`Could not find an unchecked block for timestamp ${e}`);return this.getNextBlock(e,t,r)}return this.checkedBlocks[e].push(r),r}async getBlockWrapper(e){if(!this.saveBlocks){let n=await this.requestManager.eth_getBlockByNumber(e,!1);return{number:(0,t.toBigNumber)(n.number).toNumber(),timestamp:(0,t.toBigNumber)(n.timestamp).toNumber()}}let n=e.toString();if(this.savedBlocks[n])return this.savedBlocks[n];if(typeof e==`number`&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=e)return this.savedBlocks.latest;let{timestamp:r}=await this.requestManager.eth_getBlockByNumber(e,!1);return this.savedBlocks[n]={number:(0,t.toBigNumber)(e===`latest`?await this.requestManager.eth_blockNumber():e).toNumber(),timestamp:(0,t.toBigNumber)(r).toNumber()},this.requests++,this.savedBlocks[n]}}})),Rt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.moveMinutes=t;function t(e){let t=new Date;return t.setMinutes(t.getMinutes()+e),t}})),$=r((e=>
9{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.validateType=e.generateLazyValidator=e.Ajv=void 0;var n=t(Ve());e.Ajv=n.default;var r=t(vt()),i=t(yt());function a(e,t){let a=null,o=(s,c)=>{if(!a){let s=new n.default({$data:!0,allErrors:!0});(0,r.default)(s),(0,i.default)(s,{singleError:!0}),t?.forEach(e=>s.addKeyword(e)),a=s.compile(e),Object.defineProperty(o,`errors`,{get(){return a?.errors}})}return a(s,c)};return o}e.generateLazyValidator=a;function o(e,t){return e.validate(t)}e.validateType=o})),zt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;var t=$();e.SCENE_UPDATE=`SCENE_UPDATE`,(function(n){n.schema={type:`object`,properties:{type:{type:`string`,enum:[e.SCENE_UPDATE]},payload:{type:`object`,properties:{sceneId:{type:`string`},sceneType:{type:`string`}},additionalProperties:!1,required:[`sceneId`,`sceneType`]}},required:[`payload`,`type`]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})),Bt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Update=e.UPDATE=void 0;var t=$();e.UPDATE=`update`,(function(n){n.schema={type:`object`,properties:{type:{type:`string`,enum:[e.UPDATE]}},required:[`type`]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Update||(e.Update={}))})),Vt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(zt(),e),n(Bt(),e)})),Ht=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ProjectType=void 0;var t=$();(function(e){e.SCENE=`scene`,e.SMART_ITEM=`smart-item`,e.PORTABLE_EXPERIENCE=`portable-experience`,e.LIBRARY=`library`})(e.ProjectType||(e.ProjectType={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.ProjectType||(e.ProjectType={}))})),Ut=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Rarity=void 0;var t=$();(function(e){e.UNIQUE=`unique`,e.MYTHIC=`mythic`,e.EXOTIC=`exotic`,e.LEGENDARY=`legendary`,e.EPIC=`epic`,e.RARE=`rare`,e.UNCOMMON=`uncommon`,e.COMMON=`common`})(e.Rarity||(e.Rarity={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema);let n={[e.UNIQUE]:1,[e.MYTHIC]:10,[e.EXOTIC]:50,[e.LEGENDARY]:100,[e.EPIC]:1e3,[e.RARE]:5e3,[e.UNCOMMON]:1e4,[e.COMMON]:1e5},r={[e.UNIQUE]:`#FFE617`,[e.MYTHIC]:`#FB7DE3`,[e.EXOTIC]:`#E4FFB8`,[e.LEGENDARY]:`#A657ED`,[e.EPIC]:`#6397F2`,[e.RARE]:`#3AD682`,[e.UNCOMMON]:`#FF8563`,[e.COMMON]:`#D4E0E0`},i={[e.UNIQUE]:`#FFB626`,[e.MYTHIC]:`#FF63E1`,[e.EXOTIC]:`#CAFF73`,[e.LEGENDARY]:`#842DDA`,[e.EPIC]:`#3D85E6`,[e.RARE]:`#36CF75`,[e.UNCOMMON]:`#ED6D4F`,[e.COMMON]:`#ABC1C1`};function a(e){return n[e]}e.getMaxSupply=a;function o(e){return i[e]}e.getColor=o;function s(){return[e.UNIQUE,e.MYTHIC,e.EXOTIC,e.LEGENDARY,e.EPIC,e.RARE,e.UNCOMMON,e.COMMON]}e.getRarities=s;function c(e){return[r[e],i[e]]}e.getGradient=c})(e.Rarity||(e.Rarity={}))})),Wt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WearableCategory=void 0;var t=$();(function(e){e.EYEBROWS=`eyebrows`,e.EYES=`eyes`,e.FACIAL_HAIR=`facial_hair`,e.HAIR=`hair`,e.BODY_SHAPE=`body_shape`,e.MOUTH=`mouth`,e.UPPER_BODY=`upper_body`,e.LOWER_BODY=`lower_body`,e.FEET=`feet`,e.EARRING=`earring`,e.EYEWEAR=`eyewear`,e.HAT=`hat`,e.HELMET=`helmet`,e.MASK=`mask`,e.TIARA=`tiara`,e.TOP_HEAD=`top_head`,e.SKIN=`skin`,e.HANDS_WEAR=`hands_wear`})(e.WearableCategory||(e.WearableCategory={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.WearableCategory||(e.WearableCategory={}))})),Gt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BodyShape=void 0;var t=$();(function(e){e.MALE=`urn:decentraland:off-chain:base-avatars:BaseMale`,e.FEMALE=`urn:decentraland:off-chain:base-avatars:BaseFemale`})(e.BodyShape||(e.BodyShape={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.BodyShape||(e.BodyShape={}))})),Kt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BodyPartCategory=void 0;var t=$();(function(e){e.HEAD=`head`,e.HANDS=`hands`})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})),qt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.HideableWearableCategory=void 0;var t=Wt(),n=$(),r=Kt();(function(e){e.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},r.BodyPartCategory.schema)]},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})),Jt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WearableRepresentation=void 0;var t=$(),n=Gt(),r=qt();(function(e){e.schema={type:`object`,properties:{bodyShapes:{type:`array`,items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:`string`,minLength:1},contents:{type:`array`,items:{type:`string`},minItems:1,uniqueItems:!0,contains:{const:{$data:`2/mainFile`}}},overrideHides:{type:`array`,items:r.HideableWearableCategory.schema},overrideReplaces:{type:`array`,items:r.HideableWearableCategory.schema}},required:[`bodyShapes`,`mainFile`,`contents`,`overrideHides`,`overrideReplaces`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})),Yt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;var t=$();(function(e){e.schema={type:`object`,required:[`r`,`g`,`b`],properties:{r:{type:`number`,minimum:0,maximum:1},g:{type:`number`,minimum:0,maximum:1},b:{type:`number`,minimum:0,maximum:1}}};let n=(0,t.generateLazyValidator)(e.schema);e.validate=e=>n(e)})(e.Color3||(e.Color3={})),(function(e){e.schema={type:`string`,pattern:`^0x[a-fA-F0-9]{40}$`};let t=new RegExp(e.schema.pattern);e.validate=e=>t.test(e)})(e.EthAddress||(e.EthAddress={})),(function(e){e.schema={type:`string`,pattern:`^(ba)[a-zA-Z0-9]{57}$`};let t=new RegExp(e.schema.pattern);e.validate=e=>t.test(e)})(e.IPFSv2||(e.IPFSv2={})),(function(e){e.schema={type:`string`,pattern:`^(Qm)[a-zA-Z0-9]{44}$`};let t=new RegExp(e.schema.pattern);e.validate=e=>t.test(e)})(e.IPFSv1||(e.IPFSv1={}))})),Xt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;var t=Wt(),n=Yt(),r=$(),i;(function(e){e.schema={type:`object`,required:[`face256`,`body`],properties:{face256:n.IPFSv2.schema,body:n.IPFSv2.schema}},e.validate=(0,r.generateLazyValidator)(e.schema)})(i=e.Snapshots||(e.Snapshots={}));var a;(function(e){e.schema={type:`object`,required:[`bodyShape`,`eyes`,`hair`,`skin`],properties:{bodyShape:{type:`string`}
9,eyes:{type:`object`,required:[`color`],properties:{color:n.Color3.schema}},hair:{type:`object`,required:[`color`],properties:{color:n.Color3.schema}},skin:{type:`object`,required:[`color`],properties:{color:n.Color3.schema}},wearables:{type:`array`,items:{type:`string`}},forceRender:{type:`array`,nullable:!0,items:t.WearableCategory.schema},emotes:{type:`array`,items:{type:`object`,properties:{slot:{type:`number`},urn:{type:`string`}},required:[`slot`,`urn`]},nullable:!0},snapshots:Object.assign(Object.assign({},i.schema),{nullable:!0})},additionalProperties:!0},e.validate=(0,r.generateLazyValidator)(e.schema)})(a=e.AvatarInfo||(e.AvatarInfo={}));var o;(function(e){e.schema={type:`string`,maxLength:2083,pattern:`^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$`};let t=new RegExp(e.schema.pattern,`i`);e.validate=e=>t.test(e)})(o=e.LinkUrl||(e.LinkUrl={}));var s;(function(e){e.schema={type:`object`,required:[`title`,`url`],properties:{title:{type:`string`},url:o.schema}}})(s=e.Link||(e.Link={})),(function(e){e.schema={type:`object`,required:[`name`,`description`,`ethAddress`,`version`,`tutorialStep`,`avatar`,`hasClaimedName`],properties:{userId:{type:`string`},name:{type:`string`},nameColor:Object.assign(Object.assign({},n.Color3.schema),{nullable:!0}),description:{type:`string`},links:{type:`array`,maxItems:5,items:s.schema,nullable:!0},country:{nullable:!0,type:`string`},employmentStatus:{nullable:!0,type:`string`},gender:{nullable:!0,type:`string`},pronouns:{nullable:!0,type:`string`},relationshipStatus:{nullable:!0,type:`string`},sexualOrientation:{nullable:!0,type:`string`},language:{nullable:!0,type:`string`},profession:{nullable:!0,type:`string`},birthdate:{nullable:!0,type:`number`},realName:{nullable:!0,type:`string`},hobbies:{nullable:!0,type:`string`},ethAddress:n.EthAddress.schema,version:{type:`number`},tutorialStep:{type:`number`},email:{type:`string`,nullable:!0},blocked:{type:`array`,items:{type:`string`},nullable:!0},muted:{type:`array`,items:{type:`string`},nullable:!0},interests:{type:`array`,items:{type:`string`},nullable:!0},hasClaimedName:{type:`boolean`},hasConnectedWeb3:{type:`boolean`,nullable:!0},avatar:a.schema},additionalProperties:!0},e.validate=(0,r.generateLazyValidator)(e.schema)})(e.Avatar||(e.Avatar={}))})),Zt=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Profile=void 0;var t=$(),n=Xt();(function(e){e.schema={type:`object`,required:[`avatars`],properties:{avatars:{type:`array`,items:n.Avatar.schema}},additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Profile||(e.Profile={}))})),Qt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Xt(),e),n(Zt(),e)})),$t=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;var t=$();e.toggles=[`enabled`,`disabled`],e.portableExperiencesToggles=[...e.toggles,`hideUi`],(function(n){n.schema={type:`object`,properties:{voiceChat:{type:`string`,enum:e.toggles,nullable:!0},portableExperiences:{type:`string`,enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(`, `)}`}},errorMessage:`valid options are ${e.toggles.join(`, `)}`,required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})),en=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WorldConfiguration=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{name:{type:`string`,nullable:!0},skybox:{type:`number`,nullable:!0},minimapVisible:{type:`boolean`,nullable:!0},miniMapConfig:{type:`object`,nullable:!0,properties:{visible:{type:`boolean`,nullable:!0},dataImage:{type:`string`,nullable:!0},estateImage:{type:`string`,nullable:!0}}},skyboxConfig:{type:`object`,nullable:!0,properties:{fixedTime:{type:`number`,nullable:!0},textures:{type:`array`,nullable:!0,items:{type:`string`},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:`customSkybox must be an array of 0, 1 or 6 strings`}}},fixedAdapter:{type:`string`,nullable:!0},placesConfig:{type:`object`,nullable:!0,properties:{optOut:{type:`boolean`,nullable:!0}}}},required:[]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})),tn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SceneParcels=void 0;var t=$();
9(function(e){e.schema={description:`Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.`,type:`object`,properties:{base:{type:`string`,pattern:`^-?[0-9]+,-?[0-9]+$`},parcels:{type:`array`,items:{type:`string`,pattern:`^-?[0-9]+,-?[0-9]+$`},minItems:1}},additionalProperties:!0,required:[`base`,`parcels`]},e.schemaValidator=(0,t.generateLazyValidator)(e.schema),e.validate=t=>e.schemaValidator(t)&&t.parcels.includes(t.base)})(e.SceneParcels||(e.SceneParcels={}))})),nn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.displayableProperties=void 0,e.displayableProperties={menuBarIcon:{description:`Name of the file used as icon for the MenuBar`,type:`string`,nullable:!0}}})),rn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Source=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{version:{type:`number`,nullable:!0},origin:{type:`string`},projectId:{type:`string`},point:{type:`object`,properties:{x:{type:`integer`},y:{type:`integer`}},nullable:!0,required:[`x`,`y`]},rotation:{type:`string`,enum:[`north`,`east`,`south`,`west`],nullable:!0},layout:{type:`object`,properties:{rows:{type:`integer`},cols:{type:`integer`}},nullable:!0,required:[`rows`,`cols`]},isEmpty:{type:`boolean`,nullable:!0}},additionalProperties:!0,required:[`origin`,`projectId`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Source||(e.Source={}))})),an=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SpawnPoint=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{name:{type:`string`,nullable:!0},position:{type:`object`,oneOf:[{$ref:`#single-position`},{$ref:`#multi-position`}],required:[`x`,`y`,`z`]},default:{type:`boolean`,nullable:!0},cameraTarget:{type:`object`,properties:{x:{type:`number`},y:{type:`number`},z:{type:`number`}},required:[`x`,`y`,`z`],nullable:!0}},required:[`position`],definitions:{"single-position":{$id:`#single-position`,type:`object`,properties:{x:{type:`number`},y:{type:`number`},z:{type:`number`}},required:[`x`,`y`,`z`]},"multi-position":{$id:`#multi-position`,type:`object`,properties:{x:{type:`array`,items:{type:`number`},minItems:1},y:{type:`array`,items:{type:`number`},minItems:1},z:{type:`array`,items:{type:`number`},minItems:1}},required:[`x`,`y`,`z`]}}},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})),on=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Scene=e.RequiredPermission=void 0;var t=$(),n=nn(),r=$t(),i=tn(),a=rn(),o=an(),s=en(),c;(function(e){e.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE=`ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE`,e.ALLOW_TO_TRIGGER_AVATAR_EMOTE=`ALLOW_TO_TRIGGER_AVATAR_EMOTE`,e.ALLOW_MEDIA_HOSTNAMES=`ALLOW_MEDIA_HOSTNAMES`,e.USE_WEB3_API=`USE_WEB3_API`,e.USE_FETCH=`USE_FETCH`,e.USE_WEBSOCKET=`USE_WEBSOCKET`,e.OPEN_EXTERNAL_LINK=`OPEN_EXTERNAL_LINK`})(c=e.RequiredPermission||(e.RequiredPermission={})),(function(e){e.schema={type:`object`,properties:Object.assign(Object.assign({isPortableExperience:{description:`Define the current scene as a Portable Experience`,type:`boolean`,nullable:!0},main:{description:`File that contains the entry point of the scene's code`,type:`string`,minLength:1},scene:i.SceneParcels.schema},n.displayableProperties),{display:{description:`Information related to how should this land be displayed apart from the normal rendering of the scene`,type:`object`,properties:{title:{description:`A name so other users can identify what the contents of this land should be`,type:`string`,nullable:!0},favicon:{description:`DEPRECATED. Allow the land owner to set up a favicon to this land`,type:`string`,nullable:!0},description:{description:`A description that will be shown on client's nav map when the scene is selected`,type:`string`,nullable:!0},navmapThumbnail:{type:`string`,nullable:!0}},nullable:!0,required:[]},owner:{type:`string`,nullable:!0},creator:{type:`string`,nullable:!0,description:`Wallet address of the creator of the scene`,pattern:`^(0x[a-fA-F0-9]{40})?$`,errorMessage:`Creator must be a valid wallet address`},contact:{description:`Describe different ways of contacting the land owner`,type:`object`,properties:{name:{type:`string`,nullable:!0},email:{type:`string`,nullable:!0},im:{type:`string`,nullable:!0},url:{type:`string`,nullable:!0}},nullable:!0,required:[]},tags:{type:`array`,items:{type:`string`,minLength:1},nullable:!0},source:Object.assign(Object.assign({},a.Source.schema),{nullable:!0}),spawnPoints:{type:`array`,items:o.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:`array`,items:{type:`string`,enum:Object.values(c)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},r.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},s.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:`array`,items:{type:`string`},nullable:!0}}),additionalProperties:!0,required:[`main`,`scene`],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:`array`,contains:{const:c.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:`array`,items:{type:`string`},nullable:!1,minItems:1}},required:[`allowedMediaHostnames`]},else:{properties:{allowedMediaHostnames:{type:[`null`,`array`],nullable:!0,maxItems:0}}}}}},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Scene||(e.Scene={}))})),sn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=$t();Object.defineProperty(e,`FeatureToggles`,{enumerable:!0,get:function(){return t.FeatureToggles}});var n=en();Object.defineProperty(e,`WorldConfiguration`,{enumerable:!0,get:function(){return n.WorldConfiguration}});var r=tn();Object.defineProperty(e,`SceneParcels`,{enumerable:!0,get:function(){return r.SceneParcels}});var i=on();Object.defineProperty(e,`Scene`,{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,`RequiredPermission`,{enumerable:!0,get:function(){return i.RequiredPermission}});var a=rn();Object.defineProperty(e,`Source`,{enumerable:!0,get:function(){return a.Source}});var o=an();Object.defineProperty(e,`SpawnPoint`,{enumerable:!0,get:function(){return o.SpawnPoint}})}
9)),cn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Locale=void 0;var t=$();(function(e){e.EN=`en`,e.ES=`es`})(e.Locale||(e.Locale={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Locale||(e.Locale={}))})),ln=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.I18N=void 0;var t=$(),n=cn();(function(e){e.schema={type:`object`,properties:{code:n.Locale.schema,text:{type:`string`}},additionalProperties:!0,required:[`code`,`text`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.I18N||(e.I18N={}))})),un=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Metrics=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{triangles:{type:`number`},materials:{type:`number`},textures:{type:`number`},meshes:{type:`number`},bodies:{type:`number`},entities:{type:`number`}},required:[`triangles`,`materials`,`textures`,`meshes`,`bodies`,`entities`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Metrics||(e.Metrics={}))})),dn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isStandard=e.standardProperties=void 0;var t=Ut(),n=$();e.standardProperties={collectionAddress:{type:`string`,nullable:!1},rarity:t.Rarity.schema};var r={type:`object`,properties:Object.assign({},e.standardProperties),required:[`collectionAddress`,`rarity`]},i=(0,n.generateLazyValidator)(r);function a(e){return i(e)}e.isStandard=a})),fn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MerkleProof=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{proof:{type:`array`,items:{type:`string`}},index:{type:`number`},hashingKeys:{type:`array`,items:{type:`string`}},entityHash:{type:`string`}},required:[`entityHash`,`hashingKeys`,`index`,`proof`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.MerkleProof||(e.MerkleProof={}))})),pn=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(fn(),e)})),mn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;var t=$(),n;(function(e){e.SINGLE=`single`,e.ANY=`any`,e.MULTIPLE=`multiple`,e.RANGE=`range`})(n=e.MappingType||(e.MappingType={}));var r;(function(e){e.MAINNET=`mainnet`,e.BASE_MAINNET=`base_mainnet`,e.BASE_SEPOLIA=`base_sepolia`,e.MONAD_MAINNET=`monad_mainnet`,e.MONAD_TESTNET=`monad_testnet`,e.APE_MAINNET=`ape_mainnet`,e.APE_CALDERA=`ape_caldera`,e.MATIC=`matic`,e.SEPOLIA=`sepolia`,e.AMOY=`amoy`})(r=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.SINGLE},id:{type:`string`,pattern:`^[0-9]+$`}},required:[`type`,`id`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var a;(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.ANY}},required:[`type`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(a=e.AnyMapping||(e.AnyMapping={}));var o;(function(e){e._fromLessThanOrEqualTo={keyword:`_fromLessThanOrEqualTo`,validate:function(e,t){if(!t||!t.from||!t.to)return!1;let{to:n,from:r}=t;return(typeof r!=`bigint`||typeof n!=`bigint`)&&(r=BigInt(r),n=BigInt(n)),r<=n},errors:!1},e.schema={type:`object`,properties:{type:{type:`string`,const:n.RANGE},from:{type:`string`,pattern:`^[0-9]+$`},to:{type:`string`,pattern:`^[0-9]+$`}},required:[`type`,`from`,`to`],additionalProperties:!1,_fromLessThanOrEqualTo:!0},e.validate=(0,t.generateLazyValidator)(e.schema,[e._fromLessThanOrEqualTo])})(o=e.RangeMapping||(e.RangeMapping={}));var s;(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.MULTIPLE},ids:{type:`array`,items:{type:`string`,pattern:`^[0-9]+$`},minItems:1,uniqueItems:!0}},required:[`type`,`ids`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(s=e.MultipleMapping||(e.MultipleMapping={}));var c;(function(e){e.schema={type:`object`,properties:{type:{type:`string`,enum:Object.values(n)}},required:[`type`],oneOf:[i.schema,a.schema,o.schema,s.schema]},e.validate=(0,t.generateLazyValidator)(e.schema,[o._fromLessThanOrEqualTo])})(c=e.Mapping||(e.Mapping={})),(function(e){e._isMappingsValid={keyword:`_isMappingsValid`,validate:function(e,t){try{u(t)}catch{return!1}return!0},errors:!1},e.innerSchema={type:`object`,patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:`array`,items:c.schema}},minProperties:1,required:[],additionalProperties:!1},e.schema={type:`object`,properties:Object.values(r).reduce((t,n)=>(t[n]=e.innerSchema,t),{}),minProperties:1,additionalProperties:!1,_isMappingsValid:!0},e.validate=(0,t.generateLazyValidator)(e.schema,[o._fromLessThanOrEqualTo,e._isMappingsValid])})(e.Mappings||(e.Mappings={}));
9var l=class extends Error{constructor(e,t,n){super(e),this.existingMapping=t,this.conflictingMapping=n}};e.AddMappingError=l;function u(e={}){let t={};for(let[n,r]of Object.entries(e)){t[n]={};for(let[e,t]of Object.entries(r))for(let r of t)u(n,e,r)}function r(){return JSON.parse(JSON.stringify(t))}function i(e,t,n){let r=BigInt(e);return r>=BigInt(t)&&r<=BigInt(n)}function a(e,t){switch(t.type){case n.SINGLE:return e.id===t.id;case n.MULTIPLE:return t.ids.includes(e.id);case n.RANGE:return i(e.id,t.from,t.to);default:return!1}}function o(e,t){switch(t.type){case n.SINGLE:return e.ids.includes(t.id);case n.MULTIPLE:return e.ids.some(e=>t.ids.includes(e));case n.RANGE:return e.ids.some(e=>i(e,t.from,t.to));default:return!1}}function s(e,t){switch(t.type){case n.SINGLE:return i(t.id,e.from,e.to);case n.MULTIPLE:return t.ids.some(t=>i(t,e.from,e.to));case n.RANGE:return BigInt(e.from)<=BigInt(t.to)&&BigInt(e.to)>=BigInt(t.from)}}function c(e,t){if(e.type===n.ANY||t.type===n.ANY)return!0;switch(e.type){case n.SINGLE:return a(e,t);case n.MULTIPLE:return o(e,t);case n.RANGE:return s(e,t)}}function u(e,n,r){let i=n.toLowerCase();t[e]=t[e]??{},t[e][i]=t[e][i]??[];for(let n of t[e][i])if(c(n,r))throw new l(`Cannot add mapping to contract ${i} on network ${e} because it overlaps with existing mapping`,n,r);t[e][i].push(r)}function d(e,r,i){return t[e]?.[r]?t[e][r].some(e=>{switch(e.type){case n.SINGLE:return e.id===i;case n.ANY:return!0;case n.MULTIPLE:return e.ids.includes(i);case n.RANGE:return BigInt(i)>=BigInt(e.from)&&BigInt(i)<=BigInt(e.to)}}):!1}return{addMapping:u,getMappings:r,includesNft:d}}e.createMappingsHelper=u})),hn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isThirdParty=e.schema=void 0;var t=$(),n=pn(),r=mn();e.schema={type:`object`,properties:{merkleProof:n.MerkleProof.schema,content:{type:`object`,nullable:!1,additionalProperties:{type:`string`},required:[]},mappings:Object.assign({nullable:!0},r.Mappings.schema)},required:[`merkleProof`,`content`],_containsHashingKeys:!0};var i=(0,t.generateLazyValidator)(e.schema,[{keyword:`_containsHashingKeys`,validate:function(e,t){let n=t;return n?.merkleProof?.hashingKeys?n.merkleProof.hashingKeys.every(e=>n.hasOwnProperty(e)):!1},errors:!1},r.RangeMapping._fromLessThanOrEqualTo,r.Mappings._isMappingsValid]);function a(e){return i(e)}e.isThirdParty=a})),gn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isBaseEmote=e.isBaseAvatar=e.requiredBaseItemProps=e.baseItemProperties=void 0;var t=ln(),n=un(),r=nn();e.baseItemProperties=Object.assign(Object.assign({},r.displayableProperties),{id:{type:`string`},name:{type:`string`},description:{type:`string`},i18n:{type:`array`,items:t.I18N.schema,minItems:1,uniqueItemProperties:[`code`],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:`string`},image:{type:`string`},metrics:Object.assign(Object.assign({},n.Metrics.schema),{nullable:!0})}),e.requiredBaseItemProps=[`id`,`name`,`description`,`i18n`,`thumbnail`,`image`];function i(e){if(!e||!e.id)return!1;let t=e.id.split(`:`),n=t[1]===`decentraland`,r=t[3]===`base-avatars`;return t.length===5&&n&&r}e.isBaseAvatar=i;function a(e){if(!e||!e.id)return!1;let t=e.id.split(`:`);return t.length===5&&t[1]===`decentraland`&&t[3]===`base-emotes`}e.isBaseEmote=a})),_n=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Wearable=void 0;var t=$(),n=Wt(),r=Jt(),i=gn(),a=dn(),o=hn(),s=qt(),c=mn();(function(e){e.schema={type:`object`,properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),a.standardProperties),o.schema.properties.thirdPartyProps),{data:{type:`object`,properties:{replaces:{type:`array`,items:s.HideableWearableCategory.schema},hides:{type:`array`,items:s.HideableWearableCategory.schema},tags:{type:`array`,items:{type:`string`,minLength:1}},representations:{type:`array`,items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:`array`,nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:`boolean`,nullable:!0},outlineCompatible:{type:`boolean`,nullable:!0}},required:[`replaces`,`hides`,`tags`,`representations`,`category`]}}),additionalProperties:!0,required:[],oneOf:[{required:[`id`,`i18n`],prohibited:[`merkleProof`,`content`,`collectionAddress`,`rarity`,`mappings`],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,`data`,`collectionAddress`,`rarity`],prohibited:[`merkleProof`,`content`,`mappings`]},{required:[...i.requiredBaseItemProps,`data`,`merkleProof`,`content`],prohibited:[`collectionAddress`,`rarity`],_isThirdParty:!0}],errorMessage:{oneOf:`either standard XOR thirdparty properties conditions must be met`}},e.validate=(0,t.generateLazyValidator)(e.schema,[{keyword:`_isThirdParty`,validate:(e,t)=>
9!e||(0,o.isThirdParty)(t),errors:!1},{keyword:`_isBaseAvatar`,validate:(e,t)=>!e||(0,i.isBaseAvatar)(t),errors:!1},c.RangeMapping._fromLessThanOrEqualTo,c.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})),vn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=Jt();Object.defineProperty(e,`WearableRepresentation`,{enumerable:!0,get:function(){return t.WearableRepresentation}});var n=_n();Object.defineProperty(e,`Wearable`,{enumerable:!0,get:function(){return n.Wearable}});var r=Wt();Object.defineProperty(e,`WearableCategory`,{enumerable:!0,get:function(){return r.WearableCategory}});var i=Kt();Object.defineProperty(e,`BodyPartCategory`,{enumerable:!0,get:function(){return i.BodyPartCategory}});var a=qt();Object.defineProperty(e,`HideableWearableCategory`,{enumerable:!0,get:function(){return a.HideableWearableCategory}})})),yn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EmoteCategory=void 0;var t=$();(function(e){e.DANCE=`dance`,e.STUNT=`stunt`,e.GREETINGS=`greetings`,e.FUN=`fun`,e.POSES=`poses`,e.REACTIONS=`reactions`,e.HORROR=`horror`,e.MISCELLANEOUS=`miscellaneous`})(e.EmoteCategory||(e.EmoteCategory={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})),bn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EmoteRepresentationADR74=void 0;var t=$(),n=Gt();(function(e){e.schema={type:`object`,properties:{bodyShapes:{type:`array`,items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:`string`,minLength:1},contents:{type:`array`,items:{type:`string`},minItems:1,uniqueItems:!0,contains:{const:{$data:`2/mainFile`}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:[`bodyShapes`,`mainFile`,`contents`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})),xn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;var t=$(),n;(function(e){e.Armature=`Armature`,e.Armature_Prop=`Armature_Prop`,e.Armature_Other=`Armature_Other`})(n=e.ArmatureId||(e.ArmatureId={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(n=e.ArmatureId||(e.ArmatureId={}));var r;(function(e){e.schema={type:`object`,properties:{animation:{type:`string`,minLength:1,errorMessage:`animation must be a non-empty string (GLB clip name)`}},required:[`animation`],additionalProperties:!1,errorMessage:{required:{animation:`animation is required (GLB clip name)`}}},e.validate=(0,t.generateLazyValidator)(e.schema)})(r=e.EmoteClip||(e.EmoteClip={})),(function(e){e.schema={type:`object`,properties:{loop:{type:`boolean`,errorMessage:`startAnimation.loop must be a boolean`},[n.Armature]:Object.assign(Object.assign({},r.schema),{errorMessage:`startAnimation.Armature is required and must contain valid animation data`}),[n.Armature_Prop]:Object.assign(Object.assign({},r.schema),{nullable:!0,errorMessage:`startAnimation.Armature_Prop must contain valid animation data when provided`}),audio:{type:`string`,nullable:!0,errorMessage:`audio must be a string (audio clip filename) when provided`}},required:[`loop`,n.Armature],additionalProperties:!1,errorMessage:{required:{loop:`startAnimation.loop is required`,[n.Armature]:`startAnimation.Armature is required`}}},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(e){e.schema={type:`object`,properties:{title:{type:`string`,minLength:1,errorMessage:`outcome.title must be a non-empty string`},loop:{type:`boolean`,errorMessage:`outcome.loop must be a boolean`},clips:{type:`object`,properties:Object.values(n).reduce((e,t)=>(e[t]=Object.assign(Object.assign({},r.schema),{nullable:!0,errorMessage:`outcome.clips.${t} must contain valid animation data when provided`}),e),{}),additionalProperties:!0,minProperties:1,errorMessage:`outcome.clips must contain at least one armature animation`},audio:{type:`string`,nullable:!0,errorMessage:`audio must be a string (audio clip filename) when provided`}},required:[`title`,`loop`,`clips`],additionalProperties:!1,errorMessage:{required:{title:`outcome.title is required`,loop:`outcome.loop is required`,clips:`outcome.clips is required`}}},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})),Sn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EmoteDataADR74=void 0;var t=yn(),n=$(),r=bn(),i=xn();(function(e){e.schema={type:`object`,properties:{tags:{type:`array`,items:{type:`string`,minLength:1}},representations:{type:`array`,items:r.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:`boolean`},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:`boolean`,nullable:!0},outcomes:{type:`array`,items:i.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:[`category`,`tags`,`representations`,`loop`],dependencies:{startAnimation:[`randomizeOutcomes`,`outcomes`],randomizeOutcomes:[`startAnimation`,`outcomes`],outcomes:[`startAnimation`,`randomizeOutcomes`]},additionalProperties:!0},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))}
9)),Cn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Emote=void 0;var t=Dn(),n=$(),r=gn(),i=dn(),a=hn(),o=Sn();(function(e){e.schema={type:`object`,properties:Object.assign(Object.assign(Object.assign(Object.assign({},r.baseItemProperties),i.standardProperties),a.schema.properties),{emoteDataADR74:o.EmoteDataADR74.schema}),additionalProperties:!0,required:[...r.requiredBaseItemProps],oneOf:[{required:[`emoteDataADR74`],oneOf:[{required:[`id`,`i18n`],prohibited:[`merkleProof`,`content`,`collectionAddress`,`rarity`],_isBaseEmote:!0},{required:[`collectionAddress`,`rarity`],prohibited:[`merkleProof`,`content`],errorMessage:`standard properties conditions are not met`},{required:[`merkleProof`,`content`,`id`,`name`,`description`,`i18n`,`image`,`thumbnail`,`emoteDataADR74`],_isThirdParty:!0,prohibited:[`collectionAddress`,`rarity`],errorMessage:`thirdparty properties conditions are not met`}],errorMessage:{oneOf:`emote should have either standard or thirdparty properties`}}],errorMessage:{oneOf:`emote should have "emoteDataADR74" and match its schema`}},e.validate=(0,n.generateLazyValidator)(e.schema,[{keyword:`_isThirdParty`,validate:(e,n)=>!e||(0,t.isThirdParty)(n),errors:!1},{keyword:`_isBaseEmote`,validate:(e,t)=>!e||(0,r.isBaseEmote)(t),errors:!1},t.RangeMapping._fromLessThanOrEqualTo,t.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})),wn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EmotePlayMode=void 0;var t=$();(function(e){e.SIMPLE=`simple`,e.LOOP=`loop`})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})),Tn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EmoteOutcomeType=void 0;var t=$();(function(e){e.SIMPLE_OUTCOME=`so`,e.MULTIPLE_OUTCOME=`mo`,e.RANDOM_OUTCOME=`ro`})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})),En=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=Cn();Object.defineProperty(e,`Emote`,{enumerable:!0,get:function(){return t.Emote}});var n=bn();Object.defineProperty(e,`EmoteRepresentationADR74`,{enumerable:!0,get:function(){return n.EmoteRepresentationADR74}});var r=Sn();Object.defineProperty(e,`EmoteDataADR74`,{enumerable:!0,get:function(){return r.EmoteDataADR74}});var i=xn();Object.defineProperty(e,`ArmatureId`,{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,`EmoteClip`,{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,`OutcomeGroup`,{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,`StartAnimation`,{enumerable:!0,get:function(){return i.StartAnimation}});var a=yn();Object.defineProperty(e,`EmoteCategory`,{enumerable:!0,get:function(){return a.EmoteCategory}});var o=wn();Object.defineProperty(e,`EmotePlayMode`,{enumerable:!0,get:function(){return o.EmotePlayMode}});var s=Tn();Object.defineProperty(e,`EmoteOutcomeType`,{enumerable:!0,get:function(){return s.EmoteOutcomeType}})})),Dn=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var r=ln();Object.defineProperty(e,`I18N`,{enumerable:!0,get:function(){return r.I18N}});var i=cn();Object.defineProperty(e,`Locale`,{enumerable:!0,get:function(){return i.Locale}});var a=un();Object.defineProperty(e,`Metrics`,{enumerable:!0,get:function(){return a.Metrics}});var o=Gt();Object.defineProperty(e,`BodyShape`,{enumerable:!0,get:function(){return o.BodyShape}});var s=dn();Object.defineProperty(e,`isStandard`,{enumerable:!0,get:function(){return s.isStandard}});var c=hn();Object.defineProperty(e,`isThirdParty`,{enumerable:!0,get:function(){return c.isThirdParty}}),n(mn(),e),n(vn(),e),n(En(),e)})),On=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;var t=$(),n;(function(e){e.SIGNER=`SIGNER`,e.ECDSA_PERSONAL_EPHEMERAL=`ECDSA_EPHEMERAL`,e.ECDSA_PERSONAL_SIGNED_ENTITY=`ECDSA_SIGNED_ENTITY`,e.ECDSA_EIP_1654_EPHEMERAL=`ECDSA_EIP_1654_EPHEMERAL`,e.ECDSA_EIP_1654_SIGNED_ENTITY=`ECDSA_EIP_1654_SIGNED_ENTITY`})(n=e.AuthLinkType||(e.AuthLinkType={}));var r;(function(e){e.schema={type:`object`,properties:{type:{type:`string`,enum:Object.values(n)},payload:{type:`string`},signature:{type:`string`,nullable:!0}},required:[`payload`,`type`],if:{properties:{type:{not:{const:n.SIGNER}}}},then:{required:[`signature`]},else:{oneOf:[{properties:{signature:{type:`string`,const:``}},required:[`signature`]},{properties:{signature:{type:`null`}}}]}},e.validate=(0,t.generateLazyValidator)(e.schema)})(r=e.AuthLink||(e.AuthLink={})),(function(e){e.schema={type:`array`,items:r.schema,minItems:1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.AuthChain||(e.AuthChain={}))}
9)),kn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;var t=Yt(),n=On(),r=$();(function(e){e.schema={type:`object`,properties:{entityId:{type:`string`},entityType:{type:`string`},pointers:{type:`array`,items:{type:`string`},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:`number`,minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:[`entityId`,`entityType`,`pointers`,`entityTimestamp`,`authChain`]},e.validate=(0,r.generateLazyValidator)(e.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(e){e.schema={type:`object`,properties:{entityId:{type:`string`},entityType:{type:`string`},pointers:{type:`array`,items:{type:`string`},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:`number`,minimum:0},localTimestamp:{type:`number`,minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:[`entityId`,`entityType`,`pointers`,`localTimestamp`,`entityTimestamp`,`authChain`]},e.validate=(0,r.generateLazyValidator)(e.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})),An=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ContentMapping=void 0;var t=Yt(),n=$();(function(e){e.schema={type:`object`,properties:{file:{type:`string`,minLength:1},hash:{type:`string`,oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:[`file`,`hash`]},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.ContentMapping||(e.ContentMapping={}))})),jn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Entity=e.EntityType=void 0;var t=Yt(),n=An(),r=$();(function(e){e.SCENE=`scene`,e.PROFILE=`profile`,e.WEARABLE=`wearable`,e.STORE=`store`,e.EMOTE=`emote`,e.OUTFITS=`outfits`})(e.EntityType||(e.EntityType={})),(function(e){e.schema={type:`object`,properties:{version:{type:`string`,enum:[`v3`]},id:{type:`string`,oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:`string`},pointers:{type:`array`,items:{type:`string`,minLength:1}},timestamp:{type:`number`,minimum:0},content:{type:`array`,items:n.ContentMapping.schema},metadata:{type:`object`,nullable:!0}},required:[`version`,`id`,`type`,`pointers`,`timestamp`,`content`]},e.validate=(0,r.generateLazyValidator)(e.schema)})(e.Entity||(e.Entity={}))})),Mn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DeploymentWithAuthChain=void 0;var t=On(),n=$();(function(e){e.schema={type:`object`,properties:{entityId:{type:`string`},entityType:{type:`string`},pointers:{type:`array`,items:{type:`string`},minItems:1},localTimestamp:{type:`number`,minimum:0},authChain:t.AuthChain.schema},required:[`entityId`,`entityType`,`pointers`,`localTimestamp`,`authChain`]},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})),Nn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Outfits=e.Outfit=void 0;var t=Wt(),n=Yt(),r=$(),i;(function(e){e.schema={type:`object`,required:[`bodyShape`,`eyes`,`hair`,`skin`,`wearables`],properties:{bodyShape:{type:`string`},eyes:{type:`object`,required:[`color`],properties:{color:n.Color3.schema}},hair:{type:`object`,required:[`color`],properties:{color:n.Color3.schema}},skin:{type:`object`,required:[`color`],properties:{color:n.Color3.schema}},wearables:{type:`array`,items:{type:`string`}},forceRender:{type:`array`,nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},e.validate=(0,r.generateLazyValidator)(e.schema)})(i=e.Outfit||(e.Outfit={})),(function(e){e.schema={type:`object`,required:[`outfits`,`namesForExtraSlots`],properties:{outfits:{type:`array`,items:{type:`object`,required:[`slot`,`outfit`],properties:{slot:{type:`number`},outfit:i.schema}}},namesForExtraSlots:{type:`array`,uniqueItems:!0,items:{type:`string`}}},additionalProperties:!0},e.validate=(0,r.generateLazyValidator)(e.schema)})(e.Outfits||(e.Outfits={}))})),Pn=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);
9(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Nn(),e)})),Fn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(e){e.BADGE_GRANTED=`badge_granted`,e.BID_ACCEPTED=`bid_accepted`,e.BID_RECEIVED=`bid_received`,e.EVENTS_STARTED=`events_started`,e.EVENTS_STARTS_SOON=`events_starts_soon`,e.EVENT_CREATED=`event_created`,e.GOVERNANCE_ANNOUNCEMENT=`governance_announcement`,e.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED=`governance_authored_proposal_finished`,e.GOVERNANCE_COAUTHOR_REQUESTED=`governance_coauthor_requested`,e.GOVERNANCE_CLIFF_ENDED=`governance_cliff_ended`,e.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE=`governance_new_comment_on_project_update`,e.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL=`governance_new_comment_on_proposal`,e.GOVERNANCE_PROPOSAL_ENACTED=`governance_proposal_enacted`,e.GOVERNANCE_VOTING_ENDED_VOTER=`governance_voting_ended_voter`,e.GOVERNANCE_PITCH_PASSED=`governance_pitch_passed`,e.GOVERNANCE_TENDER_PASSED=`governance_tender_passed`,e.GOVERNANCE_WHALE_VOTE=`governance_whale_vote`,e.GOVERNANCE_VOTED_ON_BEHALF=`governance_voted_on_behalf`,e.ITEM_SOLD=`item_sold`,e.ITEM_PUBLISHED=`item_published`,e.LAND_RENTAL_ENDED=`rental_ended`,e.LAND_RENTED=`rental_started`,e.REWARD_ASSIGNED=`reward_assignment`,e.REWARD_CAMPAIGN_OUT_OF_FUNDS=`reward_campaign_out_of_funds`,e.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED=`reward_campaign_gas_price_higher_than_expected`,e.REWARD_CAMPAIGN_OUT_OF_STOCK=`reward_campaign_out_of_stock`,e.REWARD_DELAYED=`reward_delayed`,e.REWARD_IN_PROGRESS=`reward_in_progress`,e.ROYALTIES_EARNED=`royalties_earned`,e.SOCIAL_SERVICE_FRIENDSHIP_REQUEST=`social_service_friendship_request`,e.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED=`social_service_friendship_accepted`,e.WORLDS_ACCESS_RESTORED=`worlds_access_restored`,e.WORLDS_ACCESS_RESTRICTED=`worlds_access_restricted`,e.WORLDS_MISSING_RESOURCES=`worlds_missing_resources`,e.WORLDS_PERMISSION_GRANTED=`worlds_permission_granted`,e.WORLDS_PERMISSION_REVOKED=`worlds_permission_revoked`,e.CREDITS_GOAL_COMPLETED=`credits_goal_completed`,e.CREDITS_ON_DEMAND_GRANTED=`credits_on_demand_granted`,e.STREAMING_KEY_RESET=`streaming_key_reset`,e.STREAMING_KEY_REVOKE=`streaming_key_revoke`,e.STREAMING_KEY_EXPIRED=`streaming_key_expired`,e.STREAMING_TIME_EXCEEDED=`streaming_time_exceeded`,e.STREAMING_PLACE_UPDATED=`streaming_place_updated`,e.CREDITS_REMINDER_COMPLETE_GOALS=`credits_reminder_complete_goals`,e.CREDITS_REMINDER_CLAIM_CREDITS=`credits_reminder_claim_credits`,e.CREDITS_REMINDER_USAGE=`credits_reminder_usage`,e.CREDITS_REMINDER_USAGE_24_HOURS=`credits_reminder_usage_24_hours`,e.CREDITS_REMINDER_DO_NOT_MISS_OUT=`credits_reminder_do_not_miss_out`,e.CREDITS_NEW_SEASON_REMINDER=`credits_new_season_reminder`,e.REFERRAL_INVITED_USERS_ACCEPTED=`referral_invited_users_accepted`,e.REFERRAL_NEW_TIER_REACHED=`referral_new_tier_reached`,e.COMMUNITY_DELETED=`community_deleted`,e.COMMUNITY_DELETED_CONTENT_VIOLATION=`community_deleted_content_violation`,e.COMMUNITY_RENAMED=`community_renamed`,e.COMMUNITY_MEMBER_BANNED=`community_member_banned`,e.COMMUNITY_MEMBER_REMOVED=`community_member_removed`,e.COMMUNITY_REQUEST_TO_JOIN_RECEIVED=`community_request_to_join_received`,e.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED=`community_request_to_join_accepted`,e.COMMUNITY_INVITE_RECEIVED=`community_invite_received`,e.COMMUNITY_OWNERSHIP_TRANSFERRED=`community_ownership_transferred`,e.COMMUNITY_POST_ADDED=`community_post_added`,e.COMMUNITY_VOICE_CHAT_STARTED=`community_voice_chat_started`,e.USER_BANNED_FROM_SCENE=`user_banned_from_scene`,e.USER_UNBANNED_FROM_SCENE=`user_unbanned_from_scene`,e.TRANSFER_RECEIVED=`transfer_received`,e.TIP_RECEIVED=`tip_received`,e.BANNED=`banned`,e.BAN_WARNING=`ban_warning`,e.BAN_LIFTED=`ban_lifted`})(e.NotificationType||(e.NotificationType={})),(function(e){e.COMMUNITY=`community`})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})),In=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}
9),e.SubscriptionDetails=void 0;var t=$(),n=Fn(),r={type:`object`,required:[`email`,`in_app`],properties:{email:{type:`boolean`},in_app:{type:`boolean`}}},i=Object.values(n.NotificationType).reduce((e,t)=>(e[t]=r,e),{});(function(e){e.schema={type:`object`,required:[`ignore_all_email`,`ignore_all_in_app`,`message_type`],properties:{ignore_all_email:{type:`boolean`},ignore_all_in_app:{type:`boolean`},message_type:{type:`object`,required:Object.values(n.NotificationType),additionalProperties:!1,properties:i}}},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})),Ln=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Email=void 0,(function(e){e.schema={type:`string`,pattern:`^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$`};let t=new RegExp(e.schema.pattern);e.validate=e=>t.test(e)})(e.Email||(e.Email={}))})),Rn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Subscription=void 0;var t=$(),n=In(),r=Yt(),i=Ln();(function(e){e.schema={type:`object`,required:[`address`,`details`],properties:{address:r.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:n.SubscriptionDetails.schema}},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Subscription||(e.Subscription={}))})),zn=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Fn(),e),n(Rn(),e),n(In(),e)})),Bn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Events=void 0,(function(e){(function(e){e.BLOCKCHAIN=`blockchain`,e.CATALYST_DEPLOYMENT=`catalyst-deployment`,e.WORLD=`world`,e.CLIENT=`client`,e.WEB=`web`,e.MARKETPLACE=`marketplace`,e.REWARDS=`rewards`,e.BADGE=`badge`,e.ASSET_BUNDLE=`asset-bundle`,e.SOCIAL_SERVICE=`social-service`,e.CREDITS_SERVICE=`credits-service`,e.STREAMING=`streaming`,e.COMMS=`comms`,e.REFERRAL=`referral`,e.COMMUNITY=`community`,e.CAMERA=`camera`,e.EVENT=`event`,e.GOVERNANCE=`governance`,e.MODERATION=`moderation`})(e.Type||(e.Type={})),(function(e){(function(e){e.BID_ACCEPTED=`bid-accepted`,e.ITEM_SOLD=`item-sold`,e.RENTAL_ENDED=`land-rental-ended`,e.RENTAL_STARTED=`land-rental-started`,e.ROYALTIES_EARNED=`royalties-earned`,e.COLLECTION_CREATED=`collection-created`,e.ITEM_PUBLISHED=`item-published`,e.TRANSFER_RECEIVED=`transfer-received`,e.TIP_RECEIVED=`tip-received`})(e.Blockchain||(e.Blockchain={})),(function(e){e.BID_RECEIVED=`bid-received`})(e.Marketplace||(e.Marketplace={})),(function(e){e.SCENE=`scene`,e.PROFILE=`profile`,e.WEARABLE=`wearable`,e.STORE=`store`,e.EMOTE=`emote`,e.OUTFITS=`outfits`})(e.CatalystDeployment||(e.CatalystDeployment={})),(function(e){e.DEPLOYMENT=`deployment`,e.WORLD_SETTINGS_CHANGED=`world_settings_changed`,e.WORLD_SCENES_UNDEPLOYMENT=`world_scenes_undeployment`,e.WORLD_UNDEPLOYMENT=`world_undeployment`,e.WORLD_SPAWN_COORDINATE_SET=`world_spawn_coordinate_set`,e.WORLDS_PERMISSION_GRANTED=`worlds_permission_granted`,e.WORLDS_PERMISSION_REVOKED=`worlds_permission_revoked`,e.WORLDS_ACCESS_RESTORED=`worlds_access_restored`,e.WORLDS_ACCESS_RESTRICTED=`worlds_access_restricted`,e.WORLDS_MISSING_RESOURCES=`worlds_missing_resources`})(e.Worlds||(e.Worlds={})),(function(e){e.LOGGED_IN=`logged-in`,e.LOGGED_IN_CACHED=`logged-in-cached`,e.MOVE_TO_PARCEL=`move-to-parcel`,e.USED_EMOTE=`used-emote`,e.PASSPORT_OPENED=`passport-opened`,e.WALKED_DISTANCE=`walked-distance`,e.VERTICAL_HEIGHT_REACHED=`vertical-height-reached`})(e.Client||(e.Client={})),(function(e){e.AUTH_IDENTIFY=`auth-identify`})(e.Web||(e.Web={})),(function(e){e.REWARD_IN_PROGRESS=`reward-in-progress`,e.REWARD_ASSIGNED=`reward-assigned`,e.CAMPAIGN_OUT_OF_FUNDS=`campaign-out-of-funds`,e.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED=`campaign-gas-price-higher-than-expected`,e.CAMPAIGN_OUT_OF_STOCK=`campaign-out-of-stock`,e.REWARD_DELAYED=`reward-delayed`})(e.Rewards||(e.Rewards={})),(function(e){e.GRANTED=`badge-granted`})(e.Badge||(e.Badge={})),(function(e){e.CONVERTED=`converted`,e.MANUALLY_QUEUED=`manually-queued`})(e.AssetBundle||(e.AssetBundle={})),(function(e){e.FRIENDSHIP_REQUEST=`friendship-request`,e.FRIENDSHIP_ACCEPTED=`friendship-accepted`})(e.SocialService||(e.SocialService={})),(function(e){e.CREDITS_GOAL_COMPLETED=`credits-goal-completed`,e.COMPLETE_GOALS_REMINDER=`complete-goals-reminder`,e.CLAIM_CREDITS_REMINDER=`claim-credits-reminder`,e.DO_NOT_MISS_OUT_REMINDER=`do-not-miss-out-reminder`,e.USAGE_REMINDER=`usage-reminder`,e.USAGE_24_HOURS_REMINDER=`usage-24-hours-reminder`,e.ON_DEMAND_CREDITS_GRANTED=`on-demand-credits-granted`,e.NEW_SEASON_REMINDER=`new-season-reminder`})(e.CreditsService||(e.CreditsService={})),(function(e){e.STREAMING_KEY_RESET=`streaming-key-reset`,e.STREAMING_KEY_REVOKE=`streaming-key-revoke`,e.STREAMING_KEY_EXPIRED=`streaming-key-expired`,e.STREAMING_TIME_EXCEEDED=`streaming-time-exceeded`,e.STREAMING_PLACE_UPDATED=`streaming-place-updated`,e.COMMUNITY_STREAMING_ENDED=`community-streaming-ended`})(e.Streaming||(e.Streaming={})),(function(e){e.USER_JOINED_ROOM=`user-joined-room`,e.USER_LEFT_ROOM=`user-left-room`,e.USER_BANNED_FROM_SCENE=`user-banned-from-scene`,e.USER_UNBANNED_FROM_SCENE=`user-unbanned-from-scene`})(e.Comms||(e.Comms={})),(function(e){e.REFERRAL_INVITED_USERS_ACCEPTED=`referral-invited-users-accepted`,e.REFERRAL_NEW_TIER_REACHED=`referral-new-tier-reached`})(e.Referral||(e.Referral={})),(function(e){e.DELETED=`community-deleted`,e.DELETED_CONTENT_VIOLATION=`community-deleted-content-violation`,e.RENAMED=`community-renamed`,e.MEMBER_BANNED=`community-member-banned`,e.MEMBER_LEFT=`community-member-left`,e.MEMBER_REMOVED=`community-member-removed`,e.REQUEST_TO_JOIN_RECEIVED=`community-request-to-join-received`,e.REQUEST_TO_JOIN_ACCEPTED=`community-request-to-join-accepted`,e.INVITE_RECEIVED=`community-invite-received`,e.OWNERSHIP_TRANSFERRED=`community-ownership-transferred`,e.POST_ADDED=`community-post-added`,e.VOICE_CHAT_STARTED=`community-voice-chat-started`})(e.Community||(e.Community={})),(function(e){e.PHOTO_TAKEN=`photo-taken`,e.PHOTO_PRIVACY_CHANGED=`photo-privacy-changed`})(e.Camera||(e.Camera={})),(function(e){e.EVENT_CREATED=`event-created`,e.EVENT_STARTS_SOON=`event-starts-soon`,e.EVENT_STARTED=`event-started`,e.EVENT_ENDED=`event-ended`})(e.Event||(e.Event={})),(function(e){e.PROPOSAL_ENACTED=`governance_proposal_enacted`,e.COAUTHOR_REQUESTED=`governance_coauthor_requested`,e.PITCH_PASSED=`governance_pitch_passed`,e.TENDER_PASSED=`governance_tender_passed`,e.AUTHORED_PROPOSAL_FINISHED=`governance_authored_proposal_finished`,e.VOTING_ENDED_VOTER=`governance_voting_ended_voter`,e.NEW_COMMENT_ON_PROPOSAL=`governance_new_comment_on_proposal`,e.NEW_COMMENT_ON_PROJECT_UPDATED=`governance_new_comment_on_project_update`,e.WHALE_VOTE=`governance_whale_vote`,e.VOTED_ON_BEHALF=`governance_voted_on_behalf`,e.CLIFF_ENDED=`governance_cliff_ended`})(e.Governance||(e.Governance={})),(function(e){e.USER_BAN_CREATED=`user-ban-created`,e.USER_BAN_LIFTED=`user-ban-lifted`,e.USER_WARNING_CREATED=`user-warning-created`})(e.Moderation||(e.Moderation={}))}
9)(e.SubType||(e.SubType={}))})(e.Events||(e.Events={}))})),Vn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TipReceivedEvent=e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;var t=$(),n=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},image:{type:`string`},seller:{type:`string`},category:{type:`string`},rarity:{type:`string`,nullable:!0},link:{type:`string`},nftName:{type:`string`,nullable:!0},price:{type:`string`},title:{type:`string`},description:{type:`string`},network:{type:`string`}},required:[`address`,`image`,`seller`,`category`,`link`,`price`,`title`,`network`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.ITEM_SOLD},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},image:{type:`string`},buyer:{type:`string`},seller:{type:`string`},category:{type:`string`},rarity:{type:`string`,nullable:!0},link:{type:`string`},nftName:{type:`string`,nullable:!0},tokenId:{type:`string`},network:{type:`string`},title:{type:`string`},description:{type:`string`}},required:[`address`,`image`,`seller`,`category`,`link`,`network`,`title`,`description`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{creator:{type:`string`},category:{type:`string`},rarity:{type:`string`,nullable:!0},itemId:{type:`string`},network:{type:`string`},urn:{type:`string`}},required:[`creator`,`category`,`itemId`,`network`,`urn`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},contract:{type:`string`},land:{type:`string`,nullable:!0},lessor:{type:`string`},tenant:{type:`string`},operator:{type:`string`},startedAt:{type:`string`},endedAt:{type:`string`},tokenId:{type:`string`},link:{type:`string`},title:{type:`string`},description:{type:`string`,nullable:!0}},required:[`address`,`contract`,`lessor`,`tenant`,`operator`,`startedAt`,`endedAt`,`tokenId`,`link`,`title`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},contract:{type:`string`},land:{type:`string`,nullable:!0},lessor:{type:`string`},tenant:{type:`string`},operator:{type:`string`},startedAt:{type:`string`},endedAt:{type:`string`},tokenId:{type:`string`},link:{type:`string`},title:{type:`string`},description:{type:`string`,nullable:!0}},required:[`address`,`contract`,`lessor`,`tenant`,`operator`,`startedAt`,`endedAt`,`tokenId`,`link`,`title`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},image:{type:`string`},category:{type:`string`},rarity:{type:`string`,nullable:!0},link:{type:`string`},nftName:{type:`string`,nullable:!0},royaltiesCut:{type:`string`},royaltiesCollector:{type:`string`},network:{type:`string`},title:{type:`string`},description:{type:`string`,nullable:!0}},required:[`address`,`image`,`category`,`link`,`royaltiesCut`,`royaltiesCollector`,`network`,`title`]}},required:[`type`,`subType`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{creator:{type:`string`},name:{type:`string`}},required:[`creator`,`name`]}},required:[`type`,`subType`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{senderAddress:{type:`string`},receiverAddress:{type:`string`},tokenUri:{type:`string`,nullable:!0}},required:[`senderAddress`,`receiverAddress`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BLOCKCHAIN},subType:{type:`string`,const:n.Events.SubType.Blockchain.TIP_RECEIVED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{senderAddress:{type:`string`},receiverAddress:{type:`string`},amount:{type:`string`}},required:[`senderAddress`,`receiverAddress`,`amount`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.TipReceivedEvent||(e.TipReceivedEvent={}))})),Hn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CatalystDeploymentEvent=void 0;var t=On(),n=$(),r=jn(),i=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:`string`,enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:`string`},timestamp:{type:`number`,minimum:1},entity:r.Entity.schema,authChain:t.AuthChain.schema},required:[`type`,`subType`,`entity`,`authChain`,`key`,`timestamp`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})),Un=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})}
9)),Wn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Gn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BidReceivedEvent=void 0;var t=$(),n=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.MARKETPLACE},subType:{type:`string`,const:n.Events.SubType.Marketplace.BID_RECEIVED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},image:{type:`string`},seller:{type:`string`},category:{type:`string`},rarity:{type:`string`,nullable:!0},link:{type:`string`},nftName:{type:`string`,nullable:!0},price:{type:`string`},title:{type:`string`},description:{type:`string`},network:{type:`string`}},required:[`address`,`image`,`seller`,`category`,`link`,`price`,`title`,`network`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})),Kn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createEventSchema=void 0;function t(e,t,n){return{type:`object`,properties:{type:{type:`string`,const:e},subType:{type:`string`,const:t},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:n},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1}}e.createEventSchema=t})),qn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;var t=$(),n=Bn(),r=Kn(),i={type:`object`,properties:{title:{type:`string`},description:{type:`string`},link:{type:`string`,nullable:!0},beneficiary:{type:`string`},tokenName:{type:`string`},tokenImage:{type:`string`},tokenRarity:{type:`string`,nullable:!0},tokenCategory:{type:`string`,nullable:!0}},required:[`title`,`description`,`beneficiary`,`tokenName`,`tokenImage`],additionalProperties:!1},a={type:`object`,properties:{title:{type:`string`},description:{type:`string`},link:{type:`string`,nullable:!0},owner:{type:`string`},campaignId:{type:`string`},campaignName:{type:`string`}},required:[`title`,`description`,`owner`,`campaignId`,`campaignName`],additionalProperties:!1};(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_ASSIGNED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,a),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,a),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,a),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.REWARDS,n.Events.SubType.Rewards.REWARD_DELAYED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})),Jn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;var t=$(),n=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.BADGE},subType:{type:`string`,const:n.Events.SubType.Badge.GRANTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{badgeId:{type:`string`},badgeTierName:{type:`string`,nullable:!0},badgeName:{type:`string`},badgeImageUrl:{type:`string`},address:{type:`string`}},required:[`badgeId`,`badgeName`,`badgeImageUrl`,`address`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.ASSET_BUNDLE},subType:{type:`string`,const:n.Events.SubType.AssetBundle.CONVERTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{entityId:{type:`string`},platform:{type:`string`,enum:[`windows`,`mac`,`webgl`]},statusCode:{type:`number`},isLods:{type:`boolean`},isWorld:{type:`boolean`},version:{type:`string`}},required:[`entityId`,`platform`,`statusCode`,`isLods`,`isWorld`,`version`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.ASSET_BUNDLE},subType:{type:`string`,const:n.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{entityId:{type:`string`},platform:{type:`string`,enum:[`windows`,`mac`,`webgl`]},isLods:{type:`boolean`},isPriority:{type:`boolean`},version:{type:`string`}},required:[`entityId`,`platform`,`isLods`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.SOCIAL_SERVICE},subType:{type:`string`,const:n.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{requestId:{type:`string`},sender:{type:`object`,properties:{address:{type:`string`},name:{type:`string`},profileImageUrl:{type:`string`},hasClaimedName:{type:`boolean`}},required:[`address`,`name`,`profileImageUrl`,`hasClaimedName`]},receiver:{type:`object`,properties:{address:{type:`string`},name:{type:`string`},profileImageUrl:{type:`string`},hasClaimedName:{type:`boolean`}},required:[`address`,`name`,`profileImageUrl`,`hasClaimedName`]},message:{type:`string`,nullable:!0}},required:[`requestId`,`sender`,`receiver`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.SOCIAL_SERVICE},subType:{type:`string`,const:n.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{requestId:{type:`string`},sender:{type:`object`,properties:{address:{type:`string`},name:{type:`string`},profileImageUrl:{type:`string`},hasClaimedName:{type:`boolean`}},required:[`address`,`name`,`profileImageUrl`,`hasClaimedName`]},receiver:{type:`object`,properties:{address:{type:`string`},name:{type:`string`},profileImageUrl:{type:`string`},hasClaimedName:{type:`boolean`}},required:[`address`,`name`,`profileImageUrl`,`hasClaimedName`]}},required:[`requestId`,`sender`,`receiver`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CREDITS_SERVICE},subType:{type:`string`,const:n.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{creditsGranted:{type:`number`,minimum:1},address:{type:`string`},granterAddress:{type:`string`}},required:[`creditsGranted`,`address`,`granterAddress`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CREDITS_SERVICE},subType:{type:`string`,const:n.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{goalId:{type:`string`},creditsObtained:{type:`number`,minimum:0},seasonId:{type:`number`,minimum:1},weekNumber:{type:`number`,minimum:1},address:{type:`string`}},required:[`goalId`,`creditsObtained`,`seasonId`,`weekNumber`,`address`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CREDITS_SERVICE},subType:{type:`string`,const:n.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},seasonId:{type:`number`,minimum:1},weekNumber:{type:`number`,minimum:1},pendingGoalIds:{type:`array`,items:{type:`string`},minItems:1}},required:[`address`,`seasonId`,`weekNumber`,`pendingGoalIds`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CREDITS_SERVICE},subType:{type:`string`,const:n.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},creditsAmount:{type:`number`,minimum:1},expirationDate:{type:`string`},expirationDay:{type:`string`}},required:[`address`,`creditsAmount`,`expirationDate`,`expirationDay`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CREDITS_SERVICE},subType:{type:`string`,const:n.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{addresses:{type:`array`,items:{type:`string`}},seasonName:{type:`string`},startDate:{type:`string`},endDate:{type:`string`}},required:[`addresses`,`seasonName`,`startDate`,`endDate`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CREDITS_SERVICE},subType:{type:`string`,const:n.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},creditsAmount:{type:`number`,minimum:1},expirationDate:{type:`string`}},required:[`address`,`creditsAmount`,`expirationDate`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CREDITS_SERVICE},subType:{type:`string`,const:n.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`}},required:[`address`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CREDITS_SERVICE},subType:{type:`string`,const:n.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{address:{type:`string`},seasonId:{type:`number`,minimum:1},weekNumber:{type:`number`,minimum:1}},required:[`address`,`seasonId`,`weekNumber`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!0},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})),Yn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;var t=$(),n=Bn(),r=Kn(),i={type:`object`,properties:{title:{type:`string`},description:{type:`string`},position:{type:`string`},worldName:{type:`string`,nullable:!0},isWorld:{type:`boolean`},url:{type:`string`},address:{type:`string`},image:{type:`string`}},required:[`position`,`isWorld`,`url`,`title`,`description`,`address`,`image`],additionalProperties:!1};(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_RESET,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.STREAMING,n.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:`object`,properties:{communityId:{type:`string`},totalParticipants:{type:`number`}},required:[`communityId`,`totalParticipants`],additionalProperties:!1}),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))}
9)),Xn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;var t=$(),n=Bn(),r;(function(e){e.PRIVATE_MESSAGE=`private-message`,e.VOICE_CHAT=`voice-chat`,e.COMMUNITY_VOICE_CHAT=`community-voice-chat`,e.ISLAND=`island`,e.SCENE=`scene`,e.WORLD=`world`,e.UNKNOWN=`unknown`})(r=e.RoomType||(e.RoomType={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMS},subType:{type:`string`,const:n.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{parcel:{type:`string`},sceneId:{type:`string`},userAddress:{type:`string`},realmName:{type:`string`},islandName:{type:`string`,nullable:!0},communityId:{type:`string`,nullable:!0},voiceChatId:{type:`string`,nullable:!0},isWorld:{type:`boolean`},roomType:{type:`string`,enum:Object.values(r)}},required:[`parcel`,`sceneId`,`userAddress`,`realmName`,`isWorld`,`roomType`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMS},subType:{type:`string`,const:n.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{userAddress:{type:`string`},realmName:{type:`string`},isWorld:{type:`boolean`},roomType:{type:`string`,enum:Object.values(r)},sceneId:{type:`string`,nullable:!0},islandName:{type:`string`,nullable:!0},communityId:{type:`string`,nullable:!0},voiceChatId:{type:`string`,nullable:!0}},required:[`isWorld`,`userAddress`,`realmName`,`roomType`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMS},subType:{type:`string`,const:n.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{placeTitle:{type:`string`},userAddress:{type:`string`}},required:[`placeTitle`,`userAddress`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMS},subType:{type:`string`,const:n.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{placeTitle:{type:`string`},userAddress:{type:`string`}},required:[`placeTitle`,`userAddress`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})),Zn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;var t=$(),n=Bn(),r=Kn(),i={type:`object`,properties:{title:{type:`string`},description:{type:`string`},address:{type:`string`},tier:{type:`number`,minimum:1},url:{type:`string`},image:{type:`string`},invitedUserAddress:{type:`string`},invitedUsers:{type:`number`,minimum:1},rarity:{type:`string`,nullable:!0}},required:[`address`,`tier`,`url`,`title`,`description`,`image`,`invitedUserAddress`],additionalProperties:!1};(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.REFERRAL,n.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.REFERRAL,n.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})),Qn=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberLeftEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;var t=$(),n=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.DELETED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{id:{type:`string`},name:{type:`string`},memberAddresses:{type:`array`,items:{type:`string`}},thumbnailUrl:{type:`string`}},required:[`id`,`name`,`memberAddresses`,`thumbnailUrl`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{id:{type:`string`},name:{type:`string`},ownerAddress:{type:`string`},thumbnailUrl:{type:`string`}},required:[`id`,`name`,`ownerAddress`,`thumbnailUrl`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.RENAMED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{id:{type:`string`},oldName:{type:`string`},newName:{type:`string`},memberAddresses:{type:`array`,items:{type:`string`}},thumbnailUrl:{type:`string`}},required:[`id`,`oldName`,`newName`,`memberAddresses`,`thumbnailUrl`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.MEMBER_BANNED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{id:{type:`string`},name:{type:`string`},memberAddress:{type:`string`},thumbnailUrl:{type:`string`}},required:[`id`,`name`,`memberAddress`,`thumbnailUrl`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.MEMBER_LEFT},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{id:{type:`string`},memberAddress:{type:`string`}},required:[`id`,`memberAddress`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityMemberLeftEvent||(e.CommunityMemberLeftEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.MEMBER_REMOVED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{id:{type:`string`},name:{type:`string`},memberAddress:{type:`string`},thumbnailUrl:{type:`string`}},required:[`id`,`name`,`memberAddress`,`thumbnailUrl`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{communityId:{type:`string`},communityName:{type:`string`},memberAddress:{type:`string`},memberName:{type:`string`},thumbnailUrl:{type:`string`},addressesToNotify:{type:`array`,items:{type:`string`}}},required:[`communityId`,`communityName`,`memberAddress`,`memberName`,`thumbnailUrl`,`addressesToNotify`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{communityId:{type:`string`},communityName:{type:`string`},memberAddress:{type:`string`},thumbnailUrl:{type:`string`}},required:[`communityId`,`communityName`,`memberAddress`,`thumbnailUrl`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.INVITE_RECEIVED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{communityId:{type:`string`},communityName:{type:`string`},memberAddress:{type:`string`},thumbnailUrl:{type:`string`}},required:[`communityId`,`communityName`,`memberAddress`,`thumbnailUrl`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.POST_ADDED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{communityId:{type:`string`},communityName:{type:`string`},thumbnailUrl:{type:`string`},postId:{type:`string`},authorAddress:{type:`string`},addressesToNotify:{type:`array`,items:{type:`string`}}},required:[`addressesToNotify`,`communityId`,`communityName`,`thumbnailUrl`,`postId`,`authorAddress`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{communityId:{type:`string`},communityName:{type:`string`},oldOwnerAddress:{type:`string`},newOwnerAddress:{type:`string`},thumbnailUrl:{type:`string`}},required:[`communityId`,`communityName`,`oldOwnerAddress`,`newOwnerAddress`,`thumbnailUrl`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.COMMUNITY},subType:{type:`string`,const:n.Events.SubType.Community.VOICE_CHAT_STARTED}
9,key:{type:`string`},timestamp:{type:`number`,minimum:1},metadata:{type:`object`,properties:{communityId:{type:`string`},communityName:{type:`string`},thumbnailUrl:{type:`string`},addressesToNotify:{type:`array`,items:{type:`string`}}},required:[`communityId`,`communityName`,`thumbnailUrl`,`addressesToNotify`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})),$n=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;var t=$(),n=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CAMERA},subType:{type:`string`,const:n.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{userAddress:{type:`string`},photoId:{type:`string`},isPublic:{type:`boolean`}},required:[`userAddress`,`photoId`,`isPublic`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.CAMERA},subType:{type:`string`,const:n.Events.SubType.Camera.PHOTO_TAKEN},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{sceneId:{type:`string`},userAddress:{type:`string`},realm:{type:`string`},photoId:{type:`string`},isPublic:{type:`boolean`},users:{type:`array`,items:{type:`object`,properties:{address:{type:`string`},isEmoting:{type:`boolean`}},required:[`address`,`isEmoting`],additionalProperties:!1}},placeId:{type:`string`,nullable:!0}},required:[`userAddress`,`realm`,`photoId`,`isPublic`,`users`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})),er=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;var t=$(),n=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.EVENT},subType:{type:`string`,const:n.Events.SubType.Event.EVENT_STARTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{name:{type:`string`},image:{type:`string`},link:{type:`string`},communityId:{type:`string`},communityThumbnail:{type:`string`,nullable:!0},title:{type:`string`},description:{type:`string`},attendee:{type:`string`}},required:[`name`,`image`,`link`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.EVENT},subType:{type:`string`,const:n.Events.SubType.Event.EVENT_STARTS_SOON}
9,key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{name:{type:`string`},image:{type:`string`},link:{type:`string`},startsAt:{type:`string`},endsAt:{type:`string`},title:{type:`string`},description:{type:`string`},attendee:{type:`string`}},required:[`name`,`image`,`link`,`startsAt`,`endsAt`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.EVENT},subType:{type:`string`,const:n.Events.SubType.Event.EVENT_CREATED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{name:{type:`string`},image:{type:`string`},communityId:{type:`string`},communityName:{type:`string`},communityThumbnail:{type:`string`,nullable:!0},title:{type:`string`},description:{type:`string`},attendee:{type:`string`}},required:[`name`,`image`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.EVENT},subType:{type:`string`,const:n.Events.SubType.Event.EVENT_ENDED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{communityId:{type:`string`,nullable:!0},totalAttendees:{type:`number`}},required:[`totalAttendees`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.EventEndedEvent||(e.EventEndedEvent={}))})),tr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;var t=$(),n=Bn(),r=Kn(),i={type:`object`,properties:{proposalId:{type:`string`},proposalTitle:{type:`string`},title:{type:`string`},description:{type:`string`},link:{type:`string`},address:{type:`string`}},required:[`proposalId`,`proposalTitle`,`title`,`description`,`link`,`address`],additionalProperties:!1};(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.PROPOSAL_ENACTED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.COAUTHOR_REQUESTED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.PITCH_PASSED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.TENDER_PASSED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.VOTING_ENDED_VOTER,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.WHALE_VOTE,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.VOTED_ON_BEHALF,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(e){e.schema=(0,r.createEventSchema)(n.Events.Type.GOVERNANCE,n.Events.SubType.Governance.CLIFF_ENDED,i),e.validate=(0,t.generateLazyValidator)(e.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})),nr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=e.WorldUndeploymentEvent=e.WorldScenesUndeploymentEvent=e.WorldSpawnCoordinateSetEvent=e.WorldSettingsChangedEvent=void 0;var t=On(),n=$(),r=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLD_SETTINGS_CHANGED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{worldName:{type:`string`},title:{type:`string`,nullable:!0},description:{type:`string`,nullable:!0},contentRating:{type:`string`,nullable:!0},skyboxTime:{type:`number`,nullable:!0},categories:{type:`array`,items:{type:`string`},nullable:!0},singlePlayer:{type:`boolean`,nullable:!0},showInPlaces:{type:`boolean`,nullable:!0},thumbnailUrl:{type:`string`,nullable:!0},accessType:{type:`string`,nullable:!0}},required:[`worldName`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1}})(e.WorldSettingsChangedEvent||(e.WorldSettingsChangedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLD_SPAWN_COORDINATE_SET},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{name:{type:`string`,pattern:`^[a-zA-Z0-9_-]+\\.dcl\\.eth|[a-zA-Z0-9_-]+\\.eth$`},oldCoordinate:{type:`object`,properties:{x:{type:`number`},y:{type:`number`}},required:[`x`,`y`],additionalProperties:!1,nullable:!0},newCoordinate:{type:`object`,properties:{x:{type:`number`},y:{type:`number`}},required:[`x`,`y`],additionalProperties:!1}},required:[`name`,`oldCoordinate`,`newCoordinate`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldSpawnCoordinateSetEvent||(e.WorldSpawnCoordinateSetEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLD_SCENES_UNDEPLOYMENT},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{worldName:{type:`string`},scenes:{type:`array`,items:{type:`object`,properties:{entityId:{type:`string`},baseParcel:{type:`string`}},required:[`entityId`,`baseParcel`],additionalProperties:!1},minItems:1}},required:[`worldName`,`scenes`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldScenesUndeploymentEvent||(e.WorldScenesUndeploymentEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLD_UNDEPLOYMENT},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{worldName:{type:`string`}},required:[`worldName`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldUndeploymentEvent||(e.WorldUndeploymentEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.DEPLOYMENT},key:{type:`string`},timestamp:{type:`number`,minimum:0},entity:{type:`object`,properties:{entityId:{type:`string`},authChain:t.AuthChain.schema},additionalProperties:!0,required:[`entityId`,`authChain`]},contentServerUrls:{type:`array`,items:{type:`string`},nullable:!0},force:{type:`boolean`,nullable:!0},animation:{type:`string`,nullable:!0},lods:{type:`array`,items:{type:`string`},nullable:!0}},required:[`type`,`subType`,`key`,`timestamp`,`entity`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{title:{type:`string`},description:{type:`string`},url:{type:`string`},attendee:{type:`string`}},required:[`title`,`description`,`url`,`attendee`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{title:{type:`string`},description:{type:`string`},world:{type:`string`},permissions:{type:`array`,items:{type:`string`}},url:{type:`string`},address:{type:`string`}},required:[`title`,`description`,`world`,`permissions`,`url`,`address`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{title:{type:`string`},description:{type:`string`},world:{type:`string`},permissions:{type:`array`,items:{type:`string`}},url:{type:`string`},address:{type:`string`}},required:[`title`,`description`,`world`,`permissions`,`url`,`address`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{title:{type:`string`},description:{type:`string`},when:{type:`number`},address:{type:`string`}},required:[`title`,`description`,`when`,`address`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:r.Events.Type.WORLD},subType:{type:`string`,const:r.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{title:{type:`string`},description:{type:`string`},url:{type:`string`},when:{type:`number`},address:{type:`string`}},required:[`title`,`description`,`url`,`when`,`address`],additionalProperties:!1}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,n.generateLazyValidator)(e.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})),rr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.UserWarningCreatedEvent=e.UserBanLiftedEvent=e.UserBanCreatedEvent=void 0;var t=$(),n=Bn();(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.MODERATION},subType:{type:`string`,const:n.Events.SubType.Moderation.USER_BAN_CREATED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{id:{type:`string`},bannedAddress:{type:`string`},bannedBy:{type:`string`},reason:{type:`string`},bannedAt:{type:`number`,minimum:0},expiresAt:{type:`number`,nullable:!0,minimum:0},customMessage:{type:`string`,nullable:!0}},required:[`id`,`bannedAddress`,`bannedBy`,`reason`,`bannedAt`,`expiresAt`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.UserBanCreatedEvent||(e.UserBanCreatedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.MODERATION},subType:{type:`string`,const:n.Events.SubType.Moderation.USER_BAN_LIFTED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{id:{type:`string`},bannedAddress:{type:`string`},liftedBy:{type:`string`},liftedAt:{type:`number`,minimum:0}},required:[`id`,`bannedAddress`,`liftedBy`,`liftedAt`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.UserBanLiftedEvent||(e.UserBanLiftedEvent={})),(function(e){e.schema={type:`object`,properties:{type:{type:`string`,const:n.Events.Type.MODERATION},subType:{type:`string`,const:n.Events.SubType.Moderation.USER_WARNING_CREATED},key:{type:`string`},timestamp:{type:`number`,minimum:0},metadata:{type:`object`,properties:{id:{type:`string`},warnedAddress:{type:`string`},warnedBy:{type:`string`},reason:{type:`string`},warnedAt:{type:`number`,minimum:0}},required:[`id`,`warnedAddress`,`warnedBy`,`reason`,`warnedAt`]}},required:[`type`,`subType`,`key`,`timestamp`,`metadata`],additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.UserWarningCreatedEvent||(e.UserWarningCreatedEvent={}))})),ir=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);
9(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Bn(),e),n(Vn(),e),n(Hn(),e),n(Un(),e),n(Wn(),e),n(Gn(),e),n(qn(),e),n(Jn(),e),n(Yn(),e),n(Xn(),e),n(Zn(),e),n(Qn(),e),n($n(),e),n(er(),e),n(tr(),e),n(nr(),e),n(rr(),e)})),ar=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Qt(),e),n(sn(),e),n(Dn(),e),n(nn(),e),n(pn(),e),n(kn(),e),n(jn(),e),n(Mn(),e),n(Pn(),e),n(zn(),e),n(ir(),e)})),or=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WearableJson=void 0;var t=Ut(),n=Wt(),r=Jt(),i=$(),a=ar();(function(e){e.schema={type:`object`,properties:{description:{type:`string`},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:`string`},data:{type:`object`,properties:{replaces:{type:`array`,items:n.WearableCategory.schema},hides:{type:`array`,items:n.WearableCategory.schema},tags:{type:`array`,items:{type:`string`,minLength:1}},representations:{type:`array`,items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:`array`,nullable:!0,items:a.HideableWearableCategory.schema},blockVrmExport:{type:`boolean`,nullable:!0},outlineCompatible:{type:`boolean`,nullable:!0}},required:[`replaces`,`hides`,`tags`,`representations`,`category`]}},additionalProperties:!0,required:[`description`,`name`,`data`]},e.validate=(0,i.generateLazyValidator)(e.schema)})(e.WearableJson||(e.WearableJson={}))})),sr=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Ht(),e),n(or(),e)})),cr=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Vt(),e),n(sr(),e)})),lr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Account=e.AccountSortBy=void 0;var t=$();(function(e){e.MOST_SALES=`most_sales`,e.MOST_PURCHASES=`most_purchases`,e.MOST_SPENT=`most_spent`,e.MOST_EARNED=`most_earned`,e.MOST_ROYALTIES=`most_royalties`,e.MOST_COLLECTIONS=`most_collections`})(e.AccountSortBy||(e.AccountSortBy={})),(function(e){e.schema={type:`object`,properties:{id:{type:`string`},address:{type:`string`},sales:{type:`integer`},purchases:{type:`integer`},spent:{type:`string`},earned:{type:`string`},royalties:{type:`string`},collections:{type:`number`}},required:[`id`,`address`,`sales`,`purchases`,`spent`,`earned`,`royalties`,`collections`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Account||(e.Account={}))})),ur=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getChainId=e.ChainName=void 0;var t=$(),n=fr(),r;(function(e){e.ETHEREUM_MAINNET=`Ethereum Mainnet`,e.ETHEREUM_ROPSTEN=`Ropsten`,e.ETHEREUM_RINKEBY=`Rinkeby`,e.ETHEREUM_GOERLI=`Goerli`,e.ETHEREUM_KOVAN=`Kovan`,e.ETHEREUM_SEPOLIA=`Sepolia`,e.MATIC_MAINNET=`Polygon`,e.MATIC_MUMBAI=`Mumbai`,e.MATIC_AMOY=`Amoy`,e.AVALANCHE_MAINNET=`Avalanche`,e.BINANCE_MAINNET=`Binance Smart Chain`,e.ARBITRUM_MAINNET=`Arbitrum`,e.OPTIMISM_MAINNET=`Optimism`,e.FANTOM_MAINNET=`Fantom`})(r=e.ChainName||(e.ChainName={}));function i(e){switch(e){case r.ETHEREUM_MAINNET:return n.ChainId.ETHEREUM_MAINNET;case r.ETHEREUM_ROPSTEN:return n.ChainId.ETHEREUM_ROPSTEN;case r.ETHEREUM_RINKEBY:return n.ChainId.ETHEREUM_RINKEBY;case r.ETHEREUM_GOERLI:return n.ChainId.ETHEREUM_GOERLI;case r.ETHEREUM_KOVAN:return n.ChainId.ETHEREUM_KOVAN;case r.ETHEREUM_SEPOLIA:return n.ChainId.ETHEREUM_SEPOLIA;case r.MATIC_MAINNET:return n.ChainId.MATIC_MAINNET;case r.MATIC_MUMBAI:return n.ChainId.MATIC_MUMBAI;case r.MATIC_AMOY:return n.ChainId.MATIC_AMOY;case r.AVALANCHE_MAINNET:return n.ChainId.AVALANCHE_MAINNET;case r.BINANCE_MAINNET:return n.ChainId.BSC_MAINNET;case r.ARBITRUM_MAINNET:return n.ChainId.ARBITRUM_MAINNET;case r.OPTIMISM_MAINNET:return n.ChainId.OPTIMISM_MAINNET;case r.FANTOM_MAINNET:return n.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(r=e.ChainName||(e.ChainName={}))})),dr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Network=void 0;var t=$();(function(e){e.ETHEREUM=`ETHEREUM`,e.MATIC=`MATIC`,e.AVALANCHE=`AVALANCHE`,e.BSC=`BINANCE SMART CHAIN`,e.OPTIMISM=`OPTIMISM`,e.ARBITRUM=`ARBITRUM`,e.FANTOM=`FANTOM`})(e.Network||(e.Network={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Network||(e.Network={}))})),fr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;var t=$(),n=ur(),r=dr(),i;(function(e){e[e.ETHEREUM_MAINNET=1]=`ETHEREUM_MAINNET`,e[e.ETHEREUM_ROPSTEN=3]=`ETHEREUM_ROPSTEN`,e[e.ETHEREUM_RINKEBY=4]=`ETHEREUM_RINKEBY`,e[e.ETHEREUM_GOERLI=5]=`ETHEREUM_GOERLI`,e[e.ETHEREUM_KOVAN=42]=`ETHEREUM_KOVAN`,e[e.ETHEREUM_SEPOLIA=11155111]=`ETHEREUM_SEPOLIA`,e[e.MATIC_MAINNET=137]=`MATIC_MAINNET`,e[e.MATIC_MUMBAI=80001]=`MATIC_MUMBAI`,e[e.MATIC_AMOY=80002]=`MATIC_AMOY`,e[e.BSC_MAINNET=56
9]=`BSC_MAINNET`,e[e.OPTIMISM_MAINNET=10]=`OPTIMISM_MAINNET`,e[e.ARBITRUM_MAINNET=42161]=`ARBITRUM_MAINNET`,e[e.FANTOM_MAINNET=250]=`FANTOM_MAINNET`,e[e.AVALANCHE_MAINNET=43114]=`AVALANCHE_MAINNET`})(i=e.ChainId||(e.ChainId={}));function a(e){switch(e){case i.ETHEREUM_MAINNET:return n.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return n.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return n.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return n.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return n.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return n.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return n.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return n.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return n.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return n.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return n.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return n.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return n.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return n.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=a;function o(e){switch(e){case i.ETHEREUM_MAINNET:return`ethereum`;case i.ETHEREUM_ROPSTEN:return`ropsten`;case i.ETHEREUM_RINKEBY:return`rinkeby`;case i.ETHEREUM_GOERLI:return`goerli`;case i.ETHEREUM_KOVAN:return`kovan`;case i.ETHEREUM_SEPOLIA:return`sepolia`;case i.MATIC_MAINNET:return`matic`;case i.MATIC_MUMBAI:return`mumbai`;case i.MATIC_AMOY:return`amoy`;default:return``}}e.getURNProtocol=o;function s(e){let t={[r.Network.BSC]:i.BSC_MAINNET,[r.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[r.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[r.Network.FANTOM]:i.FANTOM_MAINNET,[r.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(e){case i.ETHEREUM_MAINNET:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},t);case i.ETHEREUM_ROPSTEN:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[r.Network.MATIC]:i.MATIC_MUMBAI},t);case i.ETHEREUM_RINKEBY:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[r.Network.MATIC]:i.MATIC_MUMBAI},t);case i.ETHEREUM_GOERLI:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[r.Network.MATIC]:i.MATIC_MUMBAI},t);case i.ETHEREUM_KOVAN:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[r.Network.MATIC]:i.MATIC_MUMBAI},t);case i.ETHEREUM_SEPOLIA:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[r.Network.MATIC]:i.MATIC_AMOY},t);case i.MATIC_MAINNET:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},t);case i.MATIC_MUMBAI:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_MUMBAI,[r.Network.MATIC]:i.MATIC_MUMBAI},t);case i.MATIC_AMOY:return Object.assign({[r.Network.ETHEREUM]:i.MATIC_AMOY,[r.Network.MATIC]:i.MATIC_AMOY},t);default:return Object.assign({[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET},t)}}e.getNetworkMapping=s;function c(e){switch(e){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return r.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return r.Network.MATIC;case i.BSC_MAINNET:return r.Network.BSC;case i.OPTIMISM_MAINNET:return r.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return r.Network.ARBITRUM;case i.FANTOM_MAINNET:return r.Network.FANTOM;case i.AVALANCHE_MAINNET:return r.Network.AVALANCHE}}e.getNetwork=c,(function(e){e.schema={type:`number`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(i=e.ChainId||(e.ChainId={}))})),pr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Collection=e.CollectionSortBy=void 0;var t=$(),n=fr(),r=dr();(function(e){e.NEWEST=`newest`,e.NAME=`name`,e.RECENTLY_REVIEWED=`recently_reviewed`,e.RECENTLY_LISTED=`recently_listed`,e.SIZE=`size`})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(e){e.schema={type:`object`,properties:{urn:{type:`string`},creator:{type:`string`},name:{type:`string`},contractAddress:{type:`string`},size:{type:`integer`},isOnSale:{type:`boolean`},createdAt:{type:`integer`},updatedAt:{type:`integer`},reviewedAt:{type:`integer`},network:r.Network.schema,chainId:n.ChainId.schema,firstListedAt:{type:`integer`,nullable:!0}},required:[`urn`,`creator`,`name`,`contractAddress`,`isOnSale`,`size`,`createdAt`,`updatedAt`,`reviewedAt`,`network`,`chainId`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Collection||(e.Collection={}))})),mr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.NFTCategory=void 0;var t=$();(function(e){e.PARCEL=`parcel`,e.ESTATE=`estate`,e.WEARABLE=`wearable`,e.ENS=`ens`,e.EMOTE=`emote`})(e.NFTCategory||(e.NFTCategory={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.NFTCategory||(e.NFTCategory={}))})),hr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Contract=e.ContractSortBy=void 0;var t=$(),n=fr(),r=dr(),i=mr();(function(e){e.NAME=`name`})(e.ContractSortBy||(e.ContractSortBy={})),(function(e){e.schema={type:`object`,properties:{name:{type:`string`},address:{type:`string`},category:i.NFTCategory.schema,network:r.Network.schema,chainId:n.ChainId.schema},required:[`name`,`address`,`category`,`network`,`chainId`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Contract||(e.Contract={}))})),gr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.NFT=e.NFTSortBy=void 0;var t=$(),n=fr(),r=ar(),i=dr(),a=mr(),o=Ut(),s=Wt();(function(e){e.NAME=`name`,e.NEWEST=`newest`,e.RECENTLY_LISTED=`recently_listed`,e.RECENTLY_SOLD=`recently_sold`,e.CHEAPEST=`cheapest`,e.RENTAL_LISTING_DATE=`rental_listing_date`,e.RENTAL_DATE=`rented_date`,e.MAX_RENTAL_PRICE=`max_rental_price`,e.MIN_RENTAL_PRICE=`min_rental_price`})(e.NFTSortBy||(e.NFTSortBy={})),(function(e){e.schema={type:`object`,properties:{id:{type:`string`},tokenId:{type:`string`},contractAddress:{type:`string`},activeOrderId:{type:`string`,nullable:!0},utility:{type:`string`,nullable:!0},openRentalId:{type:`string`,nullable:!0},owner:{type:`string`},name:{type:`string`},image:{type:`string`},url:{type:`string`},data:{type:`object`,nullable:!1,properties:{parcel:{type:`object`,properties:{description:{type:[`string`],nullable:!0},x:{type:`string`},y:{type:`string`},estate:{type:`object`,properties:{tokenId:{type:`string`},name:{type:`string`}},required:[`tokenId`,`name`],nullable:!0}},required:[`description`,`x`,`y`,`estate`],nullable:!0},estate:{type:`object`,properties:{description:{type:[`string`],nullable:!0},size:{type:`integer`},parcels:{type:`array`,items:{type:`object`,properties:{x:{type:`number`},y:{type:`number`}},required:[`x`,`y`]}}},required:[`description`,`size`,`parcels`],nullable:!0},wearable:{type:`object`,properties:{bodyShapes:{type:`array`,items:r.BodyShape.schema},category:s.WearableCategory.schema,description:{type:`string`},rarity:o.Rarity.schema,isSmart:{type:`boolean`}},required:[`bodyShapes`,`category`,`description`,`rarity`,`isSmart`],nullable:!0},ens:{type:`object`,properties:{subdomain:{type:`string`}},required:[`subdomain`],nullable:!0},emote:{type:`object`,properties:{bodyShapes:{type:`array`,items:r.BodyShape.schema},category:r.EmoteCategory.schema,description:{type:`string`},rarity:o.Rarity.schema,loop:{type:`boolean`},hasSound:{type:`boolean`},hasGeometry:{type:`boolean`},outcomeType:{type:`string`,nullable:!0}},required:[`bodyShapes`,`category`,`description`,`rarity`,`loop`],nullable:!0}},required:[]},issuedId:{type:`string`,nullable:!0},itemId:{type:`string`,nullable:!0},category:a.NFTCategory.schema,network:i.Network.schema,chainId:n.ChainId.schema,createdAt:{type:`integer`},updatedAt:{type:`integer`},soldAt:{type:`integer`},urn:{type:`string`,nullable:!0}},required:[`id`,`tokenId`,`contractAddress`,`activeOrderId`,`openRentalId`,`owner`,`name`,`image`,`url`,`data`,`issuedId`,`itemId`,`category`,`network`,`chainId`,`createdAt`,`updatedAt`,`soldAt`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.NFT||(e.NFT={}))})),_r=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Item=e.ItemSortBy=void 0;var t=$(),n=fr(),r=dr(),i=gr(),a=mr();(function(e){e.NAME=`name`,e.NEWEST=`newest`,e.RECENTLY_REVIEWED=`recently_reviewed`,e.RECENTLY_SOLD=`recently_sold`,e.RECENTLY_LISTED=`recently_listed`,e.CHEAPEST=`cheapest`})(e.ItemSortBy||(e.ItemSortBy={})),(function(e){e.schema={type:`object`,properties:{id:{type:`string`},name:{type:`string`},thumbnail:{type:`string`},url:{type:`string`},category:a.NFTCategory.schema,contractAddress:{type:`string`},itemId:{type:`string`},rarity:{type:`string`},price:{type:`string`},available:{type:`integer`},isOnSale:{type:`boolean`},creator:{type:`string`},beneficiary:{type:`string`,nullable:!0},tradeId:{type:`string`,nullable:!0},tradeContractAddress:{type:`string`,nullable:!0},data:i.NFT.schema.properties.data,network:r.Network.schema,chainId:n.ChainId.schema,urn:{type:`string`},createdAt:{type:`integer`},updatedAt:{type:`integer`},reviewedAt:{type:`integer`},soldAt:{type:`integer`},firstListedAt:{type:`integer`,nullable:!0},picks:{type:`object`,properties:{pickedByUser:{type:`boolean`,nullable:!0},count:{type:`integer`}},required:[`count`],nullable:!0},minPrice:{type:`string`,nullable:!0},utility:{type:`string`,nullable:!0},minListingPrice:{type:`string`,nullable:!0},maxListingPrice:{type:`string`,nullable:!0},listings:{type:`integer`,nullable:!0},owners:{type:`integer`,nullable:!0},tradeExpiresAt:{type:`integer`,nullable:!0}},required:[`id`,`name`,`thumbnail`,`url`,`category`,`contractAddress`,`itemId`,`rarity`,`price`,`available`,`isOnSale`,`creator`,`data`,`network`,`chainId`,`createdAt`,`updatedAt`,`soldAt`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Item||(e.Item={}))})),vr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ListingStatus=void 0;var t=$();
9(function(e){e.OPEN=`open`,e.SOLD=`sold`,e.CANCELLED=`cancelled`})(e.ListingStatus||(e.ListingStatus={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.ListingStatus||(e.ListingStatus={}))})),yr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MetaTransaction=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{from:{type:`string`},params:{type:`array`,items:[{type:`string`},{type:`string`}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:[`from`,`params`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})),br=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Mint=e.MintSortBy=void 0;var t=$(),n=fr(),r=dr();(function(e){e.RECENTLY_MINTED=`recently_minted`,e.MOST_EXPENSIVE=`most_expensive`})(e.MintSortBy||(e.MintSortBy={})),(function(e){e.schema={type:`object`,properties:{id:{type:`string`},creator:{type:`string`},beneficiary:{type:`string`},minter:{type:`string`},price:{type:`string`,nullable:!0},contractAddress:{type:`string`},tokenId:{type:`string`},itemId:{type:`string`},issuedId:{type:`string`},timestamp:{type:`integer`},network:r.Network.schema,chainId:n.ChainId.schema},required:[`id`,`creator`,`beneficiary`,`minter`,`itemId`,`tokenId`,`issuedId`,`contractAddress`,`price`,`timestamp`,`network`,`chainId`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Mint||(e.Mint={}))})),xr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(e){e.NEWEST=`newest`,e.RECENTLY_SOLD=`recently_sold`,e.CHEAPEST=`cheapest`,e.MOST_EXPENSIVE=`most_expensive`,e.RECENTLY_LISTED=`recently_listed`})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(e){e.ASC=`asc`,e.DESC=`desc`})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})),Sr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Order=e.OrderSortBy=void 0;var t=$(),n=fr(),r=vr(),i=dr();(function(e){e.RECENTLY_LISTED=`recently_listed`,e.RECENTLY_UPDATED=`recently_updated`,e.CHEAPEST=`cheapest`,e.ISSUED_ID_ASC=`issued_id_asc`,e.ISSUED_ID_DESC=`issued_id_desc`,e.OLDEST=`oldest`})(e.OrderSortBy||(e.OrderSortBy={})),(function(e){e.schema={type:`object`,properties:{id:{type:`string`},marketplaceAddress:{type:`string`},contractAddress:{type:`string`},tokenId:{type:`string`},owner:{type:`string`},buyer:{type:[`string`],nullable:!0},price:{type:`string`},status:r.ListingStatus.schema,network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:`integer`},createdAt:{type:`integer`},updatedAt:{type:`integer`},issuedId:{type:`string`},tradeId:{type:`string`,nullable:!0}},required:[`id`,`marketplaceAddress`,`contractAddress`,`tokenId`,`owner`,`buyer`,`price`,`status`,`network`,`chainId`,`expiresAt`,`createdAt`,`updatedAt`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Order||(e.Order={}))})),Cr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ProviderType=void 0;var t=$();(function(e){e.INJECTED=`injected`,e.MAGIC=`magic`,e.MAGIC_TEST=`magic_test`,e.FORTMATIC=`formatic`,e.NETWORK=`network`,e.WALLET_CONNECT=`wallet_connect`,e.WALLET_CONNECT_V2=`wallet_connect_v2`,e.WALLET_LINK=`wallet_link`,e.METAMASK_MOBILE=`metamask_mobile`,e.AUTH_SERVER=`auth_server`,e.THIRDWEB=`thirdweb`})(e.ProviderType||(e.ProviderType={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.ProviderType||(e.ProviderType={}))})),wr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SaleType=void 0;var t=$();(function(e){e.ORDER=`order`,e.BID=`bid`,e.MINT=`mint`})(e.SaleType||(e.SaleType={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.SaleType||(e.SaleType={}))})),Tr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Sale=e.SaleSortBy=void 0;var t=$(),n=fr(),r=wr(),i=dr();(function(e){e.RECENTLY_SOLD=`recently_sold`,e.MOST_EXPENSIVE=`most_expensive`})(e.SaleSortBy||(e.SaleSortBy={})),(function(e){e.schema={type:`object`,properties:{id:{type:`string`},type:r.SaleType.schema,buyer:{type:`string`},seller:{type:`string`},price:{type:`string`},contractAddress:{type:`string`},tokenId:{type:`string`},itemId:{type:`string`},txHash:{type:`string`},timestamp:{type:`integer`},network:i.Network.schema,chainId:n.ChainId.schema},required:[`id`,`buyer`,`seller`,`itemId`,`tokenId`,`price`,`contractAddress`,`timestamp`,`txHash`,`network`,`chainId`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Sale||(e.Sale={}))})),Er=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;var t=$(),n=fr(),r=dr();(function(e){e.OPEN=`open`,e.CANCELLED=`cancelled`,e.EXECUTED=`executed`,e.CLAIMED=`claimed`})(e.RentalStatus||(e.RentalStatus={})),(function(e){e.ASC=`asc`,e.DESC=`desc`})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(e){e.PARCEL=`parcel`,e.ESTATE=`estate`})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(e){e.LAND_CREATION_DATE=`land_creation_date`,e.RENTAL_LISTING_DATE=`rental_listing_date`,e.RENTAL_DATE=`rented_date`,e.NAME=`name`,e.MAX_RENTAL_PRICE=`max_rental_price`,e.MIN_RENTAL_PRICE=`min_rental_price`})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(e){e.schema={type:`object`,properties:{minDays:{type:`integer`,minimum:0,maximum:2147483647},maxDays:{type:`integer`,minimum:0,maximum:2147483647},pricePerDay:{type:`string`,pattern:`^[0-9]+$`}},additionalProperties:!1,required:[`minDays`,`maxDays`,`pricePerDay`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(e){e.schema={type:`object`,properties:{network:r.Network.schema,chainId:n.ChainId.schema,expiration:{type:`number`,minimum:0},signature:{type:`string`,minLength:1},tokenId:{type:`string`,minLength:1},nonces:{type:`array`,minItems:3,maxItems:3,items:{minLength:1,type:`string`,pattern:`^[0-9]+$`}}
9,contractAddress:{type:`string`,pattern:`^0x[a-fA-F0-9]{40}$`},rentalContractAddress:{type:`string`,pattern:`^0x[a-fA-F0-9]{40}$`},periods:{type:`array`,minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:`string`,pattern:`^0x[a-fA-F0-9]{40}$`}},additionalProperties:!1,required:[`network`,`chainId`,`expiration`,`signature`,`nonces`,`tokenId`,`contractAddress`,`rentalContractAddress`,`periods`,`target`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})),Dr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(e){e.DATE=`date`,e.MOST_SALES=`most_sales`})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})),Or=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Store=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{id:{type:`string`},version:{type:`number`},owner:{type:`string`},description:{type:`string`},links:{type:`array`,items:{type:`object`,properties:{name:{type:`string`},url:{type:`string`}},required:[`name`,`url`]}},images:{type:`array`,items:{type:`object`,properties:{name:{type:`string`},file:{type:`string`}},required:[`name`,`file`]}}},required:[`id`,`version`,`owner`,`description`,`links`,`images`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Store||(e.Store={}))})),kr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;var t=$();(function(e){e.MALE=`male`,e.FEMALE=`female`})(e.WearableGender||(e.WearableGender={})),(function(e){e.MALE=`male`,e.FEMALE=`female`,e.UNISEX=`unisex`})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.WearableGender||(e.WearableGender={}))})),Ar=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;var t=$();function n(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=n;function r(e,t){let r=n().validWorldRanges;for(let n of r)if(e>=n.xMin&&e<=n.xMax&&t>=n.yMin&&t<=n.yMax)return!0;return!1}e.isInsideWorldLimits=r,(function(e){e.schema={type:`object`,required:[`validWorldRanges`],properties:{validWorldRanges:{type:`array`,default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:`object`,required:[`xMin`,`yMin`,`xMax`,`yMax`],properties:{xMin:{type:`integer`},yMin:{type:`integer`},xMax:{type:`integer`},yMax:{type:`integer`}}}}},additionalProperties:!1},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.World||(e.World={}))})),jr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Bid=e.BidSortBy=void 0;var t=$(),n=fr(),r=vr(),i=dr();(function(e){e.RECENTLY_OFFERED=`recently_offered`,e.RECENTLY_UPDATED=`recently_updated`,e.MOST_EXPENSIVE=`most_expensive`})(e.BidSortBy||(e.BidSortBy={})),(function(e){let a={type:`object`,properties:{id:{type:`string`},bidder:{type:`string`},seller:{type:`string`},price:{type:`string`},fingerprint:{type:`string`},status:r.ListingStatus.schema,contractAddress:{type:`string`},network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:`integer`},createdAt:{type:`integer`},updatedAt:{type:`integer`}},required:[`id`,`bidder`,`seller`,`price`,`fingerprint`,`status`,`contractAddress`,`network`,`chainId`,`expiresAt`,`createdAt`,`updatedAt`]};e.schema={type:`object`,required:[],oneOf:[{properties:Object.assign(Object.assign({},a.properties),{tradeId:{type:`string`},tokenId:{type:`string`}}),required:[...a.required,`tradeId`,`tokenId`]},{type:`object`,properties:Object.assign(Object.assign({},a.properties),{tradeId:{type:`string`},itemId:{type:`string`}}),required:[...a.required,`tradeId`,`itemId`]},{type:`object`,properties:Object.assign(Object.assign({},a.properties),{bidAddress:{type:`string`},blockchainId:{type:`string`},blockNumber:{type:`string`},tokenId:{type:`string`}}),required:[...a.required,`bidAddress`,`blockchainId`,`blockNumber`,`tokenId`]}]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.Bid||(e.Bid={}))})),Mr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})}
9)),Nr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(e){e.BID=`bid`,e.PUBLIC_NFT_ORDER=`public_nft_order`,e.PUBLIC_ITEM_ORDER=`public_item_order`})(e.TradeType||(e.TradeType={})),(function(e){e[e.ERC20=1]=`ERC20`,e[e.USD_PEGGED_MANA=2]=`USD_PEGGED_MANA`,e[e.ERC721=3]=`ERC721`,e[e.COLLECTION_ITEM=4]=`COLLECTION_ITEM`})(e.TradeAssetType||(e.TradeAssetType={})),(function(e){e.SENT=`sent`,e.RECEIVED=`received`})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})),Pr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PreviewCamera=void 0;var t=$();(function(e){e.STATIC=`static`,e.INTERACTIVE=`interactive`})(e.PreviewCamera||(e.PreviewCamera={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})),Fr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PreviewUnityMode=void 0,(function(e){e.AUTH=`authentication`,e.BUILDER=`builder`,e.MARKETPLACE=`marketplace`,e.PROFILE=`profile`,e.CONFIG=`configurator`,e.JESUS=`jesus`})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})),Ir=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Lr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PreviewEmoteEventType=void 0;var t=$();(function(e){e.ANIMATION_PLAY=`animation_play`,e.ANIMATION_PAUSE=`animation_pause`,e.ANIMATION_LOOP=`animation_loop`,e.ANIMATION_END=`animation_end`,e.ANIMATION_PLAYING=`animation_playing`})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})),Rr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PreviewEmote=void 0;var t=$();(function(e){e.IDLE=`idle`,e.WALK=`walk`,e.RUN=`run`,e.JUMP=`jump`,e.CLAP=`clap`,e.DAB=`dab`,e.DANCE=`dance`,e.FASHION=`fashion`,e.FASHION_2=`fashion-2`,e.FASHION_3=`fashion-3`,e.FASHION_4=`fashion-4`,e.LOVE=`love`,e.MONEY=`money`,e.FIST_PUMP=`fist-pump`,e.HEAD_EXPLODE=`head-explode`,e.WAVE=`wave`})(e.PreviewEmote||(e.PreviewEmote={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})),zr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;var t=$();(function(e){e.READY=`ready`,e.LOAD=`load`,e.ERROR=`error`,e.UPDATE=`update`,e.CONTROLLER_REQUEST=`controller_request`,e.CONTROLLER_RESPONSE=`controller_response`,e.EMOTE_EVENT=`emote_event`})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(e){e.BABYLON=`babylon`,e.UNITY=`unity`})(e.PreviewRenderer||(e.PreviewRenderer={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.PreviewMessageType||(e.PreviewMessageType={})),e.sendMessage=(e,t,n,r=`*`)=>{let i={type:t,payload:n};e.postMessage(i,r)}})),Br=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Vr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PreviewProjection=void 0;var t=$();(function(e){e.ORTHOGRAPHIC=`orthographic`,e.PERSPECTIVE=`perspective`})(e.PreviewProjection||(e.PreviewProjection={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})),Hr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PreviewType=void 0;var t=$();(function(e){e.TEXTURE=`texture`,e.WEARABLE=`wearable`,e.AVATAR=`avatar`})(e.PreviewType||(e.PreviewType={})),(function(e){e.schema={type:`string`,enum:Object.values(e)},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.PreviewType||(e.PreviewType={}))})),Ur=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SpringBoneParams=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{stiffness:{type:`number`,minimum:0,maximum:5},gravityPower:{type:`number`,minimum:0,maximum:10},gravityDir:{type:`array`,items:[{type:`number`},{type:`number`},{type:`number`}],minItems:3,maxItems:3},dragForce:{type:`number`,minimum:0,maximum:1},center:{type:`integer`,minimum:0,nullable:!0}},required:[`stiffness`,`gravityPower`,`gravityDir`,`dragForce`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.SpringBoneParams||(e.SpringBoneParams={}))})),Wr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})}
9)),Gr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Kr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),qr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Jr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Yr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Xr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Zr=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Qr=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Pr(),e),n(Fr(),e),n(Ir(),e),n(Lr(),e),n(Rr(),e),n(zr(),e),n(Br(),e),n(Vr(),e),n(Hr(),e),n(Ur(),e),n(Wr(),e),n(Gr(),e),n(Kr(),e),n(qr(),e),n(Jr(),e),n(Yr(),e),n(Xr(),e),n(Zr(),e)})),$r=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isSysLink=void 0,e.isSysLink=e=>typeof e==`object`&&!!e&&`sys`in e&&`id`in e.sys})),ei=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ContentfulLocale=void 0;var t;(function(e){e.enUS=`en-US`,e.es=`es`,e.zh=`zh`})(t||(t={})),e.ContentfulLocale=t})),ti=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),ni=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n($r(),e),n(ei(),e),n(ti(),e)})),ri=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var r=lr();Object.defineProperty(e,`Account`,{enumerable:!0,get:function(){return r.Account}}),Object.defineProperty(e,`AccountSortBy`,{enumerable:!0,get:function(){return r.AccountSortBy}});var i=fr();Object.defineProperty(e,`ChainId`,{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,`getChainName`,{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,`getURNProtocol`,{enumerable:!0,get:function(){return i.getURNProtocol}});var a=ur();Object.defineProperty(e,`ChainName`,{enumerable:!0,get:function(){return a.ChainName}}),Object.defineProperty(e,`getChainId`,{enumerable:!0,get:function(){return a.getChainId}});var o=pr();Object.defineProperty(e,`Collection`,{enumerable:!0,get:function(){return o.Collection}}),Object.defineProperty(e,`CollectionSortBy`,{enumerable:!0,get:function(){return o.CollectionSortBy}});var s=hr();Object.defineProperty(e,`Contract`,{enumerable:!0,get:function(){return s.Contract}}),Object.defineProperty(e,`ContractSortBy`,{enumerable:!0,get:function(){return s.ContractSortBy}});var c=_r();Object.defineProperty(e,`Item`,{enumerable:!0,get:function(){return c.Item}}),Object.defineProperty(e,`ItemSortBy`,{enumerable:!0,get:function(){return c.ItemSortBy}});var l=vr();Object.defineProperty(e,`ListingStatus`,{enumerable:!0,get:function(){return l.ListingStatus}});var u=yr();Object.defineProperty(e,`MetaTransaction`,{enumerable:!0,get:function(){return u.MetaTransaction}});var d=br();Object.defineProperty(e,`Mint`,{enumerable:!0,get:function(){return d.Mint}}),Object.defineProperty(e,`MintSortBy`,{enumerable:!0,get:function(){return d.MintSortBy}});var f=dr();Object.defineProperty(e,`Network`,{enumerable:!0,get:function(){return f.Network}});var p=mr();Object.defineProperty(e,`NFTCategory`,{enumerable:!0,get:function(){return p.NFTCategory}});var m=gr();Object.defineProperty(e,`NFT`,{enumerable:!0,get:function(){return m.NFT}}),Object.defineProperty(e,`NFTSortBy`,{enumerable:!0,get:function(){return m.NFTSortBy}});var h=xr();Object.defineProperty(e,`CatalogSortBy`,{enumerable:!0,get:function(){return h.CatalogSortBy}}),Object.defineProperty(e,`CatalogSortDirection`,{enumerable:!0,get:function(){return h.CatalogSortDirection}});var g=Sr();Object.defineProperty(e,`Order`,{enumerable:!0,get:function(){return g.Order}}),Object.defineProperty(e,`OrderSortBy`,{enumerable:!0,get:function(){return g.OrderSortBy}});var _=Cr();Object.defineProperty(e,`ProviderType`,{enumerable:!0,get:function(){return _.ProviderType}});var v=Ut();Object.defineProperty(e,`Rarity`,{enumerable:!0,get:function(){return v.Rarity}});var y=wr();Object.defineProperty(e,`SaleType`,{enumerable:!0,get:function(){return y.SaleType}});var b=Tr();Object.defineProperty(e,`Sale`,{enumerable:!0,get:function(){return b.Sale}}),Object.defineProperty(e,`SaleSortBy`,{enumerable:!0,get:function(){return b.SaleSortBy}});var x=Er();Object.defineProperty(e,`RentalStatus`,{enumerable:!0,get:function(){return x.RentalStatus}}),Object.defineProperty(e,`RentalsListingSortDirection`,{enumerable:!0,get:function(){return x.RentalsListingSortDirection}}),Object.defineProperty(e,`RentalsListingsFilterByCategory`,{enumerable:!0,get:function(){return x.RentalsListingsFilterByCategory}}),Object.defineProperty(e,`RentalsListingsSortBy`,{enumerable:!0,get:function(){return x.RentalsListingsSortBy}}),Object.defineProperty(e,`RentalListingCreation`,{enumerable:!0,get:function(){return x.RentalListingCreation}}),Object.defineProperty(e,`PeriodCreation`,{enumerable:!0,get:function(){return x.PeriodCreation}});var S=Dr();Object.defineProperty(e,`AnalyticsDayDataSortBy`,{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var C=Or();Object.defineProperty(e,`Store`,{enumerable:!0,get:function(){return C.Store}});var w=kr();Object.defineProperty(e,`WearableGender`,{enumerable:!0,get:function(){return w.WearableGender}}),Object.defineProperty(e,`GenderFilterOption`,{enumerable:!0,get:function(){return w.GenderFilterOption}});var T=Ar();Object.defineProperty(e,`World`,{enumerable:!0,get:function(){return T.World}}),Object.defineProperty(e,`getWorld`,{enumerable:!0,get:function(){return T.getWorld}}),Object.defineProperty(e,`isInsideWorldLimits`,{enumerable:!0,get:function(){return T.isInsideWorldLimits}}),n(jr(),e),n(Mr(),e),n(Nr(),e),n(Qr(),e),n(ni(),e)})),ii=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LinkerAuthorization=void 0;var t=$();(function(e){e.schema={type:`object`,properties:{name:{type:`string`},desc:{type:`string`},startDate:{type:`string`,nullable:!0},endDate:{type:`string`,nullable:!0},contactInfo:{type:`object`,properties:{name:{type:`string`}},required:[`name`]},onlyDev:{type:`boolean`,nullable:!0},addresses:{type:`array`,items:{type:`string`},minItems:1},plots:{type:`array`,items:{type:`string`},minItems:1}},required:[`name`,`desc`,`contactInfo`,`addresses`,`plots`]},e.validate=(0,t.generateLazyValidator)(e.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})),ai=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isInExceptionBlock=void 0;function t(e,t){return e>=62&&e<=150&&t>=151&&t<=158}function n(e,t){return e>=151&&e<=162&&t>=144&&t<=158}function r(e,t){return e>=151&&e<=163&&t>=59&&t<=143}function i(e,i){return t(e,i)||n(e,i)||r(e,i)}e.isInExceptionBlock=i})),oi=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}
9),e.Parcel=e.PARCEL_LIMITS=void 0;var t=$(),n=ai();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(r){r._isInLimits={keyword:`_isInLimits`,validate:function(e,t){return!t||typeof t.x!=`number`||typeof t.y!=`number`?!1:s(t)||(0,n.isInExceptionBlock)(t.x,t.y)},errors:!1},r.schema={type:`object`,required:[`x`,`y`],properties:{x:{type:`number`},y:{type:`number`}},_isInLimits:!0,additionalProperties:!1},r.validate=(0,t.generateLazyValidator)(r.schema,[r._isInLimits]);function i({x:e,y:t}){return`${e},${t}`}r.parcelToString=i;function a(e){let t=e.match(/^(-?\d+),(-?\d+)$/);if(!t)return null;let[,n,r]=t;return{x:parseInt(n,10),y:parseInt(r,10)}}r.stringToParcel=a;function o(e){let t=a(e);return t?r.validate(t):!1}r.isParcelStringValid=o;function s(t){let{x:n,y:r}=t;return n>=e.PARCEL_LIMITS.minX&&n<=e.PARCEL_LIMITS.maxX&&r>=e.PARCEL_LIMITS.minY&&r<=e.PARCEL_LIMITS.maxY}r.isInStandardBounds=s;function c(e){return(0,n.isInExceptionBlock)(e.x,e.y)}r.isExceptionParcel=c;function l(e){return s(e)||c(e)}r.isInBounds=l;function u(e){return r.validate(e)}r.isValid=u;function d(e){let t=a(e);return t?r.validate(t):!1}r.isValidString=d})(e.Parcel||(e.Parcel={}))})),si=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateUrlInstance=e.validateUrl=void 0;var t={allowLocalhost:!1,allowedPorts:[]};function n(e,t=2){let n=e;for(let e=0;e<t;e++)try{n=decodeURIComponent(n)}catch{break}return n.normalize(`NFKC`)}function r(e){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(e)}function i(e){return!!(e.username||e.password)}function a(e){return/\\/.test(e)}var o=[`80`,`443`];function s(e,t){return!!e.port&&!t.includes(e.port)}function c(e){let t=e.toLowerCase();return!!(t===`localhost`||t.endsWith(`.local`)||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(t)||t===`::1`||t===`[::1]`||t.startsWith(`fe80:`)||t.startsWith(`fc00:`))}function l(e){if(e.startsWith(`//`))return null;try{return{url:new URL(e),wasRelative:!1}}catch{try{return{url:new URL(e,`https://example.com`),wasRelative:!0}}catch{return null}}}function u(e){let t=n(String(e).toLowerCase());return!(r(t)||a(t))}function d(e){return!(!e||e.includes(`..`)||e.includes(`//`)||r(e)||a(e))}function f(e,f={}){let p=Object.assign(Object.assign({},t),f),m=[...o,...p.allowedPorts];if(!e||e.length===0||e.length>4096||r(e)||a(e))return!1;let h=n(e);if(r(h)||a(h)||e.startsWith(`//`))return!1;let g=l(e);if(!g)return!1;let{url:_,wasRelative:v}=g;if(_.protocol!==`http:`&&_.protocol!==`https:`&&_.protocol!==``||i(_)||a(e)||a(_.href)||!v&&(s(_,m)||!p.allowLocalhost&&_.hostname&&c(_.hostname))||!d(_.pathname)||_.pathname.length>2048)return!1;let y=Array.from(_.searchParams.entries());if(y.length>50||(_.search?_.search.startsWith(`?`)?_.search.length-1:_.search.length:0)>2048)return!1;for(let[e,t]of y)if(e.length===0||!u(e)||!u(t)||e.length>128||t.length>1024)return!1;return!(_.hash&&r(_.hash))}e.validateUrl=f;function p(e,t={}){return f(e.toString(),t)}e.validateUrlInstance=p})),ci=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(oi(),e),n(ai(),e),n(si(),e)})),li=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.sdk=void 0,e.sdk=r(cr()),i($(),e),i(ri(),e),i(ar(),e),i(Yt(),e),i(ii(),e),i(On(),e),i(An(),e),i(Ln(),e),i(ci(),e)})),ui=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;var t=li();Object.defineProperty(e,`AuthChain`,{enumerable:!0,get:function(){return t.AuthChain}}),Object.defineProperty(e,`AuthLink`,{enumerable:!0,get:function(){return t.AuthLink}}),Object.defineProperty(e,`AuthLinkType`,{enumerable:!0,get:function(){return t.AuthLinkType}})})),di=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);
9(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!==`default`&&t(i,r,a[o]);return n(i,r),i}})(),i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.parseEmphemeralPayload=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.createEthereumMessageHash=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0,e.validateSignature=f,e.isValidAuthChain=p,e.createEIP1271MessageHash=m,e.createSimpleAuthChain=h,e.createAuthChain=g,e.initializeAuthChain=_,e.signPayload=v,e.createSignature=y,e.ownerAddress=b,e.getEphemeralMessage=x,e.getEphemeralSignatureType=C,e.getSignedIdentitySignatureType=w,e.parseEphemeralPayload=T,e.isValidEIP1271Signature=E;var a=r(bt()),o=xt(),s=It(),c=i(Lt()),l=Rt(),u=ui();e.VALID_SIGNATURE=`VALID_SIGNATURE`,e.ERC1654_MAGIC_VALUE=`1626ba7e`;var d=132;async function f(e,t,n,r=Date.now()){let i=``;if(!p(t))return{ok:!1,message:`ERROR: Malformed authChain`};for(let e of t){let t=O(e.type);try{let{nextAuthority:a}=await t(i,e,{provider:n,dateToValidateExpirationInMillis:r});i=a||``}catch(t){let n=t instanceof Error?t.message:String(t);return{ok:!1,message:`ERROR. Link type: ${e.type}. ${n}.`}}}let a=i===e;return{ok:a,message:a?void 0:`ERROR: Invalid final authority. Expected: ${e}. Current ${i}.`}}function p(e){for(let[t,n]of e.entries())if(t===0&&n.type!==u.AuthLinkType.SIGNER||n.type===u.AuthLinkType.SIGNER&&t!==0)return!1;return!0}function m(e){return(0,a.hexToBytes)((0,a.sha3)((0,a.stringToUtf8Bytes)(e)))}function h(e,t,n){return[{type:u.AuthLinkType.SIGNER,payload:t,signature:``},{type:w(n),payload:e,signature:n}]}function g(e,t,n,r){let i=(0,l.moveMinutes)(n),a=x(t.address,i),o=y(e,a),s=y(t,r);return[{type:u.AuthLinkType.SIGNER,payload:e.address,signature:``},{type:u.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:a,signature:o},{type:u.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:r,signature:s}]}async function _(e,t,n,r){let i=(0,l.moveMinutes)(n),a=x(t.address,i),o=await r(a);return{ephemeralIdentity:t,expiration:i,authChain:[{type:u.AuthLinkType.SIGNER,payload:e,signature:``},{type:C(o),payload:a,signature:o}]}}function v(e,t){let n=y(e.ephemeralIdentity,t);return[...e.authChain,{type:u.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:t,signature:n}]}e.createEthereumMessageHash=s.createEthereumMessageHash;function y(e,t){return(0,s.ethSign)((0,a.hexToBytes)(e.privateKey),t)}function b(e){return e.length>0&&e[0].type===u.AuthLinkType.SIGNER?e[0].payload:`Invalid-Owner-Address`}function x(e,t){return`Decentraland Login\nEphemeral address: ${e}\nExpiration: ${t.toISOString()}`}e.Authenticator={validateSignature:f,isValidAuthChain:p,createEIP1271MessageHash:m,createSimpleAuthChain:h,createAuthChain:g,initializeAuthChain:_,signPayload:v,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:y,ownerAddress:b,getEphemeralMessage:x},e.SIGNER_VALIDATOR=async(e,t)=>({nextAuthority:t.payload}),e.ECDSA_SIGNED_ENTITY_VALIDATOR=async(e,t)=>{if(!t.signature)throw Error(`Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'`);let n=(0,s.recoverAddressFromEthSignature)(t.signature,t.payload),r=e.toLocaleLowerCase(),i=n.toLocaleLowerCase();if(r===i)return{nextAuthority:t.payload};throw Error(`Invalid signer address. Expected: ${r}. Actual: ${i}`)},e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=async(e,t,n)=>{if(!t.signature)throw Error(`Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'`);let{message:r,ephemeralAddress:i,expiration:a}=T(t.payload),o=n?.dateToValidateExpirationInMillis||Date.now();if(a>o){let n=(0,s.recoverAddressFromEthSignature)(t.signature,r),a=e.toLocaleLowerCase(),o=n.toLocaleLowerCase();if(a===o)return{nextAuthority:i};throw Error(`Invalid signer address. Expected: ${a}. Actual: ${o}`)}throw Error(`Ephemeral key expired. Expiration: ${a}. Test: ${o}`)},e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=async(e,t,n)=>{if(!t.signature)throw Error(`Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'`);let{message:r,ephemeralAddress:i,expiration:a}=T(t.payload),o=n?.dateToValidateExpirationInMillis||Date.now();if(a>o&&await D(n?.provider,e,r,t.signature,o))return{nextAuthority:i};throw Error(`Ephemeral key expired. Expiration: ${a}. Test: ${o}`)},e.EIP_1654_SIGNED_ENTITY_VALIDATOR=async(e,t,n)=>{if(!t.signature)throw Error(`Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'`);if(!n)throw Error(`Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'`);if(await D(n.provider,e,t.payload,t.signature,n.dateToValidateExpirationInMillis))return{nextAuthority:t.payload};throw Error(`Invalid validation`)};var S=async(e,t)=>({error:`Error Validator.`});function C(e){return e.length===d?u.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:u.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function w(e){return e.length===d?u.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:u.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function T(e){let t=e.replace(/\r/g,``),n=t.split(`
10`),r=`Ephemeral address: `,i=`Expiration: `;if(n.length<3||!n[1].startsWith(r)||!n[2].startsWith(i))throw Error(`Invalid ephemeral payload. Expected 3 lines with "${r}" on line 2 and "${i}" on line 3.`);let a=n[1].substring(19),o=n[2].substring(12),s=Date.parse(o);if(Number.isNaN(s))throw Error(`Invalid expiration date in ephemeral payload: "${o}"`);return{message:t,ephemeralAddress:a,expiration:s}}e.parseEmphemeralPayload=T;async function E(t,n,r,i){let o=m(n),c=(0,a.hexToBytes)(r),l;
10try{l=(0,a.bytesToHex)(await t.isValidSignature(o,c,i))}catch{}if(l===e.ERC1654_MAGIC_VALUE)return!0;let u=(0,s.createEthereumMessageHash)(n);try{l=(0,a.bytesToHex)(await t.isValidSignature(u,c,i))}catch{}return l===e.ERC1654_MAGIC_VALUE}async function D(t,n,r,i,s){if(!t)throw Error(`Missing provider`);let l=new a.default(t),u=await(0,o.SignatureValidator)(l,n),d=await E(u,r,i);if(d)return!0;let f=new c.default(l);try{let{block:e}=await f.getDate(s,!1);if(d=await E(u,r,i,e),d)return!0}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Invalid validation. Error: ${t}`)}throw Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${d}`)}function O(t){switch(t){case u.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case u.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case u.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case u.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case u.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return S}}})),fi=r((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AUTH_METADATA_HEADER=e.AUTH_TIMESTAMP_HEADER=e.AUTH_CHAIN_HEADER_PREFIX=void 0,e.AUTH_CHAIN_HEADER_PREFIX=`x-identity-auth-chain-`,e.AUTH_TIMESTAMP_HEADER=`x-identity-timestamp`,e.AUTH_METADATA_HEADER=`x-identity-metadata`})),pi=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(di(),e),n(fi(),e),n(ui(),e)}));export{St as a,Ve as c,wt as i,di as n,yt as o,It as r,vt as s,pi as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.