1/* 2 Picturefill - Responsive Images that work today. 3 Author: Scott Jehl, Filament Group, 2012 ( new proposal implemented by Shawn Jansepar ) 4 License: MIT/GPLv2 5 Spec: http://picture.responsiveimages.org/ 6*/ 7(function(h,m,n){function l(a){var c=a||{};a=c.elements||b.getAllElements();for(var e=0,f=a.length;e<f;e++){var d=a[e];var g=d.parentNode;d[b.ns]||(d[b.ns]={});if(c.reevaluate||!d[b.ns].evaluated){if("PICTURE"===g.nodeName.toUpperCase()){b.removeVideoShim(g);var k=b.getMatch(d,g);if(!1===k)continue}else k=void 0;("PICTURE"===g.nodeName.toUpperCase()||d.srcset&&!b.srcsetSupported||!b.sizesSupported&&d.srcset&&-1<d.srcset.indexOf("w"))&&b.dodgeSrcset(d);k?(g=b.processSourceSet(k),b.applyBestCandidate(g, 8d)):(g=b.processSourceSet(d),(void 0===d.srcset||d[b.ns].srcset)&&b.applyBestCandidate(g,d));d[b.ns].evaluated=!0}}}if(h.HTMLPictureElement)h.picturefill=function(){};else{m.createElement("picture");var b={ns:"picturefill"};b.srcsetSupported="srcset"in n;b.sizesSupported="sizes"in n;b.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")};b.endsWith=function(a,c){return a.endsWith?a.endsWith(c):-1!==a.indexOf(c,a.length-c.length)};b.restrictsMixedContent=function(){return"https:"===h.location.protocol}; 9b.matchesMedia=function(a){return h.matchMedia&&h.matchMedia(a).matches};b.getDpr=function(){return h.devicePixelRatio||1};b.getWidthFromLength=function(a){a=a&&!1===-1<a.indexOf("%")&&(0<parseFloat(a)||-1<a.indexOf("calc("))?a:"100vw";a=a.replace("vw","%");b.lengthEl||(b.lengthEl=m.createElement("div"),m.documentElement.insertBefore(b.lengthEl,m.documentElement.firstChild));b.lengthEl.style.cssText="position: absolute; left: 0; width: "+a+";";b.lengthEl.className="helper-from-picturefill-js";0>= 10b.lengthEl.offsetWidth&&(b.lengthEl.style.cssText="width: 100%;");return b.lengthEl.offsetWidth};b.types={};b.types["image/jpeg"]=!0;b.types["image/gif"]=!0;b.types["image/png"]=!0;b.types["image/svg+xml"]=m.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");b.types["image/webp"]=function(){n.onerror=function(){b.types["image/webp"]=!1;l()};n.onload=function(){b.types["image/webp"]=1===n.width;l()};n.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA\x3d"}; 11b.verifyTypeSupport=function(a){a=a.getAttribute("type");return null===a||""===a?!0:"function"===typeof b.types[a]?(b.types[a](),"pending"):b.types[a]};b.parseSize=function(a){a=/(\([^)]+\))?\s*(.+)/g.exec(a);return{media:a&&a[1],length:a&&a[2]}};b.findWidthFromSourceSize=function(a){a=b.trim(a).split(/\s*,\s*/);for(var c,e=0,f=a.length;e<f;e++){var d=b.parseSize(a[e]),g=d.length;d=d.media;if(g&&(!d||b.matchesMedia(d))){c=g;break}}return b.getWidthFromLength(c)};b.parseSrcset=function(a){for(var c= 12[];""!==a;){a=a.replace(/^\s+/g,"");var e=a.search(/\s/g),f=null;if(-1!==e){var d=a.slice(0,e);if(","===d.slice(-1)||""===d)d=d.replace(/,+$/,""),f="";a=a.slice(e+1);null===f&&(e=a.indexOf(","),-1!==e?(f=a.slice(0,e),a=a.slice(e+1)):(f=a,a=""))}else d=a,a="";(d||f)&&c.push({url:d,descriptor:f})}return c};b.parseDescriptor=function(a,c){c=c||"100vw";var e=a&&a.replace(/(^\s+|\s+$)/g,"");a=b.findWidthFromSourceSize(c);if(e)for(c=e.split(" "),e=c.length+1;0<=e;e--)if(void 0!==c[e]){var f=c[e],d=f&&f.slice(f.length- 131);if("h"!==d&&"w"!==d||b.sizesSupported)"x"===d&&(g=(g=f&&parseFloat(f,10))&&!isNaN(g)?g:1);else var g=parseFloat(parseInt(f,10)/a)}return g||1};b.getCandidatesFromSourceSet=function(a,c){a=b.parseSrcset(a);for(var e=[],f=0,d=a.length;f<d;f++){var g=a[f];e.push({url:g.url,resolution:b.parseDescriptor(g.descriptor,c)})}return e};b.dodgeSrcset=function(a){a.srcset&&(a[b.ns].srcset=a.srcset,a.removeAttribute("srcset"))};b.processSourceSet=function(a){var c=a.getAttribute("srcset"),e=a.getAttribute("sizes"), 14f=[];"IMG"===a.nodeName.toUpperCase()&&a[b.ns]&&a[b.ns].srcset&&(c=a[b.ns].srcset);c&&(f=b.getCandidatesFromSourceSet(c,e));return f};b.applyBestCandidate=function(a,c){a.sort(b.ascendingSort);var e=a.length;var f=a[e-1];for(var d=0;d<e;d++){var g=a[d];if(g.resolution>=b.getDpr()){f=g;break}}f&&!b.endsWith(c.src,f.url)&&(b.restrictsMixedContent()&&"http:"===f.url.substr(0,5).toLowerCase()?console.warn("Blocked mixed content image "+f.url):(c.src=f.url,c.currentSrc=c.src))};b.ascendingSort=function(a, 15c){return a.resolution-c.resolution};b.removeVideoShim=function(a){var c=a.getElementsByTagName("video");if(c.length){c=c[0];for(var e=c.getElementsByTagName("source");e.length;)a.insertBefore(e[0],c);c.parentNode.removeChild(c)}};b.getAllElements=function(){for(var a=[],c=m.getElementsByTagName("img"),e=0,f=c.length;e<f;e++){var d=c[e];("PICTURE"===d.parentNode.nodeName.toUpperCase()||null!==d.getAttribute("srcset")||d[b.ns]&&null!==d[b.ns].srcset)&&a.push(d)}return a};b.getMatch=function(a,c){c= 16c.childNodes;for(var e,f=0,d=c.length;f<d;f++){var g=c[f];if(1===g.nodeType){if(g===a)break;
16if("SOURCE"===g.nodeName.toUpperCase()){null!==g.getAttribute("src")&&console.warn("The `src` attribute is invalid on `picture` `source` element; instead, use `srcset`.");var k=g.getAttribute("media");if(g.getAttribute("srcset")&&(!k||b.matchesMedia(k)))if(k=b.verifyTypeSupport(g),!0===k){e=g;break}else if("pending"===k)return!1}}}return e};(function(){function a(){if(!h._picturefillWorking){h._picturefillWorking= 17!0;h.clearTimeout(e);var e=h.setTimeout(function(){l({reevaluate:!0});h._picturefillWorking=!1},60)}}l();var c=setInterval(function(){l();/^loaded|^i|^c/.test(m.readyState)&&clearInterval(c)},250);h.addEventListener?h.addEventListener("resize",a,!1):h.attachEvent&&h.attachEvent("onresize",a)})();l._=b;"object"===typeof module&&"object"===typeof module.exports?module.exports=l:"function"===typeof define&&define.amd?define(function(){return l}):"object"===typeof h&&(h.picturefill=l)}})(this,this.document, 18new this.Image);document.createElement("picture");$("document").ready(function(){picturefill()});
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.