import { __exports as c } from "../../../_virtual/use-sync-external-store-shim.development.mjs";
import I from "react";
/**
 * @license React
 * use-sync-external-store-shim.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var p;
function G() {
  return p ? c : (p = 1, process.env.NODE_ENV !== "production" && function() {
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
    var o = I, O = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
    function _(t) {
      {
        for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
          r[n - 1] = arguments[n];
        E("error", t, r);
      }
    }
    function E(t, e, r) {
      {
        var n = O.ReactDebugCurrentFrame, u = n.getStackAddendum();
        u !== "" && (e += "%s", r = r.concat([u]));
        var i = r.map(function(a) {
          return String(a);
        });
        i.unshift("Warning: " + e), Function.prototype.apply.call(console[t], console, i);
      }
    }
    function v(t, e) {
      return t === e && (t !== 0 || 1 / t === 1 / e) || t !== t && e !== e;
    }
    var l = typeof Object.is == "function" ? Object.is : v, h = o.useState, L = o.useEffect, y = o.useLayoutEffect, m = o.useDebugValue, S = !1, d = !1;
    function T(t, e, r) {
      S || o.startTransition !== void 0 && (S = !0, _("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
      var n = e();
      if (!d) {
        var u = e();
        l(n, u) || (_("The result of getSnapshot should be cached to avoid an infinite loop"), d = !0);
      }
      var i = h({
        inst: {
          value: n,
          getSnapshot: e
        }
      }), a = i[0].inst, f = i[1];
      return y(function() {
        a.value = n, a.getSnapshot = e, s(a) && f({
          inst: a
        });
      }, [t, n, e]), L(function() {
        s(a) && f({
          inst: a
        });
        var C = function() {
          s(a) && f({
            inst: a
          });
        };
        return t(C);
      }, [t]), m(n), n;
    }
    function s(t) {
      var e = t.getSnapshot, r = t.value;
      try {
        var n = e();
        return !l(r, n);
      } catch {
        return !0;
      }
    }
    function g(t, e, r) {
      return e();
    }
    var A = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", R = !A, D = R ? g : T, w = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : D;
    c.useSyncExternalStore = w, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
  }(), c);
}
export {
  G as __require
};
