function importIndex(key, data) {

    if (!data) {
        return;
    }
    if ("string" == typeof data) {
        data = /** @type {Array<Object>} */JSON.parse( /** @type {string} */data);
    }

    const split = key.split(".");
    if ("json" === split[split.length - 1]) {
        split.pop();
    }
    if (3 === split.length) {
        split.shift();
    }
    key = 1 < split.length ? split[1] : split[0];

    switch (key) {

        case "cfg":

            break;

        case "reg":

            this.fastupdate = !1;
            this.reg = json_to_reg( /** @type {Array<string|number>} */data, this.reg);
            break;

        case "map":

            this.map = json_to_map(data, this.map);
            break;

        case "ctx":

            this.ctx = json_to_ctx(data, this.ctx);
            break;
    }
}
@param {string} key
@param {string|Array<Object>=} data
@this Index