1(function(){ 2 //fordÃtatlan JS 3 4 //configure systemjs 5 var loaderConfiguration = document.querySelector("script[data-name='portal:loaderConfiguration']").text; 6 SystemJS.config(JSON.parse(loaderConfiguration)); 7 8 //register clientData module 9 var clientData = document.querySelector("script[data-name='portal:clientData']").text; 10 SystemJS.set("clientData", SystemJS.newModule({default: JSON.parse(clientData)})); 11 12 //domReady 13 var domReady = new Promise(function(resolve) { 14 if (document.readyState === "interactive" || document.readyState === "complete") { 15 resolve(); 16 return; 17 } 18 document.addEventListener("DOMContentLoaded", function load() { 19 document.removeEventListener("DOMContentLoaded", load, false); 20 resolve(); 21 }); 22 }); 23 24 //inline require support 25 window.require = function() { 26 var args = Array.from(arguments); 27 domReady.then(function() { 28 SystemJS.amdRequire.apply(SystemJS, args); 29 }); 30 }; 31 32 //autoload 33 var autoloadProm = domReady.then(function() { 34 var autoLoadModulesString = document.querySelector("meta[name='portal:autoLoadModules']").getAttribute("content"); 35 if (!autoLoadModulesString) return; 36 37 var autoloadModules = JSON.parse(autoLoadModulesString) || []; 38 return Promise.all(autoloadModules.map(function(m) { 39 return SystemJS.import(m); 40 })); 41 }); 42 43 44 //bootstrap portal 45 var bootstrapPortalProm = domReady.then(function() { 46 return SystemJS.import("portal"); 47 }).then(function(mod) { 48 return mod.bootstrap(); 49 }).catch(function(err) { 50 console.error(err); 51 }); 52 53 //finish loading notification 54 function doneLoading() { 55 document.documentElement.classList.remove("loading"); 56 } 57 58 window.portalReady = Promise.all([bootstrapPortalProm, autoloadProm]).then(doneLoading, doneLoading); 59})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.