'use strict';varGetIntrinsic=require('../GetIntrinsic');var$RangeError=GetIntrinsic('%RangeError%');varToInteger=require('./ToInteger');varToLength=require('./ToLength');varSameValueZero=require('./SameValueZero');// https://www.ecma-international.org/ecma-262/8.0/#sec-toindexmodule.exports=functionToIndex(value){if(typeofvalue==='undefined'){return0;}varintegerIndex=ToInteger(value);if(integerIndex<0){thrownew$RangeError('index must be >= 0');}varindex=ToLength(integerIndex);if(!SameValueZero(integerIndex,index)){thrownew$RangeError('index must be >= 0 and < 2 ** 53 - 1');}returnindex;};