@blackglory/structures 0.6.10 → 0.9.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.
Files changed (48) hide show
  1. package/README.md +64 -4
  2. package/dist/es2015/index.min.mjs +2 -2
  3. package/dist/es2015/index.min.mjs.map +1 -1
  4. package/dist/es2015/index.mjs +174 -15
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +176 -14
  7. package/dist/es2015/index.umd.js.map +1 -1
  8. package/dist/es2015/index.umd.min.js +2 -2
  9. package/dist/es2015/index.umd.min.js.map +1 -1
  10. package/dist/es2018/index.min.mjs +2 -2
  11. package/dist/es2018/index.min.mjs.map +1 -1
  12. package/dist/es2018/index.mjs +174 -15
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +176 -14
  15. package/dist/es2018/index.umd.js.map +1 -1
  16. package/dist/es2018/index.umd.min.js +2 -2
  17. package/dist/es2018/index.umd.min.js.map +1 -1
  18. package/lib/es2015/index.d.ts +3 -0
  19. package/lib/es2015/index.js +3 -0
  20. package/lib/es2015/index.js.map +1 -1
  21. package/lib/es2015/sparse-map.d.ts +13 -0
  22. package/lib/es2015/sparse-map.js +66 -0
  23. package/lib/es2015/sparse-map.js.map +1 -0
  24. package/lib/es2015/sparse-set.d.ts +3 -3
  25. package/lib/es2015/sparse-set.js +14 -15
  26. package/lib/es2015/sparse-set.js.map +1 -1
  27. package/lib/es2015/typed-sparse-map.d.ts +20 -0
  28. package/lib/es2015/typed-sparse-map.js +67 -0
  29. package/lib/es2015/typed-sparse-map.js.map +1 -0
  30. package/lib/es2015/typed-sparse-set.d.ts +15 -0
  31. package/lib/es2015/typed-sparse-set.js +39 -0
  32. package/lib/es2015/typed-sparse-set.js.map +1 -0
  33. package/lib/es2018/index.d.ts +3 -0
  34. package/lib/es2018/index.js +3 -0
  35. package/lib/es2018/index.js.map +1 -1
  36. package/lib/es2018/sparse-map.d.ts +13 -0
  37. package/lib/es2018/sparse-map.js +66 -0
  38. package/lib/es2018/sparse-map.js.map +1 -0
  39. package/lib/es2018/sparse-set.d.ts +3 -3
  40. package/lib/es2018/sparse-set.js +14 -15
  41. package/lib/es2018/sparse-set.js.map +1 -1
  42. package/lib/es2018/typed-sparse-map.d.ts +20 -0
  43. package/lib/es2018/typed-sparse-map.js +67 -0
  44. package/lib/es2018/typed-sparse-map.js.map +1 -0
  45. package/lib/es2018/typed-sparse-set.d.ts +15 -0
  46. package/lib/es2018/typed-sparse-set.js +39 -0
  47. package/lib/es2018/typed-sparse-set.js.map +1 -0
  48. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- class t{constructor(t){this.value=t}get[Symbol.toStringTag](){return this.constructor.name}set(t){this.value=t}get(){return this.value}}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},r={};function i(t){return Array.isArray(t)}r.isntEmptyArray=r.isEmptyArray=r.isntArray=r.isArray=void 0,r.isArray=i,r.isntArray=function(t){return!i(t)},r.isEmptyArray=function(t){return 0===t.length},r.isntEmptyArray=function(t){return 0!==t.length};var o={},a={};function s(t){return null===t}a.isntNull=a.isNull=void 0,a.isNull=s,a.isntNull=function(t){return!s(t)};var c={};function u(t){return void 0===t}c.isntUndefined=c.isUndefined=void 0,c.isUndefined=u,c.isntUndefined=function(t){return!u(t)};var l={};function f(t){return"function"==typeof t}l.isntFunction=l.isFunction=void 0,l.isFunction=f,l.isntFunction=function(t){return!f(t)},o.isntAsyncIterable=o.isAsyncIterable=void 0;const d=a,y=c,h=l;function v(t){return(0,d.isntNull)(t)&&(0,y.isntUndefined)(t)&&(0,h.isFunction)(t[Symbol.asyncIterator])}o.isAsyncIterable=v,o.isntAsyncIterable=function(t){return!v(t)};var p={};function m(t){return"bigint"==typeof t}p.isntBigInt=p.isBigInt=void 0,p.isBigInt=m,p.isntBigInt=function(t){return!m(t)};var b={};function g(t){return"boolean"==typeof t}b.isntBoolean=b.isBoolean=void 0,b.isBoolean=g,b.isntBoolean=function(t){return!g(t)};var w={},A={};function I(t){return"string"==typeof t}A.isntString=A.isString=void 0,A.isString=I,A.isntString=function(t){return!I(t)},w.isntChar=w.isChar=void 0;const S=A;function _(t){return(0,S.isString)(t)&&1===t.length}w.isChar=_,w.isntChar=function(t){return!_(t)};var x={};function T(t){return t instanceof Date}x.isntDate=x.isDate=void 0,x.isDate=T,x.isntDate=function(t){return!T(t)};var O={};O.inEnum=void 0,O.inEnum=function(t,e){return Object.values(e).includes(t)};var E={};function j(t){return t instanceof Error}E.isntError=E.isError=void 0,E.isError=j,E.isntError=function(t){return!j(t)};var N={};function k(t){return!t}N.isntFalsy=N.isFalsy=void 0,N.isFalsy=k,N.isntFalsy=function(t){return!k(t)};var B={};B.isntIterable=B.isIterable=void 0;const P=a,q=c,C=l;function M(t){return(0,P.isntNull)(t)&&(0,q.isntUndefined)(t)&&(0,C.isFunction)(t[Symbol.iterator])}B.isIterable=M,B.isntIterable=function(t){return!M(t)};var z={},R={};function F(t){return"number"==typeof t}function U(t){return Number.isNaN(t)}R.isntNaN=R.isNaN=R.isNegativeInfinity=R.isPositiveInfinity=R.isFinite=R.isntNumber=R.isNumber=void 0,R.isNumber=F,R.isntNumber=function(t){return!F(t)},R.isFinite=function(t){return Number.isFinite(t)},R.isPositiveInfinity=function(t){return t===1/0},R.isNegativeInfinity=function(t){return t===-1/0},R.isNaN=U,R.isntNaN=function(t){return!U(t)};var D={},J="object"==typeof e&&e&&e.Object===Object&&e,L="object"==typeof self&&self&&self.Object===Object&&self,V=(J||L||Function("return this")()).Symbol,W=V,K=Object.prototype,Y=K.hasOwnProperty,$=K.toString,H=W?W.toStringTag:void 0;var X=function(t){var e=Y.call(t,H),n=t[H];try{t[H]=void 0;var r=!0}catch(t){}var i=$.call(t);return r&&(e?t[H]=n:delete t[H]),i},G=Object.prototype.toString;var Q=X,Z=function(t){return G.call(t)},tt=V?V.toStringTag:void 0;var et=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tt&&tt in Object(t)?Q(t):Z(t)};var nt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rt=et,it=nt,ot=function(t){return null!=t&&"object"==typeof t},at=Function.prototype,st=Object.prototype,ct=at.toString,ut=st.hasOwnProperty,lt=ct.call(Object);var ft=function(t){if(!ot(t)||"[object Object]"!=rt(t))return!1;var e=it(t);if(null===e)return!0;var n=ut.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==lt},dt=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};D.isntEmptyObject=D.isEmptyObject=D.isntPlainObject=D.isPlainObject=D.isntObject=D.isObject=void 0;const yt=dt(ft);function ht(t){return null!==t&&"object"==typeof t}function vt(t){return(0,yt.default)(t)}D.isObject=ht,D.isntObject=function(t){return!ht(t)},D.isPlainObject=vt,D.isntPlainObject=function(t){return!vt(t)},D.isEmptyObject=function(t){return 0===Object.keys(t).length},D.isntEmptyObject=function(t){return 0!==Object.keys(t).length},z.isntJsonable=z.isJsonable=z.isntJson=z.isJson=void 0;const pt=a,mt=b,bt=A,gt=R,wt=r,At=D;function It(t){return(0,pt.isNull)(t)||(0,mt.isBoolean)(t)||(0,bt.isString)(t)||(0,gt.isNumber)(t)||(0,wt.isArray)(t)&&t.every(It)||(0,At.isPlainObject)(t)&&Object.values(t).every(It)}z.isJson=It,z.isntJson=function(t){return!It(t)},z.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},z.isntJsonable=function t(e){return!t()};var St={};St.isPromiseLike=St.isntPromiseLike=St.isntPromise=St.isPromise=void 0;const _t=D,xt=l;function Tt(t){return t instanceof Promise}function Ot(t){return(0,_t.isObject)(t)&&(0,xt.isFunction)(t.then)}St.isPromise=Tt,St.isntPromise=function(t){return!Tt(t)},St.isntPromiseLike=function(t){return!Ot(t)},St.isPromiseLike=Ot;var Et={};Et.isAbsoluteURL=void 0,Et.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var jt,Nt,kt,Bt={};function Pt(t){return t instanceof RegExp}function qt([t,e]){return n.isNull(e)?[t]:[t,...qt(e)]}function Ct([t,...e]){return[t,e.length?Ct(e):null]}Bt.isntRegExp=Bt.isRegExp=void 0,Bt.isRegExp=Pt,Bt.isntRegExp=function(t){return!Pt(t)},jt=n,Nt=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),(kt=e&&e.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||Nt(e,t,n)})(r,jt),kt(o,jt),kt(p,jt),kt(b,jt),kt(w,jt),kt(x,jt),kt(O,jt),kt(E,jt),kt(N,jt),kt(l,jt),kt(B,jt),kt(z,jt),kt(a,jt),kt(R,jt),kt(D,jt),kt(St,jt),kt(A,jt),kt(c,jt),kt(Et,jt),kt(Bt,jt);class Mt{constructor(){this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}on(t,e){this.map.has(t)||this.map.set(t,new Set);return this.map.get(t).add(n),()=>{if(!this.map.has(t))return;const e=this.map.get(t);e.delete(n),0===e.size&&this.map.delete(t)};function n(...t){e(...t)}}once(t,e){const n=this.on(t,((...t)=>{e(...t),n()}));return n}emit(t,...e){this.map.has(t)&&this.map.get(t).forEach((t=>t(...e)))}}class zt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.set(this.hash(t),e),this}has(t){return this.map.has(this.hash(t))}get(t){return this.map.get(this.hash(t))}delete(t){return this.map.delete(this.hash(t))}clear(){this.map.clear()}}class Rt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}[Symbol.iterator](){return this.map.values()}add(t){return this.map.set(this.hash(t),t),this}delete(t){return this.map.delete(this.hash(t))}has(t){return this.map.has(this.hash(t))}clear(){this.map.clear()}values(){return this.map.values()}}class Ft{constructor(){this.items=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.items.length}empty(){this.items.length=0}enqueue(...t){this.items.push(...t)}dequeue(){return this.items.shift()}remove(t){let e;for(;(e=this.items.indexOf(t))>=0;)this.items.splice(e,1)}}var Ut={},Dt={},Jt={},Lt={},Vt={},Wt={},Kt={};Kt.go=void 0,Kt.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(Kt,t)}(Wt);var Yt={},$t={},Ht={},Xt={},Gt={},Qt={},Zt={CustomError:void 0};class te extends Error{get name(){return this.constructor.name}}Zt.CustomError=te;var ee={ExpectedError:void 0};const ne=Zt;class re extends ne.CustomError{}ee.ExpectedError=re;var ie={AssertionError:void 0};const oe=Zt;class ae extends oe.CustomError{}ie.AssertionError=ae;var se={};se.normalize=void 0,se.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ce={refute:void 0};const ue=ee;ce.refute=function(t,e){if(t)throw new ue.ExpectedError(e)};var le={assert:void 0};const fe=ie;le.assert=function(t,e){if(!t)throw new fe.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Zt,t),r(ee,t),r(ie,t),r(se,t),r(ce,t),r(le,t)}(Qt),Gt.chunkAsync=void 0;const de=Wt,ye=Qt;Gt.chunkAsync=function(t,e){return(0,ye.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ye.assert)(e>0,"The parameter size must be greater than 0"),(0,de.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var he={},ve={},pe={};function me(t){return Array.isArray(t)}pe.isntEmptyArray=pe.isEmptyArray=pe.isntArray=pe.isArray=void 0,pe.isArray=me,pe.isntArray=function(t){return!me(t)},pe.isEmptyArray=function(t){return 0===t.length},pe.isntEmptyArray=function(t){return 0!==t.length};var be={},ge={};function we(t){return null===t}ge.isntNull=ge.isNull=void 0,ge.isNull=we,ge.isntNull=function(t){return!we(t)};var Ae={};function Ie(t){return void 0===t}Ae.isntUndefined=Ae.isUndefined=void 0,Ae.isUndefined=Ie,Ae.isntUndefined=function(t){return!Ie(t)},be.isntAsyncIterable=be.isAsyncIterable=void 0;const Se=ge,_e=Ae;function xe(t){return(0,Se.isntNull)(t)&&(0,_e.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}be.isAsyncIterable=xe,be.isntAsyncIterable=function(t){return!xe(t)};var Te={};function Oe(t){return"bigint"==typeof t}Te.isntBigInt=Te.isBigInt=void 0,Te.isBigInt=Oe,Te.isntBigInt=function(t){return!Oe(t)};var Ee={};function je(t){return"boolean"==typeof t}Ee.isntBoolean=Ee.isBoolean=void 0,Ee.isBoolean=je,Ee.isntBoolean=function(t){return!je(t)};var Ne={},ke={};function Be(t){return"string"==typeof t}ke.isntString=ke.isString=void 0,ke.isString=Be,ke.isntString=function(t){return!Be(t)},Ne.isntChar=Ne.isChar=void 0;const Pe=ke;function qe(t){return(0,Pe.isString)(t)&&1===t.length}Ne.isChar=qe,Ne.isntChar=function(t){return!qe(t)};var Ce={};function Me(t){return t instanceof Date}Ce.isntDate=Ce.isDate=void 0,Ce.isDate=Me,Ce.isntDate=function(t){return!Me(t)};var ze={};ze.inEnum=void 0,ze.inEnum=function(t,e){return Object.values(e).includes(t)};var Re={};function Fe(t){return t instanceof Error}Re.isntError=Re.isError=void 0,Re.isError=Fe,Re.isntError=function(t){return!Fe(t)};var Ue={};function De(t){return!t}Ue.isntFalsy=Ue.isFalsy=void 0,Ue.isFalsy=De,Ue.isntFalsy=function(t){return!De(t)};var Je={};function Le(t){return"function"==typeof t}Je.isntFunction=Je.isFunction=void 0,Je.isFunction=Le,Je.isntFunction=function(t){return!Le(t)};var Ve={};Ve.isntIterable=Ve.isIterable=void 0;const We=ge,Ke=Ae;function Ye(t){return(0,We.isntNull)(t)&&(0,Ke.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Ve.isIterable=Ye,Ve.isntIterable=function(t){return!Ye(t)};var $e={},He={};var Xe=Function.prototype,Ge=Object.prototype,Qe=Xe.toString,Ze=Ge.hasOwnProperty,tn=Qe.call(Object),en=Ge.toString,nn=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rn=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=en.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=nn(t);if(null===e)return!0;var n=Ze.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Qe.call(n)==tn},on=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};He.isntEmptyObject=He.isEmptyObject=He.isntPlainObject=He.isPlainObject=He.isntObject=He.isObject=void 0;const an=on(rn);function sn(t){return null!==t&&"object"==typeof t}function cn(t){return(0,an.default)(t)}He.isObject=sn,He.isntObject=function(t){return!sn(t)},He.isPlainObject=cn,He.isntPlainObject=function(t){return!cn(t)},He.isEmptyObject=function(t){return 0===Object.keys(t).length},He.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var un={};function ln(t){return"number"==typeof t}un.isntNumber=un.isNumber=void 0,un.isNumber=ln,un.isntNumber=function(t){return!ln(t)},$e.isntJsonRpcError=$e.isJsonRpcError=$e.isntJsonRpcSuccess=$e.isJsonRpcSuccess=$e.isntJsonRpcRequest=$e.isJsonRpcRequest=$e.isntJsonRpcNotification=$e.isJsonRpcNotification=void 0;const fn=pe,dn=He,yn=ke,hn=un,vn=Ae;function pn(t){return(0,yn.isString)(t)||(0,hn.isNumber)(t)}function mn(t){return(0,fn.isArray)(t)||(0,dn.isObject)(t)}function bn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.method)&&(0,vn.isUndefined)(t.id)&&mn(t.params)}function gn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.method)&&pn(t.id)&&mn(t.params)}function wn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.id)&&"result"in t}function An(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&pn(t.id)&&function(t){return(0,dn.isPlainObject)(t)&&(0,hn.isNumber)(t.code)&&(0,yn.isString)(t.message)&&((0,vn.isUndefined)(t.data)||(0,dn.isObject)(t.data))}(t.error)}$e.isJsonRpcNotification=bn,$e.isntJsonRpcNotification=function(t){return!bn(t)},$e.isJsonRpcRequest=gn,$e.isntJsonRpcRequest=function(t){return!gn(t)},$e.isJsonRpcSuccess=wn,$e.isntJsonRpcSuccess=function(t){return!wn(t)},$e.isJsonRpcError=An,$e.isntJsonRpcError=function(t){return!An(t)};var In={};In.isntJson=In.isJson=void 0,In.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},In.isntJson=function t(e){return!t()};var Sn={};Sn.isAbsoluteURL=void 0,Sn.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(pe,t),r(be,t),r(Te,t),r(Ee,t),r(Ne,t),r(Ce,t),r(ze,t),r(Re,t),r(Ue,t),r(Je,t),r(Ve,t),r($e,t),r(In,t),r(ge,t),r(un,t),r(He,t),r(ke,t),r(Ae,t),r(Sn,t)}(ve),he.chunkByAsync=void 0;const _n=ve;he.chunkByAsync=function(t,e){return(0,_n.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var xn={};xn.chunkBy=void 0,xn.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Tn={chunk:void 0};const On=Wt,En=Qt;Tn.chunk=function(t,e){return(0,En.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,En.assert)(e>0,"The parameter size must be greater than 0"),(0,On.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var jn={concatAsync:void 0};const Nn=ve,kn=Wt;jn.concatAsync=function(t,...e){return(0,kn.go)((async function*(){for(const n of[t,...e])if((0,Nn.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Bn={concat:void 0};const Pn=Wt;Bn.concat=function(t,...e){return(0,Pn.go)((function*(){for(const n of[t,...e])yield*n}))};var qn={},Cn={};Cn.copyIterable=Cn.copyAsyncIterable=void 0,Cn.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Cn.copyIterable=function*(t){for(const e of t)yield e},qn.dropAsync=void 0;const Mn=Wt,zn=Cn,Rn=Qt;qn.dropAsync=function(t,e){return(0,Rn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,zn.copyAsyncIterable)(t):(0,Mn.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Fn={dropRightAsync:void 0};const Un=Wt,Dn=Cn,Jn=Qt;Fn.dropRightAsync=function(t,e){return(0,Jn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Dn.copyAsyncIterable)(t):(0,Un.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Ln={dropRight:void 0};const Vn=Wt,Wn=Cn,Kn=Qt;Ln.dropRight=function(t,e){return(0,Kn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Wn.copyIterable)(t):(0,Vn.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Yn={dropUntilAsync:void 0};const $n=ve;Yn.dropUntilAsync=function(t,e){return(0,$n.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Hn={};Hn.dropUntil=void 0,Hn.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var Xn={drop:void 0};const Gn=Wt,Qn=Cn,Zn=Qt;Xn.drop=function(t,e){return(0,Zn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Zn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Qn.copyIterable)(t):(0,Gn.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var tr={filterAsync:void 0};const er=ve;tr.filterAsync=function(t,e){return(0,er.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var nr={};nr.filter=void 0,nr.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var rr={},ir={},or={flattenByAsync:void 0};const ar=ve;function sr(t){return(0,ar.isIterable)(t)&&(0,ar.isntChar)(t)}or.flattenByAsync=function(t,e){return(0,ar.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)sr(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)sr(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ir.flattenDeepAsync=void 0;const cr=or,ur=Qt;ir.flattenDeepAsync=function(t,e=1/0){return(0,ur.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ur.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,cr.flattenByAsync)(t,((t,n)=>n<=e))},rr.flattenAsync=void 0;const lr=ir;rr.flattenAsync=function(t){return(0,lr.flattenDeepAsync)(t,1)};var fr={flattenBy:void 0};const dr=ve;fr.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,dr.isIterable)(i=o)&&(0,dr.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var yr={flattenDeep:void 0};const hr=fr,vr=Qt;yr.flattenDeep=function(t,e=1/0){return(0,vr.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,vr.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,hr.flattenBy)(t,((t,n)=>n<=e))};var pr={flatten:void 0};const mr=yr;pr.flatten=function(t){return(0,mr.flattenDeep)(t,1)};var br={mapAsync:void 0};const gr=ve;br.mapAsync=function(t,e){return(0,gr.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var wr={};wr.map=void 0,wr.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ar={repeatAsync:void 0};const Ir=Wt,Sr=Qt;Ar.repeatAsync=function(t,e){return(0,Sr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Sr.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Ir.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var _r={repeat:void 0};const xr=Wt,Tr=Qt;_r.repeat=function(t,e){return(0,Tr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Tr.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,xr.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Or={sliceAsync:void 0};const Er=Wt,jr=Qt;Or.sliceAsync=function(t,e,n=1/0){return(0,jr.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,jr.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,jr.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,jr.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Er.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Nr={slice:void 0};const kr=Wt,Br=Qt;Nr.slice=function(t,e,n=1/0){return(0,Br.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Br.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Br.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Br.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,kr.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Pr={};Pr.splitAsync=void 0,Pr.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var qr={splitByAsync:void 0};const Cr=ve;qr.splitByAsync=function(t,e){return(0,Cr.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Mr={};Mr.splitBy=void 0,Mr.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var zr={};zr.split=void 0,zr.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Rr={takeAsync:void 0};const Fr=Wt,Ur=Qt;Rr.takeAsync=function(t,e){return(0,Ur.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ur.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Fr.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Dr={takeRightAsync:void 0};const Jr=Wt,Lr=Qt;Dr.takeRightAsync=function(t,e){return(0,Lr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Lr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Jr.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Vr={takeRight:void 0};const Wr=Wt,Kr=Qt;Vr.takeRight=function(t,e){return(0,Kr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Wr.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Yr={takeUntilAsync:void 0};const $r=ve;Yr.takeUntilAsync=function(t,e){return(0,$r.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Hr={};Hr.takeUntil=void 0,Hr.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Xr={take:void 0};const Gr=Wt,Qr=Qt;Xr.take=function(t,e){return(0,Qr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Qr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Gr.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Zr={tapAsync:void 0};const ti=ve;Zr.tapAsync=function(t,e){return(0,ti.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var ei={};ei.tap=void 0,ei.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ni={};ni.toAsyncIterable=void 0,ni.toAsyncIterable=async function*(t){for(const e of t)yield e};var ri={};ri.transformAsync=void 0,ri.transformAsync=async function*(t,e){yield*e(t)};var ii={};ii.transform=void 0,ii.transform=function*(t,e){yield*e(t)};var oi={};oi.uniqAsync=void 0,oi.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ai={uniqByAsync:void 0};const si=ve;ai.uniqByAsync=function(t,e){return(0,si.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var ci={};ci.uniqBy=void 0,ci.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var ui={};ui.uniq=void 0,ui.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var li={zipAsync:void 0};const fi=ve;var di;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(di||(di={})),li.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,fi.isAsyncIterable)(t)?[di.Async,t[Symbol.asyncIterator]()]:[di.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===di.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===di.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var yi={};yi.zip=void 0,yi.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Gt,t),r(he,t),r(xn,t),r(Tn,t),r(jn,t),r(Bn,t),r(qn,t),r(Fn,t),r(Ln,t),r(Yn,t),r(Hn,t),r(Xn,t),r(tr,t),r(nr,t),r(rr,t),r(or,t),r(fr,t),r(ir,t),r(yr,t),r(pr,t),r(br,t),r(wr,t),r(Ar,t),r(_r,t),r(Or,t),r(Nr,t),r(Pr,t),r(qr,t),r(Mr,t),r(zr,t),r(Rr,t),r(Dr,t),r(Vr,t),r(Yr,t),r(Hr,t),r(Xr,t),r(Zr,t),r(ei,t),r(ni,t),r(ri,t),r(ii,t),r(oi,t),r(ai,t),r(ci,t),r(ui,t),r(li,t),r(yi,t)}(Xt);var hi={},vi={};vi.consume=void 0,vi.consume=function(t,e){return e(t)};var pi={eachAsync:void 0};const mi=ve;pi.eachAsync=function(t,e){return(0,mi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var bi={};bi.each=void 0,bi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gi={everyAsync:void 0};const wi=ve;gi.everyAsync=function(t,e){return(0,wi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Ai={};Ai.every=void 0,Ai.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Ii={findAsync:void 0};const Si=ve;Ii.findAsync=function(t,e){return(0,Si.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var _i={};_i.find=void 0,_i.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var xi={};xi.firstAsync=void 0,xi.firstAsync=async function(t){for await(const e of t)return e};var Ti={};Ti.first=void 0,Ti.first=function(t){for(const e of t)return e};var Oi={};Oi.includesAsync=void 0,Oi.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ei={};Ei.includes=void 0,Ei.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var ji={};ji.matchAsync=void 0,ji.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Ni={};Ni.match=void 0,Ni.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var ki={reduceAsync:void 0};const Bi=ve;ki.reduceAsync=function(t,e,n){return(0,Bi.isUndefined)(n)?function(t,e){return(0,Bi.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Bi.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Pi={reduce:void 0};const qi=ve;Pi.reduce=function(t,e,n){return(0,qi.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ci={someAsync:void 0};const Mi=ve;Ci.someAsync=function(t,e){return(0,Mi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var zi={};zi.some=void 0,zi.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ri={};Ri.lastAsync=void 0,Ri.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Fi={};Fi.last=void 0,Fi.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Ui={toArrayAsync:void 0};const Di=vi;Ui.toArrayAsync=function(t){return(0,Di.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Ji={toArray:void 0};const Li=vi;Ji.toArray=function(t){return(0,Li.consume)(t,(t=>Array.from(t)))};var Vi={toSetAsync:void 0};const Wi=vi;Vi.toSetAsync=function(t){return(0,Wi.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ki={toSet:void 0};const Yi=vi;Ki.toSet=function(t){return(0,Yi.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(vi,t),r(pi,t),r(bi,t),r(gi,t),r(Ai,t),r(Ii,t),r(_i,t),r(xi,t),r(Ti,t),r(Oi,t),r(Ei,t),r(ji,t),r(Ni,t),r(ki,t),r(Pi,t),r(Ci,t),r(zi,t),r(Ri,t),r(Fi,t),r(Ui,t),r(Ji,t),r(Vi,t),r(Ki,t)}(hi),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Xt,t),r(hi,t)}(Ht);var $i={},Hi={};Hi.traverseErrorPrototypeChain=void 0,Hi.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},$i.getErrorNames=void 0;const Xi=ve,Gi=Hi;$i.getErrorNames=function*(t){var e;if((0,Xi.isError)(t))for(const n of(0,Gi.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Qi={isSerializableError:void 0};const Zi=ve;Qi.isSerializableError=function(t){return(0,Zi.isObject)(t)&&(0,Zi.isString)(t.name)&&(0,Zi.isString)(t.message)&&((0,Zi.isString)(t.stack)||(0,Zi.isNull)(t.stack))&&(0,Zi.isArray)(t.ancestors)&&t.ancestors.every(Zi.isString)},$t.CustomError=void 0;const to=Ht,eo=$i,no=ve,ro=Qi;class io extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,to.first)((0,eo.getErrorNames)(this)))&&void 0!==t?t:io.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,no.isError)(t)||(0,ro.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,eo.getErrorNames)(this.prototype)].reverse(),r=(0,to.toArray)((0,eo.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}$t.CustomError=io;var oo={AssertionError:void 0};const ao=$t;class so extends ao.CustomError{}oo.AssertionError=so;var co={normalize:void 0};const uo=$i,lo=Ht;co.normalize=function(t){var e;const[n,...r]=(0,lo.toArray)((0,uo.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var fo={},yo={},ho={};ho.pass=void 0,ho.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(ho,t)}(yo),fo.hydrate=void 0;const vo=yo;function po(t,e){const n=function(){(0,vo.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}fo.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=po(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var mo={assert:void 0};const bo=oo;mo.assert=function(t,e){if(!t)throw new bo.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r($t,t),r(oo,t),r(Qi,t),r(co,t),r(fo,t),r(mo,t),r($i,t),r(Hi,t)}(Yt),Vt.chunkAsync=void 0;const go=Wt,wo=Yt;Vt.chunkAsync=function(t,e){return(0,wo.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,wo.assert)(e>0,"The parameter size must be greater than 0"),(0,go.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ao={chunkByAsync:void 0};const Io=ve;Ao.chunkByAsync=function(t,e){return(0,Io.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var So={};So.chunkBy=void 0,So.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var _o={chunk:void 0};const xo=Wt,To=Yt;_o.chunk=function(t,e){return(0,To.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,To.assert)(e>0,"The parameter size must be greater than 0"),(0,xo.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Oo={concatAsync:void 0};const Eo=ve,jo=Wt;Oo.concatAsync=function(t,...e){return(0,jo.go)((async function*(){for(const n of[t,...e])if((0,Eo.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var No={concat:void 0};const ko=Wt;No.concat=function(t,...e){return(0,ko.go)((function*(){for(const n of[t,...e])yield*n}))};var Bo={},Po={};Po.copyIterable=Po.copyAsyncIterable=void 0,Po.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Po.copyIterable=function*(t){for(const e of t)yield e},Bo.dropAsync=void 0;const qo=Wt,Co=Po,Mo=Yt;Bo.dropAsync=function(t,e){return(0,Mo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Co.copyAsyncIterable)(t):(0,qo.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var zo={dropRightAsync:void 0};const Ro=Wt,Fo=Po,Uo=Yt;zo.dropRightAsync=function(t,e){return(0,Uo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Uo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Fo.copyAsyncIterable)(t):(0,Ro.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Do={dropRight:void 0};const Jo=Wt,Lo=Po,Vo=Yt;Do.dropRight=function(t,e){return(0,Vo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Lo.copyIterable)(t):(0,Jo.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Wo={dropUntilAsync:void 0};const Ko=ve;Wo.dropUntilAsync=function(t,e){return(0,Ko.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Yo={};Yo.dropUntil=void 0,Yo.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var $o={drop:void 0};const Ho=Wt,Xo=Po,Go=Yt;$o.drop=function(t,e){return(0,Go.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Go.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Xo.copyIterable)(t):(0,Ho.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Qo={filterAsync:void 0};const Zo=ve;Qo.filterAsync=function(t,e){return(0,Zo.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var ta={};ta.filter=void 0,ta.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var ea={},na={},ra={flattenByAsync:void 0};const ia=ve;function oa(t){return(0,ia.isIterable)(t)&&(0,ia.isntChar)(t)}ra.flattenByAsync=function(t,e){return(0,ia.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)oa(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)oa(i)&&await e(i,r)?yield*n(i,r+1):yield i}},na.flattenDeepAsync=void 0;const aa=ra,sa=Yt;na.flattenDeepAsync=function(t,e=1/0){return(0,sa.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,sa.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,aa.flattenByAsync)(t,((t,n)=>n<=e))},ea.flattenAsync=void 0;const ca=na;ea.flattenAsync=function(t){return(0,ca.flattenDeepAsync)(t,1)};var ua={flattenBy:void 0};const la=ve;ua.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,la.isIterable)(i=o)&&(0,la.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var fa={flattenDeep:void 0};const da=ua,ya=Yt;fa.flattenDeep=function(t,e=1/0){return(0,ya.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ya.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,da.flattenBy)(t,((t,n)=>n<=e))};var ha={flatten:void 0};const va=fa;ha.flatten=function(t){return(0,va.flattenDeep)(t,1)};var pa={mapAsync:void 0};const ma=ve;pa.mapAsync=function(t,e){return(0,ma.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var ba={};ba.map=void 0,ba.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var ga={repeatAsync:void 0};const wa=Wt,Aa=Yt;ga.repeatAsync=function(t,e){return(0,Aa.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Aa.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,wa.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ia={repeat:void 0};const Sa=Wt,_a=Yt;Ia.repeat=function(t,e){return(0,_a.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,_a.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Sa.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var xa={sliceAsync:void 0};const Ta=Wt,Oa=Yt;xa.sliceAsync=function(t,e,n=1/0){return(0,Oa.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Oa.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Oa.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Oa.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Ta.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Ea={slice:void 0};const ja=Wt,Na=Yt;Ea.slice=function(t,e,n=1/0){return(0,Na.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Na.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Na.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Na.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ja.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ka={};ka.splitAsync=void 0,ka.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ba={splitByAsync:void 0};const Pa=ve;Ba.splitByAsync=function(t,e){return(0,Pa.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var qa={};qa.splitBy=void 0,qa.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ca={};Ca.split=void 0,Ca.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ma={takeAsync:void 0};const za=Wt,Ra=Yt;Ma.takeAsync=function(t,e){return(0,Ra.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ra.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,za.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Fa={takeRightAsync:void 0};const Ua=Wt,Da=Yt;Fa.takeRightAsync=function(t,e){return(0,Da.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Da.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ua.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ja={takeRight:void 0};const La=Wt,Va=Yt;Ja.takeRight=function(t,e){return(0,Va.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Va.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,La.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Wa={takeUntilAsync:void 0};const Ka=ve;Wa.takeUntilAsync=function(t,e){return(0,Ka.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Ya={};Ya.takeUntil=void 0,Ya.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $a={take:void 0};const Ha=Wt,Xa=Yt;$a.take=function(t,e){return(0,Xa.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xa.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ha.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Ga={tapAsync:void 0};const Qa=ve;Ga.tapAsync=function(t,e){return(0,Qa.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Za={};Za.tap=void 0,Za.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ts={};ts.toAsyncIterable=void 0,ts.toAsyncIterable=async function*(t){for(const e of t)yield e};var es={};es.transformAsync=void 0,es.transformAsync=async function*(t,e){yield*e(t)};var ns={};ns.transform=void 0,ns.transform=function*(t,e){yield*e(t)};var rs={};rs.uniqAsync=void 0,rs.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var is={uniqByAsync:void 0};const os=ve;is.uniqByAsync=function(t,e){return(0,os.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var as={};as.uniqBy=void 0,as.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var ss={};ss.uniq=void 0,ss.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var cs={zipAsync:void 0};const us=ve;var ls;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(ls||(ls={})),cs.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,us.isAsyncIterable)(t)?[ls.Async,t[Symbol.asyncIterator]()]:[ls.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===ls.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===ls.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var fs={};fs.zip=void 0,fs.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Vt,t),r(Ao,t),r(So,t),r(_o,t),r(Oo,t),r(No,t),r(Bo,t),r(zo,t),r(Do,t),r(Wo,t),r(Yo,t),r($o,t),r(Qo,t),r(ta,t),r(ea,t),r(ra,t),r(ua,t),r(na,t),r(fa,t),r(ha,t),r(pa,t),r(ba,t),r(ga,t),r(Ia,t),r(xa,t),r(Ea,t),r(ka,t),r(Ba,t),r(qa,t),r(Ca,t),r(Ma,t),r(Fa,t),r(Ja,t),r(Wa,t),r(Ya,t),r($a,t),r(Ga,t),r(Za,t),r(ts,t),r(es,t),r(ns,t),r(rs,t),r(is,t),r(as,t),r(ss,t),r(cs,t),r(fs,t)}(Lt);var ds={},ys={};ys.consume=void 0,ys.consume=function(t,e){return e(t)};var hs={eachAsync:void 0};const vs=ve;hs.eachAsync=function(t,e){return(0,vs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var ps={};ps.each=void 0,ps.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ms={everyAsync:void 0};const bs=ve;ms.everyAsync=function(t,e){return(0,bs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var gs={};gs.every=void 0,gs.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var ws={findAsync:void 0};const As=ve;ws.findAsync=function(t,e){return(0,As.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Is={};Is.find=void 0,Is.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Ss={};Ss.firstAsync=void 0,Ss.firstAsync=async function(t){for await(const e of t)return e};var _s={};_s.first=void 0,_s.first=function(t){for(const e of t)return e};var xs={};xs.includesAsync=void 0,xs.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ts={};Ts.includes=void 0,Ts.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Os={};Os.matchAsync=void 0,Os.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Es={};Es.match=void 0,Es.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var js={reduceAsync:void 0};const Ns=ve;js.reduceAsync=function(t,e,n){return(0,Ns.isUndefined)(n)?function(t,e){return(0,Ns.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Ns.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var ks={reduce:void 0};const Bs=ve;ks.reduce=function(t,e,n){return(0,Bs.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ps={someAsync:void 0};const qs=ve;Ps.someAsync=function(t,e){return(0,qs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Cs={};Cs.some=void 0,Cs.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ms={};Ms.lastAsync=void 0,Ms.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var zs={};zs.last=void 0,zs.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Rs={toArrayAsync:void 0};const Fs=ys;Rs.toArrayAsync=function(t){return(0,Fs.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Us={toArray:void 0};const Ds=ys;Us.toArray=function(t){return(0,Ds.consume)(t,(t=>Array.from(t)))};var Js={toSetAsync:void 0};const Ls=ys;Js.toSetAsync=function(t){return(0,Ls.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Vs={toSet:void 0};const Ws=ys;Vs.toSet=function(t){return(0,Ws.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(ys,t),r(hs,t),r(ps,t),r(ms,t),r(gs,t),r(ws,t),r(Is,t),r(Ss,t),r(_s,t),r(xs,t),r(Ts,t),r(Os,t),r(Es,t),r(js,t),r(ks,t),r(Ps,t),r(Cs,t),r(Ms,t),r(zs,t),r(Rs,t),r(Us,t),r(Js,t),r(Vs,t)}(ds),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Lt,t),r(ds,t)}(Jt);var Ks={},Ys={};Ys.traverseErrorPrototypeChain=void 0,Ys.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Ks.getErrorNames=void 0;const $s=ve,Hs=Ys;Ks.getErrorNames=function*(t){var e;if((0,$s.isError)(t))for(const n of(0,Hs.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Xs={isSerializableError:void 0};const Gs=ve;Xs.isSerializableError=function(t){return(0,Gs.isObject)(t)&&(0,Gs.isString)(t.name)&&(0,Gs.isString)(t.message)&&((0,Gs.isString)(t.stack)||(0,Gs.isNull)(t.stack))&&(0,Gs.isArray)(t.ancestors)&&t.ancestors.every(Gs.isString)},Dt.CustomError=void 0;const Qs=Jt,Zs=Ks,tc=ve,ec=Xs;class nc extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Qs.first)((0,Zs.getErrorNames)(this)))&&void 0!==t?t:nc.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,tc.isError)(t)||(0,ec.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Zs.getErrorNames)(this.prototype)].reverse(),r=(0,Qs.toArray)((0,Zs.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Dt.CustomError=nc;var rc={AssertionError:void 0};const ic=Dt;class oc extends ic.CustomError{}rc.AssertionError=oc;var ac={normalize:void 0};const sc=Ks,cc=Jt;ac.normalize=function(t){var e;const[n,...r]=(0,cc.toArray)((0,sc.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var uc={},lc={},fc={};fc.pass=void 0,fc.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(fc,t)}(lc),uc.hydrate=void 0;const dc=lc;function yc(t,e){const n=function(){(0,dc.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}uc.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=yc(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var hc={assert:void 0};const vc=rc;hc.assert=function(t,e){if(!t)throw new vc.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Dt,t),r(rc,t),r(Xs,t),r(ac,t),r(uc,t),r(hc,t),r(Ks,t),r(Ys,t)}(Ut);var pc={},mc={},bc={},gc={},wc={};wc.go=void 0,wc.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(wc,t)}(gc),bc.chunkAsync=void 0;const Ac=gc,Ic=Ut;bc.chunkAsync=function(t,e){return(0,Ic.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Ic.assert)(e>0,"The parameter size must be greater than 0"),(0,Ac.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Sc={},_c={},xc={};function Tc(t){return Array.isArray(t)}xc.isntEmptyArray=xc.isEmptyArray=xc.isntArray=xc.isArray=void 0,xc.isArray=Tc,xc.isntArray=function(t){return!Tc(t)},xc.isEmptyArray=function(t){return 0===t.length},xc.isntEmptyArray=function(t){return 0!==t.length};var Oc={},Ec={};function jc(t){return null===t}Ec.isntNull=Ec.isNull=void 0,Ec.isNull=jc,Ec.isntNull=function(t){return!jc(t)};var Nc={};function kc(t){return void 0===t}Nc.isntUndefined=Nc.isUndefined=void 0,Nc.isUndefined=kc,Nc.isntUndefined=function(t){return!kc(t)};var Bc={};function Pc(t){return"function"==typeof t}Bc.isntFunction=Bc.isFunction=void 0,Bc.isFunction=Pc,Bc.isntFunction=function(t){return!Pc(t)},Oc.isntAsyncIterable=Oc.isAsyncIterable=void 0;const qc=Ec,Cc=Nc,Mc=Bc;function zc(t){return(0,qc.isntNull)(t)&&(0,Cc.isntUndefined)(t)&&(0,Mc.isFunction)(t[Symbol.asyncIterator])}Oc.isAsyncIterable=zc,Oc.isntAsyncIterable=function(t){return!zc(t)};var Rc={};function Fc(t){return"bigint"==typeof t}Rc.isntBigInt=Rc.isBigInt=void 0,Rc.isBigInt=Fc,Rc.isntBigInt=function(t){return!Fc(t)};var Uc={};function Dc(t){return"boolean"==typeof t}Uc.isntBoolean=Uc.isBoolean=void 0,Uc.isBoolean=Dc,Uc.isntBoolean=function(t){return!Dc(t)};var Jc={},Lc={};function Vc(t){return"string"==typeof t}Lc.isntString=Lc.isString=void 0,Lc.isString=Vc,Lc.isntString=function(t){return!Vc(t)},Jc.isntChar=Jc.isChar=void 0;const Wc=Lc;function Kc(t){return(0,Wc.isString)(t)&&1===t.length}Jc.isChar=Kc,Jc.isntChar=function(t){return!Kc(t)};var Yc={};function $c(t){return t instanceof Date}Yc.isntDate=Yc.isDate=void 0,Yc.isDate=$c,Yc.isntDate=function(t){return!$c(t)};var Hc={};Hc.inEnum=void 0,Hc.inEnum=function(t,e){return Object.values(e).includes(t)};var Xc={};function Gc(t){return t instanceof Error}Xc.isntError=Xc.isError=void 0,Xc.isError=Gc,Xc.isntError=function(t){return!Gc(t)};var Qc={};function Zc(t){return!t}Qc.isntFalsy=Qc.isFalsy=void 0,Qc.isFalsy=Zc,Qc.isntFalsy=function(t){return!Zc(t)};var tu={};tu.isntIterable=tu.isIterable=void 0;const eu=Ec,nu=Nc,ru=Bc;function iu(t){return(0,eu.isntNull)(t)&&(0,nu.isntUndefined)(t)&&(0,ru.isFunction)(t[Symbol.iterator])}tu.isIterable=iu,tu.isntIterable=function(t){return!iu(t)};var ou={},au={};function su(t){return"number"==typeof t}function cu(t){return Number.isNaN(t)}au.isntNaN=au.isNaN=au.isNegativeInfinity=au.isPositiveInfinity=au.isFinite=au.isntNumber=au.isNumber=void 0,au.isNumber=su,au.isntNumber=function(t){return!su(t)},au.isFinite=function(t){return Number.isFinite(t)},au.isPositiveInfinity=function(t){return t===1/0},au.isNegativeInfinity=function(t){return t===-1/0},au.isNaN=cu,au.isntNaN=function(t){return!cu(t)};var uu={},lu=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};uu.isntEmptyObject=uu.isEmptyObject=uu.isntPlainObject=uu.isPlainObject=uu.isntObject=uu.isObject=void 0;const fu=lu(ft);function du(t){return null!==t&&"object"==typeof t}function yu(t){return(0,fu.default)(t)}uu.isObject=du,uu.isntObject=function(t){return!du(t)},uu.isPlainObject=yu,uu.isntPlainObject=function(t){return!yu(t)},uu.isEmptyObject=function(t){return 0===Object.keys(t).length},uu.isntEmptyObject=function(t){return 0!==Object.keys(t).length},ou.isntJsonable=ou.isJsonable=ou.isntJson=ou.isJson=void 0;const hu=Ec,vu=Uc,pu=Lc,mu=au,bu=xc,gu=uu;function wu(t){return(0,hu.isNull)(t)||(0,vu.isBoolean)(t)||(0,pu.isString)(t)||(0,mu.isNumber)(t)||(0,bu.isArray)(t)&&t.every(wu)||(0,gu.isPlainObject)(t)&&Object.values(t).every(wu)}ou.isJson=wu,ou.isntJson=function(t){return!wu(t)},ou.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},ou.isntJsonable=function t(e){return!t()};var Au={};Au.isPromiseLike=Au.isntPromiseLike=Au.isntPromise=Au.isPromise=void 0;const Iu=uu,Su=Bc;function _u(t){return t instanceof Promise}function xu(t){return(0,Iu.isObject)(t)&&(0,Su.isFunction)(t.then)}Au.isPromise=_u,Au.isntPromise=function(t){return!_u(t)},Au.isntPromiseLike=function(t){return!xu(t)},Au.isPromiseLike=xu;var Tu={};Tu.isAbsoluteURL=void 0,Tu.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(xc,t),r(Oc,t),r(Rc,t),r(Uc,t),r(Jc,t),r(Yc,t),r(Hc,t),r(Xc,t),r(Qc,t),r(Bc,t),r(tu,t),r(ou,t),r(Ec,t),r(au,t),r(uu,t),r(Au,t),r(Lc,t),r(Nc,t),r(Tu,t)}(_c),Sc.chunkByAsync=void 0;const Ou=_c;Sc.chunkByAsync=function(t,e){return(0,Ou.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Eu={};Eu.chunkBy=void 0,Eu.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var ju={chunk:void 0};const Nu=gc,ku=Ut;ju.chunk=function(t,e){return(0,ku.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ku.assert)(e>0,"The parameter size must be greater than 0"),(0,Nu.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Bu={concatAsync:void 0};const Pu=_c,qu=gc;Bu.concatAsync=function(t,...e){return(0,qu.go)((async function*(){for(const n of[t,...e])if((0,Pu.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Cu={concat:void 0};const Mu=gc;Cu.concat=function(t,...e){return(0,Mu.go)((function*(){for(const n of[t,...e])yield*n}))};var zu={},Ru={};Ru.copyIterable=Ru.copyAsyncIterable=void 0,Ru.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Ru.copyIterable=function*(t){for(const e of t)yield e},zu.dropAsync=void 0;const Fu=gc,Uu=Ru,Du=Ut;zu.dropAsync=function(t,e){return(0,Du.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Du.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Uu.copyAsyncIterable)(t):(0,Fu.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Ju={dropRightAsync:void 0};const Lu=gc,Vu=Ru,Wu=Ut;Ju.dropRightAsync=function(t,e){return(0,Wu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Vu.copyAsyncIterable)(t):(0,Lu.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Ku={dropRight:void 0};const Yu=gc,$u=Ru,Hu=Ut;Ku.dropRight=function(t,e){return(0,Hu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,$u.copyIterable)(t):(0,Yu.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Xu={dropUntilAsync:void 0};const Gu=_c;Xu.dropUntilAsync=function(t,e){return(0,Gu.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Qu={};Qu.dropUntil=void 0,Qu.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var Zu={drop:void 0};const tl=gc,el=Ru,nl=Ut;Zu.drop=function(t,e){return(0,nl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,nl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,el.copyIterable)(t):(0,tl.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var rl={filterAsync:void 0};const il=_c;rl.filterAsync=function(t,e){return(0,il.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var ol={};ol.filter=void 0,ol.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var al={},sl={},cl={flattenByAsync:void 0};const ul=_c;function ll(t){return(0,ul.isIterable)(t)&&(0,ul.isntChar)(t)}cl.flattenByAsync=function(t,e){return(0,ul.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)ll(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)ll(i)&&await e(i,r)?yield*n(i,r+1):yield i}},sl.flattenDeepAsync=void 0;const fl=cl,dl=Ut;sl.flattenDeepAsync=function(t,e=1/0){return(0,dl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,dl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,fl.flattenByAsync)(t,((t,n)=>n<=e))},al.flattenAsync=void 0;const yl=sl;al.flattenAsync=function(t){return(0,yl.flattenDeepAsync)(t,1)};var hl={flattenBy:void 0};const vl=_c;hl.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,vl.isIterable)(i=o)&&(0,vl.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var pl={flattenDeep:void 0};const ml=hl,bl=Ut;pl.flattenDeep=function(t,e=1/0){return(0,bl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,bl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ml.flattenBy)(t,((t,n)=>n<=e))};var gl={flatten:void 0};const wl=pl;gl.flatten=function(t){return(0,wl.flattenDeep)(t,1)};var Al={mapAsync:void 0};const Il=_c;Al.mapAsync=function(t,e){return(0,Il.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var Sl={};Sl.map=void 0,Sl.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var _l={repeatAsync:void 0};const xl=gc,Tl=Ut;_l.repeatAsync=function(t,e){return(0,Tl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Tl.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,xl.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ol={repeat:void 0};const El=gc,jl=Ut;Ol.repeat=function(t,e){return(0,jl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,jl.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,El.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Nl={sliceAsync:void 0};const kl=gc,Bl=Ut;Nl.sliceAsync=function(t,e,n=1/0){return(0,Bl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Bl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Bl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Bl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,kl.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Pl={slice:void 0};const ql=gc,Cl=Ut;Pl.slice=function(t,e,n=1/0){return(0,Cl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Cl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Cl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Cl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ql.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Ml={};Ml.splitAsync=void 0,Ml.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var zl={splitByAsync:void 0};const Rl=_c;zl.splitByAsync=function(t,e){return(0,Rl.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Fl={};Fl.splitBy=void 0,Fl.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ul={};Ul.split=void 0,Ul.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Dl={takeAsync:void 0};const Jl=gc,Ll=Ut;Dl.takeAsync=function(t,e){return(0,Ll.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ll.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Jl.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Vl={takeRightAsync:void 0};const Wl=gc,Kl=Ut;Vl.takeRightAsync=function(t,e){return(0,Kl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Wl.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Yl={takeRight:void 0};const $l=gc,Hl=Ut;Yl.takeRight=function(t,e){return(0,Hl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,$l.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Xl={takeUntilAsync:void 0};const Gl=_c;Xl.takeUntilAsync=function(t,e){return(0,Gl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Ql={};Ql.takeUntil=void 0,Ql.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Zl={take:void 0};const tf=gc,ef=Ut;Zl.take=function(t,e){return(0,ef.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,ef.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,tf.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var nf={tapAsync:void 0};const rf=_c;nf.tapAsync=function(t,e){return(0,rf.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var of={};of.tap=void 0,of.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var af={};af.toAsyncIterable=void 0,af.toAsyncIterable=async function*(t){for(const e of t)yield e};var sf={};sf.transformAsync=void 0,sf.transformAsync=async function*(t,e){yield*e(t)};var cf={};cf.transform=void 0,cf.transform=function*(t,e){yield*e(t)};var uf={};uf.uniqAsync=void 0,uf.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var lf={uniqByAsync:void 0};const ff=_c;lf.uniqByAsync=function(t,e){return(0,ff.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var df={};df.uniqBy=void 0,df.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var yf={};yf.uniq=void 0,yf.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var hf={zipAsync:void 0};const vf=_c;var pf;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(pf||(pf={})),hf.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,vf.isAsyncIterable)(t)?[pf.Async,t[Symbol.asyncIterator]()]:[pf.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===pf.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===pf.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var mf={};mf.zip=void 0,mf.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(bc,t),r(Sc,t),r(Eu,t),r(ju,t),r(Bu,t),r(Cu,t),r(zu,t),r(Ju,t),r(Ku,t),r(Xu,t),r(Qu,t),r(Zu,t),r(rl,t),r(ol,t),r(al,t),r(cl,t),r(hl,t),r(sl,t),r(pl,t),r(gl,t),r(Al,t),r(Sl,t),r(_l,t),r(Ol,t),r(Nl,t),r(Pl,t),r(Ml,t),r(zl,t),r(Fl,t),r(Ul,t),r(Dl,t),r(Vl,t),r(Yl,t),r(Xl,t),r(Ql,t),r(Zl,t),r(nf,t),r(of,t),r(af,t),r(sf,t),r(cf,t),r(uf,t),r(lf,t),r(df,t),r(yf,t),r(hf,t),r(mf,t)}(mc);var bf={},gf={};gf.consume=void 0,gf.consume=function(t,e){return e(t)};var wf={eachAsync:void 0};const Af=_c;wf.eachAsync=function(t,e){return(0,Af.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var If={};If.each=void 0,If.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Sf={everyAsync:void 0};const _f=_c;Sf.everyAsync=function(t,e){return(0,_f.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var xf={};xf.every=void 0,xf.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Tf={findAsync:void 0};const Of=_c;Tf.findAsync=function(t,e){return(0,Of.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Ef={};Ef.find=void 0,Ef.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var jf={};jf.firstAsync=void 0,jf.firstAsync=async function(t){for await(const e of t)return e};var Nf={};Nf.first=void 0,Nf.first=function(t){for(const e of t)return e};var kf={};kf.includesAsync=void 0,kf.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Bf={};Bf.includes=void 0,Bf.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Pf={};Pf.matchAsync=void 0,Pf.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var qf={};qf.match=void 0,qf.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Cf={reduceAsync:void 0};const Mf=_c;Cf.reduceAsync=function(t,e,n){return(0,Mf.isUndefined)(n)?function(t,e){return(0,Mf.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Mf.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var zf={reduce:void 0};const Rf=_c;zf.reduce=function(t,e,n){return(0,Rf.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ff={someAsync:void 0};const Uf=_c;Ff.someAsync=function(t,e){return(0,Uf.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Df={};Df.some=void 0,Df.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Jf={};Jf.lastAsync=void 0,Jf.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Lf={};Lf.last=void 0,Lf.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Vf={toArrayAsync:void 0};const Wf=gf;Vf.toArrayAsync=function(t){return(0,Wf.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Kf={toArray:void 0};const Yf=gf;Kf.toArray=function(t){return(0,Yf.consume)(t,(t=>Array.from(t)))};var $f={toSetAsync:void 0};const Hf=gf;$f.toSetAsync=function(t){return(0,Hf.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Xf={toSet:void 0};const Gf=gf;Xf.toSet=function(t){return(0,Gf.consume)(t,(t=>new Set(t)))};var Qf={};Qf.count=void 0,Qf.count=function(t){let e=0;for(const n of t)e++;return e};var Zf={};Zf.countAsync=void 0,Zf.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(gf,t),r(wf,t),r(If,t),r(Sf,t),r(xf,t),r(Tf,t),r(Ef,t),r(jf,t),r(Nf,t),r(kf,t),r(Bf,t),r(Pf,t),r(qf,t),r(Cf,t),r(zf,t),r(Ff,t),r(Df,t),r(Jf,t),r(Lf,t),r(Vf,t),r(Kf,t),r($f,t),r(Xf,t),r(Qf,t),r(Zf,t)}(bf),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(mc,t),r(bf,t)}(pc);class td{constructor(t){this.map=new Map,Ut.assert(Number.isInteger(t),"The parameter limit must be an integer"),Ut.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.has(t)?this.updateItem(t,e):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e)),this}has(t){return this.map.has(t)}get(t){if(!this.has(t))return;const e=this.map.get(t);return this.updateItem(t,e),e}delete(t){return this.map.delete(t)}clear(){this.map.clear()}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}getColdestKey(){return pc.first(this.map.keys())}}var ed={},nd={},rd={},id={};id.random=void 0,id.random=function(t,e){return Math.random()*(e-t)+t};var od={};od.randomInt=void 0,od.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var ad={};ad.randomIntInclusive=void 0,ad.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(id,t),r(od,t),r(ad,t)}(rd),nd.calculateExponentialBackoffTimeout=void 0;const sd=rd;nd.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:i=!0}){const o=Math.min(r**e*t,n);return i?(0,sd.randomIntInclusive)(0,o):o};var cd={};cd.setTimeout=void 0,cd.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var ud={setSchedule:void 0};const ld=cd;ud.setSchedule=function(t,e){const n=t-Date.now();return(0,ld.setTimeout)(n,e)};var fd={};fd.setInterval=void 0,fd.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var dd={setImmediate:void 0};const yd=cd;dd.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,yd.setTimeout)(0,t)};var hd={setTimeoutLoop:void 0};const vd=cd;hd.setTimeoutLoop=function(t,e){let n=!1,r=(0,vd.setTimeout)(t,(async function i(){await e(),n||(r=(0,vd.setTimeout)(t,i))}));return()=>{n=!0,r()}};var pd={setDynamicTimeoutLoop:void 0};const md=cd;pd.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,md.setTimeout)(t,(async function i(){const o=Date.now();await e();const a=Date.now()-o;n||(r=(0,md.setTimeout)(Math.max(t-a,0),i))}));return()=>{n=!0,r()}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(nd,t),r(cd,t),r(ud,t),r(fd,t),r(dd,t),r(hd,t),r(pd,t)}(ed);class bd{constructor(){this.map=new Map,this.itemMetadataSortedByExpirationTime=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.set(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n),this}has(t){return this.map.has(t)}get(t){return this.map.get(t)}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ed.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}}class gd{constructor(t){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],Ut.assert(Number.isInteger(t),"The parameter limit must be an integer"),Ut.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.has(t)?(this.updateItem(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n)):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e),this.addItemMetadata(t,Date.now()+n)),this}has(t){return this.map.has(t)}get(t){if(this.has(t)){const e=this.map.get(t);return this.updateItem(t,e),e}}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ed.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return pc.first(this.map.keys())}}class wd{constructor(t){this.value=t,this.children=new Map}}class Ad{constructor(){this.root=new wd}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*t(e,r){for(const[i,o]of e.children){const e=[...r,i];n.isntUndefined(o.value)&&(yield[e,o.value]),yield*t(o,e)}}(this.root,[])}keys(){return pc.map(this.entries(),(([t])=>t))}values(){return pc.map(this.entries(),(([t,e])=>e))}set(t,e){let n=this.root;for(const e of t)n.children.has(e)||n.children.set(e,new wd),n=n.children.get(e);return n.value=e,this}has(t){let e=this.root;for(const n of t){if(!e.children.has(n))return!1;e=e.children.get(n)}return void 0!==e.value}get(t){let e=this.root;for(const n of t){if(!e.children.has(n))return;e=e.children.get(n)}return e.value}delete(t){const e=[];let n=this.root;for(const r of t){if(!n.children.has(r))return!1;e.push(n),n=n.children.get(r)}if(delete n.value,0===n.children.size)for(const[n,r]of pc.toArray(pc.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}class Id{constructor(t,e){this.schema=t,this._state=e}get[Symbol.toStringTag](){return this.constructor.name}get state(){return this._state}matches(t){return this._state===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new Sd(this.state,t);this._state=this.schema[this.state][t]}}class Sd extends Ut.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
1
+ class t{constructor(t){this.value=t}get[Symbol.toStringTag](){return this.constructor.name}set(t){this.value=t}get(){return this.value}}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},r={};function i(t){return Array.isArray(t)}r.isntEmptyArray=r.isEmptyArray=r.isntArray=r.isArray=void 0,r.isArray=i,r.isntArray=function(t){return!i(t)},r.isEmptyArray=function(t){return 0===t.length},r.isntEmptyArray=function(t){return 0!==t.length};var o={},a={};function s(t){return null===t}a.isntNull=a.isNull=void 0,a.isNull=s,a.isntNull=function(t){return!s(t)};var c={};function u(t){return void 0===t}c.isntUndefined=c.isUndefined=void 0,c.isUndefined=u,c.isntUndefined=function(t){return!u(t)};var l={};function f(t){return"function"==typeof t}l.isntFunction=l.isFunction=void 0,l.isFunction=f,l.isntFunction=function(t){return!f(t)},o.isntAsyncIterable=o.isAsyncIterable=void 0;const d=a,y=c,h=l;function v(t){return(0,d.isntNull)(t)&&(0,y.isntUndefined)(t)&&(0,h.isFunction)(t[Symbol.asyncIterator])}o.isAsyncIterable=v,o.isntAsyncIterable=function(t){return!v(t)};var p={};function m(t){return"bigint"==typeof t}p.isntBigInt=p.isBigInt=void 0,p.isBigInt=m,p.isntBigInt=function(t){return!m(t)};var b={};function g(t){return"boolean"==typeof t}b.isntBoolean=b.isBoolean=void 0,b.isBoolean=g,b.isntBoolean=function(t){return!g(t)};var w={},A={};function T(t){return"string"==typeof t}A.isntString=A.isString=void 0,A.isString=T,A.isntString=function(t){return!T(t)},w.isntChar=w.isChar=void 0;const I=A;function x(t){return(0,I.isString)(t)&&1===t.length}w.isChar=x,w.isntChar=function(t){return!x(t)};var S={};function _(t){return t instanceof Date}S.isntDate=S.isDate=void 0,S.isDate=_,S.isntDate=function(t){return!_(t)};var O={};O.inEnum=void 0,O.inEnum=function(t,e){return Object.values(e).includes(t)};var E={};function j(t){return t instanceof Error}E.isntError=E.isError=void 0,E.isError=j,E.isntError=function(t){return!j(t)};var N={};function k(t){return!t}N.isntFalsy=N.isFalsy=void 0,N.isFalsy=k,N.isntFalsy=function(t){return!k(t)};var B={};B.isntIterable=B.isIterable=void 0;const P=a,q=c,C=l;function M(t){return(0,P.isntNull)(t)&&(0,q.isntUndefined)(t)&&(0,C.isFunction)(t[Symbol.iterator])}B.isIterable=M,B.isntIterable=function(t){return!M(t)};var F={},z={};function R(t){return"number"==typeof t}function U(t){return Number.isNaN(t)}z.isntNaN=z.isNaN=z.isNegativeInfinity=z.isPositiveInfinity=z.isFinite=z.isntNumber=z.isNumber=void 0,z.isNumber=R,z.isntNumber=function(t){return!R(t)},z.isFinite=function(t){return Number.isFinite(t)},z.isPositiveInfinity=function(t){return t===1/0},z.isNegativeInfinity=function(t){return t===-1/0},z.isNaN=U,z.isntNaN=function(t){return!U(t)};var D={},V="object"==typeof e&&e&&e.Object===Object&&e,J="object"==typeof self&&self&&self.Object===Object&&self,K=(V||J||Function("return this")()).Symbol,L=K,W=Object.prototype,Y=W.hasOwnProperty,$=W.toString,H=L?L.toStringTag:void 0;var X=function(t){var e=Y.call(t,H),n=t[H];try{t[H]=void 0;var r=!0}catch(t){}var i=$.call(t);return r&&(e?t[H]=n:delete t[H]),i},G=Object.prototype.toString;var Q=X,Z=function(t){return G.call(t)},tt=K?K.toStringTag:void 0;var et=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tt&&tt in Object(t)?Q(t):Z(t)};var nt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rt=et,it=nt,ot=function(t){return null!=t&&"object"==typeof t},at=Function.prototype,st=Object.prototype,ct=at.toString,ut=st.hasOwnProperty,lt=ct.call(Object);var ft=function(t){if(!ot(t)||"[object Object]"!=rt(t))return!1;var e=it(t);if(null===e)return!0;var n=ut.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==lt},dt=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};D.isntEmptyObject=D.isEmptyObject=D.isntPlainObject=D.isPlainObject=D.isntObject=D.isObject=void 0;const yt=dt(ft);function ht(t){return null!==t&&"object"==typeof t}function vt(t){return(0,yt.default)(t)}D.isObject=ht,D.isntObject=function(t){return!ht(t)},D.isPlainObject=vt,D.isntPlainObject=function(t){return!vt(t)},D.isEmptyObject=function(t){return 0===Object.keys(t).length},D.isntEmptyObject=function(t){return 0!==Object.keys(t).length},F.isntJsonable=F.isJsonable=F.isntJson=F.isJson=void 0;const pt=a,mt=b,bt=A,gt=z,wt=r,At=D;function Tt(t){return(0,pt.isNull)(t)||(0,mt.isBoolean)(t)||(0,bt.isString)(t)||(0,gt.isNumber)(t)||(0,wt.isArray)(t)&&t.every(Tt)||(0,At.isPlainObject)(t)&&Object.values(t).every(Tt)}F.isJson=Tt,F.isntJson=function(t){return!Tt(t)},F.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},F.isntJsonable=function t(e){return!t()};var It={};It.isPromiseLike=It.isntPromiseLike=It.isntPromise=It.isPromise=void 0;const xt=D,St=l;function _t(t){return t instanceof Promise}function Ot(t){return(0,xt.isObject)(t)&&(0,St.isFunction)(t.then)}It.isPromise=_t,It.isntPromise=function(t){return!_t(t)},It.isntPromiseLike=function(t){return!Ot(t)},It.isPromiseLike=Ot;var Et={};Et.isAbsoluteURL=void 0,Et.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var jt,Nt,kt,Bt={};function Pt(t){return t instanceof RegExp}function qt([t,e]){return n.isNull(e)?[t]:[t,...qt(e)]}function Ct([t,...e]){return[t,e.length?Ct(e):null]}Bt.isntRegExp=Bt.isRegExp=void 0,Bt.isRegExp=Pt,Bt.isntRegExp=function(t){return!Pt(t)},jt=n,Nt=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),(kt=e&&e.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||Nt(e,t,n)})(r,jt),kt(o,jt),kt(p,jt),kt(b,jt),kt(w,jt),kt(S,jt),kt(O,jt),kt(E,jt),kt(N,jt),kt(l,jt),kt(B,jt),kt(F,jt),kt(a,jt),kt(z,jt),kt(D,jt),kt(It,jt),kt(A,jt),kt(c,jt),kt(Et,jt),kt(Bt,jt);class Mt{constructor(){this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}on(t,e){this.map.has(t)||this.map.set(t,new Set);return this.map.get(t).add(n),()=>{if(!this.map.has(t))return;const e=this.map.get(t);e.delete(n),0===e.size&&this.map.delete(t)};function n(...t){e(...t)}}once(t,e){const n=this.on(t,((...t)=>{e(...t),n()}));return n}emit(t,...e){this.map.has(t)&&this.map.get(t).forEach((t=>t(...e)))}}class Ft{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.set(this.hash(t),e),this}has(t){return this.map.has(this.hash(t))}get(t){return this.map.get(this.hash(t))}delete(t){return this.map.delete(this.hash(t))}clear(){this.map.clear()}}class zt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}[Symbol.iterator](){return this.map.values()}add(t){return this.map.set(this.hash(t),t),this}delete(t){return this.map.delete(this.hash(t))}has(t){return this.map.has(this.hash(t))}clear(){this.map.clear()}values(){return this.map.values()}}class Rt{constructor(){this.items=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.items.length}empty(){this.items.length=0}enqueue(...t){this.items.push(...t)}dequeue(){return this.items.shift()}remove(t){let e;for(;(e=this.items.indexOf(t))>=0;)this.items.splice(e,1)}}var Ut={},Dt={},Vt={},Jt={},Kt={},Lt={},Wt={};Wt.go=void 0,Wt.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(Wt,t)}(Lt);var Yt={},$t={},Ht={},Xt={},Gt={},Qt={},Zt={CustomError:void 0};class te extends Error{get name(){return this.constructor.name}}Zt.CustomError=te;var ee={ExpectedError:void 0};const ne=Zt;class re extends ne.CustomError{}ee.ExpectedError=re;var ie={AssertionError:void 0};const oe=Zt;class ae extends oe.CustomError{}ie.AssertionError=ae;var se={};se.normalize=void 0,se.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ce={refute:void 0};const ue=ee;ce.refute=function(t,e){if(t)throw new ue.ExpectedError(e)};var le={assert:void 0};const fe=ie;le.assert=function(t,e){if(!t)throw new fe.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Zt,t),r(ee,t),r(ie,t),r(se,t),r(ce,t),r(le,t)}(Qt),Gt.chunkAsync=void 0;const de=Lt,ye=Qt;Gt.chunkAsync=function(t,e){return(0,ye.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ye.assert)(e>0,"The parameter size must be greater than 0"),(0,de.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var he={},ve={},pe={};function me(t){return Array.isArray(t)}pe.isntEmptyArray=pe.isEmptyArray=pe.isntArray=pe.isArray=void 0,pe.isArray=me,pe.isntArray=function(t){return!me(t)},pe.isEmptyArray=function(t){return 0===t.length},pe.isntEmptyArray=function(t){return 0!==t.length};var be={},ge={};function we(t){return null===t}ge.isntNull=ge.isNull=void 0,ge.isNull=we,ge.isntNull=function(t){return!we(t)};var Ae={};function Te(t){return void 0===t}Ae.isntUndefined=Ae.isUndefined=void 0,Ae.isUndefined=Te,Ae.isntUndefined=function(t){return!Te(t)},be.isntAsyncIterable=be.isAsyncIterable=void 0;const Ie=ge,xe=Ae;function Se(t){return(0,Ie.isntNull)(t)&&(0,xe.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}be.isAsyncIterable=Se,be.isntAsyncIterable=function(t){return!Se(t)};var _e={};function Oe(t){return"bigint"==typeof t}_e.isntBigInt=_e.isBigInt=void 0,_e.isBigInt=Oe,_e.isntBigInt=function(t){return!Oe(t)};var Ee={};function je(t){return"boolean"==typeof t}Ee.isntBoolean=Ee.isBoolean=void 0,Ee.isBoolean=je,Ee.isntBoolean=function(t){return!je(t)};var Ne={},ke={};function Be(t){return"string"==typeof t}ke.isntString=ke.isString=void 0,ke.isString=Be,ke.isntString=function(t){return!Be(t)},Ne.isntChar=Ne.isChar=void 0;const Pe=ke;function qe(t){return(0,Pe.isString)(t)&&1===t.length}Ne.isChar=qe,Ne.isntChar=function(t){return!qe(t)};var Ce={};function Me(t){return t instanceof Date}Ce.isntDate=Ce.isDate=void 0,Ce.isDate=Me,Ce.isntDate=function(t){return!Me(t)};var Fe={};Fe.inEnum=void 0,Fe.inEnum=function(t,e){return Object.values(e).includes(t)};var ze={};function Re(t){return t instanceof Error}ze.isntError=ze.isError=void 0,ze.isError=Re,ze.isntError=function(t){return!Re(t)};var Ue={};function De(t){return!t}Ue.isntFalsy=Ue.isFalsy=void 0,Ue.isFalsy=De,Ue.isntFalsy=function(t){return!De(t)};var Ve={};function Je(t){return"function"==typeof t}Ve.isntFunction=Ve.isFunction=void 0,Ve.isFunction=Je,Ve.isntFunction=function(t){return!Je(t)};var Ke={};Ke.isntIterable=Ke.isIterable=void 0;const Le=ge,We=Ae;function Ye(t){return(0,Le.isntNull)(t)&&(0,We.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Ke.isIterable=Ye,Ke.isntIterable=function(t){return!Ye(t)};var $e={},He={};var Xe=Function.prototype,Ge=Object.prototype,Qe=Xe.toString,Ze=Ge.hasOwnProperty,tn=Qe.call(Object),en=Ge.toString,nn=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rn=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=en.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=nn(t);if(null===e)return!0;var n=Ze.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Qe.call(n)==tn},on=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};He.isntEmptyObject=He.isEmptyObject=He.isntPlainObject=He.isPlainObject=He.isntObject=He.isObject=void 0;const an=on(rn);function sn(t){return null!==t&&"object"==typeof t}function cn(t){return(0,an.default)(t)}He.isObject=sn,He.isntObject=function(t){return!sn(t)},He.isPlainObject=cn,He.isntPlainObject=function(t){return!cn(t)},He.isEmptyObject=function(t){return 0===Object.keys(t).length},He.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var un={};function ln(t){return"number"==typeof t}un.isntNumber=un.isNumber=void 0,un.isNumber=ln,un.isntNumber=function(t){return!ln(t)},$e.isntJsonRpcError=$e.isJsonRpcError=$e.isntJsonRpcSuccess=$e.isJsonRpcSuccess=$e.isntJsonRpcRequest=$e.isJsonRpcRequest=$e.isntJsonRpcNotification=$e.isJsonRpcNotification=void 0;const fn=pe,dn=He,yn=ke,hn=un,vn=Ae;function pn(t){return(0,yn.isString)(t)||(0,hn.isNumber)(t)}function mn(t){return(0,fn.isArray)(t)||(0,dn.isObject)(t)}function bn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.method)&&(0,vn.isUndefined)(t.id)&&mn(t.params)}function gn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.method)&&pn(t.id)&&mn(t.params)}function wn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.id)&&"result"in t}function An(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&pn(t.id)&&function(t){return(0,dn.isPlainObject)(t)&&(0,hn.isNumber)(t.code)&&(0,yn.isString)(t.message)&&((0,vn.isUndefined)(t.data)||(0,dn.isObject)(t.data))}(t.error)}$e.isJsonRpcNotification=bn,$e.isntJsonRpcNotification=function(t){return!bn(t)},$e.isJsonRpcRequest=gn,$e.isntJsonRpcRequest=function(t){return!gn(t)},$e.isJsonRpcSuccess=wn,$e.isntJsonRpcSuccess=function(t){return!wn(t)},$e.isJsonRpcError=An,$e.isntJsonRpcError=function(t){return!An(t)};var Tn={};Tn.isntJson=Tn.isJson=void 0,Tn.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Tn.isntJson=function t(e){return!t()};var In={};In.isAbsoluteURL=void 0,In.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(pe,t),r(be,t),r(_e,t),r(Ee,t),r(Ne,t),r(Ce,t),r(Fe,t),r(ze,t),r(Ue,t),r(Ve,t),r(Ke,t),r($e,t),r(Tn,t),r(ge,t),r(un,t),r(He,t),r(ke,t),r(Ae,t),r(In,t)}(ve),he.chunkByAsync=void 0;const xn=ve;he.chunkByAsync=function(t,e){return(0,xn.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Sn={};Sn.chunkBy=void 0,Sn.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var _n={chunk:void 0};const On=Lt,En=Qt;_n.chunk=function(t,e){return(0,En.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,En.assert)(e>0,"The parameter size must be greater than 0"),(0,On.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var jn={concatAsync:void 0};const Nn=ve,kn=Lt;jn.concatAsync=function(t,...e){return(0,kn.go)((async function*(){for(const n of[t,...e])if((0,Nn.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Bn={concat:void 0};const Pn=Lt;Bn.concat=function(t,...e){return(0,Pn.go)((function*(){for(const n of[t,...e])yield*n}))};var qn={},Cn={};Cn.copyIterable=Cn.copyAsyncIterable=void 0,Cn.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Cn.copyIterable=function*(t){for(const e of t)yield e},qn.dropAsync=void 0;const Mn=Lt,Fn=Cn,zn=Qt;qn.dropAsync=function(t,e){return(0,zn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,zn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Fn.copyAsyncIterable)(t):(0,Mn.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Rn={dropRightAsync:void 0};const Un=Lt,Dn=Cn,Vn=Qt;Rn.dropRightAsync=function(t,e){return(0,Vn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Dn.copyAsyncIterable)(t):(0,Un.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Jn={dropRight:void 0};const Kn=Lt,Ln=Cn,Wn=Qt;Jn.dropRight=function(t,e){return(0,Wn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ln.copyIterable)(t):(0,Kn.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Yn={dropUntilAsync:void 0};const $n=ve;Yn.dropUntilAsync=function(t,e){return(0,$n.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Hn={};Hn.dropUntil=void 0,Hn.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var Xn={drop:void 0};const Gn=Lt,Qn=Cn,Zn=Qt;Xn.drop=function(t,e){return(0,Zn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Zn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Qn.copyIterable)(t):(0,Gn.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var tr={filterAsync:void 0};const er=ve;tr.filterAsync=function(t,e){return(0,er.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var nr={};nr.filter=void 0,nr.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var rr={},ir={},or={flattenByAsync:void 0};const ar=ve;function sr(t){return(0,ar.isIterable)(t)&&(0,ar.isntChar)(t)}or.flattenByAsync=function(t,e){return(0,ar.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)sr(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)sr(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ir.flattenDeepAsync=void 0;const cr=or,ur=Qt;ir.flattenDeepAsync=function(t,e=1/0){return(0,ur.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ur.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,cr.flattenByAsync)(t,((t,n)=>n<=e))},rr.flattenAsync=void 0;const lr=ir;rr.flattenAsync=function(t){return(0,lr.flattenDeepAsync)(t,1)};var fr={flattenBy:void 0};const dr=ve;fr.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,dr.isIterable)(i=o)&&(0,dr.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var yr={flattenDeep:void 0};const hr=fr,vr=Qt;yr.flattenDeep=function(t,e=1/0){return(0,vr.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,vr.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,hr.flattenBy)(t,((t,n)=>n<=e))};var pr={flatten:void 0};const mr=yr;pr.flatten=function(t){return(0,mr.flattenDeep)(t,1)};var br={mapAsync:void 0};const gr=ve;br.mapAsync=function(t,e){return(0,gr.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var wr={};wr.map=void 0,wr.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ar={repeatAsync:void 0};const Tr=Lt,Ir=Qt;Ar.repeatAsync=function(t,e){return(0,Ir.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Ir.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Tr.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var xr={repeat:void 0};const Sr=Lt,_r=Qt;xr.repeat=function(t,e){return(0,_r.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,_r.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Sr.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Or={sliceAsync:void 0};const Er=Lt,jr=Qt;Or.sliceAsync=function(t,e,n=1/0){return(0,jr.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,jr.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,jr.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,jr.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Er.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Nr={slice:void 0};const kr=Lt,Br=Qt;Nr.slice=function(t,e,n=1/0){return(0,Br.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Br.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Br.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Br.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,kr.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Pr={};Pr.splitAsync=void 0,Pr.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var qr={splitByAsync:void 0};const Cr=ve;qr.splitByAsync=function(t,e){return(0,Cr.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Mr={};Mr.splitBy=void 0,Mr.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Fr={};Fr.split=void 0,Fr.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var zr={takeAsync:void 0};const Rr=Lt,Ur=Qt;zr.takeAsync=function(t,e){return(0,Ur.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ur.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Rr.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Dr={takeRightAsync:void 0};const Vr=Lt,Jr=Qt;Dr.takeRightAsync=function(t,e){return(0,Jr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vr.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Kr={takeRight:void 0};const Lr=Lt,Wr=Qt;Kr.takeRight=function(t,e){return(0,Wr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Lr.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Yr={takeUntilAsync:void 0};const $r=ve;Yr.takeUntilAsync=function(t,e){return(0,$r.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Hr={};Hr.takeUntil=void 0,Hr.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Xr={take:void 0};const Gr=Lt,Qr=Qt;Xr.take=function(t,e){return(0,Qr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Qr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Gr.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Zr={tapAsync:void 0};const ti=ve;Zr.tapAsync=function(t,e){return(0,ti.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var ei={};ei.tap=void 0,ei.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ni={};ni.toAsyncIterable=void 0,ni.toAsyncIterable=async function*(t){for(const e of t)yield e};var ri={};ri.transformAsync=void 0,ri.transformAsync=async function*(t,e){yield*e(t)};var ii={};ii.transform=void 0,ii.transform=function*(t,e){yield*e(t)};var oi={};oi.uniqAsync=void 0,oi.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ai={uniqByAsync:void 0};const si=ve;ai.uniqByAsync=function(t,e){return(0,si.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var ci={};ci.uniqBy=void 0,ci.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var ui={};ui.uniq=void 0,ui.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var li={zipAsync:void 0};const fi=ve;var di;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(di||(di={})),li.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,fi.isAsyncIterable)(t)?[di.Async,t[Symbol.asyncIterator]()]:[di.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===di.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===di.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var yi={};yi.zip=void 0,yi.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Gt,t),r(he,t),r(Sn,t),r(_n,t),r(jn,t),r(Bn,t),r(qn,t),r(Rn,t),r(Jn,t),r(Yn,t),r(Hn,t),r(Xn,t),r(tr,t),r(nr,t),r(rr,t),r(or,t),r(fr,t),r(ir,t),r(yr,t),r(pr,t),r(br,t),r(wr,t),r(Ar,t),r(xr,t),r(Or,t),r(Nr,t),r(Pr,t),r(qr,t),r(Mr,t),r(Fr,t),r(zr,t),r(Dr,t),r(Kr,t),r(Yr,t),r(Hr,t),r(Xr,t),r(Zr,t),r(ei,t),r(ni,t),r(ri,t),r(ii,t),r(oi,t),r(ai,t),r(ci,t),r(ui,t),r(li,t),r(yi,t)}(Xt);var hi={},vi={};vi.consume=void 0,vi.consume=function(t,e){return e(t)};var pi={eachAsync:void 0};const mi=ve;pi.eachAsync=function(t,e){return(0,mi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var bi={};bi.each=void 0,bi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gi={everyAsync:void 0};const wi=ve;gi.everyAsync=function(t,e){return(0,wi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Ai={};Ai.every=void 0,Ai.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Ti={findAsync:void 0};const Ii=ve;Ti.findAsync=function(t,e){return(0,Ii.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var xi={};xi.find=void 0,xi.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Si={};Si.firstAsync=void 0,Si.firstAsync=async function(t){for await(const e of t)return e};var _i={};_i.first=void 0,_i.first=function(t){for(const e of t)return e};var Oi={};Oi.includesAsync=void 0,Oi.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ei={};Ei.includes=void 0,Ei.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var ji={};ji.matchAsync=void 0,ji.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Ni={};Ni.match=void 0,Ni.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var ki={reduceAsync:void 0};const Bi=ve;ki.reduceAsync=function(t,e,n){return(0,Bi.isUndefined)(n)?function(t,e){return(0,Bi.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Bi.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Pi={reduce:void 0};const qi=ve;Pi.reduce=function(t,e,n){return(0,qi.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ci={someAsync:void 0};const Mi=ve;Ci.someAsync=function(t,e){return(0,Mi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Fi={};Fi.some=void 0,Fi.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var zi={};zi.lastAsync=void 0,zi.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Ri={};Ri.last=void 0,Ri.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Ui={toArrayAsync:void 0};const Di=vi;Ui.toArrayAsync=function(t){return(0,Di.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Vi={toArray:void 0};const Ji=vi;Vi.toArray=function(t){return(0,Ji.consume)(t,(t=>Array.from(t)))};var Ki={toSetAsync:void 0};const Li=vi;Ki.toSetAsync=function(t){return(0,Li.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Wi={toSet:void 0};const Yi=vi;Wi.toSet=function(t){return(0,Yi.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(vi,t),r(pi,t),r(bi,t),r(gi,t),r(Ai,t),r(Ti,t),r(xi,t),r(Si,t),r(_i,t),r(Oi,t),r(Ei,t),r(ji,t),r(Ni,t),r(ki,t),r(Pi,t),r(Ci,t),r(Fi,t),r(zi,t),r(Ri,t),r(Ui,t),r(Vi,t),r(Ki,t),r(Wi,t)}(hi),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Xt,t),r(hi,t)}(Ht);var $i={},Hi={};Hi.traverseErrorPrototypeChain=void 0,Hi.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},$i.getErrorNames=void 0;const Xi=ve,Gi=Hi;$i.getErrorNames=function*(t){var e;if((0,Xi.isError)(t))for(const n of(0,Gi.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Qi={isSerializableError:void 0};const Zi=ve;Qi.isSerializableError=function(t){return(0,Zi.isObject)(t)&&(0,Zi.isString)(t.name)&&(0,Zi.isString)(t.message)&&((0,Zi.isString)(t.stack)||(0,Zi.isNull)(t.stack))&&(0,Zi.isArray)(t.ancestors)&&t.ancestors.every(Zi.isString)},$t.CustomError=void 0;const to=Ht,eo=$i,no=ve,ro=Qi;class io extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,to.first)((0,eo.getErrorNames)(this)))&&void 0!==t?t:io.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,no.isError)(t)||(0,ro.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,eo.getErrorNames)(this.prototype)].reverse(),r=(0,to.toArray)((0,eo.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}$t.CustomError=io;var oo={AssertionError:void 0};const ao=$t;class so extends ao.CustomError{}oo.AssertionError=so;var co={normalize:void 0};const uo=$i,lo=Ht;co.normalize=function(t){var e;const[n,...r]=(0,lo.toArray)((0,uo.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var fo={},yo={},ho={};ho.pass=void 0,ho.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(ho,t)}(yo),fo.hydrate=void 0;const vo=yo;function po(t,e){const n=function(){(0,vo.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}fo.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=po(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var mo={assert:void 0};const bo=oo;mo.assert=function(t,e){if(!t)throw new bo.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r($t,t),r(oo,t),r(Qi,t),r(co,t),r(fo,t),r(mo,t),r($i,t),r(Hi,t)}(Yt),Kt.chunkAsync=void 0;const go=Lt,wo=Yt;Kt.chunkAsync=function(t,e){return(0,wo.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,wo.assert)(e>0,"The parameter size must be greater than 0"),(0,go.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ao={chunkByAsync:void 0};const To=ve;Ao.chunkByAsync=function(t,e){return(0,To.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Io={};Io.chunkBy=void 0,Io.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var xo={chunk:void 0};const So=Lt,_o=Yt;xo.chunk=function(t,e){return(0,_o.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,_o.assert)(e>0,"The parameter size must be greater than 0"),(0,So.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Oo={concatAsync:void 0};const Eo=ve,jo=Lt;Oo.concatAsync=function(t,...e){return(0,jo.go)((async function*(){for(const n of[t,...e])if((0,Eo.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var No={concat:void 0};const ko=Lt;No.concat=function(t,...e){return(0,ko.go)((function*(){for(const n of[t,...e])yield*n}))};var Bo={},Po={};Po.copyIterable=Po.copyAsyncIterable=void 0,Po.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Po.copyIterable=function*(t){for(const e of t)yield e},Bo.dropAsync=void 0;const qo=Lt,Co=Po,Mo=Yt;Bo.dropAsync=function(t,e){return(0,Mo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Co.copyAsyncIterable)(t):(0,qo.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Fo={dropRightAsync:void 0};const zo=Lt,Ro=Po,Uo=Yt;Fo.dropRightAsync=function(t,e){return(0,Uo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Uo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ro.copyAsyncIterable)(t):(0,zo.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Do={dropRight:void 0};const Vo=Lt,Jo=Po,Ko=Yt;Do.dropRight=function(t,e){return(0,Ko.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ko.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Jo.copyIterable)(t):(0,Vo.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Lo={dropUntilAsync:void 0};const Wo=ve;Lo.dropUntilAsync=function(t,e){return(0,Wo.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Yo={};Yo.dropUntil=void 0,Yo.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var $o={drop:void 0};const Ho=Lt,Xo=Po,Go=Yt;$o.drop=function(t,e){return(0,Go.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Go.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Xo.copyIterable)(t):(0,Ho.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Qo={filterAsync:void 0};const Zo=ve;Qo.filterAsync=function(t,e){return(0,Zo.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var ta={};ta.filter=void 0,ta.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var ea={},na={},ra={flattenByAsync:void 0};const ia=ve;function oa(t){return(0,ia.isIterable)(t)&&(0,ia.isntChar)(t)}ra.flattenByAsync=function(t,e){return(0,ia.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)oa(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)oa(i)&&await e(i,r)?yield*n(i,r+1):yield i}},na.flattenDeepAsync=void 0;const aa=ra,sa=Yt;na.flattenDeepAsync=function(t,e=1/0){return(0,sa.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,sa.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,aa.flattenByAsync)(t,((t,n)=>n<=e))},ea.flattenAsync=void 0;const ca=na;ea.flattenAsync=function(t){return(0,ca.flattenDeepAsync)(t,1)};var ua={flattenBy:void 0};const la=ve;ua.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,la.isIterable)(i=o)&&(0,la.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var fa={flattenDeep:void 0};const da=ua,ya=Yt;fa.flattenDeep=function(t,e=1/0){return(0,ya.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ya.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,da.flattenBy)(t,((t,n)=>n<=e))};var ha={flatten:void 0};const va=fa;ha.flatten=function(t){return(0,va.flattenDeep)(t,1)};var pa={mapAsync:void 0};const ma=ve;pa.mapAsync=function(t,e){return(0,ma.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var ba={};ba.map=void 0,ba.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var ga={repeatAsync:void 0};const wa=Lt,Aa=Yt;ga.repeatAsync=function(t,e){return(0,Aa.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Aa.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,wa.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ta={repeat:void 0};const Ia=Lt,xa=Yt;Ta.repeat=function(t,e){return(0,xa.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,xa.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Ia.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Sa={sliceAsync:void 0};const _a=Lt,Oa=Yt;Sa.sliceAsync=function(t,e,n=1/0){return(0,Oa.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Oa.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Oa.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Oa.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,_a.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Ea={slice:void 0};const ja=Lt,Na=Yt;Ea.slice=function(t,e,n=1/0){return(0,Na.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Na.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Na.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Na.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ja.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ka={};ka.splitAsync=void 0,ka.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ba={splitByAsync:void 0};const Pa=ve;Ba.splitByAsync=function(t,e){return(0,Pa.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var qa={};qa.splitBy=void 0,qa.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ca={};Ca.split=void 0,Ca.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ma={takeAsync:void 0};const Fa=Lt,za=Yt;Ma.takeAsync=function(t,e){return(0,za.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,za.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Fa.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Ra={takeRightAsync:void 0};const Ua=Lt,Da=Yt;Ra.takeRightAsync=function(t,e){return(0,Da.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Da.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ua.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Va={takeRight:void 0};const Ja=Lt,Ka=Yt;Va.takeRight=function(t,e){return(0,Ka.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ka.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ja.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var La={takeUntilAsync:void 0};const Wa=ve;La.takeUntilAsync=function(t,e){return(0,Wa.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Ya={};Ya.takeUntil=void 0,Ya.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $a={take:void 0};const Ha=Lt,Xa=Yt;$a.take=function(t,e){return(0,Xa.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xa.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ha.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Ga={tapAsync:void 0};const Qa=ve;Ga.tapAsync=function(t,e){return(0,Qa.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Za={};Za.tap=void 0,Za.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ts={};ts.toAsyncIterable=void 0,ts.toAsyncIterable=async function*(t){for(const e of t)yield e};var es={};es.transformAsync=void 0,es.transformAsync=async function*(t,e){yield*e(t)};var ns={};ns.transform=void 0,ns.transform=function*(t,e){yield*e(t)};var rs={};rs.uniqAsync=void 0,rs.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var is={uniqByAsync:void 0};const os=ve;is.uniqByAsync=function(t,e){return(0,os.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var as={};as.uniqBy=void 0,as.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var ss={};ss.uniq=void 0,ss.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var cs={zipAsync:void 0};const us=ve;var ls;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(ls||(ls={})),cs.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,us.isAsyncIterable)(t)?[ls.Async,t[Symbol.asyncIterator]()]:[ls.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===ls.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===ls.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var fs={};fs.zip=void 0,fs.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Kt,t),r(Ao,t),r(Io,t),r(xo,t),r(Oo,t),r(No,t),r(Bo,t),r(Fo,t),r(Do,t),r(Lo,t),r(Yo,t),r($o,t),r(Qo,t),r(ta,t),r(ea,t),r(ra,t),r(ua,t),r(na,t),r(fa,t),r(ha,t),r(pa,t),r(ba,t),r(ga,t),r(Ta,t),r(Sa,t),r(Ea,t),r(ka,t),r(Ba,t),r(qa,t),r(Ca,t),r(Ma,t),r(Ra,t),r(Va,t),r(La,t),r(Ya,t),r($a,t),r(Ga,t),r(Za,t),r(ts,t),r(es,t),r(ns,t),r(rs,t),r(is,t),r(as,t),r(ss,t),r(cs,t),r(fs,t)}(Jt);var ds={},ys={};ys.consume=void 0,ys.consume=function(t,e){return e(t)};var hs={eachAsync:void 0};const vs=ve;hs.eachAsync=function(t,e){return(0,vs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var ps={};ps.each=void 0,ps.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ms={everyAsync:void 0};const bs=ve;ms.everyAsync=function(t,e){return(0,bs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var gs={};gs.every=void 0,gs.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var ws={findAsync:void 0};const As=ve;ws.findAsync=function(t,e){return(0,As.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Ts={};Ts.find=void 0,Ts.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Is={};Is.firstAsync=void 0,Is.firstAsync=async function(t){for await(const e of t)return e};var xs={};xs.first=void 0,xs.first=function(t){for(const e of t)return e};var Ss={};Ss.includesAsync=void 0,Ss.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var _s={};_s.includes=void 0,_s.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Os={};Os.matchAsync=void 0,Os.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Es={};Es.match=void 0,Es.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var js={reduceAsync:void 0};const Ns=ve;js.reduceAsync=function(t,e,n){return(0,Ns.isUndefined)(n)?function(t,e){return(0,Ns.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Ns.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var ks={reduce:void 0};const Bs=ve;ks.reduce=function(t,e,n){return(0,Bs.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ps={someAsync:void 0};const qs=ve;Ps.someAsync=function(t,e){return(0,qs.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Cs={};Cs.some=void 0,Cs.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ms={};Ms.lastAsync=void 0,Ms.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Fs={};Fs.last=void 0,Fs.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var zs={toArrayAsync:void 0};const Rs=ys;zs.toArrayAsync=function(t){return(0,Rs.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Us={toArray:void 0};const Ds=ys;Us.toArray=function(t){return(0,Ds.consume)(t,(t=>Array.from(t)))};var Vs={toSetAsync:void 0};const Js=ys;Vs.toSetAsync=function(t){return(0,Js.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ks={toSet:void 0};const Ls=ys;Ks.toSet=function(t){return(0,Ls.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(ys,t),r(hs,t),r(ps,t),r(ms,t),r(gs,t),r(ws,t),r(Ts,t),r(Is,t),r(xs,t),r(Ss,t),r(_s,t),r(Os,t),r(Es,t),r(js,t),r(ks,t),r(Ps,t),r(Cs,t),r(Ms,t),r(Fs,t),r(zs,t),r(Us,t),r(Vs,t),r(Ks,t)}(ds),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Jt,t),r(ds,t)}(Vt);var Ws={},Ys={};Ys.traverseErrorPrototypeChain=void 0,Ys.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Ws.getErrorNames=void 0;const $s=ve,Hs=Ys;Ws.getErrorNames=function*(t){var e;if((0,$s.isError)(t))for(const n of(0,Hs.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Xs={isSerializableError:void 0};const Gs=ve;Xs.isSerializableError=function(t){return(0,Gs.isObject)(t)&&(0,Gs.isString)(t.name)&&(0,Gs.isString)(t.message)&&((0,Gs.isString)(t.stack)||(0,Gs.isNull)(t.stack))&&(0,Gs.isArray)(t.ancestors)&&t.ancestors.every(Gs.isString)},Dt.CustomError=void 0;const Qs=Vt,Zs=Ws,tc=ve,ec=Xs;class nc extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Qs.first)((0,Zs.getErrorNames)(this)))&&void 0!==t?t:nc.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,tc.isError)(t)||(0,ec.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Zs.getErrorNames)(this.prototype)].reverse(),r=(0,Qs.toArray)((0,Zs.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Dt.CustomError=nc;var rc={AssertionError:void 0};const ic=Dt;class oc extends ic.CustomError{}rc.AssertionError=oc;var ac={normalize:void 0};const sc=Ws,cc=Vt;ac.normalize=function(t){var e;const[n,...r]=(0,cc.toArray)((0,sc.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var uc={},lc={},fc={};fc.pass=void 0,fc.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(fc,t)}(lc),uc.hydrate=void 0;const dc=lc;function yc(t,e){const n=function(){(0,dc.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}uc.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=yc(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var hc={assert:void 0};const vc=rc;hc.assert=function(t,e){if(!t)throw new vc.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Dt,t),r(rc,t),r(Xs,t),r(ac,t),r(uc,t),r(hc,t),r(Ws,t),r(Ys,t)}(Ut);var pc={},mc={},bc={},gc={},wc={};wc.go=void 0,wc.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(wc,t)}(gc),bc.chunkAsync=void 0;const Ac=gc,Tc=Ut;bc.chunkAsync=function(t,e){return(0,Tc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Tc.assert)(e>0,"The parameter size must be greater than 0"),(0,Ac.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ic={},xc={},Sc={};function _c(t){return Array.isArray(t)}Sc.isntEmptyArray=Sc.isEmptyArray=Sc.isntArray=Sc.isArray=void 0,Sc.isArray=_c,Sc.isntArray=function(t){return!_c(t)},Sc.isEmptyArray=function(t){return 0===t.length},Sc.isntEmptyArray=function(t){return 0!==t.length};var Oc={},Ec={};function jc(t){return null===t}Ec.isntNull=Ec.isNull=void 0,Ec.isNull=jc,Ec.isntNull=function(t){return!jc(t)};var Nc={};function kc(t){return void 0===t}Nc.isntUndefined=Nc.isUndefined=void 0,Nc.isUndefined=kc,Nc.isntUndefined=function(t){return!kc(t)};var Bc={};function Pc(t){return"function"==typeof t}Bc.isntFunction=Bc.isFunction=void 0,Bc.isFunction=Pc,Bc.isntFunction=function(t){return!Pc(t)},Oc.isntAsyncIterable=Oc.isAsyncIterable=void 0;const qc=Ec,Cc=Nc,Mc=Bc;function Fc(t){return(0,qc.isntNull)(t)&&(0,Cc.isntUndefined)(t)&&(0,Mc.isFunction)(t[Symbol.asyncIterator])}Oc.isAsyncIterable=Fc,Oc.isntAsyncIterable=function(t){return!Fc(t)};var zc={};function Rc(t){return"bigint"==typeof t}zc.isntBigInt=zc.isBigInt=void 0,zc.isBigInt=Rc,zc.isntBigInt=function(t){return!Rc(t)};var Uc={};function Dc(t){return"boolean"==typeof t}Uc.isntBoolean=Uc.isBoolean=void 0,Uc.isBoolean=Dc,Uc.isntBoolean=function(t){return!Dc(t)};var Vc={},Jc={};function Kc(t){return"string"==typeof t}Jc.isntString=Jc.isString=void 0,Jc.isString=Kc,Jc.isntString=function(t){return!Kc(t)},Vc.isntChar=Vc.isChar=void 0;const Lc=Jc;function Wc(t){return(0,Lc.isString)(t)&&1===t.length}Vc.isChar=Wc,Vc.isntChar=function(t){return!Wc(t)};var Yc={};function $c(t){return t instanceof Date}Yc.isntDate=Yc.isDate=void 0,Yc.isDate=$c,Yc.isntDate=function(t){return!$c(t)};var Hc={};Hc.inEnum=void 0,Hc.inEnum=function(t,e){return Object.values(e).includes(t)};var Xc={};function Gc(t){return t instanceof Error}Xc.isntError=Xc.isError=void 0,Xc.isError=Gc,Xc.isntError=function(t){return!Gc(t)};var Qc={};function Zc(t){return!t}Qc.isntFalsy=Qc.isFalsy=void 0,Qc.isFalsy=Zc,Qc.isntFalsy=function(t){return!Zc(t)};var tu={};tu.isntIterable=tu.isIterable=void 0;const eu=Ec,nu=Nc,ru=Bc;function iu(t){return(0,eu.isntNull)(t)&&(0,nu.isntUndefined)(t)&&(0,ru.isFunction)(t[Symbol.iterator])}tu.isIterable=iu,tu.isntIterable=function(t){return!iu(t)};var ou={},au={};function su(t){return"number"==typeof t}function cu(t){return Number.isNaN(t)}au.isntNaN=au.isNaN=au.isNegativeInfinity=au.isPositiveInfinity=au.isFinite=au.isntNumber=au.isNumber=void 0,au.isNumber=su,au.isntNumber=function(t){return!su(t)},au.isFinite=function(t){return Number.isFinite(t)},au.isPositiveInfinity=function(t){return t===1/0},au.isNegativeInfinity=function(t){return t===-1/0},au.isNaN=cu,au.isntNaN=function(t){return!cu(t)};var uu={},lu=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};uu.isntEmptyObject=uu.isEmptyObject=uu.isntPlainObject=uu.isPlainObject=uu.isntObject=uu.isObject=void 0;const fu=lu(ft);function du(t){return null!==t&&"object"==typeof t}function yu(t){return(0,fu.default)(t)}uu.isObject=du,uu.isntObject=function(t){return!du(t)},uu.isPlainObject=yu,uu.isntPlainObject=function(t){return!yu(t)},uu.isEmptyObject=function(t){return 0===Object.keys(t).length},uu.isntEmptyObject=function(t){return 0!==Object.keys(t).length},ou.isntJsonable=ou.isJsonable=ou.isntJson=ou.isJson=void 0;const hu=Ec,vu=Uc,pu=Jc,mu=au,bu=Sc,gu=uu;function wu(t){return(0,hu.isNull)(t)||(0,vu.isBoolean)(t)||(0,pu.isString)(t)||(0,mu.isNumber)(t)||(0,bu.isArray)(t)&&t.every(wu)||(0,gu.isPlainObject)(t)&&Object.values(t).every(wu)}ou.isJson=wu,ou.isntJson=function(t){return!wu(t)},ou.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},ou.isntJsonable=function t(e){return!t()};var Au={};Au.isPromiseLike=Au.isntPromiseLike=Au.isntPromise=Au.isPromise=void 0;const Tu=uu,Iu=Bc;function xu(t){return t instanceof Promise}function Su(t){return(0,Tu.isObject)(t)&&(0,Iu.isFunction)(t.then)}Au.isPromise=xu,Au.isntPromise=function(t){return!xu(t)},Au.isntPromiseLike=function(t){return!Su(t)},Au.isPromiseLike=Su;var _u={};_u.isAbsoluteURL=void 0,_u.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Sc,t),r(Oc,t),r(zc,t),r(Uc,t),r(Vc,t),r(Yc,t),r(Hc,t),r(Xc,t),r(Qc,t),r(Bc,t),r(tu,t),r(ou,t),r(Ec,t),r(au,t),r(uu,t),r(Au,t),r(Jc,t),r(Nc,t),r(_u,t)}(xc),Ic.chunkByAsync=void 0;const Ou=xc;Ic.chunkByAsync=function(t,e){return(0,Ou.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Eu={};Eu.chunkBy=void 0,Eu.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var ju={chunk:void 0};const Nu=gc,ku=Ut;ju.chunk=function(t,e){return(0,ku.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ku.assert)(e>0,"The parameter size must be greater than 0"),(0,Nu.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Bu={concatAsync:void 0};const Pu=xc,qu=gc;Bu.concatAsync=function(t,...e){return(0,qu.go)((async function*(){for(const n of[t,...e])if((0,Pu.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Cu={concat:void 0};const Mu=gc;Cu.concat=function(t,...e){return(0,Mu.go)((function*(){for(const n of[t,...e])yield*n}))};var Fu={},zu={};zu.copyIterable=zu.copyAsyncIterable=void 0,zu.copyAsyncIterable=async function*(t){for await(const e of t)yield e},zu.copyIterable=function*(t){for(const e of t)yield e},Fu.dropAsync=void 0;const Ru=gc,Uu=zu,Du=Ut;Fu.dropAsync=function(t,e){return(0,Du.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Du.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Uu.copyAsyncIterable)(t):(0,Ru.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Vu={dropRightAsync:void 0};const Ju=gc,Ku=zu,Lu=Ut;Vu.dropRightAsync=function(t,e){return(0,Lu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Lu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ku.copyAsyncIterable)(t):(0,Ju.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Wu={dropRight:void 0};const Yu=gc,$u=zu,Hu=Ut;Wu.dropRight=function(t,e){return(0,Hu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,$u.copyIterable)(t):(0,Yu.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Xu={dropUntilAsync:void 0};const Gu=xc;Xu.dropUntilAsync=function(t,e){return(0,Gu.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Qu={};Qu.dropUntil=void 0,Qu.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var Zu={drop:void 0};const tl=gc,el=zu,nl=Ut;Zu.drop=function(t,e){return(0,nl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,nl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,el.copyIterable)(t):(0,tl.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var rl={filterAsync:void 0};const il=xc;rl.filterAsync=function(t,e){return(0,il.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var ol={};ol.filter=void 0,ol.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var al={},sl={},cl={flattenByAsync:void 0};const ul=xc;function ll(t){return(0,ul.isIterable)(t)&&(0,ul.isntChar)(t)}cl.flattenByAsync=function(t,e){return(0,ul.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)ll(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)ll(i)&&await e(i,r)?yield*n(i,r+1):yield i}},sl.flattenDeepAsync=void 0;const fl=cl,dl=Ut;sl.flattenDeepAsync=function(t,e=1/0){return(0,dl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,dl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,fl.flattenByAsync)(t,((t,n)=>n<=e))},al.flattenAsync=void 0;const yl=sl;al.flattenAsync=function(t){return(0,yl.flattenDeepAsync)(t,1)};var hl={flattenBy:void 0};const vl=xc;hl.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,vl.isIterable)(i=o)&&(0,vl.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var pl={flattenDeep:void 0};const ml=hl,bl=Ut;pl.flattenDeep=function(t,e=1/0){return(0,bl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,bl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ml.flattenBy)(t,((t,n)=>n<=e))};var gl={flatten:void 0};const wl=pl;gl.flatten=function(t){return(0,wl.flattenDeep)(t,1)};var Al={mapAsync:void 0};const Tl=xc;Al.mapAsync=function(t,e){return(0,Tl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var Il={};Il.map=void 0,Il.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var xl={repeatAsync:void 0};const Sl=gc,_l=Ut;xl.repeatAsync=function(t,e){return(0,_l.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,_l.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Sl.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ol={repeat:void 0};const El=gc,jl=Ut;Ol.repeat=function(t,e){return(0,jl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,jl.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,El.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Nl={sliceAsync:void 0};const kl=gc,Bl=Ut;Nl.sliceAsync=function(t,e,n=1/0){return(0,Bl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Bl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Bl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Bl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,kl.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Pl={slice:void 0};const ql=gc,Cl=Ut;Pl.slice=function(t,e,n=1/0){return(0,Cl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Cl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Cl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Cl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ql.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Ml={};Ml.splitAsync=void 0,Ml.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Fl={splitByAsync:void 0};const zl=xc;Fl.splitByAsync=function(t,e){return(0,zl.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Rl={};Rl.splitBy=void 0,Rl.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ul={};Ul.split=void 0,Ul.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Dl={takeAsync:void 0};const Vl=gc,Jl=Ut;Dl.takeAsync=function(t,e){return(0,Jl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vl.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Kl={takeRightAsync:void 0};const Ll=gc,Wl=Ut;Kl.takeRightAsync=function(t,e){return(0,Wl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ll.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Yl={takeRight:void 0};const $l=gc,Hl=Ut;Yl.takeRight=function(t,e){return(0,Hl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,$l.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Xl={takeUntilAsync:void 0};const Gl=xc;Xl.takeUntilAsync=function(t,e){return(0,Gl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Ql={};Ql.takeUntil=void 0,Ql.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Zl={take:void 0};const tf=gc,ef=Ut;Zl.take=function(t,e){return(0,ef.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,ef.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,tf.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var nf={tapAsync:void 0};const rf=xc;nf.tapAsync=function(t,e){return(0,rf.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var of={};of.tap=void 0,of.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var af={};af.toAsyncIterable=void 0,af.toAsyncIterable=async function*(t){for(const e of t)yield e};var sf={};sf.transformAsync=void 0,sf.transformAsync=async function*(t,e){yield*e(t)};var cf={};cf.transform=void 0,cf.transform=function*(t,e){yield*e(t)};var uf={};uf.uniqAsync=void 0,uf.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var lf={uniqByAsync:void 0};const ff=xc;lf.uniqByAsync=function(t,e){return(0,ff.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var df={};df.uniqBy=void 0,df.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var yf={};yf.uniq=void 0,yf.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var hf={zipAsync:void 0};const vf=xc;var pf;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(pf||(pf={})),hf.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,a=t.map((t=>(0,vf.isAsyncIterable)(t)?[pf.Async,t[Symbol.asyncIterator]()]:[pf.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=a[e];let i;if(i=n===pf.Async?await r.next():r.next(),i.done)return void(s[e]=!0);t[e]=i.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[o,a]of t)o===pf.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(i=(r=a).return)||void 0===i||i.call(r)}}(t,...e)};var mf={};mf.zip=void 0,mf.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(bc,t),r(Ic,t),r(Eu,t),r(ju,t),r(Bu,t),r(Cu,t),r(Fu,t),r(Vu,t),r(Wu,t),r(Xu,t),r(Qu,t),r(Zu,t),r(rl,t),r(ol,t),r(al,t),r(cl,t),r(hl,t),r(sl,t),r(pl,t),r(gl,t),r(Al,t),r(Il,t),r(xl,t),r(Ol,t),r(Nl,t),r(Pl,t),r(Ml,t),r(Fl,t),r(Rl,t),r(Ul,t),r(Dl,t),r(Kl,t),r(Yl,t),r(Xl,t),r(Ql,t),r(Zl,t),r(nf,t),r(of,t),r(af,t),r(sf,t),r(cf,t),r(uf,t),r(lf,t),r(df,t),r(yf,t),r(hf,t),r(mf,t)}(mc);var bf={},gf={};gf.consume=void 0,gf.consume=function(t,e){return e(t)};var wf={eachAsync:void 0};const Af=xc;wf.eachAsync=function(t,e){return(0,Af.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var Tf={};Tf.each=void 0,Tf.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var If={everyAsync:void 0};const xf=xc;If.everyAsync=function(t,e){return(0,xf.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Sf={};Sf.every=void 0,Sf.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var _f={findAsync:void 0};const Of=xc;_f.findAsync=function(t,e){return(0,Of.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Ef={};Ef.find=void 0,Ef.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var jf={};jf.firstAsync=void 0,jf.firstAsync=async function(t){for await(const e of t)return e};var Nf={};Nf.first=void 0,Nf.first=function(t){for(const e of t)return e};var kf={};kf.includesAsync=void 0,kf.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Bf={};Bf.includes=void 0,Bf.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Pf={};Pf.matchAsync=void 0,Pf.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var qf={};qf.match=void 0,qf.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Cf={reduceAsync:void 0};const Mf=xc;Cf.reduceAsync=function(t,e,n){return(0,Mf.isUndefined)(n)?function(t,e){return(0,Mf.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,a=await o(r),s=1;for(;({value:t,done:i}=await r.next()),!i;)a=await e(a,t,s++);return a}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=await e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Mf.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Ff={reduce:void 0};const zf=xc;Ff.reduce=function(t,e,n){return(0,zf.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,a=o(r),s=1;for(;({value:t,done:i}=r.next()),!i;)a=e(a,t,s++);return a}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Rf={someAsync:void 0};const Uf=xc;Rf.someAsync=function(t,e){return(0,Uf.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Df={};Df.some=void 0,Df.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Vf={};Vf.lastAsync=void 0,Vf.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Jf={};Jf.last=void 0,Jf.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Kf={toArrayAsync:void 0};const Lf=gf;Kf.toArrayAsync=function(t){return(0,Lf.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Wf={toArray:void 0};const Yf=gf;Wf.toArray=function(t){return(0,Yf.consume)(t,(t=>Array.from(t)))};var $f={toSetAsync:void 0};const Hf=gf;$f.toSetAsync=function(t){return(0,Hf.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Xf={toSet:void 0};const Gf=gf;Xf.toSet=function(t){return(0,Gf.consume)(t,(t=>new Set(t)))};var Qf={};Qf.count=void 0,Qf.count=function(t){let e=0;for(const n of t)e++;return e};var Zf={};Zf.countAsync=void 0,Zf.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(gf,t),r(wf,t),r(Tf,t),r(If,t),r(Sf,t),r(_f,t),r(Ef,t),r(jf,t),r(Nf,t),r(kf,t),r(Bf,t),r(Pf,t),r(qf,t),r(Cf,t),r(Ff,t),r(Rf,t),r(Df,t),r(Vf,t),r(Jf,t),r(Kf,t),r(Wf,t),r($f,t),r(Xf,t),r(Qf,t),r(Zf,t)}(bf),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(mc,t),r(bf,t)}(pc);class td{constructor(t){this.map=new Map,Ut.assert(Number.isInteger(t),"The parameter limit must be an integer"),Ut.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.has(t)?this.updateItem(t,e):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e)),this}has(t){return this.map.has(t)}get(t){if(!this.has(t))return;const e=this.map.get(t);return this.updateItem(t,e),e}delete(t){return this.map.delete(t)}clear(){this.map.clear()}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}getColdestKey(){return pc.first(this.map.keys())}}var ed={},nd={},rd={},id={};id.random=void 0,id.random=function(t,e){return Math.random()*(e-t)+t};var od={};od.randomInt=void 0,od.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var ad={};ad.randomIntInclusive=void 0,ad.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(id,t),r(od,t),r(ad,t)}(rd),nd.calculateExponentialBackoffTimeout=void 0;const sd=rd;nd.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:i=!0}){const o=Math.min(r**e*t,n);return i?(0,sd.randomIntInclusive)(0,o):o};var cd={};cd.setTimeout=void 0,cd.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var ud={setSchedule:void 0};const ld=cd;ud.setSchedule=function(t,e){const n=t-Date.now();return(0,ld.setTimeout)(n,e)};var fd={};fd.setInterval=void 0,fd.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var dd={setImmediate:void 0};const yd=cd;dd.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,yd.setTimeout)(0,t)};var hd={setTimeoutLoop:void 0};const vd=cd;hd.setTimeoutLoop=function(t,e){let n=!1,r=(0,vd.setTimeout)(t,(async function i(){await e(),n||(r=(0,vd.setTimeout)(t,i))}));return()=>{n=!0,r()}};var pd={setDynamicTimeoutLoop:void 0};const md=cd;pd.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,md.setTimeout)(t,(async function i(){const o=Date.now();await e();const a=Date.now()-o;n||(r=(0,md.setTimeout)(Math.max(t-a,0),i))}));return()=>{n=!0,r()}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(nd,t),r(cd,t),r(ud,t),r(fd,t),r(dd,t),r(hd,t),r(pd,t)}(ed);class bd{constructor(){this.map=new Map,this.itemMetadataSortedByExpirationTime=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.set(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n),this}has(t){return this.map.has(t)}get(t){return this.map.get(t)}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ed.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}}class gd{constructor(t){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],Ut.assert(Number.isInteger(t),"The parameter limit must be an integer"),Ut.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.has(t)?(this.updateItem(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n)):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e),this.addItemMetadata(t,Date.now()+n)),this}has(t){return this.map.has(t)}get(t){if(this.has(t)){const e=this.map.get(t);return this.updateItem(t,e),e}}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ed.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return pc.first(this.map.keys())}}class wd{constructor(t){this.value=t,this.children=new Map}}class Ad{constructor(){this.root=new wd}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*t(e,r){for(const[i,o]of e.children){const e=[...r,i];n.isntUndefined(o.value)&&(yield[e,o.value]),yield*t(o,e)}}(this.root,[])}keys(){return pc.map(this.entries(),(([t])=>t))}values(){return pc.map(this.entries(),(([t,e])=>e))}set(t,e){let n=this.root;for(const e of t)n.children.has(e)||n.children.set(e,new wd),n=n.children.get(e);return n.value=e,this}has(t){let e=this.root;for(const n of t){if(!e.children.has(n))return!1;e=e.children.get(n)}return void 0!==e.value}get(t){let e=this.root;for(const n of t){if(!e.children.has(n))return;e=e.children.get(n)}return e.value}delete(t){const e=[];let n=this.root;for(const r of t){if(!n.children.has(r))return!1;e.push(n),n=n.children.get(r)}if(delete n.value,0===n.children.size)for(const[n,r]of pc.toArray(pc.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}class Td{constructor(t,e){this.schema=t,this._state=e}get[Symbol.toStringTag](){return this.constructor.name}get state(){return this._state}matches(t){return this._state===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new Id(this.state,t);this._state=this.schema[this.state][t]}}class Id extends Ut.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var _d=function(t,e){return(_d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function xd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}_d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Td(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Od(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Ed(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function jd(t){return"function"==typeof t}function Nd(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var kd=Nd((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Bd(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Pd=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=Td(o),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(jd(c))try{c()}catch(t){i=t instanceof kd?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=Td(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Md(d)}catch(t){i=null!=i?i:[],t instanceof kd?i=Ed(Ed([],Od(i)),Od(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new kd(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Md(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Bd(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Bd(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),qd=Pd.EMPTY;function Cd(t){return t instanceof Pd||t&&"closed"in t&&jd(t.remove)&&jd(t.add)&&jd(t.unsubscribe)}function Md(t){jd(t)?t():t.unsubscribe()}var zd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Rd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ed([t,e],Od(n)))};function Fd(){}function Ud(t){t()}var Dd=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Cd(e)&&e.add(n)):n.destination=Yd,n}return xd(e,t),e.create=function(t,e,n){return new Wd(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Pd),Jd=Function.prototype.bind;function Ld(t,e){return Jd.call(t,e)}var Vd=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Kd(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Kd(t)}else Kd(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Kd(t)}},t}(),Wd=function(t){function e(e,n,r){var i,o,a=t.call(this)||this;jd(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&zd.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},i={next:e.next&&Ld(e.next,o),error:e.error&&Ld(e.error,o),complete:e.complete&&Ld(e.complete,o)}):i=e;return a.destination=new Vd(i),a}return xd(e,t),e}(Dd);function Kd(t){var e;e=t,Rd((function(){throw e}))}var Yd={closed:!0,next:Fd,error:function(t){throw t},complete:Fd},$d="function"==typeof Symbol&&Symbol.observable||"@@observable";function Hd(t){return t}function Xd(t){return 0===t.length?Hd:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Gd=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof Dd||function(t){return t&&jd(t.next)&&jd(t.error)&&jd(t.complete)}(r)&&Cd(r)?t:new Wd(t,e,n);return Ud((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Qd(e))((function(e,r){var i=new Wd({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[$d]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Xd(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Qd(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Qd(t){var e;return null!==(e=null!=t?t:zd.Promise)&&void 0!==e?e:Promise}function Zd(t){return jd(null==t?void 0:t.lift)}function ty(t,e,n,r,i){return new ey(t,e,n,r,i)}var ey=function(t){function e(e,n,r,i,o,a){var s=t.call(this,e)||this;return s.onFinalize=o,s.shouldUnsubscribe=a,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return xd(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(Dd);function ny(){return t=function(t,e){var n=null;t._refCount++;var r=ty(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,i=n;n=null,!r||i&&r!==i||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(Zd(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Zd(e)&&(r.lift=e.lift),r}xd(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Pd;var n=this.getSubject();e.add(this.source.subscribe(ty(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Pd.EMPTY)}return e},e.prototype.refCount=function(){return ny()(this)}}(Gd);var ry,iy,oy={now:function(){return(oy.delegate||performance).now()},delegate:void 0},ay={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Pd((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ay.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Ed([],Od(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,Ed([],Od(t)))},delegate:void 0};iy=ay.schedule,new Gd((function(t){var e=new Pd,n=ry||oy,r=n.now(),i=function(o){var a=n.now();t.next({timestamp:ry?a:o,elapsed:a-r}),t.closed||e.add(iy(i))};return e.add(iy(i)),e}));var sy=Nd((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),cy=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return xd(e,t),e.prototype.lift=function(t){var e=new uy(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new sy},e.prototype.next=function(t){var e=this;Ud((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=Td(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Ud((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Ud((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?qd:(this.currentObservers=null,o.push(t),new Pd((function(){e.currentObservers=null,Bd(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new Gd;return t.source=this,t},e.create=function(t,e){return new uy(t,e)},e}(Gd),uy=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return xd(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:qd},e}(cy);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}xd(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(cy);var ly={now:function(){return(ly.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=ly);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}xd(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,s=n._windowTime;r||(i.push(e),!o&&i.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var a=n.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}}}(cy),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}xd(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,i=e._value,o=e.thrownError,a=e.isStopped,s=e._isComplete;n?t.error(o):(a||s)&&(r&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(cy);var fy,dy=function(t){function e(e,n){return t.call(this)||this}return xd(e,t),e.prototype.schedule=function(t,e){return this},e}(Pd),yy=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Ed([t,e],Od(n)))},hy=function(t){return clearInterval(t)},vy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return xd(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),yy(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;hy(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Bd(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(dy),py=1,my={};function by(t){return t in my&&(delete my[t],!0)}var gy=function(t){var e=py++;return my[e]=!0,fy||(fy=Promise.resolve()),fy.then((function(){return by(e)&&t()})),e},wy=function(t){by(t)},Ay={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ay.delegate;return((null==n?void 0:n.setImmediate)||gy).apply(void 0,Ed([],Od(t)))},clearImmediate:function(t){return wy(t)},delegate:void 0},Iy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xd(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ay.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(Ay.clearImmediate(n),e._scheduled=void 0)},e}(vy),Sy=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=ly.now,t}(),_y=function(t){function e(e,n){void 0===n&&(n=Sy.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return xd(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(Sy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xd(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(_y))(Iy),new _y(vy);var xy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xd(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(vy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xd(e,t),e}(_y))(xy);var Ty=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return xd(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=ay.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(ay.cancelAnimationFrame(n),e._scheduled=void 0)},e}(vy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xd(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(_y))(Ty),function(t){function e(e,n){void 0===e&&(e=Ey),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}xd(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(_y);var Oy,Ey=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return xd(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return Pd.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(vy);new Gd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Oy||(Oy={})),Nd((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Nd((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Nd((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Nd((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Nd((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Gd(Fd);class jy extends Id{constructor(){super(...arguments),this.stateChanges=new cy}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const r=this.state;this.stateChanges.next({event:t,oldState:e,newState:r}),n.isEmptyObject(this.schema[r])&&this.stateChanges.complete()}}class Ny{constructor(){this.values=[],this.valueToValueIndex=[]}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values[Symbol.iterator]()}has(t){return n.isntUndefined(this.valueToValueIndex[t])}add(t){if(!this.has(t)){const e=this.values.length;this.values.push(t),this.valueToValueIndex[t]=e}}remove(t){if(this.has(t)){const e=this.values.pop();if(t===e)this.valueToValueIndex[t]=void 0;else{const n=this.valueToValueIndex[t];this.values[n]=e,this.valueToValueIndex[e]=n,this.valueToValueIndex[t]=void 0}}}}class ky{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.typedArrayConstructor=t,this._length=0,Ut.assert(Number.isInteger(e),"capacity must be an integer"),Ut.assert(e>=0,"capacity must be greater than or equal to 0"),Ut.assert(n>1,"growthFactory must be greater than or equal to 1"),this.array=new t(e),this.growthFactor=n}get internalTypedArray(){return this.array}get[Symbol.toStringTag](){return this.constructor.name}get capacity(){return this.array.length}get length(){return this._length}set(t,e){if(t>=this.capacity){const e=By(this.capacity,t+1,this.growthFactor);this.resize(e)}t>=this._length&&(this._length=t+1),this.array[t]=e}get(t){return t<this._length?this.array[t]:void 0}push(...t){const e=this._length+t.length;if(e>this.capacity){const t=By(this.capacity,e,this.growthFactor);this.resize(t)}for(const e of t)this.array[this._length++]=e}pop(){if(this._length>0){const t=this.array[this._length-1];this._length--;const e=By(this.capacity,this.length,this.growthFactor);return this.resize(e),t}}resize(t){if(this.array.length!==t)if(this.array.length<t){const e=new this.typedArrayConstructor(t);e.set(this.array),this.array=e}else if(this.array.length>t){const e=new this.typedArrayConstructor(t);for(let n=t;n--;)e[n]=this.array[n];this.array=e}}}function By(t,e,n){if(t===e)return e;if(t<e){let r=Math.max(t,1);for(;r<e;)r*=n;return Math.floor(r)}if(0===e)return 0;{let r=t;for(;;){const t=r/n;if(t<e)break;r=t}return Math.floor(r)}}export{Sd as BadEventError,t as Box,ky as DynamicTypedArray,Mt as Emitter,bd as ExpirableMap,Id as FiniteStateMachine,zt as HashMap,Rt as HashSet,td as LRUMap,jy as ObservableFiniteStateMachine,Ft as Queue,Ny as SparseSet,gd as TLRUMap,Ad as TrieMap,Ct as convertArrayToCons,qt as convertConsToArray};
15
+ ***************************************************************************** */var xd=function(t,e){return(xd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function Sd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}xd(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function _d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Od(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Ed(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function jd(t){return"function"==typeof t}function Nd(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var kd=Nd((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Bd(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Pd=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=_d(o),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(jd(c))try{c()}catch(t){i=t instanceof kd?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=_d(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Md(d)}catch(t){i=null!=i?i:[],t instanceof kd?i=Ed(Ed([],Od(i)),Od(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new kd(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Md(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Bd(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Bd(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),qd=Pd.EMPTY;function Cd(t){return t instanceof Pd||t&&"closed"in t&&jd(t.remove)&&jd(t.add)&&jd(t.unsubscribe)}function Md(t){jd(t)?t():t.unsubscribe()}var Fd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},zd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ed([t,e],Od(n)))};function Rd(){}function Ud(t){t()}var Dd=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Cd(e)&&e.add(n)):n.destination=Yd,n}return Sd(e,t),e.create=function(t,e,n){return new Ld(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Pd),Vd=Function.prototype.bind;function Jd(t,e){return Vd.call(t,e)}var Kd=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Wd(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Wd(t)}else Wd(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Wd(t)}},t}(),Ld=function(t){function e(e,n,r){var i,o,a=t.call(this)||this;jd(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&Fd.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},i={next:e.next&&Jd(e.next,o),error:e.error&&Jd(e.error,o),complete:e.complete&&Jd(e.complete,o)}):i=e;return a.destination=new Kd(i),a}return Sd(e,t),e}(Dd);function Wd(t){var e;e=t,zd((function(){throw e}))}var Yd={closed:!0,next:Rd,error:function(t){throw t},complete:Rd},$d="function"==typeof Symbol&&Symbol.observable||"@@observable";function Hd(t){return t}function Xd(t){return 0===t.length?Hd:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Gd=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof Dd||function(t){return t&&jd(t.next)&&jd(t.error)&&jd(t.complete)}(r)&&Cd(r)?t:new Ld(t,e,n);return Ud((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Qd(e))((function(e,r){var i=new Ld({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[$d]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Xd(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Qd(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Qd(t){var e;return null!==(e=null!=t?t:Fd.Promise)&&void 0!==e?e:Promise}function Zd(t){return jd(null==t?void 0:t.lift)}function ty(t,e,n,r,i){return new ey(t,e,n,r,i)}var ey=function(t){function e(e,n,r,i,o,a){var s=t.call(this,e)||this;return s.onFinalize=o,s.shouldUnsubscribe=a,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return Sd(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(Dd);function ny(){return t=function(t,e){var n=null;t._refCount++;var r=ty(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,i=n;n=null,!r||i&&r!==i||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(Zd(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Zd(e)&&(r.lift=e.lift),r}Sd(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Pd;var n=this.getSubject();e.add(this.source.subscribe(ty(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Pd.EMPTY)}return e},e.prototype.refCount=function(){return ny()(this)}}(Gd);var ry,iy,oy={now:function(){return(oy.delegate||performance).now()},delegate:void 0},ay={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Pd((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ay.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Ed([],Od(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,Ed([],Od(t)))},delegate:void 0};iy=ay.schedule,new Gd((function(t){var e=new Pd,n=ry||oy,r=n.now(),i=function(o){var a=n.now();t.next({timestamp:ry?a:o,elapsed:a-r}),t.closed||e.add(iy(i))};return e.add(iy(i)),e}));var sy=Nd((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),cy=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Sd(e,t),e.prototype.lift=function(t){var e=new uy(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new sy},e.prototype.next=function(t){var e=this;Ud((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=_d(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Ud((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Ud((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?qd:(this.currentObservers=null,o.push(t),new Pd((function(){e.currentObservers=null,Bd(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new Gd;return t.source=this,t},e.create=function(t,e){return new uy(t,e)},e}(Gd),uy=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Sd(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:qd},e}(cy);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}Sd(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(cy);var ly={now:function(){return(ly.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=ly);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}Sd(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,s=n._windowTime;r||(i.push(e),!o&&i.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var a=n.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}}}(cy),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}Sd(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,i=e._value,o=e.thrownError,a=e.isStopped,s=e._isComplete;n?t.error(o):(a||s)&&(r&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(cy);var fy,dy=function(t){function e(e,n){return t.call(this)||this}return Sd(e,t),e.prototype.schedule=function(t,e){return this},e}(Pd),yy=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Ed([t,e],Od(n)))},hy=function(t){return clearInterval(t)},vy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return Sd(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),yy(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;hy(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Bd(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(dy),py=1,my={};function by(t){return t in my&&(delete my[t],!0)}var gy=function(t){var e=py++;return my[e]=!0,fy||(fy=Promise.resolve()),fy.then((function(){return by(e)&&t()})),e},wy=function(t){by(t)},Ay={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ay.delegate;return((null==n?void 0:n.setImmediate)||gy).apply(void 0,Ed([],Od(t)))},clearImmediate:function(t){return wy(t)},delegate:void 0},Ty=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Sd(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ay.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(Ay.clearImmediate(n),e._scheduled=void 0)},e}(vy),Iy=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=ly.now,t}(),xy=function(t){function e(e,n){void 0===n&&(n=Iy.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return Sd(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(Iy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sd(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(xy))(Ty),new xy(vy);var Sy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Sd(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(vy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sd(e,t),e}(xy))(Sy);var _y=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Sd(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=ay.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(ay.cancelAnimationFrame(n),e._scheduled=void 0)},e}(vy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sd(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(xy))(_y),function(t){function e(e,n){void 0===e&&(e=Ey),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}Sd(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(xy);var Oy,Ey=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return Sd(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return Pd.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(vy);new Gd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Oy||(Oy={})),Nd((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Nd((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Nd((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Nd((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Nd((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Gd(Rd);class jy extends Td{constructor(){super(...arguments),this.stateChanges=new cy}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const r=this.state;this.stateChanges.next({event:t,oldState:e,newState:r}),n.isEmptyObject(this.schema[r])&&this.stateChanges.complete()}}class Ny{constructor(){this.indexToValue=[],this.valueToIndex=[]}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}has(t){return t in this.valueToIndex}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){if(this.has(t)){const e=this.indexToValue.pop();if(t===e)delete this.valueToIndex[t];else{const n=this.valueToIndex[t];this.indexToValue[n]=e,this.valueToIndex[e]=n,delete this.valueToIndex[t]}}}}class ky{constructor(){this.keyToIndex=[],this.indexToKey=[],this.indexToValue=[]}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue[t]]}keys(){return this.indexToKey.values()}values(){return this.indexToValue.values()}has(t){return t in this.keyToIndex}get(t){if(this.has(t)){const e=this.keyToIndex[t];return this.indexToValue[e]}}set(t,e){if(this.has(t)){const n=this.keyToIndex[t];this.indexToValue[n]=e}else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){if(this.has(t)){const e=this.indexToKey.pop(),n=this.indexToValue.pop();if(t===e)delete this.keyToIndex[t];else{const r=this.keyToIndex[t];this.indexToKey[r]=e,this.indexToValue[r]=n,this.keyToIndex[t]=r,delete this.keyToIndex[t]}}}}class By{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.typedArrayConstructor=t,this._length=0,Ut.assert(Number.isInteger(e),"capacity must be an integer"),Ut.assert(e>=0,"capacity must be greater than or equal to 0"),Ut.assert(n>1,"growthFactory must be greater than or equal to 1"),this.array=new t(e),this.growthFactor=n}get internalTypedArray(){return this.array}get[Symbol.toStringTag](){return this.constructor.name}get capacity(){return this.array.length}get length(){return this._length}set(t,e){if(t>=this.capacity){const e=Py(this.capacity,t+1,this.growthFactor);this.resize(e)}t>=this._length&&(this._length=t+1),this.array[t]=e}get(t){return t<this._length?this.array[t]:void 0}push(...t){const e=this._length+t.length;if(e>this.capacity){const t=Py(this.capacity,e,this.growthFactor);this.resize(t)}for(const e of t)this.array[this._length++]=e}pop(){if(this._length>0){const t=this.array[this._length-1];this._length--;const e=Py(this.capacity,this.length,this.growthFactor);return this.resize(e),t}}resize(t){if(this.array.length!==t)if(this.array.length<t){const e=new this.typedArrayConstructor(t);e.set(this.array),this.array=e}else if(this.array.length>t){const e=new this.typedArrayConstructor(t);for(let n=t;n--;)e[n]=this.array[n];this.array=e}}}function Py(t,e,n){if(t===e)return e;if(t<e){let r=Math.max(t,1);for(;r<e;)r*=n;return Math.floor(r)}if(0===e)return 0;{let r=t;for(;;){const t=r/n;if(t<e)break;r=t}return Math.floor(r)}}class qy{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.indexToValue=new By(t,{capacity:e,growthFactor:n}),this.keyToIndex=new By(Uint32Array,{capacity:e,growthFactor:n}),this.indexToKey=new By(Uint32Array,{capacity:e,growthFactor:n})}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey.internalTypedArray[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.internalTypedArray.values()}values(){return this.indexToValue.internalTypedArray.values()}has(t){const e=this.keyToIndex.internalTypedArray[t];return this.indexToKey.internalTypedArray[e]===t}get(t){const e=this.keyToIndex.internalTypedArray[t];return this.indexToKey.internalTypedArray[e]===t?this.indexToValue.internalTypedArray[e]:void 0}set(t,e){const n=this.keyToIndex.internalTypedArray[t];if(this.indexToKey.internalTypedArray[n]===t)this.indexToValue.internalTypedArray[n]=e;else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex.set(t,n)}}delete(t){const e=this.keyToIndex.internalTypedArray[t];if(this.indexToKey.internalTypedArray[e]===t){const n=this.indexToKey.pop(),r=this.indexToValue.pop();t!==n&&(this.indexToKey.internalTypedArray[e]=n,this.indexToValue.internalTypedArray[e]=r,this.keyToIndex.internalTypedArray[n]=e)}}}class Cy{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.indexToValue=new By(t,{capacity:e,growthFactor:n}),this.valueToIndex=new By(Uint32Array,{capacity:e,growthFactor:n})}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue.internalTypedArray[Symbol.iterator]()}has(t){const e=this.valueToIndex.internalTypedArray[t];return this.indexToValue.internalTypedArray[e]===t}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex.set(t,e)}}delete(t){const e=this.valueToIndex.internalTypedArray[t];if(this.indexToValue.internalTypedArray[e]===t){const n=this.indexToValue.pop();t!==n&&(this.indexToValue.internalTypedArray[e]=n,this.valueToIndex.internalTypedArray[n]=e)}}}export{Id as BadEventError,t as Box,By as DynamicTypedArray,Mt as Emitter,bd as ExpirableMap,Td as FiniteStateMachine,Ft as HashMap,zt as HashSet,td as LRUMap,jy as ObservableFiniteStateMachine,Rt as Queue,ky as SparseMap,Ny as SparseSet,gd as TLRUMap,Ad as TrieMap,qy as TypedSparseMap,Cy as TypedSparseSet,Ct as convertArrayToCons,qt as convertConsToArray};
16
16
  //# sourceMappingURL=index.min.mjs.map