1 | import * as ngCore from '@angular/core';
|
2 | import { Injectable, InjectionToken, Inject, isDevMode, NgModule, Optional, SkipSelf, Injector } from '@angular/core';
|
3 | import { BehaviorSubject, Observable, Subject, queueScheduler } from 'rxjs';
|
4 | import { observeOn, withLatestFrom, scan, pluck, map, distinctUntilChanged } from 'rxjs/operators';
|
5 |
|
6 | const REGISTERED_ACTION_TYPES = {};
|
7 | function resetRegisteredActionTypes() {
|
8 | for (const key of Object.keys(REGISTERED_ACTION_TYPES)) {
|
9 | delete REGISTERED_ACTION_TYPES[key];
|
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 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | function createAction(type, config) {
|
86 | REGISTERED_ACTION_TYPES[type] = (REGISTERED_ACTION_TYPES[type] || 0) + 1;
|
87 | if (typeof config === 'function') {
|
88 | return defineType(type, (...args) => (Object.assign(Object.assign({}, config(...args)), { type })));
|
89 | }
|
90 | const as = config ? config._as : 'empty';
|
91 | switch (as) {
|
92 | case 'empty':
|
93 | return defineType(type, () => ({ type }));
|
94 | case 'props':
|
95 | return defineType(type, (props) => (Object.assign(Object.assign({}, props), { type })));
|
96 | default:
|
97 | throw new Error('Unexpected config.');
|
98 | }
|
99 | }
|
100 | function props() {
|
101 |
|
102 | return { _as: 'props', _p: undefined };
|
103 | }
|
104 | function union(creators) {
|
105 |
|
106 | return undefined;
|
107 | }
|
108 | function defineType(type, creator) {
|
109 | return Object.defineProperty(creator, 'type', {
|
110 | value: type,
|
111 | writable: false,
|
112 | });
|
113 | }
|
114 |
|
115 | const INIT = '@ngrx/store/init';
|
116 | class ActionsSubject extends BehaviorSubject {
|
117 | constructor() {
|
118 | super({ type: INIT });
|
119 | }
|
120 | next(action) {
|
121 | if (typeof action === 'function') {
|
122 | throw new TypeError(`
|
123 | Dispatch expected an object, instead it received a function.
|
124 | If you're using the createAction function, make sure to invoke the function
|
125 | before dispatching the action. For example, someAction should be someAction().`);
|
126 | }
|
127 | else if (typeof action === 'undefined') {
|
128 | throw new TypeError(`Actions must be objects`);
|
129 | }
|
130 | else if (typeof action.type === 'undefined') {
|
131 | throw new TypeError(`Actions must have a type property`);
|
132 | }
|
133 | super.next(action);
|
134 | }
|
135 | complete() {
|
136 |
|
137 | }
|
138 | ngOnDestroy() {
|
139 | super.complete();
|
140 | }
|
141 | }
|
142 | ActionsSubject.decorators = [
|
143 | { type: Injectable }
|
144 | ];
|
145 |
|
146 | ActionsSubject.ctorParameters = () => [];
|
147 | const ACTIONS_SUBJECT_PROVIDERS = [ActionsSubject];
|
148 |
|
149 | const _ROOT_STORE_GUARD = new InjectionToken('@ngrx/store Internal Root Guard');
|
150 | const _INITIAL_STATE = new InjectionToken('@ngrx/store Internal Initial State');
|
151 | const INITIAL_STATE = new InjectionToken('@ngrx/store Initial State');
|
152 | const REDUCER_FACTORY = new InjectionToken('@ngrx/store Reducer Factory');
|
153 | const _REDUCER_FACTORY = new InjectionToken('@ngrx/store Internal Reducer Factory Provider');
|
154 | const INITIAL_REDUCERS = new InjectionToken('@ngrx/store Initial Reducers');
|
155 | const _INITIAL_REDUCERS = new InjectionToken('@ngrx/store Internal Initial Reducers');
|
156 | const STORE_FEATURES = new InjectionToken('@ngrx/store Store Features');
|
157 | const _STORE_REDUCERS = new InjectionToken('@ngrx/store Internal Store Reducers');
|
158 | const _FEATURE_REDUCERS = new InjectionToken('@ngrx/store Internal Feature Reducers');
|
159 | const _FEATURE_CONFIGS = new InjectionToken('@ngrx/store Internal Feature Configs');
|
160 | const _STORE_FEATURES = new InjectionToken('@ngrx/store Internal Store Features');
|
161 | const _FEATURE_REDUCERS_TOKEN = new InjectionToken('@ngrx/store Internal Feature Reducers Token');
|
162 | const FEATURE_REDUCERS = new InjectionToken('@ngrx/store Feature Reducers');
|
163 |
|
164 |
|
165 |
|
166 | const USER_PROVIDED_META_REDUCERS = new InjectionToken('@ngrx/store User Provided Meta Reducers');
|
167 |
|
168 |
|
169 |
|
170 | const META_REDUCERS = new InjectionToken('@ngrx/store Meta Reducers');
|
171 |
|
172 |
|
173 |
|
174 |
|
175 | const _RESOLVED_META_REDUCERS = new InjectionToken('@ngrx/store Internal Resolved Meta Reducers');
|
176 |
|
177 |
|
178 |
|
179 |
|
180 | const USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store User Runtime Checks Config');
|
181 |
|
182 |
|
183 |
|
184 | const _USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal User Runtime Checks Config');
|
185 |
|
186 |
|
187 |
|
188 | const ACTIVE_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal Runtime Checks');
|
189 | const _ACTION_TYPE_UNIQUENESS_CHECK = new InjectionToken('@ngrx/store Check if Action types are unique');
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 | function combineReducers(reducers, initialState = {}) {
|
225 | const reducerKeys = Object.keys(reducers);
|
226 | const finalReducers = {};
|
227 | for (let i = 0; i < reducerKeys.length; i++) {
|
228 | const key = reducerKeys[i];
|
229 | if (typeof reducers[key] === 'function') {
|
230 | finalReducers[key] = reducers[key];
|
231 | }
|
232 | }
|
233 | const finalReducerKeys = Object.keys(finalReducers);
|
234 | return function combination(state, action) {
|
235 | state = state === undefined ? initialState : state;
|
236 | let hasChanged = false;
|
237 | const nextState = {};
|
238 | for (let i = 0; i < finalReducerKeys.length; i++) {
|
239 | const key = finalReducerKeys[i];
|
240 | const reducer = finalReducers[key];
|
241 | const previousStateForKey = state[key];
|
242 | const nextStateForKey = reducer(previousStateForKey, action);
|
243 | nextState[key] = nextStateForKey;
|
244 | hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
245 | }
|
246 | return hasChanged ? nextState : state;
|
247 | };
|
248 | }
|
249 | function omit(object, keyToRemove) {
|
250 | return Object.keys(object)
|
251 | .filter((key) => key !== keyToRemove)
|
252 | .reduce((result, key) => Object.assign(result, { [key]: object[key] }), {});
|
253 | }
|
254 | function compose(...functions) {
|
255 | return function (arg) {
|
256 | if (functions.length === 0) {
|
257 | return arg;
|
258 | }
|
259 | const last = functions[functions.length - 1];
|
260 | const rest = functions.slice(0, -1);
|
261 | return rest.reduceRight((composed, fn) => fn(composed), last(arg));
|
262 | };
|
263 | }
|
264 | function createReducerFactory(reducerFactory, metaReducers) {
|
265 | if (Array.isArray(metaReducers) && metaReducers.length > 0) {
|
266 | reducerFactory = compose.apply(null, [
|
267 | ...metaReducers,
|
268 | reducerFactory,
|
269 | ]);
|
270 | }
|
271 | return (reducers, initialState) => {
|
272 | const reducer = reducerFactory(reducers);
|
273 | return (state, action) => {
|
274 | state = state === undefined ? initialState : state;
|
275 | return reducer(state, action);
|
276 | };
|
277 | };
|
278 | }
|
279 | function createFeatureReducerFactory(metaReducers) {
|
280 | const reducerFactory = Array.isArray(metaReducers) && metaReducers.length > 0
|
281 | ? compose(...metaReducers)
|
282 | : (r) => r;
|
283 | return (reducer, initialState) => {
|
284 | reducer = reducerFactory(reducer);
|
285 | return (state, action) => {
|
286 | state = state === undefined ? initialState : state;
|
287 | return reducer(state, action);
|
288 | };
|
289 | };
|
290 | }
|
291 |
|
292 | class ReducerObservable extends Observable {
|
293 | }
|
294 | class ReducerManagerDispatcher extends ActionsSubject {
|
295 | }
|
296 | const UPDATE = '@ngrx/store/update-reducers';
|
297 | class ReducerManager extends BehaviorSubject {
|
298 | constructor(dispatcher, initialState, reducers, reducerFactory) {
|
299 | super(reducerFactory(reducers, initialState));
|
300 | this.dispatcher = dispatcher;
|
301 | this.initialState = initialState;
|
302 | this.reducers = reducers;
|
303 | this.reducerFactory = reducerFactory;
|
304 | }
|
305 | get currentReducers() {
|
306 | return this.reducers;
|
307 | }
|
308 | addFeature(feature) {
|
309 | this.addFeatures([feature]);
|
310 | }
|
311 | addFeatures(features) {
|
312 | const reducers = features.reduce((reducerDict, { reducers, reducerFactory, metaReducers, initialState, key }) => {
|
313 | const reducer = typeof reducers === 'function'
|
314 | ? createFeatureReducerFactory(metaReducers)(reducers, initialState)
|
315 | : createReducerFactory(reducerFactory, metaReducers)(reducers, initialState);
|
316 | reducerDict[key] = reducer;
|
317 | return reducerDict;
|
318 | }, {});
|
319 | this.addReducers(reducers);
|
320 | }
|
321 | removeFeature(feature) {
|
322 | this.removeFeatures([feature]);
|
323 | }
|
324 | removeFeatures(features) {
|
325 | this.removeReducers(features.map((p) => p.key));
|
326 | }
|
327 | addReducer(key, reducer) {
|
328 | this.addReducers({ [key]: reducer });
|
329 | }
|
330 | addReducers(reducers) {
|
331 | this.reducers = Object.assign(Object.assign({}, this.reducers), reducers);
|
332 | this.updateReducers(Object.keys(reducers));
|
333 | }
|
334 | removeReducer(featureKey) {
|
335 | this.removeReducers([featureKey]);
|
336 | }
|
337 | removeReducers(featureKeys) {
|
338 | featureKeys.forEach((key) => {
|
339 | this.reducers = omit(this.reducers, key) ;
|
340 | });
|
341 | this.updateReducers(featureKeys);
|
342 | }
|
343 | updateReducers(featureKeys) {
|
344 | this.next(this.reducerFactory(this.reducers, this.initialState));
|
345 | this.dispatcher.next({
|
346 | type: UPDATE,
|
347 | features: featureKeys,
|
348 | });
|
349 | }
|
350 | ngOnDestroy() {
|
351 | this.complete();
|
352 | }
|
353 | }
|
354 | ReducerManager.decorators = [
|
355 | { type: Injectable }
|
356 | ];
|
357 |
|
358 | ReducerManager.ctorParameters = () => [
|
359 | { type: ReducerManagerDispatcher },
|
360 | { type: undefined, decorators: [{ type: Inject, args: [INITIAL_STATE,] }] },
|
361 | { type: undefined, decorators: [{ type: Inject, args: [INITIAL_REDUCERS,] }] },
|
362 | { type: undefined, decorators: [{ type: Inject, args: [REDUCER_FACTORY,] }] }
|
363 | ];
|
364 | const REDUCER_MANAGER_PROVIDERS = [
|
365 | ReducerManager,
|
366 | { provide: ReducerObservable, useExisting: ReducerManager },
|
367 | { provide: ReducerManagerDispatcher, useExisting: ActionsSubject },
|
368 | ];
|
369 |
|
370 | class ScannedActionsSubject extends Subject {
|
371 | ngOnDestroy() {
|
372 | this.complete();
|
373 | }
|
374 | }
|
375 | ScannedActionsSubject.decorators = [
|
376 | { type: Injectable }
|
377 | ];
|
378 | const SCANNED_ACTIONS_SUBJECT_PROVIDERS = [
|
379 | ScannedActionsSubject,
|
380 | ];
|
381 |
|
382 | class StateObservable extends Observable {
|
383 | }
|
384 | class State extends BehaviorSubject {
|
385 | constructor(actions$, reducer$, scannedActions, initialState) {
|
386 | super(initialState);
|
387 | const actionsOnQueue$ = actions$.pipe(observeOn(queueScheduler));
|
388 | const withLatestReducer$ = actionsOnQueue$.pipe(withLatestFrom(reducer$));
|
389 | const seed = { state: initialState };
|
390 | const stateAndAction$ = withLatestReducer$.pipe(scan(reduceState, seed));
|
391 | this.stateSubscription = stateAndAction$.subscribe(({ state, action }) => {
|
392 | this.next(state);
|
393 | scannedActions.next(action);
|
394 | });
|
395 | }
|
396 | ngOnDestroy() {
|
397 | this.stateSubscription.unsubscribe();
|
398 | this.complete();
|
399 | }
|
400 | }
|
401 | State.INIT = INIT;
|
402 | State.decorators = [
|
403 | { type: Injectable }
|
404 | ];
|
405 |
|
406 | State.ctorParameters = () => [
|
407 | { type: ActionsSubject },
|
408 | { type: ReducerObservable },
|
409 | { type: ScannedActionsSubject },
|
410 | { type: undefined, decorators: [{ type: Inject, args: [INITIAL_STATE,] }] }
|
411 | ];
|
412 | function reduceState(stateActionPair = { state: undefined }, [action, reducer]) {
|
413 | const { state } = stateActionPair;
|
414 | return { state: reducer(state, action), action };
|
415 | }
|
416 | const STATE_PROVIDERS = [
|
417 | State,
|
418 | { provide: StateObservable, useExisting: State },
|
419 | ];
|
420 |
|
421 |
|
422 | class Store extends Observable {
|
423 | constructor(state$, actionsObserver, reducerManager) {
|
424 | super();
|
425 | this.actionsObserver = actionsObserver;
|
426 | this.reducerManager = reducerManager;
|
427 | this.source = state$;
|
428 | }
|
429 | select(pathOrMapFn, ...paths) {
|
430 | return select.call(null, pathOrMapFn, ...paths)(this);
|
431 | }
|
432 | lift(operator) {
|
433 | const store = new Store(this, this.actionsObserver, this.reducerManager);
|
434 | store.operator = operator;
|
435 | return store;
|
436 | }
|
437 | dispatch(action) {
|
438 | this.actionsObserver.next(action);
|
439 | }
|
440 | next(action) {
|
441 | this.actionsObserver.next(action);
|
442 | }
|
443 | error(err) {
|
444 | this.actionsObserver.error(err);
|
445 | }
|
446 | complete() {
|
447 | this.actionsObserver.complete();
|
448 | }
|
449 | addReducer(key, reducer) {
|
450 | this.reducerManager.addReducer(key, reducer);
|
451 | }
|
452 | removeReducer(key) {
|
453 | this.reducerManager.removeReducer(key);
|
454 | }
|
455 | }
|
456 | Store.decorators = [
|
457 | { type: Injectable }
|
458 | ];
|
459 |
|
460 | Store.ctorParameters = () => [
|
461 | { type: StateObservable },
|
462 | { type: ActionsSubject },
|
463 | { type: ReducerManager }
|
464 | ];
|
465 | const STORE_PROVIDERS = [Store];
|
466 | function select(pathOrMapFn, propsOrPath, ...paths) {
|
467 | return function selectOperator(source$) {
|
468 | let mapped$;
|
469 | if (typeof pathOrMapFn === 'string') {
|
470 | const pathSlices = [propsOrPath, ...paths].filter(Boolean);
|
471 | mapped$ = source$.pipe(pluck(pathOrMapFn, ...pathSlices));
|
472 | }
|
473 | else if (typeof pathOrMapFn === 'function') {
|
474 | mapped$ = source$.pipe(map((source) => pathOrMapFn(source, propsOrPath)));
|
475 | }
|
476 | else {
|
477 | throw new TypeError(`Unexpected type '${typeof pathOrMapFn}' in select operator,` +
|
478 | ` expected 'string' or 'function'`);
|
479 | }
|
480 | return mapped$.pipe(distinctUntilChanged());
|
481 | };
|
482 | }
|
483 |
|
484 | function capitalize(text) {
|
485 | return (text.charAt(0).toUpperCase() + text.substr(1));
|
486 | }
|
487 |
|
488 | const RUNTIME_CHECK_URL = 'https://ngrx.io/guide/store/configuration/runtime-checks';
|
489 | function isUndefined(target) {
|
490 | return target === undefined;
|
491 | }
|
492 | function isNull(target) {
|
493 | return target === null;
|
494 | }
|
495 | function isArray(target) {
|
496 | return Array.isArray(target);
|
497 | }
|
498 | function isString(target) {
|
499 | return typeof target === 'string';
|
500 | }
|
501 | function isBoolean(target) {
|
502 | return typeof target === 'boolean';
|
503 | }
|
504 | function isNumber(target) {
|
505 | return typeof target === 'number';
|
506 | }
|
507 | function isObjectLike(target) {
|
508 | return typeof target === 'object' && target !== null;
|
509 | }
|
510 | function isObject(target) {
|
511 | return isObjectLike(target) && !isArray(target);
|
512 | }
|
513 | function isPlainObject(target) {
|
514 | if (!isObject(target)) {
|
515 | return false;
|
516 | }
|
517 | const targetPrototype = Object.getPrototypeOf(target);
|
518 | return targetPrototype === Object.prototype || targetPrototype === null;
|
519 | }
|
520 | function isFunction(target) {
|
521 | return typeof target === 'function';
|
522 | }
|
523 | function isComponent(target) {
|
524 | return isFunction(target) && target.hasOwnProperty('ɵcmp');
|
525 | }
|
526 | function hasOwnProperty(target, propertyName) {
|
527 | return Object.prototype.hasOwnProperty.call(target, propertyName);
|
528 | }
|
529 |
|
530 | let _ngrxMockEnvironment = false;
|
531 | function setNgrxMockEnvironment(value) {
|
532 | _ngrxMockEnvironment = value;
|
533 | }
|
534 | function isNgrxMockEnvironment() {
|
535 | return _ngrxMockEnvironment;
|
536 | }
|
537 |
|
538 | function isEqualCheck(a, b) {
|
539 | return a === b;
|
540 | }
|
541 | function isArgumentsChanged(args, lastArguments, comparator) {
|
542 | for (let i = 0; i < args.length; i++) {
|
543 | if (!comparator(args[i], lastArguments[i])) {
|
544 | return true;
|
545 | }
|
546 | }
|
547 | return false;
|
548 | }
|
549 | function resultMemoize(projectionFn, isResultEqual) {
|
550 | return defaultMemoize(projectionFn, isEqualCheck, isResultEqual);
|
551 | }
|
552 | function defaultMemoize(projectionFn, isArgumentsEqual = isEqualCheck, isResultEqual = isEqualCheck) {
|
553 | let lastArguments = null;
|
554 |
|
555 | let lastResult = null;
|
556 | let overrideResult;
|
557 | function reset() {
|
558 | lastArguments = null;
|
559 | lastResult = null;
|
560 | }
|
561 | function setResult(result = undefined) {
|
562 | overrideResult = { result };
|
563 | }
|
564 | function clearResult() {
|
565 | overrideResult = undefined;
|
566 | }
|
567 |
|
568 |
|
569 | function memoized() {
|
570 | if (overrideResult !== undefined) {
|
571 | return overrideResult.result;
|
572 | }
|
573 | if (!lastArguments) {
|
574 | lastResult = projectionFn.apply(null, arguments);
|
575 | lastArguments = arguments;
|
576 | return lastResult;
|
577 | }
|
578 | if (!isArgumentsChanged(arguments, lastArguments, isArgumentsEqual)) {
|
579 | return lastResult;
|
580 | }
|
581 | const newResult = projectionFn.apply(null, arguments);
|
582 | lastArguments = arguments;
|
583 | if (isResultEqual(lastResult, newResult)) {
|
584 | return lastResult;
|
585 | }
|
586 | lastResult = newResult;
|
587 | return newResult;
|
588 | }
|
589 | return { memoized, reset, setResult, clearResult };
|
590 | }
|
591 | function createSelector(...input) {
|
592 | return createSelectorFactory(defaultMemoize)(...input);
|
593 | }
|
594 | function defaultStateFn(state, selectors, props, memoizedProjector) {
|
595 | if (props === undefined) {
|
596 | const args = selectors.map((fn) => fn(state));
|
597 | return memoizedProjector.memoized.apply(null, args);
|
598 | }
|
599 | const args = selectors.map((fn) => fn(state, props));
|
600 | return memoizedProjector.memoized.apply(null, [...args, props]);
|
601 | }
|
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 |
|
624 |
|
625 |
|
626 |
|
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 |
|
636 |
|
637 |
|
638 |
|
639 |
|
640 |
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 |
|
652 |
|
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 |
|
666 |
|
667 |
|
668 |
|
669 |
|
670 |
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 | function createSelectorFactory(memoize, options = {
|
681 | stateFn: defaultStateFn,
|
682 | }) {
|
683 | return function (...input) {
|
684 | let args = input;
|
685 | if (Array.isArray(args[0])) {
|
686 | const [head, ...tail] = args;
|
687 | args = [...head, ...tail];
|
688 | }
|
689 | const selectors = args.slice(0, args.length - 1);
|
690 | const projector = args[args.length - 1];
|
691 | const memoizedSelectors = selectors.filter((selector) => selector.release && typeof selector.release === 'function');
|
692 | const memoizedProjector = memoize(function (...selectors) {
|
693 | return projector.apply(null, selectors);
|
694 | });
|
695 | const memoizedState = defaultMemoize(function (state, props) {
|
696 | return options.stateFn.apply(null, [
|
697 | state,
|
698 | selectors,
|
699 | props,
|
700 | memoizedProjector,
|
701 | ]);
|
702 | });
|
703 | function release() {
|
704 | memoizedState.reset();
|
705 | memoizedProjector.reset();
|
706 | memoizedSelectors.forEach((selector) => selector.release());
|
707 | }
|
708 | return Object.assign(memoizedState.memoized, {
|
709 | release,
|
710 | projector: memoizedProjector.memoized,
|
711 | setResult: memoizedState.setResult,
|
712 | clearResult: memoizedState.clearResult,
|
713 | });
|
714 | };
|
715 | }
|
716 | function createFeatureSelector(featureName) {
|
717 | return createSelector((state) => {
|
718 | const featureState = state[featureName];
|
719 | if (!isNgrxMockEnvironment() && isDevMode() && !(featureName in state)) {
|
720 | console.warn(`@ngrx/store: The feature name "${featureName}" does ` +
|
721 | 'not exist in the state, therefore createFeatureSelector ' +
|
722 | 'cannot access it. Be sure it is imported in a loaded module ' +
|
723 | `using StoreModule.forRoot('${featureName}', ...) or ` +
|
724 | `StoreModule.forFeature('${featureName}', ...). If the default ` +
|
725 | 'state is intended to be undefined, as is the case with router ' +
|
726 | 'state, this development-only warning message can be ignored.');
|
727 | }
|
728 | return featureState;
|
729 | }, (featureState) => featureState);
|
730 | }
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 |
|
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 |
|
747 |
|
748 |
|
749 |
|
750 |
|
751 |
|
752 |
|
753 |
|
754 |
|
755 |
|
756 |
|
757 |
|
758 |
|
759 |
|
760 |
|
761 |
|
762 |
|
763 |
|
764 |
|
765 |
|
766 |
|
767 |
|
768 |
|
769 |
|
770 |
|
771 |
|
772 |
|
773 |
|
774 |
|
775 |
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 |
|
791 |
|
792 |
|
793 |
|
794 | function createFeature(featureConfig) {
|
795 | const { name, reducer } = featureConfig;
|
796 | const featureSelector = createFeatureSelector(name);
|
797 | const nestedSelectors = createNestedSelectors(featureSelector, reducer);
|
798 | return Object.assign({ name,
|
799 | reducer, [`select${capitalize(name)}State`]: featureSelector }, nestedSelectors);
|
800 | }
|
801 | function createNestedSelectors(featureSelector, reducer) {
|
802 | const initialState = getInitialState(reducer);
|
803 | const nestedKeys = (isPlainObject(initialState)
|
804 | ? Object.keys(initialState)
|
805 | : []);
|
806 | return nestedKeys.reduce((nestedSelectors, nestedKey) => (Object.assign(Object.assign({}, nestedSelectors), { [`select${capitalize(nestedKey)}`]: createSelector(featureSelector, (parentState) => parentState === null || parentState === void 0 ? void 0 : parentState[nestedKey]) })), {});
|
807 | }
|
808 | function getInitialState(reducer) {
|
809 | return reducer(undefined, { type: '@ngrx/feature/init' });
|
810 | }
|
811 |
|
812 | function immutabilityCheckMetaReducer(reducer, checks) {
|
813 | return function (state, action) {
|
814 | const act = checks.action(action) ? freeze(action) : action;
|
815 | const nextState = reducer(state, act);
|
816 | return checks.state() ? freeze(nextState) : nextState;
|
817 | };
|
818 | }
|
819 | function freeze(target) {
|
820 | Object.freeze(target);
|
821 | const targetIsFunction = isFunction(target);
|
822 | Object.getOwnPropertyNames(target).forEach((prop) => {
|
823 |
|
824 | if (prop.startsWith('ɵ')) {
|
825 | return;
|
826 | }
|
827 | if (hasOwnProperty(target, prop) &&
|
828 | (targetIsFunction
|
829 | ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'
|
830 | : true)) {
|
831 | const propValue = target[prop];
|
832 | if ((isObjectLike(propValue) || isFunction(propValue)) &&
|
833 | !Object.isFrozen(propValue)) {
|
834 | freeze(propValue);
|
835 | }
|
836 | }
|
837 | });
|
838 | return target;
|
839 | }
|
840 |
|
841 | function serializationCheckMetaReducer(reducer, checks) {
|
842 | return function (state, action) {
|
843 | if (checks.action(action)) {
|
844 | const unserializableAction = getUnserializable(action);
|
845 | throwIfUnserializable(unserializableAction, 'action');
|
846 | }
|
847 | const nextState = reducer(state, action);
|
848 | if (checks.state()) {
|
849 | const unserializableState = getUnserializable(nextState);
|
850 | throwIfUnserializable(unserializableState, 'state');
|
851 | }
|
852 | return nextState;
|
853 | };
|
854 | }
|
855 | function getUnserializable(target, path = []) {
|
856 |
|
857 | if ((isUndefined(target) || isNull(target)) && path.length === 0) {
|
858 | return {
|
859 | path: ['root'],
|
860 | value: target,
|
861 | };
|
862 | }
|
863 | const keys = Object.keys(target);
|
864 | return keys.reduce((result, key) => {
|
865 | if (result) {
|
866 | return result;
|
867 | }
|
868 | const value = target[key];
|
869 |
|
870 | if (isComponent(value)) {
|
871 | return result;
|
872 | }
|
873 | if (isUndefined(value) ||
|
874 | isNull(value) ||
|
875 | isNumber(value) ||
|
876 | isBoolean(value) ||
|
877 | isString(value) ||
|
878 | isArray(value)) {
|
879 | return false;
|
880 | }
|
881 | if (isPlainObject(value)) {
|
882 | return getUnserializable(value, [...path, key]);
|
883 | }
|
884 | return {
|
885 | path: [...path, key],
|
886 | value,
|
887 | };
|
888 | }, false);
|
889 | }
|
890 | function throwIfUnserializable(unserializable, context) {
|
891 | if (unserializable === false) {
|
892 | return;
|
893 | }
|
894 | const unserializablePath = unserializable.path.join('.');
|
895 | const error = new Error(`Detected unserializable ${context} at "${unserializablePath}". ${RUNTIME_CHECK_URL}#strict${context}serializability`);
|
896 | error.value = unserializable.value;
|
897 | error.unserializablePath = unserializablePath;
|
898 | throw error;
|
899 | }
|
900 |
|
901 | function inNgZoneAssertMetaReducer(reducer, checks) {
|
902 | return function (state, action) {
|
903 | if (checks.action(action) && !ngCore.NgZone.isInAngularZone()) {
|
904 | throw new Error(`Action '${action.type}' running outside NgZone. ${RUNTIME_CHECK_URL}#strictactionwithinngzone`);
|
905 | }
|
906 | return reducer(state, action);
|
907 | };
|
908 | }
|
909 |
|
910 | function createActiveRuntimeChecks(runtimeChecks) {
|
911 | if (isDevMode()) {
|
912 | return Object.assign({ strictStateSerializability: false, strictActionSerializability: false, strictStateImmutability: true, strictActionImmutability: true, strictActionWithinNgZone: false, strictActionTypeUniqueness: false }, runtimeChecks);
|
913 | }
|
914 | return {
|
915 | strictStateSerializability: false,
|
916 | strictActionSerializability: false,
|
917 | strictStateImmutability: false,
|
918 | strictActionImmutability: false,
|
919 | strictActionWithinNgZone: false,
|
920 | strictActionTypeUniqueness: false,
|
921 | };
|
922 | }
|
923 | function createSerializationCheckMetaReducer({ strictActionSerializability, strictStateSerializability, }) {
|
924 | return (reducer) => strictActionSerializability || strictStateSerializability
|
925 | ? serializationCheckMetaReducer(reducer, {
|
926 | action: (action) => strictActionSerializability && !ignoreNgrxAction(action),
|
927 | state: () => strictStateSerializability,
|
928 | })
|
929 | : reducer;
|
930 | }
|
931 | function createImmutabilityCheckMetaReducer({ strictActionImmutability, strictStateImmutability, }) {
|
932 | return (reducer) => strictActionImmutability || strictStateImmutability
|
933 | ? immutabilityCheckMetaReducer(reducer, {
|
934 | action: (action) => strictActionImmutability && !ignoreNgrxAction(action),
|
935 | state: () => strictStateImmutability,
|
936 | })
|
937 | : reducer;
|
938 | }
|
939 | function ignoreNgrxAction(action) {
|
940 | return action.type.startsWith('@ngrx');
|
941 | }
|
942 | function createInNgZoneCheckMetaReducer({ strictActionWithinNgZone, }) {
|
943 | return (reducer) => strictActionWithinNgZone
|
944 | ? inNgZoneAssertMetaReducer(reducer, {
|
945 | action: (action) => strictActionWithinNgZone && !ignoreNgrxAction(action),
|
946 | })
|
947 | : reducer;
|
948 | }
|
949 | function provideRuntimeChecks(runtimeChecks) {
|
950 | return [
|
951 | {
|
952 | provide: _USER_RUNTIME_CHECKS,
|
953 | useValue: runtimeChecks,
|
954 | },
|
955 | {
|
956 | provide: USER_RUNTIME_CHECKS,
|
957 | useFactory: _runtimeChecksFactory,
|
958 | deps: [_USER_RUNTIME_CHECKS],
|
959 | },
|
960 | {
|
961 | provide: ACTIVE_RUNTIME_CHECKS,
|
962 | deps: [USER_RUNTIME_CHECKS],
|
963 | useFactory: createActiveRuntimeChecks,
|
964 | },
|
965 | {
|
966 | provide: META_REDUCERS,
|
967 | multi: true,
|
968 | deps: [ACTIVE_RUNTIME_CHECKS],
|
969 | useFactory: createImmutabilityCheckMetaReducer,
|
970 | },
|
971 | {
|
972 | provide: META_REDUCERS,
|
973 | multi: true,
|
974 | deps: [ACTIVE_RUNTIME_CHECKS],
|
975 | useFactory: createSerializationCheckMetaReducer,
|
976 | },
|
977 | {
|
978 | provide: META_REDUCERS,
|
979 | multi: true,
|
980 | deps: [ACTIVE_RUNTIME_CHECKS],
|
981 | useFactory: createInNgZoneCheckMetaReducer,
|
982 | },
|
983 | ];
|
984 | }
|
985 | function checkForActionTypeUniqueness() {
|
986 | return [
|
987 | {
|
988 | provide: _ACTION_TYPE_UNIQUENESS_CHECK,
|
989 | multi: true,
|
990 | deps: [ACTIVE_RUNTIME_CHECKS],
|
991 | useFactory: _actionTypeUniquenessCheck,
|
992 | },
|
993 | ];
|
994 | }
|
995 | function _runtimeChecksFactory(runtimeChecks) {
|
996 | return runtimeChecks;
|
997 | }
|
998 | function _actionTypeUniquenessCheck(config) {
|
999 | if (!config.strictActionTypeUniqueness) {
|
1000 | return;
|
1001 | }
|
1002 | const duplicates = Object.entries(REGISTERED_ACTION_TYPES)
|
1003 | .filter(([, registrations]) => registrations > 1)
|
1004 | .map(([type]) => type);
|
1005 | if (duplicates.length) {
|
1006 | throw new Error(`Action types are registered more than once, ${duplicates
|
1007 | .map((type) => `"${type}"`)
|
1008 | .join(', ')}. ${RUNTIME_CHECK_URL}#strictactiontypeuniqueness`);
|
1009 | }
|
1010 | }
|
1011 |
|
1012 | class StoreRootModule {
|
1013 | constructor(actions$, reducer$, scannedActions$, store, guard, actionCheck) { }
|
1014 | }
|
1015 | StoreRootModule.decorators = [
|
1016 | { type: NgModule, args: [{},] }
|
1017 | ];
|
1018 |
|
1019 | StoreRootModule.ctorParameters = () => [
|
1020 | { type: ActionsSubject },
|
1021 | { type: ReducerObservable },
|
1022 | { type: ScannedActionsSubject },
|
1023 | { type: Store },
|
1024 | { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [_ROOT_STORE_GUARD,] }] },
|
1025 | { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [_ACTION_TYPE_UNIQUENESS_CHECK,] }] }
|
1026 | ];
|
1027 | class StoreFeatureModule {
|
1028 | constructor(features, featureReducers, reducerManager, root, actionCheck) {
|
1029 | this.features = features;
|
1030 | this.featureReducers = featureReducers;
|
1031 | this.reducerManager = reducerManager;
|
1032 | const feats = features.map((feature, index) => {
|
1033 | const featureReducerCollection = featureReducers.shift();
|
1034 |
|
1035 | const reducers = featureReducerCollection [index];
|
1036 | return Object.assign(Object.assign({}, feature), { reducers, initialState: _initialStateFactory(feature.initialState) });
|
1037 | });
|
1038 | reducerManager.addFeatures(feats);
|
1039 | }
|
1040 |
|
1041 | ngOnDestroy() {
|
1042 | this.reducerManager.removeFeatures(this.features);
|
1043 | }
|
1044 | }
|
1045 | StoreFeatureModule.decorators = [
|
1046 | { type: NgModule, args: [{},] }
|
1047 | ];
|
1048 |
|
1049 | StoreFeatureModule.ctorParameters = () => [
|
1050 | { type: Array, decorators: [{ type: Inject, args: [_STORE_FEATURES,] }] },
|
1051 | { type: Array, decorators: [{ type: Inject, args: [FEATURE_REDUCERS,] }] },
|
1052 | { type: ReducerManager },
|
1053 | { type: StoreRootModule },
|
1054 | { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [_ACTION_TYPE_UNIQUENESS_CHECK,] }] }
|
1055 | ];
|
1056 | class StoreModule {
|
1057 | static forRoot(reducers, config = {}) {
|
1058 | return {
|
1059 | ngModule: StoreRootModule,
|
1060 | providers: [
|
1061 | {
|
1062 | provide: _ROOT_STORE_GUARD,
|
1063 | useFactory: _provideForRootGuard,
|
1064 | deps: [[Store, new Optional(), new SkipSelf()]],
|
1065 | },
|
1066 | { provide: _INITIAL_STATE, useValue: config.initialState },
|
1067 | {
|
1068 | provide: INITIAL_STATE,
|
1069 | useFactory: _initialStateFactory,
|
1070 | deps: [_INITIAL_STATE],
|
1071 | },
|
1072 | { provide: _INITIAL_REDUCERS, useValue: reducers },
|
1073 | {
|
1074 | provide: _STORE_REDUCERS,
|
1075 | useExisting: reducers instanceof InjectionToken ? reducers : _INITIAL_REDUCERS,
|
1076 | },
|
1077 | {
|
1078 | provide: INITIAL_REDUCERS,
|
1079 | deps: [Injector, _INITIAL_REDUCERS, [new Inject(_STORE_REDUCERS)]],
|
1080 | useFactory: _createStoreReducers,
|
1081 | },
|
1082 | {
|
1083 | provide: USER_PROVIDED_META_REDUCERS,
|
1084 | useValue: config.metaReducers ? config.metaReducers : [],
|
1085 | },
|
1086 | {
|
1087 | provide: _RESOLVED_META_REDUCERS,
|
1088 | deps: [META_REDUCERS, USER_PROVIDED_META_REDUCERS],
|
1089 | useFactory: _concatMetaReducers,
|
1090 | },
|
1091 | {
|
1092 | provide: _REDUCER_FACTORY,
|
1093 | useValue: config.reducerFactory
|
1094 | ? config.reducerFactory
|
1095 | : combineReducers,
|
1096 | },
|
1097 | {
|
1098 | provide: REDUCER_FACTORY,
|
1099 | deps: [_REDUCER_FACTORY, _RESOLVED_META_REDUCERS],
|
1100 | useFactory: createReducerFactory,
|
1101 | },
|
1102 | ACTIONS_SUBJECT_PROVIDERS,
|
1103 | REDUCER_MANAGER_PROVIDERS,
|
1104 | SCANNED_ACTIONS_SUBJECT_PROVIDERS,
|
1105 | STATE_PROVIDERS,
|
1106 | STORE_PROVIDERS,
|
1107 | provideRuntimeChecks(config.runtimeChecks),
|
1108 | checkForActionTypeUniqueness(),
|
1109 | ],
|
1110 | };
|
1111 | }
|
1112 | static forFeature(featureNameOrSlice, reducersOrConfig, config = {}) {
|
1113 | return {
|
1114 | ngModule: StoreFeatureModule,
|
1115 | providers: [
|
1116 | {
|
1117 | provide: _FEATURE_CONFIGS,
|
1118 | multi: true,
|
1119 | useValue: featureNameOrSlice instanceof Object ? {} : config,
|
1120 | },
|
1121 | {
|
1122 | provide: STORE_FEATURES,
|
1123 | multi: true,
|
1124 | useValue: {
|
1125 | key: featureNameOrSlice instanceof Object
|
1126 | ? featureNameOrSlice.name
|
1127 | : featureNameOrSlice,
|
1128 | reducerFactory: !(config instanceof InjectionToken) && config.reducerFactory
|
1129 | ? config.reducerFactory
|
1130 | : combineReducers,
|
1131 | metaReducers: !(config instanceof InjectionToken) && config.metaReducers
|
1132 | ? config.metaReducers
|
1133 | : [],
|
1134 | initialState: !(config instanceof InjectionToken) && config.initialState
|
1135 | ? config.initialState
|
1136 | : undefined,
|
1137 | },
|
1138 | },
|
1139 | {
|
1140 | provide: _STORE_FEATURES,
|
1141 | deps: [Injector, _FEATURE_CONFIGS, STORE_FEATURES],
|
1142 | useFactory: _createFeatureStore,
|
1143 | },
|
1144 | {
|
1145 | provide: _FEATURE_REDUCERS,
|
1146 | multi: true,
|
1147 | useValue: featureNameOrSlice instanceof Object
|
1148 | ? featureNameOrSlice.reducer
|
1149 | : reducersOrConfig,
|
1150 | },
|
1151 | {
|
1152 | provide: _FEATURE_REDUCERS_TOKEN,
|
1153 | multi: true,
|
1154 | useExisting: reducersOrConfig instanceof InjectionToken
|
1155 | ? reducersOrConfig
|
1156 | : _FEATURE_REDUCERS,
|
1157 | },
|
1158 | {
|
1159 | provide: FEATURE_REDUCERS,
|
1160 | multi: true,
|
1161 | deps: [
|
1162 | Injector,
|
1163 | _FEATURE_REDUCERS,
|
1164 | [new Inject(_FEATURE_REDUCERS_TOKEN)],
|
1165 | ],
|
1166 | useFactory: _createFeatureReducers,
|
1167 | },
|
1168 | checkForActionTypeUniqueness(),
|
1169 | ],
|
1170 | };
|
1171 | }
|
1172 | }
|
1173 | StoreModule.decorators = [
|
1174 | { type: NgModule, args: [{},] }
|
1175 | ];
|
1176 | function _createStoreReducers(injector, reducers) {
|
1177 | return reducers instanceof InjectionToken ? injector.get(reducers) : reducers;
|
1178 | }
|
1179 | function _createFeatureStore(injector, configs, featureStores) {
|
1180 | return featureStores.map((feat, index) => {
|
1181 | if (configs[index] instanceof InjectionToken) {
|
1182 | const conf = injector.get(configs[index]);
|
1183 | return {
|
1184 | key: feat.key,
|
1185 | reducerFactory: conf.reducerFactory
|
1186 | ? conf.reducerFactory
|
1187 | : combineReducers,
|
1188 | metaReducers: conf.metaReducers ? conf.metaReducers : [],
|
1189 | initialState: conf.initialState,
|
1190 | };
|
1191 | }
|
1192 | return feat;
|
1193 | });
|
1194 | }
|
1195 | function _createFeatureReducers(injector, reducerCollection) {
|
1196 | const reducers = reducerCollection.map((reducer) => {
|
1197 | return reducer instanceof InjectionToken ? injector.get(reducer) : reducer;
|
1198 | });
|
1199 | return reducers;
|
1200 | }
|
1201 | function _initialStateFactory(initialState) {
|
1202 | if (typeof initialState === 'function') {
|
1203 | return initialState();
|
1204 | }
|
1205 | return initialState;
|
1206 | }
|
1207 | function _concatMetaReducers(metaReducers, userProvidedMetaReducers) {
|
1208 | return metaReducers.concat(userProvidedMetaReducers);
|
1209 | }
|
1210 | function _provideForRootGuard(store) {
|
1211 | if (store) {
|
1212 | throw new TypeError(`StoreModule.forRoot() called twice. Feature modules should use StoreModule.forFeature() instead.`);
|
1213 | }
|
1214 | return 'guarded';
|
1215 | }
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 |
|
1227 |
|
1228 |
|
1229 |
|
1230 |
|
1231 | function on(...args) {
|
1232 |
|
1233 |
|
1234 | const reducer = args.pop();
|
1235 | const types = args.map((creator) => creator.type);
|
1236 | return { reducer, types };
|
1237 | }
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 |
|
1261 |
|
1262 |
|
1263 |
|
1264 |
|
1265 |
|
1266 |
|
1267 |
|
1268 |
|
1269 |
|
1270 |
|
1271 |
|
1272 |
|
1273 |
|
1274 |
|
1275 |
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 |
|
1283 |
|
1284 |
|
1285 |
|
1286 | function createReducer(initialState, ...ons) {
|
1287 | const map = new Map();
|
1288 | for (const on of ons) {
|
1289 | for (const type of on.types) {
|
1290 | const existingReducer = map.get(type);
|
1291 | if (existingReducer) {
|
1292 | const newReducer = (state, action) => on.reducer(existingReducer(state, action), action);
|
1293 | map.set(type, newReducer);
|
1294 | }
|
1295 | else {
|
1296 | map.set(type, on.reducer);
|
1297 | }
|
1298 | }
|
1299 | }
|
1300 | return function (state = initialState, action) {
|
1301 | const reducer = map.get(action.type);
|
1302 | return reducer ? reducer(state, action) : state;
|
1303 | };
|
1304 | }
|
1305 |
|
1306 |
|
1307 |
|
1308 |
|
1309 |
|
1310 |
|
1311 |
|
1312 |
|
1313 |
|
1314 |
|
1315 |
|
1316 | export { ACTIVE_RUNTIME_CHECKS, ActionsSubject, FEATURE_REDUCERS, INIT, INITIAL_REDUCERS, INITIAL_STATE, META_REDUCERS, REDUCER_FACTORY, ReducerManager, ReducerManagerDispatcher, ReducerObservable, STORE_FEATURES, ScannedActionsSubject, State, StateObservable, Store, StoreFeatureModule, StoreModule, StoreRootModule, UPDATE, USER_PROVIDED_META_REDUCERS, USER_RUNTIME_CHECKS, combineReducers, compose, createAction, createFeature, createFeatureSelector, createReducer, createReducerFactory, createSelector, createSelectorFactory, defaultMemoize, defaultStateFn, isNgrxMockEnvironment, on, props, reduceState, resultMemoize, select, setNgrxMockEnvironment, union, STORE_PROVIDERS as ɵb, createSerializationCheckMetaReducer as ɵba, createImmutabilityCheckMetaReducer as ɵbb, createInNgZoneCheckMetaReducer as ɵbc, provideRuntimeChecks as ɵbd, checkForActionTypeUniqueness as ɵbe, _runtimeChecksFactory as ɵbf, _actionTypeUniquenessCheck as ɵbg, ACTIONS_SUBJECT_PROVIDERS as ɵc, REDUCER_MANAGER_PROVIDERS as ɵd, SCANNED_ACTIONS_SUBJECT_PROVIDERS as ɵe, isEqualCheck as ɵf, STATE_PROVIDERS as ɵg, _ROOT_STORE_GUARD as ɵh, _INITIAL_STATE as ɵi, _REDUCER_FACTORY as ɵj, _INITIAL_REDUCERS as ɵk, _STORE_REDUCERS as ɵl, _FEATURE_REDUCERS as ɵm, _FEATURE_CONFIGS as ɵn, _STORE_FEATURES as ɵo, _FEATURE_REDUCERS_TOKEN as ɵp, _RESOLVED_META_REDUCERS as ɵq, _USER_RUNTIME_CHECKS as ɵr, _ACTION_TYPE_UNIQUENESS_CHECK as ɵs, _createStoreReducers as ɵt, _createFeatureStore as ɵu, _createFeatureReducers as ɵv, _initialStateFactory as ɵw, _concatMetaReducers as ɵx, _provideForRootGuard as ɵy, createActiveRuntimeChecks as ɵz };
|
1317 |
|