var inProgress = {};

$UNIQUE_PREFIX$
// loadScript function to load a script via script tag
__webpack_require__.l = function (url, done, key, chunkId$FETCH_PRIORITY$) {
	if (inProgress[url]) {
		inProgress[url].push(done);
		return;
	}
	var script, needAttach;
	if (key !== undefined) {
		var scripts = document.getElementsByTagName("script");
		for (var i = 0; i < scripts.length; i++) {
			var s = scripts[i];
			if ($UNIQUE_GET_ATTRIBUTE$) {
				script = s;
				break;
			}
		}
	}
	if (!script) {
		needAttach = true;
		script = document.createElement('script');
		$SCRIPT_TYPE$
		$SCRIPT_CHARSET$
		script.timeout = $CHUNK_LOAD_TIMEOUT_IN_SECONDS$;
		if (__webpack_require__.nc) {
			script.setAttribute("nonce", __webpack_require__.nc);
		}
		$UNIQUE_SET_ATTRIBUTE$
		$FETCH_PRIORITY_SET_ATTRIBUTE$
		script.src = $URL$;

		__CROSS_ORIGIN_LOADING_PLACEHOLDER__
	}
	inProgress[url] = [done];
	var onScriptComplete = function (prev, event) {
		script.onerror = script.onload = null;
		clearTimeout(timeout);
		var doneFns = inProgress[url];
		delete inProgress[url];
		script.parentNode && script.parentNode.removeChild(script);
		doneFns &&
			doneFns.forEach(function (fn) {
				return fn(event);
			});
		if (prev) return prev(event);
	};
	var timeout = setTimeout(
		onScriptComplete.bind(null, undefined, {
			type: 'timeout',
			target: script
		}),
		$CHUNK_LOAD_TIMEOUT$
	);
	script.onerror = onScriptComplete.bind(null, script.onerror);
	script.onload = onScriptComplete.bind(null, script.onload);
	needAttach && document.head.appendChild(script);
};
