{"version":3,"file":"swapInPlace-IOnMIay9.cjs","names":[],"sources":["../src/internal/swapInPlace.ts"],"sourcesContent":["/**\n * An efficient hack to swap the values at two indices in an array *in-place*.\n */\nexport function swapInPlace(\n  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types -- Intentional\n  data: unknown[],\n  i: number,\n  j: number,\n): void {\n  // We use destructuring to perform an in-place swap *without* needing a\n  // temporary variable\n  [data[i], data[j]] = [data[j], data[i]];\n}\n"],"mappings":"AAGA,SAAgB,EAEd,EACA,EACA,EACM,CAGN,CAAC,EAAK,GAAI,EAAK,IAAM,CAAC,EAAK,GAAI,EAAK,GAAG"}