const searchModes = [
  {key: "imei", name: "imei"}, 
  {key: "machine_id", name: "ID машины"}, 
  {key: "device_number", name: "КР"}, 
  {key: "machine_type", name: "Тип и №"}
]

const leftTopButtons = [
  {key: 'cards', class: 'ri-dashboard-line',  icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 21V11H21V21H13ZM3 13V3H11V13H3ZM9 11V5H5V11H9ZM3 21V15H11V21H3ZM5 19H9V17H5V19ZM15 19H19V13H15V19ZM13 3H21V9H13V3ZM15 5V7H19V5H15Z" fill="currentColor"></path></svg>`},
  {key: 'table', class: 'ri-menu-fill', icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 11H21V13H3V11ZM3 18H21V20H3V18Z" fill="currentColor"></path></svg>`},
]

const rightTopButtons = [
  {key: 'filter', iconClass: 'ri-filter-line', classBtn: 'bg-primary text-white'},
  {key: 'clearFilter', classBtn: 'bg-slate-500 text-white', name: 'Сбросить'},
]

const selects = [
  {key: 'org_type_name', order: 1, title: 'Головные организации', data: []}, 
  {key: 'railway_name', order: 2, title: 'Дорога', data: []},
  {key: 'org_name', order: 3, title: 'Предприятие', data: []}, 
  {key: 'type', order: 4, title: 'Тип машины', data: []},
  {key: 'zav_nomer', order: 5, title: 'Заводской номер', data: []},
]

const pagination = {
  id: 'tableMachines',
  paginationOptions: {page_number: 1, page_size: 20, total: 0, total_pages: 0},
  selectOption: [10, 20, 30, 40, 50]
}


const selectors = {
  org_name: ["ПЧМ Воронеж", "ПЧМ Фаянсовая",
    "ПЧМ Топки", "ПЧМ Кочетовка", "ПЧР КЛНГ",
    "ПЧМ Нижний Новгород", "ПЧМ Новосибирск",
    "ПЧМ Екатеринбург", "ПЧМ Омск", "ПЧМ Алтай",
    "ПЧМ Тосно", "ПЧМ Вязьма", "ПМС-46", "ПМС-183",
    "ПЧМ Тихорецк", "ПЧМ Сызрань",
    "ПЧМ Хабаровск", null, "ПЧМ Северобайкальск",
    "ПЧМ Смолино", "ПЧМ Вологда", "ПЧМ Пермь",
    "ПЧМ Астрахань", "ПЧМ Нигозеро",
    "ПЧМ Челябинск", "ПЧМ Завитая", "ПМС-217",
    "ПМС-199", "ПМС-31", "ТрансЭнерго", "ПМС-340",
    "ОПМС-99", "ПМС-11", "ПМС-77", "ПМС-208", "ПМС-172",
    "ПМС-12", "ПМС-22",
    "Экспулуатация БУ прекращена", "ОПМС-68",
    "ПМС-170", "ОПМС-103", "ПМС-205", "ПМС-152", "ПМС-20",
    "ПЧМ Тында", "КалугаПутьМаш",
    "ПЧМ Санкт-Петербург", "ПЧМ Красноярск"],
  org_type_name: ["ЦДИМ", "Другие", "ЦДРП"],
  railway_name: ["Ю-Вост", "Моск", "З-Сиб", "Клг", "Горьк",
    "Сверд", "Окт", "Заб", "В-Сиб", "С-Кав", "Кбш",
    "Д-Вост", null, "Ю-Ур", "Сев", "Прив", "РЖД", "Крас"],
  type: ["УТМ", "РПБ", "ПРЛ УПК", "ПУМА", "МДС", "МПТ",
    "ТЭС", "СПП", "ДСП", "СЧ", "ЩОМ", "RM", "АСГ", "ВПО",
    "без типа", "ПМГ", "МТГ", "АС", "СМ", "ВПР", "ПСС",
    "МПК", "АДМ", "АГД", "УК", "АМ", "ПРЛ", "АДЭ",
    "Унимат", "ВПРС", "ПБ", "Дуоматик", "МВУ",
    "АВФ-1М.2", "Динамик", "АГС", "ПМА", "ССГ-1", "СЧУ",
    "АГП", "Унимат компакт", "ДГКу", "СЗ", "ТЭУ",
    "РБ", "ФАТРА",],
  zav_nomer: ["84", "49", "15", "90", "27", "9", "5", "105", "005", "656",
    "001", "39", "38", "57", "03", "003", "593", "235", "1453", "1307", "766",
    "528", "485", "02", "752", "704", "584", "669", "261", "482", "762", "985",
    "605", "016", "1258", "729", "963", "927", "319", "1154", "1163", "825",
    "1276", "1062", "1025",]
}


const machines = [
  {
    org_type_name: 'ЦДИМ1',
    machine_type: 'МПТ',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'З-Сиб2',
    org_name: 'ПЧМ Омск',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1852',
  },
  {
    org_type_name: 'Другие1',
    machine_type: 'УТМ',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Ю-Вост2',
    org_name: 'ПЧМ Воронеж',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1771',
  },
  {
    org_type_name: 'ЦДРП1',
    machine_type: 'ПУМА',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Ю-Вост2',
    org_name: 'ПЧМ Топки',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1253',
  },
  {
    org_type_name: 'ЦДИМ1',
    machine_type: 'Дуоматик',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'З-Сиб2',
    org_name: 'ПЧМ Воронеж',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1880',
  },
  {
    org_type_name: 'ЦДРП1',
    machine_type: 'УТМ',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Горьк2',
    org_name: 'ПЧМ Омск',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1880',
  },
  {
    org_type_name: 'ЦДИМ1',
    machine_type: 'Дуоматик',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Горьк2',
    org_name: 'ПЧМ Нижний Новгород',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1253',
  },
  {
    org_type_name: 'Другие1',
    machine_type: 'МПТ',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'З-Вост2',
    org_name: 'ПЧМ Воронеж',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1771',
  },
  {
    org_type_name: 'ЦДРП1',
    machine_type: 'ПУМА',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Клг2',
    org_name: 'ПЧМ Топки',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: ' 1880',
  },
  {
    org_type_name: 'Другие1',
    machine_type: 'УТМ',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Горьк2',
    org_name: 'ПЧМ Нижний Новгород',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1771',
  },
  {
    org_type_name: 'ЦДРП1',
    machine_type: 'АС',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'З-Сиб2',
    org_name: 'ПЧМ Фаянсовая',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1532',
  },
  {
    org_type_name: 'ЦДИМ1',
    machine_type: 'МПТ',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Клг2',
    org_name: 'ПЧМ Топки',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1225',
  },
  {
    org_type_name: 'Другие1',
    machine_type: 'Дуоматик',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Моск2',
    org_name: 'ПЧМ Фаянсовая',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1532',
  },
  {
    org_type_name: 'Другие1',
    machine_type: 'ПУМА',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Моск2',
    org_name: 'ПЧМ Нижний Новгород',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1225',
  },
  {
    org_type_name: 'ЦДИМ1',
    machine_type: 'АС',
    imei: '868136031152757',
    machine_id: 1018,
    railway_name: 'Моск2',
    org_name: 'ПЧМ Воронеж',
    nomer_zn8: '19735042',
    device_number: 'КР180389',
    zav_nomer: '1253',
  },
    
]

// const pieCharts = [
//   { value: 1048, name: "Есть МЛ, выходил на связь", color: "rgb(134, 212, 131, 1)" },
//   { value: 735, name: 'Direct' },
//   { value: 580, name: 'Email' },
//   { value: 484, name: 'Union Ads' },
//   { value: 300, name: 'Video Ads' }
// ]

const chartsFilterParams = [{filterKey: 'commun', values: ['на связи', 'не на связи']}, {filterKey: 'routes', values: ['есть мл, выходил на связь', 'есть мл, нет связи', 'нет мл, выходил на связь', 'нет мл, нет связи']}, {filterKey: 'rors', values: ['рорс', 'не рорс', 'нет данных']}]
const chartsGroupByParams = [{groupByKey: 'org_type_name', value: 'цдим', valueId: 'cdim'}, {groupByKey: 'org_type_name', value: 'цдрп', valueId: 'cdrp'}]
const chartsGroupByParams2 = [{groupByKey: 'machine_class', value: 'мрт', valueId: 'mpt_types'}, {groupByKey: 'machine_class', value: 'ждсм', valueId: 'gdsm_types'}, {groupByKey: 'machine_class', value: 'см', valueId: 'sm_pss_types'}]
const chartsFilterKeysMl = ['routes_common', 'routes_emergency', 'routes_other', 'routes_repair', 'routes_without_leaving']
const chartsMountParams = [{groupByKey: 'year', filterKey: 'client_type', countKey: 'device_count'}, {groupByKey: 'year', filterKey: 'mounter_type', countKey: 'device_count'}]
const chartsBarTypesParams = [{groupByKey: 'org_type_name', filterKey: 'commun', valueId: 'types'}, {groupByKey: 'org_type_name', filterKey: 'routes', valueId: 'types'}, {groupByKey: 'org_type_name', filterKey: 'rors', valueId: 'types'}]
const chartsBarTypesGroupByParams = [{groupByKey: 'org_type_name', filterKey: 'commun', typeId: 'mpt_types', valueId: 'types'}, {groupByKey: 'org_type_name', filterKey: 'commun', typeId: 'gdsm_types', valueId: 'types'}, {groupByKey: 'org_type_name', filterKey: 'commun', typeId: 'sm_pss_types', valueId: 'types'}]
const chartsBarTypesWithoutLayoutParams = [{groupByKey: 'railway_name', filterKey: 'commun', groupByValue: 'ЦДИМ', valueId: 'cdim'}, {groupByKey: 'railway_name', filterKey: 'commun', groupByValue: 'ЦДРП', valueId: 'cdrp'}]

const charts = {
  pie: {
    countMachines: 4790,
    period: 'две недели',
    machines: [
      { name: "Есть МЛ, выходил на связь", value: 1048, color: "rgb(134, 212, 131, 1)", order: 1 },
      { name: "Есть МЛ, нет связи", value: 1048, color: "rgb(134, 212, 131, 1)", order: 2 },
      { name: "Нет МЛ, выходил на связь", value: 1048, color: "rgb(134, 212, 131, 1)", order: 3 },
      { name: "Нет МЛ, нет связи", value: 1048, color: "rgb(134, 212, 131, 1)", order: 4 },
    ]},
  mainMl: {
    countMachinesWithMl: 2916,
    period: 'две недели',
    machines: [
      { key: "routes_common", name: "Обычные", value: 2182, itemStyle: {color: "rgb(134, 212, 131, 1)"}, order: 1 },
      { key: "routes_emergency", name: "Аварийные", value: 64, itemStyle: {color: "rgb(255, 114, 114, 1)"}, order: 2 },
      { key: "routes_other", name: "Прочие", value: 259, itemStyle: {color: "rgb(196, 161, 201, 1)"}, order: 3 },
      { key: "routes_repair", name: "Ремонтные", value: 338, itemStyle: {color: "rgb(228, 202, 163, 1)"}, order: 4 },
      { key: "routes_without_leaving", name: "Без выезда", value: 73, itemStyle: {color: "rgb(243, 161, 30, 1)"}, order: 5 },
      { key: "routes_without_ml", name: "СПС без МЛ", value: 3073, itemStyle: {color: "rgb(165, 165, 165, 1)"}, order: 6 },
    ]},
  mount_mounter_type_bar: {
    chartId: "mount_mounter_type_bar",
    countMounts: 5436,
    filterKey: "mounter_type",
    height: 500,
    type: "mount",
    xAxisData: [
      [
        {
          charts: [
            {name: "ВНИИЖТ", value: 92},
            {name: "Калугапутьмаш", value: 1}
          ],
          totalCount: 3,
          yAxisData: "2016 г."
        },
        {
          charts: [
            {name: "ВНИИЖТ", value: 349},
            {name: "КалугаРПМ", value: 9},
            {name: "Калугапутьмаш", value: 92},
            {name: "Свердловский РПМ", value: 23},
            {
              name: "Тихорецкий завод им Воровского",
              value: 26
            },
            {name: "Тулажелдормаш", value: 8}
          ],
          totalCount: 9,
          yAxisData: "2017 г."
        },
        {
          charts: [
            {name: "ВНИИЖТ", value: 590},
            {name: "КалугаРПМ", value: 7},
            {name: "Калугапутьмаш", value: 73},
            {name: "Свердловский РПМ", value: 30},
            {
              name: "Тихорецкий завод им Воровского",
              value: 23
            },
            {name: "Тулажелдормаш", value: 32}
          ],
          totalCount: 11,
          yAxisData: "2018 г."
        },
        {
          charts: [
            {name: "ВНИИЖТ", value: 719},
            {name: "КалугаРПМ", value: 16},
            {name: "Калугапутьмаш", value: 88},
            {name: "Свердловский РПМ", value: 20},
            {
              name: "Тихорецкий завод им Воровского",
              value: 33
            },
            {name: "Тулажелдормаш", value: 24}
          ],
          totalCount: 12,
          yAxisData: "2019 г."
        },
        {
          charts: [
            {name: "ВНИИЖТ", value: 594},
            {name: "КалугаРПМ", value: 18},
            {name: "Калугапутьмаш", value: 100},
            {name: "Свердловский РПМ", value: 19},
            {
              name: "Тихорецкий завод им Воровского",
              value: 36
            },
            {name: "Тулажелдормаш", value: 31}
          ],
          totalCount: 9,
          yAxisData: "2020 г."
        },
        {
          charts: [
            {name: "ВНИИЖТ", value: 777},
            {name: "Инжиниринг Сервис-Путьмаш", value: 10},
            {name: "КалугаРПМ", value: 5},
            {name: "Калугапутьмаш", value: 84},
            {name: "Пермский РПМ", value: 5},
            {name: "Свердловский РПМ", value: 4},
            {
              name: "Тихорецкий завод им Воровского",
              value: 14
            },
            {name: "Тулажелдормаш", value: 28}
          ],
          totalCount: 12,
          yAxisData: "2021 г."
        },
        {
          charts: [
            {name: "ВНИИЖТ", value: 746},
            {name: "Инжиниринг Сервис-Путьмаш", value: 10},
            {name: "КалугаРПМ", value: 4},
            {name: "Калугапутьмаш", value: 36},
            {name: "Свердловский РПМ", value: 1},
            {
              name: "Тихорецкий завод им Воровского",
              value: 5
            },
            {name: "Тулажелдормаш", value: 20}
          ],
          totalCount: 15,
          yAxisData: "2022 г."
        },
        {
          charts: [
            {name: "ВНИИЖТ", value: 612},
            {name: "Инжиниринг Сервис-Путьмаш", value: 4},
            {name: "КалугаРПМ", value: 3},
            {name: "Калугапутьмаш", value: 2},
            {name: "Кировский машзавод", value: 3},
            {
              name: "Тихорецкий завод им Воровского",
              value: 7
            },
            {name: "Тулажелдормаш", value: 6}
          ],
          totalCount: 10,
          yAxisData: "2023 г."
        }
      ]
    
    ],
    yAxisData: [
      {key: "2016 г.", val: 93},
      {key: "2017 г.", val: 507},
      {key: "2018 г.", val: 755},
      {key: "2019 г.", val: 900},
      {key: "2020 г.", val: 797},
      {key: "2021 г.", val: 927},
      {key: "2022 г.", val: 818},
      {key: "2023 г.", val: 637}
    ]}
}

const dataMachines = [
  {
    commun: "Не на связи",
    device_id: 1007,
    device_number: "КР180373",
    id_repl: 42,
    imei: 868136035385544,
    machine_class: "ЖДСМ",
    machine_id: 768,
    machine_type: "ПУМА-2012 № 5",
    nomer_zn8: 19527225,
    org_name: "ПЧМ Воронеж",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Воронеж",
    predpr_id: 1136,
    railway_id: 58,
    railway_name: "Ю-Вост",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: 6,
    routes_emergency: 2,
    routes_other: 0,
    routes_repair: 3,
    routes_without_leaving: 5,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ПУМА-2012",
    tip_id: 226,
    type: "ПУМА",
    zav_nomer: "5"
  },
  {
    commun: "Не на связи",
    device_id: 1008,
    device_number: "КР180375",
    id_repl: 42,
    imei: 868136031144697,
    machine_class: "ЖДСМ",
    machine_id: 957,
    machine_type: "РПБ-01 № 105",
    nomer_zn8: 19612563,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "РПБ-01",
    tip_id: 237,
    type: "РПБ",
    zav_nomer: "105"
  },
  {
    commun: "Не на связи",
    device_id: 1009,
    device_number: "КР180374",
    id_repl: 42,
    imei: 868136030926250,
    machine_class: "СМ",
    machine_id: 1150,
    machine_type: "МДС № 005",
    nomer_zn8: 19580059,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: 3,
    routes_emergency: 1,
    routes_other: 3,
    routes_repair: 5,
    routes_without_leaving: 2,
    sel_machine_id: null,
    sel_routes: null,
    tip: "МДС",
    tip_id: 157,
    type: "МДС",
    zav_nomer: "005"
  },
  {
    commun: "Не на связи",
    device_id: 101,
    device_number: "КР170401",
    id_repl: 14,
    imei: 868324028236409,
    machine_class: "МРТ",
    machine_id: 103,
    machine_type: "МПТ-4 № 656",
    nomer_zn8: 18026567,
    org_name: "ПЧР КЛНГ",
    org_type: null,
    org_type_name: "Другие",
    parent_parent_id: 2,
    predpr: "ПЧР КЛНГ",
    predpr_id: 8,
    railway_id: 10,
    railway_name: "Клг",
    rors: "Не РОРС",
    routes: "Есть МЛ, нет связи",
    routes_common: 9,
    routes_emergency: 0,
    routes_other: 0,
    routes_repair: 0,
    routes_without_leaving: 0,
    sel_machine_id: null,
    sel_routes: 103,
    tip: "МПТ-4",
    tip_id: 175,
    type: "МПТ",
    zav_nomer: "656"
  },
  {
    commun: "Не на связи",
    device_id: 1010,
    device_number: "КР180377",
    id_repl: null,
    imei: 868136031147088,
    machine_class: "ЖДСМ",
    machine_id: 851,
    machine_type: "ТЭС-1200 № 001",
    nomer_zn8: 19135011,
    org_name: "ПЧМ Фаянсовая",
    org_type: 1,
    org_type_name: "ЦДРП",
    parent_parent_id: 1,
    predpr: "ПЧМ Фаянсовая",
    predpr_id: 1168,
    railway_id: 17,
    railway_name: "Моск",
    rors: "Нет данных",
    routes: "Нет МЛ, нет связи",
    routes_common: 5,
    routes_emergency: 2,
    routes_other: 3,
    routes_repair: 2,
    routes_without_leaving: 3,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ТЭС-1200",
    tip_id: 315,
    type: "ТЭС",
    zav_nomer: "001"
  },
  {
    commun: "На связи",
    device_id: 1011,
    device_number: "КР180376",
    id_repl: 42,
    imei: 868136031148797,
    machine_class: "СМ",
    machine_id: 1172,
    machine_type: "ТЭС-1000 № 001",
    nomer_zn8: 19737014,
    org_name: "ПЧМ Нижний Новгород",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Нижний Новгород",
    predpr_id: 1156,
    railway_id: 24,
    railway_name: "Горьк",
    rors: "РОРС",
    routes: "Нет МЛ, выходил на связь",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: 1172,
    sel_routes: null,
    tip: "ТЭС-1000",
    tip_id: 314,
    type: "ТЭС",
    zav_nomer: "001"
  },
  {
    commun: "Не на связи",
    device_id: 1012,
    device_number: "КР180379",
    id_repl: 42,
    imei: 868136030925955,
    machine_class: "ЖДСМ",
    machine_id: 1150,
    machine_type: "СПП № 39",
    nomer_zn8: 19582709,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДРП",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: 2,
    routes_emergency: 2,
    routes_other: 3,
    routes_repair: 3,
    routes_without_leaving: 1,
    sel_machine_id: null,
    sel_routes: null,
    tip: "СПП",
    tip_id: 291,
    type: "СПП",
    zav_nomer: "39"
  },
  {
    commun: "Не на связи",
    device_id: 1013,
    device_number: "КР180378",
    id_repl: 42,
    imei: 868136030927076,
    machine_class: "ЖДСМ",
    machine_id: 1144,
    machine_type: "СПП № 38",
    nomer_zn8: 19582691,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДРП",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Есть МЛ, нет связи",
    routes_common: 0,
    routes_emergency: 0,
    routes_other: 0,
    routes_repair: 0,
    routes_without_leaving: 1,
    sel_machine_id: null,
    sel_routes: 1144,
    tip: "СПП",
    tip_id: 291,
    type: "СПП",
    zav_nomer: "38"
  },
  {
    commun: "На связи",
    device_id: 1014,
    device_number: "КР180380",
    id_repl: 42,
    imei: 868136030926763,
    machine_class: "ЖДСМ",
    machine_id: 848,
    machine_type: "ДСП-С № 57",
    nomer_zn8: 19580570,
    org_name: "ПЧМ Новосибирск",
    org_type: 1,
    org_type_name: "ЦДРП",
    parent_parent_id: 1,
    predpr: "ПЧМ Новосибирск",
    predpr_id: 1114,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ДСП-С",
    tip_id: 114,
    type: "ДСП",
    zav_nomer: "57"
  },
  {
    commun: "Не на связи",
    device_id: 1015,
    device_number: "КР180390",
    id_repl: 42,
    imei: 868136030927407,
    machine_class: "ЖДСМ",
    machine_id: 1130,
    machine_type: "СЧ-600 № 03",
    nomer_zn8: 19133032,
    org_name: "ПЧМ Фаянсовая",
    org_type: 1,
    org_type_name: "Другие",
    parent_parent_id: 1,
    predpr: "ПЧМ Фаянсовая",
    predpr_id: 1168,
    railway_id: 17,
    railway_name: "Моск",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "СЧ-600",
    tip_id: 299,
    type: "СЧ",
    zav_nomer: "03"
  },
  {
    commun: "Не на связи",
    device_id: 1016,
    device_number: "КР180389",
    id_repl: 42,
    imei: 868136030927498,
    machine_class: "СМ",
    machine_id: 1169,
    machine_type: "ЩОМ-700 № 003",
    nomer_zn8: 19135433,
    org_name: "ПЧМ Екатеринбург",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Екатеринбург",
    predpr_id: 1154,
    railway_id: 76,
    railway_name: "Сверд",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ЩОМ-700",
    tip_id: 350,
    type: "ЩОМ",
    zav_nomer: "003"
  },
  {
    commun: "На связи",
    device_id: 1017,
    device_number: "КР180387",
    id_repl: 42,
    imei: 868136030926508,
    machine_class: "МРТ",
    machine_id: 1007,
    machine_type: "МПТ-4 № 593",
    nomer_zn8: 18025933,
    org_name: "ПЧМ Новосибирск",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 2,
    predpr: "ПЧМ Новосибирск",
    predpr_id: 1114,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Есть МЛ, выходил на связь",
    routes_common: 10,
    routes_emergency: 0,
    routes_other: 0,
    routes_repair: 1,
    routes_without_leaving: 0,
    sel_machine_id: 1007,
    sel_routes: 1007,
    tip: "МПТ-4",
    tip_id: 175,
    type: "МПТ",
    zav_nomer: "593"
  },
  {
    commun: "Не на связи",
    device_id: 1018,
    device_number: "КР180388",
    id_repl: null,
    imei: 868136030926615,
    machine_class: "МРТ",
    machine_id: 944,
    machine_type: "МПТ-4 № 235",
    nomer_zn8: 18022350,
    org_name: "ПЧМ Омск",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 2,
    predpr: "ПЧМ Омск",
    predpr_id: 1116,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "Нет данных",
    routes: "Есть МЛ, нет связи",
    routes_common: 9,
    routes_emergency: 0,
    routes_other: 1,
    routes_repair: 1,
    routes_without_leaving: 0,
    sel_machine_id: null,
    sel_routes: 944,
    tip: "МПТ-4",
    tip_id: 175,
    type: "МПТ",
    zav_nomer: "235"
  },
  {
    commun: "На связи",
    device_id: 1019,
    device_number: "КР180382",
    id_repl: 42,
    imei: 868136030927605,
    machine_class: "МРТ",
    machine_id: 949,
    machine_type: "МПТ-4 № 1453",
    nomer_zn8: 18034538,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 2,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Есть МЛ, выходил на связь",
    routes_common: 4,
    routes_emergency: 0,
    routes_other: 1,
    routes_repair: 4,
    routes_without_leaving: 0,
    sel_machine_id: 949,
    sel_routes: 949,
    tip: "МПТ-4",
    tip_id: 175,
    type: "МПТ",
    zav_nomer: "1453"
  },
  {
    commun: "Не на связи",
    device_id: 1003,
    device_number: "КР180368",
    id_repl: null,
    imei: 868136031147013,
    machine_class: "ЖДСМ",
    machine_id: 861,
    machine_type: "УТМ-2М № 15",
    nomer_zn8: 19734854,
    org_name: "ПЧМ Фаянсовая",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Фаянсовая",
    predpr_id: 1168,
    railway_id: 17,
    railway_name: "Моск",
    rors: "Нет данных",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "УТМ-2М",
    tip_id: 340,
    type: "УТМ",
    zav_nomer: "15"
  },
  {
    commun: "Не на связи",
    device_id: 1004,
    device_number: "КР180370",
    id_repl: null,
    imei: 868136031149043,
    machine_class: "ЖДСМ",
    machine_id: 1018,
    machine_type: "РПБ-01 № 90",
    nomer_zn8: 19612407,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "Нет данных",
    routes: "Нет МЛ, нет связи",
    routes_common: 4,
    routes_emergency: 7,
    routes_other: 3,
    routes_repair: 4,
    routes_without_leaving: 9,
    sel_machine_id: null,
    sel_routes: null,
    tip: "РПБ-01",
    tip_id: 237,
    type: "РПБ",
    zav_nomer: "90"
  },
  {
    commun: "Не на связи",
    device_id: 1005,
    device_number: "КР180371",
    id_repl: 42,
    imei: 868136031152757,
    machine_class: "ЖДСМ",
    machine_id: 1118,
    machine_type: "УТМ-1 № 27",
    nomer_zn8: 19737329,
    org_name: "ПЧМ Фаянсовая",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Фаянсовая",
    predpr_id: 1168,
    railway_id: 17,
    railway_name: "Моск",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "УТМ-1",
    tip_id: 338,
    type: "УТМ",
    zav_nomer: "27"
  },
  {
    commun: "Не на связи",
    device_id: 1007,
    device_number: "КР180373",
    id_repl: 42,
    imei: 868136035385544,
    machine_class: "ЖДСМ",
    machine_id: 777,
    machine_type: "ПУМА-2012 № 5",
    nomer_zn8: 19527225,
    org_name: "ПЧМ Воронеж",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Воронеж",
    predpr_id: 1136,
    railway_id: 58,
    railway_name: "Ю-Вост",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ПУМА-2012",
    tip_id: 226,
    type: "ПУМА",
    zav_nomer: "5"
  },
  {
    commun: "Не на связи",
    device_id: 1008,
    device_number: "КР180375",
    id_repl: 42,
    imei: 868136031144697,
    machine_class: "ЖДСМ",
    machine_id: 957,
    machine_type: "РПБ-01 № 105",
    nomer_zn8: 19612563,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: 0,
    routes_emergency: 5,
    routes_other: 3,
    routes_repair: 7,
    routes_without_leaving: 8,
    sel_machine_id: null,
    sel_routes: null,
    tip: "РПБ-01",
    tip_id: 237,
    type: "РПБ",
    zav_nomer: "105"
  },
  {
    commun: "Не на связи",
    device_id: 1009,
    device_number: "КР180374",
    id_repl: 42,
    imei: 868136030926250,
    machine_class: "ЖДСМ",
    machine_id: 1146,
    machine_type: "МДС № 005",
    nomer_zn8: 19580059,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "МДС",
    tip_id: 157,
    type: "МДС",
    zav_nomer: "005"
  },
  {
    commun: "Не на связи",
    device_id: 1010,
    device_number: "КР180377",
    id_repl: null,
    imei: 868136031147088,
    machine_class: "ЖДСМ",
    machine_id: 850,
    machine_type: "ТЭС-1200 № 001",
    nomer_zn8: 19135011,
    org_name: "ПЧМ Фаянсовая",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Фаянсовая",
    predpr_id: 1168,
    railway_id: 17,
    railway_name: "Моск",
    rors: "Нет данных",
    routes: "Нет МЛ, нет связи",
    routes_common: 3,
    routes_emergency: 1,
    routes_other: 2,
    routes_repair: 2,
    routes_without_leaving: 3,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ТЭС-1200",
    tip_id: 315,
    type: "ТЭС",
    zav_nomer: "001"
  },
  {
    commun: "Не на связи",
    device_id: 1011,
    device_number: "КР180376",
    id_repl: 42,
    imei: 868136031148797,
    machine_class: "ЖДСМ",
    machine_id: 1172,
    machine_type: "ТЭС-1000 № 001",
    nomer_zn8: 19737014,
    org_name: "ПЧМ Нижний Новгород",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Нижний Новгород",
    predpr_id: 1156,
    railway_id: 24,
    railway_name: "Горьк",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ТЭС-1000",
    tip_id: 314,
    type: "ТЭС",
    zav_nomer: "001"
  },
  {
    commun: "Не на связи",
    device_id: 1012,
    device_number: "КР180379",
    id_repl: 42,
    imei: 868136030925955,
    machine_class: "ЖДСМ",
    machine_id: 1145,
    machine_type: "СПП № 39",
    nomer_zn8: 19582709,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: 5,
    routes_emergency: 1,
    routes_other: 0,
    routes_repair: 0,
    routes_without_leaving: 3,
    sel_machine_id: null,
    sel_routes: null,
    tip: "СПП",
    tip_id: 291,
    type: "СПП",
    zav_nomer: "39"
  },
  {
    commun: "Не на связи",
    device_id: 1013,
    device_number: "КР180378",
    id_repl: 42,
    imei: 868136030927076,
    machine_class: "ЖДСМ",
    machine_id: 1144,
    machine_type: "СПП № 38",
    nomer_zn8: 19582691,
    org_name: "ПЧМ Топки",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Топки",
    predpr_id: 1160,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "СПП",
    tip_id: 291,
    type: "СПП",
    zav_nomer: "38"
  },
  {
    commun: "Не на связи",
    device_id: 1014,
    device_number: "КР180380",
    id_repl: 42,
    imei: 868136030926763,
    machine_class: "ЖДСМ",
    machine_id: 855,
    machine_type: "ДСП-С № 57",
    nomer_zn8: 19580570,
    org_name: "ПЧМ Новосибирск",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Новосибирск",
    predpr_id: 1114,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: 7,
    routes_emergency: 3,
    routes_other: 2,
    routes_repair: 3,
    routes_without_leaving: 5,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ДСП-С",
    tip_id: 114,
    type: "ДСП",
    zav_nomer: "57"
  },
  {
    commun: "Не на связи",
    device_id: 1015,
    device_number: "КР180390",
    id_repl: 42,
    imei: 868136030927407,
    machine_class: "ЖДСМ",
    machine_id: 1130,
    machine_type: "СЧ-600 № 03",
    nomer_zn8: 19133032,
    org_name: "ПЧМ Фаянсовая",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Фаянсовая",
    predpr_id: 1168,
    railway_id: 17,
    railway_name: "Моск",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: 8,
    routes_emergency: 3,
    routes_other: 1,
    routes_repair: 4,
    routes_without_leaving: 3,
    sel_machine_id: null,
    sel_routes: null,
    tip: "СЧ-600",
    tip_id: 299,
    type: "СЧ",
    zav_nomer: "03"
  },
  {
    commun: "Не на связи",
    device_id: 1016,
    device_number: "КР180389",
    id_repl: 42,
    imei: 868136030927498,
    machine_class: "ЖДСМ",
    machine_id: 1169,
    machine_type: "ЩОМ-700 № 003",
    nomer_zn8: 19135433,
    org_name: "ПЧМ Екатеринбург",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 1,
    predpr: "ПЧМ Екатеринбург",
    predpr_id: 1154,
    railway_id: 76,
    railway_name: "Сверд",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "ЩОМ-700",
    tip_id: 350,
    type: "ЩОМ",
    zav_nomer: "003"
  },
  {
    commun: "Не на связи",
    device_id: 1020,
    device_number: "КР180383",
    id_repl: 42,
    imei: 868136030927357,
    machine_class: "МРТ",
    machine_id: 1072,
    machine_type: "МПТ-4 № 766",
    nomer_zn8: 18027664,
    org_name: "ПЧМ Новосибирск",
    org_type: 1,
    org_type_name: "ЦДИМ",
    parent_parent_id: 2,
    predpr: "ПЧМ Новосибирск",
    predpr_id: 1114,
    railway_id: 83,
    railway_name: "З-Сиб",
    rors: "РОРС",
    routes: "Нет МЛ, нет связи",
    routes_common: null,
    routes_emergency: null,
    routes_other: null,
    routes_repair: null,
    routes_without_leaving: null,
    sel_machine_id: null,
    sel_routes: null,
    tip: "МПТ-4",
    tip_id: 175,
    type: "МПТ",
    zav_nomer: "766"
  },

]

const dataMount = [
  {
    client_type: "ЦДИМ",
    device_count: 6,
    mounter_type: "Тулажелдормаш",
    year: "2023 г."
  },
  {
    client_type: "Трансэнерго",
    device_count: 1,
    mounter_type: "ВНИИЖТ",
    year: "2018 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 86,
    mounter_type: "Калугапутьмаш",
    year: "2019 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 593,
    mounter_type: "ВНИИЖТ",
    year: "2020 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 589,
    mounter_type: "ВНИИЖТ",
    year: "2018 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 12,
    mounter_type: "Тулажелдормаш",
    year: "2022 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 8,
    mounter_type: "Тулажелдормаш",
    year: "2022 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 3,
    mounter_type: "Калугапутьмаш",
    year: "2018 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 347,
    mounter_type: "ВНИИЖТ",
    year: "2017 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 8,
    mounter_type: "Тулажелдормаш",
    year: "2017 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 1,
    mounter_type: "КалугаРПМ",
    year: "2021 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 7,
    mounter_type: "КалугаРПМ",
    year: "2018 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 27,
    mounter_type: "Тихорецкий завод им Воровского",
    year: "2019 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 1,
    mounter_type: "Свердловский РПМ",
    year: "2022 г."
  },
  {
    client_type: "Иные",
    device_count: 6,
    mounter_type: "Тихорецкий завод им Воровского",
    year: "2019 г."
  },
  {
    client_type: "Иные",
    device_count: 4,
    mounter_type: "Тихорецкий завод им Воровского",
    year: "2023 г."
  },
  {
    client_type: "Трансэнерго",
    device_count: 16,
    mounter_type: "ВНИИЖТ",
    year: "2016 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 5,
    mounter_type: "Пермский РПМ",
    year: "2021 г."
  },
  {
    client_type: null,
    device_count: 1,
    mounter_type: "Инжиниринг Сервис-Путьмаш",
    year: "2022 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 2,
    mounter_type: "КалугаРПМ",
    year: "2022 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 4,
    mounter_type: "КалугаРПМ",
    year: "2021 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 2,
    mounter_type: "Калугапутьмаш",
    year: "2023 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 80,
    mounter_type: "Калугапутьмаш",
    year: "2021 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 2,
    mounter_type: "КалугаРПМ",
    year: "2023 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 8,
    mounter_type: "Тулажелдормаш",
    year: "2021 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 20,
    mounter_type: "Свердловский РПМ",
    year: "2019 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 4,
    mounter_type: "Тихорецкий завод им Воровского",
    year: "2022 г."
  },
  {
    client_type: "Трансэнерго",
    device_count: 1,
    mounter_type: "ВНИИЖТ",
    year: "2022 г."
  },
  {
    client_type: "Иные",
    device_count: 2,
    mounter_type: "ВНИИЖТ",
    year: "2017 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 1,
    mounter_type: "Калугапутьмаш",
    year: "2016 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 181,
    mounter_type: "ВНИИЖТ",
    year: "2023 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 100,
    mounter_type: "Калугапутьмаш",
    year: "2020 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 76,
    mounter_type: "ВНИИЖТ",
    year: "2016 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 29,
    mounter_type: "Свердловский РПМ",
    year: "2018 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 4,
    mounter_type: "Калугапутьмаш",
    year: "2021 г."
  },
  {
    client_type: null,
    device_count: 1,
    mounter_type: "ВНИИЖТ",
    year: "2020 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 5,
    mounter_type: "Тихорецкий завод им Воровского",
    year: "2021 г."
  },
  {
    client_type: "Иные",
    device_count: 25,
    mounter_type: "Тихорецкий завод им Воровского",
    year: "2020 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 15,
    mounter_type: "Тулажелдормаш",
    year: "2019 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 4,
    mounter_type: "Инжиниринг Сервис-Путьмаш",
    year: "2023 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 2,
    mounter_type: "Калугапутьмаш",
    year: "2019 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 1,
    mounter_type: "ВНИИЖТ",
    year: "2022 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 3,
    mounter_type: "Кировский машзавод",
    year: "2023 г."
  },
  {
    client_type: "ЦДРП",
    device_count: 26,
    mounter_type: "Тулажелдормаш",
    year: "2020 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 3,
    mounter_type: "Тихорецкий завод им Воровского",
    year: "2023 г."
  },
  {
    client_type: "ЦДИМ",
    device_count: 16,
    mounter_type: "КалугаРПМ",
    year: "2019 г."
  },
  
]

const machineInfo = {
  curr_machine_info: [
    {
      bkp_fw_ver_release: "",
      current_machine: "МПТ-4 N593",
      current_machine_id: 1007,
      current_simcard: "79853548731",
      current_simcard_id: 8848,
      // external_available_mb: Decimal.new("0.0"),
      id: 1017,
      imei: 868136030926508,
      last_commun: "24.01.2024 16:54:56",
      last_commun_dt: "~N[2024-01-24 16:54:56.566351]",
      number: "КР180387",
      predpr: "ПЧМ Новосибирск",
      rors: "РОРС",
      sadko_f1_fw_ver_release: "20210709 v2 conf 0 По умолчанию",
      sadko_f4_fw_ver_release: "20230711 v2 conf 1 МПТ/АВФ",
      sadko_f4_parameters: null,
      sadko_sa_fw_ver_release: null,
      simcard_diff: "совпадает",
      sm_din_fw_ver_release: null,
      sm_lcd_fw_ver_release: null,
      sm_sensor_fw_ver_release: null
    }
  ],
  machine_name: "МПТ-4 N593",
  machine_info: [
    {bkp_fw_ver_release: ""},
    {"Текущая симкарта": "79853548731"},
    // {external_available_mb: Decimal.new("0.0")},
    {external_available_mb: "0.0"},
    {"Последняя коммуникация": "24.01.2024 16:54:56"},
    {"Текущее устройство": "КР180387"},
    {"Предприятие приписки": "ПЧМ Новосибирск"},
    {rors: "РОРС"},
    {sadko_f1_fw_ver_release: "20210709 v2 conf 0 По умолчанию"},
    {sadko_f4_fw_ver_release: "20230711 v2 conf 1 МПТ/АВФ"},
    {simcard_diff: "совпадает"}
  ]
}

const reportPacks = [
  {count: 377, pack_number: 1},
  {count: 12, pack_number: 8},
  {count: 69, pack_number: 9},
  {count: 6, pack_number: 40},
  {count: 713, pack_number: 152},
  {count: 148, pack_number: 155}
]

const report = {askr_logs: [
  {
    data_string: "40,2154437181,55068028,82976638,167,95,Quectel,UG95E,UG95ENBR01A14E1G,868136030926508,89701010053723170266,250015372317026,250,01,0",
    device_type: 0,
    dt: "2024-01-25 01:31:59.281965",
    geo: 
    // %Geo.Point{
      {GeoPoint: {
        // coordinates: {82.976638, 55.068028},
        coordinates: [82.976638, 55.068028],
        srid: 4326,
        properties: {}
      }},
    iccid: "89701010053723170266",
    imei: "868136030926508",
    imsi: "250015372317026",
    is_valid: true,
    manufacturer: "Quectel",
    mcc: 250,
    mnc: 1,
    model: "UG95E",
    pack: "40",
    pack_dt: "2024-01-24 22:27:17.181000",
    pack_dt_raw: "2154437181",
    pack_lat: 55.068028,
    pack_lon: 82.976638,
    rcvd_dt: "2024-01-25 01:31:59.281965",
    revision: "UG95ENBR01A14E1G",
    serial_number: "868136030926508",
    speed: 3.09284,
    voltage: 0.9500000000000001
  },
  {
    data_string: "40,2165241114,55067983,82977273,0,2648,Quectel,UG95E,UG95ENBR01A14E1G,868136030926508,89701010053723170266,250015372317026,250,01,0",
    device_type: 0,
    dt: "2024-01-25 04:27:45.935049",
    geo: 
    // %Geo.Point{
      {GeoPoint: {
      // coordinates: {82.977273, 55.067983},
        coordinates: [82.977273, 55.067983],
        srid: 4326,
        properties: {}
      }},
    iccid: "89701010053723170266",
    imei: "868136030926508",
    imsi: "250015372317026",
    is_valid: true,
    manufacturer: "Quectel",
    mcc: 250,
    mnc: 1,
    model: "UG95E",
    pack: "40",
    pack_dt: "2024-01-25 01:27:21.114000",
    pack_dt_raw: "2165241114",
    pack_lat: 55.067983,
    pack_lon: 82.977273,
    rcvd_dt: "2024-01-25 04:27:45.935049",
    revision: "UG95ENBR01A14E1G",
    serial_number: "868136030926508",
    speed: 0.0,
    voltage: 26.48
  },
  {
    data_string: "40,2176041261,55017835,82921710,0,2672,Quectel,UG95E,UG95ENBR01A14E1G,868136030926508,89701010053723170266,250015372317026,250,01,0",
    device_type: 0,
    dt: "2024-01-25 07:27:47.362840",
    geo: 
    // %Geo.Point{
      {GeoPoint: {
      // coordinates: {82.92170999999999, 55.017835},
        coordinates: [82.92170999999999, 55.017835],
        srid: 4326,
        properties: {}
      }},
    iccid: "89701010053723170266",
    imei: "868136030926508",
    imsi: "250015372317026",
    is_valid: true,
    manufacturer: "Quectel",
    mcc: 250,
    mnc: 1,
    model: "UG95E",
    pack: "40",
    pack_dt: "2024-01-25 04:27:21.261000",
    pack_dt_raw: "2176041261",
    pack_lat: 55.017835,
    pack_lon: 82.92170999999999,
    rcvd_dt: "2024-01-25 07:27:47.362840",
    revision: "UG95ENBR01A14E1G",
    serial_number: "868136030926508",
    speed: 0.0,
    voltage: 26.72
  },
  {
    data_string: "40,2186841408,55040201,82891136,0,2686,Quectel,UG95E,UG95ENBR01A14E1G,868136030926508,89701010053723170266,250015372317026,250,01,0",
    device_type: 0,
    dt: "2024-01-25 10:27:31.689519",
    geo: 
    // %Geo.Point{
      {GeoPoint: {
      // coordinates: {82.891136, 55.040200999999996},
        coordinates: [82.891136, 55.040200999999996],
        srid: 4326,
        properties: {}
      }},
    iccid: "89701010053723170266",
    imei: "868136030926508",
    imsi: "250015372317026",
    is_valid: true,
    manufacturer: "Quectel",
    mcc: 250,
    mnc: 1,
    model: "UG95E",
    pack: "40",
    pack_dt: "2024-01-25 07:27:21.408000",
    pack_dt_raw: "2186841408",
    pack_lat: 55.040200999999996,
    pack_lon: 82.891136,
    rcvd_dt: "2024-01-25 10:27:31.689519",
    revision: "UG95ENBR01A14E1G",
    serial_number: "868136030926508",
    speed: 0.0,
    voltage: 26.86
  }
],
pack: {
  columns: [
    {
      dataIndex: "dt",
      field: "dt",
      key: "dt",
      render: "(dt) => parseSepareteDate(dt, '.', 'DateDMYHMS')",
      title: " Время записи",
      width: 156
    },
    {
      dataIndex: "pack_dt",
      defaultSortOrder: "descend",
      field: "pack_dt",
      isCdrp: true,
      key: "pack_dt",
      render: "(pack_dt) => parseSepareteDate(pack_dt, '.', 'DateDMYHMS')",
      sorter: "({pack_dt: a}, {pack_dt: b}) => new Date(a) - new Date(b)",
      title: " Время формирования пакета",
      width: 156
    },
    {
      dataIndex: "lat_lon",
      field: "lat_lon",
      isCdrp: true,
      key: "lat_lon",
      render: "(_, el) => `${el.pack_lat || ''} ${el.pack_lon || ''}`",
      title: " Координаты",
      width: 190
    },
    {
      dataIndex: "speed",
      field: "speed",
      key: "speed",
      title: " Скорость, км/ч",
      width: 150
    },
    {
      dataIndex: "voltage",
      field: "voltage",
      key: "voltage",
      title: " Напряжение питания, В",
      width: 150
    },
    {
      dataIndex: "manufacturer",
      field: "manufacturer",
      key: "manufacturer",
      title: " Производитель",
      width: 150
    },
    {
      dataIndex: "model",
      field: "model",
      key: "model",
      title: " Модель",
      width: 100
    },
    {
      dataIndex: "revision",
      field: "revision",
      key: "revision",
      title: " Ревизия",
      width: 170
    },
    {
      dataIndex: "serial_number",
      field: "serial_number",
      isCdrp: true,
      key: "serial_number",
      title: " Серийный номер",
      width: 150
    },
    {
      dataIndex: "iccid",
      field: "iccid",
      key: "iccid",
      title: " ICCID",
      width: 190
    },
    {
      dataIndex: "imsi",
      field: "imsi",
      key: "imsi",
      title: " IMSI",
      width: 150
    },
    {dataIndex: "mcc", field: "mcc", key: "mcc", title: " MCC", width: 150},
    {
      dataIndex: "type",
      field: "type",
      key: "type",
      title: " Тип",
      width: 150
    }
  ],
  id: 7,
  insertedAt: "2022-01-20 06:35:03",
  isProd: true,
  name: "Телеметрические данные (40)",
  pack: 40,
  packGroupId: 2,
  updatedAt: "2023-05-11 08:53:11"
},
pack_number: 40,
raw: [
  {
    data: "40,2154437181,55068028,82976638,167,95,Quectel,UG95E,UG95ENBR01A14E1G,868136030926508,89701010053723170266,250015372317026,250,01,0",
    dt: "2024-01-25 01:32:00.615781",
    key: "3131353733375103001A002D",
    pack_dt: "2024-01-24 22:27:17.181000",
    rcvd_dt: "2024-01-25 01:31:59.281965"
  },
  {
    data: "40,2165241114,55067983,82977273,0,2648,Quectel,UG95E,UG95ENBR01A14E1G,868136030926508,89701010053723170266,250015372317026,250,01,0",
    dt: "2024-01-25 04:27:47.935417",
    key: "3131353733375103001A002D",
    pack_dt: "2024-01-25 01:27:21.114000",
    rcvd_dt: "2024-01-25 04:27:45.935049"
  },
  {
    data: "40,2176041261,55017835,82921710,0,2672,Quectel,UG95E,UG95ENBR01A14E1G,868136030926508,89701010053723170266,250015372317026,250,01,0",
    dt: "2024-01-25 07:27:48.132408",
    key: "3131353733375103001A002D",
    pack_dt: "2024-01-25 04:27:21.261000",
    rcvd_dt: "2024-01-25 07:27:47.362840"
  },
  {
    data: "40,2186841408,55040201,82891136,0,2686,Quectel,UG95E,UG95ENBR01A14E1G,868136030926508,89701010053723170266,250015372317026,250,01,0",
    dt: "2024-01-25 10:27:32.420642",
    key: "3131353733375103001A002D",
    pack_dt: "2024-01-25 07:27:21.408000",
    rcvd_dt: "2024-01-25 10:27:31.689519"
  }
],
unrecognized: []
}

const packStructure = [
  // LiveMonitor.Packages.Models.PackStruct{
  {
    // __meta__: #Ecto.Schema.Metadata<:loaded, "pack_struct">,
    id: 7,
    description: null,
    is_prod: true,
    machine_types: null,
    name: "Телеметрические данные (40)",
    pack: 40,
    columns: [
      {
        dataIndex: "dt",
        field: "dt",
        key: "dt",
        render: "(dt) => parseSepareteDate(dt, '.', 'DateDMYHMS')",
        title: " Время записи",
        width: 156
      },
      {
        dataIndex: "pack_dt",
        defaultSortOrder: "descend",
        field: "pack_dt",
        isCdrp: true,
        key: "pack_dt",
        render: "(pack_dt) => parseSepareteDate(pack_dt, '.', 'DateDMYHMS')",
        sorter: "({pack_dt: a}, {pack_dt: b}) => new Date(a) - new Date(b)",
        title: " Время формирования пакета",
        width: 156
      },
      {
        dataIndex: "lat_lon",
        field: "lat_lon",
        isCdrp: true,
        key: "lat_lon",
        render: "(_, el) => `${el.pack_lat || ''} ${el.pack_lon || ''}`",
        title: " Координаты",
        width: 190
      },
      {
        dataIndex: "speed",
        field: "speed",
        key: "speed",
        title: " Скорость, км/ч",
        width: 150
      },
      {
        dataIndex: "voltage",
        field: "voltage",
        key: "voltage",
        title: " Напряжение питания, В",
        width: 150
      },
      {
        dataIndex: "manufacturer",
        field: "manufacturer",
        key: "manufacturer",
        title: " Производитель",
        width: 150
      },
      {
        dataIndex: "model",
        field: "model",
        key: "model",
        title: " Модель",
        width: 100
      },
      {
        dataIndex: "revision",
        field: "revision",
        key: "revision",
        title: " Ревизия",
        width: 170
      },
      {
        dataIndex: "serial_number",
        field: "serial_number",
        isCdrp: true,
        key: "serial_number",
        title: " Серийный номер",
        width: 150
      },
      {
        dataIndex: "iccid",
        field: "iccid",
        key: "iccid",
        title: " ICCID",
        width: 190
      },
      {
        dataIndex: "imsi",
        field: "imsi",
        key: "imsi",
        title: " IMSI",
        width: 150
      },
      {dataIndex: "mcc", field: "mcc", key: "mcc", title: " MCC", width: 150},
      {
        dataIndex: "type",
        field: "type",
        key: "type",
        title: " Тип",
        width: 150
      }
    ],
    diag_tables: null,
    diag_exclude_tables: null,
    diag_classifications: null,
    diag_types: null,
    diag_sps: null,
    diag_exclude_classifications: null,
    diag_exclude_types: null,
    diag_exclude_sps: null,
    pack_group_id: 2,
    // pack_group: #Ecto.Association.NotLoaded<association :pack_group is not loaded>,
    inserted_at: "2022-01-20 06:35:03",
    updated_at: "2023-05-11 08:53:11"
  }

]

const multiReport = {
  askr_logs: [
    {
      stime: 12590000,
      eng_run_time: 0,
      d3: 4095,
      rcvd_dt: "2024-01-26 15:59:09.236882",
      cnt2: 0,
      pack: 1,
      gps_datetime: "2024-01-26 12:59:00Z",
      in1: 12.739015384615383,
      d5: 4095,
      // geo: %Geo.Point{
      geo: {
        // coordinates: {82.977153, 55.068238},
        coordinates: [82.977153, 55.068238],
        srid: 4326,
        properties: {}
      },
      is_valid: true,
      in3: 0.026762637362637363,
      numsats: 7,
      d6: 4095,
      data_string: "1,12590000,260124,55068238,82977153,99,23490,20263,150,7,1391,1,0,1428,110,13,3060,3,2,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      gps_lat: 55.068238,
      sdate: 260124,
      dt: "2024-01-26 15:59:09.236882",
      pack_dt: "2024-01-26 12:59:00.000000",
      d4: 4095,
      hdop: 1.5,
      course: 202.63,
      gsm_level: 13.0,
      speed: 1.8334800000000002,
      gps_lon: 82.977153,
      in2: 0.9812967032967033,
      d2: 4095,
      cnt5: 0,
      ign_state: 1,
      temperature_cels: 32.85000000000002,
      gsm_datetime: "2024-01-26 09:59:00Z",
      hdop_raw: 1.5,
      cnt1: 0,
      d1: 4095,
      cnt3: 0,
      gps_alt: 234.9,
      temperature: 306.0,
      imei: "868136030926508",
      in4: 0.01784175824175824,
      cnt4: 0,
      bat_level: 12.408942857142856,
      cnt6: 0
    },
    {
      stime: 13044300,
      eng_run_time: 0,
      d3: 4095,
      rcvd_dt: "2024-01-26 16:05:12.462617",
      cnt2: 0,
      pack: 1,
      gps_datetime: "2024-01-26 13:04:43Z",
      in1: 12.756857142857143,
      d5: 4095,
      // geo: %Geo.Point{
      geo: {
        // coordinates: {82.97638599999999, 55.067744999999995},
        coordinates: [82.97638599999999, 55.067744999999995],
        srid: 4326,
        properties: {}
      },
      is_valid: true,
      in3: 0.026762637362637363,
      numsats: 10,
      d6: 4095,
      data_string: "1,13044300,260124,55067745,82976386,0,23490,18889,81,10,1395,1,0,1430,110,13,3060,3,2,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      gps_lat: 55.067744999999995,
      sdate: 260124,
      dt: "2024-01-26 16:05:12.462617",
      pack_dt: "2024-01-26 13:04:43.000000",
      d4: 4095,
      hdop: 0.81,
      course: 188.89000000000001,
      gsm_level: 13.0,
      speed: 0.0,
      gps_lon: 82.97638599999999,
      in2: 0.9812967032967033,
      d2: 4095,
      cnt5: 0,
      ign_state: 1,
      temperature_cels: 32.85000000000002,
      gsm_datetime: "2024-01-26 10:04:43Z",
      hdop_raw: 0.81,
      cnt1: 0,
      d1: 4095,
      cnt3: 0,
      gps_alt: 234.9,
      temperature: 306.0,
      imei: "868136030926508",
      in4: 0.01784175824175824,
      cnt4: 0,
      bat_level: 12.444626373626374,
      cnt6: 0
    },
    {
      stime: 13224100,
      eng_run_time: 0,
      d3: 4095,
      rcvd_dt: "2024-01-26 16:23:14.140165",
      cnt2: 0,
      pack: 1,
      gps_datetime: "2024-01-26 13:22:41Z",
      in1: 12.79254065934066,
      d5: 4095,
      // geo: %Geo.Point{
      geo: {
        // coordinates: {82.97649299999999, 55.068493},
        coordinates: [82.97649299999999, 55.068493],
        srid: 4326,
        properties: {}
      },
      is_valid: true,
      in3: 0.026762637362637363,
      numsats: 7,
      d6: 4095,
      data_string: "1,13224100,260124,55068493,82976493,128,23520,21627,131,7,1400,1,0,1434,110,13,3060,3,2,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      gps_lat: 55.068493,
      sdate: 260124,
      dt: "2024-01-26 16:23:14.140165",
      pack_dt: "2024-01-26 13:22:41.000000",
      d4: 4095,
      hdop: 1.31,
      course: 216.27,
      gsm_level: 13.0,
      speed: 2.3705600000000002,
      gps_lon: 82.97649299999999,
      in2: 0.9812967032967033,
      d2: 4095,
      cnt5: 0,
      ign_state: 1,
      temperature_cels: 32.85000000000002,
      gsm_datetime: "2024-01-26 10:22:41Z",
      hdop_raw: 1.31,
      cnt1: 0,
      d1: 4095,
      cnt3: 0,
      gps_alt: 235.20000000000002,
      temperature: 306.0,
      imei: "868136030926508",
      in4: 0.01784175824175824,
      cnt4: 0,
      bat_level: 12.489230769230769,
      cnt6: 0
    },
    {
      stime: 13403900,
      eng_run_time: 0,
      d3: 4095,
      rcvd_dt: "2024-01-26 16:43:10.279629",
      cnt2: 0,
      pack: 1,
      gps_datetime: "2024-01-26 13:40:39Z",
      in1: 12.774698901098901,
      d5: 4095,
      // geo: %Geo.Point{
      geo: {
        // coordinates: {82.97604799999999, 55.067906},
        coordinates: [82.97604799999999, 55.067906],
        srid: 4326,
        properties: {}
      },
      is_valid: true,
      in3: 0.026762637362637363,
      numsats: 6,
      d6: 4095,
      data_string: "1,13403900,260124,55067906,82976048,91,23520,29129,114,6,1399,1,0,1432,110,13,3060,3,2,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      gps_lat: 55.067906,
      sdate: 260124,
      dt: "2024-01-26 16:43:10.279629",
      pack_dt: "2024-01-26 13:40:39.000000",
      d4: 4095,
      hdop: 1.1400000000000001,
      course: 291.29,
      gsm_level: 13.0,
      speed: 1.6853200000000002,
      gps_lon: 82.97604799999999,
      in2: 0.9812967032967033,
      d2: 4095,
      cnt5: 0,
      ign_state: 1,
      temperature_cels: 32.85000000000002,
      gsm_datetime: "2024-01-26 10:40:39Z",
      hdop_raw: 1.1400000000000001,
      cnt1: 0,
      d1: 4095,
      cnt3: 0,
      gps_alt: 235.20000000000002,
      temperature: 306.0,
      imei: "868136030926508",
      in4: 0.01784175824175824,
      cnt4: 0,
      bat_level: 12.48030989010989,
      cnt6: 0
    },
    {
      stime: 13462800,
      eng_run_time: 0,
      d3: 4095,
      rcvd_dt: "2024-01-26 16:48:10.737814",
      cnt2: 0,
      pack: 1,
      gps_datetime: "2024-01-26 13:46:28Z",
      in1: 12.774698901098901,
      d5: 4095,
      // geo: %Geo.Point{
      geo: {
        // coordinates: {82.97620599999999, 55.067817999999995},
        coordinates: [82.97620599999999, 55.067817999999995],
        srid: 4326,
        properties: {}
      },
      is_valid: true,
      in3: 0.026762637362637363,
      numsats: 6,
      d6: 4095,
      data_string: "1,13462800,260124,55067818,82976206,0,23440,25186,157,6,1398,1,0,1432,110,13,3060,3,1,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      gps_lat: 55.067817999999995,
      sdate: 260124,
      dt: "2024-01-26 16:48:10.737814",
      pack_dt: "2024-01-26 13:46:28.000000",
      d4: 4095,
      hdop: 1.57,
      course: 251.86,
      gsm_level: 13.0,
      speed: 0.0,
      gps_lon: 82.97620599999999,
      in2: 0.9812967032967033,
      d2: 4095,
      cnt5: 0,
      ign_state: 1,
      temperature_cels: 32.85000000000002,
      gsm_datetime: "2024-01-26 10:46:28Z",
      hdop_raw: 1.57,
      cnt1: 0,
      d1: 4095,
      cnt3: 0,
      gps_alt: 234.4,
      temperature: 306.0,
      imei: "868136030926508",
      in4: 0.00892087912087912,
      cnt4: 0,
      bat_level: 12.47138901098901,
      cnt6: 0
    }
  ],
  pack: {
    columns: [
      {
        dataIndex: "gps_datetime",
        diagBreake: "30",
        diagSite: true,
        dtField: true,
        field: "gps_datetime",
        key: "gps_datetime",
        render: "(gps_datetime) =>  parseSepareteDate((new Date(gps_datetime)).getTime(), '.', 'DateDataBase')",
        title: " Дата и время",
        titleDiagSite: "Дата и время",
        width: 170
      },
      {
        dataIndex: "in2",
        diagSite: true,
        diagSiteChecked: true,
        field: "in2",
        key: "in2",
        render: "(in2) => typeof in2 === 'number' ? (in2).toFixed(1) : null",
        title: " Напряжение бортовой сети, В",
        titleDiagSite: "Напряжение бортовой сети, В",
        width: 130
      },
      {
        dataIndex: "in1",
        diagSite: true,
        field: "in1",
        key: "in1",
        render: "(in1) => typeof in1 === 'number' ? (in1).toFixed(1) : null",
        title: " Напряжение на встроенном АКБ, В",
        titleDiagSite: "Напряжение на встроенном АКБ, В",
        width: 150
      },
      {
        dataIndex: "bat_level",
        diagSite: true,
        field: "bat_level",
        key: "bat_level",
        render: "(bat_level) => typeof bat_level === 'number' ? (bat_level).toFixed(1) : null",
        title: " Напряжение устройства внутреннее, В",
        titleDiagSite: "Напряжение внутреннее, В",
        width: 120
      },
      {
        dataIndex: "speed",
        diagSite: true,
        diagSiteChecked: true,
        field: "speed",
        key: "speed",
        title: " Скорость, км/ч",
        titleDiagSite: "Скорость, км/ч",
        width: 100
      },
      {
        dataIndex: "lat_lon",
        field: "coordinates",
        key: "coordinates",
        render: "(_, el) => `${el?.geo?.coordinates[1].toFixed(5)} ${el?.geo?.coordinates[0].toFixed(5)}`",
        title: " Широта и долгота",
        titleDiagSite: "Широта и долгота",
        width: 180
      },
      {
        dataIndex: "hdop",
        diagSite: true,
        field: "hdop",
        key: "hdop",
        title: " Точность определения координат (HDOP)",
        titleDiagSite: "Точность определения координат (HDOP)",
        width: 120
      },
      {
        dataIndex: "numsats",
        diagSite: true,
        field: "numsats",
        key: "numsats",
        title: " Количество видимых спутников",
        titleDiagSite: "Количество видимых спутников",
        width: 120
      },
      {
        dataIndex: "gsm_level",
        diagSite: true,
        field: "gsm_level",
        key: "gsm_level",
        title: " Уровень сигнала GSM",
        titleDiagSite: "Уровень сигнала GSM",
        width: 120
      }
    ],
    diagExcludeSps: [993, 1062, 3078, 1136, 1109, 1618, 1085, 2936, 1669, 1045,
      1739, 1525, 1869, 1461, 1843, 928, 1940, 1907, 1482, 1870, 1813, 1131,
      1133, 1515, 1800, 2151, 1833, 1068, 1110, 1000, 2904, 926, 2964, 917, 2903,
      1743, 1738, 1469, 2902, 1478, 999, 1801, 1742, 1139, 1141, 1842, ],
    diagTables: ["as", "dsp", "dyn", "mpt", "pmg", "rpb", "rs", "schom", "sm",
      "uk", "uni", "utm", "vpo", ""],
    id: 197,
    insertedAt: "2023-03-15 06:27:41",
    isProd: true,
    name: "Местоположение(1)",
    pack: 1,
    packGroupId: 28,
    updatedAt: "2023-07-20 11:02:55"
  },
  pack_number: 1,
  raw: [
    {
      data: "1,12590000,260124,55068238,82977153,99,23490,20263,150,7,1391,1,0,1428,110,13,3060,3,2,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      dt: "2024-01-26 15:59:10.587887",
      key: "3131353733375103001A002D",
      pack_dt: "2024-01-26 12:59:00.000000",
      rcvd_dt: "2024-01-26 15:59:09.236882"
    },
    {
      data: "1,13044300,260124,55067745,82976386,0,23490,18889,81,10,1395,1,0,1430,110,13,3060,3,2,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      dt: "2024-01-26 16:05:13.788257",
      key: "3131353733375103001A002D",
      pack_dt: "2024-01-26 13:04:43.000000",
      rcvd_dt: "2024-01-26 16:05:12.462617"
    },
    {
      data: "1,13224100,260124,55068493,82976493,128,23520,21627,131,7,1400,1,0,1434,110,13,3060,3,2,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      dt: "2024-01-26 16:23:15.482634",
      key: "3131353733375103001A002D",
      pack_dt: "2024-01-26 13:22:41.000000",
      rcvd_dt: "2024-01-26 16:23:14.140165"
    },
    {
      data: "1,13403900,260124,55067906,82976048,91,23520,29129,114,6,1399,1,0,1432,110,13,3060,3,2,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      dt: "2024-01-26 16:43:11.617278",
      key: "3131353733375103001A002D",
      pack_dt: "2024-01-26 13:40:39.000000",
      rcvd_dt: "2024-01-26 16:43:10.279629"
    },
    {
      data: "1,13462800,260124,55067818,82976206,0,23440,25186,157,6,1398,1,0,1432,110,13,3060,3,1,4095,4095,4095,4095,4095,4095,0,0,0,0,0,0",
      dt: "2024-01-26 16:48:12.063431",
      key: "3131353733375103001A002D",
      pack_dt: "2024-01-26 13:46:28.000000",
      rcvd_dt: "2024-01-26 16:48:10.737814"
    }
  ],
  unrecognized: []
}


const multiPackStructure = [
  // %LiveMonitor.Packages.Models.PackStruct{
  // __meta__: #Ecto.Schema.Metadata<:loaded, "pack_struct">,
  {
    id: 197,
    description: null,
    is_prod: true,
    machine_types: null,
    name: "Местоположение(1)",
    pack: 1,
    columns: [
      {
        dataIndex: "gps_datetime",
        diagBreake: "30",
        diagSite: true,
        dtField: true,
        field: "gps_datetime",
        key: "gps_datetime",
        render: "(gps_datetime) =>  parseSepareteDate((new Date(gps_datetime)).getTime(), '.', 'DateDataBase')",
        title: " Дата и время",
        titleDiagSite: "Дата и время",
        width: 170
      },
      {
        dataIndex: "in2",
        diagSite: true,
        diagSiteChecked: true,
        field: "in2",
        key: "in2",
        render: "(in2) => typeof in2 === 'number' ? (in2).toFixed(1) : null",
        title: " Напряжение бортовой сети, В",
        titleDiagSite: "Напряжение бортовой сети, В",
        width: 130
      },
      {
        dataIndex: "in1",
        diagSite: true,
        field: "in1",
        key: "in1",
        render: "(in1) => typeof in1 === 'number' ? (in1).toFixed(1) : null",
        title: " Напряжение на встроенном АКБ, В",
        titleDiagSite: "Напряжение на встроенном АКБ, В",
        width: 150
      },
      {
        dataIndex: "bat_level",
        diagSite: true,
        field: "bat_level",
        key: "bat_level",
        render: "(bat_level) => typeof bat_level === 'number' ? (bat_level).toFixed(1) : null",
        title: " Напряжение устройства внутреннее, В",
        titleDiagSite: "Напряжение внутреннее, В",
        width: 120
      },
      {
        dataIndex: "speed",
        diagSite: true,
        diagSiteChecked: true,
        field: "speed",
        key: "speed",
        title: " Скорость, км/ч",
        titleDiagSite: "Скорость, км/ч",
        width: 100
      },
      {
        dataIndex: "lat_lon",
        field: "coordinates",
        key: "coordinates",
        render: "(_, el) => `${el?.geo?.coordinates[1].toFixed(5)} ${el?.geo?.coordinates[0].toFixed(5)}`",
        title: " Широта и долгота",
        titleDiagSite: "Широта и долгота",
        width: 180
      },
      {
        dataIndex: "hdop",
        diagSite: true,
        field: "hdop",
        key: "hdop",
        title: " Точность определения координат (HDOP)",
        titleDiagSite: "Точность определения координат (HDOP)",
        width: 120
      },
      {
        dataIndex: "numsats",
        diagSite: true,
        field: "numsats",
        key: "numsats",
        title: " Количество видимых спутников",
        titleDiagSite: "Количество видимых спутников",
        width: 120
      },
      {
        dataIndex: "gsm_level",
        diagSite: true,
        field: "gsm_level",
        key: "gsm_level",
        title: " Уровень сигнала GSM",
        titleDiagSite: "Уровень сигнала GSM",
        width: 120
      }
    ],
    diag_tables: ["as", "dsp", "dyn", "mpt", "pmg", "rpb", "rs", "schom", "sm",
      "uk", "uni", "utm", "vpo", ""],
    diag_exclude_tables: null,
    diag_classifications: null,
    diag_types: null,
    diag_sps: null,
    diag_exclude_classifications: null,
    diag_exclude_types: null,
    diag_exclude_sps: [993, 1062, 3078, 1136, 1109, 1618, 1085, 2936, 1669,
      1045, 1739, 1525, 1869, 1461, 1843, 928, 1940, 1907, 1482, 1870, 1813,
      1131, 1133, 1515, 1800, 2151, 1833, 1068, 1110, 1000, 2904, 926, 2964,
    ],
    pack_group_id: 28,
    // pack_group: #Ecto.Association.NotLoaded<association :pack_group is not loaded>,
    inserted_at: "2023-03-15 06:27:41",
    updated_at: "2023-07-20 11:02:55"
  },
  // %LiveMonitor.Packages.Models.PackStruct{
  //   __meta__: #Ecto.Schema.Metadata<:loaded, "pack_struct">,
  {
    id: 72,
    description: null,
    is_prod: true,
    machine_types: null,
    name: "Общий(1)",
    pack: 1,
    columns: [
      {
        dataIndex: "dt",
        field: "dt",
        key: "dt",
        render: "(dt) => parseSepareteDate(dt, '.', 'DateDMYHMS')",
        title: " Время записи",
        width: 170
      },
      {
        dataIndex: "gps_datetime",
        field: "gps_datetime",
        isCdrp: true,
        key: "gps_datetime",
        render: "(dt) => parseSepareteDate(dt, '.', 'DateDMYHMS')",
        title: " Дата и время",
        width: 170
      },
      {
        dataIndex: "lat_lon",
        field: "lat_lon",
        isCdrp: true,
        key: "lat_lon",
        render: "(_, el) => `${el.gps_lat || ''} ${el.gps_lon || ''}`",
        title: " Широта/Долгота (по gps)",
        width: 180
      },
      {
        dataIndex: "speed",
        field: "speed",
        key: "speed",
        title: " Скорость, км/ч",
        width: 100
      },
      {
        dataIndex: "voltage",
        field: "voltage",
        key: "voltage",
        title: " Напряжение питания, В",
        width: 116
      },
      {
        dataIndex: "port_id",
        field: "port_id",
        key: "port_id",
        title: " Идент. порта",
        width: 80
      },
      {
        dataIndex: "eng_run_time",
        field: "eng_run_time",
        key: "eng_run_time",
        title: " Количество секунд с момента зажигания, с",
        width: 120
      },
      {
        dataIndex: "gps_alt",
        field: "gps_alt",
        key: "gps_alt",
        title: " gps_alt",
        width: 120
      },
      {
        dataIndex: "gsm_datetime",
        field: "gsm_datetime",
        key: "gsm_datetime",
        render: "(pack_dt) => parseSepareteDate(pack_dt, '.', 'DateDMYHMS')",
        title: " gsm_datetime",
        width: 190
      },
      {
        dataIndex: "course",
        field: "course",
        key: "course",
        title: " Азимут движения",
        width: 120
      },
      {
        dataIndex: "gsm_level",
        field: "gsm_level",
        key: "gsm_level",
        title: " Уровень сигнала GSM",
        width: 120
      },
      {
        dataIndex: "hdop",
        field: "hdop",
        key: "hdop",
        title: " Точность определения местоположения",
        width: 120
      },
      {
        dataIndex: "bat_level",
        field: "bat_level",
        key: "bat_level",
        title: " Уровень напряжения питания (AIN_S_INLEVEL)",
        width: 120
      },
      {
        dataIndex: "ign_state",
        field: "ign_state",
        key: "ign_state",
        title: " Статус внешнего питания (зажигания) (VDET)",
        width: 120
      },
      {
        dataIndex: "in1",
        field: "in1",
        key: "in1",
        title: " Напряжение АКБ (IN1), В",
        width: 150
      },
      {
        dataIndex: "in2",
        field: "in2",
        key: "in2",
        title: " Напряжение ВП (IN2), В",
        width: 130
      },
      {
        dataIndex: "in3",
        field: "in3",
        key: "in3",
        title: " Уровень на третьем аналоговом входе (IN3), В",
        width: 120
      },
      {
        dataIndex: "in4",
        field: "in4",
        key: "in4",
        title: " Уровень на четвёртом аналоговом входе (IN4), В",
        width: 120
      },
      {
        dataIndex: "numsats",
        field: "numsats",
        key: "numsats",
        title: " Число спутников в зоне видимости устройства",
        width: 120
      },
      {
        dataIndex: "temperature",
        field: "temperature",
        key: "temperature",
        title: " Температура микроконтроллера",
        width: 120
      },
      {
        dataIndex: "temperature_cels",
        field: "temperature_cels",
        key: "temperature_cels",
        title: " Температура микроконтроллера, С",
        width: 120
      },
      {dataIndex: "d1", field: "d1", key: "d1", title: "(D1)", width: 120},
      {dataIndex: "d2", field: "d2", key: "d2", title: "(D2)", width: 120},
      {dataIndex: "d3", field: "d3", key: "d3", title: " (D3)", width: 120},
      {dataIndex: "d4", field: "d4", key: "d4", title: "(D4)", width: 120},
      {dataIndex: "d5", field: "d5", key: "d5", title: "(D5)", width: 120},
      {dataIndex: "d6", field: "d6", key: "d6", title: "(D6)", width: 120},
      {
        dataIndex: "cnt1",
        field: "cnt1",
        key: "cnt1",
        title: "ЗС 1",
        width: 120
      },
      {
        dataIndex: "cnt2",
        field: "cnt2",
        key: "cnt2",
        title: "ЗС 2",
        width: 120
      },
      {
        dataIndex: "cnt3",
        field: "cnt3",
        key: "cnt3",
        title: "ЗС 3",
        width: 120
      },
      {
        dataIndex: "cnt4",
        field: "cnt4",
        key: "cnt4",
        title: "ЗС 4",
        width: 120
      },
      {
        dataIndex: "cnt5",
        field: "cnt5",
        key: "cnt5",
        title: "ЗС 5",
        width: 120
      },
      {
        dataIndex: "cnt6",
        field: "cnt6",
        key: "cnt6",
        title: "ЗС 6",
        width: 120
      }
    ],
    diag_tables: null,
    diag_exclude_tables: null,
    diag_classifications: null,
    diag_types: null,
    diag_sps: null,
    diag_exclude_classifications: null,
    diag_exclude_types: null,
    diag_exclude_sps: null,
    pack_group_id: 10,
    // pack_group: #Ecto.Association.NotLoaded<association :pack_group is not loaded>,
    inserted_at: "2022-02-21 06:15:00",
    updated_at: "2023-08-18 12:31:01"
  },
  // %LiveMonitor.Packages.Models.PackStruct{
  //   __meta__: #Ecto.Schema.Metadata<:loaded, "pack_struct">,
  {
    id: 225,
    description: null,
    is_prod: true,
    machine_types: null,
    name: "Местоположение без напряжений(1)",
    pack: 1,
    columns: [
      {
        dataIndex: "gps_datetime",
        diagBreake: "30",
        diagSite: true,
        dtField: true,
        field: "gps_datetime",
        key: "gps_datetime",
        render: "(gps_datetime) =>  parseSepareteDate((new Date(gps_datetime)).getTime(), '.', 'DateDataBase')",
        title: " Дата и время",
        titleDiagSite: "Дата и время",
        width: 170
      },
      {
        dataIndex: "speed",
        diagSite: true,
        diagSiteChecked: true,
        field: "speed",
        key: "speed",
        title: " Скорость, км/ч",
        titleDiagSite: "Скорость, км/ч",
        width: 100
      },
      {
        dataIndex: "lat_lon",
        field: "coordinates",
        key: "coordinates",
        render: "(_, el) => `${el?.geo?.coordinates[1].toFixed(5)} ${el?.geo?.coordinates[0].toFixed(5)}`",
        title: " Широта и долгота",
        titleDiagSite: "Широта и долгота",
        width: 180
      },
      {
        dataIndex: "hdop",
        diagSite: true,
        field: "hdop",
        key: "hdop",
        title: " Точность определения координат (HDOP)",
        titleDiagSite: "Точность определения координат (HDOP)",
        width: 120
      },
      {
        dataIndex: "numsats",
        diagSite: true,
        field: "numsats",
        key: "numsats",
        title: " Количество видимых спутников",
        titleDiagSite: "Количество видимых спутников",
        width: 120
      },
      {
        dataIndex: "gsm_level",
        diagSite: true,
        field: "gsm_level",
        key: "gsm_level",
        title: " Уровень сигнала GSM",
        titleDiagSite: "Уровень сигнала GSM",
        width: 120
      }
    ],
    diag_tables: null,
    diag_exclude_tables: null,
    diag_classifications: null,
    diag_types: null,
    diag_sps: [993, 1062, 3078, 1136, 1109, 1618, 1085, 2936, 1669, 1045, 1739,
      1525, 1869, 1461, 1843, 928, 1940, 1907, 1482, 1870, 1813, 1131, 1133,
      1515, 1800, 2151, 1833, 1068, 1110, 1000, 2904, 926, 2964, 917, ],
    diag_exclude_classifications: null,
    diag_exclude_types: null,
    diag_exclude_sps: null,
    pack_group_id: 28,
    // pack_group: #Ecto.Association.NotLoaded<association :pack_group is not loaded>,
    inserted_at: "2023-03-17 06:52:56",
    updated_at: "2023-04-17 11:39:42"
  }
]


export {searchModes, leftTopButtons, rightTopButtons, selects, selectors, machines, charts, dataMachines, chartsFilterParams, chartsFilterKeysMl, chartsGroupByParams, chartsGroupByParams2, chartsMountParams, dataMount, chartsBarTypesParams, chartsBarTypesGroupByParams, chartsBarTypesWithoutLayoutParams, pagination, machineInfo, reportPacks, report, packStructure, multiReport, multiPackStructure }