UNPKG

@nethesis/phone-island

Version:
12 lines (11 loc) 2.57 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/use-sync-external-store-shim.development.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n,r=t(require("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. */exports.__require=function(){return n||(n=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=r.default,n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function o(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];!function(e,t,r){var o=n.ReactDebugCurrentFrame.getStackAddendum();""!==o&&(t+="%s",r=r.concat([o]));var u=r.map((function(e){return String(e)}));u.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,u)}("error",e,r)}var u="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=t.useState,_=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue,c=!1,l=!1;function f(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!u(n,r)}catch(e){return!0}}var O=!!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?function(e,t,n){return t()}:function(e,n,r){c||void 0!==t.startTransition&&(c=!0,o("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 O=n();if(!l){var d=n();u(O,d)||(o("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}var p=a({inst:{value:O,getSnapshot:n}}),E=p[0].inst,S=p[1];return i((function(){E.value=O,E.getSnapshot=n,f(E)&&S({inst:E})}),[e,O,n]),_((function(){f(E)&&S({inst:E});return e((function(){f(E)&&S({inst:E})}))}),[e]),s(O),O},d=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:O;e.__exports.useSyncExternalStore=d,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),e.__exports}; //# sourceMappingURL=use-sync-external-store-shim.development.js.map