1(() => { 2 // ë¡ëë ì¤í¬ë¦½í¸ë¥¼ ì¶ì íë Set ì¶ê° 3 const loadedScripts = new Set(); 4 5 function loadScripts(scripts, callback) { 6 let $timestamp = document.querySelector('[name="timestamp"]'); 7 const tmstpUrl = $timestamp ? `?timestamp=${$timestamp.value}` : ''; 8 const prefixUrl = new URL(document.location.href).origin; 9 10 let loadedCount = 0; 11 const scriptsToLoad = scripts.filter(src => !loadedScripts.has(src)); 12 13 function onLoad(src) { 14 loadedScripts.add(src); 15 loadedCount++; 16 if (loadedCount === scriptsToLoad.length && callback) { 17 callback(); 18 } 19 } 20 21 if (scriptsToLoad.length === 0) { 22 // 모ë ì¤í¬ë¦½í¸ê° ì´ë¯¸ ë¡ëëìë¤ë©´ ì¦ì ì½ë°± ì¤í 23 if (callback) callback(); 24 return; 25 } 26 27 const fragment = document.createDocumentFragment(); 28 scriptsToLoad.forEach((src) => { 29 const newSrc = `${prefixUrl}/resources/js/queJS/${src}${tmstpUrl}`; 30 31 const script = document.createElement("script"); 32 script.src = newSrc; 33 script.async = true; 34 script.onload = () => onLoad(src); 35 script.onerror = () => console.error(`â¡[queJS] Failed to load script: ${newSrc}`); 36 fragment.appendChild(script); 37 }); 38 document.head.appendChild(fragment); 39 } 40 41 // [exports] 42 const render = function(componentName, callback) { 43 try { 44 const $target = document.querySelector(`[data-que-component="${componentName}"]`); 45 $target.innerHTML = callback; 46 } catch (error) { 47 console.error(`â¡[queJS] Failed to render component: ${componentName} - ${error}`); 48 } 49 } 50 51 // [exports] 52 const init = function(initDependency, finalCallback){ 53 const loadPromises = initDependency.map(script => 54 new Promise((resolve, reject) => { 55 loadScripts([script], resolve); 56 }) 57 ); 58 59 Promise.all(loadPromises).then(finalCallback).catch(error => { 60 console.error("â¡[queJS] Failed to load all scripts:", error); 61 }); 62 } 63 64 // [exports] 65 const initUI = function(uiName, dependency, afterLoad){ 66 window.$QUI[uiName] = window.$QUI[uiName] || {}; 67 window.$QUI[uiName].COMP = window.$QUI[uiName].COMP || {}; 68 69 loadScripts(dependency, afterLoad); 70 } 71 72 // QueJS 기본 ì¤ì 73 const initQueJS = function(){ 74 // Core 75 window.$Que = window.$Que || {}; 76 $Que.render = render; 77 $Que.init = init; 78 $Que.initUI = initUI; 79 80 // UI 81 window.$QUI = window.$QUI || {}; 82 window.$QUI.Misc = window.$QUI.Misc || {}; 83 window.$QUI.Misc.COMP = window.$QUI.Misc.COMP || {}; 84 85 // Function 86 window.$QFn = window.$QFn || {}; 87 } 88 89 initQueJS(); // ì´ê¸°í ì¤í 90})();
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.