function_toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)returninput;varprim=input[Symbol.toPrimitive];if(prim!==undefined){varres=prim.call(input,hint||"default");if(_typeof(res)!=="object")returnres;thrownewTypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}