"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index.cjs240.js");var c,a;function h(){if(a)return c;a=1;var f=l.__require();function t(i){if(typeof i!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(r){n=r});var e=this;this.promise.then(function(s){if(e._listeners){var r,o=e._listeners.length;for(r=0;r<o;r++)e._listeners[r](s);e._listeners=null}}),this.promise.then=function(s){var r,o=new Promise(function(u){e.subscribe(u),r=u}).then(s);return o.cancel=function(){e.unsubscribe(r)},o},i(function(r){e.reason||(e.reason=new f(r),n(e.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},t.prototype.unsubscribe=function(n){if(this._listeners){var e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}},t.source=function(){var n,e=new t(function(r){n=r});return{token:e,cancel:n}},c=t,c}exports.__require=h;
//# sourceMappingURL=index.cjs241.js.map
