1 2/*jshint 3 asi: true, 4 unused: true, 5 boss: true, 6 loopfunc: true, 7 eqnull: true 8 */ 9 10 11/*! 12 * Legacy browser support 13 */ 14 15 16// Map array support 17if ( ![].map ) { 18 Array.prototype.map = function ( callback, self ) { 19 var array = this, len = array.length, newArray = new Array( len ) 20 for ( var i = 0; i < len; i++ ) { 21 if ( i in array ) { 22 newArray[ i ] = callback.call( self, array[ i ], i, array ) 23 } 24 } 25 return newArray 26 } 27} 28 29 30// Filter array support 31if ( ![].filter ) { 32 Array.prototype.filter = function( callback ) { 33 if ( this == null ) throw new TypeError() 34 var t = Object( this ), len = t.length >>> 0 35 if ( typeof callback != 'function' ) throw new TypeError() 36 var newArray = [], thisp = arguments[ 1 ] 37 for ( var i = 0; i < len; i++ ) { 38 if ( i in t ) { 39 var val = t[ i ] 40 if ( callback.call( thisp, val, i, t ) ) newArray.push( val ) 41 } 42 } 43 return newArray 44 } 45} 46 47 48// Index of array support 49if ( ![].indexOf ) { 50 Array.prototype.indexOf = function( searchElement ) { 51 if ( this == null ) throw new TypeError() 52 var t = Object( this ), len = t.length >>> 0 53 if ( len === 0 ) return -1 54 var n = 0 55 if ( arguments.length > 1 ) { 56 n = Number( arguments[ 1 ] ) 57 if ( n != n ) { 58 n = 0 59 } 60 else if ( n !== 0 && n != Infinity && n != -Infinity ) { 61 n = ( n > 0 || -1 ) * Math.floor( Math.abs( n ) ) 62 } 63 } 64 if ( n >= len ) return -1 65 var k = n >= 0 ? n : Math.max( len - Math.abs( n ), 0 ) 66 for ( ; k < len; k++ ) { 67 if ( k in t && t[ k ] === searchElement ) return k 68 } 69 return -1 70 } 71} 72 73 74/*! 75 * Cross-Browser Split 1.1.1 76 * Copyright 2007-2012 Steven Levithan <stevenlevithan.com> 77 * Available under the MIT License 78 * http://blog.stevenlevithan.com/archives/cross-browser-split 79 */ 80var nativeSplit = String.prototype.split, compliantExecNpcg = /()??/.exec('')[1] === undefined 81String.prototype.split = function(separator, limit) { 82 var str = this 83 if (Object.prototype.toString.call(separator) !== '[object RegExp]') { 84 return nativeSplit.call(str, separator, limit) 85 } 86 var output = [], 87 flags = (separator.ignoreCase ? 'i' : '') + 88 (separator.multiline ? 'm' : '') + 89 (separator.extended ? 'x' : '') + 90 (separator.sticky ? 'y' : ''), 91 lastLastIndex = 0, 92 separator2, match, lastIndex, lastLength 93 separator = new RegExp(separator.source, flags + 'g') 94 str += '' 95 if (!compliantExecNpcg) { 96 separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags) 97 } 98 limit = limit === undefined ? -1 >>> 0 : limit >>> 0 99 while (match = separator.exec(str)) { 100 lastIndex = match.index + match[0].length 101 if (lastIndex > lastLastIndex) { 102 output.push(str.slice(lastLastIndex, match.index)) 103 if (!compliantExecNpcg && match.length > 1) { 104 match[0].replace(separator2, function () { 105 for (var i = 1; i < arguments.length - 2; i++) { 106 if (arguments[i] === undefined) { 107 match[i] = undefined 108 } 109 } 110 }) 111 } 112 if (match.length > 1 && match.index < str.length) { 113 Array.prototype.push.apply(output, match.slice(1)) 114 } 115 lastLength = match[0].length 116 lastLastIndex = lastIndex 117 if (output.length >= limit) { 118 break 119 } 120 } 121 if (separator.lastIndex === match.index) { 122 separator.lastIndex++ 123 } 124 } 125 if (lastLastIndex === str.length) { 126 if (lastLength || !separator.test('')) { 127 output.push('') 128 } 129 } else { 130 output.push(str.slice(lastLastIndex)) 131 } 132 return output.length > limit ? output.slice(0, limit) : output 133};
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.