import { M as t, P as e, v as r, c7 as a, a0 as o, g as s } from "./index-f927b013.js";
import "./lodash-b5661970.js";
import { lz as i } from "./ant-design-icons-6bfdc7d5.js";
import "./loglevel-b4003767.js";
import "./axios-04f95181.js";
import "./redux-devtools-8dd21e4f.js";
import "./alasql-f60045ee.js";
import "./antd-2abdded3.js";
import "react";
import "react-dom";
import "./dayjs-2035e031.js";
import "./fontawesome-3904a214.js";
import "./dnd-kit-8227a2db.js";
import "./moment-059406e8.js";
import "./styled-components-7cfa37e6.js";
import "./numbro-47982265.js";
import "./papaparse-07642d76.js";
import "./uuid-bd83cae2.js";
import "./supabase-b2e314d0.js";
import "./fetch-648a91f6.js";
import "./react-draggable-ed505bfc.js";
import "./remark-gfm-18306abe.js";
import "./buffer-d3713d77.js";
import "./rehype-raw-6ebcba88.js";
import "./parse5-f837f753.js";
import "./rehype-sanitize-953d0761.js";
import "./simplebar-react-2133d981.js";
import "./react-best-gradient-color-picker-92c01739.js";
import "./ua-parser-js-c952c07b.js";
import "./clsx-469c2c43.js";
import "./file-saver-55285fc1.js";
import "./codemirror-8412b963.js";
import "./really-relaxed-json-056be70b.js";
import "./immer-c0428a8d.js";
import "./hotkeys-js-699906bc.js";
import "./cnchar-e1339167.js";
import "./react-documents-041601c7.js";
import "./react-sortable-hoc-4fbe0c32.js";
import "./sql-formatter-577b4ab0.js";
import "./rc-trigger-3f038851.js";
import "./react-json-view-5330ce92.js";
import "./qrcode-react-d377d762.js";
const m = (t2) => i("div", {}), p = function() {
  const e2 = { v1: r(0), v2: a, vStr: o };
  return new t(e2, (t2) => ({ v1: t2.v1, v2: t2.v2, v3: t2.v1 + t2.v2, vStr: t2.vStr })).setPropertyViewFn(m).build();
}(), l = { value: { v1: 11, v2: "{{testParam + 10}}" } };
test("without context", () => {
  let t2 = new p(l);
  t2 = e(t2);
  let r2 = t2.getView();
  expect(r2.v1).toEqual(11), expect(r2.v2).toEqual(0), expect(r2.v3).toEqual(11);
}), test("test with context", () => {
  let t2 = new (s(p))(l);
  t2 = e(t2);
  let r2 = t2.getView()({ testParam: 100 });
  expect(r2.v1).toEqual(11), expect(r2.v2).toEqual(110), expect(r2.v3).toEqual(121), r2 = t2.getView()({ testParam: -100 }), expect(r2.v1).toEqual(11), expect(r2.v2).toEqual(-90), expect(r2.v3).toEqual(-79);
}), test("test with multi context", () => {
  let t2 = new (s(p))({ value: { v1: 11, v2: "{{param1+param2*2}}" } });
  t2 = e(t2);
  let r2 = t2.getView()({ param1: 100, param2: 102 });
  expect(r2.v1).toEqual(11), expect(r2.v2).toEqual(304);
}), test("test with context bad input", () => {
  let t2 = new (s(p))({ value: { v1: 11, v2: "{{tstParam}}" } });
  t2 = e(t2);
  let r2 = t2.getView()({ testParam: 100 });
  expect(r2.v1).toEqual(11);
}), test("with context Date value", () => {
  let t2 = new (s(p))({ value: { v1: 11, v2: "{{testParam}}", vStr: "{{testParam}}" } });
  t2 = e(t2);
  let r2 = t2.getView()({ testParam: /* @__PURE__ */ new Date(1664887576e3) });
  expect(r2.v1).toEqual(11), expect(r2.v2).toEqual(1664887576e3), expect(r2.vStr).toEqual("2022-10-04T12:46:16.000Z");
}), test("with context Date method", () => {
  let t2 = new (s(p))({ value: { v1: 11, v2: "{{testParam.getTime()}}", vStr: "{{testParam.getTime()}}" } });
  t2 = e(t2);
  let r2 = t2.getView()({ testParam: /* @__PURE__ */ new Date(1664887576e3) });
  expect(r2.v1).toEqual(11), expect(r2.v2).toEqual(1664887576e3), expect(r2.vStr).toEqual("1664887576000");
});
export {
  p as TestComp
};
