/** 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/
 *  ------------------------------------------------------------------------------
*/
const a13_0xbc981a = a13_0x16b7;
function a13_0x2f1e() {
    const _0x23140b = [
        '5TWrrlH',
        'Expression\x20name\x20\x22',
        'mixin',
        '2070362eoaKON',
        './util',
        'unsubscribe',
        '249752aCqfax',
        'isValidName',
        'getLogger',
        '\x22\x20already\x20exists.',
        'get',
        'Needs\x20subclass\x20implementation',
        'add',
        'toString',
        '32586iBBdgw',
        './Observer.js',
        'getValue',
        'has',
        '45axXQFp',
        'debug',
        '1180076wfxiUD',
        '_destroy',
        '9748680tFeAFC',
        '2908398tcCSzU',
        '312962omrlSj',
        'exports',
        '__deleted',
        'log',
        'setValue',
        'Expression\x20named\x20\x22',
        'test',
        '50LkIFBC',
        '%1:\x20Expression._destroy',
        'disconnect',
        'getID'
    ];
    a13_0x2f1e = function () {
        return _0x23140b;
    };
    return a13_0x2f1e();
}
(function (_0x2628be, _0x5f7238) {
    const _0x14eca1 = a13_0x16b7, _0x4b23b1 = _0x2628be();
    while (!![]) {
        try {
            const _0xe173e5 = parseInt(_0x14eca1(0xff)) / 0x1 + -parseInt(_0x14eca1(0x106)) / 0x2 * (-parseInt(_0x14eca1(0xf5)) / 0x3) + -parseInt(_0x14eca1(0xfb)) / 0x4 * (-parseInt(_0x14eca1(0x10a)) / 0x5) + parseInt(_0x14eca1(0xfe)) / 0x6 + -parseInt(_0x14eca1(0x10d)) / 0x7 + -parseInt(_0x14eca1(0x110)) / 0x8 * (-parseInt(_0x14eca1(0xf9)) / 0x9) + -parseInt(_0x14eca1(0xfd)) / 0xa;
            if (_0xe173e5 === _0x5f7238)
                break;
            else
                _0x4b23b1['push'](_0x4b23b1['shift']());
        } catch (_0x5f3df4) {
            _0x4b23b1['push'](_0x4b23b1['shift']());
        }
    }
}(a13_0x2f1e, 0x3cf7d));
function a13_0x16b7(_0x49ba9f, _0x33d97b) {
    _0x49ba9f = _0x49ba9f - 0xf5;
    const _0x2f1ed3 = a13_0x2f1e();
    let _0x16b7d1 = _0x2f1ed3[_0x49ba9f];
    return _0x16b7d1;
}
const version = 0x6235, Logger = require('./Logger.js'), Observable = require('./Observable.js'), Observer = require(a13_0xbc981a(0xf6)), util = require(a13_0xbc981a(0x10e));
var expressions = {};
const validName = /^\p{Alphabetic}[\p{Alphabetic}0-9_$]*$/iu;
class Expression {
    constructor(_0x330b2a) {
        const _0xaa7707 = a13_0xbc981a;
        this['id'] = _0x330b2a, this[_0xaa7707(0x102)] = Logger[_0xaa7707(0x112)](this);
    }
    static ['isValidName'](_0x3eded1) {
        const _0x5f4da3 = a13_0xbc981a;
        return validName[_0x5f4da3(0x105)](_0x3eded1);
    }
    static [a13_0xbc981a(0xf8)](_0x1e37b1) {
        return !!expressions[_0x1e37b1];
    }
    static [a13_0xbc981a(0x116)](_0x49cdf8) {
        const _0x3aafd9 = a13_0xbc981a;
        let _0x30feb7 = _0x49cdf8[_0x3aafd9(0x109)]();
        if (!Expression[_0x3aafd9(0x111)](_0x30feb7))
            throw new Error(_0x3aafd9(0x10b) + _0x30feb7 + '\x22\x20is\x20invalid');
        if (expressions[_0x30feb7])
            throw new Error(_0x3aafd9(0x104) + _0x30feb7 + _0x3aafd9(0x113));
        return expressions[_0x30feb7] = _0x49cdf8, _0x49cdf8;
    }
    static [a13_0xbc981a(0x114)](_0x5e08a4) {
        return expressions[_0x5e08a4];
    }
    [a13_0xbc981a(0x117)]() {
        return this['constructor']['name'] + '#' + String(this['id']);
    }
    [a13_0xbc981a(0xfc)]() {
        const _0x16d55a = a13_0xbc981a;
        this['log'][_0x16d55a(0xfa)](0x5, _0x16d55a(0x107), this), this['id'] && (this[_0x16d55a(0x10f)](), this[_0x16d55a(0x108)](), delete expressions[this['id']], this[_0x16d55a(0x101)] = this['id'], this['id'] = null);
    }
    [a13_0xbc981a(0x109)]() {
        return this['id'];
    }
    [a13_0xbc981a(0xf7)]() {
        const _0x55525f = a13_0xbc981a;
        throw new ReferenceError(_0x55525f(0x115));
    }
    [a13_0xbc981a(0x103)]() {
        const _0x3ca243 = a13_0xbc981a;
        throw new ReferenceError(_0x3ca243(0x115));
    }
}
util[a13_0xbc981a(0x10c)](Expression, Observer), util[a13_0xbc981a(0x10c)](Expression, Observable), module[a13_0xbc981a(0x100)] = Expression;