@blackglory/structures 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -190,3 +190,19 @@ class ObservableFiniteStateMachine<
190
190
  observeStateChanges(): Observable<IFiniteStateMachineStateChange<State, Event>>
191
191
  }
192
192
  ```
193
+
194
+ ### InstanceManager
195
+ ```ts
196
+ class InstanceManager<T> {
197
+ constructor(
198
+ construct: () => Awaitable<T>
199
+ , destruct: (instance: T) => Awaitable<void>
200
+ )
201
+
202
+ getInstances(): T[]
203
+ getCurrentQuantity(): number
204
+ getTargetQuantity(): number
205
+ setTargetQuantity(target: number): void
206
+ scale(): Promise<void>
207
+ }
208
+ ```
@@ -1,3 +1,4 @@
1
+ function t(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function e(t,e,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(t,n):o?o.value=n:e.set(t,n),n}var n,r,o,i,a;class s{constructor(t){n.set(this,void 0),e(this,n,t,"f")}set(t){e(this,n,t,"f")}get(){return t(this,n,"f")}}function c([t,e]){return null===e?[t]:[t,...c(e)]}function u([t,...e]){return[t,e.length?u(e):null]}n=new WeakMap;class l{constructor(){r.set(this,new Map)}get[(r=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(e,n){t(this,r,"f").has(e)||t(this,r,"f").set(e,new Set);t(this,r,"f").get(e).add(n)}off(e,n){if(!t(this,r,"f").has(e))return;const o=t(this,r,"f").get(e);o.delete(n),0===o.size&&t(this,r,"f").delete(e)}emit(e,n){if(!t(this,r,"f").has(e))return;t(this,r,"f").get(e).forEach((t=>t(n)))}}class f{constructor(t){this.hash=t,o.set(this,new Map)}get[(o=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,o,"f").size}set(e,n){return t(this,o,"f").set(this.hash(e),n),this}has(e){return t(this,o,"f").has(this.hash(e))}get(e){return t(this,o,"f").get(this.hash(e))}delete(e){return t(this,o,"f").delete(this.hash(e))}clear(){t(this,o,"f").clear()}}class d{constructor(t){this.hash=t,i.set(this,new Map)}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,i,"f").size}[Symbol.iterator](){return t(this,i,"f").values()}add(e){return t(this,i,"f").set(this.hash(e),e),this}delete(e){return t(this,i,"f").delete(this.hash(e))}has(e){return t(this,i,"f").has(this.hash(e))}clear(){t(this,i,"f").clear()}values(){return t(this,i,"f").values()}}class y{constructor(){a.set(this,[])}get[(a=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,a,"f").length}empty(){t(this,a,"f").length=0}enqueue(...e){t(this,a,"f").push(...e)}dequeue(){return t(this,a,"f").shift()}remove(e){let n;for(;(n=t(this,a,"f").indexOf(e))>=0;)t(this,a,"f").splice(n,1)}}var h,v,p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m={},b={},g={},w={},A={},I={},S={};S.go=void 0,S.go=function(t){return t()},h=I,v=p&&p.__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]}),(p&&p.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||v(e,t,n)})(S,h);var _={},x={},T={},E={},O={},j={},k={CustomError:void 0};class N extends Error{get name(){return this.constructor.name}}k.CustomError=N;var B={ExpectedError:void 0};const P=k;class q extends P.CustomError{}B.ExpectedError=q;var M={AssertionError:void 0};const C=k;class z extends C.CustomError{}M.AssertionError=z;var R={};R.normalize=void 0,R.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var U={refute:void 0};const D=B;U.refute=function(t,e){if(t)throw new D.ExpectedError(e)};var F={assert:void 0};const J=M;F.assert=function(t,e){if(!t)throw new J.AssertionError(e)},function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(k,t),n(B,t),n(M,t),n(R,t),n(U,t),n(F,t)}(j),O.chunkAsync=void 0;const W=I,L=j;O.chunkAsync=function(t,e){return(0,L.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,L.assert)(e>0,"The parameter size must be greater than 0"),(0,W.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 V={},K={},Y={};function $(t){return Array.isArray(t)}Y.isntEmptyArray=Y.isEmptyArray=Y.isntArray=Y.isArray=void 0,Y.isArray=$,Y.isntArray=function(t){return!$(t)},Y.isEmptyArray=function(t){return 0===t.length},Y.isntEmptyArray=function(t){return 0!==t.length};var H={},X={};function G(t){return null===t}X.isntNull=X.isNull=void 0,X.isNull=G,X.isntNull=function(t){return!G(t)};var Q={};function Z(t){return void 0===t}Q.isntUndefined=Q.isUndefined=void 0,Q.isUndefined=Z,Q.isntUndefined=function(t){return!Z(t)},H.isntAsyncIterable=H.isAsyncIterable=void 0;const tt=X,et=Q;function nt(t){return(0,tt.isntNull)(t)&&(0,et.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}H.isAsyncIterable=nt,H.isntAsyncIterable=function(t){return!nt(t)};var rt={};function ot(t){return"bigint"==typeof t}rt.isntBigInt=rt.isBigInt=void 0,rt.isBigInt=ot,rt.isntBigInt=function(t){return!ot(t)};var it={};function at(t){return"boolean"==typeof t}it.isntBoolean=it.isBoolean=void 0,it.isBoolean=at,it.isntBoolean=function(t){return!at(t)};var st={},ct={};function ut(t){return"string"==typeof t}ct.isntString=ct.isString=void 0,ct.isString=ut,ct.isntString=function(t){return!ut(t)},st.isntChar=st.isChar=void 0;const lt=ct;function ft(t){return(0,lt.isString)(t)&&1===t.length}st.isChar=ft,st.isntChar=function(t){return!ft(t)};var dt={};function yt(t){return t instanceof Date}dt.isntDate=dt.isDate=void 0,dt.isDate=yt,dt.isntDate=function(t){return!yt(t)};var ht={};ht.inEnum=void 0,ht.inEnum=function(t,e){return Object.values(e).includes(t)};var vt={};function pt(t){return t instanceof Error}vt.isntError=vt.isError=void 0,vt.isError=pt,vt.isntError=function(t){return!pt(t)};var mt={};function bt(t){return!t}mt.isntFalsy=mt.isFalsy=void 0,mt.isFalsy=bt,mt.isntFalsy=function(t){return!bt(t)};var gt={};function wt(t){return"function"==typeof t}gt.isntFunction=gt.isFunction=void 0,gt.isFunction=wt,gt.isntFunction=function(t){return!wt(t)};var At={};At.isntIterable=At.isIterable=void 0;const It=X,St=Q;function _t(t){return(0,It.isntNull)(t)&&(0,St.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}At.isIterable=_t,At.isntIterable=function(t){return!_t(t)};var xt={},Tt={};var Et=Function.prototype,Ot=Object.prototype,jt=Et.toString,kt=Ot.hasOwnProperty,Nt=jt.call(Object),Bt=Ot.toString,Pt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var qt=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=Bt.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=Pt(t);if(null===e)return!0;var n=kt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&jt.call(n)==Nt},Mt=p&&p.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Tt.isntEmptyObject=Tt.isEmptyObject=Tt.isntPlainObject=Tt.isPlainObject=Tt.isntObject=Tt.isObject=void 0;const Ct=Mt(qt);function zt(t){return null!==t&&"object"==typeof t}function Rt(t){return(0,Ct.default)(t)}Tt.isObject=zt,Tt.isntObject=function(t){return!zt(t)},Tt.isPlainObject=Rt,Tt.isntPlainObject=function(t){return!Rt(t)},Tt.isEmptyObject=function(t){return 0===Object.keys(t).length},Tt.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var Ut={};function Dt(t){return"number"==typeof t}Ut.isntNumber=Ut.isNumber=void 0,Ut.isNumber=Dt,Ut.isntNumber=function(t){return!Dt(t)},xt.isntJsonRpcError=xt.isJsonRpcError=xt.isntJsonRpcSuccess=xt.isJsonRpcSuccess=xt.isntJsonRpcRequest=xt.isJsonRpcRequest=xt.isntJsonRpcNotification=xt.isJsonRpcNotification=void 0;const Ft=Y,Jt=Tt,Wt=ct,Lt=Ut,Vt=Q;function Kt(t){return(0,Wt.isString)(t)||(0,Lt.isNumber)(t)}function Yt(t){return(0,Ft.isArray)(t)||(0,Jt.isObject)(t)}function $t(t){return(0,Jt.isPlainObject)(t)&&(0,Wt.isString)(t.jsonrpc)&&(0,Wt.isString)(t.method)&&(0,Vt.isUndefined)(t.id)&&Yt(t.params)}function Ht(t){return(0,Jt.isPlainObject)(t)&&(0,Wt.isString)(t.jsonrpc)&&(0,Wt.isString)(t.method)&&Kt(t.id)&&Yt(t.params)}function Xt(t){return(0,Jt.isPlainObject)(t)&&(0,Wt.isString)(t.jsonrpc)&&(0,Wt.isString)(t.id)&&"result"in t}function Gt(t){return(0,Jt.isPlainObject)(t)&&(0,Wt.isString)(t.jsonrpc)&&Kt(t.id)&&function(t){return(0,Jt.isPlainObject)(t)&&(0,Lt.isNumber)(t.code)&&(0,Wt.isString)(t.message)&&((0,Vt.isUndefined)(t.data)||(0,Jt.isObject)(t.data))}(t.error)}xt.isJsonRpcNotification=$t,xt.isntJsonRpcNotification=function(t){return!$t(t)},xt.isJsonRpcRequest=Ht,xt.isntJsonRpcRequest=function(t){return!Ht(t)},xt.isJsonRpcSuccess=Xt,xt.isntJsonRpcSuccess=function(t){return!Xt(t)},xt.isJsonRpcError=Gt,xt.isntJsonRpcError=function(t){return!Gt(t)};var Qt={};Qt.isntJson=Qt.isJson=void 0,Qt.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Qt.isntJson=function t(e){return!t()};var Zt={};Zt.isAbsoluteURL=void 0,Zt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Y,t),n(H,t),n(rt,t),n(it,t),n(st,t),n(dt,t),n(ht,t),n(vt,t),n(mt,t),n(gt,t),n(At,t),n(xt,t),n(Qt,t),n(X,t),n(Ut,t),n(Tt,t),n(ct,t),n(Q,t),n(Zt,t)}(K),V.chunkByAsync=void 0;const te=K;V.chunkByAsync=function(t,e){return(0,te.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var ee={};ee.chunkBy=void 0,ee.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var ne={chunk:void 0};const re=I,oe=j;ne.chunk=function(t,e){return(0,oe.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,oe.assert)(e>0,"The parameter size must be greater than 0"),(0,re.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var ie={concatAsync:void 0};const ae=K,se=I;ie.concatAsync=function(t,...e){return(0,se.go)((async function*(){for(const n of[t,...e])if((0,ae.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var ce={concat:void 0};const ue=I;ce.concat=function(t,...e){return(0,ue.go)((function*(){for(const n of[t,...e])yield*n}))};var le={},fe={};fe.copyIterable=fe.copyAsyncIterable=void 0,fe.copyAsyncIterable=async function*(t){for await(const e of t)yield e},fe.copyIterable=function*(t){for(const e of t)yield e},le.dropAsync=void 0;const de=I,ye=fe,he=j;le.dropAsync=function(t,e){return(0,he.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,he.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ye.copyAsyncIterable)(t):(0,de.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var ve={dropRightAsync:void 0};const pe=I,me=fe,be=j;ve.dropRightAsync=function(t,e){return(0,be.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,be.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,me.copyAsyncIterable)(t):(0,pe.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 ge={dropRight:void 0};const we=I,Ae=fe,Ie=j;ge.dropRight=function(t,e){return(0,Ie.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ie.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ae.copyIterable)(t):(0,we.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Se={dropUntilAsync:void 0};const _e=K;Se.dropUntilAsync=function(t,e){return(0,_e.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||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 o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var xe={};xe.dropUntil=void 0,xe.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var Te={drop:void 0};const Ee=I,Oe=fe,je=j;Te.drop=function(t,e){return(0,je.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,je.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Oe.copyIterable)(t):(0,Ee.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var ke={filterAsync:void 0};const Ne=K;ke.filterAsync=function(t,e){return(0,Ne.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 Be={};Be.filter=void 0,Be.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Pe={},qe={},Me={flattenByAsync:void 0};const Ce=K;function ze(t){return(0,Ce.isIterable)(t)&&(0,Ce.isntChar)(t)}Me.flattenByAsync=function(t,e){return(0,Ce.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)ze(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)ze(o)&&await e(o,r)?yield*n(o,r+1):yield o}},qe.flattenDeepAsync=void 0;const Re=Me,Ue=j;qe.flattenDeepAsync=function(t,e=1/0){return(0,Ue.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Ue.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Re.flattenByAsync)(t,((t,n)=>n<=e))},Pe.flattenAsync=void 0;const De=qe;Pe.flattenAsync=function(t){return(0,De.flattenDeepAsync)(t,1)};var Fe={flattenBy:void 0};const Je=K;Fe.flattenBy=function(t,e){return function*t(n,r){for(const i of n)(0,Je.isIterable)(o=i)&&(0,Je.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var We={flattenDeep:void 0};const Le=Fe,Ve=j;We.flattenDeep=function(t,e=1/0){return(0,Ve.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Ve.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Le.flattenBy)(t,((t,n)=>n<=e))};var Ke={flatten:void 0};const Ye=We;Ke.flatten=function(t){return(0,Ye.flattenDeep)(t,1)};var $e={mapAsync:void 0};const He=K;$e.mapAsync=function(t,e){return(0,He.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 Xe={};Xe.map=void 0,Xe.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ge={repeatAsync:void 0};const Qe=I,Ze=j;Ge.repeatAsync=function(t,e){return(0,Ze.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Ze.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,Qe.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 tn={repeat:void 0};const en=I,nn=j;tn.repeat=function(t,e){return(0,nn.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,nn.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,en.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 rn={sliceAsync:void 0};const on=I,an=j;rn.sliceAsync=function(t,e,n=1/0){return(0,an.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,an.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,an.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,an.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,on.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var sn={slice:void 0};const cn=I,un=j;sn.slice=function(t,e,n=1/0){return(0,un.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,un.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,un.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,un.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,cn.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var ln={};ln.splitAsync=void 0,ln.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var fn={splitByAsync:void 0};const dn=K;fn.splitByAsync=function(t,e){return(0,dn.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var yn={};yn.splitBy=void 0,yn.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var hn={};hn.split=void 0,hn.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var vn={takeAsync:void 0};const pn=I,mn=j;vn.takeAsync=function(t,e){return(0,mn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,mn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,pn.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var bn={takeRightAsync:void 0};const gn=I,wn=j;bn.takeRightAsync=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,gn.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var An={takeRight:void 0};const In=I,Sn=j;An.takeRight=function(t,e){return(0,Sn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Sn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,In.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var _n={takeUntilAsync:void 0};const xn=K;_n.takeUntilAsync=function(t,e){return(0,xn.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 Tn={};Tn.takeUntil=void 0,Tn.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var En={take:void 0};const On=I,jn=j;En.take=function(t,e){return(0,jn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,jn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,On.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var kn={tapAsync:void 0};const Nn=K;kn.tapAsync=function(t,e){return(0,Nn.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 Bn={};Bn.tap=void 0,Bn.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Pn={};Pn.toAsyncIterable=void 0,Pn.toAsyncIterable=async function*(t){for(const e of t)yield e};var qn={};qn.transformAsync=void 0,qn.transformAsync=async function*(t,e){yield*e(t)};var Mn={};Mn.transform=void 0,Mn.transform=function*(t,e){yield*e(t)};var Cn={};Cn.uniqAsync=void 0,Cn.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var zn={uniqByAsync:void 0};const Rn=K;zn.uniqByAsync=function(t,e){return(0,Rn.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var Un={};Un.uniqBy=void 0,Un.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var Dn={};Dn.uniq=void 0,Dn.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var Fn={zipAsync:void 0};const Jn=K;var Wn;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(Wn||(Wn={})),Fn.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,Jn.isAsyncIterable)(t)?[Wn.Async,t[Symbol.asyncIterator]()]:[Wn.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===Wn.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===Wn.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var Ln={};Ln.zip=void 0,Ln.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 o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=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 e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(O,t),n(V,t),n(ee,t),n(ne,t),n(ie,t),n(ce,t),n(le,t),n(ve,t),n(ge,t),n(Se,t),n(xe,t),n(Te,t),n(ke,t),n(Be,t),n(Pe,t),n(Me,t),n(Fe,t),n(qe,t),n(We,t),n(Ke,t),n($e,t),n(Xe,t),n(Ge,t),n(tn,t),n(rn,t),n(sn,t),n(ln,t),n(fn,t),n(yn,t),n(hn,t),n(vn,t),n(bn,t),n(An,t),n(_n,t),n(Tn,t),n(En,t),n(kn,t),n(Bn,t),n(Pn,t),n(qn,t),n(Mn,t),n(Cn,t),n(zn,t),n(Un,t),n(Dn,t),n(Fn,t),n(Ln,t)}(E);var Vn={},Kn={};Kn.consume=void 0,Kn.consume=function(t,e){return e(t)};var Yn={eachAsync:void 0};const $n=K;Yn.eachAsync=function(t,e){return(0,$n.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 Hn={};Hn.each=void 0,Hn.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Xn={everyAsync:void 0};const Gn=K;Xn.everyAsync=function(t,e){return(0,Gn.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 Qn={};Qn.every=void 0,Qn.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Zn={findAsync:void 0};const tr=K;Zn.findAsync=function(t,e){return(0,tr.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 er={};er.find=void 0,er.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var nr={};nr.firstAsync=void 0,nr.firstAsync=async function(t){for await(const e of t)return e};var rr={};rr.first=void 0,rr.first=function(t){for(const e of t)return e};var or={};or.includesAsync=void 0,or.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var ir={};ir.includes=void 0,ir.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var ar={};ar.matchAsync=void 0,ar.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var sr={};sr.match=void 0,sr.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var cr={reduceAsync:void 0};const ur=K;cr.reduceAsync=function(t,e,n){return(0,ur.isUndefined)(n)?function(t,e){return(0,ur.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!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 o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,ur.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var lr={reduce:void 0};const fr=K;lr.reduce=function(t,e,n){return(0,fr.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var dr={someAsync:void 0};const yr=K;dr.someAsync=function(t,e){return(0,yr.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 hr={};hr.some=void 0,hr.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var vr={};vr.lastAsync=void 0,vr.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var pr={};pr.last=void 0,pr.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var mr={toArrayAsync:void 0};const br=Kn;mr.toArrayAsync=function(t){return(0,br.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var gr={toArray:void 0};const wr=Kn;gr.toArray=function(t){return(0,wr.consume)(t,(t=>Array.from(t)))};var Ar={toSetAsync:void 0};const Ir=Kn;Ar.toSetAsync=function(t){return(0,Ir.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Sr={toSet:void 0};const _r=Kn;Sr.toSet=function(t){return(0,_r.consume)(t,(t=>new Set(t)))},function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Kn,t),n(Yn,t),n(Hn,t),n(Xn,t),n(Qn,t),n(Zn,t),n(er,t),n(nr,t),n(rr,t),n(or,t),n(ir,t),n(ar,t),n(sr,t),n(cr,t),n(lr,t),n(dr,t),n(hr,t),n(vr,t),n(pr,t),n(mr,t),n(gr,t),n(Ar,t),n(Sr,t)}(Vn),function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(E,t),n(Vn,t)}(T);var xr={},Tr={};Tr.traverseErrorPrototypeChain=void 0,Tr.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},xr.getErrorNames=void 0;const Er=K,Or=Tr;xr.getErrorNames=function*(t){var e;if((0,Er.isError)(t))for(const n of(0,Or.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 jr={isSerializableError:void 0};const kr=K;jr.isSerializableError=function(t){return(0,kr.isObject)(t)&&(0,kr.isString)(t.name)&&(0,kr.isString)(t.message)&&((0,kr.isString)(t.stack)||(0,kr.isNull)(t.stack))&&(0,kr.isArray)(t.ancestors)&&t.ancestors.every(kr.isString)},x.CustomError=void 0;const Nr=T,Br=xr,Pr=K,qr=jr;class Mr extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Nr.first)((0,Br.getErrorNames)(this)))&&void 0!==t?t:Mr.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Pr.isError)(t)||(0,qr.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Br.getErrorNames)(this.prototype)].reverse(),r=(0,Nr.toArray)((0,Br.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}x.CustomError=Mr;var Cr={AssertionError:void 0};const zr=x;class Rr extends zr.CustomError{}Cr.AssertionError=Rr;var Ur={normalize:void 0};const Dr=xr,Fr=T;Ur.normalize=function(t){var e;const[n,...r]=(0,Fr.toArray)((0,Dr.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Jr={},Wr={},Lr={};Lr.pass=void 0,Lr.pass=function(){},function(t){var e=p&&p.__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]});(p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Lr,t)}(Wr),Jr.hydrate=void 0;const Vr=Wr;function Kr(t,e){const n=function(){(0,Vr.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}Jr.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=Kr(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,o};var Yr={assert:void 0};const $r=Cr;Yr.assert=function(t,e){if(!t)throw new $r.AssertionError(e)},function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(x,t),n(Cr,t),n(jr,t),n(Ur,t),n(Jr,t),n(Yr,t),n(xr,t),n(Tr,t)}(_),A.chunkAsync=void 0;const Hr=I,Xr=_;A.chunkAsync=function(t,e){return(0,Xr.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Xr.assert)(e>0,"The parameter size must be greater than 0"),(0,Hr.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 Gr={chunkByAsync:void 0};const Qr=K;Gr.chunkByAsync=function(t,e){return(0,Qr.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Zr={};Zr.chunkBy=void 0,Zr.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var to={chunk:void 0};const eo=I,no=_;to.chunk=function(t,e){return(0,no.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,no.assert)(e>0,"The parameter size must be greater than 0"),(0,eo.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var ro={concatAsync:void 0};const oo=K,io=I;ro.concatAsync=function(t,...e){return(0,io.go)((async function*(){for(const n of[t,...e])if((0,oo.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var ao={concat:void 0};const so=I;ao.concat=function(t,...e){return(0,so.go)((function*(){for(const n of[t,...e])yield*n}))};var co={},uo={};uo.copyIterable=uo.copyAsyncIterable=void 0,uo.copyAsyncIterable=async function*(t){for await(const e of t)yield e},uo.copyIterable=function*(t){for(const e of t)yield e},co.dropAsync=void 0;const lo=I,fo=uo,yo=_;co.dropAsync=function(t,e){return(0,yo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,yo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,fo.copyAsyncIterable)(t):(0,lo.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var ho={dropRightAsync:void 0};const vo=I,po=uo,mo=_;ho.dropRightAsync=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,po.copyAsyncIterable)(t):(0,vo.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 bo={dropRight:void 0};const go=I,wo=uo,Ao=_;bo.dropRight=function(t,e){return(0,Ao.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ao.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,wo.copyIterable)(t):(0,go.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Io={dropUntilAsync:void 0};const So=K;Io.dropUntilAsync=function(t,e){return(0,So.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||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 o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var _o={};_o.dropUntil=void 0,_o.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var xo={drop:void 0};const To=I,Eo=uo,Oo=_;xo.drop=function(t,e){return(0,Oo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Oo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Eo.copyIterable)(t):(0,To.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var jo={filterAsync:void 0};const ko=K;jo.filterAsync=function(t,e){return(0,ko.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 No={};No.filter=void 0,No.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Bo={},Po={},qo={flattenByAsync:void 0};const Mo=K;function Co(t){return(0,Mo.isIterable)(t)&&(0,Mo.isntChar)(t)}qo.flattenByAsync=function(t,e){return(0,Mo.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)Co(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)Co(o)&&await e(o,r)?yield*n(o,r+1):yield o}},Po.flattenDeepAsync=void 0;const zo=qo,Ro=_;Po.flattenDeepAsync=function(t,e=1/0){return(0,Ro.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Ro.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,zo.flattenByAsync)(t,((t,n)=>n<=e))},Bo.flattenAsync=void 0;const Uo=Po;Bo.flattenAsync=function(t){return(0,Uo.flattenDeepAsync)(t,1)};var Do={flattenBy:void 0};const Fo=K;Do.flattenBy=function(t,e){return function*t(n,r){for(const i of n)(0,Fo.isIterable)(o=i)&&(0,Fo.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var Jo={flattenDeep:void 0};const Wo=Do,Lo=_;Jo.flattenDeep=function(t,e=1/0){return(0,Lo.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Lo.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Wo.flattenBy)(t,((t,n)=>n<=e))};var Vo={flatten:void 0};const Ko=Jo;Vo.flatten=function(t){return(0,Ko.flattenDeep)(t,1)};var Yo={mapAsync:void 0};const $o=K;Yo.mapAsync=function(t,e){return(0,$o.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 Ho={};Ho.map=void 0,Ho.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Xo={repeatAsync:void 0};const Go=I,Qo=_;Xo.repeatAsync=function(t,e){return(0,Qo.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Qo.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,Go.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 Zo={repeat:void 0};const ti=I,ei=_;Zo.repeat=function(t,e){return(0,ei.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,ei.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,ti.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 ni={sliceAsync:void 0};const ri=I,oi=_;ni.sliceAsync=function(t,e,n=1/0){return(0,oi.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,oi.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,oi.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,oi.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ri.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var ii={slice:void 0};const ai=I,si=_;ii.slice=function(t,e,n=1/0){return(0,si.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,si.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,si.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,si.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ai.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var ci={};ci.splitAsync=void 0,ci.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var ui={splitByAsync:void 0};const li=K;ui.splitByAsync=function(t,e){return(0,li.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var fi={};fi.splitBy=void 0,fi.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var di={};di.split=void 0,di.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var yi={takeAsync:void 0};const hi=I,vi=_;yi.takeAsync=function(t,e){return(0,vi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,vi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,hi.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var pi={takeRightAsync:void 0};const mi=I,bi=_;pi.takeRightAsync=function(t,e){return(0,bi.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,bi.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,mi.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var gi={takeRight:void 0};const wi=I,Ai=_;gi.takeRight=function(t,e){return(0,Ai.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ai.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,wi.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Ii={takeUntilAsync:void 0};const Si=K;Ii.takeUntilAsync=function(t,e){return(0,Si.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))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 _i={};_i.takeUntil=void 0,_i.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var xi={take:void 0};const Ti=I,Ei=_;xi.take=function(t,e){return(0,Ei.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ei.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ti.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Oi={tapAsync:void 0};const ji=K;Oi.tapAsync=function(t,e){return(0,ji.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 ki={};ki.tap=void 0,ki.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 Bi={};Bi.transformAsync=void 0,Bi.transformAsync=async function*(t,e){yield*e(t)};var Pi={};Pi.transform=void 0,Pi.transform=function*(t,e){yield*e(t)};var qi={};qi.uniqAsync=void 0,qi.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var Mi={uniqByAsync:void 0};const Ci=K;Mi.uniqByAsync=function(t,e){return(0,Ci.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var zi={};zi.uniqBy=void 0,zi.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var Ri={};Ri.uniq=void 0,Ri.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var Ui={zipAsync:void 0};const Di=K;var Fi;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(Fi||(Fi={})),Ui.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,Di.isAsyncIterable)(t)?[Fi.Async,t[Symbol.asyncIterator]()]:[Fi.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===Fi.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===Fi.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var Ji={};Ji.zip=void 0,Ji.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 o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=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 e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(A,t),n(Gr,t),n(Zr,t),n(to,t),n(ro,t),n(ao,t),n(co,t),n(ho,t),n(bo,t),n(Io,t),n(_o,t),n(xo,t),n(jo,t),n(No,t),n(Bo,t),n(qo,t),n(Do,t),n(Po,t),n(Jo,t),n(Vo,t),n(Yo,t),n(Ho,t),n(Xo,t),n(Zo,t),n(ni,t),n(ii,t),n(ci,t),n(ui,t),n(fi,t),n(di,t),n(yi,t),n(pi,t),n(gi,t),n(Ii,t),n(_i,t),n(xi,t),n(Oi,t),n(ki,t),n(Ni,t),n(Bi,t),n(Pi,t),n(qi,t),n(Mi,t),n(zi,t),n(Ri,t),n(Ui,t),n(Ji,t)}(w);var Wi={},Li={};Li.consume=void 0,Li.consume=function(t,e){return e(t)};var Vi={eachAsync:void 0};const Ki=K;Vi.eachAsync=function(t,e){return(0,Ki.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 Yi={};Yi.each=void 0,Yi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var $i={everyAsync:void 0};const Hi=K;$i.everyAsync=function(t,e){return(0,Hi.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 Xi={};Xi.every=void 0,Xi.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Gi={findAsync:void 0};const Qi=K;Gi.findAsync=function(t,e){return(0,Qi.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 Zi={};Zi.find=void 0,Zi.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 ea={};ea.first=void 0,ea.first=function(t){for(const e of t)return e};var na={};na.includesAsync=void 0,na.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var ra={};ra.includes=void 0,ra.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 o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var ia={};ia.match=void 0,ia.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var aa={reduceAsync:void 0};const sa=K;aa.reduceAsync=function(t,e,n){return(0,sa.isUndefined)(n)?function(t,e){return(0,sa.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!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 o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,sa.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var ca={reduce:void 0};const ua=K;ca.reduce=function(t,e,n){return(0,ua.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var la={someAsync:void 0};const fa=K;la.someAsync=function(t,e){return(0,fa.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 da={};da.some=void 0,da.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var ya={};ya.lastAsync=void 0,ya.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var ha={};ha.last=void 0,ha.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var va={toArrayAsync:void 0};const pa=Li;va.toArrayAsync=function(t){return(0,pa.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var ma={toArray:void 0};const ba=Li;ma.toArray=function(t){return(0,ba.consume)(t,(t=>Array.from(t)))};var ga={toSetAsync:void 0};const wa=Li;ga.toSetAsync=function(t){return(0,wa.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Aa={toSet:void 0};const Ia=Li;Aa.toSet=function(t){return(0,Ia.consume)(t,(t=>new Set(t)))},function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Li,t),n(Vi,t),n(Yi,t),n($i,t),n(Xi,t),n(Gi,t),n(Zi,t),n(ta,t),n(ea,t),n(na,t),n(ra,t),n(oa,t),n(ia,t),n(aa,t),n(ca,t),n(la,t),n(da,t),n(ya,t),n(ha,t),n(va,t),n(ma,t),n(ga,t),n(Aa,t)}(Wi),function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(w,t),n(Wi,t)}(g);var Sa={},_a={};_a.traverseErrorPrototypeChain=void 0,_a.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Sa.getErrorNames=void 0;const xa=K,Ta=_a;Sa.getErrorNames=function*(t){var e;if((0,xa.isError)(t))for(const n of(0,Ta.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 Ea={isSerializableError:void 0};const Oa=K;Ea.isSerializableError=function(t){return(0,Oa.isObject)(t)&&(0,Oa.isString)(t.name)&&(0,Oa.isString)(t.message)&&((0,Oa.isString)(t.stack)||(0,Oa.isNull)(t.stack))&&(0,Oa.isArray)(t.ancestors)&&t.ancestors.every(Oa.isString)},b.CustomError=void 0;const ja=g,ka=Sa,Na=K,Ba=Ea;class Pa extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,ja.first)((0,ka.getErrorNames)(this)))&&void 0!==t?t:Pa.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Na.isError)(t)||(0,Ba.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,ka.getErrorNames)(this.prototype)].reverse(),r=(0,ja.toArray)((0,ka.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}b.CustomError=Pa;var qa={AssertionError:void 0};const Ma=b;class Ca extends Ma.CustomError{}qa.AssertionError=Ca;var za={normalize:void 0};const Ra=Sa,Ua=g;za.normalize=function(t){var e;const[n,...r]=(0,Ua.toArray)((0,Ra.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Da={},Fa={},Ja={};Ja.pass=void 0,Ja.pass=function(){},function(t){var e=p&&p.__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]});(p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Ja,t)}(Fa),Da.hydrate=void 0;const Wa=Fa;function La(t,e){const n=function(){(0,Wa.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}Da.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=La(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,o};var Va={assert:void 0};const Ka=qa;Va.assert=function(t,e){if(!t)throw new Ka.AssertionError(e)},function(t){var e=p&&p.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(b,t),n(qa,t),n(Ea,t),n(za,t),n(Da,t),n(Va,t),n(Sa,t),n(_a,t)}(m);var Ya={},$a={},Ha={},Xa={},Ga={};Ga.go=void 0,Ga.go=function(t){return t()},function(t){var e=p&&p.__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]});(p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Ga,t)}(Xa),Ha.chunkAsync=void 0;const Qa=Xa,Za=m;Ha.chunkAsync=function(t,e){return(0,Za.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Za.assert)(e>0,"The parameter size must be greater than 0"),(0,Qa.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 ts={},es={},ns={};function rs(t){return Array.isArray(t)}ns.isntEmptyArray=ns.isEmptyArray=ns.isntArray=ns.isArray=void 0,ns.isArray=rs,ns.isntArray=function(t){return!rs(t)},ns.isEmptyArray=function(t){return 0===t.length},ns.isntEmptyArray=function(t){return 0!==t.length};var os={},is={};function as(t){return null===t}is.isntNull=is.isNull=void 0,is.isNull=as,is.isntNull=function(t){return!as(t)};var ss={};function cs(t){return void 0===t}ss.isntUndefined=ss.isUndefined=void 0,ss.isUndefined=cs,ss.isntUndefined=function(t){return!cs(t)};var us={};function ls(t){return"function"==typeof t}us.isntFunction=us.isFunction=void 0,us.isFunction=ls,us.isntFunction=function(t){return!ls(t)},os.isntAsyncIterable=os.isAsyncIterable=void 0;const fs=is,ds=ss,ys=us;function hs(t){return(0,fs.isntNull)(t)&&(0,ds.isntUndefined)(t)&&(0,ys.isFunction)(t[Symbol.asyncIterator])}os.isAsyncIterable=hs,os.isntAsyncIterable=function(t){return!hs(t)};var vs={};function ps(t){return"bigint"==typeof t}vs.isntBigInt=vs.isBigInt=void 0,vs.isBigInt=ps,vs.isntBigInt=function(t){return!ps(t)};var ms={};function bs(t){return"boolean"==typeof t}ms.isntBoolean=ms.isBoolean=void 0,ms.isBoolean=bs,ms.isntBoolean=function(t){return!bs(t)};var gs={},ws={};function As(t){return"string"==typeof t}ws.isntString=ws.isString=void 0,ws.isString=As,ws.isntString=function(t){return!As(t)},gs.isntChar=gs.isChar=void 0;const Is=ws;function Ss(t){return(0,Is.isString)(t)&&1===t.length}gs.isChar=Ss,gs.isntChar=function(t){return!Ss(t)};var _s={};function xs(t){return t instanceof Date}_s.isntDate=_s.isDate=void 0,_s.isDate=xs,_s.isntDate=function(t){return!xs(t)};var Ts={};Ts.inEnum=void 0,Ts.inEnum=function(t,e){return Object.values(e).includes(t)};var Es={};function Os(t){return t instanceof Error}Es.isntError=Es.isError=void 0,Es.isError=Os,Es.isntError=function(t){return!Os(t)};var js={};function ks(t){return!t}js.isntFalsy=js.isFalsy=void 0,js.isFalsy=ks,js.isntFalsy=function(t){return!ks(t)};var Ns={};Ns.isntIterable=Ns.isIterable=void 0;const Bs=is,Ps=ss,qs=us;function Ms(t){return(0,Bs.isntNull)(t)&&(0,Ps.isntUndefined)(t)&&(0,qs.isFunction)(t[Symbol.iterator])}Ns.isIterable=Ms,Ns.isntIterable=function(t){return!Ms(t)};var Cs={},zs={};function Rs(t){return"number"==typeof t}function Us(t){return Number.isNaN(t)}zs.isntNaN=zs.isNaN=zs.isNegativeInfinity=zs.isPositiveInfinity=zs.isFinite=zs.isntNumber=zs.isNumber=void 0,zs.isNumber=Rs,zs.isntNumber=function(t){return!Rs(t)},zs.isFinite=function(t){return Number.isFinite(t)},zs.isPositiveInfinity=function(t){return t===1/0},zs.isNegativeInfinity=function(t){return t===-1/0},zs.isNaN=Us,zs.isntNaN=function(t){return!Us(t)};var Ds={},Fs="object"==typeof p&&p&&p.Object===Object&&p,Js="object"==typeof self&&self&&self.Object===Object&&self,Ws=(Fs||Js||Function("return this")()).Symbol,Ls=Ws,Vs=Object.prototype,Ks=Vs.hasOwnProperty,Ys=Vs.toString,$s=Ls?Ls.toStringTag:void 0;var Hs=function(t){var e=Ks.call(t,$s),n=t[$s];try{t[$s]=void 0;var r=!0}catch(t){}var o=Ys.call(t);return r&&(e?t[$s]=n:delete t[$s]),o},Xs=Object.prototype.toString;var Gs=Hs,Qs=function(t){return Xs.call(t)},Zs=Ws?Ws.toStringTag:void 0;var tc=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Zs&&Zs in Object(t)?Gs(t):Qs(t)};var ec=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var nc=tc,rc=ec,oc=function(t){return null!=t&&"object"==typeof t},ic=Function.prototype,ac=Object.prototype,sc=ic.toString,cc=ac.hasOwnProperty,uc=sc.call(Object);var lc=function(t){if(!oc(t)||"[object Object]"!=nc(t))return!1;var e=rc(t);if(null===e)return!0;var n=cc.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&sc.call(n)==uc},fc=p&&p.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Ds.isntEmptyObject=Ds.isEmptyObject=Ds.isntPlainObject=Ds.isPlainObject=Ds.isntObject=Ds.isObject=void 0;const dc=fc(lc);function yc(t){return null!==t&&"object"==typeof t}function hc(t){return(0,dc.default)(t)}Ds.isObject=yc,Ds.isntObject=function(t){return!yc(t)},Ds.isPlainObject=hc,Ds.isntPlainObject=function(t){return!hc(t)},Ds.isEmptyObject=function(t){return 0===Object.keys(t).length},Ds.isntEmptyObject=function(t){return 0!==Object.keys(t).length},Cs.isntJsonable=Cs.isJsonable=Cs.isntJson=Cs.isJson=void 0;const vc=is,pc=ms,mc=ws,bc=zs,gc=ns,wc=Ds;function Ac(t){return(0,vc.isNull)(t)||(0,pc.isBoolean)(t)||(0,mc.isString)(t)||(0,bc.isNumber)(t)||(0,gc.isArray)(t)&&t.every(Ac)||(0,wc.isPlainObject)(t)&&Object.values(t).every(Ac)}Cs.isJson=Ac,Cs.isntJson=function(t){return!Ac(t)},Cs.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Cs.isntJsonable=function t(e){return!t()};var Ic={};Ic.isPromiseLike=Ic.isntPromiseLike=Ic.isntPromise=Ic.isPromise=void 0;const Sc=Ds,_c=us;function xc(t){return t instanceof Promise}function Tc(t){return(0,Sc.isObject)(t)&&(0,_c.isFunction)(t.then)}Ic.isPromise=xc,Ic.isntPromise=function(t){return!xc(t)},Ic.isntPromiseLike=function(t){return!Tc(t)},Ic.isPromiseLike=Tc;var Ec={};Ec.isAbsoluteURL=void 0,Ec.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=p&&p.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(ns,t),n(os,t),n(vs,t),n(ms,t),n(gs,t),n(_s,t),n(Ts,t),n(Es,t),n(js,t),n(us,t),n(Ns,t),n(Cs,t),n(is,t),n(zs,t),n(Ds,t),n(Ic,t),n(ws,t),n(ss,t),n(Ec,t)}(es),ts.chunkByAsync=void 0;const Oc=es;ts.chunkByAsync=function(t,e){return(0,Oc.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const o of t)n.push(o),await e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var jc={};jc.chunkBy=void 0,jc.chunkBy=function*(t,e){let n=[],r=0;for(const o of t)n.push(o),e(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var kc={chunk:void 0};const Nc=Xa,Bc=m;kc.chunk=function(t,e){return(0,Bc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Bc.assert)(e>0,"The parameter size must be greater than 0"),(0,Nc.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Pc={concatAsync:void 0};const qc=es,Mc=Xa;Pc.concatAsync=function(t,...e){return(0,Mc.go)((async function*(){for(const n of[t,...e])if((0,qc.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Cc={concat:void 0};const zc=Xa;Cc.concat=function(t,...e){return(0,zc.go)((function*(){for(const n of[t,...e])yield*n}))};var Rc={},Uc={};Uc.copyIterable=Uc.copyAsyncIterable=void 0,Uc.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Uc.copyIterable=function*(t){for(const e of t)yield e},Rc.dropAsync=void 0;const Dc=Xa,Fc=Uc,Jc=m;Rc.dropAsync=function(t,e){return(0,Jc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Fc.copyAsyncIterable)(t):(0,Dc.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Wc={dropRightAsync:void 0};const Lc=Xa,Vc=Uc,Kc=m;Wc.dropRightAsync=function(t,e){return(0,Kc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Vc.copyAsyncIterable)(t):(0,Lc.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 Yc={dropRight:void 0};const $c=Xa,Hc=Uc,Xc=m;Yc.dropRight=function(t,e){return(0,Xc.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xc.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Hc.copyIterable)(t):(0,$c.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Gc={dropUntilAsync:void 0};const Qc=es;Gc.dropUntilAsync=function(t,e){return(0,Qc.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||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 o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Zc={};Zc.dropUntil=void 0,Zc.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||e(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var tu={drop:void 0};const eu=Xa,nu=Uc,ru=m;tu.drop=function(t,e){return(0,ru.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,ru.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,nu.copyIterable)(t):(0,eu.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||e<=0);)e--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var ou={filterAsync:void 0};const iu=es;ou.filterAsync=function(t,e){return(0,iu.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 au={};au.filter=void 0,au.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var su={},cu={},uu={flattenByAsync:void 0};const lu=es;function fu(t){return(0,lu.isIterable)(t)&&(0,lu.isntChar)(t)}uu.flattenByAsync=function(t,e){return(0,lu.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)fu(o)&&await e(o,r)?yield*n(o,r+1):yield o}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const o of t)fu(o)&&await e(o,r)?yield*n(o,r+1):yield o}},cu.flattenDeepAsync=void 0;const du=uu,yu=m;cu.flattenDeepAsync=function(t,e=1/0){return(0,yu.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,yu.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,du.flattenByAsync)(t,((t,n)=>n<=e))},su.flattenAsync=void 0;const hu=cu;su.flattenAsync=function(t){return(0,hu.flattenDeepAsync)(t,1)};var vu={flattenBy:void 0};const pu=es;vu.flattenBy=function(t,e){return function*t(n,r){for(const i of n)o=i,(0,pu.isIterable)(o)&&(0,pu.isntChar)(o)&&e(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var mu={flattenDeep:void 0};const bu=vu,gu=m;mu.flattenDeep=function(t,e=1/0){return(0,gu.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,gu.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,bu.flattenBy)(t,((t,n)=>n<=e))};var wu={flatten:void 0};const Au=mu;wu.flatten=function(t){return(0,Au.flattenDeep)(t,1)};var Iu={mapAsync:void 0};const Su=es;Iu.mapAsync=function(t,e){return(0,Su.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 _u={};_u.map=void 0,_u.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var xu={repeatAsync:void 0};const Tu=Xa,Eu=m;xu.repeatAsync=function(t,e){return(0,Eu.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Eu.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,Tu.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 Ou={repeat:void 0};const ju=Xa,ku=m;Ou.repeat=function(t,e){return(0,ku.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,ku.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,ju.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 Nu={sliceAsync:void 0};const Bu=Xa,Pu=m;Nu.sliceAsync=function(t,e,n=1/0){return(0,Pu.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Pu.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Pu.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Pu.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Bu.go)((async function*(){let r=0;for await(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var qu={slice:void 0};const Mu=Xa,Cu=m;qu.slice=function(t,e,n=1/0){return(0,Cu.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Cu.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Cu.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Cu.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Mu.go)((function*(){let r=0;for(const o of t){if(r>=n)break;r>=e&&(yield o),r++}}))};var zu={};zu.splitAsync=void 0,zu.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ru={splitByAsync:void 0};const Uu=es;Ru.splitByAsync=function(t,e){return(0,Uu.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t):async function*(t){let n=[],r=0;for(const o of t)await e(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(t)};var Du={};Du.splitBy=void 0,Du.splitBy=function*(t,e){let n=[],r=0;for(const o of t)e(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var Fu={};Fu.split=void 0,Fu.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ju={takeAsync:void 0};const Wu=Xa,Lu=m;Ju.takeAsync=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,Wu.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Vu={takeRightAsync:void 0};const Ku=Xa,Yu=m;Vu.takeRightAsync=function(t,e){return(0,Yu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Yu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ku.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var $u={takeRight:void 0};const Hu=Xa,Xu=m;$u.takeRight=function(t,e){return(0,Xu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Hu.go)((function*(){var n;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>e&&t.shift();yield*t}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}))};var Gu={takeUntilAsync:void 0};const Qu=es;Gu.takeUntilAsync=function(t,e){return(0,Qu.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 Zu={};Zu.takeUntil=void 0,Zu.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var tl={take:void 0};const el=Xa,nl=m;tl.take=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,el.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var rl={tapAsync:void 0};const ol=es;rl.tapAsync=function(t,e){return(0,ol.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 il={};il.tap=void 0,il.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var al={};al.toAsyncIterable=void 0,al.toAsyncIterable=async function*(t){for(const e of t)yield e};var sl={};sl.transformAsync=void 0,sl.transformAsync=async function*(t,e){yield*e(t)};var cl={};cl.transform=void 0,cl.transform=function*(t,e){yield*e(t)};var ul={};ul.uniqAsync=void 0,ul.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ll={uniqByAsync:void 0};const fl=es;ll.uniqByAsync=function(t,e){return(0,fl.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const o of t){const t=await e(o,r);n.has(t)||(yield o,n.add(t)),r++}}(t)};var dl={};dl.uniqBy=void 0,dl.uniqBy=function*(t,e){const n=new Set;let r=0;for(const o of t){const t=e(o,r);n.has(t)||(yield o,n.add(t)),r++}};var yl={};yl.uniq=void 0,yl.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var hl={zipAsync:void 0};const vl=es;var pl;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(pl||(pl={})),hl.zipAsync=function(t,...e){return async function*(...t){var e,n,r,o;const i=t.length,a=t.map((t=>(0,vl.isAsyncIterable)(t)?[pl.Async,t[Symbol.asyncIterator]()]:[pl.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let e=0;e<i;e++){const[n,r]=a[e];let o;if(o=n===pl.Async?await r.next():r.next(),o.done)return void(s[e]=!0);t[e]=o.value}yield t}}finally{const t=a.filter(((t,e)=>!s[e]));for(const[i,a]of t)i===pl.Async?await(null===(n=(e=a).return)||void 0===n?void 0:n.call(e)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...e)};var ml={};ml.zip=void 0,ml.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 o=0;o<e;o++){const{value:e,done:i}=n[o].next();if(i)return void(r[o]=!0);t[o]=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 e=p&&p.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Ha,t),n(ts,t),n(jc,t),n(kc,t),n(Pc,t),n(Cc,t),n(Rc,t),n(Wc,t),n(Yc,t),n(Gc,t),n(Zc,t),n(tu,t),n(ou,t),n(au,t),n(su,t),n(uu,t),n(vu,t),n(cu,t),n(mu,t),n(wu,t),n(Iu,t),n(_u,t),n(xu,t),n(Ou,t),n(Nu,t),n(qu,t),n(zu,t),n(Ru,t),n(Du,t),n(Fu,t),n(Ju,t),n(Vu,t),n($u,t),n(Gu,t),n(Zu,t),n(tl,t),n(rl,t),n(il,t),n(al,t),n(sl,t),n(cl,t),n(ul,t),n(ll,t),n(dl,t),n(yl,t),n(hl,t),n(ml,t)}($a);var bl={},gl={};gl.consume=void 0,gl.consume=function(t,e){return e(t)};var wl={eachAsync:void 0};const Al=es;wl.eachAsync=function(t,e){return(0,Al.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 Il={};Il.each=void 0,Il.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Sl={everyAsync:void 0};const _l=es;Sl.everyAsync=function(t,e){return(0,_l.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 xl={};xl.every=void 0,xl.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Tl={findAsync:void 0};const El=es;Tl.findAsync=function(t,e){return(0,El.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 Ol={};Ol.find=void 0,Ol.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var jl={};jl.firstAsync=void 0,jl.firstAsync=async function(t){for await(const e of t)return e};var kl={};kl.first=void 0,kl.first=function(t){for(const e of t)return e};var Nl={};Nl.includesAsync=void 0,Nl.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Bl={};Bl.includes=void 0,Bl.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Pl={};Pl.matchAsync=void 0,Pl.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var ql={};ql.match=void 0,ql.match=function(t,e){const n=e.length;let r=0;for(const o of t)if(o===e[r]&&r++,r===n)return!0;return!1};var Ml={reduceAsync:void 0};const Cl=es;Ml.reduceAsync=function(t,e,n){return(0,Cl.isUndefined)(n)?function(t,e){return(0,Cl.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await e(a,t,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(t){const e=await t.next();if(e.done)throw o=!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 o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Cl.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=n,o=0;for(const n of t)r=await e(r,n,o++);return r}async function o(t){let r=n,o=0;for await(const n of t)r=await e(r,n,o++);return r}}(t,e,n)};var zl={reduce:void 0};const Rl=es;zl.reduce=function(t,e,n){return(0,Rl.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=e(a,t,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(t){const e=t.next();if(e.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,o=0;for(const n of t)r=e(r,n,o++);return r}(t,e,n)};var Ul={someAsync:void 0};const Dl=es;Ul.someAsync=function(t,e){return(0,Dl.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 Fl={};Fl.some=void 0,Fl.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Jl={};Jl.lastAsync=void 0,Jl.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await n.next()),!r;)o=t;return o}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Wl={};Wl.last=void 0,Wl.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=n.next()),!r;)o=t;return o}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Ll={toArrayAsync:void 0};const Vl=gl;Ll.toArrayAsync=function(t){return(0,Vl.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Kl={toArray:void 0};const Yl=gl;Kl.toArray=function(t){return(0,Yl.consume)(t,(t=>Array.from(t)))};var $l={toSetAsync:void 0};const Hl=gl;$l.toSetAsync=function(t){return(0,Hl.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Xl={toSet:void 0};const Gl=gl;Xl.toSet=function(t){return(0,Gl.consume)(t,(t=>new Set(t)))};var Ql={};Ql.count=void 0,Ql.count=function(t){let e=0;for(const n of t)e++;return e};var Zl,tf,ef={};ef.countAsync=void 0,ef.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var e=p&&p.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(gl,t),n(wl,t),n(Il,t),n(Sl,t),n(xl,t),n(Tl,t),n(Ol,t),n(jl,t),n(kl,t),n(Nl,t),n(Bl,t),n(Pl,t),n(ql,t),n(Ml,t),n(zl,t),n(Ul,t),n(Fl,t),n(Jl,t),n(Wl,t),n(Ll,t),n(Kl,t),n($l,t),n(Xl,t),n(Ql,t),n(ef,t)}(bl),function(t){var e=p&&p.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n($a,t),n(bl,t)}(Ya);class nf{constructor(t){Zl.set(this,void 0),tf.set(this,new Map),m.assert(Number.isInteger(t),"The parameter limit must be an integer"),m.assert(t>0,"The parameter limit must be a positive value"),e(this,Zl,t,"f")}get[(Zl=new WeakMap,tf=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,tf,"f").size}set(e,n){return t(this,tf,"f").has(e)?this.updateItem(e,n):(t(this,tf,"f").size===t(this,Zl,"f")&&t(this,tf,"f").delete(this.getColdestKey()),t(this,tf,"f").set(e,n)),this}has(e){return t(this,tf,"f").has(e)}get(e){if(!this.has(e))return;const n=t(this,tf,"f").get(e);return this.updateItem(e,n),n}delete(e){return t(this,tf,"f").delete(e)}clear(){t(this,tf,"f").clear()}updateItem(e,n){t(this,tf,"f").delete(e),t(this,tf,"f").set(e,n)}getColdestKey(){return Ya.first(t(this,tf,"f").keys())}}var rf={},of={},af={},sf={};sf.random=void 0,sf.random=function(t,e){return Math.random()*(e-t)+t};var cf={};cf.randomInt=void 0,cf.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var uf={};uf.randomIntInclusive=void 0,uf.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(sf,t),n(cf,t),n(uf,t)}(af),of.calculateExponentialBackoffTimeout=void 0;const lf=af;of.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:o=!0}){const i=Math.min(r**e*t,n);return o?(0,lf.randomIntInclusive)(0,i):i};var ff={};ff.setTimeout=void 0,ff.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var df={setSchedule:void 0};const yf=ff;df.setSchedule=function(t,e){const n=t-Date.now();return(0,yf.setTimeout)(n,e)};var hf={};hf.setInterval=void 0,hf.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var vf={setImmediate:void 0};const pf=ff;vf.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,pf.setTimeout)(0,t)};var mf={setTimeoutLoop:void 0};const bf=ff;mf.setTimeoutLoop=function(t,e){let n=!1,r=(0,bf.setTimeout)(t,(async function o(){await e(),n||(r=(0,bf.setTimeout)(t,o))}));return()=>{n=!0,r()}};var gf={setDynamicTimeoutLoop:void 0};const wf=ff;var Af,If,Sf,_f,xf,Tf,Ef;gf.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,wf.setTimeout)(t,(async function o(){const i=Date.now();await e();const a=Date.now()-i;n||(r=(0,wf.setTimeout)(Math.max(t-a,0),o))}));return()=>{n=!0,r()}},function(t){var e=p&&p.__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]}),n=p&&p.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(of,t),n(ff,t),n(df,t),n(hf,t),n(vf,t),n(mf,t),n(gf,t)}(rf);class Of{constructor(){Af.set(this,new Map),If.set(this,void 0),this.itemMetadataSortedByExpirationTime=[]}get[(Af=new WeakMap,If=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,Af,"f").size}set(e,n,r){return t(this,Af,"f").set(e,n),this.removeItemMetadata(e),this.addItemMetadata(e,Date.now()+r),this}has(e){return t(this,Af,"f").has(e)}get(e){return t(this,Af,"f").get(e)}delete(e){const n=t(this,Af,"f").delete(e);if(n){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.key===e));this.itemMetadataSortedByExpirationTime.splice(t,1),0===t&&this.rescheduleClearTimeout()}return n}clear(){var e;t(this,Af,"f").clear(),null===(e=t(this,If,"f"))||void 0===e||e.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(e){const n=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.expirationTime>e));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((e=>t(this,Af,"f").delete(e.key)))}rescheduleClearTimeout(){var n;if(null===(n=t(this,If,"f"))||void 0===n||n.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const n=rf.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));e(this,If,(()=>{n(),e(this,If,void 0,"f")}),"f")}}}}class jf{constructor(t){Sf.set(this,void 0),_f.set(this,new Map),xf.set(this,void 0),this.itemMetadataSortedByExpirationTime=[],m.assert(Number.isInteger(t),"The parameter limit must be an integer"),m.assert(t>0,"The parameter limit must be a positive value"),e(this,Sf,t,"f")}get[(Sf=new WeakMap,_f=new WeakMap,xf=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return t(this,_f,"f").size}set(e,n,r){return t(this,_f,"f").has(e)?(this.updateItem(e,n),this.removeItemMetadata(e),this.addItemMetadata(e,Date.now()+r)):(t(this,_f,"f").size===t(this,Sf,"f")&&t(this,_f,"f").delete(this.getColdestKey()),t(this,_f,"f").set(e,n),this.addItemMetadata(e,Date.now()+r)),this}has(e){return t(this,_f,"f").has(e)}get(e){if(this.has(e)){const n=t(this,_f,"f").get(e);return this.updateItem(e,n),n}}delete(e){const n=t(this,_f,"f").delete(e);if(n){const t=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.key===e));this.itemMetadataSortedByExpirationTime.splice(t,1),0===t&&this.rescheduleClearTimeout()}return n}clear(){var e;t(this,_f,"f").clear(),null===(e=t(this,xf,"f"))||void 0===e||e.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(e,n){t(this,_f,"f").delete(e),t(this,_f,"f").set(e,n)}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(e){const n=this.itemMetadataSortedByExpirationTime.findIndex((t=>t.expirationTime>e));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((e=>t(this,_f,"f").delete(e.key)))}rescheduleClearTimeout(){var n;if(null===(n=t(this,xf,"f"))||void 0===n||n.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const n=rf.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));e(this,xf,(()=>{n(),e(this,xf,void 0,"f")}),"f")}}}getColdestKey(){return Ya.first(t(this,_f,"f").keys())}}class kf{constructor(t){this.value=t,this.children=new Map}}class Nf{constructor(){Tf.set(this,new kf)}get[(Tf=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(e,n){let r=t(this,Tf,"f");for(const t of e)r.children.has(t)||r.children.set(t,new kf),r=r.children.get(t);return r.value=n,this}has(e){let n=t(this,Tf,"f");for(const t of e){if(!n.children.has(t))return!1;n=n.children.get(t)}return void 0!==n.value}get(e){let n=t(this,Tf,"f");for(const t of e){if(!n.children.has(t))return;n=n.children.get(t)}return n.value}delete(e){const n=[];let r=t(this,Tf,"f");for(const t of e){if(!r.children.has(t))return!1;n.push(r),r=r.children.get(t)}if(delete r.value,0===r.children.size)for(const[t,r]of Ya.toArray(Ya.zip(e,n)).reverse())if(r.children.delete(t),0!==r.children.size)break;return!0}}class Bf{constructor(t,n){this.schema=t,Ef.set(this,void 0),e(this,Ef,n,"f")}get state(){return t(this,Ef,"f")}matches(e){return t(this,Ef,"f")===e}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new Pf(this.state,t);e(this,Ef,this.schema[this.state][t],"f")}}Ef=new WeakMap;class Pf extends m.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
1
2
  /*! *****************************************************************************
2
3
  Copyright (c) Microsoft Corporation.
3
4
 
@@ -11,6 +12,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
14
  PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
- var t,e,n,r,i,o=function(t,e){return(o=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 s(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}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function a(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 c(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 u(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 l(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function f(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}class d{constructor(e){t.set(this,void 0),f(this,t,e,"f")}set(e){f(this,t,e,"f")}get(){return l(this,t,"f")}}function y([t,e]){return null===e?[t]:[t,...y(e)]}function v([t,...e]){return[t,e.length?v(e):null]}t=new WeakMap;class h{constructor(){e.set(this,new Map)}get[(e=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}on(t,n){l(this,e,"f").has(t)||l(this,e,"f").set(t,new Set);l(this,e,"f").get(t).add(n)}off(t,n){if(!l(this,e,"f").has(t))return;const r=l(this,e,"f").get(t);r.delete(n),0===r.size&&l(this,e,"f").delete(t)}emit(t,n){if(!l(this,e,"f").has(t))return;l(this,e,"f").get(t).forEach((t=>t(n)))}}class p{constructor(t){this.hash=t,n.set(this,new Map)}get[(n=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return l(this,n,"f").size}set(t,e){return l(this,n,"f").set(this.hash(t),e),this}has(t){return l(this,n,"f").has(this.hash(t))}get(t){return l(this,n,"f").get(this.hash(t))}delete(t){return l(this,n,"f").delete(this.hash(t))}clear(){l(this,n,"f").clear()}}class m{constructor(t){this.hash=t,r.set(this,new Map)}get[(r=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return l(this,r,"f").size}[Symbol.iterator](){return l(this,r,"f").values()}add(t){return l(this,r,"f").set(this.hash(t),t),this}delete(t){return l(this,r,"f").delete(this.hash(t))}has(t){return l(this,r,"f").has(this.hash(t))}clear(){l(this,r,"f").clear()}values(){return l(this,r,"f").values()}}class b{constructor(){i.set(this,[])}get[(i=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return l(this,i,"f").length}empty(){l(this,i,"f").length=0}enqueue(...t){l(this,i,"f").push(...t)}dequeue(){return l(this,i,"f").shift()}remove(t){let e;for(;(e=l(this,i,"f").indexOf(t))>=0;)l(this,i,"f").splice(e,1)}}var g,w,A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},S={},I={},T={},E={},O={},x={},j={};j.go=void 0,j.go=function(t){return t()},g=x,w=A&&A.__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]}),(A&&A.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||w(e,t,n)})(j,g);var _={},B={CustomError:void 0};class k extends Error{get name(){return this.constructor.name}}B.CustomError=k;var N={ExpectedError:void 0};const P=B;class M extends P.CustomError{}N.ExpectedError=M;var R={AssertionError:void 0};const C=B;class q extends C.CustomError{}R.AssertionError=q;var U={};U.normalize=void 0,U.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var J={refute:void 0};const z=N;J.refute=function(t,e){if(t)throw new z.ExpectedError(e)};var D={assert:void 0};const F=R;D.assert=function(t,e){if(!t)throw new F.AssertionError(e)},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(B,t),n(N,t),n(R,t),n(U,t),n(J,t),n(D,t)}(_),O.chunkAsync=void 0;const W=x,L=_;O.chunkAsync=function(t,e){return(0,L.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,L.assert)(e>0,"The parameter size must be greater than 0"),(0,W.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 K={},V={},H={};function Y(t){return Array.isArray(t)}H.isntEmptyArray=H.isEmptyArray=H.isntArray=H.isArray=void 0,H.isArray=Y,H.isntArray=function(t){return!Y(t)},H.isEmptyArray=function(t){return 0===t.length},H.isntEmptyArray=function(t){return 0!==t.length};var $={},G={};function Q(t){return null===t}G.isntNull=G.isNull=void 0,G.isNull=Q,G.isntNull=function(t){return!Q(t)};var X={};function Z(t){return void 0===t}X.isntUndefined=X.isUndefined=void 0,X.isUndefined=Z,X.isntUndefined=function(t){return!Z(t)},$.isntAsyncIterable=$.isAsyncIterable=void 0;const tt=G,et=X;function nt(t){return(0,tt.isntNull)(t)&&(0,et.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}$.isAsyncIterable=nt,$.isntAsyncIterable=function(t){return!nt(t)};var rt={};function it(t){return"bigint"==typeof t}rt.isntBigInt=rt.isBigInt=void 0,rt.isBigInt=it,rt.isntBigInt=function(t){return!it(t)};var ot={};function st(t){return"boolean"==typeof t}ot.isntBoolean=ot.isBoolean=void 0,ot.isBoolean=st,ot.isntBoolean=function(t){return!st(t)};var at={},ct={};function ut(t){return"string"==typeof t}ct.isntString=ct.isString=void 0,ct.isString=ut,ct.isntString=function(t){return!ut(t)},at.isntChar=at.isChar=void 0;const lt=ct;function ft(t){return(0,lt.isString)(t)&&1===t.length}at.isChar=ft,at.isntChar=function(t){return!ft(t)};var dt={};function yt(t){return t instanceof Date}dt.isntDate=dt.isDate=void 0,dt.isDate=yt,dt.isntDate=function(t){return!yt(t)};var vt={};vt.inEnum=void 0,vt.inEnum=function(t,e){return Object.values(e).includes(t)};var ht={};function pt(t){return t instanceof Error}ht.isntError=ht.isError=void 0,ht.isError=pt,ht.isntError=function(t){return!pt(t)};var mt={};function bt(t){return!t}mt.isntFalsy=mt.isFalsy=void 0,mt.isFalsy=bt,mt.isntFalsy=function(t){return!bt(t)};var gt={};function wt(t){return"function"==typeof t}gt.isntFunction=gt.isFunction=void 0,gt.isFunction=wt,gt.isntFunction=function(t){return!wt(t)};var At={};At.isntIterable=At.isIterable=void 0;const St=G,It=X;function Tt(t){return(0,St.isntNull)(t)&&(0,It.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}At.isIterable=Tt,At.isntIterable=function(t){return!Tt(t)};var Et={},Ot={};var xt=Function.prototype,jt=Object.prototype,_t=xt.toString,Bt=jt.hasOwnProperty,kt=_t.call(Object),Nt=jt.toString,Pt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var Mt=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=Nt.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=Pt(t);if(null===e)return!0;var n=Bt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&_t.call(n)==kt},Rt=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Ot.isntEmptyObject=Ot.isEmptyObject=Ot.isntPlainObject=Ot.isPlainObject=Ot.isntObject=Ot.isObject=void 0;const Ct=Rt(Mt);function qt(t){return null!==t&&"object"==typeof t}function Ut(t){return(0,Ct.default)(t)}Ot.isObject=qt,Ot.isntObject=function(t){return!qt(t)},Ot.isPlainObject=Ut,Ot.isntPlainObject=function(t){return!Ut(t)},Ot.isEmptyObject=function(t){return 0===Object.keys(t).length},Ot.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var Jt={};function zt(t){return"number"==typeof t}Jt.isntNumber=Jt.isNumber=void 0,Jt.isNumber=zt,Jt.isntNumber=function(t){return!zt(t)},Et.isntJsonRpcError=Et.isJsonRpcError=Et.isntJsonRpcSuccess=Et.isJsonRpcSuccess=Et.isntJsonRpcRequest=Et.isJsonRpcRequest=Et.isntJsonRpcNotification=Et.isJsonRpcNotification=void 0;const Dt=H,Ft=Ot,Wt=ct,Lt=Jt,Kt=X;function Vt(t){return(0,Wt.isString)(t)||(0,Lt.isNumber)(t)}function Ht(t){return(0,Dt.isArray)(t)||(0,Ft.isObject)(t)}function Yt(t){return(0,Ft.isPlainObject)(t)&&(0,Wt.isString)(t.jsonrpc)&&(0,Wt.isString)(t.method)&&(0,Kt.isUndefined)(t.id)&&Ht(t.params)}function $t(t){return(0,Ft.isPlainObject)(t)&&(0,Wt.isString)(t.jsonrpc)&&(0,Wt.isString)(t.method)&&Vt(t.id)&&Ht(t.params)}function Gt(t){return(0,Ft.isPlainObject)(t)&&(0,Wt.isString)(t.jsonrpc)&&(0,Wt.isString)(t.id)&&"result"in t}function Qt(t){return(0,Ft.isPlainObject)(t)&&(0,Wt.isString)(t.jsonrpc)&&Vt(t.id)&&function(t){return(0,Ft.isPlainObject)(t)&&(0,Lt.isNumber)(t.code)&&(0,Wt.isString)(t.message)&&((0,Kt.isUndefined)(t.data)||(0,Ft.isObject)(t.data))}(t.error)}Et.isJsonRpcNotification=Yt,Et.isntJsonRpcNotification=function(t){return!Yt(t)},Et.isJsonRpcRequest=$t,Et.isntJsonRpcRequest=function(t){return!$t(t)},Et.isJsonRpcSuccess=Gt,Et.isntJsonRpcSuccess=function(t){return!Gt(t)},Et.isJsonRpcError=Qt,Et.isntJsonRpcError=function(t){return!Qt(t)};var Xt={};Xt.isntJson=Xt.isJson=void 0,Xt.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Xt.isntJson=function t(e){return!t()};var Zt={};Zt.isAbsoluteURL=void 0,Zt.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(H,t),n($,t),n(rt,t),n(ot,t),n(at,t),n(dt,t),n(vt,t),n(ht,t),n(mt,t),n(gt,t),n(At,t),n(Et,t),n(Xt,t),n(G,t),n(Jt,t),n(Ot,t),n(ct,t),n(X,t),n(Zt,t)}(V),K.chunkByAsync=void 0;const te=V;K.chunkByAsync=function(t,e){return(0,te.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 ee={};ee.chunkBy=void 0,ee.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 ne={chunk:void 0};const re=x,ie=_;ne.chunk=function(t,e){return(0,ie.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ie.assert)(e>0,"The parameter size must be greater than 0"),(0,re.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var oe={concatAsync:void 0};const se=V,ae=x;oe.concatAsync=function(t,...e){return(0,ae.go)((async function*(){for(const n of[t,...e])if((0,se.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var ce={concat:void 0};const ue=x;ce.concat=function(t,...e){return(0,ue.go)((function*(){for(const n of[t,...e])yield*n}))};var le={},fe={};fe.copyIterable=fe.copyAsyncIterable=void 0,fe.copyAsyncIterable=async function*(t){for await(const e of t)yield e},fe.copyIterable=function*(t){for(const e of t)yield e},le.dropAsync=void 0;const de=x,ye=fe,ve=_;le.dropAsync=function(t,e){return(0,ve.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,ve.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,ye.copyAsyncIterable)(t):(0,de.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 he={dropRightAsync:void 0};const pe=x,me=fe,be=_;he.dropRightAsync=function(t,e){return(0,be.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,be.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,me.copyAsyncIterable)(t):(0,pe.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 ge={dropRight:void 0};const we=x,Ae=fe,Se=_;ge.dropRight=function(t,e){return(0,Se.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Se.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ae.copyIterable)(t):(0,we.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Ie={dropUntilAsync:void 0};const Te=V;Ie.dropUntilAsync=function(t,e){return(0,Te.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 Ee={};Ee.dropUntil=void 0,Ee.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 Oe={drop:void 0};const xe=x,je=fe,_e=_;Oe.drop=function(t,e){return(0,_e.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,_e.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,je.copyIterable)(t):(0,xe.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 Be={filterAsync:void 0};const ke=V;Be.filterAsync=function(t,e){return(0,ke.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 Ne={};Ne.filter=void 0,Ne.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Pe={},Me={},Re={flattenByAsync:void 0};const Ce=V;function qe(t){return(0,Ce.isIterable)(t)&&(0,Ce.isntChar)(t)}Re.flattenByAsync=function(t,e){return(0,Ce.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)qe(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)qe(i)&&await e(i,r)?yield*n(i,r+1):yield i}},Me.flattenDeepAsync=void 0;const Ue=Re,Je=_;Me.flattenDeepAsync=function(t,e=1/0){return(0,Je.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Je.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Ue.flattenByAsync)(t,((t,n)=>n<=e))},Pe.flattenAsync=void 0;const ze=Me;Pe.flattenAsync=function(t){return(0,ze.flattenDeepAsync)(t,1)};var De={flattenBy:void 0};const Fe=V;De.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,Fe.isIterable)(i=o)&&(0,Fe.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var We={flattenDeep:void 0};const Le=De,Ke=_;We.flattenDeep=function(t,e=1/0){return(0,Ke.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Ke.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Le.flattenBy)(t,((t,n)=>n<=e))};var Ve={flatten:void 0};const He=We;Ve.flatten=function(t){return(0,He.flattenDeep)(t,1)};var Ye={mapAsync:void 0};const $e=V;Ye.mapAsync=function(t,e){return(0,$e.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 Ge={};Ge.map=void 0,Ge.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Qe={repeatAsync:void 0};const Xe=x,Ze=_;Qe.repeatAsync=function(t,e){return(0,Ze.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Ze.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,Xe.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 tn={repeat:void 0};const en=x,nn=_;tn.repeat=function(t,e){return(0,nn.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,nn.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,en.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 rn={sliceAsync:void 0};const on=x,sn=_;rn.sliceAsync=function(t,e,n=1/0){return(0,sn.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,sn.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,sn.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,sn.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,on.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var an={slice:void 0};const cn=x,un=_;an.slice=function(t,e,n=1/0){return(0,un.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,un.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,un.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,un.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,cn.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ln={};ln.splitAsync=void 0,ln.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var fn={splitByAsync:void 0};const dn=V;fn.splitByAsync=function(t,e){return(0,dn.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 yn={};yn.splitBy=void 0,yn.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 vn={};vn.split=void 0,vn.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var hn={takeAsync:void 0};const pn=x,mn=_;hn.takeAsync=function(t,e){return(0,mn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,mn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,pn.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var bn={takeRightAsync:void 0};const gn=x,wn=_;bn.takeRightAsync=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,gn.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 An={takeRight:void 0};const Sn=x,In=_;An.takeRight=function(t,e){return(0,In.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,In.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Sn.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 Tn={takeUntilAsync:void 0};const En=V;Tn.takeUntilAsync=function(t,e){return(0,En.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 On={};On.takeUntil=void 0,On.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var xn={take:void 0};const jn=x,_n=_;xn.take=function(t,e){return(0,_n.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,_n.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,jn.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Bn={tapAsync:void 0};const kn=V;Bn.tapAsync=function(t,e){return(0,kn.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 Nn={};Nn.tap=void 0,Nn.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Pn={};Pn.toAsyncIterable=void 0,Pn.toAsyncIterable=async function*(t){for(const e of t)yield e};var Mn={};Mn.transformAsync=void 0,Mn.transformAsync=async function*(t,e){yield*e(t)};var Rn={};Rn.transform=void 0,Rn.transform=function*(t,e){yield*e(t)};var Cn={};Cn.uniqAsync=void 0,Cn.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var qn={uniqByAsync:void 0};const Un=V;qn.uniqByAsync=function(t,e){return(0,Un.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 Jn={};Jn.uniqBy=void 0,Jn.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 zn={};zn.uniq=void 0,zn.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var Dn={zipAsync:void 0};const Fn=V;var Wn;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(Wn||(Wn={})),Dn.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,Fn.isAsyncIterable)(t)?[Wn.Async,t[Symbol.asyncIterator]()]:[Wn.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===Wn.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===Wn.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 Ln={};Ln.zip=void 0,Ln.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 e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(O,t),n(K,t),n(ee,t),n(ne,t),n(oe,t),n(ce,t),n(le,t),n(he,t),n(ge,t),n(Ie,t),n(Ee,t),n(Oe,t),n(Be,t),n(Ne,t),n(Pe,t),n(Re,t),n(De,t),n(Me,t),n(We,t),n(Ve,t),n(Ye,t),n(Ge,t),n(Qe,t),n(tn,t),n(rn,t),n(an,t),n(ln,t),n(fn,t),n(yn,t),n(vn,t),n(hn,t),n(bn,t),n(An,t),n(Tn,t),n(On,t),n(xn,t),n(Bn,t),n(Nn,t),n(Pn,t),n(Mn,t),n(Rn,t),n(Cn,t),n(qn,t),n(Jn,t),n(zn,t),n(Dn,t),n(Ln,t)}(E);var Kn={},Vn={};Vn.consume=void 0,Vn.consume=function(t,e){return e(t)};var Hn={eachAsync:void 0};const Yn=V;Hn.eachAsync=function(t,e){return(0,Yn.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 $n={};$n.each=void 0,$n.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Gn={everyAsync:void 0};const Qn=V;Gn.everyAsync=function(t,e){return(0,Qn.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 Xn={};Xn.every=void 0,Xn.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Zn={findAsync:void 0};const tr=V;Zn.findAsync=function(t,e){return(0,tr.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 er={};er.find=void 0,er.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var nr={};nr.firstAsync=void 0,nr.firstAsync=async function(t){for await(const e of t)return e};var rr={};rr.first=void 0,rr.first=function(t){for(const e of t)return e};var ir={};ir.includesAsync=void 0,ir.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var or={};or.includes=void 0,or.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var sr={};sr.matchAsync=void 0,sr.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 ar={};ar.match=void 0,ar.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 cr={reduceAsync:void 0};const ur=V;cr.reduceAsync=function(t,e,n){return(0,ur.isUndefined)(n)?function(t,e){return(0,ur.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,ur.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 lr={reduce:void 0};const fr=V;lr.reduce=function(t,e,n){return(0,fr.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 dr={someAsync:void 0};const yr=V;dr.someAsync=function(t,e){return(0,yr.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 vr={};vr.some=void 0,vr.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var hr={};hr.lastAsync=void 0,hr.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 pr={};pr.last=void 0,pr.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 mr={toArrayAsync:void 0};const br=Vn;mr.toArrayAsync=function(t){return(0,br.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var gr={toArray:void 0};const wr=Vn;gr.toArray=function(t){return(0,wr.consume)(t,(t=>Array.from(t)))};var Ar={toSetAsync:void 0};const Sr=Vn;Ar.toSetAsync=function(t){return(0,Sr.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ir={toSet:void 0};const Tr=Vn;Ir.toSet=function(t){return(0,Tr.consume)(t,(t=>new Set(t)))},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Vn,t),n(Hn,t),n($n,t),n(Gn,t),n(Xn,t),n(Zn,t),n(er,t),n(nr,t),n(rr,t),n(ir,t),n(or,t),n(sr,t),n(ar,t),n(cr,t),n(lr,t),n(dr,t),n(vr,t),n(hr,t),n(pr,t),n(mr,t),n(gr,t),n(Ar,t),n(Ir,t)}(Kn),function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(E,t),n(Kn,t)}(T);var Er={},Or={};Or.traverseErrorPrototypeChain=void 0,Or.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Er.getErrorNames=void 0;const xr=V,jr=Or;Er.getErrorNames=function*(t){var e;if((0,xr.isError)(t))for(const n of(0,jr.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 _r={isSerializableError:void 0};const Br=V;_r.isSerializableError=function(t){return(0,Br.isObject)(t)&&(0,Br.isString)(t.name)&&(0,Br.isString)(t.message)&&((0,Br.isString)(t.stack)||(0,Br.isNull)(t.stack))&&(0,Br.isArray)(t.ancestors)&&t.ancestors.every(Br.isString)},I.CustomError=void 0;const kr=T,Nr=Er,Pr=V,Mr=_r;class Rr extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,kr.first)((0,Nr.getErrorNames)(this)))&&void 0!==t?t:Rr.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Pr.isError)(t)||(0,Mr.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Nr.getErrorNames)(this.prototype)].reverse(),r=(0,kr.toArray)((0,Nr.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}I.CustomError=Rr;var Cr={AssertionError:void 0};const qr=I;class Ur extends qr.CustomError{}Cr.AssertionError=Ur;var Jr={normalize:void 0};const zr=Er,Dr=T;Jr.normalize=function(t){var e;const[n,...r]=(0,Dr.toArray)((0,zr.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Fr={},Wr={},Lr={};Lr.pass=void 0,Lr.pass=function(){},function(t){var e=A&&A.__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]});(A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Lr,t)}(Wr),Fr.hydrate=void 0;const Kr=Wr;function Vr(t,e){const n=function(){(0,Kr.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}Fr.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=Vr(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 Hr={assert:void 0};const Yr=Cr;Hr.assert=function(t,e){if(!t)throw new Yr.AssertionError(e)},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(I,t),n(Cr,t),n(_r,t),n(Jr,t),n(Fr,t),n(Hr,t),n(Er,t),n(Or,t)}(S);var $r={},Gr={},Qr={},Xr={},Zr={};Zr.go=void 0,Zr.go=function(t){return t()},function(t){var e=A&&A.__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]});(A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Zr,t)}(Xr),Qr.chunkAsync=void 0;const ti=Xr,ei=S;Qr.chunkAsync=function(t,e){return(0,ei.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ei.assert)(e>0,"The parameter size must be greater than 0"),(0,ti.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 ni={},ri={},ii={};function oi(t){return Array.isArray(t)}ii.isntEmptyArray=ii.isEmptyArray=ii.isntArray=ii.isArray=void 0,ii.isArray=oi,ii.isntArray=function(t){return!oi(t)},ii.isEmptyArray=function(t){return 0===t.length},ii.isntEmptyArray=function(t){return 0!==t.length};var si={},ai={};function ci(t){return null===t}ai.isntNull=ai.isNull=void 0,ai.isNull=ci,ai.isntNull=function(t){return!ci(t)};var ui={};function li(t){return void 0===t}ui.isntUndefined=ui.isUndefined=void 0,ui.isUndefined=li,ui.isntUndefined=function(t){return!li(t)},si.isntAsyncIterable=si.isAsyncIterable=void 0;const fi=ai,di=ui;function yi(t){return(0,fi.isntNull)(t)&&(0,di.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}si.isAsyncIterable=yi,si.isntAsyncIterable=function(t){return!yi(t)};var vi={};function hi(t){return"bigint"==typeof t}vi.isntBigInt=vi.isBigInt=void 0,vi.isBigInt=hi,vi.isntBigInt=function(t){return!hi(t)};var pi={};function mi(t){return"boolean"==typeof t}pi.isntBoolean=pi.isBoolean=void 0,pi.isBoolean=mi,pi.isntBoolean=function(t){return!mi(t)};var bi={},gi={};function wi(t){return"string"==typeof t}gi.isntString=gi.isString=void 0,gi.isString=wi,gi.isntString=function(t){return!wi(t)},bi.isntChar=bi.isChar=void 0;const Ai=gi;function Si(t){return(0,Ai.isString)(t)&&1===t.length}bi.isChar=Si,bi.isntChar=function(t){return!Si(t)};var Ii={};function Ti(t){return t instanceof Date}Ii.isntDate=Ii.isDate=void 0,Ii.isDate=Ti,Ii.isntDate=function(t){return!Ti(t)};var Ei={};Ei.inEnum=void 0,Ei.inEnum=function(t,e){return Object.values(e).includes(t)};var Oi={};function xi(t){return t instanceof Error}Oi.isntError=Oi.isError=void 0,Oi.isError=xi,Oi.isntError=function(t){return!xi(t)};var ji={};function _i(t){return!t}ji.isntFalsy=ji.isFalsy=void 0,ji.isFalsy=_i,ji.isntFalsy=function(t){return!_i(t)};var Bi={};function ki(t){return"function"==typeof t}Bi.isntFunction=Bi.isFunction=void 0,Bi.isFunction=ki,Bi.isntFunction=function(t){return!ki(t)};var Ni={};Ni.isntIterable=Ni.isIterable=void 0;const Pi=ai,Mi=ui;function Ri(t){return(0,Pi.isntNull)(t)&&(0,Mi.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Ni.isIterable=Ri,Ni.isntIterable=function(t){return!Ri(t)};var Ci={},qi={},Ui=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};qi.isntEmptyObject=qi.isEmptyObject=qi.isntPlainObject=qi.isPlainObject=qi.isntObject=qi.isObject=void 0;const Ji=Ui(Mt);function zi(t){return null!==t&&"object"==typeof t}function Di(t){return(0,Ji.default)(t)}qi.isObject=zi,qi.isntObject=function(t){return!zi(t)},qi.isPlainObject=Di,qi.isntPlainObject=function(t){return!Di(t)},qi.isEmptyObject=function(t){return 0===Object.keys(t).length},qi.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var Fi={};function Wi(t){return"number"==typeof t}Fi.isntNumber=Fi.isNumber=void 0,Fi.isNumber=Wi,Fi.isntNumber=function(t){return!Wi(t)},Ci.isntJsonRpcError=Ci.isJsonRpcError=Ci.isntJsonRpcSuccess=Ci.isJsonRpcSuccess=Ci.isntJsonRpcRequest=Ci.isJsonRpcRequest=Ci.isntJsonRpcNotification=Ci.isJsonRpcNotification=void 0;const Li=ii,Ki=qi,Vi=gi,Hi=Fi,Yi=ui;function $i(t){return(0,Vi.isString)(t)||(0,Hi.isNumber)(t)}function Gi(t){return(0,Li.isArray)(t)||(0,Ki.isObject)(t)}function Qi(t){return(0,Ki.isPlainObject)(t)&&(0,Vi.isString)(t.jsonrpc)&&(0,Vi.isString)(t.method)&&(0,Yi.isUndefined)(t.id)&&Gi(t.params)}function Xi(t){return(0,Ki.isPlainObject)(t)&&(0,Vi.isString)(t.jsonrpc)&&(0,Vi.isString)(t.method)&&$i(t.id)&&Gi(t.params)}function Zi(t){return(0,Ki.isPlainObject)(t)&&(0,Vi.isString)(t.jsonrpc)&&(0,Vi.isString)(t.id)&&"result"in t}function to(t){return(0,Ki.isPlainObject)(t)&&(0,Vi.isString)(t.jsonrpc)&&$i(t.id)&&function(t){return(0,Ki.isPlainObject)(t)&&(0,Hi.isNumber)(t.code)&&(0,Vi.isString)(t.message)&&((0,Yi.isUndefined)(t.data)||(0,Ki.isObject)(t.data))}(t.error)}Ci.isJsonRpcNotification=Qi,Ci.isntJsonRpcNotification=function(t){return!Qi(t)},Ci.isJsonRpcRequest=Xi,Ci.isntJsonRpcRequest=function(t){return!Xi(t)},Ci.isJsonRpcSuccess=Zi,Ci.isntJsonRpcSuccess=function(t){return!Zi(t)},Ci.isJsonRpcError=to,Ci.isntJsonRpcError=function(t){return!to(t)};var eo={};eo.isntJson=eo.isJson=void 0,eo.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},eo.isntJson=function t(e){return!t()};var no={};no.isAbsoluteURL=void 0,no.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(ii,t),n(si,t),n(vi,t),n(pi,t),n(bi,t),n(Ii,t),n(Ei,t),n(Oi,t),n(ji,t),n(Bi,t),n(Ni,t),n(Ci,t),n(eo,t),n(ai,t),n(Fi,t),n(qi,t),n(gi,t),n(ui,t),n(no,t)}(ri),ni.chunkByAsync=void 0;const ro=ri;ni.chunkByAsync=function(t,e){return(0,ro.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var io={};io.chunkBy=void 0,io.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var oo={chunk:void 0};const so=Xr,ao=S;oo.chunk=function(t,e){return(0,ao.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ao.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 co={concatAsync:void 0};const uo=ri,lo=Xr;co.concatAsync=function(t,...e){return(0,lo.go)((async function*(){for(const n of[t,...e])if((0,uo.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var fo={concat:void 0};const yo=Xr;fo.concat=function(t,...e){return(0,yo.go)((function*(){for(const n of[t,...e])yield*n}))};var vo={},ho={};ho.copyIterable=ho.copyAsyncIterable=void 0,ho.copyAsyncIterable=async function*(t){for await(const e of t)yield e},ho.copyIterable=function*(t){for(const e of t)yield e},vo.dropAsync=void 0;const po=Xr,mo=ho,bo=S;vo.dropAsync=function(t,e){return(0,bo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,bo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,mo.copyAsyncIterable)(t):(0,po.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 go={dropRightAsync:void 0};const wo=Xr,Ao=ho,So=S;go.dropRightAsync=function(t,e){return(0,So.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,So.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ao.copyAsyncIterable)(t):(0,wo.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 Io={dropRight:void 0};const To=Xr,Eo=ho,Oo=S;Io.dropRight=function(t,e){return(0,Oo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Oo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Eo.copyIterable)(t):(0,To.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var xo={dropUntilAsync:void 0};const jo=ri;xo.dropUntilAsync=function(t,e){return(0,jo.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 _o={};_o.dropUntil=void 0,_o.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 Bo={drop:void 0};const ko=Xr,No=ho,Po=S;Bo.drop=function(t,e){return(0,Po.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Po.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,No.copyIterable)(t):(0,ko.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 Mo={filterAsync:void 0};const Ro=ri;Mo.filterAsync=function(t,e){return(0,Ro.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 Co={};Co.filter=void 0,Co.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var qo={},Uo={},Jo={flattenByAsync:void 0};const zo=ri;function Do(t){return(0,zo.isIterable)(t)&&(0,zo.isntChar)(t)}Jo.flattenByAsync=function(t,e){return(0,zo.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)Do(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)Do(i)&&await e(i,r)?yield*n(i,r+1):yield i}},Uo.flattenDeepAsync=void 0;const Fo=Jo,Wo=S;Uo.flattenDeepAsync=function(t,e=1/0){return(0,Wo.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Wo.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Fo.flattenByAsync)(t,((t,n)=>n<=e))},qo.flattenAsync=void 0;const Lo=Uo;qo.flattenAsync=function(t){return(0,Lo.flattenDeepAsync)(t,1)};var Ko={flattenBy:void 0};const Vo=ri;Ko.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,Vo.isIterable)(i=o)&&(0,Vo.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var Ho={flattenDeep:void 0};const Yo=Ko,$o=S;Ho.flattenDeep=function(t,e=1/0){return(0,$o.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,$o.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Yo.flattenBy)(t,((t,n)=>n<=e))};var Go={flatten:void 0};const Qo=Ho;Go.flatten=function(t){return(0,Qo.flattenDeep)(t,1)};var Xo={mapAsync:void 0};const Zo=ri;Xo.mapAsync=function(t,e){return(0,Zo.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 ts={};ts.map=void 0,ts.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var es={repeatAsync:void 0};const ns=Xr,rs=S;es.repeatAsync=function(t,e){return(0,rs.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,rs.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,ns.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 is={repeat:void 0};const os=Xr,ss=S;is.repeat=function(t,e){return(0,ss.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,ss.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,os.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 as={sliceAsync:void 0};const cs=Xr,us=S;as.sliceAsync=function(t,e,n=1/0){return(0,us.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,us.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,us.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,us.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,cs.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ls={slice:void 0};const fs=Xr,ds=S;ls.slice=function(t,e,n=1/0){return(0,ds.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,ds.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,ds.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,ds.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,fs.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ys={};ys.splitAsync=void 0,ys.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var vs={splitByAsync:void 0};const hs=ri;vs.splitByAsync=function(t,e){return(0,hs.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 ps={};ps.splitBy=void 0,ps.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 ms={};ms.split=void 0,ms.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var bs={takeAsync:void 0};const gs=Xr,ws=S;bs.takeAsync=function(t,e){return(0,ws.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,ws.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,gs.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var As={takeRightAsync:void 0};const Ss=Xr,Is=S;As.takeRightAsync=function(t,e){return(0,Is.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Is.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ss.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 Ts={takeRight:void 0};const Es=Xr,Os=S;Ts.takeRight=function(t,e){return(0,Os.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Os.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Es.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 xs={takeUntilAsync:void 0};const js=ri;xs.takeUntilAsync=function(t,e){return(0,js.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 _s={};_s.takeUntil=void 0,_s.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Bs={take:void 0};const ks=Xr,Ns=S;Bs.take=function(t,e){return(0,Ns.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ns.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,ks.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Ps={tapAsync:void 0};const Ms=ri;Ps.tapAsync=function(t,e){return(0,Ms.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 Rs={};Rs.tap=void 0,Rs.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Cs={};Cs.toAsyncIterable=void 0,Cs.toAsyncIterable=async function*(t){for(const e of t)yield e};var qs={};qs.transformAsync=void 0,qs.transformAsync=async function*(t,e){yield*e(t)};var Us={};Us.transform=void 0,Us.transform=function*(t,e){yield*e(t)};var Js={};Js.uniqAsync=void 0,Js.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var zs={uniqByAsync:void 0};const Ds=ri;zs.uniqByAsync=function(t,e){return(0,Ds.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 Fs={};Fs.uniqBy=void 0,Fs.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 Ws={};Ws.uniq=void 0,Ws.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var Ls={zipAsync:void 0};const Ks=ri;var Vs;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(Vs||(Vs={})),Ls.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,Ks.isAsyncIterable)(t)?[Vs.Async,t[Symbol.asyncIterator]()]:[Vs.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===Vs.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===Vs.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 Hs={};Hs.zip=void 0,Hs.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 e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Qr,t),n(ni,t),n(io,t),n(oo,t),n(co,t),n(fo,t),n(vo,t),n(go,t),n(Io,t),n(xo,t),n(_o,t),n(Bo,t),n(Mo,t),n(Co,t),n(qo,t),n(Jo,t),n(Ko,t),n(Uo,t),n(Ho,t),n(Go,t),n(Xo,t),n(ts,t),n(es,t),n(is,t),n(as,t),n(ls,t),n(ys,t),n(vs,t),n(ps,t),n(ms,t),n(bs,t),n(As,t),n(Ts,t),n(xs,t),n(_s,t),n(Bs,t),n(Ps,t),n(Rs,t),n(Cs,t),n(qs,t),n(Us,t),n(Js,t),n(zs,t),n(Fs,t),n(Ws,t),n(Ls,t),n(Hs,t)}(Gr);var Ys={},$s={};$s.consume=void 0,$s.consume=function(t,e){return e(t)};var Gs={eachAsync:void 0};const Qs=ri;Gs.eachAsync=function(t,e){return(0,Qs.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 Xs={};Xs.each=void 0,Xs.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Zs={everyAsync:void 0};const ta=ri;Zs.everyAsync=function(t,e){return(0,ta.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 ea={};ea.every=void 0,ea.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var na={findAsync:void 0};const ra=ri;na.findAsync=function(t,e){return(0,ra.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 ia={};ia.find=void 0,ia.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var oa={};oa.firstAsync=void 0,oa.firstAsync=async function(t){for await(const e of t)return e};var sa={};sa.first=void 0,sa.first=function(t){for(const e of t)return e};var aa={};aa.includesAsync=void 0,aa.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var ca={};ca.includes=void 0,ca.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var ua={};ua.matchAsync=void 0,ua.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 la={};la.match=void 0,la.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 fa={reduceAsync:void 0};const da=ri;fa.reduceAsync=function(t,e,n){return(0,da.isUndefined)(n)?function(t,e){return(0,da.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,da.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 ya={reduce:void 0};const va=ri;ya.reduce=function(t,e,n){return(0,va.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 ha={someAsync:void 0};const pa=ri;ha.someAsync=function(t,e){return(0,pa.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 ma={};ma.some=void 0,ma.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var ba={};ba.lastAsync=void 0,ba.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 ga={};ga.last=void 0,ga.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 wa={toArrayAsync:void 0};const Aa=$s;wa.toArrayAsync=function(t){return(0,Aa.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Sa={toArray:void 0};const Ia=$s;Sa.toArray=function(t){return(0,Ia.consume)(t,(t=>Array.from(t)))};var Ta={toSetAsync:void 0};const Ea=$s;Ta.toSetAsync=function(t){return(0,Ea.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Oa={toSet:void 0};const xa=$s;var ja,_a;Oa.toSet=function(t){return(0,xa.consume)(t,(t=>new Set(t)))},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n($s,t),n(Gs,t),n(Xs,t),n(Zs,t),n(ea,t),n(na,t),n(ia,t),n(oa,t),n(sa,t),n(aa,t),n(ca,t),n(ua,t),n(la,t),n(fa,t),n(ya,t),n(ha,t),n(ma,t),n(ba,t),n(ga,t),n(wa,t),n(Sa,t),n(Ta,t),n(Oa,t)}(Ys),function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Gr,t),n(Ys,t)}($r);class Ba{constructor(t){ja.set(this,void 0),_a.set(this,new Map),S.assert(Number.isInteger(t),"The parameter limit must be an integer"),S.assert(t>0,"The parameter limit must be a positive value"),f(this,ja,t,"f")}get[(ja=new WeakMap,_a=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return l(this,_a,"f").size}set(t,e){return l(this,_a,"f").has(t)?this.updateItem(t,e):(l(this,_a,"f").size===l(this,ja,"f")&&l(this,_a,"f").delete(this.getColdestKey()),l(this,_a,"f").set(t,e)),this}has(t){return l(this,_a,"f").has(t)}get(t){if(!this.has(t))return;const e=l(this,_a,"f").get(t);return this.updateItem(t,e),e}delete(t){return l(this,_a,"f").delete(t)}clear(){l(this,_a,"f").clear()}updateItem(t,e){l(this,_a,"f").delete(t),l(this,_a,"f").set(t,e)}getColdestKey(){return $r.first(l(this,_a,"f").keys())}}var ka={},Na={},Pa={},Ma={};Ma.random=void 0,Ma.random=function(t,e){return Math.random()*(e-t)+t};var Ra={};Ra.randomInt=void 0,Ra.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var Ca={};Ca.randomIntInclusive=void 0,Ca.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Ma,t),n(Ra,t),n(Ca,t)}(Pa),Na.calculateExponentialBackoffTimeout=void 0;const qa=Pa;Na.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,qa.randomIntInclusive)(0,o):o};var Ua={};Ua.setTimeout=void 0,Ua.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var Ja={setSchedule:void 0};const za=Ua;Ja.setSchedule=function(t,e){const n=t-Date.now();return(0,za.setTimeout)(n,e)};var Da={};Da.setInterval=void 0,Da.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var Fa={setImmediate:void 0};const Wa=Ua;Fa.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,Wa.setTimeout)(0,t)};var La={setTimeoutLoop:void 0};const Ka=Ua;La.setTimeoutLoop=function(t,e){let n=!1,r=(0,Ka.setTimeout)(t,(async function i(){await e(),n||(r=(0,Ka.setTimeout)(t,i))}));return()=>{n=!0,r()}};var Va={setDynamicTimeoutLoop:void 0};const Ha=Ua;var Ya,$a,Ga,Qa,Xa,Za,tc;Va.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,Ha.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,Ha.setTimeout)(Math.max(t-s,0),i))}));return()=>{n=!0,r()}},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Na,t),n(Ua,t),n(Ja,t),n(Da,t),n(Fa,t),n(La,t),n(Va,t)}(ka);class ec{constructor(){Ya.set(this,new Map),$a.set(this,void 0),this.itemMetadataSortedByExpirationTime=[]}get[(Ya=new WeakMap,$a=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return l(this,Ya,"f").size}set(t,e,n){return l(this,Ya,"f").set(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n),this}has(t){return l(this,Ya,"f").has(t)}get(t){return l(this,Ya,"f").get(t)}delete(t){const e=l(this,Ya,"f").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;l(this,Ya,"f").clear(),null===(t=l(this,$a,"f"))||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=>l(this,Ya,"f").delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=l(this,$a,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ka.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));f(this,$a,(()=>{e(),f(this,$a,void 0,"f")}),"f")}}}}class nc{constructor(t){Ga.set(this,void 0),Qa.set(this,new Map),Xa.set(this,void 0),this.itemMetadataSortedByExpirationTime=[],S.assert(Number.isInteger(t),"The parameter limit must be an integer"),S.assert(t>0,"The parameter limit must be a positive value"),f(this,Ga,t,"f")}get[(Ga=new WeakMap,Qa=new WeakMap,Xa=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}get size(){return l(this,Qa,"f").size}set(t,e,n){return l(this,Qa,"f").has(t)?(this.updateItem(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n)):(l(this,Qa,"f").size===l(this,Ga,"f")&&l(this,Qa,"f").delete(this.getColdestKey()),l(this,Qa,"f").set(t,e),this.addItemMetadata(t,Date.now()+n)),this}has(t){return l(this,Qa,"f").has(t)}get(t){if(this.has(t)){const e=l(this,Qa,"f").get(t);return this.updateItem(t,e),e}}delete(t){const e=l(this,Qa,"f").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;l(this,Qa,"f").clear(),null===(t=l(this,Xa,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,e){l(this,Qa,"f").delete(t),l(this,Qa,"f").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=>l(this,Qa,"f").delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=l(this,Xa,"f"))||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ka.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));f(this,Xa,(()=>{e(),f(this,Xa,void 0,"f")}),"f")}}}getColdestKey(){return $r.first(l(this,Qa,"f").keys())}}class rc{constructor(t){this.value=t,this.children=new Map}}class ic{constructor(){Za.set(this,new rc)}get[(Za=new WeakMap,Symbol.toStringTag)](){return this.constructor.name}set(t,e){let n=l(this,Za,"f");for(const e of t)n.children.has(e)||n.children.set(e,new rc),n=n.children.get(e);return n.value=e,this}has(t){let e=l(this,Za,"f");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=l(this,Za,"f");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=l(this,Za,"f");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 $r.toArray($r.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}class oc{constructor(t,e){this.schema=t,tc.set(this,void 0),f(this,tc,e,"f")}get state(){return l(this,tc,"f")}matches(t){return l(this,tc,"f")===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new sc(this.state,t);f(this,tc,this.schema[this.state][t],"f")}}tc=new WeakMap;class sc extends S.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}function ac(t){return"function"==typeof t}function cc(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 uc=cc((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 lc(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var fc=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=a(o),l=s.next();!l.done;l=s.next()){l.value.remove(this)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(ac(f))try{f()}catch(t){i=t instanceof uc?t.errors:[t]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var y=a(d),v=y.next();!v.done;v=y.next()){var h=v.value;try{vc(h)}catch(t){i=null!=i?i:[],t instanceof uc?i=u(u([],c(i)),c(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}}if(i)throw new uc(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)vc(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)&&lc(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&lc(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),dc=fc.EMPTY;function yc(t){return t instanceof fc||t&&"closed"in t&&ac(t.remove)&&ac(t.add)&&ac(t.unsubscribe)}function vc(t){ac(t)?t():t.unsubscribe()}var hc={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},pc={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=pc.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,u([t,e],c(n))):setTimeout.apply(void 0,u([t,e],c(n)))},clearTimeout:function(t){var e=pc.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function mc(){}var bc=null;function gc(t){if(hc.useDeprecatedSynchronousErrorHandling){var e=!bc;if(e&&(bc={errorThrown:!1,error:null}),t(),e){var n=bc,r=n.errorThrown,i=n.error;if(bc=null,r)throw i}}else t()}var wc=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,yc(e)&&e.add(n)):n.destination=Oc,n}return s(e,t),e.create=function(t,e,n){return new Tc(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}(fc),Ac=Function.prototype.bind;function Sc(t,e){return Ac.call(t,e)}var Ic=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){Ec(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Ec(t)}else Ec(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Ec(t)}},t}(),Tc=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;ac(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&hc.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&Sc(e.next,o),error:e.error&&Sc(e.error,o),complete:e.complete&&Sc(e.complete,o)}):i=e;return s.destination=new Ic(i),s}return s(e,t),e}(wc);function Ec(t){var e;e=t,pc.setTimeout((function(){throw e}))}var Oc={closed:!0,next:mc,error:function(t){throw t},complete:mc},xc="function"==typeof Symbol&&Symbol.observable||"@@observable";function jc(t){return t}function _c(t){return 0===t.length?jc:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Bc=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 wc||function(t){return t&&ac(t.next)&&ac(t.error)&&ac(t.complete)}(r)&&yc(r)?t:new Tc(t,e,n);return gc((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=kc(e))((function(e,r){var i=new Tc({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[xc]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return _c(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=kc(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 kc(t){var e;return null!==(e=null!=t?t:hc.Promise)&&void 0!==e?e:Promise}var Nc=cc((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Pc=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 s(e,t),e.prototype.lift=function(t){var e=new Mc(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Nc},e.prototype.next=function(t){var e=this;gc((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=a(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;gc((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;gc((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?dc:(this.currentObservers=null,o.push(t),new fc((function(){e.currentObservers=null,lc(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 Bc;return t.source=this,t},e.create=function(t,e){return new Mc(t,e)},e}(Bc),Mc=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return s(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:dc},e}(Pc),Rc={},Cc={};function qc(t){return Array.isArray(t)}Cc.isntEmptyArray=Cc.isEmptyArray=Cc.isntArray=Cc.isArray=void 0,Cc.isArray=qc,Cc.isntArray=function(t){return!qc(t)},Cc.isEmptyArray=function(t){return 0===t.length},Cc.isntEmptyArray=function(t){return 0!==t.length};var Uc={},Jc={};function zc(t){return null===t}Jc.isntNull=Jc.isNull=void 0,Jc.isNull=zc,Jc.isntNull=function(t){return!zc(t)};var Dc={};function Fc(t){return void 0===t}Dc.isntUndefined=Dc.isUndefined=void 0,Dc.isUndefined=Fc,Dc.isntUndefined=function(t){return!Fc(t)};var Wc={};function Lc(t){return"function"==typeof t}Wc.isntFunction=Wc.isFunction=void 0,Wc.isFunction=Lc,Wc.isntFunction=function(t){return!Lc(t)},Uc.isntAsyncIterable=Uc.isAsyncIterable=void 0;const Kc=Jc,Vc=Dc,Hc=Wc;function Yc(t){return(0,Kc.isntNull)(t)&&(0,Vc.isntUndefined)(t)&&(0,Hc.isFunction)(t[Symbol.asyncIterator])}Uc.isAsyncIterable=Yc,Uc.isntAsyncIterable=function(t){return!Yc(t)};var $c={};function Gc(t){return"bigint"==typeof t}$c.isntBigInt=$c.isBigInt=void 0,$c.isBigInt=Gc,$c.isntBigInt=function(t){return!Gc(t)};var Qc={};function Xc(t){return"boolean"==typeof t}Qc.isntBoolean=Qc.isBoolean=void 0,Qc.isBoolean=Xc,Qc.isntBoolean=function(t){return!Xc(t)};var Zc={},tu={};function eu(t){return"string"==typeof t}tu.isntString=tu.isString=void 0,tu.isString=eu,tu.isntString=function(t){return!eu(t)},Zc.isntChar=Zc.isChar=void 0;const nu=tu;function ru(t){return(0,nu.isString)(t)&&1===t.length}Zc.isChar=ru,Zc.isntChar=function(t){return!ru(t)};var iu={};function ou(t){return t instanceof Date}iu.isntDate=iu.isDate=void 0,iu.isDate=ou,iu.isntDate=function(t){return!ou(t)};var su={};su.inEnum=void 0,su.inEnum=function(t,e){return Object.values(e).includes(t)};var au={};function cu(t){return t instanceof Error}au.isntError=au.isError=void 0,au.isError=cu,au.isntError=function(t){return!cu(t)};var uu={};function lu(t){return!t}uu.isntFalsy=uu.isFalsy=void 0,uu.isFalsy=lu,uu.isntFalsy=function(t){return!lu(t)};var fu={};fu.isntIterable=fu.isIterable=void 0;const du=Jc,yu=Dc,vu=Wc;function hu(t){return(0,du.isntNull)(t)&&(0,yu.isntUndefined)(t)&&(0,vu.isFunction)(t[Symbol.iterator])}fu.isIterable=hu,fu.isntIterable=function(t){return!hu(t)};var pu={},mu={};function bu(t){return"number"==typeof t}mu.isntNumber=mu.isNumber=void 0,mu.isNumber=bu,mu.isntNumber=function(t){return!bu(t)};var gu={},wu=A&&A.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};gu.isntEmptyObject=gu.isEmptyObject=gu.isntPlainObject=gu.isPlainObject=gu.isntObject=gu.isObject=void 0;const Au=wu(Mt);function Su(t){return null!==t&&"object"==typeof t}function Iu(t){return(0,Au.default)(t)}gu.isObject=Su,gu.isntObject=function(t){return!Su(t)},gu.isPlainObject=Iu,gu.isntPlainObject=function(t){return!Iu(t)},gu.isEmptyObject=function(t){return 0===Object.keys(t).length},gu.isntEmptyObject=function(t){return 0!==Object.keys(t).length},pu.isntJsonable=pu.isJsonable=pu.isntJson=pu.isJson=void 0;const Tu=Jc,Eu=Qc,Ou=tu,xu=mu,ju=Cc,_u=gu;function Bu(t){return(0,Tu.isNull)(t)||(0,Eu.isBoolean)(t)||(0,Ou.isString)(t)||(0,xu.isNumber)(t)||(0,ju.isArray)(t)&&t.every(Bu)||(0,_u.isPlainObject)(t)&&Object.values(t).every(Bu)}pu.isJson=Bu,pu.isntJson=function(t){return!Bu(t)},pu.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},pu.isntJsonable=function t(e){return!t()};var ku={};ku.isPromiseLike=ku.isntPromiseLike=ku.isntPromise=ku.isPromise=void 0;const Nu=gu,Pu=Wc;function Mu(t){return t instanceof Promise}function Ru(t){return(0,Nu.isObject)(t)&&(0,Pu.isFunction)(t.then)}ku.isPromise=Mu,ku.isntPromise=function(t){return!Mu(t)},ku.isntPromiseLike=function(t){return!Ru(t)},ku.isPromiseLike=Ru;var Cu={};Cu.isAbsoluteURL=void 0,Cu.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=A&&A.__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]}),n=A&&A.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};n(Cc,t),n(Uc,t),n($c,t),n(Qc,t),n(Zc,t),n(iu,t),n(su,t),n(au,t),n(uu,t),n(Wc,t),n(fu,t),n(pu,t),n(Jc,t),n(mu,t),n(gu,t),n(ku,t),n(tu,t),n(Dc,t),n(Cu,t)}(Rc);class qu extends oc{constructor(){super(...arguments),this.stateChanges=new Pc}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),Rc.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}}export{sc as BadEventError,d as Box,h as Emitter,ec as ExpirableMap,oc as FiniteStateMachine,p as HashMap,m as HashSet,Ba as LRUMap,qu as ObservableFiniteStateMachine,b as Queue,nc as TLRUMap,ic as TrieMap,v as convertArrayToCons,y as convertConsToArray};
15
+ ***************************************************************************** */var qf=function(t,e){return(qf=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 Mf(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}qf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Cf(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 zf(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Rf(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function Uf(t){return"function"==typeof t}function Df(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 Ff=Df((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 Jf(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Wf=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,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Cf(i),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(Uf(c))try{c()}catch(t){o=t instanceof Ff?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=Cf(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Kf(d)}catch(t){o=null!=o?o:[],t instanceof Ff?o=Rf(Rf([],zf(o)),zf(t.errors)):o.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(o)throw new Ff(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Kf(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)&&Jf(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Jf(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),Lf=Wf.EMPTY;function Vf(t){return t instanceof Wf||t&&"closed"in t&&Uf(t.remove)&&Uf(t.add)&&Uf(t.unsubscribe)}function Kf(t){Uf(t)?t():t.unsubscribe()}var Yf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$f=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Rf([t,e],zf(n)))};function Hf(){}function Xf(t){t()}var Gf=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Vf(e)&&e.add(n)):n.destination=rd,n}return Mf(e,t),e.create=function(t,e,n){return new ed(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}(Wf),Qf=Function.prototype.bind;function Zf(t,e){return Qf.call(t,e)}var td=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){nd(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){nd(t)}else nd(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){nd(t)}},t}(),ed=function(t){function e(e,n,r){var o,i,a=t.call(this)||this;Uf(e)||!e?o={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&Yf.useDeprecatedNextContext?((i=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},o={next:e.next&&Zf(e.next,i),error:e.error&&Zf(e.error,i),complete:e.complete&&Zf(e.complete,i)}):o=e;return a.destination=new td(o),a}return Mf(e,t),e}(Gf);function nd(t){var e;e=t,$f((function(){throw e}))}var rd={closed:!0,next:Hf,error:function(t){throw t},complete:Hf},od="function"==typeof Symbol&&Symbol.observable||"@@observable";function id(t){return t}function ad(t){return 0===t.length?id:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var sd=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,o=this,i=(r=t)&&r instanceof Gf||function(t){return t&&Uf(t.next)&&Uf(t.error)&&Uf(t.complete)}(r)&&Vf(r)?t:new ed(t,e,n);return Xf((function(){var t=o,e=t.operator,n=t.source;i.add(e?e.call(i,n):n?o._subscribe(i):o._trySubscribe(i))})),i},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=cd(e))((function(e,r){var o=new ed({next:function(e){try{t(e)}catch(t){r(t),o.unsubscribe()}},error:r,complete:e});n.subscribe(o)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[od]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ad(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=cd(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 cd(t){var e;return null!==(e=null!=t?t:Yf.Promise)&&void 0!==e?e:Promise}function ud(t){return Uf(null==t?void 0:t.lift)}function ld(t,e,n,r,o){return new fd(t,e,n,r,o)}var fd=function(t){function e(e,n,r,o,i,a){var s=t.call(this,e)||this;return s.onFinalize=i,s.shouldUnsubscribe=a,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return Mf(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}(Gf);function dd(){return t=function(t,e){var n=null;t._refCount++;var r=ld(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,o=n;n=null,!r||o&&r!==o||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(ud(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,ud(e)&&(r.lift=e.lift),r}Mf(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 Wf;var n=this.getSubject();e.add(this.source.subscribe(ld(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=Wf.EMPTY)}return e},e.prototype.refCount=function(){return dd()(this)}}(sd);var yd,hd,vd={now:function(){return(vd.delegate||performance).now()},delegate:void 0},pd={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Wf((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=pd.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Rf([],zf(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=pd.delegate;return((null==n?void 0:n.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,Rf([],zf(t)))},delegate:void 0};hd=pd.schedule,new sd((function(t){var e=new Wf,n=yd||vd,r=n.now(),o=function(i){var a=n.now();t.next({timestamp:yd?a:i,elapsed:a-r}),t.closed||e.add(hd(o))};return e.add(hd(o)),e}));var md=Df((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),bd=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 Mf(e,t),e.prototype.lift=function(t){var e=new gd(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new md},e.prototype.next=function(t){var e=this;Xf((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=Cf(e.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(t)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Xf((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;Xf((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,o=n.isStopped,i=n.observers;return r||o?Lf:(this.currentObservers=null,i.push(t),new Wf((function(){e.currentObservers=null,Jf(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,o=e.isStopped;n?t.error(r):o&&t.complete()},e.prototype.asObservable=function(){var t=new sd;return t.source=this,t},e.create=function(t,e){return new gd(t,e)},e}(sd),gd=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Mf(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:Lf},e}(bd);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}Mf(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)}}(bd);var wd={now:function(){return(wd.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=wd);var o=t.call(this)||this;return o._bufferSize=e,o._windowTime=n,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,e),o._windowTime=Math.max(1,n),o}Mf(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,o=n._buffer,i=n._infiniteTimeWindow,a=n._timestampProvider,s=n._windowTime;r||(o.push(e),!i&&o.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!t.closed;o+=n?1:2)t.next(r[o]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var a=n.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}}}(bd),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}Mf(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,o=e._value,i=e.thrownError,a=e.isStopped,s=e._isComplete;n?t.error(i):(a||s)&&(r&&t.next(o),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))}}(bd);var Ad,Id=function(t){function e(e,n){return t.call(this)||this}return Mf(e,t),e.prototype.schedule=function(t,e){return this},e}(Wf),Sd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Rf([t,e],zf(n)))},_d=function(t){return clearInterval(t)},xd=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 Mf(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),Sd(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;_d(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,Jf(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(Id),Td=1,Ed={};function Od(t){return t in Ed&&(delete Ed[t],!0)}var jd=function(t){var e=Td++;return Ed[e]=!0,Ad||(Ad=Promise.resolve()),Ad.then((function(){return Od(e)&&t()})),e},kd=function(t){Od(t)},Nd={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Nd.delegate;return((null==n?void 0:n.setImmediate)||jd).apply(void 0,Rf([],zf(t)))},clearImmediate:function(t){return kd(t)},delegate:void 0},Bd=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Mf(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=Nd.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}))||(Nd.clearImmediate(n),e._scheduled=void 0)},e}(xd),Pd=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=wd.now,t}(),qd=function(t){function e(e,n){void 0===n&&(n=Pd.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return Mf(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}(Pd);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mf(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}(qd))(Bd),new qd(xd);var Md=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Mf(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}(xd);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mf(e,t),e}(qd))(Md);var Cd=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Mf(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=pd.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}))||(pd.cancelAnimationFrame(n),e._scheduled=void 0)},e}(xd);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mf(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}(qd))(Cd),function(t){function e(e,n){void 0===e&&(e=Rd),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}Mf(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}(qd);var zd,Rd=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var o=t.call(this,e,n)||this;return o.scheduler=e,o.work=n,o.index=r,o.active=!0,o.index=e.index=r,o}return Mf(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 o=new e(this.scheduler,this.work);return this.add(o),o.schedule(n,r)}return Wf.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.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}(xd);new sd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(zd||(zd={})),Df((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Df((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Df((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Df((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Df((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new sd(Hf);class Ud extends Bf{constructor(){super(...arguments),this.stateChanges=new bd}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const n=this.state;this.stateChanges.next({event:t,oldState:e,newState:n}),es.isEmptyObject(this.schema[n])&&this.stateChanges.complete()}}export{Pf as BadEventError,s as Box,l as Emitter,Of as ExpirableMap,Bf as FiniteStateMachine,f as HashMap,d as HashSet,nf as LRUMap,Ud as ObservableFiniteStateMachine,y as Queue,jf as TLRUMap,Nf as TrieMap,u as convertArrayToCons,c as convertConsToArray};
16
16
  //# sourceMappingURL=index.min.mjs.map