@note3/utils 0.0.21 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,78 @@
1
+ var xf={0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(t,n){return"Cannot apply '"+t+"' to '"+n.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",16:"Modification exception: the internal structure of an observable array was changed.",17:function(t,n){return"[mobx.array] Index out of bounds, "+t+" is larger than "+n},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(t){return"Cannot initialize from classes that inherit from Map: "+t.constructor.name},20:function(t){return"Cannot initialize map from "+t},21:function(t){return"Cannot convert to map from '"+t+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(t){return"Cannot obtain administration from "+t},25:function(t,n){return"the entry '"+t+"' does not exist in the observable map '"+n+"'"},26:"please specify a property",27:function(t,n){return"no observable property '"+t.toString()+"' found on the observable object '"+n+"'"},28:function(t){return"Cannot obtain atom from "+t},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(t,n){return"Cycle detected in computation "+t+": "+n},33:function(t){return"The setter of computed value '"+t+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(t){return"[ComputedValue '"+t+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(t){return"[mobx] `observableArray."+t+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+t+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"},Uf=xf;function ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=typeof e=="string"?e:Uf[e];throw typeof i=="function"&&(i=i.apply(null,n)),new Error("[MobX] "+i)}var jf={};function Zr(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:jf}var zs=Object.assign,Gr=Object.getOwnPropertyDescriptor,$t=Object.defineProperty,sr=Object.prototype,Vr=[];Object.freeze(Vr);var ao={};Object.freeze(ao);var Mf=typeof Proxy<"u",Lf=Object.toString();function qs(){Mf||ae("`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`")}function nr(e){W.verifyProxies&&ae("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function dt(){return++W.mobxGuid}function uo(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Rn=function(){};function Re(e){return typeof e=="function"}function an(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function Qr(e){return e!==null&&typeof e=="object"}function wt(e){if(!Qr(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n.toString()===Lf}function Ws(e){var t=e?.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function ei(e,t,n){$t(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Hs(e,t,n){$t(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function qt(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(r){return Qr(r)&&r[n]===!0}}function Un(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function Bf(e){var t=Object.getPrototypeOf(e),n=Object.getPrototypeOf(t),r=Object.getPrototypeOf(n);return r===null}function Mt(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var Js=typeof Object.getOwnPropertySymbols<"u";function Df(e){var t=Object.keys(e);if(!Js)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(r){return sr.propertyIsEnumerable.call(e,r)})):t}var ti=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Js?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Xi(e){return typeof e=="string"?e:typeof e=="symbol"?e.toString():new String(e).toString()}function Xs(e){return e===null?null:typeof e=="object"?""+e:e}function ut(e,t){return sr.hasOwnProperty.call(e,t)}var Ff=Object.getOwnPropertyDescriptors||function(t){var n={};return ti(t).forEach(function(r){n[r]=Gr(t,r)}),n};function Je(e,t){return!!(e&t)}function Xe(e,t,n){return n?e|=t:e&=~t,e}function Ss(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ps(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kf(r.key),r)}}function jn(e,t,n){return t&&Ps(e.prototype,t),n&&Ps(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nn(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Gf(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dt.apply(null,arguments)}function Ys(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yi(e,t)}function Yi(e,t){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Yi(e,t)}function kf(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kf(e){var t=kf(e,"string");return typeof t=="symbol"?t:t+""}function Gf(e,t){if(e){if(typeof e=="string")return Ss(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ss(e,t):void 0}}var We=Symbol("mobx-stored-annotations");function Rt(e){function t(n,r){if(ur(r))return e.decorate_20223_(n,r);ar(n,r,e)}return Object.assign(t,e)}function ar(e,t,n){if(ut(e,We)||ei(e,We,Dt({},e[We])),zr(n)&&!ut(e[We],t)){var r=e.constructor.name+".prototype."+t.toString();ae("'"+r+"' is decorated with 'override', but no such decorated member was found on prototype.")}Vf(e,n,t),zr(n)||(e[We][t]=n)}function Vf(e,t,n){if(!zr(t)&&ut(e[We],n)){var r=e.constructor.name+".prototype."+n.toString(),i=e[We][n].annotationType_,s=t.annotationType_;ae("Cannot apply '@"+s+"' to '"+r+"':"+(`
3
+ The field is already decorated with '@`+i+"'.")+`
4
+ Re-decorating fields is not allowed.
5
+ Use '@override' decorator for methods overridden by subclass.`)}}function zf(e){return ut(e,We)||ei(e,We,Dt({},e[We])),e[We]}function ur(e){return typeof e=="object"&&typeof e.kind=="string"}function ni(e,t){t.includes(e.kind)||ae("The decorator applied to '"+String(e.name)+"' cannot be used on a "+e.kind+" element")}var he=Symbol("mobx administration"),Wt=(function(){function e(n){n===void 0&&(n="Atom@"+dt()),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=_e.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=n}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},t.reportObserved=function(){return ha(this)},t.reportChanged=function(){ot(),ga(this),st()},t.toString=function(){return this.name_},jn(e,[{key:"isBeingObserved",get:function(){return Je(this.flags_,e.isBeingObservedMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isBeingObservedMask_,r)}},{key:"isPendingUnobservation",get:function(){return Je(this.flags_,e.isPendingUnobservationMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isPendingUnobservationMask_,r)}},{key:"diffValue",get:function(){return Je(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=Xe(this.flags_,e.diffValueMask_,r===1)}}])})();Wt.isBeingObservedMask_=1;Wt.isPendingUnobservationMask_=2;Wt.diffValueMask_=4;var co=qt("Atom",Wt);function Zs(e,t,n){t===void 0&&(t=Rn),n===void 0&&(n=Rn);var r=new Wt(e);return t!==Rn&&ai(r,t),n!==Rn&&pn(r,n),r}function qf(e,t){return e===t}function Wf(e,t){return vo(e,t)}function Hf(e,t){return vo(e,t,1)}function Jf(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var ze={identity:qf,structural:Wf,default:Jf,shallow:Hf};function un(e,t,n){return xn(e)?e:Array.isArray(e)?Pe.array(e,{name:n}):wt(e)?Pe.object(e,void 0,{name:n}):Un(e)?Pe.map(e,{name:n}):Mt(e)?Pe.set(e,{name:n}):typeof e=="function"&&!zt(e)&&!or(e)?Ws(e)?Cn(e):ir(n,e):e}function Xf(e,t,n){if(e==null||ln(e)||Bn(e)||Nt(e)||bt(e))return e;if(Array.isArray(e))return Pe.array(e,{name:n,deep:!1});if(wt(e))return Pe.object(e,void 0,{name:n,deep:!1});if(Un(e))return Pe.map(e,{name:n,deep:!1});if(Mt(e))return Pe.set(e,{name:n,deep:!1});ae("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets")}function ri(e){return e}function Yf(e,t){return xn(e)&&ae("observable.struct should not be used with observable values"),vo(e,t)?t:e}var Zf="override";function zr(e){return e.annotationType_===Zf}function cr(e,t){return{annotationType_:e,options_:t,make_:Qf,extend_:el,decorate_20223_:tl}}function Qf(e,t,n,r){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(e,t,n,!1)===null?0:1;if(r===e.target_)return this.extend_(e,t,n,!1)===null?0:2;if(zt(n.value))return 1;var s=Qs(e,this,t,n,!1);return $t(r,t,s),2}function el(e,t,n,r){var i=Qs(e,this,t,n);return e.defineProperty_(t,i,r)}function tl(e,t){ni(t,["method","field"]);var n=t.kind,r=t.name,i=t.addInitializer,s=this,o=function(c){var h,m,M,S;return cn((h=(m=s.options_)==null?void 0:m.name)!=null?h:r.toString(),c,(M=(S=s.options_)==null?void 0:S.autoAction)!=null?M:!1)};if(n=="field")return function(f){var c,h=f;return zt(h)||(h=o(h)),(c=s.options_)!=null&&c.bound&&(h=h.bind(this),h.isMobxAction=!0),h};if(n=="method"){var u;return zt(e)||(e=o(e)),(u=this.options_)!=null&&u.bound&&i(function(){var f=this,c=f[r].bind(f);c.isMobxAction=!0,f[r]=c}),e}ae("Cannot apply '"+s.annotationType_+"' to '"+String(r)+"' (kind: "+n+"):"+(`
6
+ '`+s.annotationType_+"' can only be used on properties with a function value."))}function nl(e,t,n,r){var i=t.annotationType_,s=r.value;Re(s)||ae("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':"+(`
7
+ '`+i+"' can only be used on properties with a function value."))}function Qs(e,t,n,r,i){var s,o,u,f,c,h,m;i===void 0&&(i=W.safeDescriptors),nl(e,t,n,r);var M=r.value;if((s=t.options_)!=null&&s.bound){var S;M=M.bind((S=e.proxy_)!=null?S:e.target_)}return{value:cn((o=(u=t.options_)==null?void 0:u.name)!=null?o:n.toString(),M,(f=(c=t.options_)==null?void 0:c.autoAction)!=null?f:!1,(h=t.options_)!=null&&h.bound?(m=e.proxy_)!=null?m:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function ea(e,t){return{annotationType_:e,options_:t,make_:rl,extend_:il,decorate_20223_:ol}}function rl(e,t,n,r){var i;if(r===e.target_)return this.extend_(e,t,n,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!ut(e.target_,t)||!or(e.target_[t]))&&this.extend_(e,t,n,!1)===null)return 0;if(or(n.value))return 1;var s=ta(e,this,t,n,!1,!1);return $t(r,t,s),2}function il(e,t,n,r){var i,s=ta(e,this,t,n,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,s,r)}function ol(e,t){var n;ni(t,["method"]);var r=t.name,i=t.addInitializer;return or(e)||(e=Cn(e)),(n=this.options_)!=null&&n.bound&&i(function(){var s=this,o=s[r].bind(s);o.isMobXFlow=!0,s[r]=o}),e}function sl(e,t,n,r){var i=t.annotationType_,s=r.value;Re(s)||ae("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':"+(`
8
+ '`+i+"' can only be used on properties with a generator function value."))}function ta(e,t,n,r,i,s){s===void 0&&(s=W.safeDescriptors),sl(e,t,n,r);var o=r.value;if(or(o)||(o=Cn(o)),i){var u;o=o.bind((u=e.proxy_)!=null?u:e.target_),o.isMobXFlow=!0}return{value:o,configurable:s?e.isPlainObject_:!0,enumerable:!1,writable:!s}}function fo(e,t){return{annotationType_:e,options_:t,make_:al,extend_:ul,decorate_20223_:cl}}function al(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function ul(e,t,n,r){return fl(e,this,t,n),e.defineComputedProperty_(t,Dt({},this.options_,{get:n.get,set:n.set}),r)}function cl(e,t){ni(t,["getter"]);var n=this,r=t.name,i=t.addInitializer;return i(function(){var s=Dn(this)[he],o=Dt({},n.options_,{get:e,context:this});o.name||(o.name=s.name_+"."+r.toString()),s.values_.set(r,new ft(o))}),function(){return this[he].getObservablePropValue_(r)}}function fl(e,t,n,r){var i=t.annotationType_,s=r.get;s||ae("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':"+(`
9
+ '`+i+"' can only be used on getter(+setter) properties."))}function ii(e,t){return{annotationType_:e,options_:t,make_:ll,extend_:dl,decorate_20223_:pl}}function ll(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function dl(e,t,n,r){var i,s;return yl(e,this,t,n),e.defineObservableProperty_(t,n.value,(i=(s=this.options_)==null?void 0:s.enhancer)!=null?i:un,r)}function pl(e,t){if(t.kind==="field")throw ae("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");ni(t,["accessor"]);var n=this,r=t.kind,i=t.name,s=new WeakSet;function o(u,f){var c,h,m=Dn(u)[he],M=new Vt(f,(c=(h=n.options_)==null?void 0:h.enhancer)!=null?c:un,m.name_+"."+i.toString(),!1);m.values_.set(i,M),s.add(u)}if(r=="accessor")return{get:function(){return s.has(this)||o(this,e.get.call(this)),this[he].getObservablePropValue_(i)},set:function(f){return s.has(this)||o(this,f),this[he].setObservablePropValue_(i,f)},init:function(f){return s.has(this)||o(this,f),f}}}function yl(e,t,n,r){var i=t.annotationType_;"value"in r||ae("Cannot apply '"+i+"' to '"+e.name_+"."+n.toString()+"':"+(`
10
+ '`+i+"' cannot be used on getter/setter properties"))}var hl="true",gl=na();function na(e){return{annotationType_:hl,options_:e,make_:ml,extend_:bl,decorate_20223_:vl}}function ml(e,t,n,r){var i,s;if(n.get)return pt.make_(e,t,n,r);if(n.set){var o=cn(t.toString(),n.set);return r===e.target_?e.defineProperty_(t,{configurable:W.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:($t(r,t,{configurable:!0,set:o}),2)}if(r!==e.target_&&typeof n.value=="function"){var u;if(Ws(n.value)){var f,c=(f=this.options_)!=null&&f.autoBind?Cn.bound:Cn;return c.make_(e,t,n,r)}var h=(u=this.options_)!=null&&u.autoBind?ir.bound:ir;return h.make_(e,t,n,r)}var m=((i=this.options_)==null?void 0:i.deep)===!1?Pe.ref:Pe;if(typeof n.value=="function"&&(s=this.options_)!=null&&s.autoBind){var M;n.value=n.value.bind((M=e.proxy_)!=null?M:e.target_)}return m.make_(e,t,n,r)}function bl(e,t,n,r){var i,s;if(n.get)return pt.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:W.safeDescriptors?e.isPlainObject_:!0,set:cn(t.toString(),n.set)},r);if(typeof n.value=="function"&&(i=this.options_)!=null&&i.autoBind){var o;n.value=n.value.bind((o=e.proxy_)!=null?o:e.target_)}var u=((s=this.options_)==null?void 0:s.deep)===!1?Pe.ref:Pe;return u.extend_(e,t,n,r)}function vl(e,t){ae("'"+this.annotationType_+"' cannot be used as a decorator")}var _l="observable",Tl="observable.ref",wl="observable.shallow",Ol="observable.struct",ra={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(ra);function Mr(e){return e||ra}var Zi=ii(_l),Al=ii(Tl,{enhancer:ri}),Il=ii(wl,{enhancer:Xf}),El=ii(Ol,{enhancer:Yf}),ia=Rt(Zi);function Lr(e){return e.deep===!0?un:e.deep===!1?ri:Pl(e.defaultDecorator)}function Sl(e){var t;return e?(t=e.defaultDecorator)!=null?t:na(e):void 0}function Pl(e){var t,n;return e&&(t=(n=e.options_)==null?void 0:n.enhancer)!=null?t:un}function oa(e,t,n){if(ur(t))return Zi.decorate_20223_(e,t);if(an(t)){ar(e,t,Zi);return}return xn(e)?e:wt(e)?Pe.object(e,t,n):Array.isArray(e)?Pe.array(e,t):Un(e)?Pe.map(e,t):Mt(e)?Pe.set(e,t):typeof e=="object"&&e!==null?e:Pe.box(e,t)}zs(oa,ia);var $l={box:function(t,n){var r=Mr(n);return new Vt(t,Lr(r),r.name,!0,r.equals)},array:function(t,n){var r=Mr(n);return(W.useProxies===!1||r.proxy===!1?$d:vd)(t,Lr(r),r.name)},map:function(t,n){var r=Mr(n);return new Na(t,Lr(r),r.name)},set:function(t,n){var r=Mr(n);return new Ca(t,Lr(r),r.name)},object:function(t,n,r){return yn(function(){return ud(W.useProxies===!1||r?.proxy===!1?Dn({},r):gd({},r),t,n)})},ref:Rt(Al),shallow:Rt(Il),deep:ia,struct:Rt(El)},Pe=zs(oa,$l),sa="computed",Rl="computed.struct",Qi=fo(sa),Nl=fo(Rl,{equals:ze.structural}),pt=function(t,n){if(ur(n))return Qi.decorate_20223_(t,n);if(an(n))return ar(t,n,Qi);if(wt(t))return Rt(fo(sa,t));Re(t)||ae("First argument to `computed` should be an expression."),Re(n)&&ae("A setter as second argument is no longer supported, use `{ set: fn }` option instead");var r=wt(n)?n:{};return r.get=t,r.name||(r.name=t.name||""),new ft(r)};Object.assign(pt,Qi);pt.struct=Rt(Nl);var $s,Rs,qr=0,Cl=1,xl=($s=(Rs=Gr(function(){},"name"))==null?void 0:Rs.configurable)!=null?$s:!1,Ns={value:"action",configurable:!0,writable:!1,enumerable:!1};function cn(e,t,n,r){n===void 0&&(n=!1),Re(t)||ae("`action` can only be invoked on functions"),(typeof e!="string"||!e)&&ae("actions should have valid names, got: '"+e+"'");function i(){return aa(e,n,t,r||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},xl&&(Ns.value=e,$t(i,"name",Ns)),i}function aa(e,t,n,r,i){var s=Ul(e,t,r,i);try{return n.apply(r,i)}catch(o){throw s.error_=o,o}finally{jl(s)}}function Ul(e,t,n,r){var i=Be()&&!!e,s=0;if(i){s=Date.now();var o=r?Array.from(r):Vr;Ye({type:po,name:e,object:n,arguments:o})}var u=W.trackingDerivation,f=!t||!u;ot();var c=W.allowStateChanges;f&&(dn(),c=oi(!0));var h=lo(!0),m={runAsAction_:f,prevDerivation_:u,prevAllowStateChanges_:c,prevAllowStateReads_:h,notifySpy_:i,startTime_:s,actionId_:Cl++,parentActionId_:qr};return qr=m.actionId_,m}function jl(e){qr!==e.actionId_&&ae(30),qr=e.parentActionId_,e.error_!==void 0&&(W.suppressReactionErrors=!0),si(e.prevAllowStateChanges_),rr(e.prevAllowStateReads_),st(),e.runAsAction_&&Bt(e.prevDerivation_),e.notifySpy_&&Ze({time:Date.now()-e.startTime_}),W.suppressReactionErrors=!1}function Ml(e,t){var n=oi(e);try{return t()}finally{si(n)}}function oi(e){var t=W.allowStateChanges;return W.allowStateChanges=e,t}function si(e){W.allowStateChanges=e}var Ll="create",Vt=(function(e){function t(r,i,s,o,u){var f;return s===void 0&&(s="ObservableValue@"+dt()),o===void 0&&(o=!0),u===void 0&&(u=ze.default),f=e.call(this,s)||this,f.enhancer=void 0,f.name_=void 0,f.equals=void 0,f.hasUnreportedChange_=!1,f.interceptors_=void 0,f.changeListeners_=void 0,f.value_=void 0,f.dehancer=void 0,f.enhancer=i,f.name_=s,f.equals=u,f.value_=i(r,void 0,s),o&&Be()&&fn({type:Ll,object:f,observableKind:"value",debugObjectName:f.name_,newValue:""+f.value_}),f}Ys(t,e);var n=t.prototype;return n.dehanceValue=function(i){return this.dehancer!==void 0?this.dehancer(i):i},n.set=function(i){var s=this.value_;if(i=this.prepareNewValue_(i),i!==W.UNCHANGED){var o=Be();o&&Ye({type:vt,object:this,observableKind:"value",debugObjectName:this.name_,newValue:i,oldValue:s}),this.setNewValue_(i),o&&Ze()}},n.prepareNewValue_=function(i){if(Pt(this),rt(this)){var s=it(this,{object:this,type:vt,newValue:i});if(!s)return W.UNCHANGED;i=s.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?W.UNCHANGED:i},n.setNewValue_=function(i){var s=this.value_;this.value_=i,this.reportChanged(),_t(this)&&Tt(this,{type:vt,object:this,newValue:i,oldValue:s})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(i){return pr(this,i)},n.observe_=function(i,s){return s&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:vt,newValue:this.value_,oldValue:void 0}),yr(this,i)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Xs(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t})(Wt),Bl=qt("ObservableValue",Vt),ft=(function(){function e(n){this.dependenciesState_=_e.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=_e.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Wr(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=ct.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||ae(31),this.derivation=n.get,this.name_=n.name||"ComputedValue@"+dt(),n.set&&(this.setter_=cn(this.name_+"-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?ze.structural:ze.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){Wl(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},t.get=function(){if(this.isComputing&&ae(32,this.name_,this.derivation),W.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)eo(this)&&(this.warnAboutUntrackedRead_(),ot(),this.value_=this.computeValue_(!1),st());else if(ha(this),eo(this)){var r=W.trackingContext;this.keepAlive_&&!r&&(W.trackingContext=this),this.trackAndCompute()&&ql(this),W.trackingContext=r}var i=this.value_;if(Fr(i))throw i.cause;return i},t.set=function(r){if(this.setter_){this.isRunningSetter&&ae(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,r)}finally{this.isRunningSetter=!1}}else ae(34,this.name_)},t.trackAndCompute=function(){var r=this.value_,i=this.dependenciesState_===_e.NOT_TRACKING_,s=this.computeValue_(!0),o=i||Fr(r)||Fr(s)||!this.equals_(r,s);return o&&(this.value_=s,Be()&&fn({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:r,newValue:s})),o},t.computeValue_=function(r){this.isComputing=!0;var i=oi(!1),s;if(r)s=ca(this,this.derivation,this.scope_);else if(W.disableErrorBoundaries===!0)s=this.derivation.call(this.scope_);else try{s=this.derivation.call(this.scope_)}catch(o){s=new Wr(o)}return si(i),this.isComputing=!1,s},t.suspend_=function(){this.keepAlive_||(to(this),this.value_=void 0,this.isTracing_!==ct.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' was suspended and it will recompute on the next access."))},t.observe_=function(r,i){var s=this,o=!0,u=void 0;return yo(function(){var f=s.get();if(!o||i){var c=dn();r({observableKind:"computed",debugObjectName:s.name_,type:vt,object:s,newValue:f,oldValue:u}),Bt(c)}o=!1,u=f})},t.warnAboutUntrackedRead_=function(){this.isTracing_!==ct.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."),(typeof this.requiresReaction_=="boolean"?this.requiresReaction_:W.computedRequiresReaction)&&console.warn("[mobx] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute.")},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Xs(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},jn(e,[{key:"isComputing",get:function(){return Je(this.flags_,e.isComputingMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isComputingMask_,r)}},{key:"isRunningSetter",get:function(){return Je(this.flags_,e.isRunningSetterMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isRunningSetterMask_,r)}},{key:"isBeingObserved",get:function(){return Je(this.flags_,e.isBeingObservedMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isBeingObservedMask_,r)}},{key:"isPendingUnobservation",get:function(){return Je(this.flags_,e.isPendingUnobservationMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isPendingUnobservationMask_,r)}},{key:"diffValue",get:function(){return Je(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=Xe(this.flags_,e.diffValueMask_,r===1)}}])})();ft.isComputingMask_=1;ft.isRunningSetterMask_=2;ft.isBeingObservedMask_=4;ft.isPendingUnobservationMask_=8;ft.diffValueMask_=16;var fr=qt("ComputedValue",ft),_e;(function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"})(_e||(_e={}));var ct;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(ct||(ct={}));var Wr=function(t){this.cause=void 0,this.cause=t};function Fr(e){return e instanceof Wr}function eo(e){switch(e.dependenciesState_){case _e.UP_TO_DATE_:return!1;case _e.NOT_TRACKING_:case _e.STALE_:return!0;case _e.POSSIBLY_STALE_:{for(var t=lo(!0),n=dn(),r=e.observing_,i=r.length,s=0;s<i;s++){var o=r[s];if(fr(o)){if(W.disableErrorBoundaries)o.get();else try{o.get()}catch{return Bt(n),rr(t),!0}if(e.dependenciesState_===_e.STALE_)return Bt(n),rr(t),!0}}return fa(e),Bt(n),rr(t),!1}}}function ua(){return W.trackingDerivation!==null}function Pt(e){var t=e.observers_.size>0;!W.allowStateChanges&&(t||W.enforceActions==="always")&&console.warn("[MobX] "+(W.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}function Dl(e){!W.allowStateReads&&W.observableRequiresReaction&&console.warn("[mobx] Observable '"+e.name_+"' being read outside a reactive context.")}function ca(e,t,n){var r=lo(!0);fa(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++W.runId;var i=W.trackingDerivation;W.trackingDerivation=e,W.inBatch++;var s;if(W.disableErrorBoundaries===!0)s=t.call(n);else try{s=t.call(n)}catch(o){s=new Wr(o)}return W.inBatch--,W.trackingDerivation=i,kl(e),Fl(e),rr(r),s}function Fl(e){e.observing_.length===0&&(typeof e.requiresObservable_=="boolean"?e.requiresObservable_:W.reactionRequiresObservable)&&console.warn("[mobx] Derivation '"+e.name_+"' is created/updated without reading any observable value.")}function kl(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=_e.UP_TO_DATE_,i=0,s=e.unboundDepsCount_,o=0;o<s;o++){var u=n[o];u.diffValue===0&&(u.diffValue=1,i!==o&&(n[i]=u),i++),u.dependenciesState_>r&&(r=u.dependenciesState_)}for(n.length=i,e.newObserving_=null,s=t.length;s--;){var f=t[s];f.diffValue===0&&pa(f,e),f.diffValue=0}for(;i--;){var c=n[i];c.diffValue===1&&(c.diffValue=0,zl(c,e))}r!==_e.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function to(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)pa(t[n],e);e.dependenciesState_=_e.NOT_TRACKING_}function Ne(e){var t=dn();try{return e()}finally{Bt(t)}}function dn(){var e=W.trackingDerivation;return W.trackingDerivation=null,e}function Bt(e){W.trackingDerivation=e}function lo(e){var t=W.allowStateReads;return W.allowStateReads=e,t}function rr(e){W.allowStateReads=e}function fa(e){if(e.dependenciesState_!==_e.UP_TO_DATE_){e.dependenciesState_=_e.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=_e.UP_TO_DATE_}}var kr=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Kr=!0,la=!1,W=(function(){var e=Zr();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Kr=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new kr().version&&(Kr=!1),Kr?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new kr):(setTimeout(function(){la||ae(35)},1),new kr)})();function Kl(){if((W.pendingReactions.length||W.inBatch||W.isRunningReactions)&&ae(36),la=!0,Kr){var e=Zr();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),W=new kr}}function da(){return W}function Gl(e){return e.observers_&&e.observers_.size>0}function Vl(e){return e.observers_}function zl(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function pa(e,t){e.observers_.delete(t),e.observers_.size===0&&ya(e)}function ya(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,W.pendingUnobservations.push(e))}function ot(){W.inBatch++}function st(){if(--W.inBatch===0){va();for(var e=W.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,n.observers_.size===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof ft&&n.suspend_())}W.pendingUnobservations=[]}}function ha(e){Dl(e);var t=W.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&W.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&W.inBatch>0&&ya(e),!1)}function ga(e){e.lowestObserverState_!==_e.STALE_&&(e.lowestObserverState_=_e.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===_e.UP_TO_DATE_&&(t.isTracing_!==ct.NONE&&ma(t,e),t.onBecomeStale_()),t.dependenciesState_=_e.STALE_}))}function ql(e){e.lowestObserverState_!==_e.STALE_&&(e.lowestObserverState_=_e.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===_e.POSSIBLY_STALE_?(t.dependenciesState_=_e.STALE_,t.isTracing_!==ct.NONE&&ma(t,e)):t.dependenciesState_===_e.UP_TO_DATE_&&(e.lowestObserverState_=_e.UP_TO_DATE_)}))}function Wl(e){e.lowestObserverState_===_e.UP_TO_DATE_&&(e.lowestObserverState_=_e.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===_e.UP_TO_DATE_&&(t.dependenciesState_=_e.POSSIBLY_STALE_,t.onBecomeStale_())}))}function ma(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===ct.BREAK){var n=[];ba(lr(e),n,1),new Function(`debugger;
11
+ /*
12
+ Tracing '`+e.name_+`'
13
+
14
+ You are entering this break point because derivation '`+e.name_+"' is being traced and '"+t.name_+`' is now forcing it to update.
15
+ Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
16
+ The stackframe you are looking for is at least ~6-8 stack-frames up.
17
+
18
+ `+(e instanceof ft?e.derivation.toString().replace(/[*]\//g,"/"):"")+`
19
+
20
+ The dependencies for this derivation are:
21
+
22
+ `+n.join(`
23
+ `)+`
24
+ */
25
+ `)()}}function ba(e,t,n){if(t.length>=1e3){t.push("(and many more)");return}t.push(""+" ".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(r){return ba(r,t,n+1)})}var Ot=(function(){function e(n,r,i,s){n===void 0&&(n="Reaction@"+dt()),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=_e.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=ct.NONE,this.name_=n,this.onInvalidate_=r,this.errorHandler_=i,this.requiresObservable_=s}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,W.pendingReactions.push(this),va())},t.runReaction_=function(){if(!this.isDisposed){ot(),this.isScheduled=!1;var r=W.trackingContext;if(W.trackingContext=this,eo(this)){this.isTrackPending=!0;try{this.onInvalidate_(),this.isTrackPending&&Be()&&fn({name:this.name_,type:"scheduled-reaction"})}catch(i){this.reportExceptionInDerivation_(i)}}W.trackingContext=r,st()}},t.track=function(r){if(!this.isDisposed){ot();var i=Be(),s;i&&(s=Date.now(),Ye({name:this.name_,type:"reaction"})),this.isRunning=!0;var o=W.trackingContext;W.trackingContext=this;var u=ca(this,r,void 0);W.trackingContext=o,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&to(this),Fr(u)&&this.reportExceptionInDerivation_(u.cause),i&&Ze({time:Date.now()-s}),st()}},t.reportExceptionInDerivation_=function(r){var i=this;if(this.errorHandler_){this.errorHandler_(r,this);return}if(W.disableErrorBoundaries)throw r;var s="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";W.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(s,r),Be()&&fn({type:"error",name:this.name_,message:s,error:""+r}),W.globalReactionErrorHandlers.forEach(function(o){return o(r,i)})},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(ot(),to(this),st()))},t.getDisposer_=function(r){var i=this,s=function o(){i.dispose(),r==null||r.removeEventListener==null||r.removeEventListener("abort",o)};return r==null||r.addEventListener==null||r.addEventListener("abort",s),s[he]=this,s},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(r){r===void 0&&(r=!1),ho(this,r)},jn(e,[{key:"isDisposed",get:function(){return Je(this.flags_,e.isDisposedMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isDisposedMask_,r)}},{key:"isScheduled",get:function(){return Je(this.flags_,e.isScheduledMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isScheduledMask_,r)}},{key:"isTrackPending",get:function(){return Je(this.flags_,e.isTrackPendingMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isTrackPendingMask_,r)}},{key:"isRunning",get:function(){return Je(this.flags_,e.isRunningMask_)},set:function(r){this.flags_=Xe(this.flags_,e.isRunningMask_,r)}},{key:"diffValue",get:function(){return Je(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=Xe(this.flags_,e.diffValueMask_,r===1)}}])})();Ot.isDisposedMask_=1;Ot.isScheduledMask_=2;Ot.isTrackPendingMask_=4;Ot.isRunningMask_=8;Ot.diffValueMask_=16;var Cs=100,no=function(t){return t()};function va(){W.inBatch>0||W.isRunningReactions||no(Hl)}function Hl(){W.isRunningReactions=!0;for(var e=W.pendingReactions,t=0;e.length>0;){++t===Cs&&(console.error("Reaction doesn't converge to a stable state after "+Cs+" iterations."+(" Probably there is a cycle in the reactive function: "+e[0])),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}W.isRunningReactions=!1}var Hr=qt("Reaction",Ot);function Jl(e){var t=no;no=function(r){return e(function(){return t(r)})}}function Be(){return!!W.spyListeners.length}function fn(e){if(W.spyListeners.length)for(var t=W.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function Ye(e){var t=Dt({},e,{spyReportStart:!0});fn(t)}var Xl={type:"report-end",spyReportEnd:!0};function Ze(e){fn(e?Dt({},e,{type:"report-end",spyReportEnd:!0}):Xl)}function Yl(e){return W.spyListeners.push(e),uo(function(){W.spyListeners=W.spyListeners.filter(function(t){return t!==e})})}var po="action",Zl="action.bound",_a="autoAction",Ql="autoAction.bound",Ta="<unnamed action>",ro=cr(po),ed=cr(Zl,{bound:!0}),io=cr(_a,{autoAction:!0}),td=cr(Ql,{autoAction:!0,bound:!0});function wa(e){var t=function(r,i){if(Re(r))return cn(r.name||Ta,r,e);if(Re(i))return cn(r,i,e);if(ur(i))return(e?io:ro).decorate_20223_(r,i);if(an(i))return ar(r,i,e?io:ro);if(an(r))return Rt(cr(e?_a:po,{name:r,autoAction:e}));ae("Invalid arguments for `action`")};return t}var at=wa(!1);Object.assign(at,ro);var ir=wa(!0);Object.assign(ir,io);at.bound=Rt(ed);ir.bound=Rt(td);function Mn(e){return aa(e.name||Ta,!1,e,this,void 0)}function zt(e){return Re(e)&&e.isMobxAction===!0}function yo(e,t){var n,r,i,s;t===void 0&&(t=ao),Re(e)||ae("Autorun expects a function as first argument"),zt(e)&&ae("Autorun does not accept actions since actions are untrackable");var o=(n=(r=t)==null?void 0:r.name)!=null?n:e.name||"Autorun@"+dt(),u=!t.scheduler&&!t.delay,f;if(u)f=new Ot(o,function(){this.track(m)},t.onError,t.requiresObservable);else{var c=Oa(t),h=!1;f=new Ot(o,function(){h||(h=!0,c(function(){h=!1,f.isDisposed||f.track(m)}))},t.onError,t.requiresObservable)}function m(){e(f)}return(i=t)!=null&&(i=i.signal)!=null&&i.aborted||f.schedule_(),f.getDisposer_((s=t)==null?void 0:s.signal)}var nd=function(t){return t()};function Oa(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:nd}function Aa(e,t,n){var r,i,s;n===void 0&&(n=ao),(!Re(e)||!Re(t))&&ae("First and second argument to reaction should be functions"),wt(n)||ae("Third argument of reactions should be an object");var o=(r=n.name)!=null?r:"Reaction@"+dt(),u=at(o,n.onError?rd(n.onError,t):t),f=!n.scheduler&&!n.delay,c=Oa(n),h=!0,m=!1,M,S=n.compareStructural?ze.structural:n.equals||ze.default,B=new Ot(o,function(){h||f?H():m||(m=!0,c(H))},n.onError,n.requiresObservable);function H(){if(m=!1,!B.isDisposed){var Q=!1,K=M;B.track(function(){var D=Ml(!1,function(){return e(B)});Q=h||!S(M,D),M=D}),(h&&n.fireImmediately||!h&&Q)&&u(M,K,B),h=!1}}return(i=n)!=null&&(i=i.signal)!=null&&i.aborted||B.schedule_(),B.getDisposer_((s=n)==null?void 0:s.signal)}function rd(e,t){return function(){try{return t.apply(this,arguments)}catch(n){e.call(this,n)}}}var id="onBO",od="onBUO";function ai(e,t,n){return Ia(id,e,t,n)}function pn(e,t,n){return Ia(od,e,t,n)}function Ia(e,t,n,r){var i=typeof r=="function"?lt(t,n):lt(t),s=Re(r)?r:n,o=e+"L";return i[o]?i[o].add(s):i[o]=new Set([s]),function(){var u=i[o];u&&(u.delete(s),u.size===0&&delete i[o])}}var sd="never",Br="always",ad="observed";function Ea(e){e.isolateGlobalState===!0&&Kl();var t=e.useProxies,n=e.enforceActions;if(t!==void 0&&(W.useProxies=t===Br?!0:t===sd?!1:typeof Proxy<"u"),t==="ifavailable"&&(W.verifyProxies=!0),n!==void 0){var r=n===Br?Br:n===ad;W.enforceActions=r,W.allowStateChanges=!(r===!0||r===Br)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(i){i in e&&(W[i]=!!e[i])}),W.allowStateReads=!W.observableRequiresReaction,W.disableErrorBoundaries===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&Jl(e.reactionScheduler)}function ud(e,t,n,r){arguments.length>4&&ae("'extendObservable' expected 2-4 arguments"),typeof e!="object"&&ae("'extendObservable' expects an object as first argument"),Nt(e)&&ae("'extendObservable' should not be used on maps, use map.merge instead"),wt(t)||ae("'extendObservable' only accepts plain objects as second argument"),(xn(t)||xn(n))&&ae("Extending an object with another observable (object) is not supported");var i=Ff(t);return yn(function(){var s=Dn(e,r)[he];ti(i).forEach(function(o){s.extend_(o,i[o],n&&o in n?n[o]:!0)})}),e}function lr(e,t){return Sa(lt(e,t))}function Sa(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=cd(e.observing_).map(Sa)),t}function dr(e,t){return Pa(lt(e,t))}function Pa(e){var t={name:e.name_};return Gl(e)&&(t.observers=Array.from(Vl(e)).map(Pa)),t}function cd(e){return Array.from(new Set(e))}var fd=0;function $a(){this.message="FLOW_CANCELLED"}$a.prototype=Object.create(Error.prototype);var Hi=ea("flow"),ld=ea("flow.bound",{bound:!0}),Cn=Object.assign(function(t,n){if(ur(n))return Hi.decorate_20223_(t,n);if(an(n))return ar(t,n,Hi);arguments.length!==1&&ae("Flow expects single argument with generator function");var r=t,i=r.name||"<unnamed flow>",s=function(){var u=this,f=arguments,c=++fd,h=at(i+" - runid: "+c+" - init",r).apply(u,f),m,M=void 0,S=new Promise(function(B,H){var Q=0;m=H;function K(q){M=void 0;var F;try{F=at(i+" - runid: "+c+" - yield "+Q++,h.next).call(h,q)}catch(ee){return H(ee)}V(F)}function D(q){M=void 0;var F;try{F=at(i+" - runid: "+c+" - yield "+Q++,h.throw).call(h,q)}catch(ee){return H(ee)}V(F)}function V(q){if(Re(q?.then)){q.then(V,H);return}return q.done?B(q.value):(M=Promise.resolve(q.value),M.then(K,D))}K(void 0)});return S.cancel=at(i+" - runid: "+c+" - cancel",function(){try{M&&xs(M);var B=h.return(void 0),H=Promise.resolve(B.value);H.then(Rn,Rn),xs(H),m(new $a)}catch(Q){m(Q)}}),S};return s.isMobXFlow=!0,s},Hi);Cn.bound=Rt(ld);function xs(e){Re(e.cancel)&&e.cancel()}function or(e){return e?.isMobXFlow===!0}function dd(e,t){return e?t!==void 0?Nt(e)||Bn(e)?ae("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead."):ln(e)?e[he].values_.has(t):!1:ln(e)||!!e[he]||co(e)||Hr(e)||fr(e):!1}function xn(e){return arguments.length!==1&&ae("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),dd(e)}function pd(e){if(ln(e))return e[he].ownKeys_();ae(38)}function Dr(e,t,n){return e.set(t,n),n}function $n(e,t){if(e==null||typeof e!="object"||e instanceof Date||!xn(e))return e;if(Bl(e)||fr(e))return $n(e.get(),t);if(t.has(e))return t.get(e);if(Bn(e)){var n=Dr(t,e,new Array(e.length));return e.forEach(function(o,u){n[u]=$n(o,t)}),n}if(bt(e)){var r=Dr(t,e,new Set);return e.forEach(function(o){r.add($n(o,t))}),r}if(Nt(e)){var i=Dr(t,e,new Map);return e.forEach(function(o,u){i.set(u,$n(o,t))}),i}else{var s=Dr(t,e,{});return pd(e).forEach(function(o){sr.propertyIsEnumerable.call(e,o)&&(s[o]=$n(e[o],t))}),s}}function Ln(e,t){return t&&ae("toJS no longer supports options"),$n(e,new Map)}function ho(){for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[n.length-1]=="boolean"&&(e=n.pop());var i=yd(n);if(!i)return ae("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===ct.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled"),i.isTracing_=e?ct.BREAK:ct.LOG}function yd(e){switch(e.length){case 0:return W.trackingDerivation;case 1:return lt(e[0]);case 2:return lt(e[0],e[1])}}function Lt(e,t){t===void 0&&(t=void 0),ot();try{return e.apply(t)}finally{st()}}function sn(e){return e[he]}var hd={has:function(t,n){return W.trackingDerivation&&nr("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),sn(t).has_(n)},get:function(t,n){return sn(t).get_(n)},set:function(t,n,r){var i;return an(n)?(sn(t).values_.has(n)||nr("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),(i=sn(t).set_(n,r,!0))!=null?i:!0):!1},deleteProperty:function(t,n){var r;return nr("delete properties from an observable object. Use 'remove' from 'mobx' instead."),an(n)?(r=sn(t).delete_(n,!0))!=null?r:!0:!1},defineProperty:function(t,n,r){var i;return nr("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),(i=sn(t).defineProperty_(n,r))!=null?i:!0},ownKeys:function(t){return W.trackingDerivation&&nr("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."),sn(t).ownKeys_()},preventExtensions:function(t){ae(13)}};function gd(e,t){var n,r;return qs(),e=Dn(e,t),(r=(n=e[he]).proxy_)!=null?r:n.proxy_=new Proxy(e,hd)}function rt(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function pr(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),uo(function(){var r=n.indexOf(t);r!==-1&&n.splice(r,1)})}function it(e,t){var n=dn();try{for(var r=[].concat(e.interceptors_||[]),i=0,s=r.length;i<s&&(t=r[i](t),t&&!t.type&&ae(14),!!t);i++);return t}finally{Bt(n)}}function _t(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function yr(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),uo(function(){var r=n.indexOf(t);r!==-1&&n.splice(r,1)})}function Tt(e,t){var n=dn(),r=e.changeListeners_;if(r){r=r.slice();for(var i=0,s=r.length;i<s;i++)r[i](t);Bt(n)}}function hr(e,t,n){return yn(function(){var r,i=Dn(e,n)[he];t&&e[We]&&ae("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."),(r=t)!=null||(t=zf(e)),ti(t).forEach(function(s){return i.make_(s,t[s])})}),e}var Us="splice",vt="update",md=1e4,bd={get:function(t,n){var r=t[he];return n===he?r:n==="length"?r.getArrayLength_():typeof n=="string"&&!isNaN(n)?r.get_(parseInt(n)):ut(Jr,n)?Jr[n]:t[n]},set:function(t,n,r){var i=t[he];return n==="length"&&i.setArrayLength_(r),typeof n=="symbol"||isNaN(n)?t[n]=r:i.set_(parseInt(n),r),!0},preventExtensions:function(){ae(15)}},go=(function(){function e(n,r,i,s){n===void 0&&(n="ObservableArray@"+dt()),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=i,this.legacyMode_=s,this.atom_=new Wt(n),this.enhancer_=function(o,u){return r(o,u,n+"[..]")}}var t=e.prototype;return t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.dehanceValues_=function(r){return this.dehancer!==void 0&&r.length>0?r.map(this.dehancer):r},t.intercept_=function(r){return pr(this,r)},t.observe_=function(r,i){return i===void 0&&(i=!1),i&&r({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),yr(this,r)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(r){(typeof r!="number"||isNaN(r)||r<0)&&ae("Out of range: "+r);var i=this.values_.length;if(r!==i)if(r>i){for(var s=new Array(r-i),o=0;o<r-i;o++)s[o]=void 0;this.spliceWithArray_(i,0,s)}else this.spliceWithArray_(r,i-r)},t.updateArrayLength_=function(r,i){r!==this.lastKnownLength_&&ae(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&ja(r+i+1)},t.spliceWithArray_=function(r,i,s){var o=this;Pt(this.atom_);var u=this.values_.length;if(r===void 0?r=0:r>u?r=u:r<0&&(r=Math.max(0,u+r)),arguments.length===1?i=u-r:i==null?i=0:i=Math.max(0,Math.min(i,u-r)),s===void 0&&(s=Vr),rt(this)){var f=it(this,{object:this.proxy_,type:Us,index:r,removedCount:i,added:s});if(!f)return Vr;i=f.removedCount,s=f.added}s=s.length===0?s:s.map(function(m){return o.enhancer_(m,void 0)}),this.legacyMode_;var c=s.length-i;this.updateArrayLength_(u,c);var h=this.spliceItemsIntoValues_(r,i,s);return(i!==0||s.length!==0)&&this.notifyArraySplice_(r,s,h),this.dehanceValues_(h)},t.spliceItemsIntoValues_=function(r,i,s){if(s.length<md){var o;return(o=this.values_).splice.apply(o,[r,i].concat(s))}else{var u=this.values_.slice(r,r+i),f=this.values_.slice(r+i);this.values_.length+=s.length-i;for(var c=0;c<s.length;c++)this.values_[r+c]=s[c];for(var h=0;h<f.length;h++)this.values_[r+s.length+h]=f[h];return u}},t.notifyArrayChildUpdate_=function(r,i,s){var o=!this.owned_&&Be(),u=_t(this),f=u||o?{observableKind:"array",object:this.proxy_,type:vt,debugObjectName:this.atom_.name_,index:r,newValue:i,oldValue:s}:null;o&&Ye(f),this.atom_.reportChanged(),u&&Tt(this,f),o&&Ze()},t.notifyArraySplice_=function(r,i,s){var o=!this.owned_&&Be(),u=_t(this),f=u||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Us,index:r,removed:s,added:i,removedCount:s.length,addedCount:i.length}:null;o&&Ye(f),this.atom_.reportChanged(),u&&Tt(this,f),o&&Ze()},t.get_=function(r){if(this.legacyMode_&&r>=this.values_.length){console.warn("[mobx.array] Attempt to read an array index ("+r+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX");return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[r])},t.set_=function(r,i){var s=this.values_;if(this.legacyMode_&&r>s.length&&ae(17,r,s.length),r<s.length){Pt(this.atom_);var o=s[r];if(rt(this)){var u=it(this,{type:vt,object:this.proxy_,index:r,newValue:i});if(!u)return;i=u.newValue}i=this.enhancer_(i,o);var f=i!==o;f&&(s[r]=i,this.notifyArrayChildUpdate_(r,i,o))}else{for(var c=new Array(r+1-s.length),h=0;h<c.length-1;h++)c[h]=void 0;c[c.length-1]=i,this.spliceWithArray_(s.length,0,c)}},e})();function vd(e,t,n,r){return n===void 0&&(n="ObservableArray@"+dt()),r===void 0&&(r=!1),qs(),yn(function(){var i=new go(n,t,r,!1);Hs(i.values_,he,i);var s=new Proxy(i.values_,bd);return i.proxy_=s,e&&e.length&&i.spliceWithArray_(0,0,e),s})}var Jr={clear:function(){return this.splice(0)},replace:function(t){var n=this[he];return n.spliceWithArray_(0,n.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];var o=this[he];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(t);case 2:return o.spliceWithArray_(t,n)}return o.spliceWithArray_(t,n,i)},spliceWithArray:function(t,n,r){return this[he].spliceWithArray_(t,n,r)},push:function(){for(var t=this[he],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,r),t.values_.length},pop:function(){return this.splice(Math.max(this[he].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[he],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.spliceWithArray_(0,0,r),t.values_.length},reverse:function(){return W.trackingDerivation&&ae(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){W.trackingDerivation&&ae(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var n=this[he],r=n.dehanceValues_(n.values_).indexOf(t);return r>-1?(this.splice(r,1),!0):!1}};Ie("at",Qe);Ie("concat",Qe);Ie("flat",Qe);Ie("includes",Qe);Ie("indexOf",Qe);Ie("join",Qe);Ie("lastIndexOf",Qe);Ie("slice",Qe);Ie("toString",Qe);Ie("toLocaleString",Qe);Ie("toSorted",Qe);Ie("toSpliced",Qe);Ie("with",Qe);Ie("every",At);Ie("filter",At);Ie("find",At);Ie("findIndex",At);Ie("findLast",At);Ie("findLastIndex",At);Ie("flatMap",At);Ie("forEach",At);Ie("map",At);Ie("some",At);Ie("toReversed",At);Ie("reduce",Ra);Ie("reduceRight",Ra);function Ie(e,t){typeof Array.prototype[e]=="function"&&(Jr[e]=t(e))}function Qe(e){return function(){var t=this[he];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function At(e){return function(t,n){var r=this,i=this[he];i.atom_.reportObserved();var s=i.dehanceValues_(i.values_);return s[e](function(o,u){return t.call(n,o,u,r)})}}function Ra(e){return function(){var t=this,n=this[he];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(s,o,u){return i(s,o,u,t)},r[e].apply(r,arguments)}}var _d=qt("ObservableArrayAdministration",go);function Bn(e){return Qr(e)&&_d(e[he])}var Td={},Gt="add",Xr="delete",Na=(function(){function e(n,r,i){var s=this;r===void 0&&(r=un),i===void 0&&(i="ObservableMap@"+dt()),this.enhancer_=void 0,this.name_=void 0,this[he]=Td,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=r,this.name_=i,Re(Map)||ae(18),yn(function(){s.keysAtom_=Zs(s.name_+".keys()"),s.data_=new Map,s.hasMap_=new Map,n&&s.merge(n)})}var t=e.prototype;return t.has_=function(r){return this.data_.has(r)},t.has=function(r){var i=this;if(!W.trackingDerivation)return this.has_(r);var s=this.hasMap_.get(r);if(!s){var o=s=new Vt(this.has_(r),ri,this.name_+"."+Xi(r)+"?",!1);this.hasMap_.set(r,o),pn(o,function(){return i.hasMap_.delete(r)})}return s.get()},t.set=function(r,i){var s=this.has_(r);if(rt(this)){var o=it(this,{type:s?vt:Gt,object:this,newValue:i,name:r});if(!o)return this;i=o.newValue}return s?this.updateValue_(r,i):this.addValue_(r,i),this},t.delete=function(r){var i=this;if(Pt(this.keysAtom_),rt(this)){var s=it(this,{type:Xr,object:this,name:r});if(!s)return!1}if(this.has_(r)){var o=Be(),u=_t(this),f=u||o?{observableKind:"map",debugObjectName:this.name_,type:Xr,object:this,oldValue:this.data_.get(r).value_,name:r}:null;return o&&Ye(f),Lt(function(){var c;i.keysAtom_.reportChanged(),(c=i.hasMap_.get(r))==null||c.setNewValue_(!1);var h=i.data_.get(r);h.setNewValue_(void 0),i.data_.delete(r)}),u&&Tt(this,f),o&&Ze(),!0}return!1},t.updateValue_=function(r,i){var s=this.data_.get(r);if(i=s.prepareNewValue_(i),i!==W.UNCHANGED){var o=Be(),u=_t(this),f=u||o?{observableKind:"map",debugObjectName:this.name_,type:vt,object:this,oldValue:s.value_,name:r,newValue:i}:null;o&&Ye(f),s.setNewValue_(i),u&&Tt(this,f),o&&Ze()}},t.addValue_=function(r,i){var s=this;Pt(this.keysAtom_),Lt(function(){var c,h=new Vt(i,s.enhancer_,s.name_+"."+Xi(r),!1);s.data_.set(r,h),i=h.value_,(c=s.hasMap_.get(r))==null||c.setNewValue_(!0),s.keysAtom_.reportChanged()});var o=Be(),u=_t(this),f=u||o?{observableKind:"map",debugObjectName:this.name_,type:Gt,object:this,name:r,newValue:i}:null;o&&Ye(f),u&&Tt(this,f),o&&Ze()},t.get=function(r){return this.has(r)?this.dehanceValue_(this.data_.get(r).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var r=this,i=this.keys();return js({next:function(){var o=i.next(),u=o.done,f=o.value;return{done:u,value:u?void 0:r.get(f)}}})},t.entries=function(){var r=this,i=this.keys();return js({next:function(){var o=i.next(),u=o.done,f=o.value;return{done:u,value:u?void 0:[f,r.get(f)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(r,i){for(var s=Nn(this),o;!(o=s()).done;){var u=o.value,f=u[0],c=u[1];r.call(i,c,f,this)}},t.merge=function(r){var i=this;return Nt(r)&&(r=new Map(r)),Lt(function(){wt(r)?Df(r).forEach(function(s){return i.set(s,r[s])}):Array.isArray(r)?r.forEach(function(s){var o=s[0],u=s[1];return i.set(o,u)}):Un(r)?(Bf(r)||ae(19,r),r.forEach(function(s,o){return i.set(o,s)})):r!=null&&ae(20,r)}),this},t.clear=function(){var r=this;Lt(function(){Ne(function(){for(var i=Nn(r.keys()),s;!(s=i()).done;){var o=s.value;r.delete(o)}})})},t.replace=function(r){var i=this;return Lt(function(){for(var s=wd(r),o=new Map,u=!1,f=Nn(i.data_.keys()),c;!(c=f()).done;){var h=c.value;if(!s.has(h)){var m=i.delete(h);if(m)u=!0;else{var M=i.data_.get(h);o.set(h,M)}}}for(var S=Nn(s.entries()),B;!(B=S()).done;){var H=B.value,Q=H[0],K=H[1],D=i.data_.has(Q);if(i.set(Q,K),i.data_.has(Q)){var V=i.data_.get(Q);o.set(Q,V),D||(u=!0)}}if(!u)if(i.data_.size!==o.size)i.keysAtom_.reportChanged();else for(var q=i.data_.keys(),F=o.keys(),ee=q.next(),z=F.next();!ee.done;){if(ee.value!==z.value){i.keysAtom_.reportChanged();break}ee=q.next(),z=F.next()}i.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(r,i){return i===!0&&ae("`observe` doesn't support fireImmediately=true in combination with maps."),yr(this,r)},t.intercept_=function(r){return pr(this,r)},jn(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])})(),Nt=qt("ObservableMap",Na);function js(e){return e[Symbol.toStringTag]="MapIterator",_o(e)}function wd(e){if(Un(e)||Nt(e))return e;if(Array.isArray(e))return new Map(e);if(wt(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}else return ae(21,e)}var Od={},Ca=(function(){function e(n,r,i){var s=this;r===void 0&&(r=un),i===void 0&&(i="ObservableSet@"+dt()),this.name_=void 0,this[he]=Od,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=i,Re(Set)||ae(22),this.enhancer_=function(o,u){return r(o,u,i)},yn(function(){s.atom_=Zs(s.name_),n&&s.replace(n)})}var t=e.prototype;return t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.clear=function(){var r=this;Lt(function(){Ne(function(){for(var i=Nn(r.data_.values()),s;!(s=i()).done;){var o=s.value;r.delete(o)}})})},t.forEach=function(r,i){for(var s=Nn(this),o;!(o=s()).done;){var u=o.value;r.call(i,u,u,this)}},t.add=function(r){var i=this;if(Pt(this.atom_),rt(this)){var s=it(this,{type:Gt,object:this,newValue:r});if(!s)return this;r=s.newValue}if(!this.has(r)){Lt(function(){i.data_.add(i.enhancer_(r,void 0)),i.atom_.reportChanged()});var o=Be(),u=_t(this),f=u||o?{observableKind:"set",debugObjectName:this.name_,type:Gt,object:this,newValue:r}:null;o&&Ye(f),u&&Tt(this,f),o&&Ze()}return this},t.delete=function(r){var i=this;if(rt(this)){var s=it(this,{type:Xr,object:this,oldValue:r});if(!s)return!1}if(this.has(r)){var o=Be(),u=_t(this),f=u||o?{observableKind:"set",debugObjectName:this.name_,type:Xr,object:this,oldValue:r}:null;return o&&Ye(f),Lt(function(){i.atom_.reportChanged(),i.data_.delete(r)}),u&&Tt(this,f),o&&Ze(),!0}return!1},t.has=function(r){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(r))},t.entries=function(){var r=this.values();return Ms({next:function(){var s=r.next(),o=s.value,u=s.done;return u?{value:void 0,done:u}:{value:[o,o],done:u}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var r=this,i=this.data_.values();return Ms({next:function(){var o=i.next(),u=o.value,f=o.done;return f?{value:void 0,done:f}:{value:r.dehanceValue_(u),done:f}}})},t.intersection=function(r){if(Mt(r)&&!bt(r))return r.intersection(this);var i=new Set(this);return i.intersection(r)},t.union=function(r){if(Mt(r)&&!bt(r))return r.union(this);var i=new Set(this);return i.union(r)},t.difference=function(r){return new Set(this).difference(r)},t.symmetricDifference=function(r){if(Mt(r)&&!bt(r))return r.symmetricDifference(this);var i=new Set(this);return i.symmetricDifference(r)},t.isSubsetOf=function(r){return new Set(this).isSubsetOf(r)},t.isSupersetOf=function(r){return new Set(this).isSupersetOf(r)},t.isDisjointFrom=function(r){if(Mt(r)&&!bt(r))return r.isDisjointFrom(this);var i=new Set(this);return i.isDisjointFrom(r)},t.replace=function(r){var i=this;return bt(r)&&(r=new Set(r)),Lt(function(){Array.isArray(r)?(i.clear(),r.forEach(function(s){return i.add(s)})):Mt(r)?(i.clear(),r.forEach(function(s){return i.add(s)})):r!=null&&ae("Cannot initialize set from "+r)}),this},t.observe_=function(r,i){return i===!0&&ae("`observe` doesn't support fireImmediately=true in combination with sets."),yr(this,r)},t.intercept_=function(r){return pr(this,r)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},jn(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])})(),bt=qt("ObservableSet",Ca);function Ms(e){return e[Symbol.toStringTag]="SetIterator",_o(e)}var Ls=Object.create(null),Bs="remove",oo=(function(){function e(n,r,i,s){r===void 0&&(r=new Map),s===void 0&&(s=gl),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=n,this.values_=r,this.name_=i,this.defaultAnnotation_=s,this.keysAtom_=new Wt(this.name_+".keys"),this.isPlainObject_=wt(this.target_),Ma(this.defaultAnnotation_)||ae("defaultAnnotation must be valid annotation"),this.appliedAnnotations_={}}var t=e.prototype;return t.getObservablePropValue_=function(r){return this.values_.get(r).get()},t.setObservablePropValue_=function(r,i){var s=this.values_.get(r);if(s instanceof ft)return s.set(i),!0;if(rt(this)){var o=it(this,{type:vt,object:this.proxy_||this.target_,name:r,newValue:i});if(!o)return null;i=o.newValue}if(i=s.prepareNewValue_(i),i!==W.UNCHANGED){var u=_t(this),f=Be(),c=u||f?{type:vt,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:s.value_,name:r,newValue:i}:null;f&&Ye(c),s.setNewValue_(i),u&&Tt(this,c),f&&Ze()}return!0},t.get_=function(r){return W.trackingDerivation&&!ut(this.target_,r)&&this.has_(r),this.target_[r]},t.set_=function(r,i,s){return s===void 0&&(s=!1),ut(this.target_,r)?this.values_.has(r)?this.setObservablePropValue_(r,i):s?Reflect.set(this.target_,r,i):(this.target_[r]=i,!0):this.extend_(r,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,s)},t.has_=function(r){if(!W.trackingDerivation)return r in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(r);return i||(i=new Vt(r in this.target_,ri,this.name_+"."+Xi(r)+"?",!1),this.pendingKeys_.set(r,i)),i.get()},t.make_=function(r,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(ks(this,i,r),!(r in this.target_)){var s;if((s=this.target_[We])!=null&&s[r])return;ae(1,i.annotationType_,this.name_+"."+r.toString())}for(var o=this.target_;o&&o!==sr;){var u=Gr(o,r);if(u){var f=i.make_(this,r,u,o);if(f===0)return;if(f===1)break}o=Object.getPrototypeOf(o)}Fs(this,i,r)}},t.extend_=function(r,i,s,o){if(o===void 0&&(o=!1),s===!0&&(s=this.defaultAnnotation_),s===!1)return this.defineProperty_(r,i,o);ks(this,s,r);var u=s.extend_(this,r,i,o);return u&&Fs(this,s,r),u},t.defineProperty_=function(r,i,s){s===void 0&&(s=!1),Pt(this.keysAtom_);try{ot();var o=this.delete_(r);if(!o)return o;if(rt(this)){var u=it(this,{object:this.proxy_||this.target_,name:r,type:Gt,newValue:i.value});if(!u)return null;var f=u.newValue;i.value!==f&&(i=Dt({},i,{value:f}))}if(s){if(!Reflect.defineProperty(this.target_,r,i))return!1}else $t(this.target_,r,i);this.notifyPropertyAddition_(r,i.value)}finally{st()}return!0},t.defineObservableProperty_=function(r,i,s,o){o===void 0&&(o=!1),Pt(this.keysAtom_);try{ot();var u=this.delete_(r);if(!u)return u;if(rt(this)){var f=it(this,{object:this.proxy_||this.target_,name:r,type:Gt,newValue:i});if(!f)return null;i=f.newValue}var c=Ds(r),h={configurable:W.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:c.get,set:c.set};if(o){if(!Reflect.defineProperty(this.target_,r,h))return!1}else $t(this.target_,r,h);var m=new Vt(i,s,this.name_+"."+r.toString(),!1);this.values_.set(r,m),this.notifyPropertyAddition_(r,m.value_)}finally{st()}return!0},t.defineComputedProperty_=function(r,i,s){s===void 0&&(s=!1),Pt(this.keysAtom_);try{ot();var o=this.delete_(r);if(!o)return o;if(rt(this)){var u=it(this,{object:this.proxy_||this.target_,name:r,type:Gt,newValue:void 0});if(!u)return null}i.name||(i.name=this.name_+"."+r.toString()),i.context=this.proxy_||this.target_;var f=Ds(r),c={configurable:W.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:f.get,set:f.set};if(s){if(!Reflect.defineProperty(this.target_,r,c))return!1}else $t(this.target_,r,c);this.values_.set(r,new ft(i)),this.notifyPropertyAddition_(r,void 0)}finally{st()}return!0},t.delete_=function(r,i){if(i===void 0&&(i=!1),Pt(this.keysAtom_),!ut(this.target_,r))return!0;if(rt(this)){var s=it(this,{object:this.proxy_||this.target_,name:r,type:Bs});if(!s)return null}try{var o;ot();var u=_t(this),f=Be(),c=this.values_.get(r),h=void 0;if(!c&&(u||f)){var m;h=(m=Gr(this.target_,r))==null?void 0:m.value}if(i){if(!Reflect.deleteProperty(this.target_,r))return!1}else delete this.target_[r];if(delete this.appliedAnnotations_[r],c&&(this.values_.delete(r),c instanceof Vt&&(h=c.value_),ga(c)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(r))==null||o.set(r in this.target_),u||f){var M={type:Bs,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:h,name:r};f&&Ye(M),u&&Tt(this,M),f&&Ze()}}finally{st()}return!0},t.observe_=function(r,i){return i===!0&&ae("`observe` doesn't support the fire immediately property for observable objects."),yr(this,r)},t.intercept_=function(r){return pr(this,r)},t.notifyPropertyAddition_=function(r,i){var s,o=_t(this),u=Be();if(o||u){var f=o||u?{type:Gt,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:r,newValue:i}:null;u&&Ye(f),o&&Tt(this,f),u&&Ze()}(s=this.pendingKeys_)==null||(s=s.get(r))==null||s.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),ti(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e})();function Dn(e,t){var n;if(t&&ln(e)&&ae("Options can't be provided for already observable objects."),ut(e,he))return bo(e)instanceof oo||ae("Cannot convert '"+Yr(e)+`' into observable object:
26
+ The target is already observable of different type.
27
+ Extending builtins is not supported.`),e;Object.isExtensible(e)||ae("Cannot make the designated object observable; it is not extensible");var r=(n=t?.name)!=null?n:(wt(e)?"ObservableObject":e.constructor.name)+"@"+dt(),i=new oo(e,new Map,String(r),Sl(t));return ei(e,he,i),e}var Ad=qt("ObservableObjectAdministration",oo);function Ds(e){return Ls[e]||(Ls[e]={get:function(){return this[he].getObservablePropValue_(e)},set:function(n){return this[he].setObservablePropValue_(e,n)}})}function ln(e){return Qr(e)?Ad(e[he]):!1}function Fs(e,t,n){var r;e.appliedAnnotations_[n]=t,(r=e.target_[We])==null||delete r[n]}function ks(e,t,n){if(Ma(t)||ae("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),!zr(t)&&ut(e.appliedAnnotations_,n)){var r=e.name_+"."+n.toString(),i=e.appliedAnnotations_[n].annotationType_,s=t.annotationType_;ae("Cannot apply '"+s+"' to '"+r+"':"+(`
28
+ The field is already annotated with '`+i+"'.")+`
29
+ Re-annotating fields is not allowed.
30
+ Use 'override' annotation for methods overridden by subclass.`)}}var Id=Ua(0),Ed=(function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1})(),Ji=0,xa=function(){};function Sd(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}Sd(xa,Array.prototype);var mo=(function(e){function t(r,i,s,o){var u;return s===void 0&&(s="ObservableArray@"+dt()),o===void 0&&(o=!1),u=e.call(this)||this,yn(function(){var f=new go(s,i,o,!0);f.proxy_=u,Hs(u,he,f),r&&r.length&&u.spliceWithArray(0,0,r),Ed&&Object.defineProperty(u,"0",Id)}),u}Ys(t,e);var n=t.prototype;return n.concat=function(){this[he].atom_.reportObserved();for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),s.map(function(u){return Bn(u)?u.slice():u}))},n[Symbol.iterator]=function(){var r=this,i=0;return _o({next:function(){return i<r.length?{value:r[i++],done:!1}:{done:!0,value:void 0}}})},jn(t,[{key:"length",get:function(){return this[he].getArrayLength_()},set:function(i){this[he].setArrayLength_(i)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])})(xa);Object.entries(Jr).forEach(function(e){var t=e[0],n=e[1];t!=="concat"&&ei(mo.prototype,t,n)});function Ua(e){return{enumerable:!1,configurable:!0,get:function(){return this[he].get_(e)},set:function(n){this[he].set_(e,n)}}}function Pd(e){$t(mo.prototype,""+e,Ua(e))}function ja(e){if(e>Ji){for(var t=Ji;t<e+100;t++)Pd(t);Ji=e}}ja(1e3);function $d(e,t,n){return new mo(e,t,n)}function lt(e,t){if(typeof e=="object"&&e!==null){if(Bn(e))return t!==void 0&&ae(23),e[he].atom_;if(bt(e))return e.atom_;if(Nt(e)){if(t===void 0)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||ae(25,t,Yr(e)),n}if(ln(e)){if(!t)return ae(26);var r=e[he].values_.get(t);return r||ae(27,t,Yr(e)),r}if(co(e)||fr(e)||Hr(e))return e}else if(Re(e)&&Hr(e[he]))return e[he];ae(28)}function bo(e,t){if(e||ae(29),t!==void 0)return bo(lt(e,t));if(co(e)||fr(e)||Hr(e)||Nt(e)||bt(e))return e;if(e[he])return e[he];ae(24,e)}function Yr(e,t){var n;if(t!==void 0)n=lt(e,t);else{if(zt(e))return e.name;ln(e)||Nt(e)||bt(e)?n=bo(e):n=lt(e)}return n.name_}function yn(e){var t=dn(),n=oi(!0);ot();try{return e()}finally{st(),si(n),Bt(t)}}var Ks=sr.toString;function vo(e,t,n){return n===void 0&&(n=-1),so(e,t,n)}function so(e,t,n,r,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var s=typeof e;if(s!=="function"&&s!=="object"&&typeof t!="object")return!1;var o=Ks.call(e);if(o!==Ks.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++;break}e=Gs(e),t=Gs(t);var u=o==="[object Array]";if(!u){if(typeof e!="object"||typeof t!="object")return!1;var f=e.constructor,c=t.constructor;if(f!==c&&!(Re(f)&&f instanceof f&&Re(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],i=i||[];for(var h=r.length;h--;)if(r[h]===e)return i[h]===t;if(r.push(e),i.push(t),u){if(h=e.length,h!==t.length)return!1;for(;h--;)if(!so(e[h],t[h],n-1,r,i))return!1}else{var m=Object.keys(e),M=m.length;if(Object.keys(t).length!==M)return!1;for(var S=0;S<M;S++){var B=m[S];if(!(ut(t,B)&&so(e[B],t[B],n-1,r,i)))return!1}}return r.pop(),i.pop(),!0}function Gs(e){return Bn(e)?e.slice():Un(e)||Nt(e)||Mt(e)||bt(e)?Array.from(e.entries()):e}var Vs,Rd=((Vs=Zr().Iterator)==null?void 0:Vs.prototype)||{};function _o(e){return e[Symbol.iterator]=Nd,Object.assign(Object.create(Rd),e)}function Nd(){return this}function Ma(e){return e instanceof Object&&typeof e.annotationType_=="string"&&Re(e.make_)&&Re(e.extend_)}["Symbol","Map","Set"].forEach(function(e){var t=Zr();typeof t[e]>"u"&&ae("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Yl,extras:{getDebugName:Yr},$mobx:he});var Cd=Object.create,To=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,La=Object.getOwnPropertyNames,Ud=Object.getPrototypeOf,jd=Object.prototype.hasOwnProperty,De=(e,t)=>function(){return t||(0,e[La(e)[0]])((t={exports:{}}).exports,t),t.exports},wo=(e,t)=>{for(var n in t)To(e,n,{get:t[n],enumerable:!0})},Md=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of La(t))!jd.call(e,i)&&i!==n&&To(e,i,{get:()=>t[i],enumerable:!(r=xd(t,i))||r.enumerable});return e},Ht=(e,t,n)=>(n=e!=null?Cd(Ud(e)):{},Md(t||!e||!e.__esModule?To(n,"default",{value:e,enumerable:!0}):n,e));var Ft=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/typebox.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Type=e.JsonType=e.JavaScriptTypeBuilder=e.JsonTypeBuilder=e.TypeBuilder=e.TypeBuilderError=e.TransformEncodeBuilder=e.TransformDecodeBuilder=e.TemplateLiteralDslParser=e.TemplateLiteralGenerator=e.TemplateLiteralGeneratorError=e.TemplateLiteralFinite=e.TemplateLiteralFiniteError=e.TemplateLiteralParser=e.TemplateLiteralParserError=e.TemplateLiteralResolver=e.TemplateLiteralPattern=e.TemplateLiteralPatternError=e.UnionResolver=e.KeyArrayResolver=e.KeyArrayResolverError=e.KeyResolver=e.ObjectMap=e.Intrinsic=e.IndexedAccessor=e.TypeClone=e.TypeExtends=e.TypeExtendsResult=e.TypeExtendsError=e.ExtendsUndefined=e.TypeGuard=e.TypeGuardUnknownTypeError=e.ValueGuard=e.FormatRegistry=e.TypeBoxError=e.TypeRegistry=e.PatternStringExact=e.PatternNumberExact=e.PatternBooleanExact=e.PatternString=e.PatternNumber=e.PatternBoolean=e.Kind=e.Hint=e.Optional=e.Readonly=e.Transform=void 0,e.Transform=Symbol.for("TypeBox.Transform"),e.Readonly=Symbol.for("TypeBox.Readonly"),e.Optional=Symbol.for("TypeBox.Optional"),e.Hint=Symbol.for("TypeBox.Hint"),e.Kind=Symbol.for("TypeBox.Kind"),e.PatternBoolean="(true|false)",e.PatternNumber="(0|[1-9][0-9]*)",e.PatternString="(.*)",e.PatternBooleanExact=`^${e.PatternBoolean}$`,e.PatternNumberExact=`^${e.PatternNumber}$`,e.PatternStringExact=`^${e.PatternString}$`;var t;(function(l){let _=new Map;function I(){return new Map(_)}l.Entries=I;function C(){return _.clear()}l.Clear=C;function R(T){return _.delete(T)}l.Delete=R;function E(T){return _.has(T)}l.Has=E;function y(T,a){_.set(T,a)}l.Set=y;function w(T){return _.get(T)}l.Get=w})(t||(e.TypeRegistry=t={}));var n=class extends Error{constructor(l){super(l)}};e.TypeBoxError=n;var r;(function(l){let _=new Map;function I(){return new Map(_)}l.Entries=I;function C(){return _.clear()}l.Clear=C;function R(T){return _.delete(T)}l.Delete=R;function E(T){return _.has(T)}l.Has=E;function y(T,a){_.set(T,a)}l.Set=y;function w(T){return _.get(T)}l.Get=w})(r||(e.FormatRegistry=r={}));var i;(function(l){function _(v){return Array.isArray(v)}l.IsArray=_;function I(v){return typeof v=="bigint"}l.IsBigInt=I;function C(v){return typeof v=="boolean"}l.IsBoolean=C;function R(v){return v instanceof globalThis.Date}l.IsDate=R;function E(v){return v===null}l.IsNull=E;function y(v){return typeof v=="number"}l.IsNumber=y;function w(v){return typeof v=="object"&&v!==null}l.IsObject=w;function T(v){return typeof v=="string"}l.IsString=T;function a(v){return v instanceof globalThis.Uint8Array}l.IsUint8Array=a;function O(v){return v===void 0}l.IsUndefined=O})(i||(e.ValueGuard=i={}));var s=class extends n{};e.TypeGuardUnknownTypeError=s;var o;(function(l){function _(g){try{return new RegExp(g),!0}catch{return!1}}function I(g){if(!i.IsString(g))return!1;for(let Ae=0;Ae<g.length;Ae++){let nt=g.charCodeAt(Ae);if(nt>=7&&nt<=13||nt===27||nt===127)return!1}return!0}function C(g){return y(g)||Ue(g)}function R(g){return i.IsUndefined(g)||i.IsBigInt(g)}function E(g){return i.IsUndefined(g)||i.IsNumber(g)}function y(g){return i.IsUndefined(g)||i.IsBoolean(g)}function w(g){return i.IsUndefined(g)||i.IsString(g)}function T(g){return i.IsUndefined(g)||i.IsString(g)&&I(g)&&_(g)}function a(g){return i.IsUndefined(g)||i.IsString(g)&&I(g)}function O(g){return i.IsUndefined(g)||Ue(g)}function v(g){return me(g,"Any")&&w(g.$id)}l.TAny=v;function b(g){return me(g,"Array")&&g.type==="array"&&w(g.$id)&&Ue(g.items)&&E(g.minItems)&&E(g.maxItems)&&y(g.uniqueItems)&&O(g.contains)&&E(g.minContains)&&E(g.maxContains)}l.TArray=b;function P(g){return me(g,"AsyncIterator")&&g.type==="AsyncIterator"&&w(g.$id)&&Ue(g.items)}l.TAsyncIterator=P;function k(g){return me(g,"BigInt")&&g.type==="bigint"&&w(g.$id)&&R(g.exclusiveMaximum)&&R(g.exclusiveMinimum)&&R(g.maximum)&&R(g.minimum)&&R(g.multipleOf)}l.TBigInt=k;function Z(g){return me(g,"Boolean")&&g.type==="boolean"&&w(g.$id)}l.TBoolean=Z;function te(g){return me(g,"Constructor")&&g.type==="Constructor"&&w(g.$id)&&i.IsArray(g.parameters)&&g.parameters.every(Ae=>Ue(Ae))&&Ue(g.returns)}l.TConstructor=te;function pe(g){return me(g,"Date")&&g.type==="Date"&&w(g.$id)&&E(g.exclusiveMaximumTimestamp)&&E(g.exclusiveMinimumTimestamp)&&E(g.maximumTimestamp)&&E(g.minimumTimestamp)&&E(g.multipleOfTimestamp)}l.TDate=pe;function ge(g){return me(g,"Function")&&g.type==="Function"&&w(g.$id)&&i.IsArray(g.parameters)&&g.parameters.every(Ae=>Ue(Ae))&&Ue(g.returns)}l.TFunction=ge;function Ee(g){return me(g,"Integer")&&g.type==="integer"&&w(g.$id)&&E(g.exclusiveMaximum)&&E(g.exclusiveMinimum)&&E(g.maximum)&&E(g.minimum)&&E(g.multipleOf)}l.TInteger=Ee;function Ce(g){return me(g,"Intersect")&&!(i.IsString(g.type)&&g.type!=="object")&&i.IsArray(g.allOf)&&g.allOf.every(Ae=>Ue(Ae)&&!er(Ae))&&w(g.type)&&(y(g.unevaluatedProperties)||O(g.unevaluatedProperties))&&w(g.$id)}l.TIntersect=Ce;function tn(g){return me(g,"Iterator")&&g.type==="Iterator"&&w(g.$id)&&Ue(g.items)}l.TIterator=tn;function me(g,Ae){return Kt(g)&&g[e.Kind]===Ae}l.TKindOf=me;function Kt(g){return i.IsObject(g)&&e.Kind in g&&i.IsString(g[e.Kind])}l.TKind=Kt;function nn(g){return $(g)&&i.IsString(g.const)}l.TLiteralString=nn;function A(g){return $(g)&&i.IsNumber(g.const)}l.TLiteralNumber=A;function ue(g){return $(g)&&i.IsBoolean(g.const)}l.TLiteralBoolean=ue;function $(g){return me(g,"Literal")&&w(g.$id)&&(i.IsBoolean(g.const)||i.IsNumber(g.const)||i.IsString(g.const))}l.TLiteral=$;function ye(g){return me(g,"Never")&&i.IsObject(g.not)&&Object.getOwnPropertyNames(g.not).length===0}l.TNever=ye;function ne(g){return me(g,"Not")&&Ue(g.not)}l.TNot=ne;function ce(g){return me(g,"Null")&&g.type==="null"&&w(g.$id)}l.TNull=ce;function we(g){return me(g,"Number")&&g.type==="number"&&w(g.$id)&&E(g.exclusiveMaximum)&&E(g.exclusiveMinimum)&&E(g.maximum)&&E(g.minimum)&&E(g.multipleOf)}l.TNumber=we;function $e(g){return me(g,"Object")&&g.type==="object"&&w(g.$id)&&i.IsObject(g.properties)&&C(g.additionalProperties)&&E(g.minProperties)&&E(g.maxProperties)&&Object.entries(g.properties).every(([Ae,nt])=>I(Ae)&&Ue(nt))}l.TObject=$e;function Ge(g){return me(g,"Promise")&&g.type==="Promise"&&w(g.$id)&&Ue(g.item)}l.TPromise=Ge;function ke(g){return me(g,"Record")&&g.type==="object"&&w(g.$id)&&C(g.additionalProperties)&&i.IsObject(g.patternProperties)&&(Ae=>{let nt=Object.getOwnPropertyNames(Ae.patternProperties);return nt.length===1&&_(nt[0])&&i.IsObject(Ae.patternProperties)&&Ue(Ae.patternProperties[nt[0]])})(g)}l.TRecord=ke;function qe(g){return i.IsObject(g)&&e.Hint in g&&g[e.Hint]==="Recursive"}l.TRecursive=qe;function jt(g){return me(g,"Ref")&&w(g.$id)&&i.IsString(g.$ref)}l.TRef=jt;function En(g){return me(g,"String")&&g.type==="string"&&w(g.$id)&&E(g.minLength)&&E(g.maxLength)&&T(g.pattern)&&a(g.format)}l.TString=En;function Sn(g){return me(g,"Symbol")&&g.type==="symbol"&&w(g.$id)}l.TSymbol=Sn;function rn(g){return me(g,"TemplateLiteral")&&g.type==="string"&&i.IsString(g.pattern)&&g.pattern[0]==="^"&&g.pattern[g.pattern.length-1]==="$"}l.TTemplateLiteral=rn;function xr(g){return me(g,"This")&&w(g.$id)&&i.IsString(g.$ref)}l.TThis=xr;function er(g){return i.IsObject(g)&&e.Transform in g}l.TTransform=er;function xe(g){return me(g,"Tuple")&&g.type==="array"&&w(g.$id)&&i.IsNumber(g.minItems)&&i.IsNumber(g.maxItems)&&g.minItems===g.maxItems&&(i.IsUndefined(g.items)&&i.IsUndefined(g.additionalItems)&&g.minItems===0||i.IsArray(g.items)&&g.items.every(Ae=>Ue(Ae)))}l.TTuple=xe;function Ur(g){return me(g,"Undefined")&&g.type==="undefined"&&w(g.$id)}l.TUndefined=Ur;function Vi(g){return on(g)&&g.anyOf.every(Ae=>nn(Ae)||A(Ae))}l.TUnionLiteral=Vi;function on(g){return me(g,"Union")&&w(g.$id)&&i.IsObject(g)&&i.IsArray(g.anyOf)&&g.anyOf.every(Ae=>Ue(Ae))}l.TUnion=on;function Pn(g){return me(g,"Uint8Array")&&g.type==="Uint8Array"&&w(g.$id)&&E(g.minByteLength)&&E(g.maxByteLength)}l.TUint8Array=Pn;function Ve(g){return me(g,"Unknown")&&w(g.$id)}l.TUnknown=Ve;function jr(g){return me(g,"Unsafe")}l.TUnsafe=jr;function tr(g){return me(g,"Void")&&g.type==="void"&&w(g.$id)}l.TVoid=tr;function zi(g){return i.IsObject(g)&&g[e.Readonly]==="Readonly"}l.TReadonly=zi;function qi(g){return i.IsObject(g)&&g[e.Optional]==="Optional"}l.TOptional=qi;function Ue(g){return i.IsObject(g)&&(v(g)||b(g)||Z(g)||k(g)||P(g)||te(g)||pe(g)||ge(g)||Ee(g)||Ce(g)||tn(g)||$(g)||ye(g)||ne(g)||ce(g)||we(g)||$e(g)||Ge(g)||ke(g)||jt(g)||En(g)||Sn(g)||rn(g)||xr(g)||xe(g)||Ur(g)||on(g)||Pn(g)||Ve(g)||jr(g)||tr(g)||Kt(g)&&t.Has(g[e.Kind]))}l.TSchema=Ue})(o||(e.TypeGuard=o={}));var u;(function(l){function _(I){return I[e.Kind]==="Intersect"?I.allOf.every(C=>_(C)):I[e.Kind]==="Union"?I.anyOf.some(C=>_(C)):I[e.Kind]==="Undefined"?!0:I[e.Kind]==="Not"?!_(I.not):!1}l.Check=_})(u||(e.ExtendsUndefined=u={}));var f=class extends n{};e.TypeExtendsError=f;var c;(function(l){l[l.Union=0]="Union",l[l.True=1]="True",l[l.False=2]="False"})(c||(e.TypeExtendsResult=c={}));var h;(function(l){function _(d){return d===c.False?d:c.True}function I(d){throw new f(d)}function C(d){return o.TNever(d)||o.TIntersect(d)||o.TUnion(d)||o.TUnknown(d)||o.TAny(d)}function R(d,p){return o.TNever(p)?me(d,p):o.TIntersect(p)?ge(d,p):o.TUnion(p)?Wi(d,p):o.TUnknown(p)?Es(d,p):o.TAny(p)?E(d,p):I("StructuralRight")}function E(d,p){return c.True}function y(d,p){return o.TIntersect(p)?ge(d,p):o.TUnion(p)&&p.anyOf.some(ve=>o.TAny(ve)||o.TUnknown(ve))?c.True:o.TUnion(p)?c.Union:o.TUnknown(p)||o.TAny(p)?c.True:c.Union}function w(d,p){return o.TUnknown(d)?c.False:o.TAny(d)?c.Union:o.TNever(d)?c.True:c.False}function T(d,p){return o.TObject(p)&&rn(p)?c.True:C(p)?R(d,p):o.TArray(p)?_(Oe(d.items,p.items)):c.False}function a(d,p){return C(p)?R(d,p):o.TAsyncIterator(p)?_(Oe(d.items,p.items)):c.False}function O(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TBigInt(p)?c.True:c.False}function v(d,p){return o.TLiteral(d)&&i.IsBoolean(d.const)||o.TBoolean(d)?c.True:c.False}function b(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TBoolean(p)?c.True:c.False}function P(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TConstructor(p)?d.parameters.length>p.parameters.length?c.False:d.parameters.every((ve,mt)=>_(Oe(p.parameters[mt],ve))===c.True)?_(Oe(d.returns,p.returns)):c.False:c.False}function k(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TDate(p)?c.True:c.False}function Z(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TFunction(p)?d.parameters.length>p.parameters.length?c.False:d.parameters.every((ve,mt)=>_(Oe(p.parameters[mt],ve))===c.True)?_(Oe(d.returns,p.returns)):c.False:c.False}function te(d,p){return o.TLiteral(d)&&i.IsNumber(d.const)||o.TNumber(d)||o.TInteger(d)?c.True:c.False}function pe(d,p){return o.TInteger(p)||o.TNumber(p)?c.True:C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):c.False}function ge(d,p){return p.allOf.every(ve=>Oe(d,ve)===c.True)?c.True:c.False}function Ee(d,p){return d.allOf.some(ve=>Oe(ve,p)===c.True)?c.True:c.False}function Ce(d,p){return C(p)?R(d,p):o.TIterator(p)?_(Oe(d.items,p.items)):c.False}function tn(d,p){return o.TLiteral(p)&&p.const===d.const?c.True:C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TString(p)?tr(d,p):o.TNumber(p)?$(d,p):o.TInteger(p)?te(d,p):o.TBoolean(p)?v(d,p):c.False}function me(d,p){return c.False}function Kt(d,p){return c.True}function nn(d){let[p,ve]=[d,0];for(;o.TNot(p);)p=p.not,ve+=1;return ve%2===0?p:e.Type.Unknown()}function A(d,p){return o.TNot(d)?Oe(nn(d),p):o.TNot(p)?Oe(d,nn(p)):I("Invalid fallthrough for Not")}function ue(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TNull(p)?c.True:c.False}function $(d,p){return o.TLiteralNumber(d)||o.TNumber(d)||o.TInteger(d)?c.True:c.False}function ye(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TInteger(p)||o.TNumber(p)?c.True:c.False}function ne(d,p){return Object.getOwnPropertyNames(d.properties).length===p}function ce(d){return rn(d)}function we(d){return ne(d,0)||ne(d,1)&&"description"in d.properties&&o.TUnion(d.properties.description)&&d.properties.description.anyOf.length===2&&(o.TString(d.properties.description.anyOf[0])&&o.TUndefined(d.properties.description.anyOf[1])||o.TString(d.properties.description.anyOf[1])&&o.TUndefined(d.properties.description.anyOf[0]))}function $e(d){return ne(d,0)}function Ge(d){return ne(d,0)}function ke(d){return ne(d,0)}function qe(d){return ne(d,0)}function jt(d){return rn(d)}function En(d){let p=e.Type.Number();return ne(d,0)||ne(d,1)&&"length"in d.properties&&_(Oe(d.properties.length,p))===c.True}function Sn(d){return ne(d,0)}function rn(d){let p=e.Type.Number();return ne(d,0)||ne(d,1)&&"length"in d.properties&&_(Oe(d.properties.length,p))===c.True}function xr(d){let p=e.Type.Function([e.Type.Any()],e.Type.Any());return ne(d,0)||ne(d,1)&&"then"in d.properties&&_(Oe(d.properties.then,p))===c.True}function er(d,p){return Oe(d,p)===c.False||o.TOptional(d)&&!o.TOptional(p)?c.False:c.True}function xe(d,p){return o.TUnknown(d)?c.False:o.TAny(d)?c.Union:o.TNever(d)||o.TLiteralString(d)&&ce(p)||o.TLiteralNumber(d)&&$e(p)||o.TLiteralBoolean(d)&&Ge(p)||o.TSymbol(d)&&we(p)||o.TBigInt(d)&&ke(p)||o.TString(d)&&ce(p)||o.TSymbol(d)&&we(p)||o.TNumber(d)&&$e(p)||o.TInteger(d)&&$e(p)||o.TBoolean(d)&&Ge(p)||o.TUint8Array(d)&&jt(p)||o.TDate(d)&&qe(p)||o.TConstructor(d)&&Sn(p)||o.TFunction(d)&&En(p)?c.True:o.TRecord(d)&&o.TString(on(d))?p[e.Hint]==="Record"?c.True:c.False:o.TRecord(d)&&o.TNumber(on(d))?ne(p,0)?c.True:c.False:c.False}function Ur(d,p){return C(p)?R(d,p):o.TRecord(p)?Ve(d,p):o.TObject(p)?(()=>{for(let ve of Object.getOwnPropertyNames(p.properties)){if(!(ve in d.properties)&&!o.TOptional(p.properties[ve]))return c.False;if(o.TOptional(p.properties[ve]))return c.True;if(er(d.properties[ve],p.properties[ve])===c.False)return c.False}return c.True})():c.False}function Vi(d,p){return C(p)?R(d,p):o.TObject(p)&&xr(p)?c.True:o.TPromise(p)?_(Oe(d.item,p.item)):c.False}function on(d){return e.PatternNumberExact in d.patternProperties?e.Type.Number():e.PatternStringExact in d.patternProperties?e.Type.String():I("Unknown record key pattern")}function Pn(d){return e.PatternNumberExact in d.patternProperties?d.patternProperties[e.PatternNumberExact]:e.PatternStringExact in d.patternProperties?d.patternProperties[e.PatternStringExact]:I("Unable to get record value schema")}function Ve(d,p){let[ve,mt]=[on(p),Pn(p)];return o.TLiteralString(d)&&o.TNumber(ve)&&_(Oe(d,mt))===c.True?c.True:o.TUint8Array(d)&&o.TNumber(ve)||o.TString(d)&&o.TNumber(ve)||o.TArray(d)&&o.TNumber(ve)?Oe(d,mt):o.TObject(d)?(()=>{for(let Cf of Object.getOwnPropertyNames(d.properties))if(er(mt,d.properties[Cf])===c.False)return c.False;return c.True})():c.False}function jr(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Oe(Pn(d),Pn(p)):c.False}function tr(d,p){return o.TLiteral(d)&&i.IsString(d.const)||o.TString(d)?c.True:c.False}function zi(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TString(p)?c.True:c.False}function qi(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TSymbol(p)?c.True:c.False}function Ue(d,p){return o.TTemplateLiteral(d)?Oe(F.Resolve(d),p):o.TTemplateLiteral(p)?Oe(d,F.Resolve(p)):I("Invalid fallthrough for TemplateLiteral")}function g(d,p){return o.TArray(p)&&d.items!==void 0&&d.items.every(ve=>Oe(ve,p.items)===c.True)}function Ae(d,p){return o.TNever(d)?c.True:o.TUnknown(d)?c.False:o.TAny(d)?c.Union:c.False}function nt(d,p){return C(p)?R(d,p):o.TObject(p)&&rn(p)||o.TArray(p)&&g(d,p)?c.True:o.TTuple(p)?i.IsUndefined(d.items)&&!i.IsUndefined(p.items)||!i.IsUndefined(d.items)&&i.IsUndefined(p.items)?c.False:i.IsUndefined(d.items)&&!i.IsUndefined(p.items)||d.items.every((ve,mt)=>Oe(ve,p.items[mt])===c.True)?c.True:c.False:c.False}function If(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TUint8Array(p)?c.True:c.False}function Ef(d,p){return C(p)?R(d,p):o.TObject(p)?xe(d,p):o.TRecord(p)?Ve(d,p):o.TVoid(p)?$f(d,p):o.TUndefined(p)?c.True:c.False}function Wi(d,p){return p.anyOf.some(ve=>Oe(d,ve)===c.True)?c.True:c.False}function Sf(d,p){return d.anyOf.every(ve=>Oe(ve,p)===c.True)?c.True:c.False}function Es(d,p){return c.True}function Pf(d,p){return o.TNever(p)?me(d,p):o.TIntersect(p)?ge(d,p):o.TUnion(p)?Wi(d,p):o.TAny(p)?E(d,p):o.TString(p)?tr(d,p):o.TNumber(p)?$(d,p):o.TInteger(p)?te(d,p):o.TBoolean(p)?v(d,p):o.TArray(p)?w(d,p):o.TTuple(p)?Ae(d,p):o.TObject(p)?xe(d,p):o.TUnknown(p)?c.True:c.False}function $f(d,p){return o.TUndefined(d)||o.TUndefined(d)?c.True:c.False}function Rf(d,p){return o.TIntersect(p)?ge(d,p):o.TUnion(p)?Wi(d,p):o.TUnknown(p)?Es(d,p):o.TAny(p)?E(d,p):o.TObject(p)?xe(d,p):o.TVoid(p)?c.True:c.False}function Oe(d,p){return o.TTemplateLiteral(d)||o.TTemplateLiteral(p)?Ue(d,p):o.TNot(d)||o.TNot(p)?A(d,p):o.TAny(d)?y(d,p):o.TArray(d)?T(d,p):o.TBigInt(d)?O(d,p):o.TBoolean(d)?b(d,p):o.TAsyncIterator(d)?a(d,p):o.TConstructor(d)?P(d,p):o.TDate(d)?k(d,p):o.TFunction(d)?Z(d,p):o.TInteger(d)?pe(d,p):o.TIntersect(d)?Ee(d,p):o.TIterator(d)?Ce(d,p):o.TLiteral(d)?tn(d,p):o.TNever(d)?Kt(d,p):o.TNull(d)?ue(d,p):o.TNumber(d)?ye(d,p):o.TObject(d)?Ur(d,p):o.TRecord(d)?jr(d,p):o.TString(d)?zi(d,p):o.TSymbol(d)?qi(d,p):o.TTuple(d)?nt(d,p):o.TPromise(d)?Vi(d,p):o.TUint8Array(d)?If(d,p):o.TUndefined(d)?Ef(d,p):o.TUnion(d)?Sf(d,p):o.TUnknown(d)?Pf(d,p):o.TVoid(d)?Rf(d,p):I(`Unknown left type operand '${d[e.Kind]}'`)}function Nf(d,p){return Oe(d,p)}l.Extends=Nf})(h||(e.TypeExtends=h={}));var m;(function(l){function _(T){return T.map(a=>E(a))}function I(T){return new Date(T.getTime())}function C(T){return new Uint8Array(T)}function R(T){let a=Object.getOwnPropertyNames(T).reduce((v,b)=>({...v,[b]:E(T[b])}),{}),O=Object.getOwnPropertySymbols(T).reduce((v,b)=>({...v,[b]:E(T[b])}),{});return{...a,...O}}function E(T){return i.IsArray(T)?_(T):i.IsDate(T)?I(T):i.IsUint8Array(T)?C(T):i.IsObject(T)?R(T):T}function y(T){return T.map(a=>w(a))}l.Rest=y;function w(T,a={}){return{...E(T),...a}}l.Type=w})(m||(e.TypeClone=m={}));var M;(function(l){function _(P){return P.map(k=>{let{[e.Optional]:Z,...te}=m.Type(k);return te})}function I(P){return P.every(k=>o.TOptional(k))}function C(P){return P.some(k=>o.TOptional(k))}function R(P){return I(P.allOf)?e.Type.Optional(e.Type.Intersect(_(P.allOf))):P}function E(P){return C(P.anyOf)?e.Type.Optional(e.Type.Union(_(P.anyOf))):P}function y(P){return P[e.Kind]==="Intersect"?R(P):P[e.Kind]==="Union"?E(P):P}function w(P,k){let Z=P.allOf.reduce((te,pe)=>{let ge=v(pe,k);return ge[e.Kind]==="Never"?te:[...te,ge]},[]);return y(e.Type.Intersect(Z))}function T(P,k){let Z=P.anyOf.map(te=>v(te,k));return y(e.Type.Union(Z))}function a(P,k){let Z=P.properties[k];return i.IsUndefined(Z)?e.Type.Never():e.Type.Union([Z])}function O(P,k){let Z=P.items;if(i.IsUndefined(Z))return e.Type.Never();let te=Z[k];return i.IsUndefined(te)?e.Type.Never():te}function v(P,k){return P[e.Kind]==="Intersect"?w(P,k):P[e.Kind]==="Union"?T(P,k):P[e.Kind]==="Object"?a(P,k):P[e.Kind]==="Tuple"?O(P,k):e.Type.Never()}function b(P,k,Z={}){let te=k.map(pe=>v(P,pe.toString()));return y(e.Type.Union(te,Z))}l.Resolve=b})(M||(e.IndexedAccessor=M={}));var S;(function(l){function _(O){let[v,b]=[O.slice(0,1),O.slice(1)];return`${v.toLowerCase()}${b}`}function I(O){let[v,b]=[O.slice(0,1),O.slice(1)];return`${v.toUpperCase()}${b}`}function C(O){return O.toUpperCase()}function R(O){return O.toLowerCase()}function E(O,v){let b=z.ParseExact(O.pattern);if(!N.Check(b))return{...O,pattern:y(O.pattern,v)};let Z=[...L.Generate(b)].map(ge=>e.Type.Literal(ge)),te=w(Z,v),pe=e.Type.Union(te);return e.Type.TemplateLiteral([pe])}function y(O,v){return typeof O=="string"?v==="Uncapitalize"?_(O):v==="Capitalize"?I(O):v==="Uppercase"?C(O):v==="Lowercase"?R(O):O:O.toString()}function w(O,v){if(O.length===0)return[];let[b,...P]=O;return[a(b,v),...w(P,v)]}function T(O,v){return o.TTemplateLiteral(O)?E(O,v):o.TUnion(O)?e.Type.Union(w(O.anyOf,v)):o.TLiteral(O)?e.Type.Literal(y(O.const,v)):O}function a(O,v){return T(O,v)}l.Map=a})(S||(e.Intrinsic=S={}));var B;(function(l){function _(y,w){return e.Type.Intersect(y.allOf.map(T=>R(T,w)),{...y})}function I(y,w){return e.Type.Union(y.anyOf.map(T=>R(T,w)),{...y})}function C(y,w){return w(y)}function R(y,w){return y[e.Kind]==="Intersect"?_(y,w):y[e.Kind]==="Union"?I(y,w):y[e.Kind]==="Object"?C(y,w):y}function E(y,w,T){return{...R(m.Type(y),w),...T}}l.Map=E})(B||(e.ObjectMap=B={}));var H;(function(l){function _(a){return a[0]==="^"&&a[a.length-1]==="$"?a.slice(1,a.length-1):a}function I(a,O){return a.allOf.reduce((v,b)=>[...v,...y(b,O)],[])}function C(a,O){let v=a.anyOf.map(b=>y(b,O));return[...v.reduce((b,P)=>P.map(k=>v.every(Z=>Z.includes(k))?b.add(k):b)[0],new Set)]}function R(a,O){return Object.getOwnPropertyNames(a.properties)}function E(a,O){return O.includePatterns?Object.getOwnPropertyNames(a.patternProperties):[]}function y(a,O){return o.TIntersect(a)?I(a,O):o.TUnion(a)?C(a,O):o.TObject(a)?R(a,O):o.TRecord(a)?E(a,O):[]}function w(a,O){return[...new Set(y(a,O))]}l.ResolveKeys=w;function T(a){return`^(${w(a,{includePatterns:!0}).map(b=>`(${_(b)})`).join("|")})$`}l.ResolvePattern=T})(H||(e.KeyResolver=H={}));var Q=class extends n{};e.KeyArrayResolverError=Q;var K;(function(l){function _(I){return Array.isArray(I)?I:o.TUnionLiteral(I)?I.anyOf.map(C=>C.const.toString()):o.TLiteral(I)?[I.const]:o.TTemplateLiteral(I)?(()=>{let C=z.ParseExact(I.pattern);if(!N.Check(C))throw new Q("Cannot resolve keys from infinite template expression");return[...L.Generate(C)]})():[]}l.Resolve=_})(K||(e.KeyArrayResolver=K={}));var D;(function(l){function*_(C){for(let R of C.anyOf)R[e.Kind]==="Union"?yield*_(R):yield R}function I(C){return e.Type.Union([..._(C)],{...C})}l.Resolve=I})(D||(e.UnionResolver=D={}));var V=class extends n{};e.TemplateLiteralPatternError=V;var q;(function(l){function _(E){throw new V(E)}function I(E){return E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function C(E,y){return o.TTemplateLiteral(E)?E.pattern.slice(1,E.pattern.length-1):o.TUnion(E)?`(${E.anyOf.map(w=>C(w,y)).join("|")})`:o.TNumber(E)?`${y}${e.PatternNumber}`:o.TInteger(E)?`${y}${e.PatternNumber}`:o.TBigInt(E)?`${y}${e.PatternNumber}`:o.TString(E)?`${y}${e.PatternString}`:o.TLiteral(E)?`${y}${I(E.const.toString())}`:o.TBoolean(E)?`${y}${e.PatternBoolean}`:_(`Unexpected Kind '${E[e.Kind]}'`)}function R(E){return`^${E.map(y=>C(y,"")).join("")}$`}l.Create=R})(q||(e.TemplateLiteralPattern=q={}));var F;(function(l){function _(I){let C=z.ParseExact(I.pattern);if(!N.Check(C))return e.Type.String();let R=[...L.Generate(C)].map(E=>e.Type.Literal(E));return e.Type.Union(R)}l.Resolve=_})(F||(e.TemplateLiteralResolver=F={}));var ee=class extends n{};e.TemplateLiteralParserError=ee;var z;(function(l){function _(P,k,Z){return P[k]===Z&&P.charCodeAt(k-1)!==92}function I(P,k){return _(P,k,"(")}function C(P,k){return _(P,k,")")}function R(P,k){return _(P,k,"|")}function E(P){if(!(I(P,0)&&C(P,P.length-1)))return!1;let k=0;for(let Z=0;Z<P.length;Z++)if(I(P,Z)&&(k+=1),C(P,Z)&&(k-=1),k===0&&Z!==P.length-1)return!1;return!0}function y(P){return P.slice(1,P.length-1)}function w(P){let k=0;for(let Z=0;Z<P.length;Z++)if(I(P,Z)&&(k+=1),C(P,Z)&&(k-=1),R(P,Z)&&k===0)return!0;return!1}function T(P){for(let k=0;k<P.length;k++)if(I(P,k))return!0;return!1}function a(P){let[k,Z]=[0,0],te=[];for(let ge=0;ge<P.length;ge++)if(I(P,ge)&&(k+=1),C(P,ge)&&(k-=1),R(P,ge)&&k===0){let Ee=P.slice(Z,ge);Ee.length>0&&te.push(v(Ee)),Z=ge+1}let pe=P.slice(Z);return pe.length>0&&te.push(v(pe)),te.length===0?{type:"const",const:""}:te.length===1?te[0]:{type:"or",expr:te}}function O(P){function k(pe,ge){if(!I(pe,ge))throw new ee("TemplateLiteralParser: Index must point to open parens");let Ee=0;for(let Ce=ge;Ce<pe.length;Ce++)if(I(pe,Ce)&&(Ee+=1),C(pe,Ce)&&(Ee-=1),Ee===0)return[ge,Ce];throw new ee("TemplateLiteralParser: Unclosed group parens in expression")}function Z(pe,ge){for(let Ee=ge;Ee<pe.length;Ee++)if(I(pe,Ee))return[ge,Ee];return[ge,pe.length]}let te=[];for(let pe=0;pe<P.length;pe++)if(I(P,pe)){let[ge,Ee]=k(P,pe),Ce=P.slice(ge,Ee+1);te.push(v(Ce)),pe=Ee}else{let[ge,Ee]=Z(P,pe),Ce=P.slice(ge,Ee);Ce.length>0&&te.push(v(Ce)),pe=Ee-1}return te.length===0?{type:"const",const:""}:te.length===1?te[0]:{type:"and",expr:te}}function v(P){return E(P)?v(y(P)):w(P)?a(P):T(P)?O(P):{type:"const",const:P}}l.Parse=v;function b(P){return v(P.slice(1,P.length-1))}l.ParseExact=b})(z||(e.TemplateLiteralParser=z={}));var fe=class extends n{};e.TemplateLiteralFiniteError=fe;var N;(function(l){function _(y){throw new fe(y)}function I(y){return y.type==="or"&&y.expr.length===2&&y.expr[0].type==="const"&&y.expr[0].const==="0"&&y.expr[1].type==="const"&&y.expr[1].const==="[1-9][0-9]*"}function C(y){return y.type==="or"&&y.expr.length===2&&y.expr[0].type==="const"&&y.expr[0].const==="true"&&y.expr[1].type==="const"&&y.expr[1].const==="false"}function R(y){return y.type==="const"&&y.const===".*"}function E(y){return C(y)?!0:I(y)||R(y)?!1:y.type==="and"?y.expr.every(w=>E(w)):y.type==="or"?y.expr.every(w=>E(w)):y.type==="const"?!0:_("Unknown expression type")}l.Check=E})(N||(e.TemplateLiteralFinite=N={}));var x=class extends n{};e.TemplateLiteralGeneratorError=x;var L;(function(l){function*_(y){if(y.length===1)return yield*y[0];for(let w of y[0])for(let T of _(y.slice(1)))yield`${w}${T}`}function*I(y){return yield*_(y.expr.map(w=>[...E(w)]))}function*C(y){for(let w of y.expr)yield*E(w)}function*R(y){return yield y.const}function*E(y){return y.type==="and"?yield*I(y):y.type==="or"?yield*C(y):y.type==="const"?yield*R(y):(()=>{throw new x("Unknown expression")})()}l.Generate=E})(L||(e.TemplateLiteralGenerator=L={}));var Y;(function(l){function*_(E){let y=E.trim().replace(/"|'/g,"");return y==="boolean"?yield e.Type.Boolean():y==="number"?yield e.Type.Number():y==="bigint"?yield e.Type.BigInt():y==="string"?yield e.Type.String():yield(()=>{let w=y.split("|").map(T=>e.Type.Literal(T.trim()));return w.length===0?e.Type.Never():w.length===1?w[0]:e.Type.Union(w)})()}function*I(E){if(E[1]!=="{"){let y=e.Type.Literal("$"),w=C(E.slice(1));return yield*[y,...w]}for(let y=2;y<E.length;y++)if(E[y]==="}"){let w=_(E.slice(2,y)),T=C(E.slice(y+1));return yield*[...w,...T]}yield e.Type.Literal(E)}function*C(E){for(let y=0;y<E.length;y++)if(E[y]==="$"){let w=e.Type.Literal(E.slice(0,y)),T=I(E.slice(y));return yield*[w,...T]}yield e.Type.Literal(E)}function R(E){return[...C(E)]}l.Parse=R})(Y||(e.TemplateLiteralDslParser=Y={}));var ie=class{constructor(l){this.schema=l}Decode(l){return new X(this.schema,l)}};e.TransformDecodeBuilder=ie;var X=class{constructor(l,_){this.schema=l,this.decode=_}Encode(l){let _=m.Type(this.schema);return o.TTransform(_)?(()=>{let R={Encode:E=>_[e.Transform].Encode(l(E)),Decode:E=>this.decode(_[e.Transform].Decode(E))};return{..._,[e.Transform]:R}})():(()=>{let I={Decode:this.decode,Encode:l};return{..._,[e.Transform]:I}})()}};e.TransformEncodeBuilder=X;var se=0,j=class extends n{};e.TypeBuilderError=j;var G=class{Create(l){return l}Throw(l){throw new j(l)}Discard(l,_){return _.reduce((I,C)=>{let{[C]:R,...E}=I;return E},l)}Strict(l){return JSON.parse(JSON.stringify(l))}};e.TypeBuilder=G;var J=class extends G{ReadonlyOptional(l){return this.Readonly(this.Optional(l))}Readonly(l){return{...m.Type(l),[e.Readonly]:"Readonly"}}Optional(l){return{...m.Type(l),[e.Optional]:"Optional"}}Any(l={}){return this.Create({...l,[e.Kind]:"Any"})}Array(l,_={}){return this.Create({..._,[e.Kind]:"Array",type:"array",items:m.Type(l)})}Boolean(l={}){return this.Create({...l,[e.Kind]:"Boolean",type:"boolean"})}Capitalize(l,_={}){return{...S.Map(m.Type(l),"Capitalize"),..._}}Composite(l,_){let I=e.Type.Intersect(l,{}),R=H.ResolveKeys(I,{includePatterns:!1}).reduce((E,y)=>({...E,[y]:e.Type.Index(I,[y])}),{});return e.Type.Object(R,_)}Enum(l,_={}){if(i.IsUndefined(l))return this.Throw("Enum undefined or empty");let I=Object.getOwnPropertyNames(l).filter(E=>isNaN(E)).map(E=>l[E]),R=[...new Set(I)].map(E=>e.Type.Literal(E));return this.Union(R,{..._,[e.Hint]:"Enum"})}Extends(l,_,I,C,R={}){switch(h.Extends(l,_)){case c.Union:return this.Union([m.Type(I,R),m.Type(C,R)]);case c.True:return m.Type(I,R);case c.False:return m.Type(C,R)}}Exclude(l,_,I={}){return o.TTemplateLiteral(l)?this.Exclude(F.Resolve(l),_,I):o.TTemplateLiteral(_)?this.Exclude(l,F.Resolve(_),I):o.TUnion(l)?(()=>{let C=l.anyOf.filter(R=>h.Extends(R,_)===c.False);return C.length===1?m.Type(C[0],I):this.Union(C,I)})():h.Extends(l,_)!==c.False?this.Never(I):m.Type(l,I)}Extract(l,_,I={}){return o.TTemplateLiteral(l)?this.Extract(F.Resolve(l),_,I):o.TTemplateLiteral(_)?this.Extract(l,F.Resolve(_),I):o.TUnion(l)?(()=>{let C=l.anyOf.filter(R=>h.Extends(R,_)!==c.False);return C.length===1?m.Type(C[0],I):this.Union(C,I)})():h.Extends(l,_)!==c.False?m.Type(l,I):this.Never(I)}Index(l,_,I={}){return o.TArray(l)&&o.TNumber(_)?m.Type(l.items,I):o.TTuple(l)&&o.TNumber(_)?(()=>{let R=(i.IsUndefined(l.items)?[]:l.items).map(E=>m.Type(E));return this.Union(R,I)})():(()=>{let C=K.Resolve(_),R=m.Type(l);return M.Resolve(R,C,I)})()}Integer(l={}){return this.Create({...l,[e.Kind]:"Integer",type:"integer"})}Intersect(l,_={}){if(l.length===0)return e.Type.Never();if(l.length===1)return m.Type(l[0],_);l.some(E=>o.TTransform(E))&&this.Throw("Cannot intersect transform types");let I=l.every(E=>o.TObject(E)),C=m.Rest(l),R=o.TSchema(_.unevaluatedProperties)?{unevaluatedProperties:m.Type(_.unevaluatedProperties)}:{};return _.unevaluatedProperties===!1||o.TSchema(_.unevaluatedProperties)||I?this.Create({..._,...R,[e.Kind]:"Intersect",type:"object",allOf:C}):this.Create({..._,...R,[e.Kind]:"Intersect",allOf:C})}KeyOf(l,_={}){return o.TRecord(l)?(()=>{let I=Object.getOwnPropertyNames(l.patternProperties)[0];return I===e.PatternNumberExact?this.Number(_):I===e.PatternStringExact?this.String(_):this.Throw("Unable to resolve key type from Record key pattern")})():o.TTuple(l)?(()=>{let C=(i.IsUndefined(l.items)?[]:l.items).map((R,E)=>e.Type.Literal(E.toString()));return this.Union(C,_)})():o.TArray(l)?this.Number(_):(()=>{let I=H.ResolveKeys(l,{includePatterns:!1});if(I.length===0)return this.Never(_);let C=I.map(R=>this.Literal(R));return this.Union(C,_)})()}Literal(l,_={}){return this.Create({..._,[e.Kind]:"Literal",const:l,type:typeof l})}Lowercase(l,_={}){return{...S.Map(m.Type(l),"Lowercase"),..._}}Never(l={}){return this.Create({...l,[e.Kind]:"Never",not:{}})}Not(l,_){return this.Create({..._,[e.Kind]:"Not",not:m.Type(l)})}Null(l={}){return this.Create({...l,[e.Kind]:"Null",type:"null"})}Number(l={}){return this.Create({...l,[e.Kind]:"Number",type:"number"})}Object(l,_={}){let I=Object.getOwnPropertyNames(l),C=I.filter(w=>o.TOptional(l[w])),R=I.filter(w=>!C.includes(w)),E=o.TSchema(_.additionalProperties)?{additionalProperties:m.Type(_.additionalProperties)}:{},y=I.reduce((w,T)=>({...w,[T]:m.Type(l[T])}),{});return R.length>0?this.Create({..._,...E,[e.Kind]:"Object",type:"object",properties:y,required:R}):this.Create({..._,...E,[e.Kind]:"Object",type:"object",properties:y})}Omit(l,_,I={}){let C=K.Resolve(_);return B.Map(this.Discard(m.Type(l),["$id",e.Transform]),R=>{i.IsArray(R.required)&&(R.required=R.required.filter(E=>!C.includes(E)),R.required.length===0&&delete R.required);for(let E of Object.getOwnPropertyNames(R.properties))C.includes(E)&&delete R.properties[E];return this.Create(R)},I)}Partial(l,_={}){return B.Map(this.Discard(m.Type(l),["$id",e.Transform]),I=>{let C=Object.getOwnPropertyNames(I.properties).reduce((R,E)=>({...R,[E]:this.Optional(I.properties[E])}),{});return this.Object(C,this.Discard(I,["required"]))},_)}Pick(l,_,I={}){let C=K.Resolve(_);return B.Map(this.Discard(m.Type(l),["$id",e.Transform]),R=>{i.IsArray(R.required)&&(R.required=R.required.filter(E=>C.includes(E)),R.required.length===0&&delete R.required);for(let E of Object.getOwnPropertyNames(R.properties))C.includes(E)||delete R.properties[E];return this.Create(R)},I)}Record(l,_,I={}){return o.TTemplateLiteral(l)?(()=>{let C=z.ParseExact(l.pattern);return N.Check(C)?this.Object([...L.Generate(C)].reduce((R,E)=>({...R,[E]:m.Type(_)}),{}),I):this.Create({...I,[e.Kind]:"Record",type:"object",patternProperties:{[l.pattern]:m.Type(_)}})})():o.TUnion(l)?(()=>{let C=D.Resolve(l);if(o.TUnionLiteral(C)){let R=C.anyOf.reduce((E,y)=>({...E,[y.const]:m.Type(_)}),{});return this.Object(R,{...I,[e.Hint]:"Record"})}else this.Throw("Record key of type union contains non-literal types")})():o.TLiteral(l)?i.IsString(l.const)||i.IsNumber(l.const)?this.Object({[l.const]:m.Type(_)},I):this.Throw("Record key of type literal is not of type string or number"):o.TInteger(l)||o.TNumber(l)?this.Create({...I,[e.Kind]:"Record",type:"object",patternProperties:{[e.PatternNumberExact]:m.Type(_)}}):o.TString(l)?(()=>{let C=i.IsUndefined(l.pattern)?e.PatternStringExact:l.pattern;return this.Create({...I,[e.Kind]:"Record",type:"object",patternProperties:{[C]:m.Type(_)}})})():this.Never()}Recursive(l,_={}){i.IsUndefined(_.$id)&&(_.$id=`T${se++}`);let I=l({[e.Kind]:"This",$ref:`${_.$id}`});return I.$id=_.$id,this.Create({..._,[e.Hint]:"Recursive",...I})}Ref(l,_={}){return i.IsString(l)?this.Create({..._,[e.Kind]:"Ref",$ref:l}):(i.IsUndefined(l.$id)&&this.Throw("Reference target type must specify an $id"),this.Create({..._,[e.Kind]:"Ref",$ref:l.$id}))}Required(l,_={}){return B.Map(this.Discard(m.Type(l),["$id",e.Transform]),I=>{let C=Object.getOwnPropertyNames(I.properties).reduce((R,E)=>({...R,[E]:this.Discard(I.properties[E],[e.Optional])}),{});return this.Object(C,I)},_)}Rest(l){return o.TTuple(l)&&!i.IsUndefined(l.items)?m.Rest(l.items):o.TIntersect(l)?m.Rest(l.allOf):o.TUnion(l)?m.Rest(l.anyOf):[]}String(l={}){return this.Create({...l,[e.Kind]:"String",type:"string"})}TemplateLiteral(l,_={}){let I=i.IsString(l)?q.Create(Y.Parse(l)):q.Create(l);return this.Create({..._,[e.Kind]:"TemplateLiteral",type:"string",pattern:I})}Transform(l){return new ie(l)}Tuple(l,_={}){let[I,C,R]=[!1,l.length,l.length],E=m.Rest(l),y=l.length>0?{..._,[e.Kind]:"Tuple",type:"array",items:E,additionalItems:I,minItems:C,maxItems:R}:{..._,[e.Kind]:"Tuple",type:"array",minItems:C,maxItems:R};return this.Create(y)}Uncapitalize(l,_={}){return{...S.Map(m.Type(l),"Uncapitalize"),..._}}Union(l,_={}){return o.TTemplateLiteral(l)?F.Resolve(l):(()=>{let I=l;if(I.length===0)return this.Never(_);if(I.length===1)return this.Create(m.Type(I[0],_));let C=m.Rest(I);return this.Create({..._,[e.Kind]:"Union",anyOf:C})})()}Unknown(l={}){return this.Create({...l,[e.Kind]:"Unknown"})}Unsafe(l={}){return this.Create({...l,[e.Kind]:l[e.Kind]||"Unsafe"})}Uppercase(l,_={}){return{...S.Map(m.Type(l),"Uppercase"),..._}}};e.JsonTypeBuilder=J;var le=class extends J{AsyncIterator(l,_={}){return this.Create({..._,[e.Kind]:"AsyncIterator",type:"AsyncIterator",items:m.Type(l)})}Awaited(l,_={}){let I=C=>C.length>0?(()=>{let[R,...E]=C;return[this.Awaited(R),...I(E)]})():C;return o.TIntersect(l)?e.Type.Intersect(I(l.allOf)):o.TUnion(l)?e.Type.Union(I(l.anyOf)):o.TPromise(l)?this.Awaited(l.item):m.Type(l,_)}BigInt(l={}){return this.Create({...l,[e.Kind]:"BigInt",type:"bigint"})}ConstructorParameters(l,_={}){return this.Tuple([...l.parameters],{..._})}Constructor(l,_,I){let[C,R]=[m.Rest(l),m.Type(_)];return this.Create({...I,[e.Kind]:"Constructor",type:"Constructor",parameters:C,returns:R})}Date(l={}){return this.Create({...l,[e.Kind]:"Date",type:"Date"})}Function(l,_,I){let[C,R]=[m.Rest(l),m.Type(_)];return this.Create({...I,[e.Kind]:"Function",type:"Function",parameters:C,returns:R})}InstanceType(l,_={}){return m.Type(l.returns,_)}Iterator(l,_={}){return this.Create({..._,[e.Kind]:"Iterator",type:"Iterator",items:m.Type(l)})}Parameters(l,_={}){return this.Tuple(l.parameters,{..._})}Promise(l,_={}){return this.Create({..._,[e.Kind]:"Promise",type:"Promise",item:m.Type(l)})}RegExp(l,_={}){let I=i.IsString(l)?l:l.source;return this.Create({..._,[e.Kind]:"String",type:"string",pattern:I})}RegEx(l,_={}){return this.RegExp(l,_)}ReturnType(l,_={}){return m.Type(l.returns,_)}Symbol(l){return this.Create({...l,[e.Kind]:"Symbol",type:"symbol"})}Undefined(l={}){return this.Create({...l,[e.Kind]:"Undefined",type:"undefined"})}Uint8Array(l={}){return this.Create({...l,[e.Kind]:"Uint8Array",type:"Uint8Array"})}Void(l={}){return this.Create({...l,[e.Kind]:"Void",type:"void"})}};e.JavaScriptTypeBuilder=le,e.JsonType=new J,e.Type=new le}}),Fn=Ht(Ft(),1),{String:Ld,Optional:Bd,Boolean:Dd,Object:Fd,Number:kd}=Fn.Type,Kd=Ld.bind(Fn.Type),Gd=kd.bind(Fn.Type),wO=Fd.bind(Fn.Type),OO=Bd.bind(Fn.Type),Vd=Dd.bind(Fn.Type),AO=Kd(),IO=Gd(),EO=Vd();function Ba(e){return Array.isArray(e)?e:[e]}var zd=De({"../../../node_modules/.pnpm/browser-or-node@2.1.1/node_modules/browser-or-node/lib/index.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},n=typeof window<"u"&&typeof window.document<"u",r=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,i=(typeof self>"u"?"undefined":t(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",s=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),o=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";e.isBrowser=n,e.isWebWorker=i,e.isNode=r,e.isJsDom=s,e.isDeno=o}}),qd=De({"../../../node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js"(e,t){"use strict";t.exports=function(n,r){r||(r={}),typeof r=="function"&&(r={cmp:r});var i=typeof r.cycles=="boolean"?r.cycles:!1,s=r.cmp&&(function(u){return function(f){return function(c,h){var m={key:c,value:f[c]},M={key:h,value:f[h]};return u(m,M)}}})(r.cmp),o=[];return(function u(f){if(f&&f.toJSON&&typeof f.toJSON=="function"&&(f=f.toJSON()),f!==void 0){if(typeof f=="number")return isFinite(f)?""+f:"null";if(typeof f!="object")return JSON.stringify(f);var c,h;if(Array.isArray(f)){for(h="[",c=0;c<f.length;c++)c&&(h+=","),h+=u(f[c])||"null";return h+"]"}if(f===null)return"null";if(o.indexOf(f)!==-1){if(i)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var m=o.push(f)-1,M=Object.keys(f).sort(s&&s(f));for(h="",c=0;c<M.length;c++){var S=M[c],B=u(f[S]);B&&(h&&(h+=","),h+=JSON.stringify(S)+":"+B)}return o.splice(m,1),"{"+h+"}"}})(n)}}}),Wd=De({"../../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"(e,t){"use strict";var{hasOwnProperty:n}=Object.prototype,r=K();r.configure=K,r.stringify=r,r.default=r,e.stringify=r,e.configure=K,t.exports=r;var i=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function s(D){return D.length<5e3&&!i.test(D)?`"${D}"`:JSON.stringify(D)}function o(D,V){if(D.length>200||V)return D.sort(V);for(let q=1;q<D.length;q++){let F=D[q],ee=q;for(;ee!==0&&D[ee-1]>F;)D[ee]=D[ee-1],ee--;D[ee]=F}return D}var u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function f(D){return u.call(D)!==void 0&&D.length!==0}function c(D,V,q){D.length<q&&(q=D.length);let F=V===","?"":" ",ee=`"0":${F}${D[0]}`;for(let z=1;z<q;z++)ee+=`${V}"${z}":${F}${D[z]}`;return ee}function h(D){if(n.call(D,"circularValue")){let V=D.circularValue;if(typeof V=="string")return`"${V}"`;if(V==null)return V;if(V===Error||V===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function m(D){let V;if(n.call(D,"deterministic")&&(V=D.deterministic,typeof V!="boolean"&&typeof V!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return V===void 0?!0:V}function M(D,V){let q;if(n.call(D,V)&&(q=D[V],typeof q!="boolean"))throw new TypeError(`The "${V}" argument must be of type boolean`);return q===void 0?!0:q}function S(D,V){let q;if(n.call(D,V)){if(q=D[V],typeof q!="number")throw new TypeError(`The "${V}" argument must be of type number`);if(!Number.isInteger(q))throw new TypeError(`The "${V}" argument must be an integer`);if(q<1)throw new RangeError(`The "${V}" argument must be >= 1`)}return q===void 0?1/0:q}function B(D){return D===1?"1 item":`${D} items`}function H(D){let V=new Set;for(let q of D)(typeof q=="string"||typeof q=="number")&&V.add(String(q));return V}function Q(D){if(n.call(D,"strict")){let V=D.strict;if(typeof V!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(V)return q=>{let F=`Object can not safely be stringified. Received type ${typeof q}`;throw typeof q!="function"&&(F+=` (${q.toString()})`),new Error(F)}}}function K(D){D={...D};let V=Q(D);V&&(D.bigint===void 0&&(D.bigint=!1),"circularValue"in D||(D.circularValue=Error));let q=h(D),F=M(D,"bigint"),ee=m(D),z=typeof ee=="function"?ee:void 0,fe=S(D,"maximumDepth"),N=S(D,"maximumBreadth");function x(se,j,G,J,le,l){let _=j[se];switch(typeof _=="object"&&_!==null&&typeof _.toJSON=="function"&&(_=_.toJSON(se)),_=J.call(j,se,_),typeof _){case"string":return s(_);case"object":{if(_===null)return"null";if(G.indexOf(_)!==-1)return q;let I="",C=",",R=l;if(Array.isArray(_)){if(_.length===0)return"[]";if(fe<G.length+1)return'"[Array]"';G.push(_),le!==""&&(l+=le,I+=`
31
+ ${l}`,C=`,
32
+ ${l}`);let O=Math.min(_.length,N),v=0;for(;v<O-1;v++){let P=x(String(v),_,G,J,le,l);I+=P!==void 0?P:"null",I+=C}let b=x(String(v),_,G,J,le,l);if(I+=b!==void 0?b:"null",_.length-1>N){let P=_.length-N-1;I+=`${C}"... ${B(P)} not stringified"`}return le!==""&&(I+=`
33
+ ${R}`),G.pop(),`[${I}]`}let E=Object.keys(_),y=E.length;if(y===0)return"{}";if(fe<G.length+1)return'"[Object]"';let w="",T="";le!==""&&(l+=le,C=`,
34
+ ${l}`,w=" ");let a=Math.min(y,N);ee&&!f(_)&&(E=o(E,z)),G.push(_);for(let O=0;O<a;O++){let v=E[O],b=x(v,_,G,J,le,l);b!==void 0&&(I+=`${T}${s(v)}:${w}${b}`,T=C)}if(y>N){let O=y-N;I+=`${T}"...":${w}"${B(O)} not stringified"`,T=C}return le!==""&&T.length>1&&(I=`
35
+ ${l}${I}
36
+ ${R}`),G.pop(),`{${I}}`}case"number":return isFinite(_)?String(_):V?V(_):"null";case"boolean":return _===!0?"true":"false";case"undefined":return;case"bigint":if(F)return String(_);default:return V?V(_):void 0}}function L(se,j,G,J,le,l){switch(typeof j=="object"&&j!==null&&typeof j.toJSON=="function"&&(j=j.toJSON(se)),typeof j){case"string":return s(j);case"object":{if(j===null)return"null";if(G.indexOf(j)!==-1)return q;let _=l,I="",C=",";if(Array.isArray(j)){if(j.length===0)return"[]";if(fe<G.length+1)return'"[Array]"';G.push(j),le!==""&&(l+=le,I+=`
37
+ ${l}`,C=`,
38
+ ${l}`);let y=Math.min(j.length,N),w=0;for(;w<y-1;w++){let a=L(String(w),j[w],G,J,le,l);I+=a!==void 0?a:"null",I+=C}let T=L(String(w),j[w],G,J,le,l);if(I+=T!==void 0?T:"null",j.length-1>N){let a=j.length-N-1;I+=`${C}"... ${B(a)} not stringified"`}return le!==""&&(I+=`
39
+ ${_}`),G.pop(),`[${I}]`}G.push(j);let R="";le!==""&&(l+=le,C=`,
40
+ ${l}`,R=" ");let E="";for(let y of J){let w=L(y,j[y],G,J,le,l);w!==void 0&&(I+=`${E}${s(y)}:${R}${w}`,E=C)}return le!==""&&E.length>1&&(I=`
41
+ ${l}${I}
42
+ ${_}`),G.pop(),`{${I}}`}case"number":return isFinite(j)?String(j):V?V(j):"null";case"boolean":return j===!0?"true":"false";case"undefined":return;case"bigint":if(F)return String(j);default:return V?V(j):void 0}}function Y(se,j,G,J,le){switch(typeof j){case"string":return s(j);case"object":{if(j===null)return"null";if(typeof j.toJSON=="function"){if(j=j.toJSON(se),typeof j!="object")return Y(se,j,G,J,le);if(j===null)return"null"}if(G.indexOf(j)!==-1)return q;let l=le;if(Array.isArray(j)){if(j.length===0)return"[]";if(fe<G.length+1)return'"[Array]"';G.push(j),le+=J;let w=`
43
+ ${le}`,T=`,
44
+ ${le}`,a=Math.min(j.length,N),O=0;for(;O<a-1;O++){let b=Y(String(O),j[O],G,J,le);w+=b!==void 0?b:"null",w+=T}let v=Y(String(O),j[O],G,J,le);if(w+=v!==void 0?v:"null",j.length-1>N){let b=j.length-N-1;w+=`${T}"... ${B(b)} not stringified"`}return w+=`
45
+ ${l}`,G.pop(),`[${w}]`}let _=Object.keys(j),I=_.length;if(I===0)return"{}";if(fe<G.length+1)return'"[Object]"';le+=J;let C=`,
46
+ ${le}`,R="",E="",y=Math.min(I,N);f(j)&&(R+=c(j,C,N),_=_.slice(j.length),y-=j.length,E=C),ee&&(_=o(_,z)),G.push(j);for(let w=0;w<y;w++){let T=_[w],a=Y(T,j[T],G,J,le);a!==void 0&&(R+=`${E}${s(T)}: ${a}`,E=C)}if(I>N){let w=I-N;R+=`${E}"...": "${B(w)} not stringified"`,E=C}return E!==""&&(R=`
47
+ ${le}${R}
48
+ ${l}`),G.pop(),`{${R}}`}case"number":return isFinite(j)?String(j):V?V(j):"null";case"boolean":return j===!0?"true":"false";case"undefined":return;case"bigint":if(F)return String(j);default:return V?V(j):void 0}}function ie(se,j,G){switch(typeof j){case"string":return s(j);case"object":{if(j===null)return"null";if(typeof j.toJSON=="function"){if(j=j.toJSON(se),typeof j!="object")return ie(se,j,G);if(j===null)return"null"}if(G.indexOf(j)!==-1)return q;let J="",le=j.length!==void 0;if(le&&Array.isArray(j)){if(j.length===0)return"[]";if(fe<G.length+1)return'"[Array]"';G.push(j);let R=Math.min(j.length,N),E=0;for(;E<R-1;E++){let w=ie(String(E),j[E],G);J+=w!==void 0?w:"null",J+=","}let y=ie(String(E),j[E],G);if(J+=y!==void 0?y:"null",j.length-1>N){let w=j.length-N-1;J+=`,"... ${B(w)} not stringified"`}return G.pop(),`[${J}]`}let l=Object.keys(j),_=l.length;if(_===0)return"{}";if(fe<G.length+1)return'"[Object]"';let I="",C=Math.min(_,N);le&&f(j)&&(J+=c(j,",",N),l=l.slice(j.length),C-=j.length,I=","),ee&&(l=o(l,z)),G.push(j);for(let R=0;R<C;R++){let E=l[R],y=ie(E,j[E],G);y!==void 0&&(J+=`${I}${s(E)}:${y}`,I=",")}if(_>N){let R=_-N;J+=`${I}"...":"${B(R)} not stringified"`}return G.pop(),`{${J}}`}case"number":return isFinite(j)?String(j):V?V(j):"null";case"boolean":return j===!0?"true":"false";case"undefined":return;case"bigint":if(F)return String(j);default:return V?V(j):void 0}}function X(se,j,G){if(arguments.length>1){let J="";if(typeof G=="number"?J=" ".repeat(Math.min(G,10)):typeof G=="string"&&(J=G.slice(0,10)),j!=null){if(typeof j=="function")return x("",{"":se},[],j,J,"");if(Array.isArray(j))return L("",se,[],H(j),J,"")}if(J.length!==0)return Y("",se,[],J,"")}return ie("",se,[])}return X}}}),Vn=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/value/guard.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IsValueType=e.IsSymbol=e.IsFunction=e.IsString=e.IsBigInt=e.IsInteger=e.IsNumber=e.IsBoolean=e.IsNull=e.IsUndefined=e.IsArray=e.IsObject=e.IsPlainObject=e.HasPropertyKey=e.IsDate=e.IsUint8Array=e.IsPromise=e.IsTypedArray=e.IsIterator=e.IsAsyncIterator=void 0;function t(F){return c(F)&&Symbol.asyncIterator in F}e.IsAsyncIterator=t;function n(F){return c(F)&&Symbol.iterator in F}e.IsIterator=n;function r(F){return ArrayBuffer.isView(F)}e.IsTypedArray=r;function i(F){return F instanceof Promise}e.IsPromise=i;function s(F){return F instanceof Uint8Array}e.IsUint8Array=s;function o(F){return F instanceof Date&&Number.isFinite(F.getTime())}e.IsDate=o;function u(F,ee){return ee in F}e.HasPropertyKey=u;function f(F){return c(F)&&D(F.constructor)&&F.constructor.name==="Object"}e.IsPlainObject=f;function c(F){return F!==null&&typeof F=="object"}e.IsObject=c;function h(F){return Array.isArray(F)&&!ArrayBuffer.isView(F)}e.IsArray=h;function m(F){return F===void 0}e.IsUndefined=m;function M(F){return F===null}e.IsNull=M;function S(F){return typeof F=="boolean"}e.IsBoolean=S;function B(F){return typeof F=="number"}e.IsNumber=B;function H(F){return B(F)&&Number.isInteger(F)}e.IsInteger=H;function Q(F){return typeof F=="bigint"}e.IsBigInt=Q;function K(F){return typeof F=="string"}e.IsString=K;function D(F){return typeof F=="function"}e.IsFunction=D;function V(F){return typeof F=="symbol"}e.IsSymbol=V;function q(F){return Q(F)||S(F)||M(F)||B(F)||K(F)||V(F)||m(F)}e.IsValueType=q}}),Ju=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/system/system.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultErrorFunction=e.TypeSystemPolicy=e.TypeSystemErrorFunction=e.TypeSystem=e.TypeSystemDuplicateFormat=e.TypeSystemDuplicateTypeKind=void 0;var t=Vn(),n=Ni(),r=Ft(),i=class extends r.TypeBoxError{constructor(h){super(`Duplicate type kind '${h}' detected`)}};e.TypeSystemDuplicateTypeKind=i;var s=class extends r.TypeBoxError{constructor(h){super(`Duplicate string format '${h}' detected`)}};e.TypeSystemDuplicateFormat=s;var o;(function(h){function m(S,B){if(r.TypeRegistry.Has(S))throw new i(S);return r.TypeRegistry.Set(S,B),(H={})=>r.Type.Unsafe({...H,[r.Kind]:S})}h.Type=m;function M(S,B){if(r.FormatRegistry.Has(S))throw new s(S);return r.FormatRegistry.Set(S,B),S}h.Format=M})(o||(e.TypeSystem=o={}));var u;(function(h){let m=c;function M(){m=c}h.Reset=M;function S(H){m=H}h.Set=S;function B(){return m}h.Get=B})(u||(e.TypeSystemErrorFunction=u={}));var f;(function(h){h.ExactOptionalPropertyTypes=!1,h.AllowArrayObject=!1,h.AllowNaN=!1,h.AllowNullVoid=!1;function m(Q,K){return h.ExactOptionalPropertyTypes?K in Q:Q[K]!==void 0}h.IsExactOptionalProperty=m;function M(Q){let K=(0,t.IsObject)(Q);return h.AllowArrayObject?K:K&&!(0,t.IsArray)(Q)}h.IsObjectLike=M;function S(Q){return M(Q)&&!(Q instanceof Date)&&!(Q instanceof Uint8Array)}h.IsRecordLike=S;function B(Q){let K=(0,t.IsNumber)(Q);return h.AllowNaN?K:K&&Number.isFinite(Q)}h.IsNumberLike=B;function H(Q){let K=(0,t.IsUndefined)(Q);return h.AllowNullVoid?K||Q===null:K}h.IsVoidLike=H})(f||(e.TypeSystemPolicy=f={}));function c(h,m){switch(m){case n.ValueErrorType.ArrayContains:return"Expected array to contain at least one matching value";case n.ValueErrorType.ArrayMaxContains:return`Expected array to contain no more than ${h.maxContains} matching values`;case n.ValueErrorType.ArrayMinContains:return`Expected array to contain at least ${h.minContains} matching values`;case n.ValueErrorType.ArrayMaxItems:return`Expected array length to be less or equal to ${h.maxItems}`;case n.ValueErrorType.ArrayMinItems:return`Expected array length to be greater or equal to ${h.minItems}`;case n.ValueErrorType.ArrayUniqueItems:return"Expected array elements to be unique";case n.ValueErrorType.Array:return"Expected array";case n.ValueErrorType.AsyncIterator:return"Expected AsyncIterator";case n.ValueErrorType.BigIntExclusiveMaximum:return`Expected bigint to be less than ${h.exclusiveMaximum}`;case n.ValueErrorType.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${h.exclusiveMinimum}`;case n.ValueErrorType.BigIntMaximum:return`Expected bigint to be less or equal to ${h.maximum}`;case n.ValueErrorType.BigIntMinimum:return`Expected bigint to be greater or equal to ${h.minimum}`;case n.ValueErrorType.BigIntMultipleOf:return`Expected bigint to be a multiple of ${h.multipleOf}`;case n.ValueErrorType.BigInt:return"Expected bigint";case n.ValueErrorType.Boolean:return"Expected boolean";case n.ValueErrorType.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${h.exclusiveMinimumTimestamp}`;case n.ValueErrorType.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${h.exclusiveMaximumTimestamp}`;case n.ValueErrorType.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${h.minimumTimestamp}`;case n.ValueErrorType.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${h.maximumTimestamp}`;case n.ValueErrorType.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${h.multipleOfTimestamp}`;case n.ValueErrorType.Date:return"Expected Date";case n.ValueErrorType.Function:return"Expected function";case n.ValueErrorType.IntegerExclusiveMaximum:return`Expected integer to be less than ${h.exclusiveMaximum}`;case n.ValueErrorType.IntegerExclusiveMinimum:return`Expected integer to be greater than ${h.exclusiveMinimum}`;case n.ValueErrorType.IntegerMaximum:return`Expected integer to be less or equal to ${h.maximum}`;case n.ValueErrorType.IntegerMinimum:return`Expected integer to be greater or equal to ${h.minimum}`;case n.ValueErrorType.IntegerMultipleOf:return`Expected integer to be a multiple of ${h.multipleOf}`;case n.ValueErrorType.Integer:return"Expected integer";case n.ValueErrorType.IntersectUnevaluatedProperties:return"Unexpected property";case n.ValueErrorType.Intersect:return"Expected all values to match";case n.ValueErrorType.Iterator:return"Expected Iterator";case n.ValueErrorType.Literal:return`Expected ${typeof h.const=="string"?`'${h.const}'`:h.const}`;case n.ValueErrorType.Never:return"Never";case n.ValueErrorType.Not:return"Value should not match";case n.ValueErrorType.Null:return"Expected null";case n.ValueErrorType.NumberExclusiveMaximum:return`Expected number to be less than ${h.exclusiveMaximum}`;case n.ValueErrorType.NumberExclusiveMinimum:return`Expected number to be greater than ${h.exclusiveMinimum}`;case n.ValueErrorType.NumberMaximum:return`Expected number to be less or equal to ${h.maximum}`;case n.ValueErrorType.NumberMinimum:return`Expected number to be greater or equal to ${h.minimum}`;case n.ValueErrorType.NumberMultipleOf:return`Expected number to be a multiple of ${h.multipleOf}`;case n.ValueErrorType.Number:return"Expected number";case n.ValueErrorType.Object:return"Expected object";case n.ValueErrorType.ObjectAdditionalProperties:return"Unexpected property";case n.ValueErrorType.ObjectMaxProperties:return`Expected object to have no more than ${h.maxProperties} properties`;case n.ValueErrorType.ObjectMinProperties:return`Expected object to have at least ${h.minProperties} properties`;case n.ValueErrorType.ObjectRequiredProperty:return"Required property";case n.ValueErrorType.Promise:return"Expected Promise";case n.ValueErrorType.StringFormatUnknown:return`Unknown format '${h.format}'`;case n.ValueErrorType.StringFormat:return`Expected string to match '${h.format}' format`;case n.ValueErrorType.StringMaxLength:return`Expected string length less or equal to ${h.maxLength}`;case n.ValueErrorType.StringMinLength:return`Expected string length greater or equal to ${h.minLength}`;case n.ValueErrorType.StringPattern:return`Expected string to match '${h.pattern}'`;case n.ValueErrorType.String:return"Expected string";case n.ValueErrorType.Symbol:return"Expected symbol";case n.ValueErrorType.TupleLength:return`Expected tuple to have ${h.maxItems||0} elements`;case n.ValueErrorType.Tuple:return"Expected tuple";case n.ValueErrorType.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${h.maxByteLength}`;case n.ValueErrorType.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${h.minByteLength}`;case n.ValueErrorType.Uint8Array:return"Expected Uint8Array";case n.ValueErrorType.Undefined:return"Expected undefined";case n.ValueErrorType.Union:return"Expected union value";case n.ValueErrorType.Void:return"Expected void";case n.ValueErrorType.Kind:return`Expected kind '${h[r.Kind]}'`;default:return"Unknown error type"}}e.DefaultErrorFunction=c}}),Ri=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/value/deref.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Deref=e.TypeDereferenceError=void 0;var t=Ft(),n=class extends t.TypeBoxError{constructor(i){super(`Unable to dereference schema with $id '${i.$id}'`),this.schema=i}};e.TypeDereferenceError=n;function r(i,s){let o=s.findIndex(u=>u.$id===i.$ref);if(o===-1)throw new n(i);return s[o]}e.Deref=r}}),Wo=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/value/hash.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Hash=e.ByteMarker=e.ValueHashError=void 0;var t=Vn(),n=class extends Error{constructor(x){super("Unable to hash value"),this.value=x}};e.ValueHashError=n;var r;(function(x){x[x.Undefined=0]="Undefined",x[x.Null=1]="Null",x[x.Boolean=2]="Boolean",x[x.Number=3]="Number",x[x.String=4]="String",x[x.Object=5]="Object",x[x.Array=6]="Array",x[x.Date=7]="Date",x[x.Uint8Array=8]="Uint8Array",x[x.Symbol=9]="Symbol",x[x.BigInt=10]="BigInt"})(r||(e.ByteMarker=r={}));var i=BigInt("14695981039346656037"),[s,o]=[BigInt("1099511628211"),BigInt("2")**BigInt("64")],u=Array.from({length:256}).map((x,L)=>BigInt(L)),f=new Float64Array(1),c=new DataView(f.buffer),h=new Uint8Array(f.buffer);function*m(x){let L=x===0?1:Math.ceil(Math.floor(Math.log2(x)+1)/8);for(let Y=0;Y<L;Y++)yield x>>8*(L-1-Y)&255}function M(x){fe(r.Array);for(let L of x)z(L)}function S(x){fe(r.Boolean),fe(x?1:0)}function B(x){fe(r.BigInt),c.setBigInt64(0,x);for(let L of h)fe(L)}function H(x){fe(r.Date),z(x.getTime())}function Q(x){fe(r.Null)}function K(x){fe(r.Number),c.setFloat64(0,x);for(let L of h)fe(L)}function D(x){fe(r.Object);for(let L of globalThis.Object.keys(x).sort())z(L),z(x[L])}function V(x){fe(r.String);for(let L=0;L<x.length;L++)for(let Y of m(x.charCodeAt(L)))fe(Y)}function q(x){fe(r.Symbol),z(x.description)}function F(x){fe(r.Uint8Array);for(let L=0;L<x.length;L++)fe(x[L])}function ee(x){return fe(r.Undefined)}function z(x){if((0,t.IsArray)(x))return M(x);if((0,t.IsBoolean)(x))return S(x);if((0,t.IsBigInt)(x))return B(x);if((0,t.IsDate)(x))return H(x);if((0,t.IsNull)(x))return Q(x);if((0,t.IsNumber)(x))return K(x);if((0,t.IsPlainObject)(x))return D(x);if((0,t.IsString)(x))return V(x);if((0,t.IsSymbol)(x))return q(x);if((0,t.IsUint8Array)(x))return F(x);if((0,t.IsUndefined)(x))return ee(x);throw new n(x)}function fe(x){i=i^u[x],i=i*s%o}function N(x){return i=BigInt("14695981039346656037"),z(x),i}e.Hash=N}}),Ni=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/errors/errors.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Errors=e.ValueErrorIterator=e.EscapeKey=e.ValueErrorsUnknownTypeError=e.ValueErrorType=void 0;var t=Vn(),n=Ju(),r=Ri(),i=Wo(),s=Ft(),o;(function(a){a[a.ArrayContains=0]="ArrayContains",a[a.ArrayMaxContains=1]="ArrayMaxContains",a[a.ArrayMaxItems=2]="ArrayMaxItems",a[a.ArrayMinContains=3]="ArrayMinContains",a[a.ArrayMinItems=4]="ArrayMinItems",a[a.ArrayUniqueItems=5]="ArrayUniqueItems",a[a.Array=6]="Array",a[a.AsyncIterator=7]="AsyncIterator",a[a.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",a[a.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",a[a.BigIntMaximum=10]="BigIntMaximum",a[a.BigIntMinimum=11]="BigIntMinimum",a[a.BigIntMultipleOf=12]="BigIntMultipleOf",a[a.BigInt=13]="BigInt",a[a.Boolean=14]="Boolean",a[a.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",a[a.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",a[a.DateMaximumTimestamp=17]="DateMaximumTimestamp",a[a.DateMinimumTimestamp=18]="DateMinimumTimestamp",a[a.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",a[a.Date=20]="Date",a[a.Function=21]="Function",a[a.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",a[a.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",a[a.IntegerMaximum=24]="IntegerMaximum",a[a.IntegerMinimum=25]="IntegerMinimum",a[a.IntegerMultipleOf=26]="IntegerMultipleOf",a[a.Integer=27]="Integer",a[a.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",a[a.Intersect=29]="Intersect",a[a.Iterator=30]="Iterator",a[a.Kind=31]="Kind",a[a.Literal=32]="Literal",a[a.Never=33]="Never",a[a.Not=34]="Not",a[a.Null=35]="Null",a[a.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",a[a.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",a[a.NumberMaximum=38]="NumberMaximum",a[a.NumberMinimum=39]="NumberMinimum",a[a.NumberMultipleOf=40]="NumberMultipleOf",a[a.Number=41]="Number",a[a.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",a[a.ObjectMaxProperties=43]="ObjectMaxProperties",a[a.ObjectMinProperties=44]="ObjectMinProperties",a[a.ObjectRequiredProperty=45]="ObjectRequiredProperty",a[a.Object=46]="Object",a[a.Promise=47]="Promise",a[a.StringFormatUnknown=48]="StringFormatUnknown",a[a.StringFormat=49]="StringFormat",a[a.StringMaxLength=50]="StringMaxLength",a[a.StringMinLength=51]="StringMinLength",a[a.StringPattern=52]="StringPattern",a[a.String=53]="String",a[a.Symbol=54]="Symbol",a[a.TupleLength=55]="TupleLength",a[a.Tuple=56]="Tuple",a[a.Uint8ArrayMaxByteLength=57]="Uint8ArrayMaxByteLength",a[a.Uint8ArrayMinByteLength=58]="Uint8ArrayMinByteLength",a[a.Uint8Array=59]="Uint8Array",a[a.Undefined=60]="Undefined",a[a.Union=61]="Union",a[a.Void=62]="Void"})(o||(e.ValueErrorType=o={}));var u=class extends s.TypeBoxError{constructor(a){super("Unknown type"),this.schema=a}};e.ValueErrorsUnknownTypeError=u;function f(a){return a.replace(/~/g,"~0").replace(/\//g,"~1")}e.EscapeKey=f;function c(a){return a!==void 0}var h=class{constructor(a){this.iterator=a}[Symbol.iterator](){return this.iterator}First(){let a=this.iterator.next();return a.done?void 0:a.value}};e.ValueErrorIterator=h;function m(a,O,v,b){return{type:a,schema:O,path:v,value:b,message:n.TypeSystemErrorFunction.Get()(O,a)}}function*M(a,O,v,b){}function*S(a,O,v,b){if(!(0,t.IsArray)(b))return yield m(o.Array,a,v,b);c(a.minItems)&&!(b.length>=a.minItems)&&(yield m(o.ArrayMinItems,a,v,b)),c(a.maxItems)&&!(b.length<=a.maxItems)&&(yield m(o.ArrayMaxItems,a,v,b));for(let Z=0;Z<b.length;Z++)yield*w(a.items,O,`${v}/${Z}`,b[Z]);if(a.uniqueItems===!0&&!(function(){let Z=new Set;for(let te of b){let pe=(0,i.Hash)(te);if(Z.has(pe))return!1;Z.add(pe)}return!0})()&&(yield m(o.ArrayUniqueItems,a,v,b)),!(c(a.contains)||c(a.minContains)||c(a.maxContains)))return;let P=c(a.contains)?a.contains:s.Type.Never(),k=b.reduce((Z,te,pe)=>w(P,O,`${v}${pe}`,te).next().done===!0?Z+1:Z,0);k===0&&(yield m(o.ArrayContains,a,v,b)),(0,t.IsNumber)(a.minContains)&&k<a.minContains&&(yield m(o.ArrayMinContains,a,v,b)),(0,t.IsNumber)(a.maxContains)&&k>a.maxContains&&(yield m(o.ArrayMaxContains,a,v,b))}function*B(a,O,v,b){(0,t.IsAsyncIterator)(b)||(yield m(o.AsyncIterator,a,v,b))}function*H(a,O,v,b){if(!(0,t.IsBigInt)(b))return yield m(o.BigInt,a,v,b);c(a.exclusiveMaximum)&&!(b<a.exclusiveMaximum)&&(yield m(o.BigIntExclusiveMaximum,a,v,b)),c(a.exclusiveMinimum)&&!(b>a.exclusiveMinimum)&&(yield m(o.BigIntExclusiveMinimum,a,v,b)),c(a.maximum)&&!(b<=a.maximum)&&(yield m(o.BigIntMaximum,a,v,b)),c(a.minimum)&&!(b>=a.minimum)&&(yield m(o.BigIntMinimum,a,v,b)),c(a.multipleOf)&&b%a.multipleOf!==BigInt(0)&&(yield m(o.BigIntMultipleOf,a,v,b))}function*Q(a,O,v,b){(0,t.IsBoolean)(b)||(yield m(o.Boolean,a,v,b))}function*K(a,O,v,b){yield*w(a.returns,O,v,b.prototype)}function*D(a,O,v,b){if(!(0,t.IsDate)(b))return yield m(o.Date,a,v,b);c(a.exclusiveMaximumTimestamp)&&!(b.getTime()<a.exclusiveMaximumTimestamp)&&(yield m(o.DateExclusiveMaximumTimestamp,a,v,b)),c(a.exclusiveMinimumTimestamp)&&!(b.getTime()>a.exclusiveMinimumTimestamp)&&(yield m(o.DateExclusiveMinimumTimestamp,a,v,b)),c(a.maximumTimestamp)&&!(b.getTime()<=a.maximumTimestamp)&&(yield m(o.DateMaximumTimestamp,a,v,b)),c(a.minimumTimestamp)&&!(b.getTime()>=a.minimumTimestamp)&&(yield m(o.DateMinimumTimestamp,a,v,b)),c(a.multipleOfTimestamp)&&b.getTime()%a.multipleOfTimestamp!==0&&(yield m(o.DateMultipleOfTimestamp,a,v,b))}function*V(a,O,v,b){(0,t.IsFunction)(b)||(yield m(o.Function,a,v,b))}function*q(a,O,v,b){if(!(0,t.IsInteger)(b))return yield m(o.Integer,a,v,b);c(a.exclusiveMaximum)&&!(b<a.exclusiveMaximum)&&(yield m(o.IntegerExclusiveMaximum,a,v,b)),c(a.exclusiveMinimum)&&!(b>a.exclusiveMinimum)&&(yield m(o.IntegerExclusiveMinimum,a,v,b)),c(a.maximum)&&!(b<=a.maximum)&&(yield m(o.IntegerMaximum,a,v,b)),c(a.minimum)&&!(b>=a.minimum)&&(yield m(o.IntegerMinimum,a,v,b)),c(a.multipleOf)&&b%a.multipleOf!==0&&(yield m(o.IntegerMultipleOf,a,v,b))}function*F(a,O,v,b){for(let P of a.allOf){let k=w(P,O,v,b).next();k.done||(yield m(o.Intersect,a,v,b),yield k.value)}if(a.unevaluatedProperties===!1){let P=new RegExp(s.KeyResolver.ResolvePattern(a));for(let k of Object.getOwnPropertyNames(b))P.test(k)||(yield m(o.IntersectUnevaluatedProperties,a,`${v}/${k}`,b))}if(typeof a.unevaluatedProperties=="object"){let P=new RegExp(s.KeyResolver.ResolvePattern(a));for(let k of Object.getOwnPropertyNames(b))if(!P.test(k)){let Z=w(a.unevaluatedProperties,O,`${v}/${k}`,b[k]).next();Z.done||(yield Z.value)}}}function*ee(a,O,v,b){(0,t.IsIterator)(b)||(yield m(o.Iterator,a,v,b))}function*z(a,O,v,b){b!==a.const&&(yield m(o.Literal,a,v,b))}function*fe(a,O,v,b){yield m(o.Never,a,v,b)}function*N(a,O,v,b){w(a.not,O,v,b).next().done===!0&&(yield m(o.Not,a,v,b))}function*x(a,O,v,b){(0,t.IsNull)(b)||(yield m(o.Null,a,v,b))}function*L(a,O,v,b){if(!n.TypeSystemPolicy.IsNumberLike(b))return yield m(o.Number,a,v,b);c(a.exclusiveMaximum)&&!(b<a.exclusiveMaximum)&&(yield m(o.NumberExclusiveMaximum,a,v,b)),c(a.exclusiveMinimum)&&!(b>a.exclusiveMinimum)&&(yield m(o.NumberExclusiveMinimum,a,v,b)),c(a.maximum)&&!(b<=a.maximum)&&(yield m(o.NumberMaximum,a,v,b)),c(a.minimum)&&!(b>=a.minimum)&&(yield m(o.NumberMinimum,a,v,b)),c(a.multipleOf)&&b%a.multipleOf!==0&&(yield m(o.NumberMultipleOf,a,v,b))}function*Y(a,O,v,b){if(!n.TypeSystemPolicy.IsObjectLike(b))return yield m(o.Object,a,v,b);c(a.minProperties)&&!(Object.getOwnPropertyNames(b).length>=a.minProperties)&&(yield m(o.ObjectMinProperties,a,v,b)),c(a.maxProperties)&&!(Object.getOwnPropertyNames(b).length<=a.maxProperties)&&(yield m(o.ObjectMaxProperties,a,v,b));let P=Array.isArray(a.required)?a.required:[],k=Object.getOwnPropertyNames(a.properties),Z=Object.getOwnPropertyNames(b);for(let te of P)Z.includes(te)||(yield m(o.ObjectRequiredProperty,a.properties[te],`${v}/${f(te)}`,void 0));if(a.additionalProperties===!1)for(let te of Z)k.includes(te)||(yield m(o.ObjectAdditionalProperties,a,`${v}/${f(te)}`,b[te]));if(typeof a.additionalProperties=="object")for(let te of Z)k.includes(te)||(yield*w(a.additionalProperties,O,`${v}/${f(te)}`,b[te]));for(let te of k){let pe=a.properties[te];a.required&&a.required.includes(te)?(yield*w(pe,O,`${v}/${f(te)}`,b[te]),s.ExtendsUndefined.Check(a)&&!(te in b)&&(yield m(o.ObjectRequiredProperty,pe,`${v}/${f(te)}`,void 0))):n.TypeSystemPolicy.IsExactOptionalProperty(b,te)&&(yield*w(pe,O,`${v}/${f(te)}`,b[te]))}}function*ie(a,O,v,b){(0,t.IsPromise)(b)||(yield m(o.Promise,a,v,b))}function*X(a,O,v,b){if(!n.TypeSystemPolicy.IsRecordLike(b))return yield m(o.Object,a,v,b);c(a.minProperties)&&!(Object.getOwnPropertyNames(b).length>=a.minProperties)&&(yield m(o.ObjectMinProperties,a,v,b)),c(a.maxProperties)&&!(Object.getOwnPropertyNames(b).length<=a.maxProperties)&&(yield m(o.ObjectMaxProperties,a,v,b));let[P,k]=Object.entries(a.patternProperties)[0],Z=new RegExp(P);for(let[te,pe]of Object.entries(b))Z.test(te)&&(yield*w(k,O,`${v}/${f(te)}`,pe));if(typeof a.additionalProperties=="object")for(let[te,pe]of Object.entries(b))Z.test(te)||(yield*w(a.additionalProperties,O,`${v}/${f(te)}`,pe));if(a.additionalProperties===!1){for(let[te,pe]of Object.entries(b))if(!Z.test(te))return yield m(o.ObjectAdditionalProperties,a,`${v}/${f(te)}`,pe)}}function*se(a,O,v,b){yield*w((0,r.Deref)(a,O),O,v,b)}function*j(a,O,v,b){if(!(0,t.IsString)(b))return yield m(o.String,a,v,b);c(a.minLength)&&!(b.length>=a.minLength)&&(yield m(o.StringMinLength,a,v,b)),c(a.maxLength)&&!(b.length<=a.maxLength)&&(yield m(o.StringMaxLength,a,v,b)),(0,t.IsString)(a.pattern)&&(new RegExp(a.pattern).test(b)||(yield m(o.StringPattern,a,v,b))),(0,t.IsString)(a.format)&&(s.FormatRegistry.Has(a.format)?s.FormatRegistry.Get(a.format)(b)||(yield m(o.StringFormat,a,v,b)):yield m(o.StringFormatUnknown,a,v,b))}function*G(a,O,v,b){(0,t.IsSymbol)(b)||(yield m(o.Symbol,a,v,b))}function*J(a,O,v,b){if(!(0,t.IsString)(b))return yield m(o.String,a,v,b);new RegExp(a.pattern).test(b)||(yield m(o.StringPattern,a,v,b))}function*le(a,O,v,b){yield*w((0,r.Deref)(a,O),O,v,b)}function*l(a,O,v,b){if(!(0,t.IsArray)(b))return yield m(o.Tuple,a,v,b);if(a.items===void 0&&b.length!==0)return yield m(o.TupleLength,a,v,b);if(b.length!==a.maxItems)return yield m(o.TupleLength,a,v,b);if(a.items)for(let P=0;P<a.items.length;P++)yield*w(a.items[P],O,`${v}/${P}`,b[P])}function*_(a,O,v,b){(0,t.IsUndefined)(b)||(yield m(o.Undefined,a,v,b))}function*I(a,O,v,b){let P=0;for(let k of a.anyOf){let Z=[...w(k,O,v,b)];if(Z.length===0)return;P+=Z.length}P>0&&(yield m(o.Union,a,v,b))}function*C(a,O,v,b){if(!(0,t.IsUint8Array)(b))return yield m(o.Uint8Array,a,v,b);c(a.maxByteLength)&&!(b.length<=a.maxByteLength)&&(yield m(o.Uint8ArrayMaxByteLength,a,v,b)),c(a.minByteLength)&&!(b.length>=a.minByteLength)&&(yield m(o.Uint8ArrayMinByteLength,a,v,b))}function*R(a,O,v,b){}function*E(a,O,v,b){n.TypeSystemPolicy.IsVoidLike(b)||(yield m(o.Void,a,v,b))}function*y(a,O,v,b){s.TypeRegistry.Get(a[s.Kind])(a,b)||(yield m(o.Kind,a,v,b))}function*w(a,O,v,b){let P=c(a.$id)?[...O,a]:O,k=a;switch(k[s.Kind]){case"Any":return yield*M(k,P,v,b);case"Array":return yield*S(k,P,v,b);case"AsyncIterator":return yield*B(k,P,v,b);case"BigInt":return yield*H(k,P,v,b);case"Boolean":return yield*Q(k,P,v,b);case"Constructor":return yield*K(k,P,v,b);case"Date":return yield*D(k,P,v,b);case"Function":return yield*V(k,P,v,b);case"Integer":return yield*q(k,P,v,b);case"Intersect":return yield*F(k,P,v,b);case"Iterator":return yield*ee(k,P,v,b);case"Literal":return yield*z(k,P,v,b);case"Never":return yield*fe(k,P,v,b);case"Not":return yield*N(k,P,v,b);case"Null":return yield*x(k,P,v,b);case"Number":return yield*L(k,P,v,b);case"Object":return yield*Y(k,P,v,b);case"Promise":return yield*ie(k,P,v,b);case"Record":return yield*X(k,P,v,b);case"Ref":return yield*se(k,P,v,b);case"String":return yield*j(k,P,v,b);case"Symbol":return yield*G(k,P,v,b);case"TemplateLiteral":return yield*J(k,P,v,b);case"This":return yield*le(k,P,v,b);case"Tuple":return yield*l(k,P,v,b);case"Undefined":return yield*_(k,P,v,b);case"Union":return yield*I(k,P,v,b);case"Uint8Array":return yield*C(k,P,v,b);case"Unknown":return yield*R(k,P,v,b);case"Void":return yield*E(k,P,v,b);default:if(!s.TypeRegistry.Has(k[s.Kind]))throw new u(a);return yield*y(k,P,v,b)}}function T(...a){let O=a.length===3?w(a[0],a[1],"",a[2]):w(a[0],[],"",a[1]);return new h(O)}e.Errors=T}}),Hd=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/errors/index.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(r,i,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(i,s);(!u||("get"in u?!i.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,u)}):(function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]})),n=e&&e.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ni(),e)}}),Xu=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/system/index.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(i,s,o,u){u===void 0&&(u=o);var f=Object.getOwnPropertyDescriptor(s,o);(!f||("get"in f?!s.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(i,u,f)}):(function(i,s,o,u){u===void 0&&(u=o),i[u]=s[o]})),n=e&&e.__exportStar||function(i,s){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,i,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.ValueErrorType=void 0;var r=Ni();Object.defineProperty(e,"ValueErrorType",{enumerable:!0,get:function(){return r.ValueErrorType}}),n(Ju(),e)}}),Jd=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/value/check.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Check=e.ValueCheckUnknownTypeError=void 0;var t=Vn(),n=Xu(),r=Ri(),i=Wo(),s=Ft(),o=class extends s.TypeBoxError{constructor(y){super("Unknown type"),this.schema=y}};e.ValueCheckUnknownTypeError=o;function u(y){return y[s.Kind]==="Any"||y[s.Kind]==="Unknown"}function f(y){return y!==void 0}function c(y,w,T){return!0}function h(y,w,T){if(!(0,t.IsArray)(T)||f(y.minItems)&&!(T.length>=y.minItems)||f(y.maxItems)&&!(T.length<=y.maxItems)||!T.every(v=>R(y.items,w,v))||y.uniqueItems===!0&&!(function(){let v=new Set;for(let b of T){let P=(0,i.Hash)(b);if(v.has(P))return!1;v.add(P)}return!0})())return!1;if(!(f(y.contains)||(0,t.IsNumber)(y.minContains)||(0,t.IsNumber)(y.maxContains)))return!0;let a=f(y.contains)?y.contains:s.Type.Never(),O=T.reduce((v,b)=>R(a,w,b)?v+1:v,0);return!(O===0||(0,t.IsNumber)(y.minContains)&&O<y.minContains||(0,t.IsNumber)(y.maxContains)&&O>y.maxContains)}function m(y,w,T){return(0,t.IsAsyncIterator)(T)}function M(y,w,T){return!(!(0,t.IsBigInt)(T)||f(y.exclusiveMaximum)&&!(T<y.exclusiveMaximum)||f(y.exclusiveMinimum)&&!(T>y.exclusiveMinimum)||f(y.maximum)&&!(T<=y.maximum)||f(y.minimum)&&!(T>=y.minimum)||f(y.multipleOf)&&T%y.multipleOf!==BigInt(0))}function S(y,w,T){return(0,t.IsBoolean)(T)}function B(y,w,T){return R(y.returns,w,T.prototype)}function H(y,w,T){return!(!(0,t.IsDate)(T)||f(y.exclusiveMaximumTimestamp)&&!(T.getTime()<y.exclusiveMaximumTimestamp)||f(y.exclusiveMinimumTimestamp)&&!(T.getTime()>y.exclusiveMinimumTimestamp)||f(y.maximumTimestamp)&&!(T.getTime()<=y.maximumTimestamp)||f(y.minimumTimestamp)&&!(T.getTime()>=y.minimumTimestamp)||f(y.multipleOfTimestamp)&&T.getTime()%y.multipleOfTimestamp!==0)}function Q(y,w,T){return(0,t.IsFunction)(T)}function K(y,w,T){return!(!(0,t.IsInteger)(T)||f(y.exclusiveMaximum)&&!(T<y.exclusiveMaximum)||f(y.exclusiveMinimum)&&!(T>y.exclusiveMinimum)||f(y.maximum)&&!(T<=y.maximum)||f(y.minimum)&&!(T>=y.minimum)||f(y.multipleOf)&&T%y.multipleOf!==0)}function D(y,w,T){let a=y.allOf.every(O=>R(O,w,T));if(y.unevaluatedProperties===!1){let O=new RegExp(s.KeyResolver.ResolvePattern(y)),v=Object.getOwnPropertyNames(T).every(b=>O.test(b));return a&&v}else if(s.TypeGuard.TSchema(y.unevaluatedProperties)){let O=new RegExp(s.KeyResolver.ResolvePattern(y)),v=Object.getOwnPropertyNames(T).every(b=>O.test(b)||R(y.unevaluatedProperties,w,T[b]));return a&&v}else return a}function V(y,w,T){return(0,t.IsIterator)(T)}function q(y,w,T){return T===y.const}function F(y,w,T){return!1}function ee(y,w,T){return!R(y.not,w,T)}function z(y,w,T){return(0,t.IsNull)(T)}function fe(y,w,T){return!(!n.TypeSystemPolicy.IsNumberLike(T)||f(y.exclusiveMaximum)&&!(T<y.exclusiveMaximum)||f(y.exclusiveMinimum)&&!(T>y.exclusiveMinimum)||f(y.minimum)&&!(T>=y.minimum)||f(y.maximum)&&!(T<=y.maximum)||f(y.multipleOf)&&T%y.multipleOf!==0)}function N(y,w,T){if(!n.TypeSystemPolicy.IsObjectLike(T)||f(y.minProperties)&&!(Object.getOwnPropertyNames(T).length>=y.minProperties)||f(y.maxProperties)&&!(Object.getOwnPropertyNames(T).length<=y.maxProperties))return!1;let a=Object.getOwnPropertyNames(y.properties);for(let O of a){let v=y.properties[O];if(y.required&&y.required.includes(O)){if(!R(v,w,T[O])||(s.ExtendsUndefined.Check(v)||u(v))&&!(O in T))return!1}else if(n.TypeSystemPolicy.IsExactOptionalProperty(T,O)&&!R(v,w,T[O]))return!1}if(y.additionalProperties===!1){let O=Object.getOwnPropertyNames(T);return y.required&&y.required.length===a.length&&O.length===a.length?!0:O.every(v=>a.includes(v))}else return typeof y.additionalProperties=="object"?Object.getOwnPropertyNames(T).every(v=>a.includes(v)||R(y.additionalProperties,w,T[v])):!0}function x(y,w,T){return(0,t.IsPromise)(T)}function L(y,w,T){if(!n.TypeSystemPolicy.IsRecordLike(T)||f(y.minProperties)&&!(Object.getOwnPropertyNames(T).length>=y.minProperties)||f(y.maxProperties)&&!(Object.getOwnPropertyNames(T).length<=y.maxProperties))return!1;let[a,O]=Object.entries(y.patternProperties)[0],v=new RegExp(a),b=Object.entries(T).every(([Z,te])=>v.test(Z)?R(O,w,te):!0),P=typeof y.additionalProperties=="object"?Object.entries(T).every(([Z,te])=>v.test(Z)?!0:R(y.additionalProperties,w,te)):!0,k=y.additionalProperties===!1?Object.getOwnPropertyNames(T).every(Z=>v.test(Z)):!0;return b&&P&&k}function Y(y,w,T){return R((0,r.Deref)(y,w),w,T)}function ie(y,w,T){return!(0,t.IsString)(T)||f(y.minLength)&&!(T.length>=y.minLength)||f(y.maxLength)&&!(T.length<=y.maxLength)||f(y.pattern)&&!new RegExp(y.pattern).test(T)?!1:f(y.format)?s.FormatRegistry.Has(y.format)?s.FormatRegistry.Get(y.format)(T):!1:!0}function X(y,w,T){return(0,t.IsSymbol)(T)}function se(y,w,T){return(0,t.IsString)(T)&&new RegExp(y.pattern).test(T)}function j(y,w,T){return R((0,r.Deref)(y,w),w,T)}function G(y,w,T){if(!(0,t.IsArray)(T)||y.items===void 0&&T.length!==0||T.length!==y.maxItems)return!1;if(!y.items)return!0;for(let a=0;a<y.items.length;a++)if(!R(y.items[a],w,T[a]))return!1;return!0}function J(y,w,T){return(0,t.IsUndefined)(T)}function le(y,w,T){return y.anyOf.some(a=>R(a,w,T))}function l(y,w,T){return!(!(0,t.IsUint8Array)(T)||f(y.maxByteLength)&&!(T.length<=y.maxByteLength)||f(y.minByteLength)&&!(T.length>=y.minByteLength))}function _(y,w,T){return!0}function I(y,w,T){return n.TypeSystemPolicy.IsVoidLike(T)}function C(y,w,T){return s.TypeRegistry.Has(y[s.Kind])?s.TypeRegistry.Get(y[s.Kind])(y,T):!1}function R(y,w,T){let a=f(y.$id)?[...w,y]:w,O=y;switch(O[s.Kind]){case"Any":return c(O,a,T);case"Array":return h(O,a,T);case"AsyncIterator":return m(O,a,T);case"BigInt":return M(O,a,T);case"Boolean":return S(O,a,T);case"Constructor":return B(O,a,T);case"Date":return H(O,a,T);case"Function":return Q(O,a,T);case"Integer":return K(O,a,T);case"Intersect":return D(O,a,T);case"Iterator":return V(O,a,T);case"Literal":return q(O,a,T);case"Never":return F(O,a,T);case"Not":return ee(O,a,T);case"Null":return z(O,a,T);case"Number":return fe(O,a,T);case"Object":return N(O,a,T);case"Promise":return x(O,a,T);case"Record":return L(O,a,T);case"Ref":return Y(O,a,T);case"String":return ie(O,a,T);case"Symbol":return X(O,a,T);case"TemplateLiteral":return se(O,a,T);case"This":return j(O,a,T);case"Tuple":return G(O,a,T);case"Undefined":return J(O,a,T);case"Union":return le(O,a,T);case"Uint8Array":return l(O,a,T);case"Unknown":return _(O,a,T);case"Void":return I(O,a,T);default:if(!s.TypeRegistry.Has(O[s.Kind]))throw new o(O);return C(O,a,T)}}function E(...y){return y.length===3?R(y[0],y[1],y[2]):R(y[0],[],y[1])}e.Check=E}}),Xd=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/value/transform.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EncodeTransform=e.DecodeTransform=e.HasTransform=e.TransformEncodeError=e.TransformDecodeError=e.TransformEncodeCheckError=e.TransformDecodeCheckError=void 0;var t=Vn(),n=Ri(),r=Jd(),i=Ft(),s=class extends i.TypeBoxError{constructor(M,S,B){super("Unable to decode due to invalid value"),this.schema=M,this.value=S,this.error=B}};e.TransformDecodeCheckError=s;var o=class extends i.TypeBoxError{constructor(M,S,B){super("Unable to encode due to invalid value"),this.schema=M,this.value=S,this.error=B}};e.TransformEncodeCheckError=o;var u=class extends i.TypeBoxError{constructor(M,S,B){super(`${B instanceof Error?B.message:"Unknown error"}`),this.schema=M,this.value=S}};e.TransformDecodeError=u;var f=class extends i.TypeBoxError{constructor(M,S,B){super(`${B instanceof Error?B.message:"Unknown error"}`),this.schema=M,this.value=S}};e.TransformEncodeError=f;var c;(function(M){function S(X,se){return i.TypeGuard.TTransform(X)||L(X.items,se)}function B(X,se){return i.TypeGuard.TTransform(X)||L(X.items,se)}function H(X,se){return i.TypeGuard.TTransform(X)||L(X.returns,se)||X.parameters.some(j=>L(j,se))}function Q(X,se){return i.TypeGuard.TTransform(X)||L(X.returns,se)||X.parameters.some(j=>L(j,se))}function K(X,se){return i.TypeGuard.TTransform(X)||i.TypeGuard.TTransform(X.unevaluatedProperties)||X.allOf.some(j=>L(j,se))}function D(X,se){return i.TypeGuard.TTransform(X)||L(X.items,se)}function V(X,se){return i.TypeGuard.TTransform(X)||L(X.not,se)}function q(X,se){return i.TypeGuard.TTransform(X)||Object.values(X.properties).some(j=>L(j,se))||i.TypeGuard.TSchema(X.additionalProperties)&&L(X.additionalProperties,se)}function F(X,se){return i.TypeGuard.TTransform(X)||L(X.item,se)}function ee(X,se){let j=Object.getOwnPropertyNames(X.patternProperties)[0],G=X.patternProperties[j];return i.TypeGuard.TTransform(X)||L(G,se)||i.TypeGuard.TSchema(X.additionalProperties)&&i.TypeGuard.TTransform(X.additionalProperties)}function z(X,se){return i.TypeGuard.TTransform(X)?!0:L((0,n.Deref)(X,se),se)}function fe(X,se){return i.TypeGuard.TTransform(X)?!0:L((0,n.Deref)(X,se),se)}function N(X,se){return i.TypeGuard.TTransform(X)||!(0,t.IsUndefined)(X.items)&&X.items.some(j=>L(j,se))}function x(X,se){return i.TypeGuard.TTransform(X)||X.anyOf.some(j=>L(j,se))}function L(X,se){let j=(0,t.IsString)(X.$id)?[...se,X]:se,G=X;if(X.$id&&Y.has(X.$id))return!1;switch(X.$id&&Y.add(X.$id),X[i.Kind]){case"Array":return S(G,j);case"AsyncIterator":return B(G,j);case"Constructor":return H(G,j);case"Function":return Q(G,j);case"Intersect":return K(G,j);case"Iterator":return D(G,j);case"Not":return V(G,j);case"Object":return q(G,j);case"Promise":return F(G,j);case"Record":return ee(G,j);case"Ref":return z(G,j);case"This":return fe(G,j);case"Tuple":return N(G,j);case"Union":return x(G,j);default:return i.TypeGuard.TTransform(X)}}let Y=new Set;function ie(X,se){return Y.clear(),L(X,se)}M.Has=ie})(c||(e.HasTransform=c={}));var h;(function(M){function S(N,x){try{return i.TypeGuard.TTransform(N)?N[i.Transform].Decode(x):x}catch(L){throw new u(N,x,L)}}function B(N,x,L){return(0,t.IsArray)(L)?S(N,L.map(Y=>z(N.items,x,Y))):S(N,L)}function H(N,x,L){if(!(0,t.IsPlainObject)(L)||(0,t.IsValueType)(L))return S(N,L);let Y=i.KeyResolver.ResolveKeys(N,{includePatterns:!1}),ie=Y.reduce((G,J)=>J in G?{...G,[J]:z(i.IndexedAccessor.Resolve(N,[J]),x,G[J])}:G,L);if(!i.TypeGuard.TTransform(N.unevaluatedProperties))return S(N,ie);let X=Object.getOwnPropertyNames(ie),se=N.unevaluatedProperties,j=X.reduce((G,J)=>Y.includes(J)?G:{...G,[J]:S(se,G[J])},ie);return S(N,j)}function Q(N,x,L){return S(N,z(N.not,x,L))}function K(N,x,L){if(!(0,t.IsPlainObject)(L))return S(N,L);let Y=i.KeyResolver.ResolveKeys(N,{includePatterns:!1}),ie=Y.reduce((G,J)=>J in G?{...G,[J]:z(N.properties[J],x,G[J])}:G,L);if(!i.TypeGuard.TSchema(N.additionalProperties))return S(N,ie);let X=Object.getOwnPropertyNames(ie),se=N.additionalProperties,j=X.reduce((G,J)=>Y.includes(J)?G:{...G,[J]:S(se,G[J])},ie);return S(N,j)}function D(N,x,L){if(!(0,t.IsPlainObject)(L))return S(N,L);let Y=Object.getOwnPropertyNames(N.patternProperties)[0],ie=new RegExp(Y),X=Object.getOwnPropertyNames(L).reduce((J,le)=>ie.test(le)?{...J,[le]:z(N.patternProperties[Y],x,J[le])}:J,L);if(!i.TypeGuard.TSchema(N.additionalProperties))return S(N,X);let se=Object.getOwnPropertyNames(X),j=N.additionalProperties,G=se.reduce((J,le)=>ie.test(le)?J:{...J,[le]:S(j,J[le])},X);return S(N,G)}function V(N,x,L){let Y=(0,n.Deref)(N,x);return S(N,z(Y,x,L))}function q(N,x,L){let Y=(0,n.Deref)(N,x);return S(N,z(Y,x,L))}function F(N,x,L){return(0,t.IsArray)(L)&&(0,t.IsArray)(N.items)?S(N,N.items.map((Y,ie)=>z(Y,x,L[ie]))):S(N,L)}function ee(N,x,L){let Y=S(N,L);for(let ie of N.anyOf)if((0,r.Check)(ie,x,Y))return z(ie,x,Y);return Y}function z(N,x,L){let Y=typeof N.$id=="string"?[...x,N]:x,ie=N;switch(N[i.Kind]){case"Array":return B(ie,Y,L);case"Intersect":return H(ie,Y,L);case"Not":return Q(ie,Y,L);case"Object":return K(ie,Y,L);case"Record":return D(ie,Y,L);case"Ref":return V(ie,Y,L);case"Symbol":return S(ie,L);case"This":return q(ie,Y,L);case"Tuple":return F(ie,Y,L);case"Union":return ee(ie,Y,L);default:return S(ie,L)}}function fe(N,x,L){return z(N,x,L)}M.Decode=fe})(h||(e.DecodeTransform=h={}));var m;(function(M){function S(N,x){try{return i.TypeGuard.TTransform(N)?N[i.Transform].Encode(x):x}catch(L){throw new f(N,x,L)}}function B(N,x,L){let Y=S(N,L);return(0,t.IsArray)(Y)?Y.map(ie=>z(N.items,x,ie)):Y}function H(N,x,L){let Y=S(N,L);if(!(0,t.IsPlainObject)(L)||(0,t.IsValueType)(L))return Y;let ie=i.KeyResolver.ResolveKeys(N,{includePatterns:!1}),X=ie.reduce((G,J)=>J in Y?{...G,[J]:z(i.IndexedAccessor.Resolve(N,[J]),x,G[J])}:G,Y);if(!i.TypeGuard.TTransform(N.unevaluatedProperties))return S(N,X);let se=Object.getOwnPropertyNames(X),j=N.unevaluatedProperties;return se.reduce((G,J)=>ie.includes(J)?G:{...G,[J]:S(j,G[J])},X)}function Q(N,x,L){return S(N.not,S(N,L))}function K(N,x,L){let Y=S(N,L);if(!(0,t.IsPlainObject)(L))return Y;let ie=i.KeyResolver.ResolveKeys(N,{includePatterns:!1}),X=ie.reduce((G,J)=>J in G?{...G,[J]:z(N.properties[J],x,G[J])}:G,Y);if(!i.TypeGuard.TSchema(N.additionalProperties))return X;let se=Object.getOwnPropertyNames(X),j=N.additionalProperties;return se.reduce((G,J)=>ie.includes(J)?G:{...G,[J]:S(j,G[J])},X)}function D(N,x,L){let Y=S(N,L);if(!(0,t.IsPlainObject)(L))return Y;let ie=Object.getOwnPropertyNames(N.patternProperties)[0],X=new RegExp(ie),se=Object.getOwnPropertyNames(L).reduce((J,le)=>X.test(le)?{...J,[le]:z(N.patternProperties[ie],x,J[le])}:J,Y);if(!i.TypeGuard.TSchema(N.additionalProperties))return S(N,se);let j=Object.getOwnPropertyNames(se),G=N.additionalProperties;return j.reduce((J,le)=>X.test(le)?J:{...J,[le]:S(G,J[le])},se)}function V(N,x,L){let Y=(0,n.Deref)(N,x),ie=z(Y,x,L);return S(N,ie)}function q(N,x,L){let Y=(0,n.Deref)(N,x),ie=z(Y,x,L);return S(N,ie)}function F(N,x,L){let Y=S(N,L);return(0,t.IsArray)(N.items)?N.items.map((ie,X)=>z(ie,x,Y[X])):[]}function ee(N,x,L){for(let Y of N.anyOf){if(!(0,r.Check)(Y,x,L))continue;let ie=z(Y,x,L);return S(N,ie)}for(let Y of N.anyOf){let ie=z(Y,x,L);if((0,r.Check)(N,x,ie))return S(N,ie)}return S(N,L)}function z(N,x,L){let Y=typeof N.$id=="string"?[...x,N]:x,ie=N;switch(N[i.Kind]){case"Array":return B(ie,Y,L);case"Intersect":return H(ie,Y,L);case"Not":return Q(ie,Y,L);case"Object":return K(ie,Y,L);case"Record":return D(ie,Y,L);case"Ref":return V(ie,Y,L);case"This":return q(ie,Y,L);case"Tuple":return F(ie,Y,L);case"Union":return ee(ie,Y,L);default:return S(ie,L)}}function fe(N,x,L){return z(N,x,L)}M.Encode=fe})(m||(e.EncodeTransform=m={}))}}),Yd=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/compiler/compiler.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeCompiler=e.Policy=e.TypeCompilerTypeGuardError=e.TypeCompilerUnknownTypeError=e.TypeCheck=void 0;var t=Xd(),n=Vn(),r=Ni(),i=Xu(),s=Ri(),o=Wo(),u=Ft(),f=class{constructor(K,D,V,q){this.schema=K,this.references=D,this.checkFunc=V,this.code=q,this.hasTransform=t.HasTransform.Has(K,D)}Code(){return this.code}Errors(K){return(0,r.Errors)(this.schema,this.references,K)}Check(K){return this.checkFunc(K)}Decode(K){if(!this.checkFunc(K))throw new t.TransformDecodeCheckError(this.schema,K,this.Errors(K).First());return this.hasTransform?t.DecodeTransform.Decode(this.schema,this.references,K):K}Encode(K){let D=this.hasTransform?t.EncodeTransform.Encode(this.schema,this.references,K):K;if(!this.checkFunc(D))throw new t.TransformEncodeCheckError(this.schema,K,this.Errors(K).First());return D}};e.TypeCheck=f;var c;(function(K){function D(ee){return ee===36}K.DollarSign=D;function V(ee){return ee===95}K.IsUnderscore=V;function q(ee){return ee>=65&&ee<=90||ee>=97&&ee<=122}K.IsAlpha=q;function F(ee){return ee>=48&&ee<=57}K.IsNumeric=F})(c||(c={}));var h;(function(K){function D(ee){return ee.length===0?!1:c.IsNumeric(ee.charCodeAt(0))}function V(ee){if(D(ee))return!1;for(let z=0;z<ee.length;z++){let fe=ee.charCodeAt(z);if(!(c.IsAlpha(fe)||c.IsNumeric(fe)||c.DollarSign(fe)||c.IsUnderscore(fe)))return!1}return!0}function q(ee){return ee.replace(/'/g,"\\'")}function F(ee,z){return V(z)?`${ee}.${z}`:`${ee}['${q(z)}']`}K.Encode=F})(h||(h={}));var m;(function(K){function D(V){let q=[];for(let F=0;F<V.length;F++){let ee=V.charCodeAt(F);c.IsNumeric(ee)||c.IsAlpha(ee)?q.push(V.charAt(F)):q.push(`_${ee}_`)}return q.join("").replace(/__/g,"_")}K.Encode=D})(m||(m={}));var M;(function(K){function D(V){return V.replace(/'/g,"\\'")}K.Escape=D})(M||(M={}));var S=class extends u.TypeBoxError{constructor(K){super("Unknown type"),this.schema=K}};e.TypeCompilerUnknownTypeError=S;var B=class extends u.TypeBoxError{constructor(K){super("Preflight validation check failed to guard for the given schema"),this.schema=K}};e.TypeCompilerTypeGuardError=B;var H;(function(K){function D(z,fe,N){return i.TypeSystemPolicy.ExactOptionalPropertyTypes?`('${fe}' in ${z} ? ${N} : true)`:`(${h.Encode(z,fe)} !== undefined ? ${N} : true)`}K.IsExactOptionalProperty=D;function V(z){return i.TypeSystemPolicy.AllowArrayObject?`(typeof ${z} === 'object' && ${z} !== null)`:`(typeof ${z} === 'object' && ${z} !== null && !Array.isArray(${z}))`}K.IsObjectLike=V;function q(z){return i.TypeSystemPolicy.AllowArrayObject?`(typeof ${z} === 'object' && ${z} !== null && !(${z} instanceof Date) && !(${z} instanceof Uint8Array))`:`(typeof ${z} === 'object' && ${z} !== null && !Array.isArray(${z}) && !(${z} instanceof Date) && !(${z} instanceof Uint8Array))`}K.IsRecordLike=q;function F(z){return i.TypeSystemPolicy.AllowNaN?`typeof ${z} === 'number'`:`(typeof ${z} === 'number' && Number.isFinite(${z}))`}K.IsNumberLike=F;function ee(z){return i.TypeSystemPolicy.AllowNullVoid?`(${z} === undefined || ${z} === null)`:`${z} === undefined`}K.IsVoidLike=ee})(H||(e.Policy=H={}));var Q;(function(K){function D(A){return A[u.Kind]==="Any"||A[u.Kind]==="Unknown"}function*V(A,ue,$){yield"true"}function*q(A,ue,$){yield`Array.isArray(${$})`;let[ye,ne]=[Ce("value","any"),Ce("acc","number")];(0,n.IsNumber)(A.maxItems)&&(yield`${$}.length <= ${A.maxItems}`),(0,n.IsNumber)(A.minItems)&&(yield`${$}.length >= ${A.minItems}`);let ce=te(A.items,ue,"value");if(yield`${$}.every((${ye}) => ${ce})`,u.TypeGuard.TSchema(A.contains)||(0,n.IsNumber)(A.minContains)||(0,n.IsNumber)(A.maxContains)){let we=u.TypeGuard.TSchema(A.contains)?A.contains:u.Type.Never(),$e=te(we,ue,"value"),Ge=(0,n.IsNumber)(A.minContains)?[`(count >= ${A.minContains})`]:[],ke=(0,n.IsNumber)(A.maxContains)?[`(count <= ${A.maxContains})`]:[],qe=`const count = value.reduce((${ne}, ${ye}) => ${$e} ? acc + 1 : acc, 0)`,jt=["(count > 0)",...Ge,...ke].join(" && ");yield`((${ye}) => { ${qe}; return ${jt}})(${$})`}A.uniqueItems===!0&&(yield`((${ye}) => { const set = new Set(); for(const element of value) { const hashed = hash(element); if(set.has(hashed)) { return false } else { set.add(hashed) } } return true } )(${$})`)}function*F(A,ue,$){yield`(typeof value === 'object' && Symbol.asyncIterator in ${$})`}function*ee(A,ue,$){yield`(typeof ${$} === 'bigint')`,(0,n.IsBigInt)(A.exclusiveMaximum)&&(yield`${$} < BigInt(${A.exclusiveMaximum})`),(0,n.IsBigInt)(A.exclusiveMinimum)&&(yield`${$} > BigInt(${A.exclusiveMinimum})`),(0,n.IsBigInt)(A.maximum)&&(yield`${$} <= BigInt(${A.maximum})`),(0,n.IsBigInt)(A.minimum)&&(yield`${$} >= BigInt(${A.minimum})`),(0,n.IsBigInt)(A.multipleOf)&&(yield`(${$} % BigInt(${A.multipleOf})) === 0`)}function*z(A,ue,$){yield`(typeof ${$} === 'boolean')`}function*fe(A,ue,$){yield*k(A.returns,ue,`${$}.prototype`)}function*N(A,ue,$){yield`(${$} instanceof Date) && Number.isFinite(${$}.getTime())`,(0,n.IsNumber)(A.exclusiveMaximumTimestamp)&&(yield`${$}.getTime() < ${A.exclusiveMaximumTimestamp}`),(0,n.IsNumber)(A.exclusiveMinimumTimestamp)&&(yield`${$}.getTime() > ${A.exclusiveMinimumTimestamp}`),(0,n.IsNumber)(A.maximumTimestamp)&&(yield`${$}.getTime() <= ${A.maximumTimestamp}`),(0,n.IsNumber)(A.minimumTimestamp)&&(yield`${$}.getTime() >= ${A.minimumTimestamp}`),(0,n.IsNumber)(A.multipleOfTimestamp)&&(yield`(${$}.getTime() % ${A.multipleOfTimestamp}) === 0`)}function*x(A,ue,$){yield`(typeof ${$} === 'function')`}function*L(A,ue,$){yield`(typeof ${$} === 'number' && Number.isInteger(${$}))`,(0,n.IsNumber)(A.exclusiveMaximum)&&(yield`${$} < ${A.exclusiveMaximum}`),(0,n.IsNumber)(A.exclusiveMinimum)&&(yield`${$} > ${A.exclusiveMinimum}`),(0,n.IsNumber)(A.maximum)&&(yield`${$} <= ${A.maximum}`),(0,n.IsNumber)(A.minimum)&&(yield`${$} >= ${A.minimum}`),(0,n.IsNumber)(A.multipleOf)&&(yield`(${$} % ${A.multipleOf}) === 0`)}function*Y(A,ue,$){let ye=A.allOf.map(ne=>te(ne,ue,$)).join(" && ");if(A.unevaluatedProperties===!1){let ne=ge(`${new RegExp(u.KeyResolver.ResolvePattern(A))};`),ce=`Object.getOwnPropertyNames(${$}).every(key => ${ne}.test(key))`;yield`(${ye} && ${ce})`}else if(u.TypeGuard.TSchema(A.unevaluatedProperties)){let ne=ge(`${new RegExp(u.KeyResolver.ResolvePattern(A))};`),ce=`Object.getOwnPropertyNames(${$}).every(key => ${ne}.test(key) || ${te(A.unevaluatedProperties,ue,`${$}[key]`)})`;yield`(${ye} && ${ce})`}else yield`(${ye})`}function*ie(A,ue,$){yield`(typeof value === 'object' && Symbol.iterator in ${$})`}function*X(A,ue,$){typeof A.const=="number"||typeof A.const=="boolean"?yield`(${$} === ${A.const})`:yield`(${$} === '${M.Escape(A.const)}')`}function*se(A,ue,$){yield"false"}function*j(A,ue,$){yield`(!${te(A.not,ue,$)})`}function*G(A,ue,$){yield`(${$} === null)`}function*J(A,ue,$){yield H.IsNumberLike($),(0,n.IsNumber)(A.exclusiveMaximum)&&(yield`${$} < ${A.exclusiveMaximum}`),(0,n.IsNumber)(A.exclusiveMinimum)&&(yield`${$} > ${A.exclusiveMinimum}`),(0,n.IsNumber)(A.maximum)&&(yield`${$} <= ${A.maximum}`),(0,n.IsNumber)(A.minimum)&&(yield`${$} >= ${A.minimum}`),(0,n.IsNumber)(A.multipleOf)&&(yield`(${$} % ${A.multipleOf}) === 0`)}function*le(A,ue,$){yield H.IsObjectLike($),(0,n.IsNumber)(A.minProperties)&&(yield`Object.getOwnPropertyNames(${$}).length >= ${A.minProperties}`),(0,n.IsNumber)(A.maxProperties)&&(yield`Object.getOwnPropertyNames(${$}).length <= ${A.maxProperties}`);let ye=Object.getOwnPropertyNames(A.properties);for(let ne of ye){let ce=h.Encode($,ne),we=A.properties[ne];if(A.required&&A.required.includes(ne))yield*k(we,ue,ce),(u.ExtendsUndefined.Check(we)||D(we))&&(yield`('${ne}' in ${$})`);else{let $e=te(we,ue,ce);yield H.IsExactOptionalProperty($,ne,$e)}}if(A.additionalProperties===!1)if(A.required&&A.required.length===ye.length)yield`Object.getOwnPropertyNames(${$}).length === ${ye.length}`;else{let ne=`[${ye.map(ce=>`'${ce}'`).join(", ")}]`;yield`Object.getOwnPropertyNames(${$}).every(key => ${ne}.includes(key))`}if(typeof A.additionalProperties=="object"){let ne=te(A.additionalProperties,ue,`${$}[key]`),ce=`[${ye.map(we=>`'${we}'`).join(", ")}]`;yield`(Object.getOwnPropertyNames(${$}).every(key => ${ce}.includes(key) || ${ne}))`}}function*l(A,ue,$){yield`(typeof value === 'object' && typeof ${$}.then === 'function')`}function*_(A,ue,$){yield H.IsRecordLike($),(0,n.IsNumber)(A.minProperties)&&(yield`Object.getOwnPropertyNames(${$}).length >= ${A.minProperties}`),(0,n.IsNumber)(A.maxProperties)&&(yield`Object.getOwnPropertyNames(${$}).length <= ${A.maxProperties}`);let[ye,ne]=Object.entries(A.patternProperties)[0],ce=ge(`${new RegExp(ye)}`),we=te(ne,ue,"value"),$e=u.TypeGuard.TSchema(A.additionalProperties)?te(A.additionalProperties,ue,$):A.additionalProperties===!1?"false":"true",Ge=`(${ce}.test(key) ? ${we} : ${$e})`;yield`(Object.entries(${$}).every(([key, value]) => ${Ge}))`}function*I(A,ue,$){let ye=(0,s.Deref)(A,ue);if(Z.functions.has(A.$ref))return yield`${pe(A.$ref)}(${$})`;yield*k(ye,ue,$)}function*C(A,ue,$){yield`(typeof ${$} === 'string')`,(0,n.IsNumber)(A.maxLength)&&(yield`${$}.length <= ${A.maxLength}`),(0,n.IsNumber)(A.minLength)&&(yield`${$}.length >= ${A.minLength}`),A.pattern!==void 0&&(yield`${ge(`${new RegExp(A.pattern)};`)}.test(${$})`),A.format!==void 0&&(yield`format('${A.format}', ${$})`)}function*R(A,ue,$){yield`(typeof ${$} === 'symbol')`}function*E(A,ue,$){yield`(typeof ${$} === 'string')`,yield`${ge(`${new RegExp(A.pattern)};`)}.test(${$})`}function*y(A,ue,$){yield`${pe(A.$ref)}(${$})`}function*w(A,ue,$){if(yield`Array.isArray(${$})`,A.items===void 0)return yield`${$}.length === 0`;yield`(${$}.length === ${A.maxItems})`;for(let ye=0;ye<A.items.length;ye++)yield`${te(A.items[ye],ue,`${$}[${ye}]`)}`}function*T(A,ue,$){yield`${$} === undefined`}function*a(A,ue,$){yield`(${A.anyOf.map(ne=>te(ne,ue,$)).join(" || ")})`}function*O(A,ue,$){yield`${$} instanceof Uint8Array`,(0,n.IsNumber)(A.maxByteLength)&&(yield`(${$}.length <= ${A.maxByteLength})`),(0,n.IsNumber)(A.minByteLength)&&(yield`(${$}.length >= ${A.minByteLength})`)}function*v(A,ue,$){yield"true"}function*b(A,ue,$){yield H.IsVoidLike($)}function*P(A,ue,$){let ye=Z.instances.size;Z.instances.set(ye,A),yield`kind('${A[u.Kind]}', ${ye}, ${$})`}function*k(A,ue,$,ye=!0){let ne=(0,n.IsString)(A.$id)?[...ue,A]:ue,ce=A;if(ye&&(0,n.IsString)(A.$id)){let we=pe(A.$id);if(Z.functions.has(we))return yield`${we}(${$})`;{let $e=Ee(we,A,ue,"value",!1);return Z.functions.set(we,$e),yield`${we}(${$})`}}switch(ce[u.Kind]){case"Any":return yield*V(ce,ne,$);case"Array":return yield*q(ce,ne,$);case"AsyncIterator":return yield*F(ce,ne,$);case"BigInt":return yield*ee(ce,ne,$);case"Boolean":return yield*z(ce,ne,$);case"Constructor":return yield*fe(ce,ne,$);case"Date":return yield*N(ce,ne,$);case"Function":return yield*x(ce,ne,$);case"Integer":return yield*L(ce,ne,$);case"Intersect":return yield*Y(ce,ne,$);case"Iterator":return yield*ie(ce,ne,$);case"Literal":return yield*X(ce,ne,$);case"Never":return yield*se(ce,ne,$);case"Not":return yield*j(ce,ne,$);case"Null":return yield*G(ce,ne,$);case"Number":return yield*J(ce,ne,$);case"Object":return yield*le(ce,ne,$);case"Promise":return yield*l(ce,ne,$);case"Record":return yield*_(ce,ne,$);case"Ref":return yield*I(ce,ne,$);case"String":return yield*C(ce,ne,$);case"Symbol":return yield*R(ce,ne,$);case"TemplateLiteral":return yield*E(ce,ne,$);case"This":return yield*y(ce,ne,$);case"Tuple":return yield*w(ce,ne,$);case"Undefined":return yield*T(ce,ne,$);case"Union":return yield*a(ce,ne,$);case"Uint8Array":return yield*O(ce,ne,$);case"Unknown":return yield*v(ce,ne,$);case"Void":return yield*b(ce,ne,$);default:if(!u.TypeRegistry.Has(ce[u.Kind]))throw new S(A);return yield*P(ce,ne,$)}}let Z={language:"javascript",functions:new Map,variables:new Map,instances:new Map};function te(A,ue,$,ye=!0){return`(${[...k(A,ue,$,ye)].join(" && ")})`}function pe(A){return`check_${m.Encode(A)}`}function ge(A){let ue=`local_${Z.variables.size}`;return Z.variables.set(ue,`const ${ue} = ${A}`),ue}function Ee(A,ue,$,ye,ne=!0){let[ce,we]=[`
49
+ `,qe=>"".padStart(qe," ")],$e=Ce("value","any"),Ge=tn("boolean"),ke=[...k(ue,$,ye,ne)].map(qe=>`${we(4)}${qe}`).join(` &&${ce}`);return`function ${A}(${$e})${Ge} {${ce}${we(2)}return (${ce}${ke}${ce}${we(2)})
50
+ }`}function Ce(A,ue){let $=Z.language==="typescript"?`: ${ue}`:"";return`${A}${$}`}function tn(A){return Z.language==="typescript"?`: ${A}`:""}function me(A,ue,$){let ye=Ee("check",A,ue,"value"),ne=Ce("value","any"),ce=tn("boolean"),we=[...Z.functions.values()],$e=[...Z.variables.values()],Ge=(0,n.IsString)(A.$id)?`return function check(${ne})${ce} {
51
+ return ${pe(A.$id)}(value)
52
+ }`:`return ${ye}`;return[...$e,...we,Ge].join(`
53
+ `)}function Kt(...A){let ue={language:"javascript"},[$,ye,ne]=A.length===2&&(0,n.IsArray)(A[1])?[A[0],A[1],ue]:A.length===2&&!(0,n.IsArray)(A[1])?[A[0],[],A[1]]:A.length===3?[A[0],A[1],A[2]]:A.length===1?[A[0],[],ue]:[null,[],ue];if(Z.language=ne.language,Z.variables.clear(),Z.functions.clear(),Z.instances.clear(),!u.TypeGuard.TSchema($))throw new B($);for(let ce of ye)if(!u.TypeGuard.TSchema(ce))throw new B(ce);return me($,ye,ne)}K.Code=Kt;function nn(A,ue=[]){let $=Kt(A,ue,{language:"javascript"}),ye=globalThis.Function("kind","format","hash",$),ne=new Map(Z.instances);function ce(ke,qe,jt){if(!u.TypeRegistry.Has(ke)||!ne.has(qe))return!1;let En=u.TypeRegistry.Get(ke),Sn=ne.get(qe);return En(Sn,jt)}function we(ke,qe){return u.FormatRegistry.Has(ke)?u.FormatRegistry.Get(ke)(qe):!1}function $e(ke){return(0,o.Hash)(ke)}let Ge=ye(ce,we,$e);return new f(A,ue,Ge,$)}K.Compile=nn})(Q||(e.TypeCompiler=Q={}))}}),Zd=De({"../../../node_modules/.pnpm/@sinclair+typebox@0.31.28/node_modules/@sinclair/typebox/compiler/index.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(i,s,o,u){u===void 0&&(u=o);var f=Object.getOwnPropertyDescriptor(s,o);(!f||("get"in f?!s.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(i,u,f)}):(function(i,s,o,u){u===void 0&&(u=o),i[u]=s[o]})),n=e&&e.__exportStar||function(i,s){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,i,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.ValueErrorIterator=e.ValueErrorType=void 0;var r=Hd();Object.defineProperty(e,"ValueErrorType",{enumerable:!0,get:function(){return r.ValueErrorType}}),Object.defineProperty(e,"ValueErrorIterator",{enumerable:!0,get:function(){return r.ValueErrorIterator}}),n(Yd(),e)}}),yi=Ht(zd(),1),Qd=Ht(qd(),1),Yu=!1,Zu=!1;yi.isNode&&(process?.env?.LOGGER_TIME_PREFIX&&(Yu=process?.env?.LOGGER_TIME_PREFIX==="true"),process?.env?.LOGGER_PERF_PREFIX&&(Zu=process?.env?.LOGGER_PERF_PREFIX==="true"));var ep={prefix:void 0,time:Yu,delta:Zu,dimDebugOnServer:!0,printOriginOnServer:!0,serverInspectOptions:{},customFormattersOnServer:!0,printStackLinesOnServer:!1,dim:!0},Oo=[],Qu=class{sinceFirst=0;sinceLast=0;time=!1;delta=!1;constructor(e,t,n,r){Object.assign(this,{sinceFirst:e,sinceLast:t,time:n,delta:r})}toString(){let e=this.sinceFirst*.001,t=e.toFixed(e<5?2:1),n=this.sinceLast<1e3?`${this.sinceLast.toFixed(0)}`.padStart(5," "):`${`${(this.sinceLast*.001).toFixed(this.sinceLast<1e4?1:0)}`.padStart(4," ")}s`;return`[${[this.time?t:null,this.delta?n:null].filter(r=>r!=null).join(",")}]`}},ec=class{constructor(e,t){Object.assign(this,{style:e,string:t})}},vr=!1,Me=class He{static ERROR=2;static WARN=4;static INFO=6;static LOG=6;static DEBUG=8;static VERBOSE=10;static firstLog=0;static lastLog=0;static setup(t=He.INFO,n={}){n=Object.assign({},ep,n),t>10&&console.debug("setup logger",{config:n});let r=this.wrapLog(console.debug,{...n,dim:n.dimDebugOnServer}),i=(...f)=>{typeof window<"u"&&window?.FORCE_DISABLE_LOGLEVEL&&r(...f)};i.isDisabled=!0,i.isEnabled=!1;let s=this.wrapLog(console.groupCollapsed,n),o=(f,c)=>{function h(...M){let S=M[M.length-1];return S===i?S():(s(...M.slice(0,-1)),(async()=>{try{let B=S();return B instanceof Promise?await B:B}finally{console.groupEnd()}})())}let m=Object.assign(c.bind({}),{isEnabled:f,isDisabled:!f,group:h,force:c});return f?m:Object.assign(i.bind({}),{isEnabled:f,isDisabled:!f,group:h,force:m})},u=o(t>=He.ERROR,this.wrapLog(console.error,n));return{ERROR:(...f)=>(u(...f),new Error(f.map(c=>typeof c=="string"?c:(0,Qd.default)(c)).join(" "))),WARN:o(t>=He.WARN,this.wrapLog(console.warn,n)),LOG:o(t>=He.INFO,this.wrapLog(console.log,n)),DEBUG:o(t>=He.DEBUG,this.wrapLog(console.log,{...n,dim:n.dimDebugOnServer})),VERBOSE:o(t>=He.VERBOSE,this.wrapLog(console.debug,{...n,dim:n.dimDebugOnServer}))}}static wrapLog(t,n){if(yi.isNode)return t.bind(console);{let r=[];if(n.time||n.delta){let i=yi.isBrowser&&navigator.userAgent.includes("Chrome")?["",He.timeStr(!!n.time,!!n.delta)]:[];r.push(...i)}return n.prefix&&(vr?r.push(new ec("dim",n.prefix)):r.push(n.prefix)),t.bind(console,...r)}}static timeStr(t,n,r=0){if(!performance.now)return;let i=performance.now();He.firstLog||(He.firstLog=i,He.lastLog=i);let s=new Qu(i-He.firstLog,i-He.lastLog,t,n);return He.lastLog=i,r?s.toString():s}static getOriginFromStack(t){let n=!1;for(let r of t.split(`
54
+ `)){let i=r.match(/^\s+at\s+(.*)/);if(i){if(n)return i[1].trim().replace(__dirname,"");n=!0}}}};yi.isBrowser&&(window.devtoolsFormatters=window.devtoolsFormatters??[],window.devtoolsFormatters.push({header:e=>{if(Oo&&Oo.length){for(let t of Oo)if(t.match(e))return["span",{},t.format(e)]}return null},hasBody:()=>!0},{header:e=>{if(!(e instanceof Qu))return null;vr||(vr=!0);let t=Me.timeStr(e.time,e.delta);return["span",{style:"font-weight: light; color: grey"},t?.toString()]},hasBody:()=>!1},{header:e=>e instanceof ec?(vr||(vr=!0),["span",{style:"font-weight: light; color: grey; "},e.string]):null,hasBody:()=>!1}));var tp=typeof global=="object"&&global&&global.Object===Object&&global,tc=tp,np=typeof self=="object"&&self&&self.Object===Object&&self,rp=tc||np||Function("return this")(),et=rp,ip=et.Symbol,xt=ip,nc=Object.prototype,op=nc.hasOwnProperty,sp=nc.toString,gr=xt?xt.toStringTag:void 0;function ap(e){var t=op.call(e,gr),n=e[gr];try{e[gr]=void 0;var r=!0}catch{}var i=sp.call(e);return r&&(t?e[gr]=n:delete e[gr]),i}var up=ap,cp=Object.prototype,fp=cp.toString;function lp(e){return fp.call(e)}var dp=lp,pp="[object Null]",yp="[object Undefined]",Da=xt?xt.toStringTag:void 0;function hp(e){return e==null?e===void 0?yp:pp:Da&&Da in Object(e)?up(e):dp(e)}var zn=hp;function gp(e){return e!=null&&typeof e=="object"}var Qt=gp,mp="[object Symbol]";function bp(e){return typeof e=="symbol"||Qt(e)&&zn(e)==mp}var Kn=bp;function vp(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var rc=vp,_p=Array.isArray,St=_p,Tp=1/0,Fa=xt?xt.prototype:void 0,ka=Fa?Fa.toString:void 0;function ic(e){if(typeof e=="string")return e;if(St(e))return rc(e,ic)+"";if(Kn(e))return ka?ka.call(e):"";var t=e+"";return t=="0"&&1/e==-Tp?"-0":t}var wp=ic,Op=/\s/;function Ap(e){for(var t=e.length;t--&&Op.test(e.charAt(t)););return t}var Ip=Ap,Ep=/^\s+/;function Sp(e){return e&&e.slice(0,Ip(e)+1).replace(Ep,"")}var Pp=Sp;function $p(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var kt=$p,Ka=NaN,Rp=/^[-+]0x[0-9a-f]+$/i,Np=/^0b[01]+$/i,Cp=/^0o[0-7]+$/i,xp=parseInt;function Up(e){if(typeof e=="number")return e;if(Kn(e))return Ka;if(kt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=kt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Pp(e);var n=Np.test(e);return n||Cp.test(e)?xp(e.slice(2),n?2:8):Rp.test(e)?Ka:+e}var jp=Up,Ga=1/0,Mp=17976931348623157e292;function Lp(e){if(!e)return e===0?e:0;if(e=jp(e),e===Ga||e===-Ga){var t=e<0?-1:1;return t*Mp}return e===e?e:0}var Bp=Lp;function Dp(e){var t=Bp(e),n=t%1;return t===t?n?t-n:t:0}var Va=Dp;function Fp(e){return e}var Ci=Fp,kp="[object AsyncFunction]",Kp="[object Function]",Gp="[object GeneratorFunction]",Vp="[object Proxy]";function zp(e){if(!kt(e))return!1;var t=zn(e);return t==Kp||t==Gp||t==kp||t==Vp}var oc=zp,qp=et["__core-js_shared__"],Ao=qp,za=(function(){var e=/[^.]+$/.exec(Ao&&Ao.keys&&Ao.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Wp(e){return!!za&&za in e}var Hp=Wp,Jp=Function.prototype,Xp=Jp.toString;function Yp(e){if(e!=null){try{return Xp.call(e)}catch{}try{return e+""}catch{}}return""}var vn=Yp,Zp=/[\\^$.*+?()[\]{}|]/g,Qp=/^\[object .+?Constructor\]$/,ey=Function.prototype,ty=Object.prototype,ny=ey.toString,ry=ty.hasOwnProperty,iy=RegExp("^"+ny.call(ry).replace(Zp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oy(e){if(!kt(e)||Hp(e))return!1;var t=oc(e)?iy:Qp;return t.test(vn(e))}var sy=oy;function ay(e,t){return e?.[t]}var uy=ay;function cy(e,t){var n=uy(e,t);return sy(n)?n:void 0}var _n=cy,fy=_n(et,"WeakMap"),Tr=fy,ly=Tr&&new Tr,hi=ly,dy=hi?function(e,t){return hi.set(e,t),e}:Ci,sc=dy,qa=Object.create,py=(function(){function e(){}return function(t){if(!kt(t))return{};if(qa)return qa(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})(),Ho=py;function yy(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ho(e.prototype),r=e.apply(n,t);return kt(r)?r:n}}var wr=yy,hy=1;function gy(e,t,n){var r=t&hy,i=wr(e);function s(){var o=this&&this!==et&&this instanceof s?i:e;return o.apply(r?n:this,arguments)}return s}var my=gy;function by(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Jo=by,vy=Math.max;function _y(e,t,n,r){for(var i=-1,s=e.length,o=n.length,u=-1,f=t.length,c=vy(s-o,0),h=Array(f+c),m=!r;++u<f;)h[u]=t[u];for(;++i<o;)(m||i<s)&&(h[n[i]]=e[i]);for(;c--;)h[u++]=e[i++];return h}var ac=_y,Ty=Math.max;function wy(e,t,n,r){for(var i=-1,s=e.length,o=-1,u=n.length,f=-1,c=t.length,h=Ty(s-u,0),m=Array(h+c),M=!r;++i<h;)m[i]=e[i];for(var S=i;++f<c;)m[S+f]=t[f];for(;++o<u;)(M||i<s)&&(m[S+n[o]]=e[i++]);return m}var uc=wy;function Oy(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Ay=Oy;function Iy(){}var Xo=Iy,Ey=4294967295;function gi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ey,this.__views__=[]}gi.prototype=Ho(Xo.prototype);gi.prototype.constructor=gi;var Yo=gi;function Sy(){}var cc=Sy,Py=hi?function(e){return hi.get(e)}:cc,fc=Py,$y={},Wa=$y,Ry=Object.prototype,Ny=Ry.hasOwnProperty;function Cy(e){for(var t=e.name+"",n=Wa[t],r=Ny.call(Wa,t)?n.length:0;r--;){var i=n[r],s=i.func;if(s==null||s==e)return i.name}return t}var xy=Cy;function mi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}mi.prototype=Ho(Xo.prototype);mi.prototype.constructor=mi;var Mo=mi;function Uy(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var lc=Uy;function jy(e){if(e instanceof Yo)return e.clone();var t=new Mo(e.__wrapped__,e.__chain__);return t.__actions__=lc(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var My=jy,Ly=Object.prototype,By=Ly.hasOwnProperty;function bi(e){if(Qt(e)&&!St(e)&&!(e instanceof Yo)){if(e instanceof Mo)return e;if(By.call(e,"__wrapped__"))return My(e)}return new Mo(e)}bi.prototype=Xo.prototype;bi.prototype.constructor=bi;var Dy=bi;function Fy(e){var t=xy(e),n=Dy[t];if(typeof n!="function"||!(t in Yo.prototype))return!1;if(e===n)return!0;var r=fc(n);return!!r&&e===r[0]}var ky=Fy,Ky=800,Gy=16,Vy=Date.now;function zy(e){var t=0,n=0;return function(){var r=Vy(),i=Gy-(r-n);if(n=r,i>0){if(++t>=Ky)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dc=zy,qy=dc(sc),pc=qy,Wy=/\{\n\/\* \[wrapped with (.+)\] \*/,Hy=/,? & /;function Jy(e){var t=e.match(Wy);return t?t[1].split(Hy):[]}var Xy=Jy,Yy=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Zy(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Yy,`{
55
+ /* [wrapped with `+t+`] */
56
+ `)}var Qy=Zy;function eh(e){return function(){return e}}var th=eh,nh=(function(){try{var e=_n(Object,"defineProperty");return e({},"",{}),e}catch{}})(),vi=nh,rh=vi?function(e,t){return vi(e,"toString",{configurable:!0,enumerable:!1,value:th(t),writable:!0})}:Ci,ih=rh,oh=dc(ih),Zo=oh;function sh(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var ah=sh;function uh(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}var ch=uh;function fh(e){return e!==e}var lh=fh;function dh(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var ph=dh;function yh(e,t,n){return t===t?ph(e,t,n):ch(e,lh,n)}var hh=yh;function gh(e,t){var n=e==null?0:e.length;return!!n&&hh(e,t,0)>-1}var yc=gh,mh=1,bh=2,vh=8,_h=16,Th=32,wh=64,Oh=128,Ah=256,Ih=512,Eh=[["ary",Oh],["bind",mh],["bindKey",bh],["curry",vh],["curryRight",_h],["flip",Ih],["partial",Th],["partialRight",wh],["rearg",Ah]];function Sh(e,t){return ah(Eh,function(n){var r="_."+n[0];t&n[1]&&!yc(e,r)&&e.push(r)}),e.sort()}var Ph=Sh;function $h(e,t,n){var r=t+"";return Zo(e,Qy(r,Ph(Xy(r),n)))}var hc=$h,Rh=1,Nh=2,Ch=4,xh=8,Ha=32,Ja=64;function Uh(e,t,n,r,i,s,o,u,f,c){var h=t&xh,m=h?o:void 0,M=h?void 0:o,S=h?s:void 0,B=h?void 0:s;t|=h?Ha:Ja,t&=~(h?Ja:Ha),t&Ch||(t&=~(Rh|Nh));var H=[e,t,i,S,m,B,M,u,f,c],Q=n.apply(void 0,H);return ky(e)&&pc(Q,H),Q.placeholder=r,hc(Q,e,t)}var gc=Uh;function jh(e){var t=e;return t.placeholder}var Qo=jh,Mh=9007199254740991,Lh=/^(?:0|[1-9]\d*)$/;function Bh(e,t){var n=typeof e;return t=t??Mh,!!t&&(n=="number"||n!="symbol"&&Lh.test(e))&&e>-1&&e%1==0&&e<t}var xi=Bh,Dh=Math.min;function Fh(e,t){for(var n=e.length,r=Dh(t.length,n),i=lc(e);r--;){var s=t[r];e[r]=xi(s,n)?i[s]:void 0}return e}var kh=Fh,Xa="__lodash_placeholder__";function Kh(e,t){for(var n=-1,r=e.length,i=0,s=[];++n<r;){var o=e[n];(o===t||o===Xa)&&(e[n]=Xa,s[i++]=n)}return s}var Or=Kh,Gh=1,Vh=2,zh=8,qh=16,Wh=128,Hh=512;function mc(e,t,n,r,i,s,o,u,f,c){var h=t&Wh,m=t&Gh,M=t&Vh,S=t&(zh|qh),B=t&Hh,H=M?void 0:wr(e);function Q(){for(var K=arguments.length,D=Array(K),V=K;V--;)D[V]=arguments[V];if(S)var q=Qo(Q),F=Ay(D,q);if(r&&(D=ac(D,r,i,S)),s&&(D=uc(D,s,o,S)),K-=F,S&&K<c){var ee=Or(D,q);return gc(e,t,mc,Q.placeholder,n,D,ee,u,f,c-K)}var z=m?n:this,fe=M?z[e]:e;return K=D.length,u?D=kh(D,u):B&&K>1&&D.reverse(),h&&f<K&&(D.length=f),this&&this!==et&&this instanceof Q&&(fe=H||wr(fe)),fe.apply(z,D)}return Q}var bc=mc;function Jh(e,t,n){var r=wr(e);function i(){for(var s=arguments.length,o=Array(s),u=s,f=Qo(i);u--;)o[u]=arguments[u];var c=s<3&&o[0]!==f&&o[s-1]!==f?[]:Or(o,f);if(s-=c.length,s<n)return gc(e,t,bc,i.placeholder,void 0,o,c,void 0,void 0,n-s);var h=this&&this!==et&&this instanceof i?r:e;return Jo(h,this,o)}return i}var Xh=Jh,Yh=1;function Zh(e,t,n,r){var i=t&Yh,s=wr(e);function o(){for(var u=-1,f=arguments.length,c=-1,h=r.length,m=Array(h+f),M=this&&this!==et&&this instanceof o?s:e;++c<h;)m[c]=r[c];for(;f--;)m[c++]=arguments[++u];return Jo(M,i?n:this,m)}return o}var Qh=Zh,Ya="__lodash_placeholder__",Io=1,eg=2,tg=4,Za=8,mr=128,Qa=256,ng=Math.min;function rg(e,t){var n=e[1],r=t[1],i=n|r,s=i<(Io|eg|mr),o=r==mr&&n==Za||r==mr&&n==Qa&&e[7].length<=t[8]||r==(mr|Qa)&&t[7].length<=t[8]&&n==Za;if(!(s||o))return e;r&Io&&(e[2]=t[2],i|=n&Io?0:tg);var u=t[3];if(u){var f=e[3];e[3]=f?ac(f,u,t[4]):u,e[4]=f?Or(e[3],Ya):t[4]}return u=t[5],u&&(f=e[5],e[5]=f?uc(f,u,t[6]):u,e[6]=f?Or(e[5],Ya):t[6]),u=t[7],u&&(e[7]=u),r&mr&&(e[8]=e[8]==null?t[8]:ng(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}var ig=rg,og="Expected a function",eu=1,sg=2,Eo=8,So=16,Po=32,tu=64,nu=Math.max;function ag(e,t,n,r,i,s,o,u){var f=t&sg;if(!f&&typeof e!="function")throw new TypeError(og);var c=r?r.length:0;if(c||(t&=~(Po|tu),r=i=void 0),o=o===void 0?o:nu(Va(o),0),u=u===void 0?u:Va(u),c-=i?i.length:0,t&tu){var h=r,m=i;r=i=void 0}var M=f?void 0:fc(e),S=[e,t,n,r,i,h,m,s,o,u];if(M&&ig(S,M),e=S[0],t=S[1],n=S[2],r=S[3],i=S[4],u=S[9]=S[9]===void 0?f?0:e.length:nu(S[9]-c,0),!u&&t&(Eo|So)&&(t&=~(Eo|So)),!t||t==eu)var B=my(e,t,n);else t==Eo||t==So?B=Xh(e,t,u):(t==Po||t==(eu|Po))&&!i.length?B=Qh(e,t,n,r):B=bc.apply(void 0,S);var H=M?sc:pc;return hc(H(B,S),e,t)}var ug=ag;function cg(e,t,n){t=="__proto__"&&vi?vi(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var fg=cg;function lg(e,t){return e===t||e!==e&&t!==t}var es=lg,dg=Object.prototype,pg=dg.hasOwnProperty;function yg(e,t,n){var r=e[t];(!(pg.call(e,t)&&es(r,n))||n===void 0&&!(t in e))&&fg(e,t,n)}var hg=yg,ru=Math.max;function gg(e,t,n){return t=ru(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=ru(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var u=Array(t+1);++i<t;)u[i]=r[i];return u[t]=n(o),Jo(e,this,u)}}var vc=gg;function mg(e,t){return Zo(vc(e,t,Ci),e+"")}var _c=mg,bg=9007199254740991;function vg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=bg}var ts=vg;function _g(e){return e!=null&&ts(e.length)&&!oc(e)}var Tc=_g,Tg=Object.prototype;function wg(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Tg;return e===n}var Og=wg;function Ag(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Ig=Ag,Eg="[object Arguments]";function Sg(e){return Qt(e)&&zn(e)==Eg}var iu=Sg,wc=Object.prototype,Pg=wc.hasOwnProperty,$g=wc.propertyIsEnumerable,Rg=iu((function(){return arguments})())?iu:function(e){return Qt(e)&&Pg.call(e,"callee")&&!$g.call(e,"callee")},ns=Rg;function Ng(){return!1}var Cg=Ng,Oc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ou=Oc&&typeof module=="object"&&module&&!module.nodeType&&module,xg=ou&&ou.exports===Oc,su=xg?et.Buffer:void 0,Ug=su?su.isBuffer:void 0,jg=Ug||Cg,Lo=jg,Mg="[object Arguments]",Lg="[object Array]",Bg="[object Boolean]",Dg="[object Date]",Fg="[object Error]",kg="[object Function]",Kg="[object Map]",Gg="[object Number]",Vg="[object Object]",zg="[object RegExp]",qg="[object Set]",Wg="[object String]",Hg="[object WeakMap]",Jg="[object ArrayBuffer]",Xg="[object DataView]",Yg="[object Float32Array]",Zg="[object Float64Array]",Qg="[object Int8Array]",em="[object Int16Array]",tm="[object Int32Array]",nm="[object Uint8Array]",rm="[object Uint8ClampedArray]",im="[object Uint16Array]",om="[object Uint32Array]",Se={};Se[Yg]=Se[Zg]=Se[Qg]=Se[em]=Se[tm]=Se[nm]=Se[rm]=Se[im]=Se[om]=!0;Se[Mg]=Se[Lg]=Se[Jg]=Se[Bg]=Se[Xg]=Se[Dg]=Se[Fg]=Se[kg]=Se[Kg]=Se[Gg]=Se[Vg]=Se[zg]=Se[qg]=Se[Wg]=Se[Hg]=!1;function sm(e){return Qt(e)&&ts(e.length)&&!!Se[zn(e)]}var am=sm;function um(e){return function(t){return e(t)}}var Ac=um,Ic=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_r=Ic&&typeof module=="object"&&module&&!module.nodeType&&module,cm=_r&&_r.exports===Ic,$o=cm&&tc.process,fm=(function(){try{var e=_r&&_r.require&&_r.require("util").types;return e||$o&&$o.binding&&$o.binding("util")}catch{}})(),au=fm,uu=au&&au.isTypedArray,lm=uu?Ac(uu):am,Ec=lm,dm=Object.prototype,pm=dm.hasOwnProperty;function ym(e,t){var n=St(e),r=!n&&ns(e),i=!n&&!r&&Lo(e),s=!n&&!r&&!i&&Ec(e),o=n||r||i||s,u=o?Ig(e.length,String):[],f=u.length;for(var c in e)(t||pm.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||xi(c,f)))&&u.push(c);return u}var hm=ym;function gm(e,t){return function(n){return e(t(n))}}var mm=gm,bm=mm(Object.keys,Object),vm=bm,_m=Object.prototype,Tm=_m.hasOwnProperty;function wm(e){if(!Og(e))return vm(e);var t=[];for(var n in Object(e))Tm.call(e,n)&&n!="constructor"&&t.push(n);return t}var Om=wm;function Am(e){return Tc(e)?hm(e):Om(e)}var Sc=Am,Im=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Em=/^\w*$/;function Sm(e,t){if(St(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Kn(e)?!0:Em.test(e)||!Im.test(e)||t!=null&&e in Object(t)}var rs=Sm,Pm=_n(Object,"create"),Ar=Pm;function $m(){this.__data__=Ar?Ar(null):{},this.size=0}var Rm=$m;function Nm(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Cm=Nm,xm="__lodash_hash_undefined__",Um=Object.prototype,jm=Um.hasOwnProperty;function Mm(e){var t=this.__data__;if(Ar){var n=t[e];return n===xm?void 0:n}return jm.call(t,e)?t[e]:void 0}var Lm=Mm,Bm=Object.prototype,Dm=Bm.hasOwnProperty;function Fm(e){var t=this.__data__;return Ar?t[e]!==void 0:Dm.call(t,e)}var km=Fm,Km="__lodash_hash_undefined__";function Gm(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ar&&t===void 0?Km:t,this}var Vm=Gm;function qn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}qn.prototype.clear=Rm;qn.prototype.delete=Cm;qn.prototype.get=Lm;qn.prototype.has=km;qn.prototype.set=Vm;var cu=qn;function zm(){this.__data__=[],this.size=0}var qm=zm;function Wm(e,t){for(var n=e.length;n--;)if(es(e[n][0],t))return n;return-1}var Ui=Wm,Hm=Array.prototype,Jm=Hm.splice;function Xm(e){var t=this.__data__,n=Ui(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Jm.call(t,n,1),--this.size,!0}var Ym=Xm;function Zm(e){var t=this.__data__,n=Ui(t,e);return n<0?void 0:t[n][1]}var Qm=Zm;function eb(e){return Ui(this.__data__,e)>-1}var tb=eb;function nb(e,t){var n=this.__data__,r=Ui(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var rb=nb;function Wn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wn.prototype.clear=qm;Wn.prototype.delete=Ym;Wn.prototype.get=Qm;Wn.prototype.has=tb;Wn.prototype.set=rb;var ji=Wn,ib=_n(et,"Map"),Ir=ib;function ob(){this.size=0,this.__data__={hash:new cu,map:new(Ir||ji),string:new cu}}var sb=ob;function ab(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var ub=ab;function cb(e,t){var n=e.__data__;return ub(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Mi=cb;function fb(e){var t=Mi(this,e).delete(e);return this.size-=t?1:0,t}var lb=fb;function db(e){return Mi(this,e).get(e)}var pb=db;function yb(e){return Mi(this,e).has(e)}var hb=yb;function gb(e,t){var n=Mi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var mb=gb;function Hn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hn.prototype.clear=sb;Hn.prototype.delete=lb;Hn.prototype.get=pb;Hn.prototype.has=hb;Hn.prototype.set=mb;var Li=Hn,bb="Expected a function";function is(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(bb);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(is.Cache||Li),n}is.Cache=Li;var vb=is,_b=500;function Tb(e){var t=vb(e,function(r){return n.size===_b&&n.clear(),r}),n=t.cache;return t}var wb=Tb,Ob=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ab=/\\(\\)?/g,Ib=wb(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ob,function(n,r,i,s){t.push(i?s.replace(Ab,"$1"):r||n)}),t}),Eb=Ib;function Sb(e){return e==null?"":wp(e)}var Pb=Sb;function $b(e,t){return St(e)?e:rs(e,t)?[e]:Eb(Pb(e))}var Bi=$b,Rb=1/0;function Nb(e){if(typeof e=="string"||Kn(e))return e;var t=e+"";return t=="0"&&1/e==-Rb?"-0":t}var $r=Nb;function Cb(e,t){t=Bi(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[$r(t[n++])];return n&&n==r?e:void 0}var os=Cb;function xb(e,t,n){var r=e==null?void 0:os(e,t);return r===void 0?n:r}var Ub=xb;function jb(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Pc=jb,fu=xt?xt.isConcatSpreadable:void 0;function Mb(e){return St(e)||ns(e)||!!(fu&&e&&e[fu])}var Lb=Mb;function $c(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=Lb),i||(i=[]);++s<o;){var u=e[s];t>0&&n(u)?t>1?$c(u,t-1,n,r,i):Pc(i,u):r||(i[i.length]=u)}return i}var Bb=$c;function Db(e){var t=e==null?0:e.length;return t?Bb(e,1):[]}var Fb=Db;function kb(e){return Zo(vc(e,void 0,Fb),e+"")}var Kb=kb;function Gb(){this.__data__=new ji,this.size=0}var Vb=Gb;function zb(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var qb=zb;function Wb(e){return this.__data__.get(e)}var Hb=Wb;function Jb(e){return this.__data__.has(e)}var Xb=Jb,Yb=200;function Zb(e,t){var n=this.__data__;if(n instanceof ji){var r=n.__data__;if(!Ir||r.length<Yb-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Li(r)}return n.set(e,t),this.size=n.size,this}var Qb=Zb;function Jn(e){var t=this.__data__=new ji(e);this.size=t.size}Jn.prototype.clear=Vb;Jn.prototype.delete=qb;Jn.prototype.get=Hb;Jn.prototype.has=Xb;Jn.prototype.set=Qb;var ci=Jn;function ev(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}var tv=ev;function nv(){return[]}var rv=nv,iv=Object.prototype,ov=iv.propertyIsEnumerable,lu=Object.getOwnPropertySymbols,sv=lu?function(e){return e==null?[]:(e=Object(e),tv(lu(e),function(t){return ov.call(e,t)}))}:rv,av=sv;function uv(e,t,n){var r=t(e);return St(e)?r:Pc(r,n(e))}var cv=uv;function fv(e){return cv(e,Sc,av)}var du=fv,lv=_n(et,"DataView"),Bo=lv,dv=_n(et,"Promise"),Do=dv,pv=_n(et,"Set"),kn=pv,pu="[object Map]",yv="[object Object]",yu="[object Promise]",hu="[object Set]",gu="[object WeakMap]",mu="[object DataView]",hv=vn(Bo),gv=vn(Ir),mv=vn(Do),bv=vn(kn),vv=vn(Tr),mn=zn;(Bo&&mn(new Bo(new ArrayBuffer(1)))!=mu||Ir&&mn(new Ir)!=pu||Do&&mn(Do.resolve())!=yu||kn&&mn(new kn)!=hu||Tr&&mn(new Tr)!=gu)&&(mn=function(e){var t=zn(e),n=t==yv?e.constructor:void 0,r=n?vn(n):"";if(r)switch(r){case hv:return mu;case gv:return pu;case mv:return yu;case bv:return hu;case vv:return gu}return t});var bu=mn,_v=et.Uint8Array,vu=_v,Tv="__lodash_hash_undefined__";function wv(e){return this.__data__.set(e,Tv),this}var Ov=wv;function Av(e){return this.__data__.has(e)}var Iv=Av;function _i(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Li;++t<n;)this.add(e[t])}_i.prototype.add=_i.prototype.push=Ov;_i.prototype.has=Iv;var Rc=_i;function Ev(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Sv=Ev;function Pv(e,t){return e.has(t)}var Nc=Pv,$v=1,Rv=2;function Nv(e,t,n,r,i,s){var o=n&$v,u=e.length,f=t.length;if(u!=f&&!(o&&f>u))return!1;var c=s.get(e),h=s.get(t);if(c&&h)return c==t&&h==e;var m=-1,M=!0,S=n&Rv?new Rc:void 0;for(s.set(e,t),s.set(t,e);++m<u;){var B=e[m],H=t[m];if(r)var Q=o?r(H,B,m,t,e,s):r(B,H,m,e,t,s);if(Q!==void 0){if(Q)continue;M=!1;break}if(S){if(!Sv(t,function(K,D){if(!Nc(S,D)&&(B===K||i(B,K,n,r,s)))return S.push(D)})){M=!1;break}}else if(!(B===H||i(B,H,n,r,s))){M=!1;break}}return s.delete(e),s.delete(t),M}var Cc=Nv;function Cv(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var xv=Cv;function Uv(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var xc=Uv,jv=1,Mv=2,Lv="[object Boolean]",Bv="[object Date]",Dv="[object Error]",Fv="[object Map]",kv="[object Number]",Kv="[object RegExp]",Gv="[object Set]",Vv="[object String]",zv="[object Symbol]",qv="[object ArrayBuffer]",Wv="[object DataView]",_u=xt?xt.prototype:void 0,Ro=_u?_u.valueOf:void 0;function Hv(e,t,n,r,i,s,o){switch(n){case Wv:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case qv:return!(e.byteLength!=t.byteLength||!s(new vu(e),new vu(t)));case Lv:case Bv:case kv:return es(+e,+t);case Dv:return e.name==t.name&&e.message==t.message;case Kv:case Vv:return e==t+"";case Fv:var u=xv;case Gv:var f=r&jv;if(u||(u=xc),e.size!=t.size&&!f)return!1;var c=o.get(e);if(c)return c==t;r|=Mv,o.set(e,t);var h=Cc(u(e),u(t),r,i,s,o);return o.delete(e),h;case zv:if(Ro)return Ro.call(e)==Ro.call(t)}return!1}var Jv=Hv,Xv=1,Yv=Object.prototype,Zv=Yv.hasOwnProperty;function Qv(e,t,n,r,i,s){var o=n&Xv,u=du(e),f=u.length,c=du(t),h=c.length;if(f!=h&&!o)return!1;for(var m=f;m--;){var M=u[m];if(!(o?M in t:Zv.call(t,M)))return!1}var S=s.get(e),B=s.get(t);if(S&&B)return S==t&&B==e;var H=!0;s.set(e,t),s.set(t,e);for(var Q=o;++m<f;){M=u[m];var K=e[M],D=t[M];if(r)var V=o?r(D,K,M,t,e,s):r(K,D,M,e,t,s);if(!(V===void 0?K===D||i(K,D,n,r,s):V)){H=!1;break}Q||(Q=M=="constructor")}if(H&&!Q){var q=e.constructor,F=t.constructor;q!=F&&"constructor"in e&&"constructor"in t&&!(typeof q=="function"&&q instanceof q&&typeof F=="function"&&F instanceof F)&&(H=!1)}return s.delete(e),s.delete(t),H}var e_=Qv,t_=1,Tu="[object Arguments]",wu="[object Array]",ui="[object Object]",n_=Object.prototype,Ou=n_.hasOwnProperty;function r_(e,t,n,r,i,s){var o=St(e),u=St(t),f=o?wu:bu(e),c=u?wu:bu(t);f=f==Tu?ui:f,c=c==Tu?ui:c;var h=f==ui,m=c==ui,M=f==c;if(M&&Lo(e)){if(!Lo(t))return!1;o=!0,h=!1}if(M&&!h)return s||(s=new ci),o||Ec(e)?Cc(e,t,n,r,i,s):Jv(e,t,f,n,r,i,s);if(!(n&t_)){var S=h&&Ou.call(e,"__wrapped__"),B=m&&Ou.call(t,"__wrapped__");if(S||B){var H=S?e.value():e,Q=B?t.value():t;return s||(s=new ci),i(H,Q,n,r,s)}}return M?(s||(s=new ci),e_(e,t,n,r,i,s)):!1}var i_=r_;function Uc(e,t,n,r,i){return e===t?!0:e==null||t==null||!Qt(e)&&!Qt(t)?e!==e&&t!==t:i_(e,t,n,r,Uc,i)}var jc=Uc,o_=1,s_=2;function a_(e,t,n,r){var i=n.length,s=i,o=!r;if(e==null)return!s;for(e=Object(e);i--;){var u=n[i];if(o&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<s;){u=n[i];var f=u[0],c=e[f],h=u[1];if(o&&u[2]){if(c===void 0&&!(f in e))return!1}else{var m=new ci;if(r)var M=r(c,h,f,e,t,m);if(!(M===void 0?jc(h,c,o_|s_,r,m):M))return!1}}return!0}var u_=a_;function c_(e){return e===e&&!kt(e)}var Mc=c_;function f_(e){for(var t=Sc(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Mc(i)]}return t}var l_=f_;function d_(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var Lc=d_;function p_(e){var t=l_(e);return t.length==1&&t[0][2]?Lc(t[0][0],t[0][1]):function(n){return n===e||u_(n,e,t)}}var y_=p_;function h_(e,t){return e!=null&&t in Object(e)}var g_=h_;function m_(e,t,n){t=Bi(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=$r(t[r]);if(!(s=e!=null&&n(e,o)))break;e=e[o]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&ts(i)&&xi(o,i)&&(St(e)||ns(e)))}var b_=m_;function v_(e,t){return e!=null&&b_(e,t,g_)}var Bc=v_,__=1,T_=2;function w_(e,t){return rs(e)&&Mc(t)?Lc($r(e),t):function(n){var r=Ub(n,e);return r===void 0&&r===t?Bc(n,e):jc(t,r,__|T_)}}var O_=w_;function A_(e){return function(t){return t?.[e]}}var I_=A_;function E_(e){return function(t){return os(t,e)}}var S_=E_;function P_(e){return rs(e)?I_($r(e)):S_(e)}var $_=P_;function R_(e){return typeof e=="function"?e:e==null?Ci:typeof e=="object"?St(e)?O_(e[0],e[1]):y_(e):$_(e)}var N_=R_;function C_(e){return Qt(e)&&Tc(e)}var x_=C_;function U_(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var j_=U_,M_=200;function L_(e,t,n,r){var i=-1,s=yc,o=!0,u=e.length,f=[],c=t.length;if(!u)return f;n&&(t=rc(t,Ac(n))),r?(s=j_,o=!1):t.length>=M_&&(s=Nc,o=!1,t=new Rc(t));e:for(;++i<u;){var h=e[i],m=n==null?h:n(h);if(h=r||h!==0?h:0,o&&m===m){for(var M=c;M--;)if(t[M]===m)continue e;f.push(h)}else s(t,m,r)||f.push(h)}return f}var B_=L_;function D_(e,t,n,r){if(!kt(e))return e;t=Bi(t,e);for(var i=-1,s=t.length,o=s-1,u=e;u!=null&&++i<s;){var f=$r(t[i]),c=n;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(i!=o){var h=u[f];c=r?r(h,f,u):void 0,c===void 0&&(c=kt(h)?h:xi(t[i+1])?[]:{})}hg(u,f,c),u=u[f]}return e}var F_=D_;function k_(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],u=os(e,o);n(u,o)&&F_(s,Bi(o,e),u)}return s}var K_=k_,G_=32,ss=_c(function(e,t){var n=Or(t,Qo(ss));return ug(e,G_,void 0,t,n)});ss.placeholder={};var V_=ss;function z_(e,t){return K_(e,t,function(n,r){return Bc(e,r)})}var q_=z_,W_=Kb(function(e,t){return e==null?{}:q_(e,t)}),Au=W_,H_=4294967295,J_=H_-1,X_=Math.floor,Y_=Math.min;function Z_(e,t,n,r){var i=0,s=e==null?0:e.length;if(s===0)return 0;t=n(t);for(var o=t!==t,u=t===null,f=Kn(t),c=t===void 0;i<s;){var h=X_((i+s)/2),m=n(e[h]),M=m!==void 0,S=m===null,B=m===m,H=Kn(m);if(o)var Q=r||B;else c?Q=B&&(r||M):u?Q=B&&M&&(r||!S):f?Q=B&&M&&!S&&(r||!H):S||H?Q=!1:Q=r?m<=t:m<t;Q?i=h+1:s=h}return Y_(s,J_)}var Q_=Z_;function eT(e,t,n){return Q_(e,t,N_(n,2))}var tT=eT,nT=1/0,zO=kn&&1/xc(new kn([,-0]))[1]==nT?function(e){return new kn(e)}:cc;var rT=_c(function(e,t){return x_(e)?B_(e,t):[]}),Iu=rT,Dc=Ht(Wd(),1),qO=Dc.default.configure,Ti=Dc.default,No=100,{WARN:iT,LOG:WO,DEBUG:je,VERBOSE:be,ERROR:HO}=Me.setup(Me.INFO),wi=Pe.set();Ea({enforceActions:"always"});if(!new class{xyz}().hasOwnProperty("xyz"))throw new Error("Transpiler is not configured correctly");var Fc=({caller:e,thread:t,pattern:n,args:r})=>Ne(()=>(r=r||n,`${!Array.isArray(t)&&t?.name?t.name+" | ":""}${e??"caller?"}${r?`{${typeof r=="string"?r:Ti(r)}}`:""}`));function JO(e,t){return Ne(()=>ze.structural(e.get(),t.get()))}function as(e,t){return ze.shallow(e.applogs,t.applogs)}function XO(e,t){if(e.size!==t.size)return!1;for(let n=0;n<e.size;n++){let r=e.nodes[n],i=t.nodes[n];if(be.isEnabled&&be("queryNodesComparer",n,r,i),!ze.structural(r.variables,i.variables))return be.isEnabled&&be("[queryNodesComparer] changed vars:",n,r,i),!1;if(!as(r.logsOfThisNode,i.logsOfThisNode))return be.isEnabled&&be("[queryNodesComparer] changed logsOfThisNode:",n,r,i),!1}return be.isEnabled&&be("[queryNodesComparer] equal:",{a:e,b:t}),!0}var oT=0;function YO(e,{name:t,equals:n}={}){let r=`observableArrayMap@${++oT}{${t}}`;be.isEnabled&&be(`[${r}] create`,{fnname:e.name,fn:e,name:t,equals:n});let i,s=kc(e,u=>{i?Ne(()=>(n??ze.structural)(i,u))?je.isEnabled&&je(`[${r}] update skipped`,{updatedItems:u,observableArr:i}):(i.replace(u),je.isEnabled&&je(`[${r}] updated`,{updatedItems:u,observableArr:i})):i=Pe.array(u,{deep:!1,name:t,equals:n})},{name:r});if(r.includes("useRoots")){var o=lt(i);je(`[${r}] deps`,{disposeAutorun:s,rootsAtom:o,observableArr:i,observers:dr(i)}),Mn(()=>wi.add(o))}return be.isEnabled&&ai(i,()=>{be(`[${r}] observed`,dr(i),{rootsAtom:o,observableArr:i})}),pn(i,()=>{be.isEnabled&&be(`[${r}] dispose`),o&&Mn(()=>wi.delete(o)),s()}),i}var sT=0;function ZO(e,{name:t}={}){let n=`observableSetMap@${++sT}{${t}}`;be.isEnabled&&be(`[${n}] create`,{fnname:e.name,fn:e,name:t});let r,i=kc(e,o=>{if(!r)r=Pe.set(o,{deep:!1,name:t});else{let{deleted:u,added:f}=Ne(()=>{let c=new Set(r.values()),h=new Set;for(let m of o)r.has(m)?(be.isEnabled&&be(`[${n}] unchanged`,m,{updatedItems:o,observableSet:r}),c.delete(m)):h.add(m);return je.isEnabled&&je(`[${n}] updated:`,{unseen:c,added:h,updatedItems:o,observableSet:r}),{added:h,deleted:c}});for(let c of u)r.delete(c);for(let c of f)r.add(c)}},{name:n});if(n.includes("useRoots")){var s=lt(r);je.isEnabled&&je(`[${n}] deps`,{disposeAutorun:i,rootsAtom:s,observableSet:r,observers:dr(r)}),Mn(()=>wi.add(s))}return be.isEnabled&&ai(r,()=>{be(`[${n}] observed`,dr(r),{rootsAtom:s,observableSet:r})}),pn(r,()=>{be.isEnabled&&be(`[${n}] dispose`),s&&Mn(()=>wi.delete(s)),i()}),r}function kc(e,t=null,{name:n}={}){je.isEnabled&&je("[autorunButAlsoImmediately] create",{fnname:e.name,fn:e,name:n});let r=`${n}.autorunImm`,i,s=new Ot(r,function(...c){je.isEnabled&&je(`[${r}] reaction.invalidate`,c),o()});function o(){s.track(function(){let c=No&&performance.now();je.isEnabled&&je(`[${r}] runAndTrack:`,{name:n??e.name,fn:e}),i=e(),je.isEnabled&&je(`[${r}] runAndTrack =>`,i),Mn(()=>{t?.(i)}),No&&performance.now()-c>No&&iT(`[${r}] took ${performance.now()-c}ms`)})}return o(),je.isEnabled&&je(`[${r}] deps of reaction`,{reaction:s,result:i,deps:lr(s)}),()=>{be.isEnabled&&be(`[${r}] dispose`),setTimeout(()=>s.dispose())}}function us(e,t,n=!1){if(zt(t))throw new Error("computedFnDeepCompare shouldn't be used on actions");let r=!1,i=0,s=typeof n=="boolean"?{keepAlive:n}:n,o=new Map;return function(...u){let f,c=Ne(()=>{let S=u;for(let B=0;B<u.length;B++)u[B]instanceof Gn&&u===S&&(S=u.slice());return S}),h=`computedFnDeepCompare(${e||t.name}#${++i})${s.argsDebugName?`{${s.argsDebugName(...u)}}`:""}`;for(let[S,B]of o.entries())if(uT(S,c)){f=B;break}else if(be.isEnabled)for(let H=0;H<S.length;H++)S[H]instanceof Gn&&S[H].name===u[H].name&&ze.structural(Iu(S,S[H]),Iu(c,c[H]))&&be.force(`[${h}] threadState mismatch => cachebust`,{diffFields:Object.keys(S[H]).filter(Q=>!ze.structural(S[H][Q],u[H][Q])),cacheArg:S[H],freshArg:u[H]});if(f){let S=f.get();return be.isEnabled&&be(`[${h}] cache hit`,{untrackedArgs:c,cachedResult:S}),S}if(!s.keepAlive&&!ua())return!r&&da().computedRequiresReaction&&(console.warn("invoking a computedFn from outside an reactive context won't be memoized, unless keepAlive is set"),r=!0),t.apply(this,u);be.isEnabled&&be(`[${h}] new computation`,{untrackedArgs:c});let m,M=pt(()=>(be.isEnabled&&be(`[${h}] update->rerun`,Ne(()=>({args:u})),t),be.isEnabled&&ho(),m=t.apply(this,u)),{...s,name:h});if(be.isEnabled&&be(`[${h}] deps`,lr(M),{untrackedArgs:c}),o.set(c,M),!s.keepAlive){let S=pn(M,()=>{be.isEnabled&&be(`[${h}] dispose`,M),S(),o.delete(c),s.onCleanup&&s.onCleanup(m,...u),m=void 0})}return M.get()}}function aT(e){let t=0,n="",r=0;for(let i=0;i<e.length;i++){let s=e[i];s==="("?n+=s+`
57
+ `+" ".repeat(++t):s===")"?n+=`
58
+ `+" ".repeat(--t)+s:s===","&&r===0?n+=s+`
59
+ `+" ".repeat(t):s==="{"&&r===0?(r++,n+=s+`
60
+ `+" ".repeat(t+1)):s==="}"&&r===1?(r--,n+=`
61
+ `+" ".repeat(t)+s):s==="{"&&r>0?(r++,n+=s):(s==="}"&&r>1&&r--,n+=s)}return n}function uT(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]instanceof Gn){if(t[n]!==e[n])return!1}else if(!ze.structural(e[n],t[n]))return!1;return!0}var{WARN:Eu,LOG:QO,DEBUG:cT,VERBOSE:eA,ERROR:hn}=Me.setup(Me.INFO,{prefix:"[thread]"});function Er(e){return e.init!==void 0}var Gn=class{constructor(e,t,n,r=[],i={}){this.name=e,this._applogs=r,this.parents=t===null?null:Ba(t),this.filters=n,Ne(()=>this.parents?.length===0)&&Eu("[Thread] empty parents array",e),i.skipObservable||hr(this,{applogsCids:pt,applogsByCid:pt,insert:at,size:pt,isEmpty:pt,firstLog:pt,latestLog:pt},{name:`Thread{${e}}`})}filters;parents;_subscribers=[];get readOnly(){return this.parents.length!==1?!0:this.parents[0].readOnly}insert(e){if(this.readOnly)throw hn("[Thread] insert() called on read-only thread:",this.nameAndSizeUntracked);if(!this.parents)throw hn("[Thread] insert() called on non-writable thread without parents:",this.nameAndSizeUntracked);if(this.parents?.length!==1)throw hn("[Thread] insert() called on thread with multiple parents:",this.nameAndSizeUntracked);return this.parents[0].insert(e)}insertRaw(e){if(this.readOnly)throw hn("[Thread] insertRaw() called on read-only thread:",this.nameAndSizeUntracked);if(!this.parents)throw hn("[Thread] insertRaw() called on non-writable thread without parents:",this.nameAndSizeUntracked);if(this.parents?.length!==1)throw hn("[Thread] insertRaw() called on thread with multiple parents:",this.nameAndSizeUntracked);return this.parents[0].insertRaw(e)}subscribe(e){return this._subscribers.push(e),this.unsubscribe.bind(this,e)}unsubscribe(e){let t=this._subscribers.indexOf(e);t!==-1?this._subscribers.splice(t,1):Eu("unsubscribe called for non-existent",e)}notifySubscribers(e){cT(`[thread: ${this.name}] notifying`,this._subscribers.length,"subscribers of",{...e,subs:this._subscribers});for(let t of this._subscribers)t(e)}get applogs(){return this._applogs}get applogsCids(){return this._applogs.map(e=>e.cid)}map(e){return this.applogs.map(e)}get findLast(){return this.applogs.findLast.bind(this.applogs)}get findFirst(){return this.applogs.find.bind(this.applogs)}get firstLog(){return this.applogs[0]}get latestLog(){return this.applogs[this.applogs.length-1]}hasApplog(e,t){if(t)return this.applogs.includes(e);if(!e.cid)throw hn("[hasApplogs] applog without CID:",e);return this.hasApplogCid(e.cid)}hasApplogCid(e){return this.applogsCids.includes(e.toString())}get applogsByCid(){return new Map(this.applogs.map(e=>[e.cid,e]))}getApplog(e){return this.applogsByCid.get(e.toString())}hasApplogWithDiffTs(e){return this.applogs.find(t=>t.en===e.en&&t.at===e.at&&t.vl===e.vl&&t.ag===e.ag)}get isEmpty(){return this.size===0}get size(){return this.applogs.length}get length(){return this.applogs.length}get untrackedSize(){return Ne(()=>this.size)}get nameAndSizeUntracked(){return Ne(()=>`${this.name} (${this.size})`)}get prettyName(){return aT(this.name)}get hasParents(){return!!this.parents?.length}};var tA=class Kc extends Gn{static fromArray(t,n){return new Kc(n||"static",null,[],t)}constructor(t,n,r,i){super(t,n,r,i,{skipObservable:!0})}get readOnly(){return!0}},fT={};wo(fT,{code:()=>cf,decode:()=>ff,encode:()=>Os,format:()=>Lu,name:()=>Tw,parse:()=>Ow,stringify:()=>Lu});var lT=["string","number","bigint","symbol"],dT=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function pT(e){if(e===null)return"null";if(e===void 0)return"undefined";if(e===!0||e===!1)return"boolean";let t=typeof e;if(lT.includes(t))return t;if(t==="function")return"Function";if(Array.isArray(e))return"Array";if(yT(e))return"Buffer";let n=hT(e);return n||"Object"}function yT(e){return e&&e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer.call(null,e)}function hT(e){let t=Object.prototype.toString.call(e).slice(8,-1);if(dT.includes(t))return t}var U=class{constructor(e,t,n){this.major=e,this.majorEncoded=e<<5,this.name=t,this.terminal=n}toString(){return`Type[${this.major}].${this.name}`}compare(e){return this.major<e.major?-1:this.major>e.major?1:0}};U.uint=new U(0,"uint",!0);U.negint=new U(1,"negint",!0);U.bytes=new U(2,"bytes",!0);U.string=new U(3,"string",!0);U.array=new U(4,"array",!1);U.map=new U(5,"map",!1);U.tag=new U(6,"tag",!1);U.float=new U(7,"float",!0);U.false=new U(7,"false",!0);U.true=new U(7,"true",!0);U.null=new U(7,"null",!0);U.undefined=new U(7,"undefined",!0);U.break=new U(7,"break",!0);var re=class{constructor(e,t,n){this.type=e,this.value=t,this.encodedLength=n,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}},Xn=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",gT=new TextDecoder,mT=new TextEncoder;function Oi(e){return Xn&&globalThis.Buffer.isBuffer(e)}function cs(e){return e instanceof Uint8Array?Oi(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e:Uint8Array.from(e)}var bT=Xn?((e,t,n)=>n-t>64?globalThis.Buffer.from(e.subarray(t,n)).toString("utf8"):Pu(e,t,n)):((e,t,n)=>n-t>64?gT.decode(e.subarray(t,n)):Pu(e,t,n)),Gc=Xn?(e=>e.length>64?globalThis.Buffer.from(e):Su(e)):(e=>e.length>64?mT.encode(e):Su(e)),fs=Xn?((e,t,n)=>Oi(e)?new Uint8Array(e.subarray(t,n)):e.slice(t,n)):((e,t,n)=>e.slice(t,n)),vT=Xn?((e,t)=>(e=e.map(n=>n instanceof Uint8Array?n:globalThis.Buffer.from(n)),cs(globalThis.Buffer.concat(e,t)))):((e,t)=>{let n=new Uint8Array(t),r=0;for(let i of e)r+i.length>n.length&&(i=i.subarray(0,n.length-r)),n.set(i,r),r+=i.length;return n}),_T=Xn?(e=>globalThis.Buffer.allocUnsafe(e)):(e=>new Uint8Array(e));function TT(e,t){if(Oi(e)&&Oi(t))return e.compare(t);for(let n=0;n<e.length;n++)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return 0}function Su(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t}function Pu(e,t,n){let r=[];for(;t<n;){let i=e[t],s=null,o=i>239?4:i>223?3:i>191?2:1;if(t+o<=n){let u,f,c,h;switch(o){case 1:i<128&&(s=i);break;case 2:u=e[t+1],(u&192)===128&&(h=(i&31)<<6|u&63,h>127&&(s=h));break;case 3:u=e[t+1],f=e[t+2],(u&192)===128&&(f&192)===128&&(h=(i&15)<<12|(u&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=e[t+1],f=e[t+2],c=e[t+3],(u&192)===128&&(f&192)===128&&(c&192)===128&&(h=(i&15)<<18|(u&63)<<12|(f&63)<<6|c&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,o=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|s&1023),r.push(s),t+=o}return Vc(r)}var $u=4096;function Vc(e){let t=e.length;if(t<=$u)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=$u));return n}var wT=256,zc=class{constructor(e=wT){this.chunkSize=e,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),this._initReuseChunk!==null&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(e){let t=this.chunks[this.chunks.length-1];if(this.cursor+e.length<=this.maxCursor+1){let r=t.length-(this.maxCursor-this.cursor)-1;t.set(e,r)}else{if(t){let r=t.length-(this.maxCursor-this.cursor)-1;r<t.length&&(this.chunks[this.chunks.length-1]=t.subarray(0,r),this.maxCursor=this.cursor-1)}e.length<64&&e.length<this.chunkSize?(t=_T(this.chunkSize),this.chunks.push(t),this.maxCursor+=t.length,this._initReuseChunk===null&&(this._initReuseChunk=t),t.set(e,0)):(this.chunks.push(e),this.maxCursor+=e.length)}this.cursor+=e.length}toBytes(e=!1){let t;if(this.chunks.length===1){let n=this.chunks[0];e&&this.cursor>n.length/2?(t=this.cursor===n.length?n:n.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):t=fs(n,0,this.cursor)}else t=vT(this.chunks,this.cursor);return e&&this.reset(),t}},de="CBOR decode error:",bn="CBOR encode error:",Rr=[];Rr[23]=1;Rr[24]=2;Rr[25]=3;Rr[26]=5;Rr[27]=9;function Yn(e,t,n){if(e.length-t<n)throw new Error(`${de} not enough data for type`)}var Fe=[24,256,65536,4294967296,BigInt("18446744073709551616")];function Tn(e,t,n){Yn(e,t,1);let r=e[t];if(n.strict===!0&&r<Fe[0])throw new Error(`${de} integer encoded in more bytes than necessary (strict decode)`);return r}function wn(e,t,n){Yn(e,t,2);let r=e[t]<<8|e[t+1];if(n.strict===!0&&r<Fe[1])throw new Error(`${de} integer encoded in more bytes than necessary (strict decode)`);return r}function On(e,t,n){Yn(e,t,4);let r=e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3];if(n.strict===!0&&r<Fe[2])throw new Error(`${de} integer encoded in more bytes than necessary (strict decode)`);return r}function An(e,t,n){Yn(e,t,8);let r=e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3],i=e[t+4]*16777216+(e[t+5]<<16)+(e[t+6]<<8)+e[t+7],s=(BigInt(r)<<BigInt(32))+BigInt(i);if(n.strict===!0&&s<Fe[3])throw new Error(`${de} integer encoded in more bytes than necessary (strict decode)`);if(s<=Number.MAX_SAFE_INTEGER)return Number(s);if(n.allowBigInt===!0)return s;throw new Error(`${de} integers outside of the safe integer range are not supported`)}function OT(e,t,n,r){return new re(U.uint,Tn(e,t+1,r),2)}function AT(e,t,n,r){return new re(U.uint,wn(e,t+1,r),3)}function IT(e,t,n,r){return new re(U.uint,On(e,t+1,r),5)}function ET(e,t,n,r){return new re(U.uint,An(e,t+1,r),9)}function In(e,t){return gt(e,0,t.value)}function gt(e,t,n){if(n<Fe[0]){let r=Number(n);e.push([t|r])}else if(n<Fe[1]){let r=Number(n);e.push([t|24,r])}else if(n<Fe[2]){let r=Number(n);e.push([t|25,r>>>8,r&255])}else if(n<Fe[3]){let r=Number(n);e.push([t|26,r>>>24&255,r>>>16&255,r>>>8&255,r&255])}else{let r=BigInt(n);if(r<Fe[4]){let i=[t|27,0,0,0,0,0,0,0],s=Number(r&BigInt(4294967295)),o=Number(r>>BigInt(32)&BigInt(4294967295));i[8]=s&255,s=s>>8,i[7]=s&255,s=s>>8,i[6]=s&255,s=s>>8,i[5]=s&255,i[4]=o&255,o=o>>8,i[3]=o&255,o=o>>8,i[2]=o&255,o=o>>8,i[1]=o&255,e.push(i)}else throw new Error(`${de} encountered BigInt larger than allowable range`)}}In.encodedSize=function(t){return gt.encodedSize(t.value)};gt.encodedSize=function(t){return t<Fe[0]?1:t<Fe[1]?2:t<Fe[2]?3:t<Fe[3]?5:9};In.compareTokens=function(t,n){return t.value<n.value?-1:t.value>n.value?1:0};function ST(e,t,n,r){return new re(U.negint,-1-Tn(e,t+1,r),2)}function PT(e,t,n,r){return new re(U.negint,-1-wn(e,t+1,r),3)}function $T(e,t,n,r){return new re(U.negint,-1-On(e,t+1,r),5)}var ls=BigInt(-1),qc=BigInt(1);function RT(e,t,n,r){let i=An(e,t+1,r);if(typeof i!="bigint"){let s=-1-i;if(s>=Number.MIN_SAFE_INTEGER)return new re(U.negint,s,9)}if(r.allowBigInt!==!0)throw new Error(`${de} integers outside of the safe integer range are not supported`);return new re(U.negint,ls-BigInt(i),9)}function ds(e,t){let n=t.value,r=typeof n=="bigint"?n*ls-qc:n*-1-1;gt(e,t.type.majorEncoded,r)}ds.encodedSize=function(t){let n=t.value,r=typeof n=="bigint"?n*ls-qc:n*-1-1;return r<Fe[0]?1:r<Fe[1]?2:r<Fe[2]?3:r<Fe[3]?5:9};ds.compareTokens=function(t,n){return t.value<n.value?1:t.value>n.value?-1:0};function Nr(e,t,n,r){Yn(e,t,n+r);let i=fs(e,t+n,t+n+r);return new re(U.bytes,i,n+r)}function NT(e,t,n,r){return Nr(e,t,1,n)}function CT(e,t,n,r){return Nr(e,t,2,Tn(e,t+1,r))}function xT(e,t,n,r){return Nr(e,t,3,wn(e,t+1,r))}function UT(e,t,n,r){return Nr(e,t,5,On(e,t+1,r))}function jT(e,t,n,r){let i=An(e,t+1,r);if(typeof i=="bigint")throw new Error(`${de} 64-bit integer bytes lengths not supported`);return Nr(e,t,9,i)}function Ai(e){return e.encodedBytes===void 0&&(e.encodedBytes=e.type===U.string?Gc(e.value):e.value),e.encodedBytes}function Di(e,t){let n=Ai(t);gt(e,t.type.majorEncoded,n.length),e.push(n)}Di.encodedSize=function(t){let n=Ai(t);return gt.encodedSize(n.length)+n.length};Di.compareTokens=function(t,n){return MT(Ai(t),Ai(n))};function MT(e,t){return e.length<t.length?-1:e.length>t.length?1:TT(e,t)}function Cr(e,t,n,r,i){let s=n+r;Yn(e,t,s);let o=new re(U.string,bT(e,t+n,t+s),s);return i.retainStringBytes===!0&&(o.byteValue=fs(e,t+n,t+s)),o}function LT(e,t,n,r){return Cr(e,t,1,n,r)}function BT(e,t,n,r){return Cr(e,t,2,Tn(e,t+1,r),r)}function DT(e,t,n,r){return Cr(e,t,3,wn(e,t+1,r),r)}function FT(e,t,n,r){return Cr(e,t,5,On(e,t+1,r),r)}function kT(e,t,n,r){let i=An(e,t+1,r);if(typeof i=="bigint")throw new Error(`${de} 64-bit integer string lengths not supported`);return Cr(e,t,9,i,r)}var KT=Di;function Zn(e,t,n,r){return new re(U.array,r,n)}function GT(e,t,n,r){return Zn(e,t,1,n)}function VT(e,t,n,r){return Zn(e,t,2,Tn(e,t+1,r))}function zT(e,t,n,r){return Zn(e,t,3,wn(e,t+1,r))}function qT(e,t,n,r){return Zn(e,t,5,On(e,t+1,r))}function WT(e,t,n,r){let i=An(e,t+1,r);if(typeof i=="bigint")throw new Error(`${de} 64-bit integer array lengths not supported`);return Zn(e,t,9,i)}function HT(e,t,n,r){if(r.allowIndefinite===!1)throw new Error(`${de} indefinite length items not allowed`);return Zn(e,t,1,1/0)}function ps(e,t){gt(e,U.array.majorEncoded,t.value)}ps.compareTokens=In.compareTokens;ps.encodedSize=function(t){return gt.encodedSize(t.value)};function Qn(e,t,n,r){return new re(U.map,r,n)}function JT(e,t,n,r){return Qn(e,t,1,n)}function XT(e,t,n,r){return Qn(e,t,2,Tn(e,t+1,r))}function YT(e,t,n,r){return Qn(e,t,3,wn(e,t+1,r))}function ZT(e,t,n,r){return Qn(e,t,5,On(e,t+1,r))}function QT(e,t,n,r){let i=An(e,t+1,r);if(typeof i=="bigint")throw new Error(`${de} 64-bit integer map lengths not supported`);return Qn(e,t,9,i)}function e0(e,t,n,r){if(r.allowIndefinite===!1)throw new Error(`${de} indefinite length items not allowed`);return Qn(e,t,1,1/0)}function ys(e,t){gt(e,U.map.majorEncoded,t.value)}ys.compareTokens=In.compareTokens;ys.encodedSize=function(t){return gt.encodedSize(t.value)};function t0(e,t,n,r){return new re(U.tag,n,1)}function n0(e,t,n,r){return new re(U.tag,Tn(e,t+1,r),2)}function r0(e,t,n,r){return new re(U.tag,wn(e,t+1,r),3)}function i0(e,t,n,r){return new re(U.tag,On(e,t+1,r),5)}function o0(e,t,n,r){return new re(U.tag,An(e,t+1,r),9)}function hs(e,t){gt(e,U.tag.majorEncoded,t.value)}hs.compareTokens=In.compareTokens;hs.encodedSize=function(t){return gt.encodedSize(t.value)};var s0=20,a0=21,u0=22,c0=23;function f0(e,t,n,r){if(r.allowUndefined===!1)throw new Error(`${de} undefined values are not supported`);return r.coerceUndefinedToNull===!0?new re(U.null,null,1):new re(U.undefined,void 0,1)}function l0(e,t,n,r){if(r.allowIndefinite===!1)throw new Error(`${de} indefinite length items not allowed`);return new re(U.break,void 0,1)}function gs(e,t,n){if(n){if(n.allowNaN===!1&&Number.isNaN(e))throw new Error(`${de} NaN values are not supported`);if(n.allowInfinity===!1&&(e===1/0||e===-1/0))throw new Error(`${de} Infinity values are not supported`)}return new re(U.float,e,t)}function d0(e,t,n,r){return gs(bs(e,t+1),3,r)}function p0(e,t,n,r){return gs(vs(e,t+1),5,r)}function y0(e,t,n,r){return gs(Xc(e,t+1),9,r)}function ms(e,t,n){let r=t.value;if(r===!1)e.push([U.float.majorEncoded|s0]);else if(r===!0)e.push([U.float.majorEncoded|a0]);else if(r===null)e.push([U.float.majorEncoded|u0]);else if(r===void 0)e.push([U.float.majorEncoded|c0]);else{let i,s=!1;(!n||n.float64!==!0)&&(Hc(r),i=bs(Et,1),r===i||Number.isNaN(r)?(Et[0]=249,e.push(Et.slice(0,3)),s=!0):(Jc(r),i=vs(Et,1),r===i&&(Et[0]=250,e.push(Et.slice(0,5)),s=!0))),s||(h0(r),i=Xc(Et,1),Et[0]=251,e.push(Et.slice(0,9)))}}ms.encodedSize=function(t,n){let r=t.value;if(r===!1||r===!0||r===null||r===void 0)return 1;if(!n||n.float64!==!0){Hc(r);let i=bs(Et,1);if(r===i||Number.isNaN(r))return 3;if(Jc(r),i=vs(Et,1),r===i)return 5}return 9};var Wc=new ArrayBuffer(9),yt=new DataView(Wc,1),Et=new Uint8Array(Wc,0);function Hc(e){if(e===1/0)yt.setUint16(0,31744,!1);else if(e===-1/0)yt.setUint16(0,64512,!1);else if(Number.isNaN(e))yt.setUint16(0,32256,!1);else{yt.setFloat32(0,e);let t=yt.getUint32(0),n=(t&2139095040)>>23,r=t&8388607;if(n===255)yt.setUint16(0,31744,!1);else if(n===0)yt.setUint16(0,(e&2147483648)>>16|r>>13,!1);else{let i=n-127;i<-24?yt.setUint16(0,0):i<-14?yt.setUint16(0,(t&2147483648)>>16|1<<24+i,!1):yt.setUint16(0,(t&2147483648)>>16|i+15<<10|r>>13,!1)}}}function bs(e,t){if(e.length-t<2)throw new Error(`${de} not enough data for float16`);let n=(e[t]<<8)+e[t+1];if(n===31744)return 1/0;if(n===64512)return-1/0;if(n===32256)return NaN;let r=n>>10&31,i=n&1023,s;return r===0?s=i*2**-24:r!==31?s=(i+1024)*2**(r-25):s=i===0?1/0:NaN,n&32768?-s:s}function Jc(e){yt.setFloat32(0,e,!1)}function vs(e,t){if(e.length-t<4)throw new Error(`${de} not enough data for float32`);let n=(e.byteOffset||0)+t;return new DataView(e.buffer,n,4).getFloat32(0,!1)}function h0(e){yt.setFloat64(0,e,!1)}function Xc(e,t){if(e.length-t<8)throw new Error(`${de} not enough data for float64`);let n=(e.byteOffset||0)+t;return new DataView(e.buffer,n,8).getFloat64(0,!1)}ms.compareTokens=In.compareTokens;function Te(e,t,n){throw new Error(`${de} encountered invalid minor (${n}) for major ${e[t]>>>5}`)}function Fi(e){return()=>{throw new Error(`${de} ${e}`)}}var oe=[];for(let e=0;e<=23;e++)oe[e]=Te;oe[24]=OT;oe[25]=AT;oe[26]=IT;oe[27]=ET;oe[28]=Te;oe[29]=Te;oe[30]=Te;oe[31]=Te;for(let e=32;e<=55;e++)oe[e]=Te;oe[56]=ST;oe[57]=PT;oe[58]=$T;oe[59]=RT;oe[60]=Te;oe[61]=Te;oe[62]=Te;oe[63]=Te;for(let e=64;e<=87;e++)oe[e]=NT;oe[88]=CT;oe[89]=xT;oe[90]=UT;oe[91]=jT;oe[92]=Te;oe[93]=Te;oe[94]=Te;oe[95]=Fi("indefinite length bytes/strings are not supported");for(let e=96;e<=119;e++)oe[e]=LT;oe[120]=BT;oe[121]=DT;oe[122]=FT;oe[123]=kT;oe[124]=Te;oe[125]=Te;oe[126]=Te;oe[127]=Fi("indefinite length bytes/strings are not supported");for(let e=128;e<=151;e++)oe[e]=GT;oe[152]=VT;oe[153]=zT;oe[154]=qT;oe[155]=WT;oe[156]=Te;oe[157]=Te;oe[158]=Te;oe[159]=HT;for(let e=160;e<=183;e++)oe[e]=JT;oe[184]=XT;oe[185]=YT;oe[186]=ZT;oe[187]=QT;oe[188]=Te;oe[189]=Te;oe[190]=Te;oe[191]=e0;for(let e=192;e<=215;e++)oe[e]=t0;oe[216]=n0;oe[217]=r0;oe[218]=i0;oe[219]=o0;oe[220]=Te;oe[221]=Te;oe[222]=Te;oe[223]=Te;for(let e=224;e<=243;e++)oe[e]=Fi("simple values are not supported");oe[244]=Te;oe[245]=Te;oe[246]=Te;oe[247]=f0;oe[248]=Fi("simple values are not supported");oe[249]=d0;oe[250]=p0;oe[251]=y0;oe[252]=Te;oe[253]=Te;oe[254]=Te;oe[255]=l0;var Ut=[];for(let e=0;e<24;e++)Ut[e]=new re(U.uint,e,1);for(let e=-1;e>=-24;e--)Ut[31-e]=new re(U.negint,e,1);Ut[64]=new re(U.bytes,new Uint8Array(0),1);Ut[96]=new re(U.string,"",1);Ut[128]=new re(U.array,0,1);Ut[160]=new re(U.map,0,1);Ut[244]=new re(U.false,!1,1);Ut[245]=new re(U.true,!0,1);Ut[246]=new re(U.null,null,1);function g0(){let e=[];return e[U.uint.major]=In,e[U.negint.major]=ds,e[U.bytes.major]=Di,e[U.string.major]=KT,e[U.array.major]=ps,e[U.map.major]=ys,e[U.tag.major]=hs,e[U.float.major]=ms,e}var nA=g0(),Co=new zc,Ru=class Yc{constructor(t,n){this.obj=t,this.parent=n}includes(t){let n=this;do if(n.obj===t)return!0;while(n=n.parent);return!1}static createCheck(t,n){if(t&&t.includes(n))throw new Error(`${bn} object contains circular references`);return new Yc(n,t)}},Jt={null:new re(U.null,null),undefined:new re(U.undefined,void 0),true:new re(U.true,!0),false:new re(U.false,!1),emptyArray:new re(U.array,0),emptyMap:new re(U.map,0)},en={number(e,t,n,r){return!Number.isInteger(e)||!Number.isSafeInteger(e)?new re(U.float,e):e>=0?new re(U.uint,e):new re(U.negint,e)},bigint(e,t,n,r){return e>=BigInt(0)?new re(U.uint,e):new re(U.negint,e)},Uint8Array(e,t,n,r){return new re(U.bytes,e)},string(e,t,n,r){return new re(U.string,e)},boolean(e,t,n,r){return e?Jt.true:Jt.false},null(e,t,n,r){return Jt.null},undefined(e,t,n,r){return Jt.undefined},ArrayBuffer(e,t,n,r){return new re(U.bytes,new Uint8Array(e))},DataView(e,t,n,r){return new re(U.bytes,new Uint8Array(e.buffer,e.byteOffset,e.byteLength))},Array(e,t,n,r){if(!e.length)return n.addBreakTokens===!0?[Jt.emptyArray,new re(U.break)]:Jt.emptyArray;r=Ru.createCheck(r,e);let i=[],s=0;for(let o of e)i[s++]=fi(o,n,r);return n.addBreakTokens?[new re(U.array,e.length),i,new re(U.break)]:[new re(U.array,e.length),i]},Object(e,t,n,r){let i=t!=="Object",s=i?e.keys():Object.keys(e),o=i?e.size:s.length;if(!o)return n.addBreakTokens===!0?[Jt.emptyMap,new re(U.break)]:Jt.emptyMap;r=Ru.createCheck(r,e);let u=[],f=0;for(let c of s)u[f++]=[fi(c,n,r),fi(i?e.get(c):e[c],n,r)];return m0(u,n),n.addBreakTokens?[new re(U.map,o),u,new re(U.break)]:[new re(U.map,o),u]}};en.Map=en.Object;en.Buffer=en.Uint8Array;for(let e of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))en[`${e}Array`]=en.DataView;function fi(e,t={},n){let r=pT(e),i=t&&t.typeEncoders&&t.typeEncoders[r]||en[r];if(typeof i=="function"){let o=i(e,r,t,n);if(o!=null)return o}let s=en[r];if(!s)throw new Error(`${bn} unsupported type: ${r}`);return s(e,r,t,n)}function m0(e,t){t.mapSorter&&e.sort(t.mapSorter)}function Zc(e,t,n,r){if(Array.isArray(t))for(let i of t)Zc(e,i,n,r);else n[t.type.major](e,t,r)}function b0(e,t,n){let r=fi(e,n);if(!Array.isArray(r)&&n.quickEncodeToken){let i=n.quickEncodeToken(r);if(i)return i;let s=t[r.type.major];if(s.encodedSize){let o=s.encodedSize(r,n),u=new zc(o);if(s(u,r,n),u.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${r} was wrong`);return cs(u.chunks[0])}}return Co.reset(),Zc(Co,r,t,n),Co.toBytes(!0)}var v0={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0},_0=class{constructor(e,t={}){this._pos=0,this.data=e,this.options=t}pos(){return this._pos}done(){return this._pos>=this.data.length}next(){let e=this.data[this._pos],t=Ut[e];if(t===void 0){let n=oe[e];if(!n)throw new Error(`${de} no decoder for major type ${e>>>5} (byte 0x${e.toString(16).padStart(2,"0")})`);let r=e&31;t=n(this.data,this._pos,r,this.options)}return this._pos+=t.encodedLength,t}},Sr=Symbol.for("DONE"),ki=Symbol.for("BREAK");function T0(e,t,n){let r=[];for(let i=0;i<e.value;i++){let s=Pr(t,n);if(s===ki){if(e.value===1/0)break;throw new Error(`${de} got unexpected break to lengthed array`)}if(s===Sr)throw new Error(`${de} found array but not enough entries (got ${i}, expected ${e.value})`);r[i]=s}return r}function w0(e,t,n){let r=n.useMaps===!0,i=r?void 0:{},s=r?new Map:void 0;for(let o=0;o<e.value;o++){let u=Pr(t,n);if(u===ki){if(e.value===1/0)break;throw new Error(`${de} got unexpected break to lengthed map`)}if(u===Sr)throw new Error(`${de} found map but not enough entries (got ${o} [no key], expected ${e.value})`);if(r!==!0&&typeof u!="string")throw new Error(`${de} non-string keys not supported (got ${typeof u})`);if(n.rejectDuplicateMapKeys===!0&&(r&&s.has(u)||!r&&u in i))throw new Error(`${de} found repeat map key "${u}"`);let f=Pr(t,n);if(f===Sr)throw new Error(`${de} found map but not enough entries (got ${o} [no value], expected ${e.value})`);r?s.set(u,f):i[u]=f}return r?s:i}function Pr(e,t){if(e.done())return Sr;let n=e.next();if(n.type===U.break)return ki;if(n.type.terminal)return n.value;if(n.type===U.array)return T0(n,e,t);if(n.type===U.map)return w0(n,e,t);if(n.type===U.tag){if(t.tags&&typeof t.tags[n.value]=="function"){let r=Pr(e,t);return t.tags[n.value](r)}throw new Error(`${de} tag not supported (${n.value})`)}throw new Error("unsupported")}function O0(e,t){if(!(e instanceof Uint8Array))throw new Error(`${de} data to decode must be a Uint8Array`);t=Object.assign({},v0,t);let n=t.tokenizer||new _0(e,t),r=Pr(n,t);if(r===Sr)throw new Error(`${de} did not find any content to decode`);if(r===ki)throw new Error(`${de} got unexpected break`);return[r,e.subarray(n.pos())]}function A0(e,t){let[n,r]=O0(e,t);if(r.length>0)throw new Error(`${de} too many terminals, data makes no sense`);return n}var I0=class extends Array{constructor(){super(),this.inRecursive=[]}prefix(e){let t=this.inRecursive[this.inRecursive.length-1];t&&(t.type===U.array&&(t.elements++,t.elements!==1&&e.push([44])),t.type===U.map&&(t.elements++,t.elements!==1&&(t.elements%2===1?e.push([44]):e.push([58]))))}[U.uint.major](e,t){this.prefix(e);let n=String(t.value),r=[];for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);e.push(r)}[U.negint.major](e,t){this[U.uint.major](e,t)}[U.bytes.major](e,t){throw new Error(`${bn} unsupported type: Uint8Array`)}[U.string.major](e,t){this.prefix(e);let n=Gc(JSON.stringify(t.value));e.push(n.length>32?cs(n):n)}[U.array.major](e,t){this.prefix(e),this.inRecursive.push({type:U.array,elements:0}),e.push([91])}[U.map.major](e,t){this.prefix(e),this.inRecursive.push({type:U.map,elements:0}),e.push([123])}[U.tag.major](e,t){}[U.float.major](e,t){if(t.type.name==="break"){let s=this.inRecursive.pop();if(s){if(s.type===U.array)e.push([93]);else if(s.type===U.map)e.push([125]);else throw new Error("Unexpected recursive type; this should not happen!");return}throw new Error("Unexpected break; this should not happen!")}if(t.value===void 0)throw new Error(`${bn} unsupported type: undefined`);if(this.prefix(e),t.type.name==="true"){e.push([116,114,117,101]);return}else if(t.type.name==="false"){e.push([102,97,108,115,101]);return}else if(t.type.name==="null"){e.push([110,117,108,108]);return}let n=String(t.value),r=[],i=!1;for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s),!i&&(r[s]===46||r[s]===101||r[s]===69)&&(i=!0);i||(r.push(46),r.push(48)),e.push(r)}};function E0(e,t){if(Array.isArray(e[0])||Array.isArray(t[0]))throw new Error(`${bn} complex map keys are not supported`);let n=e[0],r=t[0];if(n.type!==U.string||r.type!==U.string)throw new Error(`${bn} non-string map keys are not supported`);if(n<r)return-1;if(n>r)return 1;throw new Error(`${bn} unexpected duplicate map keys, this is not supported`)}var S0={addBreakTokens:!0,mapSorter:E0};function P0(e,t){return t=Object.assign({},S0,t),b0(e,new I0,t)}var Qc=class{constructor(e,t={}){this._pos=0,this.data=e,this.options=t,this.modeStack=["value"],this.lastToken=""}pos(){return this._pos}done(){return this._pos>=this.data.length}ch(){return this.data[this._pos]}currentMode(){return this.modeStack[this.modeStack.length-1]}skipWhitespace(){let e=this.ch();for(;e===32||e===9||e===13||e===10;)e=this.data[++this._pos]}expect(e){if(this.data.length-this._pos<e.length)throw new Error(`${de} unexpected end of input at position ${this._pos}`);for(let t=0;t<e.length;t++)if(this.data[this._pos++]!==e[t])throw new Error(`${de} unexpected token at position ${this._pos}, expected to find '${String.fromCharCode(...e)}'`)}parseNumber(){let e=this._pos,t=!1,n=!1,r=o=>{for(;!this.done();){let u=this.ch();if(o.includes(u))this._pos++;else break}};if(this.ch()===45&&(t=!0,this._pos++),this.ch()===48)if(this._pos++,this.ch()===46)this._pos++,n=!0;else return new re(U.uint,0,this._pos-e);if(r([48,49,50,51,52,53,54,55,56,57]),t&&this._pos===e+1)throw new Error(`${de} unexpected token at position ${this._pos}`);if(!this.done()&&this.ch()===46){if(n)throw new Error(`${de} unexpected token at position ${this._pos}`);n=!0,this._pos++,r([48,49,50,51,52,53,54,55,56,57])}!this.done()&&(this.ch()===101||this.ch()===69)&&(n=!0,this._pos++,!this.done()&&(this.ch()===43||this.ch()===45)&&this._pos++,r([48,49,50,51,52,53,54,55,56,57]));let i=String.fromCharCode.apply(null,this.data.subarray(e,this._pos)),s=parseFloat(i);return n?new re(U.float,s,this._pos-e):this.options.allowBigInt!==!0||Number.isSafeInteger(s)?new re(s>=0?U.uint:U.negint,s,this._pos-e):new re(s>=0?U.uint:U.negint,BigInt(i),this._pos-e)}parseString(){if(this.ch()!==34)throw new Error(`${de} unexpected character at position ${this._pos}; this shouldn't happen`);this._pos++;for(let i=this._pos,s=0;i<this.data.length&&s<65536;i++,s++){let o=this.data[i];if(o===92||o<32||o>=128)break;if(o===34){let u=String.fromCharCode.apply(null,this.data.subarray(this._pos,i));return this._pos=i+1,new re(U.string,u,s)}}let e=this._pos,t=[],n=()=>{if(this._pos+4>=this.data.length)throw new Error(`${de} unexpected end of unicode escape sequence at position ${this._pos}`);let i=0;for(let s=0;s<4;s++){let o=this.ch();if(o>=48&&o<=57)o-=48;else if(o>=97&&o<=102)o=o-97+10;else if(o>=65&&o<=70)o=o-65+10;else throw new Error(`${de} unexpected unicode escape character at position ${this._pos}`);i=i*16+o,this._pos++}return i},r=()=>{let i=this.ch(),s=null,o=i>239?4:i>223?3:i>191?2:1;if(this._pos+o>this.data.length)throw new Error(`${de} unexpected unicode sequence at position ${this._pos}`);let u,f,c,h;switch(o){case 1:i<128&&(s=i);break;case 2:u=this.data[this._pos+1],(u&192)===128&&(h=(i&31)<<6|u&63,h>127&&(s=h));break;case 3:u=this.data[this._pos+1],f=this.data[this._pos+2],(u&192)===128&&(f&192)===128&&(h=(i&15)<<12|(u&63)<<6|f&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=this.data[this._pos+1],f=this.data[this._pos+2],c=this.data[this._pos+3],(u&192)===128&&(f&192)===128&&(c&192)===128&&(h=(i&15)<<18|(u&63)<<12|(f&63)<<6|c&63,h>65535&&h<1114112&&(s=h))}s===null?(s=65533,o=1):s>65535&&(s-=65536,t.push(s>>>10&1023|55296),s=56320|s&1023),t.push(s),this._pos+=o};for(;!this.done();){let i=this.ch(),s;switch(i){case 92:if(this._pos++,this.done())throw new Error(`${de} unexpected string termination at position ${this._pos}`);switch(s=this.ch(),this._pos++,s){case 34:case 39:case 92:case 47:t.push(s);break;case 98:t.push(8);break;case 116:t.push(9);break;case 110:t.push(10);break;case 102:t.push(12);break;case 114:t.push(13);break;case 117:t.push(n());break;default:throw new Error(`${de} unexpected string escape character at position ${this._pos}`)}break;case 34:return this._pos++,new re(U.string,Vc(t),this._pos-e);default:if(i<32)throw new Error(`${de} invalid control character at position ${this._pos}`);i<128?(t.push(i),this._pos++):r()}}throw new Error(`${de} unexpected end of string at position ${this._pos}`)}parseValue(){switch(this.ch()){case 123:return this.modeStack.push("obj-start"),this._pos++,new re(U.map,1/0,1);case 91:return this.modeStack.push("array-start"),this._pos++,new re(U.array,1/0,1);case 34:return this.parseString();case 110:return this.expect([110,117,108,108]),new re(U.null,null,4);case 102:return this.expect([102,97,108,115,101]),new re(U.false,!1,5);case 116:return this.expect([116,114,117,101]),new re(U.true,!0,4);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.parseNumber();default:throw new Error(`${de} unexpected character at position ${this._pos}`)}}next(){switch(this.skipWhitespace(),this.currentMode()){case"value":return this.modeStack.pop(),this.parseValue();case"array-value":{if(this.modeStack.pop(),this.ch()===93)return this._pos++,this.skipWhitespace(),new re(U.break,void 0,1);if(this.ch()!==44)throw new Error(`${de} unexpected character at position ${this._pos}, was expecting array delimiter but found '${String.fromCharCode(this.ch())}'`);return this._pos++,this.modeStack.push("array-value"),this.skipWhitespace(),this.parseValue()}case"array-start":return this.modeStack.pop(),this.ch()===93?(this._pos++,this.skipWhitespace(),new re(U.break,void 0,1)):(this.modeStack.push("array-value"),this.skipWhitespace(),this.parseValue());case"obj-key":if(this.ch()===125)return this.modeStack.pop(),this._pos++,this.skipWhitespace(),new re(U.break,void 0,1);if(this.ch()!==44)throw new Error(`${de} unexpected character at position ${this._pos}, was expecting object delimiter but found '${String.fromCharCode(this.ch())}'`);this._pos++,this.skipWhitespace();case"obj-start":{if(this.modeStack.pop(),this.ch()===125)return this._pos++,this.skipWhitespace(),new re(U.break,void 0,1);let e=this.parseString();if(this.skipWhitespace(),this.ch()!==58)throw new Error(`${de} unexpected character at position ${this._pos}, was expecting key/value delimiter ':' but found '${String.fromCharCode(this.ch())}'`);return this._pos++,this.modeStack.push("obj-value"),e}case"obj-value":return this.modeStack.pop(),this.modeStack.push("obj-key"),this.skipWhitespace(),this.parseValue();default:throw new Error(`${de} unexpected parse state at position ${this._pos}; this shouldn't happen`)}}};function $0(e,t){return t=Object.assign({tokenizer:new Qc(e,t)},t),A0(e,t)}var rA=new Uint8Array(0);function R0(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}function _s(e){if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")}function N0(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var s=e.charAt(i),o=s.charCodeAt(0);if(n[o]!==255)throw new TypeError(s+" is ambiguous");n[o]=i}var u=e.length,f=e.charAt(0),c=Math.log(u)/Math.log(256),h=Math.log(256)/Math.log(u);function m(B){if(B instanceof Uint8Array||(ArrayBuffer.isView(B)?B=new Uint8Array(B.buffer,B.byteOffset,B.byteLength):Array.isArray(B)&&(B=Uint8Array.from(B))),!(B instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(B.length===0)return"";for(var H=0,Q=0,K=0,D=B.length;K!==D&&B[K]===0;)K++,H++;for(var V=(D-K)*h+1>>>0,q=new Uint8Array(V);K!==D;){for(var F=B[K],ee=0,z=V-1;(F!==0||ee<Q)&&z!==-1;z--,ee++)F+=256*q[z]>>>0,q[z]=F%u>>>0,F=F/u>>>0;if(F!==0)throw new Error("Non-zero carry");Q=ee,K++}for(var fe=V-Q;fe!==V&&q[fe]===0;)fe++;for(var N=f.repeat(H);fe<V;++fe)N+=e.charAt(q[fe]);return N}function M(B){if(typeof B!="string")throw new TypeError("Expected String");if(B.length===0)return new Uint8Array;var H=0;if(B[H]!==" "){for(var Q=0,K=0;B[H]===f;)Q++,H++;for(var D=(B.length-H)*c+1>>>0,V=new Uint8Array(D);B[H];){var q=n[B.charCodeAt(H)];if(q===255)return;for(var F=0,ee=D-1;(q!==0||F<K)&&ee!==-1;ee--,F++)q+=u*V[ee]>>>0,V[ee]=q%256>>>0,q=q/256>>>0;if(q!==0)throw new Error("Non-zero carry");K=F,H++}if(B[H]!==" "){for(var z=D-K;z!==D&&V[z]===0;)z++;for(var fe=new Uint8Array(Q+(D-z)),N=Q;z!==D;)fe[N++]=V[z++];return fe}}}function S(B){var H=M(B);if(H)return H;throw new Error(`Non-${t} character`)}return{encode:m,decodeUnsafe:M,decode:S}}var C0=N0,x0=C0,U0=x0,j0=class{name;prefix;baseEncode;constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},M0=class{name;prefix;baseDecode;prefixCodePoint;constructor(e,t,n){this.name=e,this.prefix=t;let r=t.codePointAt(0);if(r===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r,this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return ef(this,e)}},L0=class{decoders;constructor(e){this.decoders=e}or(e){return ef(this,e)}decode(e){let t=e[0],n=this.decoders[t];if(n!=null)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};function ef(e,t){return new L0({...e.decoders??{[e.prefix]:e},...t.decoders??{[t.prefix]:t}})}var B0=class{name;prefix;baseEncode;baseDecode;encoder;decoder;constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new j0(e,t,n),this.decoder=new M0(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};function tf({name:e,prefix:t,encode:n,decode:r}){return new B0(e,t,n,r)}function Ki({name:e,prefix:t,alphabet:n}){let{encode:r,decode:i}=U0(n,e);return tf({prefix:t,name:e,encode:r,decode:s=>_s(i(s))})}function D0(e,t,n,r){let i=e.length;for(;e[i-1]==="=";)--i;let s=new Uint8Array(i*n/8|0),o=0,u=0,f=0;for(let c=0;c<i;++c){let h=t[e[c]];if(h===void 0)throw new SyntaxError(`Non-${r} character`);u=u<<n|h,o+=n,o>=8&&(o-=8,s[f++]=255&u>>o)}if(o>=n||(255&u<<8-o)!==0)throw new SyntaxError("Unexpected end of data");return s}function F0(e,t,n){let r=t[t.length-1]==="=",i=(1<<n)-1,s="",o=0,u=0;for(let f=0;f<e.length;++f)for(u=u<<8|e[f],o+=8;o>n;)o-=n,s+=t[i&u>>o];if(o!==0&&(s+=t[i&u<<n-o]),r)for(;(s.length*n&7)!==0;)s+="=";return s}function k0(e){let t={};for(let n=0;n<e.length;++n)t[e[n]]=n;return t}function tt({name:e,prefix:t,bitsPerChar:n,alphabet:r}){let i=k0(r);return tf({prefix:t,name:e,encode(s){return F0(s,r,n)},decode(s){return D0(s,i,n,e)}})}var li=tt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),iA=tt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),oA=tt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),sA=tt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),aA=tt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),uA=tt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),cA=tt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),fA=tt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),lA=tt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),xo=Ki({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),dA=Ki({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Zt=Ki({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),pA=Ki({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),nf={};wo(nf,{Digest:()=>Gi,create:()=>Ts,decode:()=>of,equals:()=>sf,hasCode:()=>sw});var K0=rf,Nu=128,G0=127,V0=~G0,z0=Math.pow(2,31);function rf(e,t,n){t=t||[],n=n||0;for(var r=n;e>=z0;)t[n++]=e&255|Nu,e/=128;for(;e&V0;)t[n++]=e&255|Nu,e>>>=7;return t[n]=e|0,rf.bytes=n-r+1,t}var q0=Fo,W0=128,Cu=127;function Fo(e,r){var n=0,r=r||0,i=0,s=r,o,u=e.length;do{if(s>=u)throw Fo.bytes=0,new RangeError("Could not decode varint");o=e[s++],n+=i<28?(o&Cu)<<i:(o&Cu)*Math.pow(2,i),i+=7}while(o>=W0);return Fo.bytes=s-r,n}var H0=Math.pow(2,7),J0=Math.pow(2,14),X0=Math.pow(2,21),Y0=Math.pow(2,28),Z0=Math.pow(2,35),Q0=Math.pow(2,42),ew=Math.pow(2,49),tw=Math.pow(2,56),nw=Math.pow(2,63),rw=function(e){return e<H0?1:e<J0?2:e<X0?3:e<Y0?4:e<Z0?5:e<Q0?6:e<ew?7:e<tw?8:e<nw?9:10},iw={encode:K0,decode:q0,encodingLength:rw},ow=iw,Ii=ow;function ko(e,t=0){return[Ii.decode(e,t),Ii.decode.bytes]}function Ei(e,t,n=0){return Ii.encode(e,t,n),t}function Si(e){return Ii.encodingLength(e)}function Ts(e,t){let n=t.byteLength,r=Si(e),i=r+Si(n),s=new Uint8Array(i+n);return Ei(e,s,0),Ei(n,s,r),s.set(t,i),new Gi(e,n,t,s)}function of(e){let t=_s(e),[n,r]=ko(t),[i,s]=ko(t.subarray(r)),o=t.subarray(r+s);if(o.byteLength!==i)throw new Error("Incorrect length");return new Gi(n,i,o,t)}function sf(e,t){if(e===t)return!0;{let n=t;return e.code===n.code&&e.size===n.size&&n.bytes instanceof Uint8Array&&R0(e.bytes,n.bytes)}}var Gi=class{code;size;digest;bytes;constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}};function sw(e,t){return e.code===t}function xu(e,t){let{bytes:n,version:r}=e;switch(r){case 0:return uw(n,Ko(e),t??Zt.encoder);default:return cw(n,Ko(e),t??li.encoder)}}var Uu=new WeakMap;function Ko(e){let t=Uu.get(e);if(t==null){let n=new Map;return Uu.set(e,n),n}return t}var ws=class Ke{code;version;multihash;bytes;"/";constructor(t,n,r,i){this.code=n,this.version=t,this.multihash=r,this.bytes=i,this["/"]=i}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:t,multihash:n}=this;if(t!==br)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==fw)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Ke.createV0(n)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:t,digest:n}=this.multihash,r=Ts(t,n);return Ke.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(t){return Ke.equals(this,t)}static equals(t,n){let r=n;return r!=null&&t.code===r.code&&t.version===r.version&&sf(t.multihash,r.multihash)}toString(t){return xu(this,t)}toJSON(){return{"/":xu(this)}}link(){return this}[Symbol.toStringTag]="CID";[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(t){if(t==null)return null;let n=t;if(n instanceof Ke)return n;if(n["/"]!=null&&n["/"]===n.bytes||n.asCID===n){let{version:r,code:i,multihash:s,bytes:o}=n;return new Ke(r,i,s,o??ju(r,i,s.bytes))}else if(n[lw]===!0){let{version:r,multihash:i,code:s}=n,o=of(i);return Ke.create(r,s,o)}else return null}static create(t,n,r){if(typeof n!="number")throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(t){case 0:{if(n!==br)throw new Error(`Version 0 CID must use dag-pb (code: ${br}) block encoding`);return new Ke(t,n,r,r.bytes)}case 1:{let i=ju(t,n,r.bytes);return new Ke(t,n,r,i)}default:throw new Error("Invalid version")}}static createV0(t){return Ke.create(0,br,t)}static createV1(t,n){return Ke.create(1,t,n)}static decode(t){let[n,r]=Ke.decodeFirst(t);if(r.length!==0)throw new Error("Incorrect length");return n}static decodeFirst(t){let n=Ke.inspectBytes(t),r=n.size-n.multihashSize,i=_s(t.subarray(r,r+n.multihashSize));if(i.byteLength!==n.multihashSize)throw new Error("Incorrect length");let s=i.subarray(n.multihashSize-n.digestSize),o=new Gi(n.multihashCode,n.digestSize,s,i);return[n.version===0?Ke.createV0(o):Ke.createV1(n.codec,o),t.subarray(n.size)]}static inspectBytes(t){let n=0,r=()=>{let[m,M]=ko(t.subarray(n));return n+=M,m},i=r(),s=br;if(i===18?(i=0,n=0):s=r(),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let o=n,u=r(),f=r(),c=n+f,h=c-o;return{version:i,codec:s,multihashCode:u,digestSize:f,multihashSize:h,size:c}}static parse(t,n){let[r,i]=aw(t,n),s=Ke.decode(i);if(s.version===0&&t[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return Ko(s).set(r,t),s}};function aw(e,t){switch(e[0]){case"Q":{let n=t??Zt;return[Zt.prefix,n.decode(`${Zt.prefix}${e}`)]}case Zt.prefix:{let n=t??Zt;return[Zt.prefix,n.decode(e)]}case li.prefix:{let n=t??li;return[li.prefix,n.decode(e)]}case xo.prefix:{let n=t??xo;return[xo.prefix,n.decode(e)]}default:{if(t==null)throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}}}function uw(e,t,n){let{prefix:r}=n;if(r!==Zt.prefix)throw Error(`Cannot string encode V0 in ${n.name} encoding`);let i=t.get(r);if(i==null){let s=n.encode(e).slice(1);return t.set(r,s),s}else return i}function cw(e,t,n){let{prefix:r}=n,i=t.get(r);if(i==null){let s=n.encode(e);return t.set(r,s),s}else return i}var br=112,fw=18;function ju(e,t,n){let r=Si(e),i=r+Si(t),s=new Uint8Array(i+n.byteLength);return Ei(e,s,0),Ei(t,s,r),s.set(n,i),s}var lw=Symbol.for("@ipld/js-cid/CID"),dw=20;function af({name:e,code:t,encode:n,minDigestLength:r,maxDigestLength:i}){return new pw(e,t,n,r,i)}var pw=class{name;code;encode;minDigestLength;maxDigestLength;constructor(e,t,n,r,i){this.name=e,this.code=t,this.encode=n,this.minDigestLength=r??dw,this.maxDigestLength=i}digest(e,t){if(t?.truncate!=null){if(t.truncate<this.minDigestLength)throw new Error(`Invalid truncate option, must be greater than or equal to ${this.minDigestLength}`);if(this.maxDigestLength!=null&&t.truncate>this.maxDigestLength)throw new Error(`Invalid truncate option, must be less than or equal to ${this.maxDigestLength}`)}if(e instanceof Uint8Array){let n=this.encode(e);return n instanceof Uint8Array?Mu(n,this.code,t?.truncate):n.then(r=>Mu(r,this.code,t?.truncate))}else throw Error("Unknown type, must be binary type")}};function Mu(e,t,n){if(n!=null&&n!==e.byteLength){if(n>e.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${e.byteLength}`);e=e.subarray(0,n)}return Ts(t,e)}var uf=tt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),yA=tt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),hA=tt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),gA=tt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});function yw(e){return e instanceof ArrayBuffer?new Uint8Array(e,0,e.byteLength):e}function hw(e){if(e.asCID!==e&&e["/"]!==e.bytes)return null;let t=ws.asCID(e);if(!t)return null;let n=t.toString();return[new re(U.map,1/0,1),new re(U.string,"/",1),new re(U.string,n,n.length),new re(U.break,void 0,1)]}function Pi(e){let t=uf.encode(e).slice(1);return[new re(U.map,1/0,1),new re(U.string,"/",1),new re(U.map,1/0,1),new re(U.string,"bytes",5),new re(U.string,t,t.length),new re(U.break,void 0,1),new re(U.break,void 0,1)]}function It(e){return Pi(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function gw(e){return Pi(new Uint8Array(e))}function mw(){throw new Error("`undefined` is not supported by the IPLD Data Model and cannot be encoded")}function bw(e){if(Number.isNaN(e))throw new Error("`NaN` is not supported by the IPLD Data Model and cannot be encoded");if(e===1/0||e===-1/0)throw new Error("`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded");return null}var vw={typeEncoders:{Object:hw,Buffer:Pi,Uint8Array:Pi,Int8Array:It,Uint16Array:It,Int16Array:It,Uint32Array:It,Int32Array:It,Float32Array:It,Float64Array:It,Uint8ClampedArray:It,BigInt64Array:It,BigUint64Array:It,DataView:It,ArrayBuffer:gw,undefined:mw,number:bw}},_w=class extends Qc{constructor(e,t){super(e,t),this.tokenBuffer=[]}done(){return this.tokenBuffer.length===0&&super.done()}_next(){return this.tokenBuffer.length>0?this.tokenBuffer.pop():super.next()}next(){let e=this._next();if(e.type===U.map){let t=this._next();if(t.type===U.string&&t.value==="/"){let n=this._next();if(n.type===U.string){if(this._next().type!==U.break)throw new Error("Invalid encoded CID form");return this.tokenBuffer.push(n),new re(U.tag,42,0)}if(n.type===U.map){let r=this._next();if(r.type===U.string&&r.value==="bytes"){let i=this._next();if(i.type===U.string){for(let o=0;o<2;o++)if(this._next().type!==U.break)throw new Error("Invalid encoded Bytes form");let s=uf.decode(`m${i.value}`);return new re(U.bytes,s,i.value.length)}this.tokenBuffer.push(i)}this.tokenBuffer.push(r)}this.tokenBuffer.push(n)}this.tokenBuffer.push(t)}return e}},Go={allowIndefinite:!1,allowUndefined:!1,allowNaN:!1,allowInfinity:!1,allowBigInt:!0,strict:!0,useMaps:!1,rejectDuplicateMapKeys:!0,tags:[]};Go.tags[42]=ws.parse;var Tw="dag-json",cf=297,Os=e=>P0(e,vw),ff=e=>{let t=yw(e),n=Object.assign(Go,{tokenizer:new _w(t,Go)});return $0(t,n)},Lu=e=>ww.decode(Os(e)),ww=new TextDecoder,Ow=e=>ff(Aw.encode(e)),Aw=new TextEncoder;function Iw(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function lf(e,t,n=""){let r=Iw(e),i=e?.length,s=t!==void 0;if(!r||s&&i!==t){let o=n&&`"${n}" `,u=s?` of length ${t}`:"",f=r?`length=${i}`:`type=${typeof e}`;throw new Error(o+"expected Uint8Array"+u+", got "+f)}return e}function Bu(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ew(e,t){lf(e,void 0,"digestInto() output");let n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function Vo(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Uo(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ct(e,t){return e<<32-t|e>>>t}function Sw(e,t={}){let n=(i,s)=>e(s).update(i).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=i=>e(i),Object.assign(n,t),Object.freeze(n)}var Pw=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function $w(e,t,n){return e&t^~e&n}function Rw(e,t,n){return e&t^e&n^t&n}var Nw=class{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Uo(this.buffer)}update(e){Bu(this),lf(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let s=0;s<i;){let o=Math.min(r-this.pos,i-s);if(o===r){let u=Uo(e);for(;r<=i-s;s+=r)this.process(u,s);continue}n.set(e.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Bu(this),Ew(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:s}=this;t[s++]=128,Vo(this.buffer.subarray(s)),this.padOffset>r-s&&(this.process(n,0),s=0);for(let h=s;h<r;h++)t[h]=0;n.setBigUint64(r-8,BigInt(this.length*8),i),this.process(n,0);let o=Uo(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let f=u/4,c=this.get();if(f>c.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<f;h++)o.setUint32(4*h,c[h],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.destroyed=s,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}},Xt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Cw=Uint32Array.from([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]),Yt=new Uint32Array(64),xw=class extends Nw{constructor(e){super(64,e,8,!1)}get(){let{A:e,B:t,C:n,D:r,E:i,F:s,G:o,H:u}=this;return[e,t,n,r,i,s,o,u]}set(e,t,n,r,i,s,o,u){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=s|0,this.G=o|0,this.H=u|0}process(e,t){for(let h=0;h<16;h++,t+=4)Yt[h]=e.getUint32(t,!1);for(let h=16;h<64;h++){let m=Yt[h-15],M=Yt[h-2],S=Ct(m,7)^Ct(m,18)^m>>>3,B=Ct(M,17)^Ct(M,19)^M>>>10;Yt[h]=B+Yt[h-7]+S+Yt[h-16]|0}let{A:n,B:r,C:i,D:s,E:o,F:u,G:f,H:c}=this;for(let h=0;h<64;h++){let m=Ct(o,6)^Ct(o,11)^Ct(o,25),M=c+m+$w(o,u,f)+Cw[h]+Yt[h]|0,B=(Ct(n,2)^Ct(n,13)^Ct(n,22))+Rw(n,r,i)|0;c=f,f=u,u=o,o=s+M|0,s=i,i=r,r=n,n=M+B|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,s=s+this.D|0,o=o+this.E|0,u=u+this.F|0,f=f+this.G|0,c=c+this.H|0,this.set(n,r,i,s,o,u,f,c)}roundClean(){Vo(Yt)}destroy(){this.set(0,0,0,0,0,0,0,0),Vo(this.buffer)}},Uw=class extends xw{A=Xt[0]|0;B=Xt[1]|0;C=Xt[2]|0;D=Xt[3]|0;E=Xt[4]|0;F=Xt[5]|0;G=Xt[6]|0;H=Xt[7]|0;constructor(){super(32)}},jw=Sw(()=>new Uw,Pw(1));var Le=Ht(Ft(),1),df=Ht(Zd(),1),Du=e=>Le.Type.Union([e,Le.Type.Null()]);var pf=/^(k51qz|baguq)[0-9a-z]{56,57}$/,Mw=/^[0-9A-Fa-f]{7,8}$/g;Le.FormatRegistry.Set("EntityID",e=>!!e.match(Mw)||!!e.match(pf));var Lw=Le.Type.String(),Bw=e=>e?.enc instanceof Uint8Array;Le.FormatRegistry.Set("CID",e=>!!e.match(pf));var yf=Le.Type.String({format:"CID"}),Dw=/^http([s]?):\/\/.*\..*/;Le.FormatRegistry.Set("URL",e=>!!e.match(Dw));var mA=Le.Type.String({format:"URL"}),hf=Le.Type.Object({en:Lw,at:Le.Type.String(),vl:Du(Le.Type.Union([Le.Type.String(),Le.Type.Boolean(),Le.Type.Number()])),ts:Le.Type.String(),ag:Le.Type.String(),pv:Du(yf)}),Fu=df.TypeCompiler.Compile(hf);var bA=Fu.Check.bind(Fu),Fw=Le.Type.Composite([Le.Type.Object({cid:yf}),hf]),zo=df.TypeCompiler.Compile(Fw),kw=e=>Array.from(zo.Errors(e)),gf=zo.Check.bind(zo);function mf(e){return async t=>new Uint8Array(await crypto.subtle.digest(e,t))}var Kw=af({name:"sha2-256",code:18,encode:mf("SHA-256")}),vA=af({name:"sha2-512",code:19,encode:mf("SHA-512")}),{WARN:ku,LOG:_A,DEBUG:Gw,VERBOSE:bf,ERROR:Vw}=Me.setup(Me.INFO);function zw(e,t=["cid"]){if(!e)throw Vw("falsy log",e);let n=e.cid;if(Bw(e))return n||(n=As(vf(e).bytes).toString()),ku("preparing an encrypted applog - really?"),{log:e,cid:n};let r={};for(let[i,s]of Object.entries(e))s===void 0&&(ku(`log.${i} is undefined, which is not allowed - encoding as null`,e),s=null),t.includes(i)?bf("excluding app log",{key:i,val:s}):r[i]=s;return{log:r,cid:n}}function qw(e){return As(Ww(e).bytes)}function Ww(e){return vf(zw(e)?.log)}function As(e){let t=jw(e),n=nf.create(Kw.code,t),r=ws.create(1,cf,n);return bf("[getCidSync]",{bytes:e,hash:t,digest:n,cid:r}),r}function vf(e){Gw("[encodeBlock]",e);let t=Os(e);return{bytes:t,cid:As(t)}}function Ku(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Hw(e,t){let n=Ku(e),r=Ku(t);return+n<+r}var{WARN:TA,LOG:wA,DEBUG:OA,VERBOSE:Jw,ERROR:Gu}=Me.setup(Me.INFO),Xw=(e,t,n="asc")=>n==="asc"?e.localeCompare(t,"en-US"):t.localeCompare(e,"en-US"),_f=(e,t,n)=>ze.structural(Au(t,e),Au(n,e)),Yw=(e,t,n="asc")=>Xw(e.ts,t.ts,n),AA=V_(_f,["en","at"]);function qo(e,t="asc"){return e.sort((n,r)=>Yw(n,r,t))}var Zw=(e,t)=>Hw(new Date(e.ts),new Date(t.ts));var Tf=e=>{let t=new Map;for(let n of e){if(!n)throw Gu("falsy entry in applogs",e),new Error("falsy entry in applogs");if(!n.cid)throw Gu("applog with missing CID",n),new Error("applog with missing CID");let r=n.cid;t.has(r)?Jw("Skipping duplicate applog:",[t.get(r),n]):t.set(r,n)}return Array.from(t.values())},IA=(e,t=8)=>nO(Ti(e),31,t);function Qw(e){return typeof e=="string"&&e.startsWith("?")}function eO(e){return e.slice(1)}function EA(e,t){let n={},r={};for(let[i,s]of Object.entries(e))if(Qw(s)){let o=eO(s),u=t[o];u?r[i]=u:n[i]=o}else r[i]=s;return[r,n]}function tO(e,t,n){let r;if(t){let i=typeof t;i==="string"?r=t===n:i==="function"?r=t(n):typeof t.has=="function"?r=t.has(n):Array.isArray(t)&&!Array.isArray(n)?r=t.includes(n):r=t===n}else r=t===n;return e.charAt(0)==="!"?!r:r}var wf=function(t){for(var n=0,r=0,i=t.length;r<i;r++)n+=t[r];return n},Vu=function(t){return wf(t)/t.length},ht={max:function(e){return Math.max.apply(null,e)},min:function(e){return Math.min.apply(null,e)},range:function(e){return ht.max(e)-ht.min(e)},midrange:function(e){return ht.range(e)/2},sum:wf,mean:Vu,average:Vu,median:function(e){e.sort(function(n,r){return n-r});var t=e.length/2;return t%1?e[t-.5]:(e[t-1]+e[t])/2},modes:function(e){if(!e.length)return[];var t={},n=0,r=[];return e.forEach(function(i){t[i]?t[i]++:t[i]=1,t[i]>n?(r=[i],n=t[i]):t[i]===n&&(r.push(i),n=t[i])}),r},variance:function(e){var t=ht.mean(e);return ht.mean(e.map(function(n){return Math.pow(n-t,2)}))},standardDeviation:function(e){return Math.sqrt(ht.variance(e))},meanAbsoluteDeviation:function(e){var t=ht.mean(e);return ht.mean(e.map(function(n){return Math.abs(n-t)}))},zScores:function(e){var t=ht.mean(e),n=ht.standardDeviation(e);return e.map(function(r){return(r-t)/n})}};ht.average=ht.mean;var nO=function(e,t=13,n){if(!e?.length)throw new Error(`Empty string: ${e}`);let r=3735928559^t,i=1103547991^t;for(let o=0,u;o<e.length;o++)u=e.charCodeAt(o),r=Math.imul(r^u,2654435761),i=Math.imul(i^u,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),(4294967296*(2097151&i)+(r>>>0)).toString(16).slice(-n).padStart(n,"0")};function Of(){return new Date().toISOString()}var{WARN:rO,LOG:SA,DEBUG:iO,VERBOSE:PA,ERROR:$i}=Me.setup(Me.INFO);function oO(e,t){let n=Of(),r=t;return e.map(s=>sO(s,{ts:n,threadForPv:r}))}function sO(e,{ts:t,threadForPv:n}={}){let r=cO(e,t??Of()),i=fO(r,n),s=qw(i).toString();e.cid&&e.cid!==s&&rO("[finalizeApplogForInsert] overwriting wrong CID",{log:e,cid:s,logWithPv:i});let o={...i,cid:s};if(!gf(o))throw $i(`Bogus Applog ${JSON.stringify(o)}`,kw(o));return Object.freeze(o)}function aO(e){return!!e.ts}function uO(e){return!!e.pv}function cO(e,t){return aO(e)?e:{...e,ts:t}}function fO(e,t){if(e.pv!==void 0)return e;if(t){let{en:n,at:r}=e,i=t.findLast(o=>o.en==n&&o.at==r);if(_f(["en","at","vl","ts","ag"],e,i))throw $i("[withPvFrom] Same as previous:",{log:e,pv:i,thread:t});let s=(e.pv!==void 0?e.pv:i?.cid)??null;return{...e,pv:s}}else{if(!uO(e))throw $i("[withPvFrom] no thread and no pv:",e);return e}}function $A(e){let t=()=>(Ne(()=>e.length<2&&iO(`joinThreads with count=${e.length}`)),qo(Tf(e.flatMap(i=>{let s=i.applogs;if(!s)throw $i("falsy applogs of thread",i),new Error("falsy applogs of thread");return s})))),n=Ne(()=>t()),r=at(function(i,s){return Er(i)?{init:Ne(()=>t())}:{added:i.added.filter(o=>!this.hasApplog(o,!0)),removed:i.removed?.filter(o=>!!this.parents.some(f=>f===s?!1:f.hasApplog(o,!0)))}});return new Is(Ne(()=>`join(~ ${e.map(i=>i.name).join(", ")})`),e,["?"],n,r)}var{WARN:zu,LOG:RA,DEBUG:qu,VERBOSE:gn,ERROR:Wu}=Me.setup(Me.INFO),Is=class Af extends Gn{constructor(t,n,r,i,s,o=null){super(t,n,r,s?Pe.array([...i],{deep:!1,name:`${t}.array`}):i),this.name=t,this._initialLogs=i,this._eventMapper=s,this._writeMapper=o,hr(this,{onParentUpdate:at}),s&&this.subscribeToParents()}static mapWrites(t,n,r){return new Af(`${n}<${t.nameAndSizeUntracked}>`,t,t.filters,t._applogs,null,r)}_parentSubscriptions=null;insert(t){let n=this._writeMapper?this._writeMapper(t):t;if(!(this._writeMapper&&!n))return this.parents.forEach(r=>r.insert(n))}insertRaw(t){let n=this._writeMapper?this._writeMapper(t):t;if(!(this._writeMapper&&!n))return this.parents.forEach(r=>r.insertRaw(n))}subscribeToParents(){this._parentSubscriptions=new Map;let t=yo(()=>{this.parents.length||zu("MappedThread has no parents",this),gn(`[MappedThread: ${this.name}] subscribing to parents:`,this.parents.map(r=>r.name));let n=new Set([...this._parentSubscriptions.keys()]);for(let r of this.parents){n.delete(r)&&gn(`[MappedThread: ${this.name}] Skipping re-sub to parent`,r.nameAndSizeUntracked),gn(`[MappedThread: ${this.name}] sub to new parent`,r.nameAndSizeUntracked);let s=this.onParentUpdate.bind(this,r),o=r.subscribe(s);this._parentSubscriptions.set(r,o)}for(let r of n)gn(`[MappedThread: ${this.name}] un-subscribing from old parent`,r.nameAndSizeUntracked),this._parentSubscriptions.get(r)(),this._parentSubscriptions.delete(r)})}subscribe(t){return this._parentSubscriptions||this.subscribeToParents(),super.subscribe(t)}triggerRemap(){if(!this._eventMapper)throw Wu("triggerRemap on a thread that is not actually mapping?!",this.nameAndSizeUntracked);qu(`MappedThread{${this.nameAndSizeUntracked}} triggerRemap`),this.parents.length!==1&&zu(`MappedThread{${this.nameAndSizeUntracked}} triggerRemap with parentCount=${this.parents.length} - not meant for this`),this.parents.forEach(t=>{this.onParentUpdate(t,{init:Ne(()=>Ln(t.applogs))})})}onParentUpdate(t,n){gn(`MappedThread{${this.nameAndSizeUntracked}} parentUpdate`,n);let r=this._eventMapper?this._eventMapper(n,t):n;if(this._eventMapper)if(gn(`MappedThread{${this.nameAndSizeUntracked}} parentUpdate => mapped`,r),Er(r))this._applogs.replace([...r.init]);else{for(let i of r.added)this._applogs.splice(tT(this._applogs,i,"ts"),0,i);if(r.removed){for(let i of r.removed)if(!this._applogs.remove(i))if(!Er(n)&&n.removed?.includes(i))qu("Ignoring remove event for non-existent because it was part of parent event's removed",i,n);else throw Wu(`MappedThread{${this.name}} toRemove contained log that doesn't exist`,i,{thread:this,event:n,mapResult:r})}}gn(`MappedThread{${this.nameAndSizeUntracked}} parentUpdate => deps?`,lr(this._applogs)),this.notifySubscribers(r)}get readOnly(){return!1}},{WARN:NA,LOG:CA,DEBUG:xA,VERBOSE:jo,ERROR:lO}=Me.setup(Me.INFO),UA=us("rollingFilter",function(t,n,r={}){let i=dO(n),s=Hu(i),o=Pe.array(Ne(function(){return s(t.applogs)}),{deep:!1,name:`${t.name} | ${r.name||`rollingFilter.array{${Ti(i)}}`}`}),u=m=>{let M;return Er(m)?M={init:s(m.init)}:M={added:s(m.added),removed:m.removed},jo(`rollingFilter{${t.nameAndSizeUntracked} | ${r.name?` '${r.name}'}`:""} parentUpdate`,i,m,"=>",M),M},f=new Is(`${t.name} | ${r.name||`rollingFilter{${Ti(i)}}`}`,t,[...t.filters,...r.extraFilterName?[r.extraFilterName]:[]],o,u),c=Aa(()=>Ln(n),m=>{jo(`rollingFilter<${t.nameAndSizeUntracked}>${r.name?` '${r.name}'`:""} patternUpdate`,i,"=>",m),i=m,s=Hu(i),f.triggerRemap()}),h=pn(o,()=>{jo(`rollingFilter<${Ne(()=>t.name)}>${r.name?` '${r.name}'`:""} unobserve`,i),c(),h()});return f},{equals:as,argsDebugName:(e,t,n)=>Fc({caller:"rollingFilter",thread:e,pattern:t,args:n})}),jA=us("rollingMapper",function(t,n,r={}){let i=Ne(()=>n.call(null,{init:t.applogs},t));if(!Er(i))throw lO("Initial run must return init event");let s=i.init;return new Is(`${t.name} | ${r.name||"rollingMapper"}`,t,[...t.filters,...r.extraFilterName?[r.extraFilterName]:[]],s,n)},{equals:as,argsDebugName:(e,t,n)=>Fc({caller:"rollingMapper",thread:e,args:n})}),MA=us("rollingAcc",function(t,n,r,i={}){let s=at(r);return s({init:t.applogs},n),t.subscribe(o=>{s(o,n)}),n},{argsDebugName:(e,t,n,r)=>`rollingAcc{${e.nameAndSizeUntracked}${r?.name?` | ${r?.name}`:""}}`}),dO=function(t){let n=Ne(function(){return Object.fromEntries(Object.entries(Ln(t)).map(([i,s])=>[Ln(i),Ln(s)]))});if(!Object.entries(n).length)throw new Error("Pattern is empty");return n};function Hu(e){return function(n){return n.filter(function(i){for(let s of Object.keys(e)){let o=e[s];if(o===void 0)continue;let u=i[s.startsWith("!")?s.slice(1):s];if(!tO(s,o,u))return!1}return!0})}}var{WARN:pO,LOG:yO,DEBUG:hO,VERBOSE:gO,ERROR:di}=Me.setup(Me.INFO),mO=class extends Gn{constructor(e,t=[],n){super(e,null,n,t),hr(this,{})}purge(e){let t=this.applogs.length;return this._applogs=this.applogs.filter(n=>!e.includes(n.cid)),t-this.applogs.length}insert(e){let t=oO(e,this);return this.insertRaw(t)}insertRaw(e){let t=Tf(e);if(t.length!==e.length)throw di(`[insertRaw] duplicate applogs passed: ${e.length-t.length}`,{appLogsToInsert:e,deduplicated:t});let n=e.filter(s=>!gf(s));if(n.length)throw di(`[insertRaw] bogus applogs passed: ${n.length}`,{bogus:n});let r=e.filter(s=>this.hasApplog(s,!1));if(r.length)throw di(`[insertRaw] already existing applogs passed: ${r.length}`,{existing:r});if(!e.length){pO("[insertRaw] skipping empty insert empty logs array");return}(!this.hasParents&&!(this instanceof bO)?yO:hO)("Inserting:",e.length===1?e[0]:e,{ds:this}),qo(e);let i=this._applogs.length&&Zw(e[0],this._applogs[this._applogs.length-1]);return this._applogs.push(...e),i&&qo(this._applogs),this.notifySubscribers({added:e,removed:null}),this.persist(e),e}get readOnly(){return!1}},bO=class pi extends mO{constructor(t,n,r,i){super(t,n,r),this._readOnly=i,hr(this,{_applogs:Pe.shallow})}static empty(t){return pi.fromArray([],t??"empty in-memory",!1)}static fromArray(t,n,r=!1){return new pi(n??"in-memory",t,[],r)}static fromReadOnlyArray(t,n){return new pi(n??"in-memory",t,[],!0)}get readOnly(){return this._readOnly}async persist(t){if(gO("[InMem.persist] no persist for",t),this.readOnly)throw di("[persist] called for readOnly thread")}},{WARN:LA,LOG:BA,DEBUG:DA,VERBOSE:FA,ERROR:kA}=Me.setup(Me.INFO);export{ze as a,Pe as b,pt as c,Ne as d,at as e,yo as f,ai as g,Ln as h,hr as i,Me as j,Ti as k,Fc as l,JO as m,as as n,XO as o,YO as p,ZO as q,us as r,Er as s,tA as t,qo as u,IA as v,EA as w,Of as x,$A as y,UA as z,jA as A,bO as B};
62
+ /*! Bundled license information:
63
+
64
+ lodash-es/lodash.js:
65
+ (**
66
+ * @license
67
+ * Lodash (Custom Build) <https://lodash.com/>
68
+ * Build: `lodash modularize exports="es" -o ./`
69
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
70
+ * Released under MIT license <https://lodash.com/license>
71
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
72
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
73
+ *)
74
+
75
+ @noble/hashes/utils.js:
76
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
77
+ */
78
+ //# sourceMappingURL=chunk-7XDDTUI3.min.js.map