"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const ReactDOM = require("react-dom");
const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
const ReactDOM__default = /* @__PURE__ */ _interopDefaultLegacy(ReactDOM);
var __assign = globalThis && globalThis.__assign || function() {
  __assign = Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p in s)
        if (Object.prototype.hasOwnProperty.call(s, p))
          t[p] = s[p];
    }
    return t;
  };
  return __assign.apply(this, arguments);
};
var _a;
var __SECRET_INTERNALS__ = "__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED";
var CopyReactDOM = ReactDOM__default.default;
var copyRender;
var isReact18 = Number((_a = CopyReactDOM.version) === null || _a === void 0 ? void 0 : _a.split(".")[0]) > 17;
var createRoot;
try {
  CopyReactDOM[__SECRET_INTERNALS__] = __assign(__assign({}, CopyReactDOM[__SECRET_INTERNALS__]), { usingClientEntryPoint: true });
  createRoot = CopyReactDOM.createRoot;
  CopyReactDOM[__SECRET_INTERNALS__].usingClientEntryPoint = false;
} catch (_) {
}
if (isReact18 && createRoot) {
  copyRender = function(app, container) {
    var root = createRoot(container);
    root.render(app);
    var originUnmount = root.unmount;
    root.unmount = function() {
      setTimeout(originUnmount);
    };
    return root;
  };
} else {
  copyRender = function(app, container) {
    CopyReactDOM.render(app, container);
    return {
      render: function(app2) {
        CopyReactDOM.render(app2, container);
      },
      unmount: function() {
        CopyReactDOM.unmountComponentAtNode(container);
      }
    };
  };
}
var render = copyRender;
exports.render = render;
//# sourceMappingURL=react-dom.js.map
