/* global
	global, document, demand, provide, queue, processor, settings, setTimeout, clearTimeout, storage,
	regexMatchSourcemap, regexIsAbsoluteUri
	linkElement
*/

//=require variables.js
//=require shortcuts.js

function functionResolveSourcemaps(url, source) {
	var match, replacement;
	
	console.log('> ', url);
	
	while(match = regexMatchSourcemap.exec(source)) {
		linkElement.href = url;
		
		if(regexIsAbsoluteUri.test(match[2])) {
			replacement = linkElement.protocol + '//' + linkElement.host + match[2];
		} else {
			linkElement.pathname += '/../' + match[2];
			
			replacement = linkElement.protocol + '//' + linkElement.host + linkElement.pathname;
		}
		
		console.log('=>', match[0], match[1] + ' sourceMappingURL=' + replacement + '.map' + (match[3] ? ' ' + match[3] : ''));
		
		source = source.replace(match[0], match[1] + ' sourceMappingURL=' + replacement + '.map ' + match[3]);
	}
	
	return source;
}
@@ -290,35 +290,8 @@
 ;%0A%09%0A
-%09console.log('%3E ', url);%0A%09%0A
 %09whi
@@ -644,133 +644,8 @@
 %0A%09%09%0A
-%09%09console.log('=%3E', match%5B0%5D, match%5B1%5D + ' sourceMappingURL=' + replacement + '.map' + (match%5B3%5D ? ' ' + match%5B3%5D : ''));%0A%09%09%0A
 %09%09so

remove leftover console.log