nemar-cli 0.10.10-dev.2961 → 0.10.10-dev.2967

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ Calls to async() callback can have unexpected results.`);return m=!0,function(v,
31
31
  `):"",this.name="UnsubscriptionError",this.errors=r}})});var Zo=g(function(K$){Object.defineProperty(K$,"__esModule",{value:!0});K$.arrRemove=void 0;function sse(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}K$.arrRemove=sse});var Kr=g(function(Or){var J$=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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},X$=Or&&Or.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},Z$=Or&&Or.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Or,"__esModule",{value:!0});Or.isSubscription=Or.EMPTY_SUBSCRIPTION=Or.Subscription=void 0;var mu=rt(),Nb=Tb(),Q$=Zo(),jb=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=J$(s),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(y){t={error:y}}finally{try{if(c&&!c.done&&(r=a.return))r.call(a)}finally{if(t)throw t.error}}else s.remove(this);var d=this.initialTeardown;if(mu.isFunction(d))try{d()}catch(y){i=y instanceof Nb.UnsubscriptionError?y.errors:[y]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var m=J$(f),p=m.next();!p.done;p=m.next()){var h=p.value;try{eC(h)}catch(y){if(i=i!==null&&i!==void 0?i:[],y instanceof Nb.UnsubscriptionError)i=Z$(Z$([],X$(i)),X$(y.errors));else i.push(y)}}}catch(y){n={error:y}}finally{try{if(p&&!p.done&&(o=m.return))o.call(m)}finally{if(n)throw n.error}}}if(i)throw new Nb.UnsubscriptionError(i)}},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;if(r===t)this._parentage=null;else if(Array.isArray(r))Q$.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;if(r&&Q$.arrRemove(r,t),t instanceof e)t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Or.Subscription=jb;Or.EMPTY_SUBSCRIPTION=jb.EMPTY;function ase(e){return e instanceof jb||e&&"closed"in e&&mu.isFunction(e.remove)&&mu.isFunction(e.add)&&mu.isFunction(e.unsubscribe)}Or.isSubscription=ase;function eC(e){if(mu.isFunction(e))e();else e.unsubscribe()}});var Za=g(function(tC){Object.defineProperty(tC,"__esModule",{value:!0});tC.config=void 0;tC.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var qb=g(function(lo){var nC=lo&&lo.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},oC=lo&&lo.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(lo,"__esModule",{value:!0});lo.timeoutProvider=void 0;lo.timeoutProvider={setTimeout:function(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=lo.timeoutProvider.delegate;if(o===null||o===void 0?void 0:o.setTimeout)return o.setTimeout.apply(o,oC([e,t],nC(r)));return setTimeout.apply(void 0,oC([e,t],nC(r)))},clearTimeout:function(e){var t=lo.timeoutProvider.delegate;return((t===null||t===void 0?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}});var Mb=g(function(iC){Object.defineProperty(iC,"__esModule",{value:!0});iC.reportUnhandledError=void 0;var cse=Za(),lse=qb();function use(e){lse.timeoutProvider.setTimeout(function(){var t=cse.config.onUnhandledError;if(t)t(e);else throw e})}iC.reportUnhandledError=use});var Ht=g(function(aC){Object.defineProperty(aC,"__esModule",{value:!0});aC.noop=void 0;function dse(){}aC.noop=dse});var dC=g(function(lC){Object.defineProperty(lC,"__esModule",{value:!0});lC.createNotification=lC.nextNotification=lC.errorNotification=lC.COMPLETE_NOTIFICATION=void 0;lC.COMPLETE_NOTIFICATION=function(){return qp("C",void 0,void 0)}();function fse(e){return qp("E",void 0,e)}lC.errorNotification=fse;function pse(e){return qp("N",e,void 0)}lC.nextNotification=pse;function qp(e,t,r){return{kind:e,value:t,error:r}}lC.createNotification=qp});var Mp=g(function(pC){Object.defineProperty(pC,"__esModule",{value:!0});pC.captureError=pC.errorContext=void 0;var fC=Za(),Ks=null;function yse(e){if(fC.config.useDeprecatedSynchronousErrorHandling){var t=!Ks;if(t)Ks={errorThrown:!1,error:null};if(e(),t){var r=Ks,{errorThrown:n,error:o}=r;if(Ks=null,n)throw o}}else e()}pC.errorContext=yse;function bse(e){if(fC.config.useDeprecatedSynchronousErrorHandling&&Ks)Ks.errorThrown=!0,Ks.error=e}pC.captureError=bse});var Qa=g(function(Fn){var yC=Fn&&Fn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(Fn,"__esModule",{value:!0});Fn.EMPTY_OBSERVER=Fn.SafeSubscriber=Fn.Subscriber=void 0;var _se=rt(),hC=Kr(),zb=Za(),vse=Mb(),gC=Ht(),Lb=dC(),wse=qb(),Dse=Mp(),bC=function(e){yC(t,e);function t(r){var n=e.call(this)||this;if(n.isStopped=!1,r){if(n.destination=r,hC.isSubscription(r))r.add(n)}else n.destination=Fn.EMPTY_OBSERVER;return n}return t.create=function(r,n,o){return new xC(r,n,o)},t.prototype.next=function(r){if(this.isStopped)Ub(Lb.nextNotification(r),this);else this._next(r)},t.prototype.error=function(r){if(this.isStopped)Ub(Lb.errorNotification(r),this);else this.isStopped=!0,this._error(r)},t.prototype.complete=function(){if(this.isStopped)Ub(Lb.COMPLETE_NOTIFICATION,this);else this.isStopped=!0,this._complete()},t.prototype.unsubscribe=function(){if(!this.closed)this.isStopped=!0,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}(hC.Subscription);Fn.Subscriber=bC;var Ese=Function.prototype.bind;function Bb(e,t){return Ese.call(e,t)}var Sse=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){Lp(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Lp(n)}else Lp(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Lp(r)}},e}(),xC=function(e){yC(t,e);function t(r,n,o){var i=e.call(this)||this,s;if(_se.isFunction(r)||!r)s={next:r!==null&&r!==void 0?r:void 0,error:n!==null&&n!==void 0?n:void 0,complete:o!==null&&o!==void 0?o:void 0};else{var a;if(i&&zb.config.useDeprecatedNextContext)a=Object.create(r),a.unsubscribe=function(){return i.unsubscribe()},s={next:r.next&&Bb(r.next,a),error:r.error&&Bb(r.error,a),complete:r.complete&&Bb(r.complete,a)};else s=r}return i.destination=new Sse(s),i}return t}(bC);Fn.SafeSubscriber=xC;function Lp(e){if(zb.config.useDeprecatedSynchronousErrorHandling)Dse.captureError(e);else vse.reportUnhandledError(e)}function $se(e){throw e}function Ub(e,t){var r=zb.config.onStoppedNotification;r&&wse.timeoutProvider.setTimeout(function(){return r(e,t)})}Fn.EMPTY_OBSERVER={closed:!0,next:gC.noop,error:$se,complete:gC.noop}});var hu=g(function(_C){Object.defineProperty(_C,"__esModule",{value:!0});_C.observable=void 0;_C.observable=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}()});var Wt=g(function(wC){Object.defineProperty(wC,"__esModule",{value:!0});wC.identity=void 0;function Cse(e){return e}wC.identity=Cse});var gu=g(function(SC){Object.defineProperty(SC,"__esModule",{value:!0});SC.pipeFromArray=SC.pipe=void 0;var kse=Wt();function Rse(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return EC(e)}SC.pipe=Rse;function EC(e){if(e.length===0)return kse.identity;if(e.length===1)return e[0];return function(r){return e.reduce(function(n,o){return o(n)},r)}}SC.pipeFromArray=EC});var nt=g(function(kC){Object.defineProperty(kC,"__esModule",{value:!0});kC.Observable=void 0;var Gb=Qa(),Ose=Kr(),Fse=hu(),Pse=gu(),Ise=Za(),Vb=rt(),Tse=Mp(),Nse=function(){function e(t){if(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 o=this,i=qse(t)?t:new Gb.SafeSubscriber(t,r,n);return Tse.errorContext(function(){var s=o,{operator:a,source:c}=s;i.add(a?a.call(i,c):c?o._subscribe(i):o._trySubscribe(i))}),i},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=CC(r),new r(function(o,i){var s=new Gb.SafeSubscriber({next:function(a){try{t(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:o});n.subscribe(s)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[Fse.observable]=function(){return this},e.prototype.pipe=function(){var t=[];for(var r=0;r<arguments.length;r++)t[r]=arguments[r];return Pse.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=CC(t),new t(function(n,o){var i;r.subscribe(function(s){return i=s},function(s){return o(s)},function(){return n(i)})})},e.create=function(t){return new e(t)},e}();kC.Observable=Nse;function CC(e){var t;return(t=e!==null&&e!==void 0?e:Ise.config.Promise)!==null&&t!==void 0?t:Promise}function jse(e){return e&&Vb.isFunction(e.next)&&Vb.isFunction(e.error)&&Vb.isFunction(e.complete)}function qse(e){return e&&e instanceof Gb.Subscriber||jse(e)&&Ose.isSubscription(e)}});var H=g(function(OC){Object.defineProperty(OC,"__esModule",{value:!0});OC.operate=OC.hasLift=void 0;var Mse=rt();function AC(e){return Mse.isFunction(e===null||e===void 0?void 0:e.lift)}OC.hasLift=AC;function Lse(e){return function(t){if(AC(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw TypeError("Unable to lift unknown Observable type")}}OC.operate=Lse});var oe=g(function(Ui){var Use=Ui&&Ui.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(Ui,"__esModule",{value:!0});Ui.OperatorSubscriber=Ui.createOperatorSubscriber=void 0;var zse=Qa();function Vse(e,t,r,n,o){return new PC(e,t,r,n,o)}Ui.createOperatorSubscriber=Vse;var PC=function(e){Use(t,e);function t(r,n,o,i,s,a){var c=e.call(this,r)||this;return c.onFinalize=s,c.shouldUnsubscribe=a,c._next=n?function(u){try{n(u)}catch(d){r.error(d)}}:e.prototype._next,c._error=i?function(u){try{i(u)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=o?function(){try{o()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}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}(zse.Subscriber);Ui.OperatorSubscriber=PC});var Hb=g(function(IC){Object.defineProperty(IC,"__esModule",{value:!0});IC.refCount=void 0;var Gse=H(),Hse=oe();function Wse(){return Gse.operate(function(e,t){var r=null;e._refCount++;var n=Hse.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var o=e._connection,i=r;if(r=null,o&&(!i||o===i))o.unsubscribe();t.unsubscribe()});if(e.subscribe(n),!n.closed)r=e.connect()})}IC.refCount=Wse});var yu=g(function(ec){var Kse=ec&&ec.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(ec,"__esModule",{value:!0});ec.ConnectableObservable=void 0;var Yse=nt(),NC=Kr(),Jse=Hb(),Xse=oe(),Zse=H(),Qse=function(e){Kse(t,e);function t(r,n){var o=e.call(this)||this;if(o.source=r,o.subjectFactory=n,o._subject=null,o._refCount=0,o._connection=null,Zse.hasLift(r))o.lift=r.lift;return o}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;if(!r||r.isStopped)this._subject=this.subjectFactory();return this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r===null||r===void 0||r.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new NC.Subscription;var o=this.getSubject();if(n.add(this.source.subscribe(Xse.createOperatorSubscriber(o,void 0,function(){r._teardown(),o.complete()},function(i){r._teardown(),o.error(i)},function(){return r._teardown()}))),n.closed)this._connection=null,n=NC.Subscription.EMPTY}return n},t.prototype.refCount=function(){return Jse.refCount()(this)},t}(Yse.Observable);ec.ConnectableObservable=Qse});var qC=g(function(jC){Object.defineProperty(jC,"__esModule",{value:!0});jC.performanceTimestampProvider=void 0;jC.performanceTimestampProvider={now:function(){return(jC.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Kb=g(function(Pn){var MC=Pn&&Pn.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},LC=Pn&&Pn.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.animationFrameProvider=void 0;var eae=Kr();Pn.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=Pn.animationFrameProvider.delegate;if(n)t=n.requestAnimationFrame,r=n.cancelAnimationFrame;var o=t(function(i){r=void 0,e(i)});return new eae.Subscription(function(){return r===null||r===void 0?void 0:r(o)})},requestAnimationFrame:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Pn.animationFrameProvider.delegate;return((r===null||r===void 0?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,LC([],MC(e)))},cancelAnimationFrame:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Pn.animationFrameProvider.delegate;return((r===null||r===void 0?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,LC([],MC(e)))},delegate:void 0}});var GC=g(function(zC){Object.defineProperty(zC,"__esModule",{value:!0});zC.animationFrames=void 0;var tae=nt(),rae=qC(),BC=Kb();function nae(e){return e?UC(e):oae}zC.animationFrames=nae;function UC(e){return new tae.Observable(function(t){var r=e||rae.performanceTimestampProvider,n=r.now(),o=0,i=function(){if(!t.closed)o=BC.animationFrameProvider.requestAnimationFrame(function(s){o=0;var a=r.now();t.next({timestamp:e?a:s,elapsed:a-n}),i()})};return i(),function(){if(o)BC.animationFrameProvider.cancelAnimationFrame(o)}})}var oae=UC()});var Yb=g(function(HC){Object.defineProperty(HC,"__esModule",{value:!0});HC.ObjectUnsubscribedError=void 0;var iae=Bi();HC.ObjectUnsubscribedError=iae.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var Kt=g(function(uo){var YC=uo&&uo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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)}}(),sae=uo&&uo.__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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(uo,"__esModule",{value:!0});uo.AnonymousSubject=uo.Subject=void 0;var KC=nt(),Xb=Kr(),aae=Yb(),cae=Zo(),Jb=Mp(),JC=function(e){YC(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new Zb(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new aae.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Jb.errorContext(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){if(!n.currentObservers)n.currentObservers=Array.from(n.observers);try{for(var s=sae(n.currentObservers),a=s.next();!a.done;a=s.next()){var c=a.value;c.next(r)}}catch(u){o={error:u}}finally{try{if(a&&!a.done&&(i=s.return))i.call(s)}finally{if(o)throw o.error}}}})},t.prototype.error=function(r){var n=this;Jb.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;var o=n.observers;while(o.length)o.shift().error(r)}})},t.prototype.complete=function(){var r=this;Jb.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;var n=r.observers;while(n.length)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,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:!1,configurable:!0}),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,o=this,{hasError:i,isStopped:s,observers:a}=o;if(i||s)return Xb.EMPTY_SUBSCRIPTION;return this.currentObservers=null,a.push(r),new Xb.Subscription(function(){n.currentObservers=null,cae.arrRemove(a,r)})},t.prototype._checkFinalizedStatuses=function(r){var n=this,{hasError:o,thrownError:i,isStopped:s}=n;if(o)r.error(i);else if(s)r.complete()},t.prototype.asObservable=function(){var r=new KC.Observable;return r.source=this,r},t.create=function(r,n){return new Zb(r,n)},t}(KC.Observable);uo.Subject=JC;var Zb=function(e){YC(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.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,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:Xb.EMPTY_SUBSCRIPTION},t}(JC);uo.AnonymousSubject=Zb});var Qb=g(function(tc){var lae=tc&&tc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(tc,"__esModule",{value:!0});tc.BehaviorSubject=void 0;var uae=Kt(),dae=function(e){lae(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:!1,configurable:!0}),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,{hasError:n,thrownError:o,_value:i}=r;if(n)throw o;return this._throwIfClosed(),i},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(uae.Subject);tc.BehaviorSubject=dae});var Bp=g(function(XC){Object.defineProperty(XC,"__esModule",{value:!0});XC.dateTimestampProvider=void 0;XC.dateTimestampProvider={now:function(){return(XC.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Up=g(function(rc){var fae=rc&&rc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(rc,"__esModule",{value:!0});rc.ReplaySubject=void 0;var pae=Kt(),mae=Bp(),hae=function(e){fae(t,e);function t(r,n,o){if(r===void 0)r=1/0;if(n===void 0)n=1/0;if(o===void 0)o=mae.dateTimestampProvider;var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=n,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(r){var n=this,{isStopped:o,_buffer:i,_infiniteTimeWindow:s,_timestampProvider:a,_windowTime:c}=n;if(!o)i.push(r),!s&&i.push(a.now()+c);this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();var n=this._innerSubscribe(r),o=this,{_infiniteTimeWindow:i,_buffer:s}=o,a=s.slice();for(var c=0;c<a.length&&!r.closed;c+=i?1:2)r.next(a[c]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,{_bufferSize:n,_timestampProvider:o,_buffer:i,_infiniteTimeWindow:s}=r,a=(s?1:2)*n;if(n<1/0&&a<i.length&&i.splice(0,i.length-a),!s){var c=o.now(),u=0;for(var d=1;d<i.length&&i[d]<=c;d+=2)u=d;u&&i.splice(0,u+1)}},t}(pae.Subject);rc.ReplaySubject=hae});var zp=g(function(nc){var gae=nc&&nc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(nc,"__esModule",{value:!0});nc.AsyncSubject=void 0;var yae=Kt(),bae=function(e){gae(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,{hasError:o,_hasValue:i,_value:s,thrownError:a,isStopped:c,_isComplete:u}=n;if(o)r.error(a);else if(c||u)i&&r.next(s),r.complete()},t.prototype.next=function(r){if(!this.isStopped)this._value=r,this._hasValue=!0},t.prototype.complete=function(){var r=this,{_hasValue:n,_value:o,_isComplete:i}=r;if(!i)this._isComplete=!0,n&&e.prototype.next.call(this,o),e.prototype.complete.call(this)},t}(yae.Subject);nc.AsyncSubject=bae});var ZC=g(function(oc){var xae=oc&&oc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(oc,"__esModule",{value:!0});oc.Action=void 0;var _ae=Kr(),vae=function(e){xae(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;return this},t}(_ae.Subscription);oc.Action=vae});var tk=g(function(fo){var QC=fo&&fo.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},ek=fo&&fo.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(fo,"__esModule",{value:!0});fo.intervalProvider=void 0;fo.intervalProvider={setInterval:function(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=fo.intervalProvider.delegate;if(o===null||o===void 0?void 0:o.setInterval)return o.setInterval.apply(o,ek([e,t],QC(r)));return setInterval.apply(void 0,ek([e,t],QC(r)))},clearInterval:function(e){var t=fo.intervalProvider.delegate;return((t===null||t===void 0?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0}});var sc=g(function(ic){var wae=ic&&ic.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(ic,"__esModule",{value:!0});ic.AsyncAction=void 0;var Dae=ZC(),rk=tk(),Eae=Zo(),Sae=function(e){wae(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o.pending=!1,o}return t.prototype.schedule=function(r,n){var o;if(n===void 0)n=0;if(this.closed)return this;this.state=r;var i=this.id,s=this.scheduler;if(i!=null)this.id=this.recycleAsyncId(s,i,n);return this.pending=!0,this.delay=n,this.id=(o=this.id)!==null&&o!==void 0?o:this.requestAsyncId(s,this.id,n),this},t.prototype.requestAsyncId=function(r,n,o){if(o===void 0)o=0;return rk.intervalProvider.setInterval(r.flush.bind(r,this),o)},t.prototype.recycleAsyncId=function(r,n,o){if(o===void 0)o=0;if(o!=null&&this.delay===o&&this.pending===!1)return n;if(n!=null)rk.intervalProvider.clearInterval(n);return},t.prototype.execute=function(r,n){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var o=this._execute(r,n);if(o)return o;else if(this.pending===!1&&this.id!=null)this.id=this.recycleAsyncId(this.scheduler,this.id,null)},t.prototype._execute=function(r,n){var o=!1,i;try{this.work(r)}catch(s){o=!0,i=s?s:Error("Scheduled action threw falsy error")}if(o)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,{id:n,scheduler:o}=r,i=o.actions;if(this.work=this.state=this.scheduler=null,this.pending=!1,Eae.arrRemove(i,this),n!=null)this.id=this.recycleAsyncId(o,n,null);this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Dae.Action);ic.AsyncAction=Sae});var sk=g(function(ok){Object.defineProperty(ok,"__esModule",{value:!0});ok.TestTools=ok.Immediate=void 0;var $ae=1,tx,Vp={};function nk(e){if(e in Vp)return delete Vp[e],!0;return!1}ok.Immediate={setImmediate:function(e){var t=$ae++;if(Vp[t]=!0,!tx)tx=Promise.resolve();return tx.then(function(){return nk(t)&&e()}),t},clearImmediate:function(e){nk(e)}};ok.TestTools={pending:function(){return Object.keys(Vp).length}}});var ck=g(function(po){var kae=po&&po.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},Rae=po&&po.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(po,"__esModule",{value:!0});po.immediateProvider=void 0;var ak=sk(),Aae=ak.Immediate.setImmediate,Oae=ak.Immediate.clearImmediate;po.immediateProvider={setImmediate:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=po.immediateProvider.delegate;return((r===null||r===void 0?void 0:r.setImmediate)||Aae).apply(void 0,Rae([],kae(e)))},clearImmediate:function(e){var t=po.immediateProvider.delegate;return((t===null||t===void 0?void 0:t.clearImmediate)||Oae)(e)},delegate:void 0}});var uk=g(function(ac){var Fae=ac&&ac.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(ac,"__esModule",{value:!0});ac.AsapAction=void 0;var Pae=sc(),lk=ck(),Iae=function(e){Fae(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o}return t.prototype.requestAsyncId=function(r,n,o){if(o===void 0)o=0;if(o!==null&&o>0)return e.prototype.requestAsyncId.call(this,r,n,o);return r.actions.push(this),r._scheduled||(r._scheduled=lk.immediateProvider.setImmediate(r.flush.bind(r,void 0)))},t.prototype.recycleAsyncId=function(r,n,o){var i;if(o===void 0)o=0;if(o!=null?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,o);var s=r.actions;if(n!=null&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==n){if(lk.immediateProvider.clearImmediate(n),r._scheduled===n)r._scheduled=void 0}return},t}(Pae.AsyncAction);ac.AsapAction=Iae});var rx=g(function(dk){Object.defineProperty(dk,"__esModule",{value:!0});dk.Scheduler=void 0;var Tae=Bp(),Nae=function(){function e(t,r){if(r===void 0)r=e.now;this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){if(r===void 0)r=0;return new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=Tae.dateTimestampProvider.now,e}();dk.Scheduler=Nae});var lc=g(function(cc){var jae=cc&&cc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(cc,"__esModule",{value:!0});cc.AsyncScheduler=void 0;var pk=rx(),qae=function(e){jae(t,e);function t(r,n){if(n===void 0)n=pk.Scheduler.now;var o=e.call(this,r,n)||this;return o.actions=[],o._active=!1,o}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var o;this._active=!0;do if(o=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,o){while(r=n.shift())r.unsubscribe();throw o}},t}(pk.Scheduler);cc.AsyncScheduler=qae});var mk=g(function(uc){var Mae=uc&&uc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(uc,"__esModule",{value:!0});uc.AsapScheduler=void 0;var Lae=lc(),Bae=function(e){Mae(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var o=this.actions,i;r=r||o.shift();do if(i=r.execute(r.state,r.delay))break;while((r=o[0])&&r.id===n&&o.shift());if(this._active=!1,i){while((r=o[0])&&r.id===n&&o.shift())r.unsubscribe();throw i}},t}(Lae.AsyncScheduler);uc.AsapScheduler=Bae});var bk=g(function(hk){Object.defineProperty(hk,"__esModule",{value:!0});hk.asap=hk.asapScheduler=void 0;var Uae=uk(),zae=mk();hk.asapScheduler=new zae.AsapScheduler(Uae.AsapAction);hk.asap=hk.asapScheduler});var Fr=g(function(xk){Object.defineProperty(xk,"__esModule",{value:!0});xk.async=xk.asyncScheduler=void 0;var Vae=sc(),Gae=lc();xk.asyncScheduler=new Gae.AsyncScheduler(Vae.AsyncAction);xk.async=xk.asyncScheduler});var wk=g(function(dc){var Hae=dc&&dc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(dc,"__esModule",{value:!0});dc.QueueAction=void 0;var Wae=sc(),Kae=function(e){Hae(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;if(n>0)return e.prototype.schedule.call(this,r,n);return 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,o){if(o===void 0)o=0;if(o!=null&&o>0||o==null&&this.delay>0)return e.prototype.requestAsyncId.call(this,r,n,o);return r.flush(this),0},t}(Wae.AsyncAction);dc.QueueAction=Kae});var Dk=g(function(fc){var Yae=fc&&fc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(fc,"__esModule",{value:!0});fc.QueueScheduler=void 0;var Jae=lc(),Xae=function(e){Yae(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Jae.AsyncScheduler);fc.QueueScheduler=Xae});var Ck=g(function(Ek){Object.defineProperty(Ek,"__esModule",{value:!0});Ek.queue=Ek.queueScheduler=void 0;var Zae=wk(),Qae=Dk();Ek.queueScheduler=new Qae.QueueScheduler(Zae.QueueAction);Ek.queue=Ek.queueScheduler});var Rk=g(function(pc){var ece=pc&&pc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(pc,"__esModule",{value:!0});pc.AnimationFrameAction=void 0;var tce=sc(),kk=Kb(),rce=function(e){ece(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o}return t.prototype.requestAsyncId=function(r,n,o){if(o===void 0)o=0;if(o!==null&&o>0)return e.prototype.requestAsyncId.call(this,r,n,o);return r.actions.push(this),r._scheduled||(r._scheduled=kk.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)}))},t.prototype.recycleAsyncId=function(r,n,o){var i;if(o===void 0)o=0;if(o!=null?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,o);var s=r.actions;if(n!=null&&n===r._scheduled&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==n)kk.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0;return},t}(tce.AsyncAction);pc.AnimationFrameAction=rce});var Ak=g(function(mc){var nce=mc&&mc.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(mc,"__esModule",{value:!0});mc.AnimationFrameScheduler=void 0;var oce=lc(),ice=function(e){nce(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n;if(r)n=r.id;else n=this._scheduled,this._scheduled=void 0;var o=this.actions,i;r=r||o.shift();do if(i=r.execute(r.state,r.delay))break;while((r=o[0])&&r.id===n&&o.shift());if(this._active=!1,i){while((r=o[0])&&r.id===n&&o.shift())r.unsubscribe();throw i}},t}(oce.AsyncScheduler);mc.AnimationFrameScheduler=ice});var Ik=g(function(Ok){Object.defineProperty(Ok,"__esModule",{value:!0});Ok.animationFrame=Ok.animationFrameScheduler=void 0;var sce=Rk(),ace=Ak();Ok.animationFrameScheduler=new ace.AnimationFrameScheduler(sce.AnimationFrameAction);Ok.animationFrame=Ok.animationFrameScheduler});var jk=g(function(zi){var Tk=zi&&zi.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[i]=o[i]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw 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(zi,"__esModule",{value:!0});zi.VirtualAction=zi.VirtualTimeScheduler=void 0;var cce=sc(),lce=Kr(),uce=lc(),dce=function(e){Tk(t,e);function t(r,n){if(r===void 0)r=Nk;if(n===void 0)n=1/0;var o=e.call(this,r,function(){return o.frame})||this;return o.maxFrames=n,o.frame=0,o.index=-1,o}return t.prototype.flush=function(){var r=this,{actions:n,maxFrames:o}=r,i,s;while((s=n[0])&&s.delay<=o)if(n.shift(),this.frame=s.delay,i=s.execute(s.state,s.delay))break;if(i){while(s=n.shift())s.unsubscribe();throw i}},t.frameTimeFactor=10,t}(uce.AsyncScheduler);zi.VirtualTimeScheduler=dce;var Nk=function(e){Tk(t,e);function t(r,n,o){if(o===void 0)o=r.index+=1;var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.index=o,i.active=!0,i.index=r.index=o,i}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;if(Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(r,n)}else return lce.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,o){if(o===void 0)o=0;this.delay=r.frame+o;var i=r.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,o){if(o===void 0)o=0;return},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){if(r.delay===n.delay)if(r.index===n.index)return 0;else if(r.index>n.index)return 1;else return-1;else if(r.delay>n.delay)return 1;else return-1},t}(cce.AsyncAction);zi.VirtualAction=Nk});var In=g(function(Mk){Object.defineProperty(Mk,"__esModule",{value:!0});Mk.empty=Mk.EMPTY=void 0;var qk=nt();Mk.EMPTY=new qk.Observable(function(e){return e.complete()});function fce(e){return e?pce(e):Mk.EMPTY}Mk.empty=fce;function pce(e){return new qk.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var bu=g(function(Uk){Object.defineProperty(Uk,"__esModule",{value:!0});Uk.isScheduler=void 0;var mce=rt();function hce(e){return e&&mce.isFunction(e.schedule)}Uk.isScheduler=hce});var Pr=g(function(Vk){Object.defineProperty(Vk,"__esModule",{value:!0});Vk.popNumber=Vk.popScheduler=Vk.popResultSelector=void 0;var gce=rt(),yce=bu();function nx(e){return e[e.length-1]}function bce(e){return gce.isFunction(nx(e))?e.pop():void 0}Vk.popResultSelector=bce;function xce(e){return yce.isScheduler(nx(e))?e.pop():void 0}Vk.popScheduler=xce;function _ce(e,t){return typeof nx(e)==="number"?e.pop():t}Vk.popNumber=_ce});var Gp=g(function(Hk){Object.defineProperty(Hk,"__esModule",{value:!0});Hk.isArrayLike=void 0;Hk.isArrayLike=function(e){return e&&typeof e.length==="number"&&typeof e!=="function"}});var ox=g(function(Kk){Object.defineProperty(Kk,"__esModule",{value:!0});Kk.isPromise=void 0;var Dce=rt();function Ece(e){return Dce.isFunction(e===null||e===void 0?void 0:e.then)}Kk.isPromise=Ece});var ix=g(function(Jk){Object.defineProperty(Jk,"__esModule",{value:!0});Jk.isInteropObservable=void 0;var Sce=hu(),$ce=rt();function Cce(e){return $ce.isFunction(e[Sce.observable])}Jk.isInteropObservable=Cce});var sx=g(function(Zk){Object.defineProperty(Zk,"__esModule",{value:!0});Zk.isAsyncIterable=void 0;var kce=rt();function Rce(e){return Symbol.asyncIterator&&kce.isFunction(e===null||e===void 0?void 0:e[Symbol.asyncIterator])}Zk.isAsyncIterable=Rce});var ax=g(function(eR){Object.defineProperty(eR,"__esModule",{value:!0});eR.createInvalidObservableTypeError=void 0;function Ace(e){return 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.")}eR.createInvalidObservableTypeError=Ace});var cx=g(function(nR){Object.defineProperty(nR,"__esModule",{value:!0});nR.iterator=nR.getSymbolIterator=void 0;function rR(){if(typeof Symbol!=="function"||!Symbol.iterator)return"@@iterator";return Symbol.iterator}nR.getSymbolIterator=rR;nR.iterator=rR()});var lx=g(function(iR){Object.defineProperty(iR,"__esModule",{value:!0});iR.isIterable=void 0;var Fce=cx(),Pce=rt();function Ice(e){return Pce.isFunction(e===null||e===void 0?void 0:e[Fce.iterator])}iR.isIterable=Ice});var Hp=g(function(un){var Tce=un&&un.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if((i=r.trys,!(i=i.length>0&&i[i.length-1]))&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}if(i[2])r.ops.pop();r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],o=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},hc=un&&un.__await||function(e){return this instanceof hc?(this.v=e,this):new hc(e)},Nce=un&&un.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(m){if(n[m])o[m]=function(p){return new Promise(function(h,y){i.push([m,p,h,y])>1||a(m,p)})}}function a(m,p){try{c(n[m](p))}catch(h){f(i[0][3],h)}}function c(m){m.value instanceof hc?Promise.resolve(m.value.v).then(u,d):f(i[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function f(m,p){if(m(p),i.shift(),i.length)a(i[0][0],i[0][1])}};Object.defineProperty(un,"__esModule",{value:!0});un.isReadableStreamLike=un.readableStreamLikeToAsyncGenerator=void 0;var jce=rt();function qce(e){return Nce(this,arguments,function(){var r,n,o,i;return Tce(this,function(s){switch(s.label){case 0:r=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,hc(r.read())];case 3:if(n=s.sent(),o=n.value,i=n.done,!i)return[3,5];return[4,hc(void 0)];case 4:return[2,s.sent()];case 5:return[4,hc(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}un.readableStreamLikeToAsyncGenerator=qce;function Mce(e){return jce.isFunction(e===null||e===void 0?void 0:e.getReader)}un.isReadableStreamLike=Mce});var we=g(function(gt){var Lce=gt&&gt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(d){try{u(n.next(d))}catch(f){s(f)}}function c(d){try{u(n.throw(d))}catch(f){s(f)}}function u(d){d.done?i(d.value):o(d.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},Bce=gt&&gt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if((i=r.trys,!(i=i.length>0&&i[i.length-1]))&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}if(i[2])r.ops.pop();r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],o=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Uce=gt&&gt.__asyncValues||function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof ux==="function"?ux(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(u){i({value:u,done:a})},s)}},ux=gt&&gt.__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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(gt,"__esModule",{value:!0});gt.fromReadableStreamLike=gt.fromAsyncIterable=gt.fromIterable=gt.fromPromise=gt.fromArrayLike=gt.fromInteropObservable=gt.innerFrom=void 0;var zce=Gp(),Vce=ox(),gc=nt(),Gce=ix(),Hce=sx(),Wce=ax(),Kce=lx(),aR=Hp(),Yce=rt(),Jce=Mb(),Xce=hu();function Zce(e){if(e instanceof gc.Observable)return e;if(e!=null){if(Gce.isInteropObservable(e))return cR(e);if(zce.isArrayLike(e))return lR(e);if(Vce.isPromise(e))return uR(e);if(Hce.isAsyncIterable(e))return dx(e);if(Kce.isIterable(e))return dR(e);if(aR.isReadableStreamLike(e))return fR(e)}throw Wce.createInvalidObservableTypeError(e)}gt.innerFrom=Zce;function cR(e){return new gc.Observable(function(t){var r=e[Xce.observable]();if(Yce.isFunction(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")})}gt.fromInteropObservable=cR;function lR(e){return new gc.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}gt.fromArrayLike=lR;function uR(e){return new gc.Observable(function(t){e.then(function(r){if(!t.closed)t.next(r),t.complete()},function(r){return t.error(r)}).then(null,Jce.reportUnhandledError)})}gt.fromPromise=uR;function dR(e){return new gc.Observable(function(t){var r,n;try{for(var o=ux(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(t.next(s),t.closed)return}}catch(a){r={error:a}}finally{try{if(i&&!i.done&&(n=o.return))n.call(o)}finally{if(r)throw r.error}}t.complete()})}gt.fromIterable=dR;function dx(e){return new gc.Observable(function(t){Qce(e,t).catch(function(r){return t.error(r)})})}gt.fromAsyncIterable=dx;function fR(e){return dx(aR.readableStreamLikeToAsyncGenerator(e))}gt.fromReadableStreamLike=fR;function Qce(e,t){var r,n,o,i;return Lce(this,void 0,void 0,function(){var s,a;return Bce(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=Uce(e),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(s=n.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),o={error:a},[3,11];case 6:if(c.trys.push([6,,9,10]),!(n&&!n.done&&(i=r.return)))return[3,8];return[4,i.call(r)];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}});var Qo=g(function(pR){Object.defineProperty(pR,"__esModule",{value:!0});pR.executeSchedule=void 0;function ele(e,t,r,n,o){if(n===void 0)n=0;if(o===void 0)o=!1;var i=t.schedule(function(){if(r(),o)e.add(this.schedule(null,n));else this.unsubscribe()},n);if(e.add(i),!o)return i}pR.executeSchedule=ele});var xu=g(function(hR){Object.defineProperty(hR,"__esModule",{value:!0});hR.observeOn=void 0;var fx=Qo(),tle=H(),rle=oe();function nle(e,t){if(t===void 0)t=0;return tle.operate(function(r,n){r.subscribe(rle.createOperatorSubscriber(n,function(o){return fx.executeSchedule(n,e,function(){return n.next(o)},t)},function(){return fx.executeSchedule(n,e,function(){return n.complete()},t)},function(o){return fx.executeSchedule(n,e,function(){return n.error(o)},t)}))})}hR.observeOn=nle});var _u=g(function(yR){Object.defineProperty(yR,"__esModule",{value:!0});yR.subscribeOn=void 0;var ole=H();function ile(e,t){if(t===void 0)t=0;return ole.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}yR.subscribeOn=ile});var vR=g(function(xR){Object.defineProperty(xR,"__esModule",{value:!0});xR.scheduleObservable=void 0;var sle=we(),ale=xu(),cle=_u();function lle(e,t){return sle.innerFrom(e).pipe(cle.subscribeOn(t),ale.observeOn(t))}xR.scheduleObservable=lle});var ER=g(function(wR){Object.defineProperty(wR,"__esModule",{value:!0});wR.schedulePromise=void 0;var ule=we(),dle=xu(),fle=_u();function ple(e,t){return ule.innerFrom(e).pipe(fle.subscribeOn(t),dle.observeOn(t))}wR.schedulePromise=ple});var CR=g(function(SR){Object.defineProperty(SR,"__esModule",{value:!0});SR.scheduleArray=void 0;var mle=nt();function hle(e,t){return new mle.Observable(function(r){var n=0;return t.schedule(function(){if(n===e.length)r.complete();else if(r.next(e[n++]),!r.closed)this.schedule()})})}SR.scheduleArray=hle});var px=g(function(RR){Object.defineProperty(RR,"__esModule",{value:!0});RR.scheduleIterable=void 0;var gle=nt(),yle=cx(),ble=rt(),kR=Qo();function xle(e,t){return new gle.Observable(function(r){var n;return kR.executeSchedule(r,t,function(){n=e[yle.iterator](),kR.executeSchedule(r,t,function(){var o,i,s;try{o=n.next(),i=o.value,s=o.done}catch(a){r.error(a);return}if(s)r.complete();else r.next(i)},0,!0)}),function(){return ble.isFunction(n===null||n===void 0?void 0:n.return)&&n.return()}})}RR.scheduleIterable=xle});var mx=g(function(FR){Object.defineProperty(FR,"__esModule",{value:!0});FR.scheduleAsyncIterable=void 0;var _le=nt(),OR=Qo();function vle(e,t){if(!e)throw Error("Iterable cannot be null");return new _le.Observable(function(r){OR.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();OR.executeSchedule(r,t,function(){n.next().then(function(o){if(o.done)r.complete();else r.next(o.value)})},0,!0)})})}FR.scheduleAsyncIterable=vle});var NR=g(function(IR){Object.defineProperty(IR,"__esModule",{value:!0});IR.scheduleReadableStreamLike=void 0;var wle=mx(),Dle=Hp();function Ele(e,t){return wle.scheduleAsyncIterable(Dle.readableStreamLikeToAsyncGenerator(e),t)}IR.scheduleReadableStreamLike=Ele});var hx=g(function(jR){Object.defineProperty(jR,"__esModule",{value:!0});jR.scheduled=void 0;var Sle=vR(),$le=ER(),Cle=CR(),kle=px(),Rle=mx(),Ale=ix(),Ole=ox(),Fle=Gp(),Ple=lx(),Ile=sx(),Tle=ax(),Nle=Hp(),jle=NR();function qle(e,t){if(e!=null){if(Ale.isInteropObservable(e))return Sle.scheduleObservable(e,t);if(Fle.isArrayLike(e))return Cle.scheduleArray(e,t);if(Ole.isPromise(e))return $le.schedulePromise(e,t);if(Ile.isAsyncIterable(e))return Rle.scheduleAsyncIterable(e,t);if(Ple.isIterable(e))return kle.scheduleIterable(e,t);if(Nle.isReadableStreamLike(e))return jle.scheduleReadableStreamLike(e,t)}throw Tle.createInvalidObservableTypeError(e)}jR.scheduled=qle});var ei=g(function(MR){Object.defineProperty(MR,"__esModule",{value:!0});MR.from=void 0;var Mle=hx(),Lle=we();function Ble(e,t){return t?Mle.scheduled(e,t):Lle.innerFrom(e)}MR.from=Ble});var Wp=g(function(BR){Object.defineProperty(BR,"__esModule",{value:!0});BR.of=void 0;var Ule=Pr(),zle=ei();function Vle(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ule.popScheduler(e);return zle.from(e,r)}BR.of=Vle});var gx=g(function(zR){Object.defineProperty(zR,"__esModule",{value:!0});zR.throwError=void 0;var Gle=nt(),Hle=rt();function Wle(e,t){var r=Hle.isFunction(e)?e:function(){return e},n=function(o){return o.error(r())};return new Gle.Observable(t?function(o){return t.schedule(n,0,o)}:n)}zR.throwError=Wle});var Kp=g(function(WR){Object.defineProperty(WR,"__esModule",{value:!0});WR.observeNotification=WR.Notification=WR.NotificationKind=void 0;var Kle=In(),Yle=Wp(),Jle=gx(),Xle=rt(),Zle;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(Zle=WR.NotificationKind||(WR.NotificationKind={}));var Qle=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 HR(this,t)},e.prototype.do=function(t,r,n){var o=this,{kind:i,value:s,error:a}=o;return i==="N"?t===null||t===void 0?void 0:t(s):i==="E"?r===null||r===void 0?void 0:r(a):n===null||n===void 0?void 0:n()},e.prototype.accept=function(t,r,n){var o;return Xle.isFunction((o=t)===null||o===void 0?void 0:o.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,{kind:r,value:n,error:o}=t,i=r==="N"?Yle.of(n):r==="E"?Jle.throwError(function(){return o}):r==="C"?Kle.EMPTY:0;if(!i)throw TypeError("Unexpected notification kind "+r);return i},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}();WR.Notification=Qle;function HR(e,t){var r,n,o,i=e,{kind:s,value:a,error:c}=i;if(typeof s!=="string")throw TypeError('Invalid notification, missing "kind"');s==="N"?(r=t.next)===null||r===void 0||r.call(t,a):s==="E"?(n=t.error)===null||n===void 0||n.call(t,c):(o=t.complete)===null||o===void 0||o.call(t)}WR.observeNotification=HR});var ZR=g(function(JR){Object.defineProperty(JR,"__esModule",{value:!0});JR.isObservable=void 0;var tue=nt(),YR=rt();function rue(e){return!!e&&(e instanceof tue.Observable||YR.isFunction(e.lift)&&YR.isFunction(e.subscribe))}JR.isObservable=rue});var Vi=g(function(QR){Object.defineProperty(QR,"__esModule",{value:!0});QR.EmptyError=void 0;var nue=Bi();QR.EmptyError=nue.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var nA=g(function(tA){Object.defineProperty(tA,"__esModule",{value:!0});tA.lastValueFrom=void 0;var oue=Vi();function iue(e,t){var r=typeof t==="object";return new Promise(function(n,o){var i=!1,s;e.subscribe({next:function(a){s=a,i=!0},error:o,complete:function(){if(i)n(s);else if(r)n(t.defaultValue);else o(new oue.EmptyError)}})})}tA.lastValueFrom=iue});var sA=g(function(oA){Object.defineProperty(oA,"__esModule",{value:!0});oA.firstValueFrom=void 0;var sue=Vi(),aue=Qa();function cue(e,t){var r=typeof t==="object";return new Promise(function(n,o){var i=new aue.SafeSubscriber({next:function(s){n(s),i.unsubscribe()},error:o,complete:function(){if(r)n(t.defaultValue);else o(new sue.EmptyError)}});e.subscribe(i)})}oA.firstValueFrom=cue});var yx=g(function(aA){Object.defineProperty(aA,"__esModule",{value:!0});aA.ArgumentOutOfRangeError=void 0;var lue=Bi();aA.ArgumentOutOfRangeError=lue.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var bx=g(function(lA){Object.defineProperty(lA,"__esModule",{value:!0});lA.NotFoundError=void 0;var uue=Bi();lA.NotFoundError=uue.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var xx=g(function(dA){Object.defineProperty(dA,"__esModule",{value:!0});dA.SequenceError=void 0;var due=Bi();dA.SequenceError=due.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var Yp=g(function(pA){Object.defineProperty(pA,"__esModule",{value:!0});pA.isValidDate=void 0;function fue(e){return e instanceof Date&&!isNaN(e)}pA.isValidDate=fue});var Jp=g(function(hA){Object.defineProperty(hA,"__esModule",{value:!0});hA.timeout=hA.TimeoutError=void 0;var pue=Fr(),mue=Yp(),hue=H(),gue=we(),yue=Bi(),bue=oe(),xue=Qo();hA.TimeoutError=yue.createErrorClass(function(e){return function(r){if(r===void 0)r=null;e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function _ue(e,t){var r=mue.isValidDate(e)?{first:e}:typeof e==="number"?{each:e}:e,{first:n,each:o,with:i}=r,s=i===void 0?vue:i,a=r.scheduler,c=a===void 0?t!==null&&t!==void 0?t:pue.asyncScheduler:a,u=r.meta,d=u===void 0?null:u;if(n==null&&o==null)throw TypeError("No timeout provided.");return hue.operate(function(f,m){var p,h,y=null,b=0,x=function(v){h=xue.executeSchedule(m,c,function(){try{p.unsubscribe(),gue.innerFrom(s({meta:d,lastValue:y,seen:b})).subscribe(m)}catch(S){m.error(S)}},v)};p=f.subscribe(bue.createOperatorSubscriber(m,function(v){h===null||h===void 0||h.unsubscribe(),b++,m.next(y=v),o>0&&x(o)},void 0,void 0,function(){if(!(h===null||h===void 0?void 0:h.closed))h===null||h===void 0||h.unsubscribe();y=null})),!b&&x(n!=null?typeof n==="number"?n:+n-c.now():o)})}hA.timeout=_ue;function vue(e){throw new hA.TimeoutError(e)}});var Gi=g(function(bA){Object.defineProperty(bA,"__esModule",{value:!0});bA.map=void 0;var wue=H(),Due=oe();function Eue(e,t){return wue.operate(function(r,n){var o=0;r.subscribe(Due.createOperatorSubscriber(n,function(i){n.next(e.call(t,i,o++))}))})}bA.map=Eue});var Wi=g(function(Hi){var Sue=Hi&&Hi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},$ue=Hi&&Hi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.mapOneOrManyArgs=void 0;var Cue=Gi(),kue=Array.isArray;function Rue(e,t){return kue(t)?e.apply(void 0,$ue([],Sue(t))):e(t)}function Aue(e){return Cue.map(function(t){return Rue(e,t)})}Hi.mapOneOrManyArgs=Aue});var vx=g(function(Ki){var Oue=Ki&&Ki.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},_A=Ki&&Ki.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.bindCallbackInternals=void 0;var Fue=bu(),Pue=nt(),Iue=_u(),Tue=Wi(),Nue=xu(),jue=zp();function _x(e,t,r,n){if(r)if(Fue.isScheduler(r))n=r;else return function(){var o=[];for(var i=0;i<arguments.length;i++)o[i]=arguments[i];return _x(e,t,n).apply(this,o).pipe(Tue.mapOneOrManyArgs(r))};if(n)return function(){var o=[];for(var i=0;i<arguments.length;i++)o[i]=arguments[i];return _x(e,t).apply(this,o).pipe(Iue.subscribeOn(n),Nue.observeOn(n))};return function(){var o=this,i=[];for(var s=0;s<arguments.length;s++)i[s]=arguments[s];var a=new jue.AsyncSubject,c=!0;return new Pue.Observable(function(u){var d=a.subscribe(u);if(c){c=!1;var f=!1,m=!1;if(t.apply(o,_A(_A([],Oue(i)),[function(){var p=[];for(var h=0;h<arguments.length;h++)p[h]=arguments[h];if(e){var y=p.shift();if(y!=null){a.error(y);return}}if(a.next(1<p.length?p:p[0]),m=!0,f)a.complete()}])),m)a.complete();f=!0}return d})}}Ki.bindCallbackInternals=_x});var DA=g(function(vA){Object.defineProperty(vA,"__esModule",{value:!0});vA.bindCallback=void 0;var que=vx();function Mue(e,t,r){return que.bindCallbackInternals(!1,e,t,r)}vA.bindCallback=Mue});var $A=g(function(EA){Object.defineProperty(EA,"__esModule",{value:!0});EA.bindNodeCallback=void 0;var Lue=vx();function Bue(e,t,r){return Lue.bindCallbackInternals(!0,e,t,r)}EA.bindNodeCallback=Bue});var wx=g(function(CA){Object.defineProperty(CA,"__esModule",{value:!0});CA.argsArgArrayOrObject=void 0;var Uue=Array.isArray,{getPrototypeOf:zue,prototype:Vue,keys:Gue}=Object;function Hue(e){if(e.length===1){var t=e[0];if(Uue(t))return{args:t,keys:null};if(Wue(t)){var r=Gue(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}CA.argsArgArrayOrObject=Hue;function Wue(e){return e&&typeof e==="object"&&zue(e)===Vue}});var Dx=g(function(RA){Object.defineProperty(RA,"__esModule",{value:!0});RA.createObject=void 0;function Kue(e,t){return e.reduce(function(r,n,o){return r[n]=t[o],r},{})}RA.createObject=Kue});var Xp=g(function(NA){Object.defineProperty(NA,"__esModule",{value:!0});NA.combineLatestInit=NA.combineLatest=void 0;var Yue=nt(),Jue=wx(),PA=ei(),IA=Wt(),Xue=Wi(),OA=Pr(),Zue=Dx(),Que=oe(),ede=Qo();function tde(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=OA.popScheduler(e),n=OA.popResultSelector(e),o=Jue.argsArgArrayOrObject(e),{args:i,keys:s}=o;if(i.length===0)return PA.from([],r);var a=new Yue.Observable(TA(i,r,s?function(c){return Zue.createObject(s,c)}:IA.identity));return n?a.pipe(Xue.mapOneOrManyArgs(n)):a}NA.combineLatest=tde;function TA(e,t,r){if(r===void 0)r=IA.identity;return function(n){FA(t,function(){var o=e.length,i=Array(o),s=o,a=o,c=function(d){FA(t,function(){var f=PA.from(e[d],t),m=!1;f.subscribe(Que.createOperatorSubscriber(n,function(p){if(i[d]=p,!m)m=!0,a--;if(!a)n.next(r(i.slice()))},function(){if(!--s)n.complete()}))},n)};for(var u=0;u<o;u++)c(u)},n)}}NA.combineLatestInit=TA;function FA(e,t,r){if(e)ede.executeSchedule(r,e,t);else t()}});var Zp=g(function(MA){Object.defineProperty(MA,"__esModule",{value:!0});MA.mergeInternals=void 0;var nde=we(),ode=Qo(),qA=oe();function ide(e,t,r,n,o,i,s,a){var c=[],u=0,d=0,f=!1,m=function(){if(f&&!c.length&&!u)t.complete()},p=function(y){return u<n?h(y):c.push(y)},h=function(y){i&&t.next(y),u++;var b=!1;nde.innerFrom(r(y,d++)).subscribe(qA.createOperatorSubscriber(t,function(x){if(o===null||o===void 0||o(x),i)p(x);else t.next(x)},function(){b=!0},void 0,function(){if(b)try{u--;var x=function(){var v=c.shift();if(s)ode.executeSchedule(t,s,function(){return h(v)});else h(v)};while(c.length&&u<n)x();m()}catch(v){t.error(v)}}))};return e.subscribe(qA.createOperatorSubscriber(t,p,function(){f=!0,m()})),function(){a===null||a===void 0||a()}}MA.mergeInternals=ide});var ti=g(function(UA){Object.defineProperty(UA,"__esModule",{value:!0});UA.mergeMap=void 0;var sde=Gi(),ade=we(),cde=H(),lde=Zp(),ude=rt();function BA(e,t,r){if(r===void 0)r=1/0;if(ude.isFunction(t))return BA(function(n,o){return sde.map(function(i,s){return t(n,i,o,s)})(ade.innerFrom(e(n,o)))},r);else if(typeof t==="number")r=t;return cde.operate(function(n,o){return lde.mergeInternals(n,o,e,r)})}UA.mergeMap=BA});var vu=g(function(VA){Object.defineProperty(VA,"__esModule",{value:!0});VA.mergeAll=void 0;var dde=ti(),fde=Wt();function pde(e){if(e===void 0)e=1/0;return dde.mergeMap(fde.identity,e)}VA.mergeAll=pde});var Qp=g(function(HA){Object.defineProperty(HA,"__esModule",{value:!0});HA.concatAll=void 0;var mde=vu();function hde(){return mde.mergeAll(1)}HA.concatAll=hde});var wu=g(function(KA){Object.defineProperty(KA,"__esModule",{value:!0});KA.concat=void 0;var gde=Qp(),yde=Pr(),bde=ei();function xde(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return gde.concatAll()(bde.from(e,yde.popScheduler(e)))}KA.concat=xde});var Du=g(function(JA){Object.defineProperty(JA,"__esModule",{value:!0});JA.defer=void 0;var _de=nt(),vde=we();function wde(e){return new _de.Observable(function(t){vde.innerFrom(e()).subscribe(t)})}JA.defer=wde});var eO=g(function(ZA){Object.defineProperty(ZA,"__esModule",{value:!0});ZA.connectable=void 0;var Dde=Kt(),Ede=nt(),Sde=Du(),$de={connector:function(){return new Dde.Subject},resetOnDisconnect:!0};function Cde(e,t){if(t===void 0)t=$de;var r=null,n=t.connector,o=t.resetOnDisconnect,i=o===void 0?!0:o,s=n(),a=new Ede.Observable(function(c){return s.subscribe(c)});return a.connect=function(){if(!r||r.closed){if(r=Sde.defer(function(){return e}).subscribe(s),i)r.add(function(){return s=n()})}return r},a}ZA.connectable=Cde});var nO=g(function(tO){Object.defineProperty(tO,"__esModule",{value:!0});tO.forkJoin=void 0;var kde=nt(),Rde=wx(),Ade=we(),Ode=Pr(),Fde=oe(),Pde=Wi(),Ide=Dx();function Tde(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Ode.popResultSelector(e),n=Rde.argsArgArrayOrObject(e),{args:o,keys:i}=n,s=new kde.Observable(function(a){var c=o.length;if(!c){a.complete();return}var u=Array(c),d=c,f=c,m=function(h){var y=!1;Ade.innerFrom(o[h]).subscribe(Fde.createOperatorSubscriber(a,function(b){if(!y)y=!0,f--;u[h]=b},function(){return d--},void 0,function(){if(!d||!y){if(!f)a.next(i?Ide.createObject(i,u):u);a.complete()}}))};for(var p=0;p<c;p++)m(p)});return r?s.pipe(Pde.mapOneOrManyArgs(r)):s}tO.forkJoin=Tde});var iO=g(function(yc){var Nde=yc&&yc.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i};Object.defineProperty(yc,"__esModule",{value:!0});yc.fromEvent=void 0;var jde=we(),qde=nt(),Mde=ti(),Lde=Gp(),Ys=rt(),Bde=Wi(),Ude=["addListener","removeListener"],zde=["addEventListener","removeEventListener"],Vde=["on","off"];function Ex(e,t,r,n){if(Ys.isFunction(r))n=r,r=void 0;if(n)return Ex(e,t,r).pipe(Bde.mapOneOrManyArgs(n));var o=Nde(Wde(e)?zde.map(function(a){return function(c){return e[a](t,c,r)}}):Gde(e)?Ude.map(oO(e,t)):Hde(e)?Vde.map(oO(e,t)):[],2),i=o[0],s=o[1];if(!i){if(Lde.isArrayLike(e))return Mde.mergeMap(function(a){return Ex(a,t,r)})(jde.innerFrom(e))}if(!i)throw TypeError("Invalid event target");return new qde.Observable(function(a){var c=function(){var u=[];for(var d=0;d<arguments.length;d++)u[d]=arguments[d];return a.next(1<u.length?u:u[0])};return i(c),function(){return s(c)}})}yc.fromEvent=Ex;function oO(e,t){return function(r){return function(n){return e[r](t,n)}}}function Gde(e){return Ys.isFunction(e.addListener)&&Ys.isFunction(e.removeListener)}function Hde(e){return Ys.isFunction(e.on)&&Ys.isFunction(e.off)}function Wde(e){return Ys.isFunction(e.addEventListener)&&Ys.isFunction(e.removeEventListener)}});var lO=g(function(aO){Object.defineProperty(aO,"__esModule",{value:!0});aO.fromEventPattern=void 0;var Kde=nt(),Yde=rt(),Jde=Wi();function sO(e,t,r){if(r)return sO(e,t).pipe(Jde.mapOneOrManyArgs(r));return new Kde.Observable(function(n){var o=function(){var s=[];for(var a=0;a<arguments.length;a++)s[a]=arguments[a];return n.next(s.length===1?s[0]:s)},i=e(o);return Yde.isFunction(t)?function(){return t(o,i)}:void 0})}aO.fromEventPattern=sO});var dO=g(function(bc){var Xde=bc&&bc.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if((i=r.trys,!(i=i.length>0&&i[i.length-1]))&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}if(i[2])r.ops.pop();r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],o=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(bc,"__esModule",{value:!0});bc.generate=void 0;var uO=Wt(),Zde=bu(),Qde=Du(),efe=px();function tfe(e,t,r,n,o){var i,s,a,c;if(arguments.length===1)i=e,c=i.initialState,t=i.condition,r=i.iterate,s=i.resultSelector,a=s===void 0?uO.identity:s,o=i.scheduler;else if(c=e,!n||Zde.isScheduler(n))a=uO.identity,o=n;else a=n;function u(){var d;return Xde(this,function(f){switch(f.label){case 0:d=c,f.label=1;case 1:if(!(!t||t(d)))return[3,4];return[4,a(d)];case 2:f.sent(),f.label=3;case 3:return d=r(d),[3,1];case 4:return[2]}})}return Qde.defer(o?function(){return efe.scheduleIterable(u(),o)}:u)}bc.generate=tfe});var mO=g(function(fO){Object.defineProperty(fO,"__esModule",{value:!0});fO.iif=void 0;var rfe=Du();function nfe(e,t,r){return rfe.defer(function(){return e()?t:r})}fO.iif=nfe});var Yi=g(function(hO){Object.defineProperty(hO,"__esModule",{value:!0});hO.timer=void 0;var ofe=nt(),ife=Fr(),sfe=bu(),afe=Yp();function cfe(e,t,r){if(e===void 0)e=0;if(r===void 0)r=ife.async;var n=-1;if(t!=null)if(sfe.isScheduler(t))r=t;else n=t;return new ofe.Observable(function(o){var i=afe.isValidDate(e)?+e-r.now():e;if(i<0)i=0;var s=0;return r.schedule(function(){if(!o.closed)if(o.next(s++),0<=n)this.schedule(void 0,n);else o.complete()},i)})}hO.timer=cfe});var Sx=g(function(yO){Object.defineProperty(yO,"__esModule",{value:!0});yO.interval=void 0;var lfe=Fr(),ufe=Yi();function dfe(e,t){if(e===void 0)e=0;if(t===void 0)t=lfe.asyncScheduler;if(e<0)e=0;return ufe.timer(e,e,t)}yO.interval=dfe});var wO=g(function(_O){Object.defineProperty(_O,"__esModule",{value:!0});_O.merge=void 0;var ffe=vu(),pfe=we(),mfe=In(),xO=Pr(),hfe=ei();function gfe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xO.popScheduler(e),n=xO.popNumber(e,1/0),o=e;return!o.length?mfe.EMPTY:o.length===1?pfe.innerFrom(o[0]):ffe.mergeAll(n)(hfe.from(o,r))}_O.merge=gfe});var $x=g(function(DO){Object.defineProperty(DO,"__esModule",{value:!0});DO.never=DO.NEVER=void 0;var yfe=nt(),bfe=Ht();DO.NEVER=new yfe.Observable(bfe.noop);function xfe(){return DO.NEVER}DO.never=xfe});var xc=g(function($O){Object.defineProperty($O,"__esModule",{value:!0});$O.argsOrArgArray=void 0;var _fe=Array.isArray;function vfe(e){return e.length===1&&_fe(e[0])?e[0]:e}$O.argsOrArgArray=vfe});var Cx=g(function(RO){Object.defineProperty(RO,"__esModule",{value:!0});RO.onErrorResumeNext=void 0;var wfe=nt(),Dfe=xc(),Efe=oe(),kO=Ht(),Sfe=we();function $fe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Dfe.argsOrArgArray(e);return new wfe.Observable(function(n){var o=0,i=function(){if(o<r.length){var s=void 0;try{s=Sfe.innerFrom(r[o++])}catch(c){i();return}var a=new Efe.OperatorSubscriber(n,void 0,kO.noop,kO.noop);s.subscribe(a),a.add(i)}else n.complete()};i()})}RO.onErrorResumeNext=$fe});var PO=g(function(OO){Object.defineProperty(OO,"__esModule",{value:!0});OO.pairs=void 0;var Cfe=ei();function kfe(e,t){return Cfe.from(Object.entries(e),t)}OO.pairs=kfe});var NO=g(function(IO){Object.defineProperty(IO,"__esModule",{value:!0});IO.not=void 0;function Rfe(e,t){return function(r,n){return!e.call(t,r,n)}}IO.not=Rfe});var Js=g(function(jO){Object.defineProperty(jO,"__esModule",{value:!0});jO.filter=void 0;var Afe=H(),Ofe=oe();function Ffe(e,t){return Afe.operate(function(r,n){var o=0;r.subscribe(Ofe.createOperatorSubscriber(n,function(i){return e.call(t,i,o++)&&n.next(i)}))})}jO.filter=Ffe});var zO=g(function(BO){Object.defineProperty(BO,"__esModule",{value:!0});BO.partition=void 0;var Pfe=NO(),MO=Js(),LO=we();function Ife(e,t,r){return[MO.filter(t,r)(LO.innerFrom(e)),MO.filter(Pfe.not(t,r))(LO.innerFrom(e))]}BO.partition=Ife});var kx=g(function(HO){Object.defineProperty(HO,"__esModule",{value:!0});HO.raceInit=HO.race=void 0;var Tfe=nt(),VO=we(),Nfe=xc(),jfe=oe();function qfe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return e=Nfe.argsOrArgArray(e),e.length===1?VO.innerFrom(e[0]):new Tfe.Observable(GO(e))}HO.race=qfe;function GO(e){return function(t){var r=[],n=function(i){r.push(VO.innerFrom(e[i]).subscribe(jfe.createOperatorSubscriber(t,function(s){if(r){for(var a=0;a<r.length;a++)a!==i&&r[a].unsubscribe();r=null}t.next(s)})))};for(var o=0;r&&!t.closed&&o<e.length;o++)n(o)}}HO.raceInit=GO});var JO=g(function(KO){Object.defineProperty(KO,"__esModule",{value:!0});KO.range=void 0;var Lfe=nt(),Bfe=In();function Ufe(e,t,r){if(t==null)t=e,e=0;if(t<=0)return Bfe.EMPTY;var n=t+e;return new Lfe.Observable(r?function(o){var i=e;return r.schedule(function(){if(i<n)o.next(i++),this.schedule();else o.complete()})}:function(o){var i=e;while(i<n&&!o.closed)o.next(i++);o.complete()})}KO.range=Ufe});var QO=g(function(XO){Object.defineProperty(XO,"__esModule",{value:!0});XO.using=void 0;var zfe=nt(),Vfe=we(),Gfe=In();function Hfe(e,t){return new zfe.Observable(function(r){var n=e(),o=t(n),i=o?Vfe.innerFrom(o):Gfe.EMPTY;return i.subscribe(r),function(){if(n)n.unsubscribe()}})}XO.using=Hfe});var em=g(function(Ji){var Wfe=Ji&&Ji.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},Kfe=Ji&&Ji.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.zip=void 0;var Yfe=nt(),Jfe=we(),Xfe=xc(),Zfe=In(),Qfe=oe(),epe=Pr();function tpe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=epe.popResultSelector(e),n=Xfe.argsOrArgArray(e);return n.length?new Yfe.Observable(function(o){var i=n.map(function(){return[]}),s=n.map(function(){return!1});o.add(function(){i=s=null});var a=function(u){Jfe.innerFrom(n[u]).subscribe(Qfe.createOperatorSubscriber(o,function(d){if(i[u].push(d),i.every(function(m){return m.length})){var f=i.map(function(m){return m.shift()});if(o.next(r?r.apply(void 0,Kfe([],Wfe(f))):f),i.some(function(m,p){return!m.length&&s[p]}))o.complete()}},function(){s[u]=!0,!i[u].length&&o.complete()}))};for(var c=0;!o.closed&&c<n.length;c++)a(c);return function(){i=s=null}}):Zfe.EMPTY}Ji.zip=tpe});var t6=g(function(e6){Object.defineProperty(e6,"__esModule",{value:!0})});var Rx=g(function(n6){Object.defineProperty(n6,"__esModule",{value:!0});n6.audit=void 0;var rpe=H(),npe=we(),r6=oe();function ope(e){return rpe.operate(function(t,r){var n=!1,o=null,i=null,s=!1,a=function(){if(i===null||i===void 0||i.unsubscribe(),i=null,n){n=!1;var u=o;o=null,r.next(u)}s&&r.complete()},c=function(){i=null,s&&r.complete()};t.subscribe(r6.createOperatorSubscriber(r,function(u){if(n=!0,o=u,!i)npe.innerFrom(e(u)).subscribe(i=r6.createOperatorSubscriber(r,a,c))},function(){s=!0,(!n||!i||i.closed)&&r.complete()}))})}n6.audit=ope});var a6=g(function(i6){Object.defineProperty(i6,"__esModule",{value:!0});i6.auditTime=void 0;var ipe=Fr(),spe=Rx(),ape=Yi();function cpe(e,t){if(t===void 0)t=ipe.asyncScheduler;return spe.audit(function(){return ape.timer(e,t)})}i6.auditTime=cpe});var d6=g(function(l6){Object.defineProperty(l6,"__esModule",{value:!0});l6.buffer=void 0;var lpe=H(),upe=Ht(),c6=oe(),dpe=we();function fpe(e){return lpe.operate(function(t,r){var n=[];return t.subscribe(c6.createOperatorSubscriber(r,function(o){return n.push(o)},function(){r.next(n),r.complete()})),dpe.innerFrom(e).subscribe(c6.createOperatorSubscriber(r,function(){var o=n;n=[],r.next(o)},upe.noop)),function(){n=null}})}l6.buffer=fpe});var f6=g(function(_c){var Ax=_c&&_c.__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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(_c,"__esModule",{value:!0});_c.bufferCount=void 0;var ppe=H(),mpe=oe(),hpe=Zo();function gpe(e,t){if(t===void 0)t=null;return t=t!==null&&t!==void 0?t:e,ppe.operate(function(r,n){var o=[],i=0;r.subscribe(mpe.createOperatorSubscriber(n,function(s){var a,c,u,d,f=null;if(i++%t===0)o.push([]);try{for(var m=Ax(o),p=m.next();!p.done;p=m.next()){var h=p.value;if(h.push(s),e<=h.length)f=f!==null&&f!==void 0?f:[],f.push(h)}}catch(x){a={error:x}}finally{try{if(p&&!p.done&&(c=m.return))c.call(m)}finally{if(a)throw a.error}}if(f)try{for(var y=Ax(f),b=y.next();!b.done;b=y.next()){var h=b.value;hpe.arrRemove(o,h),n.next(h)}}catch(x){u={error:x}}finally{try{if(b&&!b.done&&(d=y.return))d.call(y)}finally{if(u)throw u.error}}},function(){var s,a;try{for(var c=Ax(o),u=c.next();!u.done;u=c.next()){var d=u.value;n.next(d)}}catch(f){s={error:f}}finally{try{if(u&&!u.done&&(a=c.return))a.call(c)}finally{if(s)throw s.error}}n.complete()},void 0,function(){o=null}))})}_c.bufferCount=gpe});var m6=g(function(vc){var ype=vc&&vc.__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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(vc,"__esModule",{value:!0});vc.bufferTime=void 0;var bpe=Kr(),xpe=H(),_pe=oe(),vpe=Zo(),wpe=Fr(),Dpe=Pr(),p6=Qo();function Epe(e){var t,r,n=[];for(var o=1;o<arguments.length;o++)n[o-1]=arguments[o];var i=(t=Dpe.popScheduler(n))!==null&&t!==void 0?t:wpe.asyncScheduler,s=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return xpe.operate(function(c,u){var d=[],f=!1,m=function(y){var{buffer:b,subs:x}=y;x.unsubscribe(),vpe.arrRemove(d,y),u.next(b),f&&p()},p=function(){if(d){var y=new bpe.Subscription;u.add(y);var b=[],x={buffer:b,subs:y};d.push(x),p6.executeSchedule(y,i,function(){return m(x)},e)}};if(s!==null&&s>=0)p6.executeSchedule(u,i,p,s,!0);else f=!0;p();var h=_pe.createOperatorSubscriber(u,function(y){var b,x,v=d.slice();try{for(var S=ype(v),R=S.next();!R.done;R=S.next()){var E=R.value,P=E.buffer;P.push(y),a<=P.length&&m(E)}}catch(A){b={error:A}}finally{try{if(R&&!R.done&&(x=S.return))x.call(S)}finally{if(b)throw b.error}}},function(){while(d===null||d===void 0?void 0:d.length)u.next(d.shift().buffer);h===null||h===void 0||h.unsubscribe(),u.complete(),u.unsubscribe()},void 0,function(){return d=null});c.subscribe(h)})}vc.bufferTime=Epe});var y6=g(function(wc){var Spe=wc&&wc.__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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wc,"__esModule",{value:!0});wc.bufferToggle=void 0;var $pe=Kr(),Cpe=H(),h6=we(),Ox=oe(),g6=Ht(),kpe=Zo();function Rpe(e,t){return Cpe.operate(function(r,n){var o=[];h6.innerFrom(e).subscribe(Ox.createOperatorSubscriber(n,function(i){var s=[];o.push(s);var a=new $pe.Subscription,c=function(){kpe.arrRemove(o,s),n.next(s),a.unsubscribe()};a.add(h6.innerFrom(t(i)).subscribe(Ox.createOperatorSubscriber(n,c,g6.noop)))},g6.noop)),r.subscribe(Ox.createOperatorSubscriber(n,function(i){var s,a;try{for(var c=Spe(o),u=c.next();!u.done;u=c.next()){var d=u.value;d.push(i)}}catch(f){s={error:f}}finally{try{if(u&&!u.done&&(a=c.return))a.call(c)}finally{if(s)throw s.error}}},function(){while(o.length>0)n.next(o.shift());n.complete()}))})}wc.bufferToggle=Rpe});var v6=g(function(x6){Object.defineProperty(x6,"__esModule",{value:!0});x6.bufferWhen=void 0;var Ape=H(),Ope=Ht(),b6=oe(),Fpe=we();function Ppe(e){return Ape.operate(function(t,r){var n=null,o=null,i=function(){o===null||o===void 0||o.unsubscribe();var s=n;n=[],s&&r.next(s),Fpe.innerFrom(e()).subscribe(o=b6.createOperatorSubscriber(r,i,Ope.noop))};i(),t.subscribe(b6.createOperatorSubscriber(r,function(s){return n===null||n===void 0?void 0:n.push(s)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=o=null}))})}x6.bufferWhen=Ppe});var S6=g(function(D6){Object.defineProperty(D6,"__esModule",{value:!0});D6.catchError=void 0;var Ipe=we(),Tpe=oe(),Npe=H();function w6(e){return Npe.operate(function(t,r){var n=null,o=!1,i;if(n=t.subscribe(Tpe.createOperatorSubscriber(r,void 0,void 0,function(s){if(i=Ipe.innerFrom(e(s,w6(e)(t))),n)n.unsubscribe(),n=null,i.subscribe(r);else o=!0})),o)n.unsubscribe(),n=null,i.subscribe(r)})}D6.catchError=w6});var Fx=g(function($6){Object.defineProperty($6,"__esModule",{value:!0});$6.scanInternals=void 0;var jpe=oe();function qpe(e,t,r,n,o){return function(i,s){var a=r,c=t,u=0;i.subscribe(jpe.createOperatorSubscriber(s,function(d){var f=u++;c=a?e(c,d,f):(a=!0,d),n&&s.next(c)},o&&function(){a&&s.next(c),s.complete()}))}}$6.scanInternals=qpe});var Dc=g(function(k6){Object.defineProperty(k6,"__esModule",{value:!0});k6.reduce=void 0;var Mpe=Fx(),Lpe=H();function Bpe(e,t){return Lpe.operate(Mpe.scanInternals(e,t,arguments.length>=2,!1,!0))}k6.reduce=Bpe});var Px=g(function(A6){Object.defineProperty(A6,"__esModule",{value:!0});A6.toArray=void 0;var Upe=Dc(),zpe=H(),Vpe=function(e,t){return e.push(t),e};function Gpe(){return zpe.operate(function(e,t){Upe.reduce(Vpe,[])(e).subscribe(t)})}A6.toArray=Gpe});var Ix=g(function(F6){Object.defineProperty(F6,"__esModule",{value:!0});F6.joinAllInternals=void 0;var Hpe=Wt(),Wpe=Wi(),Kpe=gu(),Ype=ti(),Jpe=Px();function Xpe(e,t){return Kpe.pipe(Jpe.toArray(),Ype.mergeMap(function(r){return e(r)}),t?Wpe.mapOneOrManyArgs(t):Hpe.identity)}F6.joinAllInternals=Xpe});var Tx=g(function(I6){Object.defineProperty(I6,"__esModule",{value:!0});I6.combineLatestAll=void 0;var Zpe=Xp(),Qpe=Ix();function eme(e){return Qpe.joinAllInternals(Zpe.combineLatest,e)}I6.combineLatestAll=eme});var q6=g(function(N6){Object.defineProperty(N6,"__esModule",{value:!0});N6.combineAll=void 0;var tme=Tx();N6.combineAll=tme.combineLatestAll});var U6=g(function(Xi){var M6=Xi&&Xi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},L6=Xi&&Xi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.combineLatest=void 0;var rme=Xp(),nme=H(),ome=xc(),ime=Wi(),sme=gu(),ame=Pr();function B6(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ame.popResultSelector(e);return r?sme.pipe(B6.apply(void 0,L6([],M6(e))),ime.mapOneOrManyArgs(r)):nme.operate(function(n,o){rme.combineLatestInit(L6([n],M6(ome.argsOrArgArray(e))))(o)})}Xi.combineLatest=B6});var z6=g(function(Zi){var cme=Zi&&Zi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},lme=Zi&&Zi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.combineLatestWith=void 0;var ume=U6();function dme(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return ume.combineLatest.apply(void 0,lme([],cme(e)))}Zi.combineLatestWith=dme});var Nx=g(function(G6){Object.defineProperty(G6,"__esModule",{value:!0});G6.concatMap=void 0;var V6=ti(),fme=rt();function pme(e,t){return fme.isFunction(t)?V6.mergeMap(e,t,1):V6.mergeMap(e,1)}G6.concatMap=pme});var J6=g(function(K6){Object.defineProperty(K6,"__esModule",{value:!0});K6.concatMapTo=void 0;var W6=Nx(),mme=rt();function hme(e,t){return mme.isFunction(t)?W6.concatMap(function(){return e},t):W6.concatMap(function(){return e})}K6.concatMapTo=hme});var X6=g(function(Qi){var gme=Qi&&Qi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},yme=Qi&&Qi.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Qi,"__esModule",{value:!0});Qi.concat=void 0;var bme=H(),xme=Qp(),_me=Pr(),vme=ei();function wme(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=_me.popScheduler(e);return bme.operate(function(n,o){xme.concatAll()(vme.from(yme([n],gme(e)),r)).subscribe(o)})}Qi.concat=wme});var Z6=g(function(es){var Dme=es&&es.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},Eme=es&&es.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(es,"__esModule",{value:!0});es.concatWith=void 0;var Sme=X6();function $me(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return Sme.concat.apply(void 0,Eme([],Dme(e)))}es.concatWith=$me});var tF=g(function(Q6){Object.defineProperty(Q6,"__esModule",{value:!0});Q6.fromSubscribable=void 0;var Cme=nt();function kme(e){return new Cme.Observable(function(t){return e.subscribe(t)})}Q6.fromSubscribable=kme});var tm=g(function(rF){Object.defineProperty(rF,"__esModule",{value:!0});rF.connect=void 0;var Rme=Kt(),Ame=we(),Ome=H(),Fme=tF(),Pme={connector:function(){return new Rme.Subject}};function Ime(e,t){if(t===void 0)t=Pme;var r=t.connector;return Ome.operate(function(n,o){var i=r();Ame.innerFrom(e(Fme.fromSubscribable(i))).subscribe(o),o.add(n.subscribe(i))})}rF.connect=Ime});var sF=g(function(oF){Object.defineProperty(oF,"__esModule",{value:!0});oF.count=void 0;var Tme=Dc();function Nme(e){return Tme.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}oF.count=Nme});var uF=g(function(cF){Object.defineProperty(cF,"__esModule",{value:!0});cF.debounce=void 0;var jme=H(),qme=Ht(),aF=oe(),Mme=we();function Lme(e){return jme.operate(function(t,r){var n=!1,o=null,i=null,s=function(){if(i===null||i===void 0||i.unsubscribe(),i=null,n){n=!1;var a=o;o=null,r.next(a)}};t.subscribe(aF.createOperatorSubscriber(r,function(a){i===null||i===void 0||i.unsubscribe(),n=!0,o=a,i=aF.createOperatorSubscriber(r,s,qme.noop),Mme.innerFrom(e(a)).subscribe(i)},function(){s(),r.complete()},void 0,function(){o=i=null}))})}cF.debounce=Lme});var pF=g(function(dF){Object.defineProperty(dF,"__esModule",{value:!0});dF.debounceTime=void 0;var Bme=Fr(),Ume=H(),zme=oe();function Vme(e,t){if(t===void 0)t=Bme.asyncScheduler;return Ume.operate(function(r,n){var o=null,i=null,s=null,a=function(){if(o){o.unsubscribe(),o=null;var u=i;i=null,n.next(u)}};function c(){var u=s+e,d=t.now();if(d<u){o=this.schedule(void 0,u-d),n.add(o);return}a()}r.subscribe(zme.createOperatorSubscriber(n,function(u){if(i=u,s=t.now(),!o)o=t.schedule(c,e),n.add(o)},function(){a(),n.complete()},void 0,function(){i=o=null}))})}dF.debounceTime=Vme});var Eu=g(function(mF){Object.defineProperty(mF,"__esModule",{value:!0});mF.defaultIfEmpty=void 0;var Gme=H(),Hme=oe();function Wme(e){return Gme.operate(function(t,r){var n=!1;t.subscribe(Hme.createOperatorSubscriber(r,function(o){n=!0,r.next(o)},function(){if(!n)r.next(e);r.complete()}))})}mF.defaultIfEmpty=Wme});var Su=g(function(gF){Object.defineProperty(gF,"__esModule",{value:!0});gF.take=void 0;var Kme=In(),Yme=H(),Jme=oe();function Xme(e){return e<=0?function(){return Kme.EMPTY}:Yme.operate(function(t,r){var n=0;t.subscribe(Jme.createOperatorSubscriber(r,function(o){if(++n<=e){if(r.next(o),e<=n)r.complete()}}))})}gF.take=Xme});var jx=g(function(bF){Object.defineProperty(bF,"__esModule",{value:!0});bF.ignoreElements=void 0;var Zme=H(),Qme=oe(),ehe=Ht();function the(){return Zme.operate(function(e,t){e.subscribe(Qme.createOperatorSubscriber(t,ehe.noop))})}bF.ignoreElements=the});var qx=g(function(_F){Object.defineProperty(_F,"__esModule",{value:!0});_F.mapTo=void 0;var rhe=Gi();function nhe(e){return rhe.map(function(){return e})}_F.mapTo=nhe});var Mx=g(function(EF){Object.defineProperty(EF,"__esModule",{value:!0});EF.delayWhen=void 0;var ohe=wu(),wF=Su(),ihe=jx(),she=qx(),ahe=ti(),che=we();function DF(e,t){if(t)return function(r){return ohe.concat(t.pipe(wF.take(1),ihe.ignoreElements()),r.pipe(DF(e)))};return ahe.mergeMap(function(r,n){return che.innerFrom(e(r,n)).pipe(wF.take(1),she.mapTo(r))})}EF.delayWhen=DF});var kF=g(function($F){Object.defineProperty($F,"__esModule",{value:!0});$F.delay=void 0;var lhe=Fr(),uhe=Mx(),dhe=Yi();function fhe(e,t){if(t===void 0)t=lhe.asyncScheduler;var r=dhe.timer(e,t);return uhe.delayWhen(function(){return r})}$F.delay=fhe});var OF=g(function(RF){Object.defineProperty(RF,"__esModule",{value:!0});RF.dematerialize=void 0;var phe=Kp(),mhe=H(),hhe=oe();function ghe(){return mhe.operate(function(e,t){e.subscribe(hhe.createOperatorSubscriber(t,function(r){return phe.observeNotification(r,t)}))})}RF.dematerialize=ghe});var TF=g(function(PF){Object.defineProperty(PF,"__esModule",{value:!0});PF.distinct=void 0;var yhe=H(),FF=oe(),bhe=Ht(),xhe=we();function _he(e,t){return yhe.operate(function(r,n){var o=new Set;r.subscribe(FF.createOperatorSubscriber(n,function(i){var s=e?e(i):i;if(!o.has(s))o.add(s),n.next(i)})),t&&xhe.innerFrom(t).subscribe(FF.createOperatorSubscriber(n,function(){return o.clear()},bhe.noop))})}PF.distinct=_he});var Lx=g(function(NF){Object.defineProperty(NF,"__esModule",{value:!0});NF.distinctUntilChanged=void 0;var vhe=Wt(),whe=H(),Dhe=oe();function Ehe(e,t){if(t===void 0)t=vhe.identity;return e=e!==null&&e!==void 0?e:She,whe.operate(function(r,n){var o,i=!0;r.subscribe(Dhe.createOperatorSubscriber(n,function(s){var a=t(s);if(i||!e(o,a))i=!1,o=a,n.next(s)}))})}NF.distinctUntilChanged=Ehe;function She(e,t){return e===t}});var LF=g(function(qF){Object.defineProperty(qF,"__esModule",{value:!0});qF.distinctUntilKeyChanged=void 0;var $he=Lx();function Che(e,t){return $he.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}qF.distinctUntilKeyChanged=Che});var $u=g(function(BF){Object.defineProperty(BF,"__esModule",{value:!0});BF.throwIfEmpty=void 0;var khe=Vi(),Rhe=H(),Ahe=oe();function Ohe(e){if(e===void 0)e=Fhe;return Rhe.operate(function(t,r){var n=!1;t.subscribe(Ahe.createOperatorSubscriber(r,function(o){n=!0,r.next(o)},function(){return n?r.complete():r.error(e())}))})}BF.throwIfEmpty=Ohe;function Fhe(){return new khe.EmptyError}});var HF=g(function(VF){Object.defineProperty(VF,"__esModule",{value:!0});VF.elementAt=void 0;var zF=yx(),Phe=Js(),Ihe=$u(),The=Eu(),Nhe=Su();function jhe(e,t){if(e<0)throw new zF.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(Phe.filter(function(o,i){return i===e}),Nhe.take(1),r?The.defaultIfEmpty(t):Ihe.throwIfEmpty(function(){return new zF.ArgumentOutOfRangeError}))}}VF.elementAt=jhe});var WF=g(function(ts){var qhe=ts&&ts.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},Mhe=ts&&ts.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(ts,"__esModule",{value:!0});ts.endWith=void 0;var Lhe=wu(),Bhe=Wp();function Uhe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return Lhe.concat(r,Bhe.of.apply(void 0,Mhe([],qhe(e))))}}ts.endWith=Uhe});var JF=g(function(KF){Object.defineProperty(KF,"__esModule",{value:!0});KF.every=void 0;var zhe=H(),Vhe=oe();function Ghe(e,t){return zhe.operate(function(r,n){var o=0;r.subscribe(Vhe.createOperatorSubscriber(n,function(i){if(!e.call(t,i,o++,r))n.next(!1),n.complete()},function(){n.next(!0),n.complete()}))})}KF.every=Ghe});var Bx=g(function(eP){Object.defineProperty(eP,"__esModule",{value:!0});eP.exhaustMap=void 0;var Hhe=Gi(),XF=we(),Whe=H(),ZF=oe();function QF(e,t){if(t)return function(r){return r.pipe(QF(function(n,o){return XF.innerFrom(e(n,o)).pipe(Hhe.map(function(i,s){return t(n,i,o,s)}))}))};return Whe.operate(function(r,n){var o=0,i=null,s=!1;r.subscribe(ZF.createOperatorSubscriber(n,function(a){if(!i)i=ZF.createOperatorSubscriber(n,void 0,function(){i=null,s&&n.complete()}),XF.innerFrom(e(a,o++)).subscribe(i)},function(){s=!0,!i&&n.complete()}))})}eP.exhaustMap=QF});var Ux=g(function(rP){Object.defineProperty(rP,"__esModule",{value:!0});rP.exhaustAll=void 0;var Khe=Bx(),Yhe=Wt();function Jhe(){return Khe.exhaustMap(Yhe.identity)}rP.exhaustAll=Jhe});var sP=g(function(oP){Object.defineProperty(oP,"__esModule",{value:!0});oP.exhaust=void 0;var Xhe=Ux();oP.exhaust=Xhe.exhaustAll});var lP=g(function(aP){Object.defineProperty(aP,"__esModule",{value:!0});aP.expand=void 0;var Zhe=H(),Qhe=Zp();function ege(e,t,r){if(t===void 0)t=1/0;return t=(t||0)<1?1/0:t,Zhe.operate(function(n,o){return Qhe.mergeInternals(n,o,e,t,void 0,!0,r)})}aP.expand=ege});var fP=g(function(uP){Object.defineProperty(uP,"__esModule",{value:!0});uP.finalize=void 0;var tge=H();function rge(e){return tge.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}uP.finalize=rge});var zx=g(function(mP){Object.defineProperty(mP,"__esModule",{value:!0});mP.createFind=mP.find=void 0;var nge=H(),oge=oe();function ige(e,t){return nge.operate(pP(e,t,"value"))}mP.find=ige;function pP(e,t,r){var n=r==="index";return function(o,i){var s=0;o.subscribe(oge.createOperatorSubscriber(i,function(a){var c=s++;if(e.call(t,a,c,o))i.next(n?c:a),i.complete()},function(){i.next(n?-1:void 0),i.complete()}))}}mP.createFind=pP});var bP=g(function(gP){Object.defineProperty(gP,"__esModule",{value:!0});gP.findIndex=void 0;var age=H(),cge=zx();function lge(e,t){return age.operate(cge.createFind(e,t,"index"))}gP.findIndex=lge});var vP=g(function(xP){Object.defineProperty(xP,"__esModule",{value:!0});xP.first=void 0;var uge=Vi(),dge=Js(),fge=Su(),pge=Eu(),mge=$u(),hge=Wt();function gge(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?dge.filter(function(o,i){return e(o,i,n)}):hge.identity,fge.take(1),r?pge.defaultIfEmpty(t):mge.throwIfEmpty(function(){return new uge.EmptyError}))}}xP.first=gge});var SP=g(function(DP){Object.defineProperty(DP,"__esModule",{value:!0});DP.groupBy=void 0;var yge=nt(),bge=we(),xge=Kt(),_ge=H(),wP=oe();function vge(e,t,r,n){return _ge.operate(function(o,i){var s;if(!t||typeof t==="function")s=t;else r=t.duration,s=t.element,n=t.connector;var a=new Map,c=function(h){a.forEach(h),h(i)},u=function(h){return c(function(y){return y.error(h)})},d=0,f=!1,m=new wP.OperatorSubscriber(i,function(h){try{var y=e(h),b=a.get(y);if(!b){a.set(y,b=n?n():new xge.Subject);var x=p(y,b);if(i.next(x),r){var v=wP.createOperatorSubscriber(b,function(){b.complete(),v===null||v===void 0||v.unsubscribe()},void 0,void 0,function(){return a.delete(y)});m.add(bge.innerFrom(r(x)).subscribe(v))}}b.next(s?s(h):h)}catch(S){u(S)}},function(){return c(function(h){return h.complete()})},u,function(){return a.clear()},function(){return f=!0,d===0});o.subscribe(m);function p(h,y){var b=new yge.Observable(function(x){d++;var v=y.subscribe(x);return function(){v.unsubscribe(),--d===0&&f&&m.unsubscribe()}});return b.key=h,b}})}DP.groupBy=vge});var kP=g(function($P){Object.defineProperty($P,"__esModule",{value:!0});$P.isEmpty=void 0;var wge=H(),Dge=oe();function Ege(){return wge.operate(function(e,t){e.subscribe(Dge.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}$P.isEmpty=Ege});var Vx=g(function(Ec){var Sge=Ec&&Ec.__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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.takeLast=void 0;var $ge=In(),Cge=H(),kge=oe();function Rge(e){return e<=0?function(){return $ge.EMPTY}:Cge.operate(function(t,r){var n=[];t.subscribe(kge.createOperatorSubscriber(r,function(o){n.push(o),e<n.length&&n.shift()},function(){var o,i;try{for(var s=Sge(n),a=s.next();!a.done;a=s.next()){var c=a.value;r.next(c)}}catch(u){o={error:u}}finally{try{if(a&&!a.done&&(i=s.return))i.call(s)}finally{if(o)throw o.error}}r.complete()},void 0,function(){n=null}))})}Ec.takeLast=Rge});var OP=g(function(RP){Object.defineProperty(RP,"__esModule",{value:!0});RP.last=void 0;var Age=Vi(),Oge=Js(),Fge=Vx(),Pge=$u(),Ige=Eu(),Tge=Wt();function Nge(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?Oge.filter(function(o,i){return e(o,i,n)}):Tge.identity,Fge.takeLast(1),r?Ige.defaultIfEmpty(t):Pge.throwIfEmpty(function(){return new Age.EmptyError}))}}RP.last=Nge});var IP=g(function(FP){Object.defineProperty(FP,"__esModule",{value:!0});FP.materialize=void 0;var Gx=Kp(),jge=H(),qge=oe();function Mge(){return jge.operate(function(e,t){e.subscribe(qge.createOperatorSubscriber(t,function(r){t.next(Gx.Notification.createNext(r))},function(){t.next(Gx.Notification.createComplete()),t.complete()},function(r){t.next(Gx.Notification.createError(r)),t.complete()}))})}FP.materialize=Mge});var jP=g(function(TP){Object.defineProperty(TP,"__esModule",{value:!0});TP.max=void 0;var Lge=Dc(),Bge=rt();function Uge(e){return Lge.reduce(Bge.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}TP.max=Uge});var LP=g(function(qP){Object.defineProperty(qP,"__esModule",{value:!0});qP.flatMap=void 0;var zge=ti();qP.flatMap=zge.mergeMap});var VP=g(function(UP){Object.defineProperty(UP,"__esModule",{value:!0});UP.mergeMapTo=void 0;var BP=ti(),Vge=rt();function Gge(e,t,r){if(r===void 0)r=1/0;if(Vge.isFunction(t))return BP.mergeMap(function(){return e},t,r);if(typeof t==="number")r=t;return BP.mergeMap(function(){return e},r)}UP.mergeMapTo=Gge});var WP=g(function(GP){Object.defineProperty(GP,"__esModule",{value:!0});GP.mergeScan=void 0;var Hge=H(),Wge=Zp();function Kge(e,t,r){if(r===void 0)r=1/0;return Hge.operate(function(n,o){var i=t;return Wge.mergeInternals(n,o,function(s,a){return e(i,s,a)},r,function(s){i=s},!1,void 0,function(){return i=null})})}GP.mergeScan=Kge});var YP=g(function(rs){var Yge=rs&&rs.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},Jge=rs&&rs.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(rs,"__esModule",{value:!0});rs.merge=void 0;var Xge=H(),Zge=vu(),KP=Pr(),Qge=ei();function e0e(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=KP.popScheduler(e),n=KP.popNumber(e,1/0);return Xge.operate(function(o,i){Zge.mergeAll(n)(Qge.from(Jge([o],Yge(e)),r)).subscribe(i)})}rs.merge=e0e});var JP=g(function(ns){var t0e=ns&&ns.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},r0e=ns&&ns.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(ns,"__esModule",{value:!0});ns.mergeWith=void 0;var n0e=YP();function o0e(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return n0e.merge.apply(void 0,r0e([],t0e(e)))}ns.mergeWith=o0e});var QP=g(function(XP){Object.defineProperty(XP,"__esModule",{value:!0});XP.min=void 0;var i0e=Dc(),s0e=rt();function a0e(e){return i0e.reduce(s0e.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}XP.min=a0e});var rm=g(function(tI){Object.defineProperty(tI,"__esModule",{value:!0});tI.multicast=void 0;var c0e=yu(),eI=rt(),l0e=tm();function u0e(e,t){var r=eI.isFunction(e)?e:function(){return e};if(eI.isFunction(t))return l0e.connect(t,{connector:r});return function(n){return new c0e.ConnectableObservable(n,r)}}tI.multicast=u0e});var oI=g(function(mo){var d0e=mo&&mo.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},f0e=mo&&mo.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(mo,"__esModule",{value:!0});mo.onErrorResumeNext=mo.onErrorResumeNextWith=void 0;var p0e=xc(),m0e=Cx();function nI(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=p0e.argsOrArgArray(e);return function(n){return m0e.onErrorResumeNext.apply(void 0,f0e([n],d0e(r)))}}mo.onErrorResumeNextWith=nI;mo.onErrorResumeNext=nI});var aI=g(function(iI){Object.defineProperty(iI,"__esModule",{value:!0});iI.pairwise=void 0;var h0e=H(),g0e=oe();function y0e(){return h0e.operate(function(e,t){var r,n=!1;e.subscribe(g0e.createOperatorSubscriber(t,function(o){var i=r;r=o,n&&t.next([i,o]),n=!0}))})}iI.pairwise=y0e});var uI=g(function(cI){Object.defineProperty(cI,"__esModule",{value:!0});cI.pluck=void 0;var b0e=Gi();function x0e(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw Error("list of properties cannot be empty.");return b0e.map(function(n){var o=n;for(var i=0;i<r;i++){var s=o===null||o===void 0?void 0:o[e[i]];if(typeof s<"u")o=s;else return}return o})}cI.pluck=x0e});var pI=g(function(dI){Object.defineProperty(dI,"__esModule",{value:!0});dI.publish=void 0;var _0e=Kt(),v0e=rm(),w0e=tm();function D0e(e){return e?function(t){return w0e.connect(e)(t)}:function(t){return v0e.multicast(new _0e.Subject)(t)}}dI.publish=D0e});var gI=g(function(mI){Object.defineProperty(mI,"__esModule",{value:!0});mI.publishBehavior=void 0;var E0e=Qb(),S0e=yu();function $0e(e){return function(t){var r=new E0e.BehaviorSubject(e);return new S0e.ConnectableObservable(t,function(){return r})}}mI.publishBehavior=$0e});var xI=g(function(yI){Object.defineProperty(yI,"__esModule",{value:!0});yI.publishLast=void 0;var C0e=zp(),k0e=yu();function R0e(){return function(e){var t=new C0e.AsyncSubject;return new k0e.ConnectableObservable(e,function(){return t})}}yI.publishLast=R0e});var DI=g(function(vI){Object.defineProperty(vI,"__esModule",{value:!0});vI.publishReplay=void 0;var A0e=Up(),O0e=rm(),_I=rt();function F0e(e,t,r,n){if(r&&!_I.isFunction(r))n=r;var o=_I.isFunction(r)?r:void 0;return function(i){return O0e.multicast(new A0e.ReplaySubject(e,t,n),o)(i)}}vI.publishReplay=F0e});var EI=g(function(os){var P0e=os&&os.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},I0e=os&&os.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(os,"__esModule",{value:!0});os.raceWith=void 0;var T0e=kx(),N0e=H(),j0e=Wt();function q0e(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return!e.length?j0e.identity:N0e.operate(function(r,n){T0e.raceInit(I0e([r],P0e(e)))(n)})}os.raceWith=q0e});var kI=g(function($I){Object.defineProperty($I,"__esModule",{value:!0});$I.repeat=void 0;var M0e=In(),L0e=H(),SI=oe(),B0e=we(),U0e=Yi();function z0e(e){var t,r=1/0,n;if(e!=null)if(typeof e==="object")t=e.count,r=t===void 0?1/0:t,n=e.delay;else r=e;return r<=0?function(){return M0e.EMPTY}:L0e.operate(function(o,i){var s=0,a,c=function(){if(a===null||a===void 0||a.unsubscribe(),a=null,n!=null){var d=typeof n==="number"?U0e.timer(n):B0e.innerFrom(n(s)),f=SI.createOperatorSubscriber(i,function(){f.unsubscribe(),u()});d.subscribe(f)}else u()},u=function(){var d=!1;if(a=o.subscribe(SI.createOperatorSubscriber(i,void 0,function(){if(++s<r)if(a)c();else d=!0;else i.complete()})),d)c()};u()})}$I.repeat=z0e});var FI=g(function(AI){Object.defineProperty(AI,"__esModule",{value:!0});AI.repeatWhen=void 0;var V0e=we(),G0e=Kt(),H0e=H(),RI=oe();function W0e(e){return H0e.operate(function(t,r){var n,o=!1,i,s=!1,a=!1,c=function(){return a&&s&&(r.complete(),!0)},u=function(){if(!i)i=new G0e.Subject,V0e.innerFrom(e(i)).subscribe(RI.createOperatorSubscriber(r,function(){if(n)d();else o=!0},function(){s=!0,c()}));return i},d=function(){if(a=!1,n=t.subscribe(RI.createOperatorSubscriber(r,void 0,function(){a=!0,!c()&&u().next()})),o)n.unsubscribe(),n=null,o=!1,d()};d()})}AI.repeatWhen=W0e});var NI=g(function(II){Object.defineProperty(II,"__esModule",{value:!0});II.retry=void 0;var K0e=H(),PI=oe(),Y0e=Wt(),J0e=Yi(),X0e=we();function Z0e(e){if(e===void 0)e=1/0;var t;if(e&&typeof e==="object")t=e;else t={count:e};var r=t.count,n=r===void 0?1/0:r,o=t.delay,i=t.resetOnSuccess,s=i===void 0?!1:i;return n<=0?Y0e.identity:K0e.operate(function(a,c){var u=0,d,f=function(){var m=!1;if(d=a.subscribe(PI.createOperatorSubscriber(c,function(p){if(s)u=0;c.next(p)},void 0,function(p){if(u++<n){var h=function(){if(d)d.unsubscribe(),d=null,f();else m=!0};if(o!=null){var y=typeof o==="number"?J0e.timer(o):X0e.innerFrom(o(p,u)),b=PI.createOperatorSubscriber(c,function(){b.unsubscribe(),h()},function(){c.complete()});y.subscribe(b)}else h()}else c.error(p)})),m)d.unsubscribe(),d=null,f()};f()})}II.retry=Z0e});var LI=g(function(qI){Object.defineProperty(qI,"__esModule",{value:!0});qI.retryWhen=void 0;var Q0e=we(),eye=Kt(),tye=H(),jI=oe();function rye(e){return tye.operate(function(t,r){var n,o=!1,i,s=function(){if(n=t.subscribe(jI.createOperatorSubscriber(r,void 0,void 0,function(a){if(!i)i=new eye.Subject,Q0e.innerFrom(e(i)).subscribe(jI.createOperatorSubscriber(r,function(){return n?s():o=!0}));if(i)i.next(a)})),o)n.unsubscribe(),n=null,o=!1,s()};s()})}qI.retryWhen=rye});var Hx=g(function(UI){Object.defineProperty(UI,"__esModule",{value:!0});UI.sample=void 0;var nye=we(),oye=H(),iye=Ht(),BI=oe();function sye(e){return oye.operate(function(t,r){var n=!1,o=null;t.subscribe(BI.createOperatorSubscriber(r,function(i){n=!0,o=i})),nye.innerFrom(e).subscribe(BI.createOperatorSubscriber(r,function(){if(n){n=!1;var i=o;o=null,r.next(i)}},iye.noop))})}UI.sample=sye});var HI=g(function(VI){Object.defineProperty(VI,"__esModule",{value:!0});VI.sampleTime=void 0;var aye=Fr(),cye=Hx(),lye=Sx();function uye(e,t){if(t===void 0)t=aye.asyncScheduler;return cye.sample(lye.interval(e,t))}VI.sampleTime=uye});var YI=g(function(WI){Object.defineProperty(WI,"__esModule",{value:!0});WI.scan=void 0;var dye=H(),fye=Fx();function pye(e,t){return dye.operate(fye.scanInternals(e,t,arguments.length>=2,!0))}WI.scan=pye});var QI=g(function(XI){Object.defineProperty(XI,"__esModule",{value:!0});XI.sequenceEqual=void 0;var mye=H(),hye=oe(),gye=we();function yye(e,t){if(t===void 0)t=function(r,n){return r===n};return mye.operate(function(r,n){var o=JI(),i=JI(),s=function(c){n.next(c),n.complete()},a=function(c,u){var d=hye.createOperatorSubscriber(n,function(f){var{buffer:m,complete:p}=u;if(m.length===0)p?s(!1):c.buffer.push(f);else!t(f,m.shift())&&s(!1)},function(){c.complete=!0;var{complete:f,buffer:m}=u;f&&s(m.length===0),d===null||d===void 0||d.unsubscribe()});return d};r.subscribe(a(o,i)),gye.innerFrom(e).subscribe(a(i,o))})}XI.sequenceEqual=yye;function JI(){return{buffer:[],complete:!1}}});var Kx=g(function(is){var bye=is&&is.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},xye=is&&is.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(is,"__esModule",{value:!0});is.share=void 0;var eT=we(),_ye=Kt(),tT=Qa(),vye=H();function wye(e){if(e===void 0)e={};var t=e.connector,r=t===void 0?function(){return new _ye.Subject}:t,n=e.resetOnError,o=n===void 0?!0:n,i=e.resetOnComplete,s=i===void 0?!0:i,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(u){var d,f,m,p=0,h=!1,y=!1,b=function(){f===null||f===void 0||f.unsubscribe(),f=void 0},x=function(){b(),d=m=void 0,h=y=!1},v=function(){var S=d;x(),S===null||S===void 0||S.unsubscribe()};return vye.operate(function(S,R){if(p++,!y&&!h)b();var E=m=m!==null&&m!==void 0?m:r();if(R.add(function(){if(p--,p===0&&!y&&!h)f=Wx(v,c)}),E.subscribe(R),!d&&p>0)d=new tT.SafeSubscriber({next:function(P){return E.next(P)},error:function(P){y=!0,b(),f=Wx(x,o,P),E.error(P)},complete:function(){h=!0,b(),f=Wx(x,s),E.complete()}}),eT.innerFrom(S).subscribe(d)})(u)}}is.share=wye;function Wx(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t===!1)return;var o=new tT.SafeSubscriber({next:function(){o.unsubscribe(),e()}});return eT.innerFrom(t.apply(void 0,xye([],bye(r)))).subscribe(o)}});var oT=g(function(rT){Object.defineProperty(rT,"__esModule",{value:!0});rT.shareReplay=void 0;var Dye=Up(),Eye=Kx();function Sye(e,t,r){var n,o,i,s,a=!1;if(e&&typeof e==="object")n=e.bufferSize,s=n===void 0?1/0:n,o=e.windowTime,t=o===void 0?1/0:o,i=e.refCount,a=i===void 0?!1:i,r=e.scheduler;else s=e!==null&&e!==void 0?e:1/0;return Eye.share({connector:function(){return new Dye.ReplaySubject(s,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}rT.shareReplay=Sye});var aT=g(function(iT){Object.defineProperty(iT,"__esModule",{value:!0});iT.single=void 0;var $ye=Vi(),Cye=xx(),kye=bx(),Rye=H(),Aye=oe();function Oye(e){return Rye.operate(function(t,r){var n=!1,o,i=!1,s=0;t.subscribe(Aye.createOperatorSubscriber(r,function(a){if(i=!0,!e||e(a,s++,t))n&&r.error(new Cye.SequenceError("Too many matching values")),n=!0,o=a},function(){if(n)r.next(o),r.complete();else r.error(i?new kye.NotFoundError("No matching values"):new $ye.EmptyError)}))})}iT.single=Oye});var uT=g(function(cT){Object.defineProperty(cT,"__esModule",{value:!0});cT.skip=void 0;var Fye=Js();function Pye(e){return Fye.filter(function(t,r){return e<=r})}cT.skip=Pye});var pT=g(function(dT){Object.defineProperty(dT,"__esModule",{value:!0});dT.skipLast=void 0;var Iye=Wt(),Tye=H(),Nye=oe();function jye(e){return e<=0?Iye.identity:Tye.operate(function(t,r){var n=Array(e),o=0;return t.subscribe(Nye.createOperatorSubscriber(r,function(i){var s=o++;if(s<e)n[s]=i;else{var a=s%e,c=n[a];n[a]=i,r.next(c)}})),function(){n=null}})}dT.skipLast=jye});var yT=g(function(hT){Object.defineProperty(hT,"__esModule",{value:!0});hT.skipUntil=void 0;var qye=H(),mT=oe(),Mye=we(),Lye=Ht();function Bye(e){return qye.operate(function(t,r){var n=!1,o=mT.createOperatorSubscriber(r,function(){o===null||o===void 0||o.unsubscribe(),n=!0},Lye.noop);Mye.innerFrom(e).subscribe(o),t.subscribe(mT.createOperatorSubscriber(r,function(i){return n&&r.next(i)}))})}hT.skipUntil=Bye});var _T=g(function(bT){Object.defineProperty(bT,"__esModule",{value:!0});bT.skipWhile=void 0;var Uye=H(),zye=oe();function Vye(e){return Uye.operate(function(t,r){var n=!1,o=0;t.subscribe(zye.createOperatorSubscriber(r,function(i){return(n||(n=!e(i,o++)))&&r.next(i)}))})}bT.skipWhile=Vye});var ET=g(function(wT){Object.defineProperty(wT,"__esModule",{value:!0});wT.startWith=void 0;var vT=wu(),Gye=Pr(),Hye=H();function Wye(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Gye.popScheduler(e);return Hye.operate(function(n,o){(r?vT.concat(e,n,r):vT.concat(e,n)).subscribe(o)})}wT.startWith=Wye});var Cu=g(function($T){Object.defineProperty($T,"__esModule",{value:!0});$T.switchMap=void 0;var Kye=we(),Yye=H(),ST=oe();function Jye(e,t){return Yye.operate(function(r,n){var o=null,i=0,s=!1,a=function(){return s&&!o&&n.complete()};r.subscribe(ST.createOperatorSubscriber(n,function(c){o===null||o===void 0||o.unsubscribe();var u=0,d=i++;Kye.innerFrom(e(c,d)).subscribe(o=ST.createOperatorSubscriber(n,function(f){return n.next(t?t(c,f,d,u++):f)},function(){o=null,a()}))},function(){s=!0,a()}))})}$T.switchMap=Jye});var AT=g(function(kT){Object.defineProperty(kT,"__esModule",{value:!0});kT.switchAll=void 0;var Xye=Cu(),Zye=Wt();function Qye(){return Xye.switchMap(Zye.identity)}kT.switchAll=Qye});var IT=g(function(FT){Object.defineProperty(FT,"__esModule",{value:!0});FT.switchMapTo=void 0;var OT=Cu(),ebe=rt();function tbe(e,t){return ebe.isFunction(t)?OT.switchMap(function(){return e},t):OT.switchMap(function(){return e})}FT.switchMapTo=tbe});var jT=g(function(TT){Object.defineProperty(TT,"__esModule",{value:!0});TT.switchScan=void 0;var rbe=Cu(),nbe=H();function obe(e,t){return nbe.operate(function(r,n){var o=t;return rbe.switchMap(function(i,s){return e(o,i,s)},function(i,s){return o=s,s})(r).subscribe(n),function(){o=null}})}TT.switchScan=obe});var LT=g(function(qT){Object.defineProperty(qT,"__esModule",{value:!0});qT.takeUntil=void 0;var ibe=H(),sbe=oe(),abe=we(),cbe=Ht();function lbe(e){return ibe.operate(function(t,r){abe.innerFrom(e).subscribe(sbe.createOperatorSubscriber(r,function(){return r.complete()},cbe.noop)),!r.closed&&t.subscribe(r)})}qT.takeUntil=lbe});var zT=g(function(BT){Object.defineProperty(BT,"__esModule",{value:!0});BT.takeWhile=void 0;var ube=H(),dbe=oe();function fbe(e,t){if(t===void 0)t=!1;return ube.operate(function(r,n){var o=0;r.subscribe(dbe.createOperatorSubscriber(n,function(i){var s=e(i,o++);(s||t)&&n.next(i),!s&&n.complete()}))})}BT.takeWhile=fbe});var HT=g(function(VT){Object.defineProperty(VT,"__esModule",{value:!0});VT.tap=void 0;var pbe=rt(),mbe=H(),hbe=oe(),gbe=Wt();function ybe(e,t,r){var n=pbe.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?mbe.operate(function(o,i){var s;(s=n.subscribe)===null||s===void 0||s.call(n);var a=!0;o.subscribe(hbe.createOperatorSubscriber(i,function(c){var u;(u=n.next)===null||u===void 0||u.call(n,c),i.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),i.complete()},function(c){var u;a=!1,(u=n.error)===null||u===void 0||u.call(n,c),i.error(c)},function(){var c,u;if(a)(c=n.unsubscribe)===null||c===void 0||c.call(n);(u=n.finalize)===null||u===void 0||u.call(n)}))}):gbe.identity}VT.tap=ybe});var Yx=g(function(KT){Object.defineProperty(KT,"__esModule",{value:!0});KT.throttle=void 0;var bbe=H(),WT=oe(),xbe=we();function _be(e,t){return bbe.operate(function(r,n){var o=t!==null&&t!==void 0?t:{},i=o.leading,s=i===void 0?!0:i,a=o.trailing,c=a===void 0?!1:a,u=!1,d=null,f=null,m=!1,p=function(){if(f===null||f===void 0||f.unsubscribe(),f=null,c)b(),m&&n.complete()},h=function(){f=null,m&&n.complete()},y=function(x){return f=xbe.innerFrom(e(x)).subscribe(WT.createOperatorSubscriber(n,p,h))},b=function(){if(u){u=!1;var x=d;d=null,n.next(x),!m&&y(x)}};r.subscribe(WT.createOperatorSubscriber(n,function(x){u=!0,d=x,!(f&&!f.closed)&&(s?b():y(x))},function(){m=!0,!(c&&u&&f&&!f.closed)&&n.complete()}))})}KT.throttle=_be});var ZT=g(function(JT){Object.defineProperty(JT,"__esModule",{value:!0});JT.throttleTime=void 0;var vbe=Fr(),wbe=Yx(),Dbe=Yi();function Ebe(e,t,r){if(t===void 0)t=vbe.asyncScheduler;var n=Dbe.timer(e,t);return wbe.throttle(function(){return n},r)}JT.throttleTime=Ebe});var r3=g(function(e3){Object.defineProperty(e3,"__esModule",{value:!0});e3.TimeInterval=e3.timeInterval=void 0;var Sbe=Fr(),$be=H(),Cbe=oe();function kbe(e){if(e===void 0)e=Sbe.asyncScheduler;return $be.operate(function(t,r){var n=e.now();t.subscribe(Cbe.createOperatorSubscriber(r,function(o){var i=e.now(),s=i-n;n=i,r.next(new QT(o,s))}))})}e3.timeInterval=kbe;var QT=function(){function e(t,r){this.value=t,this.interval=r}return e}();e3.TimeInterval=QT});var i3=g(function(n3){Object.defineProperty(n3,"__esModule",{value:!0});n3.timeoutWith=void 0;var Abe=Fr(),Obe=Yp(),Fbe=Jp();function Pbe(e,t,r){var n,o,i;if(r=r!==null&&r!==void 0?r:Abe.async,Obe.isValidDate(e))n=e;else if(typeof e==="number")o=e;if(t)i=function(){return t};else throw TypeError("No observable provided to switch to");if(n==null&&o==null)throw TypeError("No timeout provided.");return Fbe.timeout({first:n,each:o,scheduler:r,with:i})}n3.timeoutWith=Pbe});var c3=g(function(s3){Object.defineProperty(s3,"__esModule",{value:!0});s3.timestamp=void 0;var Ibe=Bp(),Tbe=Gi();function Nbe(e){if(e===void 0)e=Ibe.dateTimestampProvider;return Tbe.map(function(t){return{value:t,timestamp:e.now()}})}s3.timestamp=Nbe});var p3=g(function(d3){Object.defineProperty(d3,"__esModule",{value:!0});d3.window=void 0;var l3=Kt(),jbe=H(),u3=oe(),qbe=Ht(),Mbe=we();function Lbe(e){return jbe.operate(function(t,r){var n=new l3.Subject;r.next(n.asObservable());var o=function(i){n.error(i),r.error(i)};return t.subscribe(u3.createOperatorSubscriber(r,function(i){return n===null||n===void 0?void 0:n.next(i)},function(){n.complete(),r.complete()},o)),Mbe.innerFrom(e).subscribe(u3.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new l3.Subject)},qbe.noop,o)),function(){n===null||n===void 0||n.unsubscribe(),n=null}})}d3.window=Lbe});var h3=g(function(Sc){var Bbe=Sc&&Sc.__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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.windowCount=void 0;var m3=Kt(),Ube=H(),zbe=oe();function Vbe(e,t){if(t===void 0)t=0;var r=t>0?t:e;return Ube.operate(function(n,o){var i=[new m3.Subject],s=[],a=0;o.next(i[0].asObservable()),n.subscribe(zbe.createOperatorSubscriber(o,function(c){var u,d;try{for(var f=Bbe(i),m=f.next();!m.done;m=f.next()){var p=m.value;p.next(c)}}catch(b){u={error:b}}finally{try{if(m&&!m.done&&(d=f.return))d.call(f)}finally{if(u)throw u.error}}var h=a-e+1;if(h>=0&&h%r===0)i.shift().complete();if(++a%r===0){var y=new m3.Subject;i.push(y),o.next(y.asObservable())}},function(){while(i.length>0)i.shift().complete();o.complete()},function(c){while(i.length>0)i.shift().error(c);o.error(c)},function(){s=null,i=null}))})}Sc.windowCount=Vbe});var x3=g(function(y3){Object.defineProperty(y3,"__esModule",{value:!0});y3.windowTime=void 0;var Gbe=Kt(),Hbe=Fr(),Wbe=Kr(),Kbe=H(),Ybe=oe(),Jbe=Zo(),Xbe=Pr(),g3=Qo();function Zbe(e){var t,r,n=[];for(var o=1;o<arguments.length;o++)n[o-1]=arguments[o];var i=(t=Xbe.popScheduler(n))!==null&&t!==void 0?t:Hbe.asyncScheduler,s=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return Kbe.operate(function(c,u){var d=[],f=!1,m=function(b){var{window:x,subs:v}=b;x.complete(),v.unsubscribe(),Jbe.arrRemove(d,b),f&&p()},p=function(){if(d){var b=new Wbe.Subscription;u.add(b);var x=new Gbe.Subject,v={window:x,subs:b,seen:0};d.push(v),u.next(x.asObservable()),g3.executeSchedule(b,i,function(){return m(v)},e)}};if(s!==null&&s>=0)g3.executeSchedule(u,i,p,s,!0);else f=!0;p();var h=function(b){return d.slice().forEach(b)},y=function(b){h(function(x){var v=x.window;return b(v)}),b(u),u.unsubscribe()};return c.subscribe(Ybe.createOperatorSubscriber(u,function(b){h(function(x){x.window.next(b),a<=++x.seen&&m(x)})},function(){return y(function(b){return b.complete()})},function(b){return y(function(x){return x.error(b)})})),function(){d=null}})}y3.windowTime=Zbe});var w3=g(function($c){var Qbe=$c&&$c.__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(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty($c,"__esModule",{value:!0});$c.windowToggle=void 0;var exe=Kt(),txe=Kr(),rxe=H(),_3=we(),Jx=oe(),v3=Ht(),nxe=Zo();function oxe(e,t){return rxe.operate(function(r,n){var o=[],i=function(s){while(0<o.length)o.shift().error(s);n.error(s)};_3.innerFrom(e).subscribe(Jx.createOperatorSubscriber(n,function(s){var a=new exe.Subject;o.push(a);var c=new txe.Subscription,u=function(){nxe.arrRemove(o,a),a.complete(),c.unsubscribe()},d;try{d=_3.innerFrom(t(s))}catch(f){i(f);return}n.next(a.asObservable()),c.add(d.subscribe(Jx.createOperatorSubscriber(n,u,v3.noop,i)))},v3.noop)),r.subscribe(Jx.createOperatorSubscriber(n,function(s){var a,c,u=o.slice();try{for(var d=Qbe(u),f=d.next();!f.done;f=d.next()){var m=f.value;m.next(s)}}catch(p){a={error:p}}finally{try{if(f&&!f.done&&(c=d.return))c.call(d)}finally{if(a)throw a.error}}},function(){while(0<o.length)o.shift().complete();n.complete()},i,function(){while(0<o.length)o.shift().unsubscribe()}))})}$c.windowToggle=oxe});var $3=g(function(E3){Object.defineProperty(E3,"__esModule",{value:!0});E3.windowWhen=void 0;var ixe=Kt(),sxe=H(),D3=oe(),axe=we();function cxe(e){return sxe.operate(function(t,r){var n,o,i=function(a){n.error(a),r.error(a)},s=function(){o===null||o===void 0||o.unsubscribe(),n===null||n===void 0||n.complete(),n=new ixe.Subject,r.next(n.asObservable());var a;try{a=axe.innerFrom(e())}catch(c){i(c);return}a.subscribe(o=D3.createOperatorSubscriber(r,s,s,i))};s(),t.subscribe(D3.createOperatorSubscriber(r,function(a){return n.next(a)},function(){n.complete(),r.complete()},i,function(){o===null||o===void 0||o.unsubscribe(),n=null}))})}E3.windowWhen=cxe});var A3=g(function(ss){var C3=ss&&ss.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},k3=ss&&ss.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(ss,"__esModule",{value:!0});ss.withLatestFrom=void 0;var lxe=H(),R3=oe(),uxe=we(),dxe=Wt(),fxe=Ht(),pxe=Pr();function mxe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pxe.popResultSelector(e);return lxe.operate(function(n,o){var i=e.length,s=Array(i),a=e.map(function(){return!1}),c=!1,u=function(f){uxe.innerFrom(e[f]).subscribe(R3.createOperatorSubscriber(o,function(m){if(s[f]=m,!c&&!a[f])a[f]=!0,(c=a.every(dxe.identity))&&(a=null)},fxe.noop))};for(var d=0;d<i;d++)u(d);n.subscribe(R3.createOperatorSubscriber(o,function(f){if(c){var m=k3([f],C3(s));o.next(r?r.apply(void 0,k3([],C3(m))):m)}}))})}ss.withLatestFrom=mxe});var P3=g(function(O3){Object.defineProperty(O3,"__esModule",{value:!0});O3.zipAll=void 0;var hxe=em(),gxe=Ix();function yxe(e){return gxe.joinAllInternals(hxe.zip,e)}O3.zipAll=yxe});var I3=g(function(as){var bxe=as&&as.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},xxe=as&&as.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(as,"__esModule",{value:!0});as.zip=void 0;var _xe=em(),vxe=H();function wxe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return vxe.operate(function(r,n){_xe.zip.apply(void 0,xxe([r],bxe(e))).subscribe(n)})}as.zip=wxe});var T3=g(function(cs){var Dxe=cs&&cs.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)i.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(s)throw s.error}}return i},Exe=cs&&cs.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(cs,"__esModule",{value:!0});cs.zipWith=void 0;var Sxe=I3();function $xe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return Sxe.zip.apply(void 0,Exe([],Dxe(e)))}cs.zipWith=$xe});var Yr=g(function(_){var Cxe=_&&_.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]}),kxe=_&&_.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Cxe(t,e,r)};Object.defineProperty(_,"__esModule",{value:!0});_.interval=_.iif=_.generate=_.fromEventPattern=_.fromEvent=_.from=_.forkJoin=_.empty=_.defer=_.connectable=_.concat=_.combineLatest=_.bindNodeCallback=_.bindCallback=_.UnsubscriptionError=_.TimeoutError=_.SequenceError=_.ObjectUnsubscribedError=_.NotFoundError=_.EmptyError=_.ArgumentOutOfRangeError=_.firstValueFrom=_.lastValueFrom=_.isObservable=_.identity=_.noop=_.pipe=_.NotificationKind=_.Notification=_.Subscriber=_.Subscription=_.Scheduler=_.VirtualAction=_.VirtualTimeScheduler=_.animationFrameScheduler=_.animationFrame=_.queueScheduler=_.queue=_.asyncScheduler=_.async=_.asapScheduler=_.asap=_.AsyncSubject=_.ReplaySubject=_.BehaviorSubject=_.Subject=_.animationFrames=_.observable=_.ConnectableObservable=_.Observable=void 0;_.filter=_.expand=_.exhaustMap=_.exhaustAll=_.exhaust=_.every=_.endWith=_.elementAt=_.distinctUntilKeyChanged=_.distinctUntilChanged=_.distinct=_.dematerialize=_.delayWhen=_.delay=_.defaultIfEmpty=_.debounceTime=_.debounce=_.count=_.connect=_.concatWith=_.concatMapTo=_.concatMap=_.concatAll=_.combineLatestWith=_.combineLatestAll=_.combineAll=_.catchError=_.bufferWhen=_.bufferToggle=_.bufferTime=_.bufferCount=_.buffer=_.auditTime=_.audit=_.config=_.NEVER=_.EMPTY=_.scheduled=_.zip=_.using=_.timer=_.throwError=_.range=_.race=_.partition=_.pairs=_.onErrorResumeNext=_.of=_.never=_.merge=void 0;_.switchMap=_.switchAll=_.subscribeOn=_.startWith=_.skipWhile=_.skipUntil=_.skipLast=_.skip=_.single=_.shareReplay=_.share=_.sequenceEqual=_.scan=_.sampleTime=_.sample=_.refCount=_.retryWhen=_.retry=_.repeatWhen=_.repeat=_.reduce=_.raceWith=_.publishReplay=_.publishLast=_.publishBehavior=_.publish=_.pluck=_.pairwise=_.onErrorResumeNextWith=_.observeOn=_.multicast=_.min=_.mergeWith=_.mergeScan=_.mergeMapTo=_.mergeMap=_.flatMap=_.mergeAll=_.max=_.materialize=_.mapTo=_.map=_.last=_.isEmpty=_.ignoreElements=_.groupBy=_.first=_.findIndex=_.find=_.finalize=void 0;_.zipWith=_.zipAll=_.withLatestFrom=_.windowWhen=_.windowToggle=_.windowTime=_.windowCount=_.window=_.toArray=_.timestamp=_.timeoutWith=_.timeout=_.timeInterval=_.throwIfEmpty=_.throttleTime=_.throttle=_.tap=_.takeWhile=_.takeUntil=_.takeLast=_.take=_.switchScan=_.switchMapTo=void 0;var Rxe=nt();Object.defineProperty(_,"Observable",{enumerable:!0,get:function(){return Rxe.Observable}});var Axe=yu();Object.defineProperty(_,"ConnectableObservable",{enumerable:!0,get:function(){return Axe.ConnectableObservable}});var Oxe=hu();Object.defineProperty(_,"observable",{enumerable:!0,get:function(){return Oxe.observable}});var Fxe=GC();Object.defineProperty(_,"animationFrames",{enumerable:!0,get:function(){return Fxe.animationFrames}});var Pxe=Kt();Object.defineProperty(_,"Subject",{enumerable:!0,get:function(){return Pxe.Subject}});var Ixe=Qb();Object.defineProperty(_,"BehaviorSubject",{enumerable:!0,get:function(){return Ixe.BehaviorSubject}});var Txe=Up();Object.defineProperty(_,"ReplaySubject",{enumerable:!0,get:function(){return Txe.ReplaySubject}});var Nxe=zp();Object.defineProperty(_,"AsyncSubject",{enumerable:!0,get:function(){return Nxe.AsyncSubject}});var N3=bk();Object.defineProperty(_,"asap",{enumerable:!0,get:function(){return N3.asap}});Object.defineProperty(_,"asapScheduler",{enumerable:!0,get:function(){return N3.asapScheduler}});var j3=Fr();Object.defineProperty(_,"async",{enumerable:!0,get:function(){return j3.async}});Object.defineProperty(_,"asyncScheduler",{enumerable:!0,get:function(){return j3.asyncScheduler}});var q3=Ck();Object.defineProperty(_,"queue",{enumerable:!0,get:function(){return q3.queue}});Object.defineProperty(_,"queueScheduler",{enumerable:!0,get:function(){return q3.queueScheduler}});var M3=Ik();Object.defineProperty(_,"animationFrame",{enumerable:!0,get:function(){return M3.animationFrame}});Object.defineProperty(_,"animationFrameScheduler",{enumerable:!0,get:function(){return M3.animationFrameScheduler}});var L3=jk();Object.defineProperty(_,"VirtualTimeScheduler",{enumerable:!0,get:function(){return L3.VirtualTimeScheduler}});Object.defineProperty(_,"VirtualAction",{enumerable:!0,get:function(){return L3.VirtualAction}});var jxe=rx();Object.defineProperty(_,"Scheduler",{enumerable:!0,get:function(){return jxe.Scheduler}});var qxe=Kr();Object.defineProperty(_,"Subscription",{enumerable:!0,get:function(){return qxe.Subscription}});var Mxe=Qa();Object.defineProperty(_,"Subscriber",{enumerable:!0,get:function(){return Mxe.Subscriber}});var B3=Kp();Object.defineProperty(_,"Notification",{enumerable:!0,get:function(){return B3.Notification}});Object.defineProperty(_,"NotificationKind",{enumerable:!0,get:function(){return B3.NotificationKind}});var Lxe=gu();Object.defineProperty(_,"pipe",{enumerable:!0,get:function(){return Lxe.pipe}});var Bxe=Ht();Object.defineProperty(_,"noop",{enumerable:!0,get:function(){return Bxe.noop}});var Uxe=Wt();Object.defineProperty(_,"identity",{enumerable:!0,get:function(){return Uxe.identity}});var zxe=ZR();Object.defineProperty(_,"isObservable",{enumerable:!0,get:function(){return zxe.isObservable}});var Vxe=nA();Object.defineProperty(_,"lastValueFrom",{enumerable:!0,get:function(){return Vxe.lastValueFrom}});var Gxe=sA();Object.defineProperty(_,"firstValueFrom",{enumerable:!0,get:function(){return Gxe.firstValueFrom}});var Hxe=yx();Object.defineProperty(_,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return Hxe.ArgumentOutOfRangeError}});var Wxe=Vi();Object.defineProperty(_,"EmptyError",{enumerable:!0,get:function(){return Wxe.EmptyError}});var Kxe=bx();Object.defineProperty(_,"NotFoundError",{enumerable:!0,get:function(){return Kxe.NotFoundError}});var Yxe=Yb();Object.defineProperty(_,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return Yxe.ObjectUnsubscribedError}});var Jxe=xx();Object.defineProperty(_,"SequenceError",{enumerable:!0,get:function(){return Jxe.SequenceError}});var Xxe=Jp();Object.defineProperty(_,"TimeoutError",{enumerable:!0,get:function(){return Xxe.TimeoutError}});var Zxe=Tb();Object.defineProperty(_,"UnsubscriptionError",{enumerable:!0,get:function(){return Zxe.UnsubscriptionError}});var Qxe=DA();Object.defineProperty(_,"bindCallback",{enumerable:!0,get:function(){return Qxe.bindCallback}});var e_e=$A();Object.defineProperty(_,"bindNodeCallback",{enumerable:!0,get:function(){return e_e.bindNodeCallback}});var t_e=Xp();Object.defineProperty(_,"combineLatest",{enumerable:!0,get:function(){return t_e.combineLatest}});var r_e=wu();Object.defineProperty(_,"concat",{enumerable:!0,get:function(){return r_e.concat}});var n_e=eO();Object.defineProperty(_,"connectable",{enumerable:!0,get:function(){return n_e.connectable}});var o_e=Du();Object.defineProperty(_,"defer",{enumerable:!0,get:function(){return o_e.defer}});var i_e=In();Object.defineProperty(_,"empty",{enumerable:!0,get:function(){return i_e.empty}});var s_e=nO();Object.defineProperty(_,"forkJoin",{enumerable:!0,get:function(){return s_e.forkJoin}});var a_e=ei();Object.defineProperty(_,"from",{enumerable:!0,get:function(){return a_e.from}});var c_e=iO();Object.defineProperty(_,"fromEvent",{enumerable:!0,get:function(){return c_e.fromEvent}});var l_e=lO();Object.defineProperty(_,"fromEventPattern",{enumerable:!0,get:function(){return l_e.fromEventPattern}});var u_e=dO();Object.defineProperty(_,"generate",{enumerable:!0,get:function(){return u_e.generate}});var d_e=mO();Object.defineProperty(_,"iif",{enumerable:!0,get:function(){return d_e.iif}});var f_e=Sx();Object.defineProperty(_,"interval",{enumerable:!0,get:function(){return f_e.interval}});var p_e=wO();Object.defineProperty(_,"merge",{enumerable:!0,get:function(){return p_e.merge}});var m_e=$x();Object.defineProperty(_,"never",{enumerable:!0,get:function(){return m_e.never}});var h_e=Wp();Object.defineProperty(_,"of",{enumerable:!0,get:function(){return h_e.of}});var g_e=Cx();Object.defineProperty(_,"onErrorResumeNext",{enumerable:!0,get:function(){return g_e.onErrorResumeNext}});var y_e=PO();Object.defineProperty(_,"pairs",{enumerable:!0,get:function(){return y_e.pairs}});var b_e=zO();Object.defineProperty(_,"partition",{enumerable:!0,get:function(){return b_e.partition}});var x_e=kx();Object.defineProperty(_,"race",{enumerable:!0,get:function(){return x_e.race}});var __e=JO();Object.defineProperty(_,"range",{enumerable:!0,get:function(){return __e.range}});var v_e=gx();Object.defineProperty(_,"throwError",{enumerable:!0,get:function(){return v_e.throwError}});var w_e=Yi();Object.defineProperty(_,"timer",{enumerable:!0,get:function(){return w_e.timer}});var D_e=QO();Object.defineProperty(_,"using",{enumerable:!0,get:function(){return D_e.using}});var E_e=em();Object.defineProperty(_,"zip",{enumerable:!0,get:function(){return E_e.zip}});var S_e=hx();Object.defineProperty(_,"scheduled",{enumerable:!0,get:function(){return S_e.scheduled}});var $_e=In();Object.defineProperty(_,"EMPTY",{enumerable:!0,get:function(){return $_e.EMPTY}});var C_e=$x();Object.defineProperty(_,"NEVER",{enumerable:!0,get:function(){return C_e.NEVER}});kxe(t6(),_);var k_e=Za();Object.defineProperty(_,"config",{enumerable:!0,get:function(){return k_e.config}});var R_e=Rx();Object.defineProperty(_,"audit",{enumerable:!0,get:function(){return R_e.audit}});var A_e=a6();Object.defineProperty(_,"auditTime",{enumerable:!0,get:function(){return A_e.auditTime}});var O_e=d6();Object.defineProperty(_,"buffer",{enumerable:!0,get:function(){return O_e.buffer}});var F_e=f6();Object.defineProperty(_,"bufferCount",{enumerable:!0,get:function(){return F_e.bufferCount}});var P_e=m6();Object.defineProperty(_,"bufferTime",{enumerable:!0,get:function(){return P_e.bufferTime}});var I_e=y6();Object.defineProperty(_,"bufferToggle",{enumerable:!0,get:function(){return I_e.bufferToggle}});var T_e=v6();Object.defineProperty(_,"bufferWhen",{enumerable:!0,get:function(){return T_e.bufferWhen}});var N_e=S6();Object.defineProperty(_,"catchError",{enumerable:!0,get:function(){return N_e.catchError}});var j_e=q6();Object.defineProperty(_,"combineAll",{enumerable:!0,get:function(){return j_e.combineAll}});var q_e=Tx();Object.defineProperty(_,"combineLatestAll",{enumerable:!0,get:function(){return q_e.combineLatestAll}});var M_e=z6();Object.defineProperty(_,"combineLatestWith",{enumerable:!0,get:function(){return M_e.combineLatestWith}});var L_e=Qp();Object.defineProperty(_,"concatAll",{enumerable:!0,get:function(){return L_e.concatAll}});var B_e=Nx();Object.defineProperty(_,"concatMap",{enumerable:!0,get:function(){return B_e.concatMap}});var U_e=J6();Object.defineProperty(_,"concatMapTo",{enumerable:!0,get:function(){return U_e.concatMapTo}});var z_e=Z6();Object.defineProperty(_,"concatWith",{enumerable:!0,get:function(){return z_e.concatWith}});var V_e=tm();Object.defineProperty(_,"connect",{enumerable:!0,get:function(){return V_e.connect}});var G_e=sF();Object.defineProperty(_,"count",{enumerable:!0,get:function(){return G_e.count}});var H_e=uF();Object.defineProperty(_,"debounce",{enumerable:!0,get:function(){return H_e.debounce}});var W_e=pF();Object.defineProperty(_,"debounceTime",{enumerable:!0,get:function(){return W_e.debounceTime}});var K_e=Eu();Object.defineProperty(_,"defaultIfEmpty",{enumerable:!0,get:function(){return K_e.defaultIfEmpty}});var Y_e=kF();Object.defineProperty(_,"delay",{enumerable:!0,get:function(){return Y_e.delay}});var J_e=Mx();Object.defineProperty(_,"delayWhen",{enumerable:!0,get:function(){return J_e.delayWhen}});var X_e=OF();Object.defineProperty(_,"dematerialize",{enumerable:!0,get:function(){return X_e.dematerialize}});var Z_e=TF();Object.defineProperty(_,"distinct",{enumerable:!0,get:function(){return Z_e.distinct}});var Q_e=Lx();Object.defineProperty(_,"distinctUntilChanged",{enumerable:!0,get:function(){return Q_e.distinctUntilChanged}});var eve=LF();Object.defineProperty(_,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return eve.distinctUntilKeyChanged}});var tve=HF();Object.defineProperty(_,"elementAt",{enumerable:!0,get:function(){return tve.elementAt}});var rve=WF();Object.defineProperty(_,"endWith",{enumerable:!0,get:function(){return rve.endWith}});var nve=JF();Object.defineProperty(_,"every",{enumerable:!0,get:function(){return nve.every}});var ove=sP();Object.defineProperty(_,"exhaust",{enumerable:!0,get:function(){return ove.exhaust}});var ive=Ux();Object.defineProperty(_,"exhaustAll",{enumerable:!0,get:function(){return ive.exhaustAll}});var sve=Bx();Object.defineProperty(_,"exhaustMap",{enumerable:!0,get:function(){return sve.exhaustMap}});var ave=lP();Object.defineProperty(_,"expand",{enumerable:!0,get:function(){return ave.expand}});var cve=Js();Object.defineProperty(_,"filter",{enumerable:!0,get:function(){return cve.filter}});var lve=fP();Object.defineProperty(_,"finalize",{enumerable:!0,get:function(){return lve.finalize}});var uve=zx();Object.defineProperty(_,"find",{enumerable:!0,get:function(){return uve.find}});var dve=bP();Object.defineProperty(_,"findIndex",{enumerable:!0,get:function(){return dve.findIndex}});var fve=vP();Object.defineProperty(_,"first",{enumerable:!0,get:function(){return fve.first}});var pve=SP();Object.defineProperty(_,"groupBy",{enumerable:!0,get:function(){return pve.groupBy}});var mve=jx();Object.defineProperty(_,"ignoreElements",{enumerable:!0,get:function(){return mve.ignoreElements}});var hve=kP();Object.defineProperty(_,"isEmpty",{enumerable:!0,get:function(){return hve.isEmpty}});var gve=OP();Object.defineProperty(_,"last",{enumerable:!0,get:function(){return gve.last}});var yve=Gi();Object.defineProperty(_,"map",{enumerable:!0,get:function(){return yve.map}});var bve=qx();Object.defineProperty(_,"mapTo",{enumerable:!0,get:function(){return bve.mapTo}});var xve=IP();Object.defineProperty(_,"materialize",{enumerable:!0,get:function(){return xve.materialize}});var _ve=jP();Object.defineProperty(_,"max",{enumerable:!0,get:function(){return _ve.max}});var vve=vu();Object.defineProperty(_,"mergeAll",{enumerable:!0,get:function(){return vve.mergeAll}});var wve=LP();Object.defineProperty(_,"flatMap",{enumerable:!0,get:function(){return wve.flatMap}});var Dve=ti();Object.defineProperty(_,"mergeMap",{enumerable:!0,get:function(){return Dve.mergeMap}});var Eve=VP();Object.defineProperty(_,"mergeMapTo",{enumerable:!0,get:function(){return Eve.mergeMapTo}});var Sve=WP();Object.defineProperty(_,"mergeScan",{enumerable:!0,get:function(){return Sve.mergeScan}});var $ve=JP();Object.defineProperty(_,"mergeWith",{enumerable:!0,get:function(){return $ve.mergeWith}});var Cve=QP();Object.defineProperty(_,"min",{enumerable:!0,get:function(){return Cve.min}});var kve=rm();Object.defineProperty(_,"multicast",{enumerable:!0,get:function(){return kve.multicast}});var Rve=xu();Object.defineProperty(_,"observeOn",{enumerable:!0,get:function(){return Rve.observeOn}});var Ave=oI();Object.defineProperty(_,"onErrorResumeNextWith",{enumerable:!0,get:function(){return Ave.onErrorResumeNextWith}});var Ove=aI();Object.defineProperty(_,"pairwise",{enumerable:!0,get:function(){return Ove.pairwise}});var Fve=uI();Object.defineProperty(_,"pluck",{enumerable:!0,get:function(){return Fve.pluck}});var Pve=pI();Object.defineProperty(_,"publish",{enumerable:!0,get:function(){return Pve.publish}});var Ive=gI();Object.defineProperty(_,"publishBehavior",{enumerable:!0,get:function(){return Ive.publishBehavior}});var Tve=xI();Object.defineProperty(_,"publishLast",{enumerable:!0,get:function(){return Tve.publishLast}});var Nve=DI();Object.defineProperty(_,"publishReplay",{enumerable:!0,get:function(){return Nve.publishReplay}});var jve=EI();Object.defineProperty(_,"raceWith",{enumerable:!0,get:function(){return jve.raceWith}});var qve=Dc();Object.defineProperty(_,"reduce",{enumerable:!0,get:function(){return qve.reduce}});var Mve=kI();Object.defineProperty(_,"repeat",{enumerable:!0,get:function(){return Mve.repeat}});var Lve=FI();Object.defineProperty(_,"repeatWhen",{enumerable:!0,get:function(){return Lve.repeatWhen}});var Bve=NI();Object.defineProperty(_,"retry",{enumerable:!0,get:function(){return Bve.retry}});var Uve=LI();Object.defineProperty(_,"retryWhen",{enumerable:!0,get:function(){return Uve.retryWhen}});var zve=Hb();Object.defineProperty(_,"refCount",{enumerable:!0,get:function(){return zve.refCount}});var Vve=Hx();Object.defineProperty(_,"sample",{enumerable:!0,get:function(){return Vve.sample}});var Gve=HI();Object.defineProperty(_,"sampleTime",{enumerable:!0,get:function(){return Gve.sampleTime}});var Hve=YI();Object.defineProperty(_,"scan",{enumerable:!0,get:function(){return Hve.scan}});var Wve=QI();Object.defineProperty(_,"sequenceEqual",{enumerable:!0,get:function(){return Wve.sequenceEqual}});var Kve=Kx();Object.defineProperty(_,"share",{enumerable:!0,get:function(){return Kve.share}});var Yve=oT();Object.defineProperty(_,"shareReplay",{enumerable:!0,get:function(){return Yve.shareReplay}});var Jve=aT();Object.defineProperty(_,"single",{enumerable:!0,get:function(){return Jve.single}});var Xve=uT();Object.defineProperty(_,"skip",{enumerable:!0,get:function(){return Xve.skip}});var Zve=pT();Object.defineProperty(_,"skipLast",{enumerable:!0,get:function(){return Zve.skipLast}});var Qve=yT();Object.defineProperty(_,"skipUntil",{enumerable:!0,get:function(){return Qve.skipUntil}});var ewe=_T();Object.defineProperty(_,"skipWhile",{enumerable:!0,get:function(){return ewe.skipWhile}});var twe=ET();Object.defineProperty(_,"startWith",{enumerable:!0,get:function(){return twe.startWith}});var rwe=_u();Object.defineProperty(_,"subscribeOn",{enumerable:!0,get:function(){return rwe.subscribeOn}});var nwe=AT();Object.defineProperty(_,"switchAll",{enumerable:!0,get:function(){return nwe.switchAll}});var owe=Cu();Object.defineProperty(_,"switchMap",{enumerable:!0,get:function(){return owe.switchMap}});var iwe=IT();Object.defineProperty(_,"switchMapTo",{enumerable:!0,get:function(){return iwe.switchMapTo}});var swe=jT();Object.defineProperty(_,"switchScan",{enumerable:!0,get:function(){return swe.switchScan}});var awe=Su();Object.defineProperty(_,"take",{enumerable:!0,get:function(){return awe.take}});var cwe=Vx();Object.defineProperty(_,"takeLast",{enumerable:!0,get:function(){return cwe.takeLast}});var lwe=LT();Object.defineProperty(_,"takeUntil",{enumerable:!0,get:function(){return lwe.takeUntil}});var uwe=zT();Object.defineProperty(_,"takeWhile",{enumerable:!0,get:function(){return uwe.takeWhile}});var dwe=HT();Object.defineProperty(_,"tap",{enumerable:!0,get:function(){return dwe.tap}});var fwe=Yx();Object.defineProperty(_,"throttle",{enumerable:!0,get:function(){return fwe.throttle}});var pwe=ZT();Object.defineProperty(_,"throttleTime",{enumerable:!0,get:function(){return pwe.throttleTime}});var mwe=$u();Object.defineProperty(_,"throwIfEmpty",{enumerable:!0,get:function(){return mwe.throwIfEmpty}});var hwe=r3();Object.defineProperty(_,"timeInterval",{enumerable:!0,get:function(){return hwe.timeInterval}});var gwe=Jp();Object.defineProperty(_,"timeout",{enumerable:!0,get:function(){return gwe.timeout}});var ywe=i3();Object.defineProperty(_,"timeoutWith",{enumerable:!0,get:function(){return ywe.timeoutWith}});var bwe=c3();Object.defineProperty(_,"timestamp",{enumerable:!0,get:function(){return bwe.timestamp}});var xwe=Px();Object.defineProperty(_,"toArray",{enumerable:!0,get:function(){return xwe.toArray}});var _we=p3();Object.defineProperty(_,"window",{enumerable:!0,get:function(){return _we.window}});var vwe=h3();Object.defineProperty(_,"windowCount",{enumerable:!0,get:function(){return vwe.windowCount}});var wwe=x3();Object.defineProperty(_,"windowTime",{enumerable:!0,get:function(){return wwe.windowTime}});var Dwe=w3();Object.defineProperty(_,"windowToggle",{enumerable:!0,get:function(){return Dwe.windowToggle}});var Ewe=$3();Object.defineProperty(_,"windowWhen",{enumerable:!0,get:function(){return Ewe.windowWhen}});var Swe=A3();Object.defineProperty(_,"withLatestFrom",{enumerable:!0,get:function(){return Swe.withLatestFrom}});var $we=P3();Object.defineProperty(_,"zipAll",{enumerable:!0,get:function(){return $we.zipAll}});var Cwe=T3();Object.defineProperty(_,"zipWith",{enumerable:!0,get:function(){return Cwe.zipWith}})});function kwe(e,t){return{value:e,key:t||{}}}function Yt(e){let t=xt.fromEvent(e.input,"keypress",kwe).pipe(xt.takeUntil(xt.fromEvent(e,"close"))).pipe(xt.filter(({key:r})=>r.name!=="enter"&&r.name!=="return"));return{line:xt.fromEvent(e,"line"),keypress:t,normalizedUpKey:t.pipe(xt.filter(({key:r})=>r.name==="up"||r.name==="k"||r.name==="p"&&r.ctrl),xt.share()),normalizedDownKey:t.pipe(xt.filter(({key:r})=>r.name==="down"||r.name==="j"||r.name==="n"&&r.ctrl),xt.share()),numberKey:t.pipe(xt.filter((r)=>r.value&&"123456789".includes(r.value)),xt.map((r)=>Number(r.value)),xt.share()),spaceKey:t.pipe(xt.filter(({key:r})=>r&&r.name==="space"),xt.share()),aKey:t.pipe(xt.filter(({key:r})=>r&&r.name==="a"),xt.share()),iKey:t.pipe(xt.filter(({key:r})=>r&&r.name==="i"),xt.share())}}var xt;var ri=O(()=>{xt=ye(Yr(),1)});class ho{constructor(e,t={}){let{isInfinite:r=!0}=t;this.lastIndex=0,this.screen=e,this.isInfinite=r}paginate(e,t,r){r||=7;let n=e.split(`
32
32
  `);if(this.screen)n=this.screen.breakLines(n),t=n.map((i)=>i.length).splice(0,t).reduce((i,s)=>i+s,0),n=n.flat();if(n.length<=r)return e;let o=this.isInfinite?this.getInfiniteLines(n,t,r):this.getFiniteLines(n,t,r);return this.lastIndex=t,o.join(`
33
33
  `)+`
34
- `+U3.default.dim("(Move up and down to reveal more choices)")}getInfiniteLines(e,t,r){if(this.pointer===void 0)this.pointer=0;let n=Math.floor(r/2);if(this.pointer<n&&this.lastIndex<t&&t-this.lastIndex<r)this.pointer=Math.min(n,this.pointer+t-this.lastIndex);let o=[e,e,e].flat(),i=Math.max(0,t+e.length-this.pointer);return o.splice(i,r)}getFiniteLines(e,t,r){let n=t-r/2;if(n<0)n=0;else if(n+r>e.length)n=e.length-r;return e.splice(n,r)}}var U3;var ku=O(()=>{U3=ye(ln(),1)});function ni(e,t,r){let n=r.choices.realLength,o="loop"in r?Boolean(r.loop):!0;if(t==="up"){if(e>0)return e-1;return o?n-1:e}if(t==="down"){if(e<n-1)return e+1;return o?0:e}throw Error("dir must be up or down")}class Jr{constructor(e){this.type="separator",this.line=z3.default.dim(e||Array.from({length:15}).join(Li.line))}static exclude(e){return e.type!=="separator"}toString(){return this.line}}var z3;var Ru=O(()=>{jp();z3=ye(ln(),1)});class Cc{constructor(e,t){if(e instanceof Cc||e.type==="separator")return e;if(typeof e==="string"||typeof e==="number")this.name=String(e),this.value=e,this.short=String(e);else Object.assign(this,e,{name:e.name||e.value,value:"value"in e?e.value:e.name,short:e.short||e.name||e.value});this.disabled=typeof e.disabled==="function"?e.disabled(t):e.disabled}}import V3 from"assert";var nm;var G3=O(()=>{Ru();nm=class nm{constructor(e,t){this.choices=e.map((r)=>{if(r.type==="separator"){if(!(r instanceof Jr))r=new Jr(r.line);return r}return new Cc(r,t)}),this.realChoices=this.choices.filter(Jr.exclude).filter((r)=>!r.disabled),Object.defineProperty(this,"length",{get(){return this.choices.length},set(r){this.choices.length=r}}),Object.defineProperty(this,"realLength",{get(){return this.realChoices.length},set(){throw Error("Cannot set `realLength` of a Choices collection")}})}[Symbol.iterator](){let e=this.choices,t=-1;return{next:()=>({value:e[++t],done:!(t in e)})}}getChoice(e){return V3(typeof e==="number"),this.realChoices[e]}get(e){return V3(typeof e==="number"),this.choices[e]}where(e){let t;if(typeof e==="function")t=e;else{let[r,n]=Object.entries(e)[0];t=(o)=>o[r]===n}return this.realChoices.filter(t)}pluck(e){return this.realChoices.map((t)=>t[e])}indexOf(...e){return this.choices.indexOf(...e)}forEach(...e){return this.choices.forEach(...e)}filter(...e){return this.choices.filter(...e)}reduce(...e){return this.choices.reduce(...e)}find(e){return this.choices.find(e)}some(e){return this.choices.some(e)}push(...e){let t=e.map((r)=>new Cc(r));return this.choices.push(...t),this.realChoices=this.choices.filter(Jr.exclude).filter((r)=>!r.disabled),this.choices}}});var W3=g(function(krt,H3){H3.exports=Awe;function Rwe(e){let t={defaultWidth:0,output:process.stdout,tty:Je("tty")};if(!e)return t;return Object.keys(t).forEach(function(r){if(!e[r])e[r]=t[r]}),e}function Awe(e){let t=Rwe(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let r=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(r)&&r!==0)return r}return t.defaultWidth}});var Y3=g(function(Rrt,K3){K3.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Au=g(function(Art,J3){var Owe=Y3();J3.exports=(e)=>typeof e==="string"?e.replace(Owe(),""):e});var Z3=g(function(Ort,Xx){var X3=(e)=>{if(Number.isNaN(e))return!1;if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))return!0;return!1};Xx.exports=X3;Xx.exports.default=X3});var e4=g(function(Frt,Q3){Q3.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Qx=g(function(Prt,Zx){var Fwe=Au(),Pwe=Z3(),Iwe=e4(),t4=(e)=>{if(typeof e!=="string"||e.length===0)return 0;if(e=Fwe(e),e.length===0)return 0;e=e.replace(Iwe()," ");let t=0;for(let r=0;r<e.length;r++){let n=e.codePointAt(r);if(n<=31||n>=127&&n<=159)continue;if(n>=768&&n<=879)continue;if(n>65535)r++;t+=Pwe(n)?2:1}return t};Zx.exports=t4;Zx.exports.default=t4});var n4=g(function(Irt,r4){r4.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var e_=g(function(Trt,i4){var Ou=n4(),o4={};for(let e of Object.keys(Ou))o4[Ou[e]]=e;var te={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};i4.exports=te;for(let e of Object.keys(te)){if(!("channels"in te[e]))throw Error("missing channels property: "+e);if(!("labels"in te[e]))throw Error("missing channel labels property: "+e);if(te[e].labels.length!==te[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=te[e];delete te[e].channels,delete te[e].labels,Object.defineProperty(te[e],"channels",{value:t}),Object.defineProperty(te[e],"labels",{value:r})}te.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),s=i-o,a,c;if(i===o)a=0;else if(t===i)a=(r-n)/s;else if(r===i)a=2+(n-t)/s;else if(n===i)a=4+(t-r)/s;if(a=Math.min(a*60,360),a<0)a+=360;let u=(o+i)/2;if(i===o)c=0;else if(u<=0.5)c=s/(i+o);else c=s/(2-i-o);return[a,c*100,u*100]};te.rgb.hsv=function(e){let t,r,n,o,i,s=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(s,a,c),d=u-Math.min(s,a,c),f=function(m){return(u-m)/6/d+0.5};if(d===0)o=0,i=0;else{if(i=d/u,t=f(s),r=f(a),n=f(c),s===u)o=n-r;else if(a===u)o=0.3333333333333333+t-n;else if(c===u)o=0.6666666666666666+r-t;if(o<0)o+=1;else if(o>1)o-=1}return[o*360,i*100,u*100]};te.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],o=te.rgb.hsl(e)[0],i=0.00392156862745098*Math.min(t,Math.min(r,n));return n=1-0.00392156862745098*Math.max(t,Math.max(r,n)),[o,i*100,n*100]};te.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),i=(1-t-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-n-o)/(1-o)||0;return[i*100,s*100,a*100,o*100]};function Twe(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}te.rgb.keyword=function(e){let t=o4[e];if(t)return t;let r=1/0,n;for(let o of Object.keys(Ou)){let i=Ou[o],s=Twe(e,i);if(s<r)r=s,n=o}return n};te.keyword.rgb=function(e){return Ou[e]};te.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>0.04045?((t+0.055)/1.055)**2.4:t/12.92,r=r>0.04045?((r+0.055)/1.055)**2.4:r/12.92,n=n>0.04045?((n+0.055)/1.055)**2.4:n/12.92;let o=t*0.4124+r*0.3576+n*0.1805,i=t*0.2126+r*0.7152+n*0.0722,s=t*0.0193+r*0.1192+n*0.9505;return[o*100,i*100,s*100]};te.rgb.lab=function(e){let t=te.rgb.xyz(e),r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>0.008856?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>0.008856?n**0.3333333333333333:7.787*n+0.13793103448275862,o=o>0.008856?o**0.3333333333333333:7.787*o+0.13793103448275862;let i=116*n-16,s=500*(r-n),a=200*(n-o);return[i,s,a]};te.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o,i,s;if(r===0)return s=n*255,[s,s,s];if(n<0.5)o=n*(1+r);else o=n+r-n*r;let a=2*n-o,c=[0,0,0];for(let u=0;u<3;u++){if(i=t+0.3333333333333333*-(u-1),i<0)i++;if(i>1)i--;if(6*i<1)s=a+(o-a)*6*i;else if(2*i<1)s=o;else if(3*i<2)s=a+(o-a)*(0.6666666666666666-i)*6;else s=a;c[u]=s*255}return c};te.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=r,i=Math.max(n,0.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;let s=(n+r)/2,a=n===0?2*o/(i+o):2*r/(n+r);return[t,a*100,s*100]};te.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};te.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,0.01),i,s;s=(2-r)*n;let a=(2-r)*o;return i=r*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,i*100,s*100]};te.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o=r+n,i;if(o>1)r/=o,n/=o;let s=Math.floor(6*t),a=1-n;if(i=6*t-s,(s&1)!==0)i=1-i;let c=r+i*(a-r),u,d,f;switch(s){default:case 6:case 0:u=a,d=c,f=r;break;case 1:u=c,d=a,f=r;break;case 2:u=r,d=a,f=c;break;case 3:u=r,d=c,f=a;break;case 4:u=c,d=r,f=a;break;case 5:u=a,d=r,f=c;break}return[u*255,d*255,f*255]};te.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,r*(1-o)+o),a=1-Math.min(1,n*(1-o)+o);return[i*255,s*255,a*255]};te.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o,i,s;return o=t*3.2406+r*-1.5372+n*-0.4986,i=t*-0.9689+r*1.8758+n*0.0415,s=t*0.0557+r*-0.204+n*1.057,o=o>0.0031308?1.055*o**0.4166666666666667-0.055:o*12.92,i=i>0.0031308?1.055*i**0.4166666666666667-0.055:i*12.92,s=s>0.0031308?1.055*s**0.4166666666666667-0.055:s*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[o*255,i*255,s*255]};te.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>0.008856?t**0.3333333333333333:7.787*t+0.13793103448275862,r=r>0.008856?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>0.008856?n**0.3333333333333333:7.787*n+0.13793103448275862;let o=116*r-16,i=500*(t-r),s=200*(r-n);return[o,i,s]};te.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],o,i,s;i=(t+16)/116,o=r/500+i,s=i-n/200;let a=i**3,c=o**3,u=s**3;return i=a>0.008856?a:(i-0.13793103448275862)/7.787,o=c>0.008856?c:(o-0.13793103448275862)/7.787,s=u>0.008856?u:(s-0.13793103448275862)/7.787,o*=95.047,i*=100,s*=108.883,[o,i,s]};te.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],o;if(o=Math.atan2(n,r)*360/2/Math.PI,o<0)o+=360;let s=Math.sqrt(r*r+n*n);return[t,s,o]};te.lch.lab=function(e){let t=e[0],r=e[1],o=e[2]/360*2*Math.PI,i=r*Math.cos(o),s=r*Math.sin(o);return[t,i,s]};te.rgb.ansi16=function(e,t=null){let[r,n,o]=e,i=t===null?te.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));if(i===2)s+=60;return s};te.hsv.ansi16=function(e){return te.rgb.ansi16(te.hsv.rgb(e),e[2])};te.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];if(t===r&&r===n){if(t<8)return 16;if(t>248)return 231;return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};te.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7){if(e>50)t+=3.5;return t=t/10.5*255,[t,t,t]}let r=(~~(e>50)+1)*0.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,o,i]};te.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};te.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};te.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];if(t[0].length===3)r=r.split("").map((a)=>a+a).join("");let n=parseInt(r,16),o=n>>16&255,i=n>>8&255,s=n&255;return[o,i,s]};te.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),s=o-i,a,c;if(s<1)a=i/(1-s);else a=0;if(s<=0)c=0;else if(o===t)c=(r-n)/s%6;else if(o===r)c=2+(n-t)/s;else c=4+(t-r)/s;return c/=6,c%=1,[c*360,s*100,a*100]};te.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<0.5?2*t*r:2*t*(1-r),o=0;if(n<1)o=(r-0.5*n)/(1-n);return[e[0],n*100,o*100]};te.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,o=0;if(n<1)o=(r-n)/(1-n);return[e[0],n*100,o*100]};te.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let o=[0,0,0],i=t%1*6,s=i%1,a=1-s,c=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-r)*n,[(r*o[0]+c)*255,(r*o[1]+c)*255,(r*o[2]+c)*255]};te.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),o=0;if(n>0)o=t/n;return[e[0],o*100,n*100]};te.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+0.5*t,o=0;if(n>0&&n<0.5)o=t/(2*n);else if(n>=0.5&&n<1)o=t/(2*(1-n));return[e[0],o*100,n*100]};te.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};te.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,o=n-t,i=0;if(o<1)i=(n-o)/(1-o);return[e[0],o*100,i*100]};te.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};te.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};te.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};te.gray.hsl=function(e){return[0,0,e[0]]};te.gray.hsv=te.gray.hsl;te.gray.hwb=function(e){return[0,100,e[0]]};te.gray.cmyk=function(e){return[0,0,0,e[0]]};te.gray.lab=function(e){return[e[0],0,0]};te.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};te.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var a4=g(function(Nrt,s4){var om=e_();function Nwe(){let e={},t=Object.keys(om);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function jwe(e){let t=Nwe(),r=[e];t[e].distance=0;while(r.length){let n=r.pop(),o=Object.keys(om[n]);for(let i=o.length,s=0;s<i;s++){let a=o[s],c=t[a];if(c.distance===-1)c.distance=t[n].distance+1,c.parent=n,r.unshift(a)}}return t}function qwe(e,t){return function(r){return t(e(r))}}function Mwe(e,t){let r=[t[e].parent,e],n=om[t[e].parent][e],o=t[e].parent;while(t[o].parent)r.unshift(t[o].parent),n=qwe(om[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}s4.exports=function(e){let t=jwe(e),r={},n=Object.keys(t);for(let o=n.length,i=0;i<o;i++){let s=n[i];if(t[s].parent===null)continue;r[s]=Mwe(s,t)}return r}});var l4=g(function(jrt,c4){var t_=e_(),Lwe=a4(),kc={},Bwe=Object.keys(t_);function Uwe(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;return e(r)};if("conversion"in e)t.conversion=e.conversion;return t}function zwe(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;let o=e(r);if(typeof o==="object")for(let i=o.length,s=0;s<i;s++)o[s]=Math.round(o[s]);return o};if("conversion"in e)t.conversion=e.conversion;return t}Bwe.forEach((e)=>{kc[e]={},Object.defineProperty(kc[e],"channels",{value:t_[e].channels}),Object.defineProperty(kc[e],"labels",{value:t_[e].labels});let t=Lwe(e);Object.keys(t).forEach((n)=>{let o=t[n];kc[e][n]=zwe(o),kc[e][n].raw=Uwe(o)})});c4.exports=kc});var n_=g(function(qrt,m4){var u4=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,d4=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},f4=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},im=(e)=>e,p4=(e,t,r)=>[e,t,r],Rc=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},r_,Ac=(e,t,r,n)=>{if(r_===void 0)r_=l4();let o=n?10:0,i={};for(let[s,a]of Object.entries(r_)){let c=s==="ansi16"?"ansi":s;if(s===t)i[c]=e(r,o);else if(typeof a==="object")i[c]=e(a[t],o)}return i};function Vwe(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[o,i]of Object.entries(n))t[o]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[o]=t[o],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Rc(t.color,"ansi",()=>Ac(u4,"ansi16",im,!1)),Rc(t.color,"ansi256",()=>Ac(d4,"ansi256",im,!1)),Rc(t.color,"ansi16m",()=>Ac(f4,"rgb",p4,!1)),Rc(t.bgColor,"ansi",()=>Ac(u4,"ansi16",im,!0)),Rc(t.bgColor,"ansi256",()=>Ac(d4,"ansi256",im,!0)),Rc(t.bgColor,"ansi16m",()=>Ac(f4,"rgb",p4,!0)),t}Object.defineProperty(m4,"exports",{enumerable:!0,get:Vwe})});var y4=g(function(Mrt,g4){var Fu=Qx(),Gwe=Au(),Hwe=n_(),i_=new Set(["\x1B","\x9B"]),h4=(e)=>`${i_.values().next().value}[${e}m`,Wwe=(e)=>e.split(" ").map((t)=>Fu(t)),o_=(e,t,r)=>{let n=[...t],o=!1,i=Fu(Gwe(e[e.length-1]));for(let[s,a]of n.entries()){let c=Fu(a);if(i+c<=r)e[e.length-1]+=a;else e.push(a),i=0;if(i_.has(a))o=!0;else if(o&&a==="m"){o=!1;continue}if(o)continue;if(i+=c,i===r&&s<n.length-1)e.push(""),i=0}if(!i&&e[e.length-1].length>0&&e.length>1)e[e.length-2]+=e.pop()},Kwe=(e)=>{let t=e.split(" "),r=t.length;while(r>0){if(Fu(t[r-1])>0)break;r--}if(r===t.length)return e;return t.slice(0,r).join(" ")+t.slice(r).join("")},Ywe=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",o="",i,s=Wwe(e),a=[""];for(let[c,u]of e.split(" ").entries()){if(r.trim!==!1)a[a.length-1]=a[a.length-1].trimLeft();let d=Fu(a[a.length-1]);if(c!==0){if(d>=t&&(r.wordWrap===!1||r.trim===!1))a.push(""),d=0;if(d>0||r.trim===!1)a[a.length-1]+=" ",d++}if(r.hard&&s[c]>t){let f=t-d,m=1+Math.floor((s[c]-f-1)/t);if(Math.floor((s[c]-1)/t)<m)a.push("");o_(a,u,t);continue}if(d+s[c]>t&&d>0&&s[c]>0){if(r.wordWrap===!1&&d<t){o_(a,u,t);continue}a.push("")}if(d+s[c]>t&&r.wordWrap===!1){o_(a,u,t);continue}a[a.length-1]+=u}if(r.trim!==!1)a=a.map(Kwe);n=a.join(`
34
+ `+U3.default.dim("(Move up and down to reveal more choices)")}getInfiniteLines(e,t,r){if(this.pointer===void 0)this.pointer=0;let n=Math.floor(r/2);if(this.pointer<n&&this.lastIndex<t&&t-this.lastIndex<r)this.pointer=Math.min(n,this.pointer+t-this.lastIndex);let o=[e,e,e].flat(),i=Math.max(0,t+e.length-this.pointer);return o.splice(i,r)}getFiniteLines(e,t,r){let n=t-r/2;if(n<0)n=0;else if(n+r>e.length)n=e.length-r;return e.splice(n,r)}}var U3;var ku=O(()=>{U3=ye(ln(),1)});function ni(e,t,r){let n=r.choices.realLength,o="loop"in r?Boolean(r.loop):!0;if(t==="up"){if(e>0)return e-1;return o?n-1:e}if(t==="down"){if(e<n-1)return e+1;return o?0:e}throw Error("dir must be up or down")}class Jr{constructor(e){this.type="separator",this.line=z3.default.dim(e||Array.from({length:15}).join(Li.line))}static exclude(e){return e.type!=="separator"}toString(){return this.line}}var z3;var Ru=O(()=>{jp();z3=ye(ln(),1)});class Cc{constructor(e,t){if(e instanceof Cc||e.type==="separator")return e;if(typeof e==="string"||typeof e==="number")this.name=String(e),this.value=e,this.short=String(e);else Object.assign(this,e,{name:e.name||e.value,value:"value"in e?e.value:e.name,short:e.short||e.name||e.value});this.disabled=typeof e.disabled==="function"?e.disabled(t):e.disabled}}import V3 from"assert";var nm;var G3=O(()=>{Ru();nm=class nm{constructor(e,t){this.choices=e.map((r)=>{if(r.type==="separator"){if(!(r instanceof Jr))r=new Jr(r.line);return r}return new Cc(r,t)}),this.realChoices=this.choices.filter(Jr.exclude).filter((r)=>!r.disabled),Object.defineProperty(this,"length",{get(){return this.choices.length},set(r){this.choices.length=r}}),Object.defineProperty(this,"realLength",{get(){return this.realChoices.length},set(){throw Error("Cannot set `realLength` of a Choices collection")}})}[Symbol.iterator](){let e=this.choices,t=-1;return{next:()=>({value:e[++t],done:!(t in e)})}}getChoice(e){return V3(typeof e==="number"),this.realChoices[e]}get(e){return V3(typeof e==="number"),this.choices[e]}where(e){let t;if(typeof e==="function")t=e;else{let[r,n]=Object.entries(e)[0];t=(o)=>o[r]===n}return this.realChoices.filter(t)}pluck(e){return this.realChoices.map((t)=>t[e])}indexOf(...e){return this.choices.indexOf(...e)}forEach(...e){return this.choices.forEach(...e)}filter(...e){return this.choices.filter(...e)}reduce(...e){return this.choices.reduce(...e)}find(e){return this.choices.find(e)}some(e){return this.choices.some(e)}push(...e){let t=e.map((r)=>new Cc(r));return this.choices.push(...t),this.realChoices=this.choices.filter(Jr.exclude).filter((r)=>!r.disabled),this.choices}}});var W3=g(function(krt,H3){H3.exports=Awe;function Rwe(e){let t={defaultWidth:0,output:process.stdout,tty:Je("tty")};if(!e)return t;return Object.keys(t).forEach(function(r){if(!e[r])e[r]=t[r]}),e}function Awe(e){let t=Rwe(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let r=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(r)&&r!==0)return r}return t.defaultWidth}});var Y3=g(function(Rrt,K3){K3.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Au=g(function(Art,J3){var Owe=Y3();J3.exports=(e)=>typeof e==="string"?e.replace(Owe(),""):e});var Z3=g(function(Ort,Xx){var X3=(e)=>{if(Number.isNaN(e))return!1;if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))return!0;return!1};Xx.exports=X3;Xx.exports.default=X3});var e4=g(function(Frt,Q3){Q3.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Qx=g(function(Prt,Zx){var Fwe=Au(),Pwe=Z3(),Iwe=e4(),t4=(e)=>{if(typeof e!=="string"||e.length===0)return 0;if(e=Fwe(e),e.length===0)return 0;e=e.replace(Iwe()," ");let t=0;for(let r=0;r<e.length;r++){let n=e.codePointAt(r);if(n<=31||n>=127&&n<=159)continue;if(n>=768&&n<=879)continue;if(n>65535)r++;t+=Pwe(n)?2:1}return t};Zx.exports=t4;Zx.exports.default=t4});var n4=g(function(Irt,r4){r4.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var e_=g(function(Trt,i4){var Ou=n4(),o4={};for(let e of Object.keys(Ou))o4[Ou[e]]=e;var re={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};i4.exports=re;for(let e of Object.keys(re)){if(!("channels"in re[e]))throw Error("missing channels property: "+e);if(!("labels"in re[e]))throw Error("missing channel labels property: "+e);if(re[e].labels.length!==re[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=re[e];delete re[e].channels,delete re[e].labels,Object.defineProperty(re[e],"channels",{value:t}),Object.defineProperty(re[e],"labels",{value:r})}re.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),s=i-o,a,c;if(i===o)a=0;else if(t===i)a=(r-n)/s;else if(r===i)a=2+(n-t)/s;else if(n===i)a=4+(t-r)/s;if(a=Math.min(a*60,360),a<0)a+=360;let u=(o+i)/2;if(i===o)c=0;else if(u<=0.5)c=s/(i+o);else c=s/(2-i-o);return[a,c*100,u*100]};re.rgb.hsv=function(e){let t,r,n,o,i,s=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(s,a,c),d=u-Math.min(s,a,c),f=function(m){return(u-m)/6/d+0.5};if(d===0)o=0,i=0;else{if(i=d/u,t=f(s),r=f(a),n=f(c),s===u)o=n-r;else if(a===u)o=0.3333333333333333+t-n;else if(c===u)o=0.6666666666666666+r-t;if(o<0)o+=1;else if(o>1)o-=1}return[o*360,i*100,u*100]};re.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],o=re.rgb.hsl(e)[0],i=0.00392156862745098*Math.min(t,Math.min(r,n));return n=1-0.00392156862745098*Math.max(t,Math.max(r,n)),[o,i*100,n*100]};re.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),i=(1-t-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-n-o)/(1-o)||0;return[i*100,s*100,a*100,o*100]};function Twe(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}re.rgb.keyword=function(e){let t=o4[e];if(t)return t;let r=1/0,n;for(let o of Object.keys(Ou)){let i=Ou[o],s=Twe(e,i);if(s<r)r=s,n=o}return n};re.keyword.rgb=function(e){return Ou[e]};re.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>0.04045?((t+0.055)/1.055)**2.4:t/12.92,r=r>0.04045?((r+0.055)/1.055)**2.4:r/12.92,n=n>0.04045?((n+0.055)/1.055)**2.4:n/12.92;let o=t*0.4124+r*0.3576+n*0.1805,i=t*0.2126+r*0.7152+n*0.0722,s=t*0.0193+r*0.1192+n*0.9505;return[o*100,i*100,s*100]};re.rgb.lab=function(e){let t=re.rgb.xyz(e),r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>0.008856?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>0.008856?n**0.3333333333333333:7.787*n+0.13793103448275862,o=o>0.008856?o**0.3333333333333333:7.787*o+0.13793103448275862;let i=116*n-16,s=500*(r-n),a=200*(n-o);return[i,s,a]};re.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o,i,s;if(r===0)return s=n*255,[s,s,s];if(n<0.5)o=n*(1+r);else o=n+r-n*r;let a=2*n-o,c=[0,0,0];for(let u=0;u<3;u++){if(i=t+0.3333333333333333*-(u-1),i<0)i++;if(i>1)i--;if(6*i<1)s=a+(o-a)*6*i;else if(2*i<1)s=o;else if(3*i<2)s=a+(o-a)*(0.6666666666666666-i)*6;else s=a;c[u]=s*255}return c};re.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=r,i=Math.max(n,0.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;let s=(n+r)/2,a=n===0?2*o/(i+o):2*r/(n+r);return[t,a*100,s*100]};re.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};re.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,0.01),i,s;s=(2-r)*n;let a=(2-r)*o;return i=r*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,i*100,s*100]};re.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,o=r+n,i;if(o>1)r/=o,n/=o;let s=Math.floor(6*t),a=1-n;if(i=6*t-s,(s&1)!==0)i=1-i;let c=r+i*(a-r),u,d,f;switch(s){default:case 6:case 0:u=a,d=c,f=r;break;case 1:u=c,d=a,f=r;break;case 2:u=r,d=a,f=c;break;case 3:u=r,d=c,f=a;break;case 4:u=c,d=r,f=a;break;case 5:u=a,d=r,f=c;break}return[u*255,d*255,f*255]};re.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,r*(1-o)+o),a=1-Math.min(1,n*(1-o)+o);return[i*255,s*255,a*255]};re.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,o,i,s;return o=t*3.2406+r*-1.5372+n*-0.4986,i=t*-0.9689+r*1.8758+n*0.0415,s=t*0.0557+r*-0.204+n*1.057,o=o>0.0031308?1.055*o**0.4166666666666667-0.055:o*12.92,i=i>0.0031308?1.055*i**0.4166666666666667-0.055:i*12.92,s=s>0.0031308?1.055*s**0.4166666666666667-0.055:s*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[o*255,i*255,s*255]};re.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>0.008856?t**0.3333333333333333:7.787*t+0.13793103448275862,r=r>0.008856?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>0.008856?n**0.3333333333333333:7.787*n+0.13793103448275862;let o=116*r-16,i=500*(t-r),s=200*(r-n);return[o,i,s]};re.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],o,i,s;i=(t+16)/116,o=r/500+i,s=i-n/200;let a=i**3,c=o**3,u=s**3;return i=a>0.008856?a:(i-0.13793103448275862)/7.787,o=c>0.008856?c:(o-0.13793103448275862)/7.787,s=u>0.008856?u:(s-0.13793103448275862)/7.787,o*=95.047,i*=100,s*=108.883,[o,i,s]};re.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],o;if(o=Math.atan2(n,r)*360/2/Math.PI,o<0)o+=360;let s=Math.sqrt(r*r+n*n);return[t,s,o]};re.lch.lab=function(e){let t=e[0],r=e[1],o=e[2]/360*2*Math.PI,i=r*Math.cos(o),s=r*Math.sin(o);return[t,i,s]};re.rgb.ansi16=function(e,t=null){let[r,n,o]=e,i=t===null?re.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));if(i===2)s+=60;return s};re.hsv.ansi16=function(e){return re.rgb.ansi16(re.hsv.rgb(e),e[2])};re.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];if(t===r&&r===n){if(t<8)return 16;if(t>248)return 231;return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};re.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7){if(e>50)t+=3.5;return t=t/10.5*255,[t,t,t]}let r=(~~(e>50)+1)*0.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,o,i]};re.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};re.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};re.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];if(t[0].length===3)r=r.split("").map((a)=>a+a).join("");let n=parseInt(r,16),o=n>>16&255,i=n>>8&255,s=n&255;return[o,i,s]};re.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),s=o-i,a,c;if(s<1)a=i/(1-s);else a=0;if(s<=0)c=0;else if(o===t)c=(r-n)/s%6;else if(o===r)c=2+(n-t)/s;else c=4+(t-r)/s;return c/=6,c%=1,[c*360,s*100,a*100]};re.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<0.5?2*t*r:2*t*(1-r),o=0;if(n<1)o=(r-0.5*n)/(1-n);return[e[0],n*100,o*100]};re.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,o=0;if(n<1)o=(r-n)/(1-n);return[e[0],n*100,o*100]};re.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let o=[0,0,0],i=t%1*6,s=i%1,a=1-s,c=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-r)*n,[(r*o[0]+c)*255,(r*o[1]+c)*255,(r*o[2]+c)*255]};re.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),o=0;if(n>0)o=t/n;return[e[0],o*100,n*100]};re.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+0.5*t,o=0;if(n>0&&n<0.5)o=t/(2*n);else if(n>=0.5&&n<1)o=t/(2*(1-n));return[e[0],o*100,n*100]};re.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};re.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,o=n-t,i=0;if(o<1)i=(n-o)/(1-o);return[e[0],o*100,i*100]};re.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};re.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};re.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};re.gray.hsl=function(e){return[0,0,e[0]]};re.gray.hsv=re.gray.hsl;re.gray.hwb=function(e){return[0,100,e[0]]};re.gray.cmyk=function(e){return[0,0,0,e[0]]};re.gray.lab=function(e){return[e[0],0,0]};re.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};re.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var a4=g(function(Nrt,s4){var om=e_();function Nwe(){let e={},t=Object.keys(om);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function jwe(e){let t=Nwe(),r=[e];t[e].distance=0;while(r.length){let n=r.pop(),o=Object.keys(om[n]);for(let i=o.length,s=0;s<i;s++){let a=o[s],c=t[a];if(c.distance===-1)c.distance=t[n].distance+1,c.parent=n,r.unshift(a)}}return t}function qwe(e,t){return function(r){return t(e(r))}}function Mwe(e,t){let r=[t[e].parent,e],n=om[t[e].parent][e],o=t[e].parent;while(t[o].parent)r.unshift(t[o].parent),n=qwe(om[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}s4.exports=function(e){let t=jwe(e),r={},n=Object.keys(t);for(let o=n.length,i=0;i<o;i++){let s=n[i];if(t[s].parent===null)continue;r[s]=Mwe(s,t)}return r}});var l4=g(function(jrt,c4){var t_=e_(),Lwe=a4(),kc={},Bwe=Object.keys(t_);function Uwe(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;return e(r)};if("conversion"in e)t.conversion=e.conversion;return t}function zwe(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;let o=e(r);if(typeof o==="object")for(let i=o.length,s=0;s<i;s++)o[s]=Math.round(o[s]);return o};if("conversion"in e)t.conversion=e.conversion;return t}Bwe.forEach((e)=>{kc[e]={},Object.defineProperty(kc[e],"channels",{value:t_[e].channels}),Object.defineProperty(kc[e],"labels",{value:t_[e].labels});let t=Lwe(e);Object.keys(t).forEach((n)=>{let o=t[n];kc[e][n]=zwe(o),kc[e][n].raw=Uwe(o)})});c4.exports=kc});var n_=g(function(qrt,m4){var u4=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,d4=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},f4=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},im=(e)=>e,p4=(e,t,r)=>[e,t,r],Rc=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},r_,Ac=(e,t,r,n)=>{if(r_===void 0)r_=l4();let o=n?10:0,i={};for(let[s,a]of Object.entries(r_)){let c=s==="ansi16"?"ansi":s;if(s===t)i[c]=e(r,o);else if(typeof a==="object")i[c]=e(a[t],o)}return i};function Vwe(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[o,i]of Object.entries(n))t[o]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[o]=t[o],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Rc(t.color,"ansi",()=>Ac(u4,"ansi16",im,!1)),Rc(t.color,"ansi256",()=>Ac(d4,"ansi256",im,!1)),Rc(t.color,"ansi16m",()=>Ac(f4,"rgb",p4,!1)),Rc(t.bgColor,"ansi",()=>Ac(u4,"ansi16",im,!0)),Rc(t.bgColor,"ansi256",()=>Ac(d4,"ansi256",im,!0)),Rc(t.bgColor,"ansi16m",()=>Ac(f4,"rgb",p4,!0)),t}Object.defineProperty(m4,"exports",{enumerable:!0,get:Vwe})});var y4=g(function(Mrt,g4){var Fu=Qx(),Gwe=Au(),Hwe=n_(),i_=new Set(["\x1B","\x9B"]),h4=(e)=>`${i_.values().next().value}[${e}m`,Wwe=(e)=>e.split(" ").map((t)=>Fu(t)),o_=(e,t,r)=>{let n=[...t],o=!1,i=Fu(Gwe(e[e.length-1]));for(let[s,a]of n.entries()){let c=Fu(a);if(i+c<=r)e[e.length-1]+=a;else e.push(a),i=0;if(i_.has(a))o=!0;else if(o&&a==="m"){o=!1;continue}if(o)continue;if(i+=c,i===r&&s<n.length-1)e.push(""),i=0}if(!i&&e[e.length-1].length>0&&e.length>1)e[e.length-2]+=e.pop()},Kwe=(e)=>{let t=e.split(" "),r=t.length;while(r>0){if(Fu(t[r-1])>0)break;r--}if(r===t.length)return e;return t.slice(0,r).join(" ")+t.slice(r).join("")},Ywe=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",o="",i,s=Wwe(e),a=[""];for(let[c,u]of e.split(" ").entries()){if(r.trim!==!1)a[a.length-1]=a[a.length-1].trimLeft();let d=Fu(a[a.length-1]);if(c!==0){if(d>=t&&(r.wordWrap===!1||r.trim===!1))a.push(""),d=0;if(d>0||r.trim===!1)a[a.length-1]+=" ",d++}if(r.hard&&s[c]>t){let f=t-d,m=1+Math.floor((s[c]-f-1)/t);if(Math.floor((s[c]-1)/t)<m)a.push("");o_(a,u,t);continue}if(d+s[c]>t&&d>0&&s[c]>0){if(r.wordWrap===!1&&d<t){o_(a,u,t);continue}a.push("")}if(d+s[c]>t&&r.wordWrap===!1){o_(a,u,t);continue}a[a.length-1]+=u}if(r.trim!==!1)a=a.map(Kwe);n=a.join(`
35
35
  `);for(let[c,u]of[...n].entries()){if(o+=u,i_.has(u)){let f=parseFloat(/\d[^m]*/.exec(n.slice(c,c+4)));i=f===39?null:f}let d=Hwe.codes.get(Number(i));if(i&&d){if(n[c+1]===`
36
36
  `)o+=h4(d);else if(u===`
37
37
  `)o+=h4(i)}}return o};g4.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,`
@@ -81,7 +81,7 @@ ${Wr.cursorShow}`)}releaseCursor(){if(this.extraLinesUnderPrompt>0)Z_(this.rl,th
81
81
  ${t}`,ISe,TSe,NSe=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,o=PSe.bind(null,n,t.toString());Object.defineProperty(o,"name",TSe);let{writable:i,enumerable:s,configurable:a}=ISe;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})};var Qv=O(()=>{ISe=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),TSe=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name")});var xh,Lj=(e,t={})=>{if(typeof e!=="function")throw TypeError("Expected a function");let r,n=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(xh.set(i,++n),n===1)r=e.apply(this,s),e=void 0;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return r};return sd(i,e),xh.set(i,n),i},Bj;var Uj=O(()=>{Qv();xh=new WeakMap;Lj.callCount=(e)=>{if(!xh.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return xh.get(e)};Bj=Lj});var ua;var zj=O(()=>{ua=[];ua.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")ua.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")ua.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class Vj{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(tw[ew])return tw[ew];jSe(tw,ew,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let r=this.listeners[e],n=r.indexOf(t);if(n===-1)return;if(n===0&&r.length===1)r.length=0;else r.splice(n,1)}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(let o of this.listeners[e])n=o(t,r)===!0||n;if(e==="exit")n=this.emit("afterExit",t,r)||n;return n}}class nw{}var _h=(e)=>!!e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function",ew,tw,jSe,qSe=(e)=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Gj,Hj,rw,Wj,Pit,Iit;var Kj=O(()=>{zj();ew=Symbol.for("signal-exit emitter"),tw=globalThis,jSe=Object.defineProperty.bind(Object);Gj=class Gj extends nw{onExit(){return()=>{}}load(){}unload(){}};Hj=class Hj extends nw{#r=rw.platform==="win32"?"SIGINT":"SIGHUP";#t=new Vj;#e;#o;#f;#n={};#s=!1;constructor(e){super();this.#e=e,this.#n={};for(let t of ua)this.#n[t]=()=>{let r=this.#e.listeners(t),{count:n}=this.#t,o=e;if(typeof o.__signal_exit_emitter__==="object"&&typeof o.__signal_exit_emitter__.count==="number")n+=o.__signal_exit_emitter__.count;if(r.length===n){this.unload();let i=this.#t.emit("exit",null,t),s=t==="SIGHUP"?this.#r:t;if(!i)e.kill(e.pid,s)}};this.#f=e.reallyExit,this.#o=e.emit}onExit(e,t){if(!_h(this.#e))return()=>{};if(this.#s===!1)this.load();let r=t?.alwaysLast?"afterExit":"exit";return this.#t.on(r,e),()=>{if(this.#t.removeListener(r,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0)this.unload()}}load(){if(this.#s)return;this.#s=!0,this.#t.count+=1;for(let e of ua)try{let t=this.#n[e];if(t)this.#e.on(e,t)}catch(t){}this.#e.emit=(e,...t)=>this.#p(e,...t),this.#e.reallyExit=(e)=>this.#i(e)}unload(){if(!this.#s)return;this.#s=!1,ua.forEach((e)=>{let t=this.#n[e];if(!t)throw Error("Listener not defined for signal: "+e);try{this.#e.removeListener(e,t)}catch(r){}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#f,this.#t.count-=1}#i(e){if(!_h(this.#e))return 0;return this.#e.exitCode=e||0,this.#t.emit("exit",this.#e.exitCode,null),this.#f.call(this.#e,this.#e.exitCode)}#p(e,...t){let r=this.#o;if(e==="exit"&&_h(this.#e)){if(typeof t[0]==="number")this.#e.exitCode=t[0];let n=r.call(this.#e,e,...t);return this.#t.emit("exit",this.#e.exitCode,null),n}else return r.call(this.#e,e,...t)}};rw=globalThis.process,{onExit:Wj,load:Pit,unload:Iit}=qSe(_h(rw)?new Hj(rw):new Gj)});import vh from"process";var Yj,MSe,Jj;var Xj=O(()=>{Uj();Kj();Yj=vh.stderr.isTTY?vh.stderr:vh.stdout.isTTY?vh.stdout:void 0,MSe=Yj?Bj(()=>{Wj(()=>{Yj.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Jj=MSe});import Zj from"process";var wh=!1,Wc,ow;var Qj=O(()=>{Xj();Wc={};Wc.show=(e=Zj.stderr)=>{if(!e.isTTY)return;wh=!1,e.write("\x1B[?25h")};Wc.hide=(e=Zj.stderr)=>{if(!e.isTTY)return;Jj(),wh=!0,e.write("\x1B[?25l")};Wc.toggle=(e,t)=>{if(e!==void 0)wh=e;if(wh)Wc.show(t);else Wc.hide(t)};ow=Wc});import qn from"process";function iw(){if(qn.platform!=="win32")return qn.env.TERM!=="linux";return Boolean(qn.env.CI)||Boolean(qn.env.WT_SESSION)||Boolean(qn.env.TERMINUS_SUBLIME)||qn.env.ConEmuTask==="{cmd::Cmder}"||qn.env.TERM_PROGRAM==="Terminus-Sublime"||qn.env.TERM_PROGRAM==="vscode"||qn.env.TERM==="xterm-256color"||qn.env.TERM==="alacritty"||qn.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var eq=()=>{};var LSe,BSe,USe,ad;var tq=O(()=>{Xe();eq();LSe={info:l.blue("\u2139"),success:l.green("\u2714"),warning:l.yellow("\u26A0"),error:l.red("\u2716")},BSe={info:l.blue("i"),success:l.green("\u221A"),warning:l.yellow("\u203C"),error:l.red("\xD7")},USe=iw()?LSe:BSe,ad=USe});function sw({onlyFirst:e=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",e?void 0:"g")}function cd(e){if(typeof e!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(zSe,"")}var zSe;var aw=O(()=>{zSe=sw()});function rq(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function nq(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function oq(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var iq=()=>{};function VSe(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function sq(e,{ambiguousAsWide:t=!1}={}){if(VSe(e),nq(e)||oq(e)||t&&rq(e))return 2;return 1}var aq=O(()=>{iq()});var cq=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function cw(e,t={}){if(typeof e!=="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=t;if(!n)e=cd(e);if(e.length===0)return 0;let o=0,i={ambiguousAsWide:!r};for(let{segment:s}of GSe.segment(e)){let a=s.codePointAt(0);if(a<=31||a>=127&&a<=159)continue;if(a>=8203&&a<=8207||a===65279)continue;if(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)continue;if(a>=55296&&a<=57343)continue;if(a>=65024&&a<=65039)continue;if(HSe.test(s))continue;if(cq().test(s)){o+=2;continue}o+=sq(a,i)}return o}var GSe,HSe;var lq=O(()=>{aw();aq();GSe=new Intl.Segmenter,HSe=/^\p{Default_Ignorable_Code_Point}$/u});function lw({stream:e=process.stdout}={}){return Boolean(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import uq from"process";function uw(){let{env:e}=uq,{TERM:t,TERM_PROGRAM:r}=e;if(uq.platform!=="win32")return t!=="linux";return Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var dq=()=>{};import Eo from"process";class fq{#r=0;start(){if(this.#r++,this.#r===1)this.#t()}stop(){if(this.#r<=0)throw Error("`stop` called more times than `start`");if(this.#r--,this.#r===0)this.#e()}#t(){if(Eo.platform==="win32"||!Eo.stdin.isTTY)return;Eo.stdin.setRawMode(!0),Eo.stdin.on("data",this.#o),Eo.stdin.resume()}#e(){if(!Eo.stdin.isTTY)return;Eo.stdin.off("data",this.#o),Eo.stdin.pause(),Eo.stdin.setRawMode(!1)}#o(e){if(e[0]===WSe)Eo.emit("SIGINT")}}var WSe=3,KSe,dw;var pq=O(()=>{KSe=new fq,dw=KSe});import Dh from"process";class mq{#r=0;#t=!1;#e=0;#o=-1;#f=0;#n;#s;#i;#p;#h;#l;#u;#d;#g;#a;#c;color;constructor(e){if(typeof e==="string")e={text:e};if(this.#n={color:"cyan",stream:Dh.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#n.color,this.spinner=this.#n.spinner,this.#h=this.#n.interval,this.#i=this.#n.stream,this.#l=typeof this.#n.isEnabled==="boolean"?this.#n.isEnabled:lw({stream:this.#i}),this.#u=typeof this.#n.isSilent==="boolean"?this.#n.isSilent:!1,this.text=this.#n.text,this.prefixText=this.#n.prefixText,this.suffixText=this.#n.suffixText,this.indent=this.#n.indent,Dh.env.NODE_ENV==="test")this._stream=this.#i,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#r},set(t){this.#r=t}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}})}get indent(){return this.#d}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw Error("The `indent` option must be an integer from 0 and up");this.#d=e,this.#m()}get interval(){return this.#h??this.#s.interval??100}get spinner(){return this.#s}set spinner(e){if(this.#o=-1,this.#h=void 0,typeof e==="object"){if(e.frames===void 0)throw Error("The given spinner must have a `frames` property");this.#s=e}else if(!uw())this.#s=ld.default.line;else if(e===void 0)this.#s=ld.default.dots;else if(e!=="default"&&ld.default[e])this.#s=ld.default[e];else throw Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(e=""){this.#g=e,this.#m()}get prefixText(){return this.#a}set prefixText(e=""){this.#a=e,this.#m()}get suffixText(){return this.#c}set suffixText(e=""){this.#c=e,this.#m()}get isSpinning(){return this.#p!==void 0}#y(e=this.#a,t=" "){if(typeof e==="string"&&e!=="")return e+t;if(typeof e==="function")return e()+t;return""}#b(e=this.#c,t=" "){if(typeof e==="string"&&e!=="")return t+e;if(typeof e==="function")return t+e();return""}#m(){let e=this.#i.columns??80,t=this.#y(this.#a,"-"),r=this.#b(this.#c,"-"),n=" ".repeat(this.#d)+t+"--"+this.#g+"--"+r;this.#e=0;for(let o of cd(n).split(`
82
82
  `))this.#e+=Math.max(1,Math.ceil(cw(o,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#l&&!this.#u}set isEnabled(e){if(typeof e!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this.#l=e}get isSilent(){return this.#u}set isSilent(e){if(typeof e!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this.#u=e}frame(){let e=Date.now();if(this.#o===-1||e-this.#f>=this.interval)this.#o=++this.#o%this.#s.frames.length,this.#f=e;let{frames:t}=this.#s,r=t[this.#o];if(this.color)r=l[this.color](r);let n=typeof this.#a==="string"&&this.#a!==""?this.#a+" ":"",o=typeof this.text==="string"?" "+this.text:"",i=typeof this.#c==="string"&&this.#c!==""?" "+this.#c:"";return n+r+o+i}clear(){if(!this.#l||!this.#i.isTTY)return this;this.#i.cursorTo(0);for(let e=0;e<this.#r;e++){if(e>0)this.#i.moveCursor(0,-1);this.#i.clearLine(1)}if(this.#d||this.lastIndent!==this.#d)this.#i.cursorTo(this.#d);return this.lastIndent=this.#d,this.#r=0,this}render(){if(this.#u)return this;return this.clear(),this.#i.write(this.frame()),this.#r=this.#e,this}start(e){if(e)this.text=e;if(this.#u)return this;if(!this.#l){if(this.text)this.#i.write(`- ${this.text}
83
83
  `);return this}if(this.isSpinning)return this;if(this.#n.hideCursor)ow.hide(this.#i);if(this.#n.discardStdin&&Dh.stdin.isTTY)this.#t=!0,dw.start();return this.render(),this.#p=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#l)return this;if(clearInterval(this.#p),this.#p=void 0,this.#o=0,this.clear(),this.#n.hideCursor)ow.show(this.#i);if(this.#n.discardStdin&&Dh.stdin.isTTY&&this.#t)dw.stop(),this.#t=!1;return this}succeed(e){return this.stopAndPersist({symbol:ad.success,text:e})}fail(e){return this.stopAndPersist({symbol:ad.error,text:e})}warn(e){return this.stopAndPersist({symbol:ad.warning,text:e})}info(e){return this.stopAndPersist({symbol:ad.info,text:e})}stopAndPersist(e={}){if(this.#u)return this;let t=e.prefixText??this.#a,r=this.#y(t," "),n=e.symbol??" ",o=e.text??this.text,s=typeof o==="string"?(n?" ":"")+o:"",a=e.suffixText??this.#c,c=this.#b(a," "),u=r+n+s+c+`
84
- `;return this.stop(),this.#i.write(u),this}}function D(e){return new mq(e)}var ld,YSe;var Mn=O(()=>{Xe();Qj();tq();aw();lq();dq();pq();ld=ye(ym(),1),YSe=ye(ym(),1)});var Ne,yq,W,ui=(e)=>{switch(typeof e){case"undefined":return W.undefined;case"string":return W.string;case"number":return Number.isNaN(e)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":if(Array.isArray(e))return W.array;if(e===null)return W.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return W.promise;if(typeof Map<"u"&&e instanceof Map)return W.map;if(typeof Set<"u"&&e instanceof Set)return W.set;if(typeof Date<"u"&&e instanceof Date)return W.date;return W.object;default:return W.unknown}};var ud=O(()=>{(function(e){e.assertEqual=(o)=>{};function t(o){}e.assertIs=t;function r(o){throw Error()}e.assertNever=r,e.arrayToEnum=(o)=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=(o)=>{let i=e.objectKeys(o).filter((a)=>typeof o[o[a]]!=="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=(o)=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys==="function"?(o)=>Object.keys(o):(o)=>{let i=[];for(let s in o)if(Object.prototype.hasOwnProperty.call(o,s))i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s;return},e.isInteger=typeof Number.isInteger==="function"?(o)=>Number.isInteger(o):(o)=>typeof o==="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map((s)=>typeof s==="string"?`'${s}'`:s).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>{if(typeof i==="bigint")return i.toString();return i}})(Ne||(Ne={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(yq||(yq={}));W=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var M,Zr;var Eh=O(()=>{ud();M=Ne.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"]);Zr=class Zr extends Error{get errors(){return this.issues}constructor(e){super();this.issues=[],this.addIssue=(r)=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,t);else this.__proto__=t;this.name="ZodError",this.issues=e}format(e){let t=e||function(o){return o.message},r={_errors:[]},n=(o)=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let s=r,a=0;while(a<i.path.length){let c=i.path[a];if(a!==i.path.length-1)s[c]=s[c]||{_errors:[]};else s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i));s=s[c],a++}}};return n(this),r}static assert(e){if(!(e instanceof Zr))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(t)=>t.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let o=n.path[0];t[o]=t[o]||[],t[o].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};Zr.create=(e)=>new Zr(e)});var JSe=(e,t)=>{let r;switch(e.code){case M.invalid_type:if(e.received===W.undefined)r="Required";else r=`Expected ${e.expected}, received ${e.received}`;break;case M.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ne.jsonStringifyReplacer)}`;break;case M.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(e.keys,", ")}`;break;case M.invalid_union:r="Invalid input";break;case M.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(e.options)}`;break;case M.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(e.options)}, received '${e.received}'`;break;case M.invalid_arguments:r="Invalid function arguments";break;case M.invalid_return_type:r="Invalid function return type";break;case M.invalid_date:r="Invalid date";break;case M.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(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}`}else if("startsWith"in e.validation)r=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)r=`Invalid input: must end with "${e.validation.endsWith}"`;else Ne.assertNever(e.validation);else if(e.validation!=="regex")r=`Invalid ${e.validation}`;else r="Invalid";break;case M.too_small:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="bigint")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(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))}`;else r="Invalid input";break;case M.too_big:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else r="Invalid input";break;case M.custom:r="Invalid input";break;case M.invalid_intersection_types:r="Intersection results could not be merged";break;case M.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case M.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ne.assertNever(e)}return{message:r}},ys;var fw=O(()=>{Eh();ud();ys=JSe});function dd(){return XSe}var XSe;var Sh=O(()=>{fw();XSe=ys});function G(e,t){let r=dd(),n=$h({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ys?void 0:ys].filter((o)=>!!o)});e.common.issues.push(n)}class ir{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,t){let r=[];for(let n of t){if(n.status==="aborted")return de;if(n.status==="dirty")e.dirty();r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let n of t){let o=await n.key,i=await n.value;r.push({key:o,value:i})}return ir.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:o,value:i}=n;if(o.status==="aborted")return de;if(i.status==="aborted")return de;if(o.status==="dirty")e.dirty();if(i.status==="dirty")e.dirty();if(o.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet))r[o.value]=i.value}return{status:e.value,value:r}}}var $h=(e)=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter((u)=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},de,Kc=(e)=>({status:"dirty",value:e}),br=(e)=>({status:"valid",value:e}),pw=(e)=>e.status==="aborted",mw=(e)=>e.status==="dirty",da=(e)=>e.status==="valid",fd=(e)=>typeof Promise<"u"&&e instanceof Promise;var hw=O(()=>{Sh();fw();de=Object.freeze({status:"aborted"})});var bq=()=>{};var re;var xq=O(()=>{(function(e){e.errToObj=(t)=>typeof t==="string"?{message:t}:t||{},e.toString=(t)=>typeof t==="string"?t:t?.message})(re||(re={}))});class Ln{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function De(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(t)return{errorMap:t,description:o};return{errorMap:(s,a)=>{let{message:c}=e;if(s.code==="invalid_enum_value")return{message:c??a.defaultError};if(typeof a.data>"u")return{message:c??n??a.defaultError};if(s.code!=="invalid_type")return{message:a.defaultError};return{message:c??r??a.defaultError}},description:o}}class Fe{get description(){return this._def.description}_getType(e){return ui(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ui(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ir,ctx:{common:e.parent.common,data:e.data,parsedType:ui(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(fd(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ui(e)},n=this._parseSync({data:e,path:r.path,parent:r});return _q(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ui(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return da(r)?{value:r.value}:{issues:t.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((r)=>da(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ui(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(fd(n)?n:Promise.resolve(n));return _q(r,o)}refine(e,t){let r=(n)=>{if(typeof t==="string"||typeof t>"u")return{message:t};else if(typeof t==="function")return t(n);else return t};return this._refinement((n,o)=>{let i=e(n),s=()=>o.addIssue({code:M.custom,...r(n)});if(typeof Promise<"u"&&i instanceof Promise)return i.then((a)=>{if(!a)return s(),!1;else return!0});if(!i)return s(),!1;else return!0})}refinement(e,t){return this._refinement((r,n)=>{if(!e(r))return n.addIssue(typeof t==="function"?t(r,n):t),!1;else return!0})}_refinement(e){return new Co({schema:this,typeName:fe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:(t)=>this["~validate"](t)}}optional(){return $o.create(this,this._def)}nullable(){return bs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return So.create(this)}promise(){return Qc.create(this,this._def)}or(e){return yd.create([this,e],this._def)}and(e){return bd.create(this,e,this._def)}transform(e){return new Co({...De(this._def),schema:this,typeName:fe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e==="function"?e:()=>e;return new wd({...De(this._def),innerType:this,defaultValue:t,typeName:fe.ZodDefault})}brand(){return new xw({typeName:fe.ZodBranded,type:this,...De(this._def)})}catch(e){let t=typeof e==="function"?e:()=>e;return new Dd({...De(this._def),innerType:this,catchValue:t,typeName:fe.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return Ih.create(this,e)}readonly(){return Ed.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function wq(e){let t="[0-5]\\d";if(e.precision)t=`${t}\\.\\d{${e.precision}}`;else if(e.precision==null)t=`${t}(\\.\\d+)?`;let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function m$e(e){return new RegExp(`^${wq(e)}$`)}function h$e(e){let t=`${vq}T${wq(e)}`,r=[];if(r.push(e.local?"Z?":"Z"),e.offset)r.push("([+-]\\d{2}:?\\d{2})");return t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function g$e(e,t){if((t==="v4"||!t)&&a$e.test(e))return!0;if((t==="v6"||!t)&&l$e.test(e))return!0;return!1}function y$e(e,t){if(!n$e.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));if(typeof o!=="object"||o===null)return!1;if("typ"in o&&o?.typ!=="JWT")return!1;if(!o.alg)return!1;if(t&&o.alg!==t)return!1;return!0}catch{return!1}}function b$e(e,t){if((t==="v4"||!t)&&c$e.test(e))return!0;if((t==="v6"||!t)&&u$e.test(e))return!0;return!1}function x$e(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function Yc(e){if(e instanceof $t){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=$o.create(Yc(n))}return new $t({...e._def,shape:()=>t})}else if(e instanceof So)return new So({...e._def,type:Yc(e.element)});else if(e instanceof $o)return $o.create(Yc(e.unwrap()));else if(e instanceof bs)return bs.create(Yc(e.unwrap()));else if(e instanceof mi)return mi.create(e.items.map((t)=>Yc(t)));else return e}function yw(e,t){let r=ui(e),n=ui(t);if(e===t)return{valid:!0,data:e};else if(r===W.object&&n===W.object){let o=Ne.objectKeys(t),i=Ne.objectKeys(e).filter((a)=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=yw(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===W.array&&n===W.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=yw(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else if(r===W.date&&n===W.date&&+e===+t)return{valid:!0,data:e};else return{valid:!1}}function Dq(e,t){return new pa({values:e,typeName:fe.ZodEnum,...De(t)})}var _q=(e,t)=>{if(da(t))return{success:!0,data:t.value};else{if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Zr(e.common.issues);return this._error=r,this._error}}}},ZSe,QSe,e$e,t$e,r$e,n$e,o$e,i$e,s$e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gw,a$e,c$e,l$e,u$e,d$e,f$e,vq="((\\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])))",p$e,fi,Jc,Xc,Ch,md,kh,hd,gd,Rh,fa,pi,Ah,So,$t,yd,di=(e)=>{if(e instanceof xd)return di(e.schema);else if(e instanceof Co)return di(e.innerType());else if(e instanceof _d)return[e.value];else if(e instanceof pa)return e.options;else if(e instanceof vd)return Ne.objectValues(e.enum);else if(e instanceof wd)return di(e._def.innerType);else if(e instanceof hd)return[void 0];else if(e instanceof gd)return[null];else if(e instanceof $o)return[void 0,...di(e.unwrap())];else if(e instanceof bs)return[null,...di(e.unwrap())];else if(e instanceof xw)return di(e.unwrap());else if(e instanceof Ed)return di(e.unwrap());else if(e instanceof Dd)return di(e._def.innerType);else return[]},bw,bd,mi,Oh,Fh,Zc,pd,xd,_d,pa,vd,Qc,Co,$o,bs,wd,Dd,Ph,Mst,xw,Ih,Ed,Lst,fe,w,k,Bst,Ust,be,zst,Vst,Gst,Hst,Wst,Sd,Kst,Yst,ne,U,Jst,el,_w,Xst,Zst,ma,Qst,eat,tat,rat,ze,Ze,nat,oat,iat,sat,aat,cat,lat;var Eq=O(()=>{Eh();Sh();xq();hw();ud();ZSe=/^c[^\s-]{8,}$/i,QSe=/^[0-9a-z]+$/,e$e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,t$e=/^[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,r$e=/^[a-z0-9_-]{21}$/i,n$e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,o$e=/^[-+]?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)?)??$/,i$e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,a$e=/^(?:(?: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])$/,c$e=/^(?:(?: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])$/,l$e=/^(([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]))$/,u$e=/^(([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])$/,d$e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,f$e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,p$e=new RegExp(`^${vq}$`);fi=class fi extends Fe{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==W.string){let o=this._getOrReturnCtx(e);return G(o,{code:M.invalid_type,expected:W.string,received:o.parsedType}),de}let r=new ir,n=void 0;for(let o of this._def.checks)if(o.kind==="min"){if(e.data.length<o.value)n=this._getOrReturnCtx(e,n),G(n,{code:M.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty()}else if(o.kind==="max"){if(e.data.length>o.value)n=this._getOrReturnCtx(e,n),G(n,{code:M.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty()}else if(o.kind==="length"){let i=e.data.length>o.value,s=e.data.length<o.value;if(i||s){if(n=this._getOrReturnCtx(e,n),i)G(n,{code:M.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message});else if(s)G(n,{code:M.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message});r.dirty()}}else if(o.kind==="email"){if(!i$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"email",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="emoji"){if(!gw)gw=new RegExp(s$e,"u");if(!gw.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"emoji",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="uuid"){if(!t$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"uuid",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="nanoid"){if(!r$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"nanoid",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="cuid"){if(!ZSe.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"cuid",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="cuid2"){if(!QSe.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"cuid2",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="ulid"){if(!e$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"ulid",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),G(n,{validation:"url",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="regex"){if(o.regex.lastIndex=0,!o.regex.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"regex",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="trim")e.data=e.data.trim();else if(o.kind==="includes"){if(!e.data.includes(o.value,o.position))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()}else if(o.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(o.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(o.kind==="startsWith"){if(!e.data.startsWith(o.value))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()}else if(o.kind==="endsWith"){if(!e.data.endsWith(o.value))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()}else if(o.kind==="datetime"){if(!h$e(o).test(e.data))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:"datetime",message:o.message}),r.dirty()}else if(o.kind==="date"){if(!p$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:"date",message:o.message}),r.dirty()}else if(o.kind==="time"){if(!m$e(o).test(e.data))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:"time",message:o.message}),r.dirty()}else if(o.kind==="duration"){if(!o$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"duration",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="ip"){if(!g$e(e.data,o.version))n=this._getOrReturnCtx(e,n),G(n,{validation:"ip",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="jwt"){if(!y$e(e.data,o.alg))n=this._getOrReturnCtx(e,n),G(n,{validation:"jwt",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="cidr"){if(!b$e(e.data,o.version))n=this._getOrReturnCtx(e,n),G(n,{validation:"cidr",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="base64"){if(!d$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"base64",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="base64url"){if(!f$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"base64url",code:M.invalid_string,message:o.message}),r.dirty()}else Ne.assertNever(o);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement((n)=>e.test(n),{validation:t,code:M.invalid_string,...re.errToObj(r)})}_addCheck(e){return new fi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...re.errToObj(e)})}url(e){return this._addCheck({kind:"url",...re.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...re.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...re.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...re.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...re.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...re.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...re.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...re.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...re.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...re.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...re.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...re.errToObj(e)})}datetime(e){if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...re.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...re.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...re.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...re.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...re.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...re.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...re.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...re.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...re.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...re.errToObj(t)})}nonempty(e){return this.min(1,re.errToObj(e))}trim(){return new fi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new fi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new fi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find((e)=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find((e)=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxLength(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};fi.create=(e)=>new fi({checks:[],typeName:fe.ZodString,coerce:e?.coerce??!1,...De(e)});Jc=class Jc extends Fe{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==W.number){let o=this._getOrReturnCtx(e);return G(o,{code:M.invalid_type,expected:W.number,received:o.parsedType}),de}let r=void 0,n=new ir;for(let o of this._def.checks)if(o.kind==="int"){if(!Ne.isInteger(e.data))r=this._getOrReturnCtx(e,r),G(r,{code:M.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()}else if(o.kind==="min"){if(o.inclusive?e.data<o.value:e.data<=o.value)r=this._getOrReturnCtx(e,r),G(r,{code:M.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()}else if(o.kind==="max"){if(o.inclusive?e.data>o.value:e.data>=o.value)r=this._getOrReturnCtx(e,r),G(r,{code:M.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()}else if(o.kind==="multipleOf"){if(x$e(e.data,o.value)!==0)r=this._getOrReturnCtx(e,r),G(r,{code:M.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()}else if(o.kind==="finite"){if(!Number.isFinite(e.data))r=this._getOrReturnCtx(e,r),G(r,{code:M.not_finite,message:o.message}),n.dirty()}else Ne.assertNever(o);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,re.toString(t))}gt(e,t){return this.setLimit("min",e,!1,re.toString(t))}lte(e,t){return this.setLimit("max",e,!0,re.toString(t))}lt(e,t){return this.setLimit("max",e,!1,re.toString(t))}setLimit(e,t,r,n){return new Jc({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:re.toString(n)}]})}_addCheck(e){return new Jc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:re.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:re.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:re.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:re.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:re.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:re.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:re.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:re.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:re.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&Ne.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;else if(r.kind==="min"){if(t===null||r.value>t)t=r.value}else if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return Number.isFinite(t)&&Number.isFinite(e)}};Jc.create=(e)=>new Jc({checks:[],typeName:fe.ZodNumber,coerce:e?.coerce||!1,...De(e)});Xc=class Xc extends Fe{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==W.bigint)return this._getInvalidInput(e);let r=void 0,n=new ir;for(let o of this._def.checks)if(o.kind==="min"){if(o.inclusive?e.data<o.value:e.data<=o.value)r=this._getOrReturnCtx(e,r),G(r,{code:M.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()}else if(o.kind==="max"){if(o.inclusive?e.data>o.value:e.data>=o.value)r=this._getOrReturnCtx(e,r),G(r,{code:M.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()}else if(o.kind==="multipleOf"){if(e.data%o.value!==BigInt(0))r=this._getOrReturnCtx(e,r),G(r,{code:M.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()}else Ne.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return G(t,{code:M.invalid_type,expected:W.bigint,received:t.parsedType}),de}gte(e,t){return this.setLimit("min",e,!0,re.toString(t))}gt(e,t){return this.setLimit("min",e,!1,re.toString(t))}lte(e,t){return this.setLimit("max",e,!0,re.toString(t))}lt(e,t){return this.setLimit("max",e,!1,re.toString(t))}setLimit(e,t,r,n){return new Xc({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:re.toString(n)}]})}_addCheck(e){return new Xc({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:re.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:re.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:re.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:re.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:re.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};Xc.create=(e)=>new Xc({checks:[],typeName:fe.ZodBigInt,coerce:e?.coerce??!1,...De(e)});Ch=class Ch extends Fe{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==W.boolean){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.boolean,received:r.parsedType}),de}return br(e.data)}};Ch.create=(e)=>new Ch({typeName:fe.ZodBoolean,coerce:e?.coerce||!1,...De(e)});md=class md extends Fe{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==W.date){let o=this._getOrReturnCtx(e);return G(o,{code:M.invalid_type,expected:W.date,received:o.parsedType}),de}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return G(o,{code:M.invalid_date}),de}let r=new ir,n=void 0;for(let o of this._def.checks)if(o.kind==="min"){if(e.data.getTime()<o.value)n=this._getOrReturnCtx(e,n),G(n,{code:M.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()}else if(o.kind==="max"){if(e.data.getTime()>o.value)n=this._getOrReturnCtx(e,n),G(n,{code:M.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()}else Ne.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new md({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:re.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:re.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e!=null?new Date(e):null}};md.create=(e)=>new md({checks:[],coerce:e?.coerce||!1,typeName:fe.ZodDate,...De(e)});kh=class kh extends Fe{_parse(e){if(this._getType(e)!==W.symbol){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.symbol,received:r.parsedType}),de}return br(e.data)}};kh.create=(e)=>new kh({typeName:fe.ZodSymbol,...De(e)});hd=class hd extends Fe{_parse(e){if(this._getType(e)!==W.undefined){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.undefined,received:r.parsedType}),de}return br(e.data)}};hd.create=(e)=>new hd({typeName:fe.ZodUndefined,...De(e)});gd=class gd extends Fe{_parse(e){if(this._getType(e)!==W.null){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.null,received:r.parsedType}),de}return br(e.data)}};gd.create=(e)=>new gd({typeName:fe.ZodNull,...De(e)});Rh=class Rh extends Fe{constructor(){super(...arguments);this._any=!0}_parse(e){return br(e.data)}};Rh.create=(e)=>new Rh({typeName:fe.ZodAny,...De(e)});fa=class fa extends Fe{constructor(){super(...arguments);this._unknown=!0}_parse(e){return br(e.data)}};fa.create=(e)=>new fa({typeName:fe.ZodUnknown,...De(e)});pi=class pi extends Fe{_parse(e){let t=this._getOrReturnCtx(e);return G(t,{code:M.invalid_type,expected:W.never,received:t.parsedType}),de}};pi.create=(e)=>new pi({typeName:fe.ZodNever,...De(e)});Ah=class Ah extends Fe{_parse(e){if(this._getType(e)!==W.undefined){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.void,received:r.parsedType}),de}return br(e.data)}};Ah.create=(e)=>new Ah({typeName:fe.ZodVoid,...De(e)});So=class So extends Fe{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==W.array)return G(t,{code:M.invalid_type,expected:W.array,received:t.parsedType}),de;if(n.exactLength!==null){let i=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;if(i||s)G(t,{code:i?M.too_big:M.too_small,minimum:s?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty()}if(n.minLength!==null){if(t.data.length<n.minLength.value)G(t,{code:M.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()}if(n.maxLength!==null){if(t.data.length>n.maxLength.value)G(t,{code:M.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()}if(t.common.async)return Promise.all([...t.data].map((i,s)=>n.type._parseAsync(new Ln(t,i,t.path,s)))).then((i)=>ir.mergeArray(r,i));let o=[...t.data].map((i,s)=>n.type._parseSync(new Ln(t,i,t.path,s)));return ir.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new So({...this._def,minLength:{value:e,message:re.toString(t)}})}max(e,t){return new So({...this._def,maxLength:{value:e,message:re.toString(t)}})}length(e,t){return new So({...this._def,exactLength:{value:e,message:re.toString(t)}})}nonempty(e){return this.min(1,e)}};So.create=(e,t)=>new So({type:e,minLength:null,maxLength:null,exactLength:null,typeName:fe.ZodArray,...De(t)});$t=class $t extends Fe{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Ne.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==W.object){let c=this._getOrReturnCtx(e);return G(c,{code:M.invalid_type,expected:W.object,received:c.parsedType}),de}let{status:r,ctx:n}=this._processInputParams(e),{shape:o,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof pi&&this._def.unknownKeys==="strip")){for(let c in n.data)if(!i.includes(c))s.push(c)}let a=[];for(let c of i){let u=o[c],d=n.data[c];a.push({key:{status:"valid",value:c},value:u._parse(new Ln(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof pi){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of s)a.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict"){if(s.length>0)G(n,{code:M.unrecognized_keys,keys:s}),r.dirty()}else if(c==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of s){let d=n.data[u];a.push({key:{status:"valid",value:u},value:c._parse(new Ln(n,d,n.path,u)),alwaysSet:u in n.data})}}if(n.common.async)return Promise.resolve().then(async()=>{let c=[];for(let u of a){let d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then((c)=>ir.mergeObjectSync(r,c));else return ir.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return re.errToObj,new $t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;if(t.code==="unrecognized_keys")return{message:re.errToObj(e).message??n};return{message:n}}}:{}})}strip(){return new $t({...this._def,unknownKeys:"strip"})}passthrough(){return new $t({...this._def,unknownKeys:"passthrough"})}extend(e){return new $t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new $t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:fe.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new $t({...this._def,catchall:e})}pick(e){let t={};for(let r of Ne.objectKeys(e))if(e[r]&&this.shape[r])t[r]=this.shape[r];return new $t({...this._def,shape:()=>t})}omit(e){let t={};for(let r of Ne.objectKeys(this.shape))if(!e[r])t[r]=this.shape[r];return new $t({...this._def,shape:()=>t})}deepPartial(){return Yc(this)}partial(e){let t={};for(let r of Ne.objectKeys(this.shape)){let n=this.shape[r];if(e&&!e[r])t[r]=n;else t[r]=n.optional()}return new $t({...this._def,shape:()=>t})}required(e){let t={};for(let r of Ne.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let o=this.shape[r];while(o instanceof $o)o=o._def.innerType;t[r]=o}return new $t({...this._def,shape:()=>t})}keyof(){return Dq(Ne.objectKeys(this.shape))}};$t.create=(e,t)=>new $t({shape:()=>e,unknownKeys:"strip",catchall:pi.create(),typeName:fe.ZodObject,...De(t)});$t.strictCreate=(e,t)=>new $t({shape:()=>e,unknownKeys:"strict",catchall:pi.create(),typeName:fe.ZodObject,...De(t)});$t.lazycreate=(e,t)=>new $t({shape:e,unknownKeys:"strip",catchall:pi.create(),typeName:fe.ZodObject,...De(t)});yd=class yd extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;let i=o.map((s)=>new Zr(s.ctx.common.issues));return G(t,{code:M.invalid_union,unionErrors:i}),de}if(t.common.async)return Promise.all(r.map(async(o)=>{let i={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);else{let o=void 0,i=[];for(let a of r){let c={...t,common:{...t.common,issues:[]},parent:null},u=a._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;else if(u.status==="dirty"&&!o)o={result:u,ctx:c};if(c.common.issues.length)i.push(c.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;let s=i.map((a)=>new Zr(a));return G(t,{code:M.invalid_union,unionErrors:s}),de}}get options(){return this._def.options}};yd.create=(e,t)=>new yd({options:e,typeName:fe.ZodUnion,...De(t)});bw=class bw extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.object)return G(t,{code:M.invalid_type,expected:W.object,received:t.parsedType}),de;let r=this.discriminator,n=t.data[r],o=this.optionsMap.get(n);if(!o)return G(t,{code:M.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),de;if(t.common.async)return o._parseAsync({data:t.data,path:t.path,parent:t});else return o._parseSync({data:t.data,path:t.path,parent:t})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let o of t){let i=di(o.shape[e]);if(!i.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of i){if(n.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);n.set(s,o)}}return new bw({typeName:fe.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...De(r)})}};bd=class bd extends Fe{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(o,i)=>{if(pw(o)||pw(i))return de;let s=yw(o.value,i.value);if(!s.valid)return G(r,{code:M.invalid_intersection_types}),de;if(mw(o)||mw(i))t.dirty();return{status:t.value,value:s.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>n(o,i));else return n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};bd.create=(e,t,r)=>new bd({left:e,right:t,typeName:fe.ZodIntersection,...De(r)});mi=class mi extends Fe{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.array)return G(r,{code:M.invalid_type,expected:W.array,received:r.parsedType}),de;if(r.data.length<this._def.items.length)return G(r,{code:M.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),de;if(!this._def.rest&&r.data.length>this._def.items.length)G(r,{code:M.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty();let o=[...r.data].map((i,s)=>{let a=this._def.items[s]||this._def.rest;if(!a)return null;return a._parse(new Ln(r,i,r.path,s))}).filter((i)=>!!i);if(r.common.async)return Promise.all(o).then((i)=>ir.mergeArray(t,i));else return ir.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new mi({...this._def,rest:e})}};mi.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new mi({items:e,typeName:fe.ZodTuple,rest:null,...De(t)})};Oh=class Oh extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.object)return G(r,{code:M.invalid_type,expected:W.object,received:r.parsedType}),de;let n=[],o=this._def.keyType,i=this._def.valueType;for(let s in r.data)n.push({key:o._parse(new Ln(r,s,r.path,s)),value:i._parse(new Ln(r,r.data[s],r.path,s)),alwaysSet:s in r.data});if(r.common.async)return ir.mergeObjectAsync(t,n);else return ir.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){if(t instanceof Fe)return new Oh({keyType:e,valueType:t,typeName:fe.ZodRecord,...De(r)});return new Oh({keyType:fi.create(),valueType:e,typeName:fe.ZodRecord,...De(t)})}};Fh=class Fh extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.map)return G(r,{code:M.invalid_type,expected:W.map,received:r.parsedType}),de;let n=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([s,a],c)=>({key:n._parse(new Ln(r,s,r.path,[c,"key"])),value:o._parse(new Ln(r,a,r.path,[c,"value"]))}));if(r.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let a of i){let c=await a.key,u=await a.value;if(c.status==="aborted"||u.status==="aborted")return de;if(c.status==="dirty"||u.status==="dirty")t.dirty();s.set(c.value,u.value)}return{status:t.value,value:s}})}else{let s=new Map;for(let a of i){let{key:c,value:u}=a;if(c.status==="aborted"||u.status==="aborted")return de;if(c.status==="dirty"||u.status==="dirty")t.dirty();s.set(c.value,u.value)}return{status:t.value,value:s}}}};Fh.create=(e,t,r)=>new Fh({valueType:t,keyType:e,typeName:fe.ZodMap,...De(r)});Zc=class Zc extends Fe{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.set)return G(r,{code:M.invalid_type,expected:W.set,received:r.parsedType}),de;let n=this._def;if(n.minSize!==null){if(r.data.size<n.minSize.value)G(r,{code:M.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()}if(n.maxSize!==null){if(r.data.size>n.maxSize.value)G(r,{code:M.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty()}let o=this._def.valueType;function i(a){let c=new Set;for(let u of a){if(u.status==="aborted")return de;if(u.status==="dirty")t.dirty();c.add(u.value)}return{status:t.value,value:c}}let s=[...r.data.values()].map((a,c)=>o._parse(new Ln(r,a,r.path,c)));if(r.common.async)return Promise.all(s).then((a)=>i(a));else return i(s)}min(e,t){return new Zc({...this._def,minSize:{value:e,message:re.toString(t)}})}max(e,t){return new Zc({...this._def,maxSize:{value:e,message:re.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Zc.create=(e,t)=>new Zc({valueType:e,minSize:null,maxSize:null,typeName:fe.ZodSet,...De(t)});pd=class pd extends Fe{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.function)return G(t,{code:M.invalid_type,expected:W.function,received:t.parsedType}),de;function r(s,a){return $h({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,dd(),ys].filter((c)=>!!c),issueData:{code:M.invalid_arguments,argumentsError:a}})}function n(s,a){return $h({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,dd(),ys].filter((c)=>!!c),issueData:{code:M.invalid_return_type,returnTypeError:a}})}let o={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Qc){let s=this;return br(async function(...a){let c=new Zr([]),u=await s._def.args.parseAsync(a,o).catch((m)=>{throw c.addIssue(r(a,m)),c}),d=await Reflect.apply(i,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch((m)=>{throw c.addIssue(n(d,m)),c})})}else{let s=this;return br(function(...a){let c=s._def.args.safeParse(a,o);if(!c.success)throw new Zr([r(a,c.error)]);let u=Reflect.apply(i,this,c.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new Zr([n(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new pd({...this._def,args:mi.create(e).rest(fa.create())})}returns(e){return new pd({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new pd({args:e?e:mi.create([]).rest(fa.create()),returns:t||fa.create(),typeName:fe.ZodFunction,...De(r)})}};xd=class xd extends Fe{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};xd.create=(e,t)=>new xd({getter:e,typeName:fe.ZodLazy,...De(t)});_d=class _d extends Fe{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return G(t,{received:t.data,code:M.invalid_literal,expected:this._def.value}),de}return{status:"valid",value:e.data}}get value(){return this._def.value}};_d.create=(e,t)=>new _d({value:e,typeName:fe.ZodLiteral,...De(t)});pa=class pa extends Fe{_parse(e){if(typeof e.data!=="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return G(t,{expected:Ne.joinValues(r),received:t.parsedType,code:M.invalid_type}),de}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return G(t,{received:t.data,code:M.invalid_enum_value,options:r}),de}return br(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return pa.create(e,{...this._def,...t})}exclude(e,t=this._def){return pa.create(this.options.filter((r)=>!e.includes(r)),{...this._def,...t})}};pa.create=Dq;vd=class vd extends Fe{_parse(e){let t=Ne.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==W.string&&r.parsedType!==W.number){let n=Ne.objectValues(t);return G(r,{expected:Ne.joinValues(n),received:r.parsedType,code:M.invalid_type}),de}if(!this._cache)this._cache=new Set(Ne.getValidEnumValues(this._def.values));if(!this._cache.has(e.data)){let n=Ne.objectValues(t);return G(r,{received:r.data,code:M.invalid_enum_value,options:n}),de}return br(e.data)}get enum(){return this._def.values}};vd.create=(e,t)=>new vd({values:e,typeName:fe.ZodNativeEnum,...De(t)});Qc=class Qc extends Fe{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.promise&&t.common.async===!1)return G(t,{code:M.invalid_type,expected:W.promise,received:t.parsedType}),de;let r=t.parsedType===W.promise?t.data:Promise.resolve(t.data);return br(r.then((n)=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Qc.create=(e,t)=>new Qc({type:e,typeName:fe.ZodPromise,...De(t)});Co=class Co extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:(i)=>{if(G(r,i),i.fatal)t.abort();else t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){let i=n.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async(s)=>{if(t.value==="aborted")return de;let a=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});if(a.status==="aborted")return de;if(a.status==="dirty")return Kc(a.value);if(t.value==="dirty")return Kc(a.value);return a});else{if(t.value==="aborted")return de;let s=this._def.schema._parseSync({data:i,path:r.path,parent:r});if(s.status==="aborted")return de;if(s.status==="dirty")return Kc(s.value);if(t.value==="dirty")return Kc(s.value);return s}}if(n.type==="refinement"){let i=(s)=>{let a=n.refinement(s,o);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(s.status==="aborted")return de;if(s.status==="dirty")t.dirty();return i(s.value),{status:t.value,value:s.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((s)=>{if(s.status==="aborted")return de;if(s.status==="dirty")t.dirty();return i(s.value).then(()=>({status:t.value,value:s.value}))})}if(n.type==="transform")if(r.common.async===!1){let i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!da(i))return de;let s=n.transform(i.value,o);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((i)=>{if(!da(i))return de;return Promise.resolve(n.transform(i.value,o)).then((s)=>({status:t.value,value:s}))});Ne.assertNever(n)}};Co.create=(e,t,r)=>new Co({schema:e,typeName:fe.ZodEffects,effect:t,...De(r)});Co.createWithPreprocess=(e,t,r)=>new Co({schema:t,effect:{type:"preprocess",transform:e},typeName:fe.ZodEffects,...De(r)});$o=class $o extends Fe{_parse(e){if(this._getType(e)===W.undefined)return br(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$o.create=(e,t)=>new $o({innerType:e,typeName:fe.ZodOptional,...De(t)});bs=class bs extends Fe{_parse(e){if(this._getType(e)===W.null)return br(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};bs.create=(e,t)=>new bs({innerType:e,typeName:fe.ZodNullable,...De(t)});wd=class wd extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;if(t.parsedType===W.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};wd.create=(e,t)=>new wd({innerType:e,typeName:fe.ZodDefault,defaultValue:typeof t.default==="function"?t.default:()=>t.default,...De(t)});Dd=class Dd extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(fd(n))return n.then((o)=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zr(r.common.issues)},input:r.data})}));else return{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Zr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Dd.create=(e,t)=>new Dd({innerType:e,typeName:fe.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:()=>t.catch,...De(t)});Ph=class Ph extends Fe{_parse(e){if(this._getType(e)!==W.nan){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.nan,received:r.parsedType}),de}return{status:"valid",value:e.data}}};Ph.create=(e)=>new Ph({typeName:fe.ZodNaN,...De(e)});Mst=Symbol("zod_brand");xw=class xw extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}};Ih=class Ih extends Fe{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(o.status==="aborted")return de;if(o.status==="dirty")return t.dirty(),Kc(o.value);else return this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();else{let n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(n.status==="aborted")return de;if(n.status==="dirty")return t.dirty(),{status:"dirty",value:n.value};else return this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new Ih({in:e,out:t,typeName:fe.ZodPipeline})}};Ed=class Ed extends Fe{_parse(e){let t=this._def.innerType._parse(e),r=(n)=>{if(da(n))n.value=Object.freeze(n.value);return n};return fd(t)?t.then((n)=>r(n)):r(t)}unwrap(){return this._def.innerType}};Ed.create=(e,t)=>new Ed({innerType:e,typeName:fe.ZodReadonly,...De(t)});Lst={object:$t.lazycreate};(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"})(fe||(fe={}));w=fi.create,k=Jc.create,Bst=Ph.create,Ust=Xc.create,be=Ch.create,zst=md.create,Vst=kh.create,Gst=hd.create,Hst=gd.create,Wst=Rh.create,Sd=fa.create,Kst=pi.create,Yst=Ah.create,ne=So.create,U=$t.create,Jst=$t.strictCreate,el=yd.create,_w=bw.create,Xst=bd.create,Zst=mi.create,ma=Oh.create,Qst=Fh.create,eat=Zc.create,tat=pd.create,rat=xd.create,ze=_d.create,Ze=pa.create,nat=vd.create,oat=Qc.create,iat=Co.create,sat=$o.create,aat=bs.create,cat=Co.createWithPreprocess,lat=Ih.create});var vw=O(()=>{Sh();hw();bq();ud();Eq();Eh()});var en=O(()=>{vw();vw()});function w$e(e){return e.startsWith("v")?e:`v${e}`}var _$e,v$e,Sq,_at;var ww=O(()=>{en();_$e=/^v?\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/,v$e=/^v\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/;Sq=w().regex(_$e,"must be a semver version, optionally v-prefixed").transform(w$e),_at=w().regex(v$e,"must be the canonical v-prefixed tag (vX.Y.Z)")});function Dw(e){return Th.includes(e)}var D$e,$d,Th,$q,E$e,Cq,S$e,kq,$$e,C$e,Rq,k$e,Aq,Dat,Eat,Oq,R$e,Fq,A$e,Pq,Ew=20,Sw=500,O$e,Sat;var Cd=O(()=>{en();D$e=Ze(["pending","verified","approved","revoked"]),$d=Ze(["person","service","test"]),Th=$d.options;$q={nemarOwner:"service",nemarAdmin:"service","test-admin":"service","test-owner":"service","cool-vibers":"test","test-user":"test","test-pending":"test","test-verified":"test","test-revoked":"test"},E$e=Ze(["same_kind","orcid_linked","own_account","kind_changed_concurrently"]),Cq=E$e.options,S$e=Ze(["active","pending","revoked"]),kq=U({field:w(),blocks:ne(w()).optional(),set_on:ne(w()).optional()}).passthrough(),$$e=U({id:k().int(),username:w().nullable(),email:w(),github_username:w().nullable(),role:w(),orcid:w().nullable().optional(),created_at:w().optional(),approved_at:w().nullable().optional(),dataset_count:k().int().optional(),sandbox_completed:be().optional(),sandbox_completed_at:w().nullable().optional(),sandbox_dataset_id:w().nullable().optional(),service_access:be().optional(),status:D$e.optional(),email_verified:be().optional(),orcid_verified:be().optional(),given_name:w().nullable().optional(),family_name:w().nullable().optional(),profile_gaps:ne(kq).optional(),username_auto_assigned:be().optional(),account_kind:$d.optional()}).passthrough(),C$e=U({prefix:w(),created_at:w(),last_used_at:w().nullable()}).passthrough().nullable(),Rq=U({user:$$e,token:C$e.optional()}).passthrough(),k$e=U({id:k().int(),username:w().nullable(),email:w(),github_username:w().nullable(),status:w(),email_verified:k().int().nullable().optional(),role:w().nullable(),created_at:w(),approved_at:w().nullable().optional(),revoked_at:w().nullable().optional(),signup_source:w().nullable().optional(),service_access:k().int().nullable().optional(),service_access_granted_at:w().nullable().optional(),given_name:w().nullable().optional(),family_name:w().nullable().optional(),orcid:w().nullable().optional(),upload_access_requested_at:w().nullable().optional(),account_kind:$d.optional()}).passthrough(),Aq=U({users:ne(k$e),count:k().int()}).passthrough(),Dat=Ze(["assigned","would_assign","single_name","no_name","lookup_failed","conflict","exhausted","write_failed"]),Eat=Ze(["sent","already_verified","skipped_fence","rate_limited","failed","not_attempted"]),Oq=U({suggestion:w().nullable(),based_on:Ze(["name","unavailable","exhausted"])}).passthrough(),R$e=Ze(["why_required","email_not_verified","profile_incomplete","github_username_unverified","github_unavailable","already_approved"]),Fq=R$e.options,A$e=Ze(["invalid_github_username","city_required","country_required","empty_patch","username_too_short","username_too_long","username_charset","given_name_required","family_name_required","username_taken","username_locked","name_is_orcid_canonical","account_revoked","github_unavailable","same_email","code_expired","code_incorrect","orcid_already_have","orcid_unavailable"]),Pq=A$e.options,O$e=U({id:k().int(),email:w(),username:w().nullable(),role:w(),status:S$e,email_verified:be(),given_name:w().nullable(),family_name:w().nullable(),orcid:w().nullable(),orcid_verified:be(),github_username:w().nullable(),city:w().nullable(),country:w().nullable(),affiliation:w().nullable(),service_access:be(),service_access_granted_at:w().nullable(),upload_access_requested_at:w().nullable(),profile_gaps:ne(kq),username_auto_assigned:be()}).passthrough(),Sat=U({user:O$e.nullable()}).passthrough()});function Tq(e,t){if(e.zarr_index_url!=null&&e.zarr_status!=="ready")t.addIssue({code:M.custom,message:"zarr_index_url must be null/absent unless zarr_status is 'ready'",path:["zarr_index_url"]})}function Nq(e,t){if(e.zarr_verified_at!=null&&e.zarr_verify_status==null)t.addIssue({code:M.custom,message:"zarr_verified_at must be null/absent unless zarr_verify_status is non-null",path:["zarr_verified_at"]})}var F$e="0.4.0",$w,tl,Iq,P$e,I$e,T$e,jq,Rat,qq,Aat,hi,N$e,Nh,Oat;var Cw=O(()=>{en();ww();$w=Ze(["openneuro","nemar","gin","other"]),tl=el([ze(0),ze(1)]).nullable(),Iq=U({dataset_id:w(),id:w().optional(),name:w(),description:w().nullable().optional(),status:w(),visibility:w(),anonymous:k().int().nullable().optional(),concept_doi:w().nullable().optional(),doi:w().nullable().optional(),created_at:w(),updated_at:w().optional(),first_published_at:w().nullable().optional(),owner_username:w().nullable().optional(),source:w().nullable().optional(),modalities:w().optional(),participants:k().int().nonnegative(),tasks:w().optional(),authors:w().optional(),license:w().optional(),file_size:k().nonnegative(),file_size_formatted:w().optional(),total_files:k().nonnegative().nullable().optional(),num_citations:k().int().nonnegative().optional(),n_channels:k().int().nullable().optional(),electrode_system:w().nullable().optional(),has_hed:tl.optional(),hed_version:w().nullable().optional(),data_complete:tl.optional(),bytes_present:k().nonnegative().nullable().optional(),latest_version:Sq.nullable().optional(),subject_count:k().int().nullable().optional(),file_size_bytes:k().nullable().optional(),sessions_count:k().int().nullable().optional(),age_min:k().nullable().optional(),age_max:k().nullable().optional(),bids_version:w().nullable().optional(),zarr_status:Ze(["pending","ready","failed"]).nullable().optional(),zarr_store_count:k().int().nullable().optional(),zarr_converted_at:w().nullable().optional(),zarr_source_commit:w().nullable().optional(),zarr_errors:k().int().nullable().optional(),zarr_failure_count:k().int().nullable().optional(),zarr_deterministic:tl.optional(),zarr_failed_at:w().nullable().optional(),zarr_index_url:w().nullable().optional(),zarr_verify_status:Ze(["verified","failed","unverifiable"]).nullable().optional(),zarr_verified_at:w().nullable().optional(),zarr_requeue_at:w().nullable().optional(),anonymity_status:Ze(["verified","findings","unverifiable"]).nullable().optional(),anonymity_checked_at:w().nullable().optional(),anonymity_findings:w().nullable().optional(),anonymity_unchecked:w().nullable().optional(),total_recording_duration:k().nullable().optional(),recording_duration_min:k().nullable().optional(),recording_duration_max:k().nullable().optional(),recording_count:k().int().nullable().optional(),recordings_unavailable:k().int().nullable().optional(),channel_count_min:k().int().nullable().optional(),channel_count_max:k().int().nullable().optional(),sampling_frequency:k().nullable().optional(),power_line_frequency:k().nullable().optional(),eeg_reference:w().nullable().optional(),placement_scheme:w().nullable().optional()}).passthrough();P$e=Iq.superRefine((e,t)=>{Tq(e,t),Nq(e,t)}),I$e=Iq.extend({file_size:k().nonnegative().nullable(),file_size_formatted:w().nullable().optional(),modalities:w().nullable().optional(),tasks:w().nullable().optional(),authors:w().nullable().optional(),license:w().nullable().optional(),owner_github:w().nullable().optional(),attestation_deposit_type:Ze(["owner","redistribution"]).nullable().optional(),attestation_key_status:Ze(["destroyed","retained"]).nullable().optional(),attestation_deidentified:tl.optional(),attestation_no_duplicate:tl.optional(),attestation_upstream_source:w().nullable().optional(),attestation_accepted_at:w().nullable().optional(),zarr_data_failures:U({count:k().int().nonnegative(),detail_ref:w(),compacted_by:w().optional(),pending:k().int().nonnegative().optional(),discovered:k().int().nonnegative().optional(),events_upload_failed:ze(!0).optional(),manifest_upload_failed:ze(!0).optional()}).passthrough().nullable().optional()}).passthrough().superRefine((e,t)=>{Tq(e,t),Nq(e,t)}),T$e=U({id:w(),name:w(),modalities:w().nullable().optional(),participants:k().int().nullable().optional(),doi:w().nullable().optional(),tasks:w().nullable().optional(),authors:w().nullable().optional(),has_hed:tl.optional(),score:k().optional(),snippet:w().optional()}).passthrough(),jq=ma(w(),k().int().nonnegative()),Rat=U({datasets:ne(P$e),count:k().int().nonnegative(),total_count:k().int().nonnegative().optional(),limit:k().int().optional(),offset:k().int().optional(),excluded_unknown:k().int().nonnegative().optional(),excluded_unknown_by_facet:jq.optional()}).passthrough(),qq=U({results:ne(T$e),count:k().int().nonnegative(),returned:k().int().nonnegative().optional(),offset:k().int().nonnegative().optional(),limit:k().int().optional(),candidate_ceiling:k().int().optional(),truncated:be().optional(),method:Ze(["exact_id","text","text_fallback","semantic","unavailable"]).optional(),min_score:k().optional(),warning:w().optional(),excluded_unknown:k().int().nonnegative().optional(),excluded_unknown_by_facet:jq.optional()}).passthrough(),Aat=U({dataset:I$e}).passthrough(),hi=U({value:w(),count:k().int().nonnegative()}),N$e=U({values:ne(hi),distinct_total:k().int().nonnegative(),truncated:be()}),Nh=U({"electrode-system":ne(hi).optional(),source:ne(hi).optional(),zarr:ne(hi).optional(),powerline:ne(hi).optional(),"bids-version":ne(hi).optional(),"hed-version":ne(hi).optional(),license:ne(hi).optional(),modality:ne(hi).optional(),task:N$e.optional(),warning:w().optional()}).passthrough(),Oat=U({schema_version:ze(F$e),doc_type:ze("dataset"),dataset_id:w().regex(/^[a-z]{2}\d+$/,"neuroschema dataset_id pattern"),name:w(),source:$w,recording_modality:ne(w()).min(1),description:w().nullable().optional(),bids_version:w().nullable().optional(),license:w().nullable().optional()}).passthrough()});var j$e,Iat,Tat,Nat,jat;var Mq=O(()=>{en();j$e=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/,Iat=w().regex(j$e,"ORCID must be in format 0000-0000-0000-000X"),Tat=Ze(["found","no_public_name","lookup_failed"]),Nat=Ze(["bids_validation_failed","bids_validation_pending","bids_validation_in_progress","prescreen_failed","min_requirements_failed","owner_name_missing"]),jat=Ze(["filled","would_fill","no_public_name","lookup_failed","write_failed"])});var q$e,Lq,kd="https://nemar.org/settings",Lat,M$e,L$e,B$e,Bq,Uq;var kw=O(()=>{en();q$e=Ze(["orcid_in_use","orcid_already_linked","orcid_linked_other","email_in_use","github_in_use","identity_conflict_remains"]),Lq=q$e.options,Lat={orcid_in_use:`That ORCID iD already belongs to a NEMAR account. Sign in to that account instead; if you want the iD on a different account, unlink it there first (Settings, ${kd}).`,orcid_already_linked:`That ORCID iD already belongs to a NEMAR account. Sign in to that account instead; if you want the iD on a different account, unlink it there first (Settings, ${kd}).`,orcid_linked_other:`That ORCID iD is linked to a different NEMAR account. Unlink it there first (Settings, ${kd}), then link it here.`,email_in_use:`That email address already belongs to a NEMAR account. Sign in to that account instead, or change its address first (Settings, ${kd}).`,github_in_use:`That GitHub account is already linked to a NEMAR account. Sign in to that account instead, or change its GitHub username first (Settings, ${kd}).`,identity_conflict_remains:"The collision that flagged this account is still there. Resolve it on the other account first (change its email or GitHub username, or unlink its ORCID iD), or delete that account, then clear the flag."},M$e=Ze(["orcid","email","github"]),L$e=U({id:k().int(),username:w().nullable(),email:w(),created_at:w(),has_oauth_identity:be(),dataset_count:k().int(),identity_conflict:k().int(),canonical:be()}).passthrough(),B$e=U({kind:M$e,value:w(),canonical_user_id:k().int(),accounts:ne(L$e)}).passthrough(),Bq=U({groups:ne(B$e),group_count:k().int(),flagged_count:k().int()}).passthrough(),Uq=U({ok:ze(!0),id:k().int(),cleared:be()}).passthrough()});var Rw=120,zq=64,Aw="unnamed machine",U$e=25,jh,Vq,rl,Gq,zat,Vat,Hq,z$e,V$e,Wq,Ow,Kq,Gat,Hat,qh,Mh;var Lh=O(()=>{en();jh=Ze(["authorization_pending","slow_down","expired_token","access_denied","invalid_grant"]),Vq={authorization_pending:"Waiting for you to authorize this machine in the browser.",slow_down:"Polling too quickly; the CLI will slow down automatically.",expired_token:"The code expired. Run `nemar auth login` again for a new one.",access_denied:"This sign-in was declined in the browser. Run `nemar auth login` again if that was a mistake.",invalid_grant:"That code is no longer valid. Run `nemar auth login` again for a new one."},rl=Ze(["device_code_unknown","device_code_expired","device_code_used","device_code_denied","account_pending","account_revoked","identity_conflict","service_account","person_account","too_many_keys","key_not_found"]),Gq=rl.options,zat={device_code_unknown:"That code was not found. Check the code shown in your terminal, or run `nemar auth login` again for a new one.",device_code_expired:"The code expired. Run `nemar auth login` again for a new one.",device_code_used:"That code has already been used. Run `nemar auth login` again for a new one.",device_code_denied:"This sign-in was declined in the browser. Run `nemar auth login` again if that was a mistake.",account_pending:"Verify your email address first. Check your inbox for the NEMAR verification code, then authorize again.",account_revoked:"Your NEMAR account access has been revoked. Contact the NEMAR team if you think this is a mistake.",identity_conflict:"This account shares an identifier with another NEMAR account and cannot sign in until that is resolved. Fix it in Settings on nemar.org or contact the NEMAR team.",service_account:"This is a service or test account, and it cannot sign in this way. Ask an owner to create a key for it with `nemar admin keys create`.",person_account:"This account belongs to a person. A person creates their own keys with `nemar auth login` or in Settings on nemar.org.",too_many_keys:`This account already has ${U$e} active keys. Revoke one in Settings on nemar.org or with \`nemar auth keys\`, then try again.`,key_not_found:"That key was not found on this account, or it is already revoked. Run `nemar auth keys` to see the active ones."},Vat=U({error:rl,message:w()}).passthrough(),Hq=U({device_code:w(),user_code:w(),verification_uri:w(),verification_uri_complete:w(),expires_in:k().int(),interval:k().int()}).passthrough(),z$e=_w("error",[U({error:ze("authorization_pending"),message:w()}).passthrough(),U({error:ze("slow_down"),message:w()}).passthrough()]),V$e=_w("error",[U({error:ze("expired_token"),reason:rl,message:w()}).passthrough(),U({error:ze("access_denied"),reason:rl,message:w()}).passthrough(),U({error:ze("invalid_grant"),reason:rl,message:w()}).passthrough()]),Wq=el([z$e,V$e]),Ow=U({id:k().int(),name:w().nullable(),prefix:w(),created_at:w(),last_used_at:w().nullable(),current:be()}).passthrough(),Kq=U({api_key:w(),key:Ow,user:U({username:w().nullable(),email:w(),github_username:w().nullable(),role:w(),sandbox_completed:be(),sandbox_dataset_id:w().nullable()}).passthrough()}).passthrough(),Gat=U({user_code:w(),machine_name:w(),requested_at:w(),expires_in:k().int(),account:U({username:w().nullable(),email_masked:w()}).passthrough(),refusal:U({code:rl,message:w()}).passthrough().nullable()}).passthrough(),Hat=U({ok:ze(!0),machine_name:w()}).passthrough(),qh=U({keys:ne(Ow)}).passthrough(),Mh=U({api_key:w(),key:Ow}).passthrough()});function Pt(e){return Ct[e]}function gi(e,t){return e.replace(/\{(\w+)\}/g,(r,n)=>Object.hasOwn(t,n)?t[n]:r)}var Ct;var nl=O(()=>{Ct={"tier.unverified.label":"Email not verified","tier.base.label":"Base access","tier.upload.label":"Upload access","tier.unverified.lede":"Verify your email address to activate your account.","upload_access.section.title":"Upload access","upload_access.section.lede":"A one-time admin grant. Reviewed against export-control and local-jurisdiction rules.","upload_access.state.granted":"Granted","upload_access.state.requested":"Requested","upload_access.state.not_requested":"Not requested","upload_access.invite.title":"Want to contribute a dataset?","upload_access.invite.body":"Browsing, searching and downloading are open to your account already. Uploading needs one extra grant: an admin checks your GitHub handle and location against export-control and local-jurisdiction rules, once.","upload_access.gate.title":"Ask for upload access first","upload_access.gate.body":"Your account can browse, search and download everything public already. Uploading needs one extra grant: an admin checks your GitHub handle and where you\u2019re based against export-control and local-jurisdiction rules. You ask once, and it is answered by email.","upload_access.request.cta":"Request upload access","upload_access.request.form_body":"Tell us what you plan to deposit. An admin reviews this alongside your name, username, GitHub handle and location, then grants access once.","upload_access.request.why_label":"What do you intend to upload?","upload_access.request.why_hint":"Describe what you intend to upload in 20-500 characters","upload_access.requested.title":"Your request is with an admin","upload_access.requested.lede":"An admin is reviewing your request.","upload_access.requested.lede_dated":"An admin is reviewing your request from {date}.","upload_access.requested.body.upload":"We\u2019ll email you when there\u2019s a decision, and this page will let you upload as soon as it\u2019s granted.","upload_access.requested.body":"We\u2019ll email you when there\u2019s a decision. Everything else on your account keeps working in the meantime.","upload_access.requested.cta":"See the request","upload_access.granted.body":"You can upload datasets from the upload page. Publishing one is a separate, per-dataset review you start from your dashboard.","upload_access.unverified.body":"Verify your email address first \u2014 the review happens over email.","upload_access.docs_link":"How upload access works","gap.sentence":"{label} is missing: needed {blocks}.","gap.set_on.both":"Set it in {web} or run `{cli}`.","gap.set_on.web":"Set it in {web}.","gap.blocks.verified":"to activate your account","gap.blocks.upload_access":"to request upload access","gap.blocks.publication":"to publish a dataset","gap.blocks.unknown":"to finish setting up your account","gap.blocks.noun.verified":"account activation","gap.blocks.noun.upload_access":"upload access","gap.blocks.noun.publication":"publication","gap.set_on.default_web":"Settings","gap.field.email_verified.label":"A verified email address","gap.field.username.label":"Username","gap.field.given_name.label":"Given name","gap.field.family_name.label":"Family name","gap.field.orcid_verified.label":"Verified ORCID iD","gap.field.github_username.label":"GitHub handle","gap.field.city.label":"City","gap.field.country.label":"Country","gap.field.why.label":"A description of what you intend to upload","gap.field.email_verified.set_on.web":"the verify step on your dashboard","gap.field.email_verified.set_on.cli":"nemar auth resend-verification","gap.field.username.set_on.web":"Settings","gap.field.username.set_on.cli":"nemar auth profile set-username","gap.field.given_name.set_on.web":"Settings","gap.field.given_name.set_on.cli":"nemar auth profile set-name","gap.field.family_name.set_on.web":"Settings","gap.field.family_name.set_on.cli":"nemar auth profile set-name","gap.field.given_name.set_on.web.orcid":"your ORCID record at orcid.org, then sign in again","gap.field.family_name.set_on.web.orcid":"your ORCID record at orcid.org, then sign in again","gap.field.orcid_verified.set_on.web":"Settings","gap.field.orcid_verified.set_on.cli":"nemar auth profile orcid link","gap.field.github_username.set_on.web":"Settings","gap.field.github_username.set_on.cli":"nemar auth profile set-github","gap.field.city.set_on.web":"Settings","gap.field.city.set_on.cli":"nemar auth profile set-location","gap.field.country.set_on.web":"Settings","gap.field.country.set_on.cli":"nemar auth profile set-location","gap.field.why.set_on.web":"the request form in Settings","gap.field.why.set_on.cli":"nemar auth request-upload-access","gaps.title":"What is still missing","gaps.none":"Nothing outstanding \u2014 every field NEMAR needs is filled in.","gaps.nudge.title":"Your profile isn\u2019t finished yet","gaps.nudge.cta":"Complete your profile","gaps.upload.title":"Before you can ask, your account still needs:","gaps.request.title":"Finish these first:","gaps.admin.title":"Still missing","gaps.admin.item":"{label} \u2014 blocks {blocks}","gaps.admin.none":"Nothing missing \u2014 every field the request needs is filled in.","gaps.admin.not_loaded":"Not loaded \u2014 open the user page to see what is still missing.","onboarding.username.auto_assigned.title":"We chose your username from your name","onboarding.username.auto_assigned.body":"Your account needed a username to be listed as a dataset owner, so one was made from your name when you signed in. You can change it once, here, until an admin grants you upload access.","welcome.unverified.title":"Verify your email address","welcome.unverified.body":"Authorizing with ORCID created your NEMAR account and signed you in. One step left: enter the 6-digit code we emailed you. That activates the account \u2014 no admin approval is involved.","welcome.active.title":"Your account is active","welcome.active.body":"Authorizing with ORCID created your NEMAR account and signed you in. There is no separate sign-up step and no approval queue: browse, search, and your dashboard all work right now.","welcome.upload_access.title":"Ask for upload access when you\u2019re ready to contribute","welcome.upload_access.body":"Reading is open to every verified account. Uploading and compute need one extra grant, because an admin has to check your GitHub handle and location against export-control and local-jurisdiction rules first. You ask once, from Settings.","cli.gaps.section.title":"Profile","cli.gaps.unknown":"not checked: run 'nemar auth status --refresh'","cli.gaps.unreported":"not reported by this backend","cli.gap.set_on.cli_only":"Run `{cli}`.","cli.gap.field.sandbox.label":"Sandbox training","cli.gap.blocks.sandbox":"to upload a dataset from the CLI","cli.gap.field.sandbox.set_on.cli":"nemar sandbox","cli.gaps.sandbox_unchecked":"Sandbox training could not be confirmed with the server. Run `nemar sandbox status --refresh`, then `nemar sandbox` if it is still outstanding.","cli.upload.preflight.title":"Upload access is not granted yet","cli.upload.preflight.body":"Browsing, searching and downloading are open to your account already. Uploading needs one extra grant: an admin checks your GitHub handle and location against export-control and local-jurisdiction rules, once.","cli.upload_access.cta":"Ask for it with `nemar auth request-upload-access`.","cli.upload.preflight.unchecked":"Upload access could not be checked ({reason}); continuing.","cli.upload.preflight.gaps_unknown":"Could not determine what is still missing; run `nemar auth profile` for the list.","cli.upload.preflight.dry_run":"Continuing anyway: --dry-run uploads nothing."}});function H$e(e){return e==="verified"||e==="upload_access"||e==="publication"}function ol(e){return(e??"").trim().length===0}function W$e(e){return e==="service"||e==="test"}function Xq(e,t={}){let r=t.orcidVerified===!0,n=Object.hasOwn(Bh,e)?Bh[e]:void 0;if(!n)return{field:e,label:e,blocks:t.blocks??[],setOnWeb:Ct["gap.set_on.default_web"],setOnCli:null,known:!1};let o=r&&n.orcidWebKey!==void 0;return{field:e,blocks:t.blocks??n.blocks,label:Ct[n.labelKey],setOnWeb:Ct[o?n.orcidWebKey:n.webKey],setOnCli:o||n.cliKey===null?null:Ct[n.cliKey],known:!0}}function Yq(e){let t=Fw.indexOf(e);return t===-1?Fw.length:t}function Zq(e,t={}){return e.map((r)=>Xq(r,{orcidVerified:t.orcidVerified}))}function Uh(e,t={}){return e.filter((r)=>!!r&&typeof r.field==="string").map((r)=>{let n=Array.isArray(r.blocks)?r.blocks.filter(H$e):[];return Xq(r.field,{orcidVerified:t.orcidVerified,blocks:n.length>0?n:void 0})}).sort((r,n)=>Yq(r.field)-Yq(n.field))}function Pw(e){let t=e.blocks[0],r=t?Ct[G$e[t]]:Ct["gap.blocks.unknown"],n=gi(Ct["gap.sentence"],{label:"",blocks:r}).trimStart(),o=e.setOnCli?gi(Ct["gap.set_on.both"],{web:e.setOnWeb,cli:e.setOnCli}):gi(Ct["gap.set_on.web"],{web:e.setOnWeb});return`${n} ${o}`}function Qq(e){return`${e.label} ${Pw(e)}`}function zh(){let e=gi(Ct["gap.sentence"],{label:Jq.label,blocks:Ct["cli.gap.blocks.sandbox"]}),t=gi(Ct["cli.gap.set_on.cli_only"],{cli:Jq.command});return`${e} ${t}`}function e9(){return Ct["cli.gaps.sandbox_unchecked"]}var Bh,Fw,Jat,G$e,Jq;var il=O(()=>{nl();Bh={email_verified:{blocks:["verified","upload_access"],labelKey:"gap.field.email_verified.label",webKey:"gap.field.email_verified.set_on.web",cliKey:"gap.field.email_verified.set_on.cli",isMissing:(e)=>e.status==="pending"||e.email_verified===!1},username:{blocks:["upload_access"],labelKey:"gap.field.username.label",webKey:"gap.field.username.set_on.web",cliKey:"gap.field.username.set_on.cli",isMissing:(e)=>e.username!==void 0&&ol(e.username)},given_name:{blocks:["upload_access","publication"],labelKey:"gap.field.given_name.label",webKey:"gap.field.given_name.set_on.web",cliKey:"gap.field.given_name.set_on.cli",orcidWebKey:"gap.field.given_name.set_on.web.orcid",isMissing:(e)=>ol(e.given_name)},family_name:{blocks:["upload_access","publication"],labelKey:"gap.field.family_name.label",webKey:"gap.field.family_name.set_on.web",cliKey:"gap.field.family_name.set_on.cli",orcidWebKey:"gap.field.family_name.set_on.web.orcid",isMissing:(e)=>ol(e.family_name)},orcid_verified:{blocks:["upload_access"],labelKey:"gap.field.orcid_verified.label",webKey:"gap.field.orcid_verified.set_on.web",cliKey:"gap.field.orcid_verified.set_on.cli",isMissing:(e)=>e.orcid_verified!==!0&&!W$e(e.account_kind)},github_username:{blocks:["upload_access","publication"],labelKey:"gap.field.github_username.label",webKey:"gap.field.github_username.set_on.web",cliKey:"gap.field.github_username.set_on.cli",isMissing:(e)=>ol(e.github_username)},city:{blocks:["upload_access"],labelKey:"gap.field.city.label",webKey:"gap.field.city.set_on.web",cliKey:"gap.field.city.set_on.cli",isMissing:(e)=>ol(e.city)},country:{blocks:["upload_access"],labelKey:"gap.field.country.label",webKey:"gap.field.country.set_on.web",cliKey:"gap.field.country.set_on.cli",isMissing:(e)=>ol(e.country)},why:{blocks:["upload_access"],labelKey:"gap.field.why.label",webKey:"gap.field.why.set_on.web",cliKey:"gap.field.why.set_on.cli",isMissing:null}},Fw=Object.keys(Bh),Jat=Fw.filter((e)=>Bh[e].isMissing!==null),G$e={verified:"gap.blocks.verified",upload_access:"gap.blocks.upload_access",publication:"gap.blocks.publication"};Jq={field:"sandbox",label:Ct["cli.gap.field.sandbox.label"],command:Ct["cli.gap.field.sandbox.set_on.cli"]}});function Wh(e,t){let r=e.sss!==void 0;if(e.derived!==r)t.addIssue({code:M.custom,path:["sss"],message:e.derived?"derived is true but sss is absent (ADR 0028: the two travel together)":"sss is present but derived is false (ADR 0028: the two travel together)"})}var xr,Vh,t9,Gh,K$e,Hh,Y$e,J$e,X$e,Z$e,Q$e,Qat,eCe,ect,tCe,tct;var Iw=O(()=>{en();xr=/^[a-z]{2}[0-9]{6}$/,Vh=/^[0-9a-f]{40}$/,t9=U({name:w(),modality:w().nullable().optional(),rate:k().nullable().optional(),n_channels:k().int().nonnegative().nullable().optional(),n_samples:k().int().nonnegative().nullable().optional(),duration_s:k().nonnegative().nullable().optional(),source_rate_hz:k().nullable().optional(),n_view_levels:k().int().nonnegative().optional(),view_chunk_columns:k().int().positive().optional(),chunk_samples:k().int().positive().optional(),shard_samples:k().int().positive().optional()}).passthrough(),Gh=U({converted:k().int().nonnegative().optional(),relabelled:k().int().nonnegative().optional(),kept_importer_unit:k().int().nonnegative().optional(),units_column_present:be().optional(),sidecar:w().optional(),sidecar_supplied:be().optional(),unmatched_channels:k().int().nonnegative().optional(),unmatched_case_only:k().int().positive().optional(),unmatched_raw_label:k().int().positive().optional(),unmatched_examples:ne(w()).max(5).optional()}).passthrough(),K$e=U({channels_tsv:k().int().positive(),in_file:k().int().nonnegative(),in_store:k().int().nonnegative()}).passthrough(),Hh=U({applied:be().optional(),method:w().optional(),calibration:w().optional(),cross_talk:w().optional(),mne_version:w().optional()}).passthrough();Y$e=U({path:w(),zarr:w().regex(/\.zarr$/,"must end in .zarr"),updated_utc:w().optional(),source_tree:ze("raw"),derived:be(),modalities:ne(w()).optional(),groups:ne(t9).optional(),power_line_frequency:k().nullable().optional(),event_description_count:k().int().nonnegative().optional(),n_events:k().int().nonnegative().optional(),trial_types:ma(w(),k().int().nonnegative()).optional(),units_report:Gh.optional(),channels_tsv_read_error:be().optional(),channels_tsv_count_mismatch:K$e.optional(),split_members:ne(w()).optional(),sss:Hh.optional()}).passthrough().superRefine(Wh),J$e=U({path:w(),zarr:w().regex(/\.zarr$/,"must end in .zarr").optional(),code:w(),reason:w(),detail:w().nullable().optional(),attempts:k().int().nonnegative().optional()}).passthrough(),X$e=Ze(["infra_failure","memory_budget","not_attempted"]),Z$e=U({path:w(),zarr:w().regex(/\.zarr$/,"must end in .zarr"),reason:X$e,attempts:k().int().nonnegative(),last_error:w().nullable().optional(),last_attempt_utc:w().nullable().optional()}).passthrough(),Q$e=U({level0:ze("<zarr>/<group>/0"),view:ze("<zarr>/<group>/view/<L>"),view_levels:ze("1..n_view_levels from the group attrs"),scale_offset:ze("level-0 array attrs scale[] and offset[]; physical = digital * scale + offset"),events:ze("<data_base>events.parquet").optional()}).passthrough(),Qat=U({format:ze("nemar-zarr-index"),format_version:ze(3),dataset_id:w().regex(xr,"NEMAR dataset id (nm/on/xx band)"),contract_base:w().regex(/^https:\/\//,"must be https"),data_base:w().regex(/^https:\/\//,"must be https"),data_base_kind:ze("s3-public"),s3_uri:w().regex(/^s3:\/\//,"must be an s3:// URI"),s3_region:w().min(1),s3_anonymous:be(),source_commit:w().regex(Vh,"must be a full 40-hex SHA"),engine_version:w().min(1),biosigio_version:w().nullable().optional(),updated_utc:w(),discovered_count:k().int().nonnegative(),store_count:k().int().nonnegative(),n_recordings:k().int().nonnegative(),errors:k().int().nonnegative(),failure_count:k().int().nonnegative(),pending_count:k().int().nonnegative(),stores:ne(Y$e),failures:ne(J$e),pending:ne(Z$e),doi:w().nullable().optional(),license:w().nullable().optional(),citation:w().nullable().optional(),hed_version:w().nullable().optional(),events_parquet:w().regex(/^https:\/\//,"must be https").optional(),events_row_count:k().int().nonnegative().optional(),layout:Q$e}).passthrough(),eCe=U({name:w(),configuration:ma(w(),Sd()).optional()}).passthrough(),ect=U({zarr_format:ze(3),node_type:ze("array"),shape:ne(k().int().nonnegative()),data_type:w(),chunk_grid:U({name:w(),configuration:ma(w(),Sd()).optional()}).passthrough(),codecs:ne(eCe),fill_value:Sd().optional(),attributes:ma(w(),Sd()).optional(),dimension_names:ne(w().nullable()).optional()}).passthrough(),tCe=U({path:w(),zarr:w().regex(/\.zarr$/,"must end in .zarr"),groups:ne(t9).optional(),modalities:ne(w()).optional()}).passthrough(),tct=U({format:ze("nemar-zarr-index"),format_version:k().int(),dataset_id:w().regex(xr,"NEMAR dataset id (nm/on/xx band)"),source_commit:w(),stores:ne(tCe)}).passthrough()});function r9(e){let t=e.unit?` (${e.unit})`:"";switch(e.valueKind){case"enum":return`${e.label} -- comma-separated, one or more of: ${(e.enumValues??[]).join(", ")}`;case"number":return`${e.label}${t} -- range (e.g. 10..50, 10.., ..50, or 10)`;case"bytes":return`${e.label}${t} -- range with optional units (e.g. 10gb..2tb, 500mb.., ..1gb; bare = bytes)`;case"duration":return`${e.label}${t} -- range with optional units (e.g. 30m..2h, 100h.., ..90s; bare = seconds)`;case"text":return`${e.label} -- substring match`;case"version":return`${e.label} -- exact or prefix match`}}var rCe,nCe,oCe,iCe,ko,oct;var Kh=O(()=>{Cw();rCe=["10-05","10-10","10-20","biosemi","egi-geodesic","other"],nCe=["50","60"],oCe=["ready","pending","failed"],iCe=$w.options,ko=[{key:"subjects",flag:"--subjects",queryParam:"subjects",valueKind:"number",label:"Subject count",unit:"subjects"},{key:"channels",flag:"--channels",queryParam:"channels",valueKind:"number",label:"Channel count",unit:"channels"},{key:"sessions",flag:"--sessions",queryParam:"sessions",valueKind:"number",label:"Session count",unit:"sessions"},{key:"size",flag:"--size",queryParam:"size",valueKind:"bytes",label:"Dataset size"},{key:"files",flag:"--files",queryParam:"files",valueKind:"number",label:"File count",unit:"files"},{key:"citations",flag:"--citations",queryParam:"citations",valueKind:"number",label:"Citation count",unit:"citations"},{key:"duration",flag:"--duration",queryParam:"duration",valueKind:"duration",label:"Total recording duration"},{key:"recording-length",flag:"--recording-length",queryParam:"recording_length",valueKind:"duration",label:"Per-recording duration"},{key:"recordings",flag:"--recordings",queryParam:"recordings",valueKind:"number",label:"Recording count",unit:"recordings"},{key:"unavailable",flag:"--unavailable",queryParam:"unavailable",valueKind:"number",label:"Unavailable recording count",unit:"recordings"},{key:"age",flag:"--age",queryParam:"age",valueKind:"number",label:"Participant age",unit:"years"},{key:"rate",flag:"--rate",queryParam:"rate",valueKind:"number",label:"Sampling rate",unit:"Hz"},{key:"powerline",flag:"--powerline",queryParam:"powerline",valueKind:"enum",label:"Power line frequency",enumValues:nCe},{key:"reference",flag:"--reference",queryParam:"reference",valueKind:"text",label:"EEG reference"},{key:"placement",flag:"--placement",queryParam:"placement",valueKind:"text",label:"Electrode placement scheme"},{key:"electrode-system",flag:"--electrode-system",queryParam:"electrode_system",valueKind:"enum",label:"Electrode system",enumValues:rCe},{key:"source",flag:"--source",queryParam:"source",valueKind:"enum",label:"Source archive",enumValues:iCe},{key:"zarr",flag:"--zarr",queryParam:"zarr",valueKind:"enum",label:"Zarr conversion status",enumValues:oCe},{key:"bids-version",flag:"--bids-version",queryParam:"bids_version",valueKind:"version",label:"BIDS version"},{key:"hed-version",flag:"--hed-version",queryParam:"hed_version",valueKind:"version",label:"HED version"}],oct=new Map(ko.map((e)=>[e.key,e]))});var sCe,lct,aCe,a9,Rd,n9,cCe,c9,lCe=20,uCe=100,dCe,l9,fCe,uct,dct,pCe,fct,pct,mCe,hCe,gCe,mct,yCe=50,bCe=500,hct,xCe,_Ce,gct,vCe=1000,wCe=5000,o9=8,DCe=100,ECe=32,i9,yct,SCe,$Ce,CCe,bct,kCe=800,RCe=4000,xct,_ct,Tw=60,Nw=64,s9,ACe=86400,OCe=4096,vct,FCe,PCe,wct;var u9=O(()=>{en();Kh();Iw();sCe=U({dataset_id:w().regex(xr),name:w(),doi:w().nullable().optional(),license:w().nullable().optional(),modalities:ne(w()).optional(),tasks:ne(w()).optional(),subject_count:k().int().nonnegative().nullable().optional(),has_hed:el([ze(0),ze(1)]).nullable().optional(),hed_version:w().nullable().optional(),store_count:k().int().nonnegative().nullable().optional(),recording_count:k().int().nonnegative().nullable().optional(),recordings_unavailable:k().int().nonnegative().nullable().optional(),total_recording_duration:k().nullable().optional(),zarr_converted_at:w().nullable().optional(),zarr_source_commit:w().nullable().optional(),zarr_errors:k().int().nonnegative().nullable().optional(),zarr_verify_status:Ze(["verified","failed","unverifiable"]).nullable().optional(),zarr_verified_at:w().nullable().optional(),index_url:w().nullable().optional()}).passthrough(),lct=U({format:ze("nemar-zarr-catalog"),format_version:k().int(),generated_utc:w(),contract_base:w(),count:k().int().nonnegative(),datasets:ne(sCe)}).passthrough(),aCe=["verified","failed","unverifiable"],a9=Ze(aCe).nullable(),Rd=U({dataset_id:w().regex(xr),doi:w().nullable(),license:w().nullable(),citation:w().nullable(),source_commit:w().regex(Vh),index_etag:w().nullable(),engine_version:w(),source_tree:ze("raw"),derived:be(),sss:Hh.optional(),lossy:be(),dtype:w().nullable(),effective_rate_hz:k().nullable(),source_rate_hz:k().nullable(),units_report:Gh.nullable().optional(),zarr_verify_status:a9,note:w().nullable().optional()}).passthrough().superRefine(Wh),n9=U({start:k().int().nonnegative(),end:k().int().nonnegative()}).passthrough().refine((e)=>e.end>=e.start,{message:"end must be >= start",path:["end"]}),cCe=U({python_zarr:w(),zarrita:w(),python_browser:w()}).passthrough(),c9=U({contract_base:w(),data_base:w(),s3_uri:w(),s3_region:w(),s3_anonymous:be(),zarr:w(),group:w(),level:el([ze("0"),k().int().positive()]),array_path:w(),dtype:w().nullable(),codecs:ne(Sd()).optional(),chunk_samples:k().int().positive().nullable(),shard_samples:k().int().positive().nullable(),n_channels:k().int().nonnegative().nullable(),sample_slice:n9.optional(),channel_slice:n9.optional(),scale_offset:w(),how_to:cCe}).passthrough(),dCe=Object.fromEntries(ko.map((e)=>[e.queryParam,w().optional()])),l9={modality:w().optional(),task:w().optional(),has_hed:be().optional(),has_zarr:be().optional(),author:w().optional(),has_doi:be().optional(),has_zarr_verified:be().optional(),data_complete:be().optional(),recent:k().int().positive().optional(),license:w().optional()},fCe=Object.keys(l9),uct=[...fCe,...ko.map((e)=>e.queryParam)],dct=U({query:w().optional(),...l9,include_unknown:be().optional(),...dCe,limit:k().int().positive().max(uCe).default(lCe)}).passthrough(),pCe=U({dataset_id:w().regex(xr),name:w(),doi:w().nullable().optional(),license:w().nullable().optional(),modalities:ne(w()).optional(),tasks:ne(w()).optional(),subject_count:k().int().nullable().optional(),has_hed:be().nullable().optional(),has_zarr:be()}).passthrough(),fct=U({results:ne(pCe),count:k().int().nonnegative(),limit:k().int(),note:w().nullable().optional(),truncated:be().optional()}).passthrough(),pct=U({dataset_id:w().regex(xr)}).passthrough(),mCe=["list_recordings","get_events","render_overview","read_window"],hCe=U({next_cheapest_tool:Ze(mCe),reason:w()}).passthrough(),gCe=["pending","ready","failed"],mct=U({dataset_id:w().regex(xr),name:w(),doi:w().nullable(),license:w().nullable(),citation:w().nullable(),modalities:ne(w()).optional(),tasks:ne(w()).optional(),subject_count:k().int().nullable().optional(),has_hed:be().nullable().optional(),hed_version:w().nullable().optional(),recording_count:k().int().nullable().optional(),total_recording_duration_s:k().nullable().optional(),zarr_status:Ze(gCe).nullable().optional(),zarr_verify_status:a9.optional(),zarr_source_commit:w().nullable().optional(),zarr_store_count:k().int().nullable().optional(),cost_hint:hCe}).passthrough(),hct=U({dataset_id:w().regex(xr),modality:w().optional(),min_duration_s:k().nonnegative().optional(),include_derived:be().default(!1),limit:k().int().positive().max(bCe).default(yCe),offset:k().int().nonnegative().default(0)}).passthrough(),xCe=U({name:w(),modality:w().nullable().optional(),rate:k().nullable().optional(),n_channels:k().int().nullable().optional(),duration_s:k().nullable().optional(),n_view_levels:k().int().nonnegative().nullable().optional(),n_samples:k().int().nonnegative().nullable().optional(),view_chunk_columns:k().int().positive().nullable().optional()}).passthrough(),_Ce=U({path:w(),zarr:w(),source_tree:ze("raw"),derived:be(),groups:ne(xCe).optional(),n_events:k().int().nonnegative().optional(),sss:Hh.optional(),units_report:Gh.optional()}).passthrough().superRefine(Wh),gct=U({dataset_id:w().regex(xr),source_commit:w().regex(Vh).nullable(),recordings:ne(_Ce),total_count:k().int().nonnegative(),excluded_derived_count:k().int().nonnegative(),limit:k().int(),offset:k().int(),index_format_version:k().int(),discovered_count:k().int().nonnegative().nullable(),failure_count:k().int().nonnegative().nullable(),pending_count:k().int().nonnegative().nullable(),excluded_legacy_non_raw_count:k().int().nonnegative(),note:w().nullable().optional(),envelope:Rd.optional()}).passthrough(),i9=w().min(1).max(64),yct=U({dataset_id:w().regex(xr),recording:w(),group:w().optional(),limit:k().int().positive().max(wCe).default(vCe),offset:k().int().nonnegative().default(0),where:ma(i9,ne(el([w(),k()])).min(1).max(DCe)).refine((e)=>{let t=Object.keys(e).length;return t>=1&&t<=o9},{message:`where names 1 to ${o9} columns`}).optional(),columns:ne(i9).min(1).max(ECe).optional()}).passthrough(),SCe=U({store_path:w(),group_name:w(),onset_s:k(),duration_s:k().nullable().optional(),sample_index:k().int().nonnegative(),trial_type:w().nullable().optional(),value:el([w(),k()]).nullable().optional(),hed:w().nullable().optional()}).passthrough(),$Ce=SCe.partial().required({onset_s:!0,sample_index:!0}),CCe=U({name:w(),distinct_count:k().int().nonnegative(),null_count:k().int().nonnegative(),values:ne(U({value:w(),count:k().int().positive()}).passthrough()).nullable()}).passthrough(),bct=U({dataset_id:w().regex(xr),recording:w(),events:ne($Ce),source:Ze(["events_parquet","events_tsv_fallback"]),estimated:be(),total_count:k().int().nonnegative(),limit:k().int(),offset:k().int(),truncated:be(),note:w().nullable().optional(),columns_summary:ne(CCe).optional(),envelope:Rd.optional()}).passthrough(),xct=U({dataset_id:w().regex(xr),recording:w(),group:w().optional(),width_px:k().int().positive().max(RCe).default(kCe)}).passthrough(),_ct=U({dataset_id:w().regex(xr),recording:w(),group:w(),level:k().int().positive(),width_px:k().int().positive(),height_px:k().int().positive(),mime_type:ze("image/png"),columns_read:k().int().nonnegative(),chunks_read:k().int().nonnegative(),bytes_read:k().int().nonnegative(),envelope:Rd.optional()}).passthrough(),s9=Tw*Nw,vct=U({dataset_id:w().regex(xr),recording:w(),group:w().optional(),start_s:k().nonnegative().default(0),duration_s:k().positive().max(ACe).default(10),channels:ne(k().int().nonnegative()).max(OCe).optional(),taste:be().default(!1)}).passthrough().superRefine((e,t)=>{if(!e.taste)return;if(!e.channels||e.channels.length===0){t.addIssue({code:M.custom,message:"taste requires channels: name the channel indices you want (list_recordings reports each group's n_channels), or omit taste for a recipe",path:["channels"]});return}if(e.duration_s>Tw)t.addIssue({code:M.custom,message:`taste duration_s (${e.duration_s}) exceeds the ${Tw} s cap; omit taste for a recipe instead`,path:["duration_s"]});if(e.channels.length>Nw)t.addIssue({code:M.custom,message:`taste channels (${e.channels.length}) exceeds the ${Nw}-channel cap; omit taste for a recipe instead`,path:["channels"]});let r=e.duration_s*e.channels.length;if(r>s9)t.addIssue({code:M.custom,message:`taste exceeds the cap of ${s9} channel-seconds (duration_s x channels = ${r}); omit taste for a recipe instead`,path:["duration_s"]})}),FCe=U({mode:ze("recipe"),recipe:c9,envelope:Rd}).passthrough(),PCe=U({mode:ze("taste"),start_s:k(),duration_s:k(),channels:ne(k().int()),sample_rate_hz:k(),values:ne(ne(k())),recipe:c9,chunks_read:k().int().nonnegative(),bytes_read:k().int().nonnegative(),filled_ranges:ne(U({start_sample:k().int().nonnegative(),end_sample:k().int().nonnegative(),start_s:k(),end_s:k()}).passthrough()),note:w().nullable().optional(),envelope:Rd}).passthrough(),wct=_w("mode",[FCe,PCe])});var sl=O(()=>{ww();Cd();Cw();Mq();kw();Lh();nl();il();Iw();u9()});function Yh(e){return e?TCe:xs}var xs,ICe,TCe,jw;var Jh=O(()=>{xs=["ci_check","enrichment_check","s3_public_read","repo_public","tag_protect","doi_create","update_metadata","update_readme","create_tag","create_release","upload_to_zenodo","publish_doi","version_doi","s3_lock","sync_nemar","notify_user"],ICe=["update_metadata","update_readme","upload_to_zenodo","publish_doi"],TCe=xs.filter((e)=>!ICe.includes(e));jw={ci_check:"Check CI",enrichment_check:"Enrichment check",s3_public_read:"S3 public read",repo_public:"Make catalog row public",tag_protect:"Tag protection",doi_create:"Create DOI",update_metadata:"Update metadata",update_readme:"Update README",create_tag:"Create version tag",create_release:"Create GitHub release",upload_to_zenodo:"Upload to Zenodo (no-op)",publish_doi:"Publish DOI (irreversible)",version_doi:"Version DOI + manifest",s3_lock:"S3 Object Lock",sync_nemar:"Sync NEMAR (no-op)",notify_user:"Notify user"}});function Xh(e){let t=[],r="",n="start",o=!1;for(let i of e)switch(i){case"\\":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd")throw Error("Invalid character after an index");if(o)r+=i;n="property",o=!o;break}case".":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(o){o=!1,r+=i;break}if(qw.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(o){o=!1,r+=i;break}if(n==="property"){if(qw.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw Error("Invalid character after an index")}default:{if(n==="index"&&!NCe.has(i))throw Error("Invalid character in an index");if(n==="indexEnd")throw Error("Invalid character after an index");if(n==="start")n="property";if(o)o=!1,r+="\\";r+=i}}if(o)r+="\\";switch(n){case"property":{if(qw.has(r))return[];t.push(r);break}case"index":throw Error("Index was not closed");case"start":{t.push("");break}}return t}function Mw(e,t){if(typeof t!=="number"&&Array.isArray(e)){let r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function d9(e,t){if(Mw(e,t))throw Error("Cannot use string index")}function f9(e,t,r){if(!ha(e)||typeof t!=="string")return r===void 0?e:r;let n=Xh(t);if(n.length===0)return r;for(let o=0;o<n.length;o++){let i=n[o];if(Mw(e,i))e=o===n.length-1?void 0:null;else e=e[i];if(e===void 0||e===null){if(o!==n.length-1)return r;break}}return e===void 0?r:e}function Lw(e,t,r){if(!ha(e)||typeof t!=="string")return e;let n=e,o=Xh(t);for(let i=0;i<o.length;i++){let s=o[i];if(d9(e,s),i===o.length-1)e[s]=r;else if(!ha(e[s]))e[s]=typeof o[i+1]==="number"?[]:{};e=e[s]}return n}function p9(e,t){if(!ha(e)||typeof t!=="string")return!1;let r=Xh(t);for(let n=0;n<r.length;n++){let o=r[n];if(d9(e,o),n===r.length-1)return delete e[o],!0;if(e=e[o],!ha(e))return!1}}function m9(e,t){if(!ha(e)||typeof t!=="string")return!1;let r=Xh(t);if(r.length===0)return!1;for(let n of r){if(!ha(e)||!(n in e)||Mw(e,n))return!1;e=e[n]}return!0}var ha=(e)=>{let t=typeof e;return e!==null&&(t==="object"||t==="function")},qw,NCe;var h9=O(()=>{qw=new Set(["__proto__","prototype","constructor"]),NCe=new Set("0123456789")});import _t from"path";import g9 from"os";import Bw from"process";function zw(e,{suffix:t="nodejs"}={}){if(typeof e!=="string")throw TypeError(`Expected a string, got ${typeof e}`);if(t)e+=`-${t}`;if(Bw.platform==="darwin")return jCe(e);if(Bw.platform==="win32")return qCe(e);return MCe(e)}var _s,Uw,al,jCe=(e)=>{let t=_t.join(_s,"Library");return{data:_t.join(t,"Application Support",e),config:_t.join(t,"Preferences",e),cache:_t.join(t,"Caches",e),log:_t.join(t,"Logs",e),temp:_t.join(Uw,e)}},qCe=(e)=>{let t=al.APPDATA||_t.join(_s,"AppData","Roaming"),r=al.LOCALAPPDATA||_t.join(_s,"AppData","Local");return{data:_t.join(r,e,"Data"),config:_t.join(t,e,"Config"),cache:_t.join(r,e,"Cache"),log:_t.join(r,e,"Log"),temp:_t.join(Uw,e)}},MCe=(e)=>{let t=_t.basename(_s);return{data:_t.join(al.XDG_DATA_HOME||_t.join(_s,".local","share"),e),config:_t.join(al.XDG_CONFIG_HOME||_t.join(_s,".config"),e),cache:_t.join(al.XDG_CACHE_HOME||_t.join(_s,".cache"),e),log:_t.join(al.XDG_STATE_HOME||_t.join(_s,".local","state"),e),temp:_t.join(Uw,t,e)}};var y9=O(()=>{_s=g9.homedir(),Uw=g9.tmpdir(),{env:al}=Bw});var LCe=(e,t)=>{let{onError:r}=t;return function(...o){return e.apply(void 0,o).catch(r)}},Ro;var b9=O(()=>{Ro=LCe});var BCe=(e,t)=>{let{onError:r}=t;return function(...o){try{return e.apply(void 0,o)}catch(i){return r(i)}}},Bn;var x9=O(()=>{Bn=BCe});var _9=250;var v9=()=>{};var UCe=(e,t)=>{let{isRetriable:r}=t;return function(o){let{timeout:i}=o,s=o.interval??_9,a=Date.now()+i;return function c(...u){return e.apply(void 0,u).catch((d)=>{if(!r(d))throw d;if(Date.now()>=a)throw d;let f=Math.round(s*Math.random());if(f>0)return new Promise((p)=>setTimeout(p,f)).then(()=>c.apply(void 0,u));else return c.apply(void 0,u)})}}},Ao;var w9=O(()=>{v9();Ao=UCe});var zCe=(e,t)=>{let{isRetriable:r}=t;return function(o){let{timeout:i}=o,s=Date.now()+i;return function(...c){while(!0)try{return e.apply(void 0,c)}catch(u){if(!r(u))throw u;if(Date.now()>=s)throw u;continue}}}},Oo;var D9=O(()=>{Oo=zCe});var Vw=O(()=>{b9();x9();w9();D9()});var Ad,Gw;var E9=O(()=>{Hw();Ad={isChangeErrorOk:(e)=>{if(!Ad.isNodeError(e))return!1;let{code:t}=e;if(t==="ENOSYS")return!0;if(!S9&&(t==="EINVAL"||t==="EPERM"))return!0;return!1},isNodeError:(e)=>e instanceof Error,isRetriableError:(e)=>{if(!Ad.isNodeError(e))return!1;let{code:t}=e;if(t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM")return!0;return!1},onChangeError:(e)=>{if(!Ad.isNodeError(e))throw e;if(Ad.isChangeErrorOk(e))return;throw e}},Gw=Ad});import $9 from"process";var Od,Tr,S9,Zt;var Hw=O(()=>{E9();Od={onError:Gw.onChangeError},Tr={onError:()=>{return}},S9=$9.getuid?!$9.getuid():!1,Zt={isRetriable:Gw.isRetriableError}});import Ke from"fs";import{promisify as sr}from"util";var VCe,Gt;var Ww=O(()=>{Vw();Vw();Hw();VCe={attempt:{chmod:Ro(sr(Ke.chmod),Od),chown:Ro(sr(Ke.chown),Od),close:Ro(sr(Ke.close),Tr),fsync:Ro(sr(Ke.fsync),Tr),mkdir:Ro(sr(Ke.mkdir),Tr),realpath:Ro(sr(Ke.realpath),Tr),stat:Ro(sr(Ke.stat),Tr),unlink:Ro(sr(Ke.unlink),Tr),chmodSync:Bn(Ke.chmodSync,Od),chownSync:Bn(Ke.chownSync,Od),closeSync:Bn(Ke.closeSync,Tr),existsSync:Bn(Ke.existsSync,Tr),fsyncSync:Bn(Ke.fsync,Tr),mkdirSync:Bn(Ke.mkdirSync,Tr),realpathSync:Bn(Ke.realpathSync,Tr),statSync:Bn(Ke.statSync,Tr),unlinkSync:Bn(Ke.unlinkSync,Tr)},retry:{close:Ao(sr(Ke.close),Zt),fsync:Ao(sr(Ke.fsync),Zt),open:Ao(sr(Ke.open),Zt),readFile:Ao(sr(Ke.readFile),Zt),rename:Ao(sr(Ke.rename),Zt),stat:Ao(sr(Ke.stat),Zt),write:Ao(sr(Ke.write),Zt),writeFile:Ao(sr(Ke.writeFile),Zt),closeSync:Oo(Ke.closeSync,Zt),fsyncSync:Oo(Ke.fsyncSync,Zt),openSync:Oo(Ke.openSync,Zt),readFileSync:Oo(Ke.readFileSync,Zt),renameSync:Oo(Ke.renameSync,Zt),statSync:Oo(Ke.statSync,Zt),writeSync:Oo(Ke.writeSync,Zt),writeFileSync:Oo(Ke.writeFileSync,Zt)}},Gt=VCe});import ga from"process";var C9="utf8",Kw=438,k9=511,R9,A9,O9,F9=1000,P9,ult,Yw=128;var Jw=O(()=>{R9={},A9=ga.geteuid?ga.geteuid():-1,O9=ga.getegid?ga.getegid():-1,P9=!!ga.getuid,ult=ga.getuid?!ga.getuid():!1});var I9=(e)=>e instanceof Error&&("code"in e),Xw=(e)=>typeof e==="string",Zh=(e)=>e===void 0;var T9=()=>{};var N9=()=>{};import j9 from"process";var q9,Qh;var Zw=O(()=>{q9=j9.platform==="linux",Qh=j9.platform==="win32"});var Qw,M9;var L9=O(()=>{Zw();Qw=["SIGHUP","SIGINT","SIGTERM"];if(!Qh)Qw.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(q9)Qw.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");M9=Qw});import cl from"process";class B9{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(e)=>{if(this.exited)return;this.exited=!0;for(let t of this.callbacks)t();if(e)if(Qh&&(e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"))cl.kill(cl.pid,"SIGTERM");else cl.kill(cl.pid,e)},this.hook=()=>{cl.once("exit",()=>this.exit());for(let e of M9)try{cl.once(e,()=>this.exit(e))}catch{}},this.register=(e)=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}var U9;var z9=O(()=>{Zw();L9();U9=new B9});var GCe,V9;var G9=O(()=>{z9();GCe=U9.register,V9=GCe});import HCe from"path";var tn,Fd;var H9=O(()=>{Ww();G9();Jw();tn={store:{},create:(e)=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),n="tmp-",o=`.tmp-${r}${t}`;return`${e}${o}`},get:(e,t,r=!0)=>{let n=tn.truncate(t(e));if(n in tn.store)return tn.get(e,t,r);return tn.store[n]=r,[n,()=>delete tn.store[n]]},purge:(e)=>{if(!tn.store[e])return;delete tn.store[e],Gt.attempt.unlink(e)},purgeSync:(e)=>{if(!tn.store[e])return;delete tn.store[e],Gt.attempt.unlinkSync(e)},purgeSyncAll:()=>{for(let e in tn.store)tn.purgeSync(e)},truncate:(e)=>{let t=HCe.basename(e);if(t.length<=Yw)return e;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;let n=t.length-Yw;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};V9(tn.purgeSyncAll);Fd=tn});import WCe from"path";function e1(e,t,r=R9){if(Xw(r))return e1(e,t,{encoding:r});let o={timeout:r.timeout??F9},i=null,s=null,a=null;try{let c=Gt.attempt.realpathSync(e),u=!!c;e=c||e,[s,i]=Fd.get(e,r.tmpCreate||Fd.create,r.tmpPurge!==!1);let d=P9&&Zh(r.chown),f=Zh(r.mode);if(u&&(d||f)){let m=Gt.attempt.statSync(e);if(m){if(r={...r},d)r.chown={uid:m.uid,gid:m.gid};if(f)r.mode=m.mode}}if(!u){let m=WCe.dirname(e);Gt.attempt.mkdirSync(m,{mode:k9,recursive:!0})}if(a=Gt.retry.openSync(o)(s,"w",r.mode||Kw),r.tmpCreated)r.tmpCreated(s);if(Xw(t))Gt.retry.writeSync(o)(a,t,0,r.encoding||C9);else if(!Zh(t))Gt.retry.writeSync(o)(a,t,0,t.length,0);if(r.fsync!==!1)if(r.fsyncWait!==!1)Gt.retry.fsyncSync(o)(a);else Gt.attempt.fsync(a);if(Gt.retry.closeSync(o)(a),a=null,r.chown&&(r.chown.uid!==A9||r.chown.gid!==O9))Gt.attempt.chownSync(s,r.chown.uid,r.chown.gid);if(r.mode&&r.mode!==Kw)Gt.attempt.chmodSync(s,r.mode);try{Gt.retry.renameSync(o)(s,e)}catch(m){if(!I9(m))throw m;if(m.code!=="ENAMETOOLONG")throw m;Gt.retry.renameSync(o)(s,Fd.truncate(e))}i(),s=null}finally{if(a)Gt.attempt.closeSync(a);if(s)Fd.purge(s)}}var W9=O(()=>{Ww();Jw();T9();N9();H9()});var Id=g(function(J9){Object.defineProperty(J9,"__esModule",{value:!0});J9.regexpCode=J9.getEsmExportName=J9.getProperty=J9.safeStringify=J9.stringify=J9.strConcat=J9.addCodeArg=J9.str=J9._=J9.nil=J9._Code=J9.Name=J9.IDENTIFIER=J9._CodeOrName=void 0;class eg{}J9._CodeOrName=eg;J9.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class ll extends eg{constructor(e){super();if(!J9.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}J9.Name=ll;class Un extends eg{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof ll)t[r.str]=(t[r.str]||0)+1;return t},{})}}J9._Code=Un;J9.nil=new Un("");function K9(e,...t){let r=[e[0]],n=0;while(n<t.length)r1(r,t[n]),r.push(e[++n]);return new Un(r)}J9._=K9;var t1=new Un("+");function Y9(e,...t){let r=[Pd(e[0])],n=0;while(n<t.length)r.push(t1),r1(r,t[n]),r.push(t1,Pd(e[++n]));return KCe(r),new Un(r)}J9.str=Y9;function r1(e,t){if(t instanceof Un)e.push(...t._items);else if(t instanceof ll)e.push(t);else e.push(XCe(t))}J9.addCodeArg=r1;function KCe(e){let t=1;while(t<e.length-1){if(e[t]===t1){let r=YCe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function YCe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof ll||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof ll))return`"${e}${t.slice(1)}`;return}function JCe(e,t){return t.emptyStr()?e:e.emptyStr()?t:Y9`${e}${t}`}J9.strConcat=JCe;function XCe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Pd(Array.isArray(e)?e.join(","):e)}function ZCe(e){return new Un(Pd(e))}J9.stringify=ZCe;function Pd(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}J9.safeStringify=Pd;function QCe(e){return typeof e=="string"&&J9.IDENTIFIER.test(e)?new Un(`.${e}`):K9`[${e}]`}J9.getProperty=QCe;function eke(e){if(typeof e=="string"&&J9.IDENTIFIER.test(e))return new Un(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}J9.getEsmExportName=eke;function tke(e){return new Un(e.toString())}J9.regexpCode=tke});var s1=g(function(eM){Object.defineProperty(eM,"__esModule",{value:!0});eM.ValueScope=eM.ValueScopeName=eM.Scope=eM.varKinds=eM.UsedValueState=void 0;var Nr=Id();class Z9 extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var rg;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(rg||(eM.UsedValueState=rg={}));eM.varKinds={const:new Nr.Name("const"),let:new Nr.Name("let"),var:new Nr.Name("var")};class o1{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Nr.Name?e:this.name(e)}name(e){return new Nr.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}eM.Scope=o1;class i1 extends Nr.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=Nr._`.${new Nr.Name(t)}[${r}]`}}eM.ValueScopeName=i1;var mke=Nr._`\n`;class Q9 extends o1{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?mke:Nr.nil}}get(){return this._scope}name(e){return new i1(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,i=(r=t.key)!==null&&r!==void 0?r:t.ref,s=this._values[o];if(s){let u=s.get(i);if(u)return u}else s=this._values[o]=new Map;s.set(i,n);let a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return Nr._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let o=Nr.nil;for(let i in e){let s=e[i];if(!s)continue;let a=r[i]=r[i]||new Map;s.forEach((c)=>{if(a.has(c))return;a.set(c,rg.Started);let u=t(c);if(u){let d=this.opts.es5?eM.varKinds.var:eM.varKinds.const;o=Nr._`${o}${d} ${c} = ${u};${this.opts._n}`}else if(u=n===null||n===void 0?void 0:n(c))o=Nr._`${o}${u}${this.opts._n}`;else throw new Z9(c);a.set(c,rg.Completed)})}return o}}eM.ValueScope=Q9});var Ee=g(function(jr){Object.defineProperty(jr,"__esModule",{value:!0});jr.or=jr.and=jr.not=jr.CodeGen=jr.operators=jr.varKinds=jr.ValueScopeName=jr.ValueScope=jr.Scope=jr.Name=jr.regexpCode=jr.stringify=jr.getProperty=jr.nil=jr.strConcat=jr.str=jr._=void 0;var Le=Id(),zn=s1(),vs=Id();Object.defineProperty(jr,"_",{enumerable:!0,get:function(){return vs._}});Object.defineProperty(jr,"str",{enumerable:!0,get:function(){return vs.str}});Object.defineProperty(jr,"strConcat",{enumerable:!0,get:function(){return vs.strConcat}});Object.defineProperty(jr,"nil",{enumerable:!0,get:function(){return vs.nil}});Object.defineProperty(jr,"getProperty",{enumerable:!0,get:function(){return vs.getProperty}});Object.defineProperty(jr,"stringify",{enumerable:!0,get:function(){return vs.stringify}});Object.defineProperty(jr,"regexpCode",{enumerable:!0,get:function(){return vs.regexpCode}});Object.defineProperty(jr,"Name",{enumerable:!0,get:function(){return vs.Name}});var cg=s1();Object.defineProperty(jr,"Scope",{enumerable:!0,get:function(){return cg.Scope}});Object.defineProperty(jr,"ValueScope",{enumerable:!0,get:function(){return cg.ValueScope}});Object.defineProperty(jr,"ValueScopeName",{enumerable:!0,get:function(){return cg.ValueScopeName}});Object.defineProperty(jr,"varKinds",{enumerable:!0,get:function(){return cg.varKinds}});jr.operators={GT:new Le._Code(">"),GTE:new Le._Code(">="),LT:new Le._Code("<"),LTE:new Le._Code("<="),EQ:new Le._Code("==="),NEQ:new Le._Code("!=="),NOT:new Le._Code("!"),OR:new Le._Code("||"),AND:new Le._Code("&&"),ADD:new Le._Code("+")};class ws{optimizeNodes(){return this}optimizeNames(e,t){return this}}class rM extends ws{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?zn.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=dl(this.rhs,e,t);return this}get names(){return this.rhs instanceof Le._CodeOrName?this.rhs.names:{}}}class l1 extends ws{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Le.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=dl(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Le.Name?{}:{...this.lhs.names};return ag(e,this.rhs)}}class nM extends l1{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class oM extends ws{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class iM extends ws{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class sM extends ws{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class aM extends ws{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=dl(this.code,e,t),this}get names(){return this.code instanceof Le._CodeOrName?this.code.names:{}}}class lg extends ws{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let o=r[n];if(o.optimizeNames(e,t))continue;bke(e,o.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>ya(e,t.names),{})}}class Ds extends lg{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class cM extends lg{}class Td extends Ds{}Td.kind="else";class yi extends Ds{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new Td(r):r}if(t){if(e===!1)return t instanceof yi?t:t.nodes;if(this.nodes.length)return this;return new yi(pM(e),t instanceof yi?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=dl(this.condition,e,t),this}get names(){let e=super.names;if(ag(e,this.condition),this.else)ya(e,this.else.names);return e}}yi.kind="if";class ul extends Ds{}ul.kind="for";class lM extends ul{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=dl(this.iteration,e,t),this}get names(){return ya(super.names,this.iteration.names)}}class uM extends ul{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?zn.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=ag(super.names,this.from);return ag(e,this.to)}}class a1 extends ul{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=dl(this.iterable,e,t),this}get names(){return ya(super.names,this.iterable.names)}}class ng extends Ds{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}ng.kind="func";class og extends lg{render(e){return"return "+super.render(e)}}og.kind="return";class dM extends Ds{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)ya(e,this.catch.names);if(this.finally)ya(e,this.finally.names);return e}}class ig extends Ds{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}ig.kind="catch";class sg extends Ds{render(e){return"finally"+super.render(e)}}sg.kind="finally";class fM{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
84
+ `;return this.stop(),this.#i.write(u),this}}function D(e){return new mq(e)}var ld,YSe;var Mn=O(()=>{Xe();Qj();tq();aw();lq();dq();pq();ld=ye(ym(),1),YSe=ye(ym(),1)});var Ne,yq,W,ui=(e)=>{switch(typeof e){case"undefined":return W.undefined;case"string":return W.string;case"number":return Number.isNaN(e)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":if(Array.isArray(e))return W.array;if(e===null)return W.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return W.promise;if(typeof Map<"u"&&e instanceof Map)return W.map;if(typeof Set<"u"&&e instanceof Set)return W.set;if(typeof Date<"u"&&e instanceof Date)return W.date;return W.object;default:return W.unknown}};var ud=O(()=>{(function(e){e.assertEqual=(o)=>{};function t(o){}e.assertIs=t;function r(o){throw Error()}e.assertNever=r,e.arrayToEnum=(o)=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=(o)=>{let i=e.objectKeys(o).filter((a)=>typeof o[o[a]]!=="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=(o)=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys==="function"?(o)=>Object.keys(o):(o)=>{let i=[];for(let s in o)if(Object.prototype.hasOwnProperty.call(o,s))i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s;return},e.isInteger=typeof Number.isInteger==="function"?(o)=>Number.isInteger(o):(o)=>typeof o==="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map((s)=>typeof s==="string"?`'${s}'`:s).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>{if(typeof i==="bigint")return i.toString();return i}})(Ne||(Ne={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(yq||(yq={}));W=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var M,Zr;var Eh=O(()=>{ud();M=Ne.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"]);Zr=class Zr extends Error{get errors(){return this.issues}constructor(e){super();this.issues=[],this.addIssue=(r)=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,t);else this.__proto__=t;this.name="ZodError",this.issues=e}format(e){let t=e||function(o){return o.message},r={_errors:[]},n=(o)=>{for(let i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let s=r,a=0;while(a<i.path.length){let c=i.path[a];if(a!==i.path.length-1)s[c]=s[c]||{_errors:[]};else s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i));s=s[c],a++}}};return n(this),r}static assert(e){if(!(e instanceof Zr))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(t)=>t.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let o=n.path[0];t[o]=t[o]||[],t[o].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};Zr.create=(e)=>new Zr(e)});var JSe=(e,t)=>{let r;switch(e.code){case M.invalid_type:if(e.received===W.undefined)r="Required";else r=`Expected ${e.expected}, received ${e.received}`;break;case M.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ne.jsonStringifyReplacer)}`;break;case M.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(e.keys,", ")}`;break;case M.invalid_union:r="Invalid input";break;case M.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(e.options)}`;break;case M.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(e.options)}, received '${e.received}'`;break;case M.invalid_arguments:r="Invalid function arguments";break;case M.invalid_return_type:r="Invalid function return type";break;case M.invalid_date:r="Invalid date";break;case M.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(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}`}else if("startsWith"in e.validation)r=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)r=`Invalid input: must end with "${e.validation.endsWith}"`;else Ne.assertNever(e.validation);else if(e.validation!=="regex")r=`Invalid ${e.validation}`;else r="Invalid";break;case M.too_small:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="bigint")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(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))}`;else r="Invalid input";break;case M.too_big:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else r="Invalid input";break;case M.custom:r="Invalid input";break;case M.invalid_intersection_types:r="Intersection results could not be merged";break;case M.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case M.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ne.assertNever(e)}return{message:r}},ys;var fw=O(()=>{Eh();ud();ys=JSe});function dd(){return XSe}var XSe;var Sh=O(()=>{fw();XSe=ys});function G(e,t){let r=dd(),n=$h({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ys?void 0:ys].filter((o)=>!!o)});e.common.issues.push(n)}class ir{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,t){let r=[];for(let n of t){if(n.status==="aborted")return de;if(n.status==="dirty")e.dirty();r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let n of t){let o=await n.key,i=await n.value;r.push({key:o,value:i})}return ir.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:o,value:i}=n;if(o.status==="aborted")return de;if(i.status==="aborted")return de;if(o.status==="dirty")e.dirty();if(i.status==="dirty")e.dirty();if(o.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet))r[o.value]=i.value}return{status:e.value,value:r}}}var $h=(e)=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter((u)=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},de,Kc=(e)=>({status:"dirty",value:e}),br=(e)=>({status:"valid",value:e}),pw=(e)=>e.status==="aborted",mw=(e)=>e.status==="dirty",da=(e)=>e.status==="valid",fd=(e)=>typeof Promise<"u"&&e instanceof Promise;var hw=O(()=>{Sh();fw();de=Object.freeze({status:"aborted"})});var bq=()=>{};var ne;var xq=O(()=>{(function(e){e.errToObj=(t)=>typeof t==="string"?{message:t}:t||{},e.toString=(t)=>typeof t==="string"?t:t?.message})(ne||(ne={}))});class Ln{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function De(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(t)return{errorMap:t,description:o};return{errorMap:(s,a)=>{let{message:c}=e;if(s.code==="invalid_enum_value")return{message:c??a.defaultError};if(typeof a.data>"u")return{message:c??n??a.defaultError};if(s.code!=="invalid_type")return{message:a.defaultError};return{message:c??r??a.defaultError}},description:o}}class Fe{get description(){return this._def.description}_getType(e){return ui(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ui(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ir,ctx:{common:e.parent.common,data:e.data,parsedType:ui(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(fd(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ui(e)},n=this._parseSync({data:e,path:r.path,parent:r});return _q(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ui(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return da(r)?{value:r.value}:{issues:t.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((r)=>da(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ui(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(fd(n)?n:Promise.resolve(n));return _q(r,o)}refine(e,t){let r=(n)=>{if(typeof t==="string"||typeof t>"u")return{message:t};else if(typeof t==="function")return t(n);else return t};return this._refinement((n,o)=>{let i=e(n),s=()=>o.addIssue({code:M.custom,...r(n)});if(typeof Promise<"u"&&i instanceof Promise)return i.then((a)=>{if(!a)return s(),!1;else return!0});if(!i)return s(),!1;else return!0})}refinement(e,t){return this._refinement((r,n)=>{if(!e(r))return n.addIssue(typeof t==="function"?t(r,n):t),!1;else return!0})}_refinement(e){return new Co({schema:this,typeName:fe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:(t)=>this["~validate"](t)}}optional(){return $o.create(this,this._def)}nullable(){return bs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return So.create(this)}promise(){return Qc.create(this,this._def)}or(e){return yd.create([this,e],this._def)}and(e){return bd.create(this,e,this._def)}transform(e){return new Co({...De(this._def),schema:this,typeName:fe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e==="function"?e:()=>e;return new wd({...De(this._def),innerType:this,defaultValue:t,typeName:fe.ZodDefault})}brand(){return new xw({typeName:fe.ZodBranded,type:this,...De(this._def)})}catch(e){let t=typeof e==="function"?e:()=>e;return new Dd({...De(this._def),innerType:this,catchValue:t,typeName:fe.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return Ih.create(this,e)}readonly(){return Ed.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function wq(e){let t="[0-5]\\d";if(e.precision)t=`${t}\\.\\d{${e.precision}}`;else if(e.precision==null)t=`${t}(\\.\\d+)?`;let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function m$e(e){return new RegExp(`^${wq(e)}$`)}function h$e(e){let t=`${vq}T${wq(e)}`,r=[];if(r.push(e.local?"Z?":"Z"),e.offset)r.push("([+-]\\d{2}:?\\d{2})");return t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function g$e(e,t){if((t==="v4"||!t)&&a$e.test(e))return!0;if((t==="v6"||!t)&&l$e.test(e))return!0;return!1}function y$e(e,t){if(!n$e.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));if(typeof o!=="object"||o===null)return!1;if("typ"in o&&o?.typ!=="JWT")return!1;if(!o.alg)return!1;if(t&&o.alg!==t)return!1;return!0}catch{return!1}}function b$e(e,t){if((t==="v4"||!t)&&c$e.test(e))return!0;if((t==="v6"||!t)&&u$e.test(e))return!0;return!1}function x$e(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function Yc(e){if(e instanceof $t){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=$o.create(Yc(n))}return new $t({...e._def,shape:()=>t})}else if(e instanceof So)return new So({...e._def,type:Yc(e.element)});else if(e instanceof $o)return $o.create(Yc(e.unwrap()));else if(e instanceof bs)return bs.create(Yc(e.unwrap()));else if(e instanceof mi)return mi.create(e.items.map((t)=>Yc(t)));else return e}function yw(e,t){let r=ui(e),n=ui(t);if(e===t)return{valid:!0,data:e};else if(r===W.object&&n===W.object){let o=Ne.objectKeys(t),i=Ne.objectKeys(e).filter((a)=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=yw(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===W.array&&n===W.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=yw(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else if(r===W.date&&n===W.date&&+e===+t)return{valid:!0,data:e};else return{valid:!1}}function Dq(e,t){return new pa({values:e,typeName:fe.ZodEnum,...De(t)})}var _q=(e,t)=>{if(da(t))return{success:!0,data:t.value};else{if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Zr(e.common.issues);return this._error=r,this._error}}}},ZSe,QSe,e$e,t$e,r$e,n$e,o$e,i$e,s$e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gw,a$e,c$e,l$e,u$e,d$e,f$e,vq="((\\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])))",p$e,fi,Jc,Xc,Ch,md,kh,hd,gd,Rh,fa,pi,Ah,So,$t,yd,di=(e)=>{if(e instanceof xd)return di(e.schema);else if(e instanceof Co)return di(e.innerType());else if(e instanceof _d)return[e.value];else if(e instanceof pa)return e.options;else if(e instanceof vd)return Ne.objectValues(e.enum);else if(e instanceof wd)return di(e._def.innerType);else if(e instanceof hd)return[void 0];else if(e instanceof gd)return[null];else if(e instanceof $o)return[void 0,...di(e.unwrap())];else if(e instanceof bs)return[null,...di(e.unwrap())];else if(e instanceof xw)return di(e.unwrap());else if(e instanceof Ed)return di(e.unwrap());else if(e instanceof Dd)return di(e._def.innerType);else return[]},bw,bd,mi,Oh,Fh,Zc,pd,xd,_d,pa,vd,Qc,Co,$o,bs,wd,Dd,Ph,Mst,xw,Ih,Ed,Lst,fe,w,k,Bst,Ust,be,zst,Vst,Gst,Hst,Wst,Sd,Kst,Yst,te,U,Jst,el,_w,Xst,Zst,ma,Qst,eat,tat,rat,ze,Ze,nat,oat,iat,sat,aat,cat,lat;var Eq=O(()=>{Eh();Sh();xq();hw();ud();ZSe=/^c[^\s-]{8,}$/i,QSe=/^[0-9a-z]+$/,e$e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,t$e=/^[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,r$e=/^[a-z0-9_-]{21}$/i,n$e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,o$e=/^[-+]?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)?)??$/,i$e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,a$e=/^(?:(?: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])$/,c$e=/^(?:(?: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])$/,l$e=/^(([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]))$/,u$e=/^(([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])$/,d$e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,f$e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,p$e=new RegExp(`^${vq}$`);fi=class fi extends Fe{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==W.string){let o=this._getOrReturnCtx(e);return G(o,{code:M.invalid_type,expected:W.string,received:o.parsedType}),de}let r=new ir,n=void 0;for(let o of this._def.checks)if(o.kind==="min"){if(e.data.length<o.value)n=this._getOrReturnCtx(e,n),G(n,{code:M.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty()}else if(o.kind==="max"){if(e.data.length>o.value)n=this._getOrReturnCtx(e,n),G(n,{code:M.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty()}else if(o.kind==="length"){let i=e.data.length>o.value,s=e.data.length<o.value;if(i||s){if(n=this._getOrReturnCtx(e,n),i)G(n,{code:M.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message});else if(s)G(n,{code:M.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message});r.dirty()}}else if(o.kind==="email"){if(!i$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"email",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="emoji"){if(!gw)gw=new RegExp(s$e,"u");if(!gw.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"emoji",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="uuid"){if(!t$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"uuid",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="nanoid"){if(!r$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"nanoid",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="cuid"){if(!ZSe.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"cuid",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="cuid2"){if(!QSe.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"cuid2",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="ulid"){if(!e$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"ulid",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),G(n,{validation:"url",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="regex"){if(o.regex.lastIndex=0,!o.regex.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"regex",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="trim")e.data=e.data.trim();else if(o.kind==="includes"){if(!e.data.includes(o.value,o.position))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()}else if(o.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(o.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(o.kind==="startsWith"){if(!e.data.startsWith(o.value))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()}else if(o.kind==="endsWith"){if(!e.data.endsWith(o.value))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()}else if(o.kind==="datetime"){if(!h$e(o).test(e.data))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:"datetime",message:o.message}),r.dirty()}else if(o.kind==="date"){if(!p$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:"date",message:o.message}),r.dirty()}else if(o.kind==="time"){if(!m$e(o).test(e.data))n=this._getOrReturnCtx(e,n),G(n,{code:M.invalid_string,validation:"time",message:o.message}),r.dirty()}else if(o.kind==="duration"){if(!o$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"duration",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="ip"){if(!g$e(e.data,o.version))n=this._getOrReturnCtx(e,n),G(n,{validation:"ip",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="jwt"){if(!y$e(e.data,o.alg))n=this._getOrReturnCtx(e,n),G(n,{validation:"jwt",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="cidr"){if(!b$e(e.data,o.version))n=this._getOrReturnCtx(e,n),G(n,{validation:"cidr",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="base64"){if(!d$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"base64",code:M.invalid_string,message:o.message}),r.dirty()}else if(o.kind==="base64url"){if(!f$e.test(e.data))n=this._getOrReturnCtx(e,n),G(n,{validation:"base64url",code:M.invalid_string,message:o.message}),r.dirty()}else Ne.assertNever(o);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement((n)=>e.test(n),{validation:t,code:M.invalid_string,...ne.errToObj(r)})}_addCheck(e){return new fi({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ne.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ne.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ne.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ne.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ne.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ne.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ne.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ne.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ne.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ne.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ne.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ne.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ne.errToObj(e)})}datetime(e){if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ne.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ne.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ne.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...ne.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...ne.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...ne.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...ne.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...ne.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...ne.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...ne.errToObj(t)})}nonempty(e){return this.min(1,ne.errToObj(e))}trim(){return new fi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new fi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new fi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find((e)=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find((e)=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxLength(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};fi.create=(e)=>new fi({checks:[],typeName:fe.ZodString,coerce:e?.coerce??!1,...De(e)});Jc=class Jc extends Fe{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==W.number){let o=this._getOrReturnCtx(e);return G(o,{code:M.invalid_type,expected:W.number,received:o.parsedType}),de}let r=void 0,n=new ir;for(let o of this._def.checks)if(o.kind==="int"){if(!Ne.isInteger(e.data))r=this._getOrReturnCtx(e,r),G(r,{code:M.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()}else if(o.kind==="min"){if(o.inclusive?e.data<o.value:e.data<=o.value)r=this._getOrReturnCtx(e,r),G(r,{code:M.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()}else if(o.kind==="max"){if(o.inclusive?e.data>o.value:e.data>=o.value)r=this._getOrReturnCtx(e,r),G(r,{code:M.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()}else if(o.kind==="multipleOf"){if(x$e(e.data,o.value)!==0)r=this._getOrReturnCtx(e,r),G(r,{code:M.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()}else if(o.kind==="finite"){if(!Number.isFinite(e.data))r=this._getOrReturnCtx(e,r),G(r,{code:M.not_finite,message:o.message}),n.dirty()}else Ne.assertNever(o);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,ne.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ne.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ne.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ne.toString(t))}setLimit(e,t,r,n){return new Jc({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:ne.toString(n)}]})}_addCheck(e){return new Jc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ne.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ne.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ne.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ne.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ne.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ne.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:ne.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ne.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ne.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&Ne.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;else if(r.kind==="min"){if(t===null||r.value>t)t=r.value}else if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return Number.isFinite(t)&&Number.isFinite(e)}};Jc.create=(e)=>new Jc({checks:[],typeName:fe.ZodNumber,coerce:e?.coerce||!1,...De(e)});Xc=class Xc extends Fe{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==W.bigint)return this._getInvalidInput(e);let r=void 0,n=new ir;for(let o of this._def.checks)if(o.kind==="min"){if(o.inclusive?e.data<o.value:e.data<=o.value)r=this._getOrReturnCtx(e,r),G(r,{code:M.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()}else if(o.kind==="max"){if(o.inclusive?e.data>o.value:e.data>=o.value)r=this._getOrReturnCtx(e,r),G(r,{code:M.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()}else if(o.kind==="multipleOf"){if(e.data%o.value!==BigInt(0))r=this._getOrReturnCtx(e,r),G(r,{code:M.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()}else Ne.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return G(t,{code:M.invalid_type,expected:W.bigint,received:t.parsedType}),de}gte(e,t){return this.setLimit("min",e,!0,ne.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ne.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ne.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ne.toString(t))}setLimit(e,t,r,n){return new Xc({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:ne.toString(n)}]})}_addCheck(e){return new Xc({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ne.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ne.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ne.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ne.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ne.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};Xc.create=(e)=>new Xc({checks:[],typeName:fe.ZodBigInt,coerce:e?.coerce??!1,...De(e)});Ch=class Ch extends Fe{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==W.boolean){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.boolean,received:r.parsedType}),de}return br(e.data)}};Ch.create=(e)=>new Ch({typeName:fe.ZodBoolean,coerce:e?.coerce||!1,...De(e)});md=class md extends Fe{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==W.date){let o=this._getOrReturnCtx(e);return G(o,{code:M.invalid_type,expected:W.date,received:o.parsedType}),de}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return G(o,{code:M.invalid_date}),de}let r=new ir,n=void 0;for(let o of this._def.checks)if(o.kind==="min"){if(e.data.getTime()<o.value)n=this._getOrReturnCtx(e,n),G(n,{code:M.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()}else if(o.kind==="max"){if(e.data.getTime()>o.value)n=this._getOrReturnCtx(e,n),G(n,{code:M.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()}else Ne.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new md({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ne.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ne.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e!=null?new Date(e):null}};md.create=(e)=>new md({checks:[],coerce:e?.coerce||!1,typeName:fe.ZodDate,...De(e)});kh=class kh extends Fe{_parse(e){if(this._getType(e)!==W.symbol){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.symbol,received:r.parsedType}),de}return br(e.data)}};kh.create=(e)=>new kh({typeName:fe.ZodSymbol,...De(e)});hd=class hd extends Fe{_parse(e){if(this._getType(e)!==W.undefined){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.undefined,received:r.parsedType}),de}return br(e.data)}};hd.create=(e)=>new hd({typeName:fe.ZodUndefined,...De(e)});gd=class gd extends Fe{_parse(e){if(this._getType(e)!==W.null){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.null,received:r.parsedType}),de}return br(e.data)}};gd.create=(e)=>new gd({typeName:fe.ZodNull,...De(e)});Rh=class Rh extends Fe{constructor(){super(...arguments);this._any=!0}_parse(e){return br(e.data)}};Rh.create=(e)=>new Rh({typeName:fe.ZodAny,...De(e)});fa=class fa extends Fe{constructor(){super(...arguments);this._unknown=!0}_parse(e){return br(e.data)}};fa.create=(e)=>new fa({typeName:fe.ZodUnknown,...De(e)});pi=class pi extends Fe{_parse(e){let t=this._getOrReturnCtx(e);return G(t,{code:M.invalid_type,expected:W.never,received:t.parsedType}),de}};pi.create=(e)=>new pi({typeName:fe.ZodNever,...De(e)});Ah=class Ah extends Fe{_parse(e){if(this._getType(e)!==W.undefined){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.void,received:r.parsedType}),de}return br(e.data)}};Ah.create=(e)=>new Ah({typeName:fe.ZodVoid,...De(e)});So=class So extends Fe{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==W.array)return G(t,{code:M.invalid_type,expected:W.array,received:t.parsedType}),de;if(n.exactLength!==null){let i=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;if(i||s)G(t,{code:i?M.too_big:M.too_small,minimum:s?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty()}if(n.minLength!==null){if(t.data.length<n.minLength.value)G(t,{code:M.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()}if(n.maxLength!==null){if(t.data.length>n.maxLength.value)G(t,{code:M.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()}if(t.common.async)return Promise.all([...t.data].map((i,s)=>n.type._parseAsync(new Ln(t,i,t.path,s)))).then((i)=>ir.mergeArray(r,i));let o=[...t.data].map((i,s)=>n.type._parseSync(new Ln(t,i,t.path,s)));return ir.mergeArray(r,o)}get element(){return this._def.type}min(e,t){return new So({...this._def,minLength:{value:e,message:ne.toString(t)}})}max(e,t){return new So({...this._def,maxLength:{value:e,message:ne.toString(t)}})}length(e,t){return new So({...this._def,exactLength:{value:e,message:ne.toString(t)}})}nonempty(e){return this.min(1,e)}};So.create=(e,t)=>new So({type:e,minLength:null,maxLength:null,exactLength:null,typeName:fe.ZodArray,...De(t)});$t=class $t extends Fe{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Ne.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==W.object){let c=this._getOrReturnCtx(e);return G(c,{code:M.invalid_type,expected:W.object,received:c.parsedType}),de}let{status:r,ctx:n}=this._processInputParams(e),{shape:o,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof pi&&this._def.unknownKeys==="strip")){for(let c in n.data)if(!i.includes(c))s.push(c)}let a=[];for(let c of i){let u=o[c],d=n.data[c];a.push({key:{status:"valid",value:c},value:u._parse(new Ln(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof pi){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of s)a.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict"){if(s.length>0)G(n,{code:M.unrecognized_keys,keys:s}),r.dirty()}else if(c==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of s){let d=n.data[u];a.push({key:{status:"valid",value:u},value:c._parse(new Ln(n,d,n.path,u)),alwaysSet:u in n.data})}}if(n.common.async)return Promise.resolve().then(async()=>{let c=[];for(let u of a){let d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then((c)=>ir.mergeObjectSync(r,c));else return ir.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return ne.errToObj,new $t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;if(t.code==="unrecognized_keys")return{message:ne.errToObj(e).message??n};return{message:n}}}:{}})}strip(){return new $t({...this._def,unknownKeys:"strip"})}passthrough(){return new $t({...this._def,unknownKeys:"passthrough"})}extend(e){return new $t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new $t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:fe.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new $t({...this._def,catchall:e})}pick(e){let t={};for(let r of Ne.objectKeys(e))if(e[r]&&this.shape[r])t[r]=this.shape[r];return new $t({...this._def,shape:()=>t})}omit(e){let t={};for(let r of Ne.objectKeys(this.shape))if(!e[r])t[r]=this.shape[r];return new $t({...this._def,shape:()=>t})}deepPartial(){return Yc(this)}partial(e){let t={};for(let r of Ne.objectKeys(this.shape)){let n=this.shape[r];if(e&&!e[r])t[r]=n;else t[r]=n.optional()}return new $t({...this._def,shape:()=>t})}required(e){let t={};for(let r of Ne.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let o=this.shape[r];while(o instanceof $o)o=o._def.innerType;t[r]=o}return new $t({...this._def,shape:()=>t})}keyof(){return Dq(Ne.objectKeys(this.shape))}};$t.create=(e,t)=>new $t({shape:()=>e,unknownKeys:"strip",catchall:pi.create(),typeName:fe.ZodObject,...De(t)});$t.strictCreate=(e,t)=>new $t({shape:()=>e,unknownKeys:"strict",catchall:pi.create(),typeName:fe.ZodObject,...De(t)});$t.lazycreate=(e,t)=>new $t({shape:e,unknownKeys:"strip",catchall:pi.create(),typeName:fe.ZodObject,...De(t)});yd=class yd extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;let i=o.map((s)=>new Zr(s.ctx.common.issues));return G(t,{code:M.invalid_union,unionErrors:i}),de}if(t.common.async)return Promise.all(r.map(async(o)=>{let i={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);else{let o=void 0,i=[];for(let a of r){let c={...t,common:{...t.common,issues:[]},parent:null},u=a._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;else if(u.status==="dirty"&&!o)o={result:u,ctx:c};if(c.common.issues.length)i.push(c.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;let s=i.map((a)=>new Zr(a));return G(t,{code:M.invalid_union,unionErrors:s}),de}}get options(){return this._def.options}};yd.create=(e,t)=>new yd({options:e,typeName:fe.ZodUnion,...De(t)});bw=class bw extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.object)return G(t,{code:M.invalid_type,expected:W.object,received:t.parsedType}),de;let r=this.discriminator,n=t.data[r],o=this.optionsMap.get(n);if(!o)return G(t,{code:M.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),de;if(t.common.async)return o._parseAsync({data:t.data,path:t.path,parent:t});else return o._parseSync({data:t.data,path:t.path,parent:t})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let o of t){let i=di(o.shape[e]);if(!i.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of i){if(n.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);n.set(s,o)}}return new bw({typeName:fe.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...De(r)})}};bd=class bd extends Fe{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(o,i)=>{if(pw(o)||pw(i))return de;let s=yw(o.value,i.value);if(!s.valid)return G(r,{code:M.invalid_intersection_types}),de;if(mw(o)||mw(i))t.dirty();return{status:t.value,value:s.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,i])=>n(o,i));else return n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};bd.create=(e,t,r)=>new bd({left:e,right:t,typeName:fe.ZodIntersection,...De(r)});mi=class mi extends Fe{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.array)return G(r,{code:M.invalid_type,expected:W.array,received:r.parsedType}),de;if(r.data.length<this._def.items.length)return G(r,{code:M.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),de;if(!this._def.rest&&r.data.length>this._def.items.length)G(r,{code:M.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty();let o=[...r.data].map((i,s)=>{let a=this._def.items[s]||this._def.rest;if(!a)return null;return a._parse(new Ln(r,i,r.path,s))}).filter((i)=>!!i);if(r.common.async)return Promise.all(o).then((i)=>ir.mergeArray(t,i));else return ir.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new mi({...this._def,rest:e})}};mi.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new mi({items:e,typeName:fe.ZodTuple,rest:null,...De(t)})};Oh=class Oh extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.object)return G(r,{code:M.invalid_type,expected:W.object,received:r.parsedType}),de;let n=[],o=this._def.keyType,i=this._def.valueType;for(let s in r.data)n.push({key:o._parse(new Ln(r,s,r.path,s)),value:i._parse(new Ln(r,r.data[s],r.path,s)),alwaysSet:s in r.data});if(r.common.async)return ir.mergeObjectAsync(t,n);else return ir.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){if(t instanceof Fe)return new Oh({keyType:e,valueType:t,typeName:fe.ZodRecord,...De(r)});return new Oh({keyType:fi.create(),valueType:e,typeName:fe.ZodRecord,...De(t)})}};Fh=class Fh extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.map)return G(r,{code:M.invalid_type,expected:W.map,received:r.parsedType}),de;let n=this._def.keyType,o=this._def.valueType,i=[...r.data.entries()].map(([s,a],c)=>({key:n._parse(new Ln(r,s,r.path,[c,"key"])),value:o._parse(new Ln(r,a,r.path,[c,"value"]))}));if(r.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let a of i){let c=await a.key,u=await a.value;if(c.status==="aborted"||u.status==="aborted")return de;if(c.status==="dirty"||u.status==="dirty")t.dirty();s.set(c.value,u.value)}return{status:t.value,value:s}})}else{let s=new Map;for(let a of i){let{key:c,value:u}=a;if(c.status==="aborted"||u.status==="aborted")return de;if(c.status==="dirty"||u.status==="dirty")t.dirty();s.set(c.value,u.value)}return{status:t.value,value:s}}}};Fh.create=(e,t,r)=>new Fh({valueType:t,keyType:e,typeName:fe.ZodMap,...De(r)});Zc=class Zc extends Fe{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.set)return G(r,{code:M.invalid_type,expected:W.set,received:r.parsedType}),de;let n=this._def;if(n.minSize!==null){if(r.data.size<n.minSize.value)G(r,{code:M.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()}if(n.maxSize!==null){if(r.data.size>n.maxSize.value)G(r,{code:M.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty()}let o=this._def.valueType;function i(a){let c=new Set;for(let u of a){if(u.status==="aborted")return de;if(u.status==="dirty")t.dirty();c.add(u.value)}return{status:t.value,value:c}}let s=[...r.data.values()].map((a,c)=>o._parse(new Ln(r,a,r.path,c)));if(r.common.async)return Promise.all(s).then((a)=>i(a));else return i(s)}min(e,t){return new Zc({...this._def,minSize:{value:e,message:ne.toString(t)}})}max(e,t){return new Zc({...this._def,maxSize:{value:e,message:ne.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Zc.create=(e,t)=>new Zc({valueType:e,minSize:null,maxSize:null,typeName:fe.ZodSet,...De(t)});pd=class pd extends Fe{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.function)return G(t,{code:M.invalid_type,expected:W.function,received:t.parsedType}),de;function r(s,a){return $h({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,dd(),ys].filter((c)=>!!c),issueData:{code:M.invalid_arguments,argumentsError:a}})}function n(s,a){return $h({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,dd(),ys].filter((c)=>!!c),issueData:{code:M.invalid_return_type,returnTypeError:a}})}let o={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Qc){let s=this;return br(async function(...a){let c=new Zr([]),u=await s._def.args.parseAsync(a,o).catch((m)=>{throw c.addIssue(r(a,m)),c}),d=await Reflect.apply(i,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch((m)=>{throw c.addIssue(n(d,m)),c})})}else{let s=this;return br(function(...a){let c=s._def.args.safeParse(a,o);if(!c.success)throw new Zr([r(a,c.error)]);let u=Reflect.apply(i,this,c.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new Zr([n(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new pd({...this._def,args:mi.create(e).rest(fa.create())})}returns(e){return new pd({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new pd({args:e?e:mi.create([]).rest(fa.create()),returns:t||fa.create(),typeName:fe.ZodFunction,...De(r)})}};xd=class xd extends Fe{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};xd.create=(e,t)=>new xd({getter:e,typeName:fe.ZodLazy,...De(t)});_d=class _d extends Fe{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return G(t,{received:t.data,code:M.invalid_literal,expected:this._def.value}),de}return{status:"valid",value:e.data}}get value(){return this._def.value}};_d.create=(e,t)=>new _d({value:e,typeName:fe.ZodLiteral,...De(t)});pa=class pa extends Fe{_parse(e){if(typeof e.data!=="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return G(t,{expected:Ne.joinValues(r),received:t.parsedType,code:M.invalid_type}),de}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return G(t,{received:t.data,code:M.invalid_enum_value,options:r}),de}return br(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return pa.create(e,{...this._def,...t})}exclude(e,t=this._def){return pa.create(this.options.filter((r)=>!e.includes(r)),{...this._def,...t})}};pa.create=Dq;vd=class vd extends Fe{_parse(e){let t=Ne.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==W.string&&r.parsedType!==W.number){let n=Ne.objectValues(t);return G(r,{expected:Ne.joinValues(n),received:r.parsedType,code:M.invalid_type}),de}if(!this._cache)this._cache=new Set(Ne.getValidEnumValues(this._def.values));if(!this._cache.has(e.data)){let n=Ne.objectValues(t);return G(r,{received:r.data,code:M.invalid_enum_value,options:n}),de}return br(e.data)}get enum(){return this._def.values}};vd.create=(e,t)=>new vd({values:e,typeName:fe.ZodNativeEnum,...De(t)});Qc=class Qc extends Fe{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==W.promise&&t.common.async===!1)return G(t,{code:M.invalid_type,expected:W.promise,received:t.parsedType}),de;let r=t.parsedType===W.promise?t.data:Promise.resolve(t.data);return br(r.then((n)=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Qc.create=(e,t)=>new Qc({type:e,typeName:fe.ZodPromise,...De(t)});Co=class Co extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:(i)=>{if(G(r,i),i.fatal)t.abort();else t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){let i=n.transform(r.data,o);if(r.common.async)return Promise.resolve(i).then(async(s)=>{if(t.value==="aborted")return de;let a=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});if(a.status==="aborted")return de;if(a.status==="dirty")return Kc(a.value);if(t.value==="dirty")return Kc(a.value);return a});else{if(t.value==="aborted")return de;let s=this._def.schema._parseSync({data:i,path:r.path,parent:r});if(s.status==="aborted")return de;if(s.status==="dirty")return Kc(s.value);if(t.value==="dirty")return Kc(s.value);return s}}if(n.type==="refinement"){let i=(s)=>{let a=n.refinement(s,o);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(s.status==="aborted")return de;if(s.status==="dirty")t.dirty();return i(s.value),{status:t.value,value:s.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((s)=>{if(s.status==="aborted")return de;if(s.status==="dirty")t.dirty();return i(s.value).then(()=>({status:t.value,value:s.value}))})}if(n.type==="transform")if(r.common.async===!1){let i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!da(i))return de;let s=n.transform(i.value,o);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((i)=>{if(!da(i))return de;return Promise.resolve(n.transform(i.value,o)).then((s)=>({status:t.value,value:s}))});Ne.assertNever(n)}};Co.create=(e,t,r)=>new Co({schema:e,typeName:fe.ZodEffects,effect:t,...De(r)});Co.createWithPreprocess=(e,t,r)=>new Co({schema:t,effect:{type:"preprocess",transform:e},typeName:fe.ZodEffects,...De(r)});$o=class $o extends Fe{_parse(e){if(this._getType(e)===W.undefined)return br(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$o.create=(e,t)=>new $o({innerType:e,typeName:fe.ZodOptional,...De(t)});bs=class bs extends Fe{_parse(e){if(this._getType(e)===W.null)return br(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};bs.create=(e,t)=>new bs({innerType:e,typeName:fe.ZodNullable,...De(t)});wd=class wd extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;if(t.parsedType===W.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};wd.create=(e,t)=>new wd({innerType:e,typeName:fe.ZodDefault,defaultValue:typeof t.default==="function"?t.default:()=>t.default,...De(t)});Dd=class Dd extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(fd(n))return n.then((o)=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zr(r.common.issues)},input:r.data})}));else return{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Zr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Dd.create=(e,t)=>new Dd({innerType:e,typeName:fe.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:()=>t.catch,...De(t)});Ph=class Ph extends Fe{_parse(e){if(this._getType(e)!==W.nan){let r=this._getOrReturnCtx(e);return G(r,{code:M.invalid_type,expected:W.nan,received:r.parsedType}),de}return{status:"valid",value:e.data}}};Ph.create=(e)=>new Ph({typeName:fe.ZodNaN,...De(e)});Mst=Symbol("zod_brand");xw=class xw extends Fe{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}};Ih=class Ih extends Fe{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(o.status==="aborted")return de;if(o.status==="dirty")return t.dirty(),Kc(o.value);else return this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();else{let n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(n.status==="aborted")return de;if(n.status==="dirty")return t.dirty(),{status:"dirty",value:n.value};else return this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new Ih({in:e,out:t,typeName:fe.ZodPipeline})}};Ed=class Ed extends Fe{_parse(e){let t=this._def.innerType._parse(e),r=(n)=>{if(da(n))n.value=Object.freeze(n.value);return n};return fd(t)?t.then((n)=>r(n)):r(t)}unwrap(){return this._def.innerType}};Ed.create=(e,t)=>new Ed({innerType:e,typeName:fe.ZodReadonly,...De(t)});Lst={object:$t.lazycreate};(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"})(fe||(fe={}));w=fi.create,k=Jc.create,Bst=Ph.create,Ust=Xc.create,be=Ch.create,zst=md.create,Vst=kh.create,Gst=hd.create,Hst=gd.create,Wst=Rh.create,Sd=fa.create,Kst=pi.create,Yst=Ah.create,te=So.create,U=$t.create,Jst=$t.strictCreate,el=yd.create,_w=bw.create,Xst=bd.create,Zst=mi.create,ma=Oh.create,Qst=Fh.create,eat=Zc.create,tat=pd.create,rat=xd.create,ze=_d.create,Ze=pa.create,nat=vd.create,oat=Qc.create,iat=Co.create,sat=$o.create,aat=bs.create,cat=Co.createWithPreprocess,lat=Ih.create});var vw=O(()=>{Sh();hw();bq();ud();Eq();Eh()});var en=O(()=>{vw();vw()});function w$e(e){return e.startsWith("v")?e:`v${e}`}var _$e,v$e,Sq,_at;var ww=O(()=>{en();_$e=/^v?\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/,v$e=/^v\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/;Sq=w().regex(_$e,"must be a semver version, optionally v-prefixed").transform(w$e),_at=w().regex(v$e,"must be the canonical v-prefixed tag (vX.Y.Z)")});function Dw(e){return Th.includes(e)}var D$e,$d,Th,$q,E$e,Cq,S$e,kq,$$e,C$e,Rq,k$e,Aq,Dat,Eat,Oq,R$e,Fq,A$e,Pq,Ew=20,Sw=500,O$e,Sat;var Cd=O(()=>{en();D$e=Ze(["pending","verified","approved","revoked"]),$d=Ze(["person","service","test"]),Th=$d.options;$q={nemarOwner:"service",nemarAdmin:"service","test-admin":"service","test-owner":"service","cool-vibers":"test","test-user":"test","test-pending":"test","test-verified":"test","test-revoked":"test"},E$e=Ze(["same_kind","orcid_linked","own_account","kind_changed_concurrently"]),Cq=E$e.options,S$e=Ze(["active","pending","revoked"]),kq=U({field:w(),blocks:te(w()).optional(),set_on:te(w()).optional()}).passthrough(),$$e=U({id:k().int(),username:w().nullable(),email:w(),github_username:w().nullable(),role:w(),orcid:w().nullable().optional(),created_at:w().optional(),approved_at:w().nullable().optional(),dataset_count:k().int().optional(),sandbox_completed:be().optional(),sandbox_completed_at:w().nullable().optional(),sandbox_dataset_id:w().nullable().optional(),service_access:be().optional(),status:D$e.optional(),email_verified:be().optional(),orcid_verified:be().optional(),given_name:w().nullable().optional(),family_name:w().nullable().optional(),profile_gaps:te(kq).optional(),username_auto_assigned:be().optional(),account_kind:$d.optional()}).passthrough(),C$e=U({prefix:w(),created_at:w(),last_used_at:w().nullable()}).passthrough().nullable(),Rq=U({user:$$e,token:C$e.optional()}).passthrough(),k$e=U({id:k().int(),username:w().nullable(),email:w(),github_username:w().nullable(),status:w(),email_verified:k().int().nullable().optional(),role:w().nullable(),created_at:w(),approved_at:w().nullable().optional(),revoked_at:w().nullable().optional(),signup_source:w().nullable().optional(),service_access:k().int().nullable().optional(),service_access_granted_at:w().nullable().optional(),given_name:w().nullable().optional(),family_name:w().nullable().optional(),orcid:w().nullable().optional(),upload_access_requested_at:w().nullable().optional(),account_kind:$d.optional()}).passthrough(),Aq=U({users:te(k$e),count:k().int()}).passthrough(),Dat=Ze(["assigned","would_assign","single_name","no_name","lookup_failed","conflict","exhausted","write_failed"]),Eat=Ze(["sent","already_verified","skipped_fence","rate_limited","failed","not_attempted"]),Oq=U({suggestion:w().nullable(),based_on:Ze(["name","unavailable","exhausted"])}).passthrough(),R$e=Ze(["why_required","email_not_verified","profile_incomplete","github_username_unverified","github_unavailable","already_approved"]),Fq=R$e.options,A$e=Ze(["invalid_github_username","city_required","country_required","empty_patch","username_too_short","username_too_long","username_charset","given_name_required","family_name_required","username_taken","username_locked","name_is_orcid_canonical","account_revoked","github_unavailable","same_email","code_expired","code_incorrect","orcid_already_have","orcid_unavailable"]),Pq=A$e.options,O$e=U({id:k().int(),email:w(),username:w().nullable(),role:w(),status:S$e,email_verified:be(),given_name:w().nullable(),family_name:w().nullable(),orcid:w().nullable(),orcid_verified:be(),github_username:w().nullable(),city:w().nullable(),country:w().nullable(),affiliation:w().nullable(),service_access:be(),service_access_granted_at:w().nullable(),upload_access_requested_at:w().nullable(),profile_gaps:te(kq),username_auto_assigned:be()}).passthrough(),Sat=U({user:O$e.nullable()}).passthrough()});function Tq(e,t){if(e.zarr_index_url!=null&&e.zarr_status!=="ready")t.addIssue({code:M.custom,message:"zarr_index_url must be null/absent unless zarr_status is 'ready'",path:["zarr_index_url"]})}function Nq(e,t){if(e.zarr_verified_at!=null&&e.zarr_verify_status==null)t.addIssue({code:M.custom,message:"zarr_verified_at must be null/absent unless zarr_verify_status is non-null",path:["zarr_verified_at"]})}var F$e="0.4.0",$w,tl,Iq,P$e,I$e,T$e,jq,Rat,qq,Aat,hi,N$e,Nh,Oat;var Cw=O(()=>{en();ww();$w=Ze(["openneuro","nemar","gin","other"]),tl=el([ze(0),ze(1)]).nullable(),Iq=U({dataset_id:w(),id:w().optional(),name:w(),description:w().nullable().optional(),status:w(),visibility:w(),anonymous:k().int().nullable().optional(),concept_doi:w().nullable().optional(),doi:w().nullable().optional(),created_at:w(),updated_at:w().optional(),first_published_at:w().nullable().optional(),owner_username:w().nullable().optional(),source:w().nullable().optional(),modalities:w().optional(),participants:k().int().nonnegative(),tasks:w().optional(),authors:w().optional(),license:w().optional(),file_size:k().nonnegative(),file_size_formatted:w().optional(),total_files:k().nonnegative().nullable().optional(),num_citations:k().int().nonnegative().optional(),n_channels:k().int().nullable().optional(),electrode_system:w().nullable().optional(),has_hed:tl.optional(),hed_version:w().nullable().optional(),data_complete:tl.optional(),bytes_present:k().nonnegative().nullable().optional(),latest_version:Sq.nullable().optional(),subject_count:k().int().nullable().optional(),file_size_bytes:k().nullable().optional(),sessions_count:k().int().nullable().optional(),age_min:k().nullable().optional(),age_max:k().nullable().optional(),bids_version:w().nullable().optional(),zarr_status:Ze(["pending","ready","failed"]).nullable().optional(),zarr_store_count:k().int().nullable().optional(),zarr_converted_at:w().nullable().optional(),zarr_source_commit:w().nullable().optional(),zarr_errors:k().int().nullable().optional(),zarr_failure_count:k().int().nullable().optional(),zarr_deterministic:tl.optional(),zarr_failed_at:w().nullable().optional(),zarr_index_url:w().nullable().optional(),zarr_verify_status:Ze(["verified","failed","unverifiable"]).nullable().optional(),zarr_verified_at:w().nullable().optional(),zarr_requeue_at:w().nullable().optional(),anonymity_status:Ze(["verified","findings","unverifiable"]).nullable().optional(),anonymity_checked_at:w().nullable().optional(),anonymity_findings:w().nullable().optional(),anonymity_unchecked:w().nullable().optional(),total_recording_duration:k().nullable().optional(),recording_duration_min:k().nullable().optional(),recording_duration_max:k().nullable().optional(),recording_count:k().int().nullable().optional(),recordings_unavailable:k().int().nullable().optional(),channel_count_min:k().int().nullable().optional(),channel_count_max:k().int().nullable().optional(),sampling_frequency:k().nullable().optional(),power_line_frequency:k().nullable().optional(),eeg_reference:w().nullable().optional(),placement_scheme:w().nullable().optional()}).passthrough();P$e=Iq.superRefine((e,t)=>{Tq(e,t),Nq(e,t)}),I$e=Iq.extend({file_size:k().nonnegative().nullable(),file_size_formatted:w().nullable().optional(),modalities:w().nullable().optional(),tasks:w().nullable().optional(),authors:w().nullable().optional(),license:w().nullable().optional(),owner_github:w().nullable().optional(),attestation_deposit_type:Ze(["owner","redistribution"]).nullable().optional(),attestation_key_status:Ze(["destroyed","retained"]).nullable().optional(),attestation_deidentified:tl.optional(),attestation_no_duplicate:tl.optional(),attestation_upstream_source:w().nullable().optional(),attestation_accepted_at:w().nullable().optional(),zarr_data_failures:U({count:k().int().nonnegative(),detail_ref:w(),compacted_by:w().optional(),pending:k().int().nonnegative().optional(),discovered:k().int().nonnegative().optional(),events_upload_failed:ze(!0).optional(),manifest_upload_failed:ze(!0).optional()}).passthrough().nullable().optional()}).passthrough().superRefine((e,t)=>{Tq(e,t),Nq(e,t)}),T$e=U({id:w(),name:w(),modalities:w().nullable().optional(),participants:k().int().nullable().optional(),doi:w().nullable().optional(),tasks:w().nullable().optional(),authors:w().nullable().optional(),has_hed:tl.optional(),score:k().optional(),snippet:w().optional()}).passthrough(),jq=ma(w(),k().int().nonnegative()),Rat=U({datasets:te(P$e),count:k().int().nonnegative(),total_count:k().int().nonnegative().optional(),limit:k().int().optional(),offset:k().int().optional(),excluded_unknown:k().int().nonnegative().optional(),excluded_unknown_by_facet:jq.optional()}).passthrough(),qq=U({results:te(T$e),count:k().int().nonnegative(),returned:k().int().nonnegative().optional(),offset:k().int().nonnegative().optional(),limit:k().int().optional(),candidate_ceiling:k().int().optional(),truncated:be().optional(),method:Ze(["exact_id","text","text_fallback","semantic","unavailable"]).optional(),min_score:k().optional(),warning:w().optional(),excluded_unknown:k().int().nonnegative().optional(),excluded_unknown_by_facet:jq.optional()}).passthrough(),Aat=U({dataset:I$e}).passthrough(),hi=U({value:w(),count:k().int().nonnegative()}),N$e=U({values:te(hi),distinct_total:k().int().nonnegative(),truncated:be()}),Nh=U({"electrode-system":te(hi).optional(),source:te(hi).optional(),zarr:te(hi).optional(),powerline:te(hi).optional(),"bids-version":te(hi).optional(),"hed-version":te(hi).optional(),license:te(hi).optional(),modality:te(hi).optional(),task:N$e.optional(),warning:w().optional()}).passthrough(),Oat=U({schema_version:ze(F$e),doc_type:ze("dataset"),dataset_id:w().regex(/^[a-z]{2}\d+$/,"neuroschema dataset_id pattern"),name:w(),source:$w,recording_modality:te(w()).min(1),description:w().nullable().optional(),bids_version:w().nullable().optional(),license:w().nullable().optional()}).passthrough()});var j$e,Iat,Tat,Nat,jat;var Mq=O(()=>{en();j$e=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/,Iat=w().regex(j$e,"ORCID must be in format 0000-0000-0000-000X"),Tat=Ze(["found","no_public_name","lookup_failed"]),Nat=Ze(["bids_validation_failed","bids_validation_pending","bids_validation_in_progress","prescreen_failed","min_requirements_failed","owner_name_missing"]),jat=Ze(["filled","would_fill","no_public_name","lookup_failed","write_failed"])});var q$e,Lq,kd="https://nemar.org/settings",Lat,M$e,L$e,B$e,Bq,Uq;var kw=O(()=>{en();q$e=Ze(["orcid_in_use","orcid_already_linked","orcid_linked_other","email_in_use","github_in_use","identity_conflict_remains"]),Lq=q$e.options,Lat={orcid_in_use:`That ORCID iD already belongs to a NEMAR account. Sign in to that account instead; if you want the iD on a different account, unlink it there first (Settings, ${kd}).`,orcid_already_linked:`That ORCID iD already belongs to a NEMAR account. Sign in to that account instead; if you want the iD on a different account, unlink it there first (Settings, ${kd}).`,orcid_linked_other:`That ORCID iD is linked to a different NEMAR account. Unlink it there first (Settings, ${kd}), then link it here.`,email_in_use:`That email address already belongs to a NEMAR account. Sign in to that account instead, or change its address first (Settings, ${kd}).`,github_in_use:`That GitHub account is already linked to a NEMAR account. Sign in to that account instead, or change its GitHub username first (Settings, ${kd}).`,identity_conflict_remains:"The collision that flagged this account is still there. Resolve it on the other account first (change its email or GitHub username, or unlink its ORCID iD), or delete that account, then clear the flag."},M$e=Ze(["orcid","email","github"]),L$e=U({id:k().int(),username:w().nullable(),email:w(),created_at:w(),has_oauth_identity:be(),dataset_count:k().int(),identity_conflict:k().int(),canonical:be()}).passthrough(),B$e=U({kind:M$e,value:w(),canonical_user_id:k().int(),accounts:te(L$e)}).passthrough(),Bq=U({groups:te(B$e),group_count:k().int(),flagged_count:k().int()}).passthrough(),Uq=U({ok:ze(!0),id:k().int(),cleared:be()}).passthrough()});var Rw=120,zq=64,Aw="unnamed machine",U$e=25,jh,Vq,rl,Gq,zat,Vat,Hq,z$e,V$e,Wq,Ow,Kq,Gat,Hat,qh,Mh;var Lh=O(()=>{en();jh=Ze(["authorization_pending","slow_down","expired_token","access_denied","invalid_grant"]),Vq={authorization_pending:"Waiting for you to authorize this machine in the browser.",slow_down:"Polling too quickly; the CLI will slow down automatically.",expired_token:"The code expired. Run `nemar auth login` again for a new one.",access_denied:"This sign-in was declined in the browser. Run `nemar auth login` again if that was a mistake.",invalid_grant:"That code is no longer valid. Run `nemar auth login` again for a new one."},rl=Ze(["device_code_unknown","device_code_expired","device_code_used","device_code_denied","account_pending","account_revoked","identity_conflict","service_account","person_account","too_many_keys","key_not_found"]),Gq=rl.options,zat={device_code_unknown:"That code was not found. Check the code shown in your terminal, or run `nemar auth login` again for a new one.",device_code_expired:"The code expired. Run `nemar auth login` again for a new one.",device_code_used:"That code has already been used. Run `nemar auth login` again for a new one.",device_code_denied:"This sign-in was declined in the browser. Run `nemar auth login` again if that was a mistake.",account_pending:"Verify your email address first. Check your inbox for the NEMAR verification code, then authorize again.",account_revoked:"Your NEMAR account access has been revoked. Contact the NEMAR team if you think this is a mistake.",identity_conflict:"This account shares an identifier with another NEMAR account and cannot sign in until that is resolved. Fix it in Settings on nemar.org or contact the NEMAR team.",service_account:"This is a service or test account, and it cannot sign in this way. Ask an owner to create a key for it with `nemar admin keys create`.",person_account:"This account belongs to a person. A person creates their own keys with `nemar auth login` or in Settings on nemar.org.",too_many_keys:`This account already has ${U$e} active keys. Revoke one in Settings on nemar.org or with \`nemar auth keys\`, then try again.`,key_not_found:"That key was not found on this account, or it is already revoked. Run `nemar auth keys` to see the active ones."},Vat=U({error:rl,message:w()}).passthrough(),Hq=U({device_code:w(),user_code:w(),verification_uri:w(),verification_uri_complete:w(),expires_in:k().int(),interval:k().int()}).passthrough(),z$e=_w("error",[U({error:ze("authorization_pending"),message:w()}).passthrough(),U({error:ze("slow_down"),message:w()}).passthrough()]),V$e=_w("error",[U({error:ze("expired_token"),reason:rl,message:w()}).passthrough(),U({error:ze("access_denied"),reason:rl,message:w()}).passthrough(),U({error:ze("invalid_grant"),reason:rl,message:w()}).passthrough()]),Wq=el([z$e,V$e]),Ow=U({id:k().int(),name:w().nullable(),prefix:w(),created_at:w(),last_used_at:w().nullable(),current:be()}).passthrough(),Kq=U({api_key:w(),key:Ow,user:U({username:w().nullable(),email:w(),github_username:w().nullable(),role:w(),sandbox_completed:be(),sandbox_dataset_id:w().nullable()}).passthrough()}).passthrough(),Gat=U({user_code:w(),machine_name:w(),requested_at:w(),expires_in:k().int(),account:U({username:w().nullable(),email_masked:w()}).passthrough(),refusal:U({code:rl,message:w()}).passthrough().nullable()}).passthrough(),Hat=U({ok:ze(!0),machine_name:w()}).passthrough(),qh=U({keys:te(Ow)}).passthrough(),Mh=U({api_key:w(),key:Ow}).passthrough()});function Pt(e){return Ct[e]}function gi(e,t){return e.replace(/\{(\w+)\}/g,(r,n)=>Object.hasOwn(t,n)?t[n]:r)}var Ct;var nl=O(()=>{Ct={"tier.unverified.label":"Email not verified","tier.base.label":"Base access","tier.upload.label":"Upload access","tier.unverified.lede":"Verify your email address to activate your account.","upload_access.section.title":"Upload access","upload_access.section.lede":"A one-time admin grant. Reviewed against export-control and local-jurisdiction rules.","upload_access.state.granted":"Granted","upload_access.state.requested":"Requested","upload_access.state.not_requested":"Not requested","upload_access.invite.title":"Want to contribute a dataset?","upload_access.invite.body":"Browsing, searching and downloading are open to your account already. Uploading needs one extra grant: an admin checks your GitHub handle and location against export-control and local-jurisdiction rules, once.","upload_access.gate.title":"Ask for upload access first","upload_access.gate.body":"Your account can browse, search and download everything public already. Uploading needs one extra grant: an admin checks your GitHub handle and where you\u2019re based against export-control and local-jurisdiction rules. You ask once, and it is answered by email.","upload_access.request.cta":"Request upload access","upload_access.request.form_body":"Tell us what you plan to deposit. An admin reviews this alongside your name, username, GitHub handle and location, then grants access once.","upload_access.request.why_label":"What do you intend to upload?","upload_access.request.why_hint":"Describe what you intend to upload in 20-500 characters","upload_access.requested.title":"Your request is with an admin","upload_access.requested.lede":"An admin is reviewing your request.","upload_access.requested.lede_dated":"An admin is reviewing your request from {date}.","upload_access.requested.body.upload":"We\u2019ll email you when there\u2019s a decision, and this page will let you upload as soon as it\u2019s granted.","upload_access.requested.body":"We\u2019ll email you when there\u2019s a decision. Everything else on your account keeps working in the meantime.","upload_access.requested.cta":"See the request","upload_access.granted.body":"You can upload datasets from the upload page. Publishing one is a separate, per-dataset review you start from your dashboard.","upload_access.unverified.body":"Verify your email address first \u2014 the review happens over email.","upload_access.docs_link":"How upload access works","gap.sentence":"{label} is missing: needed {blocks}.","gap.set_on.both":"Set it in {web} or run `{cli}`.","gap.set_on.web":"Set it in {web}.","gap.blocks.verified":"to activate your account","gap.blocks.upload_access":"to request upload access","gap.blocks.publication":"to publish a dataset","gap.blocks.unknown":"to finish setting up your account","gap.blocks.noun.verified":"account activation","gap.blocks.noun.upload_access":"upload access","gap.blocks.noun.publication":"publication","gap.set_on.default_web":"Settings","gap.field.email_verified.label":"A verified email address","gap.field.username.label":"Username","gap.field.given_name.label":"Given name","gap.field.family_name.label":"Family name","gap.field.orcid_verified.label":"Verified ORCID iD","gap.field.github_username.label":"GitHub handle","gap.field.city.label":"City","gap.field.country.label":"Country","gap.field.why.label":"A description of what you intend to upload","gap.field.email_verified.set_on.web":"the verify step on your dashboard","gap.field.email_verified.set_on.cli":"nemar auth resend-verification","gap.field.username.set_on.web":"Settings","gap.field.username.set_on.cli":"nemar auth profile set-username","gap.field.given_name.set_on.web":"Settings","gap.field.given_name.set_on.cli":"nemar auth profile set-name","gap.field.family_name.set_on.web":"Settings","gap.field.family_name.set_on.cli":"nemar auth profile set-name","gap.field.given_name.set_on.web.orcid":"your ORCID record at orcid.org, then sign in again","gap.field.family_name.set_on.web.orcid":"your ORCID record at orcid.org, then sign in again","gap.field.orcid_verified.set_on.web":"Settings","gap.field.orcid_verified.set_on.cli":"nemar auth profile orcid link","gap.field.github_username.set_on.web":"Settings","gap.field.github_username.set_on.cli":"nemar auth profile set-github","gap.field.city.set_on.web":"Settings","gap.field.city.set_on.cli":"nemar auth profile set-location","gap.field.country.set_on.web":"Settings","gap.field.country.set_on.cli":"nemar auth profile set-location","gap.field.why.set_on.web":"the request form in Settings","gap.field.why.set_on.cli":"nemar auth request-upload-access","gaps.title":"What is still missing","gaps.none":"Nothing outstanding \u2014 every field NEMAR needs is filled in.","gaps.nudge.title":"Your profile isn\u2019t finished yet","gaps.nudge.cta":"Complete your profile","gaps.upload.title":"Before you can ask, your account still needs:","gaps.request.title":"Finish these first:","gaps.admin.title":"Still missing","gaps.admin.item":"{label} \u2014 blocks {blocks}","gaps.admin.none":"Nothing missing \u2014 every field the request needs is filled in.","gaps.admin.not_loaded":"Not loaded \u2014 open the user page to see what is still missing.","onboarding.username.auto_assigned.title":"We chose your username from your name","onboarding.username.auto_assigned.body":"Your account needed a username to be listed as a dataset owner, so one was made from your name when you signed in. You can change it once, here, until an admin grants you upload access.","welcome.unverified.title":"Verify your email address","welcome.unverified.body":"Authorizing with ORCID created your NEMAR account and signed you in. One step left: enter the 6-digit code we emailed you. That activates the account \u2014 no admin approval is involved.","welcome.active.title":"Your account is active","welcome.active.body":"Authorizing with ORCID created your NEMAR account and signed you in. There is no separate sign-up step and no approval queue: browse, search, and your dashboard all work right now.","welcome.upload_access.title":"Ask for upload access when you\u2019re ready to contribute","welcome.upload_access.body":"Reading is open to every verified account. Uploading and compute need one extra grant, because an admin has to check your GitHub handle and location against export-control and local-jurisdiction rules first. You ask once, from Settings.","cli.gaps.section.title":"Profile","cli.gaps.unknown":"not checked: run 'nemar auth status --refresh'","cli.gaps.unreported":"not reported by this backend","cli.gap.set_on.cli_only":"Run `{cli}`.","cli.gap.field.sandbox.label":"Sandbox training","cli.gap.blocks.sandbox":"to upload a dataset from the CLI","cli.gap.field.sandbox.set_on.cli":"nemar sandbox","cli.gaps.sandbox_unchecked":"Sandbox training could not be confirmed with the server. Run `nemar sandbox status --refresh`, then `nemar sandbox` if it is still outstanding.","cli.upload.preflight.title":"Upload access is not granted yet","cli.upload.preflight.body":"Browsing, searching and downloading are open to your account already. Uploading needs one extra grant: an admin checks your GitHub handle and location against export-control and local-jurisdiction rules, once.","cli.upload_access.cta":"Ask for it with `nemar auth request-upload-access`.","cli.upload.preflight.unchecked":"Upload access could not be checked ({reason}); continuing.","cli.upload.preflight.gaps_unknown":"Could not determine what is still missing; run `nemar auth profile` for the list.","cli.upload.preflight.dry_run":"Continuing anyway: --dry-run uploads nothing."}});function H$e(e){return e==="verified"||e==="upload_access"||e==="publication"}function ol(e){return(e??"").trim().length===0}function W$e(e){return e==="service"||e==="test"}function Xq(e,t={}){let r=t.orcidVerified===!0,n=Object.hasOwn(Bh,e)?Bh[e]:void 0;if(!n)return{field:e,label:e,blocks:t.blocks??[],setOnWeb:Ct["gap.set_on.default_web"],setOnCli:null,known:!1};let o=r&&n.orcidWebKey!==void 0;return{field:e,blocks:t.blocks??n.blocks,label:Ct[n.labelKey],setOnWeb:Ct[o?n.orcidWebKey:n.webKey],setOnCli:o||n.cliKey===null?null:Ct[n.cliKey],known:!0}}function Yq(e){let t=Fw.indexOf(e);return t===-1?Fw.length:t}function Zq(e,t={}){return e.map((r)=>Xq(r,{orcidVerified:t.orcidVerified}))}function Uh(e,t={}){return e.filter((r)=>!!r&&typeof r.field==="string").map((r)=>{let n=Array.isArray(r.blocks)?r.blocks.filter(H$e):[];return Xq(r.field,{orcidVerified:t.orcidVerified,blocks:n.length>0?n:void 0})}).sort((r,n)=>Yq(r.field)-Yq(n.field))}function Pw(e){let t=e.blocks[0],r=t?Ct[G$e[t]]:Ct["gap.blocks.unknown"],n=gi(Ct["gap.sentence"],{label:"",blocks:r}).trimStart(),o=e.setOnCli?gi(Ct["gap.set_on.both"],{web:e.setOnWeb,cli:e.setOnCli}):gi(Ct["gap.set_on.web"],{web:e.setOnWeb});return`${n} ${o}`}function Qq(e){return`${e.label} ${Pw(e)}`}function zh(){let e=gi(Ct["gap.sentence"],{label:Jq.label,blocks:Ct["cli.gap.blocks.sandbox"]}),t=gi(Ct["cli.gap.set_on.cli_only"],{cli:Jq.command});return`${e} ${t}`}function e9(){return Ct["cli.gaps.sandbox_unchecked"]}var Bh,Fw,Jat,G$e,Jq;var il=O(()=>{nl();Bh={email_verified:{blocks:["verified","upload_access"],labelKey:"gap.field.email_verified.label",webKey:"gap.field.email_verified.set_on.web",cliKey:"gap.field.email_verified.set_on.cli",isMissing:(e)=>e.status==="pending"||e.email_verified===!1},username:{blocks:["upload_access"],labelKey:"gap.field.username.label",webKey:"gap.field.username.set_on.web",cliKey:"gap.field.username.set_on.cli",isMissing:(e)=>e.username!==void 0&&ol(e.username)},given_name:{blocks:["upload_access","publication"],labelKey:"gap.field.given_name.label",webKey:"gap.field.given_name.set_on.web",cliKey:"gap.field.given_name.set_on.cli",orcidWebKey:"gap.field.given_name.set_on.web.orcid",isMissing:(e)=>ol(e.given_name)},family_name:{blocks:["upload_access","publication"],labelKey:"gap.field.family_name.label",webKey:"gap.field.family_name.set_on.web",cliKey:"gap.field.family_name.set_on.cli",orcidWebKey:"gap.field.family_name.set_on.web.orcid",isMissing:(e)=>ol(e.family_name)},orcid_verified:{blocks:["upload_access"],labelKey:"gap.field.orcid_verified.label",webKey:"gap.field.orcid_verified.set_on.web",cliKey:"gap.field.orcid_verified.set_on.cli",isMissing:(e)=>e.orcid_verified!==!0&&!W$e(e.account_kind)},github_username:{blocks:["upload_access","publication"],labelKey:"gap.field.github_username.label",webKey:"gap.field.github_username.set_on.web",cliKey:"gap.field.github_username.set_on.cli",isMissing:(e)=>ol(e.github_username)},city:{blocks:["upload_access"],labelKey:"gap.field.city.label",webKey:"gap.field.city.set_on.web",cliKey:"gap.field.city.set_on.cli",isMissing:(e)=>ol(e.city)},country:{blocks:["upload_access"],labelKey:"gap.field.country.label",webKey:"gap.field.country.set_on.web",cliKey:"gap.field.country.set_on.cli",isMissing:(e)=>ol(e.country)},why:{blocks:["upload_access"],labelKey:"gap.field.why.label",webKey:"gap.field.why.set_on.web",cliKey:"gap.field.why.set_on.cli",isMissing:null}},Fw=Object.keys(Bh),Jat=Fw.filter((e)=>Bh[e].isMissing!==null),G$e={verified:"gap.blocks.verified",upload_access:"gap.blocks.upload_access",publication:"gap.blocks.publication"};Jq={field:"sandbox",label:Ct["cli.gap.field.sandbox.label"],command:Ct["cli.gap.field.sandbox.set_on.cli"]}});function Wh(e,t){let r=e.sss!==void 0;if(e.derived!==r)t.addIssue({code:M.custom,path:["sss"],message:e.derived?"derived is true but sss is absent (ADR 0028: the two travel together)":"sss is present but derived is false (ADR 0028: the two travel together)"})}var xr,Vh,t9,Gh,K$e,Hh,Y$e,J$e,X$e,Z$e,Q$e,Qat,eCe,ect,tCe,tct;var Iw=O(()=>{en();xr=/^[a-z]{2}[0-9]{6}$/,Vh=/^[0-9a-f]{40}$/,t9=U({name:w(),modality:w().nullable().optional(),rate:k().nullable().optional(),n_channels:k().int().nonnegative().nullable().optional(),n_samples:k().int().nonnegative().nullable().optional(),duration_s:k().nonnegative().nullable().optional(),source_rate_hz:k().nullable().optional(),n_view_levels:k().int().nonnegative().optional(),view_chunk_columns:k().int().positive().optional(),chunk_samples:k().int().positive().optional(),shard_samples:k().int().positive().optional()}).passthrough(),Gh=U({converted:k().int().nonnegative().optional(),relabelled:k().int().nonnegative().optional(),kept_importer_unit:k().int().nonnegative().optional(),units_column_present:be().optional(),sidecar:w().optional(),sidecar_supplied:be().optional(),unmatched_channels:k().int().nonnegative().optional(),unmatched_case_only:k().int().positive().optional(),matched_case_only:k().int().positive().optional(),matched_case_only_examples:te(w()).max(5).optional(),unmatched_raw_label:k().int().positive().optional(),unmatched_examples:te(w()).max(5).optional()}).passthrough(),K$e=U({channels_tsv:k().int().positive(),in_file:k().int().nonnegative(),in_store:k().int().nonnegative()}).passthrough(),Hh=U({applied:be().optional(),method:w().optional(),calibration:w().optional(),cross_talk:w().optional(),mne_version:w().optional()}).passthrough();Y$e=U({path:w(),zarr:w().regex(/\.zarr$/,"must end in .zarr"),updated_utc:w().optional(),source_tree:ze("raw"),derived:be(),modalities:te(w()).optional(),groups:te(t9).optional(),power_line_frequency:k().nullable().optional(),event_description_count:k().int().nonnegative().optional(),n_events:k().int().nonnegative().optional(),trial_types:ma(w(),k().int().nonnegative()).optional(),units_report:Gh.optional(),channels_tsv_read_error:be().optional(),channels_tsv_count_mismatch:K$e.optional(),split_members:te(w()).optional(),sss:Hh.optional()}).passthrough().superRefine(Wh),J$e=U({path:w(),zarr:w().regex(/\.zarr$/,"must end in .zarr").optional(),code:w(),reason:w(),detail:w().nullable().optional(),attempts:k().int().nonnegative().optional()}).passthrough(),X$e=Ze(["infra_failure","memory_budget","not_attempted"]),Z$e=U({path:w(),zarr:w().regex(/\.zarr$/,"must end in .zarr"),reason:X$e,attempts:k().int().nonnegative(),last_error:w().nullable().optional(),last_attempt_utc:w().nullable().optional()}).passthrough(),Q$e=U({level0:ze("<zarr>/<group>/0"),view:ze("<zarr>/<group>/view/<L>"),view_levels:ze("1..n_view_levels from the group attrs"),scale_offset:ze("level-0 array attrs scale[] and offset[]; physical = digital * scale + offset"),events:ze("<data_base>events.parquet").optional()}).passthrough(),Qat=U({format:ze("nemar-zarr-index"),format_version:ze(3),dataset_id:w().regex(xr,"NEMAR dataset id (nm/on/xx band)"),contract_base:w().regex(/^https:\/\//,"must be https"),data_base:w().regex(/^https:\/\//,"must be https"),data_base_kind:ze("s3-public"),s3_uri:w().regex(/^s3:\/\//,"must be an s3:// URI"),s3_region:w().min(1),s3_anonymous:be(),source_commit:w().regex(Vh,"must be a full 40-hex SHA"),engine_version:w().min(1),biosigio_version:w().nullable().optional(),updated_utc:w(),discovered_count:k().int().nonnegative(),store_count:k().int().nonnegative(),n_recordings:k().int().nonnegative(),errors:k().int().nonnegative(),failure_count:k().int().nonnegative(),pending_count:k().int().nonnegative(),stores:te(Y$e),failures:te(J$e),pending:te(Z$e),doi:w().nullable().optional(),license:w().nullable().optional(),citation:w().nullable().optional(),hed_version:w().nullable().optional(),events_parquet:w().regex(/^https:\/\//,"must be https").optional(),events_row_count:k().int().nonnegative().optional(),layout:Q$e}).passthrough(),eCe=U({name:w(),configuration:ma(w(),Sd()).optional()}).passthrough(),ect=U({zarr_format:ze(3),node_type:ze("array"),shape:te(k().int().nonnegative()),data_type:w(),chunk_grid:U({name:w(),configuration:ma(w(),Sd()).optional()}).passthrough(),codecs:te(eCe),fill_value:Sd().optional(),attributes:ma(w(),Sd()).optional(),dimension_names:te(w().nullable()).optional()}).passthrough(),tCe=U({path:w(),zarr:w().regex(/\.zarr$/,"must end in .zarr"),groups:te(t9).optional(),modalities:te(w()).optional()}).passthrough(),tct=U({format:ze("nemar-zarr-index"),format_version:k().int(),dataset_id:w().regex(xr,"NEMAR dataset id (nm/on/xx band)"),source_commit:w(),stores:te(tCe)}).passthrough()});function r9(e){let t=e.unit?` (${e.unit})`:"";switch(e.valueKind){case"enum":return`${e.label} -- comma-separated, one or more of: ${(e.enumValues??[]).join(", ")}`;case"number":return`${e.label}${t} -- range (e.g. 10..50, 10.., ..50, or 10)`;case"bytes":return`${e.label}${t} -- range with optional units (e.g. 10gb..2tb, 500mb.., ..1gb; bare = bytes)`;case"duration":return`${e.label}${t} -- range with optional units (e.g. 30m..2h, 100h.., ..90s; bare = seconds)`;case"text":return`${e.label} -- substring match`;case"version":return`${e.label} -- exact or prefix match`}}var rCe,nCe,oCe,iCe,ko,oct;var Kh=O(()=>{Cw();rCe=["10-05","10-10","10-20","biosemi","egi-geodesic","other"],nCe=["50","60"],oCe=["ready","pending","failed"],iCe=$w.options,ko=[{key:"subjects",flag:"--subjects",queryParam:"subjects",valueKind:"number",label:"Subject count",unit:"subjects"},{key:"channels",flag:"--channels",queryParam:"channels",valueKind:"number",label:"Channel count",unit:"channels"},{key:"sessions",flag:"--sessions",queryParam:"sessions",valueKind:"number",label:"Session count",unit:"sessions"},{key:"size",flag:"--size",queryParam:"size",valueKind:"bytes",label:"Dataset size"},{key:"files",flag:"--files",queryParam:"files",valueKind:"number",label:"File count",unit:"files"},{key:"citations",flag:"--citations",queryParam:"citations",valueKind:"number",label:"Citation count",unit:"citations"},{key:"duration",flag:"--duration",queryParam:"duration",valueKind:"duration",label:"Total recording duration"},{key:"recording-length",flag:"--recording-length",queryParam:"recording_length",valueKind:"duration",label:"Per-recording duration"},{key:"recordings",flag:"--recordings",queryParam:"recordings",valueKind:"number",label:"Recording count",unit:"recordings"},{key:"unavailable",flag:"--unavailable",queryParam:"unavailable",valueKind:"number",label:"Unavailable recording count",unit:"recordings"},{key:"age",flag:"--age",queryParam:"age",valueKind:"number",label:"Participant age",unit:"years"},{key:"rate",flag:"--rate",queryParam:"rate",valueKind:"number",label:"Sampling rate",unit:"Hz"},{key:"powerline",flag:"--powerline",queryParam:"powerline",valueKind:"enum",label:"Power line frequency",enumValues:nCe},{key:"reference",flag:"--reference",queryParam:"reference",valueKind:"text",label:"EEG reference"},{key:"placement",flag:"--placement",queryParam:"placement",valueKind:"text",label:"Electrode placement scheme"},{key:"electrode-system",flag:"--electrode-system",queryParam:"electrode_system",valueKind:"enum",label:"Electrode system",enumValues:rCe},{key:"source",flag:"--source",queryParam:"source",valueKind:"enum",label:"Source archive",enumValues:iCe},{key:"zarr",flag:"--zarr",queryParam:"zarr",valueKind:"enum",label:"Zarr conversion status",enumValues:oCe},{key:"bids-version",flag:"--bids-version",queryParam:"bids_version",valueKind:"version",label:"BIDS version"},{key:"hed-version",flag:"--hed-version",queryParam:"hed_version",valueKind:"version",label:"HED version"}],oct=new Map(ko.map((e)=>[e.key,e]))});var sCe,lct,aCe,a9,Rd,n9,cCe,c9,lCe=20,uCe=100,dCe,l9,fCe,uct,dct,pCe,fct,pct,mCe,hCe,gCe,mct,yCe=50,bCe=500,hct,xCe,_Ce,gct,vCe=1000,wCe=5000,o9=8,DCe=100,ECe=32,i9,yct,SCe,$Ce,CCe,bct,kCe=800,RCe=4000,xct,_ct,Tw=60,Nw=64,s9,ACe=86400,OCe=4096,vct,FCe,PCe,wct;var u9=O(()=>{en();Kh();Iw();sCe=U({dataset_id:w().regex(xr),name:w(),doi:w().nullable().optional(),license:w().nullable().optional(),modalities:te(w()).optional(),tasks:te(w()).optional(),subject_count:k().int().nonnegative().nullable().optional(),has_hed:el([ze(0),ze(1)]).nullable().optional(),hed_version:w().nullable().optional(),store_count:k().int().nonnegative().nullable().optional(),recording_count:k().int().nonnegative().nullable().optional(),recordings_unavailable:k().int().nonnegative().nullable().optional(),total_recording_duration:k().nullable().optional(),zarr_converted_at:w().nullable().optional(),zarr_source_commit:w().nullable().optional(),zarr_errors:k().int().nonnegative().nullable().optional(),zarr_verify_status:Ze(["verified","failed","unverifiable"]).nullable().optional(),zarr_verified_at:w().nullable().optional(),index_url:w().nullable().optional()}).passthrough(),lct=U({format:ze("nemar-zarr-catalog"),format_version:k().int(),generated_utc:w(),contract_base:w(),count:k().int().nonnegative(),datasets:te(sCe)}).passthrough(),aCe=["verified","failed","unverifiable"],a9=Ze(aCe).nullable(),Rd=U({dataset_id:w().regex(xr),doi:w().nullable(),license:w().nullable(),citation:w().nullable(),source_commit:w().regex(Vh),index_etag:w().nullable(),engine_version:w(),source_tree:ze("raw"),derived:be(),sss:Hh.optional(),lossy:be(),dtype:w().nullable(),effective_rate_hz:k().nullable(),source_rate_hz:k().nullable(),units_report:Gh.nullable().optional(),zarr_verify_status:a9,note:w().nullable().optional()}).passthrough().superRefine(Wh),n9=U({start:k().int().nonnegative(),end:k().int().nonnegative()}).passthrough().refine((e)=>e.end>=e.start,{message:"end must be >= start",path:["end"]}),cCe=U({python_zarr:w(),zarrita:w(),python_browser:w()}).passthrough(),c9=U({contract_base:w(),data_base:w(),s3_uri:w(),s3_region:w(),s3_anonymous:be(),zarr:w(),group:w(),level:el([ze("0"),k().int().positive()]),array_path:w(),dtype:w().nullable(),codecs:te(Sd()).optional(),chunk_samples:k().int().positive().nullable(),shard_samples:k().int().positive().nullable(),n_channels:k().int().nonnegative().nullable(),sample_slice:n9.optional(),channel_slice:n9.optional(),scale_offset:w(),how_to:cCe}).passthrough(),dCe=Object.fromEntries(ko.map((e)=>[e.queryParam,w().optional()])),l9={modality:w().optional(),task:w().optional(),has_hed:be().optional(),has_zarr:be().optional(),author:w().optional(),has_doi:be().optional(),has_zarr_verified:be().optional(),data_complete:be().optional(),recent:k().int().positive().optional(),license:w().optional()},fCe=Object.keys(l9),uct=[...fCe,...ko.map((e)=>e.queryParam)],dct=U({query:w().optional(),...l9,include_unknown:be().optional(),...dCe,limit:k().int().positive().max(uCe).default(lCe)}).passthrough(),pCe=U({dataset_id:w().regex(xr),name:w(),doi:w().nullable().optional(),license:w().nullable().optional(),modalities:te(w()).optional(),tasks:te(w()).optional(),subject_count:k().int().nullable().optional(),has_hed:be().nullable().optional(),has_zarr:be()}).passthrough(),fct=U({results:te(pCe),count:k().int().nonnegative(),limit:k().int(),note:w().nullable().optional(),truncated:be().optional()}).passthrough(),pct=U({dataset_id:w().regex(xr)}).passthrough(),mCe=["list_recordings","get_events","render_overview","read_window"],hCe=U({next_cheapest_tool:Ze(mCe),reason:w()}).passthrough(),gCe=["pending","ready","failed"],mct=U({dataset_id:w().regex(xr),name:w(),doi:w().nullable(),license:w().nullable(),citation:w().nullable(),modalities:te(w()).optional(),tasks:te(w()).optional(),subject_count:k().int().nullable().optional(),has_hed:be().nullable().optional(),hed_version:w().nullable().optional(),recording_count:k().int().nullable().optional(),total_recording_duration_s:k().nullable().optional(),zarr_status:Ze(gCe).nullable().optional(),zarr_verify_status:a9.optional(),zarr_source_commit:w().nullable().optional(),zarr_store_count:k().int().nullable().optional(),cost_hint:hCe}).passthrough(),hct=U({dataset_id:w().regex(xr),modality:w().optional(),min_duration_s:k().nonnegative().optional(),include_derived:be().default(!1),limit:k().int().positive().max(bCe).default(yCe),offset:k().int().nonnegative().default(0)}).passthrough(),xCe=U({name:w(),modality:w().nullable().optional(),rate:k().nullable().optional(),n_channels:k().int().nullable().optional(),duration_s:k().nullable().optional(),n_view_levels:k().int().nonnegative().nullable().optional(),n_samples:k().int().nonnegative().nullable().optional(),view_chunk_columns:k().int().positive().nullable().optional()}).passthrough(),_Ce=U({path:w(),zarr:w(),source_tree:ze("raw"),derived:be(),groups:te(xCe).optional(),n_events:k().int().nonnegative().optional(),sss:Hh.optional(),units_report:Gh.optional()}).passthrough().superRefine(Wh),gct=U({dataset_id:w().regex(xr),source_commit:w().regex(Vh).nullable(),recordings:te(_Ce),total_count:k().int().nonnegative(),excluded_derived_count:k().int().nonnegative(),limit:k().int(),offset:k().int(),index_format_version:k().int(),discovered_count:k().int().nonnegative().nullable(),failure_count:k().int().nonnegative().nullable(),pending_count:k().int().nonnegative().nullable(),excluded_legacy_non_raw_count:k().int().nonnegative(),note:w().nullable().optional(),envelope:Rd.optional()}).passthrough(),i9=w().min(1).max(64),yct=U({dataset_id:w().regex(xr),recording:w(),group:w().optional(),limit:k().int().positive().max(wCe).default(vCe),offset:k().int().nonnegative().default(0),where:ma(i9,te(el([w(),k()])).min(1).max(DCe)).refine((e)=>{let t=Object.keys(e).length;return t>=1&&t<=o9},{message:`where names 1 to ${o9} columns`}).optional(),columns:te(i9).min(1).max(ECe).optional()}).passthrough(),SCe=U({store_path:w(),group_name:w(),onset_s:k(),duration_s:k().nullable().optional(),sample_index:k().int().nonnegative(),trial_type:w().nullable().optional(),value:el([w(),k()]).nullable().optional(),hed:w().nullable().optional()}).passthrough(),$Ce=SCe.partial().required({onset_s:!0,sample_index:!0}),CCe=U({name:w(),distinct_count:k().int().nonnegative(),null_count:k().int().nonnegative(),values:te(U({value:w(),count:k().int().positive()}).passthrough()).nullable()}).passthrough(),bct=U({dataset_id:w().regex(xr),recording:w(),events:te($Ce),source:Ze(["events_parquet","events_tsv_fallback"]),estimated:be(),total_count:k().int().nonnegative(),limit:k().int(),offset:k().int(),truncated:be(),note:w().nullable().optional(),columns_summary:te(CCe).optional(),envelope:Rd.optional()}).passthrough(),xct=U({dataset_id:w().regex(xr),recording:w(),group:w().optional(),width_px:k().int().positive().max(RCe).default(kCe)}).passthrough(),_ct=U({dataset_id:w().regex(xr),recording:w(),group:w(),level:k().int().positive(),width_px:k().int().positive(),height_px:k().int().positive(),mime_type:ze("image/png"),columns_read:k().int().nonnegative(),chunks_read:k().int().nonnegative(),bytes_read:k().int().nonnegative(),envelope:Rd.optional()}).passthrough(),s9=Tw*Nw,vct=U({dataset_id:w().regex(xr),recording:w(),group:w().optional(),start_s:k().nonnegative().default(0),duration_s:k().positive().max(ACe).default(10),channels:te(k().int().nonnegative()).max(OCe).optional(),taste:be().default(!1)}).passthrough().superRefine((e,t)=>{if(!e.taste)return;if(!e.channels||e.channels.length===0){t.addIssue({code:M.custom,message:"taste requires channels: name the channel indices you want (list_recordings reports each group's n_channels), or omit taste for a recipe",path:["channels"]});return}if(e.duration_s>Tw)t.addIssue({code:M.custom,message:`taste duration_s (${e.duration_s}) exceeds the ${Tw} s cap; omit taste for a recipe instead`,path:["duration_s"]});if(e.channels.length>Nw)t.addIssue({code:M.custom,message:`taste channels (${e.channels.length}) exceeds the ${Nw}-channel cap; omit taste for a recipe instead`,path:["channels"]});let r=e.duration_s*e.channels.length;if(r>s9)t.addIssue({code:M.custom,message:`taste exceeds the cap of ${s9} channel-seconds (duration_s x channels = ${r}); omit taste for a recipe instead`,path:["duration_s"]})}),FCe=U({mode:ze("recipe"),recipe:c9,envelope:Rd}).passthrough(),PCe=U({mode:ze("taste"),start_s:k(),duration_s:k(),channels:te(k().int()),sample_rate_hz:k(),values:te(te(k())),recipe:c9,chunks_read:k().int().nonnegative(),bytes_read:k().int().nonnegative(),filled_ranges:te(U({start_sample:k().int().nonnegative(),end_sample:k().int().nonnegative(),start_s:k(),end_s:k()}).passthrough()),note:w().nullable().optional(),envelope:Rd}).passthrough(),wct=_w("mode",[FCe,PCe])});var sl=O(()=>{ww();Cd();Cw();Mq();kw();Lh();nl();il();Iw();u9()});function Yh(e){return e?TCe:xs}var xs,ICe,TCe,jw;var Jh=O(()=>{xs=["ci_check","enrichment_check","s3_public_read","repo_public","tag_protect","doi_create","update_metadata","update_readme","create_tag","create_release","upload_to_zenodo","publish_doi","version_doi","s3_lock","sync_nemar","notify_user"],ICe=["update_metadata","update_readme","upload_to_zenodo","publish_doi"],TCe=xs.filter((e)=>!ICe.includes(e));jw={ci_check:"Check CI",enrichment_check:"Enrichment check",s3_public_read:"S3 public read",repo_public:"Make catalog row public",tag_protect:"Tag protection",doi_create:"Create DOI",update_metadata:"Update metadata",update_readme:"Update README",create_tag:"Create version tag",create_release:"Create GitHub release",upload_to_zenodo:"Upload to Zenodo (no-op)",publish_doi:"Publish DOI (irreversible)",version_doi:"Version DOI + manifest",s3_lock:"S3 Object Lock",sync_nemar:"Sync NEMAR (no-op)",notify_user:"Notify user"}});function Xh(e){let t=[],r="",n="start",o=!1;for(let i of e)switch(i){case"\\":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd")throw Error("Invalid character after an index");if(o)r+=i;n="property",o=!o;break}case".":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(o){o=!1,r+=i;break}if(qw.has(r))return[];t.push(r),r="",n="property";break}case"[":{if(n==="index")throw Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(o){o=!1,r+=i;break}if(n==="property"){if(qw.has(r))return[];t.push(r),r=""}n="index";break}case"]":{if(n==="index"){t.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw Error("Invalid character after an index")}default:{if(n==="index"&&!NCe.has(i))throw Error("Invalid character in an index");if(n==="indexEnd")throw Error("Invalid character after an index");if(n==="start")n="property";if(o)o=!1,r+="\\";r+=i}}if(o)r+="\\";switch(n){case"property":{if(qw.has(r))return[];t.push(r);break}case"index":throw Error("Index was not closed");case"start":{t.push("");break}}return t}function Mw(e,t){if(typeof t!=="number"&&Array.isArray(e)){let r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function d9(e,t){if(Mw(e,t))throw Error("Cannot use string index")}function f9(e,t,r){if(!ha(e)||typeof t!=="string")return r===void 0?e:r;let n=Xh(t);if(n.length===0)return r;for(let o=0;o<n.length;o++){let i=n[o];if(Mw(e,i))e=o===n.length-1?void 0:null;else e=e[i];if(e===void 0||e===null){if(o!==n.length-1)return r;break}}return e===void 0?r:e}function Lw(e,t,r){if(!ha(e)||typeof t!=="string")return e;let n=e,o=Xh(t);for(let i=0;i<o.length;i++){let s=o[i];if(d9(e,s),i===o.length-1)e[s]=r;else if(!ha(e[s]))e[s]=typeof o[i+1]==="number"?[]:{};e=e[s]}return n}function p9(e,t){if(!ha(e)||typeof t!=="string")return!1;let r=Xh(t);for(let n=0;n<r.length;n++){let o=r[n];if(d9(e,o),n===r.length-1)return delete e[o],!0;if(e=e[o],!ha(e))return!1}}function m9(e,t){if(!ha(e)||typeof t!=="string")return!1;let r=Xh(t);if(r.length===0)return!1;for(let n of r){if(!ha(e)||!(n in e)||Mw(e,n))return!1;e=e[n]}return!0}var ha=(e)=>{let t=typeof e;return e!==null&&(t==="object"||t==="function")},qw,NCe;var h9=O(()=>{qw=new Set(["__proto__","prototype","constructor"]),NCe=new Set("0123456789")});import _t from"path";import g9 from"os";import Bw from"process";function zw(e,{suffix:t="nodejs"}={}){if(typeof e!=="string")throw TypeError(`Expected a string, got ${typeof e}`);if(t)e+=`-${t}`;if(Bw.platform==="darwin")return jCe(e);if(Bw.platform==="win32")return qCe(e);return MCe(e)}var _s,Uw,al,jCe=(e)=>{let t=_t.join(_s,"Library");return{data:_t.join(t,"Application Support",e),config:_t.join(t,"Preferences",e),cache:_t.join(t,"Caches",e),log:_t.join(t,"Logs",e),temp:_t.join(Uw,e)}},qCe=(e)=>{let t=al.APPDATA||_t.join(_s,"AppData","Roaming"),r=al.LOCALAPPDATA||_t.join(_s,"AppData","Local");return{data:_t.join(r,e,"Data"),config:_t.join(t,e,"Config"),cache:_t.join(r,e,"Cache"),log:_t.join(r,e,"Log"),temp:_t.join(Uw,e)}},MCe=(e)=>{let t=_t.basename(_s);return{data:_t.join(al.XDG_DATA_HOME||_t.join(_s,".local","share"),e),config:_t.join(al.XDG_CONFIG_HOME||_t.join(_s,".config"),e),cache:_t.join(al.XDG_CACHE_HOME||_t.join(_s,".cache"),e),log:_t.join(al.XDG_STATE_HOME||_t.join(_s,".local","state"),e),temp:_t.join(Uw,t,e)}};var y9=O(()=>{_s=g9.homedir(),Uw=g9.tmpdir(),{env:al}=Bw});var LCe=(e,t)=>{let{onError:r}=t;return function(...o){return e.apply(void 0,o).catch(r)}},Ro;var b9=O(()=>{Ro=LCe});var BCe=(e,t)=>{let{onError:r}=t;return function(...o){try{return e.apply(void 0,o)}catch(i){return r(i)}}},Bn;var x9=O(()=>{Bn=BCe});var _9=250;var v9=()=>{};var UCe=(e,t)=>{let{isRetriable:r}=t;return function(o){let{timeout:i}=o,s=o.interval??_9,a=Date.now()+i;return function c(...u){return e.apply(void 0,u).catch((d)=>{if(!r(d))throw d;if(Date.now()>=a)throw d;let f=Math.round(s*Math.random());if(f>0)return new Promise((p)=>setTimeout(p,f)).then(()=>c.apply(void 0,u));else return c.apply(void 0,u)})}}},Ao;var w9=O(()=>{v9();Ao=UCe});var zCe=(e,t)=>{let{isRetriable:r}=t;return function(o){let{timeout:i}=o,s=Date.now()+i;return function(...c){while(!0)try{return e.apply(void 0,c)}catch(u){if(!r(u))throw u;if(Date.now()>=s)throw u;continue}}}},Oo;var D9=O(()=>{Oo=zCe});var Vw=O(()=>{b9();x9();w9();D9()});var Ad,Gw;var E9=O(()=>{Hw();Ad={isChangeErrorOk:(e)=>{if(!Ad.isNodeError(e))return!1;let{code:t}=e;if(t==="ENOSYS")return!0;if(!S9&&(t==="EINVAL"||t==="EPERM"))return!0;return!1},isNodeError:(e)=>e instanceof Error,isRetriableError:(e)=>{if(!Ad.isNodeError(e))return!1;let{code:t}=e;if(t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM")return!0;return!1},onChangeError:(e)=>{if(!Ad.isNodeError(e))throw e;if(Ad.isChangeErrorOk(e))return;throw e}},Gw=Ad});import $9 from"process";var Od,Tr,S9,Zt;var Hw=O(()=>{E9();Od={onError:Gw.onChangeError},Tr={onError:()=>{return}},S9=$9.getuid?!$9.getuid():!1,Zt={isRetriable:Gw.isRetriableError}});import Ke from"fs";import{promisify as sr}from"util";var VCe,Gt;var Ww=O(()=>{Vw();Vw();Hw();VCe={attempt:{chmod:Ro(sr(Ke.chmod),Od),chown:Ro(sr(Ke.chown),Od),close:Ro(sr(Ke.close),Tr),fsync:Ro(sr(Ke.fsync),Tr),mkdir:Ro(sr(Ke.mkdir),Tr),realpath:Ro(sr(Ke.realpath),Tr),stat:Ro(sr(Ke.stat),Tr),unlink:Ro(sr(Ke.unlink),Tr),chmodSync:Bn(Ke.chmodSync,Od),chownSync:Bn(Ke.chownSync,Od),closeSync:Bn(Ke.closeSync,Tr),existsSync:Bn(Ke.existsSync,Tr),fsyncSync:Bn(Ke.fsync,Tr),mkdirSync:Bn(Ke.mkdirSync,Tr),realpathSync:Bn(Ke.realpathSync,Tr),statSync:Bn(Ke.statSync,Tr),unlinkSync:Bn(Ke.unlinkSync,Tr)},retry:{close:Ao(sr(Ke.close),Zt),fsync:Ao(sr(Ke.fsync),Zt),open:Ao(sr(Ke.open),Zt),readFile:Ao(sr(Ke.readFile),Zt),rename:Ao(sr(Ke.rename),Zt),stat:Ao(sr(Ke.stat),Zt),write:Ao(sr(Ke.write),Zt),writeFile:Ao(sr(Ke.writeFile),Zt),closeSync:Oo(Ke.closeSync,Zt),fsyncSync:Oo(Ke.fsyncSync,Zt),openSync:Oo(Ke.openSync,Zt),readFileSync:Oo(Ke.readFileSync,Zt),renameSync:Oo(Ke.renameSync,Zt),statSync:Oo(Ke.statSync,Zt),writeSync:Oo(Ke.writeSync,Zt),writeFileSync:Oo(Ke.writeFileSync,Zt)}},Gt=VCe});import ga from"process";var C9="utf8",Kw=438,k9=511,R9,A9,O9,F9=1000,P9,ult,Yw=128;var Jw=O(()=>{R9={},A9=ga.geteuid?ga.geteuid():-1,O9=ga.getegid?ga.getegid():-1,P9=!!ga.getuid,ult=ga.getuid?!ga.getuid():!1});var I9=(e)=>e instanceof Error&&("code"in e),Xw=(e)=>typeof e==="string",Zh=(e)=>e===void 0;var T9=()=>{};var N9=()=>{};import j9 from"process";var q9,Qh;var Zw=O(()=>{q9=j9.platform==="linux",Qh=j9.platform==="win32"});var Qw,M9;var L9=O(()=>{Zw();Qw=["SIGHUP","SIGINT","SIGTERM"];if(!Qh)Qw.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(q9)Qw.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");M9=Qw});import cl from"process";class B9{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=(e)=>{if(this.exited)return;this.exited=!0;for(let t of this.callbacks)t();if(e)if(Qh&&(e!=="SIGINT"&&e!=="SIGTERM"&&e!=="SIGKILL"))cl.kill(cl.pid,"SIGTERM");else cl.kill(cl.pid,e)},this.hook=()=>{cl.once("exit",()=>this.exit());for(let e of M9)try{cl.once(e,()=>this.exit(e))}catch{}},this.register=(e)=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}}var U9;var z9=O(()=>{Zw();L9();U9=new B9});var GCe,V9;var G9=O(()=>{z9();GCe=U9.register,V9=GCe});import HCe from"path";var tn,Fd;var H9=O(()=>{Ww();G9();Jw();tn={store:{},create:(e)=>{let t=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),n="tmp-",o=`.tmp-${r}${t}`;return`${e}${o}`},get:(e,t,r=!0)=>{let n=tn.truncate(t(e));if(n in tn.store)return tn.get(e,t,r);return tn.store[n]=r,[n,()=>delete tn.store[n]]},purge:(e)=>{if(!tn.store[e])return;delete tn.store[e],Gt.attempt.unlink(e)},purgeSync:(e)=>{if(!tn.store[e])return;delete tn.store[e],Gt.attempt.unlinkSync(e)},purgeSyncAll:()=>{for(let e in tn.store)tn.purgeSync(e)},truncate:(e)=>{let t=HCe.basename(e);if(t.length<=Yw)return e;let r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;let n=t.length-Yw;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-n)}${r[3]}`}};V9(tn.purgeSyncAll);Fd=tn});import WCe from"path";function e1(e,t,r=R9){if(Xw(r))return e1(e,t,{encoding:r});let o={timeout:r.timeout??F9},i=null,s=null,a=null;try{let c=Gt.attempt.realpathSync(e),u=!!c;e=c||e,[s,i]=Fd.get(e,r.tmpCreate||Fd.create,r.tmpPurge!==!1);let d=P9&&Zh(r.chown),f=Zh(r.mode);if(u&&(d||f)){let m=Gt.attempt.statSync(e);if(m){if(r={...r},d)r.chown={uid:m.uid,gid:m.gid};if(f)r.mode=m.mode}}if(!u){let m=WCe.dirname(e);Gt.attempt.mkdirSync(m,{mode:k9,recursive:!0})}if(a=Gt.retry.openSync(o)(s,"w",r.mode||Kw),r.tmpCreated)r.tmpCreated(s);if(Xw(t))Gt.retry.writeSync(o)(a,t,0,r.encoding||C9);else if(!Zh(t))Gt.retry.writeSync(o)(a,t,0,t.length,0);if(r.fsync!==!1)if(r.fsyncWait!==!1)Gt.retry.fsyncSync(o)(a);else Gt.attempt.fsync(a);if(Gt.retry.closeSync(o)(a),a=null,r.chown&&(r.chown.uid!==A9||r.chown.gid!==O9))Gt.attempt.chownSync(s,r.chown.uid,r.chown.gid);if(r.mode&&r.mode!==Kw)Gt.attempt.chmodSync(s,r.mode);try{Gt.retry.renameSync(o)(s,e)}catch(m){if(!I9(m))throw m;if(m.code!=="ENAMETOOLONG")throw m;Gt.retry.renameSync(o)(s,Fd.truncate(e))}i(),s=null}finally{if(a)Gt.attempt.closeSync(a);if(s)Fd.purge(s)}}var W9=O(()=>{Ww();Jw();T9();N9();H9()});var Id=g(function(J9){Object.defineProperty(J9,"__esModule",{value:!0});J9.regexpCode=J9.getEsmExportName=J9.getProperty=J9.safeStringify=J9.stringify=J9.strConcat=J9.addCodeArg=J9.str=J9._=J9.nil=J9._Code=J9.Name=J9.IDENTIFIER=J9._CodeOrName=void 0;class eg{}J9._CodeOrName=eg;J9.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class ll extends eg{constructor(e){super();if(!J9.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}J9.Name=ll;class Un extends eg{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof ll)t[r.str]=(t[r.str]||0)+1;return t},{})}}J9._Code=Un;J9.nil=new Un("");function K9(e,...t){let r=[e[0]],n=0;while(n<t.length)r1(r,t[n]),r.push(e[++n]);return new Un(r)}J9._=K9;var t1=new Un("+");function Y9(e,...t){let r=[Pd(e[0])],n=0;while(n<t.length)r.push(t1),r1(r,t[n]),r.push(t1,Pd(e[++n]));return KCe(r),new Un(r)}J9.str=Y9;function r1(e,t){if(t instanceof Un)e.push(...t._items);else if(t instanceof ll)e.push(t);else e.push(XCe(t))}J9.addCodeArg=r1;function KCe(e){let t=1;while(t<e.length-1){if(e[t]===t1){let r=YCe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function YCe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof ll||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof ll))return`"${e}${t.slice(1)}`;return}function JCe(e,t){return t.emptyStr()?e:e.emptyStr()?t:Y9`${e}${t}`}J9.strConcat=JCe;function XCe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Pd(Array.isArray(e)?e.join(","):e)}function ZCe(e){return new Un(Pd(e))}J9.stringify=ZCe;function Pd(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}J9.safeStringify=Pd;function QCe(e){return typeof e=="string"&&J9.IDENTIFIER.test(e)?new Un(`.${e}`):K9`[${e}]`}J9.getProperty=QCe;function eke(e){if(typeof e=="string"&&J9.IDENTIFIER.test(e))return new Un(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}J9.getEsmExportName=eke;function tke(e){return new Un(e.toString())}J9.regexpCode=tke});var s1=g(function(eM){Object.defineProperty(eM,"__esModule",{value:!0});eM.ValueScope=eM.ValueScopeName=eM.Scope=eM.varKinds=eM.UsedValueState=void 0;var Nr=Id();class Z9 extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var rg;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(rg||(eM.UsedValueState=rg={}));eM.varKinds={const:new Nr.Name("const"),let:new Nr.Name("let"),var:new Nr.Name("var")};class o1{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Nr.Name?e:this.name(e)}name(e){return new Nr.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}eM.Scope=o1;class i1 extends Nr.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=Nr._`.${new Nr.Name(t)}[${r}]`}}eM.ValueScopeName=i1;var mke=Nr._`\n`;class Q9 extends o1{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?mke:Nr.nil}}get(){return this._scope}name(e){return new i1(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,i=(r=t.key)!==null&&r!==void 0?r:t.ref,s=this._values[o];if(s){let u=s.get(i);if(u)return u}else s=this._values[o]=new Map;s.set(i,n);let a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return Nr._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let o=Nr.nil;for(let i in e){let s=e[i];if(!s)continue;let a=r[i]=r[i]||new Map;s.forEach((c)=>{if(a.has(c))return;a.set(c,rg.Started);let u=t(c);if(u){let d=this.opts.es5?eM.varKinds.var:eM.varKinds.const;o=Nr._`${o}${d} ${c} = ${u};${this.opts._n}`}else if(u=n===null||n===void 0?void 0:n(c))o=Nr._`${o}${u}${this.opts._n}`;else throw new Z9(c);a.set(c,rg.Completed)})}return o}}eM.ValueScope=Q9});var Ee=g(function(jr){Object.defineProperty(jr,"__esModule",{value:!0});jr.or=jr.and=jr.not=jr.CodeGen=jr.operators=jr.varKinds=jr.ValueScopeName=jr.ValueScope=jr.Scope=jr.Name=jr.regexpCode=jr.stringify=jr.getProperty=jr.nil=jr.strConcat=jr.str=jr._=void 0;var Le=Id(),zn=s1(),vs=Id();Object.defineProperty(jr,"_",{enumerable:!0,get:function(){return vs._}});Object.defineProperty(jr,"str",{enumerable:!0,get:function(){return vs.str}});Object.defineProperty(jr,"strConcat",{enumerable:!0,get:function(){return vs.strConcat}});Object.defineProperty(jr,"nil",{enumerable:!0,get:function(){return vs.nil}});Object.defineProperty(jr,"getProperty",{enumerable:!0,get:function(){return vs.getProperty}});Object.defineProperty(jr,"stringify",{enumerable:!0,get:function(){return vs.stringify}});Object.defineProperty(jr,"regexpCode",{enumerable:!0,get:function(){return vs.regexpCode}});Object.defineProperty(jr,"Name",{enumerable:!0,get:function(){return vs.Name}});var cg=s1();Object.defineProperty(jr,"Scope",{enumerable:!0,get:function(){return cg.Scope}});Object.defineProperty(jr,"ValueScope",{enumerable:!0,get:function(){return cg.ValueScope}});Object.defineProperty(jr,"ValueScopeName",{enumerable:!0,get:function(){return cg.ValueScopeName}});Object.defineProperty(jr,"varKinds",{enumerable:!0,get:function(){return cg.varKinds}});jr.operators={GT:new Le._Code(">"),GTE:new Le._Code(">="),LT:new Le._Code("<"),LTE:new Le._Code("<="),EQ:new Le._Code("==="),NEQ:new Le._Code("!=="),NOT:new Le._Code("!"),OR:new Le._Code("||"),AND:new Le._Code("&&"),ADD:new Le._Code("+")};class ws{optimizeNodes(){return this}optimizeNames(e,t){return this}}class rM extends ws{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?zn.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=dl(this.rhs,e,t);return this}get names(){return this.rhs instanceof Le._CodeOrName?this.rhs.names:{}}}class l1 extends ws{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Le.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=dl(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Le.Name?{}:{...this.lhs.names};return ag(e,this.rhs)}}class nM extends l1{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class oM extends ws{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class iM extends ws{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class sM extends ws{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class aM extends ws{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=dl(this.code,e,t),this}get names(){return this.code instanceof Le._CodeOrName?this.code.names:{}}}class lg extends ws{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let o=r[n];if(o.optimizeNames(e,t))continue;bke(e,o.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>ya(e,t.names),{})}}class Ds extends lg{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class cM extends lg{}class Td extends Ds{}Td.kind="else";class yi extends Ds{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new Td(r):r}if(t){if(e===!1)return t instanceof yi?t:t.nodes;if(this.nodes.length)return this;return new yi(pM(e),t instanceof yi?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=dl(this.condition,e,t),this}get names(){let e=super.names;if(ag(e,this.condition),this.else)ya(e,this.else.names);return e}}yi.kind="if";class ul extends Ds{}ul.kind="for";class lM extends ul{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=dl(this.iteration,e,t),this}get names(){return ya(super.names,this.iteration.names)}}class uM extends ul{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?zn.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=ag(super.names,this.from);return ag(e,this.to)}}class a1 extends ul{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=dl(this.iterable,e,t),this}get names(){return ya(super.names,this.iterable.names)}}class ng extends Ds{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}ng.kind="func";class og extends lg{render(e){return"return "+super.render(e)}}og.kind="return";class dM extends Ds{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)ya(e,this.catch.names);if(this.finally)ya(e,this.finally.names);return e}}class ig extends Ds{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}ig.kind="catch";class sg extends Ds{render(e){return"finally"+super.render(e)}}sg.kind="finally";class fM{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
85
85
  `:""},this._extScope=e,this._scope=new zn.Scope({parent:e}),this._nodes=[new cM]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let o=this._scope.toName(t);if(r!==void 0&&n)this._constants[o.str]=r;return this._leafNode(new rM(e,o,r)),o}const(e,t,r){return this._def(zn.varKinds.const,e,t,r)}let(e,t,r){return this._def(zn.varKinds.let,e,t,r)}var(e,t,r){return this._def(zn.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l1(e,t,r))}add(e,t){return this._leafNode(new nM(e,jr.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==Le.nil)this._leafNode(new aM(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),Le.addCodeArg(t,n)}return t.push("}"),new Le._Code(t)}if(e,t,r){if(this._blockNode(new yi(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new yi(e))}else(){return this._elseNode(new Td)}endIf(){return this._endBlockNode(yi,Td)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new lM(e),t)}forRange(e,t,r,n,o=this.opts.es5?zn.varKinds.var:zn.varKinds.let){let i=this._scope.toName(e);return this._for(new uM(o,i,t,r),()=>n(i))}forOf(e,t,r,n=zn.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let i=t instanceof Le.Name?t:this.var("_arr",t);return this.forRange("_i",0,Le._`${i}.length`,(s)=>{this.var(o,Le._`${i}[${s}]`),r(o)})}return this._for(new a1("of",n,o,t),()=>r(o))}forIn(e,t,r,n=this.opts.es5?zn.varKinds.var:zn.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,Le._`Object.keys(${t})`,r);let o=this._scope.toName(e);return this._for(new a1("in",n,o,t),()=>r(o))}endFor(){return this._endBlockNode(ul)}label(e){return this._leafNode(new oM(e))}break(e){return this._leafNode(new iM(e))}return(e){let t=new og;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(og)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new dM;if(this._blockNode(n),this.code(e),t){let o=this.name("e");this._currNode=n.catch=new ig(o),t(o)}if(r)this._currNode=n.finally=new sg,this.code(r);return this._endBlockNode(ig,sg)}throw(e){return this._leafNode(new sM(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Le.nil,r,n){if(this._blockNode(new ng(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(ng)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof yi))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}jr.CodeGen=fM;function ya(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function ag(e,t){return t instanceof Le._CodeOrName?ya(e,t.names):e}function dl(e,t,r){if(e instanceof Le.Name)return n(e);if(!o(e))return e;return new Le._Code(e._items.reduce((i,s)=>{if(s instanceof Le.Name)s=n(s);if(s instanceof Le._Code)i.push(...s._items);else i.push(s);return i},[]));function n(i){let s=r[i.str];if(s===void 0||t[i.str]!==1)return i;return delete t[i.str],s}function o(i){return i instanceof Le._Code&&i._items.some((s)=>s instanceof Le.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function bke(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function pM(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:Le._`!${c1(e)}`}jr.not=pM;var xke=mM(jr.operators.AND);function _ke(...e){return e.reduce(xke)}jr.and=_ke;var vke=mM(jr.operators.OR);function wke(...e){return e.reduce(vke)}jr.or=wke;function mM(e){return(t,r)=>t===Le.nil?r:r===Le.nil?t:Le._`${c1(t)} ${e} ${c1(r)}`}function c1(e){return e instanceof Le.Name?e:Le._`(${e})`}});var Te=g(function(DM){Object.defineProperty(DM,"__esModule",{value:!0});DM.checkStrictMode=DM.getErrorPath=DM.Type=DM.useFunc=DM.setEvaluated=DM.evaluatedPropsToName=DM.mergeEvaluated=DM.eachItem=DM.unescapeJsonPointer=DM.escapeJsonPointer=DM.escapeFragment=DM.unescapeFragment=DM.schemaRefOrVal=DM.schemaHasRulesButRef=DM.schemaHasRules=DM.checkUnknownRules=DM.alwaysValidSchema=DM.toHash=void 0;var st=Ee(),$ke=Id();function Cke(e){let t={};for(let r of e)t[r]=!0;return t}DM.toHash=Cke;function kke(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return bM(e,t),!xM(t,e.self.RULES.all)}DM.alwaysValidSchema=kke;function bM(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let o=n.RULES.keywords;for(let i in t)if(!o[i])wM(e,`unknown keyword: "${i}"`)}DM.checkUnknownRules=bM;function xM(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}DM.schemaHasRules=xM;function Rke(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}DM.schemaHasRulesButRef=Rke;function Ake({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return st._`${r}`}return st._`${e}${t}${st.getProperty(n)}`}DM.schemaRefOrVal=Ake;function Oke(e){return _M(decodeURIComponent(e))}DM.unescapeFragment=Oke;function Fke(e){return encodeURIComponent(d1(e))}DM.escapeFragment=Fke;function d1(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}DM.escapeJsonPointer=d1;function _M(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}DM.unescapeJsonPointer=_M;function Pke(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}DM.eachItem=Pke;function gM({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof st.Name?(i instanceof st.Name?e(o,i,s):t(o,i,s),s):i instanceof st.Name?(t(o,s,i),i):r(i,s);return a===st.Name&&!(c instanceof st.Name)?n(o,c):c}}DM.mergeEvaluated={props:gM({mergeNames:(e,t,r)=>e.if(st._`${r} !== true && ${t} !== undefined`,()=>{e.if(st._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,st._`${r} || {}`).code(st._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(st._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,st._`${r} || {}`),f1(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:vM}),items:gM({mergeNames:(e,t,r)=>e.if(st._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,st._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(st._`${r} !== true`,()=>e.assign(r,t===!0?!0:st._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function vM(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",st._`{}`);if(t!==void 0)f1(e,r,t);return r}DM.evaluatedPropsToName=vM;function f1(e,t,r){Object.keys(r).forEach((n)=>e.assign(st._`${t}${st.getProperty(n)}`,!0))}DM.setEvaluated=f1;var yM={};function Ike(e,t){return e.scopeValue("func",{ref:t,code:yM[t.code]||(yM[t.code]=new $ke._Code(t.code))})}DM.useFunc=Ike;var u1;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(u1||(DM.Type=u1={}));function Tke(e,t,r){if(e instanceof st.Name){let n=t===u1.Num;return r?n?st._`"[" + ${e} + "]"`:st._`"['" + ${e} + "']"`:n?st._`"/" + ${e}`:st._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?st.getProperty(e).toString():"/"+d1(e)}DM.getErrorPath=Tke;function wM(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}DM.checkStrictMode=wM});var bn=g(function(SM){Object.defineProperty(SM,"__esModule",{value:!0});var ar=Ee(),Qke={data:new ar.Name("data"),valCxt:new ar.Name("valCxt"),instancePath:new ar.Name("instancePath"),parentData:new ar.Name("parentData"),parentDataProperty:new ar.Name("parentDataProperty"),rootData:new ar.Name("rootData"),dynamicAnchors:new ar.Name("dynamicAnchors"),vErrors:new ar.Name("vErrors"),errors:new ar.Name("errors"),this:new ar.Name("this"),self:new ar.Name("self"),scope:new ar.Name("scope"),json:new ar.Name("json"),jsonPos:new ar.Name("jsonPos"),jsonLen:new ar.Name("jsonLen"),jsonPart:new ar.Name("jsonPart")};SM.default=Qke});var Nd=g(function(RM){Object.defineProperty(RM,"__esModule",{value:!0});RM.extendErrors=RM.resetErrorsCount=RM.reportExtraError=RM.reportError=RM.keyword$DataError=RM.keywordError=void 0;var Ve=Ee(),dg=Te(),_r=bn();RM.keywordError={message:({keyword:e})=>Ve.str`must pass "${e}" keyword validation`};RM.keyword$DataError={message:({keyword:e,schemaType:t})=>t?Ve.str`"${e}" keyword must be ${t} ($data)`:Ve.str`"${e}" keyword is invalid ($data)`};function tRe(e,t=RM.keywordError,r,n){let{it:o}=e,{gen:i,compositeRule:s,allErrors:a}=o,c=kM(e,t,r);if(n!==null&&n!==void 0?n:s||a)$M(i,c);else CM(o,Ve._`[${c}]`)}RM.reportError=tRe;function rRe(e,t=RM.keywordError,r){let{it:n}=e,{gen:o,compositeRule:i,allErrors:s}=n,a=kM(e,t,r);if($M(o,a),!(i||s))CM(n,_r.default.vErrors)}RM.reportExtraError=rRe;function nRe(e,t){e.assign(_r.default.errors,t),e.if(Ve._`${_r.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(Ve._`${_r.default.vErrors}.length`,t),()=>e.assign(_r.default.vErrors,null)))}RM.resetErrorsCount=nRe;function oRe({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:i}){if(o===void 0)throw Error("ajv implementation error");let s=e.name("err");e.forRange("i",o,_r.default.errors,(a)=>{if(e.const(s,Ve._`${_r.default.vErrors}[${a}]`),e.if(Ve._`${s}.instancePath === undefined`,()=>e.assign(Ve._`${s}.instancePath`,Ve.strConcat(_r.default.instancePath,i.errorPath))),e.assign(Ve._`${s}.schemaPath`,Ve.str`${i.errSchemaPath}/${t}`),i.opts.verbose)e.assign(Ve._`${s}.schema`,r),e.assign(Ve._`${s}.data`,n)})}RM.extendErrors=oRe;function $M(e,t){let r=e.const("err",t);e.if(Ve._`${_r.default.vErrors} === null`,()=>e.assign(_r.default.vErrors,Ve._`[${r}]`),Ve._`${_r.default.vErrors}.push(${r})`),e.code(Ve._`${_r.default.errors}++`)}function CM(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;if(o.$async)r.throw(Ve._`new ${e.ValidationError}(${t})`);else r.assign(Ve._`${n}.errors`,t),r.return(!1)}var ba={keyword:new Ve.Name("keyword"),schemaPath:new Ve.Name("schemaPath"),params:new Ve.Name("params"),propertyName:new Ve.Name("propertyName"),message:new Ve.Name("message"),schema:new Ve.Name("schema"),parentSchema:new Ve.Name("parentSchema")};function kM(e,t,r){let{createErrors:n}=e.it;if(n===!1)return Ve._`{}`;return iRe(e,t,r)}function iRe(e,t,r={}){let{gen:n,it:o}=e,i=[sRe(o,r),aRe(e,r)];return cRe(e,t,i),n.object(...i)}function sRe({errorPath:e},{instancePath:t}){let r=t?Ve.str`${e}${dg.getErrorPath(t,dg.Type.Str)}`:e;return[_r.default.instancePath,Ve.strConcat(_r.default.instancePath,r)]}function aRe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:Ve.str`${t}/${e}`;if(r)o=Ve.str`${o}${dg.getErrorPath(r,dg.Type.Str)}`;return[ba.schemaPath,o]}function cRe(e,{params:t,message:r},n){let{keyword:o,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:d,schemaPath:f}=a;if(n.push([ba.keyword,o],[ba.params,typeof t=="function"?t(e):t||Ve._`{}`]),c.messages)n.push([ba.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([ba.schema,s],[ba.parentSchema,Ve._`${d}${f}`],[_r.default.data,i]);if(u)n.push([ba.propertyName,u])}});var IM=g(function(FM){Object.defineProperty(FM,"__esModule",{value:!0});FM.boolOrEmptySchema=FM.topBoolOrEmptySchema=void 0;var pRe=Nd(),mRe=Ee(),hRe=bn(),gRe={message:"boolean schema is false"};function yRe(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)OM(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(hRe.default.data);else t.assign(mRe._`${n}.errors`,null),t.return(!0)}FM.topBoolOrEmptySchema=yRe;function bRe(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),OM(e);else r.var(t,!0)}FM.boolOrEmptySchema=bRe;function OM(e,t){let{gen:r,data:n}=e;pRe.reportError({gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},gRe,void 0,t)}});var m1=g(function(TM){Object.defineProperty(TM,"__esModule",{value:!0});TM.getRules=TM.isJSONType=void 0;var _Re=["string","number","integer","boolean","null","object","array"],vRe=new Set(_Re);function wRe(e){return typeof e=="string"&&vRe.has(e)}TM.isJSONType=wRe;function DRe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}TM.getRules=DRe});var h1=g(function(MM){Object.defineProperty(MM,"__esModule",{value:!0});MM.shouldUseRule=MM.shouldUseGroup=MM.schemaHasRulesForType=void 0;function SRe({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&jM(e,n)}MM.schemaHasRulesForType=SRe;function jM(e,t){return t.rules.some((r)=>qM(e,r))}MM.shouldUseGroup=jM;function qM(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}MM.shouldUseRule=qM});var jd=g(function(VM){Object.defineProperty(VM,"__esModule",{value:!0});VM.reportTypeError=VM.checkDataTypes=VM.checkDataType=VM.coerceAndCheckDataType=VM.getJSONTypes=VM.getSchemaTypes=VM.DataType=void 0;var kRe=m1(),RRe=h1(),ARe=Nd(),Ce=Ee(),BM=Te(),fl;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(fl||(VM.DataType=fl={}));function ORe(e){let t=UM(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}VM.getSchemaTypes=ORe;function UM(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(kRe.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}VM.getJSONTypes=UM;function FRe(e,t){let{gen:r,data:n,opts:o}=e,i=PRe(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&RRe.schemaHasRulesForType(e,t[0]));if(s){let a=y1(t,n,o.strictNumbers,fl.Wrong);r.if(a,()=>{if(i.length)IRe(e,t,i);else b1(e)})}return s}VM.coerceAndCheckDataType=FRe;var zM=new Set(["string","number","integer","boolean","null"]);function PRe(e,t){return t?e.filter((r)=>zM.has(r)||t==="array"&&r==="array"):[]}function IRe(e,t,r){let{gen:n,data:o,opts:i}=e,s=n.let("dataType",Ce._`typeof ${o}`),a=n.let("coerced",Ce._`undefined`);if(i.coerceTypes==="array")n.if(Ce._`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,Ce._`${o}[0]`).assign(s,Ce._`typeof ${o}`).if(y1(t,o,i.strictNumbers),()=>n.assign(a,o)));n.if(Ce._`${a} !== undefined`);for(let u of r)if(zM.has(u)||u==="array"&&i.coerceTypes==="array")c(u);n.else(),b1(e),n.endIf(),n.if(Ce._`${a} !== undefined`,()=>{n.assign(o,a),TRe(e,a)});function c(u){switch(u){case"string":n.elseIf(Ce._`${s} == "number" || ${s} == "boolean"`).assign(a,Ce._`"" + ${o}`).elseIf(Ce._`${o} === null`).assign(a,Ce._`""`);return;case"number":n.elseIf(Ce._`${s} == "boolean" || ${o} === null
86
86
  || (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,Ce._`+${o}`);return;case"integer":n.elseIf(Ce._`${s} === "boolean" || ${o} === null
87
87
  || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,Ce._`+${o}`);return;case"boolean":n.elseIf(Ce._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf(Ce._`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf(Ce._`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf(Ce._`${s} === "string" || ${s} === "number"
@@ -99,13 +99,13 @@ ${t}`,ISe,TSe,NSe=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,o=PSe.bind(nul
99
99
  `)}var mE=!1;var{spawn:RLe}=globalThis.Bun;async function C(e,t={}){let r={...process.env,GIT_TERMINAL_PROMPT:"0",...t.env};for(let u of t.unsetEnv??[])delete r[u];let n=RLe({cmd:e,cwd:t.cwd,...t.stdin===void 0?{}:{stdin:new TextEncoder().encode(t.stdin)},stdout:"pipe",stderr:"pipe",env:r}),o=!1,i;if(t.timeout)i=setTimeout(()=>{o=!0,n.kill()},t.timeout);if(hE()){let u=t.cwd?` (cwd=${t.cwd})`:"";Tf(l.dim(`$ ${e.join(" ")}${u}`))}let s=await new Response(n.stdout).text(),a=await new Response(n.stderr).text(),c=await n.exited;if(i)clearTimeout(i);if(hE()){if(s.trim())Tf(l.dim(s.trimEnd()));if(a.trim())Tf(l.yellow(a.trimEnd()));Tf(l.dim(`(exit ${c})`))}if(o)return{stdout:s,stderr:a||`Command timed out after ${Math.round(t.timeout/1000)}s`,exitCode:c??1,timedOut:!0};return{stdout:s,stderr:a,exitCode:c,timedOut:!1}}var vt=O(()=>{Xe()});function OLe(){if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";return"linux"}function uY(e,t=OLe()){return e.installInstructions[t]}function FLe(e){let t=e.match(/(\d+\.\d+(?:\.\d+)?)/);return t?t[1]:void 0}function ILe(){let e=Number(process.env.TEST_PROBE_TIMEOUT_MS);return Number.isFinite(e)&&e>0?e:PLe}async function dY(e){try{let{exitCode:t,stdout:r,timedOut:n}=await C(e.cmd,{timeout:ILe()});if(n)return{available:!1,timedOut:!0};if(t!==0)return{available:!1};return{available:!0,version:FLe(r)}}catch(t){let r=t instanceof Error?t.message:String(t);if(!r.includes("ENOENT")&&!r.includes("not found"))console.error(` Warning: ${e.name} check failed unexpectedly: ${r}`);return{available:!1}}}async function Nf(){let e=Object.entries(lY);return Promise.all(e.map(async([t,r])=>{let{available:n,version:o,timedOut:i}=await dY(r);return{key:t,name:r.name,purpose:r.purpose,required:r.required,available:n,version:o,timedOut:i,installInstruction:uY(r)}}))}async function fY(){let t=(await Nf()).filter((r)=>r.required&&!r.available);if(t.length===0)return[];console.warn(`
100
100
  Heads up: some tools NEMAR needs for uploading/validating aren't installed yet:`);for(let r of t)console.warn(` - ${r.name} (${r.purpose})`),console.warn(` Install: ${r.installInstruction}`);return console.warn("Run `nemar doctor` anytime to re-check. You can finish signup without them.\n"),t}async function Pa(e){let r=ALe[e].map((s)=>lY[s]).filter(Boolean),n=await Promise.all(r.map(async(s)=>{let a=await dY(s);return{check:s,available:a.available,timedOut:a.timedOut}}));for(let s of n)if(s.timedOut&&s.check.required)console.warn(`Warning: ${s.check.name} did not respond to a version check in time; continuing anyway.`);let o=n.filter((s)=>!s.available&&!s.timedOut&&s.check.required).map((s)=>({tool:s.check.name,installInstruction:uY(s.check)}));if(o.length===0)return;let i=[`
101
101
  Missing required tools:`];for(let s of o)i.push(` ${s.tool} not installed`),i.push(` Install: ${s.installInstruction}`);throw Error(i.join(`
102
- `))}var lY,ALe,PLe=4000;var jf=O(()=>{vt();lY={git:{name:"git",purpose:"version control for dataset metadata",cmd:["git","--version"],required:!0,installInstructions:{macos:"brew install git (or install Xcode Command Line Tools)",linux:"sudo apt-get install git OR sudo dnf install git",windows:"winget install Git.Git (or https://git-scm.com/download/win)"}},"git-annex":{name:"git-annex",purpose:"large-file data transfer (upload/download)",cmd:["git-annex","version"],required:!0,installInstructions:{macos:"brew install git-annex",linux:"sudo apt-get install git-annex OR sudo dnf install git-annex",windows:"Download the installer from https://git-annex.branchable.com/install/Windows/"}},gh:{name:"GitHub CLI (gh)",purpose:"GitHub authentication + repository operations",cmd:["gh","--version"],required:!0,installInstructions:{macos:"brew install gh",linux:"See https://cli.github.com/manual/installation",windows:"winget install GitHub.cli (or: scoop install gh)"}},aws:{name:"AWS CLI",purpose:"S3 data upload/download",cmd:["aws","--version"],required:!0,installInstructions:{macos:"brew install awscli",linux:"pip install awscli OR sudo snap install aws-cli --classic",windows:"winget install Amazon.AWSCLI (or the MSI from https://aws.amazon.com/cli/)"}},deno:{name:"Deno",purpose:"BIDS validation",cmd:["deno","--version"],required:!0,installInstructions:{macos:"brew install deno (or: curl -fsSL https://deno.land/install.sh | sh)",linux:"curl -fsSL https://deno.land/install.sh | sh",windows:"winget install DenoLand.Deno (or: irm https://deno.land/install.ps1 | iex)"}}},ALe={upload:["git-annex","gh","aws","deno"],download:["gh"],clone:["git","gh"],push:["git-annex","gh"],publish:["gh","aws"],update:["git","gh"],release:["git","gh"]}});var mY;var pY=O(()=>{mY={name:"nemar-cli",version:"0.10.10-dev.2961",description:"CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource) dataset management",type:"module",main:"dist/index.js",bin:{nemar:"dist/index.js"},scripts:{dev:"bun run src/index.ts",build:"bun build src/index.ts --outdir dist --target bun --minify && sed '1s|#!/usr/bin/env node|#!/usr/bin/env bun|' dist/index.js > dist/index.js.tmp && mv dist/index.js.tmp dist/index.js",test:"bun test",lint:"biome check src/","migrations:d1-check":"bun run scripts/d1-migration-check.ts","zarr:geometry-check":"bun run backend/scripts/zarr-geometry-conformance.ts","lint:fix":"biome check --fix src/",format:"biome format --write src/",typecheck:"tsc --noEmit && tsc --noEmit -p backend","generate-openapi":"bun run scripts/generate-openapi.ts",prepublishOnly:"bun run build",prepare:"husky",postinstall:"bun scripts/postinstall-check.mjs",deploy:"wrangler deploy",preview:"wrangler dev"},keywords:["nemar","bids","neuroimaging","eeg","emg","datalad","cli"],author:"NEMAR Team",license:"CC-BY-NC-ND-4.0",repository:{type:"git",url:"git+https://github.com/nemarOrg/nemar-cli.git"},bugs:{url:"https://github.com/nemarOrg/nemar-cli/issues"},homepage:"https://docs.nemar.org",engines:{bun:">=1.0.0"},files:["dist","scripts/postinstall-check.mjs","scripts/recover-datasets.json","scripts/withdrawn-datasets.json","README.md","LICENSE"],dependencies:{chalk:"^5.3.0",commander:"^12.1.0",conf:"^13.0.1",inquirer:"^9.2.15",ora:"^8.0.1",semver:"^7.8.5",zod:"^3.23.8"},"lint-staged":{"src/**/*.{ts,tsx}":["biome check --fix"],"backend/src/**/*.{ts,tsx}":["biome check --fix"]},devDependencies:{"@asteasolutions/zod-to-openapi":"^7.3.4","@biomejs/biome":"1.9.4","@types/bun":"latest","@types/inquirer":"^9.0.7","@types/semver":"^7.8.0",ajv:"^8.20.0","ajv-formats":"^3.0.1",bcryptjs:"^3.0.3",husky:"^9.1.7","lint-staged":"^16.3.2",typescript:"^5.5.4",wrangler:"^4.70.0",yaml:"^2.8.4"}}});var Si;var qf=O(()=>{pY();Si=mY.version});import{mkdirSync as NLe,readdirSync as jLe,unlinkSync as qLe,writeFileSync as MLe}from"fs";import{join as gE}from"path";function _Y(){Fl=!0}function Ia(){return Fl}function vY(e,t=process.env){return e.includes("--debug")||t.NEMAR_DEBUG==="1"}function Lf(e){xY=e,$r(`Step: ${e}`)}function Bf(){yY=!0}function wY(){return yY}function bE(){bY=!0}function DY(){return bY}function $r(e){if(Fl)process.stderr.write(`[debug] ${e}
102
+ `))}var lY,ALe,PLe=4000;var jf=O(()=>{vt();lY={git:{name:"git",purpose:"version control for dataset metadata",cmd:["git","--version"],required:!0,installInstructions:{macos:"brew install git (or install Xcode Command Line Tools)",linux:"sudo apt-get install git OR sudo dnf install git",windows:"winget install Git.Git (or https://git-scm.com/download/win)"}},"git-annex":{name:"git-annex",purpose:"large-file data transfer (upload/download)",cmd:["git-annex","version"],required:!0,installInstructions:{macos:"brew install git-annex",linux:"sudo apt-get install git-annex OR sudo dnf install git-annex",windows:"Download the installer from https://git-annex.branchable.com/install/Windows/"}},gh:{name:"GitHub CLI (gh)",purpose:"GitHub authentication + repository operations",cmd:["gh","--version"],required:!0,installInstructions:{macos:"brew install gh",linux:"See https://cli.github.com/manual/installation",windows:"winget install GitHub.cli (or: scoop install gh)"}},aws:{name:"AWS CLI",purpose:"S3 data upload/download",cmd:["aws","--version"],required:!0,installInstructions:{macos:"brew install awscli",linux:"pip install awscli OR sudo snap install aws-cli --classic",windows:"winget install Amazon.AWSCLI (or the MSI from https://aws.amazon.com/cli/)"}},deno:{name:"Deno",purpose:"BIDS validation",cmd:["deno","--version"],required:!0,installInstructions:{macos:"brew install deno (or: curl -fsSL https://deno.land/install.sh | sh)",linux:"curl -fsSL https://deno.land/install.sh | sh",windows:"winget install DenoLand.Deno (or: irm https://deno.land/install.ps1 | iex)"}}},ALe={upload:["git-annex","gh","aws","deno"],download:["gh"],clone:["git","gh"],push:["git-annex","gh"],publish:["gh","aws"],update:["git","gh"],release:["git","gh"]}});var mY;var pY=O(()=>{mY={name:"nemar-cli",version:"0.10.10-dev.2967",description:"CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource) dataset management",type:"module",main:"dist/index.js",bin:{nemar:"dist/index.js"},scripts:{dev:"bun run src/index.ts",build:"bun build src/index.ts --outdir dist --target bun --minify && sed '1s|#!/usr/bin/env node|#!/usr/bin/env bun|' dist/index.js > dist/index.js.tmp && mv dist/index.js.tmp dist/index.js",test:"bun test",lint:"biome check src/","migrations:d1-check":"bun run scripts/d1-migration-check.ts","zarr:geometry-check":"bun run backend/scripts/zarr-geometry-conformance.ts","lint:fix":"biome check --fix src/",format:"biome format --write src/",typecheck:"tsc --noEmit && tsc --noEmit -p backend","generate-openapi":"bun run scripts/generate-openapi.ts",prepublishOnly:"bun run build",prepare:"husky",postinstall:"bun scripts/postinstall-check.mjs",deploy:"wrangler deploy",preview:"wrangler dev"},keywords:["nemar","bids","neuroimaging","eeg","emg","datalad","cli"],author:"NEMAR Team",license:"CC-BY-NC-ND-4.0",repository:{type:"git",url:"git+https://github.com/nemarOrg/nemar-cli.git"},bugs:{url:"https://github.com/nemarOrg/nemar-cli/issues"},homepage:"https://docs.nemar.org",engines:{bun:">=1.0.0"},files:["dist","scripts/postinstall-check.mjs","scripts/recover-datasets.json","scripts/withdrawn-datasets.json","README.md","LICENSE"],dependencies:{chalk:"^5.3.0",commander:"^12.1.0",conf:"^13.0.1",inquirer:"^9.2.15",ora:"^8.0.1",semver:"^7.8.5",zod:"^3.23.8"},"lint-staged":{"src/**/*.{ts,tsx}":["biome check --fix"],"backend/src/**/*.{ts,tsx}":["biome check --fix"]},devDependencies:{"@asteasolutions/zod-to-openapi":"^7.3.4","@biomejs/biome":"1.9.4","@types/bun":"latest","@types/inquirer":"^9.0.7","@types/semver":"^7.8.0",ajv:"^8.20.0","ajv-formats":"^3.0.1",bcryptjs:"^3.0.3",husky:"^9.1.7","lint-staged":"^16.3.2",typescript:"^5.5.4",wrangler:"^4.70.0",yaml:"^2.8.4"}}});var Si;var qf=O(()=>{pY();Si=mY.version});import{mkdirSync as NLe,readdirSync as jLe,unlinkSync as qLe,writeFileSync as MLe}from"fs";import{join as gE}from"path";function _Y(){Fl=!0}function Ia(){return Fl}function vY(e,t=process.env){return e.includes("--debug")||t.NEMAR_DEBUG==="1"}function Lf(e){xY=e,$r(`Step: ${e}`)}function Bf(){yY=!0}function wY(){return yY}function bE(){bY=!0}function DY(){return bY}function $r(e){if(Fl)process.stderr.write(`[debug] ${e}
103
103
  `)}function zLe(e){let t={};for(let[r,n]of Object.entries(e))t[r]=ULe.has(r.toLowerCase())?"[REDACTED]":n;return t}function SY(e){let t=e.indexOf("@");if(t<=0)return"***";return`${e[0]}***${e.slice(t)}`}function yE(e,t,r=0){if(r>GLe)return"[REDACTED: depth]";if(Array.isArray(t))return t.map((n)=>yE(e,n,r+1));if(t&&typeof t==="object"){let n={};for(let[o,i]of Object.entries(t))n[o]=yE(o,i,r+1);return n}if(typeof t==="string"){if(VLe.test(e))return"[REDACTED]";return t.replace(EY,SY)}return t}function xE(e){return e.replace(HLe,"Bearer [REDACTED]").replace(WLe,"[REDACTED_AWS_KEY]").replace(KLe,"$1[REDACTED]").replace(YLe,"$1$2=[REDACTED]").replace(EY,SY)}function JLe(e){return xE(e)}function hY(e,t=BLe){if(e===void 0)return;let r=e;try{let n=JSON.parse(e);r=JSON.stringify(yE("",n))}catch{}if(r=xE(r),Buffer.byteLength(r,"utf8")>t)r=`${Buffer.from(r,"utf8").subarray(0,t).toString("utf8")}... [truncated]`;return r}function I0(e){if(!Fl)return;let t=JLe(e.url);try{let r={...e,url:t,requestHeaders:e.requestHeaders?zLe(e.requestHeaders):void 0,requestBody:hY(e.requestBody),responseBody:hY(e.responseBody)};P0.push(r),$r(`${e.method} ${t} -> ${e.status??"ERROR"} (${e.durationMs}ms)`)}catch(r){let n=N(r);P0.push({method:e.method,url:t,status:e.status,durationMs:e.durationMs,note:`redaction failed: ${n}`}),$r(`redaction failed for ${e.method} ${t}: ${n}`)}}async function XLe(){let e=[];try{let t=process.versions.bun?`Bun ${process.versions.bun}`:`Node ${process.version}`;e.push(`CLI version: ${Si}`),e.push(`OS/Arch: ${process.platform}/${process.arch}`),e.push(`Runtime: ${t}`)}catch(t){e.push(`(could not read CLI/OS/runtime info: ${N(t)})`)}e.push(""),e.push("Active account:");try{let t=ot();if(t.apiKey){if(t.username)e.push(` Username: ${t.username}`);if(e.push(` API URL: ${t.apiUrl}`),t.role)e.push(` Role: ${t.role}`);e.push(` Sandbox completed: ${!!t.sandboxCompleted}`)}else e.push(" (not authenticated)")}catch(t){e.push(` (could not read account config: ${N(t)})`)}e.push(""),e.push("External tools:");try{let t=await Nf();for(let r of t){let n=r.available?r.version??"installed":r.timedOut?"(timed out)":"not installed";e.push(` ${r.name}: ${n}`)}}catch(t){e.push(` (could not probe external tools: ${N(t)})`)}return e}async function _E(){return(await XLe()).join(`
104
104
  `)}async function $Y(){if(!Fl||F0!==void 0)return;try{F0=await _E()}catch(e){let t=N(e);F0=`(could not build environment report: ${t})`,$r(`environment snapshot failed: ${t}`)}}function CY(e){if(gY.has(e))return{flag:e};for(let t of gY){if(!e.startsWith(t)||e.length<=t.length)continue;if(t.length===2)return{flag:t,kind:"short-attached"};if(e[t.length]==="=")return{flag:t,kind:"long-eq"}}return null}function ZLe(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],o=CY(n);if(!o){t.push(n);continue}if(o.kind==="long-eq")t.push(`${o.flag}=[REDACTED]`);else if(o.kind==="short-attached")t.push(`${o.flag}[REDACTED]`);else if(t.push(n),r+1<e.length)t.push("[REDACTED]"),r++}return t}function QLe(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],o=CY(n);if(!o){t.push(n);continue}if(!o.kind&&r+1<e.length)r++}return t}function eBe(e){let t=[];for(let n of QLe(e)){if(n.startsWith("-"))continue;if(t.push(n),t.length===2)break}return(t.length>0?t.join("-"):"nemar").replace(/[^a-zA-Z0-9_-]/g,"_")}function tBe(e,t){let r=[];if(r.push("NEMAR CLI Debug Log"),r.push(`Generated: ${new Date().toISOString()}`),r.push(`Command: nemar ${xE(ZLe(e).join(" "))}`),r.push(""),r.push(F0??"(environment snapshot unavailable)"),r.push(""),r.push("HTTP requests:"),P0.length===0)r.push(" (none)");else P0.forEach((n,o)=>{if(r.push(` [${o+1}] ${n.method} ${n.url} -> ${n.status??"ERROR"} (${n.durationMs}ms)`),n.error)r.push(` Error: ${n.error}`);if(n.note)r.push(` Note: ${n.note}`);if(n.requestHeaders)r.push(` Request headers: ${JSON.stringify(n.requestHeaders)}`);if(n.requestBody)r.push(` Request body: ${n.requestBody}`);if(n.responseBody)r.push(` Response body: ${n.responseBody}`)});return r.push(""),r.push(`Failing step: ${xY??"(none recorded)"}`),r.push(`Exit code: ${t}`),`${r.join(`
105
105
  `)}
106
106
  `}function rBe(e,t){let r;try{r=jLe(e).filter((o)=>o.startsWith("nemar-")&&o.endsWith(".log"))}catch(o){if(o.code!=="ENOENT")$r(`could not list ${e} for log rotation: ${N(o)}`);return}r.sort();let n=r.length-t;for(let o=0;o<n;o++)try{qLe(gE(e,r[o]))}catch(i){if(i.code!=="ENOENT")$r(`could not remove old log ${r[o]}: ${N(i)}`)}}function kY(){return Mf}function RY(e,t){if(!Fl)return null;let r=gE(vE(),"logs");try{NLe(r,{recursive:!0})}catch(s){return Mf=N(s),$r(`could not create log directory ${r}: ${Mf}`),null}let o=`nemar-${new Date().toISOString().replace(/[:.]/g,"-")}-${eBe(e)}.log`,i=gE(r,o);try{MLe(i,tBe(e,t),"utf8")}catch(s){return Mf=N(s),$r(`could not write log file ${i}: ${Mf}`),null}return rBe(r,LLe),i}var LLe=10,BLe=2048,Fl=!1,yY=!1,bY=!1,xY,F0,P0,ULe,VLe,EY,GLe=32,HLe,WLe,KLe,YLe,gY,Mf;var jo=O(()=>{It();qo();jf();qf();P0=[];ULe=new Set(["authorization","cookie","set-cookie","x-api-key"]);VLe=/^(api[_-]?key|apikey|password|token|secret|access[_-]?key(_id)?|secret[_-]?access[_-]?key|session|session[_-]?token|authorization|ssh[_-]?key|private[_-]?key|device[_-]?code)$/i,EY=/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g;HLe=/Bearer\s+[A-Za-z0-9\-._~+/=]+/gi,WLe=/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,KLe=/((?:aws_)?secret_access_key["']?\s*[:=]\s*["']?)[A-Za-z0-9/+=]{20,}/gi,YLe=/([?&])(X-Amz-Signature|X-Amz-Security-Token|X-Amz-Credential|Signature|AWSAccessKeyId)=[^&\s"']+/gi;gY=new Set(["-k","--key","--password","--api-key"])});import{chmodSync as nBe,copyFileSync as oBe,existsSync as wE,mkdirSync as iBe,statSync as sBe}from"fs";import{homedir as T0}from"os";import{join as Pl}from"path";function cBe(e){let t=e.trim().replace(/\/+$/,"");try{let r=new URL(t);return r.protocol=r.protocol.toLowerCase(),r.host=r.host.toLowerCase(),r.toString().replace(/\/+$/,"")}catch{return console.error(`[nemar] could not parse stored apiUrl ${JSON.stringify(e)}; leaving as-is`),t}}function vE(){return process.env.NEMAR_CONFIG_DIR||Pl(T0(),".config","nemar")}function uBe(e){if(process.env.NEMAR_CONFIG_DIR)return;let t=Pl(e,"config.json");if(wE(t))return;let r=[];if(process.platform==="darwin")r.push(Pl(T0(),"Library","Preferences","nemar-nodejs","config.json"));if(process.platform==="win32"){let n=process.env.APPDATA||Pl(T0(),"AppData","Roaming");r.push(Pl(n,"nemar-nodejs","config.json"))}r.push(Pl(T0(),".config","nemar-nodejs","config.json"));for(let n of r)if(wE(n))try{iBe(e,{recursive:!0}),oBe(n,t),console.error(`[nemar] Config migrated from ${n} to ${t}
107
107
  [nemar] You can safely remove the old file.`);return}catch(o){console.error(`[nemar] Failed to migrate config from ${n}:`,o,`
108
- [nemar] You can manually copy ${n} to ${t}`)}}function Sn(){let e=vE();if(Uf&&AY===e)return Uf;if(uBe(e),Uf=new O0({projectName:"nemar",configFileMode:DE,schema:{activeAccount:{type:"string"},accounts:{type:"object"},apiKey:{type:"string"},apiUrl:{type:"string"},username:{type:"string"},email:{type:"string"},githubUsername:{type:"string"},sandboxCompleted:{type:"boolean"},sandboxDatasetId:{type:"string"}},cwd:e}),AY=e,!OY.has(e))OY.add(e),dBe(Uf.path),pBe(),mBe();return Uf}function dBe(e){if(process.platform==="win32")return;if(!wE(e))return;try{if((sBe(e).mode&511)!==DE)nBe(e,DE)}catch(t){console.error(`[nemar] could not secure config file permissions for ${e}:`,t)}}function pBe(){let e=Sn(),t=e.get("accounts");if(t&&Object.keys(t).length>0)return;let r=e.get("apiKey"),n=e.get("username");if(!r&&!n)return;try{let o=n||"default",i={};for(let s of fBe){let a=e.get(s);if(a!==void 0)i[s]=a}e.store={activeAccount:o,accounts:{[o]:i}}}catch(o){console.error("Config migration failed (legacy config preserved):",o)}}function mBe(){let e=Sn(),t=e.store,r=t.accounts,n=!1;if(r)for(let[i,s]of Object.entries(r)){let a=s?.apiUrl;if(!a)continue;if(aBe.has(cBe(a)))r[i]={...s,apiUrl:Il},console.error(`[nemar] migrated stored apiUrl for account "${i}": ${a} -> ${Il}`),n=!0}let o=t.apiUrl;if(r&&Object.keys(r).length>0&&o!==void 0){let{apiUrl:i,...s}=t;try{e.store=s,console.error(`[nemar] removed stale top-level apiUrl from config (was: ${o})`),n=!1}catch(a){console.error("API URL cleanup failed (config file unchanged):",a)}}if(n)try{e.store={...e.store,accounts:r}}catch(i){console.error("API URL migration failed (config file unchanged):",i)}}function zf(){return Sn().get("activeAccount")}function Ts(){return Sn().get("accounts")||{}}function ot(){let e={apiUrl:Il},t=zf();if(!t)return e;return Ts()[t]||e}function wt(e,t){let r=Sn(),n=r.get("activeAccount")||"default",o=r.get("accounts")||{};if(!o[n])o[n]={apiUrl:Il};o[n][e]=t,r.store={...r.store,accounts:o,activeAccount:n}}function Vf(e){let t=zf();if(!t)return;let r=Ts();if(r[t])delete r[t][e],Sn().set("accounts",r)}function FY(){let e=Sn(),t=zf();if(!t){e.clear();return}let r=Ts();delete r[t];let n=Object.keys(r);if(n.length>0)e.store={...e.store,accounts:r,activeAccount:n[0]};else e.clear()}function PY(){Sn().clear()}function je(){return!!ot().apiKey}function EE(){return Sn().path}function Gf(){let e=Ts(),t=zf();return Object.entries(e).map(([r,n])=>({key:r,username:n.username,email:n.email,githubUsername:n.githubUsername,active:r===t,keySource:n.keySource}))}function IY(e){return e.username?.trim()||e.email}function hBe(e){let t=e.trim().toLowerCase();if(!t)return;let r=Object.entries(Ts()).filter(([,n])=>n.email&&n.email.toLowerCase()===t).map(([n])=>n);if(r.length>1){$r(`findAccountKeyByEmail: ${r.length} accounts share email ${t}: ${r.join(", ")}`);return}return r[0]}function TY(e,t){let r=Sn(),n=Ts(),o;if(n[e])o=e;else if(t.email)o=hBe(t.email);let i=o?n[o]:void 0,s={...i??{apiUrl:Il},...t};if(o&&o!==e)delete n[o];return n[e]=s,r.store={...r.store,accounts:n,activeAccount:e},{key:e,previous:i}}function NY(e){let t=e.trim();if(!t)return"unchanged";let r=Sn(),n=zf();if(!n||n===t)return"unchanged";let o=Ts(),i=o[n];if(!i)return"unchanged";if(o[t])return"key_taken";return delete o[n],o[t]={...i,username:t},r.store={...r.store,accounts:o,activeAccount:t},"renamed"}function SE(e){let t=Sn(),r=Ts();if(r[e])return t.store={...t.store,activeAccount:e},r[e];for(let[n,o]of Object.entries(r))if(o.githubUsername===e)return t.store={...t.store,activeAccount:n},o;return null}var Il="https://nemar-api-dev.sccn-org.workers.dev",DE=384,aBe,lBe,iht,Uf=null,AY=null,OY,fBe;var qo=O(()=>{aY();en();Cd();jo();aBe=new Set(["https://api.osc.earth/nemar","https://nemar-api.neuromechanist.workers.dev","https://nemar-api-dev.shirazi-10f.workers.dev"]);lBe=U({field:w(),blocks:ne(w()).optional(),set_on:ne(w()).optional()}).passthrough(),iht=U({apiKey:w().optional(),apiUrl:w().url().default(Il),username:w().optional(),email:w().email().optional(),githubUsername:w().optional(),sandboxCompleted:be().optional(),sandboxDatasetId:w().optional(),dismissedNoticeIds:ne(k()).optional(),serviceAccess:be().optional(),profileGaps:ne(lBe).optional(),orcidVerified:be().optional(),role:w().optional(),accountKind:$d.optional(),pendingEmailChange:w().email().optional()});OY=new Set;fBe=["apiKey","apiUrl","username","email","githubUsername","sandboxCompleted","sandboxDatasetId","dismissedNoticeIds"]});function N0(e){if(jY)return;jY=!0;let t=l.yellow("\u2500".repeat(60)),r=l.yellow.bold("[MAINTENANCE]"),n=l.dim(`mode: ${e.mode}`),o=e.eta?`
108
+ [nemar] You can manually copy ${n} to ${t}`)}}function Sn(){let e=vE();if(Uf&&AY===e)return Uf;if(uBe(e),Uf=new O0({projectName:"nemar",configFileMode:DE,schema:{activeAccount:{type:"string"},accounts:{type:"object"},apiKey:{type:"string"},apiUrl:{type:"string"},username:{type:"string"},email:{type:"string"},githubUsername:{type:"string"},sandboxCompleted:{type:"boolean"},sandboxDatasetId:{type:"string"}},cwd:e}),AY=e,!OY.has(e))OY.add(e),dBe(Uf.path),pBe(),mBe();return Uf}function dBe(e){if(process.platform==="win32")return;if(!wE(e))return;try{if((sBe(e).mode&511)!==DE)nBe(e,DE)}catch(t){console.error(`[nemar] could not secure config file permissions for ${e}:`,t)}}function pBe(){let e=Sn(),t=e.get("accounts");if(t&&Object.keys(t).length>0)return;let r=e.get("apiKey"),n=e.get("username");if(!r&&!n)return;try{let o=n||"default",i={};for(let s of fBe){let a=e.get(s);if(a!==void 0)i[s]=a}e.store={activeAccount:o,accounts:{[o]:i}}}catch(o){console.error("Config migration failed (legacy config preserved):",o)}}function mBe(){let e=Sn(),t=e.store,r=t.accounts,n=!1;if(r)for(let[i,s]of Object.entries(r)){let a=s?.apiUrl;if(!a)continue;if(aBe.has(cBe(a)))r[i]={...s,apiUrl:Il},console.error(`[nemar] migrated stored apiUrl for account "${i}": ${a} -> ${Il}`),n=!0}let o=t.apiUrl;if(r&&Object.keys(r).length>0&&o!==void 0){let{apiUrl:i,...s}=t;try{e.store=s,console.error(`[nemar] removed stale top-level apiUrl from config (was: ${o})`),n=!1}catch(a){console.error("API URL cleanup failed (config file unchanged):",a)}}if(n)try{e.store={...e.store,accounts:r}}catch(i){console.error("API URL migration failed (config file unchanged):",i)}}function zf(){return Sn().get("activeAccount")}function Ts(){return Sn().get("accounts")||{}}function ot(){let e={apiUrl:Il},t=zf();if(!t)return e;return Ts()[t]||e}function wt(e,t){let r=Sn(),n=r.get("activeAccount")||"default",o=r.get("accounts")||{};if(!o[n])o[n]={apiUrl:Il};o[n][e]=t,r.store={...r.store,accounts:o,activeAccount:n}}function Vf(e){let t=zf();if(!t)return;let r=Ts();if(r[t])delete r[t][e],Sn().set("accounts",r)}function FY(){let e=Sn(),t=zf();if(!t){e.clear();return}let r=Ts();delete r[t];let n=Object.keys(r);if(n.length>0)e.store={...e.store,accounts:r,activeAccount:n[0]};else e.clear()}function PY(){Sn().clear()}function je(){return!!ot().apiKey}function EE(){return Sn().path}function Gf(){let e=Ts(),t=zf();return Object.entries(e).map(([r,n])=>({key:r,username:n.username,email:n.email,githubUsername:n.githubUsername,active:r===t,keySource:n.keySource}))}function IY(e){return e.username?.trim()||e.email}function hBe(e){let t=e.trim().toLowerCase();if(!t)return;let r=Object.entries(Ts()).filter(([,n])=>n.email&&n.email.toLowerCase()===t).map(([n])=>n);if(r.length>1){$r(`findAccountKeyByEmail: ${r.length} accounts share email ${t}: ${r.join(", ")}`);return}return r[0]}function TY(e,t){let r=Sn(),n=Ts(),o;if(n[e])o=e;else if(t.email)o=hBe(t.email);let i=o?n[o]:void 0,s={...i??{apiUrl:Il},...t};if(o&&o!==e)delete n[o];return n[e]=s,r.store={...r.store,accounts:n,activeAccount:e},{key:e,previous:i}}function NY(e){let t=e.trim();if(!t)return"unchanged";let r=Sn(),n=zf();if(!n||n===t)return"unchanged";let o=Ts(),i=o[n];if(!i)return"unchanged";if(o[t])return"key_taken";return delete o[n],o[t]={...i,username:t},r.store={...r.store,accounts:o,activeAccount:t},"renamed"}function SE(e){let t=Sn(),r=Ts();if(r[e])return t.store={...t.store,activeAccount:e},r[e];for(let[n,o]of Object.entries(r))if(o.githubUsername===e)return t.store={...t.store,activeAccount:n},o;return null}var Il="https://nemar-api-dev.sccn-org.workers.dev",DE=384,aBe,lBe,iht,Uf=null,AY=null,OY,fBe;var qo=O(()=>{aY();en();Cd();jo();aBe=new Set(["https://api.osc.earth/nemar","https://nemar-api.neuromechanist.workers.dev","https://nemar-api-dev.shirazi-10f.workers.dev"]);lBe=U({field:w(),blocks:te(w()).optional(),set_on:te(w()).optional()}).passthrough(),iht=U({apiKey:w().optional(),apiUrl:w().url().default(Il),username:w().optional(),email:w().email().optional(),githubUsername:w().optional(),sandboxCompleted:be().optional(),sandboxDatasetId:w().optional(),dismissedNoticeIds:te(k()).optional(),serviceAccess:be().optional(),profileGaps:te(lBe).optional(),orcidVerified:be().optional(),role:w().optional(),accountKind:$d.optional(),pendingEmailChange:w().email().optional()});OY=new Set;fBe=["apiKey","apiUrl","username","email","githubUsername","sandboxCompleted","sandboxDatasetId","dismissedNoticeIds"]});function N0(e){if(jY)return;jY=!0;let t=l.yellow("\u2500".repeat(60)),r=l.yellow.bold("[MAINTENANCE]"),n=l.dim(`mode: ${e.mode}`),o=e.eta?`
109
109
  ${l.dim(`eta: ${e.eta}`)}`:"";process.stderr.write(`${t}
110
110
  ${r} ${e.message}
111
111
  ${n}${o}
@@ -148,7 +148,7 @@ ${h.join(`
148
148
  `)}
149
149
  `,{exitCode:m,stderr:p}=await C(["git","annex","setpresentkey","--batch"],{cwd:e,stdin:f});if(m!==0)console.warn(`[git-annex] setpresentkey --batch exited ${m} for ${d.length} key(s): ${p.trim().slice(0,300)}`)}let s=await yGe(e,r),a=s===null?t:t.filter((u)=>s.has(u)!==n),c=[];for(let u of a){let d=await bGe(e,u,r);if(d===null||d!==n)c.push(u)}return{success:t.length-c.length,failed:c.length,missing:c.slice(0,10)}}async function xee(e,t){let r=new Map;if(t.length===0)return r;for(let n of Yl(t)){let{stdout:o,exitCode:i,stderr:s}=await C(["git","annex","find","--format=${key}\\t${file}\\n","--",...n],{cwd:e});if(i!==0)throw Error(`git annex find failed: ${s.trim()||`exit ${i}`}`);for(let a of o.split(`
150
150
  `)){if(!a)continue;let c=a.indexOf("\t");if(c<=0)continue;r.set(a.slice(c+1),a.slice(0,c))}}return r}async function Jl(e){let{stdout:t,exitCode:r,stderr:n}=await C(["git","annex","find","--include","*","--format=${key}\\t${file}\\n"],{cwd:e});if(r!==0)throw Error(`git annex find failed: ${n.trim()||`exit ${r}`}`);let o=new Map;for(let i of t.split(`
151
- `)){if(!i)continue;let s=i.indexOf("\t");if(s<=0)continue;o.set(i.slice(s+1),i.slice(0,s))}return o}async function _ee(e,t,r,n=4,o){if(r.length===0)return{success:!0,filesCopied:0};let i=rp(o),s=0;try{for(let a of Yl(r)){let{stdout:c,stderr:u,exitCode:d}=await C(["git","annex","copy","--to",t,"-J",n.toString(),"--",...a],{cwd:e,env:i});if(d!==0)return{success:!1,error:mee(c,u),filesCopied:s};let f=c.match(/^copy .+ ok$/gm);s+=f?f.length:0}return{success:!0,filesCopied:s}}catch(a){return{success:!1,error:(a instanceof Error?a.message:String(a))||"Unknown error during copy",filesCopied:s}}}var aee=10,fGe,pGe,gGe,y2=20;var kn=O(()=>{Vo();ja();Wl();vt();Oi();fGe=/not found|nosuchkey|no such key|does not exist/i,pGe=/access ?denied|forbidden|unauthori[sz]ed|invalid[^\n]*(key|token|credential)|expired|signaturedoesnotmatch|requesttimetooskewed|slow ?down|serviceunavailable|internalerror|throttl|could ?n[o']?t connect|connection (refused|reset|timed ?out)|network is unreachable|(?:could not |unable to )?resolve host|timed ?out/i;gGe=/fail|error|denied|forbidden|entitytoolarge|too large|multipart|exceed|timed?\s*out|not\s+enough|no\s+space|access\s+key/i});function Rr(){if(!je())console.log(l.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1)}function nn(e,t,r){e.fail(t),console.log(l.red(` ${N(r)}`)),Lf(t)}function w2(e){let{filesDownloaded:t,filesUnavailable:r,unavailablePaths:n}=e;console.log(l.yellow(`Downloaded ${t} file(s); ${r} file(s) are not available from the archive.`));for(let i of n)console.log(l.dim(` ${i}`));let o=n.length;if(r>o&&o>0)console.log(l.dim(` ... and ${r-o} more`));console.log(l.dim(" This is not a problem with your connection or credentials.")),console.log(l.dim(" Per-file detail, including why each file is missing:")),console.log(l.dim(" .nemar/availability-report.json"))}function D2(e=0){let t=e>0?` ${e} of the fetched file(s) declare no size in their key and could be verified by neither hash nor size.`:"";console.error(l.yellow(`Note: --no-verify skipped checksum verification. Sizes were still checked; file contents were not.${t}`))}function op(e){for(let t of e)console.error(l.red(` ${t}`))}var Xl=O(()=>{Xe();It();qo();jo()});import{existsSync as vee,mkdirSync as xGe,readFileSync as _Ge,writeFileSync as vGe}from"fs";import{join as wee}from"path";function E2(e){return wee(e,wGe)}function Dee(e){return wee(E2(e),DGe)}function EGe(e){if(!e||typeof e!=="object")return!1;let t=e;return typeof t.dataset_id==="string"&&t.dataset_id.length>0&&typeof t.github_url==="string"&&typeof t.ssh_url==="string"&&typeof t.s3_prefix==="string"&&typeof t.s3_config==="object"&&t.s3_config!==null&&typeof t.created_at==="string"}function S2(e){let t=Dee(e);if(!vee(t))return null;try{let r=_Ge(t,"utf-8"),n=JSON.parse(r);if(!EGe(n))return console.error(`Warning: Local config at ${t} is invalid or corrupted`),console.error(` Delete it to start fresh: rm -rf ${E2(e)}`),null;return n}catch(r){let n=r instanceof Error?r.message:String(r);return console.error(`Warning: Could not read local config at ${t}`),console.error(` Error: ${n}`),null}}function $2(e,t){let r=E2(e),n=Dee(e);try{if(!vee(r))xGe(r,{recursive:!0});return vGe(n,JSON.stringify(t,null,2)),!0}catch(o){let i=o instanceof Error?o.message:String(o);return console.error(`Warning: Could not save local config to ${n}`),console.error(` Error: ${i}`),console.error(" Resume capability will not be available for this dataset."),!1}}function Eee(e){let t=S2(e);if(!t)return!1;return t.last_upload_at=new Date().toISOString(),$2(e,t)}var wGe=".nemar",DGe="config.json";var Sy=()=>{};import{existsSync as C2,mkdirSync as SGe,readFileSync as $Ge,unlinkSync as CGe,writeFileSync as kGe}from"fs";import{join as See}from"path";function k2(e){return See(e,$ee,RGe)}function Cee(e,t,r){let n=new Date().toISOString(),o={dataset_id:t,started_at:n,updated_at:n,files:{},completed_steps:[]};for(let i of r)o.files[i.path]={status:"pending",size:i.size,mtimeMs:i.mtimeMs,updated_at:n};return Vr(e,o),o}function kee(e){let t=k2(e);if(!C2(t))return null;try{let r=$Ge(t,"utf-8"),n=JSON.parse(r);if(!IGe(n))return console.warn(`Warning: Upload progress file is invalid or corrupted (${t})`),console.warn(" Use --restart to clear progress and start fresh."),null;return n}catch(r){let n=r instanceof Error?r.message:String(r);return console.warn(`Warning: Could not read upload progress (${t}): ${n}`),console.warn(" Use --restart to clear progress and start fresh."),null}}function Vr(e,t){let r=See(e,$ee),n=k2(e);try{if(!C2(r))SGe(r,{recursive:!0});return t.updated_at=new Date().toISOString(),kGe(n,JSON.stringify(t,null,2)),!0}catch(o){let i=o instanceof Error?o.message:String(o);return console.warn(`Warning: Could not save upload progress (${n}): ${i}`),console.warn(" If the upload is interrupted, resume may not work correctly."),!1}}function Ree(e,t,r){let n=e.files[t];if(n){if(n.status="uploaded",n.updated_at=new Date().toISOString(),n.error=void 0,r){if(n.size=r.size,r.mtimeMs!==void 0)n.mtimeMs=r.mtimeMs}}}function zs(e,t){if(!e.completed_steps.includes(t))e.completed_steps.push(t)}function no(e,t){return e.completed_steps.includes(t)}function Zl(e,t){e.completed_steps=e.completed_steps.filter((r)=>r!==t)}function Aee(e,t){return t.some((r)=>Oee(e.files[r.path],r))}function Oee(e,t){if(!e)return!0;if(e.size!==t.size)return!0;if(t.mtimeMs!==void 0&&e.mtimeMs!==t.mtimeMs)return!0;return!1}function Fee(e,t){return t.filter((r)=>{let n=e.files[r.path];return!n||n.status!=="uploaded"||Oee(n,r)})}function ip(e){let t=k2(e);try{if(C2(t))CGe(t);return!0}catch(r){let n=r instanceof Error?r.message:String(r);return console.warn(`Warning: Could not clear upload progress (${t}): ${n}`),!1}}function Pee(e){let t=Object.values(e.files),r=0,n=0,o=0;for(let i of t)switch(i.status){case"uploaded":r++;break;case"failed":n++;break;case"pending":o++;break}return{total:t.length,uploaded:r,failed:n,pending:o,completedSteps:e.completed_steps}}function IGe(e){return PGe.safeParse(e).success}var $ee=".nemar",RGe="upload-progress.json",AGe,OGe,FGe,PGe;var $y=O(()=>{en();AGe=Ze(["pending","uploaded","failed"]),OGe=Ze(["tracking","s3_upload","url_registration","metadata_write","dataset_save","github_push","ci_deploy"]),FGe=U({status:AGe,size:k().nonnegative(),mtimeMs:k().nonnegative().optional(),updated_at:w()}),PGe=U({dataset_id:w().min(1),started_at:w(),updated_at:w(),files:ma(w(),FGe),completed_steps:ne(OGe)})});function Ut(e){return{status:"ok",value:e}}var lt,Iee;var sp=O(()=>{lt={status:"fail"},Iee={status:"stop"}});import{existsSync as TGe,readFileSync as NGe,writeFileSync as jGe}from"fs";import{resolve as qGe}from"path";function MGe(e){let t=e?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/);return t?t[1].replace(/\.git$/,""):null}function LGe(e){try{let t=qGe(e,".gitignore"),r="";if(TGe(t))r=NGe(t,"utf-8");if(!r.includes(".nemar/")){let n=r?`${r.trimEnd()}
151
+ `)){if(!i)continue;let s=i.indexOf("\t");if(s<=0)continue;o.set(i.slice(s+1),i.slice(0,s))}return o}async function _ee(e,t,r,n=4,o){if(r.length===0)return{success:!0,filesCopied:0};let i=rp(o),s=0;try{for(let a of Yl(r)){let{stdout:c,stderr:u,exitCode:d}=await C(["git","annex","copy","--to",t,"-J",n.toString(),"--",...a],{cwd:e,env:i});if(d!==0)return{success:!1,error:mee(c,u),filesCopied:s};let f=c.match(/^copy .+ ok$/gm);s+=f?f.length:0}return{success:!0,filesCopied:s}}catch(a){return{success:!1,error:(a instanceof Error?a.message:String(a))||"Unknown error during copy",filesCopied:s}}}var aee=10,fGe,pGe,gGe,y2=20;var kn=O(()=>{Vo();ja();Wl();vt();Oi();fGe=/not found|nosuchkey|no such key|does not exist/i,pGe=/access ?denied|forbidden|unauthori[sz]ed|invalid[^\n]*(key|token|credential)|expired|signaturedoesnotmatch|requesttimetooskewed|slow ?down|serviceunavailable|internalerror|throttl|could ?n[o']?t connect|connection (refused|reset|timed ?out)|network is unreachable|(?:could not |unable to )?resolve host|timed ?out/i;gGe=/fail|error|denied|forbidden|entitytoolarge|too large|multipart|exceed|timed?\s*out|not\s+enough|no\s+space|access\s+key/i});function Rr(){if(!je())console.log(l.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1)}function nn(e,t,r){e.fail(t),console.log(l.red(` ${N(r)}`)),Lf(t)}function w2(e){let{filesDownloaded:t,filesUnavailable:r,unavailablePaths:n}=e;console.log(l.yellow(`Downloaded ${t} file(s); ${r} file(s) are not available from the archive.`));for(let i of n)console.log(l.dim(` ${i}`));let o=n.length;if(r>o&&o>0)console.log(l.dim(` ... and ${r-o} more`));console.log(l.dim(" This is not a problem with your connection or credentials.")),console.log(l.dim(" Per-file detail, including why each file is missing:")),console.log(l.dim(" .nemar/availability-report.json"))}function D2(e=0){let t=e>0?` ${e} of the fetched file(s) declare no size in their key and could be verified by neither hash nor size.`:"";console.error(l.yellow(`Note: --no-verify skipped checksum verification. Sizes were still checked; file contents were not.${t}`))}function op(e){for(let t of e)console.error(l.red(` ${t}`))}var Xl=O(()=>{Xe();It();qo();jo()});import{existsSync as vee,mkdirSync as xGe,readFileSync as _Ge,writeFileSync as vGe}from"fs";import{join as wee}from"path";function E2(e){return wee(e,wGe)}function Dee(e){return wee(E2(e),DGe)}function EGe(e){if(!e||typeof e!=="object")return!1;let t=e;return typeof t.dataset_id==="string"&&t.dataset_id.length>0&&typeof t.github_url==="string"&&typeof t.ssh_url==="string"&&typeof t.s3_prefix==="string"&&typeof t.s3_config==="object"&&t.s3_config!==null&&typeof t.created_at==="string"}function S2(e){let t=Dee(e);if(!vee(t))return null;try{let r=_Ge(t,"utf-8"),n=JSON.parse(r);if(!EGe(n))return console.error(`Warning: Local config at ${t} is invalid or corrupted`),console.error(` Delete it to start fresh: rm -rf ${E2(e)}`),null;return n}catch(r){let n=r instanceof Error?r.message:String(r);return console.error(`Warning: Could not read local config at ${t}`),console.error(` Error: ${n}`),null}}function $2(e,t){let r=E2(e),n=Dee(e);try{if(!vee(r))xGe(r,{recursive:!0});return vGe(n,JSON.stringify(t,null,2)),!0}catch(o){let i=o instanceof Error?o.message:String(o);return console.error(`Warning: Could not save local config to ${n}`),console.error(` Error: ${i}`),console.error(" Resume capability will not be available for this dataset."),!1}}function Eee(e){let t=S2(e);if(!t)return!1;return t.last_upload_at=new Date().toISOString(),$2(e,t)}var wGe=".nemar",DGe="config.json";var Sy=()=>{};import{existsSync as C2,mkdirSync as SGe,readFileSync as $Ge,unlinkSync as CGe,writeFileSync as kGe}from"fs";import{join as See}from"path";function k2(e){return See(e,$ee,RGe)}function Cee(e,t,r){let n=new Date().toISOString(),o={dataset_id:t,started_at:n,updated_at:n,files:{},completed_steps:[]};for(let i of r)o.files[i.path]={status:"pending",size:i.size,mtimeMs:i.mtimeMs,updated_at:n};return Vr(e,o),o}function kee(e){let t=k2(e);if(!C2(t))return null;try{let r=$Ge(t,"utf-8"),n=JSON.parse(r);if(!IGe(n))return console.warn(`Warning: Upload progress file is invalid or corrupted (${t})`),console.warn(" Use --restart to clear progress and start fresh."),null;return n}catch(r){let n=r instanceof Error?r.message:String(r);return console.warn(`Warning: Could not read upload progress (${t}): ${n}`),console.warn(" Use --restart to clear progress and start fresh."),null}}function Vr(e,t){let r=See(e,$ee),n=k2(e);try{if(!C2(r))SGe(r,{recursive:!0});return t.updated_at=new Date().toISOString(),kGe(n,JSON.stringify(t,null,2)),!0}catch(o){let i=o instanceof Error?o.message:String(o);return console.warn(`Warning: Could not save upload progress (${n}): ${i}`),console.warn(" If the upload is interrupted, resume may not work correctly."),!1}}function Ree(e,t,r){let n=e.files[t];if(n){if(n.status="uploaded",n.updated_at=new Date().toISOString(),n.error=void 0,r){if(n.size=r.size,r.mtimeMs!==void 0)n.mtimeMs=r.mtimeMs}}}function zs(e,t){if(!e.completed_steps.includes(t))e.completed_steps.push(t)}function no(e,t){return e.completed_steps.includes(t)}function Zl(e,t){e.completed_steps=e.completed_steps.filter((r)=>r!==t)}function Aee(e,t){return t.some((r)=>Oee(e.files[r.path],r))}function Oee(e,t){if(!e)return!0;if(e.size!==t.size)return!0;if(t.mtimeMs!==void 0&&e.mtimeMs!==t.mtimeMs)return!0;return!1}function Fee(e,t){return t.filter((r)=>{let n=e.files[r.path];return!n||n.status!=="uploaded"||Oee(n,r)})}function ip(e){let t=k2(e);try{if(C2(t))CGe(t);return!0}catch(r){let n=r instanceof Error?r.message:String(r);return console.warn(`Warning: Could not clear upload progress (${t}): ${n}`),!1}}function Pee(e){let t=Object.values(e.files),r=0,n=0,o=0;for(let i of t)switch(i.status){case"uploaded":r++;break;case"failed":n++;break;case"pending":o++;break}return{total:t.length,uploaded:r,failed:n,pending:o,completedSteps:e.completed_steps}}function IGe(e){return PGe.safeParse(e).success}var $ee=".nemar",RGe="upload-progress.json",AGe,OGe,FGe,PGe;var $y=O(()=>{en();AGe=Ze(["pending","uploaded","failed"]),OGe=Ze(["tracking","s3_upload","url_registration","metadata_write","dataset_save","github_push","ci_deploy"]),FGe=U({status:AGe,size:k().nonnegative(),mtimeMs:k().nonnegative().optional(),updated_at:w()}),PGe=U({dataset_id:w().min(1),started_at:w(),updated_at:w(),files:ma(w(),FGe),completed_steps:te(OGe)})});function Ut(e){return{status:"ok",value:e}}var lt,Iee;var sp=O(()=>{lt={status:"fail"},Iee={status:"stop"}});import{existsSync as TGe,readFileSync as NGe,writeFileSync as jGe}from"fs";import{resolve as qGe}from"path";function MGe(e){let t=e?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/);return t?t[1].replace(/\.git$/,""):null}function LGe(e){try{let t=qGe(e,".gitignore"),r="";if(TGe(t))r=NGe(t,"utf-8");if(!r.includes(".nemar/")){let n=r?`${r.trimEnd()}
152
152
  .nemar/
153
153
  `:`.nemar/
154
154
  `;jGe(t,n)}}catch(t){console.log(l.yellow(` Warning: Could not update .gitignore: ${N(t)}`))}}async function Tee(e,t,r,n,o,i){let s,a=o!==null,c;if(a){c=D(`Resuming upload for ${o.dataset_id}...`).start();try{await Tt(o.dataset_id),s={dataset_id:o.dataset_id,ssh_url:o.ssh_url,s3_prefix:o.s3_prefix,github_url:o.github_url,upload_urls:{},s3_config:o.s3_config},c.succeed(`Resuming upload: ${s.dataset_id}`)}catch(u){if(nn(c,"Failed to resume upload",u),u instanceof L&&u.statusCode===404)console.log(l.yellow(" The dataset may have been deleted. Try uploading as a new dataset.")),console.log(l.dim(` Remove ${e}/.nemar to start fresh.`));return lt}}else{c=D("Creating dataset in NEMAR...").start();try{let u=await U0({name:r,description:t.description,files:n.map((f)=>({path:f.path,size:f.size,type:f.type})),attestation:i,dataset_id:t.datasetId});s={dataset_id:u.dataset.dataset_id,ssh_url:u.dataset.ssh_url,s3_prefix:u.dataset.s3_prefix,github_url:u.dataset.github_url,upload_urls:u.upload_urls||{},s3_config:u.s3_config};let d={dataset_id:s.dataset_id,github_url:s.github_url,ssh_url:s.ssh_url,s3_prefix:s.s3_prefix,s3_config:s.s3_config,created_at:new Date().toISOString()};if($2(e,d),u.resumed)c.succeed(`Resumed existing dataset: ${s.dataset_id}`);else c.succeed(`Dataset created: ${s.dataset_id}`),await new Promise((f)=>setTimeout(f,1e4))}catch(u){return nn(c,"Failed to create dataset",u),lt}}return Ut(s)}async function Nee(e){let t=D("Accepting GitHub repository invitation...").start(),r=MGe(e.github_url);if(!r)return t.fail("Invalid GitHub repository URL from backend"),console.log(l.red(` Received: ${e.github_url||"(empty)"}`)),console.log(l.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),lt;let n=await J0(r);if(n.accepted)if(n.alreadyCollaborator)t.succeed("Already a collaborator on this repository");else t.succeed("GitHub invitation accepted");else t.warn("Could not auto-accept invitation"),console.log(l.yellow(` ${n.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(l.cyan(` https://github.com/${r}/invitations`)),console.log();return Ut()}async function jee(e,t){let r=D("Initializing git-annex dataset...").start();if(!await ro(e)){let a=await Kl(e,{author:t});if(!a.success)return nn(r,"Failed to initialize git-annex dataset",a.error),lt}let o=await oee(e);if(!o.success)return nn(r,"Failed to initialize git-annex",o.error),lt;let i=await Ls(e);if(!i.success)r.warn("Could not configure largefiles pattern"),console.log(l.dim(` ${i.error}`));r.succeed("git-annex dataset initialized");let s=await Bo(e);if(s?.startsWith("adjusted/"))console.log(l.dim(` Note: Your local branch is "${s}".`)),console.log(l.dim(" This is normal; it keeps files unlocked so you can work with them directly.")),console.log(l.dim(' Pushes will go to the "main" branch on GitHub automatically.'));return LGe(e),Ut()}async function qee(e,t,r){let n=D("Configuring GitHub remote...").start(),o=await Mo(e,t.ssh_url);if(!o.success)return nn(n,"Failed to configure GitHub remote",o.error),lt;if(n.succeed("GitHub remote configured"),!await X0(e,{yes:r.yes}))return lt;return Ut()}async function R2(e){let{stdout:t,stderr:r,exitCode:n}=await C(["git","ls-files","-z"],{cwd:e});if(n!==0)throw Error(r.trim()||"git ls-files failed");return new Set(t.split("\x00").filter(Boolean))}async function Ql(e,t){let r=t?["git","annex","find","--in",t]:["git","annex","find","--include","*"],{stdout:n,stderr:o,exitCode:i}=await C(r,{cwd:e});if(i!==0)throw Error(o.trim()||"git annex find failed");return new Set(n.split(`
@@ -1018,7 +1018,7 @@ Examples:
1018
1018
  `)[0]}`)}r.push("")}if(o.length>0){r.push(t?"\x1B[33mWarnings:\x1B[0m":"Warnings:");for(let a of o){let c=t?`\x1B[33m${a.code}\x1B[0m`:a.code,u=e.codeMessages[a.code]?.split(`
1019
1019
  `)[0]||"";r.push(` ${c}: ${u}`),r.push(` ${a.location}`)}r.push("")}if(r.push("Summary:"),r.push(` Files: ${e.summary.totalFiles}`),r.push(` Size: ${gq(e.summary.size)}`),e.summary.subjects.length>0)r.push(` Subjects: ${e.summary.subjects.length}`);if(e.summary.sessions.length>0)r.push(` Sessions: ${e.summary.sessions.length}`);if(e.summary.tasks.length>0)r.push(` Tasks: ${e.summary.tasks.join(", ")}`);if(e.summary.modalities.length>0)r.push(` Modalities: ${e.summary.modalities.join(", ")}`);r.push(` Schema: BIDS ${e.summary.schemaVersion}`),r.push("");let i=e.errorCount===1?"error":"errors",s=e.warningCount===1?"warning":"warnings";return r.push(`${e.errorCount} ${i}, ${e.warningCount} ${s}`),r.join(`
1020
1020
  `)}Xl();qo();Kh();var Xre="Accepted forms: a..b (between), a.. (at least), ..b (at most), or a bare number (exact).";class sb extends Error{facet;badTokens;constructor(e,t){super(`Invalid value${t.length>1?"s":""} for ${e.flag}: ${t.map((r)=>`"${r}"`).join(", ")} -- must be one of: ${(e.enumValues??[]).join(", ")}`);this.facet=e;this.badTokens=t;this.name="FacetEnumCliError"}}function LYe(e){switch(e.valueKind){case"enum":return"<values>";case"text":return"<text>";case"version":return"<version>";default:return"<range>"}}function DS(e){for(let t of ko)e.addOption(new lu(`${t.flag} ${LYe(t)}`,r9(t)));return e}function BYe(e){return new lu(e.flag).attributeName()}function UYe(e,t){if(e!==null&&t!==null&&e===t)return String(e);return`${e??""}..${t??""}`}function zYe(e,t){switch(e.valueKind){case"number":case"bytes":case"duration":{let r=qre(t,e.valueKind);return UYe(r.min,r.max)}case"enum":{let r=new Set(e.enumValues??[]),n=t.split(",").map((i)=>i.trim().toLowerCase()).filter((i)=>i!==""),o=[...new Set(n.filter((i)=>!r.has(i)))];if(o.length>0)throw new sb(e,o);return n.join(",")}case"text":case"version":return t}}function Zre(e){let t={};for(let r of ko){let n=e[BYe(r)];if(n===void 0||n===null||n==="")continue;t[r.queryParam]=zYe(r,String(n))}return t}function ES(e,t){let r=ko.filter((n)=>(t[n.key]??0)>0).map((n)=>`${n.key} ${t[n.key]}`).join(", ");return`note: ${e} datasets excluded for unknown values - ${r}
1021
- (a dataset can be unknown in more than one field; --include-unknown keeps them)`}Uo();ja();Ll();Oi();kn();Xe();import{existsSync as one,mkdirSync as ine,readFileSync as ZYe,writeFileSync as sne}from"fs";import{dirname as ane,join as cb}from"path";en();var VYe=U({path:w().min(1),size:k().int().nonnegative(),checksum:w().optional(),checksum_algorithm:w().optional(),bytes_url:w().min(1),url:w().nullish(),error:w().optional()}).passthrough(),Qre=ne(VYe),ene=U({dataset_id:w().optional(),latest:w().nullish(),versions:ne(U({version:w().min(1)}).passthrough())}).passthrough();function Cp(e){return e.checksum_algorithm==="git"}$i();Xe();import{existsSync as SS,mkdirSync as nne,rmSync as GYe,statSync as HYe}from"fs";import{dirname as WYe,join as KYe,resolve as tne}from"path";var Mi=16,YYe=3;function rne(e){return e===null?!0:e!==404}function JYe(e){return e===408||e===425||e===429||e>=500}async function XYe(e,t,r){let n=KYe(t,e.path),o=tne(t),i=tne(n);if(i!==o&&!i.startsWith(`${o}/`))return{written:null,error:{message:`${e.path}: refusing to write outside the output directory`,infrastructure:!0}};if(SS(n))try{if(HYe(n).size===e.size)return{written:null}}catch(u){console.warn(l.dim(` could not read existing ${e.path} (${u instanceof Error?u.message:String(u)}); re-fetching`))}let s=WYe(n);if(!SS(s))nne(s,{recursive:!0});let a=`${e.path}: download failed`,c=!0;for(let u=1;u<=r;u++){let d=()=>Bun.sleep(250*2**(u-1)),f;try{f=await fetch(e.url,{redirect:"follow"})}catch(p){if(a=`${e.path}: ${p instanceof Error?p.message:String(p)}`,c=rne(null),u<r){await d();continue}break}if(!f.ok){if(a=`${e.path}: HTTP ${f.status}`,c=rne(f.status),JYe(f.status)&&u<r){await d();continue}break}let m;try{m=await Bun.write(n,f)}catch(p){a=`${e.path}: ${p instanceof Error?p.message:String(p)}`,c=!0;break}if(m===e.size)return{written:m};try{GYe(n,{force:!0})}catch{}if(a=`${e.path}: expected ${e.size} bytes, received ${m}`,c=!0,u<r){await d();continue}break}return{written:null,error:{message:a,infrastructure:c}}}async function ab(e,t,r={}){let n=Math.max(1,Math.min(r.concurrency??4,Mi)),o=Math.max(1,r.attempts??YYe);if(!SS(t))nne(t,{recursive:!0});let i=[...e],s={filesDownloaded:0,filesSkipped:0,bytesDownloaded:0,bytesSkipped:0,errors:[],hadInfrastructureFailure:!1},a=0,c=async()=>{for(;;){let u=i.shift();if(!u)return;let d=await XYe(u,t,o);if(d.error){if(s.errors.push(d.error.message),d.error.infrastructure)s.hadInfrastructureFailure=!0}else if(d.written===null)s.filesSkipped++,s.bytesSkipped+=u.size;else s.filesDownloaded++,s.bytesDownloaded+=d.written;a++,r.onProgress?.(a,e.length,s.bytesDownloaded)}};return await Promise.all(Array.from({length:Math.min(n,e.length||1)},()=>c())),s}var cne=".nemar/http-snapshot.json",QYe=".nemar/http-download-failures.txt";function lne(){return`${j0().replace(/\/+$/,"")}/data`}class Ko extends Error{}async function une(e,t,r,n){let o;try{o=await fetch(e,{headers:{Accept:"application/json"}})}catch(a){throw new Ko(`Could not reach the NEMAR data service at ${e}: ${a instanceof Error?a.message:String(a)}`)}if(o.status===404)throw new Ko(n());if(!o.ok)throw new Ko(await eJe(o,r));let i;try{i=await o.json()}catch{let a=o.headers.get("content-type")??"no content-type";throw new Ko(`${r} did not come back as JSON (${a}) from ${e}. A proxy or captive portal may be intercepting the request.`)}let s=t.safeParse(i);if(!s.success||s.data===void 0)throw new Ko(`${r} did not match the expected shape. The data service may be mid-deploy, or this CLI may be too old for it; try upgrading.`);return s.data}async function eJe(e,t){let r={};try{let o=await e.json();if(o!==null&&typeof o==="object")r=o}catch{}let n=typeof r.error==="string"?r.error:null;if(e.status===413){let o=typeof r.listing_url==="string"?r.listing_url:null;return[`${t} was refused (HTTP 413): ${n??"it lists more files than the data service sends in one response."}`,"A plain-HTTP download cannot fetch this version; install git-annex and run the download again without --http, which fetches any version.",o&&!n?.includes(o)?`Its files can be browsed from ${o}`:null].filter((i)=>i!==null).join(" ")}return n?`${t} could not be read (HTTP ${e.status}): ${n}`:`${t} could not be read (HTTP ${e.status}).`}async function dne(e){let t=await une(`${lne()}/${e}`,ene,`Dataset ${e}`,()=>`Dataset ${e} is not served over HTTP. The data service carries published, public datasets; a private or not-yet-published dataset has to be downloaded with git-annex.`),r=t.versions.map((n)=>n.version).filter(Boolean);if(r.length===0)throw new Ko(`Dataset ${e} has no published version to download over HTTP. Only published versions are served; use git-annex for an unpublished dataset.`);return{latest:t.latest||r[0],versions:r}}async function fne(e,t){let r=await une(`${lne()}/${e}/${t}/manifest.json`,Qre,`Manifest for ${e} ${t}`,()=>`${e} ${t} is published, but its file list is missing from the data service. That is a NEMAR-side gap rather than a permission problem: please report it at https://github.com/nemarOrg/nemar-cli/issues. git-annex can still download this dataset meanwhile.`);if(r.length>0&&!r.some(Cp))throw new Ko(`Manifest for ${e} ${t} lists ${r.length} files but marks none as git-tracked metadata, which cannot be right for a BIDS dataset. Refusing to download a tree that would be missing its sidecars; please report this at https://github.com/nemarOrg/nemar-cli/issues.`);return r}function pne(e,t,r={}){return e.filter((n)=>{if(r.metadataOnly&&!Cp(n))return!1;if(Cp(n))return!0;return Gre(n.path,t)})}async function mne(e,t,r={}){let n=e.map((o)=>({path:o.path,url:o.bytes_url,size:o.size}));return ab(n,t,r)}function tJe(e){try{let t=JSON.parse(ZYe(cb(e,cne),"utf8"));if(!t.dataset_id||!t.version)return null;return{dataset_id:t.dataset_id,version:t.version,updated_at:t.updated_at??""}}catch{return null}}function hne(e,t,r){let n=cb(e,cne);ine(ane(n),{recursive:!0}),sne(n,`${JSON.stringify({dataset_id:t,version:r,updated_at:new Date().toISOString()},null,2)}
1021
+ (a dataset can be unknown in more than one field; --include-unknown keeps them)`}Uo();ja();Ll();Oi();kn();Xe();import{existsSync as one,mkdirSync as ine,readFileSync as ZYe,writeFileSync as sne}from"fs";import{dirname as ane,join as cb}from"path";en();var VYe=U({path:w().min(1),size:k().int().nonnegative(),checksum:w().optional(),checksum_algorithm:w().optional(),bytes_url:w().min(1),url:w().nullish(),error:w().optional()}).passthrough(),Qre=te(VYe),ene=U({dataset_id:w().optional(),latest:w().nullish(),versions:te(U({version:w().min(1)}).passthrough())}).passthrough();function Cp(e){return e.checksum_algorithm==="git"}$i();Xe();import{existsSync as SS,mkdirSync as nne,rmSync as GYe,statSync as HYe}from"fs";import{dirname as WYe,join as KYe,resolve as tne}from"path";var Mi=16,YYe=3;function rne(e){return e===null?!0:e!==404}function JYe(e){return e===408||e===425||e===429||e>=500}async function XYe(e,t,r){let n=KYe(t,e.path),o=tne(t),i=tne(n);if(i!==o&&!i.startsWith(`${o}/`))return{written:null,error:{message:`${e.path}: refusing to write outside the output directory`,infrastructure:!0}};if(SS(n))try{if(HYe(n).size===e.size)return{written:null}}catch(u){console.warn(l.dim(` could not read existing ${e.path} (${u instanceof Error?u.message:String(u)}); re-fetching`))}let s=WYe(n);if(!SS(s))nne(s,{recursive:!0});let a=`${e.path}: download failed`,c=!0;for(let u=1;u<=r;u++){let d=()=>Bun.sleep(250*2**(u-1)),f;try{f=await fetch(e.url,{redirect:"follow"})}catch(p){if(a=`${e.path}: ${p instanceof Error?p.message:String(p)}`,c=rne(null),u<r){await d();continue}break}if(!f.ok){if(a=`${e.path}: HTTP ${f.status}`,c=rne(f.status),JYe(f.status)&&u<r){await d();continue}break}let m;try{m=await Bun.write(n,f)}catch(p){a=`${e.path}: ${p instanceof Error?p.message:String(p)}`,c=!0;break}if(m===e.size)return{written:m};try{GYe(n,{force:!0})}catch{}if(a=`${e.path}: expected ${e.size} bytes, received ${m}`,c=!0,u<r){await d();continue}break}return{written:null,error:{message:a,infrastructure:c}}}async function ab(e,t,r={}){let n=Math.max(1,Math.min(r.concurrency??4,Mi)),o=Math.max(1,r.attempts??YYe);if(!SS(t))nne(t,{recursive:!0});let i=[...e],s={filesDownloaded:0,filesSkipped:0,bytesDownloaded:0,bytesSkipped:0,errors:[],hadInfrastructureFailure:!1},a=0,c=async()=>{for(;;){let u=i.shift();if(!u)return;let d=await XYe(u,t,o);if(d.error){if(s.errors.push(d.error.message),d.error.infrastructure)s.hadInfrastructureFailure=!0}else if(d.written===null)s.filesSkipped++,s.bytesSkipped+=u.size;else s.filesDownloaded++,s.bytesDownloaded+=d.written;a++,r.onProgress?.(a,e.length,s.bytesDownloaded)}};return await Promise.all(Array.from({length:Math.min(n,e.length||1)},()=>c())),s}var cne=".nemar/http-snapshot.json",QYe=".nemar/http-download-failures.txt";function lne(){return`${j0().replace(/\/+$/,"")}/data`}class Ko extends Error{}async function une(e,t,r,n){let o;try{o=await fetch(e,{headers:{Accept:"application/json"}})}catch(a){throw new Ko(`Could not reach the NEMAR data service at ${e}: ${a instanceof Error?a.message:String(a)}`)}if(o.status===404)throw new Ko(n());if(!o.ok)throw new Ko(await eJe(o,r));let i;try{i=await o.json()}catch{let a=o.headers.get("content-type")??"no content-type";throw new Ko(`${r} did not come back as JSON (${a}) from ${e}. A proxy or captive portal may be intercepting the request.`)}let s=t.safeParse(i);if(!s.success||s.data===void 0)throw new Ko(`${r} did not match the expected shape. The data service may be mid-deploy, or this CLI may be too old for it; try upgrading.`);return s.data}async function eJe(e,t){let r={};try{let o=await e.json();if(o!==null&&typeof o==="object")r=o}catch{}let n=typeof r.error==="string"?r.error:null;if(e.status===413){let o=typeof r.listing_url==="string"?r.listing_url:null;return[`${t} was refused (HTTP 413): ${n??"it lists more files than the data service sends in one response."}`,"A plain-HTTP download cannot fetch this version; install git-annex and run the download again without --http, which fetches any version.",o&&!n?.includes(o)?`Its files can be browsed from ${o}`:null].filter((i)=>i!==null).join(" ")}return n?`${t} could not be read (HTTP ${e.status}): ${n}`:`${t} could not be read (HTTP ${e.status}).`}async function dne(e){let t=await une(`${lne()}/${e}`,ene,`Dataset ${e}`,()=>`Dataset ${e} is not served over HTTP. The data service carries published, public datasets; a private or not-yet-published dataset has to be downloaded with git-annex.`),r=t.versions.map((n)=>n.version).filter(Boolean);if(r.length===0)throw new Ko(`Dataset ${e} has no published version to download over HTTP. Only published versions are served; use git-annex for an unpublished dataset.`);return{latest:t.latest||r[0],versions:r}}async function fne(e,t){let r=await une(`${lne()}/${e}/${t}/manifest.json`,Qre,`Manifest for ${e} ${t}`,()=>`${e} ${t} is published, but its file list is missing from the data service. That is a NEMAR-side gap rather than a permission problem: please report it at https://github.com/nemarOrg/nemar-cli/issues. git-annex can still download this dataset meanwhile.`);if(r.length>0&&!r.some(Cp))throw new Ko(`Manifest for ${e} ${t} lists ${r.length} files but marks none as git-tracked metadata, which cannot be right for a BIDS dataset. Refusing to download a tree that would be missing its sidecars; please report this at https://github.com/nemarOrg/nemar-cli/issues.`);return r}function pne(e,t,r={}){return e.filter((n)=>{if(r.metadataOnly&&!Cp(n))return!1;if(Cp(n))return!0;return Gre(n.path,t)})}async function mne(e,t,r={}){let n=e.map((o)=>({path:o.path,url:o.bytes_url,size:o.size}));return ab(n,t,r)}function tJe(e){try{let t=JSON.parse(ZYe(cb(e,cne),"utf8"));if(!t.dataset_id||!t.version)return null;return{dataset_id:t.dataset_id,version:t.version,updated_at:t.updated_at??""}}catch{return null}}function hne(e,t,r){let n=cb(e,cne);ine(ane(n),{recursive:!0}),sne(n,`${JSON.stringify({dataset_id:t,version:r,updated_at:new Date().toISOString()},null,2)}
1022
1022
  `)}function gne(e,t,r){if(!one(e))return null;if(one(cb(e,".git")))return{kind:"git-repo"};let n=tJe(e);if(!n)return null;if(n.dataset_id!==t)return{kind:"other-dataset",datasetId:n.dataset_id};if(n.version!==r)return{kind:"other-version",version:n.version};return null}function yne(e,t){if(t.length===0)return null;let r=cb(e,QYe);try{return ine(ane(r),{recursive:!0}),sne(r,`${t.join(`
1023
1023
  `)}
1024
1024
  `),r}catch{return null}}function bne(e){console.log(l.dim(" This is a file snapshot, not a git repository:")),console.log(l.dim(" - 'nemar dataset commit/push/update' need a git-annex clone, not this copy")),console.log(l.dim(` - to widen the selection, re-run the download into ${e} with`)),console.log(l.dim(" different filters; already-present files are skipped")),console.log(l.dim(" - files are checked against their declared size, but not checksum-verified;")),console.log(l.dim(" the git-annex path verifies content hashes, this one does not"))}function xne(e,t){let r=e.files??{},n=t.files??{},o=[],i=[],s=[];for(let[a,c]of Object.entries(n)){let u=r[a];if(!u)o.push(a);else if(u.key!==c.key)i.push(a)}for(let a of Object.keys(r))if(!(a in n))s.push(a);return o.sort(),i.sort(),s.sort(),{added:o,changed:i,removed:s}}zl();var{spawn:vne}=globalThis.Bun;var $S="openneuro.org",wne="us-east-1",CS=`https://s3.amazonaws.com/${$S}`,rJe=/^ds\d{6}$/;function Dne(e){return rJe.test(e)}function _ne(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&apos;/g,"'").replace(/&quot;/g,'"')}async function Ene(e,t){if(t??await Na())try{let s=vne({cmd:["aws","s3","ls","--no-sign-request","--region",wne,`s3://${$S}/${e}/`],stdout:"pipe",stderr:"pipe"}),a=await new Response(s.stdout).text();if(await s.exited!==0)return!1;return a.trim().length>0}catch{}let n=`${CS}?list-type=2&prefix=${e}/&max-keys=1`,o=await fetch(n);if(!o.ok)return!1;return(await o.text()).includes("<Key>")}async function Sne(e){let t=[],r;do{let n=`${CS}?list-type=2&prefix=${e}/`;if(r)n+=`&continuation-token=${encodeURIComponent(r)}`;let o=await fetch(n);if(!o.ok)throw Error(`Failed to list OpenNeuro dataset: HTTP ${o.status}`);let i=await o.text(),s=i.match(/<Contents>[\s\S]*?<\/Contents>/g)||[];for(let c of s){let u=c.match(/<Key>([^<]+)<\/Key>/),d=c.match(/<Size>(\d+)<\/Size>/);if(u&&d){let f=_ne(u[1]),m=Number.parseInt(d[1],10);if(f.endsWith("/")&&m===0)continue;t.push({key:f,size:m})}}if(i.includes("<IsTruncated>true</IsTruncated>")){let c=i.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/);if(!c)throw Error(`S3 listing indicated more results but no continuation token was provided. Got ${t.length} objects so far.`);r=_ne(c[1])}else r=void 0}while(r);return t}async function $ne(e,t,r){let n=`s3://${$S}/${e}/`,o=["aws","s3","sync","--no-sign-request","--region",wne,n,t],i;try{i=vne({cmd:o,stdout:"pipe",stderr:"pipe"})}catch(m){return{success:!1,filesDownloaded:0,totalBytes:0,method:"aws-cli",error:`Failed to start AWS CLI: ${m.message}`}}let s=0,a=[],c=/^download:\s+s3:\/\/[^\s]+\/(.*?)\s+to\s+/;function u(m,p){if(m.startsWith("download:")){s++;let h=m.match(c);r?.(s,h?.[1]||"")}else if(p)a.push(m)}async function d(m,p){let h=m.getReader(),y=new TextDecoder,b="";try{while(!0){let{done:v,value:S}=await h.read();if(v)break;b+=y.decode(S,{stream:!0});let R=b.split(`