<commit_before>import { Injectable } from '@angular/core';

import { select, Store } from '@ngrx/store';

import { InventoryPartialState } from './inventory.reducer';
import { inventoryQuery } from './inventory.selectors';
import { LoadInventory, UpdateInventory } from './inventory.actions';
import { ContainerType } from '../../../model/user/inventory/container-type';
import { UserInventory } from '../../../model/user/inventory/user-inventory';
import { filter } from 'rxjs/operators';

@Injectable({
  providedIn: 'root'
})
export class InventoryFacade {
  loaded$ = this.store.pipe(select(inventoryQuery.getLoaded));

  inventory$ = this.store.pipe(
    select(inventoryQuery.getInventory),
    filter(inventory => inventory !== null)
  );

  constructor(private store: Store<InventoryPartialState>) {<commit_msg>fix(inventory): fixed an issue with retainers not reset properly<commit_after>import { Injectable } from '@angular/core';

import { select, Store } from '@ngrx/store';

import { InventoryPartialState } from './inventory.reducer';
import { inventoryQuery } from './inventory.selectors';
import { LoadInventory, UpdateInventory } from './inventory.actions';
import { ContainerType } from '../../../model/user/inventory/container-type';
import { UserInventory } from '../../../model/user/inventory/user-inventory';
import { filter, map } from 'rxjs/operators';

@Injectable({
  providedIn: 'root'
})
export class InventoryFacade {
  loaded$ = this.store.pipe(select(inventoryQuery.getLoaded));

  inventory$ = this.store.pipe(
    select(inventoryQuery.getInventory),
    filter(inventory => inventory !== null),
    map(inventory => inventory.clone())
  );

  constructor(private store: Store<InventoryPartialState>) {
{'fraction_non_alphanumeric': 0.15446685878962535, 'fraction_numerical': 0.0, 'mean_word_length': 4.786666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1372072', 'n_tokens_mistral': 501, 'n_tokens_neox': 502, 'n_words': 113}