@copilotkitnext/runtime 0.0.22-alpha.0 → 0.0.22-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-PXQQQ6KP.mjs +23 -0
- package/dist/chunk-PXQQQ6KP.mjs.map +1 -0
- package/dist/express.d.mts +1 -1
- package/dist/express.d.ts +1 -1
- package/dist/express.js +366 -1008
- package/dist/express.js.map +1 -1
- package/dist/express.mjs +363 -315
- package/dist/express.mjs.map +1 -1
- package/dist/index.d.mts +5 -64
- package/dist/index.d.ts +5 -64
- package/dist/index.js +22 -1304
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -258
- package/dist/index.mjs.map +1 -1
- package/dist/{runtime-njBGN6lZ.d.mts → runtime-BEcxV64L.d.mts} +1 -29
- package/dist/{runtime-njBGN6lZ.d.ts → runtime-BEcxV64L.d.ts} +1 -29
- package/package.json +7 -7
- package/dist/chunk-LDTC5BLU.mjs +0 -1040
- package/dist/chunk-LDTC5BLU.mjs.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {randomUUID,randomFillSync}from'crypto';var Gp=Object.create;var fs=Object.defineProperty;var Wp=Object.getOwnPropertyDescriptor;var Hp=Object.getOwnPropertyNames;var $p=Object.getPrototypeOf,zp=Object.prototype.hasOwnProperty;var iC=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vs=(e,t)=>{for(var r in t)fs(e,r,{get:t[r],enumerable:true});},Jp=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hp(t))!zp.call(e,i)&&i!==r&&fs(e,i,{get:()=>t[i],enumerable:!(n=Wp(t,i))||n.enumerable});return e};var Qu=(e,t,r)=>(r=e!=null?Gp($p(e)):{},Jp(t||!e||!e.__esModule?fs(r,"default",{value:e,enumerable:true}):r,e));var D=f(mn=>{Object.defineProperty(mn,"__esModule",{value:true});mn.isFunction=void 0;function Wm(e){return typeof e=="function"}mn.isFunction=Wm;});var Ve=f(_n=>{Object.defineProperty(_n,"__esModule",{value:true});_n.createErrorClass=void 0;function Hm(e){var t=function(n){Error.call(n),n.stack=new Error().stack;},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}_n.createErrorClass=Hm;});var _s=f(yn=>{Object.defineProperty(yn,"__esModule",{value:true});yn.UnsubscriptionError=void 0;var $m=Ve();yn.UnsubscriptionError=$m.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
2
|
+
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=r;}});});var Ne=f(bn=>{Object.defineProperty(bn,"__esModule",{value:true});bn.arrRemove=void 0;function zm(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1);}}bn.arrRemove=zm;});var oe=f(ne=>{var _c=ne&&ne.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},yc=ne&&ne.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},bc=ne&&ne.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ne,"__esModule",{value:true});ne.isSubscription=ne.EMPTY_SUBSCRIPTION=ne.Subscription=void 0;var Ur=D(),ys=_s(),gc=Ne(),bs=function(){function e(t){this.initialTeardown=t,this.closed=false,this._parentage=null,this._finalizers=null;}return e.prototype.unsubscribe=function(){var t,r,n,i,a;if(!this.closed){this.closed=true;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=_c(o),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this);}}catch(b){t={error:b};}finally{try{l&&!l.done&&(r=s.return)&&r.call(s);}finally{if(t)throw t.error}}else o.remove(this);var d=this.initialTeardown;if(Ur.isFunction(d))try{d();}catch(b){a=b instanceof ys.UnsubscriptionError?b.errors:[b];}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=_c(p),m=h.next();!m.done;m=h.next()){var _=m.value;try{Ec(_);}catch(b){a=a??[],b instanceof ys.UnsubscriptionError?a=bc(bc([],yc(a)),yc(b.errors)):a.push(b);}}}catch(b){n={error:b};}finally{try{m&&!m.done&&(i=h.return)&&i.call(h);}finally{if(n)throw n.error}}}if(a)throw new ys.UnsubscriptionError(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Ec(t);else {if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this);}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t);}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t;},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&gc.arrRemove(r,t);},e.prototype.remove=function(t){var r=this._finalizers;r&&gc.arrRemove(r,t),t instanceof e&&t._removeParent(this);},e.EMPTY=function(){var t=new e;return t.closed=true,t}(),e}();ne.Subscription=bs;ne.EMPTY_SUBSCRIPTION=bs.EMPTY;function Jm(e){return e instanceof bs||e&&"closed"in e&&Ur.isFunction(e.remove)&&Ur.isFunction(e.add)&&Ur.isFunction(e.unsubscribe)}ne.isSubscription=Jm;function Ec(e){Ur.isFunction(e)?e():e.unsubscribe();}});var Xt=f(gn=>{Object.defineProperty(gn,"__esModule",{value:true});gn.config=void 0;gn.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:false,useDeprecatedNextContext:false};});var gs=f(be=>{var Sc=be&&be.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},Oc=be&&be.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(be,"__esModule",{value:true});be.timeoutProvider=void 0;be.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=be.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,Oc([e,t],Sc(r))):setTimeout.apply(void 0,Oc([e,t],Sc(r)))},clearTimeout:function(e){var t=be.timeoutProvider.delegate;return (t?.clearTimeout||clearTimeout)(e)},delegate:void 0};});var Es=f(En=>{Object.defineProperty(En,"__esModule",{value:true});En.reportUnhandledError=void 0;var Xm=Xt(),Zm=gs();function Km(e){Zm.timeoutProvider.setTimeout(function(){var t=Xm.config.onUnhandledError;if(t)t(e);else throw e});}En.reportUnhandledError=Km;});var $=f(Sn=>{Object.defineProperty(Sn,"__esModule",{value:true});Sn.noop=void 0;function Ym(){}Sn.noop=Ym;});var wc=f(ge=>{Object.defineProperty(ge,"__esModule",{value:true});ge.createNotification=ge.nextNotification=ge.errorNotification=ge.COMPLETE_NOTIFICATION=void 0;ge.COMPLETE_NOTIFICATION=function(){return On("C",void 0,void 0)}();function Qm(e){return On("E",void 0,e)}ge.errorNotification=Qm;function e_(e){return On("N",e,void 0)}ge.nextNotification=e_;function On(e,t,r){return {kind:e,value:t,error:r}}ge.createNotification=On;});var wn=f(Zt=>{Object.defineProperty(Zt,"__esModule",{value:true});Zt.captureError=Zt.errorContext=void 0;var Ac=Xt(),qt=null;function t_(e){if(Ac.config.useDeprecatedSynchronousErrorHandling){var t=!qt;if(t&&(qt={errorThrown:false,error:null}),e(),t){var r=qt,n=r.errorThrown,i=r.error;if(qt=null,n)throw i}}else e();}Zt.errorContext=t_;function r_(e){Ac.config.useDeprecatedSynchronousErrorHandling&&qt&&(qt.errorThrown=true,qt.error=e);}Zt.captureError=r_;});var Kt=f(fe=>{var xc=fe&&fe.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(fe,"__esModule",{value:true});fe.EMPTY_OBSERVER=fe.SafeSubscriber=fe.Subscriber=void 0;var n_=D(),Tc=oe(),As=Xt(),i_=Es(),Ic=$(),Ss=wc(),a_=gs(),o_=wn(),qc=function(e){xc(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=false,r?(n.destination=r,Tc.isSubscription(r)&&r.add(n)):n.destination=fe.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new Pc(r,n,i)},t.prototype.next=function(r){this.isStopped?ws(Ss.nextNotification(r),this):this._next(r);},t.prototype.error=function(r){this.isStopped?ws(Ss.errorNotification(r),this):(this.isStopped=true,this._error(r));},t.prototype.complete=function(){this.isStopped?ws(Ss.COMPLETE_NOTIFICATION,this):(this.isStopped=true,this._complete());},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=true,e.prototype.unsubscribe.call(this),this.destination=null);},t.prototype._next=function(r){this.destination.next(r);},t.prototype._error=function(r){try{this.destination.error(r);}finally{this.unsubscribe();}},t.prototype._complete=function(){try{this.destination.complete();}finally{this.unsubscribe();}},t}(Tc.Subscription);fe.Subscriber=qc;var s_=Function.prototype.bind;function Os(e,t){return s_.call(e,t)}var u_=function(){function e(t){this.partialObserver=t;}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t);}catch(n){An(n);}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t);}catch(n){An(n);}else An(t);},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete();}catch(r){An(r);}},e}(),Pc=function(e){xc(t,e);function t(r,n,i){var a=e.call(this)||this,o;if(n_.isFunction(r)||!r)o={next:r??void 0,error:n??void 0,complete:i??void 0};else {var s;a&&As.config.useDeprecatedNextContext?(s=Object.create(r),s.unsubscribe=function(){return a.unsubscribe()},o={next:r.next&&Os(r.next,s),error:r.error&&Os(r.error,s),complete:r.complete&&Os(r.complete,s)}):o=r;}return a.destination=new u_(o),a}return t}(qc);fe.SafeSubscriber=Pc;function An(e){As.config.useDeprecatedSynchronousErrorHandling?o_.captureError(e):i_.reportUnhandledError(e);}function c_(e){throw e}function ws(e,t){var r=As.config.onStoppedNotification;r&&a_.timeoutProvider.setTimeout(function(){return r(e,t)});}fe.EMPTY_OBSERVER={closed:true,next:Ic.noop,error:c_,complete:Ic.noop};});var Vr=f(Tn=>{Object.defineProperty(Tn,"__esModule",{value:true});Tn.observable=void 0;Tn.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();});var z=f(In=>{Object.defineProperty(In,"__esModule",{value:true});In.identity=void 0;function l_(e){return e}In.identity=l_;});var Br=f(Yt=>{Object.defineProperty(Yt,"__esModule",{value:true});Yt.pipeFromArray=Yt.pipe=void 0;var d_=z();function f_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nc(e)}Yt.pipe=f_;function Nc(e){return e.length===0?d_.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}Yt.pipeFromArray=Nc;});var V=f(xn=>{Object.defineProperty(xn,"__esModule",{value:true});xn.Observable=void 0;var Is=Kt(),v_=oe(),p_=Vr(),h_=Br(),m_=Xt(),Ts=D(),__=wn(),y_=function(){function e(t){t&&(this._subscribe=t);}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,a=g_(t)?t:new Is.SafeSubscriber(t,r,n);return __.errorContext(function(){var o=i,s=o.operator,l=o.source;a.add(s?s.call(a,l):l?i._subscribe(a):i._trySubscribe(a));}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r);}},e.prototype.forEach=function(t,r){var n=this;return r=Rc(r),new r(function(i,a){var o=new Is.SafeSubscriber({next:function(s){try{t(s);}catch(l){a(l),o.unsubscribe();}},error:a,complete:i});n.subscribe(o);})},e.prototype._subscribe=function(t){var r;return (r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[p_.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return h_.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Rc(t),new t(function(n,i){var a;r.subscribe(function(o){return a=o},function(o){return i(o)},function(){return n(a)});})},e.create=function(t){return new e(t)},e}();xn.Observable=y_;function Rc(e){var t;return (t=e??m_.config.Promise)!==null&&t!==void 0?t:Promise}function b_(e){return e&&Ts.isFunction(e.next)&&Ts.isFunction(e.error)&&Ts.isFunction(e.complete)}function g_(e){return e&&e instanceof Is.Subscriber||b_(e)&&v_.isSubscription(e)}});var S=f(Qt=>{Object.defineProperty(Qt,"__esModule",{value:true});Qt.operate=Qt.hasLift=void 0;var E_=D();function Cc(e){return E_.isFunction(e?.lift)}Qt.hasLift=Cc;function S_(e){return function(t){if(Cc(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n);}});throw new TypeError("Unable to lift unknown Observable type")}}Qt.operate=S_;});var I=f(Be=>{var O_=Be&&Be.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(Be,"__esModule",{value:true});Be.OperatorSubscriber=Be.createOperatorSubscriber=void 0;var w_=Kt();function A_(e,t,r,n,i){return new Mc(e,t,r,n,i)}Be.createOperatorSubscriber=A_;var Mc=function(e){O_(t,e);function t(r,n,i,a,o,s){var l=e.call(this,r)||this;return l.onFinalize=o,l.shouldUnsubscribe=s,l._next=n?function(u){try{n(u);}catch(d){r.error(d);}}:e.prototype._next,l._error=a?function(u){try{a(u);}catch(d){r.error(d);}finally{this.unsubscribe();}}:e.prototype._error,l._complete=i?function(){try{i();}catch(u){r.error(u);}finally{this.unsubscribe();}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this));}},t}(w_.Subscriber);Be.OperatorSubscriber=Mc;});var xs=f(qn=>{Object.defineProperty(qn,"__esModule",{value:true});qn.refCount=void 0;var T_=S(),I_=I();function x_(){return T_.operate(function(e,t){var r=null;e._refCount++;var n=I_.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var i=e._connection,a=r;r=null,i&&(!a||i===a)&&i.unsubscribe(),t.unsubscribe();});e.subscribe(n),n.closed||(r=e.connect());})}qn.refCount=x_;});var Gr=f(er=>{var q_=er&&er.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(er,"__esModule",{value:true});er.ConnectableObservable=void 0;var P_=V(),kc=oe(),N_=xs(),R_=I(),C_=S(),M_=function(e){q_(t,e);function t(r,n){var i=e.call(this)||this;return i.source=r,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,C_.hasLift(r)&&(i.lift=r.lift),i}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return (!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r?.unsubscribe();},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new kc.Subscription;var i=this.getSubject();n.add(this.source.subscribe(R_.createOperatorSubscriber(i,void 0,function(){r._teardown(),i.complete();},function(a){r._teardown(),i.error(a);},function(){return r._teardown()}))),n.closed&&(this._connection=null,n=kc.Subscription.EMPTY);}return n},t.prototype.refCount=function(){return N_.refCount()(this)},t}(P_.Observable);er.ConnectableObservable=M_;});var jc=f(Wr=>{Object.defineProperty(Wr,"__esModule",{value:true});Wr.performanceTimestampProvider=void 0;Wr.performanceTimestampProvider={now:function(){return (Wr.performanceTimestampProvider.delegate||performance).now()},delegate:void 0};});var qs=f(ve=>{var Lc=ve&&ve.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},Fc=ve&&ve.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ve,"__esModule",{value:true});ve.animationFrameProvider=void 0;var k_=oe();ve.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=ve.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(a){r=void 0,e(a);});return new k_.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ve.animationFrameProvider.delegate;return (r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,Fc([],Lc(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ve.animationFrameProvider.delegate;return (r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,Fc([],Lc(e)))},delegate:void 0};});var Vc=f(Pn=>{Object.defineProperty(Pn,"__esModule",{value:true});Pn.animationFrames=void 0;var j_=V(),L_=jc(),Dc=qs();function F_(e){return e?Uc(e):D_}Pn.animationFrames=F_;function Uc(e){return new j_.Observable(function(t){var r=e||L_.performanceTimestampProvider,n=r.now(),i=0,a=function(){t.closed||(i=Dc.animationFrameProvider.requestAnimationFrame(function(o){i=0;var s=r.now();t.next({timestamp:e?s:o,elapsed:s-n}),a();}));};return a(),function(){i&&Dc.animationFrameProvider.cancelAnimationFrame(i);}})}var D_=Uc();});var Ps=f(Nn=>{Object.defineProperty(Nn,"__esModule",{value:true});Nn.ObjectUnsubscribedError=void 0;var U_=Ve();Nn.ObjectUnsubscribedError=U_.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed";}});});var J=f(Ee=>{var Gc=Ee&&Ee.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}(),V_=Ee&&Ee.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ee,"__esModule",{value:true});Ee.AnonymousSubject=Ee.Subject=void 0;var Bc=V(),Rs=oe(),B_=Ps(),G_=Ne(),Ns=wn(),Wc=function(e){Gc(t,e);function t(){var r=e.call(this)||this;return r.closed=false,r.currentObservers=null,r.observers=[],r.isStopped=false,r.hasError=false,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new Cs(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new B_.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Ns.errorContext(function(){var i,a;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=V_(n.currentObservers),s=o.next();!s.done;s=o.next()){var l=s.value;l.next(r);}}catch(u){i={error:u};}finally{try{s&&!s.done&&(a=o.return)&&a.call(o);}finally{if(i)throw i.error}}}});},t.prototype.error=function(r){var n=this;Ns.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=true,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r);}});},t.prototype.complete=function(){var r=this;Ns.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=true;for(var n=r.observers;n.length;)n.shift().complete();}});},t.prototype.unsubscribe=function(){this.isStopped=this.closed=true,this.observers=this.currentObservers=null;},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return ((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:false,configurable:true}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,a=i.hasError,o=i.isStopped,s=i.observers;return a||o?Rs.EMPTY_SUBSCRIPTION:(this.currentObservers=null,s.push(r),new Rs.Subscription(function(){n.currentObservers=null,G_.arrRemove(s,r);}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,a=n.thrownError,o=n.isStopped;i?r.error(a):o&&r.complete();},t.prototype.asObservable=function(){var r=new Bc.Observable;return r.source=this,r},t.create=function(r,n){return new Cs(r,n)},t}(Bc.Observable);Ee.Subject=Wc;var Cs=function(e){Gc(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r);},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r);},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r);},t.prototype._subscribe=function(r){var n,i;return (i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Rs.EMPTY_SUBSCRIPTION},t}(Wc);Ee.AnonymousSubject=Cs;});var Ms=f(tr=>{var W_=tr&&tr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(tr,"__esModule",{value:true});tr.BehaviorSubject=void 0;var H_=J(),$_=function(e){W_(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:false,configurable:true}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return !n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,a=r._value;if(n)throw i;return this._throwIfClosed(),a},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r);},t}(H_.Subject);tr.BehaviorSubject=$_;});var Rn=f(Hr=>{Object.defineProperty(Hr,"__esModule",{value:true});Hr.dateTimestampProvider=void 0;Hr.dateTimestampProvider={now:function(){return (Hr.dateTimestampProvider.delegate||Date).now()},delegate:void 0};});var Cn=f(rr=>{var z_=rr&&rr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(rr,"__esModule",{value:true});rr.ReplaySubject=void 0;var J_=J(),X_=Rn(),Z_=function(e){z_(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=X_.dateTimestampProvider);var a=e.call(this)||this;return a._bufferSize=r,a._windowTime=n,a._timestampProvider=i,a._buffer=[],a._infiniteTimeWindow=true,a._infiniteTimeWindow=n===1/0,a._bufferSize=Math.max(1,r),a._windowTime=Math.max(1,n),a}return t.prototype.next=function(r){var n=this,i=n.isStopped,a=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,l=n._windowTime;i||(a.push(r),!o&&a.push(s.now()+l)),this._trimBuffer(),e.prototype.next.call(this,r);},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,a=i._infiniteTimeWindow,o=i._buffer,s=o.slice(),l=0;l<s.length&&!r.closed;l+=a?1:2)r.next(s[l]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,a=r._buffer,o=r._infiniteTimeWindow,s=(o?1:2)*n;if(n<1/0&&s<a.length&&a.splice(0,a.length-s),!o){for(var l=i.now(),u=0,d=1;d<a.length&&a[d]<=l;d+=2)u=d;u&&a.splice(0,u+1);}},t}(J_.Subject);rr.ReplaySubject=Z_;});var Mn=f(nr=>{var K_=nr&&nr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(nr,"__esModule",{value:true});nr.AsyncSubject=void 0;var Y_=J(),Q_=function(e){K_(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=false,r._isComplete=false,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,a=n._hasValue,o=n._value,s=n.thrownError,l=n.isStopped,u=n._isComplete;i?r.error(s):(l||u)&&(a&&r.next(o),r.complete());},t.prototype.next=function(r){this.isStopped||(this._value=r,this._hasValue=true);},t.prototype.complete=function(){var r=this,n=r._hasValue,i=r._value,a=r._isComplete;a||(this._isComplete=true,n&&e.prototype.next.call(this,i),e.prototype.complete.call(this));},t}(Y_.Subject);nr.AsyncSubject=Q_;});var Hc=f(ir=>{var ey=ir&&ir.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(ir,"__esModule",{value:true});ir.Action=void 0;var ty=oe(),ry=function(e){ey(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return this},t}(ty.Subscription);ir.Action=ry;});var Jc=f(Se=>{var $c=Se&&Se.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},zc=Se&&Se.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Se,"__esModule",{value:true});Se.intervalProvider=void 0;Se.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Se.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,zc([e,t],$c(r))):setInterval.apply(void 0,zc([e,t],$c(r)))},clearInterval:function(e){var t=Se.intervalProvider.delegate;return (t?.clearInterval||clearInterval)(e)},delegate:void 0};});var or=f(ar=>{var ny=ar&&ar.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(ar,"__esModule",{value:true});ar.AsyncAction=void 0;var iy=Hc(),Xc=Jc(),ay=Ne(),oy=function(e){ny(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=false,i}return t.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var a=this.id,o=this.scheduler;return a!=null&&(this.id=this.recycleAsyncId(o,a,n)),this.pending=true,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),Xc.intervalProvider.setInterval(r.flush.bind(r,this),i)},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===false)return n;n!=null&&Xc.intervalProvider.clearInterval(n);},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=false;var i=this._execute(r,n);if(i)return i;this.pending===false&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null));},t.prototype._execute=function(r,n){var i=false,a;try{this.work(r);}catch(o){i=true,a=o||new Error("Scheduled action threw falsy error");}if(i)return this.unsubscribe(),a},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,a=i.actions;this.work=this.state=this.scheduler=null,this.pending=false,ay.arrRemove(a,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this);}},t}(iy.Action);ar.AsyncAction=oy;});var Kc=f(sr=>{Object.defineProperty(sr,"__esModule",{value:true});sr.TestTools=sr.Immediate=void 0;var sy=1,ks,kn={};function Zc(e){return e in kn?(delete kn[e],true):false}sr.Immediate={setImmediate:function(e){var t=sy++;return kn[t]=true,ks||(ks=Promise.resolve()),ks.then(function(){return Zc(t)&&e()}),t},clearImmediate:function(e){Zc(e);}};sr.TestTools={pending:function(){return Object.keys(kn).length}};});var Qc=f(Oe=>{var uy=Oe&&Oe.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},cy=Oe&&Oe.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Oe,"__esModule",{value:true});Oe.immediateProvider=void 0;var Yc=Kc(),ly=Yc.Immediate.setImmediate,dy=Yc.Immediate.clearImmediate;Oe.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Oe.immediateProvider.delegate;return (r?.setImmediate||ly).apply(void 0,cy([],uy(e)))},clearImmediate:function(e){var t=Oe.immediateProvider.delegate;return (t?.clearImmediate||dy)(e)},delegate:void 0};});var tl=f(ur=>{var fy=ur&&ur.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(ur,"__esModule",{value:true});ur.AsapAction=void 0;var vy=or(),el=Qc(),py=function(e){fy(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=el.immediateProvider.setImmediate(r.flush.bind(r,void 0))))},t.prototype.recycleAsyncId=function(r,n,i){var a;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var o=r.actions;n!=null&&((a=o[o.length-1])===null||a===void 0?void 0:a.id)!==n&&(el.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0));},t}(vy.AsyncAction);ur.AsapAction=py;});var js=f(jn=>{Object.defineProperty(jn,"__esModule",{value:true});jn.Scheduler=void 0;var hy=Rn(),my=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r;}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=hy.dateTimestampProvider.now,e}();jn.Scheduler=my;});var lr=f(cr=>{var _y=cr&&cr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(cr,"__esModule",{value:true});cr.AsyncScheduler=void 0;var rl=js(),yy=function(e){_y(t,e);function t(r,n){n===void 0&&(n=rl.Scheduler.now);var i=e.call(this,r,n)||this;return i.actions=[],i._active=false,i}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=true;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=false,i){for(;r=n.shift();)r.unsubscribe();throw i}},t}(rl.Scheduler);cr.AsyncScheduler=yy;});var nl=f(dr=>{var by=dr&&dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(dr,"__esModule",{value:true});dr.AsapScheduler=void 0;var gy=lr(),Ey=function(e){by(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=true;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,a;r=r||i.shift();do if(a=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=false,a){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw a}},t}(gy.AsyncScheduler);dr.AsapScheduler=Ey;});var il=f(Pt=>{Object.defineProperty(Pt,"__esModule",{value:true});Pt.asap=Pt.asapScheduler=void 0;var Sy=tl(),Oy=nl();Pt.asapScheduler=new Oy.AsapScheduler(Sy.AsapAction);Pt.asap=Pt.asapScheduler;});var ie=f(Nt=>{Object.defineProperty(Nt,"__esModule",{value:true});Nt.async=Nt.asyncScheduler=void 0;var wy=or(),Ay=lr();Nt.asyncScheduler=new Ay.AsyncScheduler(wy.AsyncAction);Nt.async=Nt.asyncScheduler;});var al=f(fr=>{var Ty=fr&&fr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(fr,"__esModule",{value:true});fr.QueueAction=void 0;var Iy=or(),xy=function(e){Ty(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.flush(this),0)},t}(Iy.AsyncAction);fr.QueueAction=xy;});var ol=f(vr=>{var qy=vr&&vr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(vr,"__esModule",{value:true});vr.QueueScheduler=void 0;var Py=lr(),Ny=function(e){qy(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Py.AsyncScheduler);vr.QueueScheduler=Ny;});var sl=f(Rt=>{Object.defineProperty(Rt,"__esModule",{value:true});Rt.queue=Rt.queueScheduler=void 0;var Ry=al(),Cy=ol();Rt.queueScheduler=new Cy.QueueScheduler(Ry.QueueAction);Rt.queue=Rt.queueScheduler;});var cl=f(pr=>{var My=pr&&pr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(pr,"__esModule",{value:true});pr.AnimationFrameAction=void 0;var ky=or(),ul=qs(),jy=function(e){My(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=ul.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,i){var a;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var o=r.actions;n!=null&&((a=o[o.length-1])===null||a===void 0?void 0:a.id)!==n&&(ul.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0);},t}(ky.AsyncAction);pr.AnimationFrameAction=jy;});var ll=f(hr=>{var Ly=hr&&hr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(hr,"__esModule",{value:true});hr.AnimationFrameScheduler=void 0;var Fy=lr(),Dy=function(e){Ly(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=true;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,a;r=r||i.shift();do if(a=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=false,a){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw a}},t}(Fy.AsyncScheduler);hr.AnimationFrameScheduler=Dy;});var dl=f(Ct=>{Object.defineProperty(Ct,"__esModule",{value:true});Ct.animationFrame=Ct.animationFrameScheduler=void 0;var Uy=cl(),Vy=ll();Ct.animationFrameScheduler=new Vy.AnimationFrameScheduler(Uy.AnimationFrameAction);Ct.animationFrame=Ct.animationFrameScheduler;});var pl=f(Ge=>{var fl=Ge&&Ge.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}();Object.defineProperty(Ge,"__esModule",{value:true});Ge.VirtualAction=Ge.VirtualTimeScheduler=void 0;var By=or(),Gy=oe(),Wy=lr(),Hy=function(e){fl(t,e);function t(r,n){r===void 0&&(r=vl),n===void 0&&(n=1/0);var i=e.call(this,r,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return t.prototype.flush=function(){for(var r=this,n=r.actions,i=r.maxFrames,a,o;(o=n[0])&&o.delay<=i&&(n.shift(),this.frame=o.delay,!(a=o.execute(o.state,o.delay))););if(a){for(;o=n.shift();)o.unsubscribe();throw a}},t.frameTimeFactor=10,t}(Wy.AsyncScheduler);Ge.VirtualTimeScheduler=Hy;var vl=function(e){fl(t,e);function t(r,n,i){i===void 0&&(i=r.index+=1);var a=e.call(this,r,n)||this;return a.scheduler=r,a.work=n,a.index=i,a.active=true,a.index=r.index=i,a}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=false;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}else return Gy.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,i){i===void 0&&(i=0),this.delay=r.frame+i;var a=r.actions;return a.push(this),a.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,i){},t.prototype._execute=function(r,n){if(this.active===true)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},t}(By.AsyncAction);Ge.VirtualAction=vl;});var pe=f(Mt=>{Object.defineProperty(Mt,"__esModule",{value:true});Mt.empty=Mt.EMPTY=void 0;var hl=V();Mt.EMPTY=new hl.Observable(function(e){return e.complete()});function $y(e){return e?zy(e):Mt.EMPTY}Mt.empty=$y;function zy(e){return new hl.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var $r=f(Ln=>{Object.defineProperty(Ln,"__esModule",{value:true});Ln.isScheduler=void 0;var Jy=D();function Xy(e){return e&&Jy.isFunction(e.schedule)}Ln.isScheduler=Xy;});var ae=f(We=>{Object.defineProperty(We,"__esModule",{value:true});We.popNumber=We.popScheduler=We.popResultSelector=void 0;var Zy=D(),Ky=$r();function Ls(e){return e[e.length-1]}function Yy(e){return Zy.isFunction(Ls(e))?e.pop():void 0}We.popResultSelector=Yy;function Qy(e){return Ky.isScheduler(Ls(e))?e.pop():void 0}We.popScheduler=Qy;function eb(e,t){return typeof Ls(e)=="number"?e.pop():t}We.popNumber=eb;});var Dn=f(Fn=>{Object.defineProperty(Fn,"__esModule",{value:true});Fn.isArrayLike=void 0;Fn.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};});var Fs=f(Un=>{Object.defineProperty(Un,"__esModule",{value:true});Un.isPromise=void 0;var tb=D();function rb(e){return tb.isFunction(e?.then)}Un.isPromise=rb;});var Ds=f(Vn=>{Object.defineProperty(Vn,"__esModule",{value:true});Vn.isInteropObservable=void 0;var nb=Vr(),ib=D();function ab(e){return ib.isFunction(e[nb.observable])}Vn.isInteropObservable=ab;});var Us=f(Bn=>{Object.defineProperty(Bn,"__esModule",{value:true});Bn.isAsyncIterable=void 0;var ob=D();function sb(e){return Symbol.asyncIterator&&ob.isFunction(e?.[Symbol.asyncIterator])}Bn.isAsyncIterable=sb;});var Vs=f(Gn=>{Object.defineProperty(Gn,"__esModule",{value:true});Gn.createInvalidObservableTypeError=void 0;function ub(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}Gn.createInvalidObservableTypeError=ub;});var Bs=f(mr=>{Object.defineProperty(mr,"__esModule",{value:true});mr.iterator=mr.getSymbolIterator=void 0;function ml(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}mr.getSymbolIterator=ml;mr.iterator=ml();});var Gs=f(Wn=>{Object.defineProperty(Wn,"__esModule",{value:true});Wn.isIterable=void 0;var cb=Bs(),lb=D();function db(e){return lb.isFunction(e?.[cb.iterator])}Wn.isIterable=db;});var Hn=f(le=>{var fb=le&&le.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r);}catch(d){u=[6,d],i=0;}finally{n=a=0;}if(u[0]&5)throw u[1];return {value:u[0]?u[1]:void 0,done:true}}},_r=le&&le.__await||function(e){return this instanceof _r?(this.v=e,this):new _r(e)},vb=le&&le.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){n[h]&&(i[h]=function(m){return new Promise(function(_,b){a.push([h,m,_,b])>1||s(h,m);})});}function s(h,m){try{l(n[h](m));}catch(_){p(a[0][3],_);}}function l(h){h.value instanceof _r?Promise.resolve(h.value.v).then(u,d):p(a[0][2],h);}function u(h){s("next",h);}function d(h){s("throw",h);}function p(h,m){h(m),a.shift(),a.length&&s(a[0][0],a[0][1]);}};Object.defineProperty(le,"__esModule",{value:true});le.isReadableStreamLike=le.readableStreamLikeToAsyncGenerator=void 0;var pb=D();function hb(e){return vb(this,arguments,function(){var r,n,i,a;return fb(this,function(o){switch(o.label){case 0:r=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return [4,_r(r.read())];case 3:return n=o.sent(),i=n.value,a=n.done,a?[4,_r(void 0)]:[3,5];case 4:return [2,o.sent()];case 5:return [4,_r(i)];case 6:return [4,o.sent()];case 7:return o.sent(),[3,2];case 8:return [3,10];case 9:return r.releaseLock(),[7];case 10:return [2]}})})}le.readableStreamLikeToAsyncGenerator=hb;function mb(e){return pb.isFunction(e?.getReader)}le.isReadableStreamLike=mb;});var C=f(G=>{var _b=G&&G.__awaiter||function(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a);})}return new(r||(r=Promise))(function(a,o){function s(d){try{u(n.next(d));}catch(p){o(p);}}function l(d){try{u(n.throw(d));}catch(p){o(p);}}function u(d){d.done?a(d.value):i(d.value).then(s,l);}u((n=n.apply(e,t||[])).next());})},yb=G&&G.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r);}catch(d){u=[6,d],i=0;}finally{n=a=0;}if(u[0]&5)throw u[1];return {value:u[0]?u[1]:void 0,done:true}}},bb=G&&G.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ws=="function"?Ws(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(o){return new Promise(function(s,l){o=e[a](o),i(s,l,o.done,o.value);})};}function i(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s});},o);}},Ws=G&&G.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(G,"__esModule",{value:true});G.fromReadableStreamLike=G.fromAsyncIterable=G.fromIterable=G.fromPromise=G.fromArrayLike=G.fromInteropObservable=G.innerFrom=void 0;var gb=Dn(),Eb=Fs(),yr=V(),Sb=Ds(),Ob=Us(),wb=Vs(),Ab=Gs(),_l=Hn(),Tb=D(),Ib=Es(),xb=Vr();function qb(e){if(e instanceof yr.Observable)return e;if(e!=null){if(Sb.isInteropObservable(e))return yl(e);if(gb.isArrayLike(e))return bl(e);if(Eb.isPromise(e))return gl(e);if(Ob.isAsyncIterable(e))return Hs(e);if(Ab.isIterable(e))return El(e);if(_l.isReadableStreamLike(e))return Sl(e)}throw wb.createInvalidObservableTypeError(e)}G.innerFrom=qb;function yl(e){return new yr.Observable(function(t){var r=e[xb.observable]();if(Tb.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}G.fromInteropObservable=yl;function bl(e){return new yr.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete();})}G.fromArrayLike=bl;function gl(e){return new yr.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete());},function(r){return t.error(r)}).then(null,Ib.reportUnhandledError);})}G.fromPromise=gl;function El(e){return new yr.Observable(function(t){var r,n;try{for(var i=Ws(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(s){r={error:s};}finally{try{a&&!a.done&&(n=i.return)&&n.call(i);}finally{if(r)throw r.error}}t.complete();})}G.fromIterable=El;function Hs(e){return new yr.Observable(function(t){Pb(e,t).catch(function(r){return t.error(r)});})}G.fromAsyncIterable=Hs;function Sl(e){return Hs(_l.readableStreamLikeToAsyncGenerator(e))}G.fromReadableStreamLike=Sl;function Pb(e,t){var r,n,i,a;return _b(this,void 0,void 0,function(){var o,s;return yb(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=bb(e),l.label=1;case 1:return [4,r.next()];case 2:if(n=l.sent(),!!n.done)return [3,4];if(o=n.value,t.next(o),t.closed)return [2];l.label=3;case 3:return [3,1];case 4:return [3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),n&&!n.done&&(a=r.return)?[4,a.call(r)]:[3,8];case 7:l.sent(),l.label=8;case 8:return [3,10];case 9:if(i)throw i.error;return [7];case 10:return [7];case 11:return t.complete(),[2]}})})}});var Re=f($n=>{Object.defineProperty($n,"__esModule",{value:true});$n.executeSchedule=void 0;function Nb(e,t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=false);var a=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe();},n);if(e.add(a),!i)return a}$n.executeSchedule=Nb;});var zr=f(zn=>{Object.defineProperty(zn,"__esModule",{value:true});zn.observeOn=void 0;var $s=Re(),Rb=S(),Cb=I();function Mb(e,t){return t===void 0&&(t=0),Rb.operate(function(r,n){r.subscribe(Cb.createOperatorSubscriber(n,function(i){return $s.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return $s.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return $s.executeSchedule(n,e,function(){return n.error(i)},t)}));})}zn.observeOn=Mb;});var Jr=f(Jn=>{Object.defineProperty(Jn,"__esModule",{value:true});Jn.subscribeOn=void 0;var kb=S();function jb(e,t){return t===void 0&&(t=0),kb.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t));})}Jn.subscribeOn=jb;});var Ol=f(Xn=>{Object.defineProperty(Xn,"__esModule",{value:true});Xn.scheduleObservable=void 0;var Lb=C(),Fb=zr(),Db=Jr();function Ub(e,t){return Lb.innerFrom(e).pipe(Db.subscribeOn(t),Fb.observeOn(t))}Xn.scheduleObservable=Ub;});var wl=f(Zn=>{Object.defineProperty(Zn,"__esModule",{value:true});Zn.schedulePromise=void 0;var Vb=C(),Bb=zr(),Gb=Jr();function Wb(e,t){return Vb.innerFrom(e).pipe(Gb.subscribeOn(t),Bb.observeOn(t))}Zn.schedulePromise=Wb;});var Al=f(Kn=>{Object.defineProperty(Kn,"__esModule",{value:true});Kn.scheduleArray=void 0;var Hb=V();function $b(e,t){return new Hb.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule());})})}Kn.scheduleArray=$b;});var zs=f(Yn=>{Object.defineProperty(Yn,"__esModule",{value:true});Yn.scheduleIterable=void 0;var zb=V(),Jb=Bs(),Xb=D(),Tl=Re();function Zb(e,t){return new zb.Observable(function(r){var n;return Tl.executeSchedule(r,t,function(){n=e[Jb.iterator](),Tl.executeSchedule(r,t,function(){var i,a,o;try{i=n.next(),a=i.value,o=i.done;}catch(s){r.error(s);return}o?r.complete():r.next(a);},0,true);}),function(){return Xb.isFunction(n?.return)&&n.return()}})}Yn.scheduleIterable=Zb;});var Js=f(Qn=>{Object.defineProperty(Qn,"__esModule",{value:true});Qn.scheduleAsyncIterable=void 0;var Kb=V(),Il=Re();function Yb(e,t){if(!e)throw new Error("Iterable cannot be null");return new Kb.Observable(function(r){Il.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();Il.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value);});},0,true);});})}Qn.scheduleAsyncIterable=Yb;});var xl=f(ei=>{Object.defineProperty(ei,"__esModule",{value:true});ei.scheduleReadableStreamLike=void 0;var Qb=Js(),eg=Hn();function tg(e,t){return Qb.scheduleAsyncIterable(eg.readableStreamLikeToAsyncGenerator(e),t)}ei.scheduleReadableStreamLike=tg;});var Xs=f(ti=>{Object.defineProperty(ti,"__esModule",{value:true});ti.scheduled=void 0;var rg=Ol(),ng=wl(),ig=Al(),ag=zs(),og=Js(),sg=Ds(),ug=Fs(),cg=Dn(),lg=Gs(),dg=Us(),fg=Vs(),vg=Hn(),pg=xl();function hg(e,t){if(e!=null){if(sg.isInteropObservable(e))return rg.scheduleObservable(e,t);if(cg.isArrayLike(e))return ig.scheduleArray(e,t);if(ug.isPromise(e))return ng.schedulePromise(e,t);if(dg.isAsyncIterable(e))return og.scheduleAsyncIterable(e,t);if(lg.isIterable(e))return ag.scheduleIterable(e,t);if(vg.isReadableStreamLike(e))return pg.scheduleReadableStreamLike(e,t)}throw fg.createInvalidObservableTypeError(e)}ti.scheduled=hg;});var Ce=f(ri=>{Object.defineProperty(ri,"__esModule",{value:true});ri.from=void 0;var mg=Xs(),_g=C();function yg(e,t){return t?mg.scheduled(e,t):_g.innerFrom(e)}ri.from=yg;});var ii=f(ni=>{Object.defineProperty(ni,"__esModule",{value:true});ni.of=void 0;var bg=ae(),gg=Ce();function Eg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=bg.popScheduler(e);return gg.from(e,r)}ni.of=Eg;});var Zs=f(ai=>{Object.defineProperty(ai,"__esModule",{value:true});ai.throwError=void 0;var Sg=V(),Og=D();function wg(e,t){var r=Og.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new Sg.Observable(t?function(i){return t.schedule(n,0,i)}:n)}ai.throwError=wg;});var oi=f(Me=>{Object.defineProperty(Me,"__esModule",{value:true});Me.observeNotification=Me.Notification=Me.NotificationKind=void 0;var Ag=pe(),Tg=ii(),Ig=Zs(),xg=D();(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C";})(Me.NotificationKind||(Me.NotificationKind={}));var Pg=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N";}return e.prototype.observe=function(t){return ql(this,t)},e.prototype.do=function(t,r,n){var i=this,a=i.kind,o=i.value,s=i.error;return a==="N"?t?.(o):a==="E"?r?.(s):n?.()},e.prototype.accept=function(t,r,n){var i;return xg.isFunction((i=t)===null||i===void 0?void 0:i.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,i=t.error,a=r==="N"?Tg.of(n):r==="E"?Ig.throwError(function(){return i}):r==="C"?Ag.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+r);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();Me.Notification=Pg;function ql(e,t){var r,n,i,a=e,o=a.kind,s=a.value,l=a.error;if(typeof o!="string")throw new TypeError('Invalid notification, missing "kind"');o==="N"?(r=t.next)===null||r===void 0||r.call(t,s):o==="E"?(n=t.error)===null||n===void 0||n.call(t,l):(i=t.complete)===null||i===void 0||i.call(t);}Me.observeNotification=ql;});var Nl=f(si=>{Object.defineProperty(si,"__esModule",{value:true});si.isObservable=void 0;var Ng=V(),Pl=D();function Rg(e){return !!e&&(e instanceof Ng.Observable||Pl.isFunction(e.lift)&&Pl.isFunction(e.subscribe))}si.isObservable=Rg;});var He=f(ui=>{Object.defineProperty(ui,"__esModule",{value:true});ui.EmptyError=void 0;var Cg=Ve();ui.EmptyError=Cg.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence";}});});var Rl=f(ci=>{Object.defineProperty(ci,"__esModule",{value:true});ci.lastValueFrom=void 0;var Mg=He();function kg(e,t){var r=typeof t=="object";return new Promise(function(n,i){var a=false,o;e.subscribe({next:function(s){o=s,a=true;},error:i,complete:function(){a?n(o):r?n(t.defaultValue):i(new Mg.EmptyError);}});})}ci.lastValueFrom=kg;});var Cl=f(li=>{Object.defineProperty(li,"__esModule",{value:true});li.firstValueFrom=void 0;var jg=He(),Lg=Kt();function Fg(e,t){var r=typeof t=="object";return new Promise(function(n,i){var a=new Lg.SafeSubscriber({next:function(o){n(o),a.unsubscribe();},error:i,complete:function(){r?n(t.defaultValue):i(new jg.EmptyError);}});e.subscribe(a);})}li.firstValueFrom=Fg;});var Ks=f(di=>{Object.defineProperty(di,"__esModule",{value:true});di.ArgumentOutOfRangeError=void 0;var Dg=Ve();di.ArgumentOutOfRangeError=Dg.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range";}});});var Ys=f(fi=>{Object.defineProperty(fi,"__esModule",{value:true});fi.NotFoundError=void 0;var Ug=Ve();fi.NotFoundError=Ug.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r;}});});var Qs=f(vi=>{Object.defineProperty(vi,"__esModule",{value:true});vi.SequenceError=void 0;var Vg=Ve();vi.SequenceError=Vg.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r;}});});var hi=f(pi=>{Object.defineProperty(pi,"__esModule",{value:true});pi.isValidDate=void 0;function Bg(e){return e instanceof Date&&!isNaN(e)}pi.isValidDate=Bg;});var mi=f(kt=>{Object.defineProperty(kt,"__esModule",{value:true});kt.timeout=kt.TimeoutError=void 0;var Gg=ie(),Wg=hi(),Hg=S(),$g=C(),zg=Ve(),Jg=I(),Xg=Re();kt.TimeoutError=zg.createErrorClass(function(e){return function(r){r===void 0&&(r=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r;}});function Zg(e,t){var r=Wg.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,a=r.with,o=a===void 0?Kg:a,s=r.scheduler,l=s===void 0?t??Gg.asyncScheduler:s,u=r.meta,d=u===void 0?null:u;if(n==null&&i==null)throw new TypeError("No timeout provided.");return Hg.operate(function(p,h){var m,_,b=null,O=0,q=function(U){_=Xg.executeSchedule(h,l,function(){try{m.unsubscribe(),$g.innerFrom(o({meta:d,lastValue:b,seen:O})).subscribe(h);}catch(Y){h.error(Y);}},U);};m=p.subscribe(Jg.createOperatorSubscriber(h,function(U){_?.unsubscribe(),O++,h.next(b=U),i>0&&q(i);},void 0,void 0,function(){_?.closed||_?.unsubscribe(),b=null;})),!O&&q(n!=null?typeof n=="number"?n:+n-l.now():i);})}kt.timeout=Zg;function Kg(e){throw new kt.TimeoutError(e)}});var $e=f(_i=>{Object.defineProperty(_i,"__esModule",{value:true});_i.map=void 0;var Yg=S(),Qg=I();function e0(e,t){return Yg.operate(function(r,n){var i=0;r.subscribe(Qg.createOperatorSubscriber(n,function(a){n.next(e.call(t,a,i++));}));})}_i.map=e0;});var Je=f(ze=>{var t0=ze&&ze.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},r0=ze&&ze.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ze,"__esModule",{value:true});ze.mapOneOrManyArgs=void 0;var n0=$e(),i0=Array.isArray;function a0(e,t){return i0(t)?e.apply(void 0,r0([],t0(t))):e(t)}function o0(e){return n0.map(function(t){return a0(e,t)})}ze.mapOneOrManyArgs=o0;});var tu=f(Xe=>{var s0=Xe&&Xe.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},Ml=Xe&&Xe.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Xe,"__esModule",{value:true});Xe.bindCallbackInternals=void 0;var u0=$r(),c0=V(),l0=Jr(),d0=Je(),f0=zr(),v0=Mn();function eu(e,t,r,n){if(r)if(u0.isScheduler(r))n=r;else return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return eu(e,t,n).apply(this,i).pipe(d0.mapOneOrManyArgs(r))};return n?function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return eu(e,t).apply(this,i).pipe(l0.subscribeOn(n),f0.observeOn(n))}:function(){for(var i=this,a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var s=new v0.AsyncSubject,l=true;return new c0.Observable(function(u){var d=s.subscribe(u);if(l){l=false;var p=false,h=false;t.apply(i,Ml(Ml([],s0(a)),[function(){for(var m=[],_=0;_<arguments.length;_++)m[_]=arguments[_];if(e){var b=m.shift();if(b!=null){s.error(b);return}}s.next(1<m.length?m:m[0]),h=true,p&&s.complete();}])),h&&s.complete(),p=true;}return d})}}Xe.bindCallbackInternals=eu;});var kl=f(yi=>{Object.defineProperty(yi,"__esModule",{value:true});yi.bindCallback=void 0;var p0=tu();function h0(e,t,r){return p0.bindCallbackInternals(false,e,t,r)}yi.bindCallback=h0;});var jl=f(bi=>{Object.defineProperty(bi,"__esModule",{value:true});bi.bindNodeCallback=void 0;var m0=tu();function _0(e,t,r){return m0.bindCallbackInternals(true,e,t,r)}bi.bindNodeCallback=_0;});var ru=f(gi=>{Object.defineProperty(gi,"__esModule",{value:true});gi.argsArgArrayOrObject=void 0;var y0=Array.isArray,b0=Object.getPrototypeOf,g0=Object.prototype,E0=Object.keys;function S0(e){if(e.length===1){var t=e[0];if(y0(t))return {args:t,keys:null};if(O0(t)){var r=E0(t);return {args:r.map(function(n){return t[n]}),keys:r}}}return {args:e,keys:null}}gi.argsArgArrayOrObject=S0;function O0(e){return e&&typeof e=="object"&&b0(e)===g0}});var nu=f(Ei=>{Object.defineProperty(Ei,"__esModule",{value:true});Ei.createObject=void 0;function w0(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}Ei.createObject=w0;});var Si=f(br=>{Object.defineProperty(br,"__esModule",{value:true});br.combineLatestInit=br.combineLatest=void 0;var A0=V(),T0=ru(),Dl=Ce(),Ul=z(),I0=Je(),Ll=ae(),x0=nu(),q0=I(),P0=Re();function N0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ll.popScheduler(e),n=Ll.popResultSelector(e),i=T0.argsArgArrayOrObject(e),a=i.args,o=i.keys;if(a.length===0)return Dl.from([],r);var s=new A0.Observable(Vl(a,r,o?function(l){return x0.createObject(o,l)}:Ul.identity));return n?s.pipe(I0.mapOneOrManyArgs(n)):s}br.combineLatest=N0;function Vl(e,t,r){return r===void 0&&(r=Ul.identity),function(n){Fl(t,function(){for(var i=e.length,a=new Array(i),o=i,s=i,l=function(d){Fl(t,function(){var p=Dl.from(e[d],t),h=false;p.subscribe(q0.createOperatorSubscriber(n,function(m){a[d]=m,h||(h=true,s--),s||n.next(r(a.slice()));},function(){--o||n.complete();}));},n);},u=0;u<i;u++)l(u);},n);}}br.combineLatestInit=Vl;function Fl(e,t,r){e?P0.executeSchedule(r,e,t):t();}});var wi=f(Oi=>{Object.defineProperty(Oi,"__esModule",{value:true});Oi.mergeInternals=void 0;var R0=C(),C0=Re(),Bl=I();function M0(e,t,r,n,i,a,o,s){var l=[],u=0,d=0,p=false,h=function(){p&&!l.length&&!u&&t.complete();},m=function(b){return u<n?_(b):l.push(b)},_=function(b){a&&t.next(b),u++;var O=false;R0.innerFrom(r(b,d++)).subscribe(Bl.createOperatorSubscriber(t,function(q){i?.(q),a?m(q):t.next(q);},function(){O=true;},void 0,function(){if(O)try{u--;for(var q=function(){var U=l.shift();o?C0.executeSchedule(t,o,function(){return _(U)}):_(U);};l.length&&u<n;)q();h();}catch(U){t.error(U);}}));};return e.subscribe(Bl.createOperatorSubscriber(t,m,function(){p=true,h();})),function(){s?.();}}Oi.mergeInternals=M0;});var ke=f(Ai=>{Object.defineProperty(Ai,"__esModule",{value:true});Ai.mergeMap=void 0;var k0=$e(),j0=C(),L0=S(),F0=wi(),D0=D();function Gl(e,t,r){return r===void 0&&(r=1/0),D0.isFunction(t)?Gl(function(n,i){return k0.map(function(a,o){return t(n,a,i,o)})(j0.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),L0.operate(function(n,i){return F0.mergeInternals(n,i,e,r)}))}Ai.mergeMap=Gl;});var Xr=f(Ti=>{Object.defineProperty(Ti,"__esModule",{value:true});Ti.mergeAll=void 0;var U0=ke(),V0=z();function B0(e){return e===void 0&&(e=1/0),U0.mergeMap(V0.identity,e)}Ti.mergeAll=B0;});var xi=f(Ii=>{Object.defineProperty(Ii,"__esModule",{value:true});Ii.concatAll=void 0;var G0=Xr();function W0(){return G0.mergeAll(1)}Ii.concatAll=W0;});var Zr=f(qi=>{Object.defineProperty(qi,"__esModule",{value:true});qi.concat=void 0;var H0=xi(),$0=ae(),z0=Ce();function J0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return H0.concatAll()(z0.from(e,$0.popScheduler(e)))}qi.concat=J0;});var Kr=f(Pi=>{Object.defineProperty(Pi,"__esModule",{value:true});Pi.defer=void 0;var X0=V(),Z0=C();function K0(e){return new X0.Observable(function(t){Z0.innerFrom(e()).subscribe(t);})}Pi.defer=K0;});var Wl=f(Ni=>{Object.defineProperty(Ni,"__esModule",{value:true});Ni.connectable=void 0;var Y0=J(),Q0=V(),eE=Kr(),tE={connector:function(){return new Y0.Subject},resetOnDisconnect:true};function rE(e,t){t===void 0&&(t=tE);var r=null,n=t.connector,i=t.resetOnDisconnect,a=i===void 0?true:i,o=n(),s=new Q0.Observable(function(l){return o.subscribe(l)});return s.connect=function(){return (!r||r.closed)&&(r=eE.defer(function(){return e}).subscribe(o),a&&r.add(function(){return o=n()})),r},s}Ni.connectable=rE;});var Hl=f(Ri=>{Object.defineProperty(Ri,"__esModule",{value:true});Ri.forkJoin=void 0;var nE=V(),iE=ru(),aE=C(),oE=ae(),sE=I(),uE=Je(),cE=nu();function lE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=oE.popResultSelector(e),n=iE.argsArgArrayOrObject(e),i=n.args,a=n.keys,o=new nE.Observable(function(s){var l=i.length;if(!l){s.complete();return}for(var u=new Array(l),d=l,p=l,h=function(_){var b=false;aE.innerFrom(i[_]).subscribe(sE.createOperatorSubscriber(s,function(O){b||(b=true,p--),u[_]=O;},function(){return d--},void 0,function(){(!d||!b)&&(p||s.next(a?cE.createObject(a,u):u),s.complete());}));},m=0;m<l;m++)h(m);});return r?o.pipe(uE.mapOneOrManyArgs(r)):o}Ri.forkJoin=lE;});var zl=f(gr=>{var dE=gr&&gr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a};Object.defineProperty(gr,"__esModule",{value:true});gr.fromEvent=void 0;var fE=C(),vE=V(),pE=ke(),hE=Dn(),jt=D(),mE=Je(),_E=["addListener","removeListener"],yE=["addEventListener","removeEventListener"],bE=["on","off"];function iu(e,t,r,n){if(jt.isFunction(r)&&(n=r,r=void 0),n)return iu(e,t,r).pipe(mE.mapOneOrManyArgs(n));var i=dE(SE(e)?yE.map(function(s){return function(l){return e[s](t,l,r)}}):gE(e)?_E.map($l(e,t)):EE(e)?bE.map($l(e,t)):[],2),a=i[0],o=i[1];if(!a&&hE.isArrayLike(e))return pE.mergeMap(function(s){return iu(s,t,r)})(fE.innerFrom(e));if(!a)throw new TypeError("Invalid event target");return new vE.Observable(function(s){var l=function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return s.next(1<u.length?u:u[0])};return a(l),function(){return o(l)}})}gr.fromEvent=iu;function $l(e,t){return function(r){return function(n){return e[r](t,n)}}}function gE(e){return jt.isFunction(e.addListener)&&jt.isFunction(e.removeListener)}function EE(e){return jt.isFunction(e.on)&&jt.isFunction(e.off)}function SE(e){return jt.isFunction(e.addEventListener)&&jt.isFunction(e.removeEventListener)}});var Xl=f(Ci=>{Object.defineProperty(Ci,"__esModule",{value:true});Ci.fromEventPattern=void 0;var OE=V(),wE=D(),AE=Je();function Jl(e,t,r){return r?Jl(e,t).pipe(AE.mapOneOrManyArgs(r)):new OE.Observable(function(n){var i=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return n.next(o.length===1?o[0]:o)},a=e(i);return wE.isFunction(t)?function(){return t(i,a)}:void 0})}Ci.fromEventPattern=Jl;});var Kl=f(Er=>{var TE=Er&&Er.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r);}catch(d){u=[6,d],i=0;}finally{n=a=0;}if(u[0]&5)throw u[1];return {value:u[0]?u[1]:void 0,done:true}}};Object.defineProperty(Er,"__esModule",{value:true});Er.generate=void 0;var Zl=z(),IE=$r(),xE=Kr(),qE=zs();function PE(e,t,r,n,i){var a,o,s,l;arguments.length===1?(a=e,l=a.initialState,t=a.condition,r=a.iterate,o=a.resultSelector,s=o===void 0?Zl.identity:o,i=a.scheduler):(l=e,!n||IE.isScheduler(n)?(s=Zl.identity,i=n):s=n);function u(){var d;return TE(this,function(p){switch(p.label){case 0:d=l,p.label=1;case 1:return !t||t(d)?[4,s(d)]:[3,4];case 2:p.sent(),p.label=3;case 3:return d=r(d),[3,1];case 4:return [2]}})}return xE.defer(i?function(){return qE.scheduleIterable(u(),i)}:u)}Er.generate=PE;});var Yl=f(Mi=>{Object.defineProperty(Mi,"__esModule",{value:true});Mi.iif=void 0;var NE=Kr();function RE(e,t,r){return NE.defer(function(){return e()?t:r})}Mi.iif=RE;});var Ze=f(ki=>{Object.defineProperty(ki,"__esModule",{value:true});ki.timer=void 0;var CE=V(),ME=ie(),kE=$r(),jE=hi();function LE(e,t,r){e===void 0&&(e=0),r===void 0&&(r=ME.async);var n=-1;return t!=null&&(kE.isScheduler(t)?r=t:n=t),new CE.Observable(function(i){var a=jE.isValidDate(e)?+e-r.now():e;a<0&&(a=0);var o=0;return r.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete());},a)})}ki.timer=LE;});var au=f(ji=>{Object.defineProperty(ji,"__esModule",{value:true});ji.interval=void 0;var FE=ie(),DE=Ze();function UE(e,t){return e===void 0&&(e=0),t===void 0&&(t=FE.asyncScheduler),e<0&&(e=0),DE.timer(e,e,t)}ji.interval=UE;});var ed=f(Li=>{Object.defineProperty(Li,"__esModule",{value:true});Li.merge=void 0;var VE=Xr(),BE=C(),GE=pe(),Ql=ae(),WE=Ce();function HE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ql.popScheduler(e),n=Ql.popNumber(e,1/0),i=e;return i.length?i.length===1?BE.innerFrom(i[0]):VE.mergeAll(n)(WE.from(i,r)):GE.EMPTY}Li.merge=HE;});var ou=f(Lt=>{Object.defineProperty(Lt,"__esModule",{value:true});Lt.never=Lt.NEVER=void 0;var $E=V(),zE=$();Lt.NEVER=new $E.Observable(zE.noop);function JE(){return Lt.NEVER}Lt.never=JE;});var Ft=f(Fi=>{Object.defineProperty(Fi,"__esModule",{value:true});Fi.argsOrArgArray=void 0;var XE=Array.isArray;function ZE(e){return e.length===1&&XE(e[0])?e[0]:e}Fi.argsOrArgArray=ZE;});var su=f(Di=>{Object.defineProperty(Di,"__esModule",{value:true});Di.onErrorResumeNext=void 0;var KE=V(),YE=Ft(),QE=I(),td=$(),eS=C();function tS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=YE.argsOrArgArray(e);return new KE.Observable(function(n){var i=0,a=function(){if(i<r.length){var o=void 0;try{o=eS.innerFrom(r[i++]);}catch{a();return}var s=new QE.OperatorSubscriber(n,void 0,td.noop,td.noop);o.subscribe(s),s.add(a);}else n.complete();};a();})}Di.onErrorResumeNext=tS;});var rd=f(Ui=>{Object.defineProperty(Ui,"__esModule",{value:true});Ui.pairs=void 0;var rS=Ce();function nS(e,t){return rS.from(Object.entries(e),t)}Ui.pairs=nS;});var nd=f(Vi=>{Object.defineProperty(Vi,"__esModule",{value:true});Vi.not=void 0;function iS(e,t){return function(r,n){return !e.call(t,r,n)}}Vi.not=iS;});var Dt=f(Bi=>{Object.defineProperty(Bi,"__esModule",{value:true});Bi.filter=void 0;var aS=S(),oS=I();function sS(e,t){return aS.operate(function(r,n){var i=0;r.subscribe(oS.createOperatorSubscriber(n,function(a){return e.call(t,a,i++)&&n.next(a)}));})}Bi.filter=sS;});var od=f(Gi=>{Object.defineProperty(Gi,"__esModule",{value:true});Gi.partition=void 0;var uS=nd(),id=Dt(),ad=C();function cS(e,t,r){return [id.filter(t,r)(ad.innerFrom(e)),id.filter(uS.not(t,r))(ad.innerFrom(e))]}Gi.partition=cS;});var uu=f(Sr=>{Object.defineProperty(Sr,"__esModule",{value:true});Sr.raceInit=Sr.race=void 0;var lS=V(),sd=C(),dS=Ft(),fS=I();function vS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=dS.argsOrArgArray(e),e.length===1?sd.innerFrom(e[0]):new lS.Observable(ud(e))}Sr.race=vS;function ud(e){return function(t){for(var r=[],n=function(a){r.push(sd.innerFrom(e[a]).subscribe(fS.createOperatorSubscriber(t,function(o){if(r){for(var s=0;s<r.length;s++)s!==a&&r[s].unsubscribe();r=null;}t.next(o);})));},i=0;r&&!t.closed&&i<e.length;i++)n(i);}}Sr.raceInit=ud;});var cd=f(Wi=>{Object.defineProperty(Wi,"__esModule",{value:true});Wi.range=void 0;var pS=V(),hS=pe();function mS(e,t,r){if(t==null&&(t=e,e=0),t<=0)return hS.EMPTY;var n=t+e;return new pS.Observable(r?function(i){var a=e;return r.schedule(function(){a<n?(i.next(a++),this.schedule()):i.complete();})}:function(i){for(var a=e;a<n&&!i.closed;)i.next(a++);i.complete();})}Wi.range=mS;});var ld=f(Hi=>{Object.defineProperty(Hi,"__esModule",{value:true});Hi.using=void 0;var _S=V(),yS=C(),bS=pe();function gS(e,t){return new _S.Observable(function(r){var n=e(),i=t(n),a=i?yS.innerFrom(i):bS.EMPTY;return a.subscribe(r),function(){n&&n.unsubscribe();}})}Hi.using=gS;});var $i=f(Ke=>{var ES=Ke&&Ke.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},SS=Ke&&Ke.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ke,"__esModule",{value:true});Ke.zip=void 0;var OS=V(),wS=C(),AS=Ft(),TS=pe(),IS=I(),xS=ae();function qS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xS.popResultSelector(e),n=AS.argsOrArgArray(e);return n.length?new OS.Observable(function(i){var a=n.map(function(){return []}),o=n.map(function(){return false});i.add(function(){a=o=null;});for(var s=function(u){wS.innerFrom(n[u]).subscribe(IS.createOperatorSubscriber(i,function(d){if(a[u].push(d),a.every(function(h){return h.length})){var p=a.map(function(h){return h.shift()});i.next(r?r.apply(void 0,SS([],ES(p))):p),a.some(function(h,m){return !h.length&&o[m]})&&i.complete();}},function(){o[u]=true,!a[u].length&&i.complete();}));},l=0;!i.closed&&l<n.length;l++)s(l);return function(){a=o=null;}}):TS.EMPTY}Ke.zip=qS;});var fd=f(dd=>{Object.defineProperty(dd,"__esModule",{value:true});});var cu=f(zi=>{Object.defineProperty(zi,"__esModule",{value:true});zi.audit=void 0;var PS=S(),NS=C(),vd=I();function RS(e){return PS.operate(function(t,r){var n=false,i=null,a=null,o=false,s=function(){if(a?.unsubscribe(),a=null,n){n=false;var u=i;i=null,r.next(u);}o&&r.complete();},l=function(){a=null,o&&r.complete();};t.subscribe(vd.createOperatorSubscriber(r,function(u){n=true,i=u,a||NS.innerFrom(e(u)).subscribe(a=vd.createOperatorSubscriber(r,s,l));},function(){o=true,(!n||!a||a.closed)&&r.complete();}));})}zi.audit=RS;});var pd=f(Ji=>{Object.defineProperty(Ji,"__esModule",{value:true});Ji.auditTime=void 0;var CS=ie(),MS=cu(),kS=Ze();function jS(e,t){return t===void 0&&(t=CS.asyncScheduler),MS.audit(function(){return kS.timer(e,t)})}Ji.auditTime=jS;});var md=f(Xi=>{Object.defineProperty(Xi,"__esModule",{value:true});Xi.buffer=void 0;var LS=S(),FS=$(),hd=I(),DS=C();function US(e){return LS.operate(function(t,r){var n=[];return t.subscribe(hd.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete();})),DS.innerFrom(e).subscribe(hd.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i);},FS.noop)),function(){n=null;}})}Xi.buffer=US;});var _d=f(Or=>{var lu=Or&&Or.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Or,"__esModule",{value:true});Or.bufferCount=void 0;var VS=S(),BS=I(),GS=Ne();function WS(e,t){return t===void 0&&(t=null),t=t??e,VS.operate(function(r,n){var i=[],a=0;r.subscribe(BS.createOperatorSubscriber(n,function(o){var s,l,u,d,p=null;a++%t===0&&i.push([]);try{for(var h=lu(i),m=h.next();!m.done;m=h.next()){var _=m.value;_.push(o),e<=_.length&&(p=p??[],p.push(_));}}catch(q){s={error:q};}finally{try{m&&!m.done&&(l=h.return)&&l.call(h);}finally{if(s)throw s.error}}if(p)try{for(var b=lu(p),O=b.next();!O.done;O=b.next()){var _=O.value;GS.arrRemove(i,_),n.next(_);}}catch(q){u={error:q};}finally{try{O&&!O.done&&(d=b.return)&&d.call(b);}finally{if(u)throw u.error}}},function(){var o,s;try{for(var l=lu(i),u=l.next();!u.done;u=l.next()){var d=u.value;n.next(d);}}catch(p){o={error:p};}finally{try{u&&!u.done&&(s=l.return)&&s.call(l);}finally{if(o)throw o.error}}n.complete();},void 0,function(){i=null;}));})}Or.bufferCount=WS;});var bd=f(wr=>{var HS=wr&&wr.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wr,"__esModule",{value:true});wr.bufferTime=void 0;var $S=oe(),zS=S(),JS=I(),XS=Ne(),ZS=ie(),KS=ae(),yd=Re();function YS(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var a=(t=KS.popScheduler(n))!==null&&t!==void 0?t:ZS.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,s=n[1]||1/0;return zS.operate(function(l,u){var d=[],p=false,h=function(b){var O=b.buffer,q=b.subs;q.unsubscribe(),XS.arrRemove(d,b),u.next(O),p&&m();},m=function(){if(d){var b=new $S.Subscription;u.add(b);var O=[],q={buffer:O,subs:b};d.push(q),yd.executeSchedule(b,a,function(){return h(q)},e);}};o!==null&&o>=0?yd.executeSchedule(u,a,m,o,true):p=true,m();var _=JS.createOperatorSubscriber(u,function(b){var O,q,U=d.slice();try{for(var Y=HS(U),je=Y.next();!je.done;je=Y.next()){var dt=je.value,ft=dt.buffer;ft.push(b),s<=ft.length&&h(dt);}}catch(Bp){O={error:Bp};}finally{try{je&&!je.done&&(q=Y.return)&&q.call(Y);}finally{if(O)throw O.error}}},function(){for(;d?.length;)u.next(d.shift().buffer);_?.unsubscribe(),u.complete(),u.unsubscribe();},void 0,function(){return d=null});l.subscribe(_);})}wr.bufferTime=YS;});var Sd=f(Ar=>{var QS=Ar&&Ar.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ar,"__esModule",{value:true});Ar.bufferToggle=void 0;var eO=oe(),tO=S(),gd=C(),du=I(),Ed=$(),rO=Ne();function nO(e,t){return tO.operate(function(r,n){var i=[];gd.innerFrom(e).subscribe(du.createOperatorSubscriber(n,function(a){var o=[];i.push(o);var s=new eO.Subscription,l=function(){rO.arrRemove(i,o),n.next(o),s.unsubscribe();};s.add(gd.innerFrom(t(a)).subscribe(du.createOperatorSubscriber(n,l,Ed.noop)));},Ed.noop)),r.subscribe(du.createOperatorSubscriber(n,function(a){var o,s;try{for(var l=QS(i),u=l.next();!u.done;u=l.next()){var d=u.value;d.push(a);}}catch(p){o={error:p};}finally{try{u&&!u.done&&(s=l.return)&&s.call(l);}finally{if(o)throw o.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete();}));})}Ar.bufferToggle=nO;});var wd=f(Zi=>{Object.defineProperty(Zi,"__esModule",{value:true});Zi.bufferWhen=void 0;var iO=S(),aO=$(),Od=I(),oO=C();function sO(e){return iO.operate(function(t,r){var n=null,i=null,a=function(){i?.unsubscribe();var o=n;n=[],o&&r.next(o),oO.innerFrom(e()).subscribe(i=Od.createOperatorSubscriber(r,a,aO.noop));};a(),t.subscribe(Od.createOperatorSubscriber(r,function(o){return n?.push(o)},function(){n&&r.next(n),r.complete();},void 0,function(){return n=i=null}));})}Zi.bufferWhen=sO;});var Td=f(Ki=>{Object.defineProperty(Ki,"__esModule",{value:true});Ki.catchError=void 0;var uO=C(),cO=I(),lO=S();function Ad(e){return lO.operate(function(t,r){var n=null,i=false,a;n=t.subscribe(cO.createOperatorSubscriber(r,void 0,void 0,function(o){a=uO.innerFrom(e(o,Ad(e)(t))),n?(n.unsubscribe(),n=null,a.subscribe(r)):i=true;})),i&&(n.unsubscribe(),n=null,a.subscribe(r));})}Ki.catchError=Ad;});var fu=f(Yi=>{Object.defineProperty(Yi,"__esModule",{value:true});Yi.scanInternals=void 0;var dO=I();function fO(e,t,r,n,i){return function(a,o){var s=r,l=t,u=0;a.subscribe(dO.createOperatorSubscriber(o,function(d){var p=u++;l=s?e(l,d,p):(s=true,d),n&&o.next(l);},i&&function(){s&&o.next(l),o.complete();}));}}Yi.scanInternals=fO;});var Tr=f(Qi=>{Object.defineProperty(Qi,"__esModule",{value:true});Qi.reduce=void 0;var vO=fu(),pO=S();function hO(e,t){return pO.operate(vO.scanInternals(e,t,arguments.length>=2,false,true))}Qi.reduce=hO;});var vu=f(ea=>{Object.defineProperty(ea,"__esModule",{value:true});ea.toArray=void 0;var mO=Tr(),_O=S(),yO=function(e,t){return e.push(t),e};function bO(){return _O.operate(function(e,t){mO.reduce(yO,[])(e).subscribe(t);})}ea.toArray=bO;});var pu=f(ta=>{Object.defineProperty(ta,"__esModule",{value:true});ta.joinAllInternals=void 0;var gO=z(),EO=Je(),SO=Br(),OO=ke(),wO=vu();function AO(e,t){return SO.pipe(wO.toArray(),OO.mergeMap(function(r){return e(r)}),t?EO.mapOneOrManyArgs(t):gO.identity)}ta.joinAllInternals=AO;});var hu=f(ra=>{Object.defineProperty(ra,"__esModule",{value:true});ra.combineLatestAll=void 0;var TO=Si(),IO=pu();function xO(e){return IO.joinAllInternals(TO.combineLatest,e)}ra.combineLatestAll=xO;});var Id=f(na=>{Object.defineProperty(na,"__esModule",{value:true});na.combineAll=void 0;var qO=hu();na.combineAll=qO.combineLatestAll;});var Nd=f(Ye=>{var xd=Ye&&Ye.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},qd=Ye&&Ye.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ye,"__esModule",{value:true});Ye.combineLatest=void 0;var PO=Si(),NO=S(),RO=Ft(),CO=Je(),MO=Br(),kO=ae();function Pd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=kO.popResultSelector(e);return r?MO.pipe(Pd.apply(void 0,qd([],xd(e))),CO.mapOneOrManyArgs(r)):NO.operate(function(n,i){PO.combineLatestInit(qd([n],xd(RO.argsOrArgArray(e))))(i);})}Ye.combineLatest=Pd;});var Rd=f(Qe=>{var jO=Qe&&Qe.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},LO=Qe&&Qe.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Qe,"__esModule",{value:true});Qe.combineLatestWith=void 0;var FO=Nd();function DO(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return FO.combineLatest.apply(void 0,LO([],jO(e)))}Qe.combineLatestWith=DO;});var mu=f(ia=>{Object.defineProperty(ia,"__esModule",{value:true});ia.concatMap=void 0;var Cd=ke(),UO=D();function VO(e,t){return UO.isFunction(t)?Cd.mergeMap(e,t,1):Cd.mergeMap(e,1)}ia.concatMap=VO;});var kd=f(aa=>{Object.defineProperty(aa,"__esModule",{value:true});aa.concatMapTo=void 0;var Md=mu(),BO=D();function GO(e,t){return BO.isFunction(t)?Md.concatMap(function(){return e},t):Md.concatMap(function(){return e})}aa.concatMapTo=GO;});var jd=f(et=>{var WO=et&&et.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},HO=et&&et.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(et,"__esModule",{value:true});et.concat=void 0;var $O=S(),zO=xi(),JO=ae(),XO=Ce();function ZO(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=JO.popScheduler(e);return $O.operate(function(n,i){zO.concatAll()(XO.from(HO([n],WO(e)),r)).subscribe(i);})}et.concat=ZO;});var Ld=f(tt=>{var KO=tt&&tt.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},YO=tt&&tt.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(tt,"__esModule",{value:true});tt.concatWith=void 0;var QO=jd();function ew(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return QO.concat.apply(void 0,YO([],KO(e)))}tt.concatWith=ew;});var Fd=f(oa=>{Object.defineProperty(oa,"__esModule",{value:true});oa.fromSubscribable=void 0;var tw=V();function rw(e){return new tw.Observable(function(t){return e.subscribe(t)})}oa.fromSubscribable=rw;});var ua=f(sa=>{Object.defineProperty(sa,"__esModule",{value:true});sa.connect=void 0;var nw=J(),iw=C(),aw=S(),ow=Fd(),sw={connector:function(){return new nw.Subject}};function uw(e,t){t===void 0&&(t=sw);var r=t.connector;return aw.operate(function(n,i){var a=r();iw.innerFrom(e(ow.fromSubscribable(a))).subscribe(i),i.add(n.subscribe(a));})}sa.connect=uw;});var Dd=f(ca=>{Object.defineProperty(ca,"__esModule",{value:true});ca.count=void 0;var cw=Tr();function lw(e){return cw.reduce(function(t,r,n){return !e||e(r,n)?t+1:t},0)}ca.count=lw;});var Vd=f(la=>{Object.defineProperty(la,"__esModule",{value:true});la.debounce=void 0;var dw=S(),fw=$(),Ud=I(),vw=C();function pw(e){return dw.operate(function(t,r){var n=false,i=null,a=null,o=function(){if(a?.unsubscribe(),a=null,n){n=false;var s=i;i=null,r.next(s);}};t.subscribe(Ud.createOperatorSubscriber(r,function(s){a?.unsubscribe(),n=true,i=s,a=Ud.createOperatorSubscriber(r,o,fw.noop),vw.innerFrom(e(s)).subscribe(a);},function(){o(),r.complete();},void 0,function(){i=a=null;}));})}la.debounce=pw;});var Bd=f(da=>{Object.defineProperty(da,"__esModule",{value:true});da.debounceTime=void 0;var hw=ie(),mw=S(),_w=I();function yw(e,t){return t===void 0&&(t=hw.asyncScheduler),mw.operate(function(r,n){var i=null,a=null,o=null,s=function(){if(i){i.unsubscribe(),i=null;var u=a;a=null,n.next(u);}};function l(){var u=o+e,d=t.now();if(d<u){i=this.schedule(void 0,u-d),n.add(i);return}s();}r.subscribe(_w.createOperatorSubscriber(n,function(u){a=u,o=t.now(),i||(i=t.schedule(l,e),n.add(i));},function(){s(),n.complete();},void 0,function(){a=i=null;}));})}da.debounceTime=yw;});var Yr=f(fa=>{Object.defineProperty(fa,"__esModule",{value:true});fa.defaultIfEmpty=void 0;var bw=S(),gw=I();function Ew(e){return bw.operate(function(t,r){var n=false;t.subscribe(gw.createOperatorSubscriber(r,function(i){n=true,r.next(i);},function(){n||r.next(e),r.complete();}));})}fa.defaultIfEmpty=Ew;});var Qr=f(va=>{Object.defineProperty(va,"__esModule",{value:true});va.take=void 0;var Sw=pe(),Ow=S(),ww=I();function Aw(e){return e<=0?function(){return Sw.EMPTY}:Ow.operate(function(t,r){var n=0;t.subscribe(ww.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete());}));})}va.take=Aw;});var _u=f(pa=>{Object.defineProperty(pa,"__esModule",{value:true});pa.ignoreElements=void 0;var Tw=S(),Iw=I(),xw=$();function qw(){return Tw.operate(function(e,t){e.subscribe(Iw.createOperatorSubscriber(t,xw.noop));})}pa.ignoreElements=qw;});var yu=f(ha=>{Object.defineProperty(ha,"__esModule",{value:true});ha.mapTo=void 0;var Pw=$e();function Nw(e){return Pw.map(function(){return e})}ha.mapTo=Nw;});var bu=f(ma=>{Object.defineProperty(ma,"__esModule",{value:true});ma.delayWhen=void 0;var Rw=Zr(),Gd=Qr(),Cw=_u(),Mw=yu(),kw=ke(),jw=C();function Wd(e,t){return t?function(r){return Rw.concat(t.pipe(Gd.take(1),Cw.ignoreElements()),r.pipe(Wd(e)))}:kw.mergeMap(function(r,n){return jw.innerFrom(e(r,n)).pipe(Gd.take(1),Mw.mapTo(r))})}ma.delayWhen=Wd;});var Hd=f(_a=>{Object.defineProperty(_a,"__esModule",{value:true});_a.delay=void 0;var Lw=ie(),Fw=bu(),Dw=Ze();function Uw(e,t){t===void 0&&(t=Lw.asyncScheduler);var r=Dw.timer(e,t);return Fw.delayWhen(function(){return r})}_a.delay=Uw;});var $d=f(ya=>{Object.defineProperty(ya,"__esModule",{value:true});ya.dematerialize=void 0;var Vw=oi(),Bw=S(),Gw=I();function Ww(){return Bw.operate(function(e,t){e.subscribe(Gw.createOperatorSubscriber(t,function(r){return Vw.observeNotification(r,t)}));})}ya.dematerialize=Ww;});var Jd=f(ba=>{Object.defineProperty(ba,"__esModule",{value:true});ba.distinct=void 0;var Hw=S(),zd=I(),$w=$(),zw=C();function Jw(e,t){return Hw.operate(function(r,n){var i=new Set;r.subscribe(zd.createOperatorSubscriber(n,function(a){var o=e?e(a):a;i.has(o)||(i.add(o),n.next(a));})),t&&zw.innerFrom(t).subscribe(zd.createOperatorSubscriber(n,function(){return i.clear()},$w.noop));})}ba.distinct=Jw;});var gu=f(ga=>{Object.defineProperty(ga,"__esModule",{value:true});ga.distinctUntilChanged=void 0;var Xw=z(),Zw=S(),Kw=I();function Yw(e,t){return t===void 0&&(t=Xw.identity),e=e??Qw,Zw.operate(function(r,n){var i,a=true;r.subscribe(Kw.createOperatorSubscriber(n,function(o){var s=t(o);(a||!e(i,s))&&(a=false,i=s,n.next(o));}));})}ga.distinctUntilChanged=Yw;function Qw(e,t){return e===t}});var Xd=f(Ea=>{Object.defineProperty(Ea,"__esModule",{value:true});Ea.distinctUntilKeyChanged=void 0;var eA=gu();function tA(e,t){return eA.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}Ea.distinctUntilKeyChanged=tA;});var en=f(Sa=>{Object.defineProperty(Sa,"__esModule",{value:true});Sa.throwIfEmpty=void 0;var rA=He(),nA=S(),iA=I();function aA(e){return e===void 0&&(e=oA),nA.operate(function(t,r){var n=false;t.subscribe(iA.createOperatorSubscriber(r,function(i){n=true,r.next(i);},function(){return n?r.complete():r.error(e())}));})}Sa.throwIfEmpty=aA;function oA(){return new rA.EmptyError}});var Kd=f(Oa=>{Object.defineProperty(Oa,"__esModule",{value:true});Oa.elementAt=void 0;var Zd=Ks(),sA=Dt(),uA=en(),cA=Yr(),lA=Qr();function dA(e,t){if(e<0)throw new Zd.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(sA.filter(function(i,a){return a===e}),lA.take(1),r?cA.defaultIfEmpty(t):uA.throwIfEmpty(function(){return new Zd.ArgumentOutOfRangeError}))}}Oa.elementAt=dA;});var Yd=f(rt=>{var fA=rt&&rt.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},vA=rt&&rt.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(rt,"__esModule",{value:true});rt.endWith=void 0;var pA=Zr(),hA=ii();function mA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return pA.concat(r,hA.of.apply(void 0,vA([],fA(e))))}}rt.endWith=mA;});var Qd=f(wa=>{Object.defineProperty(wa,"__esModule",{value:true});wa.every=void 0;var _A=S(),yA=I();function bA(e,t){return _A.operate(function(r,n){var i=0;r.subscribe(yA.createOperatorSubscriber(n,function(a){e.call(t,a,i++,r)||(n.next(false),n.complete());},function(){n.next(true),n.complete();}));})}wa.every=bA;});var Eu=f(Aa=>{Object.defineProperty(Aa,"__esModule",{value:true});Aa.exhaustMap=void 0;var gA=$e(),ef=C(),EA=S(),tf=I();function rf(e,t){return t?function(r){return r.pipe(rf(function(n,i){return ef.innerFrom(e(n,i)).pipe(gA.map(function(a,o){return t(n,a,i,o)}))}))}:EA.operate(function(r,n){var i=0,a=null,o=false;r.subscribe(tf.createOperatorSubscriber(n,function(s){a||(a=tf.createOperatorSubscriber(n,void 0,function(){a=null,o&&n.complete();}),ef.innerFrom(e(s,i++)).subscribe(a));},function(){o=true,!a&&n.complete();}));})}Aa.exhaustMap=rf;});var Su=f(Ta=>{Object.defineProperty(Ta,"__esModule",{value:true});Ta.exhaustAll=void 0;var SA=Eu(),OA=z();function wA(){return SA.exhaustMap(OA.identity)}Ta.exhaustAll=wA;});var nf=f(Ia=>{Object.defineProperty(Ia,"__esModule",{value:true});Ia.exhaust=void 0;var AA=Su();Ia.exhaust=AA.exhaustAll;});var af=f(xa=>{Object.defineProperty(xa,"__esModule",{value:true});xa.expand=void 0;var TA=S(),IA=wi();function xA(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,TA.operate(function(n,i){return IA.mergeInternals(n,i,e,t,void 0,true,r)})}xa.expand=xA;});var of=f(qa=>{Object.defineProperty(qa,"__esModule",{value:true});qa.finalize=void 0;var qA=S();function PA(e){return qA.operate(function(t,r){try{t.subscribe(r);}finally{r.add(e);}})}qa.finalize=PA;});var Ou=f(Ir=>{Object.defineProperty(Ir,"__esModule",{value:true});Ir.createFind=Ir.find=void 0;var NA=S(),RA=I();function CA(e,t){return NA.operate(sf(e,t,"value"))}Ir.find=CA;function sf(e,t,r){var n=r==="index";return function(i,a){var o=0;i.subscribe(RA.createOperatorSubscriber(a,function(s){var l=o++;e.call(t,s,l,i)&&(a.next(n?l:s),a.complete());},function(){a.next(n?-1:void 0),a.complete();}));}}Ir.createFind=sf;});var uf=f(Pa=>{Object.defineProperty(Pa,"__esModule",{value:true});Pa.findIndex=void 0;var MA=S(),kA=Ou();function jA(e,t){return MA.operate(kA.createFind(e,t,"index"))}Pa.findIndex=jA;});var cf=f(Na=>{Object.defineProperty(Na,"__esModule",{value:true});Na.first=void 0;var LA=He(),FA=Dt(),DA=Qr(),UA=Yr(),VA=en(),BA=z();function GA(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?FA.filter(function(i,a){return e(i,a,n)}):BA.identity,DA.take(1),r?UA.defaultIfEmpty(t):VA.throwIfEmpty(function(){return new LA.EmptyError}))}}Na.first=GA;});var df=f(Ra=>{Object.defineProperty(Ra,"__esModule",{value:true});Ra.groupBy=void 0;var WA=V(),HA=C(),$A=J(),zA=S(),lf=I();function JA(e,t,r,n){return zA.operate(function(i,a){var o;!t||typeof t=="function"?o=t:(r=t.duration,o=t.element,n=t.connector);var s=new Map,l=function(_){s.forEach(_),_(a);},u=function(_){return l(function(b){return b.error(_)})},d=0,p=false,h=new lf.OperatorSubscriber(a,function(_){try{var b=e(_),O=s.get(b);if(!O){s.set(b,O=n?n():new $A.Subject);var q=m(b,O);if(a.next(q),r){var U=lf.createOperatorSubscriber(O,function(){O.complete(),U?.unsubscribe();},void 0,void 0,function(){return s.delete(b)});h.add(HA.innerFrom(r(q)).subscribe(U));}}O.next(o?o(_):_);}catch(Y){u(Y);}},function(){return l(function(_){return _.complete()})},u,function(){return s.clear()},function(){return p=true,d===0});i.subscribe(h);function m(_,b){var O=new WA.Observable(function(q){d++;var U=b.subscribe(q);return function(){U.unsubscribe(),--d===0&&p&&h.unsubscribe();}});return O.key=_,O}})}Ra.groupBy=JA;});var ff=f(Ca=>{Object.defineProperty(Ca,"__esModule",{value:true});Ca.isEmpty=void 0;var XA=S(),ZA=I();function KA(){return XA.operate(function(e,t){e.subscribe(ZA.createOperatorSubscriber(t,function(){t.next(false),t.complete();},function(){t.next(true),t.complete();}));})}Ca.isEmpty=KA;});var wu=f(xr=>{var YA=xr&&xr.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(xr,"__esModule",{value:true});xr.takeLast=void 0;var QA=pe(),eT=S(),tT=I();function rT(e){return e<=0?function(){return QA.EMPTY}:eT.operate(function(t,r){var n=[];t.subscribe(tT.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift();},function(){var i,a;try{for(var o=YA(n),s=o.next();!s.done;s=o.next()){var l=s.value;r.next(l);}}catch(u){i={error:u};}finally{try{s&&!s.done&&(a=o.return)&&a.call(o);}finally{if(i)throw i.error}}r.complete();},void 0,function(){n=null;}));})}xr.takeLast=rT;});var vf=f(Ma=>{Object.defineProperty(Ma,"__esModule",{value:true});Ma.last=void 0;var nT=He(),iT=Dt(),aT=wu(),oT=en(),sT=Yr(),uT=z();function cT(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?iT.filter(function(i,a){return e(i,a,n)}):uT.identity,aT.takeLast(1),r?sT.defaultIfEmpty(t):oT.throwIfEmpty(function(){return new nT.EmptyError}))}}Ma.last=cT;});var pf=f(ka=>{Object.defineProperty(ka,"__esModule",{value:true});ka.materialize=void 0;var Au=oi(),lT=S(),dT=I();function fT(){return lT.operate(function(e,t){e.subscribe(dT.createOperatorSubscriber(t,function(r){t.next(Au.Notification.createNext(r));},function(){t.next(Au.Notification.createComplete()),t.complete();},function(r){t.next(Au.Notification.createError(r)),t.complete();}));})}ka.materialize=fT;});var hf=f(ja=>{Object.defineProperty(ja,"__esModule",{value:true});ja.max=void 0;var vT=Tr(),pT=D();function hT(e){return vT.reduce(pT.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}ja.max=hT;});var mf=f(La=>{Object.defineProperty(La,"__esModule",{value:true});La.flatMap=void 0;var mT=ke();La.flatMap=mT.mergeMap;});var yf=f(Fa=>{Object.defineProperty(Fa,"__esModule",{value:true});Fa.mergeMapTo=void 0;var _f=ke(),_T=D();function yT(e,t,r){return r===void 0&&(r=1/0),_T.isFunction(t)?_f.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),_f.mergeMap(function(){return e},r))}Fa.mergeMapTo=yT;});var bf=f(Da=>{Object.defineProperty(Da,"__esModule",{value:true});Da.mergeScan=void 0;var bT=S(),gT=wi();function ET(e,t,r){return r===void 0&&(r=1/0),bT.operate(function(n,i){var a=t;return gT.mergeInternals(n,i,function(o,s){return e(a,o,s)},r,function(o){a=o;},false,void 0,function(){return a=null})})}Da.mergeScan=ET;});var Ef=f(nt=>{var ST=nt&&nt.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},OT=nt&&nt.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(nt,"__esModule",{value:true});nt.merge=void 0;var wT=S(),AT=Ft(),TT=Xr(),gf=ae(),IT=Ce();function xT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=gf.popScheduler(e),n=gf.popNumber(e,1/0);return e=AT.argsOrArgArray(e),wT.operate(function(i,a){TT.mergeAll(n)(IT.from(OT([i],ST(e)),r)).subscribe(a);})}nt.merge=xT;});var Sf=f(it=>{var qT=it&&it.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},PT=it&&it.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(it,"__esModule",{value:true});it.mergeWith=void 0;var NT=Ef();function RT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return NT.merge.apply(void 0,PT([],qT(e)))}it.mergeWith=RT;});var Of=f(Ua=>{Object.defineProperty(Ua,"__esModule",{value:true});Ua.min=void 0;var CT=Tr(),MT=D();function kT(e){return CT.reduce(MT.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}Ua.min=kT;});var Ba=f(Va=>{Object.defineProperty(Va,"__esModule",{value:true});Va.multicast=void 0;var jT=Gr(),wf=D(),LT=ua();function FT(e,t){var r=wf.isFunction(e)?e:function(){return e};return wf.isFunction(t)?LT.connect(t,{connector:r}):function(n){return new jT.ConnectableObservable(n,r)}}Va.multicast=FT;});var Tf=f(we=>{var DT=we&&we.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},UT=we&&we.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(we,"__esModule",{value:true});we.onErrorResumeNext=we.onErrorResumeNextWith=void 0;var VT=Ft(),BT=su();function Af(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=VT.argsOrArgArray(e);return function(n){return BT.onErrorResumeNext.apply(void 0,UT([n],DT(r)))}}we.onErrorResumeNextWith=Af;we.onErrorResumeNext=Af;});var If=f(Ga=>{Object.defineProperty(Ga,"__esModule",{value:true});Ga.pairwise=void 0;var GT=S(),WT=I();function HT(){return GT.operate(function(e,t){var r,n=false;e.subscribe(WT.createOperatorSubscriber(t,function(i){var a=r;r=i,n&&t.next([a,i]),n=true;}));})}Ga.pairwise=HT;});var xf=f(Wa=>{Object.defineProperty(Wa,"__esModule",{value:true});Wa.pluck=void 0;var $T=$e();function zT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw new Error("list of properties cannot be empty.");return $T.map(function(n){for(var i=n,a=0;a<r;a++){var o=i?.[e[a]];if(typeof o<"u")i=o;else return}return i})}Wa.pluck=zT;});var qf=f(Ha=>{Object.defineProperty(Ha,"__esModule",{value:true});Ha.publish=void 0;var JT=J(),XT=Ba(),ZT=ua();function KT(e){return e?function(t){return ZT.connect(e)(t)}:function(t){return XT.multicast(new JT.Subject)(t)}}Ha.publish=KT;});var Pf=f($a=>{Object.defineProperty($a,"__esModule",{value:true});$a.publishBehavior=void 0;var YT=Ms(),QT=Gr();function e1(e){return function(t){var r=new YT.BehaviorSubject(e);return new QT.ConnectableObservable(t,function(){return r})}}$a.publishBehavior=e1;});var Nf=f(za=>{Object.defineProperty(za,"__esModule",{value:true});za.publishLast=void 0;var t1=Mn(),r1=Gr();function n1(){return function(e){var t=new t1.AsyncSubject;return new r1.ConnectableObservable(e,function(){return t})}}za.publishLast=n1;});var Cf=f(Ja=>{Object.defineProperty(Ja,"__esModule",{value:true});Ja.publishReplay=void 0;var i1=Cn(),a1=Ba(),Rf=D();function o1(e,t,r,n){r&&!Rf.isFunction(r)&&(n=r);var i=Rf.isFunction(r)?r:void 0;return function(a){return a1.multicast(new i1.ReplaySubject(e,t,n),i)(a)}}Ja.publishReplay=o1;});var Mf=f(at=>{var s1=at&&at.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},u1=at&&at.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(at,"__esModule",{value:true});at.raceWith=void 0;var c1=uu(),l1=S(),d1=z();function f1(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?l1.operate(function(r,n){c1.raceInit(u1([r],s1(e)))(n);}):d1.identity}at.raceWith=f1;});var jf=f(Xa=>{Object.defineProperty(Xa,"__esModule",{value:true});Xa.repeat=void 0;var v1=pe(),p1=S(),kf=I(),h1=C(),m1=Ze();function _1(e){var t,r=1/0,n;return e!=null&&(typeof e=="object"?(t=e.count,r=t===void 0?1/0:t,n=e.delay):r=e),r<=0?function(){return v1.EMPTY}:p1.operate(function(i,a){var o=0,s,l=function(){if(s?.unsubscribe(),s=null,n!=null){var d=typeof n=="number"?m1.timer(n):h1.innerFrom(n(o)),p=kf.createOperatorSubscriber(a,function(){p.unsubscribe(),u();});d.subscribe(p);}else u();},u=function(){var d=false;s=i.subscribe(kf.createOperatorSubscriber(a,void 0,function(){++o<r?s?l():d=true:a.complete();})),d&&l();};u();})}Xa.repeat=_1;});var Ff=f(Za=>{Object.defineProperty(Za,"__esModule",{value:true});Za.repeatWhen=void 0;var y1=C(),b1=J(),g1=S(),Lf=I();function E1(e){return g1.operate(function(t,r){var n,i=false,a,o=false,s=false,l=function(){return s&&o&&(r.complete(),true)},u=function(){return a||(a=new b1.Subject,y1.innerFrom(e(a)).subscribe(Lf.createOperatorSubscriber(r,function(){n?d():i=true;},function(){o=true,l();}))),a},d=function(){s=false,n=t.subscribe(Lf.createOperatorSubscriber(r,void 0,function(){s=true,!l()&&u().next();})),i&&(n.unsubscribe(),n=null,i=false,d());};d();})}Za.repeatWhen=E1;});var Uf=f(Ka=>{Object.defineProperty(Ka,"__esModule",{value:true});Ka.retry=void 0;var S1=S(),Df=I(),O1=z(),w1=Ze(),A1=C();function T1(e){e===void 0&&(e=1/0);var t;e&&typeof e=="object"?t=e:t={count:e};var r=t.count,n=r===void 0?1/0:r,i=t.delay,a=t.resetOnSuccess,o=a===void 0?false:a;return n<=0?O1.identity:S1.operate(function(s,l){var u=0,d,p=function(){var h=false;d=s.subscribe(Df.createOperatorSubscriber(l,function(m){o&&(u=0),l.next(m);},void 0,function(m){if(u++<n){var _=function(){d?(d.unsubscribe(),d=null,p()):h=true;};if(i!=null){var b=typeof i=="number"?w1.timer(i):A1.innerFrom(i(m,u)),O=Df.createOperatorSubscriber(l,function(){O.unsubscribe(),_();},function(){l.complete();});b.subscribe(O);}else _();}else l.error(m);})),h&&(d.unsubscribe(),d=null,p());};p();})}Ka.retry=T1;});var Bf=f(Ya=>{Object.defineProperty(Ya,"__esModule",{value:true});Ya.retryWhen=void 0;var I1=C(),x1=J(),q1=S(),Vf=I();function P1(e){return q1.operate(function(t,r){var n,i=false,a,o=function(){n=t.subscribe(Vf.createOperatorSubscriber(r,void 0,void 0,function(s){a||(a=new x1.Subject,I1.innerFrom(e(a)).subscribe(Vf.createOperatorSubscriber(r,function(){return n?o():i=true}))),a&&a.next(s);})),i&&(n.unsubscribe(),n=null,i=false,o());};o();})}Ya.retryWhen=P1;});var Tu=f(Qa=>{Object.defineProperty(Qa,"__esModule",{value:true});Qa.sample=void 0;var N1=C(),R1=S(),C1=$(),Gf=I();function M1(e){return R1.operate(function(t,r){var n=false,i=null;t.subscribe(Gf.createOperatorSubscriber(r,function(a){n=true,i=a;})),N1.innerFrom(e).subscribe(Gf.createOperatorSubscriber(r,function(){if(n){n=false;var a=i;i=null,r.next(a);}},C1.noop));})}Qa.sample=M1;});var Wf=f(eo=>{Object.defineProperty(eo,"__esModule",{value:true});eo.sampleTime=void 0;var k1=ie(),j1=Tu(),L1=au();function F1(e,t){return t===void 0&&(t=k1.asyncScheduler),j1.sample(L1.interval(e,t))}eo.sampleTime=F1;});var Hf=f(to=>{Object.defineProperty(to,"__esModule",{value:true});to.scan=void 0;var D1=S(),U1=fu();function V1(e,t){return D1.operate(U1.scanInternals(e,t,arguments.length>=2,true))}to.scan=V1;});var zf=f(ro=>{Object.defineProperty(ro,"__esModule",{value:true});ro.sequenceEqual=void 0;var B1=S(),G1=I(),W1=C();function H1(e,t){return t===void 0&&(t=function(r,n){return r===n}),B1.operate(function(r,n){var i=$f(),a=$f(),o=function(l){n.next(l),n.complete();},s=function(l,u){var d=G1.createOperatorSubscriber(n,function(p){var h=u.buffer,m=u.complete;h.length===0?m?o(false):l.buffer.push(p):!t(p,h.shift())&&o(false);},function(){l.complete=true;var p=u.complete,h=u.buffer;p&&o(h.length===0),d?.unsubscribe();});return d};r.subscribe(s(i,a)),W1.innerFrom(e).subscribe(s(a,i));})}ro.sequenceEqual=H1;function $f(){return {buffer:[],complete:false}}});var xu=f(ot=>{var $1=ot&&ot.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},z1=ot&&ot.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ot,"__esModule",{value:true});ot.share=void 0;var Jf=C(),J1=J(),Xf=Kt(),X1=S();function Z1(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new J1.Subject}:t,n=e.resetOnError,i=n===void 0?true:n,a=e.resetOnComplete,o=a===void 0?true:a,s=e.resetOnRefCountZero,l=s===void 0?true:s;return function(u){var d,p,h,m=0,_=false,b=false,O=function(){p?.unsubscribe(),p=void 0;},q=function(){O(),d=h=void 0,_=b=false;},U=function(){var Y=d;q(),Y?.unsubscribe();};return X1.operate(function(Y,je){m++,!b&&!_&&O();var dt=h=h??r();je.add(function(){m--,m===0&&!b&&!_&&(p=Iu(U,l));}),dt.subscribe(je),!d&&m>0&&(d=new Xf.SafeSubscriber({next:function(ft){return dt.next(ft)},error:function(ft){b=true,O(),p=Iu(q,i,ft),dt.error(ft);},complete:function(){_=true,O(),p=Iu(q,o),dt.complete();}}),Jf.innerFrom(Y).subscribe(d));})(u)}}ot.share=Z1;function Iu(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===true){e();return}if(t!==false){var i=new Xf.SafeSubscriber({next:function(){i.unsubscribe(),e();}});return Jf.innerFrom(t.apply(void 0,z1([],$1(r)))).subscribe(i)}}});var Zf=f(no=>{Object.defineProperty(no,"__esModule",{value:true});no.shareReplay=void 0;var K1=Cn(),Y1=xu();function Q1(e,t,r){var n,i,a,o,s=false;return e&&typeof e=="object"?(n=e.bufferSize,o=n===void 0?1/0:n,i=e.windowTime,t=i===void 0?1/0:i,a=e.refCount,s=a===void 0?false:a,r=e.scheduler):o=e??1/0,Y1.share({connector:function(){return new K1.ReplaySubject(o,t,r)},resetOnError:true,resetOnComplete:false,resetOnRefCountZero:s})}no.shareReplay=Q1;});var Kf=f(io=>{Object.defineProperty(io,"__esModule",{value:true});io.single=void 0;var eI=He(),tI=Qs(),rI=Ys(),nI=S(),iI=I();function aI(e){return nI.operate(function(t,r){var n=false,i,a=false,o=0;t.subscribe(iI.createOperatorSubscriber(r,function(s){a=true,(!e||e(s,o++,t))&&(n&&r.error(new tI.SequenceError("Too many matching values")),n=true,i=s);},function(){n?(r.next(i),r.complete()):r.error(a?new rI.NotFoundError("No matching values"):new eI.EmptyError);}));})}io.single=aI;});var Yf=f(ao=>{Object.defineProperty(ao,"__esModule",{value:true});ao.skip=void 0;var oI=Dt();function sI(e){return oI.filter(function(t,r){return e<=r})}ao.skip=sI;});var Qf=f(oo=>{Object.defineProperty(oo,"__esModule",{value:true});oo.skipLast=void 0;var uI=z(),cI=S(),lI=I();function dI(e){return e<=0?uI.identity:cI.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(lI.createOperatorSubscriber(r,function(a){var o=i++;if(o<e)n[o]=a;else {var s=o%e,l=n[s];n[s]=a,r.next(l);}})),function(){n=null;}})}oo.skipLast=dI;});var tv=f(so=>{Object.defineProperty(so,"__esModule",{value:true});so.skipUntil=void 0;var fI=S(),ev=I(),vI=C(),pI=$();function hI(e){return fI.operate(function(t,r){var n=false,i=ev.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=true;},pI.noop);vI.innerFrom(e).subscribe(i),t.subscribe(ev.createOperatorSubscriber(r,function(a){return n&&r.next(a)}));})}so.skipUntil=hI;});var rv=f(uo=>{Object.defineProperty(uo,"__esModule",{value:true});uo.skipWhile=void 0;var mI=S(),_I=I();function yI(e){return mI.operate(function(t,r){var n=false,i=0;t.subscribe(_I.createOperatorSubscriber(r,function(a){return (n||(n=!e(a,i++)))&&r.next(a)}));})}uo.skipWhile=yI;});var iv=f(co=>{Object.defineProperty(co,"__esModule",{value:true});co.startWith=void 0;var nv=Zr(),bI=ae(),gI=S();function EI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=bI.popScheduler(e);return gI.operate(function(n,i){(r?nv.concat(e,n,r):nv.concat(e,n)).subscribe(i);})}co.startWith=EI;});var tn=f(lo=>{Object.defineProperty(lo,"__esModule",{value:true});lo.switchMap=void 0;var SI=C(),OI=S(),av=I();function wI(e,t){return OI.operate(function(r,n){var i=null,a=0,o=false,s=function(){return o&&!i&&n.complete()};r.subscribe(av.createOperatorSubscriber(n,function(l){i?.unsubscribe();var u=0,d=a++;SI.innerFrom(e(l,d)).subscribe(i=av.createOperatorSubscriber(n,function(p){return n.next(t?t(l,p,d,u++):p)},function(){i=null,s();}));},function(){o=true,s();}));})}lo.switchMap=wI;});var ov=f(fo=>{Object.defineProperty(fo,"__esModule",{value:true});fo.switchAll=void 0;var AI=tn(),TI=z();function II(){return AI.switchMap(TI.identity)}fo.switchAll=II;});var uv=f(vo=>{Object.defineProperty(vo,"__esModule",{value:true});vo.switchMapTo=void 0;var sv=tn(),xI=D();function qI(e,t){return xI.isFunction(t)?sv.switchMap(function(){return e},t):sv.switchMap(function(){return e})}vo.switchMapTo=qI;});var cv=f(po=>{Object.defineProperty(po,"__esModule",{value:true});po.switchScan=void 0;var PI=tn(),NI=S();function RI(e,t){return NI.operate(function(r,n){var i=t;return PI.switchMap(function(a,o){return e(i,a,o)},function(a,o){return i=o,o})(r).subscribe(n),function(){i=null;}})}po.switchScan=RI;});var lv=f(ho=>{Object.defineProperty(ho,"__esModule",{value:true});ho.takeUntil=void 0;var CI=S(),MI=I(),kI=C(),jI=$();function LI(e){return CI.operate(function(t,r){kI.innerFrom(e).subscribe(MI.createOperatorSubscriber(r,function(){return r.complete()},jI.noop)),!r.closed&&t.subscribe(r);})}ho.takeUntil=LI;});var dv=f(mo=>{Object.defineProperty(mo,"__esModule",{value:true});mo.takeWhile=void 0;var FI=S(),DI=I();function UI(e,t){return t===void 0&&(t=false),FI.operate(function(r,n){var i=0;r.subscribe(DI.createOperatorSubscriber(n,function(a){var o=e(a,i++);(o||t)&&n.next(a),!o&&n.complete();}));})}mo.takeWhile=UI;});var fv=f(_o=>{Object.defineProperty(_o,"__esModule",{value:true});_o.tap=void 0;var VI=D(),BI=S(),GI=I(),WI=z();function HI(e,t,r){var n=VI.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?BI.operate(function(i,a){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var s=true;i.subscribe(GI.createOperatorSubscriber(a,function(l){var u;(u=n.next)===null||u===void 0||u.call(n,l),a.next(l);},function(){var l;s=false,(l=n.complete)===null||l===void 0||l.call(n),a.complete();},function(l){var u;s=false,(u=n.error)===null||u===void 0||u.call(n,l),a.error(l);},function(){var l,u;s&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(u=n.finalize)===null||u===void 0||u.call(n);}));}):WI.identity}_o.tap=HI;});var qu=f(yo=>{Object.defineProperty(yo,"__esModule",{value:true});yo.throttle=void 0;var $I=S(),vv=I(),zI=C();function JI(e,t){return $I.operate(function(r,n){var i=t??{},a=i.leading,o=a===void 0?true:a,s=i.trailing,l=s===void 0?false:s,u=false,d=null,p=null,h=false,m=function(){p?.unsubscribe(),p=null,l&&(O(),h&&n.complete());},_=function(){p=null,h&&n.complete();},b=function(q){return p=zI.innerFrom(e(q)).subscribe(vv.createOperatorSubscriber(n,m,_))},O=function(){if(u){u=false;var q=d;d=null,n.next(q),!h&&b(q);}};r.subscribe(vv.createOperatorSubscriber(n,function(q){u=true,d=q,!(p&&!p.closed)&&(o?O():b(q));},function(){h=true,!(l&&u&&p&&!p.closed)&&n.complete();}));})}yo.throttle=JI;});var pv=f(bo=>{Object.defineProperty(bo,"__esModule",{value:true});bo.throttleTime=void 0;var XI=ie(),ZI=qu(),KI=Ze();function YI(e,t,r){t===void 0&&(t=XI.asyncScheduler);var n=KI.timer(e,t);return ZI.throttle(function(){return n},r)}bo.throttleTime=YI;});var mv=f(qr=>{Object.defineProperty(qr,"__esModule",{value:true});qr.TimeInterval=qr.timeInterval=void 0;var QI=ie(),ex=S(),tx=I();function rx(e){return e===void 0&&(e=QI.asyncScheduler),ex.operate(function(t,r){var n=e.now();t.subscribe(tx.createOperatorSubscriber(r,function(i){var a=e.now(),o=a-n;n=a,r.next(new hv(i,o));}));})}qr.timeInterval=rx;var hv=function(){function e(t,r){this.value=t,this.interval=r;}return e}();qr.TimeInterval=hv;});var _v=f(go=>{Object.defineProperty(go,"__esModule",{value:true});go.timeoutWith=void 0;var nx=ie(),ix=hi(),ax=mi();function ox(e,t,r){var n,i,a;if(r=r??nx.async,ix.isValidDate(e)?n=e:typeof e=="number"&&(i=e),t)a=function(){return t};else throw new TypeError("No observable provided to switch to");if(n==null&&i==null)throw new TypeError("No timeout provided.");return ax.timeout({first:n,each:i,scheduler:r,with:a})}go.timeoutWith=ox;});var yv=f(Eo=>{Object.defineProperty(Eo,"__esModule",{value:true});Eo.timestamp=void 0;var sx=Rn(),ux=$e();function cx(e){return e===void 0&&(e=sx.dateTimestampProvider),ux.map(function(t){return {value:t,timestamp:e.now()}})}Eo.timestamp=cx;});var Ev=f(So=>{Object.defineProperty(So,"__esModule",{value:true});So.window=void 0;var bv=J(),lx=S(),gv=I(),dx=$(),fx=C();function vx(e){return lx.operate(function(t,r){var n=new bv.Subject;r.next(n.asObservable());var i=function(a){n.error(a),r.error(a);};return t.subscribe(gv.createOperatorSubscriber(r,function(a){return n?.next(a)},function(){n.complete(),r.complete();},i)),fx.innerFrom(e).subscribe(gv.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new bv.Subject);},dx.noop,i)),function(){n?.unsubscribe(),n=null;}})}So.window=vx;});var Ov=f(Pr=>{var px=Pr&&Pr.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Pr,"__esModule",{value:true});Pr.windowCount=void 0;var Sv=J(),hx=S(),mx=I();function _x(e,t){t===void 0&&(t=0);var r=t>0?t:e;return hx.operate(function(n,i){var a=[new Sv.Subject],s=0;i.next(a[0].asObservable()),n.subscribe(mx.createOperatorSubscriber(i,function(l){var u,d;try{for(var p=px(a),h=p.next();!h.done;h=p.next()){var m=h.value;m.next(l);}}catch(O){u={error:O};}finally{try{h&&!h.done&&(d=p.return)&&d.call(p);}finally{if(u)throw u.error}}var _=s-e+1;if(_>=0&&_%r===0&&a.shift().complete(),++s%r===0){var b=new Sv.Subject;a.push(b),i.next(b.asObservable());}},function(){for(;a.length>0;)a.shift().complete();i.complete();},function(l){for(;a.length>0;)a.shift().error(l);i.error(l);},function(){a=null;}));})}Pr.windowCount=_x;});var Av=f(Oo=>{Object.defineProperty(Oo,"__esModule",{value:true});Oo.windowTime=void 0;var yx=J(),bx=ie(),gx=oe(),Ex=S(),Sx=I(),Ox=Ne(),wx=ae(),wv=Re();function Ax(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var a=(t=wx.popScheduler(n))!==null&&t!==void 0?t:bx.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,s=n[1]||1/0;return Ex.operate(function(l,u){var d=[],p=false,h=function(O){var q=O.window,U=O.subs;q.complete(),U.unsubscribe(),Ox.arrRemove(d,O),p&&m();},m=function(){if(d){var O=new gx.Subscription;u.add(O);var q=new yx.Subject,U={window:q,subs:O,seen:0};d.push(U),u.next(q.asObservable()),wv.executeSchedule(O,a,function(){return h(U)},e);}};o!==null&&o>=0?wv.executeSchedule(u,a,m,o,true):p=true,m();var _=function(O){return d.slice().forEach(O)},b=function(O){_(function(q){var U=q.window;return O(U)}),O(u),u.unsubscribe();};return l.subscribe(Sx.createOperatorSubscriber(u,function(O){_(function(q){q.window.next(O),s<=++q.seen&&h(q);});},function(){return b(function(O){return O.complete()})},function(O){return b(function(q){return q.error(O)})})),function(){d=null;}})}Oo.windowTime=Ax;});var xv=f(Nr=>{var Tx=Nr&&Nr.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Nr,"__esModule",{value:true});Nr.windowToggle=void 0;var Ix=J(),xx=oe(),qx=S(),Tv=C(),Pu=I(),Iv=$(),Px=Ne();function Nx(e,t){return qx.operate(function(r,n){var i=[],a=function(o){for(;0<i.length;)i.shift().error(o);n.error(o);};Tv.innerFrom(e).subscribe(Pu.createOperatorSubscriber(n,function(o){var s=new Ix.Subject;i.push(s);var l=new xx.Subscription,u=function(){Px.arrRemove(i,s),s.complete(),l.unsubscribe();},d;try{d=Tv.innerFrom(t(o));}catch(p){a(p);return}n.next(s.asObservable()),l.add(d.subscribe(Pu.createOperatorSubscriber(n,u,Iv.noop,a)));},Iv.noop)),r.subscribe(Pu.createOperatorSubscriber(n,function(o){var s,l,u=i.slice();try{for(var d=Tx(u),p=d.next();!p.done;p=d.next()){var h=p.value;h.next(o);}}catch(m){s={error:m};}finally{try{p&&!p.done&&(l=d.return)&&l.call(d);}finally{if(s)throw s.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete();},a,function(){for(;0<i.length;)i.shift().unsubscribe();}));})}Nr.windowToggle=Nx;});var Pv=f(wo=>{Object.defineProperty(wo,"__esModule",{value:true});wo.windowWhen=void 0;var Rx=J(),Cx=S(),qv=I(),Mx=C();function kx(e){return Cx.operate(function(t,r){var n,i,a=function(s){n.error(s),r.error(s);},o=function(){i?.unsubscribe(),n?.complete(),n=new Rx.Subject,r.next(n.asObservable());var s;try{s=Mx.innerFrom(e());}catch(l){a(l);return}s.subscribe(i=qv.createOperatorSubscriber(r,o,o,a));};o(),t.subscribe(qv.createOperatorSubscriber(r,function(s){return n.next(s)},function(){n.complete(),r.complete();},a,function(){i?.unsubscribe(),n=null;}));})}wo.windowWhen=kx;});var Mv=f(st=>{var Nv=st&&st.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},Rv=st&&st.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(st,"__esModule",{value:true});st.withLatestFrom=void 0;var jx=S(),Cv=I(),Lx=C(),Fx=z(),Dx=$(),Ux=ae();function Vx(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ux.popResultSelector(e);return jx.operate(function(n,i){for(var a=e.length,o=new Array(a),s=e.map(function(){return false}),l=false,u=function(p){Lx.innerFrom(e[p]).subscribe(Cv.createOperatorSubscriber(i,function(h){o[p]=h,!l&&!s[p]&&(s[p]=true,(l=s.every(Fx.identity))&&(s=null));},Dx.noop));},d=0;d<a;d++)u(d);n.subscribe(Cv.createOperatorSubscriber(i,function(p){if(l){var h=Rv([p],Nv(o));i.next(r?r.apply(void 0,Rv([],Nv(h))):h);}}));})}st.withLatestFrom=Vx;});var kv=f(Ao=>{Object.defineProperty(Ao,"__esModule",{value:true});Ao.zipAll=void 0;var Bx=$i(),Gx=pu();function Wx(e){return Gx.joinAllInternals(Bx.zip,e)}Ao.zipAll=Wx;});var jv=f(ut=>{var Hx=ut&&ut.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},$x=ut&&ut.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ut,"__esModule",{value:true});ut.zip=void 0;var zx=$i(),Jx=S();function Xx(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Jx.operate(function(r,n){zx.zip.apply(void 0,$x([r],Hx(e))).subscribe(n);})}ut.zip=Xx;});var Lv=f(ct=>{var Zx=ct&&ct.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value);}catch(s){o={error:s};}finally{try{i&&!i.done&&(r=n.return)&&r.call(n);}finally{if(o)throw o.error}}return a},Kx=ct&&ct.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ct,"__esModule",{value:true});ct.zipWith=void 0;var Yx=jv();function Qx(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Yx.zip.apply(void 0,Kx([],Zx(e)))}ct.zipWith=Qx;});var Wv=f(c=>{var eq=c&&c.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),tq=c&&c.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&eq(t,e,r);};Object.defineProperty(c,"__esModule",{value:true});c.interval=c.iif=c.generate=c.fromEventPattern=c.fromEvent=c.from=c.forkJoin=c.empty=c.defer=c.connectable=c.concat=c.combineLatest=c.bindNodeCallback=c.bindCallback=c.UnsubscriptionError=c.TimeoutError=c.SequenceError=c.ObjectUnsubscribedError=c.NotFoundError=c.EmptyError=c.ArgumentOutOfRangeError=c.firstValueFrom=c.lastValueFrom=c.isObservable=c.identity=c.noop=c.pipe=c.NotificationKind=c.Notification=c.Subscriber=c.Subscription=c.Scheduler=c.VirtualAction=c.VirtualTimeScheduler=c.animationFrameScheduler=c.animationFrame=c.queueScheduler=c.queue=c.asyncScheduler=c.async=c.asapScheduler=c.asap=c.AsyncSubject=c.ReplaySubject=c.BehaviorSubject=c.Subject=c.animationFrames=c.observable=c.ConnectableObservable=c.Observable=void 0;c.filter=c.expand=c.exhaustMap=c.exhaustAll=c.exhaust=c.every=c.endWith=c.elementAt=c.distinctUntilKeyChanged=c.distinctUntilChanged=c.distinct=c.dematerialize=c.delayWhen=c.delay=c.defaultIfEmpty=c.debounceTime=c.debounce=c.count=c.connect=c.concatWith=c.concatMapTo=c.concatMap=c.concatAll=c.combineLatestWith=c.combineLatestAll=c.combineAll=c.catchError=c.bufferWhen=c.bufferToggle=c.bufferTime=c.bufferCount=c.buffer=c.auditTime=c.audit=c.config=c.NEVER=c.EMPTY=c.scheduled=c.zip=c.using=c.timer=c.throwError=c.range=c.race=c.partition=c.pairs=c.onErrorResumeNext=c.of=c.never=c.merge=void 0;c.switchMap=c.switchAll=c.subscribeOn=c.startWith=c.skipWhile=c.skipUntil=c.skipLast=c.skip=c.single=c.shareReplay=c.share=c.sequenceEqual=c.scan=c.sampleTime=c.sample=c.refCount=c.retryWhen=c.retry=c.repeatWhen=c.repeat=c.reduce=c.raceWith=c.publishReplay=c.publishLast=c.publishBehavior=c.publish=c.pluck=c.pairwise=c.onErrorResumeNextWith=c.observeOn=c.multicast=c.min=c.mergeWith=c.mergeScan=c.mergeMapTo=c.mergeMap=c.flatMap=c.mergeAll=c.max=c.materialize=c.mapTo=c.map=c.last=c.isEmpty=c.ignoreElements=c.groupBy=c.first=c.findIndex=c.find=c.finalize=void 0;c.zipWith=c.zipAll=c.withLatestFrom=c.windowWhen=c.windowToggle=c.windowTime=c.windowCount=c.window=c.toArray=c.timestamp=c.timeoutWith=c.timeout=c.timeInterval=c.throwIfEmpty=c.throttleTime=c.throttle=c.tap=c.takeWhile=c.takeUntil=c.takeLast=c.take=c.switchScan=c.switchMapTo=void 0;var rq=V();Object.defineProperty(c,"Observable",{enumerable:true,get:function(){return rq.Observable}});var nq=Gr();Object.defineProperty(c,"ConnectableObservable",{enumerable:true,get:function(){return nq.ConnectableObservable}});var iq=Vr();Object.defineProperty(c,"observable",{enumerable:true,get:function(){return iq.observable}});var aq=Vc();Object.defineProperty(c,"animationFrames",{enumerable:true,get:function(){return aq.animationFrames}});var oq=J();Object.defineProperty(c,"Subject",{enumerable:true,get:function(){return oq.Subject}});var sq=Ms();Object.defineProperty(c,"BehaviorSubject",{enumerable:true,get:function(){return sq.BehaviorSubject}});var uq=Cn();Object.defineProperty(c,"ReplaySubject",{enumerable:true,get:function(){return uq.ReplaySubject}});var cq=Mn();Object.defineProperty(c,"AsyncSubject",{enumerable:true,get:function(){return cq.AsyncSubject}});var Fv=il();Object.defineProperty(c,"asap",{enumerable:true,get:function(){return Fv.asap}});Object.defineProperty(c,"asapScheduler",{enumerable:true,get:function(){return Fv.asapScheduler}});var Dv=ie();Object.defineProperty(c,"async",{enumerable:true,get:function(){return Dv.async}});Object.defineProperty(c,"asyncScheduler",{enumerable:true,get:function(){return Dv.asyncScheduler}});var Uv=sl();Object.defineProperty(c,"queue",{enumerable:true,get:function(){return Uv.queue}});Object.defineProperty(c,"queueScheduler",{enumerable:true,get:function(){return Uv.queueScheduler}});var Vv=dl();Object.defineProperty(c,"animationFrame",{enumerable:true,get:function(){return Vv.animationFrame}});Object.defineProperty(c,"animationFrameScheduler",{enumerable:true,get:function(){return Vv.animationFrameScheduler}});var Bv=pl();Object.defineProperty(c,"VirtualTimeScheduler",{enumerable:true,get:function(){return Bv.VirtualTimeScheduler}});Object.defineProperty(c,"VirtualAction",{enumerable:true,get:function(){return Bv.VirtualAction}});var lq=js();Object.defineProperty(c,"Scheduler",{enumerable:true,get:function(){return lq.Scheduler}});var dq=oe();Object.defineProperty(c,"Subscription",{enumerable:true,get:function(){return dq.Subscription}});var fq=Kt();Object.defineProperty(c,"Subscriber",{enumerable:true,get:function(){return fq.Subscriber}});var Gv=oi();Object.defineProperty(c,"Notification",{enumerable:true,get:function(){return Gv.Notification}});Object.defineProperty(c,"NotificationKind",{enumerable:true,get:function(){return Gv.NotificationKind}});var vq=Br();Object.defineProperty(c,"pipe",{enumerable:true,get:function(){return vq.pipe}});var pq=$();Object.defineProperty(c,"noop",{enumerable:true,get:function(){return pq.noop}});var hq=z();Object.defineProperty(c,"identity",{enumerable:true,get:function(){return hq.identity}});var mq=Nl();Object.defineProperty(c,"isObservable",{enumerable:true,get:function(){return mq.isObservable}});var _q=Rl();Object.defineProperty(c,"lastValueFrom",{enumerable:true,get:function(){return _q.lastValueFrom}});var yq=Cl();Object.defineProperty(c,"firstValueFrom",{enumerable:true,get:function(){return yq.firstValueFrom}});var bq=Ks();Object.defineProperty(c,"ArgumentOutOfRangeError",{enumerable:true,get:function(){return bq.ArgumentOutOfRangeError}});var gq=He();Object.defineProperty(c,"EmptyError",{enumerable:true,get:function(){return gq.EmptyError}});var Eq=Ys();Object.defineProperty(c,"NotFoundError",{enumerable:true,get:function(){return Eq.NotFoundError}});var Sq=Ps();Object.defineProperty(c,"ObjectUnsubscribedError",{enumerable:true,get:function(){return Sq.ObjectUnsubscribedError}});var Oq=Qs();Object.defineProperty(c,"SequenceError",{enumerable:true,get:function(){return Oq.SequenceError}});var wq=mi();Object.defineProperty(c,"TimeoutError",{enumerable:true,get:function(){return wq.TimeoutError}});var Aq=_s();Object.defineProperty(c,"UnsubscriptionError",{enumerable:true,get:function(){return Aq.UnsubscriptionError}});var Tq=kl();Object.defineProperty(c,"bindCallback",{enumerable:true,get:function(){return Tq.bindCallback}});var Iq=jl();Object.defineProperty(c,"bindNodeCallback",{enumerable:true,get:function(){return Iq.bindNodeCallback}});var xq=Si();Object.defineProperty(c,"combineLatest",{enumerable:true,get:function(){return xq.combineLatest}});var qq=Zr();Object.defineProperty(c,"concat",{enumerable:true,get:function(){return qq.concat}});var Pq=Wl();Object.defineProperty(c,"connectable",{enumerable:true,get:function(){return Pq.connectable}});var Nq=Kr();Object.defineProperty(c,"defer",{enumerable:true,get:function(){return Nq.defer}});var Rq=pe();Object.defineProperty(c,"empty",{enumerable:true,get:function(){return Rq.empty}});var Cq=Hl();Object.defineProperty(c,"forkJoin",{enumerable:true,get:function(){return Cq.forkJoin}});var Mq=Ce();Object.defineProperty(c,"from",{enumerable:true,get:function(){return Mq.from}});var kq=zl();Object.defineProperty(c,"fromEvent",{enumerable:true,get:function(){return kq.fromEvent}});var jq=Xl();Object.defineProperty(c,"fromEventPattern",{enumerable:true,get:function(){return jq.fromEventPattern}});var Lq=Kl();Object.defineProperty(c,"generate",{enumerable:true,get:function(){return Lq.generate}});var Fq=Yl();Object.defineProperty(c,"iif",{enumerable:true,get:function(){return Fq.iif}});var Dq=au();Object.defineProperty(c,"interval",{enumerable:true,get:function(){return Dq.interval}});var Uq=ed();Object.defineProperty(c,"merge",{enumerable:true,get:function(){return Uq.merge}});var Vq=ou();Object.defineProperty(c,"never",{enumerable:true,get:function(){return Vq.never}});var Bq=ii();Object.defineProperty(c,"of",{enumerable:true,get:function(){return Bq.of}});var Gq=su();Object.defineProperty(c,"onErrorResumeNext",{enumerable:true,get:function(){return Gq.onErrorResumeNext}});var Wq=rd();Object.defineProperty(c,"pairs",{enumerable:true,get:function(){return Wq.pairs}});var Hq=od();Object.defineProperty(c,"partition",{enumerable:true,get:function(){return Hq.partition}});var $q=uu();Object.defineProperty(c,"race",{enumerable:true,get:function(){return $q.race}});var zq=cd();Object.defineProperty(c,"range",{enumerable:true,get:function(){return zq.range}});var Jq=Zs();Object.defineProperty(c,"throwError",{enumerable:true,get:function(){return Jq.throwError}});var Xq=Ze();Object.defineProperty(c,"timer",{enumerable:true,get:function(){return Xq.timer}});var Zq=ld();Object.defineProperty(c,"using",{enumerable:true,get:function(){return Zq.using}});var Kq=$i();Object.defineProperty(c,"zip",{enumerable:true,get:function(){return Kq.zip}});var Yq=Xs();Object.defineProperty(c,"scheduled",{enumerable:true,get:function(){return Yq.scheduled}});var Qq=pe();Object.defineProperty(c,"EMPTY",{enumerable:true,get:function(){return Qq.EMPTY}});var eP=ou();Object.defineProperty(c,"NEVER",{enumerable:true,get:function(){return eP.NEVER}});tq(fd(),c);var tP=Xt();Object.defineProperty(c,"config",{enumerable:true,get:function(){return tP.config}});var rP=cu();Object.defineProperty(c,"audit",{enumerable:true,get:function(){return rP.audit}});var nP=pd();Object.defineProperty(c,"auditTime",{enumerable:true,get:function(){return nP.auditTime}});var iP=md();Object.defineProperty(c,"buffer",{enumerable:true,get:function(){return iP.buffer}});var aP=_d();Object.defineProperty(c,"bufferCount",{enumerable:true,get:function(){return aP.bufferCount}});var oP=bd();Object.defineProperty(c,"bufferTime",{enumerable:true,get:function(){return oP.bufferTime}});var sP=Sd();Object.defineProperty(c,"bufferToggle",{enumerable:true,get:function(){return sP.bufferToggle}});var uP=wd();Object.defineProperty(c,"bufferWhen",{enumerable:true,get:function(){return uP.bufferWhen}});var cP=Td();Object.defineProperty(c,"catchError",{enumerable:true,get:function(){return cP.catchError}});var lP=Id();Object.defineProperty(c,"combineAll",{enumerable:true,get:function(){return lP.combineAll}});var dP=hu();Object.defineProperty(c,"combineLatestAll",{enumerable:true,get:function(){return dP.combineLatestAll}});var fP=Rd();Object.defineProperty(c,"combineLatestWith",{enumerable:true,get:function(){return fP.combineLatestWith}});var vP=xi();Object.defineProperty(c,"concatAll",{enumerable:true,get:function(){return vP.concatAll}});var pP=mu();Object.defineProperty(c,"concatMap",{enumerable:true,get:function(){return pP.concatMap}});var hP=kd();Object.defineProperty(c,"concatMapTo",{enumerable:true,get:function(){return hP.concatMapTo}});var mP=Ld();Object.defineProperty(c,"concatWith",{enumerable:true,get:function(){return mP.concatWith}});var _P=ua();Object.defineProperty(c,"connect",{enumerable:true,get:function(){return _P.connect}});var yP=Dd();Object.defineProperty(c,"count",{enumerable:true,get:function(){return yP.count}});var bP=Vd();Object.defineProperty(c,"debounce",{enumerable:true,get:function(){return bP.debounce}});var gP=Bd();Object.defineProperty(c,"debounceTime",{enumerable:true,get:function(){return gP.debounceTime}});var EP=Yr();Object.defineProperty(c,"defaultIfEmpty",{enumerable:true,get:function(){return EP.defaultIfEmpty}});var SP=Hd();Object.defineProperty(c,"delay",{enumerable:true,get:function(){return SP.delay}});var OP=bu();Object.defineProperty(c,"delayWhen",{enumerable:true,get:function(){return OP.delayWhen}});var wP=$d();Object.defineProperty(c,"dematerialize",{enumerable:true,get:function(){return wP.dematerialize}});var AP=Jd();Object.defineProperty(c,"distinct",{enumerable:true,get:function(){return AP.distinct}});var TP=gu();Object.defineProperty(c,"distinctUntilChanged",{enumerable:true,get:function(){return TP.distinctUntilChanged}});var IP=Xd();Object.defineProperty(c,"distinctUntilKeyChanged",{enumerable:true,get:function(){return IP.distinctUntilKeyChanged}});var xP=Kd();Object.defineProperty(c,"elementAt",{enumerable:true,get:function(){return xP.elementAt}});var qP=Yd();Object.defineProperty(c,"endWith",{enumerable:true,get:function(){return qP.endWith}});var PP=Qd();Object.defineProperty(c,"every",{enumerable:true,get:function(){return PP.every}});var NP=nf();Object.defineProperty(c,"exhaust",{enumerable:true,get:function(){return NP.exhaust}});var RP=Su();Object.defineProperty(c,"exhaustAll",{enumerable:true,get:function(){return RP.exhaustAll}});var CP=Eu();Object.defineProperty(c,"exhaustMap",{enumerable:true,get:function(){return CP.exhaustMap}});var MP=af();Object.defineProperty(c,"expand",{enumerable:true,get:function(){return MP.expand}});var kP=Dt();Object.defineProperty(c,"filter",{enumerable:true,get:function(){return kP.filter}});var jP=of();Object.defineProperty(c,"finalize",{enumerable:true,get:function(){return jP.finalize}});var LP=Ou();Object.defineProperty(c,"find",{enumerable:true,get:function(){return LP.find}});var FP=uf();Object.defineProperty(c,"findIndex",{enumerable:true,get:function(){return FP.findIndex}});var DP=cf();Object.defineProperty(c,"first",{enumerable:true,get:function(){return DP.first}});var UP=df();Object.defineProperty(c,"groupBy",{enumerable:true,get:function(){return UP.groupBy}});var VP=_u();Object.defineProperty(c,"ignoreElements",{enumerable:true,get:function(){return VP.ignoreElements}});var BP=ff();Object.defineProperty(c,"isEmpty",{enumerable:true,get:function(){return BP.isEmpty}});var GP=vf();Object.defineProperty(c,"last",{enumerable:true,get:function(){return GP.last}});var WP=$e();Object.defineProperty(c,"map",{enumerable:true,get:function(){return WP.map}});var HP=yu();Object.defineProperty(c,"mapTo",{enumerable:true,get:function(){return HP.mapTo}});var $P=pf();Object.defineProperty(c,"materialize",{enumerable:true,get:function(){return $P.materialize}});var zP=hf();Object.defineProperty(c,"max",{enumerable:true,get:function(){return zP.max}});var JP=Xr();Object.defineProperty(c,"mergeAll",{enumerable:true,get:function(){return JP.mergeAll}});var XP=mf();Object.defineProperty(c,"flatMap",{enumerable:true,get:function(){return XP.flatMap}});var ZP=ke();Object.defineProperty(c,"mergeMap",{enumerable:true,get:function(){return ZP.mergeMap}});var KP=yf();Object.defineProperty(c,"mergeMapTo",{enumerable:true,get:function(){return KP.mergeMapTo}});var YP=bf();Object.defineProperty(c,"mergeScan",{enumerable:true,get:function(){return YP.mergeScan}});var QP=Sf();Object.defineProperty(c,"mergeWith",{enumerable:true,get:function(){return QP.mergeWith}});var eN=Of();Object.defineProperty(c,"min",{enumerable:true,get:function(){return eN.min}});var tN=Ba();Object.defineProperty(c,"multicast",{enumerable:true,get:function(){return tN.multicast}});var rN=zr();Object.defineProperty(c,"observeOn",{enumerable:true,get:function(){return rN.observeOn}});var nN=Tf();Object.defineProperty(c,"onErrorResumeNextWith",{enumerable:true,get:function(){return nN.onErrorResumeNextWith}});var iN=If();Object.defineProperty(c,"pairwise",{enumerable:true,get:function(){return iN.pairwise}});var aN=xf();Object.defineProperty(c,"pluck",{enumerable:true,get:function(){return aN.pluck}});var oN=qf();Object.defineProperty(c,"publish",{enumerable:true,get:function(){return oN.publish}});var sN=Pf();Object.defineProperty(c,"publishBehavior",{enumerable:true,get:function(){return sN.publishBehavior}});var uN=Nf();Object.defineProperty(c,"publishLast",{enumerable:true,get:function(){return uN.publishLast}});var cN=Cf();Object.defineProperty(c,"publishReplay",{enumerable:true,get:function(){return cN.publishReplay}});var lN=Mf();Object.defineProperty(c,"raceWith",{enumerable:true,get:function(){return lN.raceWith}});var dN=Tr();Object.defineProperty(c,"reduce",{enumerable:true,get:function(){return dN.reduce}});var fN=jf();Object.defineProperty(c,"repeat",{enumerable:true,get:function(){return fN.repeat}});var vN=Ff();Object.defineProperty(c,"repeatWhen",{enumerable:true,get:function(){return vN.repeatWhen}});var pN=Uf();Object.defineProperty(c,"retry",{enumerable:true,get:function(){return pN.retry}});var hN=Bf();Object.defineProperty(c,"retryWhen",{enumerable:true,get:function(){return hN.retryWhen}});var mN=xs();Object.defineProperty(c,"refCount",{enumerable:true,get:function(){return mN.refCount}});var _N=Tu();Object.defineProperty(c,"sample",{enumerable:true,get:function(){return _N.sample}});var yN=Wf();Object.defineProperty(c,"sampleTime",{enumerable:true,get:function(){return yN.sampleTime}});var bN=Hf();Object.defineProperty(c,"scan",{enumerable:true,get:function(){return bN.scan}});var gN=zf();Object.defineProperty(c,"sequenceEqual",{enumerable:true,get:function(){return gN.sequenceEqual}});var EN=xu();Object.defineProperty(c,"share",{enumerable:true,get:function(){return EN.share}});var SN=Zf();Object.defineProperty(c,"shareReplay",{enumerable:true,get:function(){return SN.shareReplay}});var ON=Kf();Object.defineProperty(c,"single",{enumerable:true,get:function(){return ON.single}});var wN=Yf();Object.defineProperty(c,"skip",{enumerable:true,get:function(){return wN.skip}});var AN=Qf();Object.defineProperty(c,"skipLast",{enumerable:true,get:function(){return AN.skipLast}});var TN=tv();Object.defineProperty(c,"skipUntil",{enumerable:true,get:function(){return TN.skipUntil}});var IN=rv();Object.defineProperty(c,"skipWhile",{enumerable:true,get:function(){return IN.skipWhile}});var xN=iv();Object.defineProperty(c,"startWith",{enumerable:true,get:function(){return xN.startWith}});var qN=Jr();Object.defineProperty(c,"subscribeOn",{enumerable:true,get:function(){return qN.subscribeOn}});var PN=ov();Object.defineProperty(c,"switchAll",{enumerable:true,get:function(){return PN.switchAll}});var NN=tn();Object.defineProperty(c,"switchMap",{enumerable:true,get:function(){return NN.switchMap}});var RN=uv();Object.defineProperty(c,"switchMapTo",{enumerable:true,get:function(){return RN.switchMapTo}});var CN=cv();Object.defineProperty(c,"switchScan",{enumerable:true,get:function(){return CN.switchScan}});var MN=Qr();Object.defineProperty(c,"take",{enumerable:true,get:function(){return MN.take}});var kN=wu();Object.defineProperty(c,"takeLast",{enumerable:true,get:function(){return kN.takeLast}});var jN=lv();Object.defineProperty(c,"takeUntil",{enumerable:true,get:function(){return jN.takeUntil}});var LN=dv();Object.defineProperty(c,"takeWhile",{enumerable:true,get:function(){return LN.takeWhile}});var FN=fv();Object.defineProperty(c,"tap",{enumerable:true,get:function(){return FN.tap}});var DN=qu();Object.defineProperty(c,"throttle",{enumerable:true,get:function(){return DN.throttle}});var UN=pv();Object.defineProperty(c,"throttleTime",{enumerable:true,get:function(){return UN.throttleTime}});var VN=en();Object.defineProperty(c,"throwIfEmpty",{enumerable:true,get:function(){return VN.throwIfEmpty}});var BN=mv();Object.defineProperty(c,"timeInterval",{enumerable:true,get:function(){return BN.timeInterval}});var GN=mi();Object.defineProperty(c,"timeout",{enumerable:true,get:function(){return GN.timeout}});var WN=_v();Object.defineProperty(c,"timeoutWith",{enumerable:true,get:function(){return WN.timeoutWith}});var HN=yv();Object.defineProperty(c,"timestamp",{enumerable:true,get:function(){return HN.timestamp}});var $N=vu();Object.defineProperty(c,"toArray",{enumerable:true,get:function(){return $N.toArray}});var zN=Ev();Object.defineProperty(c,"window",{enumerable:true,get:function(){return zN.window}});var JN=Ov();Object.defineProperty(c,"windowCount",{enumerable:true,get:function(){return JN.windowCount}});var XN=Av();Object.defineProperty(c,"windowTime",{enumerable:true,get:function(){return XN.windowTime}});var ZN=xv();Object.defineProperty(c,"windowToggle",{enumerable:true,get:function(){return ZN.windowToggle}});var KN=Pv();Object.defineProperty(c,"windowWhen",{enumerable:true,get:function(){return KN.windowWhen}});var YN=Mv();Object.defineProperty(c,"withLatestFrom",{enumerable:true,get:function(){return YN.withLatestFrom}});var QN=kv();Object.defineProperty(c,"zipAll",{enumerable:true,get:function(){return QN.zipAll}});var eR=Lv();Object.defineProperty(c,"zipWith",{enumerable:true,get:function(){return eR.zipWith}});});var Ku=f(T=>{Object.defineProperty(T,"__esModule",{value:true});T.Allow=T.ALL=T.COLLECTION=T.ATOM=T.SPECIAL=T.INF=T._INFINITY=T.INFINITY=T.NAN=T.BOOL=T.NULL=T.OBJ=T.ARR=T.NUM=T.STR=void 0;T.STR=1;T.NUM=2;T.ARR=4;T.OBJ=8;T.NULL=16;T.BOOL=32;T.NAN=64;T.INFINITY=128;T._INFINITY=256;T.INF=T.INFINITY|T._INFINITY;T.SPECIAL=T.NULL|T.BOOL|T.INF|T.NAN;T.ATOM=T.STR|T.NUM|T.SPECIAL;T.COLLECTION=T.ARR|T.OBJ;T.ALL=T.ATOM|T.COLLECTION;T.Allow={STR:T.STR,NUM:T.NUM,ARR:T.ARR,OBJ:T.OBJ,NULL:T.NULL,BOOL:T.BOOL,NAN:T.NAN,INFINITY:T.INFINITY,_INFINITY:T._INFINITY,INF:T.INF,SPECIAL:T.SPECIAL,ATOM:T.ATOM,COLLECTION:T.COLLECTION,ALL:T.ALL};T.default=T.Allow;});var Mp=f(K=>{var FR=K&&K.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:true,get:function(){return t[r]}}),Object.defineProperty(e,n,i);}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),DR=K&&K.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&FR(t,e,r);};Object.defineProperty(K,"__esModule",{value:true});K.Allow=K.MalformedJSON=K.PartialJSON=K.parseJSON=K.parse=void 0;var ee=Ku();Object.defineProperty(K,"Allow",{enumerable:true,get:function(){return ee.Allow}});DR(Ku(),K);var as=class extends Error{};K.PartialJSON=as;var os=class extends Error{};K.MalformedJSON=os;function Cp(e,t=ee.Allow.ALL){if(typeof e!="string")throw new TypeError(`expecting str, got ${typeof e}`);if(!e.trim())throw new Error(`${e} is empty`);return UR(e.trim(),t)}K.parseJSON=Cp;var UR=(e,t)=>{let r=e.length,n=0,i=h=>{throw new as(`${h} at position ${n}`)},a=h=>{throw new os(`${h} at position ${n}`)},o=()=>(p(),n>=r&&i("Unexpected end of input"),e[n]==='"'?s():e[n]==="{"?l():e[n]==="["?u():e.substring(n,n+4)==="null"||ee.Allow.NULL&t&&r-n<4&&"null".startsWith(e.substring(n))?(n+=4,null):e.substring(n,n+4)==="true"||ee.Allow.BOOL&t&&r-n<4&&"true".startsWith(e.substring(n))?(n+=4,true):e.substring(n,n+5)==="false"||ee.Allow.BOOL&t&&r-n<5&&"false".startsWith(e.substring(n))?(n+=5,false):e.substring(n,n+8)==="Infinity"||ee.Allow.INFINITY&t&&r-n<8&&"Infinity".startsWith(e.substring(n))?(n+=8,1/0):e.substring(n,n+9)==="-Infinity"||ee.Allow._INFINITY&t&&1<r-n&&r-n<9&&"-Infinity".startsWith(e.substring(n))?(n+=9,-1/0):e.substring(n,n+3)==="NaN"||ee.Allow.NAN&t&&r-n<3&&"NaN".startsWith(e.substring(n))?(n+=3,NaN):d()),s=()=>{let h=n,m=false;for(n++;n<r&&(e[n]!=='"'||m&&e[n-1]==="\\");)m=e[n]==="\\"?!m:false,n++;if(e.charAt(n)=='"')try{return JSON.parse(e.substring(h,++n-Number(m)))}catch(_){a(String(_));}else if(ee.Allow.STR&t)try{return JSON.parse(e.substring(h,n-Number(m))+'"')}catch{return JSON.parse(e.substring(h,e.lastIndexOf("\\"))+'"')}i("Unterminated string literal");},l=()=>{n++,p();let h={};try{for(;e[n]!=="}";){if(p(),n>=r&&ee.Allow.OBJ&t)return h;let m=s();p(),n++;try{let _=o();h[m]=_;}catch(_){if(ee.Allow.OBJ&t)return h;throw _}p(),e[n]===","&&n++;}}catch{if(ee.Allow.OBJ&t)return h;i("Expected '}' at end of object");}return n++,h},u=()=>{n++;let h=[];try{for(;e[n]!=="]";)h.push(o()),p(),e[n]===","&&n++;}catch{if(ee.Allow.ARR&t)return h;i("Expected ']' at end of array");}return n++,h},d=()=>{if(n===0){e==="-"&&a("Not sure what '-' is");try{return JSON.parse(e)}catch(m){if(ee.Allow.NUM&t)try{return JSON.parse(e.substring(0,e.lastIndexOf("e")))}catch{}a(String(m));}}let h=n;for(e[n]==="-"&&n++;e[n]&&",]}".indexOf(e[n])===-1;)n++;n==r&&!(ee.Allow.NUM&t)&&i("Unterminated number literal");try{return JSON.parse(e.substring(h,n))}catch{e.substring(h,n)==="-"&&i("Not sure what '-' is");try{return JSON.parse(e.substring(h,e.lastIndexOf("e")))}catch(_){a(String(_));}}},p=()=>{for(;n<r&&`
|
|
4
|
+
\r `.includes(e[n]);)n++;};return o()},VR=Cp;K.parse=VR;});var cn=class{};var v={};vs(v,{BRAND:()=>gh,DIRTY:()=>vt,EMPTY_PATH:()=>Yp,INVALID:()=>P,NEVER:()=>im,OK:()=>Q,ParseStatus:()=>H,Schema:()=>M,ZodAny:()=>De,ZodArray:()=>Pe,ZodBigInt:()=>ht,ZodBoolean:()=>mt,ZodBranded:()=>Lr,ZodCatch:()=>It,ZodDate:()=>_t,ZodDefault:()=>Tt,ZodDiscriminatedUnion:()=>fn,ZodEffects:()=>ce,ZodEnum:()=>wt,ZodError:()=>te,ZodFirstPartyTypeKind:()=>N,ZodFunction:()=>pn,ZodIntersection:()=>Et,ZodIssueCode:()=>y,ZodLazy:()=>St,ZodLiteral:()=>Ot,ZodMap:()=>$t,ZodNaN:()=>Jt,ZodNativeEnum:()=>At,ZodNever:()=>de,ZodNull:()=>bt,ZodNullable:()=>ye,ZodNumber:()=>pt,ZodObject:()=>re,ZodOptional:()=>se,ZodParsedType:()=>E,ZodPipeline:()=>Fr,ZodPromise:()=>Ue,ZodReadonly:()=>xt,ZodRecord:()=>vn,ZodSchema:()=>M,ZodSet:()=>zt,ZodString:()=>Fe,ZodSymbol:()=>Wt,ZodTransformer:()=>ce,ZodTuple:()=>_e,ZodType:()=>M,ZodUndefined:()=>yt,ZodUnion:()=>gt,ZodUnknown:()=>qe,ZodVoid:()=>Ht,addIssueToContext:()=>g,any:()=>qh,array:()=>Ch,bigint:()=>wh,boolean:()=>lc,coerce:()=>nm,custom:()=>sc,date:()=>Ah,datetimeRegex:()=>ac,defaultErrorMap:()=>Ie,discriminatedUnion:()=>Lh,effect:()=>Xh,enum:()=>$h,function:()=>Gh,getErrorMap:()=>Vt,getParsedType:()=>me,instanceof:()=>Sh,intersection:()=>Fh,isAborted:()=>ln,isAsync:()=>Bt,isDirty:()=>dn,isValid:()=>Le,late:()=>Eh,lazy:()=>Wh,literal:()=>Hh,makeIssue:()=>jr,map:()=>Vh,nan:()=>Oh,nativeEnum:()=>zh,never:()=>Nh,null:()=>xh,nullable:()=>Kh,number:()=>cc,object:()=>Mh,objectUtil:()=>ps,oboolean:()=>rm,onumber:()=>tm,optional:()=>Zh,ostring:()=>em,pipeline:()=>Qh,preprocess:()=>Yh,promise:()=>Jh,quotelessJson:()=>Xp,record:()=>Uh,set:()=>Bh,setErrorMap:()=>Kp,strictObject:()=>kh,string:()=>uc,symbol:()=>Th,transformer:()=>Xh,tuple:()=>Dh,undefined:()=>Ih,union:()=>jh,unknown:()=>Ph,util:()=>k,void:()=>Rh});var k;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{let a={};for(let o of i)a[o]=o;return a},e.getValidEnumValues=i=>{let a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(let s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let a=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(let o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a;})(k||(k={}));var ps;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(ps||(ps={}));var E=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),me=e=>{switch(typeof e){case "undefined":return E.undefined;case "string":return E.string;case "number":return Number.isNaN(e)?E.nan:E.number;case "boolean":return E.boolean;case "function":return E.function;case "bigint":return E.bigint;case "symbol":return E.symbol;case "object":return Array.isArray(e)?E.array:e===null?E.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?E.promise:typeof Map<"u"&&e instanceof Map?E.map:typeof Set<"u"&&e instanceof Set?E.set:typeof Date<"u"&&e instanceof Date?E.date:E.object;default:return E.unknown}};var y=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Xp=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),te=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n];},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t;}format(t){let r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(let o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else {let s=n,l=0;for(;l<o.path.length;){let u=o.path[l];l===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))):s[u]=s[u]||{_errors:[]},s=s[u],l++;}}};return i(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,k.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let a=i.path[0];r[a]=r[a]||[],r[a].push(t(i));}else n.push(t(i));return {formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};te.create=e=>new te(e);var Zp=(e,t)=>{let r;switch(e.code){case y.invalid_type:e.received===E.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,k.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:r=`Unrecognized key(s) in object: ${k.joinValues(e.keys,", ")}`;break;case y.invalid_union:r="Invalid input";break;case y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${k.joinValues(e.options)}`;break;case y.invalid_enum_value:r=`Invalid enum value. Expected ${k.joinValues(e.options)}, received '${e.received}'`;break;case y.invalid_arguments:r="Invalid function arguments";break;case y.invalid_return_type:r="Invalid function return type";break;case y.invalid_date:r="Invalid date";break;case y.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:k.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case y.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case y.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case y.custom:r="Invalid input";break;case y.invalid_intersection_types:r="Intersection results could not be merged";break;case y.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case y.not_finite:r="Number must be finite";break;default:r=t.defaultError,k.assertNever(e);}return {message:r}},Ie=Zp;var ec=Ie;function Kp(e){ec=e;}function Vt(){return ec}var jr=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return {...i,path:a,message:i.message};let s="",l=n.filter(u=>!!u).slice().reverse();for(let u of l)s=u(o,{data:t,defaultError:s}).message;return {...i,path:a,message:s}},Yp=[];function g(e,t){let r=Vt(),n=jr({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ie?void 0:Ie].filter(i=>!!i)});e.common.issues.push(n);}var H=class e{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(t,r){let n=[];for(let i of r){if(i.status==="aborted")return P;i.status==="dirty"&&t.dirty(),n.push(i.value);}return {status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let i of r){let a=await i.key,o=await i.value;n.push({key:a,value:o});}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let i of r){let{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return P;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value);}return {status:t.value,value:n}}},P=Object.freeze({status:"aborted"}),vt=e=>({status:"dirty",value:e}),Q=e=>({status:"valid",value:e}),ln=e=>e.status==="aborted",dn=e=>e.status==="dirty",Le=e=>e.status==="valid",Bt=e=>typeof Promise<"u"&&e instanceof Promise;var A;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message;})(A||(A={}));var ue=class{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},tc=(e,t)=>{if(Le(t))return {success:true,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new te(e.common.issues);return this._error=r,this._error}}};function R(e){if(!e)return {};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{let{message:l}=e;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??n??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??r??s.defaultError}},description:i}}var M=class{get description(){return this._def.description}_getType(t){return me(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:me(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return {status:new H,ctx:{common:t.parent.common,data:t.data,parsedType:me(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Bt(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:me(t)},i=this._parseSync({data:t,path:n.path,parent:n});return tc(n,i)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:me(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Le(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Le(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:me(t)},i=this._parse({data:t,path:n.path,parent:n}),a=await(Bt(i)?i:Promise.resolve(i));return tc(n,a)}refine(t,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{let o=t(i),s=()=>a.addIssue({code:y.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?true:(s(),false)):o?true:(s(),false)})}refinement(t,r){return this._refinement((n,i)=>t(n)?true:(i.addIssue(typeof r=="function"?r(n,i):r),false))}_refinement(t){return new ce({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return se.create(this,this._def)}nullable(){return ye.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Pe.create(this)}promise(){return Ue.create(this,this._def)}or(t){return gt.create([this,t],this._def)}and(t){return Et.create(this,t,this._def)}transform(t){return new ce({...R(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Tt({...R(this._def),innerType:this,defaultValue:r,typeName:N.ZodDefault})}brand(){return new Lr({typeName:N.ZodBranded,type:this,...R(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new It({...R(this._def),innerType:this,catchValue:r,typeName:N.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Fr.create(this,t)}readonly(){return xt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Qp=/^c[^\s-]{8,}$/i,eh=/^[0-9a-z]+$/,th=/^[0-9A-HJKMNP-TV-Z]{26}$/i,rh=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nh=/^[a-z0-9_-]{21}$/i,ih=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ah=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,oh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sh="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hs,uh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ch=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,lh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,dh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nc="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ph=new RegExp(`^${nc}$`);function ic(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function hh(e){return new RegExp(`^${ic(e)}$`)}function ac(e){let t=`${nc}T${ic(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function mh(e,t){return !!((t==="v4"||!t)&&uh.test(e)||(t==="v6"||!t)&&lh.test(e))}function _h(e,t){if(!ih.test(e))return false;try{let[r]=e.split(".");if(!r)return !1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return !(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return false}}function yh(e,t){return !!((t==="v4"||!t)&&ch.test(e)||(t==="v6"||!t)&&dh.test(e))}var Fe=class e extends M{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==E.string){let a=this._getOrReturnCtx(t);return g(a,{code:y.invalid_type,expected:E.string,received:a.parsedType}),P}let n=new H,i;for(let a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),g(i,{code:y.too_small,minimum:a.value,type:"string",inclusive:true,exact:false,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),g(i,{code:y.too_big,maximum:a.value,type:"string",inclusive:true,exact:false,message:a.message}),n.dirty());else if(a.kind==="length"){let o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?g(i,{code:y.too_big,maximum:a.value,type:"string",inclusive:true,exact:true,message:a.message}):s&&g(i,{code:y.too_small,minimum:a.value,type:"string",inclusive:true,exact:true,message:a.message}),n.dirty());}else if(a.kind==="email")oh.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"email",code:y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")hs||(hs=new RegExp(sh,"u")),hs.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"emoji",code:y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")rh.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"uuid",code:y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")nh.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"nanoid",code:y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")Qp.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"cuid",code:y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")eh.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"cuid2",code:y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")th.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"ulid",code:y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data);}catch{i=this._getOrReturnCtx(t,i),g(i,{validation:"url",code:y.invalid_string,message:a.message}),n.dirty();}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"regex",code:y.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),g(i,{code:y.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),g(i,{code:y.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),g(i,{code:y.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?ac(a).test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{code:y.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?ph.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{code:y.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?hh(a).test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{code:y.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?ah.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"duration",code:y.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?mh(t.data,a.version)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"ip",code:y.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?_h(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"jwt",code:y.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?yh(t.data,a.version)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"cidr",code:y.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?fh.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"base64",code:y.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?vh.test(t.data)||(i=this._getOrReturnCtx(t,i),g(i,{validation:"base64url",code:y.invalid_string,message:a.message}),n.dirty()):k.assertNever(a);return {status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(i=>t.test(i),{validation:r,code:y.invalid_string,...A.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...A.errToObj(t)})}url(t){return this._addCheck({kind:"url",...A.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...A.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...A.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...A.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...A.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...A.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...A.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...A.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...A.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...A.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...A.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...A.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??false,local:t?.local??false,...A.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...A.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...A.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...A.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...A.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...A.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...A.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...A.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...A.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...A.errToObj(r)})}nonempty(t){return this.min(1,A.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return !!this._def.checks.find(t=>t.kind==="date")}get isTime(){return !!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return !!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return !!this._def.checks.find(t=>t.kind==="email")}get isURL(){return !!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return !!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return !!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return !!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return !!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return !!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return !!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return !!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Fe.create=e=>new Fe({checks:[],typeName:N.ZodString,coerce:e?.coerce??false,...R(e)});function bh(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return a%o/10**i}var pt=class e extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==E.number){let a=this._getOrReturnCtx(t);return g(a,{code:y.invalid_type,expected:E.number,received:a.parsedType}),P}let n,i=new H;for(let a of this._def.checks)a.kind==="int"?k.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),g(n,{code:y.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),g(n,{code:y.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:false,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),g(n,{code:y.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:false,message:a.message}),i.dirty()):a.kind==="multipleOf"?bh(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),g(n,{code:y.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),g(n,{code:y.not_finite,message:a.message}),i.dirty()):k.assertNever(a);return {status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,true,A.toString(r))}gt(t,r){return this.setLimit("min",t,false,A.toString(r))}lte(t,r){return this.setLimit("max",t,true,A.toString(r))}lt(t,r){return this.setLimit("max",t,false,A.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:A.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:false,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:false,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:true,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:true,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:A.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:A.toString(t)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:A.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return !!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&k.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return true;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);}return Number.isFinite(r)&&Number.isFinite(t)}};pt.create=e=>new pt({checks:[],typeName:N.ZodNumber,coerce:e?.coerce||false,...R(e)});var ht=class e extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data);}catch{return this._getInvalidInput(t)}if(this._getType(t)!==E.bigint)return this._getInvalidInput(t);let n,i=new H;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),g(n,{code:y.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),g(n,{code:y.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),g(n,{code:y.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):k.assertNever(a);return {status:i.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return g(r,{code:y.invalid_type,expected:E.bigint,received:r.parsedType}),P}gte(t,r){return this.setLimit("min",t,true,A.toString(r))}gt(t,r){return this.setLimit("min",t,false,A.toString(r))}lte(t,r){return this.setLimit("max",t,true,A.toString(r))}lt(t,r){return this.setLimit("max",t,false,A.toString(r))}setLimit(t,r,n,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};ht.create=e=>new ht({checks:[],typeName:N.ZodBigInt,coerce:e?.coerce??false,...R(e)});var mt=class extends M{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==E.boolean){let n=this._getOrReturnCtx(t);return g(n,{code:y.invalid_type,expected:E.boolean,received:n.parsedType}),P}return Q(t.data)}};mt.create=e=>new mt({typeName:N.ZodBoolean,coerce:e?.coerce||false,...R(e)});var _t=class e extends M{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==E.date){let a=this._getOrReturnCtx(t);return g(a,{code:y.invalid_type,expected:E.date,received:a.parsedType}),P}if(Number.isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return g(a,{code:y.invalid_date}),P}let n=new H,i;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),g(i,{code:y.too_small,message:a.message,inclusive:true,exact:false,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),g(i,{code:y.too_big,message:a.message,inclusive:true,exact:false,maximum:a.value,type:"date"}),n.dirty()):k.assertNever(a);return {status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:A.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:A.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};_t.create=e=>new _t({checks:[],coerce:e?.coerce||false,typeName:N.ZodDate,...R(e)});var Wt=class extends M{_parse(t){if(this._getType(t)!==E.symbol){let n=this._getOrReturnCtx(t);return g(n,{code:y.invalid_type,expected:E.symbol,received:n.parsedType}),P}return Q(t.data)}};Wt.create=e=>new Wt({typeName:N.ZodSymbol,...R(e)});var yt=class extends M{_parse(t){if(this._getType(t)!==E.undefined){let n=this._getOrReturnCtx(t);return g(n,{code:y.invalid_type,expected:E.undefined,received:n.parsedType}),P}return Q(t.data)}};yt.create=e=>new yt({typeName:N.ZodUndefined,...R(e)});var bt=class extends M{_parse(t){if(this._getType(t)!==E.null){let n=this._getOrReturnCtx(t);return g(n,{code:y.invalid_type,expected:E.null,received:n.parsedType}),P}return Q(t.data)}};bt.create=e=>new bt({typeName:N.ZodNull,...R(e)});var De=class extends M{constructor(){super(...arguments),this._any=true;}_parse(t){return Q(t.data)}};De.create=e=>new De({typeName:N.ZodAny,...R(e)});var qe=class extends M{constructor(){super(...arguments),this._unknown=true;}_parse(t){return Q(t.data)}};qe.create=e=>new qe({typeName:N.ZodUnknown,...R(e)});var de=class extends M{_parse(t){let r=this._getOrReturnCtx(t);return g(r,{code:y.invalid_type,expected:E.never,received:r.parsedType}),P}};de.create=e=>new de({typeName:N.ZodNever,...R(e)});var Ht=class extends M{_parse(t){if(this._getType(t)!==E.undefined){let n=this._getOrReturnCtx(t);return g(n,{code:y.invalid_type,expected:E.void,received:n.parsedType}),P}return Q(t.data)}};Ht.create=e=>new Ht({typeName:N.ZodVoid,...R(e)});var Pe=class e extends M{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==E.array)return g(r,{code:y.invalid_type,expected:E.array,received:r.parsedType}),P;if(i.exactLength!==null){let o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(g(r,{code:o?y.too_big:y.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:i.exactLength.message}),n.dirty());}if(i.minLength!==null&&r.data.length<i.minLength.value&&(g(r,{code:y.too_small,minimum:i.minLength.value,type:"array",inclusive:true,exact:false,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(g(r,{code:y.too_big,maximum:i.maxLength.value,type:"array",inclusive:true,exact:false,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,s)=>i.type._parseAsync(new ue(r,o,r.path,s)))).then(o=>H.mergeArray(n,o));let a=[...r.data].map((o,s)=>i.type._parseSync(new ue(r,o,r.path,s)));return H.mergeArray(n,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:A.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:A.toString(r)}})}nonempty(t){return this.min(1,t)}};Pe.create=(e,t)=>new Pe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...R(t)});function Gt(e){if(e instanceof re){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=se.create(Gt(n));}return new re({...e._def,shape:()=>t})}else return e instanceof Pe?new Pe({...e._def,type:Gt(e.element)}):e instanceof se?se.create(Gt(e.unwrap())):e instanceof ye?ye.create(Gt(e.unwrap())):e instanceof _e?_e.create(e.items.map(t=>Gt(t))):e}var re=class e extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=k.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==E.object){let u=this._getOrReturnCtx(t);return g(u,{code:y.invalid_type,expected:E.object,received:u.parsedType}),P}let{status:n,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof de&&this._def.unknownKeys==="strip"))for(let u in i.data)o.includes(u)||s.push(u);let l=[];for(let u of o){let d=a[u],p=i.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new ue(i,p,i.path,u)),alwaysSet:u in i.data});}if(this._def.catchall instanceof de){let u=this._def.unknownKeys;if(u==="passthrough")for(let d of s)l.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(u==="strict")s.length>0&&(g(i,{code:y.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let u=this._def.catchall;for(let d of s){let p=i.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new ue(i,p,i.path,d)),alwaysSet:d in i.data});}}return i.common.async?Promise.resolve().then(async()=>{let u=[];for(let d of l){let p=await d.key,h=await d.value;u.push({key:p,value:h,alwaysSet:d.alwaysSet});}return u}).then(u=>H.mergeObjectSync(n,u)):H.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(t){return A.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:A.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:N.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of k.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of k.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Gt(this)}partial(t){let r={};for(let n of k.objectKeys(this.shape)){let i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional();}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of k.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else {let a=this.shape[n];for(;a instanceof se;)a=a._def.innerType;r[n]=a;}return new e({...this._def,shape:()=>r})}keyof(){return oc(k.objectKeys(this.shape))}};re.create=(e,t)=>new re({shape:()=>e,unknownKeys:"strip",catchall:de.create(),typeName:N.ZodObject,...R(t)});re.strictCreate=(e,t)=>new re({shape:()=>e,unknownKeys:"strict",catchall:de.create(),typeName:N.ZodObject,...R(t)});re.lazycreate=(e,t)=>new re({shape:e,unknownKeys:"strip",catchall:de.create(),typeName:N.ZodObject,...R(t)});var gt=class extends M{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function i(a){for(let s of a)if(s.result.status==="valid")return s.result;for(let s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(s=>new te(s.ctx.common.issues));return g(r,{code:y.invalid_union,unionErrors:o}),P}if(r.common.async)return Promise.all(n.map(async a=>{let o={...r,common:{...r.common,issues:[]},parent:null};return {result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a,o=[];for(let l of n){let u={...r,common:{...r.common,issues:[]},parent:null},d=l._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!a&&(a={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues);}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(l=>new te(l));return g(r,{code:y.invalid_union,unionErrors:s}),P}}get options(){return this._def.options}};gt.create=(e,t)=>new gt({options:e,typeName:N.ZodUnion,...R(t)});var xe=e=>e instanceof St?xe(e.schema):e instanceof ce?xe(e.innerType()):e instanceof Ot?[e.value]:e instanceof wt?e.options:e instanceof At?k.objectValues(e.enum):e instanceof Tt?xe(e._def.innerType):e instanceof yt?[void 0]:e instanceof bt?[null]:e instanceof se?[void 0,...xe(e.unwrap())]:e instanceof ye?[null,...xe(e.unwrap())]:e instanceof Lr||e instanceof xt?xe(e.unwrap()):e instanceof It?xe(e._def.innerType):[],fn=class e extends M{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==E.object)return g(r,{code:y.invalid_type,expected:E.object,received:r.parsedType}),P;let n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(g(r,{code:y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),P)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let i=new Map;for(let a of r){let o=xe(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a);}}return new e({typeName:N.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...R(n)})}};function ms(e,t){let r=me(e),n=me(t);if(e===t)return {valid:true,data:e};if(r===E.object&&n===E.object){let i=k.objectKeys(t),a=k.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(let s of a){let l=ms(e[s],t[s]);if(!l.valid)return {valid:false};o[s]=l.data;}return {valid:true,data:o}}else if(r===E.array&&n===E.array){if(e.length!==t.length)return {valid:false};let i=[];for(let a=0;a<e.length;a++){let o=e[a],s=t[a],l=ms(o,s);if(!l.valid)return {valid:false};i.push(l.data);}return {valid:true,data:i}}else return r===E.date&&n===E.date&&+e==+t?{valid:true,data:e}:{valid:false}}var Et=class extends M{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=(a,o)=>{if(ln(a)||ln(o))return P;let s=ms(a.value,o.value);return s.valid?((dn(a)||dn(o))&&r.dirty(),{status:r.value,value:s.data}):(g(n,{code:y.invalid_intersection_types}),P)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Et.create=(e,t,r)=>new Et({left:e,right:t,typeName:N.ZodIntersection,...R(r)});var _e=class e extends M{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==E.array)return g(n,{code:y.invalid_type,expected:E.array,received:n.parsedType}),P;if(n.data.length<this._def.items.length)return g(n,{code:y.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),P;!this._def.rest&&n.data.length>this._def.items.length&&(g(n,{code:y.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let a=[...n.data].map((o,s)=>{let l=this._def.items[s]||this._def.rest;return l?l._parse(new ue(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>H.mergeArray(r,o)):H.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};_e.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _e({items:e,typeName:N.ZodTuple,rest:null,...R(t)})};var vn=class e extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==E.object)return g(n,{code:y.invalid_type,expected:E.object,received:n.parsedType}),P;let i=[],a=this._def.keyType,o=this._def.valueType;for(let s in n.data)i.push({key:a._parse(new ue(n,s,n.path,s)),value:o._parse(new ue(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?H.mergeObjectAsync(r,i):H.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof M?new e({keyType:t,valueType:r,typeName:N.ZodRecord,...R(n)}):new e({keyType:Fe.create(),valueType:t,typeName:N.ZodRecord,...R(r)})}},$t=class extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==E.map)return g(n,{code:y.invalid_type,expected:E.map,received:n.parsedType}),P;let i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,l],u)=>({key:i._parse(new ue(n,s,n.path,[u,"key"])),value:a._parse(new ue(n,l,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let l of o){let u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return P;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(u.value,d.value);}return {status:r.value,value:s}})}else {let s=new Map;for(let l of o){let u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return P;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(u.value,d.value);}return {status:r.value,value:s}}}};$t.create=(e,t,r)=>new $t({valueType:t,keyType:e,typeName:N.ZodMap,...R(r)});var zt=class e extends M{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==E.set)return g(n,{code:y.invalid_type,expected:E.set,received:n.parsedType}),P;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(g(n,{code:y.too_small,minimum:i.minSize.value,type:"set",inclusive:true,exact:false,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(g(n,{code:y.too_big,maximum:i.maxSize.value,type:"set",inclusive:true,exact:false,message:i.maxSize.message}),r.dirty());let a=this._def.valueType;function o(l){let u=new Set;for(let d of l){if(d.status==="aborted")return P;d.status==="dirty"&&r.dirty(),u.add(d.value);}return {status:r.value,value:u}}let s=[...n.data.values()].map((l,u)=>a._parse(new ue(n,l,n.path,u)));return n.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:A.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};zt.create=(e,t)=>new zt({valueType:e,minSize:null,maxSize:null,typeName:N.ZodSet,...R(t)});var pn=class e extends M{constructor(){super(...arguments),this.validate=this.implement;}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==E.function)return g(r,{code:y.invalid_type,expected:E.function,received:r.parsedType}),P;function n(s,l){return jr({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vt(),Ie].filter(u=>!!u),issueData:{code:y.invalid_arguments,argumentsError:l}})}function i(s,l){return jr({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vt(),Ie].filter(u=>!!u),issueData:{code:y.invalid_return_type,returnTypeError:l}})}let a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Ue){let s=this;return Q(async function(...l){let u=new te([]),d=await s._def.args.parseAsync(l,a).catch(m=>{throw u.addIssue(n(l,m)),u}),p=await Reflect.apply(o,this,d);return await s._def.returns._def.type.parseAsync(p,a).catch(m=>{throw u.addIssue(i(p,m)),u})})}else {let s=this;return Q(function(...l){let u=s._def.args.safeParse(l,a);if(!u.success)throw new te([n(l,u.error)]);let d=Reflect.apply(o,this,u.data),p=s._def.returns.safeParse(d,a);if(!p.success)throw new te([i(d,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:_e.create(t).rest(qe.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||_e.create([]).rest(qe.create()),returns:r||qe.create(),typeName:N.ZodFunction,...R(n)})}},St=class extends M{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};St.create=(e,t)=>new St({getter:e,typeName:N.ZodLazy,...R(t)});var Ot=class extends M{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return g(r,{received:r.data,code:y.invalid_literal,expected:this._def.value}),P}return {status:"valid",value:t.data}}get value(){return this._def.value}};Ot.create=(e,t)=>new Ot({value:e,typeName:N.ZodLiteral,...R(t)});function oc(e,t){return new wt({values:e,typeName:N.ZodEnum,...R(t)})}var wt=class e extends M{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return g(r,{expected:k.joinValues(n),received:r.parsedType,code:y.invalid_type}),P}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return g(r,{received:r.data,code:y.invalid_enum_value,options:n}),P}return Q(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};wt.create=oc;var At=class extends M{_parse(t){let r=k.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==E.string&&n.parsedType!==E.number){let i=k.objectValues(r);return g(n,{expected:k.joinValues(i),received:n.parsedType,code:y.invalid_type}),P}if(this._cache||(this._cache=new Set(k.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let i=k.objectValues(r);return g(n,{received:n.data,code:y.invalid_enum_value,options:i}),P}return Q(t.data)}get enum(){return this._def.values}};At.create=(e,t)=>new At({values:e,typeName:N.ZodNativeEnum,...R(t)});var Ue=class extends M{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==E.promise&&r.common.async===false)return g(r,{code:y.invalid_type,expected:E.promise,received:r.parsedType}),P;let n=r.parsedType===E.promise?r.data:Promise.resolve(r.data);return Q(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Ue.create=(e,t)=>new Ue({type:e,typeName:N.ZodPromise,...R(t)});var ce=class extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{g(n,o),o.fatal?r.abort():r.dirty();},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){let o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(r.value==="aborted")return P;let l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?P:l.status==="dirty"?vt(l.value):r.value==="dirty"?vt(l.value):l});{if(r.value==="aborted")return P;let s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?P:s.status==="dirty"?vt(s.value):r.value==="dirty"?vt(s.value):s}}if(i.type==="refinement"){let o=s=>{let l=i.refinement(s,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===false){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?P:(s.status==="dirty"&&r.dirty(),o(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?P:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===false){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Le(o))return P;let s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Le(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):P);k.assertNever(i);}};ce.create=(e,t,r)=>new ce({schema:e,typeName:N.ZodEffects,effect:t,...R(r)});ce.createWithPreprocess=(e,t,r)=>new ce({schema:t,effect:{type:"preprocess",transform:e},typeName:N.ZodEffects,...R(r)});var se=class extends M{_parse(t){return this._getType(t)===E.undefined?Q(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};se.create=(e,t)=>new se({innerType:e,typeName:N.ZodOptional,...R(t)});var ye=class extends M{_parse(t){return this._getType(t)===E.null?Q(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ye.create=(e,t)=>new ye({innerType:e,typeName:N.ZodNullable,...R(t)});var Tt=class extends M{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===E.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Tt.create=(e,t)=>new Tt({innerType:e,typeName:N.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...R(t)});var It=class extends M{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Bt(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new te(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new te(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};It.create=(e,t)=>new It({innerType:e,typeName:N.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...R(t)});var Jt=class extends M{_parse(t){if(this._getType(t)!==E.nan){let n=this._getOrReturnCtx(t);return g(n,{code:y.invalid_type,expected:E.nan,received:n.parsedType}),P}return {status:"valid",value:t.data}}};Jt.create=e=>new Jt({typeName:N.ZodNaN,...R(e)});var gh=Symbol("zod_brand"),Lr=class extends M{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Fr=class e extends M{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return (async()=>{let a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?P:a.status==="dirty"?(r.dirty(),vt(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?P:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:N.ZodPipeline})}},xt=class extends M{_parse(t){let r=this._def.innerType._parse(t),n=i=>(Le(i)&&(i.value=Object.freeze(i.value)),i);return Bt(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};xt.create=(e,t)=>new xt({innerType:e,typeName:N.ZodReadonly,...R(t)});function rc(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function sc(e,t={},r){return e?De.create().superRefine((n,i)=>{let a=e(n);if(a instanceof Promise)return a.then(o=>{if(!o){let s=rc(t,n),l=s.fatal??r??true;i.addIssue({code:"custom",...s,fatal:l});}});if(!a){let o=rc(t,n),s=o.fatal??r??true;i.addIssue({code:"custom",...o,fatal:s});}}):De.create()}var Eh={object:re.lazycreate},N;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly";})(N||(N={}));var Sh=(e,t={message:`Input not instance of ${e.name}`})=>sc(r=>r instanceof e,t),uc=Fe.create,cc=pt.create,Oh=Jt.create,wh=ht.create,lc=mt.create,Ah=_t.create,Th=Wt.create,Ih=yt.create,xh=bt.create,qh=De.create,Ph=qe.create,Nh=de.create,Rh=Ht.create,Ch=Pe.create,Mh=re.create,kh=re.strictCreate,jh=gt.create,Lh=fn.create,Fh=Et.create,Dh=_e.create,Uh=vn.create,Vh=$t.create,Bh=zt.create,Gh=pn.create,Wh=St.create,Hh=Ot.create,$h=wt.create,zh=At.create,Jh=Ue.create,Xh=ce.create,Zh=se.create,Kh=ye.create,Yh=ce.createWithPreprocess,Qh=Fr.create,em=()=>uc().optional(),tm=()=>cc().optional(),rm=()=>lc().optional(),nm={string:e=>Fe.create({...e,coerce:true}),number:e=>pt.create({...e,coerce:true}),boolean:e=>mt.create({...e,coerce:true}),bigint:e=>ht.create({...e,coerce:true}),date:e=>_t.create({...e,coerce:true})};var im=P;var am=v.object({name:v.string(),arguments:v.string()}),om=v.object({id:v.string(),type:v.literal("function"),function:am}),hn=v.object({id:v.string(),role:v.string(),content:v.string().optional(),name:v.string().optional()}),sm=v.object({type:v.literal("text"),text:v.string()}),dc=v.object({type:v.literal("binary"),mimeType:v.string(),id:v.string().optional(),url:v.string().optional(),data:v.string().optional(),filename:v.string().optional()}),fc=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:v.ZodIssueCode.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]});};dc.superRefine((e,t)=>{fc(e,t);});var um=v.discriminatedUnion("type",[sm,dc]),cm=um.superRefine((e,t)=>{e.type==="binary"&&fc(e,t);}),lm=hn.extend({role:v.literal("developer"),content:v.string()}),dm=hn.extend({role:v.literal("system"),content:v.string()}),fm=hn.extend({role:v.literal("assistant"),content:v.string().optional(),toolCalls:v.array(om).optional()}),vm=hn.extend({role:v.literal("user"),content:v.union([v.string(),v.array(cm)])}),pm=v.object({id:v.string(),content:v.string(),role:v.literal("tool"),toolCallId:v.string(),error:v.string().optional()}),hm=v.object({id:v.string(),role:v.literal("activity"),activityType:v.string(),content:v.record(v.any())}),vc=v.discriminatedUnion("role",[lm,dm,fm,vm,pm,hm]);v.union([v.literal("developer"),v.literal("system"),v.literal("assistant"),v.literal("user"),v.literal("tool"),v.literal("activity")]);var mm=v.object({description:v.string(),value:v.string()}),_m=v.object({name:v.string(),description:v.string(),parameters:v.any()}),Dr=v.object({threadId:v.string(),runId:v.string(),parentRunId:v.string().optional(),state:v.any(),messages:v.array(vc),tools:v.array(_m),context:v.array(mm),forwardedProps:v.any()}),ym=v.any();var pc=v.union([v.literal("developer"),v.literal("system"),v.literal("assistant"),v.literal("user")]),j=(e=>(e.TEXT_MESSAGE_START="TEXT_MESSAGE_START",e.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",e.TEXT_MESSAGE_END="TEXT_MESSAGE_END",e.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",e.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",e.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",e.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",e.TOOL_CALL_START="TOOL_CALL_START",e.TOOL_CALL_ARGS="TOOL_CALL_ARGS",e.TOOL_CALL_END="TOOL_CALL_END",e.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",e.TOOL_CALL_RESULT="TOOL_CALL_RESULT",e.THINKING_START="THINKING_START",e.THINKING_END="THINKING_END",e.STATE_SNAPSHOT="STATE_SNAPSHOT",e.STATE_DELTA="STATE_DELTA",e.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",e.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",e.ACTIVITY_DELTA="ACTIVITY_DELTA",e.RAW="RAW",e.CUSTOM="CUSTOM",e.RUN_STARTED="RUN_STARTED",e.RUN_FINISHED="RUN_FINISHED",e.RUN_ERROR="RUN_ERROR",e.STEP_STARTED="STEP_STARTED",e.STEP_FINISHED="STEP_FINISHED",e))(j||{}),B=v.object({type:v.nativeEnum(j),timestamp:v.number().optional(),rawEvent:v.any().optional()}),bm=B.extend({type:v.literal("TEXT_MESSAGE_START"),messageId:v.string(),role:pc.default("assistant")}),hc=B.extend({type:v.literal("TEXT_MESSAGE_CONTENT"),messageId:v.string(),delta:v.string().refine(e=>e.length>0,"Delta must not be an empty string")}),gm=B.extend({type:v.literal("TEXT_MESSAGE_END"),messageId:v.string()}),Em=B.extend({type:v.literal("TEXT_MESSAGE_CHUNK"),messageId:v.string().optional(),role:pc.optional(),delta:v.string().optional()}),Sm=B.extend({type:v.literal("THINKING_TEXT_MESSAGE_START")}),Om=hc.omit({messageId:true,type:true}).extend({type:v.literal("THINKING_TEXT_MESSAGE_CONTENT")}),wm=B.extend({type:v.literal("THINKING_TEXT_MESSAGE_END")}),Am=B.extend({type:v.literal("TOOL_CALL_START"),toolCallId:v.string(),toolCallName:v.string(),parentMessageId:v.string().optional()}),Tm=B.extend({type:v.literal("TOOL_CALL_ARGS"),toolCallId:v.string(),delta:v.string()}),Im=B.extend({type:v.literal("TOOL_CALL_END"),toolCallId:v.string()}),xm=B.extend({messageId:v.string(),type:v.literal("TOOL_CALL_RESULT"),toolCallId:v.string(),content:v.string(),role:v.literal("tool").optional()}),qm=B.extend({type:v.literal("TOOL_CALL_CHUNK"),toolCallId:v.string().optional(),toolCallName:v.string().optional(),parentMessageId:v.string().optional(),delta:v.string().optional()}),Pm=B.extend({type:v.literal("THINKING_START"),title:v.string().optional()}),Nm=B.extend({type:v.literal("THINKING_END")}),Rm=B.extend({type:v.literal("STATE_SNAPSHOT"),snapshot:ym}),Cm=B.extend({type:v.literal("STATE_DELTA"),delta:v.array(v.any())}),Mm=B.extend({type:v.literal("MESSAGES_SNAPSHOT"),messages:v.array(vc)}),km=B.extend({type:v.literal("ACTIVITY_SNAPSHOT"),messageId:v.string(),activityType:v.string(),content:v.record(v.any()),replace:v.boolean().optional().default(true)}),jm=B.extend({type:v.literal("ACTIVITY_DELTA"),messageId:v.string(),activityType:v.string(),patch:v.array(v.any())}),Lm=B.extend({type:v.literal("RAW"),event:v.any(),source:v.string().optional()}),Fm=B.extend({type:v.literal("CUSTOM"),name:v.string(),value:v.any()}),Dm=B.extend({type:v.literal("RUN_STARTED"),threadId:v.string(),runId:v.string(),parentRunId:v.string().optional(),input:Dr.optional()}),Um=B.extend({type:v.literal("RUN_FINISHED"),threadId:v.string(),runId:v.string(),result:v.any().optional()}),Vm=B.extend({type:v.literal("RUN_ERROR"),message:v.string(),code:v.string().optional()}),Bm=B.extend({type:v.literal("STEP_STARTED"),stepName:v.string()}),Gm=B.extend({type:v.literal("STEP_FINISHED"),stepName:v.string()});v.discriminatedUnion("type",[bm,hc,gm,Em,Pm,Nm,Sm,Om,wm,Am,Tm,Im,qm,xm,Rm,Cm,Mm,km,jm,Lm,Fm,Dm,Um,Vm,Bm,Gm]);var X=[];for(let e=0;e<256;++e)X.push((e+256).toString(16).slice(1));function Hv(e,t=0){return (X[e[t+0]]+X[e[t+1]]+X[e[t+2]]+X[e[t+3]]+"-"+X[e[t+4]]+X[e[t+5]]+"-"+X[e[t+6]]+X[e[t+7]]+"-"+X[e[t+8]]+X[e[t+9]]+"-"+X[e[t+10]]+X[e[t+11]]+X[e[t+12]]+X[e[t+13]]+X[e[t+14]]+X[e[t+15]]).toLowerCase()}var Io=new Uint8Array(256),To=Io.length;function Nu(){return To>Io.length-16&&(randomFillSync(Io),To=0),Io.slice(To,To+=16)}var Ru={randomUUID:randomUUID};function nR(e,t,r){if(Ru.randomUUID&&!t&&!e)return Ru.randomUUID();e=e||{};let n=e.random??e.rng?.()??Nu();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return Hv(n)}var Cu=nR;var Mu={};vs(Mu,{JsonPatchError:()=>W,_areEquals:()=>an,applyOperation:()=>Ut,applyPatch:()=>Cr,applyReducer:()=>uR,deepClone:()=>oR,getValueByPointer:()=>Ro,validate:()=>zv,validator:()=>Co});var iR=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i;}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a]);},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t;}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n);}}(),aR=Object.prototype.hasOwnProperty;function qo(e,t){return aR.call(e,t)}function Po(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var n=[];for(var i in e)qo(e,i)&&n.push(i);return n}function Z(e){switch(typeof e){case "object":return JSON.parse(JSON.stringify(e));case "undefined":return null;default:return e}}function No(e){for(var t=0,r=e.length,n;t<r;){if(n=e.charCodeAt(t),n>=48&&n<=57){t++;continue}return false}return true}function Ae(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function rn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function xo(e){if(e===void 0)return true;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t<r;t++)if(xo(e[t]))return true}else if(typeof e=="object"){for(var n=Po(e),i=n.length,a=0;a<i;a++)if(xo(e[n[a]]))return true}}return false}function $v(e,t){var r=[e];for(var n in t){var i=typeof t[n]=="object"?JSON.stringify(t[n],null,2):t[n];typeof i<"u"&&r.push(n+": "+i);}return r.join(`
|
|
5
|
+
`)}var nn=function(e){iR(t,e);function t(r,n,i,a,o){var s=this.constructor,l=e.call(this,$v(r,{name:n,index:i,operation:a,tree:o}))||this;return l.name=n,l.index=i,l.operation=a,l.tree=o,Object.setPrototypeOf(l,s.prototype),l.message=$v(r,{name:n,index:i,operation:a,tree:o}),l}return t}(Error);var W=nn,oR=Z,Rr={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=Ro(r,this.path);n&&(n=Z(n));var i=Ut(r,{op:"remove",path:this.from}).removed;return Ut(r,{op:"add",path:this.path,value:i}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=Ro(r,this.from);return Ut(r,{op:"add",path:this.path,value:Z(n)}),{newDocument:r}},test:function(e,t,r){return {newDocument:r,test:an(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},sR={add:function(e,t,r){return No(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){var n=e.splice(t,1);return {newDocument:r,removed:n[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:Rr.move,copy:Rr.copy,test:Rr.test,_get:Rr._get};function Ro(e,t){if(t=="")return e;var r={op:"_get",path:t};return Ut(e,r),r.value}function Ut(e,t,r,n,i,a){if(r===void 0&&(r=false),n===void 0&&(n=true),i===void 0&&(i=true),a===void 0&&(a=0),r&&(typeof r=="function"?r(t,0,e,t.path):Co(t,0)),t.path===""){var o={newDocument:e};if(t.op==="add")return o.newDocument=t.value,o;if(t.op==="replace")return o.newDocument=t.value,o.removed=e,o;if(t.op==="move"||t.op==="copy")return o.newDocument=Ro(e,t.from),t.op==="move"&&(o.removed=e),o;if(t.op==="test"){if(o.test=an(e,t.value),o.test===false)throw new W("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o.newDocument=e,o}else {if(t.op==="remove")return o.removed=e,o.newDocument=null,o;if(t.op==="_get")return t.value=e,o;if(r)throw new W("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return o}}else {n||(e=Z(e));var s=t.path||"",l=s.split("/"),u=e,d=1,p=l.length,h=void 0,m=void 0,_=void 0;for(typeof r=="function"?_=r:_=Co;;){if(m=l[d],m&&m.indexOf("~")!=-1&&(m=rn(m)),i&&(m=="__proto__"||m=="prototype"&&d>0&&l[d-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&h===void 0&&(u[m]===void 0?h=l.slice(0,d).join("/"):d==p-1&&(h=t.path),h!==void 0&&_(t,0,e,h)),d++,Array.isArray(u)){if(m==="-")m=u.length;else {if(r&&!No(m))throw new W("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);No(m)&&(m=~~m);}if(d>=p){if(r&&t.op==="add"&&m>u.length)throw new W("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var o=sR[t.op].call(t,u,m,e);if(o.test===false)throw new W("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}}else if(d>=p){var o=Rr[t.op].call(t,u,m,e);if(o.test===false)throw new W("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}if(u=u[m],r&&d<p&&(!u||typeof u!="object"))throw new W("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function Cr(e,t,r,n,i){if(n===void 0&&(n=true),i===void 0&&(i=true),r&&!Array.isArray(t))throw new W("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=Z(e));for(var a=new Array(t.length),o=0,s=t.length;o<s;o++)a[o]=Ut(e,t[o],r,true,i,o),e=a[o].newDocument;return a.newDocument=e,a}function uR(e,t,r){var n=Ut(e,t);if(n.test===false)throw new W("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return n.newDocument}function Co(e,t,r,n){if(typeof e!="object"||e===null||Array.isArray(e))throw new W("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,r);if(Rr[e.op]){if(typeof e.path!="string")throw new W("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,r);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new W('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new W("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new W("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&xo(e.value))throw new W("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var i=e.path.split("/").length,a=n.split("/").length;if(i!==a+1&&i!==a)throw new W("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==n)throw new W("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var o={op:"_get",path:e.from,value:void 0},s=zv([o],r);if(s&&s.name==="OPERATION_PATH_UNRESOLVABLE")throw new W("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new W("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function zv(e,t,r){try{if(!Array.isArray(e))throw new W("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Cr(Z(t),Z(e),r||!0);else {r=r||Co;for(var n=0;n<e.length;n++)r(e[n],n,t,void 0);}}catch(i){if(i instanceof W)return i;throw i}}function an(e,t){if(e===t)return true;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=Array.isArray(e),n=Array.isArray(t),i,a,o;if(r&&n){if(a=e.length,a!=t.length)return false;for(i=a;i--!==0;)if(!an(e[i],t[i]))return false;return true}if(r!=n)return false;var s=Object.keys(e);if(a=s.length,a!==Object.keys(t).length)return false;for(i=a;i--!==0;)if(!t.hasOwnProperty(s[i]))return false;for(i=a;i--!==0;)if(o=s[i],!an(e[o],t[o]))return false;return true}return e!==e&&t!==t}var Fu={};vs(Fu,{compare:()=>mR,generate:()=>ku,observe:()=>hR,unobserve:()=>pR});var ju=new WeakMap,cR=function(){function e(t){this.observers=new Map,this.obj=t;}return e}(),lR=function(){function e(t,r){this.callback=t,this.observer=r;}return e}();function dR(e){return ju.get(e)}function fR(e,t){return e.observers.get(t)}function vR(e,t){e.observers.delete(t.callback);}function pR(e,t){t.unobserve();}function hR(e,t){var r=[],n,i=dR(e);if(!i)i=new cR(e),ju.set(e,i);else {var a=fR(i,t);n=a&&a.observer;}if(n)return n;if(n={},i.value=Z(e),t){n.callback=t,n.next=null;var o=function(){ku(n);},s=function(){clearTimeout(n.next),n.next=setTimeout(o);};typeof window<"u"&&(window.addEventListener("mouseup",s),window.addEventListener("keyup",s),window.addEventListener("mousedown",s),window.addEventListener("keydown",s),window.addEventListener("change",s));}return n.patches=r,n.object=e,n.unobserve=function(){ku(n),clearTimeout(n.next),vR(i,n),typeof window<"u"&&(window.removeEventListener("mouseup",s),window.removeEventListener("keyup",s),window.removeEventListener("mousedown",s),window.removeEventListener("keydown",s),window.removeEventListener("change",s));},i.observers.set(t,new lR(t,n)),n}function ku(e,t){t===void 0&&(t=false);var r=ju.get(e.object);Lu(r.value,e.object,e.patches,"",t),e.patches.length&&Cr(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function Lu(e,t,r,n,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=Po(t),o=Po(e),s=false,l=false,u=o.length-1;u>=0;u--){var d=o[u],p=e[d];if(qo(t,d)&&!(t[d]===void 0&&p!==void 0&&Array.isArray(t)===false)){var h=t[d];typeof p=="object"&&p!=null&&typeof h=="object"&&h!=null&&Array.isArray(p)===Array.isArray(h)?Lu(p,h,r,n+"/"+Ae(d),i):p!==h&&(s=true,i&&r.push({op:"test",path:n+"/"+Ae(d),value:Z(p)}),r.push({op:"replace",path:n+"/"+Ae(d),value:Z(h)}));}else Array.isArray(e)===Array.isArray(t)?(i&&r.push({op:"test",path:n+"/"+Ae(d),value:Z(p)}),r.push({op:"remove",path:n+"/"+Ae(d)}),l=true):(i&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}),s=true);}if(!(!l&&a.length==o.length))for(var u=0;u<a.length;u++){var d=a[u];!qo(e,d)&&t[d]!==void 0&&r.push({op:"add",path:n+"/"+Ae(d),value:Z(t[d])});}}}function mR(e,t,r){r===void 0&&(r=false);var n=[];return Lu(e,t,n,"",r),n}Object.assign({},Mu,Fu,{JsonPatchError:nn,deepClone:Z,escapePathComponent:Ae,unescapePathComponent:rn});function Xv(){let e=0,t=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[e,t]}let r=this.buf[this.pos++];if(e|=(r&15)<<28,t=(r&112)>>4,(r&128)==0)return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<n,(i&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function ko(e,t,r){for(let a=0;a<28;a=a+7){let o=e>>>a,s=!(!(o>>>7)&&t==0),l=(s?o|128:o)&255;if(r.push(l),!s)return}let n=e>>>28&15|(t&7)<<4,i=t>>3!=0;if(r.push((i?n|128:n)&255),!!i){for(let a=3;a<31;a=a+7){let o=t>>>a,s=!!(o>>>7),l=(s?o|128:o)&255;if(r.push(l),!s)return}r.push(t>>>31&1);}}var Mo=4294967296;function Du(e){let t=e[0]==="-";t&&(e=e.slice(1));let r=1e6,n=0,i=0;function a(o,s){let l=Number(e.slice(o,s));i*=r,n=n*r+l,n>=Mo&&(i=i+(n/Mo|0),n=n%Mo);}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?Kv(n,i):Vu(n,i)}function Zv(e,t){let r=Vu(e,t),n=r.hi&2147483648;n&&(r=Kv(r.lo,r.hi));let i=Uu(r.lo,r.hi);return n?"-"+i:i}function Uu(e,t){if({lo:e,hi:t}=_R(e,t),t<=2097151)return String(Mo*t+e);let r=e&16777215,n=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=r+n*6777216+i*6710656,o=n+i*8147497,s=i*2,l=1e7;return a>=l&&(o+=Math.floor(a/l),a%=l),o>=l&&(s+=Math.floor(o/l),o%=l),s.toString()+Jv(o)+Jv(a)}function _R(e,t){return {lo:e>>>0,hi:t>>>0}}function Vu(e,t){return {lo:e|0,hi:t|0}}function Kv(e,t){return t=~t,e?e=~e+1:t+=1,Vu(e,t)}var Jv=e=>{let t=String(e);return "0000000".slice(t.length)+t};function Bu(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e);}else {for(let r=0;r<9;r++)t.push(e&127|128),e=e>>7;t.push(1);}}function Yv(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let r=5;(e&128)!==0&&r<10;r++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}var he=yR();function yR(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){let r=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),i=BigInt("0"),a=BigInt("18446744073709551615");return {zero:BigInt(0),supported:true,parse(o){let s=typeof o=="bigint"?o:BigInt(o);if(s>n||s<r)throw new Error(`invalid int64: ${o}`);return s},uParse(o){let s=typeof o=="bigint"?o:BigInt(o);if(s>a||s<i)throw new Error(`invalid uint64: ${o}`);return s},enc(o){return e.setBigInt64(0,this.parse(o),true),{lo:e.getInt32(0,true),hi:e.getInt32(4,true)}},uEnc(o){return e.setBigInt64(0,this.uParse(o),true),{lo:e.getInt32(0,true),hi:e.getInt32(4,true)}},dec(o,s){return e.setInt32(0,o,true),e.setInt32(4,s,true),e.getBigInt64(0,true)},uDec(o,s){return e.setInt32(0,o,true),e.setInt32(4,s,true),e.getBigUint64(0,true)}}}return {zero:"0",supported:false,parse(r){return typeof r!="string"&&(r=r.toString()),Qv(r),r},uParse(r){return typeof r!="string"&&(r=r.toString()),ep(r),r},enc(r){return typeof r!="string"&&(r=r.toString()),Qv(r),Du(r)},uEnc(r){return typeof r!="string"&&(r=r.toString()),ep(r),Du(r)},dec(r,n){return Zv(r,n)},uDec(r,n){return Uu(r,n)}}}function Qv(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function ep(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}var Gu=Symbol.for("@bufbuild/protobuf/text-encoding");function Wu(){if(globalThis[Gu]==null){let e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[Gu]={encodeUtf8(r){return e.encode(r)},decodeUtf8(r){return t.decode(r)},checkUtf8(r){try{return encodeURIComponent(r),!0}catch{return false}}};}return globalThis[Gu]}var lt;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32";})(lt||(lt={}));var bR=34028234663852886e22,gR=-34028234663852886e22,ER=4294967295,SR=2147483647,OR=-2147483648,L=class{constructor(t=Wu().encodeUtf8){this.encodeUtf8=t,this.stack=[],this.chunks=[],this.buf=[];}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let t=0;for(let i=0;i<this.chunks.length;i++)t+=this.chunks[i].length;let r=new Uint8Array(t),n=0;for(let i=0;i<this.chunks.length;i++)r.set(this.chunks[i],n),n+=this.chunks[i].length;return this.chunks=[],r}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),r=this.stack.pop();if(!r)throw new Error("invalid state, fork stack empty");return this.chunks=r.chunks,this.buf=r.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,r){return this.uint32((t<<3|r)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(tp(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return Hu(t),Bu(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let r=this.encodeUtf8(t);return this.uint32(r.byteLength),this.raw(r)}float(t){wR(t);let r=new Uint8Array(4);return new DataView(r.buffer).setFloat32(0,t,true),this.raw(r)}double(t){let r=new Uint8Array(8);return new DataView(r.buffer).setFloat64(0,t,true),this.raw(r)}fixed32(t){tp(t);let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t,true),this.raw(r)}sfixed32(t){Hu(t);let r=new Uint8Array(4);return new DataView(r.buffer).setInt32(0,t,true),this.raw(r)}sint32(t){return Hu(t),t=(t<<1^t>>31)>>>0,Bu(t,this.buf),this}sfixed64(t){let r=new Uint8Array(8),n=new DataView(r.buffer),i=he.enc(t);return n.setInt32(0,i.lo,true),n.setInt32(4,i.hi,true),this.raw(r)}fixed64(t){let r=new Uint8Array(8),n=new DataView(r.buffer),i=he.uEnc(t);return n.setInt32(0,i.lo,true),n.setInt32(4,i.hi,true),this.raw(r)}int64(t){let r=he.enc(t);return ko(r.lo,r.hi,this.buf),this}sint64(t){let r=he.enc(t),n=r.hi>>31,i=r.lo<<1^n,a=(r.hi<<1|r.lo>>>31)^n;return ko(i,a,this.buf),this}uint64(t){let r=he.uEnc(t);return ko(r.lo,r.hi,this.buf),this}},w=class{constructor(t,r=Wu().decodeUtf8){this.decodeUtf8=r,this.varint64=Xv,this.uint32=Yv,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength);}tag(){let t=this.uint32(),r=t>>>3,n=t&7;if(r<=0||n<0||n>5)throw new Error("illegal tag: field no "+r+" wire type "+n);return [r,n]}skip(t,r){let n=this.pos;switch(t){case lt.Varint:for(;this.buf[this.pos++]&128;);break;case lt.Bit64:this.pos+=4;case lt.Bit32:this.pos+=4;break;case lt.LengthDelimited:let i=this.uint32();this.pos+=i;break;case lt.StartGroup:for(;;){let[a,o]=this.tag();if(o===lt.EndGroup){if(r!==void 0&&a!==r)throw new Error("invalid end group tag");break}this.skip(o,a);}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return he.dec(...this.varint64())}uint64(){return he.uDec(...this.varint64())}sint64(){let[t,r]=this.varint64(),n=-(t&1);return t=(t>>>1|(r&1)<<31)^n,r=r>>>1^n,he.dec(t,r)}bool(){let[t,r]=this.varint64();return t!==0||r!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,true)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,true)}fixed64(){return he.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return he.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,true)}double(){return this.view.getFloat64((this.pos+=8)-8,true)}bytes(){let t=this.uint32(),r=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(r,r+t)}string(){return this.decodeUtf8(this.bytes())}};function Hu(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>SR||e<OR)throw new Error("invalid int32: "+e)}function tp(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>ER||e<0)throw new Error("invalid uint32: "+e)}function wR(e){if(typeof e=="string"){let t=e;if(e=Number(e),Number.isNaN(e)&&t!=="NaN")throw new Error("invalid float32: "+t)}else if(typeof e!="number")throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>bR||e<gR))throw new Error("invalid float32: "+e)}function $u(){return {fields:{}}}var on={encode(e,t=new L){return Object.entries(e.fields).forEach(([r,n])=>{n!==void 0&&Xu.encode({key:r,value:n},t.uint32(10).fork()).join();}),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=$u();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;let o=Xu.decode(r,r.uint32());o.value!==void 0&&(i.fields[o.key]=o.value);continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return on.fromPartial(e??{})},fromPartial(e){var t;let r=$u();return r.fields=Object.entries((t=e.fields)!=null?t:{}).reduce((n,[i,a])=>(a!==void 0&&(n[i]=a),n),{}),r},wrap(e){let t=$u();if(e!==void 0)for(let r of Object.keys(e))t.fields[r]=e[r];return t},unwrap(e){let t={};if(e.fields)for(let r of Object.keys(e.fields))t[r]=e.fields[r];return t}};function rp(){return {key:"",value:void 0}}var Xu={encode(e,t=new L){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&F.encode(F.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=rp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.key=r.string();continue}case 2:{if(a!==18)break;i.value=F.unwrap(F.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Xu.fromPartial(e??{})},fromPartial(e){var t,r;let n=rp();return n.key=(t=e.key)!=null?t:"",n.value=(r=e.value)!=null?r:void 0,n}};function zu(){return {nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var F={encode(e,t=new L){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&on.encode(on.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&sn.encode(sn.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=zu();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==8)break;i.nullValue=r.int32();continue}case 2:{if(a!==17)break;i.numberValue=r.double();continue}case 3:{if(a!==26)break;i.stringValue=r.string();continue}case 4:{if(a!==32)break;i.boolValue=r.bool();continue}case 5:{if(a!==42)break;i.structValue=on.unwrap(on.decode(r,r.uint32()));continue}case 6:{if(a!==50)break;i.listValue=sn.unwrap(sn.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return F.fromPartial(e??{})},fromPartial(e){var t,r,n,i,a,o;let s=zu();return s.nullValue=(t=e.nullValue)!=null?t:void 0,s.numberValue=(r=e.numberValue)!=null?r:void 0,s.stringValue=(n=e.stringValue)!=null?n:void 0,s.boolValue=(i=e.boolValue)!=null?i:void 0,s.structValue=(a=e.structValue)!=null?a:void 0,s.listValue=(o=e.listValue)!=null?o:void 0,s},wrap(e){let t=zu();if(e===null)t.nullValue=0;else if(typeof e=="boolean")t.boolValue=e;else if(typeof e=="number")t.numberValue=e;else if(typeof e=="string")t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e=="object")t.structValue=e;else if(typeof e<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function Ju(){return {values:[]}}var sn={encode(e,t=new L){for(let r of e.values)F.encode(F.wrap(r),t.uint32(10).fork()).join();return t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=Ju();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.values.push(F.unwrap(F.decode(r,r.uint32())));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return sn.fromPartial(e??{})},fromPartial(e){var t;let r=Ju();return r.values=((t=e.values)==null?void 0:t.map(n=>n))||[],r},wrap(e){let t=Ju();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e}},Ip=(e=>(e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.REPLACE=2]="REPLACE",e[e.MOVE=3]="MOVE",e[e.COPY=4]="COPY",e[e.TEST=5]="TEST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e))(Ip||{});function np(){return {op:0,path:"",from:void 0,value:void 0}}var jo={encode(e,t=new L){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==""&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&F.encode(F.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=np();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==8)break;i.op=r.int32();continue}case 2:{if(a!==18)break;i.path=r.string();continue}case 3:{if(a!==26)break;i.from=r.string();continue}case 4:{if(a!==34)break;i.value=F.unwrap(F.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return jo.fromPartial(e??{})},fromPartial(e){var t,r,n,i;let a=np();return a.op=(t=e.op)!=null?t:0,a.path=(r=e.path)!=null?r:"",a.from=(n=e.from)!=null?n:void 0,a.value=(i=e.value)!=null?i:void 0,a}};function ip(){return {id:"",type:"",function:void 0}}var Lo={encode(e,t=new L){return e.id!==""&&t.uint32(10).string(e.id),e.type!==""&&t.uint32(18).string(e.type),e.function!==void 0&&Fo.encode(e.function,t.uint32(26).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=ip();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.id=r.string();continue}case 2:{if(a!==18)break;i.type=r.string();continue}case 3:{if(a!==26)break;i.function=Fo.decode(r,r.uint32());continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Lo.fromPartial(e??{})},fromPartial(e){var t,r;let n=ip();return n.id=(t=e.id)!=null?t:"",n.type=(r=e.type)!=null?r:"",n.function=e.function!==void 0&&e.function!==null?Fo.fromPartial(e.function):void 0,n}};function ap(){return {name:"",arguments:""}}var Fo={encode(e,t=new L){return e.name!==""&&t.uint32(10).string(e.name),e.arguments!==""&&t.uint32(18).string(e.arguments),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=ap();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.name=r.string();continue}case 2:{if(a!==18)break;i.arguments=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Fo.fromPartial(e??{})},fromPartial(e){var t,r;let n=ap();return n.name=(t=e.name)!=null?t:"",n.arguments=(r=e.arguments)!=null?r:"",n}};function op(){return {id:"",role:"",content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0}}var Do={encode(e,t=new L){e.id!==""&&t.uint32(10).string(e.id),e.role!==""&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(let r of e.toolCalls)Lo.encode(r,t.uint32(42).fork()).join();return e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=op();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.id=r.string();continue}case 2:{if(a!==18)break;i.role=r.string();continue}case 3:{if(a!==26)break;i.content=r.string();continue}case 4:{if(a!==34)break;i.name=r.string();continue}case 5:{if(a!==42)break;i.toolCalls.push(Lo.decode(r,r.uint32()));continue}case 6:{if(a!==50)break;i.toolCallId=r.string();continue}case 7:{if(a!==58)break;i.error=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Do.fromPartial(e??{})},fromPartial(e){var t,r,n,i,a,o,s;let l=op();return l.id=(t=e.id)!=null?t:"",l.role=(r=e.role)!=null?r:"",l.content=(n=e.content)!=null?n:void 0,l.name=(i=e.name)!=null?i:void 0,l.toolCalls=((a=e.toolCalls)==null?void 0:a.map(u=>Lo.fromPartial(u)))||[],l.toolCallId=(o=e.toolCallId)!=null?o:void 0,l.error=(s=e.error)!=null?s:void 0,l}},xp=(e=>(e[e.TEXT_MESSAGE_START=0]="TEXT_MESSAGE_START",e[e.TEXT_MESSAGE_CONTENT=1]="TEXT_MESSAGE_CONTENT",e[e.TEXT_MESSAGE_END=2]="TEXT_MESSAGE_END",e[e.TOOL_CALL_START=3]="TOOL_CALL_START",e[e.TOOL_CALL_ARGS=4]="TOOL_CALL_ARGS",e[e.TOOL_CALL_END=5]="TOOL_CALL_END",e[e.STATE_SNAPSHOT=6]="STATE_SNAPSHOT",e[e.STATE_DELTA=7]="STATE_DELTA",e[e.MESSAGES_SNAPSHOT=8]="MESSAGES_SNAPSHOT",e[e.RAW=9]="RAW",e[e.CUSTOM=10]="CUSTOM",e[e.RUN_STARTED=11]="RUN_STARTED",e[e.RUN_FINISHED=12]="RUN_FINISHED",e[e.RUN_ERROR=13]="RUN_ERROR",e[e.STEP_STARTED=14]="STEP_STARTED",e[e.STEP_FINISHED=15]="STEP_FINISHED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e))(xp||{});function sp(){return {type:0,timestamp:void 0,rawEvent:void 0}}var x={encode(e,t=new L){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&F.encode(F.wrap(e.rawEvent),t.uint32(26).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=sp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==8)break;i.type=r.int32();continue}case 2:{if(a!==16)break;i.timestamp=AR(r.int64());continue}case 3:{if(a!==26)break;i.rawEvent=F.unwrap(F.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return x.fromPartial(e??{})},fromPartial(e){var t,r,n;let i=sp();return i.type=(t=e.type)!=null?t:0,i.timestamp=(r=e.timestamp)!=null?r:void 0,i.rawEvent=(n=e.rawEvent)!=null?n:void 0,i}};function up(){return {baseEvent:void 0,messageId:"",role:void 0}}var Uo={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=up();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.messageId=r.string();continue}case 3:{if(a!==26)break;i.role=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Uo.fromPartial(e??{})},fromPartial(e){var t,r;let n=up();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,n.messageId=(t=e.messageId)!=null?t:"",n.role=(r=e.role)!=null?r:void 0,n}};function cp(){return {baseEvent:void 0,messageId:"",delta:""}}var Vo={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),e.delta!==""&&t.uint32(26).string(e.delta),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=cp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.messageId=r.string();continue}case 3:{if(a!==26)break;i.delta=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Vo.fromPartial(e??{})},fromPartial(e){var t,r;let n=cp();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,n.messageId=(t=e.messageId)!=null?t:"",n.delta=(r=e.delta)!=null?r:"",n}};function lp(){return {baseEvent:void 0,messageId:""}}var Bo={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=lp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.messageId=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Bo.fromPartial(e??{})},fromPartial(e){var t;let r=lp();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,r.messageId=(t=e.messageId)!=null?t:"",r}};function dp(){return {baseEvent:void 0,toolCallId:"",toolCallName:"",parentMessageId:void 0}}var Go={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),e.toolCallName!==""&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=dp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.toolCallId=r.string();continue}case 3:{if(a!==26)break;i.toolCallName=r.string();continue}case 4:{if(a!==34)break;i.parentMessageId=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Go.fromPartial(e??{})},fromPartial(e){var t,r,n;let i=dp();return i.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,i.toolCallId=(t=e.toolCallId)!=null?t:"",i.toolCallName=(r=e.toolCallName)!=null?r:"",i.parentMessageId=(n=e.parentMessageId)!=null?n:void 0,i}};function fp(){return {baseEvent:void 0,toolCallId:"",delta:""}}var Wo={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),e.delta!==""&&t.uint32(26).string(e.delta),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=fp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.toolCallId=r.string();continue}case 3:{if(a!==26)break;i.delta=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Wo.fromPartial(e??{})},fromPartial(e){var t,r;let n=fp();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,n.toolCallId=(t=e.toolCallId)!=null?t:"",n.delta=(r=e.delta)!=null?r:"",n}};function vp(){return {baseEvent:void 0,toolCallId:""}}var Ho={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=vp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.toolCallId=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Ho.fromPartial(e??{})},fromPartial(e){var t;let r=vp();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,r.toolCallId=(t=e.toolCallId)!=null?t:"",r}};function pp(){return {baseEvent:void 0,snapshot:void 0}}var $o={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&F.encode(F.wrap(e.snapshot),t.uint32(18).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=pp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.snapshot=F.unwrap(F.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return $o.fromPartial(e??{})},fromPartial(e){var t;let r=pp();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,r.snapshot=(t=e.snapshot)!=null?t:void 0,r}};function hp(){return {baseEvent:void 0,delta:[]}}var zo={encode(e,t=new L){e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join();for(let r of e.delta)jo.encode(r,t.uint32(18).fork()).join();return t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=hp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.delta.push(jo.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return zo.fromPartial(e??{})},fromPartial(e){var t;let r=hp();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,r.delta=((t=e.delta)==null?void 0:t.map(n=>jo.fromPartial(n)))||[],r}};function mp(){return {baseEvent:void 0,messages:[]}}var Jo={encode(e,t=new L){e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join();for(let r of e.messages)Do.encode(r,t.uint32(18).fork()).join();return t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=mp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.messages.push(Do.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Jo.fromPartial(e??{})},fromPartial(e){var t;let r=mp();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,r.messages=((t=e.messages)==null?void 0:t.map(n=>Do.fromPartial(n)))||[],r}};function _p(){return {baseEvent:void 0,event:void 0,source:void 0}}var Xo={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&F.encode(F.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=_p();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.event=F.unwrap(F.decode(r,r.uint32()));continue}case 3:{if(a!==26)break;i.source=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Xo.fromPartial(e??{})},fromPartial(e){var t,r;let n=_p();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,n.event=(t=e.event)!=null?t:void 0,n.source=(r=e.source)!=null?r:void 0,n}};function yp(){return {baseEvent:void 0,name:"",value:void 0}}var Zo={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==""&&t.uint32(18).string(e.name),e.value!==void 0&&F.encode(F.wrap(e.value),t.uint32(26).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=yp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.name=r.string();continue}case 3:{if(a!==26)break;i.value=F.unwrap(F.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Zo.fromPartial(e??{})},fromPartial(e){var t,r;let n=yp();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,n.name=(t=e.name)!=null?t:"",n.value=(r=e.value)!=null?r:void 0,n}};function bp(){return {baseEvent:void 0,threadId:"",runId:""}}var Ko={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==""&&t.uint32(18).string(e.threadId),e.runId!==""&&t.uint32(26).string(e.runId),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=bp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.threadId=r.string();continue}case 3:{if(a!==26)break;i.runId=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Ko.fromPartial(e??{})},fromPartial(e){var t,r;let n=bp();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,n.threadId=(t=e.threadId)!=null?t:"",n.runId=(r=e.runId)!=null?r:"",n}};function gp(){return {baseEvent:void 0,threadId:"",runId:"",result:void 0}}var Yo={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==""&&t.uint32(18).string(e.threadId),e.runId!==""&&t.uint32(26).string(e.runId),e.result!==void 0&&F.encode(F.wrap(e.result),t.uint32(34).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=gp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.threadId=r.string();continue}case 3:{if(a!==26)break;i.runId=r.string();continue}case 4:{if(a!==34)break;i.result=F.unwrap(F.decode(r,r.uint32()));continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Yo.fromPartial(e??{})},fromPartial(e){var t,r,n;let i=gp();return i.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,i.threadId=(t=e.threadId)!=null?t:"",i.runId=(r=e.runId)!=null?r:"",i.result=(n=e.result)!=null?n:void 0,i}};function Ep(){return {baseEvent:void 0,code:void 0,message:""}}var Qo={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==""&&t.uint32(26).string(e.message),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=Ep();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.code=r.string();continue}case 3:{if(a!==26)break;i.message=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return Qo.fromPartial(e??{})},fromPartial(e){var t,r;let n=Ep();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,n.code=(t=e.code)!=null?t:void 0,n.message=(r=e.message)!=null?r:"",n}};function Sp(){return {baseEvent:void 0,stepName:""}}var es={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==""&&t.uint32(18).string(e.stepName),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=Sp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.stepName=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return es.fromPartial(e??{})},fromPartial(e){var t;let r=Sp();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,r.stepName=(t=e.stepName)!=null?t:"",r}};function Op(){return {baseEvent:void 0,stepName:""}}var ts={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==""&&t.uint32(18).string(e.stepName),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=Op();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.stepName=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return ts.fromPartial(e??{})},fromPartial(e){var t;let r=Op();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,r.stepName=(t=e.stepName)!=null?t:"",r}};function wp(){return {baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0}}var rs={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=wp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.messageId=r.string();continue}case 3:{if(a!==26)break;i.role=r.string();continue}case 4:{if(a!==34)break;i.delta=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return rs.fromPartial(e??{})},fromPartial(e){var t,r,n;let i=wp();return i.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,i.messageId=(t=e.messageId)!=null?t:void 0,i.role=(r=e.role)!=null?r:void 0,i.delta=(n=e.delta)!=null?n:void 0,i}};function Ap(){return {baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0}}var ns={encode(e,t=new L){return e.baseEvent!==void 0&&x.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=Ap();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.baseEvent=x.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.toolCallId=r.string();continue}case 3:{if(a!==26)break;i.toolCallName=r.string();continue}case 4:{if(a!==34)break;i.parentMessageId=r.string();continue}case 5:{if(a!==42)break;i.delta=r.string();continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return ns.fromPartial(e??{})},fromPartial(e){var t,r,n,i;let a=Ap();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?x.fromPartial(e.baseEvent):void 0,a.toolCallId=(t=e.toolCallId)!=null?t:void 0,a.toolCallName=(r=e.toolCallName)!=null?r:void 0,a.parentMessageId=(n=e.parentMessageId)!=null?n:void 0,a.delta=(i=e.delta)!=null?i:void 0,a}};function Tp(){return {textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0}}var qp={encode(e,t=new L){return e.textMessageStart!==void 0&&Uo.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&Vo.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&Bo.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&Go.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&Wo.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&Ho.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&$o.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&zo.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&Jo.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&Xo.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&Zo.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&Ko.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&Yo.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&Qo.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&es.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&ts.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&rs.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&ns.encode(e.toolCallChunk,t.uint32(146).fork()).join(),t},decode(e,t){let r=e instanceof w?e:new w(e),n=t===void 0?r.len:r.pos+t,i=Tp();for(;r.pos<n;){let a=r.uint32();switch(a>>>3){case 1:{if(a!==10)break;i.textMessageStart=Uo.decode(r,r.uint32());continue}case 2:{if(a!==18)break;i.textMessageContent=Vo.decode(r,r.uint32());continue}case 3:{if(a!==26)break;i.textMessageEnd=Bo.decode(r,r.uint32());continue}case 4:{if(a!==34)break;i.toolCallStart=Go.decode(r,r.uint32());continue}case 5:{if(a!==42)break;i.toolCallArgs=Wo.decode(r,r.uint32());continue}case 6:{if(a!==50)break;i.toolCallEnd=Ho.decode(r,r.uint32());continue}case 7:{if(a!==58)break;i.stateSnapshot=$o.decode(r,r.uint32());continue}case 8:{if(a!==66)break;i.stateDelta=zo.decode(r,r.uint32());continue}case 9:{if(a!==74)break;i.messagesSnapshot=Jo.decode(r,r.uint32());continue}case 10:{if(a!==82)break;i.raw=Xo.decode(r,r.uint32());continue}case 11:{if(a!==90)break;i.custom=Zo.decode(r,r.uint32());continue}case 12:{if(a!==98)break;i.runStarted=Ko.decode(r,r.uint32());continue}case 13:{if(a!==106)break;i.runFinished=Yo.decode(r,r.uint32());continue}case 14:{if(a!==114)break;i.runError=Qo.decode(r,r.uint32());continue}case 15:{if(a!==122)break;i.stepStarted=es.decode(r,r.uint32());continue}case 16:{if(a!==130)break;i.stepFinished=ts.decode(r,r.uint32());continue}case 17:{if(a!==138)break;i.textMessageChunk=rs.decode(r,r.uint32());continue}case 18:{if(a!==146)break;i.toolCallChunk=ns.decode(r,r.uint32());continue}}if((a&7)===4||a===0)break;r.skip(a&7);}return i},create(e){return qp.fromPartial(e??{})},fromPartial(e){let t=Tp();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?Uo.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?Vo.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?Bo.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?Go.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?Wo.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?Ho.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?$o.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?zo.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?Jo.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?Xo.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?Zo.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?Ko.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?Yo.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?Qo.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?es.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?ts.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?rs.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?ns.fromPartial(e.toolCallChunk):void 0,t}};function AR(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(t<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return t}function TR(e){return e.toLowerCase().replace(/_([a-z])/g,(t,r)=>r.toUpperCase())}function Pp(e){let t=TR(e.type),{type:r,timestamp:n,rawEvent:i,...a}=e;r===j.MESSAGES_SNAPSHOT&&(a.messages=a.messages.map(s=>s.toolCalls===void 0?{...s,toolCalls:[]}:s)),r===j.STATE_DELTA&&(a.delta=a.delta.map(s=>({...s,op:Ip[s.op.toUpperCase()]})));let o={[t]:{baseEvent:{type:xp[e.type],timestamp:n,rawEvent:i},...a}};return qp.encode(o).finish()}var Mr="application/vnd.ag-ui.event+proto";var Te=v.enum(["TextMessageStart","TextMessageContent","TextMessageEnd","ActionExecutionStart","ActionExecutionArgs","ActionExecutionEnd","ActionExecutionResult","AgentStateMessage","MetaEvent","RunStarted","RunFinished","RunError","NodeStarted","NodeFinished"]),IR=v.enum(["LangGraphInterruptEvent","PredictState","Exit"]),xR=v.object({type:v.literal(Te.enum.TextMessageStart),messageId:v.string(),parentMessageId:v.string().optional(),role:v.string().optional()}),qR=v.object({type:v.literal(Te.enum.TextMessageContent),messageId:v.string(),content:v.string()}),PR=v.object({type:v.literal(Te.enum.TextMessageEnd),messageId:v.string()}),NR=v.object({type:v.literal(Te.enum.ActionExecutionStart),actionExecutionId:v.string(),actionName:v.string(),parentMessageId:v.string().optional()}),RR=v.object({type:v.literal(Te.enum.ActionExecutionArgs),actionExecutionId:v.string(),args:v.string()}),CR=v.object({type:v.literal(Te.enum.ActionExecutionEnd),actionExecutionId:v.string()}),MR=v.object({type:v.literal(Te.enum.ActionExecutionResult),actionName:v.string(),actionExecutionId:v.string(),result:v.string()}),kR=v.object({type:v.literal(Te.enum.AgentStateMessage),threadId:v.string(),agentName:v.string(),nodeName:v.string(),runId:v.string(),active:v.boolean(),role:v.string(),state:v.string(),running:v.boolean()}),jR=v.object({type:v.literal(Te.enum.MetaEvent),name:IR,value:v.any()}),LR=v.object({type:v.literal(Te.enum.RunError),message:v.string(),code:v.string().optional()});v.discriminatedUnion("type",[xR,qR,PR,NR,RR,CR,MR,kR,jR,LR]);v.object({id:v.string(),role:v.string(),content:v.string(),parentMessageId:v.string().optional()});v.object({id:v.string(),name:v.string(),arguments:v.any(),parentMessageId:v.string().optional()});v.object({id:v.string(),result:v.any(),actionExecutionId:v.string(),actionName:v.string()});function is(e){let t=[],r=new Map,n=new Map;for(let i of e)if(i.type===j.TEXT_MESSAGE_START){let a=i,o=a.messageId;r.has(o)||r.set(o,{contents:[],otherEvents:[]});let s=r.get(o);s.start=a;}else if(i.type===j.TEXT_MESSAGE_CONTENT){let a=i,o=a.messageId;r.has(o)||r.set(o,{contents:[],otherEvents:[]}),r.get(o).contents.push(a);}else if(i.type===j.TEXT_MESSAGE_END){let a=i,o=a.messageId;r.has(o)||r.set(o,{contents:[],otherEvents:[]});let s=r.get(o);s.end=a,Np(o,s,t),r.delete(o);}else if(i.type===j.TOOL_CALL_START){let a=i,o=a.toolCallId;n.has(o)||n.set(o,{args:[],otherEvents:[]});let s=n.get(o);s.start=a;}else if(i.type===j.TOOL_CALL_ARGS){let a=i,o=a.toolCallId;n.has(o)||n.set(o,{args:[],otherEvents:[]}),n.get(o).args.push(a);}else if(i.type===j.TOOL_CALL_END){let a=i,o=a.toolCallId;n.has(o)||n.set(o,{args:[],otherEvents:[]});let s=n.get(o);s.end=a,Rp(o,s,t),n.delete(o);}else {let a=false;for(let[o,s]of r)if(s.start&&!s.end){s.otherEvents.push(i),a=true;break}if(!a){for(let[o,s]of n)if(s.start&&!s.end){s.otherEvents.push(i),a=true;break}}a||t.push(i);}for(let[i,a]of r)Np(i,a,t);for(let[i,a]of n)Rp(i,a,t);return t}function Np(e,t,r){if(t.start&&r.push(t.start),t.contents.length>0){let n=t.contents.map(a=>a.delta).join(""),i={type:j.TEXT_MESSAGE_CONTENT,messageId:e,delta:n};r.push(i);}t.end&&r.push(t.end);for(let n of t.otherEvents)r.push(n);}function Rp(e,t,r){if(t.start&&r.push(t.start),t.args.length>0){let n=t.args.map(a=>a.delta).join(""),i={type:j.TOOL_CALL_ARGS,toolCallId:e,delta:n};r.push(i);}t.end&&r.push(t.end);for(let n of t.otherEvents)r.push(n);}Qu(Mp());function kp(){return Cu()}var jp="Run stopped by user",GR="Run ended without emitting a terminal event";function ss(e,t={}){let{stopRequested:r=false,interruptionMessage:n}=t,i=n??jp,a=n&&n!==jp?n:GR,o=[],s=new Set,l=new Map;for(let m of e)switch(m.type){case j.TEXT_MESSAGE_START:{let _=m.messageId;typeof _=="string"&&s.add(_);break}case j.TEXT_MESSAGE_END:{let _=m.messageId;typeof _=="string"&&s.delete(_);break}case j.TOOL_CALL_START:{let _=m.toolCallId;typeof _=="string"&&l.set(_,{hasEnd:false,hasResult:false});break}case j.TOOL_CALL_END:{let _=m.toolCallId,b=_?l.get(_):void 0;b&&(b.hasEnd=true);break}case j.TOOL_CALL_RESULT:{let _=m.toolCallId,b=_?l.get(_):void 0;b&&(b.hasResult=true);break}}let u=e.some(m=>m.type===j.RUN_FINISHED),d=e.some(m=>m.type===j.RUN_ERROR),h=!(u||d);for(let m of s){let _={type:j.TEXT_MESSAGE_END,messageId:m};e.push(_),o.push(_);}for(let[m,_]of l){if(!_.hasEnd){let b={type:j.TOOL_CALL_END,toolCallId:m};e.push(b),o.push(b);}if(h&&!_.hasResult){let b={type:j.TOOL_CALL_RESULT,toolCallId:m,messageId:`${m??kp()}-result`,role:"tool",content:JSON.stringify(r?{status:"stopped",reason:"stop_requested",message:i}:{status:"error",reason:"missing_terminal_event",message:a})};e.push(b),o.push(b);}}if(h)if(r){let m={type:j.RUN_FINISHED};e.push(m),o.push(m);}else {let m={type:j.RUN_ERROR,message:a,code:"INCOMPLETE_STREAM"};e.push(m),o.push(m);}return o}var us=console;var cs=Qu(Wv());var Yu=class{constructor(t){this.threadId=t;}subject=null;isRunning=false;currentRunId=null;historicRuns=[];agent=null;runSubject=null;stopRequested=false;currentEvents=null},un=new Map,ls=class extends cn{run(t){let r=un.get(t.threadId);r||(r=new Yu(t.threadId),un.set(t.threadId,r));let n=r;if(n.isRunning)throw new Error("Thread already running");n.isRunning=true,n.currentRunId=t.input.runId,n.agent=t.agent,n.stopRequested=false;let i=new Set,a=[];n.currentEvents=a;let o=new Set;for(let p of n.historicRuns)for(let h of p.events)if("messageId"in h&&typeof h.messageId=="string"&&o.add(h.messageId),h.type===j.RUN_STARTED){let _=h.input?.messages??[];for(let b of _)o.add(b.id);}let s=new cs.ReplaySubject(1/0),l=n.subject;n.subject=s;let u=new cs.ReplaySubject(1/0);n.runSubject=u;let d=async()=>{let h=n.historicRuns[n.historicRuns.length-1]?.runId??null;try{await t.agent.runAgent(t.input,{onEvent:({event:_})=>{let b=_;if(_.type===j.RUN_STARTED){let O=_;if(!O.input){let q=t.input.messages?t.input.messages.filter(Y=>!o.has(Y.id)):void 0,U={...t.input,...q!==void 0?{messages:q}:{}};b={...O,input:U};}}u.next(b),s.next(b),a.push(b);},onNewMessage:({message:_})=>{i.has(_.id)||i.add(_.id);},onRunStartedEvent:()=>{if(t.input.messages)for(let _ of t.input.messages)i.has(_.id)||i.add(_.id);}});let m=ss(a,{stopRequested:n.stopRequested});for(let _ of m)u.next(_),s.next(_);if(n.currentRunId){let _=is(a);n.historicRuns.push({threadId:t.threadId,runId:n.currentRunId,parentRunId:h,events:_,createdAt:Date.now()});}n.currentEvents=null,n.currentRunId=null,n.agent=null,n.runSubject=null,n.stopRequested=!1,n.isRunning=!1,u.complete(),s.complete();}catch{let m=ss(a,{stopRequested:n.stopRequested});for(let _ of m)u.next(_),s.next(_);if(n.currentRunId&&a.length>0){let _=is(a);n.historicRuns.push({threadId:t.threadId,runId:n.currentRunId,parentRunId:h,events:_,createdAt:Date.now()});}n.currentEvents=null,n.currentRunId=null,n.agent=null,n.runSubject=null,n.stopRequested=false,n.isRunning=false,u.complete(),s.complete();}};return l&&l.subscribe({next:p=>s.next(p),error:p=>s.error(p),complete:()=>{}}),d(),u.asObservable()}connect(t){let r=un.get(t.threadId),n=new cs.ReplaySubject(1/0);if(!r)return n.complete(),n.asObservable();let i=[];for(let s of r.historicRuns)i.push(...s.events);let a=is(i),o=new Set;for(let s of a)n.next(s),"messageId"in s&&typeof s.messageId=="string"&&o.add(s.messageId);return r.subject&&(r.isRunning||r.stopRequested)?r.subject.subscribe({next:s=>{"messageId"in s&&typeof s.messageId=="string"&&o.has(s.messageId)||n.next(s);},complete:()=>n.complete(),error:s=>n.error(s)}):n.complete(),n.asObservable()}isRunning(t){let r=un.get(t.threadId);return Promise.resolve(r?.isRunning??false)}stop(t){let r=un.get(t.threadId);if(!r||!r.isRunning||r.stopRequested)return Promise.resolve(false);r.stopRequested=true,r.isRunning=false;let n=r.agent;if(!n)return r.stopRequested=false,r.isRunning=false,Promise.resolve(false);try{return n.abortRun(),Promise.resolve(!0)}catch(i){return console.error("Failed to abort agent run",i),r.stopRequested=false,r.isRunning=true,Promise.resolve(false)}}};var Lp={version:"0.0.22-alpha.2"};var Dp=Lp.version,Fp=class{agents;transcriptionService;beforeRequestMiddleware;afterRequestMiddleware;runner;constructor({agents:t,transcriptionService:r,beforeRequestMiddleware:n,afterRequestMiddleware:i,runner:a}){this.agents=t,this.transcriptionService=r,this.beforeRequestMiddleware=n,this.afterRequestMiddleware=i,this.runner=a??new ls;}};function HR(e,t){let r=zR(e===void 0?"*/*":e||"");if(!t)return r.filter(i=>i.q>0).sort((i,a)=>a.q-i.q||a.i-i.i||0).map(KR);let n=t.map(function(a,o){return JR(a,r,o)});return n.filter(i=>i.q>0).sort(ZR).map(function(a){return t[n.indexOf(a)]})}var $R=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function zR(e){let t=QR(e),r=[];for(let n=0,i=0;n<t.length;n++){let a=Up(t[n].trim(),n);a&&(r[i++]=a);}return r}function Up(e,t){let r=$R.exec(e);if(!r)return null;let n=Object.create(null),i=1,a=r[2],o=r[1];if(r[3]){let s=eC(r[3]).map(YR);for(let l=0;l<s.length;l++){let u=s[l],d=u[0].toLowerCase(),p=u[1],h=p&&p[0]==='"'&&p[p.length-1]==='"'?p.slice(1,-1):p;if(d==="q"){i=parseFloat(h);break}n[d]=h;}}return {type:o,subtype:a,params:n,q:i,i:t}}function JR(e,t,r){let n={o:-1,q:0,s:0};for(let i=0;i<t.length;i++){let a=XR(e,t[i],r);a&&(n.s-a.s||n.q-a.q||n.o-a.o)<0&&(n.o=a.o,n.q=a.q,n.s=a.s,n.i=a.i);}return n}function XR(e,t,r){let n=Up(e,0),i=0;if(!n)return null;if(t.type.toLowerCase()==n.type.toLowerCase())i|=4;else if(t.type!="*")return null;if(t.subtype.toLowerCase()==n.subtype.toLowerCase())i|=2;else if(t.subtype!="*")return null;let a=Object.keys(t.params);if(a.length>0)if(a.every(function(o){return t.params[o]=="*"||(t.params[o]||"").toLowerCase()==(n.params[o]||"").toLowerCase()}))i|=1;else return null;return {i:r,o:t.i,q:t.q,s:i}}function ZR(e,t){return t.q-e.q||t.s-e.s||(e.o||0)-(t.o||0)||(e.i||0)-(t.i||0)||0}function KR(e){return e.type+"/"+e.subtype}function Vp(e){let t=0,r=0;for(;(r=e.indexOf('"',r))!==-1;)t++,r++;return t}function YR(e){let t=e.indexOf("="),r,n="";return t===-1?r=e:(r=e.slice(0,t),n=e.slice(t+1)),[r,n]}function QR(e){let t=e.split(","),r=[t[0]];for(let n=1,i=0;n<t.length;n++)Vp(r[i])%2==0?r[++i]=t[n]:r[i]+=","+t[n];return r}function eC(e){let t=e.split(";"),r=[t[0]];for(let n=1,i=0;n<t.length;n++)Vp(r[i])%2==0?r[++i]=t[n]:r[i]+=";"+t[n];for(let n=0;n<r.length;n++)r[n]=r[n].trim();return r}var ds=class{constructor(e){this.acceptsProtobuf=e?.accept?this.isProtobufAccepted(e.accept):false;}getContentType(){return this.acceptsProtobuf?Mr:"text/event-stream"}encode(e){return this.encodeSSE(e)}encodeSSE(e){return `data: ${JSON.stringify(e)}
|
|
6
|
+
|
|
7
|
+
`}encodeBinary(e){if(this.acceptsProtobuf)return this.encodeProtobuf(e);{let t=this.encodeSSE(e);return new TextEncoder().encode(t)}}encodeProtobuf(e){let t=Pp(e),r=t.length,n=new ArrayBuffer(4+r);new DataView(n).setUint32(0,r,false);let a=new Uint8Array(n);return a.set(t,4),a}isProtobufAccepted(e){return HR(e,[Mr]).includes(Mr)}};async function R2({runtime:e,request:t,agentId:r}){try{let n=await e.agents;if(!n[r])return new Response(JSON.stringify({error:"Agent not found",message:`Agent '${r}' does not exist`}),{status:404,headers:{"Content-Type":"application/json"}});let a=n[r].clone();if(a&&"headers"in a){let d=h=>{let m=h.toLowerCase();return m==="authorization"||m.startsWith("x-")},p={};t.headers.forEach((h,m)=>{d(m)&&(p[m]=h);}),a.headers={...a.headers,...p};}let o=new TransformStream,s=o.writable.getWriter(),l=new ds,u=!1;return (async()=>{let d;try{let p=await t.json();d=Dr.parse(p);}catch{return new Response(JSON.stringify({error:"Invalid request body"}),{status:400})}a.setMessages(d.messages),a.setState(d.state),a.threadId=d.threadId,e.runner.run({threadId:d.threadId,agent:a,input:d}).subscribe({next:async p=>{if(!t.signal.aborted&&!u)try{await s.write(l.encode(p));}catch(h){h instanceof Error&&h.name==="AbortError"&&(u=!0);}},error:async p=>{if(console.error("Error running agent:",p),!u)try{await s.close(),u=!0;}catch{}},complete:async()=>{if(!u)try{await s.close(),u=!0;}catch{}}});})().catch(d=>{if(console.error("Error running agent:",d),console.error("Error stack:",d instanceof Error?d.stack:"No stack trace"),console.error("Error details:",{name:d instanceof Error?d.name:"Unknown",message:d instanceof Error?d.message:String(d),cause:d instanceof Error?d.cause:void 0}),!u)try{s.close(),u=!0;}catch{}}),new Response(o.readable,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}catch(n){return console.error("Error running agent:",n),console.error("Error stack:",n instanceof Error?n.stack:"No stack trace"),console.error("Error details:",{name:n instanceof Error?n.name:"Unknown",message:n instanceof Error?n.message:String(n),cause:n instanceof Error?n.cause:void 0}),new Response(JSON.stringify({error:"Failed to run agent",message:n instanceof Error?n.message:"Unknown error"}),{status:500,headers:{"Content-Type":"application/json"}})}}async function L2({runtime:e,request:t,agentId:r}){try{if(!(await e.agents)[r])return new Response(JSON.stringify({error:"Agent not found",message:`Agent '${r}' does not exist`}),{status:404,headers:{"Content-Type":"application/json"}});let i=new TransformStream,a=i.writable.getWriter(),o=new ds,s=!1;return (async()=>{let l;try{let u=await t.json();l=Dr.parse(u);}catch{return new Response(JSON.stringify({error:"Invalid request body"}),{status:400})}e.runner.connect({threadId:l.threadId}).subscribe({next:async u=>{if(!t.signal.aborted&&!s)try{await a.write(o.encode(u));}catch(d){d instanceof Error&&d.name==="AbortError"&&(s=!0);}},error:async u=>{if(console.error("Error running agent:",u),!s)try{await a.close(),s=!0;}catch{}},complete:async()=>{if(!s)try{await a.close(),s=!0;}catch{}}});})().catch(l=>{if(console.error("Error running agent:",l),console.error("Error stack:",l instanceof Error?l.stack:"No stack trace"),console.error("Error details:",{name:l instanceof Error?l.name:"Unknown",message:l instanceof Error?l.message:String(l),cause:l instanceof Error?l.cause:void 0}),!s)try{a.close(),s=!0;}catch{}}),new Response(i.readable,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}catch(n){return console.error("Error running agent:",n),console.error("Error stack:",n instanceof Error?n.stack:"No stack trace"),console.error("Error details:",{name:n instanceof Error?n.name:"Unknown",message:n instanceof Error?n.message:String(n),cause:n instanceof Error?n.cause:void 0}),new Response(JSON.stringify({error:"Failed to run agent",message:n instanceof Error?n.message:"Unknown error"}),{status:500,headers:{"Content-Type":"application/json"}})}}async function U2({runtime:e,request:t,agentId:r,threadId:n}){try{return (await e.agents)[r]?await e.runner.stop({threadId:n})?new Response(JSON.stringify({stopped:!0,interrupt:{type:j.RUN_ERROR,message:"Run stopped by user",code:"STOPPED"}}),{status:200,headers:{"Content-Type":"application/json"}}):new Response(JSON.stringify({stopped:!1,message:`No active run for thread '${n}'.`}),{status:200,headers:{"Content-Type":"application/json"}}):new Response(JSON.stringify({error:"Agent not found",message:`Agent '${r}' does not exist`}),{status:404,headers:{"Content-Type":"application/json"}})}catch(i){return console.error("Error stopping agent run:",i),new Response(JSON.stringify({error:"Failed to stop agent",message:i instanceof Error?i.message:"Unknown error"}),{status:500,headers:{"Content-Type":"application/json"}})}}async function G2({runtime:e}){try{let t=await e.agents,r=Object.entries(t).reduce((i,[a,o])=>(i[a]={name:a,description:o.description,className:o.constructor.name},i),{}),n={version:Dp,agents:r,audioFileTranscriptionEnabled:!!e.transcriptionService};return new Response(JSON.stringify(n),{status:200,headers:{"Content-Type":"application/json"}})}catch(t){return new Response(JSON.stringify({error:"Failed to retrieve runtime information",message:t instanceof Error?t.message:"Unknown error"}),{status:500,headers:{"Content-Type":"application/json"}})}}async function H2({runtime:e,request:t}){try{if(!e.transcriptionService)return new Response(JSON.stringify({error:"Transcription service not configured",message:"No transcription service has been configured in the runtime"}),{status:503,headers:{"Content-Type":"application/json"}});let r=t.headers.get("content-type");if(!r||!r.includes("multipart/form-data"))return new Response(JSON.stringify({error:"Invalid content type",message:"Request must contain multipart/form-data with an audio file"}),{status:400,headers:{"Content-Type":"application/json"}});let i=(await t.formData()).get("audio");if(!i||!(i instanceof File))return new Response(JSON.stringify({error:"Missing audio file",message:"No audio file found in form data. Please include an 'audio' field."}),{status:400,headers:{"Content-Type":"application/json"}});let a=["audio/mpeg","audio/mp3","audio/mp4","audio/wav","audio/webm","audio/ogg","audio/flac","audio/aac"];if(!(a.includes(i.type)||i.type===""||i.type==="application/octet-stream"))return new Response(JSON.stringify({error:"Invalid file type",message:`Unsupported audio file type: ${i.type}. Supported types: ${a.join(", ")}, or files with unknown/empty types`}),{status:400,headers:{"Content-Type":"application/json"}});let s=await e.transcriptionService.transcribeFile({audioFile:i,mimeType:i.type,size:i.size});return new Response(JSON.stringify({text:s,size:i.size,type:i.type}),{status:200,headers:{"Content-Type":"application/json"}})}catch(r){return new Response(JSON.stringify({error:"Transcription failed",message:r instanceof Error?r.message:"Unknown error occurred during transcription"}),{status:500,headers:{"Content-Type":"application/json"}})}}async function J2({runtime:e,request:t,path:r}){let n=e.beforeRequestMiddleware;if(n){if(typeof n=="function")return n({runtime:e,request:t,path:r});us.warn({mw:n},"Unsupported beforeRequestMiddleware value \u2013 skipped");}}async function X2({runtime:e,response:t,path:r}){let n=e.afterRequestMiddleware;if(n){if(typeof n=="function")return n({runtime:e,response:t,path:r});us.warn({mw:n},"Unsupported afterRequestMiddleware value \u2013 skipped");}}var tC=["agent/run","agent/connect","agent/stop","info","transcribe"];async function K2(e){if(!(e.headers.get("content-type")||"").includes("application/json"))throw kr("Single-route endpoint expects JSON payloads",415);let r;try{r=await e.clone().json();}catch{throw kr("Invalid JSON payload",400)}return {method:rC(r.method),params:r.params,body:r.body}}function Y2(e,t){let r=e?.[t];if(typeof r=="string"&&r.trim().length>0)return r;throw kr(`Missing or invalid parameter '${t}'`,400)}function Q2(e,t){if(t==null)throw kr("Missing request body for JSON handler",400);let r=new Headers(e.headers);r.set("content-type","application/json"),r.delete("content-length");let n=nC(t);return new Request(e.url,{method:"POST",headers:r,body:n,signal:e.signal})}function kr(e,t){return new Response(JSON.stringify({error:"invalid_request",message:e}),{status:t,headers:{"Content-Type":"application/json"}})}function rC(e){if(!e)throw kr("Missing method field",400);if(tC.includes(e))return e;throw kr(`Unsupported method '${e}'`,400)}function nC(e){return typeof e=="string"||e instanceof Blob||e instanceof ArrayBuffer||e instanceof Uint8Array||e instanceof FormData||e instanceof URLSearchParams?e:JSON.stringify(e)}/*! Bundled license information:
|
|
8
|
+
|
|
9
|
+
fast-json-patch/module/helpers.mjs:
|
|
10
|
+
(*!
|
|
11
|
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
12
|
+
* (c) 2017-2022 Joachim Wester
|
|
13
|
+
* MIT licensed
|
|
14
|
+
*)
|
|
15
|
+
|
|
16
|
+
fast-json-patch/module/duplex.mjs:
|
|
17
|
+
(*!
|
|
18
|
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
19
|
+
* (c) 2017-2021 Joachim Wester
|
|
20
|
+
* MIT license
|
|
21
|
+
*)
|
|
22
|
+
*/export{iC as a,f as b,Qu as c,R2 as d,L2 as e,U2 as f,cn as g,us as h,ss as i,ls as j,Dp as k,Fp as l,G2 as m,H2 as n,J2 as o,X2 as p,K2 as q,Y2 as r,Q2 as s};//# sourceMappingURL=chunk-PXQQQ6KP.mjs.map
|
|
23
|
+
//# sourceMappingURL=chunk-PXQQQ6KP.mjs.map
|