1const isOldIE = typeof navigator !== 'undefined' && 2 /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()); 3function createInjector(context) { 4 return (id, style) => addStyle(id, style); 5} 6let HEAD; 7const styles = {}; 8function addStyle(id, css) { 9 const group = isOldIE ? css.media || 'default' : id; 10 const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] }); 11 if (!style.ids.has(id)) { 12 style.ids.add(id); 13 let code = css.source; 14 if (css.map) { 15 // https://developer.chrome.com/devtools/docs/javascript-debugging 16 // this makes source maps inside style tags work properly in Chrome 17 code += '\n/*# sourceURL=' + css.map.sources[0] + ' */'; 18 // http://stackoverflow.com/a/26603875 19 code += 20 '\n/*# sourceMappingURL=data:application/json;base64,' + 21 btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) + 22 ' */'; 23 } 24 if (!style.element) { 25 style.element = document.createElement('style'); 26 style.element.type = 'text/css'; 27 if (css.media) 28 style.element.setAttribute('media', css.media); 29 if (HEAD === undefined) { 30 HEAD = document.head || document.getElementsByTagName('head')[0]; 31 } 32 HEAD.appendChild(style.element); 33 } 34 if ('styleSheet' in style.element) { 35 style.styles.push(code); 36 style.element.styleSheet.cssText = style.styles 37 .filter(Boolean) 38 .join('\n'); 39 } 40 else { 41 const index = style.ids.size - 1; 42 const textNode = document.createTextNode(code); 43 const nodes = style.element.childNodes; 44 if (nodes[index]) 45 style.element.removeChild(nodes[index]); 46 if (nodes.length) 47 style.element.insertBefore(textNode, nodes[index]); 48 else 49 style.element.appendChild(textNode); 50 } 51 } 52} 53 54export { createInjector as _ }; 55//# sourceMappingURL=browser-e4cbaf23.js.map
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.