def combine_source_maps(first, second)
      return second unless first

      _first  = decode_source_map(first)
      _second = decode_source_map(second)

      new_mappings = []

      _second[:mappings].each do |m|
        first_line = bsearch_mappings(_first[:mappings], m[:original])
        new_mappings << first_line.merge(generated: m[:generated]) if first_line
      end

      _first[:mappings] = new_mappings

      encode_source_map(_first)
    end
def combine_source_maps(first, second)
      return second unless first

      _first  = decode_source_map(first)
      _second = decode_source_map(second)

      new_mappings = []

      _second[:mappings].each do |m|
        first_line = bsearch_mappings(_first[:mappings], m[:original])
        new_mappings << first_line.merge(generated: m[:generated]) if first_line
      end

      _first[:mappings] = new_mappings

      encode_source_map(_first)
    end
Public: Combine two seperate source map transformations into a single
 mapping.

 Source transformations may happen in discrete steps producing separate
 source maps. These steps can be combined into a single mapping back to
 the source.

 For an example, CoffeeScript may transform a file producing a map. Then
 Uglifier processes the result and produces another map. The CoffeeScript
 map can be combined with the Uglifier map so the source lines of the
 minified output can be traced back to the original CoffeeScript file.

 Returns a source map hash.