import{bx as b,by as p,bz as l,bA as a}from"./index-Bm2SqMk3.js";var h={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};function v(r){r()}var y=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function d(r){return r}function S(r){return r.length===0?d:r.length===1?r[0]:function(t){return r.reduce(function(u,o){return o(u)},t)}}var w=function(){function r(n){n&&(this._subscribe=n)}return r.prototype.lift=function(n){var t=new r;return t.source=this,t.operator=n,t},r.prototype.subscribe=function(n,t,u){var o=this,e=g(n)?n:new b(n,t,u);return v(function(){var i=o,c=i.operator,s=i.source;e.add(c?c.call(e,s):s?o._subscribe(e):o._trySubscribe(e))}),e},r.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(t){n.error(t)}},r.prototype.forEach=function(n,t){var u=this;return t=f(t),new t(function(o,e){var i=new b({next:function(c){try{n(c)}catch(s){e(s),i.unsubscribe()}},error:e,complete:o});u.subscribe(i)})},r.prototype._subscribe=function(n){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(n)},r.prototype[y]=function(){return this},r.prototype.pipe=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return S(n)(this)},r.prototype.toPromise=function(n){var t=this;return n=f(n),new n(function(u,o){var e;t.subscribe(function(i){return e=i},function(i){return o(i)},function(){return u(e)})})},r.create=function(n){return new r(n)},r}();function f(r){var n;return(n=r??h.Promise)!==null&&n!==void 0?n:Promise}function _(r){return r&&a(r.next)&&a(r.error)&&a(r.complete)}function g(r){return r&&r instanceof p||_(r)&&l(r)}export{w as O,d as i,y as o};
