I fixed it: importing an email that already exists no longer replaces the existing contact's name. All 5 tests pass now.

**The bug** (`merge.mjs:10`): the code counted duplicates correctly, but then called `byEmail.set(key,{...contact})` on every incoming row, including duplicates. So every later duplicate overwrote whatever was stored for that email. That broke two rules: existing contacts should win, and among incoming duplicates the first should win. The counts were still right, which is why the two starter tests passed.

**The fix:** on a duplicate, increment `skipped` and `continue`, so the row is never stored. Only new emails get stored and counted in `added`. The diff is two lines.

**Regression tests added to `merge.test.mjs`:**
1. An existing contact keeps its name and original email text when the import repeats that email with different spacing or case.
2. Mixed incoming duplicates: the first incoming duplicate wins, insertion order is kept, and it checks `added: 2, skipped: 2`.
3. Returned contacts are new objects, and neither input array is changed (compared against a `structuredClone` snapshot).

**What I saw when running `node --test merge.test.mjs`:**
- **Before the fix:** 3 passed, 2 failed. Tests 1 and 2 failed, and the diffs showed the stored contacts replaced by the later rows (`name: 'Imported'`, `'X2'`, `'B2'`). Test 3 passed, so the original code already returned fresh objects and didn't change its inputs.
- **After the fix:** 5 passed, 0 failed.

**From reading the code, not from a test:** order was never actually broken. Calling `Map.set` on a key that's already there keeps its original position, so insertion order came out right even with the bug. The new code never updates an existing key at all, so order stays correct. Fresh objects still come from the `{...c}` and `{...contact}` copies, and nothing writes to the inputs.

The fix doesn't handle shallow copying: nested values inside a contact would still be shared with the input. The contract and the tests don't cover nested values, so I left that as is.

I only changed those two files. No new files or dependencies, and no commits.