From a0ed26df6eb18e0845230d1a6391eb8e7a5e78e6 Mon Sep 17 00:00:00 2001 From: aFarkas Date: Thu, 29 Jan 2015 09:20:06 +0100 Subject: [PATCH] 1.3.0 --- README.md | 2 +- bower.json | 2 +- component.json | 2 +- package.json | 2 +- plugins/intrinsic-dimension/ri.intrinsic.min.js | 2 +- plugins/mutation/ri.mutation.min.js | 2 +- plugins/oldie/ri.oldie.min.js | 2 +- plugins/print/ri.print.min.js | 2 +- plugins/typesupport/ri.type.min.js | 2 +- respimage.js | 2 +- respimage.min.js | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0a9c809..54e0146 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ In case you are dynamically changing relevant attributes (``srcset``, ``sizes``, respimage({elements: [imageElement], reparse: true}); ``` -In case you are either **removing** the ``srcset`` of an ``img`` (not of an ``source``) or do any changes to the ``src`` of an responsive image the additional ``src`` or ``srcset`` option has to be set. +In the unlikely case you want either **remove** the ``srcset`` of an ``img`` (not of an ``source``) or want to directly change the ``src`` of an responsive image the additional ``src`` or ``srcset`` option has to be set (Note: In most cases, you don't want to do that!). ```js diff --git a/bower.json b/bower.json index 9baff7a..af026bd 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "respimage", "repo": "afarkas/respimage", - "version": "1.3.0-RC1", + "version": "1.3.0", "main": "respimage.min.js", "scripts": [ "respimage.min.js" diff --git a/component.json b/component.json index 0ab29fd..299b301 100644 --- a/component.json +++ b/component.json @@ -1,6 +1,6 @@ { "name": "respimage", - "version": "1.3.0-RC1", + "version": "1.3.0", "repo": "afarkas/respimage", "main": "respimage.min.js", "scripts": ["respimage.min.js"], diff --git a/package.json b/package.json index 48248d1..d7bd31b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "respimage", - "version": "1.3.0-RC1", + "version": "1.3.0", "filename": "respimage.min.js", "browser": "respimage.min.js", "scripts": { diff --git a/plugins/intrinsic-dimension/ri.intrinsic.min.js b/plugins/intrinsic-dimension/ri.intrinsic.min.js index 6043e7b..3136687 100644 --- a/plugins/intrinsic-dimension/ri.intrinsic.min.js +++ b/plugins/intrinsic-dimension/ri.intrinsic.min.js @@ -1,3 +1,3 @@ -/*! respimage - v1.3.0-RC1 - 2015-01-27 +/*! respimage - v1.3.0 - 2015-01-29 Licensed MIT */ !function(a){"use strict";var b,c=0,d=function(){window.respimage&&a(window.respimage),(window.respimage||c>9999)&&clearInterval(b),c++};b=setInterval(d,8),d()}(function(a,b){"use strict";var c=a._,d={},e=c.cfg,f="currentSrc",g=function(a,b,c){var d=c.curCan;a&&b.setAttribute("width",parseInt(a/d.res,10))},h=function(a,b,c){var e,h,i;d[a]?g(d[a],b,c):(i=function(){c.pendingURLSize=null,e.onload=null,e.onerror=null,b=null,e=null},c.pendingURLSize=a,h=c.curCan,h.w&&g(h.w,b,c),e=document.createElement("img"),e.onload=function(){d[a]=e.naturalWidth||e.width,a==b[f]&&g(d[a],b,c),i()},e.onerror=i,e.src=a,e&&e.complete&&e.onload())},i=function(){var a,b,d=function(){var d,e,f,g=document.getElementsByTagName("img"),h={elements:[]};for(c.setupRun(h),a=!1,clearTimeout(b),d=0,e=g.length;e>d;d++)f=g[d][c.ns],f&&f.curCan&&(c.setRes.res(f.curCan,f.curCan.set.sizes),c.setSize(g[d]));c.teardownRun(h)};return function(){!a&&e.addSize&&(a=!0,clearTimeout(b),b=setTimeout(d))}}();f in document.createElement("img")||(f="src"),c.setSize=function(a){var d,g=a[c.ns],i=g.curCan;g.dims===b&&(g.dims=a.getAttribute("height")&&a.getAttribute("width")),e.addSize&&i&&!g.dims&&(d=c.makeUrl(i.url),d==a[f]&&d!==g.pendingURLSize&&h(d,a,g))},window.addEventListener&&addEventListener("resize",i,!1),e.addSize="addSize"in e?!!e.addSize:!0,i()}); \ No newline at end of file diff --git a/plugins/mutation/ri.mutation.min.js b/plugins/mutation/ri.mutation.min.js index 120e046..7519f6b 100644 --- a/plugins/mutation/ri.mutation.min.js +++ b/plugins/mutation/ri.mutation.min.js @@ -1,3 +1,3 @@ -/*! respimage - v1.3.0-RC1 - 2015-01-27 +/*! respimage - v1.3.0 - 2015-01-29 Licensed MIT */ !function(a){"use strict";var b,c=0,d=function(){window.respimage&&a(window.respimage),(window.respimage||c>9999)&&clearInterval(b),c++};b=setInterval(d,8),d()}(function(a){"use strict";var b=window.document,c=window.Element,d=window.MutationObserver,e=function(){},f={disconnect:e,take:e,observe:e,start:e,stop:e,connected:!1},g=/^loade|^c|^i/.test(b.readyState||""),h=a._;if(h.mutationSupport=!1,h.observer=f,Object.keys&&window.HTMLSourceElement&&b.addEventListener){var i,j,k,l,m={src:1,srcset:1,sizes:1,media:1},n=Object.keys(m),o={attributes:!0,childList:!0,subtree:!0,attributeFilter:n},p=c&&c.prototype,q={},r=function(a,b){q[a]=h[a],h[a]=b};p&&!p.matches&&(p.matches=p.matchesSelector||p.mozMatchesSelector||p.webkitMatchesSelector||p.msMatchesSelector),p&&p.matches&&(i=function(a,b){return a.matches(b)},h.mutationSupport=!(!Object.create||!Object.defineProperties)),h.mutationSupport&&(f.observe=function(){k&&(f.connected=!0,j&&j.observe(b.documentElement,o))},f.disconnect=function(){f.connected=!1,j&&j.disconnect()},f.take=function(){j?h.onMutations(j.takeRecords()):l&&l.take()},f.start=function(){k=!0,f.observe()},f.stop=function(){k=!1,f.disconnect()},r("setupRun",function(){return f.disconnect(),q.setupRun.apply(this,arguments)}),r("teardownRun",function(){var a=q.setupRun.apply(this,arguments);return f.observe(),a}),r("setSrc",function(){var a,b=f.connected;return f.disconnect(),a=q.setSrc.apply(this,arguments),b&&f.observe(),a}),h.onMutations=function(a){var b,c,d=[];for(b=0,c=a.length;c>b;b++)g&&"childList"===a[b].type?h.onSubtreeChange(a[b],d):"attributes"===a[b].type&&h.onAttrChange(a[b],d);d.length&&h.fillImgs({elements:d,reparse:!0,reevaluate:!0})},h.onSubtreeChange=function(a,b){h.findAddedMutations(a.addedNodes,b),h.findRemovedMutations(a.removedNodes,a.target,b)},h.findAddedMutations=function(a,b){var c,d,e,f;for(c=0,d=a.length;d>c;c++)e=a[c],1===e.nodeType&&(f=e.nodeName.toUpperCase(),"PICTURE"===f?h.addToElements(e.getElementsByTagName("img")[0],b):"IMG"===f&&i(e,h.selShort)?h.addToElements(e,b):"SOURCE"===f?h.addImgForSource(e,e.parentNode,b):h.addToElements(h.qsa(e,h.selShort),b))},h.findRemovedMutations=function(a,b,c){var d,e,f;for(d=0,e=a.length;e>d;d++)f=a[d],1===f.nodeType&&"SOURCE"===f.nodeName.toUpperCase()&&h.addImgForSource(f,b,c)},h.addImgForSource=function(a,b,c){b&&"PICTURE"!==(b.nodeName||"").toUpperCase()&&(b=b.parentNode,b&&"PICTURE"===(b.nodeName||"").toUpperCase()||(b=null)),b&&h.addToElements(b.getElementsByTagName("img")[0],c)},h.addToElements=function(a,b){var c,d;if(a)if("length"in a&&!a.nodeType)for(c=0,d=a.length;d>c;c++)h.addToElements(a[c],b);else a.parentNode&&-1===b.indexOf(a)&&b.push(a)},h.onAttrChange=function(a,b){var c,d=a.target[h.ns];d||"srcset"!==a.attributeName||"IMG"!==(c=a.target.nodeName.toUpperCase())?d&&(c||(c=a.target.nodeName.toUpperCase()),"IMG"===c?(a.attributeName in d&&(d[a.attributeName]=void 0),h.addToElements(a.target,b)):"SOURCE"===c&&h.addImgForSource(a.target,a.target.parentNode,b)):h.addToElements(a.target,b)},window.HTMLPictureElement||(d&&!h.testMutationEvents?j=new d(h.onMutations):(l=function(){var a=!1,b=[],c=window.setImmediate||window.setTimeout;return function(d){a||(a=!0,l.take||(l.take=function(){b.length&&(h.onMutations(b),b=[]),a=!1}),c(l.take)),b.push(d)}}(),b.documentElement.addEventListener("DOMNodeInserted",function(a){f.connected&&g&&l({type:"childList",addedNodes:[a.target],removedNodes:[]})},!0),b.documentElement.addEventListener("DOMNodeRemoved",function(a){f.connected&&g&&"SOURCE"==(a.target||{}).nodeName&&l({type:"childList",addedNodes:[],removedNodes:[a.target],target:a.target.parentNode})},!0),b.documentElement.addEventListener("DOMAttrModified",function(a){f.connected&&m[a.attrName]&&l({type:"attributes",target:a.target,attributeName:a.attrName})},!0)),window.HTMLImageElement&&Object.defineProperties&&!function(){var a=b.createElement("img"),c=[],d=a.getAttribute,e=a.setAttribute,f={src:1};h.supSrcset&&!h.supSizes&&(f.srcset=1),Object.defineProperties(HTMLImageElement.prototype,{getAttribute:{value:function(a){var b;return f[a]&&(b=this[h.ns])&&void 0!==b[a]?b[a]:d.apply(this,arguments)},writeable:!0,enumerable:!0,configurable:!0}}),h.supSrcset||c.push("srcset"),h.supSizes||c.push("sizes"),c.forEach(function(a){Object.defineProperty(HTMLImageElement.prototype,a,{set:function(b){e.call(this,a,b)},get:function(){return d.call(this,a)||""},enumerable:!0,configurable:!0})}),"currentSrc"in a||!function(){var a,b=function(){var a=this[h.ns];return a&&"L"==a.evaled&&this.complete&&h.fillImgs({elements:this}),this.src||""},c=b;h.supSrcset&&window.devicePixelRatio&&(a=function(a,b){var c=a.res||a.d||a.x||a.w,d=b.res||b.d||b.x||a.w;return c-d},b=function(){var b,d,e,f,g=this[h.ns];if(g&&g.supported&&g.srcset&&g.sets&&(d=h.parseSet(g.sets[0]))&&d.sort){for(d.sort(a),e=d.length,f=d[e-1],b=0;e>b;b++)if(d[b].x>=window.devicePixelRatio){f=d[b];break}f&&(f=h.makeUrl(f.url))}return f||c.call(this)}),Object.defineProperty(HTMLImageElement.prototype,"currentSrc",{set:function(){window.console&&console.warn&&console.warn("currentSrc can't be set on img element")},get:b,enumerable:!0,configurable:!0})}(),!window.HTMLSourceElement||"srcset"in b.createElement("source")||["srcset","sizes"].forEach(function(a){Object.defineProperty(HTMLSourceElement.prototype,a,{set:function(b){this.setAttribute(a,b)},get:function(){return this.getAttribute(a)||""},enumerable:!0,configurable:!0})})}(),f.start()),g||b.addEventListener("DOMContentLoaded",function(){g=!0}))}}); \ No newline at end of file diff --git a/plugins/oldie/ri.oldie.min.js b/plugins/oldie/ri.oldie.min.js index bd66853..86946bf 100644 --- a/plugins/oldie/ri.oldie.min.js +++ b/plugins/oldie/ri.oldie.min.js @@ -1,3 +1,3 @@ -/*! respimage - v1.3.0-RC1 - 2015-01-27 +/*! respimage - v1.3.0 - 2015-01-29 Licensed MIT */ !function(a){"use strict";var b,c=0,d=function(){window.respimage&&a(window.respimage),(window.respimage||c>9999)&&clearInterval(b),c++};b=setInterval(d,8),d()}(function(a){"use strict";var b=a._;if(!document.querySelector){b.qsa=function(a,b){return jQuery(b,a)};var c=document.createElement("a");b.makeUrl=function(a){return jQuery.attr(c,"href",a+""),jQuery.prop(c,"href")}}}); \ No newline at end of file diff --git a/plugins/print/ri.print.min.js b/plugins/print/ri.print.min.js index a2dd847..3221622 100644 --- a/plugins/print/ri.print.min.js +++ b/plugins/print/ri.print.min.js @@ -1,3 +1,3 @@ -/*! respimage - v1.3.0-RC1 - 2015-01-27 +/*! respimage - v1.3.0 - 2015-01-29 Licensed MIT */ !function(a){"use strict";var b,c=0,d=function(){window.respimage&&a(window.respimage),(window.respimage||c>9999)&&clearInterval(b),c++};b=setInterval(d,8),d()}(function(a){"use strict";if(window.addEventListener){var b,c,d,e=window.matchMedia&&matchMedia("print")||{matches:!1},f=a._,g=function(a){return a?-1!=a.indexOf("print")?!0:b?b.apply(this,arguments):void 0:!0},h=function(){e.matches||b||(b=f.matchesMedia,f.matchesMedia=g),!c&&!d&&f.DPR<1.5&&f.cfg.xQuant<1.5&&(c=f.cfg.xQuant,d=f.DPR,f.DPR=1.5,f.cfg.xQuant=1.5),a({reevaluate:!0})},i=function(){b&&(f.matchesMedia=b,b=!1),c&&(f.cfg.xQuant=c,c=!1),d&&(f.DPR=d,d=!1),a({reevaluate:!0})};"onbeforeprint"in window&&(addEventListener("beforeprint",h,!1),addEventListener("afterprint",i,!1))}}); \ No newline at end of file diff --git a/plugins/typesupport/ri.type.min.js b/plugins/typesupport/ri.type.min.js index 808bf39..76b0431 100644 --- a/plugins/typesupport/ri.type.min.js +++ b/plugins/typesupport/ri.type.min.js @@ -1,3 +1,3 @@ -/*! respimage - v1.3.0-RC1 - 2015-01-27 +/*! respimage - v1.3.0 - 2015-01-29 Licensed MIT */ !function(a){"use strict";var b,c=0,d=function(){window.respimage&&a(window.respimage),(window.respimage||c>9999)&&clearInterval(b),c++};b=setInterval(d,8),d()}(function(a){"use strict";var b=a._,c=0,d=function(a,c){var d;for(d=0;dc&&a({reevaluate:!0})};return g&&(h=document.createElement("canvas"),!h.getContext)?void d(b,!1):(j.onload=function(){var a;i=!0,f&&(i=j.width==f),g&&(a=h.getContext("2d"),a.drawImage(j,0,0),i=0===a.getImageData(0,0,1,1).data[3]),k()},j.onerror=function(){i=!1,k()},c++,d(b,"pending"),void(j.src=e))},a.testTypeSupport("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==",1),a.testTypeSupport("image/jp2 image/jpx image/jpm","data:image/jp2;base64,/0//UQAyAAAAAAABAAAAAgAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAEBwEBBwEBBwEBBwEB/1IADAAAAAEAAAQEAAH/XAAEQED/ZAAlAAFDcmVhdGVkIGJ5IE9wZW5KUEVHIHZlcnNpb24gMi4wLjD/kAAKAAAAAABYAAH/UwAJAQAABAQAAf9dAAUBQED/UwAJAgAABAQAAf9dAAUCQED/UwAJAwAABAQAAf9dAAUDQED/k8+kEAGvz6QQAa/PpBABr994EAk//9k=",1),a.testTypeSupport("image/vnd.ms-photo","data:image/vnd.ms-photo;base64,SUm8AQgAAAAFAAG8AQAQAAAASgAAAIC8BAABAAAAAQAAAIG8BAABAAAAAQAAAMC8BAABAAAAWgAAAMG8BAABAAAAHwAAAAAAAAAkw91vA07+S7GFPXd2jckNV01QSE9UTwAZAYBxAAAAABP/gAAEb/8AAQAAAQAAAA==",1),void a.testTypeSupport("video/png video/apng video/x-mng video/x-png","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg==",!1,!0))}); \ No newline at end of file diff --git a/respimage.js b/respimage.js index eb5a77f..e8eab82 100644 --- a/respimage.js +++ b/respimage.js @@ -1,4 +1,4 @@ -/*! respimage - v1.3.0-RC1 - 2015-01-27 +/*! respimage - v1.3.0 - 2015-01-29 Licensed MIT */ !function(window, document, undefined) { "use strict"; diff --git a/respimage.min.js b/respimage.min.js index 905fe6e..6bc438d 100644 --- a/respimage.min.js +++ b/respimage.min.js @@ -1,3 +1,3 @@ -/*! respimage - v1.3.0-RC1 - 2015-01-27 +/*! respimage - v1.3.0 - 2015-01-29 Licensed MIT */ !function(a,b,c){"use strict";function d(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function e(){var b;T=!1,W=a.devicePixelRatio,U={},V={},b=(W||1)*D.xQuant,D.uT||(D.maxX=Math.max(1.3,D.maxX),b=Math.min(b,D.maxX),v.DPR=b),X.width=Math.max(a.innerWidth||0,B.clientWidth),X.height=Math.max(a.innerHeight||0,B.clientHeight),X.vw=X.width/100,X.vh=X.height/100,X.em=v.getEmValue(),X.rem=X.em,p=D.lazyFactor/2,p=p*b+p,r=.1*b,m=.5+.2*b,n=.5+.25*b,q=b+1.3,(o=X.width>X.height)||(p*=.9),J&&(p*=.9)}function f(a,b,c){var d=b*Math.pow(a,2);return o||(d/=1.3),a+=d,a>c}function g(a){if(!a.getBoundingClientRect)return!0;var b,c,d,e,f=a.getBoundingClientRect();return!!((b=f.bottom)>=-9&&(e=f.top)<=X.height+9&&(c=f.right)>=-9&&(d=f.left)<=X.height+9&&(b||c||d||e))}function h(a){var b,c=v.getSet(a),d=!1;"pending"!=c&&(d=!0,c&&(b=v.setRes(c),d=v.applySetCandidate(b,a))),a[v.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[v.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=v.makeUrl(b),a[v.ns].curSrc=b,a[v.ns].curCan=d,d.res||cb(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=v.parseSet(b),a=v.makeUrl(a),c=0;cc;c++)e=g[c],e[v.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}b.createElement("picture");var m,n,o,p,q,r,s,t,u,v={},w=function(){},x=b.createElement("img"),y=x.getAttribute,z=x.setAttribute,A=x.removeAttribute,B=b.documentElement,C={},D={xQuant:1,lazyFactor:.4,maxX:2},E="data-risrc",F=E+"set",G="webkitBackfaceVisibility"in B.style,H=navigator.userAgent,I=/AppleWebKit/i.test(H),J=/rident/.test(H)||/ecko/.test(H)&&H.match(/rv\:(\d+)/)&&RegExp.$1>35,K=0,L="currentSrc",M=/\s+\+?\d+(e\d+)?w/,N=/(\([^)]+\))?\s*(.+)/,O=/^([\+eE\d\.]+)(w|x)$/,P=/\s*\d+h\s*/,Q=a.respimgCFG,R=("https:"==location.protocol,"position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)"),S="font-size:100%!important;",T=!0,U={},V={},W=a.devicePixelRatio,X={px:1,"in":96},Y=b.createElement("a"),Z=!1,$=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},_=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d||!1):a.detachEvent&&a.detachEvent("on"+b,c)},ab=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},bb=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=ab(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")});return function(b,d){var e;if(!(b in U))if(U[b]=!1,d&&(e=b.match(a)))U[b]=e[1]*X[e[2]];else try{U[b]=new Function("e",c(b))(X)}catch(f){}return U[b]}}(),cb=function(a,b){return a.w?(a.cWidth=v.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.x,a},db=function(a){var c,d,e,f=a||{};if(f.elements&&1==f.elements.nodeType&&("IMG"==f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||v.qsa(f.context||b,f.reevaluate||f.reparse?v.sel:v.selShort),e=c.length){for(v.setupRun(f),Z=!0,d=0;e>d;d++)K++,6>K&&!c[d].complete&&K++,v.fillImg(c[d],f);v.teardownRun(f),K++}},eb=function(){var a=function(){_(this,"load",a),_(this,"error",a),v.fillImgs({elements:[this]})};return function(b){_(b,"load",a),_(b,"error",a),$(b,"error",a),$(b,"load",a)}}(),fb=ab(function(a){var b=[1,"x"],c=d(a||"");return c&&(c=c.replace(P,""),b=c.match(O)?[1*RegExp.$1,RegExp.$2]:!1),b});L in x||(L="src"),C["image/jpeg"]=!0,C["image/gif"]=!0,C["image/png"]=!0,C["image/svg+xml"]=b.implementation.hasFeature("http://wwwindow.w3.org/TR/SVG11/feature#Image","1.1"),v.ns=("ri"+(new Date).getTime()).substr(0,9),v.supSrcset="srcset"in x,v.supSizes="sizes"in x,v.selShort="picture>img,img[srcset]",v.sel=v.selShort,v.cfg=D,v.supSrcset&&(v.sel+=",img["+F+"]"),v.DPR=W||1,v.u=X,v.types=C,t=v.supSrcset&&!v.supSizes,v.setSize=w,v.makeUrl=ab(function(a){return Y.href=a,Y.href}),v.qsa=function(a,b){return a.querySelectorAll(b)},v.matchesMedia=function(){return v.matchesMedia=a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?function(a){return!a||matchMedia(a).matches}:v.mMQ,v.matchesMedia.apply(this,arguments)},v.mMQ=function(a){return a?bb(a):!0},v.calcLength=function(a){var b=bb(a,!0)||!1;return 0>b&&(b=!1),b},v.supportsType=function(a){return a?C[a]:!0},v.parseSize=ab(function(a){var b=(a||"").match(N);return{media:b&&b[1],length:b&&b[2]}}),v.parseSet=function(a){if(!a.cands){var b,c,d,e,f,g,h=a.srcset;for(a.cands=[];h;)h=h.replace(/^\s+/g,""),b=h.search(/\s/g),d=null,-1!=b?(c=h.slice(0,b),e=c.charAt(c.length-1),","!=e&&c||(c=c.replace(/,+$/,""),d=""),h=h.slice(b+1),null==d&&(f=h.indexOf(","),-1!=f?(d=h.slice(0,f),h=h.slice(f+1)):(d=h,h=""))):(c=h,h=""),c&&(d=fb(d))&&(g={url:c.replace(/^,+/,""),set:a},g[d[1]]=d[0],"x"==d[1]&&1==d[0]&&(a.has1x=!0),a.cands.push(g))}return a.cands},v.getEmValue=function(){var a;if(!s&&(a=b.body)){var c=b.createElement("div"),d=B.style.cssText,e=a.style.cssText;c.style.cssText=R,B.style.cssText=S,a.style.cssText=S,a.appendChild(c),s=c.offsetWidth,a.removeChild(c),s=parseFloat(s,10),B.style.cssText=d,a.style.cssText=e}return s||16},v.calcListLength=function(a){if(!(a in V)||D.uT){var b,c,e,f,g,h,i=d(a).split(/\s*,\s*/),j=!1;for(g=0,h=i.length;h>g&&(b=i[g],c=v.parseSize(b),e=c.length,f=c.media,!e||!v.matchesMedia(f)||(j=v.calcLength(e))===!1);g++);V[a]=j?j:X.width}return V[a]},v.setRes=function(a){var b;if(a){b=v.parseSet(a);for(var c=0,d=b.length;d>c;c++)cb(b[c],a.sizes)}return b},v.setRes.res=cb,v.applySetCandidate=function(a,b){if(a.length){var c,d,e,h,k,l,o,s,t,u,w,x,z,A=b[v.ns],B=!0,C=p,D=r;if(s=A.curSrc||b[L],t=A.curCan||j(b,s,a[0].set),d=v.DPR,z=t&&t.res,!o&&s&&(x=J&&!b.complete&&t&&z>d,x||t&&!(q>z)||(t&&d>z&&z>m&&(n>z&&(C*=.87,D+=.04*d),t.res+=C*Math.pow(z-D,2)),u=!A.pic||t&&t.set==a[0].set,t&&u&&t.res>=d?o=t:I||b.complete||!y.call(b,"src")||b.lazyload||J&&!(4>K)||!u&&g(b)||(o=t,w=s,B="L",eb(b)))),!o)for(z&&(t.res=t.res-(t.res-z)/2),a.sort(i),l=a.length,o=a[l-1],e=0;l>e;e++)if(c=a[e],c.res>=d){h=e-1,o=a[h]&&(k=c.res-d)&&(x||s!=v.makeUrl(c.url))&&f(a[h].res,k,d)?a[h]:c;break}return z&&(t.res=z),o&&(w=v.makeUrl(o.url),A.curSrc=w,A.curCan=o,w!=s&&v.setSrc(b,o),v.setSize(b)),B}},v.setSrc=function(a,b){var c;a.src=b.url,G&&(c=a.style.zoom,a.style.zoom="0.999",a.style.zoom=c)},v.getSet=function(a){var b,c,d,e=!1,f=a[v.ns].sets;for(b=0;b