/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/react-promise-suspense@0.3.4/build/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var __values=this&&this.__values||function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],o=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=this&&this.__read||function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var o,n,i=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(r){n={error:r}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(n)throw n.error}}return a},__spreadArray=this&&this.__spreadArray||function(r,e,t){if(t||2===arguments.length)for(var o,n=0,i=e.length;n<i;n++)!o&&n in e||(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return r.concat(o||Array.prototype.slice.call(e))},deepEqual=require("fast-deep-equal"),promiseCaches=[],usePromise=function(r,e,t){var o,n;void 0===t&&(t=0);try{for(var i=__values(promiseCaches),a=i.next();!a.done;a=i.next()){var s=a.value;if(deepEqual(e,s.inputs)){if(Object.prototype.hasOwnProperty.call(s,"error"))throw s.error;if(Object.prototype.hasOwnProperty.call(s,"response"))return s.response;throw s.promise}}}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}var l={promise:r.apply(void 0,__spreadArray([],__read(e),!1)).then((function(r){l.response=r})).catch((function(r){l.error=r})).then((function(){t>0&&setTimeout((function(){var r=promiseCaches.indexOf(l);-1!==r&&promiseCaches.splice(r,1)}),t)})),inputs:e};throw promiseCaches.push(l),l.promise};module.exports=usePromise;
//# sourceMappingURL=/sm/4d1a76412d72135b339e723d19c14ef4f8ab4b1275784e4584759eda3e88b1df.map