PageSourceSearch

https://www.commissionefilmcei.it/wp-content/themes/cnvf-theme/ass…/adaptivebackground.min.js?ver=0.1.0

js commissionefilmcei.it collected 2026-09-26 08:36:48 UTC 3,663 bytes, 2 lines download raw bytes

1!function(d){var g="data-ab-parent",n="ab-color-found",a={selector:"[data-adaptive-background]",parent:null,exclude:["rgb(0,0,0)","rgb(255,255,255)"],shadeVariation:!1,shadePercentage:0,shadeColors:{light:"rgb(255,255,255)",dark:"rgb(0,0,0)"},normalizeTextColor:!1,normalizedTextColors:{light:"#fff",dark:"#000"},lumaClasses:{light:"ab-light",dark:"ab-dark"},transparent:null};function h(r,a){var e=r.split(","),t=a<0?0:255,n=a<0?-1*a:a,o=parseInt(e[0].slice(4)),s=parseInt(e[1]),c=parseInt(e[2]);return"rgb("+(Math.round((t-o)*n)+o)+","+(Math.round((t-s)*n)+s)+","+(Math.round((t-c)*n)+c)+")"}function p(r,a,e){var t=r.split(","),n=a.split(","),o=parseInt(t[0].slice(4)),s=parseInt(t[1]),c=parseInt(t[2]);return"rgb("+(Math.round((parseInt(n[0].slice(4))-o)*e)+o)+","+(Math.round((parseInt(n[1])-s)*e)+s)+","+(Math.round((parseInt(n[2])-c)*e)+c)+")"}!function(r,a){"use strict";var e=function(r,o){var s=new Image,a=r.src||r;"data:"!==a.substring(0,5)&&(s.crossOrigin="Anonymous"),s.onload=function(){var r,a,e,t=(r=s.width,a=s.height,(e=document.createElement("canvas")).setAttribute("width",r),e.setAttribute("height",a),e.getContext("2d"));t.drawImage(s,0,0);var n=t.getImageData(0,0,s.width,s.height);o&&o(n.data)},s.src=a},l=function(r){return["rgb(",r,")"].join("")},u=function(r,a){return{name:l(r),count:a}},t={};t.colors=function(r,s){var c=(s=s||{}).exclude||[],i=s.paletteSize||10;e(r,function(r){for(var a={},e="",t=[],n=0;n<r.length;n+=4)t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],e=t.join(","),-1===t.indexOf(void 0)&&0!==r[n+3]&&-1===c.indexOf(l(e))&&(a[e]=e in a?a[e]+1:1);if(s.success){var o=function(r,a){if(r.length>a)return r.slice(0,a);for(var e=r.length-1;e<a-1;e++)r.push(u("0,0,0",0));return r}(function(r){var a=[];for(var e in r)a.push(u(e,r[e]));return a.sort(function(r,a){return a.count-r.count}),a}(a),i+1);s.success({dominant:o[0].name,secondary:o[1].name,palette:o.map(function(r){return r.name}).slice(1)})}})},r.RGBaster=r.RGBaster||t}(window),d.adaptiveBackground={run:function(r){var u=d.extend({},a,r);d(u.selector).each(function(r,a){var c=d(this),i=function(r){var a=r.match(/\d+/g);return(299*a[0]+587*a[1]+114*a[2])/1e3},l=function(){var r=c.attr("data-ab-css-background");return void 0!==r&&!1!==r},t=function(){var r=c.css("background-image");return/\(([^)]+)\)/.exec(r)[1].replace(/"/g,"")};c.on(n,function(r,a){var e,t;if(e=u.parent&&c.parents(u.parent).length?c.parents(u.parent):c.attr(g)&&c.parents(c.attr(g)).length?c.parents(c.attr(g)):l()?c:u.parent?c.parents(u.parent):c.parent(),u.shadeVariation&&(a.color=(t=a.color,1==u.shadeVariation?i(t)<=128?h(t,u.shadePercentage):h(t,-u.shadePercentage,u.shadePercentage):"blend"==u.shadeVariation?128<=i(t)?p(t,u.shadeColors.dark,u.shadePercentage):p(t,u.shadeColors.light,u.shadePercentage):void 0)),d.isNumeric(u.transparent)&&null!=u.transparent&&.01<=u.transparent&&u.transparent<=.99){var n=a.color.replace("rgb","rgba").replace(")",", "+u.transparent+")");e.css({backgroundColor:n})}else e.css({backgroundColor:a.color});var o,s;u.normalizeTextColor&&e.css({color:(o=a.color,128<=i(o)?u.normalizedTextColors.dark:u.normalizedTextColors.light)}),e.addClass((s=a.color,i(s)<=128?u.lumaClasses.dark:u.lumaClasses.light)).attr("data-ab-yaq",i(a.color)),u.success&&u.success(c,a)}),function(){if("PICTURE"==c[0].tagName){var r=c[0].children;for(var a in r)if("IMG"==r[a].tagName){var e=r[a];break}e.currentSrc&&(e=e.currentSrc)}else e=l()?t():c[0];RGBaster.colors(e,{paletteSize:20,exclude:u.exclude,success:function(r){c.attr("data-ab-color",r.dominant),c.trigger(n,{color:r.dominant,palette:r.palette})}})}()})}}}(jQuery);
2//# sourceMappingURL=adaptivebackground.min.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.