1<!doctype html> 2<html lang="en"> 3 <head> 4 <meta charset="UTF-8" /> 5 <link rel="icon" type="image/svg+xml" href="/vite.svg" /> 6 <meta name="generator" content="Hostinger Horizons" /> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 8 <title></title> 9
9<script type="module" crossorigin src="/assets/index-DwwikXIZ.js"></script>
9 10 <link rel="stylesheet" crossorigin href="/assets/index-Dz7K6nML.css"> 11
11<script type="module"> 12window.onerror = (message, source, lineno, colno, errorObj) => { 13 const errorDetails = errorObj ? JSON.stringify({ 14 name: errorObj.name, 15 message: errorObj.message, 16 stack: errorObj.stack, 17 source, 18 lineno, 19 colno, 20 }) : null; 21 22 window.parent.postMessage({ 23 type: 'horizons-runtime-error', 24 message, 25 error: errorDetails 26 }, '*'); 27}; 28</script>
28 29
29<script type="module"> 30const observer = new MutationObserver((mutations) => { 31 for (const mutation of mutations) { 32 for (const addedNode of mutation.addedNodes) { 33 if ( 34 addedNode.nodeType === Node.ELEMENT_NODE && 35 ( 36 addedNode.tagName?.toLowerCase() === 'vite-error-overlay' || 37 addedNode.classList?.contains('backdrop') 38 ) 39 ) { 40 handleViteOverlay(addedNode); 41 } 42 } 43 } 44}); 45 46observer.observe(document.documentElement, { 47 childList: true, 48 subtree: true 49}); 50 51function handleViteOverlay(node) { 52 if (!node.shadowRoot) { 53 return; 54 } 55 56 const backdrop = node.shadowRoot.querySelector('.backdrop'); 57 58 if (backdrop) { 59 const overlayHtml = backdrop.outerHTML; 60 const parser = new DOMParser(); 61 const doc = parser.parseFromString(overlayHtml, 'text/html'); 62 const messageBodyElement = doc.querySelector('.message-body'); 63 const fileElement = doc.querySelector('.file'); 64 const messageText = messageBodyElement ? messageBodyElement.textContent.trim() : ''; 65 const fileText = fileElement ? fileElement.textContent.trim() : ''; 66 const error = messageText + (fileText ? ' File:' + fileText : ''); 67 68 window.parent.postMessage({ 69 type: 'horizons-vite-error', 70 error, 71 }, '*'); 72 } 73} 74</script>
74 75
75<script type="module"> 76const originalConsoleError = console.error; 77const MATCH_LINE_COL_REGEX = /:(\d+):(\d+)\)?\s*$/; // regex to match the :lineNum:colNum 78const MATCH_AT_REGEX = /^\s*at\s+(?:async\s+)?(?:.*?\s+)?\(?/; // regex to remove the 'at' keyword and any 'async' or function name 79const MATCH_PATH_REGEX = /^\//; // regex to remove the leading slash 80 81function parseStackFrameLine(line) { 82 const lineColMatch = line.match(MATCH_LINE_COL_REGEX); 83 if (!lineColMatch) return null; 84 const [, lineNum, colNum] = lineColMatch; 85 const suffix = `:${lineNum}:${colNum}`; 86 const idx = line.lastIndexOf(suffix); 87 if (idx === -1) return null; 88 const before = line.substring(0, idx); 89 const path = before.replace(MATCH_AT_REGEX, '').trim(); 90 91 if (!path) return null; 92 93 try { 94 const pathname = new URL(path).pathname; 95 const filePath = pathname.replace(MATCH_PATH_REGEX, '') || pathname; 96 return `${filePath}:${lineNum}:${colNum}`; 97 } catch (e) { 98 const filePath = path.replace(MATCH_PATH_REGEX, '') || path; 99 return `${filePath}:${lineNum}:${colNum}`; 100 } 101} 102 103function getFilePathFromStack(stack, skipFrames = 0) { 104 if (!stack || typeof stack !== 'string') return null; 105 const lines = stack.split('\n').slice(1); 106 107 const frames = lines.map(line => parseStackFrameLine(line.replace(/\r$/, ''))).filter(Boolean); 108 109 return frames[skipFrames] ?? null; 110} 111 112console.error = function(...args) { 113 originalConsoleError.apply(console, args); 114 115 let errorString = ''; 116 let filePath = null; 117 118 for (let i = 0; i < args.length; i++) { 119 const arg = args[i]; 120 if (arg instanceof Error) { 121 filePath = getFilePathFromStack(arg.stack, 0); 122 errorString = `${arg.name}: ${arg.message}`; 123 if (filePath) { 124 errorString = `${errorString} at ${filePath}`; 125 } 126 break; 127 } 128 } 129 130 if (!errorString) { 131 errorString = args.map(arg => typeof arg === 'object' ? JSON.stringify(arg) : String(arg)).join(' '); 132 const stack = new Error().stack; 133 filePath = getFilePathFromStack(stack, 1); 134 if (filePath) { 135 errorString = `${errorString} at ${filePath}`; 136 } 137 } 138 139 window.parent.postMessage({ 140 type: 'horizons-console-error', 141 error: errorString 142 }, '*'); 143}; 144</script>
144 145
145<script type="module"> 146const originalFetch = window.fetch; 147 148window.fetch = function(...args) { 149 const url = args[0] instanceof Request ? args[0].url : args[0]; 150 151 // Skip WebSocket URLs 152 if (url.startsWith('ws:') || url.startsWith('wss:')) { 153 return originalFetch.apply(this, args); 154 } 155 156 return originalFetch.apply(this, args) 157 .then(async response => { 158 const contentType = response.headers.get('Content-Type') || ''; 159 160 // Exclude HTML document responses 161 const isDocumentResponse = 162 contentType.includes('text/html') || 163 contentType.includes('application/xhtml+xml'); 164 165 if (!response.ok && !isDocumentResponse) { 166 const responseClone = response.clone(); 167 const errorFromRes = await responseClone.text(); 168 const requestUrl = response.url; 169 console.error(`Fetch error from ${requestUrl}: ${errorFromRes}`); 170 } 171 172 return response; 173 }) 174 .catch(error => { 175 if (!url.match(/.html?$/i)) { 176 console.error(error); 177 } 178 179 throw error; 180 }); 181}; 182</script>
182 183
183<script type="module"> 184if (window.navigation && window.self !== window.top) { 185 window.navigation.addEventListener('navigate', (event) => { 186 const url = event.destination.url; 187 188 try { 189 const destinationUrl = new URL(url); 190 const destinationOrigin = destinationUrl.origin; 191 const currentOrigin = window.location.origin; 192 193 if (destinationOrigin === currentOrigin) { 194 return; 195 } 196 } catch (error) { 197 return; 198 } 199 200 window.parent.postMessage({ 201 type: 'horizons-navigation-error', 202 url, 203 }, '*'); 204 }); 205} 206</script>
206 207 </head> 208 <body> 209 <div id="root"></div> 210 </body> 211</html>
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.