-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_angular_core_rxjs_interop.JGtJxOsRo5.js
More file actions
50 lines (49 loc) · 3.5 KB
/
_angular_core_rxjs_interop.JGtJxOsRo5.js
File metadata and controls
50 lines (49 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Lc as p, N as l, Nc as b, Uc as f, cd as x, d, gd as h, hd as g, id as k, jd as I, ld as j, nd as M } from "@nf-internal/chunk-NVLH37MP";
import "@nf-internal/chunk-CTQVN4C2";
import "@nf-internal/chunk-ACEYWKDZ";
import "@nf-internal/chunk-M4JCPEPJ";
import { f as v, m as w } from "@nf-internal/chunk-STIBVO4O";
import { a as y, b as D } from "@nf-internal/chunk-2AVGQ2MQ";
import { takeUntil as C } from "rxjs/operators";
import "@angular/core/primitives/signals";
import "@angular/core/primitives/di";
function S(t) { t || (t = l(b)); let e = new v(n => { if (t.destroyed) {
n.next();
return;
} return t.onDestroy(n.next.bind(n)); }); return n => n.pipe(C(e)); }
var m = class {
source;
destroyed = !1;
destroyRef = l(b);
constructor(e) { this.source = e, this.destroyRef.onDestroy(() => { this.destroyed = !0; }); }
subscribe(e) { if (this.destroyed)
throw new d(953, !1); let n = this.source.pipe(S(this.destroyRef)).subscribe({ next: r => e(r) }); return { unsubscribe: () => n.unsubscribe() }; }
};
function P(t, e) { return new m(t); }
function A(t) { let e = h(t); return new v(n => { let r = e?.onDestroy(() => n.complete()), u = t.subscribe(o => n.next(o)); return () => { u.unsubscribe(), r?.(); }; }); }
function V(t, e) { let n = e?.injector ?? l(p), r = new w(1), u = I(() => { let o; try {
o = t();
}
catch (i) {
g(() => r.error(i));
return;
} g(() => r.next(o)); }, { injector: n, manualCleanup: !0 }); return n.get(b).onDestroy(() => { u.destroy(), r.complete(); }), r.asObservable(); }
function $(t, e) { let r = !e?.manualCleanup ? e?.injector?.get(b) ?? l(b) : null, u = q(e?.equal), o; e?.requireSync ? o = f({ kind: 0 }, { equal: u }) : o = f({ kind: 1, value: e?.initialValue }, { equal: u }); let i, c = t.subscribe({ next: s => o.set({ kind: 1, value: s }), error: s => { o.set({ kind: 2, error: s }), i?.(); }, complete: () => { i?.(); } }); if (e?.requireSync && o().kind === 0)
throw new d(601, !1); return i = r?.onDestroy(c.unsubscribe.bind(c)), k(() => { let s = o(); switch (s.kind) {
case 1: return s.value;
case 2: throw s.error;
case 0: throw new d(601, !1);
} }, { equal: e?.equal }); }
function q(t = Object.is) { return (e, n) => e.kind === 1 && n.kind === 1 && t(e.value, n.value); }
function z(t) { t === void 0 && (t = l(p)); let e = t.get(x); return n => new v(r => { let u = e.add(), o = !1; function i() { o || (u(), o = !0); } let c = n.subscribe({ next: s => { r.next(s), i(); }, complete: () => { r.complete(), i(); }, error: s => { r.error(s), i(); } }); return c.add(() => { r.unsubscribe(), i(); }), c; }); }
function B(t) { return j(D(y({}, t), { loader: void 0, stream: e => { let n, r = () => n?.unsubscribe(); e.abortSignal.addEventListener("abort", r); let u = f({ value: void 0 }), o, i = new Promise(a => o = a); function c(a) { u.set(a), o?.(u), o = void 0; } let s = t.stream ?? t.loader; if (s === void 0)
throw new d(990, !1); return n = s(e).subscribe({ next: a => c({ value: a }), error: a => { c({ error: M(a) }), e.abortSignal.removeEventListener("abort", r); }, complete: () => { o && c({ error: new d(991, !1) }), e.abortSignal.removeEventListener("abort", r); } }), i; } })); }
export { P as outputFromObservable, A as outputToObservable, z as pendingUntilEvent, B as rxResource, S as takeUntilDestroyed, V as toObservable, $ as toSignal };
/*! Bundled license information:
@angular/core/fesm2022/rxjs-interop.mjs:
(**
* @license Angular v20.3.7
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*)
*/