import {
  deepCompare
} from "./chunk-DEX5RLI7.mjs";

// src/sdk/common/rxjs/distinct-unique-key.operator.ts
import { distinctUntilKeyChanged, pluck, map } from "rxjs/operators";
function distinctUniqueKey(key) {
  return (input$) => input$.pipe(
    map((value) => {
      return value ? value : { [key]: null };
    }),
    distinctUntilKeyChanged(key, deepCompare),
    pluck(key)
  );
}

export {
  distinctUniqueKey
};
//# sourceMappingURL=chunk-ODRW3VKY.mjs.map