blockcore-notes/main.d77c12551086d5cb.js

1 line
2.0 MiB
JavaScript
Raw Normal View History

(self.webpackChunkblockcore_notes=self.webpackChunkblockcore_notes||[]).push([[179],{8511:(ie,y,x)=>{"use strict";function v(i){return"function"==typeof i}function c(i){const e=i(n=>{Error.call(n),n.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const m=c(i=>function(e){i(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function h(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class f{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const o of e)o.remove(this);else e.remove(this);const{initialTeardown:n}=this;if(v(n))try{n()}catch(o){t=o instanceof m?o.errors:[o]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const o of r)try{w(o)}catch(s){t=t??[],s instanceof m?t=[...t,...s.errors]:t.push(s)}}if(t)throw new m(t)}}add(t){var e;if(t&&t!==this)if(this.closed)w(t);else{if(t instanceof f){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&h(e,t)}remove(t){const{_finalizers:e}=this;e&&h(e,t),t instanceof f&&t._removeParent(this)}}f.EMPTY=(()=>{const i=new f;return i.closed=!0,i})();const p=f.EMPTY;function _(i){return i instanceof f||i&&"closed"in i&&v(i.remove)&&v(i.add)&&v(i.unsubscribe)}function w(i){v(i)?i():i.unsubscribe()}const M={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},C={setTimeout(i,t,...e){const{delegate:n}=C;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=C;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function L(i){C.setTimeout(()=>{const{onUnhandledError:t}=M;if(!t)throw i;t(i)})}function k(){}const F=R("C",void 0,void 0);function R(i,t,e){return{kind:i,value:t,error:e}}let Y=null;function O(i){if(M.useDeprecatedSynchronousErrorHandling){const t=!Y;if(t&&(Y={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=Y;if(Y=null,e)throw n}}else i()}class U extends f{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,_(t)&&t.add(this)):this.destination=re}static create(t,e,n){return new W(t,e,n)}next(t){this.isStopped?te(function E(i){return R("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?te(function j(i){return R("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?te(F,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const P=Function.prototype.bind;function N(i,t){return P.call(i,t)}class K{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){G(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){G(n)}else G(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){G(e)}}}class W extends U{constructor(t,e,n){let r;if(super(),v(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let o;this&&M.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&N(t.next,o),error:t.error&&N(t.error,o),complete:t.complete&&N(t.complete,o)}):r=t}this.destination=new K(r)}}function G(i){M.useDeprecatedSynchronousErrorHandling?function z(i){M.useDeprecatedSynchronousErrorHandling&&Y&&