define(function(){"use strict";var requireCss={normalize:function(name,normalize){return".css"===name.substr(name.length-4,4)&&(name=name.substr(0,name.length-4)),normalize(name)}},importedCss=[];return requireCss.load=function(cssId,req,load,config){if(window.noRequireCss)load();else{var srch="/require/requirecss",index=cssId.indexOf(srch);-1!==index&&(cssId="css"+cssId.substring(index+srch.length));var url=cssId+".css";if(url.includes("://")||(url=config.baseUrl+url),function(url){return importedCss.includes(url)}(url))load();else{var linkUrl=url;config.urlArgs&&(linkUrl+=config.urlArgs(cssId,url)),importedCss.push(url);var link=document.createElement("link");link.setAttribute("rel","stylesheet"),link.setAttribute("type","text/css"),link.onload=load,link.setAttribute("href",linkUrl);try{document.head.appendChild(link)}catch(err){console.log("Error loading stylesheet"),load()}}}},requireCss});