import { isObject as a } from "lodash";
import { SHJDatasourceV2 as l } from "../../datasource/index.mjs";
import { EventUtils as s } from "../utils/utils.mjs";
const p = (r, i) => {
  try {
    if (r.dataType === "params") {
      let e = i || null;
      a(e) && r.escape && (e = s.toStringify(e)), window.SHJSceneUEIframeWebscoket.send(e);
      return;
    }
    if (!r.useDataSource)
      return;
    l.parse({
      sources: [r.useDataSource],
      noUseMapping: !0,
      isInterval: !1,
      callback: (e) => {
        let t = e || null;
        a(t) && r.escape && (t = s.toStringify(t)), window.SHJSceneUEIframeWebscoket.send(t);
      }
    });
  } catch {
  }
};
export {
  p as executeUeCommonsWebscoketAction
};
