EWWW Image Optimizer - Version 6.9.2

Version Description

  • changed: improved Easy IO detection for site URL changes
  • changed: load backup class earlier to prevent issues with custom image uploaders
  • fixed: and improved the ewwwio_translated_media_ids filter, props @ocean90
  • fixed: Lazy Load JS throws error if inline script vars are missing
  • fixed: Easy IO + Lazy Load auto-scale produces invalid URL if an image with no query string is constrained by height
Download this release

Release Info

Developer nosilver4u
Plugin Icon 128x128 EWWW Image Optimizer
Version 6.9.2
Comparing to
See all releases

Code changes from version 6.9.1 to 6.9.2

changelog.txt CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  = 6.9.1 =
2
  * changed: default syntax for MySQL 8.x to use faster upgrade query
3
  * fixed: bulk action parameter was not validated properly when selecting attachments for optimization
1
+ = 6.9.2 =
2
+ * changed: improved Easy IO detection for site URL changes
3
+ * changed: load backup class earlier to prevent issues with custom image uploaders
4
+ * fixed: and improved the ewwwio_translated_media_ids filter, props @ocean90
5
+ * fixed: Lazy Load JS throws error if inline script vars are missing
6
+ * fixed: Easy IO + Lazy Load auto-scale produces invalid URL if an image with no query string is constrained by height
7
+
8
  = 6.9.1 =
9
  * changed: default syntax for MySQL 8.x to use faster upgrade query
10
  * fixed: bulk action parameter was not validated properly when selecting attachments for optimization
classes/class-exactdn.php CHANGED
@@ -297,9 +297,18 @@ if ( ! class_exists( 'ExactDN' ) ) {
297
  $this->debug_message( "could not break down URL: $this->site_url" );
298
  return;
299
  }
300
- if ( ! $this->get_exactdn_option( 'local_domain' ) ) {
301
- $this->set_exactdn_option( 'local_domain', $this->upload_domain );
 
 
 
 
 
 
 
302
  }
 
 
303
  $this->debug_message( "allowing images from here: $this->upload_domain" );
304
  if (
305
  (
@@ -313,8 +322,8 @@ if ( ! class_exists( 'ExactDN' ) ) {
313
  $this->debug_message( "removing this from urls: $this->remove_path" );
314
  }
315
  if (
316
- $this->get_exactdn_option( 'local_domain' ) !== $this->upload_domain &&
317
- ! $this->allow_image_domain( $this->get_exactdn_option( 'local_domain' ) ) &&
318
  is_admin()
319
  ) {
320
  add_action( 'admin_notices', $this->prefix . 'notice_exactdn_domain_mismatch' );
297
  $this->debug_message( "could not break down URL: $this->site_url" );
298
  return;
299
  }
300
+
301
+ $stored_local_domain = $this->get_exactdn_option( 'local_domain' );
302
+ if ( empty( $stored_local_domain ) ) {
303
+ $this->set_exactdn_option( 'local_domain', base64_encode( $this->upload_domain ) );
304
+ $stored_local_domain = $this->upload_domain;
305
+ } elseif ( false !== strpos( $stored_local_domain, '.' ) ) {
306
+ $this->set_exactdn_option( 'local_domain', base64_encode( $stored_local_domain ) );
307
+ } else {
308
+ $stored_local_domain = base64_decode( $stored_local_domain );
309
  }
310
+ $this->debug_message( "saved domain is $stored_local_domain" );
311
+
312
  $this->debug_message( "allowing images from here: $this->upload_domain" );
313
  if (
314
  (
322
  $this->debug_message( "removing this from urls: $this->remove_path" );
323
  }
324
  if (
325
+ $stored_local_domain !== $this->upload_domain &&
326
+ ! $this->allow_image_domain( $stored_local_domain ) &&
327
  is_admin()
328
  ) {
329
  add_action( 'admin_notices', $this->prefix . 'notice_exactdn_domain_mismatch' );
common.php CHANGED
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  exit;
14
  }
15
 
16
- define( 'EWWW_IMAGE_OPTIMIZER_VERSION', 691 );
17
 
18
  // Initialize a couple globals.
19
  $eio_debug = '';
@@ -817,11 +817,6 @@ function ewww_image_optimizer_save_network_settings() {
817
  */
818
  function ewww_image_optimizer_init() {
819
  ewwwio_debug_message( '<b>' . __FUNCTION__ . '()</b>' );
820
- /**
821
- * EIO_Backup class for managing image backups.
822
- */
823
- require_once( EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH . 'classes/class-eio-backup.php' );
824
-
825
  // Check to see if this is the settings page and enable debugging temporarily if it is.
826
  global $ewwwio_temp_debug;
827
  $ewwwio_temp_debug = ! empty( $ewwwio_temp_debug ) ? $ewwwio_temp_debug : false;
@@ -2153,6 +2148,13 @@ function ewww_image_optimizer_notice_exactdn_domain_mismatch() {
2153
  if ( ! isset( $exactdn->upload_domain ) ) {
2154
  return;
2155
  }
 
 
 
 
 
 
 
2156
  ?>
2157
  <div id="ewww-image-optimizer-notice-exactdn-domain-mismatch" class="notice notice-warning">
2158
  <p>
@@ -2160,7 +2162,7 @@ function ewww_image_optimizer_notice_exactdn_domain_mismatch() {
2160
  printf(
2161
  /* translators: 1: old domain name, 2: current domain name */
2162
  esc_html__( 'Easy IO detected that the Site URL has changed since the initial activation (previously %1$s, currently %2$s).', 'ewww-image-optimizer' ),
2163
- '<strong>' . esc_html( $exactdn->get_exactdn_option( 'local_domain' ) ) . '</strong>',
2164
  '<strong>' . esc_html( $exactdn->upload_domain ) . '</strong>'
2165
  );
2166
  ?>
@@ -10526,18 +10528,17 @@ function ewww_image_optimizer_get_translated_media_results( $id ) {
10526
  if ( empty( $translations ) ) {
10527
  return array( $id, array() );
10528
  }
 
 
10529
  }
10530
- apply_filters( 'ewwwio_translated_media_ids', $translations, $id );
10531
  if ( ewww_image_optimizer_iterable( $translations ) ) {
10532
  global $wpdb;
10533
  foreach ( $translations as $translation ) {
10534
- if ( empty( $translation->element_id ) ) {
10535
- continue;
10536
- }
10537
- ewwwio_debug_message( "checking {$translation->element_id} for results with WPML (or another translation plugin)" );
10538
- $optimized_images = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->ewwwio_images WHERE attachment_id = %d AND gallery = 'media' AND image_size <> 0 ORDER BY orig_size DESC", $translation->element_id ), ARRAY_A );
10539
  if ( ! empty( $optimized_images ) ) {
10540
- return array( (int) $translation->element_id, $optimized_images );
10541
  }
10542
  }
10543
  }
@@ -14783,7 +14784,7 @@ function ewww_image_optimizer_resize_detection_script() {
14783
  margin: -3px;
14784
  }
14785
  </style>
14786
- <script><?php echo $resize_detection_script; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></script>
14787
  <?php
14788
  }
14789
  }
13
  exit;
14
  }
15
 
16
+ define( 'EWWW_IMAGE_OPTIMIZER_VERSION', 692.0 );
17
 
18
  // Initialize a couple globals.
19
  $eio_debug = '';
817
  */
818
  function ewww_image_optimizer_init() {
819
  ewwwio_debug_message( '<b>' . __FUNCTION__ . '()</b>' );
 
 
 
 
 
820
  // Check to see if this is the settings page and enable debugging temporarily if it is.
821
  global $ewwwio_temp_debug;
822
  $ewwwio_temp_debug = ! empty( $ewwwio_temp_debug ) ? $ewwwio_temp_debug : false;
2148
  if ( ! isset( $exactdn->upload_domain ) ) {
2149
  return;
2150
  }
2151
+ $stored_local_domain = $exactdn->get_exactdn_option( 'local_domain' );
2152
+ if ( empty( $stored_local_domain ) ) {
2153
+ return;
2154
+ }
2155
+ if ( false === strpos( $stored_local_domain, '.' ) ) {
2156
+ $stored_local_domain = base64_decode( $stored_local_domain );
2157
+ }
2158
  ?>
2159
  <div id="ewww-image-optimizer-notice-exactdn-domain-mismatch" class="notice notice-warning">
2160
  <p>
2162
  printf(
2163
  /* translators: 1: old domain name, 2: current domain name */
2164
  esc_html__( 'Easy IO detected that the Site URL has changed since the initial activation (previously %1$s, currently %2$s).', 'ewww-image-optimizer' ),
2165
+ '<strong>' . esc_html( $stored_local_domain ) . '</strong>',
2166
  '<strong>' . esc_html( $exactdn->upload_domain ) . '</strong>'
2167
  );
2168
  ?>
10528
  if ( empty( $translations ) ) {
10529
  return array( $id, array() );
10530
  }
10531
+ $translations = wp_list_pluck( $translations, 'element_id' );
10532
+ $translations = array_filter( $translations );
10533
  }
10534
+ $translations = apply_filters( 'ewwwio_translated_media_ids', $translations, $id );
10535
  if ( ewww_image_optimizer_iterable( $translations ) ) {
10536
  global $wpdb;
10537
  foreach ( $translations as $translation ) {
10538
+ ewwwio_debug_message( "checking {$translation} for results with WPML (or another translation plugin)" );
10539
+ $optimized_images = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->ewwwio_images WHERE attachment_id = %d AND gallery = 'media' AND image_size <> 0 ORDER BY orig_size DESC", $translation ), ARRAY_A );
 
 
 
10540
  if ( ! empty( $optimized_images ) ) {
10541
+ return array( (int) $translation, $optimized_images );
10542
  }
10543
  }
10544
  }
14784
  margin: -3px;
14785
  }
14786
  </style>
14787
+ <script data-cfasync="false" data-no-optimize="1" data-no-defer="1" data-no-minify="1"><?php echo $resize_detection_script; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></script>
14788
  <?php
14789
  }
14790
  }
ewww-image-optimizer.php CHANGED
@@ -13,7 +13,7 @@ Plugin Name: EWWW Image Optimizer
13
  Plugin URI: https://wordpress.org/plugins/ewww-image-optimizer/
14
  Description: Smaller Images, Faster Sites, Happier Visitors. Comprehensive image optimization that doesn't require a degree in rocket science.
15
  Author: Exactly WWW
16
- Version: 6.9.1
17
  Requires at least: 5.8
18
  Requires PHP: 7.2
19
  Author URI: https://ewww.io/
@@ -113,6 +113,10 @@ if ( ! defined( 'PHP_VERSION_ID' ) || PHP_VERSION_ID < 70200 ) {
113
  * EWWW_Image class for working with queued images and image records from the database.
114
  */
115
  require_once( EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH . 'classes/class-ewww-image.php' );
 
 
 
 
116
  /**
117
  * EWWWIO_Tracking class for reporting anonymous site data.
118
  */
13
  Plugin URI: https://wordpress.org/plugins/ewww-image-optimizer/
14
  Description: Smaller Images, Faster Sites, Happier Visitors. Comprehensive image optimization that doesn't require a degree in rocket science.
15
  Author: Exactly WWW
16
+ Version: 6.9.2
17
  Requires at least: 5.8
18
  Requires PHP: 7.2
19
  Author URI: https://ewww.io/
113
  * EWWW_Image class for working with queued images and image records from the database.
114
  */
115
  require_once( EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH . 'classes/class-ewww-image.php' );
116
+ /**
117
+ * EIO_Backup class for managing image backups.
118
+ */
119
+ require_once( EWWW_IMAGE_OPTIMIZER_PLUGIN_PATH . 'classes/class-eio-backup.php' );
120
  /**
121
  * EWWWIO_Tracking class for reporting anonymous site data.
122
  */
includes/lazysizes-post.js CHANGED
@@ -32,10 +32,6 @@ function constrainSrc(url,objectWidth,objectHeight,objectType){
32
  if (regSVG.exec(decUrl)){
33
  return url;
34
  }
35
- if (typeof eio_lazy_vars === 'undefined'){
36
- console.log('setting failsafe lazy vars');
37
- eio_lazy_vars = {"exactdn_domain":".exactdn.com"};
38
- }
39
  console.log('domain to test: ' + eio_lazy_vars.exactdn_domain);
40
  if (url.search('\\?') > 0 && url.search(eio_lazy_vars.exactdn_domain) > 0){
41
  console.log('domain matches URL with a ?');
@@ -123,7 +119,7 @@ function constrainSrc(url,objectWidth,objectHeight,objectType){
123
  }
124
  if('img-h'===objectType || objectHeight>objectWidth){
125
  console.log('img-h or fallback height>width, using h param');
126
- return url + '&h=' + objectHeight;
127
  }
128
  console.log('fallback using w param');
129
  return url + '?w=' + objectWidth;
32
  if (regSVG.exec(decUrl)){
33
  return url;
34
  }
 
 
 
 
35
  console.log('domain to test: ' + eio_lazy_vars.exactdn_domain);
36
  if (url.search('\\?') > 0 && url.search(eio_lazy_vars.exactdn_domain) > 0){
37
  console.log('domain matches URL with a ?');
119
  }
120
  if('img-h'===objectType || objectHeight>objectWidth){
121
  console.log('img-h or fallback height>width, using h param');
122
+ return url + '?h=' + objectHeight;
123
  }
124
  console.log('fallback using w param');
125
  return url + '?w=' + objectWidth;
includes/lazysizes-pre.js CHANGED
@@ -1,25 +1,16 @@
1
- /*var ewww_webp_supported = false;
2
- function lazysizesWebP(feature, callback) {
3
- var kTestImages = {
4
- alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",
5
- animation: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"
6
- };
7
- var img = new Image();
8
- img.onload = function () {
9
- ewww_webp_supported = (img.width > 0) && (img.height > 0);
10
- callback();
11
- };
12
- img.onerror = function () {
13
- callback();
14
- };
15
- img.src = "data:image/webp;base64," + kTestImages[feature];
16
- }*/
17
  if (typeof ewww_webp_supported === 'undefined') {
18
  var ewww_webp_supported = false;
19
  }
20
  window.lazySizesConfig = window.lazySizesConfig || {};
21
- /* window.lazySizesConfig.init = false; */
22
  window.lazySizesConfig.expand = document.documentElement.clientHeight > 500 && document.documentElement.clientWidth > 500 ? 1000 : 740;
 
 
 
 
 
 
 
 
23
  if (eio_lazy_vars.threshold > 50) {
24
  window.lazySizesConfig.expand = eio_lazy_vars.threshold;
25
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  if (typeof ewww_webp_supported === 'undefined') {
2
  var ewww_webp_supported = false;
3
  }
4
  window.lazySizesConfig = window.lazySizesConfig || {};
 
5
  window.lazySizesConfig.expand = document.documentElement.clientHeight > 500 && document.documentElement.clientWidth > 500 ? 1000 : 740;
6
+ if (typeof eio_lazy_vars === 'undefined'){
7
+ console.log('setting failsafe lazy vars');
8
+ eio_lazy_vars = {
9
+ exactdn_domain: '.exactdn.com',
10
+ threshold: 0,
11
+ skip_autoscale: 0,
12
+ };
13
+ }
14
  if (eio_lazy_vars.threshold > 50) {
15
  window.lazySizesConfig.expand = eio_lazy_vars.threshold;
16
  }
includes/lazysizes.min.js CHANGED
@@ -1 +1 @@
1
- var ewww_webp_supported;function shouldAutoScale(e){if(1==eio_lazy_vars.skip_autoscale)return!1;if(e.hasAttributes())for(var t=e.attributes,a=/skip-autoscale/,i=t.length-1;0<=i;i--){if(a.test(t[i].name))return!1;if(a.test(t[i].value))return!1}return!0}function constrainSrc(e,t,a,i){if(null===e)return e;var r=/w=(\d+)/,n=/fit=(\d+),(\d+)/,o=/resize=(\d+),(\d+)/,s=decodeURIComponent(e);if(/\.svg(\?.+)?$/.exec(s))return e;if("undefined"==typeof eio_lazy_vars&&(eio_lazy_vars={exactdn_domain:".exactdn.com"}),0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var l=o.exec(s);if(l&&t<l[1])return"img-w"===i?s.replace(o,"w="+t):"img-h"===i?s.replace(o,"h="+a):s.replace(o,"resize="+t+","+a);o=r.exec(e);if(o&&t<=o[1]){if("img-h"===i)return s.replace(r,"h="+a);if("bg-cover"!==i&&"img-crop"!==i)return e.replace(r,"w="+t);var d=o[1]-t;return 20<d||a<1080?e.replace(r,"resize="+t+","+a):e}d=n.exec(s);if(d&&t<d[1]){if("bg-cover"!==i&&"img-crop"!==i)return"img-w"===i?s.replace(n,"w="+t):"img-h"===i?s.replace(n,"h="+a):s.replace(n,"fit="+t+","+a);s=d[1]-t,n=d[2]-a;return 20<s||20<n?e.replace(r,"resize="+t+","+a):e}if(!o&&!d&&!l)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}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,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(n,e,o){"use strict";var s;e.addEventListener&&(s=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(e){var t,a,i,r;e.detail.instance==o&&(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=n.devicePixelRatio||1,a=Math.round(e.target.offsetWidth*t),r=Math.round(e.target.offsetHeight*t),0===i.search(/\[/)||shouldAutoScale(e.target)&&shouldAutoScale(e.target.parentNode)&&(i=n.lazySizes.hC(e.target,"wp-block-cover")?(n.lazySizes.hC(e.target,"has-parallax")?(a=Math.round(n.screen.width*t),r=Math.round(n.screen.height*t)):r<300&&(r=430),constrainSrc(i,a,r,"bg-cover")):n.lazySizes.hC(e.target,"cover-image")||n.lazySizes.hC(e.target,"elementor-bg")||n.lazySizes.hC(e.target,"et_parallax_bg")||n.lazySizes.hC(e.target,"bg-image-crop")?constrainSrc(i,a,r,"bg-cover"):constrainSrc(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){s.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("'+(s.test(i)?JSON.stringify(i):i)+'")':0===i.search(/\[/)?((i=JSON.parse(i)).forEach(function(e){s.test(e)&&JSON.stringify(e)}),i='url("'+i.join('"), url("')+'"',e.target.style.backgroundImage=i):e.target.style.backgroundImage="url("+(s.test(i)?JSON.stringify(i):i)+")")))},!1))}),document.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");void 0!==e.target._lazysizesWidth&&e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)}),document.addEventListener("lazybeforeunveil",function(e){var t,a,i,r,n,o=e.target,s=o.getAttribute("data-srcset");o.naturalWidth&&!s&&1<o.naturalWidth&&1<o.naturalHeight&&(i=window.devicePixelRatio||1,a=o.naturalWidth,r=o.naturalHeight,t=o.getAttribute("data-eio-rwidth"),e=o.getAttribute("data-eio-rheight"),t&&a<t&&(a=t,r=e),a=o.clientWidth&&1.25*o.clientWidth<a,r=o.clientHeight&&1.25*o.clientHeight<r,(a||r)&&(a=Math.round(o.offsetWidth*i),r=Math.round(o.offsetHeight*i),i=o.getAttribute("data-src"),n=o.getAttribute("data-src-webp"),ewww_webp_supported&&n&&-1==i.search("webp=1")&&(i=n),(r=!(!shouldAutoScale(o)||!shouldAutoScale(o.parentNode))&&(window.lazySizes.hC(o,"et_pb_jt_filterable_grid_item_image")||window.lazySizes.hC(o,"ss-foreground-image")||window.lazySizes.hC(o,"img-crop")?constrainSrc(i,a,r,"img-crop"):window.lazySizes.hC(o,"object-cover")&&(window.lazySizes.hC(o,"object-top")||window.lazySizes.hC(o,"object-bottom"))?constrainSrc(i,a,r,"img-w"):window.lazySizes.hC(o,"object-cover")&&(window.lazySizes.hC(o,"object-left")||window.lazySizes.hC(o,"object-right"))?constrainSrc(i,a,r,"img-h"):window.lazySizes.hC(o,"ct-image")&&window.lazySizes.hC(o,"object-cover")?constrainSrc(i,a,r,"img-crop"):constrainSrc(i,a,r,"img")))&&i!=r&&o.setAttribute("data-src",r))),ewww_webp_supported&&(!s||(s=o.getAttribute("data-srcset-webp"))&&o.setAttribute("data-srcset",s),(n=o.getAttribute("data-src-webp"))&&o.setAttribute("data-src",n))}),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,z;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 z=i.lazySizesConfig||i.lazysizesConfig||{},t)e in z||(z[e]=t[e])}(),!f||!f.getElementsByClassName)return{init:function(){},cfg:z,noSupport:!0};function c(e,t){S(e,t)||e.setAttribute("class",(e[y]("class")||"").trim()+" "+t)}function u(e,t){(t=S(e,t))&&e.setAttribute("class",(e[y]("class")||"").replace(t," "))}function h(e,t){var a;!l&&(a=i.picturefill||z.pf)?(t&&t.src&&!e[y]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)}var a,r,t,o,s,m=f.documentElement,l=i.HTMLPictureElement,d="addEventListener",y="getAttribute",e=i[d].bind(i),p=i.setTimeout,v=i.requestAnimationFrame||p,b=i.requestIdleCallback,w=/^picture$/i,_=["load","error","lazyincluded","_lazyloaded"],C={},A=Array.prototype.forEach,S=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[y]("class")||"")&&C[t]},E=function(t,a,e){var i=e?d:"removeEventListener";e&&E(t,a),_.forEach(function(e){t[i](e,a)})},x=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},L=function(e,t){return(getComputedStyle(e,null)||{})[t]},N=function(e,t,a){for(a=a||e.offsetWidth;a<z.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},M=(o=[],s=t=[],k._lsFlush=W,k);function W(){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?p:v)(W)))}function j(a,e){return e?function(){M(a)}:function(){var e=this,t=arguments;M(function(){a.apply(e,t)})}}function I(e){function t(){var e=n.now()-i;e<99?p(t,99-e):(b||r)(r)}var a,i,r=function(){a=null,e()};return function(){i=n.now(),a=a||p(t,99)}}var H,O,B,R,T,q,F,J,P,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"==L(f.body,"visibility"):U)||!("hidden"==L(e.parentNode,"visibility")&&"hidden"==L(e,"visibility"))},G=ze,Q=ie=ae=0,V=z.throttleDelay,X=z.ricTimeout,Y=b&&49<X?function(){b(he,{timeout:X}),X!==z.ricTimeout&&(X=z.ricTimeout)}:j(function(){p(he)},!0),se=j(me),le=function(e){se({target:e.target})},de=j(function(t,e,a,i,r){var n,o,s,l,d;(s=x(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(a?c(t,z.autosizesClass):t.setAttribute("sizes",i)),n=t[y](z.srcsetAttr),a=t[y](z.srcAttr),r&&(o=(d=t.parentNode)&&w.test(d.nodeName||"")),l=e.firesLoad||"src"in t&&(n||a||o),s={target:t},c(t,z.loadingClass),l&&(clearTimeout(B),B=p(ge,2500),E(t,le,!0)),o&&A.call(d.getElementsByTagName("source"),ye),n?t.setAttribute("srcset",n):a&&!o&&(ee.test(t.nodeName)?(i=a,0==(d=(e=t).getAttribute("data-load-mode")||z.iframeLoadMode)?e.contentWindow.location.replace(i):1==d&&(e.src=i)):t.src=a),r&&(n||o)&&h(t,{src:a})),t._lazyRace&&delete t._lazyRace,u(t,z.lazyClass),M(function(){var e=t.complete&&1<t.naturalWidth;l&&!e||(e&&c(t,z.fastLoadedClass),me(s),t._lazyCache=!0,p(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&ie--},!0)}),ue=I(function(){z.loadMode=3,oe()}),{_:function(){T=n.now(),g.elements=f.getElementsByClassName(z.lazyClass),H=f.getElementsByClassName(z.lazyClass+" "+z.preloadClass),e("scroll",oe,!0),e("resize",oe,!0),e("pageshow",function(e){var t;!e.persisted||(t=f.querySelectorAll("."+z.loadingClass)).length&&t.forEach&&v(function(){t.forEach(function(e){e.complete&&ce(e)})})}),i.MutationObserver?new MutationObserver(oe).observe(m,{childList:!0,subtree:!0,attributes:!0}):(m[d]("DOMNodeInserted",oe,!0),m[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)?ve():(e("load",ve),f[d]("DOMContentLoaded",oe),p(ve,2e4)),g.elements.length?(ze(),M._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():p(Y,t))},unveil:ce=function(e){var t,a,i,r;e._lazyRace||(!(r="auto"==(i=(a=Z.test(e.nodeName))&&(e[y](z.sizesAttr)||e[y]("sizes"))))&&O||!a||!e[y]("src")&&!e.srcset||e.complete||S(e,z.errorClass)||!S(e,z.lazyClass))&&(t=x(e,"lazyunveilread").detail,r&&Ce.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ie++,de(e,t,r,i,a))},_aLSL:pe});function ge(e){ie--,e&&!(ie<0)&&e.target||(ie=0)}function ze(){var e,t,a,i,r,n,o,s,l,d,c,u=g.elements;if((R=z.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][y]("data-expand"))&&(r=+o)||(r=ae),l||(l=!z.expand||z.expand<1?500<m.clientHeight&&500<m.clientWidth?500:370:z.expand,d=(g._defEx=l)*z.expFactor,c=z.hFac,U=null,ae<d&&ie<1&&2<re&&2<R&&!f.hidden?(ae=d,re=0):ae=1<R&&1<re&&ie<6?l:0),s!==r&&(q=innerWidth+r*c,F=innerHeight+r,n=-1*r,s=r),d=u[t].getBoundingClientRect(),($=d.bottom)>=n&&(J=d.top)<=F&&(D=d.right)>=n*c&&(P=d.left)<=q&&($||D||P||J)&&(z.loadHidden||ne(u[t]))&&(O&&ie<3&&!o&&(R<3||re<4)||function(e,t){var a,i=e,r=ne(e);for(J-=t,$+=t,P-=t,D+=t;r&&(i=i.offsetParent)&&i!=f.body&&i!=m;)(r=0<(L(i,"opacity")||1))&&"visible"!=L(i,"overflow")&&(a=i.getBoundingClientRect(),r=D>a.left&&P<a.right&&$>a.top-1&&J<a.bottom+1);return r}(u[t],r))){if(ce(u[t]),i=!0,9<ie)break}else!i&&O&&!a&&ie<4&&re<4&&2<R&&(H[0]||z.preloadAfterLoad)&&(H[0]||!o&&($||D||P||J||"auto"!=u[t][y](z.sizesAttr)))&&(a=H[0]||u[t]);a&&!i&&ce(a)}}function he(){K=!1,Q=n.now(),G()}function me(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),c(t,z.loadedClass),u(t,z.loadingClass),E(t,le),x(t,"lazyloaded"))}function ye(e){var t,a=e[y](z.srcsetAttr);(t=z.customMedia[e[y]("data-media")||e[y]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)}function pe(){3==z.loadMode&&(z.loadMode=2),ue()}function ve(){O||(n.now()-T<999?p(ve,999):(O=!0,z.loadMode=3,oe(),e("scroll",pe,!0)))}var be,we,_e,Ce=(we=j(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||h(e,a.detail)}),{_:function(){be=f.getElementsByClassName(z.autosizesClass),e("resize",_e)},checkElems:_e=I(function(){var e,t=be.length;if(t)for(e=0;e<t;e++)Ae(be[e])}),updateElem:Ae});function Ae(e,t,a){var i=e.parentNode;i&&(a=N(e,i,a),(t=x(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=t.detail.width)&&a!==e._lazysizesWidth&&we(e,i,t,a))}function Se(){!Se.i&&f.getElementsByClassName&&(Se.i=!0,Ce._(),fe._())}return p(function(){z.init&&Se()}),g={cfg:z,autoSizer:Ce,loader:fe,init:Se,uP:h,aC:c,rC:u,hC:S,fire:x,gW:N,rAF:M}});
1
+ var ewww_webp_supported;function shouldAutoScale(e){if(1==eio_lazy_vars.skip_autoscale)return!1;if(e.hasAttributes())for(var t=e.attributes,a=/skip-autoscale/,i=t.length-1;0<=i;i--){if(a.test(t[i].name))return!1;if(a.test(t[i].value))return!1}return!0}function constrainSrc(e,t,a,i){if(null===e)return e;var r=/w=(\d+)/,n=/fit=(\d+),(\d+)/,o=/resize=(\d+),(\d+)/,s=decodeURIComponent(e);if(/\.svg(\?.+)?$/.exec(s))return e;if(0<e.search("\\?")&&0<e.search(eio_lazy_vars.exactdn_domain)){var l=o.exec(s);if(l&&t<l[1])return"img-w"===i?s.replace(o,"w="+t):"img-h"===i?s.replace(o,"h="+a):s.replace(o,"resize="+t+","+a);o=r.exec(e);if(o&&t<=o[1]){if("img-h"===i)return s.replace(r,"h="+a);if("bg-cover"!==i&&"img-crop"!==i)return e.replace(r,"w="+t);var d=o[1]-t;return 20<d||a<1080?e.replace(r,"resize="+t+","+a):e}d=n.exec(s);if(d&&t<d[1]){if("bg-cover"!==i&&"img-crop"!==i)return"img-w"===i?s.replace(n,"w="+t):"img-h"===i?s.replace(n,"h="+a):s.replace(n,"fit="+t+","+a);s=d[1]-t,n=d[2]-a;return 20<s||20<n?e.replace(r,"resize="+t+","+a):e}if(!o&&!d&&!l)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}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,"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(n,e,o){"use strict";var s;e.addEventListener&&(s=/\(|\)|\s|'/,addEventListener("lazybeforeunveil",function(e){var t,a,i,r;e.detail.instance==o&&(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=n.devicePixelRatio||1,a=Math.round(e.target.offsetWidth*t),r=Math.round(e.target.offsetHeight*t),0===i.search(/\[/)||shouldAutoScale(e.target)&&shouldAutoScale(e.target.parentNode)&&(i=n.lazySizes.hC(e.target,"wp-block-cover")?(n.lazySizes.hC(e.target,"has-parallax")?(a=Math.round(n.screen.width*t),r=Math.round(n.screen.height*t)):r<300&&(r=430),constrainSrc(i,a,r,"bg-cover")):n.lazySizes.hC(e.target,"cover-image")||n.lazySizes.hC(e.target,"elementor-bg")||n.lazySizes.hC(e.target,"et_parallax_bg")||n.lazySizes.hC(e.target,"bg-image-crop")?constrainSrc(i,a,r,"bg-cover"):constrainSrc(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){s.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("'+(s.test(i)?JSON.stringify(i):i)+'")':0===i.search(/\[/)?((i=JSON.parse(i)).forEach(function(e){s.test(e)&&JSON.stringify(e)}),i='url("'+i.join('"), url("')+'"',e.target.style.backgroundImage=i):e.target.style.backgroundImage="url("+(s.test(i)?JSON.stringify(i):i)+")")))},!1))}),document.addEventListener("lazybeforesizes",function(e){e.target.getAttribute("data-src");void 0!==e.target._lazysizesWidth&&e.detail.width<e.target._lazysizesWidth&&(e.detail.width=e.target._lazysizesWidth)}),document.addEventListener("lazybeforeunveil",function(e){var t,a,i,r,n,o=e.target,s=o.getAttribute("data-srcset");o.naturalWidth&&!s&&1<o.naturalWidth&&1<o.naturalHeight&&(i=window.devicePixelRatio||1,a=o.naturalWidth,r=o.naturalHeight,t=o.getAttribute("data-eio-rwidth"),e=o.getAttribute("data-eio-rheight"),t&&a<t&&(a=t,r=e),a=o.clientWidth&&1.25*o.clientWidth<a,r=o.clientHeight&&1.25*o.clientHeight<r,(a||r)&&(a=Math.round(o.offsetWidth*i),r=Math.round(o.offsetHeight*i),i=o.getAttribute("data-src"),n=o.getAttribute("data-src-webp"),ewww_webp_supported&&n&&-1==i.search("webp=1")&&(i=n),(r=!(!shouldAutoScale(o)||!shouldAutoScale(o.parentNode))&&(window.lazySizes.hC(o,"et_pb_jt_filterable_grid_item_image")||window.lazySizes.hC(o,"ss-foreground-image")||window.lazySizes.hC(o,"img-crop")?constrainSrc(i,a,r,"img-crop"):window.lazySizes.hC(o,"object-cover")&&(window.lazySizes.hC(o,"object-top")||window.lazySizes.hC(o,"object-bottom"))?constrainSrc(i,a,r,"img-w"):window.lazySizes.hC(o,"object-cover")&&(window.lazySizes.hC(o,"object-left")||window.lazySizes.hC(o,"object-right"))?constrainSrc(i,a,r,"img-h"):window.lazySizes.hC(o,"ct-image")&&window.lazySizes.hC(o,"object-cover")?constrainSrc(i,a,r,"img-crop"):constrainSrc(i,a,r,"img")))&&i!=r&&o.setAttribute("data-src",r))),ewww_webp_supported&&(!s||(s=o.getAttribute("data-srcset-webp"))&&o.setAttribute("data-srcset",s),(n=o.getAttribute("data-src-webp"))&&o.setAttribute("data-src",n))}),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,z;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 z=i.lazySizesConfig||i.lazysizesConfig||{},t)e in z||(z[e]=t[e])}(),!f||!f.getElementsByClassName)return{init:function(){},cfg:z,noSupport:!0};function c(e,t){S(e,t)||e.setAttribute("class",(e[y]("class")||"").trim()+" "+t)}function u(e,t){(t=S(e,t))&&e.setAttribute("class",(e[y]("class")||"").replace(t," "))}function h(e,t){var a;!l&&(a=i.picturefill||z.pf)?(t&&t.src&&!e[y]("srcset")&&e.setAttribute("srcset",t.src),a({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)}var a,r,t,o,s,m=f.documentElement,l=i.HTMLPictureElement,d="addEventListener",y="getAttribute",e=i[d].bind(i),p=i.setTimeout,v=i.requestAnimationFrame||p,b=i.requestIdleCallback,w=/^picture$/i,_=["load","error","lazyincluded","_lazyloaded"],C={},A=Array.prototype.forEach,S=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[y]("class")||"")&&C[t]},E=function(t,a,e){var i=e?d:"removeEventListener";e&&E(t,a),_.forEach(function(e){t[i](e,a)})},x=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},L=function(e,t){return(getComputedStyle(e,null)||{})[t]},N=function(e,t,a){for(a=a||e.offsetWidth;a<z.minSize&&t&&!e._lazysizesWidth;)a=t.offsetWidth,t=t.parentNode;return a},M=(o=[],s=t=[],W._lsFlush=k,W);function k(){var e=s;for(s=t.length?o:t,r=!(a=!0);e.length;)e.shift()();a=!1}function W(e,t){a&&!t?e.apply(this,arguments):(s.push(e),r||(r=!0,(f.hidden?p:v)(k)))}function j(a,e){return e?function(){M(a)}:function(){var e=this,t=arguments;M(function(){a.apply(e,t)})}}function I(e){function t(){var e=n.now()-i;e<99?p(t,99-e):(b||r)(r)}var a,i,r=function(){a=null,e()};return function(){i=n.now(),a=a||p(t,99)}}var H,O,B,R,T,q,F,J,P,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"==L(f.body,"visibility"):U)||!("hidden"==L(e.parentNode,"visibility")&&"hidden"==L(e,"visibility"))},G=ze,Q=ie=ae=0,V=z.throttleDelay,X=z.ricTimeout,Y=b&&49<X?function(){b(he,{timeout:X}),X!==z.ricTimeout&&(X=z.ricTimeout)}:j(function(){p(he)},!0),se=j(me),le=function(e){se({target:e.target})},de=j(function(t,e,a,i,r){var n,o,s,l,d;(s=x(t,"lazybeforeunveil",e)).defaultPrevented||(i&&(a?c(t,z.autosizesClass):t.setAttribute("sizes",i)),n=t[y](z.srcsetAttr),a=t[y](z.srcAttr),r&&(o=(d=t.parentNode)&&w.test(d.nodeName||"")),l=e.firesLoad||"src"in t&&(n||a||o),s={target:t},c(t,z.loadingClass),l&&(clearTimeout(B),B=p(ge,2500),E(t,le,!0)),o&&A.call(d.getElementsByTagName("source"),ye),n?t.setAttribute("srcset",n):a&&!o&&(ee.test(t.nodeName)?(i=a,0==(d=(e=t).getAttribute("data-load-mode")||z.iframeLoadMode)?e.contentWindow.location.replace(i):1==d&&(e.src=i)):t.src=a),r&&(n||o)&&h(t,{src:a})),t._lazyRace&&delete t._lazyRace,u(t,z.lazyClass),M(function(){var e=t.complete&&1<t.naturalWidth;l&&!e||(e&&c(t,z.fastLoadedClass),me(s),t._lazyCache=!0,p(function(){"_lazyCache"in t&&delete t._lazyCache},9)),"lazy"==t.loading&&ie--},!0)}),ue=I(function(){z.loadMode=3,oe()}),{_:function(){T=n.now(),g.elements=f.getElementsByClassName(z.lazyClass),H=f.getElementsByClassName(z.lazyClass+" "+z.preloadClass),e("scroll",oe,!0),e("resize",oe,!0),e("pageshow",function(e){var t;!e.persisted||(t=f.querySelectorAll("."+z.loadingClass)).length&&t.forEach&&v(function(){t.forEach(function(e){e.complete&&ce(e)})})}),i.MutationObserver?new MutationObserver(oe).observe(m,{childList:!0,subtree:!0,attributes:!0}):(m[d]("DOMNodeInserted",oe,!0),m[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)?ve():(e("load",ve),f[d]("DOMContentLoaded",oe),p(ve,2e4)),g.elements.length?(ze(),M._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():p(Y,t))},unveil:ce=function(e){var t,a,i,r;e._lazyRace||(!(r="auto"==(i=(a=Z.test(e.nodeName))&&(e[y](z.sizesAttr)||e[y]("sizes"))))&&O||!a||!e[y]("src")&&!e.srcset||e.complete||S(e,z.errorClass)||!S(e,z.lazyClass))&&(t=x(e,"lazyunveilread").detail,r&&Ce.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ie++,de(e,t,r,i,a))},_aLSL:pe});function ge(e){ie--,e&&!(ie<0)&&e.target||(ie=0)}function ze(){var e,t,a,i,r,n,o,s,l,d,c,u=g.elements;if((R=z.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][y]("data-expand"))&&(r=+o)||(r=ae),l||(l=!z.expand||z.expand<1?500<m.clientHeight&&500<m.clientWidth?500:370:z.expand,d=(g._defEx=l)*z.expFactor,c=z.hFac,U=null,ae<d&&ie<1&&2<re&&2<R&&!f.hidden?(ae=d,re=0):ae=1<R&&1<re&&ie<6?l:0),s!==r&&(q=innerWidth+r*c,F=innerHeight+r,n=-1*r,s=r),d=u[t].getBoundingClientRect(),($=d.bottom)>=n&&(J=d.top)<=F&&(D=d.right)>=n*c&&(P=d.left)<=q&&($||D||P||J)&&(z.loadHidden||ne(u[t]))&&(O&&ie<3&&!o&&(R<3||re<4)||function(e,t){var a,i=e,r=ne(e);for(J-=t,$+=t,P-=t,D+=t;r&&(i=i.offsetParent)&&i!=f.body&&i!=m;)(r=0<(L(i,"opacity")||1))&&"visible"!=L(i,"overflow")&&(a=i.getBoundingClientRect(),r=D>a.left&&P<a.right&&$>a.top-1&&J<a.bottom+1);return r}(u[t],r))){if(ce(u[t]),i=!0,9<ie)break}else!i&&O&&!a&&ie<4&&re<4&&2<R&&(H[0]||z.preloadAfterLoad)&&(H[0]||!o&&($||D||P||J||"auto"!=u[t][y](z.sizesAttr)))&&(a=H[0]||u[t]);a&&!i&&ce(a)}}function he(){K=!1,Q=n.now(),G()}function me(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),c(t,z.loadedClass),u(t,z.loadingClass),E(t,le),x(t,"lazyloaded"))}function ye(e){var t,a=e[y](z.srcsetAttr);(t=z.customMedia[e[y]("data-media")||e[y]("media")])&&e.setAttribute("media",t),a&&e.setAttribute("srcset",a)}function pe(){3==z.loadMode&&(z.loadMode=2),ue()}function ve(){O||(n.now()-T<999?p(ve,999):(O=!0,z.loadMode=3,oe(),e("scroll",pe,!0)))}var be,we,_e,Ce=(we=j(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||h(e,a.detail)}),{_:function(){be=f.getElementsByClassName(z.autosizesClass),e("resize",_e)},checkElems:_e=I(function(){var e,t=be.length;if(t)for(e=0;e<t;e++)Ae(be[e])}),updateElem:Ae});function Ae(e,t,a){var i=e.parentNode;i&&(a=N(e,i,a),(t=x(e,"lazybeforesizes",{width:a,dataAttr:!!t})).defaultPrevented||(a=t.detail.width)&&a!==e._lazysizesWidth&&we(e,i,t,a))}function Se(){!Se.i&&f.getElementsByClassName&&(Se.i=!0,Ce._(),fe._())}return p(function(){z.init&&Se()}),g={cfg:z,autoSizer:Ce,loader:fe,init:Se,uP:h,aC:c,rC:u,hC:S,fire:x,gW:N,rAF:M}});
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: optimize, image, convert, webp, resize, compress, lazy load, optimization,
5
  Requires at least: 5.8
6
  Tested up to: 6.1
7
  Requires PHP: 7.2
8
- Stable tag: 6.9.1
9
  License: GPLv3
10
 
11
  Smaller Images, Faster Sites, Happier Visitors. Comprehensive image optimization that doesn't require a degree in rocket science.
@@ -137,6 +137,13 @@ That's not a question, but since I made it up, I'll answer it. See this resource
137
  * Feature requests can be viewed and submitted on our [feedback portal](https://feedback.ewww.io/b/features)
138
  * If you would like to help translate this plugin in your language, [join the team](https://translate.wordpress.org/projects/wp-plugins/ewww-image-optimizer/)
139
 
 
 
 
 
 
 
 
140
  = 6.9.1 =
141
  * changed: default syntax for MySQL 8.x to use faster upgrade query
142
  * fixed: bulk action parameter was not validated properly when selecting attachments for optimization
5
  Requires at least: 5.8
6
  Tested up to: 6.1
7
  Requires PHP: 7.2
8
+ Stable tag: 6.9.2
9
  License: GPLv3
10
 
11
  Smaller Images, Faster Sites, Happier Visitors. Comprehensive image optimization that doesn't require a degree in rocket science.
137
  * Feature requests can be viewed and submitted on our [feedback portal](https://feedback.ewww.io/b/features)
138
  * If you would like to help translate this plugin in your language, [join the team](https://translate.wordpress.org/projects/wp-plugins/ewww-image-optimizer/)
139
 
140
+ = 6.9.2 =
141
+ * changed: improved Easy IO detection for site URL changes
142
+ * changed: load backup class earlier to prevent issues with custom image uploaders
143
+ * fixed: and improved the ewwwio_translated_media_ids filter, props @ocean90
144
+ * fixed: Lazy Load JS throws error if inline script vars are missing
145
+ * fixed: Easy IO + Lazy Load auto-scale produces invalid URL if an image with no query string is constrained by height
146
+
147
  = 6.9.1 =
148
  * changed: default syntax for MySQL 8.x to use faster upgrade query
149
  * fixed: bulk action parameter was not validated properly when selecting attachments for optimization