Luminosity–duration relation of fast radio bursts