"use strict";var_typeof=typeofSymbol==="function"&&typeofSymbol.iterator==="symbol"?function(obj){returntypeofobj}:function(obj){returnobj&&typeofSymbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeofobj};function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function")}}(function(f){if((typeofexports==="undefined"?"undefined":_typeof(exports))==="object"&&typeofmodule!=="undefined"){module.exports=f()}elseif(typeofdefine==="function"&&define.amd){define([],f)}else{varg;if(typeofwindow!=="undefined"){g=window}elseif(typeofglobal!=="undefined"){g=global}elseif(typeofself!=="undefined"){g=self}else{g=this}g.isEq=f()}})(function(){vardefine,module,exports;returnfunction(){functionr(e,n,t){functiono(i,f){if(!n[i]){if(!e[i]){varc="function"==typeofrequire&&require;if(!f&&c)returnc(i,!0);if(u)returnu(i,!0);vara=newError("Cannot find module '"+i+"'");throwa.code="MODULE_NOT_FOUND",a}varp=n[i]={exports:{}};e[i][0].call(p.exports,function(r){varn=e[i][1][r];returno(n||r)},p,p.exports,r,e,n,t)}returnn[i].exports}for(varu="function"==typeofrequire&&require,i=0;i<t.length;i++){o(t[i])}returno}returnr}()({1:[function(require,module,exports){module.exports=require("../src/InfiniteList");module.exports.InfiniteListItem=require("../src/InfiniteListItem")},{"../src/InfiniteList":2,"../src/InfiniteListItem":3}],2:[function(require,module,exports){var_require=require("../utils"),isNonZeroFalsy=_require.isNonZeroFalsy,stringify=_require.stringify,areNumbers=_require.areNumbers;varInfiniteListItem=require("./InfiniteListItem");varhandler={get:functionget(obj,key){if(keyinobj)returnobj[key];varindex=typeofkey==="string"&&/^\d*$/g.test(key)?parseInt(key):undefined;if(index)returnobj["get"](index)},has:functionhas(obj,key){varindex=typeofkey==="string"&&/^\d*$/g.test(key)?parseInt(key):undefined;returnkeyinobj||areNumbers(index)&&index%1===0&&index>=0},enumerate:functionenumerate(obj){returnObject.keys(obj)},ownKeys:functionownKeys(obj){returnObject.keys(obj)}};varInfiniteList=functionInfiniteList(start,next){_classCallCheck(this,InfiniteList);this.__start__=start;this.__next__=next;this.__cache__=[];if(typeofProxy!=="undefined")returnnewProxy(this,handler)};if(typeofSymbol!=="undefined"&&Symbol.iterator){InfiniteList.prototype[Symbol.iterator]=function(){var_this=this;varj=0;return{next:functionnext(){return{value:_this.get(j++),done:false}}}}}InfiniteList.prototype.get=function(index){if(isNonZeroFalsy(index)||index<0||!areNumbers(index))return;varstart=this.__start__;varnext=this.__next__;varcache=this.__cache__;if(!cache[0])cache[0]=start;if(index===Infinity)returnnewInfiniteListItem(this,Infinity,Infinity);if(indexincache)returnnewInfiniteListItem(this,cache[index],index);if(!(indexincache)){if(cache.length<=index&&cache.length-1incache)while(cache.length<=index){cache[cache.length]=next(cache[cache.length-1],cache[cache.length-2])}}returnnewInfiniteListItem(this,cache[index],index)};InfiniteList.prototype.clearCache=function(){this.__cache__=[]};InfiniteList.prototype.take=function(from,to){vararr=[];if(isNonZeroFalsy(from)||from===0&&isNonZeroFalsy(to)||!areNumbers(from)&&isNonZeroFalsy(to))returnarr;varsource=void0,target=void0;if(isNonZeroFalsy(to)){source=0;target=from}else{source=from;target=to+1}for(vari=source;i<target;i++){arr.push(this.get(i))}returnarr};InfiniteList.prototype.top=function(){returnthis.get(0)};InfiniteList.prototype.end=function(){returnthis.get(Infinity)};InfiniteList.prototype.toString=function(){varlength=_typeof(this.first())==="object"?2:5;return["InfiniteList [",this.take(length).map(function(x){return" "+stringify(x.value)})+",","... ]"].join(" ")};InfiniteList.prototype.first=InfiniteList.prototype.top;InfiniteList.prototype.last=InfiniteList.prototype.end;module.exports=InfiniteList},{"../utils":5,"./InfiniteListItem":3}],3:[function(require,module,exports){var_this3=this;var_require2=require("../utils"),s