import { SHJDatasourceV2 as c } from "../index.mjs";
import { DataSourceUtils as n } from "../utils/utils.mjs";
const m = (a, r, o) => new Promise(function(e, s) {
  const i = n.getVariableData().find((t) => t.id === a.source.variableId || t.name === a.source.variableId);
  if (!i) {
    e(n.noneData(r));
    return;
  }
  c.processData(a.source.filter, i._value, a.source.mapping, r, a.source.dynamicMapping, o, a.source.isUserdata).then((t) => {
    e(t);
  }).catch(() => {
    e(n.noneData(r));
  });
});
export {
  m as parseVariableData
};
