var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};
import { M as e, cH as t, cI as o, cJ as a, ap as c, _ as s, cK as r, cL as n, cw as i, v as p, a6 as l, w as v, a4 as u } from "./index-f50c05c4.js";
import "./lodash-f1e42446.js";
import { lA as m } from "./ant-design-icons-b1480d8d.js";
import "./loglevel-6fb66d22.js";
import "./axios-84bb1c75.js";
import "./redux-devtools-d38e5b33.js";
import "./alasql-0ff6dabf.js";
import "./react-router-a1807b5b.js";
import "./antd-04a23d13.js";
import "react";
import "react-dom";
import "./dayjs-844325ae.js";
import "./fontawesome-2445f580.js";
import "./dnd-kit-56a2f36f.js";
import "./styled-components-1e696d6b.js";
import "./numbro-c1edb412.js";
import "./papaparse-1bac8e5f.js";
import "./uuid-82f303b2.js";
import "./supabase-c27c62e3.js";
import "./fetch-a3c8ad94.js";
import "./react-draggable-60f59f09.js";
import "./remark-gfm-f2973785.js";
import "./buffer-d3713d77.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-e1b123a3.js";
import "./react-best-gradient-color-picker-4dd60dac.js";
import "./ua-parser-js-094f59ba.js";
import "./clsx-469c2c43.js";
import "./crypto-js-d5eac8ba.js";
import "./codemirror-73d8c217.js";
import "./really-relaxed-json-49b6a70d.js";
import "./immer-c0428a8d.js";
import "./redux-saga-5514e228.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-5678e6bc.js";
import "./react-documents-eb6de859.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-5125aafe.js";
import "./react-json-view-9403d8a1.js";
import "./qrcode-react-cb73d2b6.js";
import "./katex-a34f0265.js";
import "./ecogis-maps-bb0d63f9.js";
import "./devextreme-2fa5bb9a.js";
const d = (e2) => m("div", {}), j = function() {
  const t2 = { v1: p("abc") };
  return new e(t2, (e2) => e2.v1).setPropertyViewFn(d).build();
}();
function x(e2) {
  return JSON.stringify(e2.toJsonValue());
}
test("test object create", () => {
  const e2 = new class {
    constructor() {
      __publicField(this, "a", 1);
      __publicField(this, "b", "abc");
    }
    getValue() {
      return this.a + 10;
    }
  }();
  expect(e2.a).toEqual(1), expect(e2.getValue()).toEqual(11);
  const t2 = Object.create(e2);
  t2.a = 2, expect(t2.a).toEqual(2), expect(t2.getValue()).toEqual(12), expect(e2.a).toEqual(1), expect(e2.getValue()).toEqual(11);
}), test("test action and reduce", () => {
  let e2 = new j({});
  expect(x(e2)).toEqual('{"v1":"abc"}'), e2 = e2.reduce(e2.changeChildAction("v1", "changed")), expect(x(e2)).toEqual('{"v1":"changed"}'), e2 = e2.reduce(e2.changeChildAction("v1", "changedXXXX")), expect(x(e2)).toEqual('{"v1":"changedXXXX"}');
}), test("test value constructor", () => {
  let e2 = new j({ value: { v1: "changed" } });
  expect(x(e2)).toEqual('{"v1":"changed"}');
});
const b = function() {
  const t2 = { v1: p("abc"), v2: j };
  return new e(t2, (e2) => e2).setPropertyViewFn(d).build();
}();
test("test multi2 toJson", () => {
  let e2 = new b({});
  const o2 = JSON.stringify(e2.toJsonValue());
  expect(o2).toEqual('{"v1":"abc","v2":{"v1":"abc"}}'), e2 = e2.reduce(t("v2", e2.children.v2.changeChildAction("v1", "changed"))), expect(x(e2)).toEqual('{"v1":"abc","v2":{"v1":"changed"}}');
  let a2 = new b({ value: JSON.parse(x(e2)) });
  expect(x(a2)).toEqual(x(e2));
}), test("test multi change action", () => {
  let e2 = new b({});
  expect(e2.getView().v1).toEqual("abc"), expect(e2.getView().v2).toEqual("abc");
  const t2 = o({ v1: a("v1_value", true), v2: c("v1", "xxxy", true) });
  e2 = e2.reduce(t2), expect(e2.getView().v1).toEqual("v1_value"), expect(e2.getView().v2).toEqual("xxxy");
});
const g = function() {
  const t2 = { v1: p("abc"), v2: b, v3: l };
  return new e(t2, (e2) => e2.v3).setPropertyViewFn(d).build();
}();
test("test multi toNode", () => {
  const e2 = new g({}).node().evaluate();
  expect(e2.v3.value).toEqual("");
}), test("test comp don't change if no value change", () => {
  let e2 = new g({});
  expect(s(e2)).toBe(e2);
}), test("test cache", () => {
  let e2 = s(new g({}));
  const t2 = e2.children.v1, o2 = e2.children.v2;
  e2 = e2.reduce(e2.changeChildAction("v1", "XXX")), expect(e2.children.v1.getView()).toEqual("XXX"), expect(e2.children.v1).not.toBe(t2), expect(e2.children.v2).toBe(o2), e2 = s(e2), expect(e2.node()).toBe(e2.node());
  const a2 = e2.node().evaluate();
  e2 = e2.reduce(r(a2));
  const c2 = e2.reduce(r(a2));
  expect(c2).toBe(e2), expect(e2.node().evaluate()).toBe(e2.node().evaluate()), expect(s(e2)).toBe(e2);
}), test("test code", () => {
  let t2 = new (function() {
    const t3 = { v1: v(l, "{{a.b}}") };
    return new e(t3, (e2) => e2.v1).setPropertyViewFn(d).build();
  }())({});
  const o2 = { a: n({ b: i("abc") }) };
  t2 = s(t2, o2), expect(t2.getView()).toEqual("abc");
}), test("removeDefault", () => {
  const t2 = function() {
    const t3 = { v0: l, v1: v(l, "{{a.b}}"), v2: u, v3: u.DEFAULT_TRUE };
    return new e(t3, (e2) => e2).setPropertyViewFn(d).build();
  }();
  expect(s(new t2({})).toJsonValue()).toEqual({ v1: "{{a.b}}", v3: true }), expect(s(new t2({ value: { v0: "", v1: "{{a.b}}", v2: false, v3: true } })).toJsonValue()).toEqual({ v1: "{{a.b}}", v3: true }), expect(s(new t2({ value: { v0: "bc", v1: "", v2: true, v3: false } })).toJsonValue()).toEqual({ v0: "bc", v1: "", v2: true, v3: false }), expect(s(new t2({ value: { v0: "bc", v1: "{{a.b}}", v2: true, v3: true } })).toJsonValue()).toEqual({ v0: "bc", v1: "{{a.b}}", v2: true, v3: true });
});
