/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
function n(n){const t=[];return function*(){yield*t;let e,l=t.length;for(;!(e=n.next()).done;)for(t.push(e.value),yield e.value;++l<t.length;)yield t[l]}}const t=Object.freeze({done:!0,value:void 0});function e(n){const e=[];let l=null,o=null,u=!1;async function r(){if(u)return t;if(null!=o)return o;o=n.next();try{const n=await o;return o=null,n.done?(u=!0,t):(e.push(n.value),n)}catch(r){throw u=!0,o=null,l=r,r}}return async function*(){yield*e;let n,t=e.length;for(;!(n=await r()).done;)for(yield n.value;++t<e.length;)yield e[t];if(null!=l)throw l}}function l(n,t){for(const e of n)if(null!=e&&t(e))return e}function o(n){return null!=n&&"function"==typeof n[Symbol.iterator]}function u(n){return n.done?void 0:n.value}export{n as cache,e as cacheAsync,l as find,u as getYieldedValue,o as isIterable};
