How it works
Each option runs as a separate pass over the lines, in order: trim, remove
blanks, deduplicate, then sort. Sorting uses Intl.Collator, the browser’s
locale-aware string comparison, which orders accented letters and numbers
the way a person would expect rather than by raw character codes.
Why deduplicate before sorting
Removing duplicates first, while lines are still in their original order, means the line that gets kept is always the first occurrence as it appeared in your input — sorting afterwards only changes where it appears, not which copy survived.
Common uses
Cleaning up a pasted list of emails or URLs, merging two lists while dropping repeats, or turning an unordered list into an alphabetized one for a changelog or reference doc.