@blackglory/structures 0.10.0 → 0.10.1

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 (42) hide show
  1. package/README.md +18 -1
  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 +198 -3
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +198 -2
  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 +198 -3
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +198 -2
  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 +1 -0
  19. package/lib/es2015/index.js +1 -0
  20. package/lib/es2015/index.js.map +1 -1
  21. package/lib/es2015/sorted-set.d.ts +10 -0
  22. package/lib/es2015/sorted-set.js +32 -0
  23. package/lib/es2015/sorted-set.js.map +1 -0
  24. package/lib/es2015/sparse-set.d.ts +1 -0
  25. package/lib/es2015/sparse-set.js +8 -2
  26. package/lib/es2015/sparse-set.js.map +1 -1
  27. package/lib/es2015/utils/skip-list.d.ts +24 -0
  28. package/lib/es2015/utils/skip-list.js +155 -0
  29. package/lib/es2015/utils/skip-list.js.map +1 -0
  30. package/lib/es2018/index.d.ts +1 -0
  31. package/lib/es2018/index.js +1 -0
  32. package/lib/es2018/index.js.map +1 -1
  33. package/lib/es2018/sorted-set.d.ts +10 -0
  34. package/lib/es2018/sorted-set.js +32 -0
  35. package/lib/es2018/sorted-set.js.map +1 -0
  36. package/lib/es2018/sparse-set.d.ts +1 -0
  37. package/lib/es2018/sparse-set.js +8 -2
  38. package/lib/es2018/sparse-set.js.map +1 -1
  39. package/lib/es2018/utils/skip-list.d.ts +24 -0
  40. package/lib/es2018/utils/skip-list.js +155 -0
  41. package/lib/es2018/utils/skip-list.js.map +1 -0
  42. package/package.json +1 -1
@@ -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={},s={};function a(t){return null===t}s.isntNull=s.isNull=void 0,s.isNull=a,s.isntNull=function(t){return!a(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=s,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 x=A;function I(t){return(0,x.isString)(t)&&1===t.length}w.isChar=I,w.isntChar=function(t){return!I(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=s,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={},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},st=Function.prototype,at=Object.prototype,ct=st.toString,ut=at.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=s,mt=b,bt=A,gt=R,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)}z.isJson=Tt,z.isntJson=function(t){return!Tt(t)},z.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},z.isntJsonable=function t(e){return!t()};var xt={};xt.isPromiseLike=xt.isntPromiseLike=xt.isntPromise=xt.isPromise=void 0;const It=D,St=l;function _t(t){return t instanceof Promise}function Ot(t){return(0,It.isObject)(t)&&(0,St.isFunction)(t.then)}xt.isPromise=_t,xt.isntPromise=function(t){return!_t(t)},xt.isntPromiseLike=function(t){return!Ot(t)},xt.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(z,jt),kt(s,jt),kt(R,jt),kt(D,jt),kt(xt,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={},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 se extends oe.CustomError{}ie.AssertionError=se;var ae={};ae.normalize=void 0,ae.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(ae,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 xe=ge,Ie=Ae;function Se(t){return(0,xe.isntNull)(t)&&(0,Ie.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 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 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 sn=on(rn);function an(t){return null!==t&&"object"==typeof t}function cn(t){return(0,sn.default)(t)}He.isObject=an,He.isntObject=function(t){return!an(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 xn={};xn.isAbsoluteURL=void 0,xn.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(ze,t),r(Re,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(xn,t)}(ve),he.chunkByAsync=void 0;const In=ve;he.chunkByAsync=function(t,e){return(0,In.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,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=Lt,Dn=Cn,Vn=Qt;Fn.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 sr=ve;function ar(t){return(0,sr.isIterable)(t)&&(0,sr.isntChar)(t)}or.flattenByAsync=function(t,e){return(0,sr.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)ar(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)ar(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,xr=Qt;Ar.repeatAsync=function(t,e){return(0,xr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,xr.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 Ir={repeat:void 0};const Sr=Lt,_r=Qt;Ir.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 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=Lt,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 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 si={uniqByAsync:void 0};const ai=ve;si.uniqByAsync=function(t,e){return(0,ai.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,s=t.map((t=>(0,fi.isAsyncIterable)(t)?[di.Async,t[Symbol.asyncIterator]()]:[di.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===di.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===di.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).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(Fn,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(Ir,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(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(si,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 xi=ve;Ti.findAsync=function(t,e){return(0,xi.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 Ii={};Ii.find=void 0,Ii.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,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}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 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(Ii,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(zi,t),r(Ri,t),r(Fi,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 so=$t;class ao extends so.CustomError{}oo.AssertionError=ao;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 xo={};xo.chunkBy=void 0,xo.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 Io={chunk:void 0};const So=Lt,_o=Yt;Io.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 zo={dropRightAsync:void 0};const Ro=Lt,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 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 ts={};ts.filter=void 0,ts.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var es={},ns={},rs={flattenByAsync:void 0};const is=ve;function os(t){return(0,is.isIterable)(t)&&(0,is.isntChar)(t)}rs.flattenByAsync=function(t,e){return(0,is.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)os(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)os(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ns.flattenDeepAsync=void 0;const ss=rs,as=Yt;ns.flattenDeepAsync=function(t,e=1/0){return(0,as.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,as.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ss.flattenByAsync)(t,((t,n)=>n<=e))},es.flattenAsync=void 0;const cs=ns;es.flattenAsync=function(t){return(0,cs.flattenDeepAsync)(t,1)};var us={flattenBy:void 0};const ls=ve;us.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,ls.isIterable)(i=o)&&(0,ls.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var fs={flattenDeep:void 0};const ds=us,ys=Yt;fs.flattenDeep=function(t,e=1/0){return(0,ys.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ys.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ds.flattenBy)(t,((t,n)=>n<=e))};var hs={flatten:void 0};const vs=fs;hs.flatten=function(t){return(0,vs.flattenDeep)(t,1)};var ps={mapAsync:void 0};const ms=ve;ps.mapAsync=function(t,e){return(0,ms.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 bs={};bs.map=void 0,bs.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var gs={repeatAsync:void 0};const ws=Lt,As=Yt;gs.repeatAsync=function(t,e){return(0,As.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,As.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,ws.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 Ts={repeat:void 0};const xs=Lt,Is=Yt;Ts.repeat=function(t,e){return(0,Is.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Is.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,xs.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 Ss={sliceAsync:void 0};const _s=Lt,Os=Yt;Ss.sliceAsync=function(t,e,n=1/0){return(0,Os.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Os.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Os.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Os.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,_s.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Es={slice:void 0};const js=Lt,Ns=Yt;Es.slice=function(t,e,n=1/0){return(0,Ns.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Ns.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Ns.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Ns.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,js.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ks={};ks.splitAsync=void 0,ks.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Bs={splitByAsync:void 0};const Ps=ve;Bs.splitByAsync=function(t,e){return(0,Ps.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 qs={};qs.splitBy=void 0,qs.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 Cs={};Cs.split=void 0,Cs.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ms={takeAsync:void 0};const zs=Lt,Rs=Yt;Ms.takeAsync=function(t,e){return(0,Rs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,zs.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Fs={takeRightAsync:void 0};const Us=Lt,Ds=Yt;Fs.takeRightAsync=function(t,e){return(0,Ds.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ds.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Us.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 Vs={takeRight:void 0};const Js=Lt,Ks=Yt;Vs.takeRight=function(t,e){return(0,Ks.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ks.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Js.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 Ls={takeUntilAsync:void 0};const Ws=ve;Ls.takeUntilAsync=function(t,e){return(0,Ws.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 Ys={};Ys.takeUntil=void 0,Ys.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $s={take:void 0};const Hs=Lt,Xs=Yt;$s.take=function(t,e){return(0,Xs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Hs.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Gs={tapAsync:void 0};const Qs=ve;Gs.tapAsync=function(t,e){return(0,Qs.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 Zs={};Zs.tap=void 0,Zs.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ta={};ta.toAsyncIterable=void 0,ta.toAsyncIterable=async function*(t){for(const e of t)yield e};var ea={};ea.transformAsync=void 0,ea.transformAsync=async function*(t,e){yield*e(t)};var na={};na.transform=void 0,na.transform=function*(t,e){yield*e(t)};var ra={};ra.uniqAsync=void 0,ra.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ia={uniqByAsync:void 0};const oa=ve;ia.uniqByAsync=function(t,e){return(0,oa.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 sa={};sa.uniqBy=void 0,sa.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 aa={};aa.uniq=void 0,aa.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var ca={zipAsync:void 0};const ua=ve;var la;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(la||(la={})),ca.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,ua.isAsyncIterable)(t)?[la.Async,t[Symbol.asyncIterator]()]:[la.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===la.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===la.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var fa={};fa.zip=void 0,fa.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(xo,t),r(Io,t),r(Oo,t),r(No,t),r(Bo,t),r(zo,t),r(Do,t),r(Lo,t),r(Yo,t),r($o,t),r(Qo,t),r(ts,t),r(es,t),r(rs,t),r(us,t),r(ns,t),r(fs,t),r(hs,t),r(ps,t),r(bs,t),r(gs,t),r(Ts,t),r(Ss,t),r(Es,t),r(ks,t),r(Bs,t),r(qs,t),r(Cs,t),r(Ms,t),r(Fs,t),r(Vs,t),r(Ls,t),r(Ys,t),r($s,t),r(Gs,t),r(Zs,t),r(ta,t),r(ea,t),r(na,t),r(ra,t),r(ia,t),r(sa,t),r(aa,t),r(ca,t),r(fa,t)}(Jt);var da={},ya={};ya.consume=void 0,ya.consume=function(t,e){return e(t)};var ha={eachAsync:void 0};const va=ve;ha.eachAsync=function(t,e){return(0,va.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 pa={};pa.each=void 0,pa.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ma={everyAsync:void 0};const ba=ve;ma.everyAsync=function(t,e){return(0,ba.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 ga={};ga.every=void 0,ga.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var wa={findAsync:void 0};const Aa=ve;wa.findAsync=function(t,e){return(0,Aa.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 Ta={};Ta.find=void 0,Ta.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var xa={};xa.firstAsync=void 0,xa.firstAsync=async function(t){for await(const e of t)return e};var Ia={};Ia.first=void 0,Ia.first=function(t){for(const e of t)return e};var Sa={};Sa.includesAsync=void 0,Sa.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var _a={};_a.includes=void 0,_a.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Oa={};Oa.matchAsync=void 0,Oa.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 Ea={};Ea.match=void 0,Ea.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 ja={reduceAsync:void 0};const Na=ve;ja.reduceAsync=function(t,e,n){return(0,Na.isUndefined)(n)?function(t,e){return(0,Na.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}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,Na.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 ka={reduce:void 0};const Ba=ve;ka.reduce=function(t,e,n){return(0,Ba.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}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 Pa={someAsync:void 0};const qa=ve;Pa.someAsync=function(t,e){return(0,qa.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 Ca={};Ca.some=void 0,Ca.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ma={};Ma.lastAsync=void 0,Ma.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 za={};za.last=void 0,za.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 Ra={toArrayAsync:void 0};const Fa=ya;Ra.toArrayAsync=function(t){return(0,Fa.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Ua={toArray:void 0};const Da=ya;Ua.toArray=function(t){return(0,Da.consume)(t,(t=>Array.from(t)))};var Va={toSetAsync:void 0};const Ja=ya;Va.toSetAsync=function(t){return(0,Ja.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ka={toSet:void 0};const La=ya;Ka.toSet=function(t){return(0,La.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(ya,t),r(ha,t),r(pa,t),r(ma,t),r(ga,t),r(wa,t),r(Ta,t),r(xa,t),r(Ia,t),r(Sa,t),r(_a,t),r(Oa,t),r(Ea,t),r(ja,t),r(ka,t),r(Pa,t),r(Ca,t),r(Ma,t),r(za,t),r(Ra,t),r(Ua,t),r(Va,t),r(Ka,t)}(da),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(da,t)}(Vt);var Wa={},Ya={};Ya.traverseErrorPrototypeChain=void 0,Ya.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Wa.getErrorNames=void 0;const $a=ve,Ha=Ya;Wa.getErrorNames=function*(t){var e;if((0,$a.isError)(t))for(const n of(0,Ha.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 Xa={isSerializableError:void 0};const Ga=ve;Xa.isSerializableError=function(t){return(0,Ga.isObject)(t)&&(0,Ga.isString)(t.name)&&(0,Ga.isString)(t.message)&&((0,Ga.isString)(t.stack)||(0,Ga.isNull)(t.stack))&&(0,Ga.isArray)(t.ancestors)&&t.ancestors.every(Ga.isString)},Dt.CustomError=void 0;const Qa=Vt,Za=Wa,tc=ve,ec=Xa;class nc extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Qa.first)((0,Za.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,Za.getErrorNames)(this.prototype)].reverse(),r=(0,Qa.toArray)((0,Za.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 sc={normalize:void 0};const ac=Wa,cc=Vt;sc.normalize=function(t){var e;const[n,...r]=(0,cc.toArray)((0,ac.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(Xa,t),r(sc,t),r(uc,t),r(hc,t),r(Wa,t),r(Ya,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 xc={},Ic={},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 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 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={},su={};function au(t){return"number"==typeof t}function cu(t){return Number.isNaN(t)}su.isntNaN=su.isNaN=su.isNegativeInfinity=su.isPositiveInfinity=su.isFinite=su.isntNumber=su.isNumber=void 0,su.isNumber=au,su.isntNumber=function(t){return!au(t)},su.isFinite=function(t){return Number.isFinite(t)},su.isPositiveInfinity=function(t){return t===1/0},su.isNegativeInfinity=function(t){return t===-1/0},su.isNaN=cu,su.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=su,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,xu=Bc;function Iu(t){return t instanceof Promise}function Su(t){return(0,Tu.isObject)(t)&&(0,xu.isFunction)(t.then)}Au.isPromise=Iu,Au.isntPromise=function(t){return!Iu(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(Rc,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(su,t),r(uu,t),r(Au,t),r(Jc,t),r(Nc,t),r(_u,t)}(Ic),xc.chunkByAsync=void 0;const Ou=Ic;xc.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=Ic,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 Vu={dropRightAsync:void 0};const Ju=gc,Ku=Ru,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=Ru,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=Ic;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=Ic;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 sl={},al={},cl={flattenByAsync:void 0};const ul=Ic;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}},al.flattenDeepAsync=void 0;const fl=cl,dl=Ut;al.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))},sl.flattenAsync=void 0;const yl=al;sl.flattenAsync=function(t){return(0,yl.flattenDeepAsync)(t,1)};var hl={flattenBy:void 0};const vl=Ic;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=Ic;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 xl={};xl.map=void 0,xl.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Il={repeatAsync:void 0};const Sl=gc,_l=Ut;Il.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 zl={splitByAsync:void 0};const Rl=Ic;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 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=Ic;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=Ic;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 sf={};sf.toAsyncIterable=void 0,sf.toAsyncIterable=async function*(t){for(const e of t)yield e};var af={};af.transformAsync=void 0,af.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=Ic;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=Ic;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,s=t.map((t=>(0,vf.isAsyncIterable)(t)?[pf.Async,t[Symbol.asyncIterator]()]:[pf.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===pf.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===pf.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).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(xc,t),r(Eu,t),r(ju,t),r(Bu,t),r(Cu,t),r(zu,t),r(Vu,t),r(Wu,t),r(Xu,t),r(Qu,t),r(Zu,t),r(rl,t),r(ol,t),r(sl,t),r(cl,t),r(hl,t),r(al,t),r(pl,t),r(gl,t),r(Al,t),r(xl,t),r(Il,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(Kl,t),r(Yl,t),r(Xl,t),r(Ql,t),r(Zl,t),r(nf,t),r(of,t),r(sf,t),r(af,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=Ic;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 xf={everyAsync:void 0};const If=Ic;xf.everyAsync=function(t,e){return(0,If.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=Ic;_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=Ic;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,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}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=Ic;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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}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=Ic;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 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(xf,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(zf,t),r(Ff,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 sd={};sd.randomIntInclusive=void 0,sd.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(sd,t)}(rd),nd.calculateExponentialBackoffTimeout=void 0;const ad=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,ad.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 s=Date.now()-o;n||(r=(0,md.setTimeout)(Math.max(t-s,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 xd(this.state,t);this._state=this.schema[this.state][t]}}class xd 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={},s={};function a(t){return null===t}s.isntNull=s.isNull=void 0,s.isNull=a,s.isntNull=function(t){return!a(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=s,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 x(t){return"string"==typeof t}A.isntString=A.isString=void 0,A.isString=x,A.isntString=function(t){return!x(t)},w.isntChar=w.isChar=void 0;const T=A;function I(t){return(0,T.isString)(t)&&1===t.length}w.isChar=I,w.isntChar=function(t){return!I(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=s,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={},V="object"==typeof e&&e&&e.Object===Object&&e,J="object"==typeof self&&self&&self.Object===Object&&self,L=(V||J||Function("return this")()).Symbol,K=L,W=Object.prototype,Y=W.hasOwnProperty,$=W.toString,H=K?K.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=L?L.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},st=Function.prototype,at=Object.prototype,ct=st.toString,ut=at.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=s,mt=b,bt=A,gt=R,wt=r,At=D;function xt(t){return(0,pt.isNull)(t)||(0,mt.isBoolean)(t)||(0,bt.isString)(t)||(0,gt.isNumber)(t)||(0,wt.isArray)(t)&&t.every(xt)||(0,At.isPlainObject)(t)&&Object.values(t).every(xt)}z.isJson=xt,z.isntJson=function(t){return!xt(t)},z.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},z.isntJsonable=function t(e){return!t()};var Tt={};Tt.isPromiseLike=Tt.isntPromiseLike=Tt.isntPromise=Tt.isPromise=void 0;const It=D,St=l;function _t(t){return t instanceof Promise}function Ot(t){return(0,It.isObject)(t)&&(0,St.isFunction)(t.then)}Tt.isPromise=_t,Tt.isntPromise=function(t){return!_t(t)},Tt.isntPromiseLike=function(t){return!Ot(t)},Tt.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(z,jt),kt(s,jt),kt(R,jt),kt(D,jt),kt(Tt,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={},Vt={},Jt={},Lt={},Kt={},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)}(Kt);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 se extends oe.CustomError{}ie.AssertionError=se;var ae={};ae.normalize=void 0,ae.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(ae,t),r(ce,t),r(le,t)}(Qt),Gt.chunkAsync=void 0;const de=Kt,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 xe(t){return void 0===t}Ae.isntUndefined=Ae.isUndefined=void 0,Ae.isUndefined=xe,Ae.isntUndefined=function(t){return!xe(t)},be.isntAsyncIterable=be.isAsyncIterable=void 0;const Te=ge,Ie=Ae;function Se(t){return(0,Te.isntNull)(t)&&(0,Ie.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 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 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 Le={};Le.isntIterable=Le.isIterable=void 0;const Ke=ge,We=Ae;function Ye(t){return(0,Ke.isntNull)(t)&&(0,We.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Le.isIterable=Ye,Le.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 sn=on(rn);function an(t){return null!==t&&"object"==typeof t}function cn(t){return(0,sn.default)(t)}He.isObject=an,He.isntObject=function(t){return!an(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 xn={};xn.isntJson=xn.isJson=void 0,xn.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},xn.isntJson=function t(e){return!t()};var Tn={};Tn.isAbsoluteURL=void 0,Tn.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(ze,t),r(Re,t),r(Ue,t),r(Ve,t),r(Le,t),r($e,t),r(xn,t),r(ge,t),r(un,t),r(He,t),r(ke,t),r(Ae,t),r(Tn,t)}(ve),he.chunkByAsync=void 0;const In=ve;he.chunkByAsync=function(t,e){return(0,In.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=Kt,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=Kt;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=Kt;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=Kt,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=Kt,Dn=Cn,Vn=Qt;Fn.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 Ln=Kt,Kn=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,Kn.copyIterable)(t):(0,Ln.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=Kt,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 sr=ve;function ar(t){return(0,sr.isIterable)(t)&&(0,sr.isntChar)(t)}or.flattenByAsync=function(t,e){return(0,sr.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)ar(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)ar(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 xr=Kt,Tr=Qt;Ar.repeatAsync=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)((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 Ir={repeat:void 0};const Sr=Kt,_r=Qt;Ir.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=Kt,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=Kt,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=Kt,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 Vr=Kt,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 Lr={takeRight:void 0};const Kr=Kt,Wr=Qt;Lr.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,Kr.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=Kt,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 si={uniqByAsync:void 0};const ai=ve;si.uniqByAsync=function(t,e){return(0,ai.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,s=t.map((t=>(0,fi.isAsyncIterable)(t)?[di.Async,t[Symbol.asyncIterator]()]:[di.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===di.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===di.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).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(Fn,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(Ir,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(Lr,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(si,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 xi={findAsync:void 0};const Ti=ve;xi.findAsync=function(t,e){return(0,Ti.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 Ii={};Ii.find=void 0,Ii.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,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}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 Vi={toArray:void 0};const Ji=vi;Vi.toArray=function(t){return(0,Ji.consume)(t,(t=>Array.from(t)))};var Li={toSetAsync:void 0};const Ki=vi;Li.toSetAsync=function(t){return(0,Ki.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(xi,t),r(Ii,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(zi,t),r(Ri,t),r(Fi,t),r(Ui,t),r(Vi,t),r(Li,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 so=$t;class ao extends so.CustomError{}oo.AssertionError=ao;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),Lt.chunkAsync=void 0;const go=Kt,wo=Yt;Lt.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 xo=ve;Ao.chunkByAsync=function(t,e){return(0,xo.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 To={};To.chunkBy=void 0,To.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 Io={chunk:void 0};const So=Kt,_o=Yt;Io.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=Kt;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=Kt;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=Kt,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=Kt,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 Vo=Kt,Jo=Po,Lo=Yt;Do.dropRight=function(t,e){return(0,Lo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Lo.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 Ko={dropUntilAsync:void 0};const Wo=ve;Ko.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=Kt,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 ts={};ts.filter=void 0,ts.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var es={},ns={},rs={flattenByAsync:void 0};const is=ve;function os(t){return(0,is.isIterable)(t)&&(0,is.isntChar)(t)}rs.flattenByAsync=function(t,e){return(0,is.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)os(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)os(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ns.flattenDeepAsync=void 0;const ss=rs,as=Yt;ns.flattenDeepAsync=function(t,e=1/0){return(0,as.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,as.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ss.flattenByAsync)(t,((t,n)=>n<=e))},es.flattenAsync=void 0;const cs=ns;es.flattenAsync=function(t){return(0,cs.flattenDeepAsync)(t,1)};var us={flattenBy:void 0};const ls=ve;us.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,ls.isIterable)(i=o)&&(0,ls.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var fs={flattenDeep:void 0};const ds=us,ys=Yt;fs.flattenDeep=function(t,e=1/0){return(0,ys.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ys.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ds.flattenBy)(t,((t,n)=>n<=e))};var hs={flatten:void 0};const vs=fs;hs.flatten=function(t){return(0,vs.flattenDeep)(t,1)};var ps={mapAsync:void 0};const ms=ve;ps.mapAsync=function(t,e){return(0,ms.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 bs={};bs.map=void 0,bs.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var gs={repeatAsync:void 0};const ws=Kt,As=Yt;gs.repeatAsync=function(t,e){return(0,As.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,As.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,ws.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 xs={repeat:void 0};const Ts=Kt,Is=Yt;xs.repeat=function(t,e){return(0,Is.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Is.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,Ts.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 Ss={sliceAsync:void 0};const _s=Kt,Os=Yt;Ss.sliceAsync=function(t,e,n=1/0){return(0,Os.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Os.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Os.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Os.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,_s.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Es={slice:void 0};const js=Kt,Ns=Yt;Es.slice=function(t,e,n=1/0){return(0,Ns.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Ns.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Ns.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Ns.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,js.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ks={};ks.splitAsync=void 0,ks.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Bs={splitByAsync:void 0};const Ps=ve;Bs.splitByAsync=function(t,e){return(0,Ps.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 qs={};qs.splitBy=void 0,qs.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 Cs={};Cs.split=void 0,Cs.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ms={takeAsync:void 0};const zs=Kt,Rs=Yt;Ms.takeAsync=function(t,e){return(0,Rs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,zs.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Fs={takeRightAsync:void 0};const Us=Kt,Ds=Yt;Fs.takeRightAsync=function(t,e){return(0,Ds.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ds.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Us.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 Vs={takeRight:void 0};const Js=Kt,Ls=Yt;Vs.takeRight=function(t,e){return(0,Ls.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ls.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Js.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 Ks={takeUntilAsync:void 0};const Ws=ve;Ks.takeUntilAsync=function(t,e){return(0,Ws.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 Ys={};Ys.takeUntil=void 0,Ys.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $s={take:void 0};const Hs=Kt,Xs=Yt;$s.take=function(t,e){return(0,Xs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Hs.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Gs={tapAsync:void 0};const Qs=ve;Gs.tapAsync=function(t,e){return(0,Qs.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 Zs={};Zs.tap=void 0,Zs.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ta={};ta.toAsyncIterable=void 0,ta.toAsyncIterable=async function*(t){for(const e of t)yield e};var ea={};ea.transformAsync=void 0,ea.transformAsync=async function*(t,e){yield*e(t)};var na={};na.transform=void 0,na.transform=function*(t,e){yield*e(t)};var ra={};ra.uniqAsync=void 0,ra.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ia={uniqByAsync:void 0};const oa=ve;ia.uniqByAsync=function(t,e){return(0,oa.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 sa={};sa.uniqBy=void 0,sa.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 aa={};aa.uniq=void 0,aa.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var ca={zipAsync:void 0};const ua=ve;var la;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(la||(la={})),ca.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,ua.isAsyncIterable)(t)?[la.Async,t[Symbol.asyncIterator]()]:[la.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===la.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===la.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var fa={};fa.zip=void 0,fa.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(Lt,t),r(Ao,t),r(To,t),r(Io,t),r(Oo,t),r(No,t),r(Bo,t),r(zo,t),r(Do,t),r(Ko,t),r(Yo,t),r($o,t),r(Qo,t),r(ts,t),r(es,t),r(rs,t),r(us,t),r(ns,t),r(fs,t),r(hs,t),r(ps,t),r(bs,t),r(gs,t),r(xs,t),r(Ss,t),r(Es,t),r(ks,t),r(Bs,t),r(qs,t),r(Cs,t),r(Ms,t),r(Fs,t),r(Vs,t),r(Ks,t),r(Ys,t),r($s,t),r(Gs,t),r(Zs,t),r(ta,t),r(ea,t),r(na,t),r(ra,t),r(ia,t),r(sa,t),r(aa,t),r(ca,t),r(fa,t)}(Jt);var da={},ya={};ya.consume=void 0,ya.consume=function(t,e){return e(t)};var ha={eachAsync:void 0};const va=ve;ha.eachAsync=function(t,e){return(0,va.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 pa={};pa.each=void 0,pa.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ma={everyAsync:void 0};const ba=ve;ma.everyAsync=function(t,e){return(0,ba.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 ga={};ga.every=void 0,ga.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var wa={findAsync:void 0};const Aa=ve;wa.findAsync=function(t,e){return(0,Aa.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 xa={};xa.find=void 0,xa.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Ta={};Ta.firstAsync=void 0,Ta.firstAsync=async function(t){for await(const e of t)return e};var Ia={};Ia.first=void 0,Ia.first=function(t){for(const e of t)return e};var Sa={};Sa.includesAsync=void 0,Sa.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var _a={};_a.includes=void 0,_a.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Oa={};Oa.matchAsync=void 0,Oa.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 Ea={};Ea.match=void 0,Ea.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 ja={reduceAsync:void 0};const Na=ve;ja.reduceAsync=function(t,e,n){return(0,Na.isUndefined)(n)?function(t,e){return(0,Na.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}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,Na.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 ka={reduce:void 0};const Ba=ve;ka.reduce=function(t,e,n){return(0,Ba.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}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 Pa={someAsync:void 0};const qa=ve;Pa.someAsync=function(t,e){return(0,qa.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 Ca={};Ca.some=void 0,Ca.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ma={};Ma.lastAsync=void 0,Ma.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 za={};za.last=void 0,za.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 Ra={toArrayAsync:void 0};const Fa=ya;Ra.toArrayAsync=function(t){return(0,Fa.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Ua={toArray:void 0};const Da=ya;Ua.toArray=function(t){return(0,Da.consume)(t,(t=>Array.from(t)))};var Va={toSetAsync:void 0};const Ja=ya;Va.toSetAsync=function(t){return(0,Ja.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var La={toSet:void 0};const Ka=ya;La.toSet=function(t){return(0,Ka.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(ya,t),r(ha,t),r(pa,t),r(ma,t),r(ga,t),r(wa,t),r(xa,t),r(Ta,t),r(Ia,t),r(Sa,t),r(_a,t),r(Oa,t),r(Ea,t),r(ja,t),r(ka,t),r(Pa,t),r(Ca,t),r(Ma,t),r(za,t),r(Ra,t),r(Ua,t),r(Va,t),r(La,t)}(da),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(da,t)}(Vt);var Wa={},Ya={};Ya.traverseErrorPrototypeChain=void 0,Ya.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Wa.getErrorNames=void 0;const $a=ve,Ha=Ya;Wa.getErrorNames=function*(t){var e;if((0,$a.isError)(t))for(const n of(0,Ha.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 Xa={isSerializableError:void 0};const Ga=ve;Xa.isSerializableError=function(t){return(0,Ga.isObject)(t)&&(0,Ga.isString)(t.name)&&(0,Ga.isString)(t.message)&&((0,Ga.isString)(t.stack)||(0,Ga.isNull)(t.stack))&&(0,Ga.isArray)(t.ancestors)&&t.ancestors.every(Ga.isString)},Dt.CustomError=void 0;const Qa=Vt,Za=Wa,tc=ve,ec=Xa;class nc extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Qa.first)((0,Za.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,Za.getErrorNames)(this.prototype)].reverse(),r=(0,Qa.toArray)((0,Za.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 sc={normalize:void 0};const ac=Wa,cc=Vt;sc.normalize=function(t){var e;const[n,...r]=(0,cc.toArray)((0,ac.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(Xa,t),r(sc,t),r(uc,t),r(hc,t),r(Wa,t),r(Ya,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,xc=Ut;bc.chunkAsync=function(t,e){return(0,xc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,xc.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 Tc={},Ic={},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 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 Vc={},Jc={};function Lc(t){return"string"==typeof t}Jc.isntString=Jc.isString=void 0,Jc.isString=Lc,Jc.isntString=function(t){return!Lc(t)},Vc.isntChar=Vc.isChar=void 0;const Kc=Jc;function Wc(t){return(0,Kc.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={},su={};function au(t){return"number"==typeof t}function cu(t){return Number.isNaN(t)}su.isntNaN=su.isNaN=su.isNegativeInfinity=su.isPositiveInfinity=su.isFinite=su.isntNumber=su.isNumber=void 0,su.isNumber=au,su.isntNumber=function(t){return!au(t)},su.isFinite=function(t){return Number.isFinite(t)},su.isPositiveInfinity=function(t){return t===1/0},su.isNegativeInfinity=function(t){return t===-1/0},su.isNaN=cu,su.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=su,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 xu=uu,Tu=Bc;function Iu(t){return t instanceof Promise}function Su(t){return(0,xu.isObject)(t)&&(0,Tu.isFunction)(t.then)}Au.isPromise=Iu,Au.isntPromise=function(t){return!Iu(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(Rc,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(su,t),r(uu,t),r(Au,t),r(Jc,t),r(Nc,t),r(_u,t)}(Ic),Tc.chunkByAsync=void 0;const Ou=Ic;Tc.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=Ic,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 Vu={dropRightAsync:void 0};const Ju=gc,Lu=Ru,Ku=Ut;Vu.dropRightAsync=function(t,e){return(0,Ku.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ku.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Lu.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=Ru,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=Ic;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=Ic;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 sl={},al={},cl={flattenByAsync:void 0};const ul=Ic;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}},al.flattenDeepAsync=void 0;const fl=cl,dl=Ut;al.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))},sl.flattenAsync=void 0;const yl=al;sl.flattenAsync=function(t){return(0,yl.flattenDeepAsync)(t,1)};var hl={flattenBy:void 0};const vl=Ic;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 xl=Ic;Al.mapAsync=function(t,e){return(0,xl.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 Tl={};Tl.map=void 0,Tl.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Il={repeatAsync:void 0};const Sl=gc,_l=Ut;Il.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 zl={splitByAsync:void 0};const Rl=Ic;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 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 Ll={takeRightAsync:void 0};const Kl=gc,Wl=Ut;Ll.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,Kl.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=Ic;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=Ic;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 sf={};sf.toAsyncIterable=void 0,sf.toAsyncIterable=async function*(t){for(const e of t)yield e};var af={};af.transformAsync=void 0,af.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=Ic;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=Ic;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,s=t.map((t=>(0,vf.isAsyncIterable)(t)?[pf.Async,t[Symbol.asyncIterator]()]:[pf.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===pf.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===pf.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).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(Tc,t),r(Eu,t),r(ju,t),r(Bu,t),r(Cu,t),r(zu,t),r(Vu,t),r(Wu,t),r(Xu,t),r(Qu,t),r(Zu,t),r(rl,t),r(ol,t),r(sl,t),r(cl,t),r(hl,t),r(al,t),r(pl,t),r(gl,t),r(Al,t),r(Tl,t),r(Il,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(Ll,t),r(Yl,t),r(Xl,t),r(Ql,t),r(Zl,t),r(nf,t),r(of,t),r(sf,t),r(af,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=Ic;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 xf={};xf.each=void 0,xf.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Tf={everyAsync:void 0};const If=Ic;Tf.everyAsync=function(t,e){return(0,If.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=Ic;_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=Ic;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,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}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=Ic;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,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}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=Ic;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 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 Lf={toArrayAsync:void 0};const Kf=gf;Lf.toArrayAsync=function(t){return(0,Kf.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(xf,t),r(Tf,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(zf,t),r(Ff,t),r(Df,t),r(Vf,t),r(Jf,t),r(Lf,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 sd={};sd.randomIntInclusive=void 0,sd.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(sd,t)}(rd),nd.calculateExponentialBackoffTimeout=void 0;const ad=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,ad.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 s=Date.now()-o;n||(r=(0,md.setTimeout)(Math.max(t-s,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 xd{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 Td(this.state,t);this._state=this.schema[this.state][t]}}class Td 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 Id=function(t,e){return(Id=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}Id(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),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.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 s}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 s=_d(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}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 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 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,s=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}:s&&zd.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.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 s.destination=new Kd(i),s}return Sd(e,t),e}(Dd);function Wd(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 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: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,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}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},sy={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=sy.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=sy.schedule,new Gd((function(t){var e=new Pd,n=ry||oy,r=n.now(),i=function(o){var s=n.now();t.next({timestamp:ry?s:o,elapsed:s-r}),t.closed||e.add(iy(i))};return e.add(iy(i)),e}));var ay=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 ay},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,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),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 s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+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,s=e.isStopped,a=e._isComplete;n?t.error(o):(s||a)&&(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),xy=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}(),Iy=function(t){function e(e,n){void 0===n&&(n=xy.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}(xy);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}(Iy))(Ty),new Iy(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}(Iy))(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=sy.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}))||(sy.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}(Iy))(_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}(Iy);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(Fd);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]()}values(){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){this.keyToIndex=[],this.indexToKey=[],Ut.assert(0===t.length,"array should be empty"),this.indexToValue=t}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.values()}*values(){for(let t=0;t<this.indexToKey.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t}get(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t?this.indexToValue.internalTypedArray[e]:void 0}set(t,e){const n=this.keyToIndex[t];if(this.indexToKey[n]===t)this.indexToValue.internalTypedArray[n]=e;else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){const e=this.keyToIndex[t];if(this.indexToKey[e]===t){const n=this.indexToKey.pop(),r=this.indexToValue.pop();t!==n&&(this.indexToKey[e]=n,this.indexToValue.internalTypedArray[e]=r,this.keyToIndex[n]=e)}}}class Py{constructor(t){const e=[];if(t.length>0)for(const[n,r]of t.internalTypedArray.entries())e[r]=n;this.indexToValue=t,this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let t=0;t<this.indexToValue.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.valueToIndex[t];return this.indexToValue.internalTypedArray[e]===t}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){const e=this.valueToIndex[t];if(this.indexToValue.internalTypedArray[e]===t){const n=this.indexToValue.pop();t!==n&&(this.indexToValue.internalTypedArray[e]=n,this.valueToIndex[n]=e)}}}class qy{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=Cy(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=Cy(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=Cy(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 Cy(t,e,n){if(1===n)return e;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{xd as BadEventError,t as Box,qy as DynamicTypedArray,Mt as Emitter,bd as ExpirableMap,Td as FiniteStateMachine,zt as HashMap,Rt as HashSet,td as LRUMap,jy as ObservableFiniteStateMachine,Ft as Queue,ky as SparseMap,Ny as SparseSet,gd as TLRUMap,Ad as TrieMap,By as TypedSparseMap,Py as TypedSparseSet,Ct as convertArrayToCons,qt as convertConsToArray};
15
+ ***************************************************************************** */var Id=function(t,e){return(Id=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}Id(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),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.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 s}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 s=_d(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}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 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 Sd(e,t),e.create=function(t,e,n){return new Kd(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 Ld=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}(),Kd=function(t){function e(e,n,r){var i,o,s=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}:s&&zd.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.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 s.destination=new Ld(i),s}return Sd(e,t),e}(Dd);function Wd(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 Kd(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 Kd({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,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}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},sy={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=sy.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=sy.schedule,new Gd((function(t){var e=new Pd,n=ry||oy,r=n.now(),i=function(o){var s=n.now();t.next({timestamp:ry?s:o,elapsed:s-r}),t.closed||e.add(iy(i))};return e.add(iy(i)),e}));var ay=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 ay},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,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),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 s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+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,s=e.isStopped,a=e._isComplete;n?t.error(o):(s||a)&&(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},xy=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),Ty=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}(),Iy=function(t){function e(e,n){void 0===n&&(n=Ty.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}(Ty);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}(Iy))(xy),new Iy(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}(Iy))(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=sy.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}))||(sy.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}(Iy))(_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}(Iy);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(Fd);class jy extends xd{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(t=[]){this.indexToValue=[];const e=[];if(t.length>0)for(const[n,r]of t.entries())e[r]=n;this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}values(){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){this.keyToIndex=[],this.indexToKey=[],Ut.assert(0===t.length,"array should be empty"),this.indexToValue=t}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.values()}*values(){for(let t=0;t<this.indexToKey.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t}get(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t?this.indexToValue.internalTypedArray[e]:void 0}set(t,e){const n=this.keyToIndex[t];if(this.indexToKey[n]===t)this.indexToValue.internalTypedArray[n]=e;else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){const e=this.keyToIndex[t];if(this.indexToKey[e]===t){const n=this.indexToKey.pop(),r=this.indexToValue.pop();t!==n&&(this.indexToKey[e]=n,this.indexToValue.internalTypedArray[e]=r,this.keyToIndex[n]=e)}}}class Py{constructor(t){const e=[];if(t.length>0)for(const[n,r]of t.internalTypedArray.entries())e[r]=n;this.indexToValue=t,this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let t=0;t<this.indexToValue.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.valueToIndex[t];return this.indexToValue.internalTypedArray[e]===t}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){const e=this.valueToIndex[t];if(this.indexToValue.internalTypedArray[e]===t){const n=this.indexToValue.pop();t!==n&&(this.indexToValue.internalTypedArray[e]=n,this.valueToIndex[n]=e)}}}class qy{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=Cy(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=Cy(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=Cy(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 Cy(t,e,n){if(1===n)return e;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 My{constructor(t){this.value=t,this.previous=null,this.next=null,this.up=null,this.down=null}}class zy{constructor(t){this.compare=t,this.head=new My(null),this.tail=new My(null),this.height=0,this._size=0,this.head.next=this.tail,this.tail.previous=this.head}get size(){return this._size}*elements(){let t=this.head;for(;t.down;)t=t.down;for(;t.next&&n.isntNull(t.next.value);)t=t.next,yield t}dumpList(){const t=[];let e=this.head;do{t.push([]);let n=e;do{t[t.length-1].push(n.value),n=n.next}while(n)}while(e=e.down);return t}delete(t){let e=this.findNode(t);for(;e;)e.previous.next=e.next,e.next.previous=e.previous,e=e.down;this._size--}has(t){return n.isntNull(this.findNode(t))}findNode(t){let e=this.head;for(;;){for(;e.next&&n.isntNull(e.next.value);){const n=this.compare(e.next.value,t);if(0===n)return e.next;if(!(n<0))break;e=e.next}if(!e.down)return null;e=e.down}}add(t){let e=this.findPreviousNode(t);if(e.next&&n.isntNull(e.next.value)&&0===this.compare(e.next.value,t))return;let r=new My(t);e.next&&(r.next=e.next,e.next.previous=r),e.next=r,r.previous=e;let i=0;for(;Math.random()<.5;){if(i===this.height){const t=new My(null),e=new My(null);t.next=e,t.down=this.head,e.previous=t,e.down=this.tail,this.head.up=t,this.tail.up=e,this.head=t,this.tail=e,this.height++}for(;!e.up;)e=e.previous;e=e.up;const n=new My(t);e.next&&(n.next=e.next,e.next.previous=n),e.next=n,n.previous=e,n.down=r,r.up=n,r=n,i++}this._size++}findPreviousNode(t){let e=this.head;for(;;){for(;e.next&&n.isntNull(e.next.value);){if(this.compare(e.next.value,t)>=0)break;e=e.next}if(!e.down)return e;e=e.down}}}class Ry{constructor(t){this.skipList=new zy(t)}get[Symbol.toStringTag](){return this.constructor.name}*[Symbol.iterator](){for(const t of this.values())yield t}values(){return pc.map(this.skipList.elements(),(t=>t.value))}has(t){return this.skipList.has(t)}add(t){this.skipList.add(t)}delete(t){this.skipList.delete(t)}}export{Td as BadEventError,t as Box,qy as DynamicTypedArray,Mt as Emitter,bd as ExpirableMap,xd as FiniteStateMachine,zt as HashMap,Rt as HashSet,td as LRUMap,jy as ObservableFiniteStateMachine,Ft as Queue,Ry as SortedSet,ky as SparseMap,Ny as SparseSet,gd as TLRUMap,Ad as TrieMap,By as TypedSparseMap,Py as TypedSparseSet,Ct as convertArrayToCons,qt as convertConsToArray};
16
16
  //# sourceMappingURL=index.min.mjs.map