/** Copyright (C) 2020-2026 Kedron Holdings LLC, All Rights Reserved. This file is part of Reactor.
 *  For info and license terms please see https://reactor.toggledbits.com/
 *  ------------------------------------------------------------------------------
*/
function a5_0x1a92() {
    const _0x215a46 = [
        'now',
        'extract',
        '13497903DFgGXd',
        '381720bXiEwu',
        '1241220wQpqOM',
        '2045wbvRLU',
        './Observable.js',
        '\x20already\x20exists',
        'Container#',
        './Logger.js',
        'Invalid\x20strategy\x20argument',
        'closeAll',
        '451111kMMqbc',
        'enumDataObjects',
        '_createDataObject',
        'hasDataObject',
        '3012wZuViE',
        'value',
        '_saveDataObject',
        'values',
        'set',
        'exception',
        '\x20in\x20container\x20',
        '605932WwoXAQ',
        'exports',
        '_strategy',
        'getDataObject',
        'delete',
        'has',
        'saveDataObject',
        'sync',
        'Data\x20object\x20',
        'toString',
        'load',
        'getInstance',
        'Closing\x20container\x20%1',
        '_id',
        'undefined',
        'getID',
        '659484FWYbDO',
        './util.js',
        '_removeDataObject',
        '49eHTDDB',
        'getDefaultLogger',
        './Exception',
        'close'
    ];
    a5_0x1a92 = function () {
        return _0x215a46;
    };
    return a5_0x1a92();
}
function a5_0x5c85(_0x3c7308, _0x25a2da) {
    _0x3c7308 = _0x3c7308 - 0xa9;
    const _0x1a9287 = a5_0x1a92();
    let _0x5c859d = _0x1a9287[_0x3c7308];
    return _0x5c859d;
}
const a5_0x2234ed = a5_0x5c85;
(function (_0xe7dcf, _0x4b9f4f) {
    const _0x4ce4c2 = a5_0x5c85, _0x33efae = _0xe7dcf();
    while (!![]) {
        try {
            const _0x572756 = -parseInt(_0x4ce4c2(0xab)) / 0x1 + -parseInt(_0x4ce4c2(0xb6)) / 0x2 + -parseInt(_0x4ce4c2(0xc6)) / 0x3 + -parseInt(_0x4ce4c2(0xaf)) / 0x4 * (-parseInt(_0x4ce4c2(0xd2)) / 0x5) + -parseInt(_0x4ce4c2(0xd1)) / 0x6 + parseInt(_0x4ce4c2(0xc9)) / 0x7 * (-parseInt(_0x4ce4c2(0xd0)) / 0x8) + parseInt(_0x4ce4c2(0xcf)) / 0x9;
            if (_0x572756 === _0x4b9f4f)
                break;
            else
                _0x33efae['push'](_0x33efae['shift']());
        } catch (_0x55ad4a) {
            _0x33efae['push'](_0x33efae['shift']());
        }
    }
}(a5_0x1a92, 0x47864));
const version = 0x6235, Logger = require(a5_0x2234ed(0xd6)), Strategy = require('./Strategy.js'), Data = require('./Data.js'), Observable = require(a5_0x2234ed(0xd3)), {mixin} = require(a5_0x2234ed(0xc7)), {DataNotFoundException} = require(a5_0x2234ed(0xcb));
var containers = new Map();
class Container {
    constructor(_0x664680, _0x4d06f2) {
        const _0x464214 = a5_0x2234ed;
        if (!(_0x4d06f2 instanceof Strategy))
            throw new TypeError(_0x464214(0xa9));
        this['_strategy'] = _0x4d06f2, this[_0x464214(0xc3)] = String(_0x664680), containers[_0x464214(0xb3)](_0x664680, this);
    }
    static [a5_0x2234ed(0xc1)](_0x73128a, _0x4529db) {
        const _0x1774af = a5_0x2234ed;
        if (containers[_0x1774af(0xbb)](_0x73128a))
            return containers['get'](_0x73128a);
        return _0x4529db ? new Container(_0x73128a, _0x4529db) : undefined;
    }
    static [a5_0x2234ed(0xaa)]() {
        const _0x228eb8 = a5_0x2234ed;
        for (let _0xf88ee5 of containers[_0x228eb8(0xb2)]()) {
            Logger['getDefaultLogger']()['info'](_0x228eb8(0xc2), _0xf88ee5);
            try {
                _0xf88ee5[_0x228eb8(0xcc)]();
            } catch (_0x468ea0) {
                Logger[_0x228eb8(0xca)]()[_0x228eb8(0xb4)](_0x468ea0);
            }
        }
    }
    [a5_0x2234ed(0xc5)]() {
        return this['_id'];
    }
    [a5_0x2234ed(0xbf)]() {
        const _0x4a32b4 = a5_0x2234ed;
        return _0x4a32b4(0xd5) + this[_0x4a32b4(0xc3)];
    }
    [a5_0x2234ed(0xae)](_0x15abe0) {
        const _0xd9394f = a5_0x2234ed;
        return this[_0xd9394f(0xb8)][_0xd9394f(0xae)](_0x15abe0);
    }
    [a5_0x2234ed(0xac)]() {
        const _0x2aa9da = a5_0x2234ed;
        return this[_0x2aa9da(0xb8)][_0x2aa9da(0xac)]();
    }
    [a5_0x2234ed(0xbd)]() {
        const _0x2cd16e = a5_0x2234ed;
        this[_0x2cd16e(0xb8)][_0x2cd16e(0xbd)]();
    }
    [a5_0x2234ed(0xcc)]() {
        const _0xfe460d = a5_0x2234ed;
        this[_0xfe460d(0xb8)][_0xfe460d(0xcc)](), this['_strategy'] = null, containers[_0xfe460d(0xba)](this[_0xfe460d(0xc3)]);
    }
    ['_getDataObject'](_0x4cbdf5, _0x3f00c7, _0x149644) {
        const _0x2e2b57 = a5_0x2234ed;
        if (!(_0x4cbdf5 instanceof Data)) {
            const _0x2e430a = new TypeError('Container.getDataObject\x20expects\x20Data\x20as\x20first\x20argument');
            Logger[_0x2e2b57(0xca)]()[_0x2e2b57(0xb4)](_0x2e430a);
            throw _0x2e430a;
        }
        const _0x2bf738 = this[_0x2e2b57(0xb8)][_0x2e2b57(0xb9)](_0x4cbdf5['getID']());
        if (_0x2e2b57(0xc4) !== typeof _0x2bf738)
            return _0x4cbdf5[_0x2e2b57(0xc0)](_0x2bf738);
        else {
            if (_0x2e2b57(0xc4) !== typeof _0x3f00c7)
                return _0x4cbdf5[_0x2e2b57(0xc0)]({
                    'value': _0x3f00c7,
                    'tss': Date[_0x2e2b57(0xcd)](),
                    'tsc': 0x0
                });
            else
                throw new DataNotFoundException(this['getID'](), _0x4cbdf5[_0x2e2b57(0xc5)]());
        }
    }
    [a5_0x2234ed(0xb1)](_0x181999, _0x1be4f2) {
        const _0xca6380 = a5_0x2234ed;
        return this[_0xca6380(0xb8)][_0xca6380(0xbc)](_0x181999[_0xca6380(0xc5)](), _0x181999[_0xca6380(0xce)](), _0x1be4f2);
    }
    [a5_0x2234ed(0xad)](_0x3ba890, _0x13e13c) {
        const _0x1bfbef = a5_0x2234ed;
        if (this[_0x1bfbef(0xae)](_0x3ba890))
            throw new ReferenceError(_0x1bfbef(0xbe) + _0x3ba890 + _0x1bfbef(0xb5) + this[_0x1bfbef(0xc3)] + _0x1bfbef(0xd4));
        let _0x12f454 = Data[_0x1bfbef(0xc1)](this, _0x3ba890, _0x13e13c);
        return _0x12f454[_0x1bfbef(0xb0)] = 'undefined' === typeof _0x13e13c ? null : _0x13e13c, this['_strategy'][_0x1bfbef(0xbc)](_0x3ba890, _0x12f454['extract']()), _0x12f454;
    }
    [a5_0x2234ed(0xc8)](_0x32c00c) {
        this['_strategy']['removeDataObject'](_0x32c00c);
    }
}
mixin(Container, Observable), module[a5_0x2234ed(0xb7)] = Container;