import { N as e, O as t, M as r, F as n } from "./antd-97b654da.js";
import { i$ as i, iF as o, fR as a, cr as s, f7 as l, dW as c, ff as p, fg as d, j0 as u, fi as f, dV as h, j1 as m, j2 as y, j3 as g, j4 as b, j5 as v, j6 as w, j7 as j, j8 as T, fS as C, j9 as A, fU as x, av as k, ja as S, g5 as E, jb as O, jc as P, jd as L, je as I, jf as M, jg as H } from "./index-0c01125c.js";
import { f as R } from "./lodash-226cb5b1.js";
import $, { lazy as N, useContext as D, useState as B, useCallback as F, useMemo as V, useLayoutEffect as _, useEffect as q, Suspense as K } from "react";
import { lA as U, lR as Y, lS as z } from "./ant-design-icons-14ab96af.js";
import { r as J, P as W } from "./fontawesome-89eb6278.js";
import { g as G } from "./alasql-f59e855e.js";
import { d as X } from "./styled-components-c6abe9a3.js";
import { g as Z } from "./enterpriseSelectors-1897ddd8.js";
import { b as Q, d as ee } from "./react-router-8d1fc2f1.js";
import "react-dom";
import "./dayjs-7fc5ce65.js";
import "./axios-125479b5.js";
import "./redux-devtools-f8b1cd80.js";
import "./dnd-kit-e67c9595.js";
import "./moment-d8baa15a.js";
import "./crypto-js-8020edb5.js";
import "./numbro-48e81844.js";
import "./papaparse-088c0adc.js";
import "./uuid-82f303b2.js";
import "./supabase-2e4a9112.js";
import "./fetch-6a200310.js";
import "./react-draggable-fda4f1cb.js";
import "./remark-gfm-e9b5dec7.js";
import "./buffer-e20f80c8.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-cab52c82.js";
import "./react-best-gradient-color-picker-812be7ee.js";
import "./ua-parser-js-1d18a3f8.js";
import "./clsx-469c2c43.js";
import "./loglevel-5e7e37fc.js";
import "./codemirror-edf161cb.js";
import "./really-relaxed-json-e5391d6a.js";
import "./immer-c0428a8d.js";
import "./redux-saga-1b0a458d.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-8c3eaa86.js";
import "./react-documents-ae08f8b5.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-9e54e169.js";
import "./react-json-view-364658b4.js";
import "./qrcode-react-e4f7745b.js";
import "./katex-cda5b990.js";
import "./ecogis-maps-10bb29cf.js";
import "./devextreme-28d23085.js";
import "./exceljs-1678d36b.js";
import "./file-saver-es-c18fae8f.js";
var te, re = $, ne = (te = re) && "object" == typeof te && "default" in te ? te.default : te;
function ie(e2, t2, r2) {
  return t2 in e2 ? Object.defineProperty(e2, t2, { value: r2, enumerable: true, configurable: true, writable: true }) : e2[t2] = r2, e2;
}
var oe = !("undefined" == typeof window || !window.document || !window.document.createElement);
var ae = function(e2, t2, r2) {
  if ("function" != typeof e2)
    throw new Error("Expected reducePropsToState to be a function.");
  if ("function" != typeof t2)
    throw new Error("Expected handleStateChangeOnClient to be a function.");
  if (void 0 !== r2 && "function" != typeof r2)
    throw new Error("Expected mapStateOnServer to either be undefined or a function.");
  return function(n2) {
    if ("function" != typeof n2)
      throw new Error("Expected WrappedComponent to be a React component.");
    var i2, o2 = [];
    function a2() {
      i2 = e2(o2.map(function(e3) {
        return e3.props;
      })), s2.canUseDOM ? t2(i2) : r2 && (i2 = r2(i2));
    }
    var s2 = function(e3) {
      var t3, r3;
      function s3() {
        return e3.apply(this, arguments) || this;
      }
      r3 = e3, (t3 = s3).prototype = Object.create(r3.prototype), t3.prototype.constructor = t3, t3.__proto__ = r3, s3.peek = function() {
        return i2;
      }, s3.rewind = function() {
        if (s3.canUseDOM)
          throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");
        var e4 = i2;
        return i2 = void 0, o2 = [], e4;
      };
      var l2 = s3.prototype;
      return l2.UNSAFE_componentWillMount = function() {
        o2.push(this), a2();
      }, l2.componentDidUpdate = function() {
        a2();
      }, l2.componentWillUnmount = function() {
        var e4 = o2.indexOf(this);
        o2.splice(e4, 1), a2();
      }, l2.render = function() {
        return ne.createElement(n2, this.props);
      }, s3;
    }(re.PureComponent);
    return ie(s2, "displayName", "SideEffect(" + function(e3) {
      return e3.displayName || e3.name || "Component";
    }(n2) + ")"), ie(s2, "canUseDOM", oe), s2;
  };
};
const se = G(ae);
const le = G(J());
var ce, pe, de, ue, fe = "bodyAttributes", he = "htmlAttributes", me = "titleAttributes", ye = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link", META: "meta", NOSCRIPT: "noscript", SCRIPT: "script", STYLE: "style", TITLE: "title" }, ge = Object.keys(ye).map(function(e2) {
  return ye[e2];
}), be = "charset", ve = "cssText", we = "href", je = "http-equiv", Te = "innerHTML", Ce = "itemprop", Ae = "name", xe = "property", ke = "rel", Se = "src", Ee = "target", Oe = { accesskey: "accessKey", charset: "charSet", class: "className", contenteditable: "contentEditable", contextmenu: "contextMenu", "http-equiv": "httpEquiv", itemprop: "itemProp", tabindex: "tabIndex" }, Pe = "defaultTitle", Le = "defer", Ie = "encodeSpecialCharacters", Me = "onChangeClientState", He = "titleTemplate", Re = Object.keys(Oe).reduce(function(e2, t2) {
  return e2[Oe[t2]] = t2, e2;
}, {}), $e = [ye.NOSCRIPT, ye.SCRIPT, ye.STYLE], Ne = "data-react-helmet", De = function() {
  function e2(e3, t2) {
    for (var r2 = 0; r2 < t2.length; r2++) {
      var n2 = t2[r2];
      n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(e3, n2.key, n2);
    }
  }
  return function(t2, r2, n2) {
    return r2 && e2(t2.prototype, r2), n2 && e2(t2, n2), t2;
  };
}(), Be = Object.assign || function(e2) {
  for (var t2 = 1; t2 < arguments.length; t2++) {
    var r2 = arguments[t2];
    for (var n2 in r2)
      Object.prototype.hasOwnProperty.call(r2, n2) && (e2[n2] = r2[n2]);
  }
  return e2;
}, Fe = function(e2, t2) {
  var r2 = {};
  for (var n2 in e2)
    t2.indexOf(n2) >= 0 || Object.prototype.hasOwnProperty.call(e2, n2) && (r2[n2] = e2[n2]);
  return r2;
}, Ve = function(e2) {
  return false === (!(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]) ? String(e2) : String(e2).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
}, _e = function(e2) {
  var t2 = ze(e2, ye.TITLE), r2 = ze(e2, He);
  if (r2 && t2)
    return r2.replace(/%s/g, function() {
      return Array.isArray(t2) ? t2.join("") : t2;
    });
  var n2 = ze(e2, Pe);
  return t2 || n2 || void 0;
}, qe = function(e2) {
  return ze(e2, Me) || function() {
  };
}, Ke = function(e2, t2) {
  return t2.filter(function(t3) {
    return void 0 !== t3[e2];
  }).map(function(t3) {
    return t3[e2];
  }).reduce(function(e3, t3) {
    return Be({}, e3, t3);
  }, {});
}, Ue = function(e2, t2) {
  return t2.filter(function(e3) {
    return void 0 !== e3[ye.BASE];
  }).map(function(e3) {
    return e3[ye.BASE];
  }).reverse().reduce(function(t3, r2) {
    if (!t3.length)
      for (var n2 = Object.keys(r2), i2 = 0; i2 < n2.length; i2++) {
        var o2 = n2[i2].toLowerCase();
        if (-1 !== e2.indexOf(o2) && r2[o2])
          return t3.concat(r2);
      }
    return t3;
  }, []);
}, Ye = function(e2, t2, r2) {
  var n2 = {};
  return r2.filter(function(t3) {
    return !!Array.isArray(t3[e2]);
  }).map(function(t3) {
    return t3[e2];
  }).reverse().reduce(function(e3, r3) {
    var i2 = {};
    r3.filter(function(e4) {
      for (var r4 = void 0, o3 = Object.keys(e4), a3 = 0; a3 < o3.length; a3++) {
        var s3 = o3[a3], l3 = s3.toLowerCase();
        -1 === t2.indexOf(l3) || r4 === ke && "canonical" === e4[r4].toLowerCase() || l3 === ke && "stylesheet" === e4[l3].toLowerCase() || (r4 = l3), -1 === t2.indexOf(s3) || s3 !== Te && s3 !== ve && s3 !== Ce || (r4 = s3);
      }
      if (!r4 || !e4[r4])
        return false;
      var c2 = e4[r4].toLowerCase();
      return n2[r4] || (n2[r4] = {}), i2[r4] || (i2[r4] = {}), !n2[r4][c2] && (i2[r4][c2] = true, true);
    }).reverse().forEach(function(t3) {
      return e3.push(t3);
    });
    for (var o2 = Object.keys(i2), a2 = 0; a2 < o2.length; a2++) {
      var s2 = o2[a2], l2 = le({}, n2[s2], i2[s2]);
      n2[s2] = l2;
    }
    return e3;
  }, []).reverse();
}, ze = function(e2, t2) {
  for (var r2 = e2.length - 1; r2 >= 0; r2--) {
    var n2 = e2[r2];
    if (n2.hasOwnProperty(t2))
      return n2[t2];
  }
  return null;
}, Je = (ce = Date.now(), function(e2) {
  var t2 = Date.now();
  t2 - ce > 16 ? (ce = t2, e2(t2)) : setTimeout(function() {
    Je(e2);
  }, 0);
}), We = function(e2) {
  return clearTimeout(e2);
}, Ge = "undefined" != typeof window ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || Je : global.requestAnimationFrame || Je, Xe = "undefined" != typeof window ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || We : global.cancelAnimationFrame || We, Ze = function(e2) {
  return console && "function" == typeof console.warn && void 0;
}, Qe = null, et = function(e2, t2) {
  var r2 = e2.baseTag, n2 = e2.bodyAttributes, i2 = e2.htmlAttributes, o2 = e2.linkTags, a2 = e2.metaTags, s2 = e2.noscriptTags, l2 = e2.onChangeClientState, c2 = e2.scriptTags, p2 = e2.styleTags, d2 = e2.title, u2 = e2.titleAttributes;
  nt(ye.BODY, n2), nt(ye.HTML, i2), rt(d2, u2);
  var f2 = { baseTag: it(ye.BASE, r2), linkTags: it(ye.LINK, o2), metaTags: it(ye.META, a2), noscriptTags: it(ye.NOSCRIPT, s2), scriptTags: it(ye.SCRIPT, c2), styleTags: it(ye.STYLE, p2) }, h2 = {}, m2 = {};
  Object.keys(f2).forEach(function(e3) {
    var t3 = f2[e3], r3 = t3.newTags, n3 = t3.oldTags;
    r3.length && (h2[e3] = r3), n3.length && (m2[e3] = f2[e3].oldTags);
  }), t2 && t2(), l2(e2, h2, m2);
}, tt = function(e2) {
  return Array.isArray(e2) ? e2.join("") : e2;
}, rt = function(e2, t2) {
  void 0 !== e2 && document.title !== e2 && (document.title = tt(e2)), nt(ye.TITLE, t2);
}, nt = function(e2, t2) {
  var r2 = document.getElementsByTagName(e2)[0];
  if (r2) {
    for (var n2 = r2.getAttribute(Ne), i2 = n2 ? n2.split(",") : [], o2 = [].concat(i2), a2 = Object.keys(t2), s2 = 0; s2 < a2.length; s2++) {
      var l2 = a2[s2], c2 = t2[l2] || "";
      r2.getAttribute(l2) !== c2 && r2.setAttribute(l2, c2), -1 === i2.indexOf(l2) && i2.push(l2);
      var p2 = o2.indexOf(l2);
      -1 !== p2 && o2.splice(p2, 1);
    }
    for (var d2 = o2.length - 1; d2 >= 0; d2--)
      r2.removeAttribute(o2[d2]);
    i2.length === o2.length ? r2.removeAttribute(Ne) : r2.getAttribute(Ne) !== a2.join(",") && r2.setAttribute(Ne, a2.join(","));
  }
}, it = function(e2, t2) {
  var r2 = document.head || document.querySelector(ye.HEAD), n2 = r2.querySelectorAll(e2 + "[" + Ne + "]"), i2 = Array.prototype.slice.call(n2), o2 = [], a2 = void 0;
  return t2 && t2.length && t2.forEach(function(t3) {
    var r3 = document.createElement(e2);
    for (var n3 in t3)
      if (t3.hasOwnProperty(n3))
        if (n3 === Te)
          r3.innerHTML = t3.innerHTML;
        else if (n3 === ve)
          r3.styleSheet ? r3.styleSheet.cssText = t3.cssText : r3.appendChild(document.createTextNode(t3.cssText));
        else {
          var s2 = void 0 === t3[n3] ? "" : t3[n3];
          r3.setAttribute(n3, s2);
        }
    r3.setAttribute(Ne, "true"), i2.some(function(e3, t4) {
      return a2 = t4, r3.isEqualNode(e3);
    }) ? i2.splice(a2, 1) : o2.push(r3);
  }), i2.forEach(function(e3) {
    return e3.parentNode.removeChild(e3);
  }), o2.forEach(function(e3) {
    return r2.appendChild(e3);
  }), { oldTags: i2, newTags: o2 };
}, ot = function(e2) {
  return Object.keys(e2).reduce(function(t2, r2) {
    var n2 = void 0 !== e2[r2] ? r2 + '="' + e2[r2] + '"' : "" + r2;
    return t2 ? t2 + " " + n2 : n2;
  }, "");
}, at = function(e2) {
  var t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
  return Object.keys(e2).reduce(function(t3, r2) {
    return t3[Oe[r2] || r2] = e2[r2], t3;
  }, t2);
}, st = function(e2, t2, r2) {
  switch (e2) {
    case ye.TITLE:
      return { toComponent: function() {
        return e3 = t2.title, r3 = t2.titleAttributes, (n2 = { key: e3 })[Ne] = true, i2 = at(r3, n2), [U(ye.TITLE, { ...i2, children: e3 })];
        var e3, r3, n2, i2;
      }, toString: function() {
        return function(e3, t3, r3, n2) {
          var i2 = ot(r3), o2 = tt(t3);
          return i2 ? "<" + e3 + " " + Ne + '="true" ' + i2 + ">" + Ve(o2, n2) + "</" + e3 + ">" : "<" + e3 + " " + Ne + '="true">' + Ve(o2, n2) + "</" + e3 + ">";
        }(e2, t2.title, t2.titleAttributes, r2);
      } };
    case fe:
    case he:
      return { toComponent: function() {
        return at(t2);
      }, toString: function() {
        return ot(t2);
      } };
    default:
      return { toComponent: function() {
        return function(e3, t3) {
          return t3.map(function(t4, r3) {
            var n2, i2 = ((n2 = { key: r3 })[Ne] = true, n2);
            return Object.keys(t4).forEach(function(e4) {
              var r4 = Oe[e4] || e4;
              if (r4 === Te || r4 === ve) {
                var n3 = t4.innerHTML || t4.cssText;
                i2.dangerouslySetInnerHTML = { __html: n3 };
              } else
                i2[r4] = t4[e4];
            }), $.createElement(e3, i2);
          });
        }(e2, t2);
      }, toString: function() {
        return function(e3, t3, r3) {
          return t3.reduce(function(t4, n2) {
            var i2 = Object.keys(n2).filter(function(e4) {
              return !(e4 === Te || e4 === ve);
            }).reduce(function(e4, t5) {
              var i3 = void 0 === n2[t5] ? t5 : t5 + '="' + Ve(n2[t5], r3) + '"';
              return e4 ? e4 + " " + i3 : i3;
            }, ""), o2 = n2.innerHTML || n2.cssText || "", a2 = -1 === $e.indexOf(e3);
            return t4 + "<" + e3 + " " + Ne + '="true" ' + i2 + (a2 ? "/>" : ">" + o2 + "</" + e3 + ">");
          }, "");
        }(e2, t2, r2);
      } };
  }
}, lt = function(e2) {
  var t2 = e2.baseTag, r2 = e2.bodyAttributes, n2 = e2.encode, i2 = e2.htmlAttributes, o2 = e2.linkTags, a2 = e2.metaTags, s2 = e2.noscriptTags, l2 = e2.scriptTags, c2 = e2.styleTags, p2 = e2.title, d2 = void 0 === p2 ? "" : p2, u2 = e2.titleAttributes;
  return { base: st(ye.BASE, t2, n2), bodyAttributes: st(fe, r2, n2), htmlAttributes: st(he, i2, n2), link: st(ye.LINK, o2, n2), meta: st(ye.META, a2, n2), noscript: st(ye.NOSCRIPT, s2, n2), script: st(ye.SCRIPT, l2, n2), style: st(ye.STYLE, c2, n2), title: st(ye.TITLE, { title: d2, titleAttributes: u2 }, n2) };
}, ct = se(function(e2) {
  return { baseTag: Ue([we, Ee], e2), bodyAttributes: Ke(fe, e2), defer: ze(e2, Le), encode: ze(e2, Ie), htmlAttributes: Ke(he, e2), linkTags: Ye(ye.LINK, [ke, we], e2), metaTags: Ye(ye.META, [Ae, be, je, xe, Ce], e2), noscriptTags: Ye(ye.NOSCRIPT, [Te], e2), onChangeClientState: qe(e2), scriptTags: Ye(ye.SCRIPT, [Se, Te], e2), styleTags: Ye(ye.STYLE, [ve], e2), title: _e(e2), titleAttributes: Ke(me, e2) };
}, function(e2) {
  Qe && Xe(Qe), e2.defer ? Qe = Ge(function() {
    et(e2, function() {
      Qe = null;
    });
  }) : (et(e2), Qe = null);
}, lt)(function() {
  return null;
}), pt = (pe = ct, ue = de = function(t2) {
  function r2() {
    return function(e2, t3) {
      if (!(e2 instanceof t3))
        throw new TypeError("Cannot call a class as a function");
    }(this, r2), function(e2, t3) {
      if (!e2)
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      return !t3 || "object" != typeof t3 && "function" != typeof t3 ? e2 : t3;
    }(this, t2.apply(this, arguments));
  }
  return function(e2, t3) {
    if ("function" != typeof t3 && null !== t3)
      throw new TypeError("Super expression must either be null or a function, not " + typeof t3);
    e2.prototype = Object.create(t3 && t3.prototype, { constructor: { value: e2, enumerable: false, writable: true, configurable: true } }), t3 && (Object.setPrototypeOf ? Object.setPrototypeOf(e2, t3) : e2.__proto__ = t3);
  }(r2, t2), r2.prototype.shouldComponentUpdate = function(t3) {
    return !e(this.props, t3);
  }, r2.prototype.mapNestedChildrenToProps = function(e2, t3) {
    if (!t3)
      return null;
    switch (e2.type) {
      case ye.SCRIPT:
      case ye.NOSCRIPT:
        return { innerHTML: t3 };
      case ye.STYLE:
        return { cssText: t3 };
    }
    throw new Error("<" + e2.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");
  }, r2.prototype.flattenArrayTypeChildren = function(e2) {
    var t3, r3 = e2.child, n2 = e2.arrayTypeChildren, i2 = e2.newChildProps, o2 = e2.nestedChildren;
    return Be({}, n2, ((t3 = {})[r3.type] = [].concat(n2[r3.type] || [], [Be({}, i2, this.mapNestedChildrenToProps(r3, o2))]), t3));
  }, r2.prototype.mapObjectTypeChildren = function(e2) {
    var t3, r3, n2 = e2.child, i2 = e2.newProps, o2 = e2.newChildProps, a2 = e2.nestedChildren;
    switch (n2.type) {
      case ye.TITLE:
        return Be({}, i2, ((t3 = {})[n2.type] = a2, t3.titleAttributes = Be({}, o2), t3));
      case ye.BODY:
        return Be({}, i2, { bodyAttributes: Be({}, o2) });
      case ye.HTML:
        return Be({}, i2, { htmlAttributes: Be({}, o2) });
    }
    return Be({}, i2, ((r3 = {})[n2.type] = Be({}, o2), r3));
  }, r2.prototype.mapArrayTypeChildrenToProps = function(e2, t3) {
    var r3 = Be({}, t3);
    return Object.keys(e2).forEach(function(t4) {
      var n2;
      r3 = Be({}, r3, ((n2 = {})[t4] = e2[t4], n2));
    }), r3;
  }, r2.prototype.warnOnInvalidChildren = function(e2, t3) {
    if ("production" !== process.env.NODE_ENV) {
      if (!ge.some(function(t4) {
        return e2.type === t4;
      }))
        return "function" == typeof e2.type ? Ze() : Ze((ge.join(", "), e2.type));
      if (t3 && "string" != typeof t3 && (!Array.isArray(t3) || t3.some(function(e3) {
        return "string" != typeof e3;
      })))
        throw new Error("Helmet expects a string as a child of <" + e2.type + ">. Did you forget to wrap your children in braces? ( <" + e2.type + ">{``}</" + e2.type + "> ) Refer to our API for more information.");
    }
    return true;
  }, r2.prototype.mapChildrenToProps = function(e2, t3) {
    var r3 = this, n2 = {};
    return $.Children.forEach(e2, function(e3) {
      if (e3 && e3.props) {
        var i2 = e3.props, o2 = i2.children, a2 = function(e4) {
          var t4 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
          return Object.keys(e4).reduce(function(t5, r4) {
            return t5[Re[r4] || r4] = e4[r4], t5;
          }, t4);
        }(Fe(i2, ["children"]));
        switch (r3.warnOnInvalidChildren(e3, o2), e3.type) {
          case ye.LINK:
          case ye.META:
          case ye.NOSCRIPT:
          case ye.SCRIPT:
          case ye.STYLE:
            n2 = r3.flattenArrayTypeChildren({ child: e3, arrayTypeChildren: n2, newChildProps: a2, nestedChildren: o2 });
            break;
          default:
            t3 = r3.mapObjectTypeChildren({ child: e3, newProps: t3, newChildProps: a2, nestedChildren: o2 });
        }
      }
    }), t3 = this.mapArrayTypeChildrenToProps(n2, t3);
  }, r2.prototype.render = function() {
    var e2 = this.props, t3 = e2.children, r3 = Fe(e2, ["children"]), n2 = Be({}, r3);
    return t3 && (n2 = this.mapChildrenToProps(t3, n2)), U(pe, { ...n2 });
  }, De(r2, null, [{ key: "canUseDOM", set: function(e2) {
    pe.canUseDOM = e2;
  } }]), r2;
}($.Component), de.propTypes = { base: W.object, bodyAttributes: W.object, children: W.oneOfType([W.arrayOf(W.node), W.node]), defaultTitle: W.string, defer: W.bool, encodeSpecialCharacters: W.bool, htmlAttributes: W.object, link: W.arrayOf(W.object), meta: W.arrayOf(W.object), noscript: W.arrayOf(W.object), onChangeClientState: W.func, script: W.arrayOf(W.object), style: W.arrayOf(W.object), title: W.string, titleAttributes: W.object, titleTemplate: W.string }, de.defaultProps = { defer: true, encodeSpecialCharacters: true }, de.peek = pe.peek, de.rewind = function() {
  var e2 = pe.rewind();
  return e2 || (e2 = lt({ baseTag: [], bodyAttributes: {}, encodeSpecialCharacters: true, htmlAttributes: {}, linkTags: [], metaTags: [], noscriptTags: [], scriptTags: [], styleTags: [], title: "", titleAttributes: {} })), e2;
}, ue);
pt.renderStatic = pt.rewind;
const dt = N(() => import("./header-81c252d6.js").then((e2) => ({ default: e2.default }))), ut = N(() => import("./BottomContent-2212387b.js").then((e2) => ({ default: e2.BottomSkeleton }))), ft = N(() => import("./LeftContent-3d0e3e30.js").then((e2) => ({ default: e2.LeftContent }))), ht = N(() => import("./LeftLayersContent-1570e6db.js").then((e2) => ({ default: e2.LeftLayersContent }))), mt = N(() => import("./RightPanel-c38404df.js")), yt = N(() => import("./editorTutorials-3db371c3.js")), gt = N(() => import("./BottomPanel-2a812fce.js")), bt = N(() => import("./editorHotKeys-ead30538.js").then((e2) => ({ default: e2.CustomShortcutWrapper }))), vt = N(() => import("./editorHotKeys-ead30538.js").then((e2) => ({ default: e2.EditorGlobalHotKeys }))), wt = N(() => import("./editorHotKeys-ead30538.js").then((e2) => ({ default: e2.EditorHotKeys }))), jt = N(() => import("./index-0c01125c.js").then((e2) => e2.AJ).then((e2) => ({ default: e2.Body }))), Tt = N(() => import("./index-0c01125c.js").then((e2) => e2.AJ).then((e2) => ({ default: e2.EditorContainer }))), Ct = N(() => import("./index-0c01125c.js").then((e2) => e2.AJ).then((e2) => ({ default: e2.EditorContainerWithViewMode }))), At = N(() => import("./index-0c01125c.js").then((e2) => e2.AJ).then((e2) => ({ default: e2.Height100Div }))), xt = N(() => import("./index-0c01125c.js").then((e2) => e2.AJ).then((e2) => ({ default: e2.LeftPanel }))), kt = N(() => import("./index-0c01125c.js").then((e2) => e2.AJ).then((e2) => ({ default: e2.MiddlePanel }))), St = N(() => import("./help-d2eaec3f.js").then((e2) => ({ default: e2.HelpDropdown }))), Et = N(() => import("./previewHeader-20d30082.js").then((e2) => ({ default: e2.PreviewHeader }))), Ot = X.div`
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  contain: paint;
  z-index: ${o.hooksCompContainer};
`, Pt = X.div`
  height: ${(e2) => `calc(${e2.$height ? e2.$height + "px" : "100vh"} - env(safe-area-inset-bottom) -
      ${e2.$hideBodyHeader ? "0px" : a}
  )`};
`, Lt = X.div`
  .ant-menu {
    background-color: ${(e2) => e2.$bgColor ? e2.$bgColor : "#FCFCFD"};
    height: calc(100vh - 48px);
    border-right: 1px solid #e6e8eb;

    .ant-menu-item {
      padding: 0 7px !important;
      width: 40px;
      height: 26px;
      margin: 12px 0 0 0;
      
      &.ant-menu-item-only-child {
        color: #1677ff;
      }

      svg {
        height: 26px;
        width: 26px;
        padding: 5px;
      }

      &.ant-menu-item-selected,
      &:hover,
      &:active {
        background-color: ${(e2) => e2.$bgColor ? e2.$bgColor : "#FCFCFD"} !important;
        svg {
          background: ${(e2) => e2.$activeBgColor ? e2.$activeBgColor : "#e6edfe"};
          color: ${(e2) => e2.$activeFontColor ? e2.$activeFontColor : "#1677ff"};
          border-radius: 4px;
        }
      }
    }
  }

  z-index: ${o.leftToolbar};
`, It = X.div`
  > div {
    left: 6px;
    right: auto;
    height: 28px;
    bottom: 36px;

    > div.shortcutList {
      left: 42px;
      bottom: 2px;
    }
  }
`;
X.div`
  > div {
    left: 6px;
    right: auto;
    height: 28px;
    top: 15px;
  }
`;
const Mt = X.div`
  display: flex;
  flex-direction: column;
  height: 100%;

  .ant-divider {
    margin: 16px 0;
    border-color: #e1e3eb;
  }
`, Ht = X.div`
  font-weight: 500;
  font-size: 14px;
  color: #8b8fa3;
  line-height: 14px;
  margin: 16px;
`, Rt = X.div`
  margin: 16px 8px;
  height: 33px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 7px;
  color: #333;
  cursor: pointer;

  svg {
    margin-right: 8px;

    path {
      fill: #222222;
    }
  }

  &:hover,
  &:active {
    background: #f2f7fc;
    border-radius: 4px;

    svg path {
      fill: #315efb;
    }
  }
`, $t = X.div`
  overflow: auto;
  position: relative;
  flex: 1 1 0;
`, Nt = X(n)`
  margin: 2% 0 0;
  .device-mockup.portrait {
    > div:first-child {
      > div:first-child {
        > div:first-child {
          > div:nth-child(2) {
            display: block !important;
            overflow: hidden auto !important;
          } 
        } 
      }
    }
  }
  .device-mockup.landscape {
    > div:first-child {
      > div:first-child {
        > div:first-child {
          > div:nth-child(2) {
            > div:first-child {
              display: block !important;
              overflow: hidden auto !important;
            }
          } 
        } 
      }
    }
  }
`, Dt = [{ key: "state", icon: U(O, {}) }, { key: "setting", icon: U(P, {}) }, { key: "canvas", icon: U(L, {}) }, { key: "js", icon: U(I, {}) }, { key: "layout", icon: U(M, {}) }], Bt = [{ key: "state", icon: U(O, {}) }, { key: "setting", icon: U(P, {}) }, { key: "js", icon: U(I, {}) }], Ft = ({ deviceType: e2, deviceOrientation: t2, children: r2 }) => {
  const [n2, i2] = B(null);
  q(() => {
    (async () => {
      if ("tablet" === e2) {
        const { IPadMockup: e3 } = await import("./index-7ad1465c.js");
        i2(() => e3);
      } else if ("mobile" === e2) {
        const { IPhoneMockup: e3 } = await import("./index-7ad1465c.js");
        i2(() => e3);
      } else
        i2(() => null);
    })();
  }, [e2]);
  const o2 = V(() => "tablet" === e2 && "portrait" === t2 ? 850 : "tablet" === e2 && "landscape" === t2 ? 1100 : "mobile" === e2 && "portrait" === t2 ? 450 : "mobile" === e2 && "landscape" === t2 ? 1200 : void 0, [e2, t2]);
  return n2 ? U(Nt, { justify: "center", children: U(n2, { isLandscape: "landscape" === t2, screenWidth: o2, className: `device-mockup ${"landscape" === t2 && "mobile" === e2 ? "landscape" : "portrait"} `, frameColor: "background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%)", children: r2 }) }) : U(z, { children: r2 });
};
const Vt = $.memo(function(e2) {
  var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j;
  const { uiComp: n2 } = e2, a2 = Q(), O2 = D(s), { readOnly: P2, hideHeader: L2 } = D(l), I2 = c(p), M2 = c(d), R2 = c(u), $2 = ee().state, N2 = $2 == null ? void 0 : $2.showNewUserGuide, J2 = c(f), W2 = c(Z), [G2, X2] = B(false), te2 = F(() => X2(!G2), [G2]), [re2, ne2] = B("state"), [ie2, oe2] = B(), ae2 = h(), [se2, le2] = B(() => N2 ? m : y()), [ce2, pe2] = B(m), de2 = "view" === a2.viewMode, ue2 = O2.getAppSettingsComp(), { showHeaderInPublic: fe2 } = ue2.getView(), he2 = F((e3) => {
    let t2;
    e3 ? (t2 = Object.assign({}, se2), t2[e3] = !se2[e3]) : Object.values(se2).some((e4) => e4) ? (pe2(se2), t2 = { left: false, bottom: false, right: false }) : t2 = ce2, le2(t2), g(t2);
  }, [se2, ce2]), [me2, ye2] = B(() => b()), ge2 = F((e3) => {
    ye2(e3 || "both"), v(e3 || "both");
  }, [me2]), be2 = F((e3) => {
    O2.setDraggingCompType(e3);
  }, [O2]), ve2 = F((e3) => {
    O2.setShowPropertyPane("property" === e3);
  }, [O2]), we2 = V(() => Object.keys(O2.getHooksComp().children).map((e3) => U("div", { children: O2.getHooksComp().children[e3].getView() }, e3 + "-" + (I2 == null ? void 0 : I2.applicationId))), [O2]);
  _(() => {
    function e3() {
      oe2(window.innerHeight);
    }
    const t2 = "orientationchange" in window ? "orientationchange" : "resize";
    return window.addEventListener(t2, e3), e3(), () => {
      window.removeEventListener(t2, e3);
    };
  }, [se2, me2]);
  const je2 = w() || de2 && (!fe2 || !R2.showHeaderInPublicApps), Te2 = V(() => J2 ? U(Pt, { $hideBodyHeader: je2, $height: ie2, children: U(Tt, { children: n2.getView() }) }) : n2.getView(), [J2, je2, ie2, n2]), Ce2 = V(() => de2 ? n2.getView() : "mobile" === O2.deviceType || "tablet" === O2.deviceType ? U(Ft, { deviceType: O2.deviceType, deviceOrientation: O2.deviceOrientation, children: n2.getView() }) : U("div", { children: n2.getView() }), [n2, de2, O2.deviceType, O2.deviceOrientation]);
  q(() => () => {
    le2(m), ye2("both"), X2(false), ne2("state"), oe2(void 0), g(se2), v(me2);
  }, []);
  const Ae2 = "app-acp.vnpt.vn" === window.location.hostname, xe2 = "localhost" === window.location.hostname;
  if (P2 && L2)
    return Y(bt, { children: [n2.getView(), U("div", { style: { zIndex: o.hooksCompContainer }, children: we2 })] });
  if (P2 && !J2)
    return Y(bt, { children: [Y(pt, { children: [I2 && U("title", { children: ((_c = (_b = (_a = ue2 == null ? void 0 : ue2.children) == null ? void 0 : _a.title) == null ? void 0 : _b.getView) == null ? void 0 : _c.call(_b)) || (I2 == null ? void 0 : I2.name) }), Ae2 || xe2 && [(I2 == null ? void 0 : I2.name) ? [U("meta", { property: "iframely:title", content: I2.name }, "iframely:title"), U("meta", { property: "iframely:description", content: I2.description }, "iframely:description")] : [U("meta", { property: "iframely:title", content: "Composable Platform" }, "iframely:title"), U("meta", { property: "iframely:description", content: "Composable Platform | rapid App & VideoMeeting builder for everyone." }, "iframely:description")], U("link", { rel: "iframely", type: "text/html", href: window.location.href, media: "(aspect-ratio: 1280/720)" }, "iframely-link"), U("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }, "preconnect-googleapis"), U("link", { href: "https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap", rel: "stylesheet" }, "font-ubuntu")]] }), Y(K, { fallback: U(j, {}), children: [!je2 && U(Et, {}), Y(Ct, { children: [U(Pt, { $hideBodyHeader: je2, $height: ie2, children: Ce2 }), U("div", { style: { zIndex: o.hooksCompContainer }, children: we2 })] })] })] });
  const ke2 = se2.right || J2;
  return Y(z, { children: [Y(pt, { children: [I2 && U("title", { children: ((_f = (_e2 = (_d = ue2 == null ? void 0 : ue2.children) == null ? void 0 : _d.title) == null ? void 0 : _e2.getView) == null ? void 0 : _f.call(_e2)) || (I2 == null ? void 0 : I2.name) }), Ae2 || xe2 && [(I2 == null ? void 0 : I2.name) ? [U("meta", { property: "iframely:title", content: I2.name }, "iframely:title"), U("meta", { property: "iframely:description", content: I2.description }, "iframely:description")] : [U("meta", { property: "iframely:title", content: "Composable Platform" }, "iframely:title"), U("meta", { property: "iframely:description", content: "Composable Platform | rapid App & VideoMeeting builder for everyone." }, "iframely:description")], U("link", { rel: "iframely", type: "text/html", href: window.location.href, media: "(aspect-ratio: 1280/720)" }, "iframely"), U("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }, "preconnect-googleapis"), U("link", { href: "https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap", rel: "stylesheet" }, "font-ubuntu")]] }), Y(At, { onDragEnd: (e3) => {
    O2.setDragging(false), T.clearData();
  }, children: [M2 ? U(Et, {}) : U(dt, { togglePanel: he2, panelStatus: se2, toggleEditorModeStatus: ge2, editorModeStatus: me2 }), N2 && U(yt, {}), U(vt, { disabled: P2, togglePanel: he2, panelStatus: se2, toggleShortcutList: te2, children: Y(jt, { children: [U(Lt, { $bgColor: (_g = W2 == null ? void 0 : W2.config_set) == null ? void 0 : _g.editorSidebarColor, $fontColor: (_h = W2 == null ? void 0 : W2.config_set) == null ? void 0 : _h.editorSidebarFontColor, $activeBgColor: (_i = W2 == null ? void 0 : W2.config_set) == null ? void 0 : _i.editorSidebarActiveBgColor, $activeFontColor: (_j = W2 == null ? void 0 : W2.config_set) == null ? void 0 : _j.editorSidebarActiveFontColor, children: Y(t, { width: 40, children: [U(r, { theme: "light", mode: "inline", defaultSelectedKeys: ["state"], selectedKeys: se2.left ? [re2] : [""], items: I2 && !C(H[I2.applicationType]) ? Dt : Bt, disabled: J2, onClick: (e3) => ((e4) => {
    let t2 = true;
    se2.left && e4.key === re2 && (t2 = false), le2({ ...se2, left: t2 }), g({ ...se2, left: t2 }), ne2(e4.key);
  })(e3) }), !J2 && U(It, { children: U(St, { showShortcutList: G2, setShowShortcutList: X2, isEdit: true }) })] }) }), U(K, { fallback: null, children: se2.left && "layout" !== me2 && Y(xt, { children: ["state" === re2 && U(ft, { uiComp: n2 }), U(A.Provider, { value: { settingType: re2 }, children: Y(z, { children: ["setting" === re2 && U(Mt, { children: U(x, { children: I2 && !C(H[I2.applicationType]) && U(z, { children: ue2.getPropertyView() }) }) }), "canvas" === re2 && U(Mt, { children: U(x, { children: I2 && !C(H[I2.applicationType]) && U(z, { children: ue2.getPropertyView() }) }) })] }) }), "js" === re2 && Y(z, { children: [U(Ht, { children: k("leftPanel.toolbarTitle") }), e2.preloadComp.getPropertyView(), Y(Rt, { onClick: () => {
    return ae2((e3 = { showScriptsAndStyleModal: true }, { type: i.SET_EDITOR_EXTERNAL_STATE, payload: e3 }));
    var e3;
  }, children: [U(S, {}), k("leftPanel.toolbarPreload")] }), e2.preloadComp.getJSLibraryPropertyView()] }), "layout" === re2 && U(ht, { uiComp: n2 })] }) }), Y(kt, { children: [U($t, { className: E, children: U(wt, { disabled: P2, children: Y(Ct, { children: [Te2, U(Ot, { children: we2 })] }) }) }), U(K, { fallback: U(ut, {}), children: se2.bottom && "layout" !== me2 && U(gt, {}) })] }), U(K, { fallback: null, children: ke2 && U(mt, { uiComp: n2, onCompDrag: be2, showPropertyPane: O2.showPropertyPane, onTabChange: ve2 }) })] }) })] })] });
}, (e2, t2) => R.isEqual(e2, t2));
export {
  $t as EditorWrapper,
  Vt as default
};
