import { r as reactExports, a6 as GridLoader, j as jsxRuntimeExports, ah as AxiosRequest, b3 as getDateOfInt, ap as smetaModals, x as Grid2, B as Button, b2 as defaultFieldInfo, aN as ObjType, ae as getRightsData, cN as getDateRusFormatWithId, ax as SplitterLocal, aU as ContextMenu, bw as PostAddIcon, bx as DeleteIcon, b9 as SectionDocuments, cO as ContentCopyIcon, cP as ContentCutIcon, cQ as ContentPasteIcon, bv as EditStyle, aM as checkCurrentUserRights, ac as tokenProcessingTest, a$ as getObjText, cR as ObjNameFlag, cS as GetDocDialogParams, aS as Button$1, ar as getStyleWindow, aE as ViewClass, cv as PayTypeOption, cT as getDateForDateObj, bj as getIntOfStrDate, as as dayjs } from "./index-D15x63tD.js";
import DialogDoc from "./DialogDoc-BCKCegu0.js";
import DialogDocTabs from "./DialogDocTabs-ExyRNCmU.js";
import { L as LocalParams } from "./LocalParams-Dz-ktk1o.js";
function ListItems(props) {
  const mainGridRef = reactExports.useRef(null);
  const [mainGrid, setMainGrid] = reactExports.useState(void 0);
  const records = reactExports.useRef([]);
  reactExports.useEffect(() => {
    records.current = props.records;
    if (mainGrid === void 0) {
      mainGridLoader();
    } else {
      mainGrid.grid.refreshSource().then(() => {
        var _a;
        (_a = props.onRecordIndexChanged) == null ? void 0 : _a.call(props, mainGrid.grid.source);
      });
    }
  }, [props.records]);
  async function mainGridLoader() {
    var _a;
    const res = await GridLoader(
      mainGridRef.current,
      {},
      {
        localGrid: true,
        refresh: false,
        Columns: props.сolumns,
        defaultFields: props.defaultFields,
        keyField: props.keyField,
        recordKeys: props.recordKeys,
        indicator: false,
        getRecords: () => records.current
      }
    );
    if (props.onRecordIndexChanged && res) {
      res.source.onRecordIndexChanged = props.onRecordIndexChanged;
      (_a = props.onRecordIndexChanged) == null ? void 0 : _a.call(props, res.source);
    }
    setMainGrid(res);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      onDoubleClick: props.onDoubleClick,
      style: { height: "100%", width: "100%", position: "relative" },
      ref: mainGridRef
    }
  );
}
function JobHistoryList(props) {
  const [records, setRecords] = reactExports.useState([]);
  const [selectedRecordId, setSelectedRecordId] = reactExports.useState("");
  const buttonSelect = reactExports.useRef(null);
  reactExports.useEffect(() => {
    var _a;
    (_a = buttonSelect.current) == null ? void 0 : _a.focus();
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "staff").set("comand", "GetJobHistory").set("PersonID", props.personId);
    AxiosRequest(true, params).then((json) => {
      const jsonRecords = json.Items.items;
      for (let index = 0; index < jsonRecords.length; index++) {
        const record = jsonRecords[index];
        record.StartDate = getDateOfInt(record.StartDate);
        record.EndDate = record.EndDate === "0" ? "" : getDateOfInt(record.EndDate);
      }
      setRecords(jsonRecords);
    });
  }, []);
  function getColumns() {
    return {
      title: [
        {
          fieldName: "Title",
          width: 250,
          title: "Должность",
          fieldInfo: { ...defaultFieldInfo, titleAjust: "0", textAjust: "0" }
        },
        {
          fieldName: "$value",
          width: 60,
          title: "Ставка",
          fieldInfo: { ...defaultFieldInfo, titleAjust: "1", textAjust: "1" }
        },
        {
          fieldName: "StartDate",
          width: 100,
          title: "Начало",
          fieldInfo: { ...defaultFieldInfo, titleAjust: "1", textAjust: "1" }
        },
        {
          fieldName: "EndDate",
          width: 100,
          title: "Конец",
          fieldInfo: { ...defaultFieldInfo, titleAjust: "1", textAjust: "1" }
        },
        {
          fieldName: "Mode",
          width: 180,
          title: "Форма",
          fieldInfo: { ...defaultFieldInfo, titleAjust: "0", textAjust: "0" }
        }
      ]
    };
  }
  function getDefaultFields() {
    return [
      { Name: "ID" },
      { Name: "Title" },
      { Name: "$value" },
      { Name: "StartDate" },
      { Name: "EndDate" },
      { Name: "Mode" }
    ];
  }
  function onRecordIndexChanged(source) {
    setSelectedRecordId(source.getFieldTextSync("ID"));
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { height: "100%", width: "100%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: props.title }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "calc(100% - 57px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      ListItems,
      {
        defaultFields: getDefaultFields(),
        сolumns: getColumns(),
        recordKeys: ["ID", "Title", "$value", "StartDate", "EndDate", "Mode"],
        records,
        keyField: "ID",
        onRecordIndexChanged,
        onDoubleClick: () => {
          var _a;
          smetaModals.close(props.smetaModalId);
          (_a = props.onSelect) == null ? void 0 : _a.call(props, selectedRecordId);
        }
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid2, { container: true, style: { justifyContent: "flex-end", alignItems: "center", marginTop: "5px" }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button,
        {
          ref: buttonSelect,
          size: "small",
          variant: "outlined",
          style: { textTransform: "none", marginRight: "10px" },
          onClick: () => {
            var _a;
            smetaModals.close(props.smetaModalId);
            (_a = props.onSelect) == null ? void 0 : _a.call(props, selectedRecordId);
          },
          children: "Выбрать"
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none" },
          onClick: () => smetaModals.close(props.smetaModalId),
          children: "Закрыть"
        }
      )
    ] })
  ] });
}
const getShortName = (fullName) => {
  var _a;
  return ((_a = fullName.match(/\((.*?)\)/)) == null ? void 0 : _a[1]) ?? "";
};
const getAmountStr = (value) => {
  var _a;
  return ((_a = value.match(/.*[0-9,]+/)) == null ? void 0 : _a[0]) ?? "";
};
const listType = [
  { label: "Дни", id: "0" },
  { label: "Часы", id: "1" }
];
const listMonth = [
  { label: "Предыдущий", id: "-1" },
  { label: "Текущий", id: "0" },
  { label: "Следущий", id: "1" }
];
const listSource = [
  { label: "По текущим", id: "0" },
  { label: "По сотруднику", id: "1" },
  { label: "По должности", id: "2" },
  { label: "Фиксированная", id: "3" }
];
const defaultFieldsBaseSum = [
  { Name: "ID", Title: "ID" },
  { Name: "PayType", Title: "PayType" },
  { Name: "Name", Title: "Name" },
  { Name: "FirstDate", Title: "FirstDate" },
  { Name: "AmountText", Title: "AmountText" },
  { Name: "LastDate", Title: "LastDate" },
  { Name: "DocIDName", Title: "DocIDName" }
];
const recordKeysBaseSum = ["ID", "PayType", "Name", "FirstDate", "AmountText", "LastDate", "DocIDName"];
function localCanModify(flag, grid) {
  const mfInsert = 0, mfEdit = 1, mfDelete = 2;
  if (grid.OnlyViewMode) return false;
  switch (flag) {
    case mfInsert:
      return grid.getActiveSource().rights.insert;
    case mfEdit:
      return grid.getActiveSource().rights.modify;
    case mfDelete:
      return grid.getActiveSource().rights.delete;
  }
  return false;
}
function getAmount(amount) {
  if (amount) {
    let startPosition = amount.length - 1;
    while (startPosition >= 0 && amount[startPosition] !== " ") {
      startPosition--;
    }
    if (startPosition !== -1) {
      amount = amount.substring(startPosition + 1);
    }
    amount = amount.replace(",", ".");
    const value = parseFloat(amount);
    if (isNaN(value)) return 0;
    return value;
  }
  return 0;
}
function Amounts(props) {
  var _a, _b;
  const [textTitle, setTextTitle] = reactExports.useState("");
  const gridPanelHistory = reactExports.useRef(null);
  const recordsHistory = reactExports.useRef([]);
  const recordsValues = reactExports.useRef([]);
  const [selectedHistoryId, setSelectedHistoryId] = reactExports.useState();
  const [selectedValuesId, setSelectedValuesId] = reactExports.useState();
  const gridPanelValues = reactExports.useRef(null);
  const renderingId = reactExports.useRef("0");
  const [paramsData, setParamsData] = reactExports.useState({ Items: [] });
  const dateNewRecord = reactExports.useRef({ text: "", id: 0 });
  const [scrollToIdValues, setScrollToIdValues] = reactExports.useState();
  const [tarificationParams, setTarificationParams] = reactExports.useState({
    ObjType: "",
    ParentID: ""
  });
  const docTarificationRef = reactExports.useRef(null);
  const amountsSettings = reactExports.useRef({ payTypeSet: props.payTypeSet, propsObjType: props.objType });
  const [elemDocTarificationMounted, setElemDocTarificationMounted] = reactExports.useState(false);
  const [hideElemDocTarification, setHideElemDocTarification] = reactExports.useState(true);
  const [timerUpdateTarification, setTimerUpdateTarification] = reactExports.useState(void 0);
  const links = reactExports.useRef({});
  const codeLinks = reactExports.useRef({});
  let noRefreshValues = 0;
  let deleteHistory = false;
  const selectedRange = reactExports.useRef("");
  reactExports.useEffect(() => {
    historyGridLoader();
    valuesGridLoader();
  }, []);
  reactExports.useEffect(() => {
    amountsSettings.current = { payTypeSet: props.payTypeSet, propsObjType: props.objType };
  }, [props.payTypeSet, props.objType]);
  reactExports.useEffect(() => {
    var _a2;
    if (props.appointmentId || props.renderingId) {
      updateRecordsHistory().then(async () => {
        var _a3, _b2, _c;
        const source = (_a3 = gridPanelHistory.current.grid) == null ? void 0 : _a3.source;
        await ((_b2 = gridPanelHistory.current.grid) == null ? void 0 : _b2.refreshSource());
        source == null ? void 0 : source.first();
        await ((_c = gridPanelHistory.current.grid) == null ? void 0 : _c.setSource(source));
      });
    } else {
      setTextTitle("");
      setSelectedHistoryId(void 0);
      renderingId.current = "0";
      recordsHistory.current = [];
      (_a2 = gridPanelHistory.current.grid) == null ? void 0 : _a2.refreshSource();
    }
  }, [props.appointmentId, props.renderingId]);
  reactExports.useEffect(() => {
    var _a2;
    if (selectedHistoryId) {
      if (props.inputTariffication) {
        getTarificationParams();
      } else {
        selectedRange.current = gridPanelHistory.current.grid.source.getFieldTextSync("Date");
        clearTimeout(timerUpdateTarification);
        setHideElemDocTarification(true);
        updateRecordsValues().then(async () => {
          var _a3, _b2, _c, _d;
          const source = (_a3 = gridPanelValues.current.grid) == null ? void 0 : _a3.source;
          await ((_b2 = gridPanelValues.current.grid) == null ? void 0 : _b2.refreshSource());
          if (scrollToIdValues) {
            const indexToScroll = recordsValues.current.findIndex((record) => record.ID === scrollToIdValues);
            setSelectedValuesId(scrollToIdValues);
            (_c = gridPanelValues.current.grid) == null ? void 0 : _c.scrollTo(indexToScroll);
            setScrollToIdValues(void 0);
          } else source == null ? void 0 : source.first();
          await ((_d = gridPanelValues.current.grid) == null ? void 0 : _d.setSource(source));
        });
      }
    } else {
      selectedRange.current = "";
      clearTimeout(timerUpdateTarification);
      setHideElemDocTarification(true);
      recordsValues.current = [];
      setSelectedValuesId(void 0);
      (_a2 = gridPanelValues.current.grid) == null ? void 0 : _a2.refreshSource();
      setTextTitle("");
    }
  }, [selectedHistoryId, props.inputTariffication]);
  reactExports.useEffect(() => {
    if (!elemDocTarificationMounted && tarificationParams.ObjType && tarificationParams.ParentID) {
      setElemDocTarificationMounted(true);
    }
  }, [tarificationParams]);
  function getTarificationParams() {
    clearTimeout(timerUpdateTarification);
    setTimerUpdateTarification(
      setTimeout(async () => {
        var _a2;
        const params = /* @__PURE__ */ new Map();
        params.set("prefix", "amounts").set("comand", "GetTarificationParams").set("ObjRef", selectedHistoryId || "0");
        const json = await AxiosRequest(true, params);
        const docDiv = (_a2 = docTarificationRef.current) == null ? void 0 : _a2.querySelector(`#Documents${props.sectionId}`);
        if (!json.ObjType && !json.ParentID) {
          setHideElemDocTarification(true);
        } else {
          if (docDiv == null ? void 0 : docDiv.refreshMainGrid) {
            docDiv.refreshMainGrid({
              DocCfgID: json.ObjType,
              ParentID: json.ParentID
            });
          }
          setTarificationParams({ ObjType: json.ObjType, ParentID: json.ParentID });
          setHideElemDocTarification(false);
        }
      }, 400)
    );
  }
  reactExports.useEffect(() => {
    if (selectedValuesId) {
      const params = /* @__PURE__ */ new Map();
      params.set("prefix", "amounts").set("comand", "GetObjectParamList").set("ObjType", props.objType || ObjType.Rendering).set("ID", selectedValuesId);
      AxiosRequest(true, params).then((res) => {
        var _a2, _b2;
        const arrayItems = [];
        const itemsValue = {};
        const calcParams = gridPanelValues.current.grid.source.getFieldTextSync("CalcParams").split(";");
        calcParams.forEach((calcParam) => {
          const [key, value] = calcParam.split(":").map((item) => item.trim());
          if (key) itemsValue[key] = value || "";
        });
        (_b2 = (_a2 = res.Items) == null ? void 0 : _a2.items) == null ? void 0 : _b2.forEach((item) => {
          item.FieldName = item.Name;
          item.Name = item.Title;
          item.Value = itemsValue[item.Title];
          delete item.Title;
          arrayItems.push(item);
        });
        setParamsData({ Items: arrayItems });
      });
    } else setParamsData({ Items: [] });
  }, [selectedValuesId]);
  async function baseDelete(historyId) {
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "amounts").set("comand", "BaseDelete").set("ObjType", ObjType.Rendering).set("ObjRef", historyId);
    await AxiosRequest(true, params);
  }
  async function updateRecordsHistory() {
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "amounts");
    params.set("comand", "GetRendBaseList");
    params.set("Owner", props.objType || ObjType.Rendering);
    if (props.appointmentId) {
      params.set("ObjType", ObjType.Appointment);
      params.set("ObjRef", props.appointmentId);
      params.set("AppointmentID", props.appointmentId);
    } else {
      params.set("ObjType", ObjType.Rendering);
      params.set("ObjRef", props.renderingId || renderingId.current);
      params.set("RenderingID", props.renderingId || renderingId.current);
    }
    params.set("Full", props.full || "0");
    const json = await AxiosRequest(true, params);
    const rights = json.Rights !== void 0 ? json.Rights : "-1";
    gridPanelHistory.current.grid.source.rights = getRightsData(rights);
    gridPanelValues.current.grid.source.rights = getRightsData(rights);
    renderingId.current = json.RenderingID;
    const recordsArray = [];
    Object.values(json).forEach((item) => {
      if (item.ID)
        recordsArray.push({
          ID: item.ID,
          Date: getDateOfInt(getDateRusFormatWithId(item.Date).id)
        });
    });
    recordsArray.sort((a, b) => {
      if (!a.Date && !b.Date) return 0;
      if (!a.Date) return -1;
      if (!b.Date) return 1;
      const dateA = getDateRusFormatWithId(a.Date).id;
      const dateB = getDateRusFormatWithId(b.Date).id;
      return dateB - dateA;
    });
    recordsValues.current = [];
    recordsHistory.current = recordsArray;
    await gridPanelHistory.current.grid.refreshSource();
  }
  async function getRendBaseInfo() {
    function checkAmounts(allValues) {
      function checkAmount(index) {
        var _a2;
        return (Number((_a2 = recordsValues.current[index]) == null ? void 0 : _a2.Options) & 1) == 0;
      }
      let amount = 0;
      if (allValues) {
        recordsValues.current.forEach((record, index) => {
          if (checkAmount(index)) {
            amount += getAmount(record.AmountText);
          }
        });
      } else {
        if (recordsValues.current.length)
          multiSelect.forEach((indexRecord) => {
            if (checkAmount(Number(indexRecord))) {
              const record = recordsValues.current[Number(indexRecord)];
              if (record) amount += getAmount(record.AmountText);
            }
          });
      }
      return amount;
    }
    const multiSelect = gridPanelValues.current.grid.getMultiSelect();
    if (recordsHistory.current.length) {
      if (multiSelect.length) {
        setTextTitle(`Сумма по выделенным записям: ${checkAmounts(false).toFixed(2)}`);
      } else {
        const amount = checkAmounts(true);
        setTextTitle(
          `Постоянные начисления от ${gridPanelHistory.current.grid.source.getFieldTextSync("Date")} (${amount ? amount.toFixed(2) : "отсутствуют"})`
        );
      }
    } else setTextTitle("");
  }
  async function updateRecordsValues() {
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "amounts").set("comand", "GetRendBaseValuesList").set("ObjType", amountsSettings.current.propsObjType || ObjType.Rendering).set("ObjRef", gridPanelHistory.current.grid.source.getFieldTextSync("ID") || "0");
    const res = await AxiosRequest(true, params);
    links.current = res.Links || {};
    const recordsArray = [];
    Object.values(res).forEach((item) => {
      if (item.ID) {
        item.Range = getDateOfInt(getDateRusFormatWithId(item.Range).id);
        if (item.EndDate) item.EndDate = getDateOfInt(getDateRusFormatWithId(item.EndDate).id);
        recordsArray.push(item);
      }
    });
    recordsValues.current = recordsArray;
    await getRendBaseInfo();
    await gridPanelValues.current.grid.refreshSource();
  }
  function updateSizeForGrid() {
    var _a2, _b2;
    (_a2 = gridPanelHistory.current.grid) == null ? void 0 : _a2.updateGridSize();
    (_b2 = gridPanelValues.current.grid) == null ? void 0 : _b2.updateGridSize();
  }
  async function getFieldText(request, data) {
    if (data.source.getState() === 3) {
      if (request.FieldName === "Range") return { Text: dateNewRecord.current.text };
      return { Text: "" };
    }
    const dataRecords = data.getRecords();
    if (dataRecords.length) {
      const val = request.FieldName === "AmountText" ? "Amount" : request.FieldName;
      return { Text: dataRecords[request.RecordIndex][val] };
    }
    return { Text: "" };
  }
  function getColumnsHistory() {
    return {
      title: [
        {
          fieldName: "Date",
          title: "История",
          width: 90,
          fieldInfo: {
            ...defaultFieldInfo,
            EditStyle: EditStyle.Calendar,
            titleAjust: "0"
          }
        }
      ]
    };
  }
  function getDefaultFieldsHistory() {
    return [
      { Name: "ID", Title: "ID", Width: "50" },
      { Name: "Date", Title: "Date", Width: "90" }
    ];
  }
  function canModifyHistory(flag, column, grid) {
    const mfDelete = 2;
    if (renderingId.current === "0") return false;
    if (flag === mfDelete && !grid.getActiveSource().recordCount) return false;
    const canModify = localCanModify(flag, grid);
    if (!checkCurrentUserRights(ObjType.RendBase, flag)) return false;
    return canModify;
  }
  function createRecordHistory() {
    const index = recordsHistory.current.length ? gridPanelHistory.current.grid.source.activeRecord + 1 : 0;
    const newRecords = [...recordsHistory.current];
    const newRecord = {
      ID: "0",
      Date: ""
    };
    newRecords.splice(index, 0, newRecord);
    return {
      index,
      records: newRecords,
      keys: ["ID", "Date"],
      titleKey: ""
    };
  }
  async function deleteRecordHistory(request) {
    var _a2;
    if (gridPanelHistory.current.grid.source.getState() !== 3) {
      await baseDelete(recordsHistory.current[request.RecordIndex].ID);
      await updateRecordsHistory();
    }
    const recordIndex = recordsHistory.current.length === 0 ? 0 : request.RecordIndex - 1;
    setSelectedHistoryId((_a2 = recordsHistory.current[recordIndex]) == null ? void 0 : _a2.ID);
    return {
      Command: "DeleteRecord",
      RecordIndex: recordsHistory.current.length === 0 ? 0 : request.RecordIndex - 1,
      RecordCount: recordsHistory.current.length,
      UpdatesPending: "1",
      RecordKey: {}
    };
  }
  async function onPostRecordHistory(request, requestData) {
    const records = recordsHistory.current;
    if (request.NewRecord === "1") {
      const newRecord = {
        ID: "0",
        Date: ""
      };
      records.splice(request.RecordIndex, 0, newRecord);
    }
    const record = records[request.RecordIndex];
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "amounts").set("comand", "CheckBaseFieldValue").set("ObjType", ObjType.Rendering).set("ObjRef", record.ID).set("RenderingID", renderingId.current);
    if (requestData[requestData.length - 1].id) {
      params.set("Value", getDateForDateObj(getDateOfInt(requestData[requestData.length - 1].id)));
    } else params.set("Value", "null");
    await AxiosRequest(true, params);
    await updateRecordsHistory();
    if (request.NewRecord === "1") {
      await gridPanelHistory.current.grid.source.first();
      await gridPanelHistory.current.grid.setSource(gridPanelHistory.current.grid.source);
    } else setSelectedHistoryId(recordsHistory.current[request.RecordIndex].ID);
  }
  async function historyGridLoader() {
    const res = await GridLoader(
      gridPanelHistory.current,
      {},
      {
        localGrid: true,
        showIndicator: false,
        Columns: getColumnsHistory(),
        defaultFields: getDefaultFieldsHistory(),
        keyField: "ID",
        recordKeys: ["ID", "Date"],
        titleKey: "",
        getFieldText,
        canModify: canModifyHistory,
        onPostRecord: onPostRecordHistory,
        deleteRecord: deleteRecordHistory,
        createRecord: createRecordHistory,
        getRecords: () => recordsHistory.current
      }
    );
    if (res) {
      res.source.onRecordIndexChanged = function(source) {
        setSelectedHistoryId(source.getFieldTextSync("ID"));
      };
    }
  }
  async function togglePayTypeFilter(clearFilter) {
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "paytypes").set("comand", "SetPayTypeFilter");
    if (clearFilter) {
      params.set("Clear", "1");
    } else {
      params.set("ObjType", amountsSettings.current.payTypeSet || ObjType.PayType).set("Include", PayTypeOption.Constant).set("Exclude", PayTypeOption.Unused);
    }
    await AxiosRequest(true, params);
  }
  async function valuesCodeTextDropDownList() {
    togglePayTypeFilter(false);
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "paytypes").set("comand", "GetObjectValues").set("ObjType", amountsSettings.current.payTypeSet || ObjType.PayType);
    const json = await AxiosRequest(true, params);
    togglePayTypeFilter(true);
    return Object.values(json.Items).map((item) => {
      return { label: item.text, id: item.id };
    });
  }
  async function valuesAmountDropDownList() {
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "amounts").set("comand", "GetAmountModesList");
    const json = await AxiosRequest(true, params);
    return Object.values(json).map((item, index) => {
      return { label: item.Text, id: index.toString() };
    });
  }
  async function valuesCodeTextEditButtonClick() {
    togglePayTypeFilter(false);
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "paytypes").set("comand", "GetDialogParams").set("ObjType", amountsSettings.current.payTypeSet || ObjType.PayType).set("ObjRef", gridPanelValues.current.grid.source.getFieldTextSync("Code") || "0");
    const json = await AxiosRequest(true, params);
    json.Break = "";
    json.Token = "HandleTable";
    tokenProcessingTest(json, {
      props: {
        Module: "paytypes",
        SectionID: props.sectionId,
        ObjType: amountsSettings.current.payTypeSet || ObjType.PayType,
        UsedDate: "0",
        Info: "0",
        ObjRef: gridPanelValues.current.grid.source.getFieldTextSync("Code") || "0",
        onEdit: async (editData) => {
          await togglePayTypeFilter(true);
          const codeText = (await getObjText("paytypes", ObjType.PayType, editData.tag, ObjNameFlag.FullName)).Text;
          if (recordsValues.current.length === 0) {
            await gridPanelValues.current.grid.source.appendRecord();
          }
          const request = {
            NewRecord: gridPanelValues.current.grid.source.getState() === 3 ? "1" : void 0,
            RecordIndex: gridPanelValues.current.grid.source.activeRecord,
            RecordSet: {
              Attributes: gridPanelValues.current.grid.source.getState() === 3 ? ["ID", "Code", "CodeText", "CalcParams", "AmountText", "Amount", "Range"] : ["CodeText"]
            }
          };
          const requestData = gridPanelValues.current.grid.source.getState() === 3 ? [
            {
              text: "0"
            },
            {
              text: ""
            },
            {
              text: codeText,
              id: editData.tag
            },
            {
              text: ""
            },
            {
              text: ""
            },
            {
              text: ""
            },
            {
              text: dateNewRecord.current.text,
              id: dateNewRecord.current.id
            }
          ] : [{ text: codeText, id: editData.tag }];
          onPostRecordValues(request, requestData);
        },
        setValue: true,
        setInputValue: true,
        onClose: () => togglePayTypeFilter(true)
      }
    });
  }
  async function valuesDocumentTextEditButtonClick() {
    let json;
    const docId = gridPanelValues.current.grid.source.getFieldTextSync("Document");
    if (docId) {
      json = await GetDocDialogParams(ObjType.Document, docId);
      smetaModals.open(
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          DialogDoc,
          {
            props: {
              ...json,
              NewModalWindow: true,
              Buttons: Button$1.Cancel
            }
          }
        ),
        {
          Title: json.Title,
          hiddenButton: true,
          style: getStyleWindow(json.CLSID),
          setFocus: true
        }
      );
    } else {
      const params = /* @__PURE__ */ new Map();
      params.set("prefix", "amounts").set("comand", "GetAmountDocTypes").set("PayType", gridPanelValues.current.grid.source.getFieldTextSync("Code") || "0").set("RenderingID", renderingId.current);
      json = await AxiosRequest(true, params);
      const selectDocument = [];
      Object.values(json.Types).forEach((item) => {
        selectDocument.push({ DocCfgID: item.id, Name: item.text });
      });
      smetaModals.open(
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          DialogDocTabs,
          {
            props: {
              CLSID: ViewClass.DocSite,
              SelectDocument: selectDocument,
              NewModalWindow: true,
              onEdit: async (values) => {
                if (recordsValues.current.length === 0) {
                  await gridPanelValues.current.grid.source.appendRecord();
                }
                const request = {
                  NewRecord: gridPanelValues.current.grid.source.getState() === 3 ? "1" : void 0,
                  RecordIndex: gridPanelValues.current.grid.source.activeRecord,
                  RecordSet: {
                    Attributes: gridPanelValues.current.grid.source.getState() === 3 ? [
                      "ID",
                      "Code",
                      "CodeText",
                      "CalcParams",
                      "AmountText",
                      "Amount",
                      "Range",
                      "Rates",
                      "Document",
                      "DocumentText"
                    ] : ["DocumentText"]
                  }
                };
                const requestData = gridPanelValues.current.grid.source.getState() === 3 ? [
                  {
                    text: "0"
                  },
                  {
                    text: ""
                  },
                  {
                    text: ""
                  },
                  {
                    text: ""
                  },
                  {
                    text: ""
                  },
                  {
                    text: ""
                  },
                  {
                    text: dateNewRecord.current.text,
                    id: dateNewRecord.current.id
                  },
                  {
                    text: ""
                  },
                  {
                    text: ""
                  },
                  {
                    text: void 0,
                    id: values.tag
                  }
                ] : [{ text: void 0, id: values.tag }];
                onPostRecordValues(request, requestData);
              }
            }
          }
        ),
        {
          hiddenButton: true,
          blockSaveLocation: true,
          style: getStyleWindow(ViewClass.DocSite),
          setFocus: true
        }
      );
    }
  }
  function getColumnsValues() {
    return {
      title: [
        {
          fieldName: "CodeText",
          title: "Наименование н/у",
          width: 140,
          fieldInfo: {
            ...defaultFieldInfo,
            onEditButtonClick: valuesCodeTextEditButtonClick,
            onDropDownList: valuesCodeTextDropDownList,
            EditStyle: EditStyle.PickList + EditStyle.Ellipsis,
            Module: "paytypes",
            DataType: ObjType.PayType,
            titleAjust: "0"
          }
        },
        {
          fieldName: "Range",
          title: "Начало",
          width: 90,
          fieldInfo: {
            ...defaultFieldInfo,
            EditStyle: EditStyle.Calendar,
            titleAjust: "0",
            textAjust: "1"
          }
        },
        {
          fieldName: "AmountText",
          title: "Значение",
          width: 140,
          fieldInfo: {
            ...defaultFieldInfo,
            onDropDownList: valuesAmountDropDownList,
            EditStyle: EditStyle.PickList,
            titleAjust: "0"
          }
        },
        {
          fieldName: "Rates",
          title: "Ставка",
          width: 50,
          fieldInfo: { ...defaultFieldInfo, titleAjust: "0", textAjust: "1" }
        },
        {
          fieldName: "EndDate",
          title: "Конец",
          width: 90,
          fieldInfo: {
            ...defaultFieldInfo,
            EditStyle: EditStyle.Calendar,
            titleAjust: "0",
            textAjust: "1"
          }
        },
        {
          fieldName: "DocumentText",
          title: "Документ",
          width: 150,
          fieldInfo: {
            ...defaultFieldInfo,
            onEditButtonClick: valuesDocumentTextEditButtonClick,
            EditStyle: EditStyle.Ellipsis,
            titleAjust: "0"
          }
        }
      ]
    };
  }
  function getDefaultFieldsValues() {
    return [
      { Name: "ID", Title: "ID", Width: "50" },
      { Name: "Code", Title: "Code", Width: "50" },
      { Name: "CodeText", Title: "CodeText", Width: "50" },
      { Name: "CalcParams", Title: "CalcParams", Width: "50" },
      { Name: "AmountText", Title: "AmountText", Width: "50" },
      { Name: "Amount", Title: "Amount", Width: "50" },
      { Name: "Range", Title: "Range", Width: "50" },
      { Name: "Rates", Title: "Rates", Width: "50" },
      { Name: "Document", Title: "Document", Width: "50" },
      { Name: "DocumentText", Title: "DocumentText", Width: "50" },
      { Name: "EndDate", Title: "EndDate", Width: "50" },
      { Name: "Options", Title: "Options", Width: "50" }
    ];
  }
  function canModifyValues(flag, column, grid) {
    const mfDelete = 2;
    const source = grid.getActiveSource();
    if (renderingId.current === "0") return false;
    if (flag === mfDelete && !source.recordCount) return false;
    const canModify = localCanModify(flag, grid);
    if ((column == null ? void 0 : column.fieldName) === "CodeText" && source.getFieldTextSync("Code") !== "0" && source.getFieldTextSync("Code") !== "" && source.getState() !== 3)
      return false;
    if (!checkCurrentUserRights(ObjType.BaseValue, flag)) return false;
    return canModify;
  }
  async function createRecordValues() {
    const index = recordsValues.current.length ? gridPanelValues.current.grid.source.activeRecord + 1 : 0;
    const datePanelHistory = gridPanelHistory.current.grid.source.getFieldTextSync("Date");
    if (!datePanelHistory) {
      const params = /* @__PURE__ */ new Map();
      params.set("prefix", "amounts").set("comand", "GetNewAmountDate").set("ObjType", ObjType.Rendering).set("ObjRef", renderingId.current);
      const json = await AxiosRequest(true, params);
      dateNewRecord.current = { text: dayjs(json.Value).format("DD.MM.YYYY"), id: getIntOfStrDate(json.Value) };
    } else dateNewRecord.current = { text: datePanelHistory, id: getIntOfStrDate(datePanelHistory) };
    const newRecords = [...recordsValues.current];
    const newRecord = {
      ID: "0",
      Range: dateNewRecord.current
    };
    newRecords.splice(index, 0, newRecord);
    return {
      index,
      records: newRecords,
      keys: ["ID", "Range"],
      titleKey: ""
    };
  }
  function getNextDate() {
    const activeRecord = gridPanelHistory.current.grid.source.activeRecord;
    if (activeRecord > 0) return getIntOfStrDate(recordsHistory.current[activeRecord - 1].Date) - 1;
    return 0;
  }
  async function deleteRecordValues(request) {
    if (gridPanelValues.current.grid.source.getState() !== 3) {
      if (noRefreshValues === 0) {
        noRefreshValues = gridPanelValues.current.grid.getMultiSelect().length || 1;
        if (noRefreshValues === recordsValues.current.length) deleteHistory = true;
      }
      const params = /* @__PURE__ */ new Map();
      params.set("prefix", "amounts").set("comand", "CodeDelete").set("ObjType", ObjType.Rendering).set("ObjRef", recordsValues.current[request.RecordIndex].ID).set("Date", getNextDate());
      noRefreshValues--;
      await AxiosRequest(true, params);
      if (noRefreshValues === 0) {
        if (deleteHistory) {
          baseDelete(gridPanelHistory.current.grid.source.getFieldTextSync("ID"));
          deleteHistory = false;
        }
        await updateRecordsHistory();
        await gridPanelHistory.current.grid.setSource(gridPanelHistory.current.grid.source);
        await updateRecordsValues();
        await gridPanelValues.current.grid.setSource(gridPanelValues.current.grid.source);
        setSelectedValuesId(gridPanelValues.current.grid.source.getFieldTextSync("ID"));
        setSelectedHistoryId(gridPanelHistory.current.grid.source.getFieldTextSync("ID"));
      }
    }
    return {
      Command: "DeleteRecord",
      RecordIndex: recordsValues.current.length === 0 ? 0 : request.RecordIndex - 1,
      RecordCount: recordsValues.current.length,
      UpdatesPending: "1",
      RecordKey: {}
    };
  }
  async function onPostRecordValues(request, requestData) {
    let attributeIndex = 0;
    if (request.NewRecord === "1") {
      const newRecord = {
        ID: "0",
        Range: requestData[6].text
      };
      recordsValues.current.splice(request.RecordIndex, 0, newRecord);
      if (requestData.length > 7) {
        attributeIndex = requestData.length - 1;
      } else if (requestData[2].text) {
        attributeIndex = 2;
      } else if (requestData[4].text) {
        attributeIndex = 4;
      } else attributeIndex = 6;
    }
    const record = recordsValues.current[request.RecordIndex];
    let modifiedFields = request.RecordSet.Attributes[attributeIndex];
    const modifiedData = requestData[attributeIndex];
    let newValue;
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "amounts");
    params.set("comand", "ValuesBeforeOperation");
    params.set("ObjRef", renderingId.current);
    params.set("ID", record.ID);
    params.set("Code", record.Code);
    params.set("CodeText", record.CodeText);
    params.set("CalcParams", record.CalcParams);
    params.set("AmountText", record.AmountText);
    params.set("Amount", record.Amount);
    params.set("Range", getDateForDateObj(record.Range));
    params.set("Rates", record.Rates);
    params.set("Document", record.Document);
    params.set("DocumentText", record.DocumentText);
    params.set("EndDate", record.EndDate ? getDateForDateObj(record.EndDate) : void 0);
    params.set("Options", record.Options || "0");
    switch (modifiedFields) {
      case "CodeText":
        newValue = modifiedData.text;
        const newCode = modifiedData.id;
        modifiedFields = "CodeText,Code";
        params.set("CodeText", newValue);
        params.set("Code", newCode);
        break;
      case "AmountText":
        if (modifiedData == null ? void 0 : modifiedData.id) {
          record.Amount = `${getAmountStr(record.Amount)} ${getShortName(modifiedData.text)}`;
          await gridPanelValues.current.grid.refreshSource();
          await gridPanelValues.current.grid.setSource(gridPanelValues.current.grid.source);
          return;
        }
        modifiedFields = "Amount";
        newValue = modifiedData.text;
        params.set(modifiedFields, newValue);
        break;
      case "Range":
      case "EndDate":
        newValue = modifiedData.id ? getDateOfInt(modifiedData.id) : void 0;
        params.set(modifiedFields, getDateForDateObj(newValue));
        break;
      case "DocumentText":
        if (modifiedData == null ? void 0 : modifiedData.text) return;
        newValue = (modifiedData == null ? void 0 : modifiedData.id) || "0";
        modifiedFields = "Document";
        params.set(modifiedFields, newValue);
        break;
      default:
        newValue = modifiedData.text;
        params.set(modifiedFields, newValue);
        break;
    }
    if (record.ID === "0") {
      params.set("State", "Insert");
      if (!modifiedFields.includes("Range")) modifiedFields += ",Range";
    }
    const currentHistoryId = gridPanelHistory.current.grid.source.getFieldTextSync("ID");
    params.set("ModifiedFields", modifiedFields);
    params.set("Operation", "Post");
    params.set("Pasting", "0");
    params.set("BaseID", currentHistoryId || "0");
    params.set("WSM", "1");
    const json = await AxiosRequest(true, params);
    await updateRecordsHistory();
    if (json.BaseAmountID !== currentHistoryId) {
      const indexToScroll = recordsHistory.current.findIndex((record2) => record2.ID === json.BaseAmountID);
      setSelectedHistoryId(json.BaseAmountID);
      gridPanelHistory.current.grid.scrollTo(indexToScroll);
      setScrollToIdValues(json.ObjRef);
    } else {
      await updateRecordsValues();
      const indexToScroll = recordsValues.current.findIndex((record2) => record2.ID === json.ObjRef);
      setSelectedValuesId(json.ObjRef);
      gridPanelValues.current.grid.scrollTo(indexToScroll);
    }
  }
  async function changeGridStyles(table, grid) {
    if (table.classList[0] === "grid-item" && recordsValues.current.length) {
      const record = recordsValues.current[table.recordIndex] || {};
      const isMultiSelected = table.classList.contains("grid-multi-selection-row");
      if (Number(record.Options) & 1) {
        table.style.fontStyle = "italic";
        table.style.backgroundColor = isMultiSelected ? "" : "#ffffe1";
      }
      table.querySelectorAll(".grid-td").forEach((cell) => {
        var _a2;
        let textColor = "";
        let bgColor = "";
        const fieldName = (_a2 = cell.field) == null ? void 0 : _a2.fieldName;
        if (!isMultiSelected && fieldName !== "CodeText" && record.Range === selectedRange.current)
          textColor = "#1200ff";
        if (!isMultiSelected && fieldName === "CodeText" && Number(record.Options) & 1) bgColor = "white";
        if (!isMultiSelected && fieldName === "AmountText" && !record.Amount) textColor = "gray";
        cell.style.color = textColor;
        cell.style.backgroundColor = bgColor;
      });
    }
  }
  async function getImageIndex(grid) {
    if (grid == null ? void 0 : grid.source) {
      const valuesCode = await grid.source.getFieldText("Code");
      if (Object.keys(codeLinks.current).includes(valuesCode)) return [133];
    }
  }
  async function valuesGridLoader() {
    const res = await GridLoader(
      gridPanelValues.current,
      {},
      {
        localGrid: true,
        refresh: false,
        Columns: getColumnsValues(),
        defaultFields: getDefaultFieldsValues(),
        keyField: "ID",
        recordKeys: [
          "ID",
          "Code",
          "CodeText",
          "CalcParams",
          "AmountText",
          "Amount",
          "Range",
          "Rates",
          "Document",
          "DocumentText",
          "EndDate",
          "Options"
        ],
        titleKey: "",
        getFieldText,
        canModify: canModifyValues,
        onPostRecord: onPostRecordValues,
        deleteRecord: deleteRecordValues,
        createRecord: createRecordValues,
        getRecords: () => recordsValues.current,
        changeGridStyles,
        onGetImageIndex: getImageIndex
      }
    );
    if (res) {
      res.source.onRecordIndexChanged = function(source) {
        setSelectedValuesId(source.getFieldTextSync("ID"));
        codeLinks.current = links.current[source.getFieldTextSync("Code")] || {};
        gridPanelValues.current.grid.updateGridSize();
      };
      res.grid.onMultiSelectChange = function(grid) {
        getRendBaseInfo();
        grid.data.querySelectorAll(".grid-multi-selection-row").forEach((table) => {
          changeGridStyles(table);
        });
      };
    }
  }
  async function getObjectValues(fieldName) {
    const fieldParams = paramsData.Items.find((item) => item.FieldName === fieldName);
    if (fieldParams == null ? void 0 : fieldParams.Module) {
      const params = /* @__PURE__ */ new Map();
      params.set("prefix", fieldParams.Module).set("comand", "GetObjectValues").set("ObjType", fieldParams.ObjType);
      const json = await AxiosRequest(true, params);
      return Object.values(json.Items).map((item) => {
        return { label: item.text, id: item.id };
      });
    }
  }
  async function handleApplyParams(data) {
    const params = /* @__PURE__ */ new Map();
    params.set("prefix", "amounts").set("comand", "SetObjectParamValue").set("Name", data.record.dataset.fieldname).set("ID", selectedValuesId);
    if (data.textchanged === "0") {
      params.set("ObjRef", data.CheckState !== void 0 ? data.CheckState : data.tag);
    } else {
      params.set("ObjRef", data.tag || "0");
      params.set("Text", data.value);
      params.set("TextChanged", "1");
    }
    const json = await AxiosRequest(true, params);
    setParamsData({
      Items: paramsData.Items.map((item) => {
        if (item.FieldName === data.record.dataset.fieldname)
          return {
            ...item,
            EditVal: json.EditVal || "",
            ObjRef: json.ObjRef || "0",
            Text: json.Text || "",
            Value: json.Text || ""
          };
        return item;
      })
    });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      "span",
      {
        style: {
          display: props.personText ? "block" : "none",
          background: "#ebebeb",
          fontSize: "0.9rem"
        },
        children: props.personText
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(
      SplitterLocal,
      {
        hideButtons: true,
        orientation: "vertical",
        primaryIndex: 1,
        sizeSecondary: "92px",
        onResizeEnd: updateSizeForGrid,
        hideSplitterCollapsed: true,
        transitionDuration: 0,
        style: { height: props.personText ? "calc(100% - 17px" : "100%" },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ContextMenu,
            {
              for: "grid",
              Menu: {
                Table: [
                  {
                    Caption: "Новая запись",
                    value: "Insert",
                    Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
                  },
                  {
                    Caption: "Удалить запись",
                    value: "Delete",
                    Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
                  },
                  { Caption: "Divider" },
                  { Caption: "Режим просмотра", value: "OnlyViewMode" },
                  {
                    Caption: "Сохранять отметку",
                    value: "SaveMark",
                    Disabled: true
                  }
                ],
                Header: [{ Caption: "Поиск по столбцу", value: "ColumnFilter" }]
              },
              refs: { current: (_a = gridPanelHistory.current) == null ? void 0 : _a.grid },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  ref: gridPanelHistory,
                  style: { height: "100%", width: "100%", position: "relative" },
                  rcsgrid_panel: ""
                }
              )
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "div",
              {
                ref: docTarificationRef,
                style: {
                  height: "100%",
                  width: "100%",
                  display: hideElemDocTarification ? "none" : ""
                },
                children: elemDocTarificationMounted && /* @__PURE__ */ jsxRuntimeExports.jsx(
                  SectionDocuments,
                  {
                    id: props.sectionId,
                    ParentID: tarificationParams.ParentID,
                    DocCfgID: tarificationParams.ObjType,
                    HideParams: true,
                    SectionToolsJS: false,
                    PlaneView: "0",
                    noAutoFocus: true,
                    HideControlButtons: true
                  }
                )
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsxs(
              SplitterLocal,
              {
                hideButtons: true,
                orientation: "vertical",
                onResizeEnd: updateSizeForGrid,
                style: { display: props.inputTariffication ? "none" : "" },
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "25px",
                          background: "linear-gradient(to top, #cccccc, 30%, #f9f9f9)",
                          border: "1px solid #cccccc"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          "div",
                          {
                            style: {
                              paddingTop: "3px",
                              paddingLeft: "5px",
                              fontSize: "0.9rem"
                            },
                            children: textTitle
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { position: "relative", height: "calc(100% - 25px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      ContextMenu,
                      {
                        for: "grid",
                        Menu: {
                          Table: [
                            {
                              Caption: "Копировать запись",
                              Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentCopyIcon, { fontSize: "small" }),
                              Disabled: true
                            },
                            {
                              Caption: "Вырезать запись",
                              Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentCutIcon, { fontSize: "small" }),
                              Disabled: true
                            },
                            {
                              Caption: "Вставить из буфера",
                              Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentPasteIcon, { fontSize: "small" }),
                              Disabled: true
                            },
                            { Caption: "Divider" },
                            {
                              Caption: "Новая запись",
                              value: "Insert",
                              Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
                            },
                            {
                              Caption: "Удалить запись",
                              value: "Delete",
                              Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
                            },
                            { Caption: "Divider" },
                            { Caption: "Режим просмотра", value: "OnlyViewMode" },
                            { Caption: "Сохранять отметку", Disabled: true }
                          ],
                          Header: [{ Caption: "Поиск по столбцу", value: "ColumnFilter" }]
                        },
                        refs: { current: (_b = gridPanelValues.current) == null ? void 0 : _b.grid },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          "div",
                          {
                            ref: gridPanelValues,
                            style: { height: "100%", width: "100%", position: "relative" },
                            rcsgrid_panel: ""
                          }
                        )
                      }
                    ) })
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    LocalParams,
                    {
                      onlyModified: true,
                      onDropDownList: getObjectValues,
                      onApply: handleApplyParams,
                      Title: "Параметры постоянного начисления",
                      data: paramsData
                    }
                  )
                ]
              }
            )
          ] })
        ]
      }
    )
  ] });
}
export {
  Amounts as A,
  JobHistoryList as J,
  listSource as a,
  listType as b,
  getShortName as c,
  defaultFieldsBaseSum as d,
  getAmountStr as g,
  listMonth as l,
  recordKeysBaseSum as r
};
//# sourceMappingURL=Amounts-D9Fd5gdh.js.map
