Plugin Directory

Changeset 3197623


Ignore:
Timestamp:
11/26/2024 06:00:57 PM (14 months ago)
Author:
nosilver4u
Message:

tagging and releasing 4.0.0

Location:
easy-image-optimizer
Files:
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • easy-image-optimizer/tags/4.0.0/changelog.txt

    r3179564 r3197623  
     1= 4.0.0 =
     2*Release Date - November 26, 2024*
     3
     4* added: Above the Fold setting for Lazy Load (previously EIO_LAZY_FOLD override)
     5* changed: gravatar images excluded from Above the Fold/EIO_LAZY_FOLD counts
     6* fixed: Easy IO adding images to srcset combined with broken WooCommerce gallery thumbnails causes oversized image sizes to be loaded
     7* fixed: Easy IO srcset filler using incorrect width for calculations
     8
    19= 3.9.4 =
    210*Release Date - October 31, 2024*
  • easy-image-optimizer/tags/4.0.0/classes/class-base.php

    r3150977 r3197623  
    606606        if ( $this->get_option( 'ewww_image_optimizer_gif_level' ) || 'all' === $select ) {
    607607            $supported_types[] = 'image/gif';
     608        }
     609        if ( $this->get_option( 'ewww_image_optimizer_webp_level' ) || 'all' === $select ) {
     610            $supported_types[] = 'image/webp';
    608611        }
    609612        if ( $this->get_option( 'ewww_image_optimizer_pdf_level' ) || 'all' === $select ) {
  • easy-image-optimizer/tags/4.0.0/classes/class-exactdn.php

    r3125548 r3197623  
    292292        \add_filter( 'rest_request_before_callbacks', array( $this, 'parse_restapi_maybe' ), 10, 3 );
    293293
    294         // Check to see if the OMGF plugin is active, and suppress our font rewriting if it is.
    295         if ( ( \defined( 'OMGF_PLUGIN_FILE' ) || \defined( 'OMGF_DB_VERSION' ) ) && ! \defined( 'EASYIO_REPLACE_GOOGLE_FONTS' ) ) {
    296             \define( 'EASYIO_REPLACE_GOOGLE_FONTS', false );
    297         }
     294        \add_filter( 'exactdn_srcset_multipliers', array( $this, 'add_hidpi_srcset_multipliers' ) );
    298295
    299296        // Overrides for admin-ajax images.
     
    313310        // Filter for generic use by other plugins/themes.
    314311        \add_filter( 'exactdn_local_to_cdn_url', array( $this, 'plugin_get_image_url' ) );
     312
     313        // Check to see if the OMGF plugin is active, and suppress our font rewriting if it is.
     314        if ( ( \defined( 'OMGF_PLUGIN_FILE' ) || \defined( 'OMGF_DB_VERSION' ) ) && ! \defined( 'EASYIO_REPLACE_GOOGLE_FONTS' ) ) {
     315            \define( 'EASYIO_REPLACE_GOOGLE_FONTS', false );
     316        }
    315317
    316318        // Filter for Divi Pixel plugin SVG images.
     
    360362        // Filter for legacy WooCommerce API endpoints.
    361363        \add_filter( 'woocommerce_api_product_response', array( $this, 'woocommerce_api_product_response' ) );
     364        // Filter to fix WooCommerce srcset madness.
     365        \add_action( 'template_redirect', array( $this, 'check_conditionals' ) );
    362366
    363367        // DNS prefetching.
     
    28592863         * @param array|bool $multipliers Array of multipliers to use or false to bypass.
    28602864         */
    2861         $multipliers = \apply_filters( 'exactdn_srcset_multipliers', array( .2, .4, .6, .8, 1, 2, 3, 1920 ) );
     2865        $multipliers = \apply_filters( 'exactdn_srcset_multipliers', array( .2, .4, .6, .8, 1 ) );
    28622866
    28632867        if ( empty( $url ) || empty( $multipliers ) ) {
     
    29302934                $this->debug_message( 'soft cropping' );
    29312935                $crop = 'soft';
    2932                 $base = $this->get_content_width(); // Provide a default width if none set by the theme.
     2936                // If the full width is larger than the requested width, we have a usable full width.
     2937                // Otherwise use the requested width for soft-crop calculations.
     2938                $base = $fullwidth > $reqwidth ? $fullwidth : $reqwidth;
    29332939            } else {
    29342940                $this->debug_message( 'hard cropping' );
     
    29472953                    $newwidth = 1920;
    29482954                    if ( ! $w_descriptor || 1920 >= $reqwidth || 'soft' !== $crop ) {
     2955                        $this->debug_message( "skipping $multiplier due to no w descriptor, larger than $reqwidth, or $crop !== soft" );
    29492956                        continue;
    29502957                    }
    29512958                }
    29522959                if ( $newwidth < 50 ) {
     2960                    $this->debug_message( "skipping $multiplier, as $newwidth is smaller than 50" );
    29532961                    continue;
    29542962                }
     
    29562964                    // If a new width would be within 50 pixels of an existing one or larger than the full size image, skip.
    29572965                    if ( \abs( $currentwidth - $newwidth ) < 50 || ( $newwidth > $fullwidth ) ) {
     2966                        $this->debug_message( "skipping $multiplier (width $newwidth) too close to $currentwidth, or larger than $fullwidth" );
    29582967                        continue 2; // Back to the foreach ( $multipliers as $multiplier ).
    29592968                    }
    2960                 } // foreach ( $currentwidths as $currentwidth ){
    2961 
     2969                }
     2970
     2971                $this->debug_message( "using $multiplier multiplier: $newwidth px" );
    29622972                if ( 1 === $multiplier && \abs( $newwidth - $fullwidth ) < 5 ) {
    29632973                    $args = array();
     
    30513061         * @param array|bool $multipliers Array of multipliers to use or false to bypass.
    30523062         */
    3053         $multipliers = \apply_filters( 'exactdn_srcset_multipliers', array( .2, .4, .6, .8, 1, 2, 3, 1920 ) );
     3063        $multipliers = \apply_filters( 'exactdn_srcset_multipliers', array( .2, .4, .6, .8, 1 ) );
    30543064        /**
    30553065         * Filter the width ExactDN will use to create srcset attribute.
     
    34503460
    34513461    /**
     3462     * Runs on template_redirect to run checks via "conditional tags", that must be done after the WP_Query object is setup.
     3463     */
     3464    public function check_conditionals() {
     3465        // Woo gallery thumbnails on product pages, as of 9.4, get srcset with no sizes. If we add more images to the srcset, this blows things up even worse.
     3466        // Suppress hi-dpi srcset multipliers if this is a singular product page.
     3467        if ( \function_exists( '\is_product' ) && \is_product() ) {
     3468            $this->debug_message( 'disabling hidpi multipliers (filter)' );
     3469            \remove_filter( 'exactdn_srcset_multipliers', array( $this, 'add_hidpi_srcset_multipliers' ) );
     3470        }
     3471    }
     3472
     3473    /**
     3474     * Add multipliers for high-DPI devices.
     3475     *
     3476     * @param array $multipliers An array of multipliers.
     3477     * @return array The modified list of multipliers.
     3478     */
     3479    public function add_hidpi_srcset_multipliers( $multipliers ) {
     3480        if ( $this->get_option( 'exactdn_hidpi' ) ) {
     3481            $this->debug_message( 'adding hidpi multipliers' );
     3482            return array( .2, .4, .6, .8, 1, 2, 3, 1920 );
     3483        }
     3484        return $multipliers;
     3485    }
     3486
     3487    /**
    34523488     * Handle image urls within the NextGEN pro lightbox displays.
    34533489     *
  • easy-image-optimizer/tags/4.0.0/classes/class-lazy-load.php

    r3179564 r3197623  
    383383        }
    384384
    385         $above_the_fold   = \apply_filters( 'eio_lazy_fold', 0 );
     385        $above_the_fold   = (int) \apply_filters( 'eio_lazy_fold', $this->get_option( $this->prefix . 'll_abovethefold' ) );
    386386        $images_processed = 0;
    387387        $replacements     = array();
     
    509509            foreach ( $replacements as $position => $replacement ) {
    510510                $this->debug_message( "possible replacement at $position" );
    511                 ++$images_processed;
     511                if ( $this->is_counted( $replacement['orig'] ) ) {
     512                    ++$images_processed;
     513                }
    512514                if ( $images_processed <= $above_the_fold ) {
    513515                    $this->debug_message( 'image above fold threshold' );
     
    526528        $this->debug_message( 'all done parsing page for lazy' );
    527529        return $buffer;
     530    }
     531
     532    /**
     533     * Check whether an image is counted for above the fold purposes.
     534     *
     535     * @param string $image The image tag to parse.
     536     * @return bool True if it should be counted, false otherwise.
     537     */
     538    public function is_counted( $image ) {
     539        $uncounted_images = array(
     540            'secure.gravatar.com',
     541        );
     542        $uncounted_images = \apply_filters( 'eio_uncounted_lazy_images', $uncounted_images );
     543        foreach ( $uncounted_images as $uncounted_image_pattern ) {
     544            if ( false !== strpos( $image, $uncounted_image_pattern ) ) {
     545                return false;
     546            }
     547        }
     548        return true;
    528549    }
    529550
     
    10881109            \array_merge(
    10891110                array(
     1111                    'data:image/',
    10901112                    'data-no-lazy=',
    10911113                    'header-gallery-wrapper ',
     
    13491371                        'skip_autoscale' => ( \defined( 'EIO_LL_AUTOSCALE' ) && ! EIO_LL_AUTOSCALE ? 1 : 0 ),
    13501372                        'threshold'      => (int) $threshold > 50 ? (int) $threshold : 0,
     1373                        'use_dpr'        => (int) $this->get_option( 'exactdn_hidpi' ),
    13511374                    )
    13521375                )
     
    13891412                        'skip_autoscale' => ( \defined( 'EIO_LL_AUTOSCALE' ) && ! EIO_LL_AUTOSCALE ? 1 : 0 ),
    13901413                        'threshold'      => (int) $threshold > 50 ? (int) $threshold : 0,
     1414                        'use_dpr'        => (int) $this->get_option( 'exactdn_hidpi' ),
    13911415                    )
    13921416                )
  • easy-image-optimizer/tags/4.0.0/classes/class-plugin.php

    r3125548 r3197623  
    164164            $exactdn_lossy = ( empty( $_POST['exactdn_lossy'] ) ? false : true );
    165165            \update_site_option( 'exactdn_lossy', $exactdn_lossy );
     166            $exactdn_hidpi = ( empty( $_POST['exactdn_hidpi'] ) ? false : true );
     167            \update_site_option( 'exactdn_hidpi', $exactdn_hidpi );
    166168            $exactdn_exclude = empty( $_POST['exactdn_exclude'] ) ? '' : sanitize_textarea_field( wp_unslash( $_POST['exactdn_exclude'] ) );
    167169            \update_site_option( 'exactdn_exclude', $this->exclude_paths_sanitize( $exactdn_exclude ) );
     
    170172            $easyio_lazy_load = ( empty( $_POST['easyio_lazy_load'] ) ? false : true );
    171173            \update_site_option( 'easyio_lazy_load', $easyio_lazy_load );
     174            $easyio_ll_autoscale = ( empty( $_POST['easyio_ll_autoscale'] ) ? false : true );
     175            \update_site_option( 'easyio_ll_autoscale', $easyio_ll_autoscale );
     176            $easyio_ll_abovethefold = ! empty( $_POST['easyio_ll_abovethefold'] ) ? (int) $_POST['easyio_ll_abovethefold'] : 0;
     177            \update_site_option( 'easyio_ll_abovethefold', $easyio_ll_abovethefold );
    172178            $easyio_use_lqip = ( empty( $_POST['easyio_use_lqip'] ) ? false : true );
    173179            \update_site_option( 'easyio_use_lqip', $easyio_use_lqip );
     
    201207        \register_setting( 'easyio_options', 'exactdn_all_the_things', 'boolval' );
    202208        \register_setting( 'easyio_options', 'exactdn_lossy', 'boolval' );
     209        \register_setting( 'easyio_options', 'exactdn_hidpi', 'boolval' );
    203210        \register_setting( 'easyio_options', 'exactdn_exclude', array( $this, 'exclude_paths_sanitize' ) );
    204211        \register_setting( 'easyio_options', 'easyio_add_missing_dims', 'boolval' );
    205212        \register_setting( 'easyio_options', 'easyio_lazy_load', 'boolval' );
     213        \register_setting( 'easyio_options', 'easyio_ll_abovethefold', 'intval' );
    206214        \register_setting( 'easyio_options', 'easyio_use_lqip', 'boolval' );
    207215        \register_setting( 'easyio_options', 'easyio_use_dcip', 'boolval' );
     
    222230        \add_option( 'exactdn_all_the_things', false );
    223231        \add_option( 'exactdn_lossy', false );
     232        \add_option( 'exactdn_hidpi', false );
    224233        \add_option( 'exactdn_exclude', '' );
    225234        \add_option( 'exactdn_sub_folder', false );
     
    232241        \add_option( 'easyio_use_siip', false );
    233242        \add_option( 'easyio_ll_autoscale', true );
     243        \add_option( 'easyio_ll_abovethefold', 0 );
    234244        \add_option( 'easyio_ll_exclude', '' );
    235245        \add_option( 'easyio_ll_all_things', '' );
  • easy-image-optimizer/tags/4.0.0/easy-image-optimizer.php

    r3179564 r3197623  
    1414Description: Easily speed up your website to better connect with your visitors. Properly compress and size/scale images. Includes lazy load and WebP auto-convert.
    1515Author: Exactly WWW
    16 Version: 3.9.4
    17 Requires at least: 6.4
     16Version: 4.0.0
     17Requires at least: 6.5
    1818Requires PHP: 8.1
    1919Author URI: https://ewww.io/
     
    3030    add_action( 'admin_notices', 'easyio_unsupported_php' );
    3131} elseif ( false === strpos( add_query_arg( '', '' ), 'easyio_disable=1' ) ) {
    32     define( 'EASYIO_VERSION', 394 );
     32    define( 'EASYIO_VERSION', 400 );
    3333
    3434    /**
  • easy-image-optimizer/tags/4.0.0/includes/lazysizes-post.js

    r3076002 r3197623  
    4646                        }
    4747                    }
    48                     var dPR = (window.devicePixelRatio || 1);
     48                    var dPR = getdPR();
    4949                    var targetWidth  = Math.round(e.target.offsetWidth * dPR);
    5050                    var targetHeight = Math.round(e.target.offsetHeight * dPR);
     
    368368
    369369    var updateImgElem = function(target,upScale=false){
    370         var dPR = (window.devicePixelRatio || 1);
     370        var dPR = getdPR();
    371371        var targetWidth = Math.round(target.offsetWidth * dPR);
    372372        var targetHeight = Math.round(target.offsetHeight * dPR);
     
    391391        }
    392392    };
     393
     394    var getdPR = function() {
     395        if (eio_lazy_vars.use_dpr && window.devicePixelRatio > 1) {
     396            return window.devicePixelRatio;
     397        }
     398        return 1;
     399    }
    393400
    394401    document.addEventListener('lazybeforesizes', function(e){
     
    424431                // For each image with a natural width which isn't
    425432                // a 1x1 image, check its size.
    426                 var dPR = (window.devicePixelRatio || 1);
     433                var dPR = getdPR();
    427434                var physicalWidth = target.naturalWidth;
    428435                var physicalHeight = target.naturalHeight;
     
    499506            }
    500507        }
    501         var dPR = (window.devicePixelRatio || 1);
     508        var dPR = getdPR();
    502509        var autosizedElems = document.getElementsByClassName(lazySizes.cfg.loadedClass);
    503510        var i;
  • easy-image-optimizer/tags/4.0.0/includes/lazysizes-pre.js

    r3179564 r3197623  
    1111        threshold: 0,
    1212        skip_autoscale: 0,
     13        use_dpr: 0,
    1314    };
    1415}
  • easy-image-optimizer/tags/4.0.0/includes/lazysizes.min.js

    r3179564 r3197623  
    1 var ewww_webp_supported;void 0===ewww_webp_supported&&(ewww_webp_supported=!1),window.lazySizesConfig=window.lazySizesConfig||{},window.lazySizesConfig.expand=500<document.documentElement.clientHeight&&500<document.documentElement.clientWidth?1e3:740,window.lazySizesConfig.iframeLoadMode=1,"undefined"==typeof eio_lazy_vars&&(eio_lazy_vars={exactdn_domain:".exactdn.com",threshold:0,skip_autoscale:0}),50<eio_lazy_vars.threshold&&(window.lazySizesConfig.expand=eio_lazy_vars.threshold),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(e,n,o){"use strict";var s,l,d={};function c(e,t,a){var i,r;d[e]||(i=n.createElement(t?"link":"script"),r=n.getElementsByTagName("script")[0],t?(i.rel="stylesheet",i.href=e):(i.onload=function(){i.onerror=null,i.onload=null,a()},i.onerror=i.onload,i.src=e),d[e]=!0,d[i.src||i.href]=!0,r.parentNode.insertBefore(i,r))}n.addEventListener&&(l=/\(|\)|\s|'/,s=function(e,t){var a=n.createElement("img");a.onload=function(){a.onload=null,a.onerror=null,a=null,t()},a.onerror=a.onload,a.src=e,a&&a.complete&&a.onload&&a.onload()},addEventListener("lazybeforeunveil",function(e){var t,a,i;if(e.detail.instance==o&&!e.defaultPrevented){var r=e.target;if("none"==r.preload&&(r.preload=r.getAttribute("data-preload")||"auto"),null!=r.getAttribute("data-autoplay"))if(r.getAttribute("data-expand")&&!r.autoplay)try{r.play()}catch(e){}else requestAnimationFrame(function(){r.setAttribute("data-expand","-10"),o.aC(r,o.cfg.lazyClass)});(t=r.getAttribute("data-link"))&&c(t,!0),(t=r.getAttribute("data-script"))&&(e.detail.firesLoad=!0,c(t,null,function(){e.detail.firesLoad=!1,o.fire(r,"_lazyloaded",{},!0,!0)})),(t=r.getAttribute("data-require"))&&(o.cfg.requireJs?o.cfg.requireJs([t]):c(t)),(a=r.getAttribute("data-bg"))&&(e.detail.firesLoad=!0,s(a,function(){r.style.backgroundImage="url("+(l.test(a)?JSON.stringify(a):a)+")",e.detail.firesLoad=!1,o.fire(r,"_lazyloaded",{},!0,!0)})),(i=r.getAttribute("data-poster"))&&(e.detail.firesLoad=!0,s(i,function(){r.poster=i,e.detail.firesLoad=!1,o.fire(r,"_lazyloaded",{},!0,!0)}))}},!1))}),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(u,f,g){"use strict";var n;f.addEventListener&&(n=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(e){var t,a,i,r;e.detail.instance==g&&(e.defaultPrevented||("none"==e.target.preload&&(e.target.preload="auto"),(i=e.target.getAttribute("data-back"))&&(ewww_webp_supported&&(r=e.target.getAttribute("data-back-webp"))&&(i=r),t=u.devicePixelRatio||1,a=Math.round(e.target.offsetWidth*t),r=Math.round(e.target.offsetHeight*t),0===i.search(/\[/)||o(e.target)&&(i=g.hC(e.target,"wp-block-cover")?(g.hC(e.target,"has-parallax")?(a=Math.round(u.screen.width*t),r=Math.round(u.screen.height*t)):r<300&&(r=430),s(i,a,r,"bg-cover")):g.hC(e.target,"cover-image")||g.hC(e.target,"elementor-bg")||g.hC(e.target,"et_parallax_bg")||g.hC(e.target,"bg-image-crop")?s(i,a,r,"bg-cover"):s(i,a,r,"bg")),e.target.style.backgroundImage&&-1===e.target.style.backgroundImage.search(/^initial/)?0===i.search(/\[/)?((i=JSON.parse(i)).forEach(function(e){n.test(e)&&JSON.stringify(e)}),i='url("'+i.join('"), url("')+'"',r=e.target.style.backgroundImage+", "+i,e.target.style.backgroundImage=r):e.target.style.backgroundImage=e.target.style.backgroundImage+', url("'+(n.test(i)?JSON.stringify(i):i)+'")':0===i.search(/\[/)?((i=JSON.parse(i)).forEach(function(e){n.test(e)&&JSON.stringify(e)}),i='url("'+i.join('"), url("')+'"',e.target.style.backgroundImage=i):e.target.style.backgroundImage="url("+(n.test(i)?JSON.stringify(i):i)+")")))},!1));function h(e){var t=e.getAttribute("data-eio-rwidth"),e=e.getAttribute("data-eio-rheight");return 1<t&&1<e?{w:t,h:e}:{w:0,h:0}}function m(e,t=!1){var a=u.devicePixelRatio||1,i=Math.round(e.offsetWidth*a),r=Math.round(e.offsetHeight*a),n=e.getAttribute("data-src"),a=e.getAttribute("data-src-webp");ewww_webp_supported&&a&&-1==n.search("webp=1")&&!t&&(n=a),o(e)&&(a=e,a=g.hC(a,"et_pb_jt_filterable_grid_item_image")||g.hC(a,"ss-foreground-image")||g.hC(a,"img-crop")?"img-crop":g.hC(a,"object-cover")&&(g.hC(a,"object-top")||g.hC(a,"object-bottom"))?"img-w":g.hC(a,"object-cover")&&(g.hC(a,"object-left")||g.hC(a,"object-right"))?"img-h":g.hC(a,"ct-image")&&g.hC(a,"object-cover")||!a.getAttribute("data-srcset")&&!a.srcset&&a.offsetHeight>a.offsetWidth&&1<l(a)?"img-crop":"img",(a=s(n,i,r,a,t))&&n!=a&&(t&&e.setAttribute("src",a),e.setAttribute("data-src",a)))}var o=function(e){if(1==eio_lazy_vars.skip_autoscale)return!1;for(var t=e,a=0;a<=7;a++){if(t.hasAttributes())for(var i=t.attributes,r=/skip-autoscale/,a=i.length-1;0<=a;a--){if(r.test(i[a].name))return!1;if(r.test(i[a].value))return!1}if(!t.parentNode||1!==t.parentNode.nodeType||!t.parentNode.hasAttributes)break;t=t.parentNode}return!0},s=function(e,t,a,i,r=!1){if(null===e)return e;var n=/w=(\d+)/,o=/fit=(\d+),(\d+)/,s=/resize=(\d+),(\d+)/,l=decodeURIComponent(e);if(/\.svg(\?.+)?$/.exec(l))return e;if(0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var d=s.exec(l);if(d&&(t<d[1]||r))return"img-w"===i?l.replace(s,"w="+t):"img-h"===i?l.replace(s,"h="+a):l.replace(s,"resize="+t+","+a);s=n.exec(e);if(s&&(t<=s[1]||r)){if("img-h"===i)return l.replace(n,"h="+a);if("bg-cover"!==i&&"img-crop"!==i)return e.replace(n,"w="+t);var c=Math.abs(s[1]-t);return 20<c||a<1080?e.replace(n,"resize="+t+","+a):e}c=o.exec(l);if(c&&(t<c[1]||r)){if("bg-cover"!==i&&"img-crop"!==i)return"img-w"===i?l.replace(o,"w="+t):"img-h"===i?l.replace(o,"h="+a):l.replace(o,"fit="+t+","+a);l=Math.abs(c[1]-t),o=Math.abs(c[2]-a);return 20<l||20<o?e.replace(n,"resize="+t+","+a):e}if(!s&&!c&&!d)return"img"===i?e+"&fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"&resize="+t+","+a:"img-h"===i||t<a?e+"&h="+a:e+"&w="+t}return-1==e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)?"img"===i?e+"?fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"?resize="+t+","+a:"img-h"===i||t<a?e+"?h="+a:e+"?w="+t:e},p=function(e){e=/-(\d+)x(\d+)\./.exec(e);return e&&1<e[1]&&1<e[2]?{w:e[1],h:e[2]}:{w:0,h:0}},l=function(e){var t=e.getAttribute("width"),a=e.getAttribute("height");if(1<t&&1<a)return t/a;a=!1;if(a=(a=e.src&&-1<e.src.search("http")?e.src:a)||e.getAttribute("data-src")){var i=p(a);if(i.w&&i.h)return i.w/i.h}i=h(e);if(i.w&&i.h)return i.w/i.h;e=function(e){var t;if(e.srcset?t=e.srcset.split(","):(e=e.getAttribute("data-srcset"))&&(t=e.split(",")),t){var a=0,i=t.length;if(i){for(;a<i;a++){var r,n=t[a].trim().split(" ");!n[0].length||(n=p(n[0])).w&&n.h&&(r=n)}if(r.w&&r.h)return r}}return{w:0,h:0}}(e);return e.w&&e.h?e.w/e.h:0};f.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");var t=l(e.target);1<e.target.clientHeight&&t&&(t=Math.ceil(t*e.target.clientHeight),e.detail.width+2<t&&(e.detail.width=t)),void 0!==e.target._lazysizesWidth&&e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)}),f.addEventListener("lazybeforeunveil",function(e){var t,a,i,r,n=e.target,o=n.getAttribute("data-srcset");n.naturalWidth&&!o&&1<n.naturalWidth&&1<n.naturalHeight&&(t=u.devicePixelRatio||1,a=n.naturalWidth,i=n.naturalHeight,(e=h(n)).w&&e.w>a&&(a=e.w,i=e.h),a=n.clientWidth&&1.25*n.clientWidth*t<a,i=n.clientHeight&&1.25*n.clientHeight*t<i,(a||i)&&m(n)),ewww_webp_supported&&(!o||(r=n.getAttribute("data-srcset-webp"))&&n.setAttribute("data-srcset",r),(r=n.getAttribute("data-src-webp"))&&n.setAttribute("data-src",r))});function e(e=!1){e.type&&"load"===e.type&&g.autoSizer.checkElems(),u.devicePixelRatio;var t,a=f.getElementsByClassName(g.cfg.loadedClass),i=a.length;if(i)for(t=0;t<i;t++){var r,n,o,s,l,d,c=a[t];c.src&&!c.srcset&&1<c.naturalWidth&&1<c.naturalHeight&&1<c.clientWidth&&1<c.clientHeight&&(r=c.naturalWidth,n=c.naturalHeight,o=u.innerWidth,s=u.innerHeight,l=h(c),d=p(c.src),l.w?o=l.w:d.w&&(o=d.w),l.h?s=l.h:d.h&&(s=d.h),l=c.clientWidth,d=c.clientHeight,(1.1*r<l&&l<=o||1.1*n<d&&d<=s)&&m(c,!0))}}var t,a,i,r,d=(t=e,r=function(){a=null,t()},function(){i=Date.now(),a=a||setTimeout(c,99)});function c(){var e=Date.now()-i;e<99?setTimeout(c,99-e):(u.requestIdleCallback||r)(r)}addEventListener("load",e),addEventListener("resize",d),setTimeout(e,2e4)}),function(e,t){t=t(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{},function(i,f,n){"use strict";var g,h;if(!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in h=i.lazySizesConfig||i.lazysizesConfig||{},t)e in h||(h[e]=t[e])}(),!f||!f.getElementsByClassName)return{init:function(){},cfg:h,noSupport:!0};function c(e,t){E(e,t)||e.setAttribute("class",(e[v]("class")||"").trim()+" "+t)}function u(e,t){(t=E(e,t))&&e.setAttribute("class",(e[v]("class")||"").replace(t," "))}function m(e,t){var a;!l&&(a=i.picturefill||h.pf)?(t&&t.src&&!e[v]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)}var a,r,t,o,s,p=f.documentElement,l=i.HTMLPictureElement,d="addEventListener",v="getAttribute",e=i[d].bind(i),y=i.setTimeout,b=i.requestAnimationFrame||y,z=i.requestIdleCallback,w=/^picture$/i,C=["load","error","lazyincluded","_lazyloaded"],_={},A=Array.prototype.forEach,E=function(e,t){return _[t]||(_[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),_[t].test(e[v]("class")||"")&&_[t]},x=function(t,a,e){var i=e?d:"removeEventListener";e&&x(t,a),C.forEach(function(e){t[i](e,a)})},L=function(e,t,a,i,r){var n=f.createEvent("Event");return(a=a||{}).instance=g,n.initEvent(t,!i,!r),n.detail=a,e.dispatchEvent(n),n},N=function(e,t){return(getComputedStyle(e,null)||{})[t]},M=function(e,t,a){for(a=a||e.offsetWidth;a<h.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},W=(o=[],s=t=[],k._lsFlush=S,k);function S(){var e=s;for(s=t.length?o:t,r=!(a=!0);e.length;)e.shift()();a=!1}function k(e,t){a&&!t?e.apply(this,arguments):(s.push(e),r||(r=!0,(f.hidden?y:b)(S)))}function H(a,e){return e?function(){W(a)}:function(){var e=this,t=arguments;W(function(){a.apply(e,t)})}}function I(e){function t(){var e=n.now()-i;e<99?y(t,99-e):(z||r)(r)}var a,i,r=function(){a=null,e()};return function(){i=n.now(),a=a||y(t,99)}}var T,j,R,B,O,P,q,F,J,D,$,U,G,K,Q,V,X,Y,Z,ee,te,ae,ie,re,ne,oe,se,le,de,ce,ue,fe=(Z=/^img$/i,ee=/^iframe$/i,te="onscroll"in i&&!/(gle|ing)bot/.test(navigator.userAgent),re=-1,ne=function(e){return(U=null==U?"hidden"==N(f.body,"visibility"):U)||!("hidden"==N(e.parentNode,"visibility")&&"hidden"==N(e,"visibility"))},G=he,Q=ie=ae=0,V=h.throttleDelay,X=h.ricTimeout,Y=z&&49<X?function(){z(me,{timeout:X}),X!==h.ricTimeout&&(X=h.ricTimeout)}:H(function(){y(me)},!0),se=H(pe),le=function(e){se({target:e.target})},de=H(function(t,e,a,i,r){var n,o,s,l,d;(s=L(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(a?c(t,h.autosizesClass):t.setAttribute("sizes",i)),n=t[v](h.srcsetAttr),a=t[v](h.srcAttr),r&&(o=(d=t.parentNode)&&w.test(d.nodeName||"")),l=e.firesLoad||"src"in t&&(n||a||o),s={target:t},c(t,h.loadingClass),l&&(clearTimeout(R),R=y(ge,2500),x(t,le,!0)),o&&A.call(d.getElementsByTagName("source"),ve),n?t.setAttribute("srcset",n):a&&!o&&(ee.test(t.nodeName)?(i=a,0==(d=(e=t).getAttribute("data-load-mode")||h.iframeLoadMode)?e.contentWindow.location.replace(i):1==d&&(e.src=i)):t.src=a),r&&(n||o)&&m(t,{src:a})),t._lazyRace&&delete t._lazyRace,u(t,h.lazyClass),W(function(){var e=t.complete&&1<t.naturalWidth;l&&!e||(e&&c(t,h.fastLoadedClass),pe(s),t._lazyCache=!0,y(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&ie--},!0)}),ue=I(function(){h.loadMode=3,oe()}),{_:function(){O=n.now(),g.elements=f.getElementsByClassName(h.lazyClass),T=f.getElementsByClassName(h.lazyClass+" "+h.preloadClass),e("scroll",oe,!0),e("resize",oe,!0),e("pageshow",function(e){var t;!e.persisted||(t=f.querySelectorAll("."+h.loadingClass)).length&&t.forEach&&b(function(){t.forEach(function(e){e.complete&&ce(e)})})}),i.MutationObserver?new MutationObserver(oe).observe(p,{childList:!0,subtree:!0,attributes:!0}):(p[d]("DOMNodeInserted",oe,!0),p[d]("DOMAttrModified",oe,!0),setInterval(oe,999)),e("hashchange",oe,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){f[d](e,oe,!0)}),/d$|^c/.test(f.readyState)?be():(e("load",be),f[d]("DOMContentLoaded",oe),y(be,2e4)),g.elements.length?(he(),W._lsFlush()):oe()},checkElems:oe=function(e){var t;(e=!0===e)&&(X=33),K||(K=!0,(t=V-(n.now()-Q))<0&&(t=0),e||t<9?Y():y(Y,t))},unveil:ce=function(e){var t,a,i,r;e._lazyRace||(!(r="auto"==(i=(a=Z.test(e.nodeName))&&(e[v](h.sizesAttr)||e[v]("sizes"))))&&j||!a||!e[v]("src")&&!e.srcset||e.complete||E(e,h.errorClass)||!E(e,h.lazyClass))&&(t=L(e,"lazyunveilread").detail,r&&_e.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ie++,de(e,t,r,i,a))},_aLSL:ye});function ge(e){ie--,e&&!(ie<0)&&e.target||(ie=0)}function he(){var e,t,a,i,r,n,o,s,l,d,c,u=g.elements;if((B=h.loadMode)&&ie<8&&(e=u.length)){for(t=0,re++;t<e;t++)if(u[t]&&!u[t]._lazyRace)if(!te||g.prematureUnveil&&g.prematureUnveil(u[t]))ce(u[t]);else if((o=u[t][v]("data-expand"))&&(r=+o)||(r=ae),l||(l=!h.expand||h.expand<1?500<p.clientHeight&&500<p.clientWidth?500:370:h.expand,d=(g._defEx=l)*h.expFactor,c=h.hFac,U=null,ae<d&&ie<1&&2<re&&2<B&&!f.hidden?(ae=d,re=0):ae=1<B&&1<re&&ie<6?l:0),s!==r&&(P=innerWidth+r*c,q=innerHeight+r,n=-1*r,s=r),d=u[t].getBoundingClientRect(),($=d.bottom)>=n&&(F=d.top)<=q&&(D=d.right)>=n*c&&(J=d.left)<=P&&($||D||J||F)&&(h.loadHidden||ne(u[t]))&&(j&&ie<3&&!o&&(B<3||re<4)||function(e,t){var a,i=e,r=ne(e);for(F-=t,$+=t,J-=t,D+=t;r&&(i=i.offsetParent)&&i!=f.body&&i!=p;)(r=0<(N(i,"opacity")||1))&&"visible"!=N(i,"overflow")&&(a=i.getBoundingClientRect(),r=D>a.left&&J<a.right&&$>a.top-1&&F<a.bottom+1);return r}(u[t],r))){if(ce(u[t]),i=!0,9<ie)break}else!i&&j&&!a&&ie<4&&re<4&&2<B&&(T[0]||h.preloadAfterLoad)&&(T[0]||!o&&($||D||J||F||"auto"!=u[t][v](h.sizesAttr)))&&(a=T[0]||u[t]);a&&!i&&ce(a)}}function me(){K=!1,Q=n.now(),G()}function pe(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),c(t,h.loadedClass),u(t,h.loadingClass),x(t,le),L(t,"lazyloaded"))}function ve(e){var t,a=e[v](h.srcsetAttr);(t=h.customMedia[e[v]("data-media")||e[v]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)}function ye(){3==h.loadMode&&(h.loadMode=2),ue()}function be(){j||(n.now()-O<999?y(be,999):(j=!0,h.loadMode=3,oe(),e("scroll",ye,!0)))}var ze,we,Ce,_e=(we=H(function(e,t,a,i){var r,n,o;if(e._lazysizesWidth=i,e.setAttribute("sizes",i+="px"),w.test(t.nodeName||""))for(n=0,o=(r=t.getElementsByTagName("source")).length;n<o;n++)r[n].setAttribute("sizes",i);a.detail.dataAttr||m(e,a.detail)}),{_:function(){ze=f.getElementsByClassName(h.autosizesClass),e("resize",Ce)},checkElems:Ce=I(function(){var e,t=ze.length;if(t)for(e=0;e<t;e++)Ae(ze[e])}),updateElem:Ae});function Ae(e,t,a){var i=e.parentNode;i&&(a=M(e,i,a),(t=L(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=t.detail.width)&&a!==e._lazysizesWidth&&we(e,i,t,a))}function Ee(){!Ee.i&&f.getElementsByClassName&&(Ee.i=!0,_e._(),fe._())}return y(function(){h.init&&Ee()}),g={cfg:h,autoSizer:_e,loader:fe,init:Ee,uP:m,aC:c,rC:u,hC:E,fire:L,gW:M,rAF:W}});
     1var ewww_webp_supported;void 0===ewww_webp_supported&&(ewww_webp_supported=!1),window.lazySizesConfig=window.lazySizesConfig||{},window.lazySizesConfig.expand=500<document.documentElement.clientHeight&&500<document.documentElement.clientWidth?1e3:740,window.lazySizesConfig.iframeLoadMode=1,"undefined"==typeof eio_lazy_vars&&(eio_lazy_vars={exactdn_domain:".exactdn.com",threshold:0,skip_autoscale:0,use_dpr:0}),50<eio_lazy_vars.threshold&&(window.lazySizesConfig.expand=eio_lazy_vars.threshold),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(e,n,o){"use strict";var s,l,d={};function c(e,t,a){var r,i;d[e]||(r=n.createElement(t?"link":"script"),i=n.getElementsByTagName("script")[0],t?(r.rel="stylesheet",r.href=e):(r.onload=function(){r.onerror=null,r.onload=null,a()},r.onerror=r.onload,r.src=e),d[e]=!0,d[r.src||r.href]=!0,i.parentNode.insertBefore(r,i))}n.addEventListener&&(l=/\(|\)|\s|'/,s=function(e,t){var a=n.createElement("img");a.onload=function(){a.onload=null,a.onerror=null,a=null,t()},a.onerror=a.onload,a.src=e,a&&a.complete&&a.onload&&a.onload()},addEventListener("lazybeforeunveil",function(e){var t,a,r;if(e.detail.instance==o&&!e.defaultPrevented){var i=e.target;if("none"==i.preload&&(i.preload=i.getAttribute("data-preload")||"auto"),null!=i.getAttribute("data-autoplay"))if(i.getAttribute("data-expand")&&!i.autoplay)try{i.play()}catch(e){}else requestAnimationFrame(function(){i.setAttribute("data-expand","-10"),o.aC(i,o.cfg.lazyClass)});(t=i.getAttribute("data-link"))&&c(t,!0),(t=i.getAttribute("data-script"))&&(e.detail.firesLoad=!0,c(t,null,function(){e.detail.firesLoad=!1,o.fire(i,"_lazyloaded",{},!0,!0)})),(t=i.getAttribute("data-require"))&&(o.cfg.requireJs?o.cfg.requireJs([t]):c(t)),(a=i.getAttribute("data-bg"))&&(e.detail.firesLoad=!0,s(a,function(){i.style.backgroundImage="url("+(l.test(a)?JSON.stringify(a):a)+")",e.detail.firesLoad=!1,o.fire(i,"_lazyloaded",{},!0,!0)})),(r=i.getAttribute("data-poster"))&&(e.detail.firesLoad=!0,s(r,function(){i.poster=r,e.detail.firesLoad=!1,o.fire(i,"_lazyloaded",{},!0,!0)}))}},!1))}),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(u,f,g){"use strict";var n;f.addEventListener&&(n=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(e){var t,a,r,i;e.detail.instance==g&&(e.defaultPrevented||("none"==e.target.preload&&(e.target.preload="auto"),(r=e.target.getAttribute("data-back"))&&(ewww_webp_supported&&(i=e.target.getAttribute("data-back-webp"))&&(r=i),t=v(),a=Math.round(e.target.offsetWidth*t),i=Math.round(e.target.offsetHeight*t),0===r.search(/\[/)||o(e.target)&&(r=g.hC(e.target,"wp-block-cover")?(g.hC(e.target,"has-parallax")?(a=Math.round(u.screen.width*t),i=Math.round(u.screen.height*t)):i<300&&(i=430),s(r,a,i,"bg-cover")):g.hC(e.target,"cover-image")||g.hC(e.target,"elementor-bg")||g.hC(e.target,"et_parallax_bg")||g.hC(e.target,"bg-image-crop")?s(r,a,i,"bg-cover"):s(r,a,i,"bg")),e.target.style.backgroundImage&&-1===e.target.style.backgroundImage.search(/^initial/)?0===r.search(/\[/)?((r=JSON.parse(r)).forEach(function(e){n.test(e)&&JSON.stringify(e)}),r='url("'+r.join('"), url("')+'"',i=e.target.style.backgroundImage+", "+r,e.target.style.backgroundImage=i):e.target.style.backgroundImage=e.target.style.backgroundImage+', url("'+(n.test(r)?JSON.stringify(r):r)+'")':0===r.search(/\[/)?((r=JSON.parse(r)).forEach(function(e){n.test(e)&&JSON.stringify(e)}),r='url("'+r.join('"), url("')+'"',e.target.style.backgroundImage=r):e.target.style.backgroundImage="url("+(n.test(r)?JSON.stringify(r):r)+")")))},!1));function h(e){var t=e.getAttribute("data-eio-rwidth"),e=e.getAttribute("data-eio-rheight");return 1<t&&1<e?{w:t,h:e}:{w:0,h:0}}function m(e,t=!1){var a=v(),r=Math.round(e.offsetWidth*a),i=Math.round(e.offsetHeight*a),n=e.getAttribute("data-src"),a=e.getAttribute("data-src-webp");ewww_webp_supported&&a&&-1==n.search("webp=1")&&!t&&(n=a),o(e)&&(a=e,a=g.hC(a,"et_pb_jt_filterable_grid_item_image")||g.hC(a,"ss-foreground-image")||g.hC(a,"img-crop")?"img-crop":g.hC(a,"object-cover")&&(g.hC(a,"object-top")||g.hC(a,"object-bottom"))?"img-w":g.hC(a,"object-cover")&&(g.hC(a,"object-left")||g.hC(a,"object-right"))?"img-h":g.hC(a,"ct-image")&&g.hC(a,"object-cover")||!a.getAttribute("data-srcset")&&!a.srcset&&a.offsetHeight>a.offsetWidth&&1<l(a)?"img-crop":"img",(a=s(n,r,i,a,t))&&n!=a&&(t&&e.setAttribute("src",a),e.setAttribute("data-src",a)))}var o=function(e){if(1==eio_lazy_vars.skip_autoscale)return!1;for(var t=e,a=0;a<=7;a++){if(t.hasAttributes())for(var r=t.attributes,i=/skip-autoscale/,a=r.length-1;0<=a;a--){if(i.test(r[a].name))return!1;if(i.test(r[a].value))return!1}if(!t.parentNode||1!==t.parentNode.nodeType||!t.parentNode.hasAttributes)break;t=t.parentNode}return!0},s=function(e,t,a,r,i=!1){if(null===e)return e;var n=/w=(\d+)/,o=/fit=(\d+),(\d+)/,s=/resize=(\d+),(\d+)/,l=decodeURIComponent(e);if(/\.svg(\?.+)?$/.exec(l))return e;if(0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var d=s.exec(l);if(d&&(t<d[1]||i))return"img-w"===r?l.replace(s,"w="+t):"img-h"===r?l.replace(s,"h="+a):l.replace(s,"resize="+t+","+a);s=n.exec(e);if(s&&(t<=s[1]||i)){if("img-h"===r)return l.replace(n,"h="+a);if("bg-cover"!==r&&"img-crop"!==r)return e.replace(n,"w="+t);var c=Math.abs(s[1]-t);return 20<c||a<1080?e.replace(n,"resize="+t+","+a):e}c=o.exec(l);if(c&&(t<c[1]||i)){if("bg-cover"!==r&&"img-crop"!==r)return"img-w"===r?l.replace(o,"w="+t):"img-h"===r?l.replace(o,"h="+a):l.replace(o,"fit="+t+","+a);l=Math.abs(c[1]-t),o=Math.abs(c[2]-a);return 20<l||20<o?e.replace(n,"resize="+t+","+a):e}if(!s&&!c&&!d)return"img"===r?e+"&fit="+t+","+a:"bg-cover"===r||"img-crop"===r?e+"&resize="+t+","+a:"img-h"===r||t<a?e+"&h="+a:e+"&w="+t}return-1==e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)?"img"===r?e+"?fit="+t+","+a:"bg-cover"===r||"img-crop"===r?e+"?resize="+t+","+a:"img-h"===r||t<a?e+"?h="+a:e+"?w="+t:e},p=function(e){e=/-(\d+)x(\d+)\./.exec(e);return e&&1<e[1]&&1<e[2]?{w:e[1],h:e[2]}:{w:0,h:0}},l=function(e){var t=e.getAttribute("width"),a=e.getAttribute("height");if(1<t&&1<a)return t/a;a=!1;if(a=(a=e.src&&-1<e.src.search("http")?e.src:a)||e.getAttribute("data-src")){var r=p(a);if(r.w&&r.h)return r.w/r.h}r=h(e);if(r.w&&r.h)return r.w/r.h;e=function(e){var t;if(e.srcset?t=e.srcset.split(","):(e=e.getAttribute("data-srcset"))&&(t=e.split(",")),t){var a=0,r=t.length;if(r){for(;a<r;a++){var i,n=t[a].trim().split(" ");!n[0].length||(n=p(n[0])).w&&n.h&&(i=n)}if(i.w&&i.h)return i}}return{w:0,h:0}}(e);return e.w&&e.h?e.w/e.h:0},v=function(){return eio_lazy_vars.use_dpr&&1<u.devicePixelRatio?u.devicePixelRatio:1};f.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");var t=l(e.target);1<e.target.clientHeight&&t&&(t=Math.ceil(t*e.target.clientHeight),e.detail.width+2<t&&(e.detail.width=t)),void 0!==e.target._lazysizesWidth&&e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)}),f.addEventListener("lazybeforeunveil",function(e){var t,a,r,i,n=e.target,o=n.getAttribute("data-srcset");n.naturalWidth&&!o&&1<n.naturalWidth&&1<n.naturalHeight&&(t=v(),a=n.naturalWidth,r=n.naturalHeight,(e=h(n)).w&&e.w>a&&(a=e.w,r=e.h),a=n.clientWidth&&1.25*n.clientWidth*t<a,r=n.clientHeight&&1.25*n.clientHeight*t<r,(a||r)&&m(n)),ewww_webp_supported&&(!o||(i=n.getAttribute("data-srcset-webp"))&&n.setAttribute("data-srcset",i),(i=n.getAttribute("data-src-webp"))&&n.setAttribute("data-src",i))});function e(e=!1){e.type&&"load"===e.type&&g.autoSizer.checkElems(),v();var t,a=f.getElementsByClassName(g.cfg.loadedClass),r=a.length;if(r)for(t=0;t<r;t++){var i,n,o,s,l,d,c=a[t];c.src&&!c.srcset&&1<c.naturalWidth&&1<c.naturalHeight&&1<c.clientWidth&&1<c.clientHeight&&(i=c.naturalWidth,n=c.naturalHeight,o=u.innerWidth,s=u.innerHeight,l=h(c),d=p(c.src),l.w?o=l.w:d.w&&(o=d.w),l.h?s=l.h:d.h&&(s=d.h),l=c.clientWidth,d=c.clientHeight,(1.1*i<l&&l<=o||1.1*n<d&&d<=s)&&m(c,!0))}}var t,a,r,i,d=(t=e,i=function(){a=null,t()},function(){r=Date.now(),a=a||setTimeout(c,99)});function c(){var e=Date.now()-r;e<99?setTimeout(c,99-e):(u.requestIdleCallback||i)(i)}addEventListener("load",e),addEventListener("resize",d),setTimeout(e,2e4)}),function(e,t){t=t(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{},function(r,f,n){"use strict";var g,h;if(!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in h=r.lazySizesConfig||r.lazysizesConfig||{},t)e in h||(h[e]=t[e])}(),!f||!f.getElementsByClassName)return{init:function(){},cfg:h,noSupport:!0};function c(e,t){E(e,t)||e.setAttribute("class",(e[v]("class")||"").trim()+" "+t)}function u(e,t){(t=E(e,t))&&e.setAttribute("class",(e[v]("class")||"").replace(t," "))}function m(e,t){var a;!l&&(a=r.picturefill||h.pf)?(t&&t.src&&!e[v]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)}var a,i,t,o,s,p=f.documentElement,l=r.HTMLPictureElement,d="addEventListener",v="getAttribute",e=r[d].bind(r),y=r.setTimeout,b=r.requestAnimationFrame||y,z=r.requestIdleCallback,w=/^picture$/i,_=["load","error","lazyincluded","_lazyloaded"],C={},A=Array.prototype.forEach,E=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[v]("class")||"")&&C[t]},L=function(t,a,e){var r=e?d:"removeEventListener";e&&L(t,a),_.forEach(function(e){t[r](e,a)})},x=function(e,t,a,r,i){var n=f.createEvent("Event");return(a=a||{}).instance=g,n.initEvent(t,!r,!i),n.detail=a,e.dispatchEvent(n),n},N=function(e,t){return(getComputedStyle(e,null)||{})[t]},M=function(e,t,a){for(a=a||e.offsetWidth;a<h.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},W=(o=[],s=t=[],k._lsFlush=S,k);function S(){var e=s;for(s=t.length?o:t,i=!(a=!0);e.length;)e.shift()();a=!1}function k(e,t){a&&!t?e.apply(this,arguments):(s.push(e),i||(i=!0,(f.hidden?y:b)(S)))}function H(a,e){return e?function(){W(a)}:function(){var e=this,t=arguments;W(function(){a.apply(e,t)})}}function I(e){function t(){var e=n.now()-r;e<99?y(t,99-e):(z||i)(i)}var a,r,i=function(){a=null,e()};return function(){r=n.now(),a=a||y(t,99)}}var T,j,B,O,R,q,F,J,P,D,$,U,G,K,Q,V,X,Y,Z,ee,te,ae,re,ie,ne,oe,se,le,de,ce,ue,fe=(Z=/^img$/i,ee=/^iframe$/i,te="onscroll"in r&&!/(gle|ing)bot/.test(navigator.userAgent),ie=-1,ne=function(e){return(U=null==U?"hidden"==N(f.body,"visibility"):U)||!("hidden"==N(e.parentNode,"visibility")&&"hidden"==N(e,"visibility"))},G=he,Q=re=ae=0,V=h.throttleDelay,X=h.ricTimeout,Y=z&&49<X?function(){z(me,{timeout:X}),X!==h.ricTimeout&&(X=h.ricTimeout)}:H(function(){y(me)},!0),se=H(pe),le=function(e){se({target:e.target})},de=H(function(t,e,a,r,i){var n,o,s,l,d;(s=x(t,"lazybeforeunveil",e)).defaultPrevented||(r&&(a?c(t,h.autosizesClass):t.setAttribute("sizes",r)),n=t[v](h.srcsetAttr),a=t[v](h.srcAttr),i&&(o=(d=t.parentNode)&&w.test(d.nodeName||"")),l=e.firesLoad||"src"in t&&(n||a||o),s={target:t},c(t,h.loadingClass),l&&(clearTimeout(B),B=y(ge,2500),L(t,le,!0)),o&&A.call(d.getElementsByTagName("source"),ve),n?t.setAttribute("srcset",n):a&&!o&&(ee.test(t.nodeName)?(r=a,0==(d=(e=t).getAttribute("data-load-mode")||h.iframeLoadMode)?e.contentWindow.location.replace(r):1==d&&(e.src=r)):t.src=a),i&&(n||o)&&m(t,{src:a})),t._lazyRace&&delete t._lazyRace,u(t,h.lazyClass),W(function(){var e=t.complete&&1<t.naturalWidth;l&&!e||(e&&c(t,h.fastLoadedClass),pe(s),t._lazyCache=!0,y(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&re--},!0)}),ue=I(function(){h.loadMode=3,oe()}),{_:function(){R=n.now(),g.elements=f.getElementsByClassName(h.lazyClass),T=f.getElementsByClassName(h.lazyClass+" "+h.preloadClass),e("scroll",oe,!0),e("resize",oe,!0),e("pageshow",function(e){var t;!e.persisted||(t=f.querySelectorAll("."+h.loadingClass)).length&&t.forEach&&b(function(){t.forEach(function(e){e.complete&&ce(e)})})}),r.MutationObserver?new MutationObserver(oe).observe(p,{childList:!0,subtree:!0,attributes:!0}):(p[d]("DOMNodeInserted",oe,!0),p[d]("DOMAttrModified",oe,!0),setInterval(oe,999)),e("hashchange",oe,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){f[d](e,oe,!0)}),/d$|^c/.test(f.readyState)?be():(e("load",be),f[d]("DOMContentLoaded",oe),y(be,2e4)),g.elements.length?(he(),W._lsFlush()):oe()},checkElems:oe=function(e){var t;(e=!0===e)&&(X=33),K||(K=!0,(t=V-(n.now()-Q))<0&&(t=0),e||t<9?Y():y(Y,t))},unveil:ce=function(e){var t,a,r,i;e._lazyRace||(!(i="auto"==(r=(a=Z.test(e.nodeName))&&(e[v](h.sizesAttr)||e[v]("sizes"))))&&j||!a||!e[v]("src")&&!e.srcset||e.complete||E(e,h.errorClass)||!E(e,h.lazyClass))&&(t=x(e,"lazyunveilread").detail,i&&Ce.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,re++,de(e,t,i,r,a))},_aLSL:ye});function ge(e){re--,e&&!(re<0)&&e.target||(re=0)}function he(){var e,t,a,r,i,n,o,s,l,d,c,u=g.elements;if((O=h.loadMode)&&re<8&&(e=u.length)){for(t=0,ie++;t<e;t++)if(u[t]&&!u[t]._lazyRace)if(!te||g.prematureUnveil&&g.prematureUnveil(u[t]))ce(u[t]);else if((o=u[t][v]("data-expand"))&&(i=+o)||(i=ae),l||(l=!h.expand||h.expand<1?500<p.clientHeight&&500<p.clientWidth?500:370:h.expand,d=(g._defEx=l)*h.expFactor,c=h.hFac,U=null,ae<d&&re<1&&2<ie&&2<O&&!f.hidden?(ae=d,ie=0):ae=1<O&&1<ie&&re<6?l:0),s!==i&&(q=innerWidth+i*c,F=innerHeight+i,n=-1*i,s=i),d=u[t].getBoundingClientRect(),($=d.bottom)>=n&&(J=d.top)<=F&&(D=d.right)>=n*c&&(P=d.left)<=q&&($||D||P||J)&&(h.loadHidden||ne(u[t]))&&(j&&re<3&&!o&&(O<3||ie<4)||function(e,t){var a,r=e,i=ne(e);for(J-=t,$+=t,P-=t,D+=t;i&&(r=r.offsetParent)&&r!=f.body&&r!=p;)(i=0<(N(r,"opacity")||1))&&"visible"!=N(r,"overflow")&&(a=r.getBoundingClientRect(),i=D>a.left&&P<a.right&&$>a.top-1&&J<a.bottom+1);return i}(u[t],i))){if(ce(u[t]),r=!0,9<re)break}else!r&&j&&!a&&re<4&&ie<4&&2<O&&(T[0]||h.preloadAfterLoad)&&(T[0]||!o&&($||D||P||J||"auto"!=u[t][v](h.sizesAttr)))&&(a=T[0]||u[t]);a&&!r&&ce(a)}}function me(){K=!1,Q=n.now(),G()}function pe(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),c(t,h.loadedClass),u(t,h.loadingClass),L(t,le),x(t,"lazyloaded"))}function ve(e){var t,a=e[v](h.srcsetAttr);(t=h.customMedia[e[v]("data-media")||e[v]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)}function ye(){3==h.loadMode&&(h.loadMode=2),ue()}function be(){j||(n.now()-R<999?y(be,999):(j=!0,h.loadMode=3,oe(),e("scroll",ye,!0)))}var ze,we,_e,Ce=(we=H(function(e,t,a,r){var i,n,o;if(e._lazysizesWidth=r,e.setAttribute("sizes",r+="px"),w.test(t.nodeName||""))for(n=0,o=(i=t.getElementsByTagName("source")).length;n<o;n++)i[n].setAttribute("sizes",r);a.detail.dataAttr||m(e,a.detail)}),{_:function(){ze=f.getElementsByClassName(h.autosizesClass),e("resize",_e)},checkElems:_e=I(function(){var e,t=ze.length;if(t)for(e=0;e<t;e++)Ae(ze[e])}),updateElem:Ae});function Ae(e,t,a){var r=e.parentNode;r&&(a=M(e,r,a),(t=x(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=t.detail.width)&&a!==e._lazysizesWidth&&we(e,r,t,a))}function Ee(){!Ee.i&&f.getElementsByClassName&&(Ee.i=!0,Ce._(),fe._())}return y(function(){h.init&&Ee()}),g={cfg:h,autoSizer:Ce,loader:fe,init:Ee,uP:m,aC:c,rC:u,hC:E,fire:x,gW:M,rAF:W}});
  • easy-image-optimizer/tags/4.0.0/readme.txt

    r3179564 r3197623  
    22Contributors: nosilver4u
    33Tags: image, resize, webp, lazy load, compress
    4 Requires at least: 6.4
     4Requires at least: 6.5
    55Tested up to: 6.7
    66Requires PHP: 8.1
    7 Stable tag: 3.9.4
     7Stable tag: 4.0.0
    88License: GPLv3
    99
     
    5757
    5858* If you would like to help translate this plugin in your language, get started here: https://translate.wordpress.org/projects/wp-plugins/easy-image-optimizer/
     59
     60= 4.0.0 =
     61*Release Date - November 26, 2024*
     62
     63* added: Above the Fold setting for Lazy Load (previously EIO_LAZY_FOLD override)
     64* changed: gravatar images excluded from Above the Fold/EIO_LAZY_FOLD counts
     65* fixed: Easy IO adding images to srcset combined with broken WooCommerce gallery thumbnails causes oversized image sizes to be loaded
     66* fixed: Easy IO srcset filler using incorrect width for calculations
    5967
    6068= 3.9.4 =
  • easy-image-optimizer/tags/4.0.0/uninstall.php

    r2142075 r3197623  
    2525    delete_option( 'exactdn_all_the_things' );
    2626    delete_option( 'exactdn_lossy' );
     27    delete_option( 'exactdn_hidpi' );
    2728}
  • easy-image-optimizer/tags/4.0.0/unique.php

    r3150977 r3197623  
    964964                    <td>&nbsp;</td>
    965965                    <td>
     966                        <label for='easyio_ll_abovethefold'><strong><?php esc_html_e( 'Above the Fold', 'easy-image-optimizer' ); ?></strong></label>
     967                        <?php easyio_help_link( 'https://docs.ewww.io/article/74-lazy-load', '5c6c36ed042863543ccd2d9b' ); ?>
     968                        <input type='number' step='1' min='0' class='small-text' id='easyio_ll_abovethefold' name='easyio_ll_abovethefold' value='<?php echo defined( 'EIO_LAZY_FOLD' ) ? (int) constant( 'EIO_LAZY_FOLD' ) : (int) easyio_get_option( 'easyio_ll_abovethefold' ); ?>' <?php disabled( defined( 'EIO_LAZY_FOLD' ) ); ?> />
     969                        <?php esc_html_e( 'Skip this many images from lazy loading so that above the fold images load more quickly.', 'easy-image-optimizer' ); ?>
     970                        <p class='description'>
     971                            <?php esc_html_e( 'This will exclude images from auto-scaling, which may decrease performance if those images are not properly sized.', 'easy-image-optimizer' ); ?>
     972                        </p>
     973                    </td>
     974                </tr>
     975                <?php easyio_debug_message( 'LL above the fold: ' . easyio_get_option( 'easyio_ll_abovethefold' ) ); ?>
     976                <tr>
     977                    <td>&nbsp;</td>
     978                    <td>
    966979                        <input type='checkbox' name='easyio_use_lqip' value='true' id='easyio_use_lqip' <?php checked( easyio_get_option( 'easyio_use_lqip' ) ); ?> />
    967980                        <label for='easyio_use_lqip'><strong>LQIP</strong></label>
  • easy-image-optimizer/trunk/changelog.txt

    r3179564 r3197623  
     1= 4.0.0 =
     2*Release Date - November 26, 2024*
     3
     4* added: Above the Fold setting for Lazy Load (previously EIO_LAZY_FOLD override)
     5* changed: gravatar images excluded from Above the Fold/EIO_LAZY_FOLD counts
     6* fixed: Easy IO adding images to srcset combined with broken WooCommerce gallery thumbnails causes oversized image sizes to be loaded
     7* fixed: Easy IO srcset filler using incorrect width for calculations
     8
    19= 3.9.4 =
    210*Release Date - October 31, 2024*
  • easy-image-optimizer/trunk/classes/class-base.php

    r3150977 r3197623  
    606606        if ( $this->get_option( 'ewww_image_optimizer_gif_level' ) || 'all' === $select ) {
    607607            $supported_types[] = 'image/gif';
     608        }
     609        if ( $this->get_option( 'ewww_image_optimizer_webp_level' ) || 'all' === $select ) {
     610            $supported_types[] = 'image/webp';
    608611        }
    609612        if ( $this->get_option( 'ewww_image_optimizer_pdf_level' ) || 'all' === $select ) {
  • easy-image-optimizer/trunk/classes/class-exactdn.php

    r3125548 r3197623  
    292292        \add_filter( 'rest_request_before_callbacks', array( $this, 'parse_restapi_maybe' ), 10, 3 );
    293293
    294         // Check to see if the OMGF plugin is active, and suppress our font rewriting if it is.
    295         if ( ( \defined( 'OMGF_PLUGIN_FILE' ) || \defined( 'OMGF_DB_VERSION' ) ) && ! \defined( 'EASYIO_REPLACE_GOOGLE_FONTS' ) ) {
    296             \define( 'EASYIO_REPLACE_GOOGLE_FONTS', false );
    297         }
     294        \add_filter( 'exactdn_srcset_multipliers', array( $this, 'add_hidpi_srcset_multipliers' ) );
    298295
    299296        // Overrides for admin-ajax images.
     
    313310        // Filter for generic use by other plugins/themes.
    314311        \add_filter( 'exactdn_local_to_cdn_url', array( $this, 'plugin_get_image_url' ) );
     312
     313        // Check to see if the OMGF plugin is active, and suppress our font rewriting if it is.
     314        if ( ( \defined( 'OMGF_PLUGIN_FILE' ) || \defined( 'OMGF_DB_VERSION' ) ) && ! \defined( 'EASYIO_REPLACE_GOOGLE_FONTS' ) ) {
     315            \define( 'EASYIO_REPLACE_GOOGLE_FONTS', false );
     316        }
    315317
    316318        // Filter for Divi Pixel plugin SVG images.
     
    360362        // Filter for legacy WooCommerce API endpoints.
    361363        \add_filter( 'woocommerce_api_product_response', array( $this, 'woocommerce_api_product_response' ) );
     364        // Filter to fix WooCommerce srcset madness.
     365        \add_action( 'template_redirect', array( $this, 'check_conditionals' ) );
    362366
    363367        // DNS prefetching.
     
    28592863         * @param array|bool $multipliers Array of multipliers to use or false to bypass.
    28602864         */
    2861         $multipliers = \apply_filters( 'exactdn_srcset_multipliers', array( .2, .4, .6, .8, 1, 2, 3, 1920 ) );
     2865        $multipliers = \apply_filters( 'exactdn_srcset_multipliers', array( .2, .4, .6, .8, 1 ) );
    28622866
    28632867        if ( empty( $url ) || empty( $multipliers ) ) {
     
    29302934                $this->debug_message( 'soft cropping' );
    29312935                $crop = 'soft';
    2932                 $base = $this->get_content_width(); // Provide a default width if none set by the theme.
     2936                // If the full width is larger than the requested width, we have a usable full width.
     2937                // Otherwise use the requested width for soft-crop calculations.
     2938                $base = $fullwidth > $reqwidth ? $fullwidth : $reqwidth;
    29332939            } else {
    29342940                $this->debug_message( 'hard cropping' );
     
    29472953                    $newwidth = 1920;
    29482954                    if ( ! $w_descriptor || 1920 >= $reqwidth || 'soft' !== $crop ) {
     2955                        $this->debug_message( "skipping $multiplier due to no w descriptor, larger than $reqwidth, or $crop !== soft" );
    29492956                        continue;
    29502957                    }
    29512958                }
    29522959                if ( $newwidth < 50 ) {
     2960                    $this->debug_message( "skipping $multiplier, as $newwidth is smaller than 50" );
    29532961                    continue;
    29542962                }
     
    29562964                    // If a new width would be within 50 pixels of an existing one or larger than the full size image, skip.
    29572965                    if ( \abs( $currentwidth - $newwidth ) < 50 || ( $newwidth > $fullwidth ) ) {
     2966                        $this->debug_message( "skipping $multiplier (width $newwidth) too close to $currentwidth, or larger than $fullwidth" );
    29582967                        continue 2; // Back to the foreach ( $multipliers as $multiplier ).
    29592968                    }
    2960                 } // foreach ( $currentwidths as $currentwidth ){
    2961 
     2969                }
     2970
     2971                $this->debug_message( "using $multiplier multiplier: $newwidth px" );
    29622972                if ( 1 === $multiplier && \abs( $newwidth - $fullwidth ) < 5 ) {
    29632973                    $args = array();
     
    30513061         * @param array|bool $multipliers Array of multipliers to use or false to bypass.
    30523062         */
    3053         $multipliers = \apply_filters( 'exactdn_srcset_multipliers', array( .2, .4, .6, .8, 1, 2, 3, 1920 ) );
     3063        $multipliers = \apply_filters( 'exactdn_srcset_multipliers', array( .2, .4, .6, .8, 1 ) );
    30543064        /**
    30553065         * Filter the width ExactDN will use to create srcset attribute.
     
    34503460
    34513461    /**
     3462     * Runs on template_redirect to run checks via "conditional tags", that must be done after the WP_Query object is setup.
     3463     */
     3464    public function check_conditionals() {
     3465        // Woo gallery thumbnails on product pages, as of 9.4, get srcset with no sizes. If we add more images to the srcset, this blows things up even worse.
     3466        // Suppress hi-dpi srcset multipliers if this is a singular product page.
     3467        if ( \function_exists( '\is_product' ) && \is_product() ) {
     3468            $this->debug_message( 'disabling hidpi multipliers (filter)' );
     3469            \remove_filter( 'exactdn_srcset_multipliers', array( $this, 'add_hidpi_srcset_multipliers' ) );
     3470        }
     3471    }
     3472
     3473    /**
     3474     * Add multipliers for high-DPI devices.
     3475     *
     3476     * @param array $multipliers An array of multipliers.
     3477     * @return array The modified list of multipliers.
     3478     */
     3479    public function add_hidpi_srcset_multipliers( $multipliers ) {
     3480        if ( $this->get_option( 'exactdn_hidpi' ) ) {
     3481            $this->debug_message( 'adding hidpi multipliers' );
     3482            return array( .2, .4, .6, .8, 1, 2, 3, 1920 );
     3483        }
     3484        return $multipliers;
     3485    }
     3486
     3487    /**
    34523488     * Handle image urls within the NextGEN pro lightbox displays.
    34533489     *
  • easy-image-optimizer/trunk/classes/class-lazy-load.php

    r3179564 r3197623  
    383383        }
    384384
    385         $above_the_fold   = \apply_filters( 'eio_lazy_fold', 0 );
     385        $above_the_fold   = (int) \apply_filters( 'eio_lazy_fold', $this->get_option( $this->prefix . 'll_abovethefold' ) );
    386386        $images_processed = 0;
    387387        $replacements     = array();
     
    509509            foreach ( $replacements as $position => $replacement ) {
    510510                $this->debug_message( "possible replacement at $position" );
    511                 ++$images_processed;
     511                if ( $this->is_counted( $replacement['orig'] ) ) {
     512                    ++$images_processed;
     513                }
    512514                if ( $images_processed <= $above_the_fold ) {
    513515                    $this->debug_message( 'image above fold threshold' );
     
    526528        $this->debug_message( 'all done parsing page for lazy' );
    527529        return $buffer;
     530    }
     531
     532    /**
     533     * Check whether an image is counted for above the fold purposes.
     534     *
     535     * @param string $image The image tag to parse.
     536     * @return bool True if it should be counted, false otherwise.
     537     */
     538    public function is_counted( $image ) {
     539        $uncounted_images = array(
     540            'secure.gravatar.com',
     541        );
     542        $uncounted_images = \apply_filters( 'eio_uncounted_lazy_images', $uncounted_images );
     543        foreach ( $uncounted_images as $uncounted_image_pattern ) {
     544            if ( false !== strpos( $image, $uncounted_image_pattern ) ) {
     545                return false;
     546            }
     547        }
     548        return true;
    528549    }
    529550
     
    10881109            \array_merge(
    10891110                array(
     1111                    'data:image/',
    10901112                    'data-no-lazy=',
    10911113                    'header-gallery-wrapper ',
     
    13491371                        'skip_autoscale' => ( \defined( 'EIO_LL_AUTOSCALE' ) && ! EIO_LL_AUTOSCALE ? 1 : 0 ),
    13501372                        'threshold'      => (int) $threshold > 50 ? (int) $threshold : 0,
     1373                        'use_dpr'        => (int) $this->get_option( 'exactdn_hidpi' ),
    13511374                    )
    13521375                )
     
    13891412                        'skip_autoscale' => ( \defined( 'EIO_LL_AUTOSCALE' ) && ! EIO_LL_AUTOSCALE ? 1 : 0 ),
    13901413                        'threshold'      => (int) $threshold > 50 ? (int) $threshold : 0,
     1414                        'use_dpr'        => (int) $this->get_option( 'exactdn_hidpi' ),
    13911415                    )
    13921416                )
  • easy-image-optimizer/trunk/classes/class-plugin.php

    r3125548 r3197623  
    164164            $exactdn_lossy = ( empty( $_POST['exactdn_lossy'] ) ? false : true );
    165165            \update_site_option( 'exactdn_lossy', $exactdn_lossy );
     166            $exactdn_hidpi = ( empty( $_POST['exactdn_hidpi'] ) ? false : true );
     167            \update_site_option( 'exactdn_hidpi', $exactdn_hidpi );
    166168            $exactdn_exclude = empty( $_POST['exactdn_exclude'] ) ? '' : sanitize_textarea_field( wp_unslash( $_POST['exactdn_exclude'] ) );
    167169            \update_site_option( 'exactdn_exclude', $this->exclude_paths_sanitize( $exactdn_exclude ) );
     
    170172            $easyio_lazy_load = ( empty( $_POST['easyio_lazy_load'] ) ? false : true );
    171173            \update_site_option( 'easyio_lazy_load', $easyio_lazy_load );
     174            $easyio_ll_autoscale = ( empty( $_POST['easyio_ll_autoscale'] ) ? false : true );
     175            \update_site_option( 'easyio_ll_autoscale', $easyio_ll_autoscale );
     176            $easyio_ll_abovethefold = ! empty( $_POST['easyio_ll_abovethefold'] ) ? (int) $_POST['easyio_ll_abovethefold'] : 0;
     177            \update_site_option( 'easyio_ll_abovethefold', $easyio_ll_abovethefold );
    172178            $easyio_use_lqip = ( empty( $_POST['easyio_use_lqip'] ) ? false : true );
    173179            \update_site_option( 'easyio_use_lqip', $easyio_use_lqip );
     
    201207        \register_setting( 'easyio_options', 'exactdn_all_the_things', 'boolval' );
    202208        \register_setting( 'easyio_options', 'exactdn_lossy', 'boolval' );
     209        \register_setting( 'easyio_options', 'exactdn_hidpi', 'boolval' );
    203210        \register_setting( 'easyio_options', 'exactdn_exclude', array( $this, 'exclude_paths_sanitize' ) );
    204211        \register_setting( 'easyio_options', 'easyio_add_missing_dims', 'boolval' );
    205212        \register_setting( 'easyio_options', 'easyio_lazy_load', 'boolval' );
     213        \register_setting( 'easyio_options', 'easyio_ll_abovethefold', 'intval' );
    206214        \register_setting( 'easyio_options', 'easyio_use_lqip', 'boolval' );
    207215        \register_setting( 'easyio_options', 'easyio_use_dcip', 'boolval' );
     
    222230        \add_option( 'exactdn_all_the_things', false );
    223231        \add_option( 'exactdn_lossy', false );
     232        \add_option( 'exactdn_hidpi', false );
    224233        \add_option( 'exactdn_exclude', '' );
    225234        \add_option( 'exactdn_sub_folder', false );
     
    232241        \add_option( 'easyio_use_siip', false );
    233242        \add_option( 'easyio_ll_autoscale', true );
     243        \add_option( 'easyio_ll_abovethefold', 0 );
    234244        \add_option( 'easyio_ll_exclude', '' );
    235245        \add_option( 'easyio_ll_all_things', '' );
  • easy-image-optimizer/trunk/easy-image-optimizer.php

    r3179564 r3197623  
    1414Description: Easily speed up your website to better connect with your visitors. Properly compress and size/scale images. Includes lazy load and WebP auto-convert.
    1515Author: Exactly WWW
    16 Version: 3.9.4
    17 Requires at least: 6.4
     16Version: 4.0.0
     17Requires at least: 6.5
    1818Requires PHP: 8.1
    1919Author URI: https://ewww.io/
     
    3030    add_action( 'admin_notices', 'easyio_unsupported_php' );
    3131} elseif ( false === strpos( add_query_arg( '', '' ), 'easyio_disable=1' ) ) {
    32     define( 'EASYIO_VERSION', 394 );
     32    define( 'EASYIO_VERSION', 400 );
    3333
    3434    /**
  • easy-image-optimizer/trunk/includes/lazysizes-post.js

    r3076002 r3197623  
    4646                        }
    4747                    }
    48                     var dPR = (window.devicePixelRatio || 1);
     48                    var dPR = getdPR();
    4949                    var targetWidth  = Math.round(e.target.offsetWidth * dPR);
    5050                    var targetHeight = Math.round(e.target.offsetHeight * dPR);
     
    368368
    369369    var updateImgElem = function(target,upScale=false){
    370         var dPR = (window.devicePixelRatio || 1);
     370        var dPR = getdPR();
    371371        var targetWidth = Math.round(target.offsetWidth * dPR);
    372372        var targetHeight = Math.round(target.offsetHeight * dPR);
     
    391391        }
    392392    };
     393
     394    var getdPR = function() {
     395        if (eio_lazy_vars.use_dpr && window.devicePixelRatio > 1) {
     396            return window.devicePixelRatio;
     397        }
     398        return 1;
     399    }
    393400
    394401    document.addEventListener('lazybeforesizes', function(e){
     
    424431                // For each image with a natural width which isn't
    425432                // a 1x1 image, check its size.
    426                 var dPR = (window.devicePixelRatio || 1);
     433                var dPR = getdPR();
    427434                var physicalWidth = target.naturalWidth;
    428435                var physicalHeight = target.naturalHeight;
     
    499506            }
    500507        }
    501         var dPR = (window.devicePixelRatio || 1);
     508        var dPR = getdPR();
    502509        var autosizedElems = document.getElementsByClassName(lazySizes.cfg.loadedClass);
    503510        var i;
  • easy-image-optimizer/trunk/includes/lazysizes-pre.js

    r3179564 r3197623  
    1111        threshold: 0,
    1212        skip_autoscale: 0,
     13        use_dpr: 0,
    1314    };
    1415}
  • easy-image-optimizer/trunk/includes/lazysizes.min.js

    r3179564 r3197623  
    1 var ewww_webp_supported;void 0===ewww_webp_supported&&(ewww_webp_supported=!1),window.lazySizesConfig=window.lazySizesConfig||{},window.lazySizesConfig.expand=500<document.documentElement.clientHeight&&500<document.documentElement.clientWidth?1e3:740,window.lazySizesConfig.iframeLoadMode=1,"undefined"==typeof eio_lazy_vars&&(eio_lazy_vars={exactdn_domain:".exactdn.com",threshold:0,skip_autoscale:0}),50<eio_lazy_vars.threshold&&(window.lazySizesConfig.expand=eio_lazy_vars.threshold),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(e,n,o){"use strict";var s,l,d={};function c(e,t,a){var i,r;d[e]||(i=n.createElement(t?"link":"script"),r=n.getElementsByTagName("script")[0],t?(i.rel="stylesheet",i.href=e):(i.onload=function(){i.onerror=null,i.onload=null,a()},i.onerror=i.onload,i.src=e),d[e]=!0,d[i.src||i.href]=!0,r.parentNode.insertBefore(i,r))}n.addEventListener&&(l=/\(|\)|\s|'/,s=function(e,t){var a=n.createElement("img");a.onload=function(){a.onload=null,a.onerror=null,a=null,t()},a.onerror=a.onload,a.src=e,a&&a.complete&&a.onload&&a.onload()},addEventListener("lazybeforeunveil",function(e){var t,a,i;if(e.detail.instance==o&&!e.defaultPrevented){var r=e.target;if("none"==r.preload&&(r.preload=r.getAttribute("data-preload")||"auto"),null!=r.getAttribute("data-autoplay"))if(r.getAttribute("data-expand")&&!r.autoplay)try{r.play()}catch(e){}else requestAnimationFrame(function(){r.setAttribute("data-expand","-10"),o.aC(r,o.cfg.lazyClass)});(t=r.getAttribute("data-link"))&&c(t,!0),(t=r.getAttribute("data-script"))&&(e.detail.firesLoad=!0,c(t,null,function(){e.detail.firesLoad=!1,o.fire(r,"_lazyloaded",{},!0,!0)})),(t=r.getAttribute("data-require"))&&(o.cfg.requireJs?o.cfg.requireJs([t]):c(t)),(a=r.getAttribute("data-bg"))&&(e.detail.firesLoad=!0,s(a,function(){r.style.backgroundImage="url("+(l.test(a)?JSON.stringify(a):a)+")",e.detail.firesLoad=!1,o.fire(r,"_lazyloaded",{},!0,!0)})),(i=r.getAttribute("data-poster"))&&(e.detail.firesLoad=!0,s(i,function(){r.poster=i,e.detail.firesLoad=!1,o.fire(r,"_lazyloaded",{},!0,!0)}))}},!1))}),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(u,f,g){"use strict";var n;f.addEventListener&&(n=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(e){var t,a,i,r;e.detail.instance==g&&(e.defaultPrevented||("none"==e.target.preload&&(e.target.preload="auto"),(i=e.target.getAttribute("data-back"))&&(ewww_webp_supported&&(r=e.target.getAttribute("data-back-webp"))&&(i=r),t=u.devicePixelRatio||1,a=Math.round(e.target.offsetWidth*t),r=Math.round(e.target.offsetHeight*t),0===i.search(/\[/)||o(e.target)&&(i=g.hC(e.target,"wp-block-cover")?(g.hC(e.target,"has-parallax")?(a=Math.round(u.screen.width*t),r=Math.round(u.screen.height*t)):r<300&&(r=430),s(i,a,r,"bg-cover")):g.hC(e.target,"cover-image")||g.hC(e.target,"elementor-bg")||g.hC(e.target,"et_parallax_bg")||g.hC(e.target,"bg-image-crop")?s(i,a,r,"bg-cover"):s(i,a,r,"bg")),e.target.style.backgroundImage&&-1===e.target.style.backgroundImage.search(/^initial/)?0===i.search(/\[/)?((i=JSON.parse(i)).forEach(function(e){n.test(e)&&JSON.stringify(e)}),i='url("'+i.join('"), url("')+'"',r=e.target.style.backgroundImage+", "+i,e.target.style.backgroundImage=r):e.target.style.backgroundImage=e.target.style.backgroundImage+', url("'+(n.test(i)?JSON.stringify(i):i)+'")':0===i.search(/\[/)?((i=JSON.parse(i)).forEach(function(e){n.test(e)&&JSON.stringify(e)}),i='url("'+i.join('"), url("')+'"',e.target.style.backgroundImage=i):e.target.style.backgroundImage="url("+(n.test(i)?JSON.stringify(i):i)+")")))},!1));function h(e){var t=e.getAttribute("data-eio-rwidth"),e=e.getAttribute("data-eio-rheight");return 1<t&&1<e?{w:t,h:e}:{w:0,h:0}}function m(e,t=!1){var a=u.devicePixelRatio||1,i=Math.round(e.offsetWidth*a),r=Math.round(e.offsetHeight*a),n=e.getAttribute("data-src"),a=e.getAttribute("data-src-webp");ewww_webp_supported&&a&&-1==n.search("webp=1")&&!t&&(n=a),o(e)&&(a=e,a=g.hC(a,"et_pb_jt_filterable_grid_item_image")||g.hC(a,"ss-foreground-image")||g.hC(a,"img-crop")?"img-crop":g.hC(a,"object-cover")&&(g.hC(a,"object-top")||g.hC(a,"object-bottom"))?"img-w":g.hC(a,"object-cover")&&(g.hC(a,"object-left")||g.hC(a,"object-right"))?"img-h":g.hC(a,"ct-image")&&g.hC(a,"object-cover")||!a.getAttribute("data-srcset")&&!a.srcset&&a.offsetHeight>a.offsetWidth&&1<l(a)?"img-crop":"img",(a=s(n,i,r,a,t))&&n!=a&&(t&&e.setAttribute("src",a),e.setAttribute("data-src",a)))}var o=function(e){if(1==eio_lazy_vars.skip_autoscale)return!1;for(var t=e,a=0;a<=7;a++){if(t.hasAttributes())for(var i=t.attributes,r=/skip-autoscale/,a=i.length-1;0<=a;a--){if(r.test(i[a].name))return!1;if(r.test(i[a].value))return!1}if(!t.parentNode||1!==t.parentNode.nodeType||!t.parentNode.hasAttributes)break;t=t.parentNode}return!0},s=function(e,t,a,i,r=!1){if(null===e)return e;var n=/w=(\d+)/,o=/fit=(\d+),(\d+)/,s=/resize=(\d+),(\d+)/,l=decodeURIComponent(e);if(/\.svg(\?.+)?$/.exec(l))return e;if(0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var d=s.exec(l);if(d&&(t<d[1]||r))return"img-w"===i?l.replace(s,"w="+t):"img-h"===i?l.replace(s,"h="+a):l.replace(s,"resize="+t+","+a);s=n.exec(e);if(s&&(t<=s[1]||r)){if("img-h"===i)return l.replace(n,"h="+a);if("bg-cover"!==i&&"img-crop"!==i)return e.replace(n,"w="+t);var c=Math.abs(s[1]-t);return 20<c||a<1080?e.replace(n,"resize="+t+","+a):e}c=o.exec(l);if(c&&(t<c[1]||r)){if("bg-cover"!==i&&"img-crop"!==i)return"img-w"===i?l.replace(o,"w="+t):"img-h"===i?l.replace(o,"h="+a):l.replace(o,"fit="+t+","+a);l=Math.abs(c[1]-t),o=Math.abs(c[2]-a);return 20<l||20<o?e.replace(n,"resize="+t+","+a):e}if(!s&&!c&&!d)return"img"===i?e+"&fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"&resize="+t+","+a:"img-h"===i||t<a?e+"&h="+a:e+"&w="+t}return-1==e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)?"img"===i?e+"?fit="+t+","+a:"bg-cover"===i||"img-crop"===i?e+"?resize="+t+","+a:"img-h"===i||t<a?e+"?h="+a:e+"?w="+t:e},p=function(e){e=/-(\d+)x(\d+)\./.exec(e);return e&&1<e[1]&&1<e[2]?{w:e[1],h:e[2]}:{w:0,h:0}},l=function(e){var t=e.getAttribute("width"),a=e.getAttribute("height");if(1<t&&1<a)return t/a;a=!1;if(a=(a=e.src&&-1<e.src.search("http")?e.src:a)||e.getAttribute("data-src")){var i=p(a);if(i.w&&i.h)return i.w/i.h}i=h(e);if(i.w&&i.h)return i.w/i.h;e=function(e){var t;if(e.srcset?t=e.srcset.split(","):(e=e.getAttribute("data-srcset"))&&(t=e.split(",")),t){var a=0,i=t.length;if(i){for(;a<i;a++){var r,n=t[a].trim().split(" ");!n[0].length||(n=p(n[0])).w&&n.h&&(r=n)}if(r.w&&r.h)return r}}return{w:0,h:0}}(e);return e.w&&e.h?e.w/e.h:0};f.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");var t=l(e.target);1<e.target.clientHeight&&t&&(t=Math.ceil(t*e.target.clientHeight),e.detail.width+2<t&&(e.detail.width=t)),void 0!==e.target._lazysizesWidth&&e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)}),f.addEventListener("lazybeforeunveil",function(e){var t,a,i,r,n=e.target,o=n.getAttribute("data-srcset");n.naturalWidth&&!o&&1<n.naturalWidth&&1<n.naturalHeight&&(t=u.devicePixelRatio||1,a=n.naturalWidth,i=n.naturalHeight,(e=h(n)).w&&e.w>a&&(a=e.w,i=e.h),a=n.clientWidth&&1.25*n.clientWidth*t<a,i=n.clientHeight&&1.25*n.clientHeight*t<i,(a||i)&&m(n)),ewww_webp_supported&&(!o||(r=n.getAttribute("data-srcset-webp"))&&n.setAttribute("data-srcset",r),(r=n.getAttribute("data-src-webp"))&&n.setAttribute("data-src",r))});function e(e=!1){e.type&&"load"===e.type&&g.autoSizer.checkElems(),u.devicePixelRatio;var t,a=f.getElementsByClassName(g.cfg.loadedClass),i=a.length;if(i)for(t=0;t<i;t++){var r,n,o,s,l,d,c=a[t];c.src&&!c.srcset&&1<c.naturalWidth&&1<c.naturalHeight&&1<c.clientWidth&&1<c.clientHeight&&(r=c.naturalWidth,n=c.naturalHeight,o=u.innerWidth,s=u.innerHeight,l=h(c),d=p(c.src),l.w?o=l.w:d.w&&(o=d.w),l.h?s=l.h:d.h&&(s=d.h),l=c.clientWidth,d=c.clientHeight,(1.1*r<l&&l<=o||1.1*n<d&&d<=s)&&m(c,!0))}}var t,a,i,r,d=(t=e,r=function(){a=null,t()},function(){i=Date.now(),a=a||setTimeout(c,99)});function c(){var e=Date.now()-i;e<99?setTimeout(c,99-e):(u.requestIdleCallback||r)(r)}addEventListener("load",e),addEventListener("resize",d),setTimeout(e,2e4)}),function(e,t){t=t(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{},function(i,f,n){"use strict";var g,h;if(!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in h=i.lazySizesConfig||i.lazysizesConfig||{},t)e in h||(h[e]=t[e])}(),!f||!f.getElementsByClassName)return{init:function(){},cfg:h,noSupport:!0};function c(e,t){E(e,t)||e.setAttribute("class",(e[v]("class")||"").trim()+" "+t)}function u(e,t){(t=E(e,t))&&e.setAttribute("class",(e[v]("class")||"").replace(t," "))}function m(e,t){var a;!l&&(a=i.picturefill||h.pf)?(t&&t.src&&!e[v]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)}var a,r,t,o,s,p=f.documentElement,l=i.HTMLPictureElement,d="addEventListener",v="getAttribute",e=i[d].bind(i),y=i.setTimeout,b=i.requestAnimationFrame||y,z=i.requestIdleCallback,w=/^picture$/i,C=["load","error","lazyincluded","_lazyloaded"],_={},A=Array.prototype.forEach,E=function(e,t){return _[t]||(_[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),_[t].test(e[v]("class")||"")&&_[t]},x=function(t,a,e){var i=e?d:"removeEventListener";e&&x(t,a),C.forEach(function(e){t[i](e,a)})},L=function(e,t,a,i,r){var n=f.createEvent("Event");return(a=a||{}).instance=g,n.initEvent(t,!i,!r),n.detail=a,e.dispatchEvent(n),n},N=function(e,t){return(getComputedStyle(e,null)||{})[t]},M=function(e,t,a){for(a=a||e.offsetWidth;a<h.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},W=(o=[],s=t=[],k._lsFlush=S,k);function S(){var e=s;for(s=t.length?o:t,r=!(a=!0);e.length;)e.shift()();a=!1}function k(e,t){a&&!t?e.apply(this,arguments):(s.push(e),r||(r=!0,(f.hidden?y:b)(S)))}function H(a,e){return e?function(){W(a)}:function(){var e=this,t=arguments;W(function(){a.apply(e,t)})}}function I(e){function t(){var e=n.now()-i;e<99?y(t,99-e):(z||r)(r)}var a,i,r=function(){a=null,e()};return function(){i=n.now(),a=a||y(t,99)}}var T,j,R,B,O,P,q,F,J,D,$,U,G,K,Q,V,X,Y,Z,ee,te,ae,ie,re,ne,oe,se,le,de,ce,ue,fe=(Z=/^img$/i,ee=/^iframe$/i,te="onscroll"in i&&!/(gle|ing)bot/.test(navigator.userAgent),re=-1,ne=function(e){return(U=null==U?"hidden"==N(f.body,"visibility"):U)||!("hidden"==N(e.parentNode,"visibility")&&"hidden"==N(e,"visibility"))},G=he,Q=ie=ae=0,V=h.throttleDelay,X=h.ricTimeout,Y=z&&49<X?function(){z(me,{timeout:X}),X!==h.ricTimeout&&(X=h.ricTimeout)}:H(function(){y(me)},!0),se=H(pe),le=function(e){se({target:e.target})},de=H(function(t,e,a,i,r){var n,o,s,l,d;(s=L(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(a?c(t,h.autosizesClass):t.setAttribute("sizes",i)),n=t[v](h.srcsetAttr),a=t[v](h.srcAttr),r&&(o=(d=t.parentNode)&&w.test(d.nodeName||"")),l=e.firesLoad||"src"in t&&(n||a||o),s={target:t},c(t,h.loadingClass),l&&(clearTimeout(R),R=y(ge,2500),x(t,le,!0)),o&&A.call(d.getElementsByTagName("source"),ve),n?t.setAttribute("srcset",n):a&&!o&&(ee.test(t.nodeName)?(i=a,0==(d=(e=t).getAttribute("data-load-mode")||h.iframeLoadMode)?e.contentWindow.location.replace(i):1==d&&(e.src=i)):t.src=a),r&&(n||o)&&m(t,{src:a})),t._lazyRace&&delete t._lazyRace,u(t,h.lazyClass),W(function(){var e=t.complete&&1<t.naturalWidth;l&&!e||(e&&c(t,h.fastLoadedClass),pe(s),t._lazyCache=!0,y(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&ie--},!0)}),ue=I(function(){h.loadMode=3,oe()}),{_:function(){O=n.now(),g.elements=f.getElementsByClassName(h.lazyClass),T=f.getElementsByClassName(h.lazyClass+" "+h.preloadClass),e("scroll",oe,!0),e("resize",oe,!0),e("pageshow",function(e){var t;!e.persisted||(t=f.querySelectorAll("."+h.loadingClass)).length&&t.forEach&&b(function(){t.forEach(function(e){e.complete&&ce(e)})})}),i.MutationObserver?new MutationObserver(oe).observe(p,{childList:!0,subtree:!0,attributes:!0}):(p[d]("DOMNodeInserted",oe,!0),p[d]("DOMAttrModified",oe,!0),setInterval(oe,999)),e("hashchange",oe,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){f[d](e,oe,!0)}),/d$|^c/.test(f.readyState)?be():(e("load",be),f[d]("DOMContentLoaded",oe),y(be,2e4)),g.elements.length?(he(),W._lsFlush()):oe()},checkElems:oe=function(e){var t;(e=!0===e)&&(X=33),K||(K=!0,(t=V-(n.now()-Q))<0&&(t=0),e||t<9?Y():y(Y,t))},unveil:ce=function(e){var t,a,i,r;e._lazyRace||(!(r="auto"==(i=(a=Z.test(e.nodeName))&&(e[v](h.sizesAttr)||e[v]("sizes"))))&&j||!a||!e[v]("src")&&!e.srcset||e.complete||E(e,h.errorClass)||!E(e,h.lazyClass))&&(t=L(e,"lazyunveilread").detail,r&&_e.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ie++,de(e,t,r,i,a))},_aLSL:ye});function ge(e){ie--,e&&!(ie<0)&&e.target||(ie=0)}function he(){var e,t,a,i,r,n,o,s,l,d,c,u=g.elements;if((B=h.loadMode)&&ie<8&&(e=u.length)){for(t=0,re++;t<e;t++)if(u[t]&&!u[t]._lazyRace)if(!te||g.prematureUnveil&&g.prematureUnveil(u[t]))ce(u[t]);else if((o=u[t][v]("data-expand"))&&(r=+o)||(r=ae),l||(l=!h.expand||h.expand<1?500<p.clientHeight&&500<p.clientWidth?500:370:h.expand,d=(g._defEx=l)*h.expFactor,c=h.hFac,U=null,ae<d&&ie<1&&2<re&&2<B&&!f.hidden?(ae=d,re=0):ae=1<B&&1<re&&ie<6?l:0),s!==r&&(P=innerWidth+r*c,q=innerHeight+r,n=-1*r,s=r),d=u[t].getBoundingClientRect(),($=d.bottom)>=n&&(F=d.top)<=q&&(D=d.right)>=n*c&&(J=d.left)<=P&&($||D||J||F)&&(h.loadHidden||ne(u[t]))&&(j&&ie<3&&!o&&(B<3||re<4)||function(e,t){var a,i=e,r=ne(e);for(F-=t,$+=t,J-=t,D+=t;r&&(i=i.offsetParent)&&i!=f.body&&i!=p;)(r=0<(N(i,"opacity")||1))&&"visible"!=N(i,"overflow")&&(a=i.getBoundingClientRect(),r=D>a.left&&J<a.right&&$>a.top-1&&F<a.bottom+1);return r}(u[t],r))){if(ce(u[t]),i=!0,9<ie)break}else!i&&j&&!a&&ie<4&&re<4&&2<B&&(T[0]||h.preloadAfterLoad)&&(T[0]||!o&&($||D||J||F||"auto"!=u[t][v](h.sizesAttr)))&&(a=T[0]||u[t]);a&&!i&&ce(a)}}function me(){K=!1,Q=n.now(),G()}function pe(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),c(t,h.loadedClass),u(t,h.loadingClass),x(t,le),L(t,"lazyloaded"))}function ve(e){var t,a=e[v](h.srcsetAttr);(t=h.customMedia[e[v]("data-media")||e[v]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)}function ye(){3==h.loadMode&&(h.loadMode=2),ue()}function be(){j||(n.now()-O<999?y(be,999):(j=!0,h.loadMode=3,oe(),e("scroll",ye,!0)))}var ze,we,Ce,_e=(we=H(function(e,t,a,i){var r,n,o;if(e._lazysizesWidth=i,e.setAttribute("sizes",i+="px"),w.test(t.nodeName||""))for(n=0,o=(r=t.getElementsByTagName("source")).length;n<o;n++)r[n].setAttribute("sizes",i);a.detail.dataAttr||m(e,a.detail)}),{_:function(){ze=f.getElementsByClassName(h.autosizesClass),e("resize",Ce)},checkElems:Ce=I(function(){var e,t=ze.length;if(t)for(e=0;e<t;e++)Ae(ze[e])}),updateElem:Ae});function Ae(e,t,a){var i=e.parentNode;i&&(a=M(e,i,a),(t=L(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=t.detail.width)&&a!==e._lazysizesWidth&&we(e,i,t,a))}function Ee(){!Ee.i&&f.getElementsByClassName&&(Ee.i=!0,_e._(),fe._())}return y(function(){h.init&&Ee()}),g={cfg:h,autoSizer:_e,loader:fe,init:Ee,uP:m,aC:c,rC:u,hC:E,fire:L,gW:M,rAF:W}});
     1var ewww_webp_supported;void 0===ewww_webp_supported&&(ewww_webp_supported=!1),window.lazySizesConfig=window.lazySizesConfig||{},window.lazySizesConfig.expand=500<document.documentElement.clientHeight&&500<document.documentElement.clientWidth?1e3:740,window.lazySizesConfig.iframeLoadMode=1,"undefined"==typeof eio_lazy_vars&&(eio_lazy_vars={exactdn_domain:".exactdn.com",threshold:0,skip_autoscale:0,use_dpr:0}),50<eio_lazy_vars.threshold&&(window.lazySizesConfig.expand=eio_lazy_vars.threshold),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(e,n,o){"use strict";var s,l,d={};function c(e,t,a){var r,i;d[e]||(r=n.createElement(t?"link":"script"),i=n.getElementsByTagName("script")[0],t?(r.rel="stylesheet",r.href=e):(r.onload=function(){r.onerror=null,r.onload=null,a()},r.onerror=r.onload,r.src=e),d[e]=!0,d[r.src||r.href]=!0,i.parentNode.insertBefore(r,i))}n.addEventListener&&(l=/\(|\)|\s|'/,s=function(e,t){var a=n.createElement("img");a.onload=function(){a.onload=null,a.onerror=null,a=null,t()},a.onerror=a.onload,a.src=e,a&&a.complete&&a.onload&&a.onload()},addEventListener("lazybeforeunveil",function(e){var t,a,r;if(e.detail.instance==o&&!e.defaultPrevented){var i=e.target;if("none"==i.preload&&(i.preload=i.getAttribute("data-preload")||"auto"),null!=i.getAttribute("data-autoplay"))if(i.getAttribute("data-expand")&&!i.autoplay)try{i.play()}catch(e){}else requestAnimationFrame(function(){i.setAttribute("data-expand","-10"),o.aC(i,o.cfg.lazyClass)});(t=i.getAttribute("data-link"))&&c(t,!0),(t=i.getAttribute("data-script"))&&(e.detail.firesLoad=!0,c(t,null,function(){e.detail.firesLoad=!1,o.fire(i,"_lazyloaded",{},!0,!0)})),(t=i.getAttribute("data-require"))&&(o.cfg.requireJs?o.cfg.requireJs([t]):c(t)),(a=i.getAttribute("data-bg"))&&(e.detail.firesLoad=!0,s(a,function(){i.style.backgroundImage="url("+(l.test(a)?JSON.stringify(a):a)+")",e.detail.firesLoad=!1,o.fire(i,"_lazyloaded",{},!0,!0)})),(r=i.getAttribute("data-poster"))&&(e.detail.firesLoad=!0,s(r,function(){i.poster=r,e.detail.firesLoad=!1,o.fire(i,"_lazyloaded",{},!0,!0)}))}},!1))}),function(e,t){function a(){t(e.lazySizes),e.removeEventListener("lazyunveilread",a,!0)}t=t.bind(null,e,e.document),"object"==typeof module&&module.exports?t(require("lazysizes")):"function"==typeof define&&define.amd?define(["lazysizes"],t):e.lazySizes?a():e.addEventListener("lazyunveilread",a,!0)}(window,function(u,f,g){"use strict";var n;f.addEventListener&&(n=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(e){var t,a,r,i;e.detail.instance==g&&(e.defaultPrevented||("none"==e.target.preload&&(e.target.preload="auto"),(r=e.target.getAttribute("data-back"))&&(ewww_webp_supported&&(i=e.target.getAttribute("data-back-webp"))&&(r=i),t=v(),a=Math.round(e.target.offsetWidth*t),i=Math.round(e.target.offsetHeight*t),0===r.search(/\[/)||o(e.target)&&(r=g.hC(e.target,"wp-block-cover")?(g.hC(e.target,"has-parallax")?(a=Math.round(u.screen.width*t),i=Math.round(u.screen.height*t)):i<300&&(i=430),s(r,a,i,"bg-cover")):g.hC(e.target,"cover-image")||g.hC(e.target,"elementor-bg")||g.hC(e.target,"et_parallax_bg")||g.hC(e.target,"bg-image-crop")?s(r,a,i,"bg-cover"):s(r,a,i,"bg")),e.target.style.backgroundImage&&-1===e.target.style.backgroundImage.search(/^initial/)?0===r.search(/\[/)?((r=JSON.parse(r)).forEach(function(e){n.test(e)&&JSON.stringify(e)}),r='url("'+r.join('"), url("')+'"',i=e.target.style.backgroundImage+", "+r,e.target.style.backgroundImage=i):e.target.style.backgroundImage=e.target.style.backgroundImage+', url("'+(n.test(r)?JSON.stringify(r):r)+'")':0===r.search(/\[/)?((r=JSON.parse(r)).forEach(function(e){n.test(e)&&JSON.stringify(e)}),r='url("'+r.join('"), url("')+'"',e.target.style.backgroundImage=r):e.target.style.backgroundImage="url("+(n.test(r)?JSON.stringify(r):r)+")")))},!1));function h(e){var t=e.getAttribute("data-eio-rwidth"),e=e.getAttribute("data-eio-rheight");return 1<t&&1<e?{w:t,h:e}:{w:0,h:0}}function m(e,t=!1){var a=v(),r=Math.round(e.offsetWidth*a),i=Math.round(e.offsetHeight*a),n=e.getAttribute("data-src"),a=e.getAttribute("data-src-webp");ewww_webp_supported&&a&&-1==n.search("webp=1")&&!t&&(n=a),o(e)&&(a=e,a=g.hC(a,"et_pb_jt_filterable_grid_item_image")||g.hC(a,"ss-foreground-image")||g.hC(a,"img-crop")?"img-crop":g.hC(a,"object-cover")&&(g.hC(a,"object-top")||g.hC(a,"object-bottom"))?"img-w":g.hC(a,"object-cover")&&(g.hC(a,"object-left")||g.hC(a,"object-right"))?"img-h":g.hC(a,"ct-image")&&g.hC(a,"object-cover")||!a.getAttribute("data-srcset")&&!a.srcset&&a.offsetHeight>a.offsetWidth&&1<l(a)?"img-crop":"img",(a=s(n,r,i,a,t))&&n!=a&&(t&&e.setAttribute("src",a),e.setAttribute("data-src",a)))}var o=function(e){if(1==eio_lazy_vars.skip_autoscale)return!1;for(var t=e,a=0;a<=7;a++){if(t.hasAttributes())for(var r=t.attributes,i=/skip-autoscale/,a=r.length-1;0<=a;a--){if(i.test(r[a].name))return!1;if(i.test(r[a].value))return!1}if(!t.parentNode||1!==t.parentNode.nodeType||!t.parentNode.hasAttributes)break;t=t.parentNode}return!0},s=function(e,t,a,r,i=!1){if(null===e)return e;var n=/w=(\d+)/,o=/fit=(\d+),(\d+)/,s=/resize=(\d+),(\d+)/,l=decodeURIComponent(e);if(/\.svg(\?.+)?$/.exec(l))return e;if(0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var d=s.exec(l);if(d&&(t<d[1]||i))return"img-w"===r?l.replace(s,"w="+t):"img-h"===r?l.replace(s,"h="+a):l.replace(s,"resize="+t+","+a);s=n.exec(e);if(s&&(t<=s[1]||i)){if("img-h"===r)return l.replace(n,"h="+a);if("bg-cover"!==r&&"img-crop"!==r)return e.replace(n,"w="+t);var c=Math.abs(s[1]-t);return 20<c||a<1080?e.replace(n,"resize="+t+","+a):e}c=o.exec(l);if(c&&(t<c[1]||i)){if("bg-cover"!==r&&"img-crop"!==r)return"img-w"===r?l.replace(o,"w="+t):"img-h"===r?l.replace(o,"h="+a):l.replace(o,"fit="+t+","+a);l=Math.abs(c[1]-t),o=Math.abs(c[2]-a);return 20<l||20<o?e.replace(n,"resize="+t+","+a):e}if(!s&&!c&&!d)return"img"===r?e+"&fit="+t+","+a:"bg-cover"===r||"img-crop"===r?e+"&resize="+t+","+a:"img-h"===r||t<a?e+"&h="+a:e+"&w="+t}return-1==e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)?"img"===r?e+"?fit="+t+","+a:"bg-cover"===r||"img-crop"===r?e+"?resize="+t+","+a:"img-h"===r||t<a?e+"?h="+a:e+"?w="+t:e},p=function(e){e=/-(\d+)x(\d+)\./.exec(e);return e&&1<e[1]&&1<e[2]?{w:e[1],h:e[2]}:{w:0,h:0}},l=function(e){var t=e.getAttribute("width"),a=e.getAttribute("height");if(1<t&&1<a)return t/a;a=!1;if(a=(a=e.src&&-1<e.src.search("http")?e.src:a)||e.getAttribute("data-src")){var r=p(a);if(r.w&&r.h)return r.w/r.h}r=h(e);if(r.w&&r.h)return r.w/r.h;e=function(e){var t;if(e.srcset?t=e.srcset.split(","):(e=e.getAttribute("data-srcset"))&&(t=e.split(",")),t){var a=0,r=t.length;if(r){for(;a<r;a++){var i,n=t[a].trim().split(" ");!n[0].length||(n=p(n[0])).w&&n.h&&(i=n)}if(i.w&&i.h)return i}}return{w:0,h:0}}(e);return e.w&&e.h?e.w/e.h:0},v=function(){return eio_lazy_vars.use_dpr&&1<u.devicePixelRatio?u.devicePixelRatio:1};f.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");var t=l(e.target);1<e.target.clientHeight&&t&&(t=Math.ceil(t*e.target.clientHeight),e.detail.width+2<t&&(e.detail.width=t)),void 0!==e.target._lazysizesWidth&&e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)}),f.addEventListener("lazybeforeunveil",function(e){var t,a,r,i,n=e.target,o=n.getAttribute("data-srcset");n.naturalWidth&&!o&&1<n.naturalWidth&&1<n.naturalHeight&&(t=v(),a=n.naturalWidth,r=n.naturalHeight,(e=h(n)).w&&e.w>a&&(a=e.w,r=e.h),a=n.clientWidth&&1.25*n.clientWidth*t<a,r=n.clientHeight&&1.25*n.clientHeight*t<r,(a||r)&&m(n)),ewww_webp_supported&&(!o||(i=n.getAttribute("data-srcset-webp"))&&n.setAttribute("data-srcset",i),(i=n.getAttribute("data-src-webp"))&&n.setAttribute("data-src",i))});function e(e=!1){e.type&&"load"===e.type&&g.autoSizer.checkElems(),v();var t,a=f.getElementsByClassName(g.cfg.loadedClass),r=a.length;if(r)for(t=0;t<r;t++){var i,n,o,s,l,d,c=a[t];c.src&&!c.srcset&&1<c.naturalWidth&&1<c.naturalHeight&&1<c.clientWidth&&1<c.clientHeight&&(i=c.naturalWidth,n=c.naturalHeight,o=u.innerWidth,s=u.innerHeight,l=h(c),d=p(c.src),l.w?o=l.w:d.w&&(o=d.w),l.h?s=l.h:d.h&&(s=d.h),l=c.clientWidth,d=c.clientHeight,(1.1*i<l&&l<=o||1.1*n<d&&d<=s)&&m(c,!0))}}var t,a,r,i,d=(t=e,i=function(){a=null,t()},function(){r=Date.now(),a=a||setTimeout(c,99)});function c(){var e=Date.now()-r;e<99?setTimeout(c,99-e):(u.requestIdleCallback||i)(i)}addEventListener("load",e),addEventListener("resize",d),setTimeout(e,2e4)}),function(e,t){t=t(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{},function(r,f,n){"use strict";var g,h;if(!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in h=r.lazySizesConfig||r.lazysizesConfig||{},t)e in h||(h[e]=t[e])}(),!f||!f.getElementsByClassName)return{init:function(){},cfg:h,noSupport:!0};function c(e,t){E(e,t)||e.setAttribute("class",(e[v]("class")||"").trim()+" "+t)}function u(e,t){(t=E(e,t))&&e.setAttribute("class",(e[v]("class")||"").replace(t," "))}function m(e,t){var a;!l&&(a=r.picturefill||h.pf)?(t&&t.src&&!e[v]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)}var a,i,t,o,s,p=f.documentElement,l=r.HTMLPictureElement,d="addEventListener",v="getAttribute",e=r[d].bind(r),y=r.setTimeout,b=r.requestAnimationFrame||y,z=r.requestIdleCallback,w=/^picture$/i,_=["load","error","lazyincluded","_lazyloaded"],C={},A=Array.prototype.forEach,E=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[v]("class")||"")&&C[t]},L=function(t,a,e){var r=e?d:"removeEventListener";e&&L(t,a),_.forEach(function(e){t[r](e,a)})},x=function(e,t,a,r,i){var n=f.createEvent("Event");return(a=a||{}).instance=g,n.initEvent(t,!r,!i),n.detail=a,e.dispatchEvent(n),n},N=function(e,t){return(getComputedStyle(e,null)||{})[t]},M=function(e,t,a){for(a=a||e.offsetWidth;a<h.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},W=(o=[],s=t=[],k._lsFlush=S,k);function S(){var e=s;for(s=t.length?o:t,i=!(a=!0);e.length;)e.shift()();a=!1}function k(e,t){a&&!t?e.apply(this,arguments):(s.push(e),i||(i=!0,(f.hidden?y:b)(S)))}function H(a,e){return e?function(){W(a)}:function(){var e=this,t=arguments;W(function(){a.apply(e,t)})}}function I(e){function t(){var e=n.now()-r;e<99?y(t,99-e):(z||i)(i)}var a,r,i=function(){a=null,e()};return function(){r=n.now(),a=a||y(t,99)}}var T,j,B,O,R,q,F,J,P,D,$,U,G,K,Q,V,X,Y,Z,ee,te,ae,re,ie,ne,oe,se,le,de,ce,ue,fe=(Z=/^img$/i,ee=/^iframe$/i,te="onscroll"in r&&!/(gle|ing)bot/.test(navigator.userAgent),ie=-1,ne=function(e){return(U=null==U?"hidden"==N(f.body,"visibility"):U)||!("hidden"==N(e.parentNode,"visibility")&&"hidden"==N(e,"visibility"))},G=he,Q=re=ae=0,V=h.throttleDelay,X=h.ricTimeout,Y=z&&49<X?function(){z(me,{timeout:X}),X!==h.ricTimeout&&(X=h.ricTimeout)}:H(function(){y(me)},!0),se=H(pe),le=function(e){se({target:e.target})},de=H(function(t,e,a,r,i){var n,o,s,l,d;(s=x(t,"lazybeforeunveil",e)).defaultPrevented||(r&&(a?c(t,h.autosizesClass):t.setAttribute("sizes",r)),n=t[v](h.srcsetAttr),a=t[v](h.srcAttr),i&&(o=(d=t.parentNode)&&w.test(d.nodeName||"")),l=e.firesLoad||"src"in t&&(n||a||o),s={target:t},c(t,h.loadingClass),l&&(clearTimeout(B),B=y(ge,2500),L(t,le,!0)),o&&A.call(d.getElementsByTagName("source"),ve),n?t.setAttribute("srcset",n):a&&!o&&(ee.test(t.nodeName)?(r=a,0==(d=(e=t).getAttribute("data-load-mode")||h.iframeLoadMode)?e.contentWindow.location.replace(r):1==d&&(e.src=r)):t.src=a),i&&(n||o)&&m(t,{src:a})),t._lazyRace&&delete t._lazyRace,u(t,h.lazyClass),W(function(){var e=t.complete&&1<t.naturalWidth;l&&!e||(e&&c(t,h.fastLoadedClass),pe(s),t._lazyCache=!0,y(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&re--},!0)}),ue=I(function(){h.loadMode=3,oe()}),{_:function(){R=n.now(),g.elements=f.getElementsByClassName(h.lazyClass),T=f.getElementsByClassName(h.lazyClass+" "+h.preloadClass),e("scroll",oe,!0),e("resize",oe,!0),e("pageshow",function(e){var t;!e.persisted||(t=f.querySelectorAll("."+h.loadingClass)).length&&t.forEach&&b(function(){t.forEach(function(e){e.complete&&ce(e)})})}),r.MutationObserver?new MutationObserver(oe).observe(p,{childList:!0,subtree:!0,attributes:!0}):(p[d]("DOMNodeInserted",oe,!0),p[d]("DOMAttrModified",oe,!0),setInterval(oe,999)),e("hashchange",oe,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){f[d](e,oe,!0)}),/d$|^c/.test(f.readyState)?be():(e("load",be),f[d]("DOMContentLoaded",oe),y(be,2e4)),g.elements.length?(he(),W._lsFlush()):oe()},checkElems:oe=function(e){var t;(e=!0===e)&&(X=33),K||(K=!0,(t=V-(n.now()-Q))<0&&(t=0),e||t<9?Y():y(Y,t))},unveil:ce=function(e){var t,a,r,i;e._lazyRace||(!(i="auto"==(r=(a=Z.test(e.nodeName))&&(e[v](h.sizesAttr)||e[v]("sizes"))))&&j||!a||!e[v]("src")&&!e.srcset||e.complete||E(e,h.errorClass)||!E(e,h.lazyClass))&&(t=x(e,"lazyunveilread").detail,i&&Ce.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,re++,de(e,t,i,r,a))},_aLSL:ye});function ge(e){re--,e&&!(re<0)&&e.target||(re=0)}function he(){var e,t,a,r,i,n,o,s,l,d,c,u=g.elements;if((O=h.loadMode)&&re<8&&(e=u.length)){for(t=0,ie++;t<e;t++)if(u[t]&&!u[t]._lazyRace)if(!te||g.prematureUnveil&&g.prematureUnveil(u[t]))ce(u[t]);else if((o=u[t][v]("data-expand"))&&(i=+o)||(i=ae),l||(l=!h.expand||h.expand<1?500<p.clientHeight&&500<p.clientWidth?500:370:h.expand,d=(g._defEx=l)*h.expFactor,c=h.hFac,U=null,ae<d&&re<1&&2<ie&&2<O&&!f.hidden?(ae=d,ie=0):ae=1<O&&1<ie&&re<6?l:0),s!==i&&(q=innerWidth+i*c,F=innerHeight+i,n=-1*i,s=i),d=u[t].getBoundingClientRect(),($=d.bottom)>=n&&(J=d.top)<=F&&(D=d.right)>=n*c&&(P=d.left)<=q&&($||D||P||J)&&(h.loadHidden||ne(u[t]))&&(j&&re<3&&!o&&(O<3||ie<4)||function(e,t){var a,r=e,i=ne(e);for(J-=t,$+=t,P-=t,D+=t;i&&(r=r.offsetParent)&&r!=f.body&&r!=p;)(i=0<(N(r,"opacity")||1))&&"visible"!=N(r,"overflow")&&(a=r.getBoundingClientRect(),i=D>a.left&&P<a.right&&$>a.top-1&&J<a.bottom+1);return i}(u[t],i))){if(ce(u[t]),r=!0,9<re)break}else!r&&j&&!a&&re<4&&ie<4&&2<O&&(T[0]||h.preloadAfterLoad)&&(T[0]||!o&&($||D||P||J||"auto"!=u[t][v](h.sizesAttr)))&&(a=T[0]||u[t]);a&&!r&&ce(a)}}function me(){K=!1,Q=n.now(),G()}function pe(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),c(t,h.loadedClass),u(t,h.loadingClass),L(t,le),x(t,"lazyloaded"))}function ve(e){var t,a=e[v](h.srcsetAttr);(t=h.customMedia[e[v]("data-media")||e[v]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)}function ye(){3==h.loadMode&&(h.loadMode=2),ue()}function be(){j||(n.now()-R<999?y(be,999):(j=!0,h.loadMode=3,oe(),e("scroll",ye,!0)))}var ze,we,_e,Ce=(we=H(function(e,t,a,r){var i,n,o;if(e._lazysizesWidth=r,e.setAttribute("sizes",r+="px"),w.test(t.nodeName||""))for(n=0,o=(i=t.getElementsByTagName("source")).length;n<o;n++)i[n].setAttribute("sizes",r);a.detail.dataAttr||m(e,a.detail)}),{_:function(){ze=f.getElementsByClassName(h.autosizesClass),e("resize",_e)},checkElems:_e=I(function(){var e,t=ze.length;if(t)for(e=0;e<t;e++)Ae(ze[e])}),updateElem:Ae});function Ae(e,t,a){var r=e.parentNode;r&&(a=M(e,r,a),(t=x(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=t.detail.width)&&a!==e._lazysizesWidth&&we(e,r,t,a))}function Ee(){!Ee.i&&f.getElementsByClassName&&(Ee.i=!0,Ce._(),fe._())}return y(function(){h.init&&Ee()}),g={cfg:h,autoSizer:Ce,loader:fe,init:Ee,uP:m,aC:c,rC:u,hC:E,fire:x,gW:M,rAF:W}});
  • easy-image-optimizer/trunk/readme.txt

    r3179564 r3197623  
    22Contributors: nosilver4u
    33Tags: image, resize, webp, lazy load, compress
    4 Requires at least: 6.4
     4Requires at least: 6.5
    55Tested up to: 6.7
    66Requires PHP: 8.1
    7 Stable tag: 3.9.4
     7Stable tag: 4.0.0
    88License: GPLv3
    99
     
    5757
    5858* If you would like to help translate this plugin in your language, get started here: https://translate.wordpress.org/projects/wp-plugins/easy-image-optimizer/
     59
     60= 4.0.0 =
     61*Release Date - November 26, 2024*
     62
     63* added: Above the Fold setting for Lazy Load (previously EIO_LAZY_FOLD override)
     64* changed: gravatar images excluded from Above the Fold/EIO_LAZY_FOLD counts
     65* fixed: Easy IO adding images to srcset combined with broken WooCommerce gallery thumbnails causes oversized image sizes to be loaded
     66* fixed: Easy IO srcset filler using incorrect width for calculations
    5967
    6068= 3.9.4 =
  • easy-image-optimizer/trunk/uninstall.php

    r2142075 r3197623  
    2525    delete_option( 'exactdn_all_the_things' );
    2626    delete_option( 'exactdn_lossy' );
     27    delete_option( 'exactdn_hidpi' );
    2728}
  • easy-image-optimizer/trunk/unique.php

    r3150977 r3197623  
    964964                    <td>&nbsp;</td>
    965965                    <td>
     966                        <label for='easyio_ll_abovethefold'><strong><?php esc_html_e( 'Above the Fold', 'easy-image-optimizer' ); ?></strong></label>
     967                        <?php easyio_help_link( 'https://docs.ewww.io/article/74-lazy-load', '5c6c36ed042863543ccd2d9b' ); ?>
     968                        <input type='number' step='1' min='0' class='small-text' id='easyio_ll_abovethefold' name='easyio_ll_abovethefold' value='<?php echo defined( 'EIO_LAZY_FOLD' ) ? (int) constant( 'EIO_LAZY_FOLD' ) : (int) easyio_get_option( 'easyio_ll_abovethefold' ); ?>' <?php disabled( defined( 'EIO_LAZY_FOLD' ) ); ?> />
     969                        <?php esc_html_e( 'Skip this many images from lazy loading so that above the fold images load more quickly.', 'easy-image-optimizer' ); ?>
     970                        <p class='description'>
     971                            <?php esc_html_e( 'This will exclude images from auto-scaling, which may decrease performance if those images are not properly sized.', 'easy-image-optimizer' ); ?>
     972                        </p>
     973                    </td>
     974                </tr>
     975                <?php easyio_debug_message( 'LL above the fold: ' . easyio_get_option( 'easyio_ll_abovethefold' ) ); ?>
     976                <tr>
     977                    <td>&nbsp;</td>
     978                    <td>
    966979                        <input type='checkbox' name='easyio_use_lqip' value='true' id='easyio_use_lqip' <?php checked( easyio_get_option( 'easyio_use_lqip' ) ); ?> />
    967980                        <label for='easyio_use_lqip'><strong>LQIP</strong></label>
Note: See TracChangeset for help on using the changeset viewer.