"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const boot_1 = require("../boot");
const RemoteRef_1 = require("../client/RemoteRef");
const makeRemoteUnitAPI_1 = require("../client/makeRemoteUnitAPI");
const boot_2 = require("../client/platform/worker/boot");
const _classes_1 = __importDefault(require("../system/_classes"));
const _specs_1 = __importDefault(require("../system/_specs"));
const system = (0, boot_1.boot)(null, (0, boot_2.workerApi)(), {
    specs: _specs_1.default,
    classes: _classes_1.default,
    components: {},
});
const post = (data) => {
    postMessage(data, null);
};
const api = (0, makeRemoteUnitAPI_1.makeRemoteObjectAPI)(system, ['S']);
const ref = new RemoteRef_1.RemoteRef(api, post);
onmessage = function (event) {
    const { data } = event;
    ref.exec(data);
};
//# sourceMappingURL=system.js.map