Changeset 0c6b92a for imaps-frontend/node_modules/vite/dist/node/runtime.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/vite/dist/node/runtime.js
rd565449 r0c6b92a 95 95 intToChar[i] = c, charToInt[c] = i; 96 96 } 97 function decode(mappings) { 98 const state = new Int32Array(5), decoded = []; 99 let index = 0; 100 do { 101 const semi = indexOf(mappings, index), line = []; 102 let sorted = !0, lastCol = 0; 103 state[0] = 0; 104 for (let i = index; i < semi; i++) { 105 let seg; 106 i = decodeInteger(mappings, i, state, 0); 107 const col = state[0]; 108 col < lastCol && (sorted = !1), lastCol = col, hasMoreVlq(mappings, i, semi) ? (i = decodeInteger(mappings, i, state, 1), i = decodeInteger(mappings, i, state, 2), i = decodeInteger(mappings, i, state, 3), hasMoreVlq(mappings, i, semi) ? (i = decodeInteger(mappings, i, state, 4), seg = [col, state[1], state[2], state[3], state[4]]) : seg = [col, state[1], state[2], state[3]]) : seg = [col], line.push(seg); 109 } 110 sorted || sort(line), decoded.push(line), index = semi + 1; 111 } while (index <= mappings.length); 112 return decoded; 113 } 114 function indexOf(mappings, index) { 115 const idx = mappings.indexOf(";", index); 116 return idx === -1 ? mappings.length : idx; 117 } 118 function decodeInteger(mappings, pos, state, j) { 97 function decodeInteger(reader, relative) { 119 98 let value = 0, shift = 0, integer = 0; 120 99 do { 121 const c = mappings.charCodeAt(pos++);100 const c = reader.next(); 122 101 integer = charToInt[c], value |= (integer & 31) << shift, shift += 5; 123 102 } while (integer & 32); 124 103 const shouldNegate = value & 1; 125 return value >>>= 1, shouldNegate && (value = -2147483648 | -value), state[j] += value, pos; 126 } 127 function hasMoreVlq(mappings, i, length) { 128 return i >= length ? !1 : mappings.charCodeAt(i) !== comma; 104 return value >>>= 1, shouldNegate && (value = -2147483648 | -value), relative + value; 105 } 106 function hasMoreVlq(reader, max) { 107 return reader.pos >= max ? !1 : reader.peek() !== comma; 108 } 109 class StringReader { 110 constructor(buffer) { 111 this.pos = 0, this.buffer = buffer; 112 } 113 next() { 114 return this.buffer.charCodeAt(this.pos++); 115 } 116 peek() { 117 return this.buffer.charCodeAt(this.pos); 118 } 119 indexOf(char) { 120 const { buffer, pos } = this, idx = buffer.indexOf(char, pos); 121 return idx === -1 ? buffer.length : idx; 122 } 123 } 124 function decode(mappings) { 125 const { length } = mappings, reader = new StringReader(mappings), decoded = []; 126 let genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0; 127 do { 128 const semi = reader.indexOf(";"), line = []; 129 let sorted = !0, lastCol = 0; 130 for (genColumn = 0; reader.pos < semi; ) { 131 let seg; 132 genColumn = decodeInteger(reader, genColumn), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), hasMoreVlq(reader, semi) ? (namesIndex = decodeInteger(reader, namesIndex), seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]) : seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]) : seg = [genColumn], line.push(seg), reader.pos++; 133 } 134 sorted || sort(line), decoded.push(line), reader.pos = semi + 1; 135 } while (reader.pos <= length); 136 return decoded; 129 137 } 130 138 function sort(line) { … … 317 325 if (mod.map) return mod.map; 318 326 if (!mod.meta || !("code" in mod.meta)) return null; 319 const mapString = mod.meta.code.match( 320 VITE_RUNTIME_SOURCEMAPPING_REGEXP 321 )?.[1]; 327 const mapString = VITE_RUNTIME_SOURCEMAPPING_REGEXP.exec(mod.meta.code)?.[1]; 322 328 if (!mapString) return null; 323 329 const baseFile = mod.meta.file || moduleId.split("?")[0];
Note:
See TracChangeset
for help on using the changeset viewer.