@bool-ts/core 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var Jf=Object.create;var{getPrototypeOf:Zf,defineProperty:r_,getOwnPropertyNames:Bf}=Object;var Vf=Object.prototype.hasOwnProperty;var N_=(_,T,A)=>{A=_!=null?Jf(Zf(_)):{};let C=T||!_||!_.__esModule?r_(A,"default",{value:_,enumerable:!0}):A;for(let E of Bf(_))if(!Vf.call(C,E))r_(C,E,{get:()=>_[E],enumerable:!0});return C};var m=(_,T)=>()=>(T||_((T={exports:{}}).exports,T),T.exports);var Df=(_,T)=>{for(var A in T)r_(_,A,{get:T[A],enumerable:!0,configurable:!0,set:(C)=>T[A]=()=>C})};var Gf=import.meta.require;var $_=m(()=>{/*! *****************************************************************************
2
+ var Zf=Object.create;var{getPrototypeOf:Bf,defineProperty:r_,getOwnPropertyNames:Vf}=Object;var Df=Object.prototype.hasOwnProperty;var n_=(_,T,A)=>{A=_!=null?Zf(Bf(_)):{};let C=T||!_||!_.__esModule?r_(A,"default",{value:_,enumerable:!0}):A;for(let E of Vf(_))if(!Df.call(C,E))r_(C,E,{get:()=>_[E],enumerable:!0});return C};var I=(_,T)=>()=>(T||_((T={exports:{}}).exports,T),T.exports);var Gf=(_,T)=>{for(var A in T)r_(_,A,{get:T[A],enumerable:!0,configurable:!0,set:(C)=>T[A]=()=>C})};var nf=import.meta.require;var z_=I(()=>{/*! *****************************************************************************
3
3
  Copyright (C) Microsoft. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
5
  this file except in compliance with the License. You may obtain a copy of the
@@ -12,9 +12,9 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var kC;(function(_){(function(T){var A=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:H(),C=E(_);if(typeof A.Reflect<"u")C=E(A.Reflect,C);if(T(C,A),typeof A.Reflect>"u")A.Reflect=_;function E(c,q){return function(w,J){if(Object.defineProperty(c,w,{configurable:!0,writable:!0,value:J}),q)q(w,J)}}function f(){try{return Function("return this;")()}catch(c){}}function x(){try{return(0,eval)("(function() { return this; })()")}catch(c){}}function H(){return f()||x()}})(function(T,A){var C=Object.prototype.hasOwnProperty,E=typeof Symbol==="function",f=E&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",x=E&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",H=typeof Object.create==="function",c={__proto__:[]}instanceof Array,q=!H&&!c,w={create:H?function(){return o_(Object.create(null))}:c?function(){return o_({__proto__:null})}:function(){return o_({})},has:q?function(R,L){return C.call(R,L)}:function(R,L){return L in R},get:q?function(R,L){return C.call(R,L)?R[L]:void 0}:function(R,L){return R[L]}},J=Object.getPrototypeOf(Function),F=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:qf(),Z=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:Yf(),Y=typeof WeakMap==="function"?WeakMap:Qf(),X=E?Symbol.for("@reflect-metadata:registry"):void 0,D=Ff(),W=Sf(D);function N(R,L,S,B){if(!O(S)){if(!IC(R))throw TypeError();if(!y(L))throw TypeError();if(!y(B)&&!O(B)&&!yT(B))throw TypeError();if(yT(B))B=void 0;return S=wT(S),s(R,L,S,B)}else{if(!IC(R))throw TypeError();if(!hC(L))throw TypeError();return p(R,L)}}T("decorate",N);function U(R,L){function S(B,I){if(!y(B))throw TypeError();if(!O(I)&&!Hf(I))throw TypeError();z_(R,L,B,I)}return S}T("metadata",U);function V(R,L,S,B){if(!y(S))throw TypeError();if(!O(B))B=wT(B);return z_(R,L,S,B)}T("defineMetadata",V);function n(R,L,S){if(!y(L))throw TypeError();if(!O(S))S=wT(S);return e(R,L,S)}T("hasMetadata",n);function a(R,L,S){if(!y(L))throw TypeError();if(!O(S))S=wT(S);return TT(R,L,S)}T("hasOwnMetadata",a);function Q(R,L,S){if(!y(L))throw TypeError();if(!O(S))S=wT(S);return AT(R,L,S)}T("getMetadata",Q);function P(R,L,S){if(!y(L))throw TypeError();if(!O(S))S=wT(S);return KT(R,L,S)}T("getOwnMetadata",P);function h(R,L){if(!y(R))throw TypeError();if(!O(L))L=wT(L);return A_(R,L)}T("getMetadataKeys",h);function M(R,L){if(!y(R))throw TypeError();if(!O(L))L=wT(L);return lT(R,L)}T("getOwnMetadataKeys",M);function i(R,L,S){if(!y(L))throw TypeError();if(!O(S))S=wT(S);if(!y(L))throw TypeError();if(!O(S))S=wT(S);var B=E_(L,S,!1);if(O(B))return!1;return B.OrdinaryDeleteMetadata(R,L,S)}T("deleteMetadata",i);function p(R,L){for(var S=R.length-1;S>=0;--S){var B=R[S],I=B(L);if(!O(I)&&!yT(I)){if(!hC(I))throw TypeError();L=I}}return L}function s(R,L,S,B){for(var I=R.length-1;I>=0;--I){var j=R[I],o=j(L,S,B);if(!O(o)&&!yT(o)){if(!y(o))throw TypeError();B=o}}return B}function e(R,L,S){var B=TT(R,L,S);if(B)return!0;var I=p_(L);if(!yT(I))return e(R,I,S);return!1}function TT(R,L,S){var B=E_(L,S,!1);if(O(B))return!1;return KC(B.OrdinaryHasOwnMetadata(R,L,S))}function AT(R,L,S){var B=TT(R,L,S);if(B)return KT(R,L,S);var I=p_(L);if(!yT(I))return AT(R,I,S);return}function KT(R,L,S){var B=E_(L,S,!1);if(O(B))return;return B.OrdinaryGetOwnMetadata(R,L,S)}function z_(R,L,S,B){var I=E_(S,B,!0);I.OrdinaryDefineOwnMetadata(R,L,S,B)}function A_(R,L){var S=lT(R,L),B=p_(R);if(B===null)return S;var I=A_(B,L);if(I.length<=0)return S;if(S.length<=0)return I;var j=new Z,o=[];for(var u=0,G=S;u<G.length;u++){var z=G[u],$=j.has(z);if(!$)j.add(z),o.push(z)}for(var K=0,k=I;K<k.length;K++){var z=k[K],$=j.has(z);if(!$)j.add(z),o.push(z)}return o}function lT(R,L){var S=E_(R,L,!1);if(!S)return[];return S.OrdinaryOwnMetadataKeys(R,L)}function nC(R){if(R===null)return 1;switch(typeof R){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return R===null?1:6;default:return 6}}function O(R){return R===void 0}function yT(R){return R===null}function xf(R){return typeof R==="symbol"}function y(R){return typeof R==="object"?R!==null:typeof R==="function"}function Rf(R,L){switch(nC(R)){case 0:return R;case 1:return R;case 2:return R;case 3:return R;case 4:return R;case 5:return R}var S=L===3?"string":L===5?"number":"default",B=mC(R,f);if(B!==void 0){var I=B.call(R,S);if(y(I))throw TypeError();return I}return cf(R,S==="default"?"number":S)}function cf(R,L){if(L==="string"){var S=R.toString;if(jT(S)){var B=S.call(R);if(!y(B))return B}var I=R.valueOf;if(jT(I)){var B=I.call(R);if(!y(B))return B}}else{var I=R.valueOf;if(jT(I)){var B=I.call(R);if(!y(B))return B}var j=R.toString;if(jT(j)){var B=j.call(R);if(!y(B))return B}}throw TypeError()}function KC(R){return!!R}function Lf(R){return""+R}function wT(R){var L=Rf(R,3);if(xf(L))return L;return Lf(L)}function IC(R){return Array.isArray?Array.isArray(R):R instanceof Object?R instanceof Array:Object.prototype.toString.call(R)==="[object Array]"}function jT(R){return typeof R==="function"}function hC(R){return typeof R==="function"}function Hf(R){switch(nC(R)){case 3:return!0;case 4:return!0;default:return!1}}function i_(R,L){return R===L||R!==R&&L!==L}function mC(R,L){var S=R[L];if(S===void 0||S===null)return;if(!jT(S))throw TypeError();return S}function OC(R){var L=mC(R,x);if(!jT(L))throw TypeError();var S=L.call(R);if(!y(S))throw TypeError();return S}function MC(R){return R.value}function uC(R){var L=R.next();return L.done?!1:L}function gC(R){var L=R.return;if(L)L.call(R)}function p_(R){var L=Object.getPrototypeOf(R);if(typeof R!=="function"||R===J)return L;if(L!==J)return L;var S=R.prototype,B=S&&Object.getPrototypeOf(S);if(B==null||B===Object.prototype)return L;var I=B.constructor;if(typeof I!=="function")return L;if(I===R)return L;return I}function wf(){var R;if(!O(X)&&typeof A.Reflect<"u"&&!(X in A.Reflect)&&typeof A.Reflect.defineMetadata==="function")R=Wf(A.Reflect);var L,S,B,I=new Y,j={registerProvider:o,getProvider:G,setProvider:$};return j;function o(K){if(!Object.isExtensible(j))throw Error("Cannot add provider to a frozen registry.");switch(!0){case R===K:break;case O(L):L=K;break;case L===K:break;case O(S):S=K;break;case S===K:break;default:if(B===void 0)B=new Z;B.add(K);break}}function u(K,k){if(!O(L)){if(L.isProviderFor(K,k))return L;if(!O(S)){if(S.isProviderFor(K,k))return L;if(!O(B)){var b=OC(B);while(!0){var d=uC(b);if(!d)return;var HT=MC(d);if(HT.isProviderFor(K,k))return gC(b),HT}}}}if(!O(R)&&R.isProviderFor(K,k))return R;return}function G(K,k){var b=I.get(K),d;if(!O(b))d=b.get(k);if(!O(d))return d;if(d=u(K,k),!O(d)){if(O(b))b=new F,I.set(K,b);b.set(k,d)}return d}function z(K){if(O(K))throw TypeError();return L===K||S===K||!O(B)&&B.has(K)}function $(K,k,b){if(!z(b))throw Error("Metadata provider not registered.");var d=G(K,k);if(d!==b){if(!O(d))return!1;var HT=I.get(K);if(O(HT))HT=new F,I.set(K,HT);HT.set(k,b)}return!0}}function Ff(){var R;if(!O(X)&&y(A.Reflect)&&Object.isExtensible(A.Reflect))R=A.Reflect[X];if(O(R))R=wf();if(!O(X)&&y(A.Reflect)&&Object.isExtensible(A.Reflect))Object.defineProperty(A.Reflect,X,{enumerable:!1,configurable:!1,writable:!1,value:R});return R}function Sf(R){var L=new Y,S={isProviderFor:function(z,$){var K=L.get(z);if(O(K))return!1;return K.has($)},OrdinaryDefineOwnMetadata:o,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:j,OrdinaryOwnMetadataKeys:u,OrdinaryDeleteMetadata:G};return D.registerProvider(S),S;function B(z,$,K){var k=L.get(z),b=!1;if(O(k)){if(!K)return;k=new F,L.set(z,k),b=!0}var d=k.get($);if(O(d)){if(!K)return;if(d=new F,k.set($,d),!R.setProvider(z,$,S)){if(k.delete($),b)L.delete(z);throw Error("Wrong provider for target.")}}return d}function I(z,$,K){var k=B($,K,!1);if(O(k))return!1;return KC(k.has(z))}function j(z,$,K){var k=B($,K,!1);if(O(k))return;return k.get(z)}function o(z,$,K,k){var b=B(K,k,!0);b.set(z,$)}function u(z,$){var K=[],k=B(z,$,!1);if(O(k))return K;var b=k.keys(),d=OC(b),HT=0;while(!0){var PC=uC(d);if(!PC)return K.length=HT,K;var Uf=MC(PC);try{K[HT]=Uf}catch(Xf){try{gC(d)}finally{throw Xf}}HT++}}function G(z,$,K){var k=B($,K,!1);if(O(k))return!1;if(!k.delete(z))return!1;if(k.size===0){var b=L.get($);if(!O(b)){if(b.delete(K),b.size===0)L.delete(b)}}return!0}}function Wf(R){var{defineMetadata:L,hasOwnMetadata:S,getOwnMetadata:B,getOwnMetadataKeys:I,deleteMetadata:j}=R,o=new Y,u={isProviderFor:function(G,z){var $=o.get(G);if(!O($)&&$.has(z))return!0;if(I(G,z).length){if(O($))$=new Z,o.set(G,$);return $.add(z),!0}return!1},OrdinaryDefineOwnMetadata:L,OrdinaryHasOwnMetadata:S,OrdinaryGetOwnMetadata:B,OrdinaryOwnMetadataKeys:I,OrdinaryDeleteMetadata:j};return u}function E_(R,L,S){var B=D.getProvider(R,L);if(!O(B))return B;if(S){if(D.setProvider(R,L,W))return W;throw Error("Illegal state.")}return}function qf(){var R={},L=[],S=function(){function u(G,z,$){this._index=0,this._keys=G,this._values=z,this._selector=$}return u.prototype["@@iterator"]=function(){return this},u.prototype[x]=function(){return this},u.prototype.next=function(){var G=this._index;if(G>=0&&G<this._keys.length){var z=this._selector(this._keys[G],this._values[G]);if(G+1>=this._keys.length)this._index=-1,this._keys=L,this._values=L;else this._index++;return{value:z,done:!1}}return{value:void 0,done:!0}},u.prototype.throw=function(G){if(this._index>=0)this._index=-1,this._keys=L,this._values=L;throw G},u.prototype.return=function(G){if(this._index>=0)this._index=-1,this._keys=L,this._values=L;return{value:G,done:!0}},u}(),B=function(){function u(){this._keys=[],this._values=[],this._cacheKey=R,this._cacheIndex=-2}return Object.defineProperty(u.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),u.prototype.has=function(G){return this._find(G,!1)>=0},u.prototype.get=function(G){var z=this._find(G,!1);return z>=0?this._values[z]:void 0},u.prototype.set=function(G,z){var $=this._find(G,!0);return this._values[$]=z,this},u.prototype.delete=function(G){var z=this._find(G,!1);if(z>=0){var $=this._keys.length;for(var K=z+1;K<$;K++)this._keys[K-1]=this._keys[K],this._values[K-1]=this._values[K];if(this._keys.length--,this._values.length--,i_(G,this._cacheKey))this._cacheKey=R,this._cacheIndex=-2;return!0}return!1},u.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=R,this._cacheIndex=-2},u.prototype.keys=function(){return new S(this._keys,this._values,I)},u.prototype.values=function(){return new S(this._keys,this._values,j)},u.prototype.entries=function(){return new S(this._keys,this._values,o)},u.prototype["@@iterator"]=function(){return this.entries()},u.prototype[x]=function(){return this.entries()},u.prototype._find=function(G,z){if(!i_(this._cacheKey,G)){this._cacheIndex=-1;for(var $=0;$<this._keys.length;$++)if(i_(this._keys[$],G)){this._cacheIndex=$;break}}if(this._cacheIndex<0&&z)this._cacheIndex=this._keys.length,this._keys.push(G),this._values.push(void 0);return this._cacheIndex},u}();return B;function I(u,G){return u}function j(u,G){return G}function o(u,G){return[u,G]}}function Yf(){var R=function(){function L(){this._map=new F}return Object.defineProperty(L.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),L.prototype.has=function(S){return this._map.has(S)},L.prototype.add=function(S){return this._map.set(S,S),this},L.prototype.delete=function(S){return this._map.delete(S)},L.prototype.clear=function(){this._map.clear()},L.prototype.keys=function(){return this._map.keys()},L.prototype.values=function(){return this._map.keys()},L.prototype.entries=function(){return this._map.entries()},L.prototype["@@iterator"]=function(){return this.keys()},L.prototype[x]=function(){return this.keys()},L}();return R}function Qf(){var R=16,L=w.create(),S=B();return function(){function G(){this._key=B()}return G.prototype.has=function(z){var $=I(z,!1);return $!==void 0?w.has($,this._key):!1},G.prototype.get=function(z){var $=I(z,!1);return $!==void 0?w.get($,this._key):void 0},G.prototype.set=function(z,$){var K=I(z,!0);return K[this._key]=$,this},G.prototype.delete=function(z){var $=I(z,!1);return $!==void 0?delete $[this._key]:!1},G.prototype.clear=function(){this._key=B()},G}();function B(){var G;do G="@@WeakMap@@"+u();while(w.has(L,G));return L[G]=!0,G}function I(G,z){if(!C.call(G,S)){if(!z)return;Object.defineProperty(G,S,{value:w.create()})}return G[S]}function j(G,z){for(var $=0;$<z;++$)G[$]=Math.random()*255|0;return G}function o(G){if(typeof Uint8Array==="function"){var z=new Uint8Array(G);if(typeof crypto<"u")crypto.getRandomValues(z);else if(typeof msCrypto<"u")msCrypto.getRandomValues(z);else j(z,G);return z}return j(Array(G),G)}function u(){var G=o(R);G[6]=G[6]&79|64,G[8]=G[8]&191|128;var z="";for(var $=0;$<R;++$){var K=G[$];if($===4||$===6||$===8)z+="-";if(K<16)z+="0";z+=K.toString(16).toLowerCase()}return z}}function o_(R){return R.__=void 0,delete R.__,R}})})(kC||(kC={}))});var gT=m((hc,yC)=>{yC.exports=TypeError});var dC=m((mc,jC)=>{jC.exports=Gf("util").inspect});var q_=m((Oc,wA)=>{var RC=typeof Map==="function"&&Map.prototype,e_=Object.getOwnPropertyDescriptor&&RC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,h_=RC&&e_&&typeof e_.get==="function"?e_.get:null,sC=RC&&Map.prototype.forEach,cC=typeof Set==="function"&&Set.prototype,a_=Object.getOwnPropertyDescriptor&&cC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,m_=cC&&a_&&typeof a_.get==="function"?a_.get:null,iC=cC&&Set.prototype.forEach,L0=typeof WeakMap==="function"&&WeakMap.prototype,F_=L0?WeakMap.prototype.has:null,H0=typeof WeakSet==="function"&&WeakSet.prototype,S_=H0?WeakSet.prototype.has:null,w0=typeof WeakRef==="function"&&WeakRef.prototype,pC=w0?WeakRef.prototype.deref:null,F0=Boolean.prototype.valueOf,S0=Object.prototype.toString,W0=Function.prototype.toString,q0=String.prototype.match,LC=String.prototype.slice,IT=String.prototype.replace,Y0=String.prototype.toUpperCase,oC=String.prototype.toLowerCase,EA=RegExp.prototype.test,rC=Array.prototype.concat,BT=Array.prototype.join,Q0=Array.prototype.slice,tC=Math.floor,CC=typeof BigInt==="function"?BigInt.prototype.valueOf:null,TC=Object.getOwnPropertySymbols,AC=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,oT=typeof Symbol==="function"&&typeof Symbol.iterator==="object",W_=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===oT?"object":"symbol")?Symbol.toStringTag:null,fA=Object.prototype.propertyIsEnumerable,eC=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(_){return _.__proto__}:null);function aC(_,T){if(_===1/0||_===-1/0||_!==_||_&&_>-1000&&_<1000||EA.call(/e/,T))return T;var A=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof _==="number"){var C=_<0?-tC(-_):tC(_);if(C!==_){var E=String(C),f=LC.call(T,E.length+1);return IT.call(E,A,"$&_")+"."+IT.call(IT.call(f,/([0-9]{3})/g,"$&_"),/_$/,"")}}return IT.call(T,A,"$&_")}var EC=dC(),TA=EC.custom,_A=cA(TA)?TA:null,xA={__proto__:null,double:'"',single:"'"},U0={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};wA.exports=function _(T,A,C,E){var f=A||{};if($T(f,"quoteStyle")&&!$T(xA,f.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if($T(f,"maxStringLength")&&(typeof f.maxStringLength==="number"?f.maxStringLength<0&&f.maxStringLength!==1/0:f.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var x=$T(f,"customInspect")?f.customInspect:!0;if(typeof x!=="boolean"&&x!=="symbol")throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($T(f,"indent")&&f.indent!==null&&f.indent!=="\t"&&!(parseInt(f.indent,10)===f.indent&&f.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($T(f,"numericSeparator")&&typeof f.numericSeparator!=="boolean")throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var H=f.numericSeparator;if(typeof T>"u")return"undefined";if(T===null)return"null";if(typeof T==="boolean")return T?"true":"false";if(typeof T==="string")return HA(T,f);if(typeof T==="number"){if(T===0)return 1/0/T>0?"0":"-0";var c=String(T);return H?aC(T,c):c}if(typeof T==="bigint"){var q=String(T)+"n";return H?aC(T,q):q}var w=typeof f.depth>"u"?5:f.depth;if(typeof C>"u")C=0;if(C>=w&&w>0&&typeof T==="object")return fC(T)?"[Array]":"[Object]";var J=u0(f,C);if(typeof E>"u")E=[];else if(LA(E,T)>=0)return"[Circular]";function F(s,e,TT){if(e)E=Q0.call(E),E.push(e);if(TT){var AT={depth:f.depth};if($T(f,"quoteStyle"))AT.quoteStyle=f.quoteStyle;return _(s,AT,C+1,E)}return _(s,f,C+1,E)}if(typeof T==="function"&&!CA(T)){var Z=N0(T),Y=I_(T,F);return"[Function"+(Z?": "+Z:" (anonymous)")+"]"+(Y.length>0?" { "+BT.call(Y,", ")+" }":"")}if(cA(T)){var X=oT?IT.call(String(T),/^(Symbol\(.*\))_[^)]*$/,"$1"):AC.call(T);return typeof T==="object"&&!oT?w_(X):X}if(m0(T)){var D="<"+oC.call(String(T.nodeName)),W=T.attributes||[];for(var N=0;N<W.length;N++)D+=" "+W[N].name+"="+RA(X0(W[N].value),"double",f);if(D+=">",T.childNodes&&T.childNodes.length)D+="...";return D+="</"+oC.call(String(T.nodeName))+">",D}if(fC(T)){if(T.length===0)return"[]";var U=I_(T,F);if(J&&!M0(U))return"["+xC(U,J)+"]";return"[ "+BT.call(U,", ")+" ]"}if(Z0(T)){var V=I_(T,F);if(!("cause"in Error.prototype)&&"cause"in T&&!fA.call(T,"cause"))return"{ ["+String(T)+"] "+BT.call(rC.call("[cause]: "+F(T.cause),V),", ")+" }";if(V.length===0)return"["+String(T)+"]";return"{ ["+String(T)+"] "+BT.call(V,", ")+" }"}if(typeof T==="object"&&x){if(_A&&typeof T[_A]==="function"&&EC)return EC(T,{depth:w-C});else if(x!=="symbol"&&typeof T.inspect==="function")return T.inspect()}if($0(T)){var n=[];if(sC)sC.call(T,function(s,e){n.push(F(e,T,!0)+" => "+F(s,T))});return AA("Map",h_.call(T),n,J)}if(I0(T)){var a=[];if(iC)iC.call(T,function(s){a.push(F(s,T))});return AA("Set",m_.call(T),a,J)}if(n0(T))return _C("WeakMap");if(h0(T))return _C("WeakSet");if(K0(T))return _C("WeakRef");if(V0(T))return w_(F(Number(T)));if(G0(T))return w_(F(CC.call(T)));if(D0(T))return w_(F0.call(T));if(B0(T))return w_(F(String(T)));if(typeof window<"u"&&T===window)return"{ [object Window] }";if(typeof globalThis<"u"&&T===globalThis||typeof global<"u"&&T===global)return"{ [object globalThis] }";if(!J0(T)&&!CA(T)){var Q=I_(T,F),P=eC?eC(T)===Object.prototype:T instanceof Object||T.constructor===Object,h=T instanceof Object?"":"null prototype",M=!P&&W_&&Object(T)===T&&W_ in T?LC.call(hT(T),8,-1):h?"Object":"",i=P||typeof T.constructor!=="function"?"":T.constructor.name?T.constructor.name+" ":"",p=i+(M||h?"["+BT.call(rC.call([],M||[],h||[]),": ")+"] ":"");if(Q.length===0)return p+"{}";if(J)return p+"{"+xC(Q,J)+"}";return p+"{ "+BT.call(Q,", ")+" }"}return String(T)};function RA(_,T,A){var C=A.quoteStyle||T,E=xA[C];return E+_+E}function X0(_){return IT.call(String(_),/"/g,"&quot;")}function PT(_){return!W_||!(typeof _==="object"&&((W_ in _)||typeof _[W_]<"u"))}function fC(_){return hT(_)==="[object Array]"&&PT(_)}function J0(_){return hT(_)==="[object Date]"&&PT(_)}function CA(_){return hT(_)==="[object RegExp]"&&PT(_)}function Z0(_){return hT(_)==="[object Error]"&&PT(_)}function B0(_){return hT(_)==="[object String]"&&PT(_)}function V0(_){return hT(_)==="[object Number]"&&PT(_)}function D0(_){return hT(_)==="[object Boolean]"&&PT(_)}function cA(_){if(oT)return _&&typeof _==="object"&&_ instanceof Symbol;if(typeof _==="symbol")return!0;if(!_||typeof _!=="object"||!AC)return!1;try{return AC.call(_),!0}catch(T){}return!1}function G0(_){if(!_||typeof _!=="object"||!CC)return!1;try{return CC.call(_),!0}catch(T){}return!1}var z0=Object.prototype.hasOwnProperty||function(_){return _ in this};function $T(_,T){return z0.call(_,T)}function hT(_){return S0.call(_)}function N0(_){if(_.name)return _.name;var T=q0.call(W0.call(_),/^function\s*([\w$]+)/);if(T)return T[1];return null}function LA(_,T){if(_.indexOf)return _.indexOf(T);for(var A=0,C=_.length;A<C;A++)if(_[A]===T)return A;return-1}function $0(_){if(!h_||!_||typeof _!=="object")return!1;try{h_.call(_);try{m_.call(_)}catch(T){return!0}return _ instanceof Map}catch(T){}return!1}function n0(_){if(!F_||!_||typeof _!=="object")return!1;try{F_.call(_,F_);try{S_.call(_,S_)}catch(T){return!0}return _ instanceof WeakMap}catch(T){}return!1}function K0(_){if(!pC||!_||typeof _!=="object")return!1;try{return pC.call(_),!0}catch(T){}return!1}function I0(_){if(!m_||!_||typeof _!=="object")return!1;try{m_.call(_);try{h_.call(_)}catch(T){return!0}return _ instanceof Set}catch(T){}return!1}function h0(_){if(!S_||!_||typeof _!=="object")return!1;try{S_.call(_,S_);try{F_.call(_,F_)}catch(T){return!0}return _ instanceof WeakSet}catch(T){}return!1}function m0(_){if(!_||typeof _!=="object")return!1;if(typeof HTMLElement<"u"&&_ instanceof HTMLElement)return!0;return typeof _.nodeName==="string"&&typeof _.getAttribute==="function"}function HA(_,T){if(_.length>T.maxStringLength){var A=_.length-T.maxStringLength,C="... "+A+" more character"+(A>1?"s":"");return HA(LC.call(_,0,T.maxStringLength),T)+C}var E=U0[T.quoteStyle||"single"];E.lastIndex=0;var f=IT.call(IT.call(_,E,"\\$1"),/[\x00-\x1f]/g,O0);return RA(f,"single",T)}function O0(_){var T=_.charCodeAt(0),A={8:"b",9:"t",10:"n",12:"f",13:"r"}[T];if(A)return"\\"+A;return"\\x"+(T<16?"0":"")+Y0.call(T.toString(16))}function w_(_){return"Object("+_+")"}function _C(_){return _+" { ? }"}function AA(_,T,A,C){var E=C?xC(A,C):BT.call(A,", ");return _+" ("+T+") {"+E+"}"}function M0(_){for(var T=0;T<_.length;T++)if(LA(_[T],`
16
- `)>=0)return!1;return!0}function u0(_,T){var A;if(_.indent==="\t")A="\t";else if(typeof _.indent==="number"&&_.indent>0)A=BT.call(Array(_.indent+1)," ");else return null;return{base:A,prev:BT.call(Array(T+1),A)}}function xC(_,T){if(_.length===0)return"";var A=`
17
- `+T.prev+T.base;return A+BT.call(_,","+A)+`
18
- `+T.prev}function I_(_,T){var A=fC(_),C=[];if(A){C.length=_.length;for(var E=0;E<_.length;E++)C[E]=$T(_,E)?T(_[E],_):""}var f=typeof TC==="function"?TC(_):[],x;if(oT){x={};for(var H=0;H<f.length;H++)x["$"+f[H]]=f[H]}for(var c in _){if(!$T(_,c))continue;if(A&&String(Number(c))===c&&c<_.length)continue;if(oT&&x["$"+c]instanceof Symbol)continue;else if(EA.call(/[^\w$]/,c))C.push(T(c,_)+": "+T(_[c],_));else C.push(c+": "+T(_[c],_))}if(typeof TC==="function"){for(var q=0;q<f.length;q++)if(fA.call(_,f[q]))C.push("["+T(f[q])+"]: "+T(_[f[q]],_))}return C}});var SA=m((Mc,FA)=>{var g0=q_(),P0=gT(),O_=function(_,T,A){var C=_,E;for(;(E=C.next)!=null;C=E)if(E.key===T){if(C.next=E.next,!A)E.next=_.next,_.next=E;return E}},k0=function(_,T){if(!_)return;var A=O_(_,T);return A&&A.value},v0=function(_,T,A){var C=O_(_,T);if(C)C.value=A;else _.next={key:T,next:_.next,value:A}},b0=function(_,T){if(!_)return!1;return!!O_(_,T)},l0=function(_,T){if(_)return O_(_,T,!0)};FA.exports=function(){var T,A={assert:function(C){if(!A.has(C))throw new P0("Side channel does not contain "+g0(C))},delete:function(C){var E=T&&T.next,f=l0(T,C);if(f&&E&&E===f)T=void 0;return!!f},get:function(C){return k0(T,C)},has:function(C){return b0(T,C)},set:function(C,E){if(!T)T={next:void 0};v0(T,C,E)}};return A}});var HC=m((uc,WA)=>{WA.exports=Object});var YA=m((gc,qA)=>{qA.exports=Error});var UA=m((Pc,QA)=>{QA.exports=EvalError});var JA=m((kc,XA)=>{XA.exports=RangeError});var BA=m((vc,ZA)=>{ZA.exports=ReferenceError});var DA=m((bc,VA)=>{VA.exports=SyntaxError});var zA=m((lc,GA)=>{GA.exports=URIError});var $A=m((yc,NA)=>{NA.exports=Math.abs});var KA=m((jc,nA)=>{nA.exports=Math.floor});var hA=m((dc,IA)=>{IA.exports=Math.max});var OA=m((sc,mA)=>{mA.exports=Math.min});var uA=m((ic,MA)=>{MA.exports=Math.pow});var PA=m((pc,gA)=>{gA.exports=Math.round});var vA=m((oc,kA)=>{kA.exports=Number.isNaN||function(T){return T!==T}});var lA=m((rc,bA)=>{var y0=vA();bA.exports=function(T){if(y0(T)||T===0)return T;return T<0?-1:1}});var jA=m((tc,yA)=>{yA.exports=Object.getOwnPropertyDescriptor});var wC=m((ec,dA)=>{var M_=jA();if(M_)try{M_([],"length")}catch(_){M_=null}dA.exports=M_});var iA=m((ac,sA)=>{var u_=Object.defineProperty||!1;if(u_)try{u_({},"a",{value:1})}catch(_){u_=!1}sA.exports=u_});var oA=m((T1,pA)=>{pA.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var T={},A=Symbol("test"),C=Object(A);if(typeof A==="string")return!1;if(Object.prototype.toString.call(A)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(C)!=="[object Symbol]")return!1;var E=42;T[A]=E;for(var f in T)return!1;if(typeof Object.keys==="function"&&Object.keys(T).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(T).length!==0)return!1;var x=Object.getOwnPropertySymbols(T);if(x.length!==1||x[0]!==A)return!1;if(!Object.prototype.propertyIsEnumerable.call(T,A))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var H=Object.getOwnPropertyDescriptor(T,A);if(H.value!==E||H.enumerable!==!0)return!1}return!0}});var eA=m((_1,tA)=>{var rA=typeof Symbol<"u"&&Symbol,j0=oA();tA.exports=function(){if(typeof rA!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof rA("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return j0()}});var FC=m((C1,aA)=>{aA.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var SC=m((A1,TE)=>{var d0=HC();TE.exports=d0.getPrototypeOf||null});var AE=m((E1,CE)=>{var s0="Function.prototype.bind called on incompatible ",i0=Object.prototype.toString,p0=Math.max,o0="[object Function]",_E=function(T,A){var C=[];for(var E=0;E<T.length;E+=1)C[E]=T[E];for(var f=0;f<A.length;f+=1)C[f+T.length]=A[f];return C},r0=function(T,A){var C=[];for(var E=A||0,f=0;E<T.length;E+=1,f+=1)C[f]=T[E];return C},t0=function(_,T){var A="";for(var C=0;C<_.length;C+=1)if(A+=_[C],C+1<_.length)A+=T;return A};CE.exports=function(T){var A=this;if(typeof A!=="function"||i0.apply(A)!==o0)throw TypeError(s0+A);var C=r0(arguments,1),E,f=function(){if(this instanceof E){var w=A.apply(this,_E(C,arguments));if(Object(w)===w)return w;return this}return A.apply(T,_E(C,arguments))},x=p0(0,A.length-C.length),H=[];for(var c=0;c<x;c++)H[c]="$"+c;if(E=Function("binder","return function ("+t0(H,",")+"){ return binder.apply(this,arguments); }")(f),A.prototype){var q=function(){};q.prototype=A.prototype,E.prototype=new q,q.prototype=null}return E}});var Y_=m((f1,EE)=>{var e0=AE();EE.exports=Function.prototype.bind||e0});var g_=m((x1,fE)=>{fE.exports=Function.prototype.call});var WC=m((R1,xE)=>{xE.exports=Function.prototype.apply});var cE=m((c1,RE)=>{RE.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var HE=m((L1,LE)=>{var a0=Y_(),Tx=WC(),_x=g_(),Cx=cE();LE.exports=Cx||a0.call(_x,Tx)});var qC=m((H1,wE)=>{var Ax=Y_(),Ex=gT(),fx=g_(),xx=HE();wE.exports=function(T){if(T.length<1||typeof T[0]!=="function")throw new Ex("a function is required");return xx(Ax,fx,T)}});var QE=m((w1,YE)=>{var Rx=qC(),FE=wC(),WE;try{WE=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!=="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var YC=!!WE&&FE&&FE(Object.prototype,"__proto__"),qE=Object,SE=qE.getPrototypeOf;YE.exports=YC&&typeof YC.get==="function"?Rx([YC.get]):typeof SE==="function"?function(T){return SE(T==null?T:qE(T))}:!1});var BE=m((F1,ZE)=>{var UE=FC(),XE=SC(),JE=QE();ZE.exports=UE?function(T){return UE(T)}:XE?function(T){if(!T||typeof T!=="object"&&typeof T!=="function")throw TypeError("getProto: not an object");return XE(T)}:JE?function(T){return JE(T)}:null});var DE=m((S1,VE)=>{var cx=Function.prototype.call,Lx=Object.prototype.hasOwnProperty,Hx=Y_();VE.exports=Hx.call(cx,Lx)});var v_=m((W1,nE)=>{var g,wx=HC(),Fx=YA(),Sx=UA(),Wx=JA(),qx=BA(),aT=DA(),eT=gT(),Yx=zA(),Qx=$A(),Ux=KA(),Xx=hA(),Jx=OA(),Zx=uA(),Bx=PA(),Vx=lA(),NE=Function,QC=function(_){try{return NE('"use strict"; return ('+_+").constructor;")()}catch(T){}},Q_=wC(),Dx=iA(),UC=function(){throw new eT},Gx=Q_?function(){try{return arguments.callee,UC}catch(_){try{return Q_(arguments,"callee").get}catch(T){return UC}}}():UC,rT=eA()(),t=BE(),zx=SC(),Nx=FC(),$E=WC(),U_=g_(),tT={},$x=typeof Uint8Array>"u"||!t?g:t(Uint8Array),kT={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":rT&&t?t([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":tT,"%AsyncGenerator%":tT,"%AsyncGeneratorFunction%":tT,"%AsyncIteratorPrototype%":tT,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Fx,"%eval%":eval,"%EvalError%":Sx,"%Float16Array%":typeof Float16Array>"u"?g:Float16Array,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":NE,"%GeneratorFunction%":tT,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":rT&&t?t(t([][Symbol.iterator]())):g,"%JSON%":typeof JSON==="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!rT||!t?g:t(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":wx,"%Object.getOwnPropertyDescriptor%":Q_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":Wx,"%ReferenceError%":qx,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!rT||!t?g:t(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":rT&&t?t(""[Symbol.iterator]()):g,"%Symbol%":rT?Symbol:g,"%SyntaxError%":aT,"%ThrowTypeError%":Gx,"%TypedArray%":$x,"%TypeError%":eT,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":Yx,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet,"%Function.prototype.call%":U_,"%Function.prototype.apply%":$E,"%Object.defineProperty%":Dx,"%Object.getPrototypeOf%":zx,"%Math.abs%":Qx,"%Math.floor%":Ux,"%Math.max%":Xx,"%Math.min%":Jx,"%Math.pow%":Zx,"%Math.round%":Bx,"%Math.sign%":Vx,"%Reflect.getPrototypeOf%":Nx};if(t)try{null.error}catch(_){XC=t(t(_)),kT["%Error.prototype%"]=XC}var XC,nx=function _(T){var A;if(T==="%AsyncFunction%")A=QC("async function () {}");else if(T==="%GeneratorFunction%")A=QC("function* () {}");else if(T==="%AsyncGeneratorFunction%")A=QC("async function* () {}");else if(T==="%AsyncGenerator%"){var C=_("%AsyncGeneratorFunction%");if(C)A=C.prototype}else if(T==="%AsyncIteratorPrototype%"){var E=_("%AsyncGenerator%");if(E&&t)A=t(E.prototype)}return kT[T]=A,A},GE={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},X_=Y_(),P_=DE(),Kx=X_.call(U_,Array.prototype.concat),Ix=X_.call($E,Array.prototype.splice),zE=X_.call(U_,String.prototype.replace),k_=X_.call(U_,String.prototype.slice),hx=X_.call(U_,RegExp.prototype.exec),mx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ox=/\\(\\)?/g,Mx=function(T){var A=k_(T,0,1),C=k_(T,-1);if(A==="%"&&C!=="%")throw new aT("invalid intrinsic syntax, expected closing `%`");else if(C==="%"&&A!=="%")throw new aT("invalid intrinsic syntax, expected opening `%`");var E=[];return zE(T,mx,function(f,x,H,c){E[E.length]=H?zE(c,Ox,"$1"):x||f}),E},ux=function(T,A){var C=T,E;if(P_(GE,C))E=GE[C],C="%"+E[0]+"%";if(P_(kT,C)){var f=kT[C];if(f===tT)f=nx(C);if(typeof f>"u"&&!A)throw new eT("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:E,name:C,value:f}}throw new aT("intrinsic "+T+" does not exist!")};nE.exports=function(T,A){if(typeof T!=="string"||T.length===0)throw new eT("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof A!=="boolean")throw new eT('"allowMissing" argument must be a boolean');if(hx(/^%?[^%]*%?$/,T)===null)throw new aT("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var C=Mx(T),E=C.length>0?C[0]:"",f=ux("%"+E+"%",A),x=f.name,H=f.value,c=!1,q=f.alias;if(q)E=q[0],Ix(C,Kx([0,1],q));for(var w=1,J=!0;w<C.length;w+=1){var F=C[w],Z=k_(F,0,1),Y=k_(F,-1);if((Z==='"'||Z==="'"||Z==="`"||(Y==='"'||Y==="'"||Y==="`"))&&Z!==Y)throw new aT("property names with quotes must have matching quotes");if(F==="constructor"||!J)c=!0;if(E+="."+F,x="%"+E+"%",P_(kT,x))H=kT[x];else if(H!=null){if(!(F in H)){if(!A)throw new eT("base intrinsic for "+T+" exists, but the property is not available.");return}if(Q_&&w+1>=C.length){var X=Q_(H,F);if(J=!!X,J&&"get"in X&&!("originalValue"in X.get))H=X.get;else H=H[F]}else J=P_(H,F),H=H[F];if(J&&!c)kT[x]=H}}return H}});var JC=m((q1,hE)=>{var KE=v_(),IE=qC(),gx=IE([KE("%String.prototype.indexOf%")]);hE.exports=function(T,A){var C=KE(T,!!A);if(typeof C==="function"&&gx(T,".prototype.")>-1)return IE([C]);return C}});var ZC=m((Y1,OE)=>{var Px=v_(),J_=JC(),kx=q_(),vx=gT(),mE=Px("%Map%",!0),bx=J_("Map.prototype.get",!0),lx=J_("Map.prototype.set",!0),yx=J_("Map.prototype.has",!0),jx=J_("Map.prototype.delete",!0),dx=J_("Map.prototype.size",!0);OE.exports=!!mE&&function(){var T,A={assert:function(C){if(!A.has(C))throw new vx("Side channel does not contain "+kx(C))},delete:function(C){if(T){var E=jx(T,C);if(dx(T)===0)T=void 0;return E}return!1},get:function(C){if(T)return bx(T,C)},has:function(C){if(T)return yx(T,C);return!1},set:function(C,E){if(!T)T=new mE;lx(T,C,E)}};return A}});var uE=m((Q1,ME)=>{var sx=v_(),l_=JC(),ix=q_(),b_=ZC(),px=gT(),T_=sx("%WeakMap%",!0),ox=l_("WeakMap.prototype.get",!0),rx=l_("WeakMap.prototype.set",!0),tx=l_("WeakMap.prototype.has",!0),ex=l_("WeakMap.prototype.delete",!0);ME.exports=T_?function(){var T,A,C={assert:function(E){if(!C.has(E))throw new px("Side channel does not contain "+ix(E))},delete:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return ex(T,E)}else if(b_){if(A)return A.delete(E)}return!1},get:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return ox(T,E)}return A&&A.get(E)},has:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return tx(T,E)}return!!A&&A.has(E)},set:function(E,f){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(!T)T=new T_;rx(T,E,f)}else if(b_){if(!A)A=b_();A.set(E,f)}}};return C}:b_});var PE=m((U1,gE)=>{var ax=gT(),TR=q_(),_R=SA(),CR=ZC(),AR=uE(),ER=AR||CR||_R;gE.exports=function(){var T,A={assert:function(C){if(!A.has(C))throw new ax("Side channel does not contain "+TR(C))},delete:function(C){return!!T&&T.delete(C)},get:function(C){return T&&T.get(C)},has:function(C){return!!T&&T.has(C)},set:function(C,E){if(!T)T=ER();T.set(C,E)}};return A}});var y_=m((X1,kE)=>{var fR=String.prototype.replace,xR=/%20/g,BC={RFC1738:"RFC1738",RFC3986:"RFC3986"};kE.exports={default:BC.RFC3986,formatters:{RFC1738:function(_){return fR.call(_,xR,"+")},RFC3986:function(_){return String(_)}},RFC1738:BC.RFC1738,RFC3986:BC.RFC3986}});var GC=m((J1,bE)=>{var RR=y_(),VC=Object.prototype.hasOwnProperty,vT=Array.isArray,VT=function(){var _=[];for(var T=0;T<256;++T)_.push("%"+((T<16?"0":"")+T.toString(16)).toUpperCase());return _}(),cR=function(T){while(T.length>1){var A=T.pop(),C=A.obj[A.prop];if(vT(C)){var E=[];for(var f=0;f<C.length;++f)if(typeof C[f]<"u")E.push(C[f]);A.obj[A.prop]=E}}},vE=function(T,A){var C=A&&A.plainObjects?{__proto__:null}:{};for(var E=0;E<T.length;++E)if(typeof T[E]<"u")C[E]=T[E];return C},LR=function _(T,A,C){if(!A)return T;if(typeof A!=="object"&&typeof A!=="function"){if(vT(T))T.push(A);else if(T&&typeof T==="object"){if(C&&(C.plainObjects||C.allowPrototypes)||!VC.call(Object.prototype,A))T[A]=!0}else return[T,A];return T}if(!T||typeof T!=="object")return[T].concat(A);var E=T;if(vT(T)&&!vT(A))E=vE(T,C);if(vT(T)&&vT(A))return A.forEach(function(f,x){if(VC.call(T,x)){var H=T[x];if(H&&typeof H==="object"&&f&&typeof f==="object")T[x]=_(H,f,C);else T.push(f)}else T[x]=f}),T;return Object.keys(A).reduce(function(f,x){var H=A[x];if(VC.call(f,x))f[x]=_(f[x],H,C);else f[x]=H;return f},E)},HR=function(T,A){return Object.keys(A).reduce(function(C,E){return C[E]=A[E],C},T)},wR=function(_,T,A){var C=_.replace(/\+/g," ");if(A==="iso-8859-1")return C.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(C)}catch(E){return C}},DC=1024,FR=function(T,A,C,E,f){if(T.length===0)return T;var x=T;if(typeof T==="symbol")x=Symbol.prototype.toString.call(T);else if(typeof T!=="string")x=String(T);if(C==="iso-8859-1")return escape(x).replace(/%u[0-9a-f]{4}/gi,function(Z){return"%26%23"+parseInt(Z.slice(2),16)+"%3B"});var H="";for(var c=0;c<x.length;c+=DC){var q=x.length>=DC?x.slice(c,c+DC):x,w=[];for(var J=0;J<q.length;++J){var F=q.charCodeAt(J);if(F===45||F===46||F===95||F===126||F>=48&&F<=57||F>=65&&F<=90||F>=97&&F<=122||f===RR.RFC1738&&(F===40||F===41)){w[w.length]=q.charAt(J);continue}if(F<128){w[w.length]=VT[F];continue}if(F<2048){w[w.length]=VT[192|F>>6]+VT[128|F&63];continue}if(F<55296||F>=57344){w[w.length]=VT[224|F>>12]+VT[128|F>>6&63]+VT[128|F&63];continue}J+=1,F=65536+((F&1023)<<10|q.charCodeAt(J)&1023),w[w.length]=VT[240|F>>18]+VT[128|F>>12&63]+VT[128|F>>6&63]+VT[128|F&63]}H+=w.join("")}return H},SR=function(T){var A=[{obj:{o:T},prop:"o"}],C=[];for(var E=0;E<A.length;++E){var f=A[E],x=f.obj[f.prop],H=Object.keys(x);for(var c=0;c<H.length;++c){var q=H[c],w=x[q];if(typeof w==="object"&&w!==null&&C.indexOf(w)===-1)A.push({obj:x,prop:q}),C.push(w)}}return cR(A),T},WR=function(T){return Object.prototype.toString.call(T)==="[object RegExp]"},qR=function(T){if(!T||typeof T!=="object")return!1;return!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},YR=function(T,A){return[].concat(T,A)},QR=function(T,A){if(vT(T)){var C=[];for(var E=0;E<T.length;E+=1)C.push(A(T[E]));return C}return A(T)};bE.exports={arrayToObject:vE,assign:HR,combine:YR,compact:SR,decode:wR,encode:FR,isBuffer:qR,isRegExp:WR,maybeMap:QR,merge:LR}});var iE=m((Z1,sE)=>{var yE=PE(),j_=GC(),Z_=y_(),UR=Object.prototype.hasOwnProperty,jE={brackets:function(T){return T+"[]"},comma:"comma",indices:function(T,A){return T+"["+A+"]"},repeat:function(T){return T}},DT=Array.isArray,XR=Array.prototype.push,dE=function(_,T){XR.apply(_,DT(T)?T:[T])},JR=Date.prototype.toISOString,lE=Z_.default,r={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:j_.encode,encodeValuesOnly:!1,filter:void 0,format:lE,formatter:Z_.formatters[lE],indices:!1,serializeDate:function(T){return JR.call(T)},skipNulls:!1,strictNullHandling:!1},ZR=function(T){return typeof T==="string"||typeof T==="number"||typeof T==="boolean"||typeof T==="symbol"||typeof T==="bigint"},zC={},BR=function _(T,A,C,E,f,x,H,c,q,w,J,F,Z,Y,X,D,W,N){var U=T,V=N,n=0,a=!1;while((V=V.get(zC))!==void 0&&!a){var Q=V.get(T);if(n+=1,typeof Q<"u")if(Q===n)throw RangeError("Cyclic object value");else a=!0;if(typeof V.get(zC)>"u")n=0}if(typeof w==="function")U=w(A,U);else if(U instanceof Date)U=Z(U);else if(C==="comma"&&DT(U))U=j_.maybeMap(U,function(lT){if(lT instanceof Date)return Z(lT);return lT});if(U===null){if(x)return q&&!D?q(A,r.encoder,W,"key",Y):A;U=""}if(ZR(U)||j_.isBuffer(U)){if(q){var P=D?A:q(A,r.encoder,W,"key",Y);return[X(P)+"="+X(q(U,r.encoder,W,"value",Y))]}return[X(A)+"="+X(String(U))]}var h=[];if(typeof U>"u")return h;var M;if(C==="comma"&&DT(U)){if(D&&q)U=j_.maybeMap(U,q);M=[{value:U.length>0?U.join(",")||null:void 0}]}else if(DT(w))M=w;else{var i=Object.keys(U);M=J?i.sort(J):i}var p=c?String(A).replace(/\./g,"%2E"):String(A),s=E&&DT(U)&&U.length===1?p+"[]":p;if(f&&DT(U)&&U.length===0)return s+"[]";for(var e=0;e<M.length;++e){var TT=M[e],AT=typeof TT==="object"&&TT&&typeof TT.value<"u"?TT.value:U[TT];if(H&&AT===null)continue;var KT=F&&c?String(TT).replace(/\./g,"%2E"):String(TT),z_=DT(U)?typeof C==="function"?C(s,KT):s:s+(F?"."+KT:"["+KT+"]");N.set(T,n);var A_=yE();A_.set(zC,N),dE(h,_(AT,z_,C,E,f,x,H,c,C==="comma"&&D&&DT(U)?null:q,w,J,F,Z,Y,X,D,W,A_))}return h},VR=function(T){if(!T)return r;if(typeof T.allowEmptyArrays<"u"&&typeof T.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.encodeDotInKeys<"u"&&typeof T.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(T.encoder!==null&&typeof T.encoder<"u"&&typeof T.encoder!=="function")throw TypeError("Encoder has to be a function.");var A=T.charset||r.charset;if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var C=Z_.default;if(typeof T.format<"u"){if(!UR.call(Z_.formatters,T.format))throw TypeError("Unknown format option provided.");C=T.format}var E=Z_.formatters[C],f=r.filter;if(typeof T.filter==="function"||DT(T.filter))f=T.filter;var x;if(T.arrayFormat in jE)x=T.arrayFormat;else if("indices"in T)x=T.indices?"indices":"repeat";else x=r.arrayFormat;if("commaRoundTrip"in T&&typeof T.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");var H=typeof T.allowDots>"u"?T.encodeDotInKeys===!0?!0:r.allowDots:!!T.allowDots;return{addQueryPrefix:typeof T.addQueryPrefix==="boolean"?T.addQueryPrefix:r.addQueryPrefix,allowDots:H,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:r.allowEmptyArrays,arrayFormat:x,charset:A,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:r.charsetSentinel,commaRoundTrip:!!T.commaRoundTrip,delimiter:typeof T.delimiter>"u"?r.delimiter:T.delimiter,encode:typeof T.encode==="boolean"?T.encode:r.encode,encodeDotInKeys:typeof T.encodeDotInKeys==="boolean"?T.encodeDotInKeys:r.encodeDotInKeys,encoder:typeof T.encoder==="function"?T.encoder:r.encoder,encodeValuesOnly:typeof T.encodeValuesOnly==="boolean"?T.encodeValuesOnly:r.encodeValuesOnly,filter:f,format:C,formatter:E,serializeDate:typeof T.serializeDate==="function"?T.serializeDate:r.serializeDate,skipNulls:typeof T.skipNulls==="boolean"?T.skipNulls:r.skipNulls,sort:typeof T.sort==="function"?T.sort:null,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:r.strictNullHandling}};sE.exports=function(_,T){var A=_,C=VR(T),E,f;if(typeof C.filter==="function")f=C.filter,A=f("",A);else if(DT(C.filter))f=C.filter,E=f;var x=[];if(typeof A!=="object"||A===null)return"";var H=jE[C.arrayFormat],c=H==="comma"&&C.commaRoundTrip;if(!E)E=Object.keys(A);if(C.sort)E.sort(C.sort);var q=yE();for(var w=0;w<E.length;++w){var J=E[w],F=A[J];if(C.skipNulls&&F===null)continue;dE(x,BR(F,J,H,c,C.allowEmptyArrays,C.strictNullHandling,C.skipNulls,C.encodeDotInKeys,C.encode?C.encoder:null,C.filter,C.sort,C.allowDots,C.serializeDate,C.format,C.formatter,C.encodeValuesOnly,C.charset,q))}var Z=x.join(C.delimiter),Y=C.addQueryPrefix===!0?"?":"";if(C.charsetSentinel)if(C.charset==="iso-8859-1")Y+="utf8=%26%2310003%3B&";else Y+="utf8=%E2%9C%93&";return Z.length>0?Y+Z:""}});var tE=m((B1,rE)=>{var bT=GC(),NC=Object.prototype.hasOwnProperty,pE=Array.isArray,l={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:bT.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},DR=function(_){return _.replace(/&#(\d+);/g,function(T,A){return String.fromCharCode(parseInt(A,10))})},oE=function(_,T,A){if(_&&typeof _==="string"&&T.comma&&_.indexOf(",")>-1)return _.split(",");if(T.throwOnLimitExceeded&&A>=T.arrayLimit)throw RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");return _},GR="utf8=%26%2310003%3B",zR="utf8=%E2%9C%93",NR=function(T,A){var C={__proto__:null},E=A.ignoreQueryPrefix?T.replace(/^\?/,""):T;E=E.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var f=A.parameterLimit===1/0?void 0:A.parameterLimit,x=E.split(A.delimiter,A.throwOnLimitExceeded?f+1:f);if(A.throwOnLimitExceeded&&x.length>f)throw RangeError("Parameter limit exceeded. Only "+f+" parameter"+(f===1?"":"s")+" allowed.");var H=-1,c,q=A.charset;if(A.charsetSentinel){for(c=0;c<x.length;++c)if(x[c].indexOf("utf8=")===0){if(x[c]===zR)q="utf-8";else if(x[c]===GR)q="iso-8859-1";H=c,c=x.length}}for(c=0;c<x.length;++c){if(c===H)continue;var w=x[c],J=w.indexOf("]="),F=J===-1?w.indexOf("="):J+1,Z,Y;if(F===-1)Z=A.decoder(w,l.decoder,q,"key"),Y=A.strictNullHandling?null:"";else Z=A.decoder(w.slice(0,F),l.decoder,q,"key"),Y=bT.maybeMap(oE(w.slice(F+1),A,pE(C[Z])?C[Z].length:0),function(D){return A.decoder(D,l.decoder,q,"value")});if(Y&&A.interpretNumericEntities&&q==="iso-8859-1")Y=DR(String(Y));if(w.indexOf("[]=")>-1)Y=pE(Y)?[Y]:Y;var X=NC.call(C,Z);if(X&&A.duplicates==="combine")C[Z]=bT.combine(C[Z],Y);else if(!X||A.duplicates==="last")C[Z]=Y}return C},$R=function(_,T,A,C){var E=0;if(_.length>0&&_[_.length-1]==="[]"){var f=_.slice(0,-1).join("");E=Array.isArray(T)&&T[f]?T[f].length:0}var x=C?T:oE(T,A,E);for(var H=_.length-1;H>=0;--H){var c,q=_[H];if(q==="[]"&&A.parseArrays)c=A.allowEmptyArrays&&(x===""||A.strictNullHandling&&x===null)?[]:bT.combine([],x);else{c=A.plainObjects?{__proto__:null}:{};var w=q.charAt(0)==="["&&q.charAt(q.length-1)==="]"?q.slice(1,-1):q,J=A.decodeDotInKeys?w.replace(/%2E/g,"."):w,F=parseInt(J,10);if(!A.parseArrays&&J==="")c={0:x};else if(!isNaN(F)&&q!==J&&String(F)===J&&F>=0&&(A.parseArrays&&F<=A.arrayLimit))c=[],c[F]=x;else if(J!=="__proto__")c[J]=x}x=c}return x},nR=function(T,A,C,E){if(!T)return;var f=C.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T,x=/(\[[^[\]]*])/,H=/(\[[^[\]]*])/g,c=C.depth>0&&x.exec(f),q=c?f.slice(0,c.index):f,w=[];if(q){if(!C.plainObjects&&NC.call(Object.prototype,q)){if(!C.allowPrototypes)return}w.push(q)}var J=0;while(C.depth>0&&(c=H.exec(f))!==null&&J<C.depth){if(J+=1,!C.plainObjects&&NC.call(Object.prototype,c[1].slice(1,-1))){if(!C.allowPrototypes)return}w.push(c[1])}if(c){if(C.strictDepth===!0)throw RangeError("Input depth exceeded depth option of "+C.depth+" and strictDepth is true");w.push("["+f.slice(c.index)+"]")}return $R(w,A,C,E)},KR=function(T){if(!T)return l;if(typeof T.allowEmptyArrays<"u"&&typeof T.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.decodeDotInKeys<"u"&&typeof T.decodeDotInKeys!=="boolean")throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(T.decoder!==null&&typeof T.decoder<"u"&&typeof T.decoder!=="function")throw TypeError("Decoder has to be a function.");if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof T.throwOnLimitExceeded<"u"&&typeof T.throwOnLimitExceeded!=="boolean")throw TypeError("`throwOnLimitExceeded` option must be a boolean");var A=typeof T.charset>"u"?l.charset:T.charset,C=typeof T.duplicates>"u"?l.duplicates:T.duplicates;if(C!=="combine"&&C!=="first"&&C!=="last")throw TypeError("The duplicates option must be either combine, first, or last");var E=typeof T.allowDots>"u"?T.decodeDotInKeys===!0?!0:l.allowDots:!!T.allowDots;return{allowDots:E,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:l.allowEmptyArrays,allowPrototypes:typeof T.allowPrototypes==="boolean"?T.allowPrototypes:l.allowPrototypes,allowSparse:typeof T.allowSparse==="boolean"?T.allowSparse:l.allowSparse,arrayLimit:typeof T.arrayLimit==="number"?T.arrayLimit:l.arrayLimit,charset:A,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:l.charsetSentinel,comma:typeof T.comma==="boolean"?T.comma:l.comma,decodeDotInKeys:typeof T.decodeDotInKeys==="boolean"?T.decodeDotInKeys:l.decodeDotInKeys,decoder:typeof T.decoder==="function"?T.decoder:l.decoder,delimiter:typeof T.delimiter==="string"||bT.isRegExp(T.delimiter)?T.delimiter:l.delimiter,depth:typeof T.depth==="number"||T.depth===!1?+T.depth:l.depth,duplicates:C,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities==="boolean"?T.interpretNumericEntities:l.interpretNumericEntities,parameterLimit:typeof T.parameterLimit==="number"?T.parameterLimit:l.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects==="boolean"?T.plainObjects:l.plainObjects,strictDepth:typeof T.strictDepth==="boolean"?!!T.strictDepth:l.strictDepth,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:l.strictNullHandling,throwOnLimitExceeded:typeof T.throwOnLimitExceeded==="boolean"?T.throwOnLimitExceeded:!1}};rE.exports=function(_,T){var A=KR(T);if(_===""||_===null||typeof _>"u")return A.plainObjects?{__proto__:null}:{};var C=typeof _==="string"?NR(_,A):_,E=A.plainObjects?{__proto__:null}:{},f=Object.keys(C);for(var x=0;x<f.length;++x){var H=f[x],c=nR(H,C[H],A,typeof _==="string");E=bT.merge(E,c,A)}if(A.allowSparse===!0)return E;return bT.compact(E)}});var aE=m((V1,eE)=>{var IR=iE(),hR=tE(),mR=y_();eE.exports={formats:mR,parse:hR,stringify:IR}});var X4=N_($_(),1);var vC={};Df(vC,{zodSchemaKey:()=>zf,webSocketServerArgsKey:()=>YT,webSocketMessageArgsKey:()=>MT,webSocketKey:()=>qT,webSocketEventKey:()=>OT,webSocketEventArgumentsKey:()=>_T,webSocketConnectionArgsKey:()=>QT,webSocketCloseReasonArgsKey:()=>x_,webSocketCloseCodeArgsKey:()=>f_,routeModelArgsKey:()=>cT,responseStatusTextArgsKey:()=>t_,responseStatusArgsKey:()=>L_,responseHeadersArgsKey:()=>CT,responseBodyArgsKey:()=>c_,requestHeadersArgsKey:()=>UT,requestHeaderArgsKey:()=>xT,requestBodyArgsKey:()=>XT,requestArgsKey:()=>RT,queryArgsKey:()=>R_,paramsArgsKey:()=>iT,paramArgsKey:()=>JT,moduleKey:()=>WT,middlewareKey:()=>ST,interceptorKey:()=>mT,injectableKey:()=>NT,injectKey:()=>sT,httpServerArgsKey:()=>fT,guardKey:()=>zT,controllerKey:()=>FT,controllerHttpKey:()=>dT,contextArgsKey:()=>ZT,containerKey:()=>ET,configKey:()=>n_,argumentsKey:()=>v});var v=Symbol.for("____boolTypescriptCore:arguments__"),_T=Symbol.for("____boolTypescriptCore:webSocketEventArguments__"),n_=Symbol.for("____boolTypescriptCore:config__"),FT=Symbol.for("____boolTypescriptCore:controller__"),mT=Symbol.for("____boolTypescriptCore:interceptor__"),zT=Symbol.for("____boolTypescriptCore:guard__"),dT=Symbol.for("____boolTypescriptCore:controller.http__"),sT=Symbol.for("____boolTypescriptCore:inject__"),NT=Symbol.for("____boolTypescriptCore:injectable__"),ST=Symbol.for("____boolTypescriptCore:middleware__"),WT=Symbol.for("____boolTypescriptCore:module__"),ET=Symbol.for("____boolTypescriptCore:container__"),zf=Symbol.for("____boolTypescriptCore:zodSchema__"),qT=Symbol.for("____boolTypescriptCore:webSocket__"),OT=Symbol.for("____boolTypescriptCore:webSocket:event__"),YT=Symbol.for("____boolTypescriptCore:webSocketArguments:server__"),QT=Symbol.for("____boolTypescriptCore:webSocketArguments:connection__"),MT=Symbol.for("____boolTypescriptCore:webSocketArguments:message__"),f_=Symbol.for("____boolTypescriptCore:webSocketArguments:closeCode__"),x_=Symbol.for("____boolTypescriptCore:webSocketArguments:closeReason__"),fT=Symbol.for("____boolTypescriptCore:httpArguments:server__"),UT=Symbol.for("____boolTypescriptCore:httpArguments:requestHeaders__"),xT=Symbol.for("____boolTypescriptCore:httpArguments:requestHeader__"),XT=Symbol.for("____boolTypescriptCore:httpArguments:requestBody__"),iT=Symbol.for("____boolTypescriptCore:httpArguments:params__"),JT=Symbol.for("____boolTypescriptCore:httpArguments:param__"),R_=Symbol.for("____boolTypescriptCore:httpArguments:query__"),RT=Symbol.for("____boolTypescriptCore:httpArguments:request__"),CT=Symbol.for("____boolTypescriptCore:httpArguments:responseHeaders__"),ZT=Symbol.for("____boolTypescriptCore:httpArguments:context__"),cT=Symbol.for("____boolTypescriptCore:httpArguments:routeModel__"),c_=Symbol.for("____boolTypescriptCore:httpArguments:responseBody__"),L_=Symbol.for("____boolTypescriptCore:httpArguments:responseStatus__"),t_=Symbol.for("____boolTypescriptCore:httpArguments:responseStatusText__");var Nf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:UT,validationSchema:_},Reflect.defineMetadata(v,E,T.constructor,A)},$f=(_,T)=>(A,C,E)=>{if(!C)return;let f=Reflect.getOwnMetadata(v,A.constructor,C)||{};f[`argumentIndexes.${E}`]={index:E,type:xT,key:_,validationSchema:T},Reflect.defineMetadata(v,f,A.constructor,C)},nf=(_,T)=>(A,C,E)=>{if(!C)return;let f=Reflect.getOwnMetadata(v,A.constructor,C)||{};f[`argumentIndexes.${E}`]={index:E,type:XT,validationSchema:_,parser:T},Reflect.defineMetadata(v,f,A.constructor,C)},Kf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:iT,validationSchema:_},Reflect.defineMetadata(v,E,T.constructor,A)},If=(_,T)=>(A,C,E)=>{if(!C)return;let f=Reflect.getOwnMetadata(v,A.constructor,C)||{};f[`argumentIndexes.${E}`]={index:E,type:JT,key:_,validationSchema:T},Reflect.defineMetadata(v,f,A.constructor,C)},hf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:R_,validationSchema:_},Reflect.defineMetadata(v,E,T.constructor,A)},mf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:RT,validationSchema:_},Reflect.defineMetadata(v,E,T.constructor,A)},Of=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(v,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:CT},Reflect.defineMetadata(v,C,_.constructor,T)},Mf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:ZT,key:_},Reflect.defineMetadata(v,E,T.constructor,A)},uf=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(v,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:cT},Reflect.defineMetadata(v,C,_.constructor,T)},gf=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(v,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:fT},Reflect.defineMetadata(v,C,_.constructor,T)};var Pf=(_)=>(T)=>{let{modules:A,middlewares:C,guards:E,dependencies:f}=_||{};if(Reflect.hasOwnMetadata(WT,T))throw Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);if(A){for(let x=0;x<A.length;x++)if(!Reflect.getOwnMetadataKeys(A[x]).includes(WT))throw Error(`${A[x].name} is not a module.`)}if(C){for(let x=0;x<C.length;x++)if(!Reflect.getOwnMetadataKeys(C[x]).includes(ST))throw Error(`${C[x].name} is not a middleware.`)}if(C){for(let x=0;x<C.length;x++)if(!Reflect.getOwnMetadataKeys(C[x]).includes(ST))throw Error(`${C[x].name} is not a middleware.`)}if(E){for(let x=0;x<E.length;x++)if(!Reflect.getOwnMetadataKeys(E[x]).includes(zT))throw Error(`${E[x].name} is not a guard.`)}if(f){for(let x=0;x<f.length;x++)if(!Reflect.getOwnMetadataKeys(f[x]).includes(NT))throw Error(`${f[x].name} is not an injectable.`)}Reflect.defineMetadata(ET,_,T)};var kf=(_)=>(T)=>{let A={prefix:!_?.startsWith("/")?`/${_||""}`:_,httpMetadata:[...Reflect.getOwnMetadata(dT,T)||[]]};Reflect.defineMetadata(FT,A,T)};var vf=()=>(_)=>{if(!("enforce"in _.prototype)||typeof _.prototype.enforce!=="function")return;let T=void 0;return Reflect.defineMetadata(zT,T,_),_};var pT=(_,T)=>(A,C,E)=>{if(!(E?.value instanceof Function))throw Error(`${T} decorator only use for class method.`);let f=Reflect.getOwnMetadata(v,A.constructor,C)||{},x=[...Reflect.getOwnMetadata(dT,A.constructor)||[],{path:!_.startsWith("/")?`/${_}`:_,httpMethod:T.toUpperCase(),methodName:C,descriptor:E,argumentsMetadata:f}];Reflect.defineMetadata(dT,x,A.constructor)},bf=(_="/")=>pT(_,"Get"),lf=(_="/")=>pT(_,"Post"),yf=(_="/")=>pT(_,"Put"),jf=(_="/")=>pT(_,"Patch"),df=(_="/")=>pT(_,"Delete"),sf=(_="/")=>pT(_,"Options");var pf=(_)=>(T,A,C)=>{let E=Reflect.getMetadata(sT,T)||[];E[C]=_,Reflect.defineMetadata(sT,E,T)};var of=()=>(_)=>Reflect.defineMetadata(NT,void 0,_);var rf=()=>(_)=>{Reflect.defineMetadata(mT,void 0,_)};var tf=()=>(_)=>{Reflect.defineMetadata(ST,void 0,_)};var ef=(_)=>(T)=>{if(Reflect.hasOwnMetadata(ET,T))throw Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);let{middlewares:A,guards:C,interceptors:E,controllers:f,dependencies:x,webSockets:H}=_||{};if(A){for(let c=0;c<A.length;c++)if(!Reflect.getOwnMetadataKeys(A[c]).includes(ST))throw Error(`${A[c].name} is not a middleware.`)}if(C){for(let c=0;c<C.length;c++)if(!Reflect.getOwnMetadataKeys(C[c]).includes(zT))throw Error(`${C[c].name} is not a guard.`)}if(E){for(let c=0;c<E.length;c++)if(!Reflect.getOwnMetadataKeys(E[c]).includes(mT))throw Error(`${E[c].name} is not a interceptor.`)}if(f){for(let c=0;c<f.length;c++)if(!Reflect.getOwnMetadataKeys(f[c]).includes(FT))throw Error(`${f[c].name} is not a controller.`)}if(x){for(let c=0;c<x.length;c++)if(!Reflect.getOwnMetadataKeys(x[c]).includes(NT))throw Error(`${x[c].name} is not an injectable.`)}if(H){for(let c=0;c<H.length;c++)if(!Reflect.getOwnMetadataKeys(H[c]).includes(qT))throw Error(`${H[c].name} is not a websocket gateway.`)}Reflect.defineMetadata(WT,_,T)};var K_=Symbol("__bool:webSocket.upgrade__"),af=(_,T,A)=>{let C=new URL(T.url);return _.upgrade(T,{data:{method:T.method.toUpperCase(),pathname:C.pathname,query:A}})},T0=(_)=>(T)=>{let{prefix:A}=_||{};T.prototype[K_]=af;let C=Object.getOwnPropertyDescriptor(T.prototype,K_),E=!C?[]:[{path:"/",httpMethod:"GET",methodName:K_,descriptor:C,argumentsMetadata:{}},{path:"/",httpMethod:"POST",methodName:K_,descriptor:C,argumentsMetadata:{}}],f={prefix:!A?.startsWith("/")?`/${A||""}`:A,events:Reflect.getOwnMetadata(OT,T)||{},http:E};Reflect.defineMetadata(qT,f,T)};var _0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:QT},Reflect.defineMetadata(_T,C,_.constructor,T)},C0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:YT},Reflect.defineMetadata(_T,C,_.constructor,T)},A0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:f_},Reflect.defineMetadata(_T,C,_.constructor,T)},E0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:x_},Reflect.defineMetadata(_T,C,_.constructor,T)},f0=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:MT},Reflect.defineMetadata(_T,C,_.constructor,T)};var x0=(_)=>(T,A,C)=>{if(!(C.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let E=Reflect.getOwnMetadata(_T,T.constructor,A),f=Object.freeze({methodName:A,descriptor:C,arguments:E}),x={...Reflect.getOwnMetadata(OT,T.constructor)||void 0,[_]:f};Reflect.defineMetadata(OT,f,T.constructor,A),Reflect.defineMetadata(OT,x,T.constructor)};var R0=Object.freeze({400:"BAD_REQUEST",401:"UNAUTHORIZED",402:"PAYMENT_REQUIRED",403:"FORBIDDEN",404:"NOT_FOUND",405:"METHOD_NOT_ALLOWED",406:"NOT_ACCEPTABLE",407:"PROXY_AUTHENCATION_REQUIRED",408:"REQUEST_TIMEOUT",409:"CONFLICT",410:"GONE",411:"LENGTH_REQUIRED",412:"PRECONDITION_FAILED",413:"PAYLOAD_TOO_LARGE",414:"URI_TOO_LONG",415:"UNSUPPORTED_MEDIA_TYPE",416:"RANGE_NOT_SATISFIABLE",417:"EXPECTATION_FAILED",418:"IM_A_TEAPOT",421:"MISDIRECTED_REQUEST",422:"UNPROCESSABLE_ENTITY",423:"LOCKED",424:"FAILED_DEPENDENCY",425:"TOO_EARLY_",426:"UPGRAGE_REQUIRED",428:"PRECONDITION_REQUIRED",429:"TOO_MANY_REQUESTS",431:"REQUEST_HEADER_FIELDS_TOO_LARGE",451:"UNAVAILABLE_FOR_LEGAL_REASONS"});class uT extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:A}){super();this.httpCode=_,this.message=!A?.trim()?R0[_]:A.trim(),this.data=T}}var c0=Object.freeze({500:"INTERNAL_SERVER_ERROR",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"SERVICE_UNAVAILABLE",504:"GATEWAY_TIMEOUT",505:"HTTP_VERSION_NOT_SUPPORTED",506:"VARIANT_ALSO_NEGOTIATES",507:"INSUFFICIENT_STORAGE",508:"LOOP_DETECTED",510:"NOT_EXTENDED",511:"NETWORK_AUTHENTICATION_REQUIRED"});class H_ extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:A}){super();this.httpCode=_,this.message=!A?.trim()?c0[_]:A.trim(),this.data=T}}var bC=(_,T=new Headers)=>{if(T.set("Content-Type","application/json"),_ instanceof uT||_ instanceof H_)return new Response(JSON.stringify(_),{status:_.httpCode,statusText:_.message,headers:T});return new Response(JSON.stringify((()=>{switch(typeof _){case"object":return!(_ instanceof Error)?_:{message:_.message,code:_.name,cause:_.cause};case"string":return{message:_};case"number":return{code:_};default:return}})()),{status:500,statusText:"INTERNAL SERVER ERROR",headers:T})};var LT;(function(_){_.year="year",_.month="month",_.day="day",_.hours="hours",_.minutes="minutes",_.seconds="seconds",_.miliseconds="miliseconds"})(LT||(LT={}));var lC=(_,T,A=LT.day)=>{let C=_ instanceof Date?_:new Date(_);switch(A){case LT.year:C.setFullYear(C.getFullYear()+T);break;case LT.month:C.setMonth(C.getMonth()+T);break;case LT.day:C.setDate(C.getDate()+T);break;case LT.hours:C.setHours(C.getHours()+T);break;case LT.minutes:C.setMinutes(C.getMinutes()+T);break;case LT.seconds:C.setSeconds(C.getSeconds()+T);break;case LT.miliseconds:C.setMilliseconds(C.getMilliseconds()+T);break}return C};var ff=N_(aE(),1);var D1=async function(){}.constructor;var Tf=Object.freeze({black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,gray:90}),_f=Object.freeze({black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47,gray:100}),nT=(_,T={})=>{let{color:A,backgroundColor:C,bold:E,underline:f}=T,x="";if(E)x+="\x1B[1m";if(f)x+="\x1B[4m";if(A&&Tf[A])x+=`\x1B[${Tf[A]}m`;if(C&&_f[C])x+=`\x1B[${_f[C]}m`;return`${x}${_}\x1B[0m`};var Cf=(_)=>{let{headers:T,method:A}=_,C=T.get("upgrade")?.toLowerCase()||"",E=T.get("connection")?.toLowerCase()||"";return A==="GET"&&C?.toLowerCase()==="websocket"&&E?.toLowerCase().includes("upgrade")};class B_{_staticMap=new Map;_dynamicMap=new Map;_options=void 0;constructor(..._){_.forEach((T)=>{T.staticEntries.forEach(([A,C])=>this.set(A,C,{isStatic:!0,isPassthrough:!0})),T.dynamicEntries.forEach(([A,C])=>this.set(A,C,{isStatic:!1}))})}get(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.get(_):this._staticMap.get(_)}has(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.has(_):this._staticMap.has(_)}set(_,T,A){let C=A||this._options;if(!C?.isStatic)this._dynamicMap.set(_,T);else if(!this._staticMap.has(_))this._staticMap.set(_,T);else if(!C.isPassthrough)throw Error(`${String(_)} already exists in context static collection.`);return this}setOptions(_){return this._options=_,this}get staticEntries(){return[...this._staticMap.entries()]}get dynamicEntries(){return[...this._dynamicMap.entries()]}}class GT{static rootPattern=":([a-z0-9A-Z_-]{1,})";static innerRootPattern="([a-z0-9A-Z_-]{1,})";alias;_map=new Map;constructor(_){this.alias=this._thinAlias(_)}test(_,T){try{let A=this._map.get(T),C=this.alias.split("/"),E=this._thinAlias(_).split("/");if(!A)return;if(C.length!==E.length)return;let f=Object(),x=this.alias.replace(new RegExp(GT.rootPattern,"g"),GT.innerRootPattern);if(!new RegExp(x).test(this._thinAlias(_)))return;for(let H=0;H<C.length;H++){let c=C[H],q=E[H];if(!new RegExp(GT.rootPattern,"g").test(c)){if(c!==q)return}else{let w=!1;if(c.replace(new RegExp(GT.rootPattern,"g"),(J,F,Z)=>{if(Z===0)q.replace(new RegExp(GT.innerRootPattern,"g"),(Y,X,D)=>{if(D===0)Object.assign(f,{[F]:Y});return Y});return J}),w)return}continue}return Object.freeze({parameters:f,model:A})}catch(A){return console.error(A),!1}}isMatch(_,T){try{if(!this._map.get(T))return;let C=this.alias.split("/"),E=this._thinAlias(_).split("/");if(C.length!==E.length)return!1;let f=Object();for(let x=0;x<C.length;x++){let H=C[x],c=E[x];if(!new RegExp(GT.rootPattern,"g").test(H)){if(H!==c)return!1}else{let q=!1;if(H.replace(new RegExp(GT.rootPattern,"g"),(w,J,F)=>{if(!new RegExp(F,"g").test(c))q=!0;else Object.assign(f,{[J]:c});return""}),q)return!1}continue}return!0}catch(A){console.error(A);return}}get(_){if(!this._map.get("GET"))this._map.set("GET",_);return this}post(_){if(!this._map.get("POST"))this._map.set("POST",_);return this}put(_){if(!this._map.get("PUT"))this._map.set("PUT",_);return this}delete(_){if(!this._map.get("DELETE"))this._map.set("DELETE",_);return this}connect(_){if(!this._map.get("CONNECT"))return this._map.set("CONNECT",_);return this}options(_){if(!this._map.get("OPTIONS"))return this._map.set("OPTIONS",_);return this}trace(_){if(!this._map.get("TRACE"))return this._map.set("TRACE",_);return this}patch(_){if(!this._map.get("PATCH"))return this._map.set("PATCH",_);return this}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((A,C)=>{let E=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!E.test(A)){if(E=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!E.test(A))return A;return A.replace(E,(f,x)=>`${f}(.*?)`)}return A}).join("/")}get _filteredPath(){return this.alias.split("/").map((A,C)=>{let E=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!E.test(A)){if(E=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!E.test(A))return A;return A.replace(E,(f,x)=>"(.*?)")}return A.replace(E,(f,x,H)=>H)}).join("/")}}var Af=GT;class V_{alias;_routes=new Map;constructor(_){this.alias=this._thinAlias(_)}route(_){let T=this._thinAlias(`${this.alias}/${_}`),A=this._routes.get(T),C=!A?new Af(`${this.alias}/${_}`):A;if(!A)this._routes.set(T,C);return C}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this._routes}}class D_{_routers=new Map;add(..._){for(let T of _){if(this._routers.has(T.alias))continue;this._routers.set(T.alias,T)}return this}find(_,T){for(let A of this._routers.values())for(let C of A.routes.values()){let E=C.test(_,T);if(!E)continue;return E}return}}var P1=N_($_(),1);class __{_mapper=new Map;constructor(..._){_.forEach((T)=>{T.entries.forEach(([A,C])=>{this._mapper.set(A,C)})})}get(_){if(this._mapper.has(_))return this._mapper.get(_);if(typeof _!=="function")return;let T=Reflect.getMetadataKeys(_);if(![NT,FT,ST,zT,mT,qT].some((f)=>T.includes(f)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let C=(Reflect.getOwnMetadata(sT,_)||[]).map((f)=>this.get(f)),E=new _(...C);return this._mapper.set(_,E),E}set(_,T){if(this._mapper.has(_))throw Error(`${String(_)} already exists in injector collection.`);this._mapper.set(_,T)}get entries(){return[...this._mapper.entries()]}}class $C{error;constructor(_){this.error=_}}var Ef=$C;class d_{eventName;metadata;_context=void 0;constructor({eventName:_,metadata:T}){this.eventName=_,this.metadata=T}bind(_){return this._context=_,this}execute(){if(this._context&&typeof this.metadata.descriptor.value==="function")this.metadata.descriptor.value=this.metadata.descriptor.value.bind(this._context);return Object.freeze({methodName:this.metadata.methodName,descriptor:this.metadata.descriptor,arguments:this.metadata.arguments})}}class G_{rawAlias;alias;routes=[];constructor(_="/"){this.rawAlias=_;this.alias=G_.thinAlias(_)}addRoutes(..._){for(let T of _)if(!this.routes.includes(T))this.routes.push(T);return this}bind(_){for(let T of this.routes)T.bind(_);return this}execute(){let _=new Map;for(let T of this.routes)_.set(`${this.alias}:::${T.eventName}`,T.execute());return _}static thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class C_{rawPrefix;prefix;routers=[];constructor(_="/"){this.rawPrefix=_;this.prefix=C_.thinPrefix(_)}addRouters(..._){for(let T=0;T<_.length;T++)if(!this.routers.includes(_[T]))this.routers.push(_[T]);for(let T of _)if(!this.routers.includes(T))this.routers.push(T);return this}execute(){let _=new Map;for(let T of this.routers){let A=T.execute();for(let[C,E]of A.entries())_.set(`/${C_.thinPrefix(`${this.prefix}/${C}`)}`,E)}return _}static thinPrefix(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class s_{classConstructor;options;#_;#T;#E=new __;#C=new Map;#f;#x=900;#A;constructor(_,T){this.classConstructor=_;this.options=T;if(this.#T=Reflect.getOwnMetadataKeys(_),!this.#T.includes(ET)&&!this.#T.includes(WT))throw Error(`Can not detect! ${_.name} class is not a container or module.`);this.#x=typeof T.static?.cacheTimeInSeconds!=="number"?900:T.static.cacheTimeInSeconds,this.#f=Object.freeze({allowLogsMethods:this.options?.log?.methods||[],staticOption:this.options.static,allowOrigins:!this.options.cors?.origins?["*"]:typeof this.options.cors.origins!=="string"?this.options.cors.origins.includes("*")||this.options.cors.origins.length<1?["*"]:this.options.cors.origins:[this.options.cors.origins!=="*"?this.options.cors.origins:"*"],allowMethods:this.options.cors?.methods||["GET","POST","PUT","PATCH","DELETE","OPTIONS"],allowCredentials:!this.options.cors?.credentials?!1:!0,allowHeaders:!this.options.cors?.headers||this.options.cors.headers.includes("*")?["*"]:this.options.cors.headers})}useValidator(_){this.#A=_}async preLaunch(){if(this.#_)return this.#_;let _=!this.#T.includes(ET)?void 0:Reflect.getOwnMetadata(ET,this.classConstructor),T=!this.#T.includes(ET)?[this.classConstructor]:_?.modules||[],A=!_?void 0:await this.containerResolution({containerClass:this.classConstructor,options:this.options,extendInjector:this.#E}),C=await Promise.all(T.map((H)=>this.moduleResolution({moduleClass:H,options:this.options,extendInjector:!A?this.#E:A.injector})));if([...new Set(C.map((H)=>H.prefix))].length!==C.length)throw Error("Module prefix should be unique.");let f=new Map;for(let H of C){let c=H.webSocketRouterGroup.execute();for(let[q,w]of c.entries())f.set(q,w)}let x=Object.freeze({containerMetadata:_,modulesConverted:T,resolutedContainer:A,resolutedModules:C,webSocketsMap:f});return this.#_=x,x}async listen(){let{allowLogsMethods:_,allowOrigins:T,allowMethods:A,allowHeaders:C,allowCredentials:E,staticOption:f}=this.#f,{resolutedContainer:x,resolutedModules:H,webSocketsMap:c}=await this.preLaunch(),q=Bun.serve({port:this.options.port,fetch:async(w,J)=>{let F=performance.now(),Z=new URL(w.url),Y=ff.parse(Z.searchParams.toString(),this.options.queryParser),X=w.headers.get("origin")||"*",D=w.method.toUpperCase(),W=new Headers,N=new B_().setOptions({isStatic:!0}).set(fT,J).set(RT,w).set(xT,w.headers).set(CT,W).set(R_,Y);try{let U=Cf(w),V;if(U){for(let M of H){let i=M.webSocketHttpRouterGroup.find(Z.pathname,w.method);if(i){V=Object.freeze({route:i,resolution:M});break}}if(!V)return this.finalizeResponse(new Response(JSON.stringify({httpCode:404,message:"Route not found.",data:void 0}),{status:404,statusText:"Not found.",headers:W}));let h=await this.webSocketFetcher({request:w,server:J},{query:Y,responseHeaders:W,route:V.route,moduleResolution:V.resolution});return h instanceof Response?h:void 0}if([...!E?[]:[{key:"Access-Control-Allow-Credentials",value:"true"}],{key:"Access-Control-Allow-Origin",value:T.includes("*")?"*":!T.includes(X)?T[0]:X},{key:"Access-Control-Allow-Methods",value:A.join(", ")},{key:"Access-Control-Allow-Headers",value:C.join(", ")}].forEach(({key:h,value:M})=>W.set(h,M)),!A.includes(D))return this.finalizeResponse(new Response(void 0,{status:405,statusText:"Method Not Allowed.",headers:W}));if(w.method.toUpperCase()==="OPTIONS")return this.finalizeResponse(T.includes("*")||T.includes(X)?new Response(void 0,{status:204,statusText:"No Content.",headers:W}):new Response(void 0,{status:417,statusText:"Expectation Failed.",headers:W}));if(f){let{path:h,headers:M}=f,i=`${h}/${Z.pathname}`,p=this.#C.get(i);if(!p){let s=Bun.file(i);if(await s.exists()){if(M)for(let[TT,AT]of Object.entries(M))W.set(TT,AT);return W.set("Content-Type",s.type),this.finalizeResponse(new Response(await s.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:W}))}}else{let s=new Date>p.expiredAt;if(s)this.#C.delete(i);let e=!s?p.file:Bun.file(i);if(await e.exists()){if(this.#C.set(i,Object.freeze({expiredAt:lC(new Date,this.#x,LT.seconds),file:e})),M)for(let[AT,KT]of Object.entries(M))W.set(AT,KT);return W.set("Content-Type",e.type),this.finalizeResponse(new Response(await e.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:W}))}}}if(x){let{context:h}=await this.httpFetcher({context:N,resolutedMap:{injector:x.injector,startMiddlewareGroup:x.startMiddlewareGroup,guardGroup:x.guardGroup},options:{isContainer:!0}});N=h}for(let h of H){let M=h.controllerRouterGroup.find(Z.pathname,D);if(M){V=Object.freeze({route:M,resolution:h});break}}if(!V)N.setOptions({isStatic:!1}).set(L_,404).set(t_,"Not found.").set(c_,JSON.stringify({httpCode:404,message:"Route not found.",data:void 0}));else{let{context:h}=await this.httpFetcher({context:N,route:V.route,resolutedMap:V.resolution});N=h}if(x){let{context:h}=await this.httpFetcher({context:N,resolutedMap:{injector:x.injector,endMiddlewareGroup:x.endMiddlewareGroup},options:{isContainer:!0}});N=h}let n=N.get(CT,{isStatic:!0})||new Headers,a=N.get(c_,{isStatic:!1})||void 0,Q=N.get(L_,{isStatic:!1}),P=N.get(L_,{isStatic:!1});return this.serializeResponse({status:typeof Q!=="number"?void 0:Q,statusText:typeof P!=="string"?void 0:P,headers:n,data:a})}catch(U){return this.options.debug&&console.error(U),this.finalizeResponse(bC(U,W))}finally{if(_){let U=performance.now(),V=nT(Z.pathname,{color:"blue"}),n=`${Bun.color("yellow","ansi")}${process.pid}`,a=nT(w.method,{color:"yellow",backgroundColor:"blue"}),Q=nT(`${w.headers.get("x-forwarded-for")||w.headers.get("x-real-ip")||J.requestIP(w)?.address||"<Unknown>"}`,{color:"yellow"}),P=nT(`${Math.round((U-F+Number.EPSILON)*100)/100}ms`,{color:"yellow",backgroundColor:"blue"});_.includes(w.method.toUpperCase())&&console.info(`PID: ${n} - Method: ${a} - IP: ${Q} - ${V} - Time: ${P}`)}}},websocket:{open:(w)=>{let J=`${w.data.pathname}:::open`,F=c.get(J);if(!F)return;let Z=F.arguments||{},Y=[];for(let[X,D]of Object.entries(Z))switch(D.type){case QT:Y[D.index]=w;break;case YT:Y[D.index]=q;break}F.descriptor.value(...Y)},close:(w,J,F)=>{let Z=`${w.data.pathname}:::close`,Y=c.get(Z);if(!Y)return;let X=Y.arguments||{},D=[];for(let[W,N]of Object.entries(X))switch(N.type){case QT:D[N.index]=w;break;case YT:D[N.index]=q;break;case f_:D[N.index]=J;break;case x_:D[N.index]=F;break}Y.descriptor.value(...D)},message:(w,J)=>{let F=`${w.data.pathname}:::message`,Z=c.get(F);if(!Z)return;let Y=Z.arguments||{},X=[];for(let[D,W]of Object.entries(Y))switch(W.type){case QT:X[W.index]=w;break;case MT:X[W.index]=J;break;case YT:X[W.index]=q;break}Z.descriptor.value(...X)},drain:(w)=>{let J=`${w.data.pathname}:::drain`,F=c.get(J);if(!F)return;let Z=F.arguments||{},Y=[];for(let[X,D]of Object.entries(Z))switch(D.type){case QT:Y[D.index]=w;break;case YT:Y[D.index]=q;break}F.descriptor.value(...Y)},ping:(w,J)=>{let F=`${w.data.pathname}:::ping`,Z=c.get(F);if(!Z)return;let Y=Z.arguments||{},X=[];for(let[D,W]of Object.entries(Y))switch(W.type){case QT:X[W.index]=w;break;case YT:X[W.index]=q;break;case MT:X[W.index]=J;break}Z.descriptor.value(...X)},pong:(w,J)=>{let F=`${w.data.pathname}:::pong`,Z=c.get(F);if(!Z)return;let Y=Z.arguments||{},X=[];for(let[D,W]of Object.entries(Y))switch(W.type){case QT:X[W.index]=w;break;case YT:X[W.index]=q;break;case MT:X[W.index]=J;break}Z.descriptor.value(...X)}}})}async containerResolution({containerClass:_,options:T,extendInjector:A}){if(!Reflect.getOwnMetadataKeys(_).includes(ET))throw Error(`${_.name} is not a container.`);let C=new __(A),E=Reflect.getOwnMetadata(ET,_),{loaders:f,middlewares:x,guards:H,dependencies:c,config:q}=E||{},{config:w}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof q!=="function"?typeof q!=="object"?void 0:("key"in q)&&("value"in q)&&typeof q.key==="symbol"?typeof q.value!=="function"?q.value:await q.value():q:await q()}});if(C.set(q&&"key"in q&&"value"in q&&typeof q.key==="symbol"?q.key:n_,w),f){let Y=[];for(let[D,W]of Object.entries(f))Y.push(async()=>{try{let N=await W({config:w});return console.info(`${nT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${D}] initialized successfully.`),N}catch(N){throw console.error(`${nT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${D}] initialization failed.`),T.debug&&console.error(N),N}});let X=await Promise.all(Y.map((D)=>D()));for(let[D,W]of X)C.set(D,W)}!c||c.map((Y)=>C.get(Y));let J=[],F=[];!x||x.forEach((Y)=>{let X=C.get(Y);if(X.start&&typeof X.start==="function"){let D=Reflect.getOwnMetadata(v,Y,"start")||{};J.push(Object.freeze({class:Y,funcName:"start",func:X.start.bind(X),argumentsMetadata:D}))}if(X.end&&typeof X.end==="function"){let D=Reflect.getOwnMetadata(v,Y,"end")||{};F.push(Object.freeze({class:Y,funcName:"end",func:X.end.bind(X),argumentsMetadata:D}))}});let Z=!H?[]:H.map((Y)=>{let X=C.get(Y),D=Reflect.getOwnMetadata(v,Y,"enforce")||{};return Object.freeze({class:Y,funcName:"enforce",func:X.enforce.bind(X),argumentsMetadata:D})});return Object.freeze({injector:C,startMiddlewareGroup:J,endMiddlewareGroup:F,guardGroup:Z})}async moduleResolution({moduleClass:_,options:T,extendInjector:A}){if(!Reflect.getOwnMetadataKeys(_).includes(WT))throw Error(`${_.name} is not a module.`);let C=new __(A),E=Reflect.getOwnMetadata(WT,_),{loaders:f,middlewares:x,guards:H,interceptors:c,controllers:q,dependencies:w,webSockets:J,prefix:F,config:Z}=E||{},Y=`${T.prefix||""}/${F||""}`,{config:X}=Object.freeze({config:!Z?void 0:{...typeof T.config!=="function"?T.config:await T.config(),...typeof Z!=="function"?typeof Z!=="object"?void 0:("key"in Z)&&("value"in Z)&&typeof Z.key==="symbol"?typeof Z.value!=="function"?Z.value:await Z.value():Z:await Z()}});if(X&&C.set(Z&&"key"in Z&&"value"in Z&&typeof Z.key==="symbol"?Z.key:n_,X),f){let P=[];for(let[M,i]of Object.entries(f))P.push(async()=>{try{let p=await i({config:X});return console.info(`${nT(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${M}] initialized successfully.`),p}catch(p){throw console.error(`${nT(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${M}] initialization failed.`),T.debug&&console.error(p),p}});let h=await Promise.all(P.map((M)=>M()));for(let M=0;M<h.length;M++){let[i,p]=h[M];C.set(i,p)}}!w||w.map((P)=>C.get(P));let D=[],W=[];!x||x.forEach((P)=>{let h=C.get(P);if(h.start&&typeof h.start==="function"){let M=Reflect.getOwnMetadata(v,P,"start")||{};D.push(Object.freeze({class:P,funcName:"start",func:h.start.bind(h),argumentsMetadata:M}))}if(h.end&&typeof h.end==="function"){let M=Reflect.getOwnMetadata(v,P,"end")||{};W.push(Object.freeze({class:P,funcName:"end",func:h.end.bind(h),argumentsMetadata:M}))}});let N=!H?[]:H.map((P)=>{let h=C.get(P),M=Reflect.getOwnMetadata(v,P,"enforce")||{};return Object.freeze({class:P,funcName:"enforce",func:h.enforce.bind(h),argumentsMetadata:M})}),U=[],V=[];!c||c.forEach((P)=>{let h=C.get(P);if(h.open&&typeof h.open==="function"){let M=Reflect.getOwnMetadata(v,P,"open")||{};U.push(Object.freeze({class:P,funcName:"open",func:h.open.bind(h),argumentsMetadata:M}))}if(h.close&&typeof h.close==="function"){let M=Reflect.getOwnMetadata(v,P,"close")||{};V.push(Object.freeze({class:P,funcName:"close",func:h.close.bind(h),argumentsMetadata:M}))}});let n=new D_;!q||q.forEach((P)=>this.initControllerInstance({controllerConstructor:P,httpRouterGroup:n,injector:C,prefix:Y}));let a=new D_,Q=new C_;return J&&J.forEach((P)=>this.initWebSocketInstance({webSocketConstructor:P,httpRouterGroup:a,webSocketRouterGroup:Q,injector:C,prefix:Y})),Object.freeze({prefix:F||"",injector:C,startMiddlewareGroup:D,endMiddlewareGroup:W,guardGroup:N,openInterceptorGroup:U,closeInterceptorGroup:V,controllerRouterGroup:n,webSocketHttpRouterGroup:a,webSocketRouterGroup:Q})}async argumentsResolution(_,T,A,C){if(!this.#A)return _;try{let E=await this.#A.validate(_,T,A,C);if(!(E instanceof Ef))return E;throw new uT({httpCode:400,message:`Validation at the [${C.toString()}] method fails at positional argument [${A}].`,data:E.error})}catch(E){if(E instanceof uT)throw E;throw new H_({httpCode:500,message:`Validation at the [${C.toString()}] method error at positional argument [${A}].`,data:!(E instanceof Error)?E:[{message:E.message,code:E.name,cause:E.cause}]})}}initControllerInstance({controllerConstructor:_,httpRouterGroup:T,injector:A,prefix:C}){if(!Reflect.getOwnMetadataKeys(_).includes(FT))throw Error(`${_.name} is not a controller.`);let E=A.get(_);if(!E)throw Error("Can not initialize controller.");let f=Reflect.getOwnMetadata(FT,_)||{prefix:"/",httpMetadata:[]},x=new V_(`/${C||""}/${f.prefix}`);return f.httpMetadata.forEach((H)=>{if(typeof H.descriptor.value!=="function")return;let c=x.route(H.path),q=H.descriptor.value.bind(E),w=Object.freeze({class:_,funcName:H.methodName,func:q,argumentsMetadata:H.argumentsMetadata});switch(H.httpMethod){case"GET":return c.get(w);case"POST":return c.post(w);case"PUT":return c.put(w);case"PATCH":return c.patch(w);case"DELETE":return c.delete(w);case"OPTIONS":return c.options(w)}}),T.add(x)}initWebSocketInstance({injector:_,httpRouterGroup:T,prefix:A,webSocketRouterGroup:C,webSocketConstructor:E}){if(!Reflect.getOwnMetadataKeys(E).includes(qT))throw Error(`${E.name} is not a websocket route.`);let f=_.get(E);if(!f)throw Error("Can not initialize webSocket.");let x=Reflect.getOwnMetadata(qT,E)||{prefix:"/",events:[],http:[]},H=`/${A||""}/${x.prefix}`,c=new V_(H);for(let[w,J]of Object.entries(x.http)){if(typeof J.descriptor?.value!=="function")continue;let F=c.route(J.path),Z=J.descriptor.value.bind(f),Y=Object.freeze({class:E,funcName:J.methodName,func:Z,argumentsMetadata:J.argumentsMetadata});switch(J.httpMethod){case"GET":F.get(Y);break;case"POST":F.post(Y);break}}T.add(c);let q=new G_(H);for(let[w,J]of Object.entries(x.events)){let F=new d_({eventName:w,metadata:J});q.addRoutes(F)}return q.bind(f),C.addRouters(q),Object.freeze({httpRouterGroup:T,webSocketRouterGroup:C})}serializeResponse({status:_,statusText:T,headers:A,data:C}){let E=A.get("Content-Type")||"text/plain";if(E.includes("application/json"))return this.finalizeResponse(new Response(C instanceof ReadableStream?C:JSON.stringify(C),{status:_,statusText:T,headers:A}));if(E.includes("text/plain")||E.includes("text/html"))return this.finalizeResponse(new Response(C instanceof ReadableStream?C:String(C),{status:_,statusText:T,headers:A}));if(E.includes("application/octet-stream")){if(C instanceof Uint8Array||C instanceof ArrayBuffer||C instanceof Blob||C instanceof ReadableStream)return this.finalizeResponse(new Response(C,{status:_,statusText:T,headers:A}));throw Error("Invalid data type for application/octet-stream")}if(E.includes("multipart/form-data")){if(C instanceof FormData)return this.finalizeResponse(new Response(C,{status:_,statusText:T,headers:A}));throw Error("multipart/form-data requires FormData object")}return this.finalizeResponse(new Response(String(C),{status:_,statusText:T,headers:A}))}finalizeResponse(_){return _.headers.set("X-Powered-By","Bool Typescript"),_}async httpFetcher({context:_,route:T,options:A,resolutedMap:C}){let E={isStatic:!0},f=(!_?new B_:new B_(_)).setOptions(E);if(T)f.set(iT,T.parameters).set(cT,T.model);let x=f.get(fT,E)||void 0,H=f.get(RT,E)||void 0,c=f.get(xT,E)||void 0,q=f.get(CT,E)||void 0,w=f.get(iT,E)||void 0,J=f.get(cT,E)||void 0;if(C){let{startMiddlewareGroup:F,guardGroup:Z}=C;if(F)for(let Y=0;Y<F.length;Y++){let X=[],{func:D,funcName:W,argumentsMetadata:N}=F[Y];for(let[U,V]of Object.entries(N))switch(V.type){case ZT:X[V.index]=!V.key?f:f.get(V.key,E);break;case RT:X[V.index]=!V.validationSchema?H:await this.argumentsResolution(H,V.validationSchema,V.index,W);break;case XT:X[V.index]=!V.validationSchema?await H?.[V.parser||"json"]():await this.argumentsResolution(await H?.[V.parser||"json"](),V.validationSchema,V.index,W);break;case UT:X[V.index]=!V.validationSchema?c:await this.argumentsResolution(c?.toJSON(),V.validationSchema,V.index,W);break;case xT:X[V.index]=!V.validationSchema?c?.get(V.key)||void 0:await this.argumentsResolution(c?.get(V.key)||void 0,V.validationSchema,V.index,W);break;case JT:X[V.index]=!V.validationSchema?w?.[V.key]||void 0:await this.argumentsResolution(w?.[V.key]||void 0,V.validationSchema,V.index,W);break;case cT:X[V.index]=J;break;case CT:X[V.index]=q;break;case fT:X[V.index]=x;break;default:X[V.index]=!V.validationSchema?!f.has(V.type,E)?void 0:f.get(V.type,E):await this.argumentsResolution(!(V.type in f)?void 0:f.get(V.type,E),V.validationSchema,V.index,W);break}await D(...X)}if(Z)for(let Y=0;Y<Z.length;Y++){let X=[],{func:D,funcName:W,argumentsMetadata:N}=Z[Y];for(let[V,n]of Object.entries(N))switch(n.type){case RT:X[n.index]=!n.validationSchema?H:await this.argumentsResolution(H,n.validationSchema,n.index,W);break;case XT:X[n.index]=!n.validationSchema?await H?.[n.parser||"json"]():await this.argumentsResolution(await H?.[n.parser||"json"](),n.validationSchema,n.index,W);break;case ZT:X[n.index]=!n.key?f:f.get(n.key);break;case UT:X[n.index]=!n.validationSchema?c:await this.argumentsResolution(c?.toJSON(),n.validationSchema,n.index,W);break;case CT:X[n.index]=q;break;case xT:X[n.index]=!n.validationSchema?c?.get(n.key)||void 0:await this.argumentsResolution(c?.get(n.key)||void 0,n.validationSchema,n.index,W);break;case JT:X[n.index]=!n.validationSchema?w?.[n.key]||void 0:await this.argumentsResolution(w?.[n.key],n.validationSchema,n.index,W);break;case cT:X[n.index]=J;break;case fT:X[n.index]=x;break;default:X[n.index]=!n.validationSchema?!f.has(n.type)?void 0:f.get(n.type):await this.argumentsResolution(f.get(n.type),n.validationSchema,n.index,W);break}let U=await D(...X);if(typeof U!=="boolean"||!U)throw new uT({httpCode:401,message:"Unauthorization.",data:void 0})}}if(J&&!A?.isContainer){if(C&&"openInterceptorGroup"in C&&C.openInterceptorGroup){let{openInterceptorGroup:D}=C;for(let W=0;W<D.length;W++){let N=[],{func:U,funcName:V,argumentsMetadata:n}=D[W];for(let[a,Q]of Object.entries(n))switch(Q.type){case RT:N[Q.index]=!Q.validationSchema?H:await this.argumentsResolution(H,Q.validationSchema,Q.index,V);break;case XT:N[Q.index]=!Q.validationSchema?await H?.[Q.parser||"json"]():await this.argumentsResolution(await H?.[Q.parser||"json"](),Q.validationSchema,Q.index,V);break;case ZT:N[Q.index]=!Q.key?f:f.get(Q.key);break;case UT:N[Q.index]=!Q.validationSchema?c:await this.argumentsResolution(c?.toJSON(),Q.validationSchema,Q.index,V);break;case xT:N[Q.index]=!Q.validationSchema?c?.get(Q.key)||void 0:await this.argumentsResolution(c?.get(Q.key)||void 0,Q.validationSchema,Q.index,V);break;case CT:N[Q.index]=q;break;case JT:N[Q.index]=!Q.validationSchema?w?.[Q.key]||void 0:await this.argumentsResolution(w?.[Q.key]||void 0,Q.validationSchema,Q.index,V);break;case cT:N[Q.index]=J;break;case fT:N[Q.index]=x;break;default:N[Q.index]=!Q.validationSchema?!f.has(Q.type)?void 0:f.get(Q.type):await this.argumentsResolution(f.get(Q.type),Q.validationSchema,Q.index,V);break}await U(...N)}}let F=[],{func:Z,funcName:Y,argumentsMetadata:X}=J;for(let[D,W]of Object.entries(X))switch(W.type){case RT:F[W.index]=!W.validationSchema?H:await this.argumentsResolution(H,W.validationSchema,W.index,Y);break;case XT:F[W.index]=!W.validationSchema?await H?.[W.parser||"json"]():await this.argumentsResolution(await H?.[W.parser||"json"](),W.validationSchema,W.index,Y);break;case ZT:F[W.index]=!W.key?f:f.get(W.key);break;case UT:F[W.index]=!W.validationSchema?c:await this.argumentsResolution(c?.toJSON(),W.validationSchema,W.index,Y);break;case xT:F[W.index]=!W.validationSchema?c?.get(W.key)||void 0:await this.argumentsResolution(c?.get(W.key)||void 0,W.validationSchema,W.index,Y);break;case CT:F[W.index]=q;break;case JT:F[W.index]=!W.validationSchema?w?.[W.key]||void 0:await this.argumentsResolution(w?.[W.key]||void 0,W.validationSchema,W.index,Y);break;case cT:F[W.index]=J;break;case fT:F[W.index]=x;break;default:F[W.index]=!W.validationSchema?!f.has(W.type)?void 0:f.get(W.type):await this.argumentsResolution(f.get(W.type),W.validationSchema,W.index,Y);break}if(f.set(c_,await Z(...F),{isStatic:!1}),C&&"closeInterceptorGroup"in C&&C.closeInterceptorGroup){let{closeInterceptorGroup:D}=C;for(let W=0;W<D.length;W++){let N=[],{func:U,funcName:V,argumentsMetadata:n}=D[W];for(let[a,Q]of Object.entries(n))switch(Q.type){case RT:N[Q.index]=!Q.validationSchema?H:await this.argumentsResolution(H,Q.validationSchema,Q.index,V);break;case XT:N[Q.index]=!Q.validationSchema?await H?.[Q.parser||"json"]():await this.argumentsResolution(await H?.[Q.parser||"json"](),Q.validationSchema,Q.index,V);break;case ZT:N[Q.index]=!Q.key?f:f.get(Q.key);break;case UT:N[Q.index]=!Q.validationSchema?c:await this.argumentsResolution(c?.toJSON(),Q.validationSchema,Q.index,V);break;case CT:N[Q.index]=f.get(Q.type);break;case xT:N[Q.index]=!Q.validationSchema?c?.get(Q.key)||void 0:await this.argumentsResolution(c?.get(Q.key)||void 0,Q.validationSchema,Q.index,V);break;case JT:N[Q.index]=!Q.validationSchema?w?.[Q.key]||void 0:await this.argumentsResolution(w?.[Q.key]||void 0,Q.validationSchema,Q.index,V);break;case cT:N[Q.index]=J;break;case fT:N[Q.index]=x;break;default:N[Q.index]=!Q.validationSchema?!f.has(Q.type)?void 0:f.get(Q.type):await this.argumentsResolution(f.get(Q.type),Q.validationSchema,Q.index,V);break}await U(...N)}}}if(C){let{endMiddlewareGroup:F}=C;if(F)for(let Z=0;Z<F.length;Z++){let Y=[],{func:X,funcName:D,argumentsMetadata:W}=F[Z];for(let[N,U]of Object.entries(W))switch(U.type){case RT:Y[U.index]=!U.validationSchema?H:await this.argumentsResolution(H,U.validationSchema,U.index,D);break;case XT:Y[U.index]=!U.validationSchema?await H?.[U.parser||"json"]():await this.argumentsResolution(await H?.[U.parser||"json"](),U.validationSchema,U.index,D);break;case ZT:Y[U.index]=!U.key?f:f.get(U.key);break;case UT:Y[U.index]=!U.validationSchema?c:await this.argumentsResolution(c?.toJSON(),U.validationSchema,U.index,D);break;case CT:Y[U.index]=f.get(U.type);break;case xT:Y[U.index]=!U.validationSchema?c?.get(U.key)||void 0:await this.argumentsResolution(c?.get(U.key)||void 0,U.validationSchema,U.index,D);break;case JT:Y[U.index]=!U.validationSchema?w?.[U.key]||void 0:await this.argumentsResolution(w?.[U.key]||void 0,U.validationSchema,U.index,D);break;case cT:Y[U.index]=J;break;case fT:Y[U.index]=x;break;default:Y[U.index]=!U.validationSchema?!f.has(U.type)?void 0:f.get(U.type):await this.argumentsResolution(!(U.type in f)?void 0:f.get(U.type),U.validationSchema,U.index,D);break}await X(...Y)}}return Object.freeze({context:f})}async webSocketFetcher(_,T){let{request:A,server:C}=_,{query:E,responseHeaders:f,route:{model:x}}=T,H=await x.func(...[C,A,E]);if(typeof H!=="boolean")return this.finalizeResponse(new Response(JSON.stringify({httpCode:500,message:"Can not detect webSocket upgrade result.",data:void 0}),{status:500,statusText:"Internal server error.",headers:f}));if(!H)return this.finalizeResponse(new Response(JSON.stringify({httpCode:500,message:"Can not upgrade.",data:void 0}),{status:500,statusText:"Internal server error.",headers:f}));return H}}var S4=N_($_(),1);var OR=async(_,T)=>{try{let A=new s_(_,T);return await A.preLaunch(),A}catch(A){throw T.debug&&console.error(A),A}};export{bC as jsonErrorInfer,c0 as httpServerErrors,R0 as httpClientErrors,C0 as WebSocketServer,C_ as WebSocketRouterGroup,G_ as WebSocketRouter,d_ as WebSocketRoute,f0 as WebSocketMessage,x0 as WebSocketEvent,_0 as WebSocketConnection,E0 as WebSocketCloseReason,A0 as WebSocketCloseCode,T0 as WebSocket,$C as ValidationFailed,uf as RouteModel,Of as ResponseHeaders,Nf as RequestHeaders,$f as RequestHeader,nf as RequestBody,mf as Request,hf as Query,yf as Put,lf as Post,jf as Patch,Kf as Params,If as Param,sf as Options,ef as Module,tf as Middleware,vC as Keys,rf as Interceptor,__ as Injector,of as Injectable,pf as Inject,H_ as HttpServerError,gf as HttpServer,D_ as HttpRouterGroup,V_ as HttpRouter,GT as HttpRoute,uT as HttpClientError,vf as Guard,bf as Get,df as Delete,kf as Controller,Mf as Context,Pf as Container,OR as BoolFactory,s_ as Application};
15
+ ***************************************************************************** */var vC;(function(_){(function(T){var A=typeof globalThis==="object"?globalThis:typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:L(),C=E(_);if(typeof A.Reflect<"u")C=E(A.Reflect,C);if(T(C,A),typeof A.Reflect>"u")A.Reflect=_;function E(c,Y){return function(S,J){if(Object.defineProperty(c,S,{configurable:!0,writable:!0,value:J}),Y)Y(S,J)}}function f(){try{return Function("return this;")()}catch(c){}}function R(){try{return(0,eval)("(function() { return this; })()")}catch(c){}}function L(){return f()||R()}})(function(T,A){var C=Object.prototype.hasOwnProperty,E=typeof Symbol==="function",f=E&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",R=E&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",L=typeof Object.create==="function",c={__proto__:[]}instanceof Array,Y=!L&&!c,S={create:L?function(){return o_(Object.create(null))}:c?function(){return o_({__proto__:null})}:function(){return o_({})},has:Y?function(x,H){return C.call(x,H)}:function(x,H){return H in x},get:Y?function(x,H){return C.call(x,H)?x[H]:void 0}:function(x,H){return x[H]}},J=Object.getPrototypeOf(Function),w=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:Yf(),Z=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:Qf(),q=typeof WeakMap==="function"?WeakMap:Uf(),X=E?Symbol.for("@reflect-metadata:registry"):void 0,V=Ff(),W=Wf(V);function N(x,H,F,B){if(!u(F)){if(!IC(x))throw TypeError();if(!d(H))throw TypeError();if(!d(B)&&!u(B)&&!yT(B))throw TypeError();if(yT(B))B=void 0;return F=wT(F),a(x,H,F,B)}else{if(!IC(x))throw TypeError();if(!uC(H))throw TypeError();return l(x,H)}}T("decorate",N);function U(x,H){function F(B,K){if(!d(B))throw TypeError();if(!u(K)&&!Sf(K))throw TypeError();bT(x,H,B,K)}return F}T("metadata",U);function D(x,H,F,B){if(!d(F))throw TypeError();if(!u(B))B=wT(B);return bT(x,H,F,B)}T("defineMetadata",D);function n(x,H,F){if(!d(H))throw TypeError();if(!u(F))F=wT(F);return t(x,H,F)}T("hasMetadata",n);function TT(x,H,F){if(!d(H))throw TypeError();if(!u(F))F=wT(F);return p(x,H,F)}T("hasOwnMetadata",TT);function Q(x,H,F){if(!d(H))throw TypeError();if(!u(F))F=wT(F);return HT(x,H,F)}T("getMetadata",Q);function g(x,H,F){if(!d(H))throw TypeError();if(!u(F))F=wT(F);return ST(x,H,F)}T("getOwnMetadata",g);function P(x,H){if(!d(x))throw TypeError();if(!u(H))H=wT(H);return A_(x,H)}T("getMetadataKeys",P);function O(x,H){if(!d(x))throw TypeError();if(!u(H))H=wT(H);return lT(x,H)}T("getOwnMetadataKeys",O);function y(x,H,F){if(!d(H))throw TypeError();if(!u(F))F=wT(F);if(!d(H))throw TypeError();if(!u(F))F=wT(F);var B=E_(H,F,!1);if(u(B))return!1;return B.OrdinaryDeleteMetadata(x,H,F)}T("deleteMetadata",y);function l(x,H){for(var F=x.length-1;F>=0;--F){var B=x[F],K=B(H);if(!u(K)&&!yT(K)){if(!uC(K))throw TypeError();H=K}}return H}function a(x,H,F,B){for(var K=x.length-1;K>=0;--K){var s=x[K],o=s(H,F,B);if(!u(o)&&!yT(o)){if(!d(o))throw TypeError();B=o}}return B}function t(x,H,F){var B=p(x,H,F);if(B)return!0;var K=p_(H);if(!yT(K))return t(x,K,F);return!1}function p(x,H,F){var B=E_(H,F,!1);if(u(B))return!1;return KC(B.OrdinaryHasOwnMetadata(x,H,F))}function HT(x,H,F){var B=p(x,H,F);if(B)return ST(x,H,F);var K=p_(H);if(!yT(K))return HT(x,K,F);return}function ST(x,H,F){var B=E_(H,F,!1);if(u(B))return;return B.OrdinaryGetOwnMetadata(x,H,F)}function bT(x,H,F,B){var K=E_(F,B,!0);K.OrdinaryDefineOwnMetadata(x,H,F,B)}function A_(x,H){var F=lT(x,H),B=p_(x);if(B===null)return F;var K=A_(B,H);if(K.length<=0)return F;if(F.length<=0)return K;var s=new Z,o=[];for(var M=0,G=F;M<G.length;M++){var z=G[M],$=s.has(z);if(!$)s.add(z),o.push(z)}for(var h=0,k=K;h<k.length;h++){var z=k[h],$=s.has(z);if(!$)s.add(z),o.push(z)}return o}function lT(x,H){var F=E_(x,H,!1);if(!F)return[];return F.OrdinaryOwnMetadataKeys(x,H)}function hC(x){if(x===null)return 1;switch(typeof x){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return x===null?1:6;default:return 6}}function u(x){return x===void 0}function yT(x){return x===null}function Rf(x){return typeof x==="symbol"}function d(x){return typeof x==="object"?x!==null:typeof x==="function"}function cf(x,H){switch(hC(x)){case 0:return x;case 1:return x;case 2:return x;case 3:return x;case 4:return x;case 5:return x}var F=H===3?"string":H===5?"number":"default",B=OC(x,f);if(B!==void 0){var K=B.call(x,F);if(d(K))throw TypeError();return K}return Hf(x,F==="default"?"number":F)}function Hf(x,H){if(H==="string"){var F=x.toString;if(jT(F)){var B=F.call(x);if(!d(B))return B}var K=x.valueOf;if(jT(K)){var B=K.call(x);if(!d(B))return B}}else{var K=x.valueOf;if(jT(K)){var B=K.call(x);if(!d(B))return B}var s=x.toString;if(jT(s)){var B=s.call(x);if(!d(B))return B}}throw TypeError()}function KC(x){return!!x}function Lf(x){return""+x}function wT(x){var H=cf(x,3);if(Rf(H))return H;return Lf(H)}function IC(x){return Array.isArray?Array.isArray(x):x instanceof Object?x instanceof Array:Object.prototype.toString.call(x)==="[object Array]"}function jT(x){return typeof x==="function"}function uC(x){return typeof x==="function"}function Sf(x){switch(hC(x)){case 3:return!0;case 4:return!0;default:return!1}}function i_(x,H){return x===H||x!==x&&H!==H}function OC(x,H){var F=x[H];if(F===void 0||F===null)return;if(!jT(F))throw TypeError();return F}function MC(x){var H=OC(x,R);if(!jT(H))throw TypeError();var F=H.call(x);if(!d(F))throw TypeError();return F}function mC(x){return x.value}function gC(x){var H=x.next();return H.done?!1:H}function PC(x){var H=x.return;if(H)H.call(x)}function p_(x){var H=Object.getPrototypeOf(x);if(typeof x!=="function"||x===J)return H;if(H!==J)return H;var F=x.prototype,B=F&&Object.getPrototypeOf(F);if(B==null||B===Object.prototype)return H;var K=B.constructor;if(typeof K!=="function")return H;if(K===x)return H;return K}function wf(){var x;if(!u(X)&&typeof A.Reflect<"u"&&!(X in A.Reflect)&&typeof A.Reflect.defineMetadata==="function")x=qf(A.Reflect);var H,F,B,K=new q,s={registerProvider:o,getProvider:G,setProvider:$};return s;function o(h){if(!Object.isExtensible(s))throw Error("Cannot add provider to a frozen registry.");switch(!0){case x===h:break;case u(H):H=h;break;case H===h:break;case u(F):F=h;break;case F===h:break;default:if(B===void 0)B=new Z;B.add(h);break}}function M(h,k){if(!u(H)){if(H.isProviderFor(h,k))return H;if(!u(F)){if(F.isProviderFor(h,k))return H;if(!u(B)){var b=MC(B);while(!0){var i=gC(b);if(!i)return;var LT=mC(i);if(LT.isProviderFor(h,k))return PC(b),LT}}}}if(!u(x)&&x.isProviderFor(h,k))return x;return}function G(h,k){var b=K.get(h),i;if(!u(b))i=b.get(k);if(!u(i))return i;if(i=M(h,k),!u(i)){if(u(b))b=new w,K.set(h,b);b.set(k,i)}return i}function z(h){if(u(h))throw TypeError();return H===h||F===h||!u(B)&&B.has(h)}function $(h,k,b){if(!z(b))throw Error("Metadata provider not registered.");var i=G(h,k);if(i!==b){if(!u(i))return!1;var LT=K.get(h);if(u(LT))LT=new w,K.set(h,LT);LT.set(k,b)}return!0}}function Ff(){var x;if(!u(X)&&d(A.Reflect)&&Object.isExtensible(A.Reflect))x=A.Reflect[X];if(u(x))x=wf();if(!u(X)&&d(A.Reflect)&&Object.isExtensible(A.Reflect))Object.defineProperty(A.Reflect,X,{enumerable:!1,configurable:!1,writable:!1,value:x});return x}function Wf(x){var H=new q,F={isProviderFor:function(z,$){var h=H.get(z);if(u(h))return!1;return h.has($)},OrdinaryDefineOwnMetadata:o,OrdinaryHasOwnMetadata:K,OrdinaryGetOwnMetadata:s,OrdinaryOwnMetadataKeys:M,OrdinaryDeleteMetadata:G};return V.registerProvider(F),F;function B(z,$,h){var k=H.get(z),b=!1;if(u(k)){if(!h)return;k=new w,H.set(z,k),b=!0}var i=k.get($);if(u(i)){if(!h)return;if(i=new w,k.set($,i),!x.setProvider(z,$,F)){if(k.delete($),b)H.delete(z);throw Error("Wrong provider for target.")}}return i}function K(z,$,h){var k=B($,h,!1);if(u(k))return!1;return KC(k.has(z))}function s(z,$,h){var k=B($,h,!1);if(u(k))return;return k.get(z)}function o(z,$,h,k){var b=B(h,k,!0);b.set(z,$)}function M(z,$){var h=[],k=B(z,$,!1);if(u(k))return h;var b=k.keys(),i=MC(b),LT=0;while(!0){var kC=gC(i);if(!kC)return h.length=LT,h;var Xf=mC(kC);try{h[LT]=Xf}catch(Jf){try{PC(i)}finally{throw Jf}}LT++}}function G(z,$,h){var k=B($,h,!1);if(u(k))return!1;if(!k.delete(z))return!1;if(k.size===0){var b=H.get($);if(!u(b)){if(b.delete(h),b.size===0)H.delete(b)}}return!0}}function qf(x){var{defineMetadata:H,hasOwnMetadata:F,getOwnMetadata:B,getOwnMetadataKeys:K,deleteMetadata:s}=x,o=new q,M={isProviderFor:function(G,z){var $=o.get(G);if(!u($)&&$.has(z))return!0;if(K(G,z).length){if(u($))$=new Z,o.set(G,$);return $.add(z),!0}return!1},OrdinaryDefineOwnMetadata:H,OrdinaryHasOwnMetadata:F,OrdinaryGetOwnMetadata:B,OrdinaryOwnMetadataKeys:K,OrdinaryDeleteMetadata:s};return M}function E_(x,H,F){var B=V.getProvider(x,H);if(!u(B))return B;if(F){if(V.setProvider(x,H,W))return W;throw Error("Illegal state.")}return}function Yf(){var x={},H=[],F=function(){function M(G,z,$){this._index=0,this._keys=G,this._values=z,this._selector=$}return M.prototype["@@iterator"]=function(){return this},M.prototype[R]=function(){return this},M.prototype.next=function(){var G=this._index;if(G>=0&&G<this._keys.length){var z=this._selector(this._keys[G],this._values[G]);if(G+1>=this._keys.length)this._index=-1,this._keys=H,this._values=H;else this._index++;return{value:z,done:!1}}return{value:void 0,done:!0}},M.prototype.throw=function(G){if(this._index>=0)this._index=-1,this._keys=H,this._values=H;throw G},M.prototype.return=function(G){if(this._index>=0)this._index=-1,this._keys=H,this._values=H;return{value:G,done:!0}},M}(),B=function(){function M(){this._keys=[],this._values=[],this._cacheKey=x,this._cacheIndex=-2}return Object.defineProperty(M.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),M.prototype.has=function(G){return this._find(G,!1)>=0},M.prototype.get=function(G){var z=this._find(G,!1);return z>=0?this._values[z]:void 0},M.prototype.set=function(G,z){var $=this._find(G,!0);return this._values[$]=z,this},M.prototype.delete=function(G){var z=this._find(G,!1);if(z>=0){var $=this._keys.length;for(var h=z+1;h<$;h++)this._keys[h-1]=this._keys[h],this._values[h-1]=this._values[h];if(this._keys.length--,this._values.length--,i_(G,this._cacheKey))this._cacheKey=x,this._cacheIndex=-2;return!0}return!1},M.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=x,this._cacheIndex=-2},M.prototype.keys=function(){return new F(this._keys,this._values,K)},M.prototype.values=function(){return new F(this._keys,this._values,s)},M.prototype.entries=function(){return new F(this._keys,this._values,o)},M.prototype["@@iterator"]=function(){return this.entries()},M.prototype[R]=function(){return this.entries()},M.prototype._find=function(G,z){if(!i_(this._cacheKey,G)){this._cacheIndex=-1;for(var $=0;$<this._keys.length;$++)if(i_(this._keys[$],G)){this._cacheIndex=$;break}}if(this._cacheIndex<0&&z)this._cacheIndex=this._keys.length,this._keys.push(G),this._values.push(void 0);return this._cacheIndex},M}();return B;function K(M,G){return M}function s(M,G){return G}function o(M,G){return[M,G]}}function Qf(){var x=function(){function H(){this._map=new w}return Object.defineProperty(H.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),H.prototype.has=function(F){return this._map.has(F)},H.prototype.add=function(F){return this._map.set(F,F),this},H.prototype.delete=function(F){return this._map.delete(F)},H.prototype.clear=function(){this._map.clear()},H.prototype.keys=function(){return this._map.keys()},H.prototype.values=function(){return this._map.keys()},H.prototype.entries=function(){return this._map.entries()},H.prototype["@@iterator"]=function(){return this.keys()},H.prototype[R]=function(){return this.keys()},H}();return x}function Uf(){var x=16,H=S.create(),F=B();return function(){function G(){this._key=B()}return G.prototype.has=function(z){var $=K(z,!1);return $!==void 0?S.has($,this._key):!1},G.prototype.get=function(z){var $=K(z,!1);return $!==void 0?S.get($,this._key):void 0},G.prototype.set=function(z,$){var h=K(z,!0);return h[this._key]=$,this},G.prototype.delete=function(z){var $=K(z,!1);return $!==void 0?delete $[this._key]:!1},G.prototype.clear=function(){this._key=B()},G}();function B(){var G;do G="@@WeakMap@@"+M();while(S.has(H,G));return H[G]=!0,G}function K(G,z){if(!C.call(G,F)){if(!z)return;Object.defineProperty(G,F,{value:S.create()})}return G[F]}function s(G,z){for(var $=0;$<z;++$)G[$]=Math.random()*255|0;return G}function o(G){if(typeof Uint8Array==="function"){var z=new Uint8Array(G);if(typeof crypto<"u")crypto.getRandomValues(z);else if(typeof msCrypto<"u")msCrypto.getRandomValues(z);else s(z,G);return z}return s(Array(G),G)}function M(){var G=o(x);G[6]=G[6]&79|64,G[8]=G[8]&191|128;var z="";for(var $=0;$<x;++$){var h=G[$];if($===4||$===6||$===8)z+="-";if(h<16)z+="0";z+=h.toString(16).toLowerCase()}return z}}function o_(x){return x.__=void 0,delete x.__,x}})})(vC||(vC={}))});var MT=I((n0,yC)=>{yC.exports=TypeError});var dC=I((z0,jC)=>{jC.exports=nf("util").inspect});var W_=I((N0,SA)=>{var RC=typeof Map==="function"&&Map.prototype,e_=Object.getOwnPropertyDescriptor&&RC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,K_=RC&&e_&&typeof e_.get==="function"?e_.get:null,sC=RC&&Map.prototype.forEach,cC=typeof Set==="function"&&Set.prototype,a_=Object.getOwnPropertyDescriptor&&cC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,I_=cC&&a_&&typeof a_.get==="function"?a_.get:null,iC=cC&&Set.prototype.forEach,cx=typeof WeakMap==="function"&&WeakMap.prototype,S_=cx?WeakMap.prototype.has:null,Hx=typeof WeakSet==="function"&&WeakSet.prototype,w_=Hx?WeakSet.prototype.has:null,Lx=typeof WeakRef==="function"&&WeakRef.prototype,pC=Lx?WeakRef.prototype.deref:null,Sx=Boolean.prototype.valueOf,wx=Object.prototype.toString,Fx=Function.prototype.toString,Wx=String.prototype.match,HC=String.prototype.slice,hT=String.prototype.replace,qx=String.prototype.toUpperCase,oC=String.prototype.toLowerCase,EA=RegExp.prototype.test,rC=Array.prototype.concat,VT=Array.prototype.join,Yx=Array.prototype.slice,tC=Math.floor,CC=typeof BigInt==="function"?BigInt.prototype.valueOf:null,TC=Object.getOwnPropertySymbols,AC=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null,oT=typeof Symbol==="function"&&typeof Symbol.iterator==="object",F_=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===oT?"object":"symbol")?Symbol.toStringTag:null,fA=Object.prototype.propertyIsEnumerable,eC=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(_){return _.__proto__}:null);function aC(_,T){if(_===1/0||_===-1/0||_!==_||_&&_>-1000&&_<1000||EA.call(/e/,T))return T;var A=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof _==="number"){var C=_<0?-tC(-_):tC(_);if(C!==_){var E=String(C),f=HC.call(T,E.length+1);return hT.call(E,A,"$&_")+"."+hT.call(hT.call(f,/([0-9]{3})/g,"$&_"),/_$/,"")}}return hT.call(T,A,"$&_")}var EC=dC(),TA=EC.custom,_A=cA(TA)?TA:null,xA={__proto__:null,double:'"',single:"'"},Qx={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};SA.exports=function _(T,A,C,E){var f=A||{};if(NT(f,"quoteStyle")&&!NT(xA,f.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(NT(f,"maxStringLength")&&(typeof f.maxStringLength==="number"?f.maxStringLength<0&&f.maxStringLength!==1/0:f.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var R=NT(f,"customInspect")?f.customInspect:!0;if(typeof R!=="boolean"&&R!=="symbol")throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(NT(f,"indent")&&f.indent!==null&&f.indent!=="\t"&&!(parseInt(f.indent,10)===f.indent&&f.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(NT(f,"numericSeparator")&&typeof f.numericSeparator!=="boolean")throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var L=f.numericSeparator;if(typeof T>"u")return"undefined";if(T===null)return"null";if(typeof T==="boolean")return T?"true":"false";if(typeof T==="string")return LA(T,f);if(typeof T==="number"){if(T===0)return 1/0/T>0?"0":"-0";var c=String(T);return L?aC(T,c):c}if(typeof T==="bigint"){var Y=String(T)+"n";return L?aC(T,Y):Y}var S=typeof f.depth>"u"?5:f.depth;if(typeof C>"u")C=0;if(C>=S&&S>0&&typeof T==="object")return fC(T)?"[Array]":"[Object]";var J=Mx(f,C);if(typeof E>"u")E=[];else if(HA(E,T)>=0)return"[Circular]";function w(a,t,p){if(t)E=Yx.call(E),E.push(t);if(p){var HT={depth:f.depth};if(NT(f,"quoteStyle"))HT.quoteStyle=f.quoteStyle;return _(a,HT,C+1,E)}return _(a,f,C+1,E)}if(typeof T==="function"&&!CA(T)){var Z=nx(T),q=h_(T,w);return"[Function"+(Z?": "+Z:" (anonymous)")+"]"+(q.length>0?" { "+VT.call(q,", ")+" }":"")}if(cA(T)){var X=oT?hT.call(String(T),/^(Symbol\(.*\))_[^)]*$/,"$1"):AC.call(T);return typeof T==="object"&&!oT?L_(X):X}if(Ix(T)){var V="<"+oC.call(String(T.nodeName)),W=T.attributes||[];for(var N=0;N<W.length;N++)V+=" "+W[N].name+"="+RA(Ux(W[N].value),"double",f);if(V+=">",T.childNodes&&T.childNodes.length)V+="...";return V+="</"+oC.call(String(T.nodeName))+">",V}if(fC(T)){if(T.length===0)return"[]";var U=h_(T,w);if(J&&!Ox(U))return"["+xC(U,J)+"]";return"[ "+VT.call(U,", ")+" ]"}if(Jx(T)){var D=h_(T,w);if(!("cause"in Error.prototype)&&"cause"in T&&!fA.call(T,"cause"))return"{ ["+String(T)+"] "+VT.call(rC.call("[cause]: "+w(T.cause),D),", ")+" }";if(D.length===0)return"["+String(T)+"]";return"{ ["+String(T)+"] "+VT.call(D,", ")+" }"}if(typeof T==="object"&&R){if(_A&&typeof T[_A]==="function"&&EC)return EC(T,{depth:S-C});else if(R!=="symbol"&&typeof T.inspect==="function")return T.inspect()}if(zx(T)){var n=[];if(sC)sC.call(T,function(a,t){n.push(w(t,T,!0)+" => "+w(a,T))});return AA("Map",K_.call(T),n,J)}if(hx(T)){var TT=[];if(iC)iC.call(T,function(a){TT.push(w(a,T))});return AA("Set",I_.call(T),TT,J)}if(Nx(T))return _C("WeakMap");if(Kx(T))return _C("WeakSet");if($x(T))return _C("WeakRef");if(Bx(T))return L_(w(Number(T)));if(Dx(T))return L_(w(CC.call(T)));if(Vx(T))return L_(Sx.call(T));if(Zx(T))return L_(w(String(T)));if(typeof window<"u"&&T===window)return"{ [object Window] }";if(typeof globalThis<"u"&&T===globalThis||typeof global<"u"&&T===global)return"{ [object globalThis] }";if(!Xx(T)&&!CA(T)){var Q=h_(T,w),g=eC?eC(T)===Object.prototype:T instanceof Object||T.constructor===Object,P=T instanceof Object?"":"null prototype",O=!g&&F_&&Object(T)===T&&F_ in T?HC.call(KT(T),8,-1):P?"Object":"",y=g||typeof T.constructor!=="function"?"":T.constructor.name?T.constructor.name+" ":"",l=y+(O||P?"["+VT.call(rC.call([],O||[],P||[]),": ")+"] ":"");if(Q.length===0)return l+"{}";if(J)return l+"{"+xC(Q,J)+"}";return l+"{ "+VT.call(Q,", ")+" }"}return String(T)};function RA(_,T,A){var C=A.quoteStyle||T,E=xA[C];return E+_+E}function Ux(_){return hT.call(String(_),/"/g,"&quot;")}function mT(_){return!F_||!(typeof _==="object"&&((F_ in _)||typeof _[F_]<"u"))}function fC(_){return KT(_)==="[object Array]"&&mT(_)}function Xx(_){return KT(_)==="[object Date]"&&mT(_)}function CA(_){return KT(_)==="[object RegExp]"&&mT(_)}function Jx(_){return KT(_)==="[object Error]"&&mT(_)}function Zx(_){return KT(_)==="[object String]"&&mT(_)}function Bx(_){return KT(_)==="[object Number]"&&mT(_)}function Vx(_){return KT(_)==="[object Boolean]"&&mT(_)}function cA(_){if(oT)return _&&typeof _==="object"&&_ instanceof Symbol;if(typeof _==="symbol")return!0;if(!_||typeof _!=="object"||!AC)return!1;try{return AC.call(_),!0}catch(T){}return!1}function Dx(_){if(!_||typeof _!=="object"||!CC)return!1;try{return CC.call(_),!0}catch(T){}return!1}var Gx=Object.prototype.hasOwnProperty||function(_){return _ in this};function NT(_,T){return Gx.call(_,T)}function KT(_){return wx.call(_)}function nx(_){if(_.name)return _.name;var T=Wx.call(Fx.call(_),/^function\s*([\w$]+)/);if(T)return T[1];return null}function HA(_,T){if(_.indexOf)return _.indexOf(T);for(var A=0,C=_.length;A<C;A++)if(_[A]===T)return A;return-1}function zx(_){if(!K_||!_||typeof _!=="object")return!1;try{K_.call(_);try{I_.call(_)}catch(T){return!0}return _ instanceof Map}catch(T){}return!1}function Nx(_){if(!S_||!_||typeof _!=="object")return!1;try{S_.call(_,S_);try{w_.call(_,w_)}catch(T){return!0}return _ instanceof WeakMap}catch(T){}return!1}function $x(_){if(!pC||!_||typeof _!=="object")return!1;try{return pC.call(_),!0}catch(T){}return!1}function hx(_){if(!I_||!_||typeof _!=="object")return!1;try{I_.call(_);try{K_.call(_)}catch(T){return!0}return _ instanceof Set}catch(T){}return!1}function Kx(_){if(!w_||!_||typeof _!=="object")return!1;try{w_.call(_,w_);try{S_.call(_,S_)}catch(T){return!0}return _ instanceof WeakSet}catch(T){}return!1}function Ix(_){if(!_||typeof _!=="object")return!1;if(typeof HTMLElement<"u"&&_ instanceof HTMLElement)return!0;return typeof _.nodeName==="string"&&typeof _.getAttribute==="function"}function LA(_,T){if(_.length>T.maxStringLength){var A=_.length-T.maxStringLength,C="... "+A+" more character"+(A>1?"s":"");return LA(HC.call(_,0,T.maxStringLength),T)+C}var E=Qx[T.quoteStyle||"single"];E.lastIndex=0;var f=hT.call(hT.call(_,E,"\\$1"),/[\x00-\x1f]/g,ux);return RA(f,"single",T)}function ux(_){var T=_.charCodeAt(0),A={8:"b",9:"t",10:"n",12:"f",13:"r"}[T];if(A)return"\\"+A;return"\\x"+(T<16?"0":"")+qx.call(T.toString(16))}function L_(_){return"Object("+_+")"}function _C(_){return _+" { ? }"}function AA(_,T,A,C){var E=C?xC(A,C):VT.call(A,", ");return _+" ("+T+") {"+E+"}"}function Ox(_){for(var T=0;T<_.length;T++)if(HA(_[T],`
16
+ `)>=0)return!1;return!0}function Mx(_,T){var A;if(_.indent==="\t")A="\t";else if(typeof _.indent==="number"&&_.indent>0)A=VT.call(Array(_.indent+1)," ");else return null;return{base:A,prev:VT.call(Array(T+1),A)}}function xC(_,T){if(_.length===0)return"";var A=`
17
+ `+T.prev+T.base;return A+VT.call(_,","+A)+`
18
+ `+T.prev}function h_(_,T){var A=fC(_),C=[];if(A){C.length=_.length;for(var E=0;E<_.length;E++)C[E]=NT(_,E)?T(_[E],_):""}var f=typeof TC==="function"?TC(_):[],R;if(oT){R={};for(var L=0;L<f.length;L++)R["$"+f[L]]=f[L]}for(var c in _){if(!NT(_,c))continue;if(A&&String(Number(c))===c&&c<_.length)continue;if(oT&&R["$"+c]instanceof Symbol)continue;else if(EA.call(/[^\w$]/,c))C.push(T(c,_)+": "+T(_[c],_));else C.push(c+": "+T(_[c],_))}if(typeof TC==="function"){for(var Y=0;Y<f.length;Y++)if(fA.call(_,f[Y]))C.push("["+T(f[Y])+"]: "+T(_[f[Y]],_))}return C}});var FA=I(($0,wA)=>{var mx=W_(),gx=MT(),u_=function(_,T,A){var C=_,E;for(;(E=C.next)!=null;C=E)if(E.key===T){if(C.next=E.next,!A)E.next=_.next,_.next=E;return E}},Px=function(_,T){if(!_)return;var A=u_(_,T);return A&&A.value},kx=function(_,T,A){var C=u_(_,T);if(C)C.value=A;else _.next={key:T,next:_.next,value:A}},vx=function(_,T){if(!_)return!1;return!!u_(_,T)},bx=function(_,T){if(_)return u_(_,T,!0)};wA.exports=function(){var T,A={assert:function(C){if(!A.has(C))throw new gx("Side channel does not contain "+mx(C))},delete:function(C){var E=T&&T.next,f=bx(T,C);if(f&&E&&E===f)T=void 0;return!!f},get:function(C){return Px(T,C)},has:function(C){return vx(T,C)},set:function(C,E){if(!T)T={next:void 0};kx(T,C,E)}};return A}});var LC=I((h0,WA)=>{WA.exports=Object});var YA=I((K0,qA)=>{qA.exports=Error});var UA=I((I0,QA)=>{QA.exports=EvalError});var JA=I((u0,XA)=>{XA.exports=RangeError});var BA=I((O0,ZA)=>{ZA.exports=ReferenceError});var DA=I((M0,VA)=>{VA.exports=SyntaxError});var nA=I((m0,GA)=>{GA.exports=URIError});var NA=I((g0,zA)=>{zA.exports=Math.abs});var hA=I((P0,$A)=>{$A.exports=Math.floor});var IA=I((k0,KA)=>{KA.exports=Math.max});var OA=I((v0,uA)=>{uA.exports=Math.min});var mA=I((b0,MA)=>{MA.exports=Math.pow});var PA=I((l0,gA)=>{gA.exports=Math.round});var vA=I((y0,kA)=>{kA.exports=Number.isNaN||function(T){return T!==T}});var lA=I((j0,bA)=>{var lx=vA();bA.exports=function(T){if(lx(T)||T===0)return T;return T<0?-1:1}});var jA=I((d0,yA)=>{yA.exports=Object.getOwnPropertyDescriptor});var SC=I((s0,dA)=>{var O_=jA();if(O_)try{O_([],"length")}catch(_){O_=null}dA.exports=O_});var iA=I((i0,sA)=>{var M_=Object.defineProperty||!1;if(M_)try{M_({},"a",{value:1})}catch(_){M_=!1}sA.exports=M_});var oA=I((p0,pA)=>{pA.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var T={},A=Symbol("test"),C=Object(A);if(typeof A==="string")return!1;if(Object.prototype.toString.call(A)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(C)!=="[object Symbol]")return!1;var E=42;T[A]=E;for(var f in T)return!1;if(typeof Object.keys==="function"&&Object.keys(T).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(T).length!==0)return!1;var R=Object.getOwnPropertySymbols(T);if(R.length!==1||R[0]!==A)return!1;if(!Object.prototype.propertyIsEnumerable.call(T,A))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var L=Object.getOwnPropertyDescriptor(T,A);if(L.value!==E||L.enumerable!==!0)return!1}return!0}});var eA=I((o0,tA)=>{var rA=typeof Symbol<"u"&&Symbol,yx=oA();tA.exports=function(){if(typeof rA!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof rA("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return yx()}});var wC=I((r0,aA)=>{aA.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var FC=I((t0,TE)=>{var jx=LC();TE.exports=jx.getPrototypeOf||null});var AE=I((e0,CE)=>{var dx="Function.prototype.bind called on incompatible ",sx=Object.prototype.toString,ix=Math.max,px="[object Function]",_E=function(T,A){var C=[];for(var E=0;E<T.length;E+=1)C[E]=T[E];for(var f=0;f<A.length;f+=1)C[f+T.length]=A[f];return C},ox=function(T,A){var C=[];for(var E=A||0,f=0;E<T.length;E+=1,f+=1)C[f]=T[E];return C},rx=function(_,T){var A="";for(var C=0;C<_.length;C+=1)if(A+=_[C],C+1<_.length)A+=T;return A};CE.exports=function(T){var A=this;if(typeof A!=="function"||sx.apply(A)!==px)throw TypeError(dx+A);var C=ox(arguments,1),E,f=function(){if(this instanceof E){var S=A.apply(this,_E(C,arguments));if(Object(S)===S)return S;return this}return A.apply(T,_E(C,arguments))},R=ix(0,A.length-C.length),L=[];for(var c=0;c<R;c++)L[c]="$"+c;if(E=Function("binder","return function ("+rx(L,",")+"){ return binder.apply(this,arguments); }")(f),A.prototype){var Y=function(){};Y.prototype=A.prototype,E.prototype=new Y,Y.prototype=null}return E}});var q_=I((a0,EE)=>{var tx=AE();EE.exports=Function.prototype.bind||tx});var m_=I((T1,fE)=>{fE.exports=Function.prototype.call});var WC=I((_1,xE)=>{xE.exports=Function.prototype.apply});var cE=I((C1,RE)=>{RE.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var LE=I((A1,HE)=>{var ex=q_(),ax=WC(),TR=m_(),_R=cE();HE.exports=_R||ex.call(TR,ax)});var qC=I((E1,SE)=>{var CR=q_(),AR=MT(),ER=m_(),fR=LE();SE.exports=function(T){if(T.length<1||typeof T[0]!=="function")throw new AR("a function is required");return fR(CR,ER,T)}});var QE=I((f1,YE)=>{var xR=qC(),wE=SC(),WE;try{WE=[].__proto__===Array.prototype}catch(_){if(!_||typeof _!=="object"||!("code"in _)||_.code!=="ERR_PROTO_ACCESS")throw _}var YC=!!WE&&wE&&wE(Object.prototype,"__proto__"),qE=Object,FE=qE.getPrototypeOf;YE.exports=YC&&typeof YC.get==="function"?xR([YC.get]):typeof FE==="function"?function(T){return FE(T==null?T:qE(T))}:!1});var BE=I((x1,ZE)=>{var UE=wC(),XE=FC(),JE=QE();ZE.exports=UE?function(T){return UE(T)}:XE?function(T){if(!T||typeof T!=="object"&&typeof T!=="function")throw TypeError("getProto: not an object");return XE(T)}:JE?function(T){return JE(T)}:null});var DE=I((R1,VE)=>{var RR=Function.prototype.call,cR=Object.prototype.hasOwnProperty,HR=q_();VE.exports=HR.call(RR,cR)});var k_=I((c1,$E)=>{var m,LR=LC(),SR=YA(),wR=UA(),FR=JA(),WR=BA(),aT=DA(),eT=MT(),qR=nA(),YR=NA(),QR=hA(),UR=IA(),XR=OA(),JR=mA(),ZR=PA(),BR=lA(),zE=Function,QC=function(_){try{return zE('"use strict"; return ('+_+").constructor;")()}catch(T){}},Y_=SC(),VR=iA(),UC=function(){throw new eT},DR=Y_?function(){try{return arguments.callee,UC}catch(_){try{return Y_(arguments,"callee").get}catch(T){return UC}}}():UC,rT=eA()(),e=BE(),GR=FC(),nR=wC(),NE=WC(),Q_=m_(),tT={},zR=typeof Uint8Array>"u"||!e?m:e(Uint8Array),gT={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?m:ArrayBuffer,"%ArrayIteratorPrototype%":rT&&e?e([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":tT,"%AsyncGenerator%":tT,"%AsyncGeneratorFunction%":tT,"%AsyncIteratorPrototype%":tT,"%Atomics%":typeof Atomics>"u"?m:Atomics,"%BigInt%":typeof BigInt>"u"?m:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?m:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?m:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":SR,"%eval%":eval,"%EvalError%":wR,"%Float16Array%":typeof Float16Array>"u"?m:Float16Array,"%Float32Array%":typeof Float32Array>"u"?m:Float32Array,"%Float64Array%":typeof Float64Array>"u"?m:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?m:FinalizationRegistry,"%Function%":zE,"%GeneratorFunction%":tT,"%Int8Array%":typeof Int8Array>"u"?m:Int8Array,"%Int16Array%":typeof Int16Array>"u"?m:Int16Array,"%Int32Array%":typeof Int32Array>"u"?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":rT&&e?e(e([][Symbol.iterator]())):m,"%JSON%":typeof JSON==="object"?JSON:m,"%Map%":typeof Map>"u"?m:Map,"%MapIteratorPrototype%":typeof Map>"u"||!rT||!e?m:e(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":LR,"%Object.getOwnPropertyDescriptor%":Y_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?m:Promise,"%Proxy%":typeof Proxy>"u"?m:Proxy,"%RangeError%":FR,"%ReferenceError%":WR,"%Reflect%":typeof Reflect>"u"?m:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?m:Set,"%SetIteratorPrototype%":typeof Set>"u"||!rT||!e?m:e(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":rT&&e?e(""[Symbol.iterator]()):m,"%Symbol%":rT?Symbol:m,"%SyntaxError%":aT,"%ThrowTypeError%":DR,"%TypedArray%":zR,"%TypeError%":eT,"%Uint8Array%":typeof Uint8Array>"u"?m:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?m:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?m:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?m:Uint32Array,"%URIError%":qR,"%WeakMap%":typeof WeakMap>"u"?m:WeakMap,"%WeakRef%":typeof WeakRef>"u"?m:WeakRef,"%WeakSet%":typeof WeakSet>"u"?m:WeakSet,"%Function.prototype.call%":Q_,"%Function.prototype.apply%":NE,"%Object.defineProperty%":VR,"%Object.getPrototypeOf%":GR,"%Math.abs%":YR,"%Math.floor%":QR,"%Math.max%":UR,"%Math.min%":XR,"%Math.pow%":JR,"%Math.round%":ZR,"%Math.sign%":BR,"%Reflect.getPrototypeOf%":nR};if(e)try{null.error}catch(_){XC=e(e(_)),gT["%Error.prototype%"]=XC}var XC,NR=function _(T){var A;if(T==="%AsyncFunction%")A=QC("async function () {}");else if(T==="%GeneratorFunction%")A=QC("function* () {}");else if(T==="%AsyncGeneratorFunction%")A=QC("async function* () {}");else if(T==="%AsyncGenerator%"){var C=_("%AsyncGeneratorFunction%");if(C)A=C.prototype}else if(T==="%AsyncIteratorPrototype%"){var E=_("%AsyncGenerator%");if(E&&e)A=e(E.prototype)}return gT[T]=A,A},GE={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},U_=q_(),g_=DE(),$R=U_.call(Q_,Array.prototype.concat),hR=U_.call(NE,Array.prototype.splice),nE=U_.call(Q_,String.prototype.replace),P_=U_.call(Q_,String.prototype.slice),KR=U_.call(Q_,RegExp.prototype.exec),IR=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uR=/\\(\\)?/g,OR=function(T){var A=P_(T,0,1),C=P_(T,-1);if(A==="%"&&C!=="%")throw new aT("invalid intrinsic syntax, expected closing `%`");else if(C==="%"&&A!=="%")throw new aT("invalid intrinsic syntax, expected opening `%`");var E=[];return nE(T,IR,function(f,R,L,c){E[E.length]=L?nE(c,uR,"$1"):R||f}),E},MR=function(T,A){var C=T,E;if(g_(GE,C))E=GE[C],C="%"+E[0]+"%";if(g_(gT,C)){var f=gT[C];if(f===tT)f=NR(C);if(typeof f>"u"&&!A)throw new eT("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:E,name:C,value:f}}throw new aT("intrinsic "+T+" does not exist!")};$E.exports=function(T,A){if(typeof T!=="string"||T.length===0)throw new eT("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof A!=="boolean")throw new eT('"allowMissing" argument must be a boolean');if(KR(/^%?[^%]*%?$/,T)===null)throw new aT("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var C=OR(T),E=C.length>0?C[0]:"",f=MR("%"+E+"%",A),R=f.name,L=f.value,c=!1,Y=f.alias;if(Y)E=Y[0],hR(C,$R([0,1],Y));for(var S=1,J=!0;S<C.length;S+=1){var w=C[S],Z=P_(w,0,1),q=P_(w,-1);if((Z==='"'||Z==="'"||Z==="`"||(q==='"'||q==="'"||q==="`"))&&Z!==q)throw new aT("property names with quotes must have matching quotes");if(w==="constructor"||!J)c=!0;if(E+="."+w,R="%"+E+"%",g_(gT,R))L=gT[R];else if(L!=null){if(!(w in L)){if(!A)throw new eT("base intrinsic for "+T+" exists, but the property is not available.");return}if(Y_&&S+1>=C.length){var X=Y_(L,w);if(J=!!X,J&&"get"in X&&!("originalValue"in X.get))L=X.get;else L=L[w]}else J=g_(L,w),L=L[w];if(J&&!c)gT[R]=L}}return L}});var JC=I((H1,IE)=>{var hE=k_(),KE=qC(),mR=KE([hE("%String.prototype.indexOf%")]);IE.exports=function(T,A){var C=hE(T,!!A);if(typeof C==="function"&&mR(T,".prototype.")>-1)return KE([C]);return C}});var ZC=I((L1,OE)=>{var gR=k_(),X_=JC(),PR=W_(),kR=MT(),uE=gR("%Map%",!0),vR=X_("Map.prototype.get",!0),bR=X_("Map.prototype.set",!0),lR=X_("Map.prototype.has",!0),yR=X_("Map.prototype.delete",!0),jR=X_("Map.prototype.size",!0);OE.exports=!!uE&&function(){var T,A={assert:function(C){if(!A.has(C))throw new kR("Side channel does not contain "+PR(C))},delete:function(C){if(T){var E=yR(T,C);if(jR(T)===0)T=void 0;return E}return!1},get:function(C){if(T)return vR(T,C)},has:function(C){if(T)return lR(T,C);return!1},set:function(C,E){if(!T)T=new uE;bR(T,C,E)}};return A}});var mE=I((S1,ME)=>{var dR=k_(),b_=JC(),sR=W_(),v_=ZC(),iR=MT(),T_=dR("%WeakMap%",!0),pR=b_("WeakMap.prototype.get",!0),oR=b_("WeakMap.prototype.set",!0),rR=b_("WeakMap.prototype.has",!0),tR=b_("WeakMap.prototype.delete",!0);ME.exports=T_?function(){var T,A,C={assert:function(E){if(!C.has(E))throw new iR("Side channel does not contain "+sR(E))},delete:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return tR(T,E)}else if(v_){if(A)return A.delete(E)}return!1},get:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return pR(T,E)}return A&&A.get(E)},has:function(E){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(T)return rR(T,E)}return!!A&&A.has(E)},set:function(E,f){if(T_&&E&&(typeof E==="object"||typeof E==="function")){if(!T)T=new T_;oR(T,E,f)}else if(v_){if(!A)A=v_();A.set(E,f)}}};return C}:v_});var PE=I((w1,gE)=>{var eR=MT(),aR=W_(),Tc=FA(),_c=ZC(),Cc=mE(),Ac=Cc||_c||Tc;gE.exports=function(){var T,A={assert:function(C){if(!A.has(C))throw new eR("Side channel does not contain "+aR(C))},delete:function(C){return!!T&&T.delete(C)},get:function(C){return T&&T.get(C)},has:function(C){return!!T&&T.has(C)},set:function(C,E){if(!T)T=Ac();T.set(C,E)}};return A}});var l_=I((F1,kE)=>{var Ec=String.prototype.replace,fc=/%20/g,BC={RFC1738:"RFC1738",RFC3986:"RFC3986"};kE.exports={default:BC.RFC3986,formatters:{RFC1738:function(_){return Ec.call(_,fc,"+")},RFC3986:function(_){return String(_)}},RFC1738:BC.RFC1738,RFC3986:BC.RFC3986}});var GC=I((W1,bE)=>{var xc=l_(),VC=Object.prototype.hasOwnProperty,PT=Array.isArray,DT=function(){var _=[];for(var T=0;T<256;++T)_.push("%"+((T<16?"0":"")+T.toString(16)).toUpperCase());return _}(),Rc=function(T){while(T.length>1){var A=T.pop(),C=A.obj[A.prop];if(PT(C)){var E=[];for(var f=0;f<C.length;++f)if(typeof C[f]<"u")E.push(C[f]);A.obj[A.prop]=E}}},vE=function(T,A){var C=A&&A.plainObjects?{__proto__:null}:{};for(var E=0;E<T.length;++E)if(typeof T[E]<"u")C[E]=T[E];return C},cc=function _(T,A,C){if(!A)return T;if(typeof A!=="object"&&typeof A!=="function"){if(PT(T))T.push(A);else if(T&&typeof T==="object"){if(C&&(C.plainObjects||C.allowPrototypes)||!VC.call(Object.prototype,A))T[A]=!0}else return[T,A];return T}if(!T||typeof T!=="object")return[T].concat(A);var E=T;if(PT(T)&&!PT(A))E=vE(T,C);if(PT(T)&&PT(A))return A.forEach(function(f,R){if(VC.call(T,R)){var L=T[R];if(L&&typeof L==="object"&&f&&typeof f==="object")T[R]=_(L,f,C);else T.push(f)}else T[R]=f}),T;return Object.keys(A).reduce(function(f,R){var L=A[R];if(VC.call(f,R))f[R]=_(f[R],L,C);else f[R]=L;return f},E)},Hc=function(T,A){return Object.keys(A).reduce(function(C,E){return C[E]=A[E],C},T)},Lc=function(_,T,A){var C=_.replace(/\+/g," ");if(A==="iso-8859-1")return C.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(C)}catch(E){return C}},DC=1024,Sc=function(T,A,C,E,f){if(T.length===0)return T;var R=T;if(typeof T==="symbol")R=Symbol.prototype.toString.call(T);else if(typeof T!=="string")R=String(T);if(C==="iso-8859-1")return escape(R).replace(/%u[0-9a-f]{4}/gi,function(Z){return"%26%23"+parseInt(Z.slice(2),16)+"%3B"});var L="";for(var c=0;c<R.length;c+=DC){var Y=R.length>=DC?R.slice(c,c+DC):R,S=[];for(var J=0;J<Y.length;++J){var w=Y.charCodeAt(J);if(w===45||w===46||w===95||w===126||w>=48&&w<=57||w>=65&&w<=90||w>=97&&w<=122||f===xc.RFC1738&&(w===40||w===41)){S[S.length]=Y.charAt(J);continue}if(w<128){S[S.length]=DT[w];continue}if(w<2048){S[S.length]=DT[192|w>>6]+DT[128|w&63];continue}if(w<55296||w>=57344){S[S.length]=DT[224|w>>12]+DT[128|w>>6&63]+DT[128|w&63];continue}J+=1,w=65536+((w&1023)<<10|Y.charCodeAt(J)&1023),S[S.length]=DT[240|w>>18]+DT[128|w>>12&63]+DT[128|w>>6&63]+DT[128|w&63]}L+=S.join("")}return L},wc=function(T){var A=[{obj:{o:T},prop:"o"}],C=[];for(var E=0;E<A.length;++E){var f=A[E],R=f.obj[f.prop],L=Object.keys(R);for(var c=0;c<L.length;++c){var Y=L[c],S=R[Y];if(typeof S==="object"&&S!==null&&C.indexOf(S)===-1)A.push({obj:R,prop:Y}),C.push(S)}}return Rc(A),T},Fc=function(T){return Object.prototype.toString.call(T)==="[object RegExp]"},Wc=function(T){if(!T||typeof T!=="object")return!1;return!!(T.constructor&&T.constructor.isBuffer&&T.constructor.isBuffer(T))},qc=function(T,A){return[].concat(T,A)},Yc=function(T,A){if(PT(T)){var C=[];for(var E=0;E<T.length;E+=1)C.push(A(T[E]));return C}return A(T)};bE.exports={arrayToObject:vE,assign:Hc,combine:qc,compact:wc,decode:Lc,encode:Sc,isBuffer:Wc,isRegExp:Fc,maybeMap:Yc,merge:cc}});var iE=I((q1,sE)=>{var yE=PE(),y_=GC(),J_=l_(),Qc=Object.prototype.hasOwnProperty,jE={brackets:function(T){return T+"[]"},comma:"comma",indices:function(T,A){return T+"["+A+"]"},repeat:function(T){return T}},GT=Array.isArray,Uc=Array.prototype.push,dE=function(_,T){Uc.apply(_,GT(T)?T:[T])},Xc=Date.prototype.toISOString,lE=J_.default,r={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:y_.encode,encodeValuesOnly:!1,filter:void 0,format:lE,formatter:J_.formatters[lE],indices:!1,serializeDate:function(T){return Xc.call(T)},skipNulls:!1,strictNullHandling:!1},Jc=function(T){return typeof T==="string"||typeof T==="number"||typeof T==="boolean"||typeof T==="symbol"||typeof T==="bigint"},nC={},Zc=function _(T,A,C,E,f,R,L,c,Y,S,J,w,Z,q,X,V,W,N){var U=T,D=N,n=0,TT=!1;while((D=D.get(nC))!==void 0&&!TT){var Q=D.get(T);if(n+=1,typeof Q<"u")if(Q===n)throw RangeError("Cyclic object value");else TT=!0;if(typeof D.get(nC)>"u")n=0}if(typeof S==="function")U=S(A,U);else if(U instanceof Date)U=Z(U);else if(C==="comma"&&GT(U))U=y_.maybeMap(U,function(lT){if(lT instanceof Date)return Z(lT);return lT});if(U===null){if(R)return Y&&!V?Y(A,r.encoder,W,"key",q):A;U=""}if(Jc(U)||y_.isBuffer(U)){if(Y){var g=V?A:Y(A,r.encoder,W,"key",q);return[X(g)+"="+X(Y(U,r.encoder,W,"value",q))]}return[X(A)+"="+X(String(U))]}var P=[];if(typeof U>"u")return P;var O;if(C==="comma"&&GT(U)){if(V&&Y)U=y_.maybeMap(U,Y);O=[{value:U.length>0?U.join(",")||null:void 0}]}else if(GT(S))O=S;else{var y=Object.keys(U);O=J?y.sort(J):y}var l=c?String(A).replace(/\./g,"%2E"):String(A),a=E&&GT(U)&&U.length===1?l+"[]":l;if(f&&GT(U)&&U.length===0)return a+"[]";for(var t=0;t<O.length;++t){var p=O[t],HT=typeof p==="object"&&p&&typeof p.value<"u"?p.value:U[p];if(L&&HT===null)continue;var ST=w&&c?String(p).replace(/\./g,"%2E"):String(p),bT=GT(U)?typeof C==="function"?C(a,ST):a:a+(w?"."+ST:"["+ST+"]");N.set(T,n);var A_=yE();A_.set(nC,N),dE(P,_(HT,bT,C,E,f,R,L,c,C==="comma"&&V&&GT(U)?null:Y,S,J,w,Z,q,X,V,W,A_))}return P},Bc=function(T){if(!T)return r;if(typeof T.allowEmptyArrays<"u"&&typeof T.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.encodeDotInKeys<"u"&&typeof T.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(T.encoder!==null&&typeof T.encoder<"u"&&typeof T.encoder!=="function")throw TypeError("Encoder has to be a function.");var A=T.charset||r.charset;if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var C=J_.default;if(typeof T.format<"u"){if(!Qc.call(J_.formatters,T.format))throw TypeError("Unknown format option provided.");C=T.format}var E=J_.formatters[C],f=r.filter;if(typeof T.filter==="function"||GT(T.filter))f=T.filter;var R;if(T.arrayFormat in jE)R=T.arrayFormat;else if("indices"in T)R=T.indices?"indices":"repeat";else R=r.arrayFormat;if("commaRoundTrip"in T&&typeof T.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");var L=typeof T.allowDots>"u"?T.encodeDotInKeys===!0?!0:r.allowDots:!!T.allowDots;return{addQueryPrefix:typeof T.addQueryPrefix==="boolean"?T.addQueryPrefix:r.addQueryPrefix,allowDots:L,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:r.allowEmptyArrays,arrayFormat:R,charset:A,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:r.charsetSentinel,commaRoundTrip:!!T.commaRoundTrip,delimiter:typeof T.delimiter>"u"?r.delimiter:T.delimiter,encode:typeof T.encode==="boolean"?T.encode:r.encode,encodeDotInKeys:typeof T.encodeDotInKeys==="boolean"?T.encodeDotInKeys:r.encodeDotInKeys,encoder:typeof T.encoder==="function"?T.encoder:r.encoder,encodeValuesOnly:typeof T.encodeValuesOnly==="boolean"?T.encodeValuesOnly:r.encodeValuesOnly,filter:f,format:C,formatter:E,serializeDate:typeof T.serializeDate==="function"?T.serializeDate:r.serializeDate,skipNulls:typeof T.skipNulls==="boolean"?T.skipNulls:r.skipNulls,sort:typeof T.sort==="function"?T.sort:null,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:r.strictNullHandling}};sE.exports=function(_,T){var A=_,C=Bc(T),E,f;if(typeof C.filter==="function")f=C.filter,A=f("",A);else if(GT(C.filter))f=C.filter,E=f;var R=[];if(typeof A!=="object"||A===null)return"";var L=jE[C.arrayFormat],c=L==="comma"&&C.commaRoundTrip;if(!E)E=Object.keys(A);if(C.sort)E.sort(C.sort);var Y=yE();for(var S=0;S<E.length;++S){var J=E[S],w=A[J];if(C.skipNulls&&w===null)continue;dE(R,Zc(w,J,L,c,C.allowEmptyArrays,C.strictNullHandling,C.skipNulls,C.encodeDotInKeys,C.encode?C.encoder:null,C.filter,C.sort,C.allowDots,C.serializeDate,C.format,C.formatter,C.encodeValuesOnly,C.charset,Y))}var Z=R.join(C.delimiter),q=C.addQueryPrefix===!0?"?":"";if(C.charsetSentinel)if(C.charset==="iso-8859-1")q+="utf8=%26%2310003%3B&";else q+="utf8=%E2%9C%93&";return Z.length>0?q+Z:""}});var tE=I((Y1,rE)=>{var kT=GC(),zC=Object.prototype.hasOwnProperty,pE=Array.isArray,j={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:kT.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1000,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},Vc=function(_){return _.replace(/&#(\d+);/g,function(T,A){return String.fromCharCode(parseInt(A,10))})},oE=function(_,T,A){if(_&&typeof _==="string"&&T.comma&&_.indexOf(",")>-1)return _.split(",");if(T.throwOnLimitExceeded&&A>=T.arrayLimit)throw RangeError("Array limit exceeded. Only "+T.arrayLimit+" element"+(T.arrayLimit===1?"":"s")+" allowed in an array.");return _},Dc="utf8=%26%2310003%3B",Gc="utf8=%E2%9C%93",nc=function(T,A){var C={__proto__:null},E=A.ignoreQueryPrefix?T.replace(/^\?/,""):T;E=E.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var f=A.parameterLimit===1/0?void 0:A.parameterLimit,R=E.split(A.delimiter,A.throwOnLimitExceeded?f+1:f);if(A.throwOnLimitExceeded&&R.length>f)throw RangeError("Parameter limit exceeded. Only "+f+" parameter"+(f===1?"":"s")+" allowed.");var L=-1,c,Y=A.charset;if(A.charsetSentinel){for(c=0;c<R.length;++c)if(R[c].indexOf("utf8=")===0){if(R[c]===Gc)Y="utf-8";else if(R[c]===Dc)Y="iso-8859-1";L=c,c=R.length}}for(c=0;c<R.length;++c){if(c===L)continue;var S=R[c],J=S.indexOf("]="),w=J===-1?S.indexOf("="):J+1,Z,q;if(w===-1)Z=A.decoder(S,j.decoder,Y,"key"),q=A.strictNullHandling?null:"";else Z=A.decoder(S.slice(0,w),j.decoder,Y,"key"),q=kT.maybeMap(oE(S.slice(w+1),A,pE(C[Z])?C[Z].length:0),function(V){return A.decoder(V,j.decoder,Y,"value")});if(q&&A.interpretNumericEntities&&Y==="iso-8859-1")q=Vc(String(q));if(S.indexOf("[]=")>-1)q=pE(q)?[q]:q;var X=zC.call(C,Z);if(X&&A.duplicates==="combine")C[Z]=kT.combine(C[Z],q);else if(!X||A.duplicates==="last")C[Z]=q}return C},zc=function(_,T,A,C){var E=0;if(_.length>0&&_[_.length-1]==="[]"){var f=_.slice(0,-1).join("");E=Array.isArray(T)&&T[f]?T[f].length:0}var R=C?T:oE(T,A,E);for(var L=_.length-1;L>=0;--L){var c,Y=_[L];if(Y==="[]"&&A.parseArrays)c=A.allowEmptyArrays&&(R===""||A.strictNullHandling&&R===null)?[]:kT.combine([],R);else{c=A.plainObjects?{__proto__:null}:{};var S=Y.charAt(0)==="["&&Y.charAt(Y.length-1)==="]"?Y.slice(1,-1):Y,J=A.decodeDotInKeys?S.replace(/%2E/g,"."):S,w=parseInt(J,10);if(!A.parseArrays&&J==="")c={0:R};else if(!isNaN(w)&&Y!==J&&String(w)===J&&w>=0&&(A.parseArrays&&w<=A.arrayLimit))c=[],c[w]=R;else if(J!=="__proto__")c[J]=R}R=c}return R},Nc=function(T,A,C,E){if(!T)return;var f=C.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T,R=/(\[[^[\]]*])/,L=/(\[[^[\]]*])/g,c=C.depth>0&&R.exec(f),Y=c?f.slice(0,c.index):f,S=[];if(Y){if(!C.plainObjects&&zC.call(Object.prototype,Y)){if(!C.allowPrototypes)return}S.push(Y)}var J=0;while(C.depth>0&&(c=L.exec(f))!==null&&J<C.depth){if(J+=1,!C.plainObjects&&zC.call(Object.prototype,c[1].slice(1,-1))){if(!C.allowPrototypes)return}S.push(c[1])}if(c){if(C.strictDepth===!0)throw RangeError("Input depth exceeded depth option of "+C.depth+" and strictDepth is true");S.push("["+f.slice(c.index)+"]")}return zc(S,A,C,E)},$c=function(T){if(!T)return j;if(typeof T.allowEmptyArrays<"u"&&typeof T.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof T.decodeDotInKeys<"u"&&typeof T.decodeDotInKeys!=="boolean")throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(T.decoder!==null&&typeof T.decoder<"u"&&typeof T.decoder!=="function")throw TypeError("Decoder has to be a function.");if(typeof T.charset<"u"&&T.charset!=="utf-8"&&T.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof T.throwOnLimitExceeded<"u"&&typeof T.throwOnLimitExceeded!=="boolean")throw TypeError("`throwOnLimitExceeded` option must be a boolean");var A=typeof T.charset>"u"?j.charset:T.charset,C=typeof T.duplicates>"u"?j.duplicates:T.duplicates;if(C!=="combine"&&C!=="first"&&C!=="last")throw TypeError("The duplicates option must be either combine, first, or last");var E=typeof T.allowDots>"u"?T.decodeDotInKeys===!0?!0:j.allowDots:!!T.allowDots;return{allowDots:E,allowEmptyArrays:typeof T.allowEmptyArrays==="boolean"?!!T.allowEmptyArrays:j.allowEmptyArrays,allowPrototypes:typeof T.allowPrototypes==="boolean"?T.allowPrototypes:j.allowPrototypes,allowSparse:typeof T.allowSparse==="boolean"?T.allowSparse:j.allowSparse,arrayLimit:typeof T.arrayLimit==="number"?T.arrayLimit:j.arrayLimit,charset:A,charsetSentinel:typeof T.charsetSentinel==="boolean"?T.charsetSentinel:j.charsetSentinel,comma:typeof T.comma==="boolean"?T.comma:j.comma,decodeDotInKeys:typeof T.decodeDotInKeys==="boolean"?T.decodeDotInKeys:j.decodeDotInKeys,decoder:typeof T.decoder==="function"?T.decoder:j.decoder,delimiter:typeof T.delimiter==="string"||kT.isRegExp(T.delimiter)?T.delimiter:j.delimiter,depth:typeof T.depth==="number"||T.depth===!1?+T.depth:j.depth,duplicates:C,ignoreQueryPrefix:T.ignoreQueryPrefix===!0,interpretNumericEntities:typeof T.interpretNumericEntities==="boolean"?T.interpretNumericEntities:j.interpretNumericEntities,parameterLimit:typeof T.parameterLimit==="number"?T.parameterLimit:j.parameterLimit,parseArrays:T.parseArrays!==!1,plainObjects:typeof T.plainObjects==="boolean"?T.plainObjects:j.plainObjects,strictDepth:typeof T.strictDepth==="boolean"?!!T.strictDepth:j.strictDepth,strictNullHandling:typeof T.strictNullHandling==="boolean"?T.strictNullHandling:j.strictNullHandling,throwOnLimitExceeded:typeof T.throwOnLimitExceeded==="boolean"?T.throwOnLimitExceeded:!1}};rE.exports=function(_,T){var A=$c(T);if(_===""||_===null||typeof _>"u")return A.plainObjects?{__proto__:null}:{};var C=typeof _==="string"?nc(_,A):_,E=A.plainObjects?{__proto__:null}:{},f=Object.keys(C);for(var R=0;R<f.length;++R){var L=f[R],c=Nc(L,C[L],A,typeof _==="string");E=kT.merge(E,c,A)}if(A.allowSparse===!0)return E;return kT.compact(E)}});var aE=I((Q1,eE)=>{var hc=iE(),Kc=tE(),Ic=l_();eE.exports={formats:Ic,parse:Kc,stringify:hc}});var J4=n_(z_(),1);var bC={};Gf(bC,{zodSchemaKey:()=>zf,webSocketServerArgsKey:()=>QT,webSocketMessageArgsKey:()=>OT,webSocketKey:()=>YT,webSocketEventKey:()=>uT,webSocketEventArgumentsKey:()=>_T,webSocketConnectionArgsKey:()=>UT,webSocketCloseReasonArgsKey:()=>x_,webSocketCloseCodeArgsKey:()=>f_,routeModelArgsKey:()=>RT,responseStatusTextArgsKey:()=>t_,responseStatusArgsKey:()=>H_,responseHeadersArgsKey:()=>CT,responseBodyArgsKey:()=>c_,requestHeadersArgsKey:()=>XT,requestHeaderArgsKey:()=>fT,requestBodyArgsKey:()=>JT,requestArgsKey:()=>xT,queryArgsKey:()=>R_,paramsArgsKey:()=>iT,paramArgsKey:()=>ZT,moduleKey:()=>qT,middlewareKey:()=>WT,interceptorKey:()=>IT,injectableKey:()=>zT,injectKey:()=>sT,httpServerArgsKey:()=>ET,guardKey:()=>nT,controllerKey:()=>FT,controllerHttpKey:()=>dT,contextArgsKey:()=>BT,containerKey:()=>AT,configKey:()=>N_,argumentsKey:()=>v});var v=Symbol.for("____boolTypescriptCore:arguments__"),_T=Symbol.for("____boolTypescriptCore:webSocketEventArguments__"),N_=Symbol.for("____boolTypescriptCore:config__"),FT=Symbol.for("____boolTypescriptCore:controller__"),IT=Symbol.for("____boolTypescriptCore:interceptor__"),nT=Symbol.for("____boolTypescriptCore:guard__"),dT=Symbol.for("____boolTypescriptCore:controller.http__"),sT=Symbol.for("____boolTypescriptCore:inject__"),zT=Symbol.for("____boolTypescriptCore:injectable__"),WT=Symbol.for("____boolTypescriptCore:middleware__"),qT=Symbol.for("____boolTypescriptCore:module__"),AT=Symbol.for("____boolTypescriptCore:container__"),zf=Symbol.for("____boolTypescriptCore:zodSchema__"),YT=Symbol.for("____boolTypescriptCore:webSocket__"),uT=Symbol.for("____boolTypescriptCore:webSocket:event__"),QT=Symbol.for("____boolTypescriptCore:webSocketArguments:server__"),UT=Symbol.for("____boolTypescriptCore:webSocketArguments:connection__"),OT=Symbol.for("____boolTypescriptCore:webSocketArguments:message__"),f_=Symbol.for("____boolTypescriptCore:webSocketArguments:closeCode__"),x_=Symbol.for("____boolTypescriptCore:webSocketArguments:closeReason__"),ET=Symbol.for("____boolTypescriptCore:httpArguments:server__"),XT=Symbol.for("____boolTypescriptCore:httpArguments:requestHeaders__"),fT=Symbol.for("____boolTypescriptCore:httpArguments:requestHeader__"),JT=Symbol.for("____boolTypescriptCore:httpArguments:requestBody__"),iT=Symbol.for("____boolTypescriptCore:httpArguments:params__"),ZT=Symbol.for("____boolTypescriptCore:httpArguments:param__"),R_=Symbol.for("____boolTypescriptCore:httpArguments:query__"),xT=Symbol.for("____boolTypescriptCore:httpArguments:request__"),CT=Symbol.for("____boolTypescriptCore:httpArguments:responseHeaders__"),BT=Symbol.for("____boolTypescriptCore:httpArguments:context__"),RT=Symbol.for("____boolTypescriptCore:httpArguments:routeModel__"),c_=Symbol.for("____boolTypescriptCore:httpArguments:responseBody__"),H_=Symbol.for("____boolTypescriptCore:httpArguments:responseStatus__"),t_=Symbol.for("____boolTypescriptCore:httpArguments:responseStatusText__");var Nf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:XT,validationSchema:_},Reflect.defineMetadata(v,E,T.constructor,A)},$f=(_,T)=>(A,C,E)=>{if(!C)return;let f=Reflect.getOwnMetadata(v,A.constructor,C)||{};f[`argumentIndexes.${E}`]={index:E,type:fT,key:_,validationSchema:T},Reflect.defineMetadata(v,f,A.constructor,C)},hf=(_,T)=>(A,C,E)=>{if(!C)return;let f=Reflect.getOwnMetadata(v,A.constructor,C)||{};f[`argumentIndexes.${E}`]={index:E,type:JT,validationSchema:_,parser:T},Reflect.defineMetadata(v,f,A.constructor,C)},Kf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:iT,validationSchema:_},Reflect.defineMetadata(v,E,T.constructor,A)},If=(_,T)=>(A,C,E)=>{if(!C)return;let f=Reflect.getOwnMetadata(v,A.constructor,C)||{};f[`argumentIndexes.${E}`]={index:E,type:ZT,key:_,validationSchema:T},Reflect.defineMetadata(v,f,A.constructor,C)},uf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:R_,validationSchema:_},Reflect.defineMetadata(v,E,T.constructor,A)},Of=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:xT,validationSchema:_},Reflect.defineMetadata(v,E,T.constructor,A)},Mf=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(v,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:CT},Reflect.defineMetadata(v,C,_.constructor,T)},mf=(_)=>(T,A,C)=>{if(!A)return;let E=Reflect.getOwnMetadata(v,T.constructor,A)||{};E[`argumentIndexes.${C}`]={index:C,type:BT,key:_},Reflect.defineMetadata(v,E,T.constructor,A)},gf=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(v,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:RT},Reflect.defineMetadata(v,C,_.constructor,T)},Pf=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(v,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:ET},Reflect.defineMetadata(v,C,_.constructor,T)};var kf=(_)=>(T)=>{let{modules:A,middlewares:C,guards:E,dependencies:f}=_||{};if(Reflect.hasOwnMetadata(qT,T))throw Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);if(A){for(let R=0;R<A.length;R++)if(!Reflect.getOwnMetadataKeys(A[R]).includes(qT))throw Error(`${A[R].name} is not a module.`)}if(C){for(let R=0;R<C.length;R++)if(!Reflect.getOwnMetadataKeys(C[R]).includes(WT))throw Error(`${C[R].name} is not a middleware.`)}if(C){for(let R=0;R<C.length;R++)if(!Reflect.getOwnMetadataKeys(C[R]).includes(WT))throw Error(`${C[R].name} is not a middleware.`)}if(E){for(let R=0;R<E.length;R++)if(!Reflect.getOwnMetadataKeys(E[R]).includes(nT))throw Error(`${E[R].name} is not a guard.`)}if(f){for(let R=0;R<f.length;R++)if(!Reflect.getOwnMetadataKeys(f[R]).includes(zT))throw Error(`${f[R].name} is not an injectable.`)}Reflect.defineMetadata(AT,_,T)};var vf=(_)=>(T)=>{let A={prefix:!_?.startsWith("/")?`/${_||""}`:_,httpMetadata:[...Reflect.getOwnMetadata(dT,T)||[]]};Reflect.defineMetadata(FT,A,T)};var bf=()=>(_)=>{if(!("enforce"in _.prototype)||typeof _.prototype.enforce!=="function")return;let T=void 0;return Reflect.defineMetadata(nT,T,_),_};var pT=(_,T)=>(A,C,E)=>{if(!(E?.value instanceof Function))throw Error(`${T} decorator only use for class method.`);let f=Reflect.getOwnMetadata(v,A.constructor,C)||{},R=[...Reflect.getOwnMetadata(dT,A.constructor)||[],{path:!_.startsWith("/")?`/${_}`:_,httpMethod:T.toUpperCase(),methodName:C,descriptor:E,argumentsMetadata:f}];Reflect.defineMetadata(dT,R,A.constructor)},lf=(_="/")=>pT(_,"Get"),yf=(_="/")=>pT(_,"Post"),jf=(_="/")=>pT(_,"Put"),df=(_="/")=>pT(_,"Patch"),sf=(_="/")=>pT(_,"Delete"),pf=(_="/")=>pT(_,"Options");var of=(_)=>(T,A,C)=>{let E=Reflect.getMetadata(sT,T)||[];E[C]=_,Reflect.defineMetadata(sT,E,T)};var rf=()=>(_)=>Reflect.defineMetadata(zT,void 0,_);var tf=()=>(_)=>{Reflect.defineMetadata(IT,void 0,_)};var ef=()=>(_)=>{Reflect.defineMetadata(WT,void 0,_)};var af=(_)=>(T)=>{if(Reflect.hasOwnMetadata(AT,T))throw Error(`Conflict detected! ${T.name} class cannot be both a Module and a Container.`);let{middlewares:A,guards:C,interceptors:E,controllers:f,dependencies:R,webSockets:L}=_||{};if(A){for(let c=0;c<A.length;c++)if(!Reflect.getOwnMetadataKeys(A[c]).includes(WT))throw Error(`${A[c].name} is not a middleware.`)}if(C){for(let c=0;c<C.length;c++)if(!Reflect.getOwnMetadataKeys(C[c]).includes(nT))throw Error(`${C[c].name} is not a guard.`)}if(E){for(let c=0;c<E.length;c++)if(!Reflect.getOwnMetadataKeys(E[c]).includes(IT))throw Error(`${E[c].name} is not a interceptor.`)}if(f){for(let c=0;c<f.length;c++)if(!Reflect.getOwnMetadataKeys(f[c]).includes(FT))throw Error(`${f[c].name} is not a controller.`)}if(R){for(let c=0;c<R.length;c++)if(!Reflect.getOwnMetadataKeys(R[c]).includes(zT))throw Error(`${R[c].name} is not an injectable.`)}if(L){for(let c=0;c<L.length;c++)if(!Reflect.getOwnMetadataKeys(L[c]).includes(YT))throw Error(`${L[c].name} is not a websocket gateway.`)}Reflect.defineMetadata(qT,_,T)};var $_=Symbol("__bool:webSocket.upgrade__"),Tx=(_,T,A)=>{let C=new URL(T.url);return _.upgrade(T,{data:{method:T.method.toUpperCase(),pathname:C.pathname,query:A}})},_x=(_)=>(T)=>{let{prefix:A}=_||{};T.prototype[$_]=Tx;let C=Object.getOwnPropertyDescriptor(T.prototype,$_),E=!C?[]:[{path:"/",httpMethod:"GET",methodName:$_,descriptor:C,argumentsMetadata:{}},{path:"/",httpMethod:"POST",methodName:$_,descriptor:C,argumentsMetadata:{}}],f={prefix:!A?.startsWith("/")?`/${A||""}`:A,events:Reflect.getOwnMetadata(uT,T)||{},http:E};Reflect.defineMetadata(YT,f,T)};var Cx=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:UT},Reflect.defineMetadata(_T,C,_.constructor,T)},Ax=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:QT},Reflect.defineMetadata(_T,C,_.constructor,T)},Ex=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:f_},Reflect.defineMetadata(_T,C,_.constructor,T)},fx=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:x_},Reflect.defineMetadata(_T,C,_.constructor,T)},xx=()=>(_,T,A)=>{if(!T)return;let C=Reflect.getOwnMetadata(_T,_.constructor,T)||{};C[`argumentIndexes.${A}`]={index:A,type:OT},Reflect.defineMetadata(_T,C,_.constructor,T)};var Rx=(_)=>(T,A,C)=>{if(!(C.value instanceof Function))throw Error("WebSocketEvent decorator only use for class's method.");let E=Reflect.getOwnMetadata(_T,T.constructor,A),f=Object.freeze({methodName:A,descriptor:C,arguments:E}),R={...Reflect.getOwnMetadata(uT,T.constructor)||void 0,[_]:f};Reflect.defineMetadata(uT,f,T.constructor,A),Reflect.defineMetadata(uT,R,T.constructor)};var cT;(function(_){_.year="year",_.month="month",_.day="day",_.hours="hours",_.minutes="minutes",_.seconds="seconds",_.miliseconds="miliseconds"})(cT||(cT={}));var lC=(_,T,A=cT.day)=>{let C=_ instanceof Date?_:new Date(_);switch(A){case cT.year:C.setFullYear(C.getFullYear()+T);break;case cT.month:C.setMonth(C.getMonth()+T);break;case cT.day:C.setDate(C.getDate()+T);break;case cT.hours:C.setHours(C.getHours()+T);break;case cT.minutes:C.setMinutes(C.getMinutes()+T);break;case cT.seconds:C.setSeconds(C.getSeconds()+T);break;case cT.miliseconds:C.setMilliseconds(C.getMilliseconds()+T);break}return C};var xf=n_(aE(),1);var uc=Object.freeze({400:"BAD_REQUEST",401:"UNAUTHORIZED",402:"PAYMENT_REQUIRED",403:"FORBIDDEN",404:"NOT_FOUND",405:"METHOD_NOT_ALLOWED",406:"NOT_ACCEPTABLE",407:"PROXY_AUTHENCATION_REQUIRED",408:"REQUEST_TIMEOUT",409:"CONFLICT",410:"GONE",411:"LENGTH_REQUIRED",412:"PRECONDITION_FAILED",413:"PAYLOAD_TOO_LARGE",414:"URI_TOO_LONG",415:"UNSUPPORTED_MEDIA_TYPE",416:"RANGE_NOT_SATISFIABLE",417:"EXPECTATION_FAILED",418:"IM_A_TEAPOT",421:"MISDIRECTED_REQUEST",422:"UNPROCESSABLE_ENTITY",423:"LOCKED",424:"FAILED_DEPENDENCY",425:"TOO_EARLY_",426:"UPGRAGE_REQUIRED",428:"PRECONDITION_REQUIRED",429:"TOO_MANY_REQUESTS",431:"REQUEST_HEADER_FIELDS_TOO_LARGE",451:"UNAVAILABLE_FOR_LEGAL_REASONS"});class vT extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:A}){super();this.httpCode=_,this.message=!A?.trim()?uc[_]:A.trim(),this.data=T}}var Oc=Object.freeze({500:"INTERNAL_SERVER_ERROR",501:"NOT_IMPLEMENTED",502:"BAD_GATEWAY",503:"SERVICE_UNAVAILABLE",504:"GATEWAY_TIMEOUT",505:"HTTP_VERSION_NOT_SUPPORTED",506:"VARIANT_ALSO_NEGOTIATES",507:"INSUFFICIENT_STORAGE",508:"LOOP_DETECTED",510:"NOT_EXTENDED",511:"NETWORK_AUTHENTICATION_REQUIRED"});class Z_ extends Error{httpCode;message;data;constructor({httpCode:_,data:T,message:A}){super();this.httpCode=_,this.message=!A?.trim()?Oc[_]:A.trim(),this.data=T}}var NC=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"],Tf=(_)=>!!NC.find((T)=>T===_),_f=(_,T=new Headers)=>{if(T.set("Content-Type","application/json"),_ instanceof vT||_ instanceof Z_)return new Response(JSON.stringify(_),{status:_.httpCode,statusText:_.message,headers:T});return new Response(JSON.stringify((()=>{switch(typeof _){case"object":return!(_ instanceof Error)?_:{message:_.message,code:_.name,cause:_.cause};case"string":return{message:_};case"number":return{code:_};default:return}})()),{status:500,statusText:"INTERNAL SERVER ERROR",headers:T})};var G1=async function(){}.constructor;var Cf=Object.freeze({black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37,gray:90}),Af=Object.freeze({black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47,gray:100}),$T=(_,T={})=>{let{color:A,backgroundColor:C,bold:E,underline:f}=T,R="";if(E)R+="\x1B[1m";if(f)R+="\x1B[4m";if(A&&Cf[A])R+=`\x1B[${Cf[A]}m`;if(C&&Af[C])R+=`\x1B[${Af[C]}m`;return`${R}${_}\x1B[0m`};var Ef=(_)=>{let{headers:T,method:A}=_,C=T.get("upgrade")?.toLowerCase()||"",E=T.get("connection")?.toLowerCase()||"";return A==="GET"&&C?.toLowerCase()==="websocket"&&E?.toLowerCase().includes("upgrade")};class B_{_staticMap=new Map;_dynamicMap=new Map;_options=void 0;constructor(..._){_.forEach((T)=>{T.staticEntries.forEach(([A,C])=>this.set(A,C,{isStatic:!0,isPassthrough:!0})),T.dynamicEntries.forEach(([A,C])=>this.set(A,C,{isStatic:!1}))})}get(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.get(_):this._staticMap.get(_)}has(_,T){return!(T||this._options)?.isStatic?this._dynamicMap.has(_):this._staticMap.has(_)}set(_,T,A){let C=A||this._options;if(!C?.isStatic)this._dynamicMap.set(_,T);else if(!this._staticMap.has(_))this._staticMap.set(_,T);else if(!C.isPassthrough)throw Error(`${String(_)} already exists in context static collection.`);return this}setOptions(_){return this._options=_,this}get staticEntries(){return[...this._staticMap.entries()]}get dynamicEntries(){return[...this._dynamicMap.entries()]}}class $C{static rootPattern=":([a-z0-9A-Z_-]{1,})";static innerRootPattern="([a-z0-9A-Z_-]{1,})";alias;#T=new Map;#_;constructor({alias:_}){let T=this._thinAlias(_);this.alias=T,this.#_=new URLPattern({pathname:T,baseURL:"http://www.booljs.com"})}test({pathname:_}){try{return this.#_.test({pathname:this._thinAlias(_),baseURL:"http://www.booljs.com"})}catch(T){return console.error(T),!1}}exec({pathname:_,method:T}){try{let A=this.#T.get(T);if(!A)return null;let C=this.#_.exec({pathname:this._thinAlias(_),baseURL:"http://www.booljs.com"});if(!C)return null;let E=C.pathname.groups;return Object.freeze({parameters:E,model:A})}catch(A){return console.error(A),null}}get({model:_}){if(!this.#T.get("GET"))this.#T.set("GET",_);return this}post({model:_}){if(!this.#T.get("POST"))this.#T.set("POST",_);return this}put({model:_}){if(!this.#T.get("PUT"))this.#T.set("PUT",_);return this}delete({model:_}){if(!this.#T.get("DELETE"))this.#T.set("DELETE",_);return this}connect({model:_}){if(!this.#T.get("CONNECT"))return this.#T.set("CONNECT",_);return this}options({model:_}){if(!this.#T.get("OPTIONS"))return this.#T.set("OPTIONS",_);return this}trace({model:_}){if(!this.#T.get("TRACE"))return this.#T.set("TRACE",_);return this}patch({model:_}){if(!this.#T.get("PATCH"))return this.#T.set("PATCH",_);return this}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get _fullPath(){return this.alias.split("/").map((A,C)=>{let E=new RegExp(":([a-z0-9A-Z_.-]{1,})(\\(.*?\\))","g");if(!E.test(A)){if(E=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!E.test(A))return A;return A.replace(E,(f,R)=>`${f}(.*?)`)}return A}).join("/")}get _filteredPath(){return this.alias.split("/").map((A,C)=>{let E=new RegExp(":([a-z0-9A-Z_.-]{1,})((.*?))","g");if(!E.test(A)){if(E=new RegExp(":([a-z0-9A-Z_.-]{1,})","g"),!E.test(A))return A;return A.replace(E,(f,R)=>"(.*?)")}return A.replace(E,(f,R,L)=>L)}).join("/")}}var ff=$C;class V_{alias;_routes=new Map;constructor({alias:_}){this.alias=this._thinAlias(_)}route(_){let T=this._thinAlias(`${this.alias}/${_}`),A=this._routes.get(T),C=!A?new ff({alias:`${this.alias}/${_}`}):A;if(!A)this._routes.set(T,C);return C}_thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}get routes(){return this._routes}}class D_{_routers=new Map;add(..._){for(let T of _){if(this._routers.has(T.alias))continue;this._routers.set(T.alias,T)}return this}find({pathname:_,method:T}){for(let A of this._routers.values())for(let C of A.routes.values()){if(!C.test({pathname:_}))continue;let f=C.exec({pathname:_,method:T});if(!f)continue;return f}return null}}var k1=n_(z_(),1);class __{_mapper=new Map;constructor(..._){_.forEach((T)=>{T.entries.forEach(([A,C])=>{this._mapper.set(A,C)})})}get(_){if(this._mapper.has(_))return this._mapper.get(_);if(typeof _!=="function")return;let T=Reflect.getMetadataKeys(_);if(![zT,FT,WT,nT,IT,YT].some((f)=>T.includes(f)))throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");let C=(Reflect.getOwnMetadata(sT,_)||[]).map((f)=>this.get(f)),E=new _(...C);return this._mapper.set(_,E),E}set(_,T){if(this._mapper.has(_))throw Error(`${String(_)} already exists in injector collection.`);this._mapper.set(_,T)}get entries(){return[...this._mapper.entries()]}}class j_{error;constructor(_){this.error=_}}class d_{eventName;metadata;_context=void 0;constructor({eventName:_,metadata:T}){this.eventName=_,this.metadata=T}bind(_){return this._context=_,this}execute(){if(this._context&&typeof this.metadata.descriptor.value==="function")this.metadata.descriptor.value=this.metadata.descriptor.value.bind(this._context);return Object.freeze({methodName:this.metadata.methodName,descriptor:this.metadata.descriptor,arguments:this.metadata.arguments})}}class G_{rawAlias;alias;routes=[];constructor(_="/"){this.rawAlias=_;this.alias=G_.thinAlias(_)}addRoutes(..._){for(let T of _)if(!this.routes.includes(T))this.routes.push(T);return this}bind(_){for(let T of this.routes)T.bind(_);return this}execute(){let _=new Map;for(let T of this.routes)_.set(`${this.alias}:::${T.eventName}`,T.execute());return _}static thinAlias(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class C_{rawPrefix;prefix;routers=[];constructor(_="/"){this.rawPrefix=_;this.prefix=C_.thinPrefix(_)}addRouters(..._){for(let T=0;T<_.length;T++)if(!this.routers.includes(_[T]))this.routers.push(_[T]);for(let T of _)if(!this.routers.includes(T))this.routers.push(T);return this}execute(){let _=new Map;for(let T of this.routers){let A=T.execute();for(let[C,E]of A.entries())_.set(`/${C_.thinPrefix(`${this.prefix}/${C}`)}`,E)}return _}static thinPrefix(_){return _.replace(new RegExp("[/]{2,}","g"),"/").replace(new RegExp("^[/]|[/]$","g"),"")}}class s_{classConstructor;options;#T;#_;#E=new __;#C=new Map;#f;#x=900;#A;constructor(_,T){this.classConstructor=_;this.options=T;if(this.#_=Reflect.getOwnMetadataKeys(_),!this.#_.includes(AT)&&!this.#_.includes(qT))throw Error(`Can not detect! ${_.name} class is not a container or module.`);this.#x=typeof T.static?.cacheTimeInSeconds!=="number"?900:T.static.cacheTimeInSeconds,this.#f=Object.freeze({allowLogsMethods:this.options?.log?.methods||[],staticOption:this.options.static,allowOrigins:!this.options.cors?.origins?["*"]:typeof this.options.cors.origins!=="string"?this.options.cors.origins.includes("*")||this.options.cors.origins.length<1?["*"]:this.options.cors.origins:[this.options.cors.origins!=="*"?this.options.cors.origins:"*"],allowMethods:this.options.cors?.methods||NC,allowCredentials:!this.options.cors?.credentials?!1:!0,allowHeaders:!this.options.cors?.headers||this.options.cors.headers.includes("*")?["*"]:this.options.cors.headers})}useValidator(_){this.#A=_}async preLaunch(){if(this.#T)return this.#T;let _=!this.#_.includes(AT)?void 0:Reflect.getOwnMetadata(AT,this.classConstructor),T=!this.#_.includes(AT)?[this.classConstructor]:_?.modules||[],A=!_?void 0:await this.containerResolution({containerClass:this.classConstructor,options:this.options,extendInjector:this.#E}),C=await Promise.all(T.map((L)=>this.moduleResolution({moduleClass:L,options:this.options,extendInjector:!A?this.#E:A.injector})));if([...new Set(C.map((L)=>L.prefix))].length!==C.length)throw Error("Module prefix should be unique.");let f=new Map;for(let L of C){let c=L.webSocketRouterGroup.execute();for(let[Y,S]of c.entries())f.set(Y,S)}let R=Object.freeze({containerMetadata:_,modulesConverted:T,resolutedContainer:A,resolutedModules:C,webSocketsMap:f});return this.#T=R,R}async listen(){let{allowLogsMethods:_,allowOrigins:T,allowMethods:A,allowHeaders:C,allowCredentials:E,staticOption:f}=this.#f,{resolutedContainer:R,resolutedModules:L,webSocketsMap:c}=await this.preLaunch(),Y=Bun.serve({port:this.options.port,fetch:async(S,J)=>{let w=performance.now(),Z=new URL(S.url),q=xf.parse(Z.searchParams.toString(),this.options.queryParser),X=S.headers.get("origin")||"*",V=S.method.toUpperCase(),W=new Headers,N=new B_().setOptions({isStatic:!0}).set(ET,J).set(xT,S).set(fT,S.headers).set(CT,W).set(R_,q);try{if(!Tf(V))return this.finalizeResponse(new Response(JSON.stringify({httpCode:405,message:"Method Not Allowed.",data:void 0}),{status:405,statusText:"Method Not Allowed.",headers:W}));let D=Ef(S),n;if(D){for(let y of L){let l=y.webSocketHttpRouterGroup.find({pathname:Z.pathname,method:V});if(l){n=Object.freeze({route:l,resolution:y});break}}if(!n)return this.finalizeResponse(new Response(JSON.stringify({httpCode:404,message:"Route not found.",data:void 0}),{status:404,statusText:"Not found.",headers:W}));let O=await this.webSocketFetcher({request:S,server:J},{query:q,responseHeaders:W,route:n.route,moduleResolution:n.resolution});return O instanceof Response?O:void 0}if([...!E?[]:[{key:"Access-Control-Allow-Credentials",value:"true"}],{key:"Access-Control-Allow-Origin",value:T.includes("*")?"*":!T.includes(X)?T[0]:X},{key:"Access-Control-Allow-Methods",value:A.join(", ")},{key:"Access-Control-Allow-Headers",value:C.join(", ")}].forEach(({key:O,value:y})=>W.set(O,y)),!A.includes(V))return this.finalizeResponse(new Response(void 0,{status:405,statusText:"Method Not Allowed.",headers:W}));if(S.method.toUpperCase()==="OPTIONS")return this.finalizeResponse(T.includes("*")||T.includes(X)?new Response(void 0,{status:204,statusText:"No Content.",headers:W}):new Response(void 0,{status:417,statusText:"Expectation Failed.",headers:W}));if(f){let{path:O,headers:y}=f,l=`${O}/${Z.pathname}`,a=this.#C.get(l);if(!a){let t=Bun.file(l);if(await t.exists()){if(y)for(let[HT,ST]of Object.entries(y))W.set(HT,ST);return W.set("Content-Type",t.type),this.finalizeResponse(new Response(await t.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:W}))}}else{let t=new Date>a.expiredAt;if(t)this.#C.delete(l);let p=!t?a.file:Bun.file(l);if(await p.exists()){if(this.#C.set(l,Object.freeze({expiredAt:lC(new Date,this.#x,cT.seconds),file:p})),y)for(let[ST,bT]of Object.entries(y))W.set(ST,bT);return W.set("Content-Type",p.type),this.finalizeResponse(new Response(await p.arrayBuffer(),{status:200,statusText:"SUCCESS",headers:W}))}}}if(R){let{context:O}=await this.httpFetcher({context:N,resolutedMap:{injector:R.injector,startMiddlewareGroup:R.startMiddlewareGroup,guardGroup:R.guardGroup},options:{isContainer:!0}});N=O}for(let O of L){let y=O.controllerRouterGroup.find({pathname:Z.pathname,method:V});if(y){n=Object.freeze({route:y,resolution:O});break}}if(!n)N.setOptions({isStatic:!1}).set(H_,404).set(t_,"Not found.").set(c_,JSON.stringify({httpCode:404,message:"Route not found.",data:void 0}));else{let{context:O}=await this.httpFetcher({context:N,route:n.route,resolutedMap:n.resolution});N=O}if(R){let{context:O}=await this.httpFetcher({context:N,resolutedMap:{injector:R.injector,endMiddlewareGroup:R.endMiddlewareGroup},options:{isContainer:!0}});N=O}let TT=N.get(CT,{isStatic:!0})||new Headers,Q=N.get(c_,{isStatic:!1})||void 0,g=N.get(H_,{isStatic:!1}),P=N.get(H_,{isStatic:!1});return this.serializeResponse({status:typeof g!=="number"?void 0:g,statusText:typeof P!=="string"?void 0:P,headers:TT,data:Q})}catch(U){return this.options.debug&&console.error(U),this.finalizeResponse(_f(U,W))}finally{if(_){let U=performance.now(),D=$T(Z.pathname,{color:"blue"}),n=`${Bun.color("yellow","ansi")}${process.pid}`,TT=$T(S.method,{color:"yellow",backgroundColor:"blue"}),Q=$T(`${S.headers.get("x-forwarded-for")||S.headers.get("x-real-ip")||J.requestIP(S)?.address||"<Unknown>"}`,{color:"yellow"}),g=$T(`${Math.round((U-w+Number.EPSILON)*100)/100}ms`,{color:"yellow",backgroundColor:"blue"});_.includes(S.method.toUpperCase())&&console.info(`PID: ${n} - Method: ${TT} - IP: ${Q} - ${D} - Time: ${g}`)}}},websocket:{open:(S)=>{let J=`${S.data.pathname}:::open`,w=c.get(J);if(!w)return;let Z=w.arguments||{},q=[];for(let[X,V]of Object.entries(Z))switch(V.type){case UT:q[V.index]=S;break;case QT:q[V.index]=Y;break}w.descriptor.value(...q)},close:(S,J,w)=>{let Z=`${S.data.pathname}:::close`,q=c.get(Z);if(!q)return;let X=q.arguments||{},V=[];for(let[W,N]of Object.entries(X))switch(N.type){case UT:V[N.index]=S;break;case QT:V[N.index]=Y;break;case f_:V[N.index]=J;break;case x_:V[N.index]=w;break}q.descriptor.value(...V)},message:(S,J)=>{let w=`${S.data.pathname}:::message`,Z=c.get(w);if(!Z)return;let q=Z.arguments||{},X=[];for(let[V,W]of Object.entries(q))switch(W.type){case UT:X[W.index]=S;break;case OT:X[W.index]=J;break;case QT:X[W.index]=Y;break}Z.descriptor.value(...X)},drain:(S)=>{let J=`${S.data.pathname}:::drain`,w=c.get(J);if(!w)return;let Z=w.arguments||{},q=[];for(let[X,V]of Object.entries(Z))switch(V.type){case UT:q[V.index]=S;break;case QT:q[V.index]=Y;break}w.descriptor.value(...q)},ping:(S,J)=>{let w=`${S.data.pathname}:::ping`,Z=c.get(w);if(!Z)return;let q=Z.arguments||{},X=[];for(let[V,W]of Object.entries(q))switch(W.type){case UT:X[W.index]=S;break;case QT:X[W.index]=Y;break;case OT:X[W.index]=J;break}Z.descriptor.value(...X)},pong:(S,J)=>{let w=`${S.data.pathname}:::pong`,Z=c.get(w);if(!Z)return;let q=Z.arguments||{},X=[];for(let[V,W]of Object.entries(q))switch(W.type){case UT:X[W.index]=S;break;case QT:X[W.index]=Y;break;case OT:X[W.index]=J;break}Z.descriptor.value(...X)}}})}async containerResolution({containerClass:_,options:T,extendInjector:A}){if(!Reflect.getOwnMetadataKeys(_).includes(AT))throw Error(`${_.name} is not a container.`);let C=new __(A),E=Reflect.getOwnMetadata(AT,_),{loaders:f,middlewares:R,guards:L,dependencies:c,config:Y}=E||{},{config:S}=Object.freeze({config:{...typeof T.config!=="function"?T.config:await T.config(),...typeof Y!=="function"?typeof Y!=="object"?void 0:("key"in Y)&&("value"in Y)&&typeof Y.key==="symbol"?typeof Y.value!=="function"?Y.value:await Y.value():Y:await Y()}});if(C.set(Y&&"key"in Y&&"value"in Y&&typeof Y.key==="symbol"?Y.key:N_,S),f){let q=[];for(let[V,W]of Object.entries(f))q.push(async()=>{try{let N=await W({config:S});return console.info(`${$T(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${V}] initialized successfully.`),N}catch(N){throw console.error(`${$T(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${V}] initialization failed.`),T.debug&&console.error(N),N}});let X=await Promise.all(q.map((V)=>V()));for(let[V,W]of X)C.set(V,W)}!c||c.map((q)=>C.get(q));let J=[],w=[];!R||R.forEach((q)=>{let X=C.get(q);if(X.start&&typeof X.start==="function"){let V=Reflect.getOwnMetadata(v,q,"start")||{};J.push(Object.freeze({class:q,funcName:"start",func:X.start.bind(X),argumentsMetadata:V}))}if(X.end&&typeof X.end==="function"){let V=Reflect.getOwnMetadata(v,q,"end")||{};w.push(Object.freeze({class:q,funcName:"end",func:X.end.bind(X),argumentsMetadata:V}))}});let Z=!L?[]:L.map((q)=>{let X=C.get(q),V=Reflect.getOwnMetadata(v,q,"enforce")||{};return Object.freeze({class:q,funcName:"enforce",func:X.enforce.bind(X),argumentsMetadata:V})});return Object.freeze({injector:C,startMiddlewareGroup:J,endMiddlewareGroup:w,guardGroup:Z})}async moduleResolution({moduleClass:_,options:T,extendInjector:A}){if(!Reflect.getOwnMetadataKeys(_).includes(qT))throw Error(`${_.name} is not a module.`);let C=new __(A),E=Reflect.getOwnMetadata(qT,_),{loaders:f,middlewares:R,guards:L,interceptors:c,controllers:Y,dependencies:S,webSockets:J,prefix:w,config:Z}=E||{},q=`${T.prefix||""}/${w||""}`,{config:X}=Object.freeze({config:!Z?void 0:{...typeof T.config!=="function"?T.config:await T.config(),...typeof Z!=="function"?typeof Z!=="object"?void 0:("key"in Z)&&("value"in Z)&&typeof Z.key==="symbol"?typeof Z.value!=="function"?Z.value:await Z.value():Z:await Z()}});if(X&&C.set(Z&&"key"in Z&&"value"in Z&&typeof Z.key==="symbol"?Z.key:N_,X),f){let g=[];for(let[O,y]of Object.entries(f))g.push(async()=>{try{let l=await y({config:X});return console.info(`${$T(" INFO ",{color:"white",backgroundColor:"blue",bold:!0})} Loader [${O}] initialized successfully.`),l}catch(l){throw console.error(`${$T(" WARN ",{color:"yellow",backgroundColor:"red",bold:!0})} Loader [${O}] initialization failed.`),T.debug&&console.error(l),l}});let P=await Promise.all(g.map((O)=>O()));for(let O=0;O<P.length;O++){let[y,l]=P[O];C.set(y,l)}}!S||S.map((g)=>C.get(g));let V=[],W=[];!R||R.forEach((g)=>{let P=C.get(g);if(P.start&&typeof P.start==="function"){let O=Reflect.getOwnMetadata(v,g,"start")||{};V.push(Object.freeze({class:g,funcName:"start",func:P.start.bind(P),argumentsMetadata:O}))}if(P.end&&typeof P.end==="function"){let O=Reflect.getOwnMetadata(v,g,"end")||{};W.push(Object.freeze({class:g,funcName:"end",func:P.end.bind(P),argumentsMetadata:O}))}});let N=!L?[]:L.map((g)=>{let P=C.get(g),O=Reflect.getOwnMetadata(v,g,"enforce")||{};return Object.freeze({class:g,funcName:"enforce",func:P.enforce.bind(P),argumentsMetadata:O})}),U=[],D=[];!c||c.forEach((g)=>{let P=C.get(g);if(P.open&&typeof P.open==="function"){let O=Reflect.getOwnMetadata(v,g,"open")||{};U.push(Object.freeze({class:g,funcName:"open",func:P.open.bind(P),argumentsMetadata:O}))}if(P.close&&typeof P.close==="function"){let O=Reflect.getOwnMetadata(v,g,"close")||{};D.push(Object.freeze({class:g,funcName:"close",func:P.close.bind(P),argumentsMetadata:O}))}});let n=new D_;!Y||Y.forEach((g)=>this.initControllerInstance({controllerConstructor:g,httpRouterGroup:n,injector:C,prefix:q}));let TT=new D_,Q=new C_;return J&&J.forEach((g)=>this.initWebSocketInstance({webSocketConstructor:g,httpRouterGroup:TT,webSocketRouterGroup:Q,injector:C,prefix:q})),Object.freeze({prefix:w||"",injector:C,startMiddlewareGroup:V,endMiddlewareGroup:W,guardGroup:N,openInterceptorGroup:U,closeInterceptorGroup:D,controllerRouterGroup:n,webSocketHttpRouterGroup:TT,webSocketRouterGroup:Q})}async argumentsResolution(_,T,A,C){if(!this.#A)return _;try{let E=await this.#A.validate(_,T,A,C);if(!(E instanceof j_))return E;throw new vT({httpCode:400,message:`Validation at the [${C.toString()}] method fails at positional argument [${A}].`,data:E.error})}catch(E){if(E instanceof vT)throw E;throw new Z_({httpCode:500,message:`Validation at the [${C.toString()}] method error at positional argument [${A}].`,data:!(E instanceof Error)?E:[{message:E.message,code:E.name,cause:E.cause}]})}}initControllerInstance({controllerConstructor:_,httpRouterGroup:T,injector:A,prefix:C}){if(!Reflect.getOwnMetadataKeys(_).includes(FT))throw Error(`${_.name} is not a controller.`);let E=A.get(_);if(!E)throw Error("Can not initialize controller.");let f=Reflect.getOwnMetadata(FT,_)||{prefix:"/",httpMetadata:[]},R=new V_({alias:`/${C||""}/${f.prefix}`});return f.httpMetadata.forEach((L)=>{if(typeof L.descriptor.value!=="function")return;let c=R.route(L.path),Y=L.descriptor.value.bind(E),S=Object.freeze({class:_,funcName:L.methodName,func:Y,argumentsMetadata:L.argumentsMetadata});switch(L.httpMethod){case"GET":return c.get({model:S});case"POST":return c.post({model:S});case"PUT":return c.put({model:S});case"PATCH":return c.patch({model:S});case"DELETE":return c.delete({model:S});case"OPTIONS":return c.options({model:S})}}),T.add(R)}initWebSocketInstance({injector:_,httpRouterGroup:T,prefix:A,webSocketRouterGroup:C,webSocketConstructor:E}){if(!Reflect.getOwnMetadataKeys(E).includes(YT))throw Error(`${E.name} is not a websocket route.`);let f=_.get(E);if(!f)throw Error("Can not initialize webSocket.");let R=Reflect.getOwnMetadata(YT,E)||{prefix:"/",events:[],http:[]},L=`/${A||""}/${R.prefix}`,c=new V_({alias:L});for(let[S,J]of Object.entries(R.http)){if(typeof J.descriptor?.value!=="function")continue;let w=c.route(J.path),Z=J.descriptor.value.bind(f),q=Object.freeze({class:E,funcName:J.methodName,func:Z,argumentsMetadata:J.argumentsMetadata});switch(J.httpMethod){case"GET":w.get({model:q});break;case"POST":w.post({model:q});break}}T.add(c);let Y=new G_(L);for(let[S,J]of Object.entries(R.events)){let w=new d_({eventName:S,metadata:J});Y.addRoutes(w)}return Y.bind(f),C.addRouters(Y),Object.freeze({httpRouterGroup:T,webSocketRouterGroup:C})}serializeResponse({status:_,statusText:T,headers:A,data:C}){let E=A.get("Content-Type")||"text/plain";if(E.includes("application/json"))return this.finalizeResponse(new Response(!C?void 0:C instanceof ReadableStream?C:JSON.stringify(C),{status:!C?204:_,statusText:T,headers:A}));if(E.includes("text/plain")||E.includes("text/html"))return this.finalizeResponse(new Response(!C?void 0:C instanceof ReadableStream?C:String(C),{status:!C?204:_,statusText:T,headers:A}));if(E.includes("application/octet-stream")){if(C instanceof Uint8Array||C instanceof ArrayBuffer||C instanceof Blob||C instanceof ReadableStream)return this.finalizeResponse(new Response(C,{status:_,statusText:T,headers:A}));throw Error("Invalid data type for application/octet-stream")}if(E.includes("multipart/form-data")){if(C instanceof FormData)return this.finalizeResponse(new Response(C,{status:_,statusText:T,headers:A}));throw Error("multipart/form-data requires FormData object")}return this.finalizeResponse(new Response(!C?void 0:String(C),{status:!C?204:_,statusText:T,headers:A}))}finalizeResponse(_){return _.headers.set("X-Powered-By","Bool Typescript"),_}async httpFetcher({context:_,route:T,options:A,resolutedMap:C}){let E={isStatic:!0},f=(!_?new B_:new B_(_)).setOptions(E);if(T)f.set(iT,T.parameters).set(RT,T.model);let R=f.get(ET,E)||void 0,L=f.get(xT,E)||void 0,c=f.get(fT,E)||void 0,Y=f.get(CT,E)||void 0,S=f.get(iT,E)||void 0,J=f.get(RT,E)||void 0;if(C){let{startMiddlewareGroup:w,guardGroup:Z}=C;if(w)for(let q=0;q<w.length;q++){let X=[],{func:V,funcName:W,argumentsMetadata:N}=w[q];for(let[U,D]of Object.entries(N))switch(D.type){case BT:X[D.index]=!D.key?f:f.get(D.key,E);break;case xT:X[D.index]=!D.validationSchema?L:await this.argumentsResolution(L,D.validationSchema,D.index,W);break;case JT:X[D.index]=!D.validationSchema?await L?.[D.parser||"json"]():await this.argumentsResolution(await L?.[D.parser||"json"](),D.validationSchema,D.index,W);break;case XT:X[D.index]=!D.validationSchema?c:await this.argumentsResolution(c?.toJSON(),D.validationSchema,D.index,W);break;case fT:X[D.index]=!D.validationSchema?c?.get(D.key)||void 0:await this.argumentsResolution(c?.get(D.key)||void 0,D.validationSchema,D.index,W);break;case ZT:X[D.index]=!D.validationSchema?S?.[D.key]||void 0:await this.argumentsResolution(S?.[D.key]||void 0,D.validationSchema,D.index,W);break;case RT:X[D.index]=J;break;case CT:X[D.index]=Y;break;case ET:X[D.index]=R;break;default:X[D.index]=!D.validationSchema?!f.has(D.type,E)?void 0:f.get(D.type,E):await this.argumentsResolution(!(D.type in f)?void 0:f.get(D.type,E),D.validationSchema,D.index,W);break}await V(...X)}if(Z)for(let q=0;q<Z.length;q++){let X=[],{func:V,funcName:W,argumentsMetadata:N}=Z[q];for(let[D,n]of Object.entries(N))switch(n.type){case xT:X[n.index]=!n.validationSchema?L:await this.argumentsResolution(L,n.validationSchema,n.index,W);break;case JT:X[n.index]=!n.validationSchema?await L?.[n.parser||"json"]():await this.argumentsResolution(await L?.[n.parser||"json"](),n.validationSchema,n.index,W);break;case BT:X[n.index]=!n.key?f:f.get(n.key);break;case XT:X[n.index]=!n.validationSchema?c:await this.argumentsResolution(c?.toJSON(),n.validationSchema,n.index,W);break;case CT:X[n.index]=Y;break;case fT:X[n.index]=!n.validationSchema?c?.get(n.key)||void 0:await this.argumentsResolution(c?.get(n.key)||void 0,n.validationSchema,n.index,W);break;case ZT:X[n.index]=!n.validationSchema?S?.[n.key]||void 0:await this.argumentsResolution(S?.[n.key],n.validationSchema,n.index,W);break;case RT:X[n.index]=J;break;case ET:X[n.index]=R;break;default:X[n.index]=!n.validationSchema?!f.has(n.type)?void 0:f.get(n.type):await this.argumentsResolution(f.get(n.type),n.validationSchema,n.index,W);break}let U=await V(...X);if(typeof U!=="boolean"||!U)throw new vT({httpCode:401,message:"Unauthorization.",data:void 0})}}if(J&&!A?.isContainer){if(C&&"openInterceptorGroup"in C&&C.openInterceptorGroup){let{openInterceptorGroup:V}=C;for(let W=0;W<V.length;W++){let N=[],{func:U,funcName:D,argumentsMetadata:n}=V[W];for(let[TT,Q]of Object.entries(n))switch(Q.type){case xT:N[Q.index]=!Q.validationSchema?L:await this.argumentsResolution(L,Q.validationSchema,Q.index,D);break;case JT:N[Q.index]=!Q.validationSchema?await L?.[Q.parser||"json"]():await this.argumentsResolution(await L?.[Q.parser||"json"](),Q.validationSchema,Q.index,D);break;case BT:N[Q.index]=!Q.key?f:f.get(Q.key);break;case XT:N[Q.index]=!Q.validationSchema?c:await this.argumentsResolution(c?.toJSON(),Q.validationSchema,Q.index,D);break;case fT:N[Q.index]=!Q.validationSchema?c?.get(Q.key)||void 0:await this.argumentsResolution(c?.get(Q.key)||void 0,Q.validationSchema,Q.index,D);break;case CT:N[Q.index]=Y;break;case ZT:N[Q.index]=!Q.validationSchema?S?.[Q.key]||void 0:await this.argumentsResolution(S?.[Q.key]||void 0,Q.validationSchema,Q.index,D);break;case RT:N[Q.index]=J;break;case ET:N[Q.index]=R;break;default:N[Q.index]=!Q.validationSchema?!f.has(Q.type)?void 0:f.get(Q.type):await this.argumentsResolution(f.get(Q.type),Q.validationSchema,Q.index,D);break}await U(...N)}}let w=[],{func:Z,funcName:q,argumentsMetadata:X}=J;for(let[V,W]of Object.entries(X))switch(W.type){case xT:w[W.index]=!W.validationSchema?L:await this.argumentsResolution(L,W.validationSchema,W.index,q);break;case JT:w[W.index]=!W.validationSchema?await L?.[W.parser||"json"]():await this.argumentsResolution(await L?.[W.parser||"json"](),W.validationSchema,W.index,q);break;case BT:w[W.index]=!W.key?f:f.get(W.key);break;case XT:w[W.index]=!W.validationSchema?c:await this.argumentsResolution(c?.toJSON(),W.validationSchema,W.index,q);break;case fT:w[W.index]=!W.validationSchema?c?.get(W.key)||void 0:await this.argumentsResolution(c?.get(W.key)||void 0,W.validationSchema,W.index,q);break;case CT:w[W.index]=Y;break;case ZT:w[W.index]=!W.validationSchema?S?.[W.key]||void 0:await this.argumentsResolution(S?.[W.key]||void 0,W.validationSchema,W.index,q);break;case RT:w[W.index]=J;break;case ET:w[W.index]=R;break;default:w[W.index]=!W.validationSchema?!f.has(W.type)?void 0:f.get(W.type):await this.argumentsResolution(f.get(W.type),W.validationSchema,W.index,q);break}if(f.set(c_,await Z(...w),{isStatic:!1}),C&&"closeInterceptorGroup"in C&&C.closeInterceptorGroup){let{closeInterceptorGroup:V}=C;for(let W=0;W<V.length;W++){let N=[],{func:U,funcName:D,argumentsMetadata:n}=V[W];for(let[TT,Q]of Object.entries(n))switch(Q.type){case xT:N[Q.index]=!Q.validationSchema?L:await this.argumentsResolution(L,Q.validationSchema,Q.index,D);break;case JT:N[Q.index]=!Q.validationSchema?await L?.[Q.parser||"json"]():await this.argumentsResolution(await L?.[Q.parser||"json"](),Q.validationSchema,Q.index,D);break;case BT:N[Q.index]=!Q.key?f:f.get(Q.key);break;case XT:N[Q.index]=!Q.validationSchema?c:await this.argumentsResolution(c?.toJSON(),Q.validationSchema,Q.index,D);break;case CT:N[Q.index]=f.get(Q.type);break;case fT:N[Q.index]=!Q.validationSchema?c?.get(Q.key)||void 0:await this.argumentsResolution(c?.get(Q.key)||void 0,Q.validationSchema,Q.index,D);break;case ZT:N[Q.index]=!Q.validationSchema?S?.[Q.key]||void 0:await this.argumentsResolution(S?.[Q.key]||void 0,Q.validationSchema,Q.index,D);break;case RT:N[Q.index]=J;break;case ET:N[Q.index]=R;break;default:N[Q.index]=!Q.validationSchema?!f.has(Q.type)?void 0:f.get(Q.type):await this.argumentsResolution(f.get(Q.type),Q.validationSchema,Q.index,D);break}await U(...N)}}}if(C){let{endMiddlewareGroup:w}=C;if(w)for(let Z=0;Z<w.length;Z++){let q=[],{func:X,funcName:V,argumentsMetadata:W}=w[Z];for(let[N,U]of Object.entries(W))switch(U.type){case xT:q[U.index]=!U.validationSchema?L:await this.argumentsResolution(L,U.validationSchema,U.index,V);break;case JT:q[U.index]=!U.validationSchema?await L?.[U.parser||"json"]():await this.argumentsResolution(await L?.[U.parser||"json"](),U.validationSchema,U.index,V);break;case BT:q[U.index]=!U.key?f:f.get(U.key);break;case XT:q[U.index]=!U.validationSchema?c:await this.argumentsResolution(c?.toJSON(),U.validationSchema,U.index,V);break;case CT:q[U.index]=f.get(U.type);break;case fT:q[U.index]=!U.validationSchema?c?.get(U.key)||void 0:await this.argumentsResolution(c?.get(U.key)||void 0,U.validationSchema,U.index,V);break;case ZT:q[U.index]=!U.validationSchema?S?.[U.key]||void 0:await this.argumentsResolution(S?.[U.key]||void 0,U.validationSchema,U.index,V);break;case RT:q[U.index]=J;break;case ET:q[U.index]=R;break;default:q[U.index]=!U.validationSchema?!f.has(U.type)?void 0:f.get(U.type):await this.argumentsResolution(!(U.type in f)?void 0:f.get(U.type),U.validationSchema,U.index,V);break}await X(...q)}}return Object.freeze({context:f})}async webSocketFetcher(_,T){let{request:A,server:C}=_,{query:E,responseHeaders:f,route:{model:R}}=T,L=await R.func(...[C,A,E]);if(typeof L!=="boolean")return this.finalizeResponse(new Response(JSON.stringify({httpCode:500,message:"Can not detect webSocket upgrade result.",data:void 0}),{status:500,statusText:"Internal server error.",headers:f}));if(!L)return this.finalizeResponse(new Response(JSON.stringify({httpCode:500,message:"Can not upgrade.",data:void 0}),{status:500,statusText:"Internal server error.",headers:f}));return L}}var W4=n_(z_(),1);var Mc=async(_,T)=>{try{let A=new s_(_,T);return await A.preLaunch(),A}catch(A){throw T.debug&&console.error(A),A}};export{_f as jsonErrorInfer,Oc as httpServerErrors,Tf as httpMethodsStandardization,NC as httpMethods,uc as httpClientErrors,Ax as WebSocketServer,C_ as WebSocketRouterGroup,G_ as WebSocketRouter,d_ as WebSocketRoute,xx as WebSocketMessage,Rx as WebSocketEvent,Cx as WebSocketConnection,fx as WebSocketCloseReason,Ex as WebSocketCloseCode,_x as WebSocket,j_ as ValidationFailed,gf as RouteModel,Mf as ResponseHeaders,Nf as RequestHeaders,$f as RequestHeader,hf as RequestBody,Of as Request,uf as Query,jf as Put,yf as Post,df as Patch,Kf as Params,If as Param,pf as Options,af as Module,ef as Middleware,bC as Keys,tf as Interceptor,__ as Injector,rf as Injectable,of as Inject,Z_ as HttpServerError,Pf as HttpServer,D_ as HttpRouterGroup,V_ as HttpRouter,$C as HttpRoute,vT as HttpClientError,bf as Guard,lf as Get,sf as Delete,vf as Controller,mf as Context,kf as Container,Mc as BoolFactory,s_ as Application};
19
19
 
20
- //# debugId=050E262C2978014564756E2164756E21
20
+ //# debugId=D5F6ABC3D910225A64756E2164756E21