Changeset 3796447
- Timestamp:
- 11/11/2026 01:51:41 PM (less than one hour ago)
- Location:
- swiffle-grid-embed-data-anywhere
- Files:
-
- 131 added
- 12 edited
-
tags/1.20 (added)
-
tags/1.20/block-v2 (added)
-
tags/1.20/block-v2/swiffle-metadata.json (added)
-
tags/1.20/block.json (added)
-
tags/1.20/build (added)
-
tags/1.20/build/swiffle (added)
-
tags/1.20/build/swiffle/index.css (added)
-
tags/1.20/build/swiffle/index.js (added)
-
tags/1.20/core (added)
-
tags/1.20/core/class_swiffle_utilities.php (added)
-
tags/1.20/core/class_swiffle_xlsx_reader.php (added)
-
tags/1.20/css (added)
-
tags/1.20/css/swiffle_adm.css (added)
-
tags/1.20/css/swiffle_editor.css (added)
-
tags/1.20/css/swiffle_embed_demo.css (added)
-
tags/1.20/css/swiffle_icons.json (added)
-
tags/1.20/css/swifflegrid.css (added)
-
tags/1.20/css/swifflegrid_custom-sample.css (added)
-
tags/1.20/css/vendor (added)
-
tags/1.20/css/vendor/images (added)
-
tags/1.20/css/vendor/images/layers-2x.png (added)
-
tags/1.20/css/vendor/images/layers.png (added)
-
tags/1.20/css/vendor/images/marker-icon-2x.png (added)
-
tags/1.20/css/vendor/images/marker-icon.png (added)
-
tags/1.20/css/vendor/images/marker-shadow.png (added)
-
tags/1.20/css/vendor/leaflet.css (added)
-
tags/1.20/css/vendor/pico.min.css (added)
-
tags/1.20/demo (added)
-
tags/1.20/demo/wonders-demo.csv (added)
-
tags/1.20/frontend (added)
-
tags/1.20/frontend/class_swiffle_globals.php (added)
-
tags/1.20/handlers (added)
-
tags/1.20/handlers/csv (added)
-
tags/1.20/handlers/csv/get_csv_comma.php (added)
-
tags/1.20/handlers/csv/get_csv_semicolon.php (added)
-
tags/1.20/handlers/get (added)
-
tags/1.20/handlers/get/get_get_intl.php (added)
-
tags/1.20/handlers/rss (added)
-
tags/1.20/handlers/rss/get_rss_posts.php (added)
-
tags/1.20/handlers/source (added)
-
tags/1.20/handlers/source/class_swiffle_getposts.php (added)
-
tags/1.20/handlers/source/class_swiffle_source_loader.php (added)
-
tags/1.20/handlers/wp (added)
-
tags/1.20/handlers/wp/get_wp_add_comment.php (added)
-
tags/1.20/handlers/wp/get_wp_categories.php (added)
-
tags/1.20/handlers/wp/get_wp_posts.php (added)
-
tags/1.20/handlers/wp/get_wp_reviews.php (added)
-
tags/1.20/handlers/xlsx (added)
-
tags/1.20/handlers/xlsx/get_xlsx_posts.php (added)
-
tags/1.20/img (added)
-
tags/1.20/img/favicon.png (added)
-
tags/1.20/img/logo_swiffle_grid.png (added)
-
tags/1.20/img/logo_swiffle_grid.svg (added)
-
tags/1.20/img/logo_swiffle_grid_dark.svg (added)
-
tags/1.20/img/logo_swiffle_grid_wp_menu.svg (added)
-
tags/1.20/includes (added)
-
tags/1.20/includes/api (added)
-
tags/1.20/includes/api/class_swiffle_api_core.php (added)
-
tags/1.20/includes/api/swiffle_api_router.php (added)
-
tags/1.20/includes/deactivation-feedback.php (added)
-
tags/1.20/includes/elementor (added)
-
tags/1.20/includes/elementor/component_attributes.php (added)
-
tags/1.20/includes/elementor/editor.css (added)
-
tags/1.20/includes/elementor/editor.js (added)
-
tags/1.20/includes/elementor/widget_swiffle_grid.php (added)
-
tags/1.20/includes/onboarding.php (added)
-
tags/1.20/js (added)
-
tags/1.20/js/swiffle_adm_autocomplete.js (added)
-
tags/1.20/js/swiffle_adm_remote_urls.js (added)
-
tags/1.20/js/swiffle_deactivation_feedback.js (added)
-
tags/1.20/js/swiffle_embed_loader.js (added)
-
tags/1.20/js/swiffle_setup_bar.js (added)
-
tags/1.20/js/swifflegrid.js (added)
-
tags/1.20/js/swifflegrid.js.LICENSE.txt (added)
-
tags/1.20/js/vendor (added)
-
tags/1.20/js/vendor/leaflet (added)
-
tags/1.20/js/vendor/leaflet/leaflet.js (added)
-
tags/1.20/languages (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-ar.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-ar.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-de_DE.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-de_DE.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-es_ES.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-es_ES.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-fr_FR.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-fr_FR.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-hi_IN.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-hi_IN.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-it_IT.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-it_IT.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-ja.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-ja.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-ko_KR.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-ko_KR.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-nl_NL.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-nl_NL.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-pl_PL.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-pl_PL.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-pt_BR.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-pt_BR.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-pt_PT.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-pt_PT.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-ru_RU.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-ru_RU.po (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-zh_CN.mo (added)
-
tags/1.20/languages/swiffle-grid-embed-data-anywhere-zh_CN.po (added)
-
tags/1.20/published-source (added)
-
tags/1.20/published-source/README.txt (added)
-
tags/1.20/published-source/swiffle (added)
-
tags/1.20/published-source/swiffle/components (added)
-
tags/1.20/published-source/swiffle/components/BlockPropertiesPanel.js (added)
-
tags/1.20/published-source/swiffle/components/CardsPropertiesPanel.js (added)
-
tags/1.20/published-source/swiffle/components/ColorsPanel.js (added)
-
tags/1.20/published-source/swiffle/components/DataPanel.js (added)
-
tags/1.20/published-source/swiffle/components/EmbedPanel.js (added)
-
tags/1.20/published-source/swiffle/edit.js (added)
-
tags/1.20/published-source/swiffle/editor.css (added)
-
tags/1.20/published-source/swiffle/index.js (added)
-
tags/1.20/published-source/swiffle/save.js (added)
-
tags/1.20/published-source/swiffle/style.css (added)
-
tags/1.20/published-source/swiffle/utils (added)
-
tags/1.20/published-source/swiffle/utils/buildOption.js (added)
-
tags/1.20/published-source/swiffle/utils/generateEmbedCode.js (added)
-
tags/1.20/published-source/swiffle/utils/getSourceTraits.js (added)
-
tags/1.20/published-source/webcomponent (added)
-
tags/1.20/published-source/webcomponent/main.js (added)
-
tags/1.20/readme.txt (added)
-
tags/1.20/swiffle-grid-embed-data-anywhere.php (added)
-
tags/1.20/swiffle_admin.php (added)
-
tags/1.20/swiffle_autoload.php (added)
-
tags/1.20/swiffle_intl_data.php (added)
-
trunk/build/swiffle/index.js (modified) (4 diffs)
-
trunk/core/class_swiffle_utilities.php (modified) (1 diff)
-
trunk/includes/api/class_swiffle_api_core.php (modified) (2 diffs)
-
trunk/includes/elementor/editor.js (modified) (1 diff)
-
trunk/includes/elementor/widget_swiffle_grid.php (modified) (2 diffs)
-
trunk/js/swiffle_setup_bar.js (modified) (3 diffs)
-
trunk/js/swifflegrid.js (modified) (1 diff)
-
trunk/published-source/swiffle/components/EmbedPanel.js (modified) (3 diffs)
-
trunk/published-source/swiffle/utils/generateEmbedCode.js (modified) (2 diffs)
-
trunk/published-source/webcomponent/main.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/swiffle-grid-embed-data-anywhere.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
swiffle-grid-embed-data-anywhere/trunk/build/swiffle/index.js
r3789569 r3796447 1998 1998 var _generateEmbedCode = require("../utils/generateEmbedCode"); 1999 1999 var _generateEmbedCodeDefault = parcelHelpers.interopDefault(_generateEmbedCode); 2000 const { PanelBody, ButtonGroup, Button, ToggleControl } = wp.components;2000 const { PanelBody, ButtonGroup, Button, ToggleControl, Slot } = wp.components; 2001 2001 const { useState } = wp.element; 2002 2002 function EmbedPanel({ attributes, setAttributes, datak, cacheVersion }) { 2003 2003 const [mode, setMode] = useState('full'); 2004 2004 const [withSetupBar, setWithSetupBar] = useState(false); 2005 const code = (0, _generateEmbedCodeDefault.default)(attributes.componentPath, datak, cacheVersion, mode, withSetupBar); 2005 const [gridAttrs, setGridAttrs] = useState({}); 2006 const code = (0, _generateEmbedCodeDefault.default)(attributes.componentPath, datak, cacheVersion, mode, withSetupBar, gridAttrs); 2006 2007 return /*#__PURE__*/ React.createElement(PanelBody, { 2007 2008 title: _swiffle_site__('Embed code'), … … 2023 2024 checked: withSetupBar, 2024 2025 onChange: (v)=>setWithSetupBar(v) 2026 }), /*#__PURE__*/ React.createElement(Slot, { 2027 name: "swiffle_slot_embed_1", 2028 fillProps: { 2029 attributes, 2030 gridAttrs, 2031 setGridAttrs 2032 } 2025 2033 }), /*#__PURE__*/ React.createElement("textarea", { 2026 2034 readOnly: true, … … 2065 2073 return urls.map((u)=>`<script src="${u}${u.indexOf('?') === -1 ? '?v=' : '&v='}${cacheVersion}" data-swiffle-setup-bar></script>`).join('\n'); 2066 2074 } 2067 function generateEmbedCode(path, datak, cacheVersion, mode = 'full', withSetupBar = false ) {2075 function generateEmbedCode(path, datak, cacheVersion, mode = 'full', withSetupBar = false, gridAttrs = {}) { 2068 2076 if (!path || typeof path !== 'string') return ''; 2069 2077 const jsDirUrl = path.replace('/css/', '/js/'); … … 2084 2092 // Optional setup bar: a settings panel beside or above the grid, loaded only when asked for (separate file, the grid 2085 2093 // component itself is unchanged). Its script also runs only once per page. 2086 const gridTag = withSetupBar ? `<swiffle-grid data-setup-bar datak="${datak}"></swiffle-grid>` : `<swiffle-grid datak="${datak}"></swiffle-grid>`; 2094 // Extra data-* attributes of the grid tag, given by the 2095 // swiffle_slot_embed_1 fill (empty values are left out). 2096 const esc = (v)=>String(v).replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); 2097 const back = Object.keys(gridAttrs || {}).filter((k)=>/^data-[a-z0-9-]+$/.test(k) && String(gridAttrs[k] || '').trim() !== '').map((k)=>` ${k}="${esc(String(gridAttrs[k]).trim())}"`).join(''); 2098 const gridTag = withSetupBar ? `<swiffle-grid data-setup-bar${back} datak="${datak}"></swiffle-grid>` : `<swiffle-grid${back} datak="${datak}"></swiffle-grid>`; 2087 2099 const barTags = withSetupBar ? '\n' + setupBarTags(jsDirUrl, cacheVersion) : ''; 2088 2100 // "block" mode: a fragment meant to be pasted into an existing page -
swiffle-grid-embed-data-anywhere/trunk/core/class_swiffle_utilities.php
r3730823 r3796447 31 31 'scope' => substr($entry, $pos + 1), 32 32 ]; 33 } 34 35 /** 36 * Does a host match an allowed host? The allowed host may start with 37 * "*" followed by "-" or "." (e.g. "*-atari-embeds.googleusercontent.com"): 38 * the star stands for letters, digits and dashes inside that first part 39 * of the name only, never for a dot. Hosts whose first part changes on 40 * each load (Google Sites embeds) can be allowed this way. 41 */ 42 public static function host_matches($allowed_host, $host) { 43 $allowed_host = strtolower((string) $allowed_host); 44 $host = strtolower((string) $host); 45 if ($allowed_host === '' || $host === '') { 46 return false; 47 } 48 if (strpos($allowed_host, '*') !== 0) { 49 return $allowed_host === $host; 50 } 51 $rest = substr($allowed_host, 1); 52 if ($rest === '' || ($rest[0] !== '-' && $rest[0] !== '.') || strpos($rest, '*') !== false || substr_count($rest, '.') < 2) { 53 return false; 54 } 55 return (bool) preg_match('/^[a-z0-9-]+' . preg_quote($rest, '/') . '$/', $host); 56 } 57 58 /** 59 * Does a page address match an allowed address? Same address after 60 * removing a trailing "/", the host part following host_matches(). 61 */ 62 public static function url_matches($allowed_url, $url) { 63 $allowed_url = rtrim((string) $allowed_url, '/'); 64 $url = rtrim((string) $url, '/'); 65 if ($allowed_url === $url) { 66 return true; 67 } 68 if (strpos($allowed_url, '*') === false) { 69 return false; 70 } 71 $a = wp_parse_url($allowed_url); 72 $u = wp_parse_url($url); 73 if (!$a || !$u || ($a['scheme'] ?? '') !== ($u['scheme'] ?? '') || !self::host_matches($a['host'] ?? '', $u['host'] ?? '')) { 74 return false; 75 } 76 $tail = function ($p) { 77 return (isset($p['port']) ? ':' . $p['port'] : '') . ($p['path'] ?? '') . (isset($p['query']) ? '?' . $p['query'] : ''); 78 }; 79 return rtrim($tail($a), '/') === rtrim($tail($u), '/'); 33 80 } 34 81 -
swiffle-grid-embed-data-anywhere/trunk/includes/api/class_swiffle_api_core.php
r3753389 r3796447 44 44 foreach (Swiffle_Utilities::allowed_remote_entries() as $r) { 45 45 $entry = Swiffle_Utilities::parse_whitelist_entry($r); 46 if ( (wp_parse_url($entry['url'])['host'] ?? '') === $header_host) {46 if (Swiffle_Utilities::host_matches(wp_parse_url($entry['url'])['host'] ?? '', $header_host)) { 47 47 return true; 48 48 } … … 198 198 if ($is_editor_context) { 199 199 $r_parsed = wp_parse_url($entry['url']); 200 if ( ($r_parsed['host'] ?? '') === $host) {200 if (Swiffle_Utilities::host_matches($r_parsed['host'] ?? '', $host)) { 201 201 $json = null; 202 202 $matched_scope = $entry['scope']; 203 203 } 204 } elseif ( rtrim($entry['url'],'/') === rtrim($jreq->replyto,'/')) {204 } elseif (Swiffle_Utilities::url_matches($entry['url'], $jreq->replyto)) { 205 205 $json = null; 206 206 $matched_scope = $entry['scope']; -
swiffle-grid-embed-data-anywhere/trunk/includes/elementor/editor.js
r3789569 r3796447 122 122 function buildEmbedCode(bridge, mode, withSetupBar) { 123 123 var d = bridge.dataset; 124 // Extra data-* attributes of the grid tag (swiffle_embed_grid_attributes filter) 125 var back = ''; 126 try { 127 var extra = JSON.parse(d.gridAttrs || '{}'); 128 Object.keys(extra).forEach(function(k) { 129 if (/^data-[a-z0-9-]+$/.test(k) && String(extra[k]).trim() !== '') { 130 back += ' ' + k + '="' + String(extra[k]).replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>') + '"'; 131 } 132 }); 133 } catch (e) {} 124 134 var loaderTag = '<script src="' + d.loaderUrl + '" data-src="' + d.scriptUrl 125 135 + '" data-cache-version="' + d.version + '"></script>'; 126 136 var gridTag = withSetupBar 127 ? '<swiffle-grid data-setup-bar datak="' + d.datak + '"></swiffle-grid>'128 : '<swiffle-grid datak="' + d.datak + '"></swiffle-grid>';137 ? '<swiffle-grid data-setup-bar' + back + ' datak="' + d.datak + '"></swiffle-grid>' 138 : '<swiffle-grid' + back + ' datak="' + d.datak + '"></swiffle-grid>'; 129 139 if (withSetupBar) { 130 140 var tags = setupBarTags(d); -
swiffle-grid-embed-data-anywhere/trunk/includes/elementor/widget_swiffle_grid.php
r3789569 r3796447 878 878 // Optional setup bar scripts, same list as the block editor (see frontend/class_swiffle_globals.php). 879 879 $setup_bar_scripts = array_values( array_map( 'esc_url_raw', (array) apply_filters( 'swiffle_setup_bar_scripts', [ SWIFFLE_CLI_JS_DIR . 'swiffle_setup_bar.js' ] ) ) ); 880 // Extra data-* attributes for the grid tag of the embed code 881 // (extension point, empty by default). 882 $grid_attrs = []; 883 foreach ( (array) apply_filters( 'swiffle_embed_grid_attributes', [], $settings ) as $k => $v ) { 884 if ( is_string( $k ) && preg_match( '/^data-[a-z0-9-]+$/', $k ) && is_scalar( $v ) && trim( (string) $v ) !== '' ) { 885 $grid_attrs[ $k ] = sanitize_text_field( (string) $v ); 886 } 887 } 880 888 881 889 // The embed-code UI (mode toggle, textarea, copy button) now … … 901 909 data-demo-css-url="' . esc_attr( $demo_css_url ) . '" 902 910 data-setup-bar-scripts="' . esc_attr( wp_json_encode( $setup_bar_scripts ) ) . '" 911 data-grid-attrs="' . esc_attr( wp_json_encode( (object) $grid_attrs ) ) . '" 903 912 data-version="' . esc_attr( $version ) . '"></div>'; 904 913 } -
swiffle-grid-embed-data-anywhere/trunk/js/swiffle_setup_bar.js
r3789646 r3796447 240 240 this.host = host; // wrapper around the grid, recreated content on every change 241 241 this.original = this.grid().getAttribute('datak'); 242 // Other data-* attributes of the grid tag are kept as they are 243 var g = this.grid(), extra = ''; 244 for (var i = 0; i < g.attributes.length; i++) { 245 var a = g.attributes[i]; 246 if (/^data-[a-z0-9-]+$/.test(a.name) && a.name !== 'data-setup-bar') { 247 extra += ' ' + a.name + '="' + String(a.value).replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>') + '"'; 248 } 249 } 250 this.backAttr = extra; 242 251 this.cfg = decodeDatak(this.original) || {}; 243 252 this.scope = 'both'; … … 279 288 SetupBar.prototype.apply = function (datak) { 280 289 var d = datak || encodeDatak(this.cfg); 281 this.host.innerHTML = '<swiffle-grid data-setup-bar datak="' + d + '"></swiffle-grid>';290 this.host.innerHTML = '<swiffle-grid data-setup-bar' + (this.backAttr || '') + ' datak="' + d + '"></swiffle-grid>'; 282 291 this.watchLabels(); 283 292 this.updateCode(); … … 513 522 var loader = document.querySelector('script[src*="swiffle_embed_loader.js"]'); 514 523 if (loader) lines.push(cleanTag(loader)); 515 lines.push('<swiffle-grid ' + (keep ? 'data-setup-bar ' : '') + 'datak="' + encodeDatak(this.cfg) + '"></swiffle-grid>');524 lines.push('<swiffle-grid ' + (keep ? 'data-setup-bar ' : '') + (this.backAttr ? this.backAttr.slice(1) + ' ' : '') + 'datak="' + encodeDatak(this.cfg) + '"></swiffle-grid>'); 516 525 if (keep) { 517 526 document.querySelectorAll('script[data-swiffle-setup-bar]').forEach(function (s) { lines.push(cleanTag(s)); }); -
swiffle-grid-embed-data-anywhere/trunk/js/swifflegrid.js
r3781428 r3796447 1 1 /*! For license information please see swifflegrid.js.LICENSE.txt */ 2 (()=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){var t,n,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",r=o.toStringTag||"@@toStringTag";function a(e,o,s,r){var a=o&&o.prototype instanceof c?o:c,d=Object.create(a.prototype);return i(d,"_invoke",function(e,i,o){var s,r,a,c=0,d=o||[],f=!1,h={p:0,n:0,v:t,a:u,f:u.bind(t,4),d:function(e,i){return s=e,r=0,a=t,h.n=i,l}};function u(e,i){for(r=e,a=i,n=0;!f&&c&&!o&&n<d.length;n++){var o,s=d[n],u=h.p,p=s[2];e>3?(o=p===i)&&(a=s[(r=s[4])?5:(r=3,3)],s[4]=s[5]=t):s[0]<=u&&((o=e<2&&u<s[1])?(r=0,h.v=i,h.n=s[1]):u<p&&(o=e<3||s[0]>i||i>p)&&(s[4]=e,s[5]=i,h.n=p,r=0))}if(o||e>1)return l;throw f=!0,i}return function(o,d,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===d&&u(d,p),r=d,a=p;(n=r<2?t:a)||!f;){s||(r?r<3?(r>1&&(h.n=-1),u(r,a)):h.n=a:h.v=a);try{if(c=2,s){if(r||(o="next"),n=s[o]){if(!(n=n.call(s,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,r<2&&(r=0)}else 1===r&&(n=s.return)&&n.call(s),r<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),r=1);s=t}else if((n=(f=h.n<0)?a:e.call(i,h))!==l)break}catch(e){s=t,r=1,a=e}finally{c=1}}return{value:n,done:f}}}(e,s,r),!0),d}var l={};function c(){}function d(){}function f(){}n=Object.getPrototypeOf;var h=[][s]?n(n([][s]())):(i(n={},s,function(){return this}),n),u=f.prototype=c.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,i(t,r,"GeneratorFunction")),t.prototype=Object.create(u),t}return d.prototype=f,i(u,"constructor",f),i(f,"constructor",d),d.displayName="GeneratorFunction",i(f,r,"GeneratorFunction"),i(u),i(u,r,"Generator"),i(u,s,function(){return this}),i(u,"toString",function(){return"[object Generator]"}),(e=function(){return{w:a,m:p}})()}function i(t,e,n,o){var s=Object.defineProperty;try{s({},"",{})}catch(t){s=0}i=function(t,e,n,o){function r(e,n){i(t,e,function(t){return this._invoke(e,n,t)})}e?s?s(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(r("next",0),r("throw",1),r("return",2))},i(t,e,n,o)}function n(t,e,i,n,o,s,r){try{var a=t[s](r),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(n,o)}function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return r(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function l(t){var e="function"==typeof Map?new Map:void 0;return l=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return function(t,e,i){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return i&&d(o,i.prototype),o}(t,arguments,f(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),d(i,t)},l(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e,i){return(e=u(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function u(e){var i=function(e){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(i)?i:i+""}var p=function(){if(document.currentScript&&document.currentScript.src)return document.currentScript.src;var t=document.querySelector('script[src*="swifflegrid.js"]');return t?t.src:null}(),w=function(i){function r(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),h(e=function(e,i,n){return i=f(i),function(e,i){if(i&&("object"==t(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(e,c()?Reflect.construct(i,n||[],f(e).constructor):i.apply(e,n))}(this,r),"_touchstartHandle",function(t){if(t.target&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName&&!t.target.classList.contains("woo_like_thumbs")&&!t.target.classList.contains("woo_like_thumb")&&!t.target.classList.contains("woo_like_main")&&!e.findUpTag(t.target,"swiffle-card-back")&&e.findUpTag(t.target,"swiffle-card")){var i=e.findUpTag(t.target,"swiffle-card");if(i){var n="touchstart"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX,o="touchstart"===t.type?t.touches[0]?t.touches[0].clientY:t.changedTouches[0].clientY:t.clientY;e.swiffle_sw_initEvt.top=0,e.swiffle_sw_initEvt.left=0,e.swiffle_sw_initEvt.swiffle_card=i,e.swiffle_sw_initEvt.currentX=n,e.swiffle_sw_initEvt.currentY=o}}}),h(e,"_touchmoveHandle",function(t){if(t.target&&e.swiffle_sw_initEvt.swiffle_card&&!("A"==t.target.tagName||"INPUT"==t.target.tagName||t.target.id&&"zoomed-image"==t.target.id)&&e.swiffle_sw_initEvt.swiffle_card.classList.contains("swipable")){var i="touchmove"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX,n="touchmove"===t.type?t.touches[0]?t.touches[0].clientY:t.changedTouches[0].clientY:t.clientY,o=i-e.swiffle_sw_initEvt.currentX;if(0===e.currentIndex&&o>0){var s=e.swiffle_sw_initEvt.swiffle_card;return s.style.transition="transform 80ms ease",s.style.transform="scale(0.97)",setTimeout(function(){s.style.transform="scale(1)"},80),void(e.swiffle_sw_initEvt.blockSwipe=!0)}if(e.currentIndex===e.cards.length-1&&o<0){var r=e.swiffle_sw_initEvt.swiffle_card;return r.style.transition="transform 80ms ease",r.style.transform="scale(0.97)",setTimeout(function(){r.style.transform="scale(1)"},80),void(e.swiffle_sw_initEvt.blockSwipe=!0)}if(o>0&&e.currentIndex>0&&e.ghostCard&&!e.swiffle_sw_initEvt.ghostPrepared){var a=e.currentIndex+1,l=e.cards[a];l&&(l.style.visibility="hidden");var c=e.currentIndex-1,d=e.cards[c];if(d){var f=document.createElement("div");f.innerHTML=d.innerHTML,f.querySelector(".swiffle-card-back")&&f.querySelector(".swiffle-card-back").remove(),e.ghostCard.innerHTML=f.innerHTML,f.remove(),e.ghostCard.style.visibility="visible",e.ghostCard.style.transform="translate3d(0,0,0)",e.ghostCard.style.zIndex=1,e.swiffle_sw_initEvt.ghostPrepared=!0}}if(o<0&&e.swiffle_sw_initEvt.ghostPrepared){e.ghostCard&&(e.ghostCard.style.visibility="hidden",e.ghostCard.style.transform="translate3d(0,200vh,0)");var h=e.currentIndex+1,u=e.cards[h];u&&(u.style.visibility="visible"),e.swiffle_sw_initEvt.ghostPrepared=!1}if(e.swiffle_sw_initEvt.swiffle_card.style.marginTop=e.swiffle_sw_initEvt.top-(e.swiffle_sw_initEvt.currentY-n)+"px",e.swiffle_sw_initEvt.swiffle_card.style.marginLeft=e.swiffle_sw_initEvt.left-(e.swiffle_sw_initEvt.currentX-i)+"px",e.swiffle_sw_initEvt.swiffle_card.style.transform="rotate("+-.3*parseInt(e.swiffle_sw_initEvt.currentX-i)+"deg)",e.swiffle_sw_initEvt.currentX-i>200)return void e.swiffle_onSwipeSuccess("forward");if(i-e.swiffle_sw_initEvt.currentX>200)return void e.swiffle_onSwipeCancel()}}),h(e,"_touchendHandle",function(t){if(t.target&&e.swiffle_sw_initEvt.swiffle_card&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName)if(e.swiffle_sw_initEvt.blockSwipe)e.swiffle_sw_initEvt={};else{var i="touchend"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX;if(Math.abs(e.swiffle_sw_initEvt.currentX-i)<2){if(t.target.classList.contains("no-flip"))return void(e.swiffle_sw_initEvt={});var n=e.findUpTag(t.target,"swiffle-card-inner");if(n){if(n.dataset&&n.dataset.action&&"none"===n.dataset.action)return void(e.swiffle_sw_initEvt={});if(n.classList.contains("doModal")){var o=n.dataset.action.split("/")[1],s=n.querySelector(".swiffle-card-back");s&&s.dataset.html64&&(s.innerHTML=e.bxd(s.dataset.html64),delete s.dataset.html64,e.swiffle_apply_gallery_transform(s)),e.pleasewait=!0,setTimeout(function(){e.pleasewait=!1},1e3),e.swiffle_open_modal(s.innerHTML,"side","",o);try{s.querySelectorAll('input[data-item][data-var="0"]').forEach(function(t){e.shadow.querySelector('.modal.side.open input[data-item="'.concat(t.dataset.item,'"][data-var="0"]')).value=t.value}),e.shadow.querySelector(".modal.side.open").querySelectorAll(".swiffle-spoiler-container").forEach(function(t){var e=t.querySelector(".swiffle-spoiler-wrapper"),i=t.querySelector(".swiffle-spoiler-toggle"),n=t.querySelector(".swiffle-spoiler-label");e.scrollHeight<=e.clientHeight&&(i.style.display="none",n.style.display="none")});var r=e.shadow.querySelector(".modal.side.open");setTimeout(function(){r.querySelectorAll('[data-loaded="0"]').forEach(function(t){var e=t.dataset.image,i=new Image;i.src=e,i.onload=function(){t.style.backgroundImage='url("'.concat(e,'")'),t.dataset.loaded="1"}}),r.querySelectorAll('[data-loadedf="0"]').forEach(function(t){var e=t.dataset.full,i=new Image;i.src=e,i.onload=function(){t.src=e,t.dataset.loadedf="1"}}),r.querySelectorAll('[data-loadedfr="0"]').forEach(function(t){var i=t.dataset.frame;t.innerHTML=e.bxd(i),t.dataset.loaded="1"}),r.querySelectorAll('[data-loadedv="0"]').forEach(function(t){var i=t.dataset.video;t.outerHTML=e.bxd(i),t.dataset.loaded="1"}),r.querySelectorAll('[data-loadedmap="0"]').forEach(function(t){var i=t.dataset.map;t.outerHTML=e.bxd(i)})},10)}catch(t){console.error("Swiffle: error while finalizing the modal, forced close to avoid a global deadlock.",t),e.swiffle_close_all_modals(),document.body.classList.remove("swiffle-no-scroll")}return e.swiffle_sw_initEvt={},void e.swiffle_gallery_init(e.shadow.querySelector(".modal.side.open"))}if(n.dataset&&n.dataset.action&&n.dataset.nav){if("navigate"==n.dataset.action)return void(e.isInEditor()?e.swiffle_toast(e.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):e.swiffleNavigate(n.dataset.nav,window));if("navigatenew"==n.dataset.action)return void(e.isInEditor()?e.swiffle_toast(e.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):window.open(n.dataset.nav,"_blank").focus())}if(!n.classList.contains("doModal")){if(e.isFlipping)return;e.isFlipping=!0,setTimeout(function(){e.isFlipping=!1},500);var a=n.querySelector(".swiffle-card-back");a&&a.dataset.html64&&(a.innerHTML=e.bxd(a.dataset.html64),delete a.dataset.html64,e.swiffle_apply_gallery_transform(a)),n.classList.toggle("swiffle-card-flipped"),setTimeout(function(){n.querySelectorAll(".swiffle-spoiler-container").forEach(function(t){var e=t.querySelector(".swiffle-spoiler-wrapper"),i=t.querySelector(".swiffle-spoiler-toggle"),n=t.querySelector(".swiffle-spoiler-label");e.scrollHeight<=e.clientHeight&&(i.style.display="none",n.style.display="none")}),n.querySelectorAll('[data-loaded="0"]').forEach(function(t){var e=t.dataset.image,i=new Image;i.src=e,i.onload=function(){t.style.backgroundImage='url("'.concat(e,'")'),t.dataset.loaded="1"}}),n.querySelectorAll('[data-loadedf="0"]').forEach(function(t){var e=t.dataset.full,i=new Image;i.src=e,i.onload=function(){t.src=e,t.dataset.loadedf="1"}}),n.querySelectorAll('[data-loadedfr="0"]').forEach(function(t){var i=t.dataset.frame;t.innerHTML=e.bxd(i),t.dataset.loaded="1"}),n.querySelectorAll('[data-loadedv="0"]').forEach(function(t){var i=t.dataset.video;t.outerHTML=e.bxd(i),t.dataset.loaded="1"}),n.querySelectorAll('[data-loadedmap="0"]').forEach(function(t){var i=t.dataset.map;t.outerHTML=e.bxd(i)})},300),e.swiffle_gallery_init(n.querySelector(".swiffle-card-back"))}}e.swiffle_sw_initEvt={}}else{if(e.swiffle_swipeEnding)return void(e.swiffle_sw_initEvt={});if(e.swiffle_sw_initEvt.swiffle_card.classList.contains("swipable")){var l=e.swiffle_sw_initEvt.currentX-i;l>60?e.swiffle_onSwipeSuccess("forward"):l<-40?e.swiffle_onSwipeSuccess("backward"):(e.swiffle_sw_initEvt.swiffle_card.style.marginLeft="0",e.swiffle_sw_initEvt.swiffle_card.style.marginTop="0",e.swiffle_onSwipeCancel())}}e.swiffle_sw_initEvt={}}}),h(e,"_mousedownHandle",function(t){if(t.target&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName&&!e.findUpTag(t.target,"swiffle-card-back")&&e.findUpTag(t.target,"swiffle-card")){var i=e.findUpTag(t.target,"swiffle-card");if(i&&e.activeLayout&&e.activeLayout.startsWith("swipe")&&e.isInEditor()&&t.stopPropagation(),i){var n="touchstart"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX;"touchstart"===t.type?t.touches[0]?t.touches[0].clientY:t.changedTouches[0].clientY:t.clientY,e.swiffle_sw_initEvt.firstRealMove=void 0,e.swiffle_sw_initEvt.top=0,e.swiffle_sw_initEvt.left=0,e.swiffle_sw_initEvt.swiffle_card=i,e.swiffle_sw_initEvt.currentX=n,e.swiffle_sw_initEvt.currentY=t.clientY,e.swiffle_sw_initEvt.top=parseInt(e.swiffle_sw_initEvt.swiffle_card.style.marginTop||"0"),e.swiffle_sw_initEvt.left=e.swiffle_sw_initEvt.swiffle_card.offsetLeft}}}),h(e,"_mousemoveHandle",function(t){if(t.target&&e.swiffle_sw_initEvt&&e.swiffle_sw_initEvt.swiffle_card&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName&&e.swiffle_sw_initEvt.swiffle_card.classList.contains("swipable")){var i="touchmove"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX,n="touchmove"===t.type?t.touches[0]?t.touches[0].clientY:t.changedTouches[0].clientY:t.clientY,o=i-e.swiffle_sw_initEvt.currentX;if(0===e.currentIndex&&o>0){var s=e.swiffle_sw_initEvt.swiffle_card;return s.style.transition="transform 80ms ease",s.style.transform="scale(0.97)",setTimeout(function(){s.style.transform="scale(1)"},80),void(e.swiffle_sw_initEvt.blockSwipe=!0)}if(e.currentIndex===e.cards.length-1&&o<0){var r=e.swiffle_sw_initEvt.swiffle_card;return r.style.transition="transform 80ms ease",r.style.transform="scale(0.97)",setTimeout(function(){r.style.transform="scale(1)"},80),void(e.swiffle_sw_initEvt.blockSwipe=!0)}if(void 0===e.swiffle_sw_initEvt.firstRealMove&&(e.swiffle_sw_initEvt.firstRealMove=!0),e.swiffle_sw_initEvt.swiffle_card.style.marginTop=e.swiffle_sw_initEvt.top-(e.swiffle_sw_initEvt.currentY-n)+"px",e.swiffle_sw_initEvt.swiffle_card.style.marginLeft=e.swiffle_sw_initEvt.left-(e.swiffle_sw_initEvt.currentX-i)+"px",e.swiffle_sw_initEvt.swiffle_card.style.transform="rotate("+-.3*parseInt(e.swiffle_sw_initEvt.currentX-i)+"deg)",e.swiffle_sw_initEvt.currentX-i>200)return void e.swiffle_onSwipeSuccess("forward");if(i-e.swiffle_sw_initEvt.currentX>200)return void e.swiffle_onSwipeCancel();if(o>0&&e.currentIndex>0&&e.ghostCard&&!e.swiffle_sw_initEvt.ghostPrepared){var a=e.currentIndex+1,l=e.cards[a];l&&(l.style.visibility="hidden");var c=e.currentIndex-1,d=e.cards[c];if(d){var f=document.createElement("div");f.innerHTML=d.innerHTML,f.querySelector(".swiffle-card-back")&&f.querySelector(".swiffle-card-back").remove(),e.ghostCard.innerHTML=f.innerHTML,f.remove(),e.ghostCard.style.visibility="visible",e.ghostCard.style.transform="translate3d(0,0,0)",e.ghostCard.style.zIndex=1,e.swiffle_sw_initEvt.ghostPrepared=!0}}if(o<0&&e.swiffle_sw_initEvt.ghostPrepared){e.ghostCard&&(e.ghostCard.style.visibility="hidden",e.ghostCard.style.transform="translate3d(0,200vh,0)");var h=e.currentIndex+1,u=e.cards[h];u&&(u.style.visibility="visible"),e.swiffle_sw_initEvt.ghostPrepared=!1}}}),h(e,"_mouseupHandle",function(t){if("touchend"===t.type)return t.preventDefault(),void t.stopImmediatePropagation();if(t.target&&e.swiffle_sw_initEvt&&e.swiffle_sw_initEvt.swiffle_card&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName)if(e.swiffle_sw_initEvt.blockSwipe)e.swiffle_sw_initEvt={};else{var i="touchend"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX;if(Math.abs(e.swiffle_sw_initEvt.currentX-i)<2){if(t.target.classList.contains("no-flip"))return void(e.swiffle_sw_initEvt={});var n=e.findUpTag(t.target,"swiffle-card-inner");if(n){if(n.dataset&&n.dataset.action&&"none"===n.dataset.action)return void(e.swiffle_sw_initEvt={});if(n.classList.contains("doModal")){var o=n.dataset.action.split("/")[1],s=n.querySelector(".swiffle-card-back");s&&s.dataset.html64&&(s.innerHTML=e.bxd(s.dataset.html64),delete s.dataset.html64,e.swiffle_apply_gallery_transform(s)),e.swiffle_open_modal(s.innerHTML,"side","",o),e.pleasewait=!0,setTimeout(function(){e.pleasewait=!1},1e3);try{s.querySelectorAll('input[data-item][data-var="0"]').forEach(function(t){e.shadow.querySelector('.modal.side.open input[data-item="'.concat(t.dataset.item,'"][data-var="0"]')).value=t.value}),e.shadow.querySelector(".modal.side.open").querySelectorAll(".swiffle-spoiler-container").forEach(function(t){var e=t.querySelector(".swiffle-spoiler-wrapper"),i=t.querySelector(".swiffle-spoiler-toggle"),n=t.querySelector(".swiffle-spoiler-label");e.scrollHeight<=e.clientHeight&&(i.style.display="none",n.style.display="none")});var r=e.shadow.querySelector(".modal.side.open");setTimeout(function(){r.querySelectorAll('[data-loaded="0"]').forEach(function(t){var e=t.dataset.image,i=new Image;i.src=e,i.onload=function(){t.style.backgroundImage='url("'.concat(e,'")'),t.dataset.loaded="1"}}),r.querySelectorAll('[data-loadedf="0"]').forEach(function(t){var e=t.dataset.full,i=new Image;i.src=e,i.onload=function(){t.src=e,t.dataset.loadedf="1"}}),r.querySelectorAll('[data-loadedfr="0"]').forEach(function(t){var i=t.dataset.frame;t.innerHTML=e.bxd(i),t.dataset.loaded="1"}),r.querySelectorAll('[data-loadedv="0"]').forEach(function(t){var i=t.dataset.video;t.outerHTML=e.bxd(i),t.dataset.loaded="1"}),r.querySelectorAll('[data-loadedmap="0"]').forEach(function(t){var i=t.dataset.map;t.outerHTML=e.bxd(i)})},10)}catch(t){console.error("Swiffle: error while finalizing the modal, forced close to avoid a global deadlock.",t),e.swiffle_close_all_modals(),document.body.classList.remove("swiffle-no-scroll")}return e.swiffle_sw_initEvt={},void e.swiffle_gallery_init(e.shadow.querySelector(".modal.side.open"))}if(n.dataset&&n.dataset.action&&n.dataset.nav){if("navigate"==n.dataset.action)return void(e.isInEditor()?e.swiffle_toast(e.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):e.swiffleNavigate(n.dataset.nav,window));if("navigatenew"==n.dataset.action)return void(e.isInEditor()?e.swiffle_toast(e.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):window.open(n.dataset.nav,"_blank").focus())}if(!n.classList.contains("doModal")){if(e.isFlipping)return;e.isFlipping=!0,setTimeout(function(){e.isFlipping=!1},500);var a=n.querySelector(".swiffle-card-back");a&&a.dataset.html64&&(a.innerHTML=e.bxd(a.dataset.html64),delete a.dataset.html64,e.swiffle_apply_gallery_transform(a)),n.classList.toggle("swiffle-card-flipped"),setTimeout(function(){n.querySelectorAll(".swiffle-spoiler-container").forEach(function(t){var e=t.querySelector(".swiffle-spoiler-wrapper"),i=t.querySelector(".swiffle-spoiler-toggle"),n=t.querySelector(".swiffle-spoiler-label");e.scrollHeight<=e.clientHeight&&(i.style.display="none",n.style.display="none")}),n.querySelectorAll('[data-loaded="0"]').forEach(function(t){var e=t.dataset.image,i=new Image;i.src=e,i.onload=function(){t.style.backgroundImage='url("'.concat(e,'")'),t.dataset.loaded="1"}}),n.querySelectorAll('[data-loadedf="0"]').forEach(function(t){var e=t.dataset.full,i=new Image;i.src=e,i.onload=function(){t.src=e,t.dataset.loadedf="1"}}),n.querySelectorAll('[data-loadedfr="0"]').forEach(function(t){var i=t.dataset.frame;t.innerHTML=e.bxd(i),t.dataset.loaded="1"}),n.querySelectorAll('[data-loadedv="0"]').forEach(function(t){var i=t.dataset.video;t.outerHTML=e.bxd(i),t.dataset.loaded="1"}),n.querySelectorAll('[data-loadedmap="0"]').forEach(function(t){var i=t.dataset.map;t.outerHTML=e.bxd(i)})},300),e.swiffle_gallery_init(n.querySelector(".swiffle-card-back"))}}e.swiffle_sw_initEvt={}}else if(e.swiffle_sw_initEvt.swiffle_card.classList.contains("swipable")){var l=e.swiffle_sw_initEvt.currentX-i;l>60?e.swiffle_onSwipeSuccess("forward"):l<-40?e.swiffle_onSwipeSuccess("backward"):(e.swiffle_sw_initEvt.swiffle_card.style.marginLeft="0",e.swiffle_sw_initEvt.swiffle_card.style.marginTop="0",e.swiffle_onSwipeCancel())}e.swiffle_sw_initEvt={}}}),e.ID="Fe"+btoa(Date.now().toString()+Math.random().toString(36).substring(2,8)).replace(/=/g,""),e.shadow=e.attachShadow({mode:"open"}),e.style.display="none",e._isWP="undefined"!=typeof wp&&void 0!==wp.hooks,e.translate_ready=0,e.filter="e30=",e.retried=0,e.isFlipping=!1,e.param_css=document.createElement("style"),e.docHTML=document.createElement("div"),e.shadow.appendChild(e.param_css),e.shadow.appendChild(e.docHTML),e.cssLoaded=!1,e._isSafariIOS=/iP(ad|hone|od)/.test(navigator.userAgent)&&"Apple Computer, Inc."===navigator.vendor&&!/CriOS/.test(navigator.userAgent)&&!/FxiOS/.test(navigator.userAgent),e.isTouchDevice=window.matchMedia("(pointer: coarse)").matches,e.swiffle_isIOSDangerous=e.isTouchDevice;var i=e.ownerDocument?e.ownerDocument.defaultView.innerWidth||e.ownerDocument.documentElement.clientWidth:window.innerWidth||document.documentElement.clientWidth;return e.swiffle_isPhoneSize=e.isTouchDevice?i<900:i<500,e._swiffleBootTime=Date.now(),e._swiffleLastWidth=window.innerWidth||document.documentElement.clientWidth,e.currentIndex=0,e.cards=[],e.swiffle_refreshCards=function(){var t=e.shadowRoot.querySelector(".swiffle-card-container");t&&(e.cards=o(t.querySelectorAll(".swiffle-card")).filter(function(t){return!t.classList.contains("swiffle-card-ghost")&&!!t.querySelector(".swiffle-card-front")&&"none"!==t.style.display}))},e.isInEditor=function(){var t=document.body.classList.contains("elementor-editor-active"),e="editor-canvas"===window.name,i=document.body.classList.contains("block-editor-page");return t||e||i},e.component_attributes={},e.PG=0,e.MAP=0,e.have_more=!1,e.activeLayout="fluid",e.memoScroll=null,e.pleasewait=!1,e.setAllParams(),e._pendingApiCalls=[],e._msgHooked=!1,e._onFilterClick=e._onFilterClick.bind(e),e._listeners=[],e._cleanupDone=!1,e._listeners_zoom=[],e._movezoom=e._movezoom.bind(e),e._updateSizes=e._updateSizes.bind(e),e._zoomMouseLeave=e._zoomMouseLeave.bind(e),e.swiffleTop=e.getSwiffleGlobalWindow(),e._msgHooked||(e._msgHooked=!0,e._message=e._message.bind(e),e.swiffleTop.addEventListener("message",e._message),e._listeners.push(function(){return e.swiffleTop.removeEventListener("message",e._message)}),e.swiffleTop!==window&&"null"===window.location.origin&&(window.addEventListener("message",e._message),e._listeners.push(function(){return window.removeEventListener("message",e._message)}))),e.loadSwiffleCss(),e.renderScheduled=!1,e.isRemote=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i="";try{var n=new URL(top.location.href);i=n.origin+n.pathname}catch(t){var o=new URL(window.location.href);i=o.origin+o.pathname}if(t){var s=e.swiffleTop._swiffle__("sx_internal"),r=Array.isArray(s)?s:s?[s]:[],a=function(t){return String(t).replace(/\/+$/,"")},l=r.some(function(t){return a(t)===a(i)});if(!l&&e.isInEditor())try{var c=new URL(i).host;l=r.some(function(t){try{return new URL(t).host===c}catch(t){return!1}})}catch(t){}if(!i.startsWith(e.component_attributes.proxy)&&!l)return i}else if(!i.startsWith(e.component_attributes.proxy))return e.component_attributes.proxy;return null},e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(r,i),l=r,u=[{key:"disconnectedCallback",value:function(){this.swiffleTop&&this.cleanup()}},{key:"cleanup",value:function(){this._cleanupDone||(this._cleanupDone=!0,this._listeners.forEach(function(t){return t()}),this._listeners=[],this.shadow.querySelectorAll(".woo_like_gallery_root").forEach(function(t){t._galleryListeners&&(t._galleryListeners.forEach(function(t){return t()}),t._galleryListeners=[])}))}},{key:"swiffleSetAttribute",value:function(t,e){var i=JSON.parse(this.bxd(this.getAttribute("datak")));i[t]=e,this.setAttribute("datak",this.bx(JSON.stringify(i)))}},{key:"setAllParams",value:function(){var t=this;if(this.swiffle_isPhoneSize=Math.max(this.ownerDocument.documentElement.clientWidth,this.ownerDocument.defaultView.innerWidth||0)<500,this.ownerDocument.documentElement.querySelectorAll('[name="editor-canvas"]').length>0){var e=this.ownerDocument.documentElement.querySelector('[name="editor-canvas"]'),i=null==e?void 0:e.contentWindow,n=null==i?void 0:i.document,o=(null==i?void 0:i.innerWidth)||(null==n?void 0:n.documentElement.clientWidth);this.swiffle_isPhoneSize=o<500}this.activeLayout="fluid",this.swiffle_sw_initEvt={},this.memoScroll=null;var s=this.getAttribute("datak");if(s){try{var r=JSON.parse(this.bxd(s));if(!r)return;this.component_attributes.cardFlowTitleShow=r.cardflowtitleshow||!0,this.component_attributes.cardTitleOverPicture=r.cardtitleoverpicture||!0,this.component_attributes.cardTitleOverPictureP=r.cardtitleoverpicturep||!0,this.component_attributes.cardTitleFontSize=r.cardtitlefontsize||"16px",this.component_attributes.cardTitleFontSizeP=r.cardtitlefontsizep||"16px",this.component_attributes.cardFlowTitle=r.cardflowtitle||"",this.component_attributes.cardNavUrl=r.cardnavurl||"#",this.component_attributes.cardDirection=r.carddirection||"column",this.component_attributes.cardDirectionP=r.carddirectionp||"column",this.component_attributes.cardClick=r.cardclick||"modal/80",this.component_attributes.cardClickP=r.cardclickp||"flip",this.component_attributes.cardAbstractShow=r.cardabstractshow||!0,this.component_attributes.cardAbstractShowP=r.cardabstractshowp||!0,this.component_attributes.blockDefLayout=r.blockdeflayout||"row",this.component_attributes.blockDefLayoutP=r.blockdeflayoutp||"row",this.component_attributes.blockShowLayout=r.blockshowlayout||"wrap",this.component_attributes.blockShowLayoutP=r.blockshowlayoutp||"swipefull",this.component_attributes.blockcardsperpg=r.blockcardsperpg||"20",this.component_attributes.blockcardsperpgp=r.blockcardsperpgp||"20",this.component_attributes.blockLang=r.blocklang||"",this.component_attributes.cardNavShow=r.cardnavshow||!0,this.component_attributes.cardIconShow=r.cardiconshow||!0,this.component_attributes.cardIconShowP=r.cardiconshowp||!0,this.component_attributes.cardContentOnly=r.cardcontentonly||!1,this.component_attributes.blockShowComments=void 0===r.blockshowcomments||!0===r.blockshowcomments||"true"===r.blockshowcomments,this.component_attributes.postsCategory=r.postscategory||"",this.component_attributes.postsUrl=r.postsurl||"https://.../...",this.component_attributes.postsSource=r.postssource||"category",this.component_attributes.cardHeight=r.cardheight||"400px",this.component_attributes.cardWidth=r.cardwidth||"300px",this.component_attributes.cardWidthMax=r.cardwidthmax||"95vw",this.component_attributes.cardGap=r.cardgap||"10px",this.component_attributes.cardHeightP=r.cardheightp||"400px",this.component_attributes.cardWidthP=r.cardwidthp||"300px",this.component_attributes.cardWidthMaxP=r.cardwidthmaxp||"95vw",this.component_attributes.cardGapP=r.cardgapp||"10px",this.component_attributes.cardSingleStyle=r.cardsinglestyle||"swiffle",this.component_attributes.cardgallery=r.cardgallery||"slide",this.component_attributes.cardBgColor=r.cardbgcolor||"#ffffff",this.component_attributes.cardFtColor=r.cardftcolor||"#111111",this.component_attributes.cardBgColorTitle=r.cardbgcolortitle||"#47bcd4",this.component_attributes.cardFtColorTitle=r.cardftcolortitle||"#ffffff",this.component_attributes.cardBgColorButton=r.cardbgcolorbutton||"#9555af",this.component_attributes.cardFtColorButton=r.cardftcolorbutton||"#ffffff",this.component_attributes.cardBgColorComments=r.cardbgcolorcomments||"#f3f3f3",this.component_attributes.cardRadiusPxl=r.cardradiuspxl||"5",this.component_attributes.cardRadiusPxlP=r.cardradiuspxlp||"5",this.component_attributes.cardImgPct=r.cardimgpct||"30",this.component_attributes.cardImgPctP=r.cardimgpctp||"30",this.component_attributes.cardImgRadiusPxl=r.cardimgradiuspxl||"0",this.component_attributes.cardImgRadiusPxlP=r.cardimgradiuspxlp||"0",this.component_attributes.cardimgadjustin=r.cardimgadjustin||"cover",this.component_attributes.cardimgadjustinP=r.cardimgadjustinp||"cover",this.component_attributes.cardimgsize=r.cardimgsize||"large",this.component_attributes.cardimgsizeP=r.cardimgsizep||"medium",this.component_attributes.orderby=r.orderby||"date,DESC",this.component_attributes.filtertitle=r.filtertitle||"",this.component_attributes.followpagefilter=r.followpagefilter||!0,this.component_attributes.followurlfilter=r.followurlfilter||!0,this.component_attributes.shownodataerr=r.shownodataerr||!0,this.component_attributes.filterbtnshow=r.filterbtnshow||!0,r.componentpath&&r.proxy&&(this.component_attributes.componentPath=r.componentpath||"./",this.component_attributes.proxy=r.proxy||"")}catch(t){return}this.component_attributes.cardSource="".concat(this.component_attributes.postsSource,":").concat(this.component_attributes.postsSource.includes("category")?this.component_attributes.postsCategory:this.component_attributes.postsUrl),Object.keys(this.component_attributes).forEach(function(e){"true"===t.component_attributes[e]&&(t.component_attributes[e]=!0),"false"===t.component_attributes[e]&&(t.component_attributes[e]=!1)}),!0===this.swiffle_isPhoneSize&&(this.component_attributes.blockDefLayout=this.component_attributes.blockDefLayoutP,this.component_attributes.blockShowLayout=this.component_attributes.blockShowLayoutP,this.component_attributes.blockcardsperpg=this.component_attributes.blockcardsperpgp,this.component_attributes.cardWidth=this.component_attributes.cardWidthP,this.component_attributes.cardWidthMax=this.component_attributes.cardWidthMaxP,this.component_attributes.cardHeight=this.component_attributes.cardHeightP,this.component_attributes.cardGap=this.component_attributes.cardGapP,this.component_attributes.cardClick=this.component_attributes.cardClickP,this.component_attributes.cardAbstractShow=this.component_attributes.cardAbstractShowP,this.component_attributes.cardTitleOverPicture=this.component_attributes.cardTitleOverPictureP,this.component_attributes.cardTitleFontSize=this.component_attributes.cardTitleFontSizeP,this.component_attributes.cardRadiusPxl=this.component_attributes.cardRadiusPxlP,this.component_attributes.cardImgPct=this.component_attributes.cardImgPctP,this.component_attributes.cardImgRadiusPxl=this.component_attributes.cardImgRadiusPxlP,this.component_attributes.cardDirection=this.component_attributes.cardDirectionP,this.component_attributes.cardIconShow=this.component_attributes.cardIconShowP,this.component_attributes.cardimgadjustin=this.component_attributes.cardimgadjustinP,this.component_attributes.cardimgsize=this.component_attributes.cardimgsizeP);var a=100;switch(this.component_attributes.cardClick){case"modal/80":a=80;break;case"modal/50":a=50}switch(this.activeLayout=this.component_attributes.blockDefLayout,this.param_css.innerHTML="\n /* Apply parameters */\n :host{\n --swiffle-cardHeight: ".concat(this.component_attributes.cardHeight,"!important;\n --swiffle-cardWidth: ").concat(this.component_attributes.cardWidth,"!important;\n --swiffle-cardWidthMax: ").concat(this.component_attributes.cardWidthMax,"!important;\n --swiffle-cardGap: ").concat(this.component_attributes.cardGap,";\n --swiffle-cardBgColor: ").concat(this.component_attributes.cardBgColor,";\n --swiffle-cardFtColor: ").concat(this.component_attributes.cardFtColor,";\n --swiffle-cardBgColorTitle: ").concat(this.component_attributes.cardBgColorTitle,";\n --swiffle-cardFtColorTitle: ").concat(this.component_attributes.cardFtColorTitle,";\n --swiffle-cardBgColorButton: ").concat(this.component_attributes.cardBgColorButton,";\n --swiffle-cardFtColorButton: ").concat(this.component_attributes.cardFtColorButton,";\n --swiffle-cardBgColorComments: ").concat(this.component_attributes.cardBgColorComments,";\n --swiffle-cardRadiusPxl: ").concat(this.component_attributes.cardRadiusPxl+"px",";\n --swiffle-cardImgPct: ").concat(this.component_attributes.cardImgPct+"%",";\n --swiffle-cardImgRadiusPxl: ").concat(this.component_attributes.cardImgRadiusPxl+"px",";\n }\n \n /* Apply block properties Style */\n .swiffle-card-container .swiffle-card-inner,\n .swiffle-card-container .swiffle-card-back,\n .swiffle-card-container .swiffle-card-front,\n .swiffle-card-container .swipable,\n .swiffle-card-container .swiffle-card-swipable {\n height: var(--swiffle-cardHeight);\n width: var(--swiffle-cardWidth);\n max-width: var(--swiffle-cardWidthMax);\n }\n .swiffle-card-container .swiffle-card-front,\n .swiffle-card-container .swiffle-card-back {\n background-color: var(--swiffle-cardBgColor);\n color: var(--swiffle-cardFtColor);\n }\n .swiffle-card-title{\n font-size: ").concat(this.component_attributes.cardTitleFontSize,";\n }\n .swiffle-card-container .swiffle-card-title-back,\n .swiffle-card-container .swiffle-card-tag {\n color: var(--swiffle-cardFtColorTitle);\n background-color: var(--swiffle-cardBgColorTitle);\n }\n\n .swiffle-card-container .swiffle-btn{\n color: var(--swiffle-cardFtColorButton);\n background-color: var(--swiffle-cardBgColorButton);\n }\n\n .swiffle-btn {\n color: ").concat(this.component_attributes.cardFtColorButton,";\n background-color: ").concat(this.component_attributes.cardBgColorButton,";\n }\n .prx{\n /*\n background: ").concat("swiffle"===this.component_attributes.cardSingleStyle?this.component_attributes.cardBgColorButton:"transparent",";\n color:").concat("swiffle"===this.component_attributes.cardSingleStyle?this.component_attributes.cardFtColorButton:this.component_attributes.cardFtColor,";\n */\n background: transparent;\n color: ").concat(this.component_attributes.cardFtColor,"\n }\n .prx.overpic{\n position:absolute;\n top:calc( 15px + ").concat(this.component_attributes.cardRadiusPxl/10,"% );\n left: 35px;\n }\n .btc.overpic{\n position:absolute;\n top:calc( 55px + ").concat(this.component_attributes.cardRadiusPxl/10,"% );\n left: 5px;\n }\n .bkbloc.half{\n width: ").concat(a,"%;\n }\n\n "),100==this.component_attributes.cardImgPct&&(this.param_css.innerHTML+="\n .swiffle-u-card-body{\n display:none!important;\n }\n "),this.component_attributes.cardimgadjustin){case"cover":this.param_css.innerHTML+="\n .swiffle-u-card-header img{\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n ";break;case"height100":this.param_css.innerHTML+="\n .swiffle-u-card-header img{\n width: auto;\n height: 100%;\n object-fit: contain;\n }\n ";break;case"width100":this.param_css.innerHTML+="\n .swiffle-u-card-header img{\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n "}}}},{key:"swiffle_apply_page_html",value:function(t){var e=this,i=this.docHTML.querySelector(".swiffle-card-container");if(i){var n=document.createElement("template");n.innerHTML=t;var o=n.content.querySelector("style"),s=this.docHTML.querySelector("style");o&&s&&(s.textContent=o.textContent);var r=n.content.querySelectorAll(".swiffle-card:not(.more):not(.swiffle-card-ghost)"),a=n.content.querySelector(".swiffle-card.more");this._cardSlots||(this._cardSlots=[]),Array.from(i.querySelectorAll(".swiffle-card:not(.more):not(.swiffle-card-ghost)")).filter(function(t){return!e._cardSlots.includes(t)}).forEach(function(t){return t.remove()});for(var l=i.querySelector(".swiffle-card.more")||i.querySelector(".swiffle-filter-button");this._cardSlots.length<r.length;){var c=document.createElement("div");c.className="swiffle-card";var d=document.createElement("div");d.className="swiffle-card-inner";var f=document.createElement("div");f.className="swiffle-card-front";var h=document.createElement("div");h.className="swiffle-card-back",d.appendChild(f),d.appendChild(h),c.appendChild(d),l?i.insertBefore(c,l):i.appendChild(c),this._cardSlots.push(c)}r.forEach(function(t,i){var n=e._cardSlots[i],o=n.querySelector(".swiffle-card-inner"),s=t.querySelector(".swiffle-card-inner");o&&s&&(o.innerHTML=s.innerHTML,e.swiffle_compress_card_back(o.querySelector(".swiffle-card-back")),o.className=s.className.replace(/\bswiffle-card-flipped\b/,"").trim(),s.hasAttribute("data-action")?o.setAttribute("data-action",s.getAttribute("data-action")):o.removeAttribute("data-action"),s.hasAttribute("data-nav")?o.setAttribute("data-nav",s.getAttribute("data-nav")):o.removeAttribute("data-nav"),n.className=t.className,n.removeAttribute("style"),t.hasAttribute("style")&&n.setAttribute("style",t.getAttribute("style")))});for(var u=r.length;u<this._cardSlots.length;u++){var p=this._cardSlots[u],w=p.querySelector(".swiffle-card-inner");w&&(w.innerHTML=""),p.style.display="none"}this._lastVisibleCardCount=r.length;var m=i.querySelector(".swiffle-card.more");a&&m?m.replaceWith(a):a&&!m?i.querySelector(".swiffle-filter-button")?i.insertBefore(a,i.querySelector(".swiffle-filter-button")):i.appendChild(a):!a&&m&&m.remove()}else this.docHTML.innerHTML=t}},{key:"swiffle_extract_avatar_src",value:function(t){var e="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="12" fill="#ccd0d4"/><circle cx="12" cy="9.5" r="4" fill="#fff"/><path d="M4 20c0-4.5 4-7 8-7s8 2.5 8 7" fill="#fff"/></svg>');if(!t||"string"!=typeof t)return e;try{if(t.includes("src=")){var i=t.split("src=")[1];return i&&i.split(" ")[0].replace(/^["']|["']$/g,"")||e}return t}catch(t){return e}}},{key:"swiffle_apply_gallery_transform",value:function(t){var e=this;if(t){var i=this.component_attributes.cardgallery;"slidefull"!==i&&"slidezoom"!==i&&"slide"!==i||(t.matches&&t.matches(".wp-block-gallery")?[t]:Array.from(t.querySelectorAll(".wp-block-gallery"))).forEach(function(t){if(!t.classList.contains("swiffle-revamped-gallery")){var n=Array.from(t.querySelectorAll(".wp-block-image")).map(function(t){var e=t.querySelector("img");if(!e)return null;var i=t.querySelector("a");return{full:(null==i?void 0:i.href)||e.dataset.largeFile||e.src,thumb:e.src}}).filter(Boolean);if(0!==n.length){var o="slidefull"===i?n:n.map(function(t){return t.full});t.innerHTML=e.makeSlider(i,o),t.classList.add("swiffle-revamped-gallery")}}})}}},{key:"swiffle_compress_card_back",value:function(t){if(t&&!t.dataset.html64){t.dataset.html64=this.bx(t.innerHTML);var e=t.querySelector('[class^="COMMENT_"]'),i="";e&&(i+=e.outerHTML),t.innerHTML=i}}},{key:"renderCallback",value:function(t){var e,i=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.component_attributes.cardSource||"";["csv:","csvs:","xlsx:","rss:","category:"].some(function(t){return o.startsWith(t)})||(t.posts=[],t.have_more="n");var s="";if(0===t.posts.length)return this.swiffle_endSwipe(),this.activeLayout=this.component_attributes.blockDefLayout,t.alert&&this.swiffle_toast(this.swiffleTop._swiffle__(t.alert)),s='<div class="swiffle-card"><div class="swiffle-card-inner" data-action="none"><div class="swiffle-card-front">',!0===this.component_attributes.shownodataerr?s+='<p style="width:100%;">'.concat(this.swiffleTop._swiffle__("No data"),"</p>"):s+="<span></span>",1==this.component_attributes.filterbtnshow&&this.component_attributes.postsSource.startsWith("category")&&(s+='\n <div class="swiffle-filter-button open-filter" '.concat("",' style="top: calc( ').concat(this.component_attributes.cardHeight,' *.7 );">\n <svg pointer-events="all" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="swiffle-filter-icon">\n <path d="M3 4h18l-7 9v7l-4-4v-3L3 4z" fill="currentColor" stroke="currentColor" stroke-width="1"></path>\n </svg>\n <span>').concat(this.swiffleTop._swiffle__("Filter"),"</span>\n </div>\n ")),s+="</div></div></div>",this.docHTML.className="swiffle-container-fluid",this.docHTML.innerHTML=s,this.shadow.appendChild(this.docHTML),this._cardSlots=null,void(this.style.display="");var r="<style>".concat(t.css,"</style>");switch(r+='<div class="'.concat("row"==this.component_attributes.cardDirection?"swiffle-horiz":""," swiffle-set-").concat(this.ID," swiffle-card-container forswiffle-cards defLayout_").concat(this.component_attributes.blockDefLayout,'">'),this.component_attributes.blockShowLayout){case"all":r+='\n <div class="swiffle-mini-nav">\n <div class="swiffle-circular-menu">\n <h1 class="floating-btn circularMenu">\n <div style="opacity:0;margin-left:-15px;margin-top:-15px;height:100%;width:100%;position:absolute;background:black;"></div>\n <i>\n <a class="hamb">\n <span class="bar"></span>\n <span class="bar"></span>\n <span class="bar"></span>\n </a>\n </i>\n </h1>\n <menu class="items-wrapper">\n <h1 style="cursor:pointer" class="menu-item toSwipe circularMenu">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <path transform="rotate(180,15,15)" d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(9,4.5)"></rect>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(8.2,6.5)"></rect>\n <path d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M7 6 L11 8" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M8 11 L10.5 8" fill="transparent" stroke="black" stroke-width="1"></path>\n </svg></i>\n </h1>\n <h1 style="cursor:pointer" class="menu-item toFluid circularMenu">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="4" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M20 8 L20 16 M20 16 L18 14 M20 16 L22 14" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </h1>\n <h1 style="cursor:pointer" class="menu-item toLine circularMenu">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="20" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M6 20 L24 20 M24 20 L22 18 M24 20 L22 22" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </h1>\n <h1 style="cursor:pointer" class="menu-item toSwipeFull circularMenu">\n <i><svg pointer-events="all" viewBox= "0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path transform="rotate(180,12,12)" d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(6,2.5)" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(.2,3)" /><path d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><path d="M5 4 L9 6" fill="transparent" stroke="black" stroke-width="1" /><path d="M6 9 L8.5 6" fill="transparent" stroke="black" stroke-width="1" /></svg></i>\n </h1>\n </menu>\n </div>\n \n </div>\n ';break;case"wrap":r+='\n <div style="cursor:pointer;box-sizing: content-box;" class="toFluid swiffle-switch-nav alt">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="4" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M20 8 L20 16 M20 16 L18 14 M20 16 L22 14" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </div>\n ';break;case"swipe":r+='\n <div style="cursor:pointer;box-sizing: content-box;" class="toSwipe swiffle-switch-nav alt">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <path transform="rotate(180,15,15)" d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(9,4.5)"></rect>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(8.2,6.5)"></rect>\n <path d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M7 6 L11 8" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M8 11 L10.5 8" fill="transparent" stroke="black" stroke-width="1"></path>\n </svg></i>\n </div>\n ';break;case"swipefull":r+='\n <div style="cursor:pointer;box-sizing: content-box;" class="toSwipeFull swiffle-switch-nav alt">\n <i><svg pointer-events="all" viewBox= "0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path transform="rotate(180,12,12)" d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(6,2.5)" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(.2,3)" /><path d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><path d="M5 4 L9 6" fill="transparent" stroke="black" stroke-width="1" /><path d="M6 9 L8.5 6" fill="transparent" stroke="black" stroke-width="1" /></svg></i>\n </div>\n ';break;case"row":r+='\n <div style="cursor:pointer;box-sizing: content-box;" class="toLine swiffle-switch-nav alt">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="20" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M6 20 L24 20 M24 20 L22 18 M24 20 L22 22" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </div>\n '}if("all"!==this.component_attributes.blockShowLayout)switch(this.component_attributes.blockDefLayout){case"wrap":r+='\n <div style="cursor:pointer;display:none;box-sizing: content-box;" class="toFluid swiffle-switch-nav origin">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="4" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M20 8 L20 16 M20 16 L18 14 M20 16 L22 14" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </div>\n ';break;case"swipe":r+='\n <div style="cursor:pointer;display:none;box-sizing: content-box;" class="toSwipe swiffle-switch-nav origin">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <path transform="rotate(180,15,15)" d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(9,4.5)"></rect>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(8.2,6.5)"></rect>\n <path d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M7 6 L11 8" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M8 11 L10.5 8" fill="transparent" stroke="black" stroke-width="1"></path>\n </svg></i>\n </div>\n ';break;case"swipefull":r+='\n <div style="cursor:pointer;display:none;box-sizing: content-box;" class="toSwipeFull swiffle-switch-nav origin">\n <i><svg pointer-events="all" viewBox= "0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path transform="rotate(180,12,12)" d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(6,2.5)" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(.2,3)" /><path d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><path d="M5 4 L9 6" fill="transparent" stroke="black" stroke-width="1" /><path d="M6 9 L8.5 6" fill="transparent" stroke="black" stroke-width="1" /></svg></i>\n </div>\n ';break;case"row":r+='\n <div style="cursor:pointer;display:none;box-sizing: content-box;" class="toLine swiffle-switch-nav origin">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="20" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M6 20 L24 20 M24 20 L22 18 M24 20 L22 22" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </div>\n '}var a=[];r+='<div class="swiffle-card-ghost" style="display:none;"></div>';try{var l=this.swiffle_load_page(t,!0,a,[],[],this.swiffleTop)}catch(t){console.error("swiffle_load_page error:",t)}r+=l;var c="";n&&parseInt(this.PG)>0&&this.swiffle_isPhoneSize&&(c='\n <svg data-target="'.concat(this.ID,'" class="no-flip rdl svgtopp" style="width:100%; height:auto; cursor:pointer;" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <circle data-target="').concat(this.ID,'" class="no-flip rdl" cx="25" cy="25" r="10" fill="transparent" stroke="black" stroke-width="1"></circle>\n <path data-target="').concat(this.ID,'" class="no-flip rdl spinner" d="M30 25 L20 25 M20 25 L23 22 M20 25 L23 28" stroke="black" stroke-width="2" fill="none"></path>\n <defs data-target="').concat(this.ID,'" class="no-flip rdl">\n <path data-target="').concat(this.ID,'" class="no-flip rdl" id="circlePathPrev" d="M25,10 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30"></path>\n </defs>\n <text data-target="').concat(this.ID,'" class="no-flip rdl" class="no-flip rdl" font-size="8" fill="black" dy="4">\n <textPath data-target="').concat(this.ID,'" class="no-flip rdl" href="#circlePathPrev" startOffset="50%" text-anchor="middle">').concat(this.swiffleTop._swiffle__("Previous"),'</textPath>\n </text>\n </svg>\n </div>\n <div data-target="').concat(this.ID,'" class="no-flip " style="width:20%; height:auto; min-width: 80px; min-height: 80px;">\n <svg data-target="').concat(this.ID,'" class="no-flip rdt svgtopb" style="width:100%; height:auto; cursor:pointer;" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <circle data-target="').concat(this.ID,'" class="no-flip rdt" cx="25" cy="25" r="10" fill="transparent" stroke="black" stroke-width="1"></circle>\n <path data-target="').concat(this.ID,'" class="no-flip rdt spinner" d="M25 19 L25 31 M25 19 L22 22 M25 19 L28 22" stroke="black" stroke-width="2" fill="none"></path>\n <defs data-target="').concat(this.ID,'" class="no-flip rdt" >\n <path data-target="').concat(this.ID,'" class="no-flip rdt" id="circlePathStart" d="M25,10 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30"></path>\n </defs>\n <text data-target="').concat(this.ID,'" class="no-flip rdt" font-size="8" fill="black" dy="4">\n <textPath data-target="').concat(this.ID,'" class="no-flip rdt" href="#circlePathStart" startOffset="50%" text-anchor="middle">').concat(this.swiffleTop._swiffle__("Beginning"),"</textPath>\n </text>\n </svg>\n ")),"y"==this.have_more?r+='\n <div class="swiffle-card more">\n <div class="swiffle-card-inner more">\n <div data-target="'.concat(this.ID,'" class="swiffle-card-front no-flip " style="text-align:center;display:flex;justify-content:center;align-items:center;overflow:hidden;">\n <div data-target="').concat(this.ID,'" class="no-flip " style="width:20%; height:auto; min-width: 80px; min-height: 80px;">\n ').concat(c,'\n <svg data-target="').concat(this.ID,'" class="no-flip rdm svgtop" style="width: 100%; height: auto; cursor: pointer;" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <circle data-target="').concat(this.ID,'" class="no-flip rdm" cx="25" cy="25" r="10" fill="transparent" stroke="black" stroke-width="1"></circle>\n <path data-target="').concat(this.ID,'" class="no-flip rdm spinner" d="M19 25 L31 25 M25 19 L25 31" stroke="black" stroke-width="2"></path>\n <defs><path data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" id="circlePath" d="M25,10 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30"></path></defs>\n <text data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" font-size="8" fill="black" dy="4">\n <textPath data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" href="#circlePath" startOffset="50%" text-anchor="middle">').concat(this.swiffleTop._swiffle__("See more"),'</textPath>\n </text>\n </svg>\n </div>\n </div>\n <div class="swiffle-card-back"></div>\n </div>\n </div>\n '):""!==c&&(r+='\n <div class="swiffle-card more">\n <div class="swiffle-card-inner more">\n <div data-target="'.concat(this.ID,'" class="swiffle-card-front no-flip" style="text-align:center;display:flex;justify-content:center;align-items:center;overflow:hidden;">\n <div data-target="').concat(this.ID,'" class="no-flip" style="width:20%; height:auto; min-width: 80px; min-height: 80px;">\n ').concat(c,'\n </div>\n </div>\n <div class="swiffle-card-back"></div>\n </div>\n </div>\n ')),1==this.component_attributes.filterbtnshow&&this.component_attributes.postsSource.startsWith("category")&&(r+='\n <div class="swiffle-filter-button open-filter" '.concat("",' style="top: calc( ').concat(this.component_attributes.cardHeight,' *.7 );">\n <svg pointer-events="all" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="swiffle-filter-icon">\n <path d="M3 4h18l-7 9v7l-4-4v-3L3 4z" fill="currentColor" stroke="currentColor" stroke-width="1"></path>\n </svg>\n <span>').concat(this.swiffleTop._swiffle__("Filter"),"</span>\n </div>\n ")),this.docHTML.className="swiffle-container-fluid",this.docHTML.className="swiffle-container-fluid",!this._cardSlots||this.isInEditor()?(this.docHTML.innerHTML=r,this.shadow.appendChild(this.docHTML),this._cardSlots=Array.from(this.docHTML.querySelectorAll(".swiffle-card-container > .swiffle-card:not(.more):not(.swiffle-card-ghost)")),this._lastVisibleCardCount=this._cardSlots.length,this._cardSlots.forEach(function(t){i.swiffle_compress_card_back(t.querySelector(".swiffle-card-back"))})):this.swiffle_apply_page_html(r);var d=this.shadow.appendChild(this.docHTML);if(this.swiffle_fix_embeds(),this.swiffle_refreshCards(),this.ghostCard=this.shadow.querySelector(".swiffle-card-ghost"),this.currentIndex=0,this.swiffle_sw_initEvt={},this.swiffle_swipeEnding=!1,this.shadow.offsetHeight,t.script){var f=document.createElement("script");f.type="text/javascript",f.textContent=t.script,this.shadow.appendChild(f)}if(null===(e=this.shadow.querySelector(".cont_mini_cart"))||void 0===e||e.remove(),this.style.display="",n&&!this.activeLayout.startsWith("swipe")&&setTimeout(function(){switch(i.activeLayout){case"wrap":case"fluid":var t=d.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:t,behavior:"auto"});break;case"row":case"line":var e=d.getBoundingClientRect().left+window.scrollX;window.scrollTo({left:e,behavior:"auto"})}},200),n){var h=this.activeLayout.replace("wrap","fluid").replace("row","line")!==this.component_attributes.blockDefLayout.replace("wrap","fluid").replace("row","line");this.shadow.querySelectorAll(".swiffle-switch-nav.alt").forEach(function(t){t.style.display=h?"none":""}),this.shadow.querySelectorAll(".swiffle-switch-nav.origin").forEach(function(t){t.style.display=h?"":"none"})}if(this.callswiffleapi({action:"reviews_mass",ids:a,callback:"renderCommentsMass,"+this.ID}),this.swiffle_apply_gallery_transform(this.shadow),"swipe"===this.activeLayout&&this.swiffle_toSwipe(this.shadow.querySelector(".swiffle-card-container"),!0),"swipefull"===this.activeLayout&&this.swiffle_toSwipe(this.shadow.querySelector(".swiffle-card-container"),!0,!0),"fluid"!==this.activeLayout&&"wrap"!==this.activeLayout||this.swiffle_toFluid(this.shadow.querySelector(".swiffle-card-container")),"row"!==this.activeLayout&&"line"!==this.activeLayout||this.swiffle_toLine(this.shadow.querySelector(".swiffle-card-container")),this._cardSlots)for(var u=this._lastVisibleCardCount||0;u<this._cardSlots.length;u++)this._cardSlots[u].style.display="none";var p=new URLSearchParams(window.location.search),w=p.get("r-product")?p.get("r-product"):p.get("ref-product");w&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="prod",this.swiffleTop.SWIFFLE_REQUEST_VALUE="pk_"+w);var m=p.get("r-cat")?p.get("r-cat"):p.get("product_category");m&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="cat",this.swiffleTop.SWIFFLE_REQUEST_VALUE=m.split("/").pop());var v=p.get("r-search")?p.get("r-search"):p.get("search");v&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="search",this.swiffleTop.SWIFFLE_REQUEST_VALUE=v.split("/").pop());var _=p.get("s"),y=p.get("post_type");_&&y&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="search",this.swiffleTop.SWIFFLE_REQUEST_VALUE=_.split("/").pop());var g=p.get("r-tag")?p.get("r-tag"):p.get("tag");g&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="tag",this.swiffleTop.SWIFFLE_REQUEST_VALUE=g.split("/").pop())}},{key:"swiffle_callback_load_more",value:function(t){var e=this;if(this._pageNavLoading=!1,this.swiffle_isPhoneSize)this.renderCallback(t,!0);else{var i=t.posts.filter(function(t){return 0===e.shadow.querySelectorAll('[data-item="'.concat(t.ID,'"]')).length});t.posts=i;var n=[],o=this.swiffle_load_page(t,!1,n,[],[],this.swiffleTop);"y"==t.have_more&&(o+='\n <div class="swiffle-card more">\n <div class="swiffle-card-inner more">\n <div data-target="'.concat(this.ID,'" class="swiffle-card-front no-flip rdm" style="text-align:center;display:flex;justify-content:center;align-items:center;overflow:hidden;">\n <div data-target="').concat(this.ID,'" class="no-flip rdm" style="width:20%; height:auto; min-width: 80px; min-height: 80px;">\n <svg data-target="').concat(this.ID,'" class="no-flip rdm svgtop" style="width: 100%; height: auto; cursor: pointer;" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <circle data-target="').concat(this.ID,'" class="no-flip rdm" cx="25" cy="25" r="10" fill="transparent" stroke="black" stroke-width="1"></circle>\n <path data-target="').concat(this.ID,'" class="no-flip rdm spinner" d="M19 25 L31 25 M25 19 L25 31" stroke="black" stroke-width="2"></path>\n <defs><path data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" id="circlePath" d="M25,10 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30"></path></defs>\n <text data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" font-size="8" fill="black" dy="4">\n <textPath data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" href="#circlePath" startOffset="50%" text-anchor="middle">').concat(this.swiffleTop._swiffle__("See more"),'</textPath>\n </text>\n </svg>\n </div>\n </div>\n <div class="swiffle-card-back"></div>\n </div>\n </div>\n '));var s=this.shadow.querySelector(".swiffle-card-container"),r=null;if(s&&(r=s.querySelectorAll(".swiffle-card:not(.more)")[s.querySelectorAll(".swiffle-card:not(.more)").length-1]),this.shadow.querySelector(".swiffle-card-container").insertAdjacentHTML("beforeend",o),this.swiffle_fix_embeds(),t.script){var a=document.createElement("script");a.type="text/javascript",a.textContent=t.script,this.shadow.appendChild(a)}var l=this.shadow.querySelectorAll(".swiffle-card.more");l.length>0&&l[0].remove(),this.callswiffleapi({action:"reviews_mass",ids:n,callback:"renderCommentsMass,"+this.ID}),this.shadow.querySelectorAll(".swiffle-card .wp-block-gallery").forEach(function(t){var e=document.createElement("div");for(e.classList.add("swiffle-gallery-scroll");t.firstChild;)e.appendChild(t.firstChild);t.appendChild(e),e.querySelectorAll(".wp-block-image").forEach(function(t){t.classList.remove("wp-block-image"),t.classList.add("swiffle-single-img-container")})}),"swipe"==this.activeLayout&&this.swiffle_toSwipe(this.shadow.querySelector(".swiffle-card-container"),!1),"swipefull"===this.activeLayout&&this.swiffle_toSwipe(this.shadow.querySelector(".swiffle-card-container"),!1,!0),"fluid"!==this.activeLayout&&"wrap"!==this.activeLayout||(this.swiffle_toFluid(this.shadow.querySelector(".swiffle-card-container")),r.scrollIntoView({block:"nearest",inline:"nearest"})),"row"!==this.activeLayout&&"line"!==this.activeLayout||(this.swiffle_toLine(this.shadow.querySelector(".swiffle-card-container")),r.scrollIntoView({block:"nearest",inline:"nearest"})),this.activeLayout.startsWith("swipe")&&this.swiffle_add_ghost()}}},{key:"renderComments",value:function(t){var e=this,i=t.params.revs,n="";1==t.params.pg&&(""==t.params.can_comment?n+='\n <div class="container_rat">\n <p>'.concat(this.swiffleTop._swiffle__("Leave a comment"),'</p>\n <textarea class="no-flip" name="ucomment" data-target="').concat(t.params.id,'" data-id="0" data-nonce="').concat(t.params.nonce,'" cols="45" rows="8" required="" placeholder="').concat(this.swiffleTop._swiffle__("Your comment"),'..."></textarea>\n <br>\n <p class="message"></p>\n <button type="button" data-target="').concat(t.params.id,'" data-id="0" class="swiffle-btn no-flip bcm">').concat(this.swiffleTop._swiffle__("Submit"),"</button>\n <br><br>\n </div>\n "):n+='\n <div class="container_rat">\n <p>'.concat(t.params.can_comment,"</p>\n </div>")),prevlev=0,i.forEach(function(i){bt_reply="",""==t.params.can_comment&&(bt_reply="<button type=\"button\" onclick=\"this.parentElement.querySelector('.container_rat').classList.toggle('hidden');this.innerHTML=(this.innerHTML=='".concat(e.swiffleTop._swiffle__("Reply"),"'?'").concat(e.swiffleTop._swiffle__("Cancel"),"':'").concat(e.swiffleTop._swiffle__("Reply"),'\');" class="swiffle-btn no-flip">').concat(e.swiffleTop._swiffle__("Reply"),"</button>")),n+='\n <li class="comment" style="margin-left:'.concat(8*i.level,'px;"> \n <div class="customer">\n <span class="avatar">\n <img loading="lazy" src="').concat(e.swiffle_extract_avatar_src(i.avatar),'" title="').concat(i.author,'">\n </span>\n <span class="nickname">').concat(i.author,'</a>\n </div>\n <div class="assessment">\n <span class="date">').concat(i.date,'</span>\n </div>\n <div class="title">').concat(i.title,'</div>\n <div class="comment">\n <p>').concat(i.comment,'</p>\n <div class="reply">\n <div class="container_rat hidden">\n <p><b>').concat(e.swiffleTop._swiffle__("Reply"),'</b></p>\n <textarea class="no-flip" name="ucomment" data-target="').concat(t.params.id,'" data-id="').concat(i.id,'" data-nonce="').concat(i.nonce,'" cols="45" rows="8" required="" placeholder="').concat(e.swiffleTop._swiffle__("Your comment"),'..."></textarea>\n <br>\n <p class="message"></p>\n <button type="button" data-target="').concat(t.params.id,'" data-id="').concat(i.id,'" class="swiffle-btn no-flip bcm">').concat(e.swiffleTop._swiffle__("Submit"),"</button>\n <br><br>\n </div>\n ").concat(bt_reply,"\n </div>\n </div>\n </li>\n "),prevlev=i.level});var o="";t.params.more&&(o=t.params.more.replace(">More<",">"+this.swiffleTop._swiffle__("More")+"<"));var s=this.shadow.querySelectorAll(".COMMENT_".concat(t.params.id));s.length>0&&("1"==t.params.pg?s[0].innerHTML='<ul class="swiffle_comment-section">'.concat(n,"</ul>").concat(o):(s[0].querySelector(".more-comment").remove(),s[0].querySelector(".swiffle_comment-section").insertAdjacentHTML("beforeend",n),s[0].insertAdjacentHTML("beforeend","".concat(o))),s.forEach(function(i){var n=i.closest(".swiffle-card-back");if(n&&n.dataset.html64){var o=document.createElement("div");o.innerHTML=e.bxd(n.dataset.html64);var s=o.querySelector(".COMMENT_".concat(t.params.id));s&&(s.innerHTML=i.innerHTML),n.dataset.html64=e.bx(o.innerHTML)}}))}},{key:"newComment",value:function(t){var e=this.shadow.querySelectorAll('textarea[name=ucomment][data-target="'.concat(t.target,'"][data-id="').concat(t.id,'"][data-nonce="').concat(t.nonce,'"]'));if(e.length>0){var i=(e=e[0].parentElement).querySelector(".message");if(t.ERROR){switch(i.classList.add("error"),t.ERROR){case"expired":i.innerHTML=this.swiffleTop._swiffle__("An error has occurred. Please reload the page and try again.");break;case"closed":i.innerHTML=this.swiffleTop._swiffle__("Comments are closed.");break;case"success":i.classList.remove("error"),i.classList.add("success"),i.innerHTML=this.swiffleTop._swiffle__("Your comment is awaiting moderation."),e.querySelector("textarea").value="",e.querySelector("textarea").classList.toggle("hidden"),e.querySelector("button").classList.toggle("hidden"),"0"!=t.id&&(setTimeout(function(t){t.classList.toggle("hidden")},5e3,e),e.parentElement.querySelector(".reply>button").classList.toggle("hidden"),e.parentElement.querySelector(".reply>button").innerHTML=this.swiffleTop._swiffle__("Reply"),setTimeout(function(t){t.querySelector(".reply>button").classList.toggle("hidden")},5e3,e.parentElement)),setTimeout(function(t){t.innerHTML=""},5e3,i),setTimeout(function(t){t.querySelector("textarea").classList.toggle("hidden")},5e3,e),setTimeout(function(t){t.querySelector("button").classList.toggle("hidden")},5e3,e);break;default:i.innerHTML=t.ERROR}return}}}},{key:"render",value:function(){var t,i=this;if(null===this.component_attributes.proxy)this.retried<100?(setTimeout(function(){i.render()},100),this.retried+=1):console.error("Swiffle: proxy is undefined.");else{document.body.addEventListener("touchend",function(){},{passive:!0}),this.translate_ready=0;var o=this.component_attributes.proxy,s={action:"get_intl",callback:"get_intl,"+this.ID};this.callswiffleapi(s),this._lastIntlBridge=s.bridge,this._lastIntlRequestedForProxy=o,this.setAllParams(),this.filter="e30=";var r=!1,a={search:"",sort:"",cats:f,tags:"",min:"0",max:"500000"},l=this.getAttribute("extra_search");l&&(a.search=l,r=!0);var c=this.getAttribute("extra_sort");c&&(r=!0,a.sort=c);var d=this.getAttribute("extra_cats");d&&(r=!0,a.cats=d);var f=this.getAttribute("dataf");f&&(r=!0,a.cats=d);var h=this.getAttribute("extra_min");h&&(r=!0,a.min=h);var u=this.getAttribute("extra_max");u&&(r=!0,a.max=u),r&&(this.filter=this.bx(JSON.stringify(a)));var p=this._intlWaitToken=(this._intlWaitToken||0)+1;(t=e().m(function t(){return e().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,new Promise(function(t){var e=!1,n=Date.now(),o=function(){e||(i._intlWaitToken!==p||1===i.translate_ready||Date.now()-n>8e3)&&(e=!0,clearInterval(r),t())},s=function(){o(),e||requestAnimationFrame(s)},r=setInterval(o,100);s()});case 1:if(i._intlWaitToken===p){t.n=2;break}return t.a(2);case 2:i.PG=0,i.getData(i.PG);case 3:return t.a(2)}},t)}),function(){var e=this,i=arguments;return new Promise(function(o,s){var r=t.apply(e,i);function a(t){n(r,o,s,a,l,"next",t)}function l(t){n(r,o,s,a,l,"throw",t)}a(void 0)})})()}}},{key:"scheduleRender",value:function(){var t=this;if(!this.renderScheduled){this.renderScheduled=!0;var e=!1,i=function(){e||(e=!0,t.render(),t.renderScheduled=!1)};requestAnimationFrame(i),setTimeout(i,300)}}},{key:"connectedCallback",value:function(){var t=this;try{window.parent._swiffleResetLock||(window.parent._swiffleResetLock=!1,window.parent._swiffleLastDevice=null,window.parent._swiffleResetTimer=null)}catch(t){}window.swiffle_cur_bridge||(window.swiffle_cur_bridge=0),this._pendingApiCalls.length>0&&(this._pendingApiCalls.forEach(function(e){return t.callswiffleapi(e)}),this._pendingApiCalls=[]),this.swiffleTop.vh||(this.swiffleTop.vh=.01*this.swiffleTop.innerHeight,this.swiffleTop.document.documentElement.style.setProperty("--vh","".concat(this.swiffleTop.vh,"px"))),"function"!=typeof this.swiffleTop._swiffle__&&(this.swiffleTop._swiffle__=function(e){return null===t.swiffleTop.SWIFFLE_INTL||void 0===t.swiffleTop.SWIFFLE_INTL||null===t.swiffleTop.SWIFFLE_INTL[e]||void 0===t.swiffleTop.SWIFFLE_INTL[e]?e:t.swiffleTop.SWIFFLE_INTL[e]}),this.scheduleRender(),this._resize_owner=this._resize_owner.bind(this);var e=this.ownerDocument.defaultView;if(e.addEventListener("resize",this._resize_owner),this._listeners.push(function(){return e.removeEventListener("resize",t._resize_owner)}),this._visibility=this._visibility.bind(this),this.swiffleTop.addEventListener("visibilitychange",this._visibility),this._listeners.push(function(){return t.swiffleTop.removeEventListener("visibilitychange",t._visibility)}),this._focusout=this._focusout.bind(this),this.shadow.addEventListener("focusout",this._focusout),this._listeners.push(function(){return t.shadow.removeEventListener("focusout",t._focusout)}),this._change=this._change.bind(this),this.shadow.addEventListener("change",this._change),this._listeners.push(function(){return t.shadow.removeEventListener("change",t._change)}),this._click_component=this._click_component.bind(this),this.swiffleTop.addEventListener("click",this._click_component),this._listeners.push(function(){return t.swiffleTop.removeEventListener("click",t._click_component)}),this._click=this._click.bind(this),this.shadow.addEventListener("click",this._click),this._listeners.push(function(){return t.shadow.removeEventListener("click",t._click)}),this.shadow.removeEventListener("touchstart",this._touchstartHandle),document.removeEventListener("touchmove",this._touchmoveHandle),this.shadow.removeEventListener("touchend",this._touchendHandle),this.shadow.removeEventListener("mousedown",this._mousedownHandle),document.removeEventListener("mousemove",this._mousemoveHandle),this.shadow.removeEventListener("mouseup",this._mouseupHandle),this.isTouchDevice){this._touchstartHandle=this._touchstartHandle.bind(this),this.shadow.addEventListener("touchstart",this._touchstartHandle,{passive:!1}),this._listeners.push(function(){return t.shadow.removeEventListener("touchstart",t._touchstartHandle)}),this._touchmoveHandle=this._touchmoveHandle.bind(this);var i=this.shadow;i.addEventListener("touchmove",this._touchmoveHandle,{passive:!1}),this._listeners.push(function(){return i.removeEventListener("touchmove",t._touchmoveHandle)}),this._touchendHandle=this._touchendHandle.bind(this),this.shadow.addEventListener("touchend",this._touchendHandle,{passive:!1}),this._listeners.push(function(){return t.shadow.removeEventListener("touchend",t._touchendHandle)})}else{this._mousedownHandle=this._mousedownHandle.bind(this),this.shadow.addEventListener("mousedown",this._mousedownHandle,{passive:!1}),this._listeners.push(function(){return t.shadow.removeEventListener("mousedown",t._mousedownHandle)}),this._mousemoveHandle=this._mousemoveHandle.bind(this);var n=this.shadow;n.addEventListener("mousemove",this._mousemoveHandle,{passive:!1}),this._listeners.push(function(){return n.removeEventListener("mousemove",t._mousemoveHandle)}),this._mouseupHandle=this._mouseupHandle.bind(this),this.shadow.addEventListener("mouseup",this._mouseupHandle,{passive:!1}),this._listeners.push(function(){return t.shadow.removeEventListener("mouseup",t._mouseupHandle)})}var o=this.closest('[draggable="true"]');o?(o.setAttribute("draggable","false"),o.addEventListener("dragstart",function(t){t.preventDefault(),t.stopImmediatePropagation()},!0)):setTimeout(function(){var e,i=(null===(e=t.getRootNode())||void 0===e?void 0:e.host)||t.closest(".elementor-widget");i&&(i.setAttribute("draggable","false"),i.addEventListener("dragstart",function(t){t.preventDefault(),t.stopImmediatePropagation()},!0))},500),this._keydown=this._keydown.bind(this),this.shadow.addEventListener("keydown",this._keydown),this._listeners.push(function(){return t.shadow.removeEventListener("keydown",t._keydown)}),this.swiffleTop.document.addEventListener("DOMContentLoaded",function(){t._searchfield_doc=t._searchfield_doc.bind(t);var e=t.swiffleTop.document;e.addEventListener("keydown",t._searchfield_doc),t._listeners.push(function(){return e.removeEventListener("keydown",t._searchfield_doc)}),e.addEventListener("focusout",t._searchfield_doc),t._listeners.push(function(){return e.removeEventListener("focusout",t._searchfield_doc)})});var s=document.createElement("span");s.innerHTML='\n <div class="zoomfull"></div>\n <div class="overlay" data-where=""></div>\n <div class="modal" data-where="">\n <div class="modal-body">\n <div class="modal-body-header">\n <div class="modal-body-header-titre"></div>\n <span class="modal-body-header-titre-close">✖︎</span>\n </div>\n <div class="modal-content"></div>\n </div>\n </div>\n <div class="overlay side" data-where="side"></div>\n <div class="modal side" data-where="side">\n <div class="modal-body">\n <div class="modal-body-header">\n <div class="modal-body-header-titre"></div>\n <span class="modal-body-header-titre-close">✖︎</span>\n </div>\n <div class="modal-content"></div>\n </div>\n </div>\n <div id="swiffle-toast" style="display:none">\n <span id="swiffle-toast-msg"></span>\n </div>\n ',this.shadow.appendChild(s)}},{key:"_swiffle_editor_toolbar_offset",value:function(){if(!document.body.classList.contains("block-editor-page"))return 0;var t=0;return["#wpadminbar",".interface-interface-skeleton__header",".edit-post-header",".editor-header"].forEach(function(e){var i=document.querySelector(e);i&&(t=Math.max(t,i.getBoundingClientRect().bottom))}),Math.ceil(t)}},{key:"swiffle_open_modal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"RAS",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"side",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"80",o=this.shadow.querySelector(".modal"+(""===e?"":"."+e));o.style.width=n+"%",""===e&&(o.style.right=(100-n)/2+"%");var s=this.shadow.querySelector(".overlay"+(""===e?"":"."+e));o.querySelector(".modal-body-header-titre").innerHTML=i,o.querySelector(".modal-content").innerHTML=t;var r=o.querySelector(".modal-body-header-titre-close"),a=this._swiffle_editor_toolbar_offset();r.style.marginTop=a?50+a+"px":"",o.classList.add("open"),s.classList.add("visible"),document.body.classList.add("swiffle-no-scroll")}},{key:"swiffle_close_modal",value:function(t){var e=this.shadow.querySelector('.modal[data-where="'.concat(t.dataset.where,'"]')),i=this.shadow.querySelector('.overlay[data-where="'.concat(t.dataset.where,'"]'));e.classList.remove("open"),e.style.right="",e.querySelector(".modal-content").innerHTML="",i.classList.remove("visible"),0===this.shadow.querySelectorAll(".overlay.visible").length&&document.body.classList.remove("swiffle-no-scroll")}},{key:"swiffle_close_all_modals",value:function(t){this.ownerDocument.querySelectorAll("swiffle-grid").forEach(function(t){if(t.shadowRoot){var e=t.shadowRoot.querySelectorAll(".modal.open");e.length>0&&(e.forEach(function(t){t.classList.remove("open")}),t.shadowRoot.querySelectorAll(".overlay.visible").forEach(function(t){t.classList.remove("visible")}))}})}},{key:"swiffle_toast",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"==typeof t&&t.includes("user-select:all")){this.swiffle_open_modal('<div class="swiffle-denied" style="padding:10px 4px;line-height:1.5;">'.concat(t,'<p><button type="button" class="swiffle-denied-copy" style="margin-top:12px;padding:6px 14px;cursor:pointer;">').concat(this.swiffleTop._swiffle__("Copy the address to allow"),"</button></p></div>"),"","","50");var n=this.shadow.querySelector('.modal[data-where=""] .swiffle-denied'),o=n&&n.querySelector("span"),s=n&&n.querySelector(".swiffle-denied-copy");if(o&&s){var r=function(){try{var t=document.createRange();t.selectNodeContents(o);var e=window.getSelection();e.removeAllRanges(),e.addRange(t)}catch(t){}};s.addEventListener("click",function(){try{navigator.clipboard.writeText(o.textContent).then(function(){s.textContent="✔"},r)}catch(t){r()}})}}else{this.shadow.getElementById("swiffle-toast-msg").innerHTML=t;var a=this.shadow.getElementById("swiffle-toast");a.style.display="block";var l=this._swiffle_editor_toolbar_offset();a.style.top=l?20+l+"px":"",!0===i&&(a.style.background="white",a.style.color="unset",a.style.minWidth="70vw",a.style.maxWidth="80vw"),setTimeout(function(){var t=e.shadow.getElementById("swiffle-toast");t.style.display="none",t.style.top="",t.style.background="#111111",t.style.color="#eeeeee",t.style.minWidth="unset",t.style.maxWidth="200px"},5e3)}}},{key:"swiffle_zoom_img",value:function(){var t=this;this._listeners_zoom.forEach(function(t){return t()}),this._listeners_zoom=[];var e=this.shadow.querySelector(".zoom-container"),i=this.shadow.getElementById("zoomed-image");e&&i&&(this.shadow.addEventListener("resize",this._updateSizes),this._listeners_zoom.push(function(){return t.shadow.removeEventListener("resize",t._updateSizes)}),e.addEventListener("mousemove",this._movezoom),this._listeners_zoom.push(function(){return e.removeEventListener("mousemove",t._movezoom)}),e.addEventListener("touchmove",this._movezoom),this._listeners_zoom.push(function(){return e.removeEventListener("touchmove",t._movezoom)}),i.addEventListener("touchmove",this._movezoom),this._listeners_zoom.push(function(){return i.removeEventListener("touchmove",t._movezoom)}),e.addEventListener("mouseleave",this._zoomMouseLeave),this._listeners_zoom.push(function(){return e.removeEventListener("mouseleave",t._zoomMouseLeave)}),this._updateSizes())}},{key:"swiffle_gallery_init",value:function(t){var e=this;t._galleryListeners&&t._galleryListeners.forEach(function(t){return t()}),t._galleryListeners=[];var i=t,n=i.querySelector(".woo_like_main-img");if(n){var s=i.querySelector(".woo_like_main"),r=i.querySelectorAll(".woo_like_thumbs div"),a=i.querySelector(".woo_like_zoom-btn"),l=i.querySelector(".woo_like_lightbox"),c=i.querySelector(".woo_like_lightbox-img"),d=i.querySelector(".woo_like_close"),f=i.querySelector(".woo_like_next"),h=i.querySelector(".woo_like_prev"),u=l.parentNode,p=l.nextSibling,w=0,m=!1,v=0;t._onThumbClick=function(t){var e=t.currentTarget;r.forEach(function(t){return t.classList.remove("active")}),e.classList.add("active"),n.src=e.dataset.full,w=o(r).indexOf(e)},t._onMainMouseMove=function(t){var e=s.getBoundingClientRect(),i=(t.clientX-e.left)/e.width*100,o=(t.clientY-e.top)/e.height*100;n.style.transformOrigin="".concat(i,"% ").concat(o,"%"),n.style.transform="scale(2)"},t._onMainMouseLeave=function(){n.style.transform="scale(1)"},t._onMainTouchStart=function(e){t._touchStartX=e.changedTouches[0].clientX,t._touchStartY=e.changedTouches[0].clientY},t._onMainTouchEnd=function(e){var i=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY,a=i-t._touchStartX,l=o-t._touchStartY,c=Math.sqrt(a*a+l*l),d=Date.now(),f=d-v;v=d;var h=s.getBoundingClientRect(),u=(i-h.left)/h.width*100,p=(o-h.top)/h.height*100;if(c<10)f<300?(n.style.transformOrigin="".concat(u,"% ").concat(p,"%"),n.style.transform="scale(3)",m=!0):m?(n.style.transform="scale(1)",m=!1):(n.style.transformOrigin="".concat(u,"% ").concat(p,"%"),n.style.transform="scale(2)",m=!0);else{a>50?w=(w-1+r.length)%r.length:a<-50&&(w=(w+1)%r.length);var _=r[w].dataset.full;n.src=_,r.forEach(function(t){return t.classList.remove("active")}),r[w].classList.add("active"),n.style.transform="scale(1)",m=!1}},t._onZoomClick=function(){e.shadow.querySelectorAll(".swiffle-card-inner.swiffle-card-flipped .woo_like_lightbox").length>0&&(e.shadow.prepend(l),l.classList.add("fulltop")),l.classList.remove("woo_like_hidden"),c.src=r[w].dataset.full;var t=e._swiffle_editor_toolbar_offset();d.style.top=t?20+t+"px":""},t._onCloseClick=function(){if(n.style.transform="scale(1)",m=!1,l.classList.add("woo_like_hidden"),e.shadow.querySelectorAll(".woo_like_lightbox.fulltop").length>0){var t=e.shadow.querySelector(".woo_like_lightbox.fulltop");p?u.insertBefore(t,p):u.appendChild(t),t.classList.remove("fulltop")}},t._onNextClick=function(){w=(w+1)%r.length,c.src=r[w].dataset.full},t._onPrevClick=function(){w=(w-1+r.length)%r.length,c.src=r[w].dataset.full},t._onLightboxTouchStart=function(e){t._ltouchStartX=e.changedTouches[0].clientX},t._onLightboxTouchEnd=function(e){var i=e.changedTouches[0].clientX-t._ltouchStartX;Math.abs(i)>50&&(i>0?h.click():f.click())},r.forEach(function(e){e.addEventListener("click",t._onThumbClick),t._galleryListeners.push(function(){return e.removeEventListener("click",t._onThumbClick)})});var _=matchMedia("(hover: none)").matches;_||(s.addEventListener("mousemove",t._onMainMouseMove),t._galleryListeners.push(function(){return n.removeEventListener("mousemove",t._onMainMouseMove)}),s.addEventListener("mouseleave",t._onMainMouseLeave),t._galleryListeners.push(function(){return n.removeEventListener("mouseleave",t._onMainMouseLeave)})),_&&(s.addEventListener("touchstart",t._onMainTouchStart,{passive:!0}),t._galleryListeners.push(function(){return n.removeEventListener("touchstart",t._onMainTouchStart)}),s.addEventListener("touchend",t._onMainTouchEnd,{passive:!0}),t._galleryListeners.push(function(){return n.removeEventListener("touchend",t._onMainTouchEnd)})),a.addEventListener("click",t._onZoomClick),t._galleryListeners.push(function(){return a.removeEventListener("click",t._onZoomClick)}),d.addEventListener("click",t._onCloseClick),t._galleryListeners.push(function(){return d.removeEventListener("click",t._onCloseClick)}),f.addEventListener("click",t._onNextClick),t._galleryListeners.push(function(){return f.removeEventListener("click",t._onNextClick)}),h.addEventListener("click",t._onPrevClick),t._galleryListeners.push(function(){return h.removeEventListener("click",t._onPrevClick)}),l.addEventListener("touchstart",t._onLightboxTouchStart,{passive:!0}),t._galleryListeners.push(function(){return l.removeEventListener("touchstart",t._onLightboxTouchStart)}),l.addEventListener("touchend",t._onLightboxTouchEnd,{passive:!0}),t._galleryListeners.push(function(){return l.removeEventListener("touchend",t._onLightboxTouchEnd)})}}},{key:"swiffle_add_ghost",value:function(){var t=this.shadowRoot.querySelector(".swiffle-card-container");if(t){var e=t.querySelector(".swiffle-card-ghost");e||((e=document.createElement("div")).className="swiffle-card swiffle-card-ghost",e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.zIndex="1",e.style.transform="translate3d(0,200vh,0)",t.appendChild(e)),e.style.display="",e.style.visibility="hidden",this.ghostCard=e}}},{key:"swiffle_remove_ghost",value:function(){var t=this.shadow.querySelector(".swiffle-card-ghost");t&&(t.innerHTML="",t.style.visibility="hidden")}},{key:"attributeChangedCallback",value:function(t,e,i){e!==i&&this.scheduleRender()}},{key:"swiffle_load_page",value:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=arguments.length>5?arguments[5]:void 0,r=this.component_attributes.cardSource||"",a=["csv:","csvs:","xlsx:","rss:","category:"].some(function(t){return r.startsWith(t)}),l=["csv:","csvs:","xlsx:"].find(function(t){return r.startsWith(t)}),c=l&&/^https?:\/\//i.test(r.slice(l.length));a&&!c||(t.posts=[],t.have_more="n"),this.isRemote(!0)&&(this.isInEditor()?window.top.postMessage({type:"swiffleUnauthorizedDomainNotice"},"*"):(this.swiffle_toast(this.swiffleTop._swiffle__("Service denied")),t.posts=[],t.have_more=!1,this.component_attributes.filterbtnshow=!1));var d="";if(this.have_more=t.have_more,(this.component_attributes.cardSource.startsWith("csv:")||this.component_attributes.cardSource.startsWith("csvs:")||this.component_attributes.cardSource.startsWith("xlsx:")||this.component_attributes.cardSource.startsWith("gsheet:"))&&t.posts.length>0&&t.posts[0]){var f,h,u,p=t.posts.shift(),w=p.find(function(t){return t.toLowerCase().startsWith("img_")}),m=p.find(function(t){return t.toLowerCase().startsWith("tit_")}),v=p.find(function(t){return t.toLowerCase().startsWith("nav_")}),_=p.find(function(t){return!(t.toLowerCase().startsWith("hidden_")||t.toLowerCase().startsWith("nav_")||t.toLowerCase().startsWith("img_")||t.toLowerCase().startsWith("map_")||t.toLowerCase().startsWith("imgz_")||t.toLowerCase().startsWith("slide")||t===m)}),y=Object.fromEntries(p.map(function(t,e){return[t,e]})),g=null!==(f=y[w])&&void 0!==f?f:-1,b=y[m],k=null!==(h=y[_])&&void 0!==h?h:-1,x=null!==(u=y[v])&&void 0!==u?u:-1,S=this.component_attributes.cardFlowTitle,L=this.component_attributes.cardFlowTitleShow?'<div class="swiffle-card-tag">'.concat(S,"</div>"):"";t.posts.forEach(function(t){var i=t[g],n=t[b]||"",o=n,s="";e.component_attributes.cardAbstractShow&&(s="none"===e.component_attributes.cardClick?"<div>".concat(t[k]||"","</div>"):'\n <div class="swiffle-summary"\n style="background: -webkit-linear-gradient('.concat(e.component_attributes.cardFtColor,' 10px, #eee);\n -webkit-background-clip: text;background-clip: text;">\n <div class="swiffle-bottom-blur"></div>\n ').concat(t[k]||"","\n </div>"));var r=[],a=[],l=[],c=null,f=null,h=null,u=[];p.forEach(function(i,o){var s=i.toLowerCase(),d=t[o];if(d&&i!==w&&i!==m&&i!==_&&i!==v&&!s.startsWith("hidden_")){var p="";if(s.startsWith("slide_"))return r.push(encodeURI(d)),void(null===c&&(c=o));if(s.startsWith("slidezoom_"))return a.push(encodeURI(d)),void(null===f&&(f=o));if(s.startsWith("slidefull_"))return l.push(encodeURI(d)),void(null===h&&(h=o));if(s.startsWith("map_")){e.MAP+=1;var y=e.MAP,g=JSON.stringify(String(d)).replace(/</g,"\\u003C").replace(/>/g,"\\u003E").replace(/&/g,"&").replace(/'/g,"'"),b=JSON.stringify(String(n)).replace(/</g,"\\u003C").replace(/>/g,"\\u003E").replace(/&/g,"&").replace(/'/g,"'"),k='\n <iframe style="width:100%;height:calc('.concat(e.component_attributes.cardHeight,' * .6);\n border:0;overflow:hidden;"\n srcdoc=\'<!DOCTYPE html>\n <html>\n <head>\n <title>Carte OpenStreetMap</title>\n <link rel="stylesheet" href="').concat(e._swiffleCssBase,'vendor/leaflet.css"/>\n <script src="').concat(e._swiffleJsBase,'vendor/leaflet/leaflet.js"><\/script>\n <style>\n body {overflow:hidden;padding:0;margin:0;border:0;}\n .leaflet-container {\n padding:0;margin:0;border:0;\n height: calc(').concat(e.component_attributes.cardHeight," * .6);\n width: 100%;\n }\n #fallback_").concat(y," {\n text-align:center;\n padding:1em;\n font-family:sans-serif;\n height: calc(").concat(e.component_attributes.cardHeight,' * .6);\n width: 100%;\n }\n </style>\n </head>\n <body>\n <div id="map_').concat(y,'"></div>\n <div id="fallback_').concat(y,'"></div>\n\n <script>\n const address = ').concat(g,";\n const title = ").concat(b,';\n\n async function getCoordinates(address) {\n const url = "https://nominatim.openstreetmap.org/search?format=json&q=" + encodeURIComponent(address);\n try {\n const response = await fetch(url);\n const data = await response.json();\n return data.length > 0 ? { lat: data[0].lat, lon: data[0].lon } : null;\n } catch (error) {\n return null;\n }\n }\n\n // Inside a page builder editor the map document has no address of\n // its own, so OpenStreetMap refuses its tiles (no Referer, "Access\n // blocked" image instead of an error). There, show the map embed\n // hosted by OpenStreetMap itself, which loads its own tiles.\n const inEditor = ').concat(e.isInEditor()?"true":"false",';\n function switchToOsmEmbed(coords) {\n const fallback = document.getElementById("fallback_').concat(y,'");\n document.getElementById("map_').concat(y,'").style.display = "none";\n fallback.style.display = "block";\n fallback.style.padding = "0";\n const lat = parseFloat(coords.lat), lon = parseFloat(coords.lon), d = 0.01;\n const url = "https://www.openstreetmap.org/export/embed.html?bbox=" + (lon - d) + "," + (lat - d) + "," + (lon + d) + "," + (lat + d) + "&layer=mapnik&marker=" + lat + "," + lon;\n fallback.innerHTML = "<iframe width=\\"100%\\" height=\\"100%\\" frameborder=\\"0\\" src=\\"" + url + "\\"></iframe>";\n }\n\n function switchToUmap(address, coords = null) {\n const fallback = document.getElementById("fallback_').concat(y,'");\n const mapDiv = document.getElementById("map_').concat(y,'");\n mapDiv.style.display = "none";\n fallback.style.display = "block";\n\n let iframeURL = "https://umap.openstreetmap.fr/fr/map/?scaleControl=false&miniMap=false&scrollWheelZoom=false&allowEdit=false&moreControl=false&datalayersControl=false";\n if (coords) {\n iframeURL += "#16/" + coords.lat + "/" + coords.lon;\n }\n\n fallback.innerHTML = "<iframe width=\\"100%\\" height=\\"100%\\" frameborder=\\"0\\" allowfullscreen src=\\"" + iframeURL + "\\"></iframe>";\n }\n\n async function initMap() {\n let coords = null;\n\n if (/^-?\\d{1,3}\\.\\d+,\\s*-?\\d{1,3}\\.\\d+$/.test(address)) {\n const parts = address.split(",");\n const lat = parseFloat(parts[0]);\n const lon = parseFloat(parts[1]);\n coords = { lat: lat, lon: lon };\n } else {\n coords = await getCoordinates(address);\n }\n\n if (coords && inEditor) {\n switchToOsmEmbed(coords);\n return;\n }\n if (coords) {\n try {\n var map = L.map("map_').concat(y,'").setView([coords.lat, coords.lon], 16);\n var tileLayer = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {\n attribution: "© OpenStreetMap contributors"\n });\n\n tileLayer.on("tileerror", function() {\n switchToUmap(address, coords);\n });\n\n tileLayer.addTo(map);\n L.marker([coords.lat, coords.lon]).addTo(map).bindPopup((function(s){var d=document.createElement("div");d.textContent=s;return d.innerHTML;})(title)).openPopup();\n\n setTimeout(function() {\n map.invalidateSize();\n }, 500);\n\n } catch (err) {\n switchToUmap(address, coords);\n }\n } else {\n switchToUmap(address, coords);\n }\n }\n\n initMap();\n <\/script>\n </body>\n </html>\'>\n </iframe>\n ');return p+='\n <div class="custom_container" style="text-align:center;height:220px;">\n <span data-map="'.concat(e.bx(k),'" data-loadedmap="0"></span>\n </div>\n '),void u.push({idx:o,html:p})}if(s.startsWith("img_"))return p+='\n <div data-full="'.concat(encodeURI(d),'" class="custom_container" style="height:unset;">\n <img data-loadedf="0" data-full="').concat(encodeURI(d),'"\n style="width:100%;height:auto;" src="">\n </div>\n '),void u.push({idx:o,html:p});if(s.startsWith("imgz_"))return e.swiffle_isPhoneSize?p+='\n <div class="custom_container">\n <div class="slide"\n data-image="'.concat(encodeURI(d),'"\n data-loaded="0"\n style="background-size: cover;background-position: center center;height:100%;width:100%;position:relative;">\n <button class="woo_like_zoom custom_fs no-flip" aria-label="Zoom">\n <svg class="woo_like_zoom-icon custom_fs no-flip"\n viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="custom_fs no-flip"></circle>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="custom_fs no-flip"></line>\n </svg>\n </button>\n </div>\n </div>\n '):p+='\n <div class="custom_container">\n <div class="slide"\n style="background-image: url('.concat(encodeURI(d),');\n background-size: cover;\n background-position: center center;\n height:100%;width:100%;position:relative;">\n <button class="woo_like_zoom custom_fs no-flip" aria-label="Zoom">\n <svg class="woo_like_zoom-icon custom_fs no-flip"\n viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="custom_fs no-flip"></circle>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="custom_fs no-flip"></line>\n </svg>\n </button>\n </div>\n </div>\n '),void u.push({idx:o,html:p});if(s.startsWith("imgzfs_"))return e.swiffle_isPhoneSize?p+='\n <div class="custom_container">\n <div class="slide"\n data-image="'.concat(encodeURI(d),'"\n data-loaded="0"\n style="background-size: cover;background-position: center center;height:100%;width:100%;position:relative;">\n <button class="woo_like_zoom swiffle-btn-zoom-g no-flip" aria-label="Zoom">\n <svg class="woo_like_zoom-icon swiffle-btn-zoom-g no-flip"\n viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="swiffle-btn-zoom-g no-flip"></circle>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="swiffle-btn-zoom-g no-flip"></line>\n </svg>\n </button>\n </div>\n </div>\n '):p+='\n <div class="custom_container">\n <div class="slide"\n style="background-image: url('.concat(encodeURI(d),');\n background-size: cover;\n background-position: center center;\n height:100%;width:100%;position:relative;">\n <button class="woo_like_zoom swiffle-btn-zoom-g no-flip" aria-label="Zoom">\n <svg class="woo_like_zoom-icon swiffle-btn-zoom-g no-flip"\n viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="swiffle-btn-zoom-g no-flip"></circle>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="swiffle-btn-zoom-g no-flip"></line>\n </svg>\n </button>\n </div>\n </div>\n '),void u.push({idx:o,html:p});p+='<div class="swiffle-block-back">'.concat(d,"</div>"),u.push({idx:o,html:p})}});var y=e.makeSlider("slide",r),S=e.makeSlider("slidezoom",a),E=e.makeSlider("slidefull",l),T="";p.forEach(function(t,e){var i=t.toLowerCase();t===w||t===m||t===_||t===v||i.startsWith("hidden_")||(e===c&&y&&(T+=y),e===f&&S&&(T+=S),e===h&&E&&(T+=E),u.filter(function(t){return t.idx===e}).forEach(function(t){return T+=t.html}))});var C=e.component_attributes.cardClick,I="";x>-1&&(I=t[x]),e.component_attributes.cardClick.startsWith("navigateurl")&&e.component_attributes.cardNavUrl.length>0&&(C="navigateurlnew"===e.component_attributes.cardClick?"navigatenew":"navigate",I=e.component_attributes.cardNavUrl),(x>-1||"navigate"===C||"navigatenew"===C)&&(T="");var M="",P="",q=n;e.component_attributes.cardContentOnly&&"none"!==e.component_attributes.cardClick&&(n="".concat(n,'<span class="swiffle-content-only-badge">→</span>')),e.component_attributes.cardTitleOverPicture?M='\n <div class="swiffle-card-title swiffle-over-picture"\n style="margin-bottom: calc('.concat(e.component_attributes.cardRadiusPxl,'px * .30);">\n ').concat(n,"\n </div>"):P='<div class="swiffle-card-title"><b>'.concat(n,"</b></div>"),d+='\n <div class="swiffle-card">\n <div class="swiffle-card-inner '.concat("modal"==e.component_attributes.cardClick.split("/")[0]?"doModal":"",'"\n data-action="').concat(C,'" data-nav="').concat(I,'">\n \n <div class="swiffle-card-front ').concat(e.component_attributes.cardIconShow?"icon":"",'"\n style="').concat(e.component_attributes.cardContentOnly?"background-color:transparent!important;box-shadow:unset;":"",'">\n <div class="swiffle-card-body">\n <div class="swiffle-u-card-header">\n <img src="').concat(i,'" alt="').concat(q,'">\n ').concat(M,'\n </div>\n <div class="swiffle-u-card-body">\n ').concat(P,"\n ").concat(L,"\n ").concat(s,'\n </div>\n </div>\n </div>\n\n <div class="swiffle-card-back">\n <div class="swiffle-card-title-back">').concat(o,"</div>\n ").concat(T,"\n <br><br><br><br>\n </div>\n </div>\n </div>\n ")})}if(this.component_attributes.cardSource.startsWith("rss:")&&t.posts.forEach(function(t){var i="";t.video&&(i=t.video);var n="";1==e.component_attributes.cardNavShow&&(t.url,n='<a href="'.concat(t.url,'" target="_blank" style="margin-left:15px;" class="swiffle-btn no-flip">').concat(s._swiffle__("Visit Site"),"</a>"));var o=""==e.component_attributes.cardFlowTitle.trim()?t.tag:e.component_attributes.cardFlowTitle,r="";1==e.component_attributes.cardFlowTitleShow&&(r='<div class="swiffle-card-tag">'.concat(o,"</div>"));var a="";1==e.component_attributes.cardAbstractShow&&(a="none"===e.component_attributes.cardClick?"<div>".concat(t.description,"</div>"):'<div class="swiffle-summary" style="background: -webkit-linear-gradient('.concat(e.component_attributes.cardFtColor,' 10px, #eee);-webkit-background-clip: text;background-clip: text;"><div class="swiffle-bottom-blur"></div>').concat(t.description,"</div>")),t.author_display&&t.author_display.length>1&&t.author_display;var l="",c="",f=String(t.title).replace(/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),h=f;1==e.component_attributes.cardContentOnly&&"none"!==e.component_attributes.cardClick&&(h="".concat(f,'<span class="swiffle-content-only-badge">→</span>')),1==e.component_attributes.cardTitleOverPicture?l='<div style="margin-bottom: calc( '.concat(e.component_attributes.cardRadiusPxl,'px * .30 );" class="swiffle-card-title swiffle-over-picture">').concat(h,"</div>"):c='<div class="swiffle-card-title"><b>'.concat(h,"</b></div>"),d+='\n <div class="swiffle-card">\n <div class="swiffle-card-inner '.concat("modal"==e.component_attributes.cardClick.split("/")[0]?"doModal":"",'" data-action="').concat(e.component_attributes.cardClick,'" data-nav="').concat(t.url,'">\n <div class="swiffle-card-front ').concat(1==e.component_attributes.cardIconShow?"icon":"",'" style="').concat(1==e.component_attributes.cardContentOnly?"background-color:transparent!important;box-shadow:unset;":"",'">\n <div class="swiffle-card-body">\n <div class="swiffle-u-card-header">\n <img src="').concat(t.img,'" alt="').concat(f,'">\n ').concat(l,'\n </div>\n <div class="swiffle-u-card-body">\n ').concat(c,"\n ").concat(r,"\n ").concat(a,'\n </div>\n </div>\n </div>\n <div class="swiffle-card-back">\n <div class="swiffle-card-title-back">').concat(f,"</div>\n ").concat(i,'\n <p class="adjust">').concat(t.description,'</p>\n <img src="" data-full="').concat(t.img,'" data-loadedf="0" alt="').concat(f,'" style="width:100%;">\n \x3c!--p class="adjust swiffle-font-tiny">$ {the_content}</p--\x3e\n <br>\n <div class="swiffle-author">\n ').concat(t.source_logo?'<img class="swiffle-author-logo" src="'.concat(t.source_logo,'" alt="">'):"",'\n <span class="swiffle-author-name">').concat(t.author_display,"</span>\n </div>\n <br>\n ").concat(n,"\n <br><br><br><br><br>\n </div>\n </div>\n </div>\n ")}),this.component_attributes.cardSource.startsWith("category:")){var E=this.bxd(t.site_header).replace(/.x3C/g,"<").replace(/\t/g,"").replace(/:root{/g,":host{").replace(/\bhtml\s*{/g,":host{").replace(/\bbody\s*{/g,":host{"),T=document.createElement("span");T.innerHTML=E,0==i&&(T.querySelectorAll("[id]").forEach(function(t){e.shadow.querySelectorAll("#".concat(t.id)).length>0&&t.remove()}),T.querySelectorAll("[href").forEach(function(t){e.shadow.querySelectorAll("[href='".concat(t.href,"']")).length>0&&t.remove()})),T.querySelectorAll("meta,title,.swiffle-only").forEach(function(t){t.remove()});var C=function(t){try{return new URL(t).pathname.split("/").pop()}catch(e){return t}};if(T.querySelectorAll("script").forEach(function(t){if(t.src){var i=C(t.src);if(!o(document.querySelectorAll("script[src]")).some(function(t){return C(t.src)===i})){var n=document.createElement("script");n.src=t.src,n.async=!1,document.head.appendChild(n)}}else if(!e._isWP&&t.textContent.trim()){var s=t.textContent.trim(),r="swi"+e.bx(s.slice(0,256));if(!document.head.querySelector("script[data-swk='".concat(r,"']"))){var a=document.createElement("script");a.textContent=s,a.dataset.swk=r,document.head.appendChild(a)}}t.remove()}),d+=T.innerHTML,t.posts.forEach(function(t){var i="";switch(e.component_attributes.cardimgsize){case"large":i=0==t.img?"":'<img src="'.concat(t.img,'" alt="').concat(t.title,'" />');break;case"medium":i=0==t.img?"":'<img src="'.concat(t.img_medium,'" alt="').concat(t.title,'" />');break;case"thumbnail":i=0==t.img?"":'<img src="'.concat(t.img_thumbnail,'" alt="').concat(t.title,'" />')}var o=document.createElement("span");o.innerHTML=t.content;var s=""==e.component_attributes.cardFlowTitle.trim()?t.category:e.component_attributes.cardFlowTitle,r="";1==e.component_attributes.cardFlowTitleShow&&(r='<div class="swiffle-card-tag">'.concat(s,"</div>"));var a="";1==e.component_attributes.cardAbstractShow&&(a="none"===e.component_attributes.cardClick?"<div>".concat(t.content,"</div>"):'<div class="swiffle-summary" style="background: -webkit-linear-gradient('.concat(e.component_attributes.cardFtColor,' 10px, #eee);-webkit-background-clip: text;background-clip: text;"><div class="swiffle-bottom-blur"></div>').concat(o.innerText,"</div>"));var l="",c="",f=t.title;1==e.component_attributes.cardContentOnly&&"none"!==e.component_attributes.cardClick&&(f="".concat(t.title,'<span class="swiffle-content-only-badge">→</span>')),1==e.component_attributes.cardTitleOverPicture?l='<div style="margin-bottom: calc( '.concat(e.component_attributes.cardRadiusPxl,'px * .30 );" class="swiffle-card-title swiffle-over-picture">').concat(f,"</div>"):c='<div class="swiffle-card-title"><b>'.concat(f,"</b></div>");var h=e.component_attributes.cardClick,u=t.url;e.component_attributes.cardClick.startsWith("navigateurl")&&t.navurl&&(h="navigate","navigateurlnew"===e.component_attributes.cardClick&&(h="navigatenew"),u=t.navurl),d+='\n <div class="swiffle-card">\n <div class="swiffle-card-inner '.concat("modal"==e.component_attributes.cardClick.split("/")[0]?"doModal":"",'" data-action="').concat(h,'" data-nav="').concat(u,'">\n <div class="swiffle-card-front ').concat(1==e.component_attributes.cardIconShow?"icon":"",'" style="').concat(1==e.component_attributes.cardContentOnly?"background-color:transparent!important;box-shadow:unset;":"",'">\n <div class="swiffle-card-body">\n <div class="swiffle-u-card-header">\n ').concat(i,"\n ").concat(l,'\n </div>\n <div class="swiffle-u-card-body">\n ').concat(c,"\n ").concat(r,"\n ").concat(a,'\n </div>\n </div>\n </div>\n <div class="swiffle-card-back">\n <div class="swiffle-card-title-back">').concat(t.title,"</div>\n <p>").concat(t.content,'</p>\n <span class="COMMENT_').concat(t.ID,'"></span>\n </div>\n </div>\n </div>\n '),1==e.component_attributes.blockShowComments&&n.push(t.ID)}),t.site_footer){var I=this.bxd(t.site_footer).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),M=document.createElement("div");M.innerHTML=I,M.querySelectorAll("script").forEach(function(t){if(t.src){var e=t.src.split("/").pop();if(!o(document.querySelectorAll("script[src]")).some(function(t){return t.src.split("/").pop()===e})){var i=document.createElement("script");i.src=t.src,i.async=!1,document.head.appendChild(i)}}})}requestAnimationFrame(function(){e.shadow.querySelectorAll(".wp-block-gallery").forEach(function(t){if(!t.dataset.swiffleGalleryFixed){var e=o(t.classList).find(function(t){return t.startsWith("columns-")}),i=e?parseInt(e.split("-")[1]):3;t.style.cssText+=";display:grid;grid-template-columns:repeat(".concat(i,",1fr);gap:4px;"),t.querySelectorAll("figure.wp-block-image, figure.wp-block-gallery-item, li.blocks-gallery-item").forEach(function(t){t.style.cssText+=";margin:0;width:100%;";var e=t.querySelector("img");e&&(e.style.cssText+=";width:100%;height:auto;display:block;")}),t.dataset.swiffleGalleryFixed="1"}})})}return d}},{key:"swiffle_endSwipe",value:function(t){var e=this.ownerDocument,i=this.swiffleTop||window;if(e.body.classList.remove("swiffle-no-scroll"),e.body.style.position="",e.body.style.top="",e.body.style.width="",null!==this.memoScroll&&void 0!==this.memoScroll){var n=parseInt(this.memoScroll,10);i.scrollTo(0,n),this.memoScroll=null}this.preventTouchScroll&&(e.removeEventListener("touchmove",this.preventTouchScroll),this.preventTouchScroll=null);var o=this.findUpTag(t,"swiffle-container-fluid");o&&o.classList.remove("swiffle-swipe-cards-overlay"),this.shadowRoot.host.classList.remove("swiffle-full-mode");var s=this.findUpTag(t,"swiffle-card-container");s&&(s.classList.remove("swiffle-card-swipable","swiffle-card-swipable-full"),s.querySelectorAll(".swiffle-card").forEach(function(t){t.classList.remove("swipable","viewed"),t.style.position="",t.style.top="",t.style.left="",t.style.transform="",t.style.zIndex="",t.style.transitionDuration="",t.style.marginTop="",t.style.marginLeft="";var e=t.querySelector(".swiffle-card-inner");e&&!e.classList.contains("more")&&e.classList.remove("swiffle-card-flipped"),"none"!==t.style.display&&(t.style.visibility="visible")}),this.swiffle_remove_ghost(),this.cards.forEach(function(t){t.style.position="",t.style.top="",t.style.left=""}),this.currentIndex=0)}},{key:"swiffle_toFluid",value:function(t){var e=this.findUpTag(t,"swiffle-card-container");null!==e&&(this.swiffle_endSwipe(t),e.classList.remove("auto-overflow-scroll"),this.activeLayout="fluid",this.ghostCard&&(this.ghostCard.style.display="none"))}},{key:"swiffle_toLine",value:function(t){var e=this.findUpTag(t,"swiffle-card-container");null!==e&&(this.swiffle_endSwipe(t),e.classList.add("auto-overflow-scroll"),this.activeLayout="line")}},{key:"swiffle_toSwipe",value:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.ownerDocument,s=this.findUpTag(t,"swiffle-container-fluid");!0===i&&this.swiffle_endSwipe(t);var r=function(){!0===n&&!0===i&&(o.body.classList.add("swiffle-no-scroll"),o.body.style.position="fixed",o.body.style.top="-".concat(e.memoScroll||0,"px"),o.body.style.width="100%"),!0!==n||e.preventTouchScroll||(e.preventTouchScroll=function(t){var i=t.composedPath().some(function(t){return t instanceof Element&&(t.classList.contains("modal")&&t.classList.contains("open")||t.classList.contains("swiffle-card-back"))}),n="swipe"===e.activeLayout||"swipefull"===e.activeLayout;!i&&n&&t.preventDefault()},o.addEventListener("touchmove",e.preventTouchScroll,{passive:!1})),!0===n&&!0===i&&(s&&s.classList.add("swiffle-swipe-cards-overlay"),e.shadowRoot.host.style.setProperty("--swiffle-cardHeight","85vh"),e.shadowRoot.host.style.setProperty("--swiffle-cardWidth","60vh"),e.shadowRoot.host.style.setProperty("--swiffle-cardWidthMax","90vw"));var t=e.shadowRoot.querySelector(".swiffle-card-container");t&&(e.swiffle_refreshCards(),e.cards.length&&(e.activeLayout=n?"swipefull":"swipe",e.swiffle_toSwipe_continueCardStack(t,n,s)))};if(!0===n&&!0===i){var a=this.swiffleTop||window;this.memoScroll=a.scrollY||o.documentElement.scrollTop}if(this._isSafariIOS&&!0===n){var l=this.swiffleTop||window;l.scrollTo(l.scrollX||0,0),requestAnimationFrame(function(){requestAnimationFrame(r)})}else r()}},{key:"swiffle_toSwipe_continueCardStack",value:function(t,e,i){var n=this;this.cards.forEach(function(t){t.style.position="absolute",t.style.top="0",t.style.left="0"}),t.classList.remove("swiffle-card-swipable","swiffle-card-swipable-full","auto-overflow-scroll"),t.classList.add(e?"swiffle-card-swipable-full":"swiffle-card-swipable");var o=this.cards.findIndex(function(t){return!t.classList.contains("viewed")});-1===o&&(o=0),this.currentIndex=o,this.cards.forEach(function(t,e){t.classList.remove("swipable"),t.style.transitionDuration="",t.style.marginTop="",t.style.marginLeft="",e<n.currentIndex?(t.classList.add("viewed"),t.style.transform="translate3d(0,200vh,0)",t.style.zIndex=1):e===n.currentIndex?(t.classList.remove("viewed"),t.style.transform="translate3d(0,0,0)",t.style.zIndex=3,t.classList.add("swipable")):e===n.currentIndex+1?(t.classList.remove("viewed"),t.style.transform="translate3d(0,0,0)",t.style.zIndex=2):(t.classList.remove("viewed"),t.style.transform="translate3d(0,200vh,0)",t.style.zIndex=1)}),i&&this.swiffle_add_ghost()}},{key:"swiffle_onSwipeSuccess",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"forward";if(!this.swiffle_swipeEnding){this.swiffle_swipeEnding=!0,clearTimeout(this._swipeEndingWatchdog),this._swipeEndingWatchdog=setTimeout(function(){t.swiffle_swipeEnding&&(console.warn("Swiffle: swipeEnding lock force-released by the watchdog (500ms) — an unhandled exit path likely still exists."),t.swiffle_swipeEnding=!1)},500);try{if(!this.shadowRoot.querySelector(".swiffle-card-container")||!this.cards.length)return this.swiffle_swipeEnding=!1,void clearTimeout(this._swipeEndingWatchdog);if(!this.cards[this.currentIndex])return this.swiffle_swipeEnding=!1,void clearTimeout(this._swipeEndingWatchdog)}catch(t){return console.error("Swiffle: error in swiffle_onSwipeSuccess, lock released to avoid a deadlock.",t),this.swiffle_swipeEnding=!1,void clearTimeout(this._swipeEndingWatchdog)}setTimeout(function(){try{var i=t.cards[t.currentIndex];i&&(i.style.visibility="hidden"),"forward"===e&&t.currentIndex<t.cards.length-1?t.currentIndex++:"backward"===e&&t.currentIndex>0&&t.currentIndex--,t.swiffle_updateStack();var n=t.cards[t.currentIndex];if(n&&(n.style.visibility="visible"),t.ghostCard){t.ghostCard.style.visibility="hidden",t.ghostCard.style.transform="translate3d(0,200vh,0)";var o=t.currentIndex+1,s=t.cards[o];s&&(s.style.visibility="visible")}}catch(t){console.error("Swiffle: error while finalizing the swipe, lock released to avoid a deadlock.",t)}finally{t.swiffle_swipeEnding=!1,clearTimeout(t._swipeEndingWatchdog)}},3)}}},{key:"swiffle_onSwipeCancel",value:function(){var t=this;if(this.shadowRoot.querySelector(".swiffle-card-container")&&this.cards.length){var e=this.cards[this.currentIndex];if(e){if(e.style.transitionDuration=".3s",e.style.marginLeft="0",e.style.marginTop="0",e.style.left="0",e.style.top="0",e.style.transform="translate3d(0,0,0) rotate(0deg)",e.style.zIndex=3,this.cards.forEach(function(e,i){e.style.left="",e.style.top="",i<t.currentIndex?(e.classList.add("viewed"),e.style.transform="translate3d(0,200vh,0)",e.style.zIndex=1):i===t.currentIndex?(e.classList.remove("viewed"),e.style.transform="translate3d(0,0,0)",e.style.zIndex=3,e.classList.add("swipable")):i===t.currentIndex+1?(e.classList.remove("viewed"),e.style.transform="translate3d(0,0,0)",e.style.zIndex=2):(e.classList.remove("viewed"),e.style.transform="translate3d(0,200vh,0)",e.style.zIndex=1)}),this.ghostCard){this.ghostCard.style.visibility="hidden",this.ghostCard.style.transform="translate3d(0,200vh,0)";var i=this.currentIndex+1,n=this.cards[i];n&&(n.style.visibility="visible")}setTimeout(function(){e.style.transitionDuration=""},300),this.swiffle_sw_initEvt={}}}}},{key:"swiffle_updateStack",value:function(){var t=this,e=this.shadowRoot.querySelector(".swiffle-card-container");if(e&&this.cards.length){this.cards.forEach(function(e,i){e.classList.remove("swipable"),e.style.transitionDuration="",e.style.marginLeft="",e.style.marginTop="",e.style.left="",e.style.top="",e.style.visibility="visible",i<t.currentIndex?(e.classList.add("viewed"),e.style.transform="translate3d(0,200vh,0)",e.style.zIndex=1):i===t.currentIndex?(e.classList.remove("viewed"),e.style.transform="translate3d(0,0,0)",e.style.zIndex=3,e.classList.add("swipable")):i===t.currentIndex+1?(e.classList.remove("viewed"),e.style.transform="translate3d(0,0,0)",e.style.zIndex=2):(e.classList.remove("viewed"),e.style.transform="translate3d(0,200vh,0)",e.style.zIndex=1)});var i=e.querySelector(".swiffle-card-ghost");this.cards[this.currentIndex+1]&&i?this.swiffle_add_ghost():i&&this.swiffle_remove_ghost(),this.swiffle_sw_initEvt={},this.swiffle_swipeEnding=!1}}},{key:"swiffle_addCardToStack",value:function(t){this.shadowRoot.querySelector(".swiffle-card-container")&&(this.cards[this.currentIndex].insertAdjacentElement("afterend",t),this.cards.splice(this.currentIndex+1,0,t))}},{key:"swiffle_fix_embeds",value:function(){var t=this;if(!this._embedObserver&&this.component_attributes.cardSource.startsWith("category:")){var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56.25,n=document.createElement("iframe");n.src=t,n.allow=e||"accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture;web-share",n.allowFullscreen=!0,n.dataset.swkFixed="1",n.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;border:0;";var o=document.createElement("div");return o.className="no-flip",o.style.cssText="position:relative;padding-bottom:"+i.toFixed(2)+"%;height:0;overflow:hidden;max-width:100%;",o.appendChild(n),o},i=function(t){try{return JSON.parse(t.dataset.settings||"{}")}catch(t){return{}}},n=function(t){t.style.setProperty("overflow-x","auto","important"),t.style.setProperty("max-width","100%","important"),t.style.setProperty("display","block","important")};this._embedObserver=new MutationObserver(function(){t.shadow.querySelectorAll(".wp-block-audio audio:not([data-swk-fixed])").forEach(function(t){t.dataset.swkFixed="1",t.classList.add("no-flip"),t.style.setProperty("width","100%","important"),t.style.setProperty("max-width","100%","important"),t.style.setProperty("display","block","important")}),t.shadow.querySelectorAll(".wp-block-table:not([data-swk-fixed])").forEach(function(t){t.dataset.swkFixed="1",n(t);var e=t.querySelector("table");e&&e.style.setProperty("min-width","100%","important")}),t.shadow.querySelectorAll(".swiffle-card-back img:not([data-swk-fixed]), .modal-body img:not([data-swk-fixed])").forEach(function(t){t.closest(".wp-block-gallery")||(t.dataset.swkFixed="1",t.style.setProperty("max-width","100%","important"),t.style.setProperty("height","auto","important"),t.style.setProperty("display","block","important"),t.style.setProperty("border-radius","var(--swiffle-cardImgRadiusPxl)","important"))}),t.shadow.querySelectorAll(".wp-block-code:not([data-swk-fixed]),.wp-block-preformatted:not([data-swk-fixed])").forEach(function(t){t.dataset.swkFixed="1",n(t);var e="PRE"===t.tagName?t:t.querySelector("pre");e&&(e.style.setProperty("overflow-x","auto","important"),e.style.setProperty("white-space","pre","important"))}),t.shadow.querySelectorAll('.wp-block-embed__wrapper iframe:not([data-swk-fixed]),.wp-video iframe:not([data-swk-fixed]),iframe[src*="youtube"]:not([data-swk-fixed]),iframe[src*="vimeo"]:not([data-swk-fixed]),iframe[src*="spotify"]:not([data-swk-fixed]),iframe[src*="soundcloud"]:not([data-swk-fixed]),iframe[src*="dailymotion"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";var e=parseInt(t.width||t.getAttribute("width")||560),i=parseInt(t.height||t.getAttribute("height")||315)/e*100,n=t.closest(".wp-block-embed__wrapper")||t.parentElement;n&&(n.classList.add("no-flip"),n.style.setProperty("position","relative","important"),n.style.setProperty("padding-bottom",i.toFixed(2)+"%","important"),n.style.setProperty("height","0","important"),n.style.setProperty("overflow","hidden","important"),n.style.setProperty("max-width","100%","important"),t.style.setProperty("position","absolute","important"),t.style.setProperty("top","0","important"),t.style.setProperty("left","0","important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","100%","important"),t.style.setProperty("border","0","important"))}),t.shadow.querySelectorAll(".wp-block-video video:not([data-swk-fixed])").forEach(function(t){t.dataset.swkFixed="1",t.classList.add("no-flip"),t.style.setProperty("width","100%","important"),t.style.setProperty("max-width","100%","important"),t.style.setProperty("height","auto","important"),t.style.setProperty("display","block","important")}),t.shadow.querySelectorAll('[data-e-type="e-youtube"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var n=i(t),o=n.source||"",s="";try{var r=new URL(o);s=r.searchParams.get("v")||r.pathname.replace(/^\//,"")}catch(t){}if(!s)return;var a=new URLSearchParams;n.autoplay&&a.set("autoplay","1"),n.mute&&a.set("mute","1"),n.controls||a.set("controls","0"),n.cc_load_policy&&a.set("cc_load_policy","1"),n.loop&&a.set("loop","1"),!1===n.rel&&a.set("rel","0"),n.start&&a.set("start",n.start),n.end&&a.set("end",n.end);var l=(n.privacy?"https://www.youtube-nocookie.com":"https://www.youtube.com")+"/embed/"+s,c=a.toString();c&&(l+="?"+c),t.replaceWith(e(l))}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-vimeo"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var n=i(t),o="";try{o=new URL(n.source||"").pathname.replace(/^\//,"")}catch(t){}if(!o)return;var s=new URLSearchParams;n.autoplay&&s.set("autoplay","1"),n.mute&&s.set("muted","1"),n.controls||s.set("controls","0"),n.loop&&s.set("loop","1");var r="https://player.vimeo.com/video/"+o,a=s.toString();a&&(r+="?"+a),t.replaceWith(e(r))}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-dailymotion"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var n=i(t),o="";try{o=new URL(n.source||"").pathname.split("/").pop()}catch(t){}if(!o)return;var s=new URLSearchParams;n.autoplay&&s.set("autoplay","1"),n.mute&&s.set("mute","1"),n.controls||s.set("controls","0"),n.loop&&s.set("loop","1");var r="https://www.dailymotion.com/embed/video/"+o,a=s.toString();a&&(r+="?"+a),t.replaceWith(e(r))}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-soundcloud"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var e=i(t),n=e.source||e.url||"";if(!n)return;var o="https://w.soundcloud.com/player/?"+new URLSearchParams({url:encodeURIComponent(n),color:"%23ff5500",auto_play:e.autoplay?"true":"false",hide_related:"false",show_comments:"true",show_user:"true",show_reposts:"false",show_teaser:"true",visual:"true"}).toString(),s=document.createElement("div");s.className="no-flip",s.style.cssText="max-width:100%;";var r=document.createElement("iframe");r.src=o,r.style.cssText="width:100%;height:300px;border:0;display:block;",r.dataset.swkFixed="1",r.allow="autoplay",s.appendChild(r),t.replaceWith(s)}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-self-hosted-video"]:not([data-swk-fixed]),.e-self-hosted-video-base:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1",t.classList.add("no-flip"),t.style.setProperty("width","100%","important"),t.style.setProperty("max-width","100%","important"),t.style.setProperty("height","auto","important"),t.style.setProperty("display","block","important"),t.style.setProperty("margin","0","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("box-sizing","border-box","important");for(var e=t.parentElement;e&&!e.classList.contains("swiffle-card-back")&&!e.classList.contains("modal-content")&&!e.classList.contains("modal-body");)e.style.setProperty("overflow","hidden","important"),e.style.setProperty("max-width","100%","important"),e.style.setProperty("margin-left","0","important"),e.style.setProperty("padding-left","0","important"),e.style.setProperty("box-sizing","border-box","important"),e=e.parentElement}),t.shadow.querySelectorAll('[data-e-type="e-google-map"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var n=i(t),o=encodeURIComponent(n.address||n.location||"");if(!o)return;var s="https://www.openstreetmap.org/export/embed.html?layer=mapnik&query="+o;t.replaceWith(e(s,"",50))}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-countdown"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var e=i(t),n=new Date(e.due_date||e.date+" "+(e.time||"00:00:00"));if(isNaN(n))return;var o=document.createElement("div");o.style.cssText="display:flex;gap:12px;justify-content:center;flex-wrap:wrap;font-family:inherit;";var s=["Days","Hours","Minutes","Seconds"].map(function(t){var e=document.createElement("div");e.style.cssText="text-align:center;min-width:52px;";var i=document.createElement("div");i.style.cssText="font-size:2em;font-weight:700;line-height:1;",i.textContent="00";var n=document.createElement("div");return n.style.cssText="font-size:.7em;opacity:.7;margin-top:4px;",n.textContent=t,e.appendChild(i),e.appendChild(n),o.appendChild(e),i}),r=function(){var t=Math.max(0,n-Date.now());s[0].textContent=String(Math.floor(t/864e5)).padStart(2,"0"),s[1].textContent=String(Math.floor(t/36e5)%24).padStart(2,"0"),s[2].textContent=String(Math.floor(t/6e4)%60).padStart(2,"0"),s[3].textContent=String(Math.floor(t/1e3)%60).padStart(2,"0"),t>0&&requestAnimationFrame(r)};r(),t.replaceWith(o)}catch(t){}})}),this._embedObserver.observe(this.shadow,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["src"]})}}},{key:"findUpTag",value:function(t,e){if(!t)return null;if(t.classList&&t.classList.contains(e))return t;for(;t.parentNode;)if((t=t.parentNode).classList&&t.classList.contains(e))return t;return null}},{key:"swiffle_getParamValue",value:function(t,e){return new URL(t).searchParams.get(e)}},{key:"bx",value:function(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode("0x"+e)}))}},{key:"bxd",value:function(t){return decodeURIComponent(atob(t).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))}},{key:"callswiffleapi",value:function(t){var e=this;if(this._msgHooked){if(void 0===this.awaitProxyRetries&&(this.awaitProxyRetries=10),!this.component_attributes.proxy&&this.awaitProxyRetries>0)return this.awaitProxyRetries--,void setTimeout(function(){e.callswiffleapi(t)},100);if(this.awaitProxyRetries=void 0,this._knownDeniedProxy===this.component_attributes.proxy&&(this._intlCorrectionRetries=void 0,this._correctingIntl=!1),"get_intl"!==t.action&&this._intlProxy!==this.component_attributes.proxy&&this._knownDeniedProxy!==this.component_attributes.proxy){if(void 0===this._intlCorrectionRetries&&(this._intlCorrectionRetries=30),this._intlCorrectionRetries>0){if(this._intlCorrectionRetries--,!this._correctingIntl){this._correctingIntl=!0,this.translate_ready=0;var i=this.component_attributes.proxy,n={action:"get_intl",callback:"get_intl,"+this.ID};this.callswiffleapi(n),this._lastIntlBridge=n.bridge,this._lastIntlRequestedForProxy=i}return void setTimeout(function(){e.callswiffleapi(t)},100)}this._intlCorrectionRetries=void 0}else this._intlCorrectionRetries=void 0;""!==this.component_attributes.blockLang&&(t.locale=this.component_attributes.blockLang);var o,s=document.createElement("iframe");s.style.display="none",s.classList.add("bz"),s.classList.add("swiffleX"),o=window.swiffle_cur_bridge,s.id="swifflePool"+window.swiffle_cur_bridge,window.swiffle_cur_bridge+=1,this.shadow.appendChild(s),t.bridge=o,this._bridgeProxy||(this._bridgeProxy={}),this._bridgeProxy[o]=this.component_attributes.proxy;var r=this.component_attributes.proxy;setTimeout(function(){if(e.shadow&&e.shadow.querySelector("#"+s.id)){s.remove();var i=e._lastReplyByProxy&&e._lastReplyByProxy[r];if(i&&Date.now()-i<3e4)return void console.warn("Swiffle: reply for bridge "+s.id+" ("+t.action+") not matched; the source site is answering, no alert shown.");e.style.display="",e.swiffle_toast(e.swiffleTop._swiffle__("No response from the source site — check the URL is correct and reachable."))}},1e4);var a="blob:"===window.location.protocol?"y":"n";t.isblob=a,t.iseditor=this.isInEditor()?"y":"n",this.swiffleTop||(this.swiffleTop={}),this.swiffleTop.SWIFFLE_TOKENS||(this.swiffleTop.SWIFFLE_TOKENS={});var l=this.getSwiffleTokenStorageKey();if(!this.swiffleTop.SWIFFLE_TOKENS[l])try{var c=this.swiffleTop.localStorage.getItem(l);c&&(this.swiffleTop.SWIFFLE_TOKENS[l]=c)}catch(t){}this.swiffleTop.SWIFFLE_TOKENS[l]&&(t.swiffle_token=this.swiffleTop.SWIFFLE_TOKENS[l]);var d=window;try{for(;"null"===d.location.origin&&d!==d.parent;)(d=d.parent).location.href}catch(t){d=window}var f=new URL(d.location.href);t.replyto=("y"===a?"":f.origin)+(f.pathname.endsWith("/")?f.pathname:f.pathname+"/");var h=this.component_attributes.proxy,u=null;if("y"===a&&"y"===t.iseditor)try{if(window.parent&&"blob:"!==window.parent.location.protocol&&"function"==typeof window.parent.fetch){window.swiffle_origin_verify||(window.swiffle_origin_verify={});var p=window.swiffle_origin_verify[h];if(!p||Date.now()-p.at>2e4){var w=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(function(t){return t.toString(16).padStart(2,"0")}).join(""),m=window.parent.fetch(h+"?boqVpod_verify="+w,{mode:"no-cors"}).catch(function(){});p={token:w,at:Date.now(),promise:Promise.race([m,new Promise(function(t){return setTimeout(t,2e3)})])},window.swiffle_origin_verify[h]=p}t.originToken=p.token,u=p.promise}}catch(t){}u?u.then(function(){s.src=h+"?boqVpod_call="+e.bx(JSON.stringify(t))}):s.src=h+"?boqVpod_call="+this.bx(JSON.stringify(t))}else this._pendingApiCalls.push(t)}},{key:"getData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"renderTop",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"false",n="e30=",o="e30=",s=this.getAttribute("blockdata");if(s&&(o=s),""!==this.component_attributes.proxy){if("false"!==i)return void this.callswiffleapi({action:"getposts",order:this.component_attributes.orderby,block_filter:this.filter,pg:t,ps:this.component_attributes.blockcardsperpg,gets:n,blockdata:o,maxonly:i,headers:"y",cardSource:this.component_attributes.cardSource,callback:e+","+this.ID});"e30="===this.filter?this.callswiffleapi({action:"getposts",order:this.component_attributes.orderby,filtertitle:this.component_attributes.filtertitle,pg:t,ps:this.component_attributes.blockcardsperpg,gets:n,blockdata:o,headers:"y",cardSource:this.component_attributes.cardSource,callback:e+","+this.ID}):this.callswiffleapi({action:"getposts",order:this.component_attributes.orderby,block_filter:this.filter,pg:t,ps:this.component_attributes.blockcardsperpg,gets:n,blockdata:o,headers:"y",cardSource:this.component_attributes.cardSource,callback:e+","+this.ID})}}},{key:"isInCrossOriginFrame",value:function(){if(window===window.parent)return!1;try{return window.parent.document,!1}catch(t){return!0}}},{key:"swiffleNavigate",value:function(t,e){if(this.isInCrossOriginFrame())try{window.top.location.href=t}catch(e){window.open(t,"_blank")}else e.location.href=t}},{key:"getSwiffleGlobalWindow",value:function(){var t=window;try{for(;t!==t.parent;){if(t.SWIFFLE_AJAX_URL&&"blob:"!==t.location.protocol)return t;t=t.parent}return window.parent.document,window.parent}catch(t){return window}}},{key:"loadSwiffleCss",value:function(){if(!this.cssLoaded){this.cssLoaded=!0;var t=new Date,e="".concat(t.getFullYear()).concat(t.getMonth()+1).concat(t.getDate()),i=e;this.swiffleTop&&this.swiffleTop.SWIFFLE_CACHE_VERSION&&(i=this.swiffleTop.SWIFFLE_CACHE_VERSION),this.swifflegrid_css=document.createElement("link"),this.swifflegrid_css.setAttribute("rel","stylesheet"),this.shadow.appendChild(this.swifflegrid_css);var n=function(){if(!p)return null;try{var t=new URL(p,document.baseURI);return/\/js\//.test(t.pathname)?(t.pathname=t.pathname.replace(/\/js\/[^/]+$/,"/css/swifflegrid.css"),t.href):null}catch(t){return null}}(),o=n||"".concat(this.component_attributes.componentPath,"swifflegrid.css?v=").concat(i),s=n?n.replace(/swifflegrid\.css.*$/,""):this.component_attributes.componentPath;this._swiffleCssBase=s,this._swiffleJsBase=function(){if(!p)return null;try{return new URL(p,document.baseURI).href.replace(/[^/]+$/,"")}catch(t){return null}}()||s.replace("/css/","/js/"),this.swifflegrid_css.setAttribute("href",o);var r="".concat(s,"swifflegrid_custom.css?v=").concat(e),a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("href",r),this.shadow.appendChild(a)}}},{key:"_swiffle_fix_yt_close",value:function(t){var e=this._swiffle_editor_toolbar_offset();if(e){var i=t.querySelector(".yt-content"),n=t.querySelector(".yt-close");i.getBoundingClientRect().top-40<e&&(n.style.top=e-i.getBoundingClientRect().top+"px")}}},{key:"openYouTubeLightbox",value:function(t){t=t.split("?")[0]+"?playsinline=1";var e=document.createElement("div");e.className="yt-lightbox",e.innerHTML='\n <div class="yt-backdrop"></div>\n <div class="yt-content">\n <button class="yt-close">✕</button>\n <iframe\n src="'.concat(t,'"\n allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen"\n allowfullscreen\n ></iframe>\n </div>\n '),this.shadow.prepend(e),this._swiffle_fix_yt_close(e),e.querySelector(".yt-close").onclick=function(){return e.remove()},e.querySelector(".yt-backdrop").onclick=function(){return e.remove()}}},{key:"openVideoLightbox",value:function(t){var e=document.createElement("div");e.className="yt-lightbox",e.innerHTML='\n <div class="yt-backdrop"></div>\n <div class="yt-content">\n <button class="yt-close">✕</button>\n <video src="'.concat(t,'" controls autoplay playsinline></video>\n </div>\n '),this.shadow.prepend(e),this._swiffle_fix_yt_close(e),e.querySelector(".yt-close").onclick=function(){return e.remove()},e.querySelector(".yt-backdrop").onclick=function(){return e.remove()}}},{key:"makeSlider",value:function(t,e){var i=this;if(!e||0===e.length)return"";var n="slidezoom"===t;if("slidefull"===t){var o=e.map(function(t){return"string"==typeof t?{full:t,thumb:t}:t}),s=o[0],r=s.full,a=s.thumb,l='\n <div data-full="'.concat(r,'" class="active no-flip woo_like_thumb">\n <img src="" data-thumb="').concat(a,'" data-full="').concat(r,'" data-loadedf="0" class="no-flip" />\n </div>\n ');return o.slice(1).forEach(function(t){l+='\n <div data-full="'.concat(t.full,'" class="no-flip woo_like_thumb">\n <img src="" data-thumb="').concat(t.thumb,'" data-full="').concat(t.full,'" data-loadedf="0" class="no-flip woo_like_thumb" />\n </div>\n ')}),'\n <div class="woo_like_gallery" style="width:95%; padding:2%;">\n <div class="woo_like_main">\n <img class="woo_like_main-img"\n src=""\n data-full="'.concat(r,'"\n data-loadedf="0"\n alt="" />\n\n <button class="swiffle-flip-back">\n ').concat(this._iconFlip(),'\n </button>\n\n <button class="woo_like_zoom-btn no-flip" aria-label="Zoom">\n ').concat(this._iconZoom(),'\n </button>\n </div>\n\n <div class="woo_like_thumbs-wrapper" style="width:95%; padding:2%;">\n <div class="woo_like_thumbs no-flip">\n ').concat(l,'\n </div>\n </div>\n\n <div class="woo_like_lightbox woo_like_hidden">\n <button class="woo_like_close no-flip">✕</button>\n <button class="woo_like_prev no-flip">←</button>\n <button class="woo_like_next no-flip">→</button>\n <img class="woo_like_lightbox-img no-flip" src="" alt="Zoom" />\n </div>\n </div>\n ')}var c=e.map(function(t){var e=t.startsWith("%3C")?decodeURIComponent(t):t;if(e.startsWith("<video"))return'\n <div class="slide no-flip" style="display:flex;justify-content:center;align-items:center;background:black;">\n <button class="woo_like_zoom custom_fs no-flip" aria-label="Zoom">\n '.concat(i._iconZoom(),'\n </button>\n <span data-video="').concat(i.bx(e),'" data-loadedv="0"></span>\n <div class="playpause custom_fs no-flip"></div>\n </div>\n ');if(e.startsWith("<iframe"))return'\n <div class="slide no-flip" style="display:flex;justify-content:center;align-items:center;background:black;">\n <button class="woo_like_zoom custom_fs no-flip" aria-label="Zoom">\n '.concat(i._iconZoom(),'\n </button>\n <span data-frame="').concat(i.bx(e),'" data-loadedfr="0"></span>\n </div>\n ');var o=n?"swiffle-btn-zoom-g":"custom_fs",s=i.swiffle_isPhoneSize?'data-image="'.concat(e,'" data-loaded="0" style="background-size:cover;background-position:center;"'):'style="background-image:url('.concat(e,');background-size:cover;background-position:center;"');return'\n <div class="slide" '.concat(s,'>\n <button class="woo_like_zoom ').concat(o,' no-flip" aria-label="Zoom">\n ').concat(i._iconZoom(),"\n </button>\n </div>\n ")}).join("");return'\n <br>\n <div class="swiffle-slider" style="width:95%; padding:2%;">\n '.concat(c,"\n </div>\n ")}},{key:"getSwiffleTokenStorageKey",value:function(){var t="default";try{t=new URL(this.component_attributes.proxy).origin}catch(t){}return"swiffle_token_"+t}},{key:"_iconZoom",value:function(){return'\n <svg class="woo_like_zoom-icon no-flip" viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="no-flip"/>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="no-flip"/>\n </svg>\n '}},{key:"_iconFlip",value:function(){return'\n <svg class="woo_like_zoom-icon" width="22" height="22" viewBox="0 0 24 24"\n fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M3 12c0-4.5 3.5-8 8-8h2"></path>\n <path d="M21 12c0 4.5-3.5 8-8 8h-2"></path>\n <polyline points="11 4 13 4 13 6"></polyline>\n <polyline points="13 20 11 20 11 18"></polyline>\n </svg>\n '}},{key:"_message",value:function(t){var e=this;try{if("swiffle-refresh"===t.data.type&&this.render(),"swiffleUnauthorizedDomainNotice"===t.data.type){if(!this.isConnected)return;if(!this.isInEditor())return;this.swiffle_toast(this.swiffleTop._swiffle__('This domain is not yet on the source site\'s "URLs allowed to embed" list (Swiffle Grid settings). Add it there before publishing, or this block will show no data to visitors.'))}if("updateIsPhone"===t.data.type){if(t.data.senderId!==this.ID)return;var i=t.data.value?"mobile":"desktop";if(this._swiffleLastDevice===i)return;if(this._swiffleLastDevice=i,this._swiffleResetLock)return;if(clearTimeout(this._swiffleResetTimer),this.isInEditor())this._swiffleResetTimer=setTimeout(function(){e._swiffleResetLock=!0;var t=e.cloneNode(!1);e.replaceWith(t),setTimeout(function(){e._swiffleResetLock=!1},200)},150);else{var n=this.cloneNode(!1);this.replaceWith(n)}}else if(t.data.type&&t.data.data&&"swiffle"===t.data.type){var o=JSON.parse(this.bxd(t.data.data)),r=o.callback.split(","),a=this.shadow.querySelector("#swifflePool"+o.bridge);if(a&&a.remove(),2==r.length){var l=r[0];if(r[1]==this.ID){switch(this._bridgeProxy&&void 0!==this._bridgeProxy[o.bridge]&&(this._lastReplyByProxy||(this._lastReplyByProxy={}),this._lastReplyByProxy[this._bridgeProxy[o.bridge]]=Date.now()),l){case"get_intl":if(String(o.bridge)!==String(this._lastIntlBridge))break;this.swiffleTop.SWIFFLE_INTL=JSON.parse(this.bxd(o.intl)),this.swiffleTop.SWIFFLE_WOO_ON=!1,this._intlProxy=this._lastIntlRequestedForProxy,this._correctingIntl=!1;var c=this.swiffleTop.SWIFFLE_CLI_CS_DIR||window.SWIFFLE_CLI_CS_DIR,d=this.swiffleTop.SWIFFLE_AJAX_URL||window.SWIFFLE_AJAX_URL;this.ownerDocument.defaultView.top.postMessage({type:"updateData",value:"swiffle-translate-ready",componentPath:c?this.bxd(c):"",proxy:d?this.bxd(d).split("wp-admin")[0]:"",categories:o.wp_categories||[],woocategories:o.woo_categories||[],customConnectors:o.custom_connectors||[]},"*"),this.translate_ready=1;break;case"renderTop":this.renderCallback(o);break;case"loadMore":this.swiffle_callback_load_more(o);break;case"renderComments":this.renderComments(o);break;case"renderCommentsMass":o.massrevs.forEach(function(t){return e.renderComments(t)});break;case"newComment":this.newComment(o);break;case"swiffle_navigate":this.isInEditor()?this.swiffle_toast(this.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):this.swiffleNavigate(o.url,this.swiffleTop);break;case"swiffle_display_custom_form":var f=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.form.split("\x3c!--SWIFFLE_SCRIPT--\x3e"),2),h=f[0],u=f[1],p='\n <link rel="stylesheet" href="'.concat(this._swiffleCssBase,'vendor/pico.min.css" />\n <div>\n <form class="fltfrm">\n ').concat(h,'\n <div class="form_control">\n <div class="form_control_container" style="width:100%;">\n <div class="form_control_container">\n <div type="button" class="process_filter btn">\n ').concat(this.swiffleTop._swiffle__("Filter"),"\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n ");this.swiffle_open_modal(p,"","<h2>".concat(this.swiffleTop._swiffle__("Filter"),"</h2>"));var w=this.shadowRoot.querySelector(".fltfrm");if(!w)break;var m=w.querySelector(".process_filter");if(!m)break;if(this._filterModal=w,u){var v=document.createElement("script");v.textContent="\n (() => {\n const modal = document.querySelector('swiffle-grid').shadowRoot.querySelector('.fltfrm');\n ".concat(u,"\n })();\n "),this.shadowRoot.appendChild(v)}m.addEventListener("click",this._onFilterClick),this._listeners.push(function(){return m.removeEventListener("click",e._onFilterClick)});break;case"notify":if(String(o.bridge)===String(this._lastIntlBridge)&&(this._correctingIntl=!1,this._knownDeniedProxy=this._lastIntlRequestedForProxy),this._bridgeProxy&&this._bridgeProxy[o.bridge]!==this.component_attributes.proxy)break;o.alert&&(this.style.display="",this.swiffle_toast(this.swiffleTop._swiffle__(o.alert)))}if(o.swiffle_token){this.swiffleTop||(this.swiffleTop={}),this.swiffleTop.SWIFFLE_TOKENS||(this.swiffleTop.SWIFFLE_TOKENS={});var _=this.getSwiffleTokenStorageKey();this.swiffleTop.SWIFFLE_TOKENS[_]=o.swiffle_token;try{this.swiffleTop.localStorage.setItem(_,o.swiffle_token)}catch(t){}}}}this._bridgeProxy&&delete this._bridgeProxy[o.bridge],delete o.bridge,a&&a.remove()}}catch(t){}}},{key:"_resize_owner",value:function(t){var e=this.ownerDocument.defaultView.innerWidth||this.ownerDocument.documentElement.clientWidth;if(e!==this._swiffleLastWidth){var i;if(this._swiffleLastWidth=e,this.swiffleTop.vh=.01*this.swiffleTop.innerHeight,this.swiffleTop.document.documentElement.style.setProperty("--vh","".concat(this.swiffleTop.vh,"px")),i=this.ownerDocument.defaultView.matchMedia("(pointer: coarse)").matches?Math.min(this.ownerDocument.defaultView.screen.width,this.ownerDocument.defaultView.screen.height)<550:e<500,this.ownerDocument.documentElement.querySelectorAll('[name="editor-canvas"]').length>0){var n=this.ownerDocument.documentElement.querySelector('[name="editor-canvas"]'),o=null==n?void 0:n.contentWindow,s=null==o?void 0:o.document;i=((null==o?void 0:o.innerWidth)||(null==s?void 0:s.documentElement.clientWidth))<500}i!==this.swiffle_isPhoneSize&&(this.swiffle_isPhoneSize=i,(this.isInCrossOriginFrame()?window:this.ownerDocument.defaultView.top).postMessage({type:"updateIsPhone",value:this.swiffle_isPhoneSize,senderId:this.ID},"*"),this.scheduleRender())}}},{key:"_visibility",value:function(){}},{key:"_focusout",value:function(t){}},{key:"_change",value:function(t){}},{key:"_click_component",value:function(t){t.target}},{key:"_click",value:function(t){var e=this;if(t.target){var i=t.target;if("A"!=i.tagName&&"INPUT"!=t.target.tagName)if(!1!==this.pleasewait||null===this.findUpTag(i,"modal-body-header-titre-close")&&null===this.findUpTag(i,"overlay")||this.swiffle_close_modal(this.findUpTag(i,"modal")||this.findUpTag(i,"overlay")),this._click_component(t),this.findUpTag(i,"open-filter")){if(this.findUpTag(i,"open-filter").dataset.type)return void this.callswiffleapi({action:"build_custom_form",type:this.findUpTag(i,"open-filter").dataset.type,callback:"swiffle_display_custom_form,"+this.ID});var n='\n <link rel="stylesheet" href="'.concat(this._swiffleCssBase,'vendor/pico.min.css" />\n <div>\n <form class="fltfrm">\n <div class="form_control">\n <div class="form_control_container" style="width:100%;">\n <input name="FILTR_search" class="FILTR_search" type="search" id="search" name="search">\n </div>\n </div>\n ');n+='\n <div class="form_control">\n <div class="form_control_container" style="width:100%;">\n <div class="form_control_container">\n <div type="button" style="background: '.concat(this.component_attributes.cardBgColorButton,"; border-color: ").concat(this.component_attributes.cardBgColorButton,"; color: ").concat(this.component_attributes.cardFtColorButton,';" class="process_filter btn">').concat(this.swiffleTop._swiffle__("Filter"),"</div>\n </div>\n </div>\n </div>\n </form>\n </div>\n "),this.swiffle_open_modal(n,"","<h2>".concat(this.swiffleTop._swiffle__("Filter"),"</h2>"));var o=this.shadowRoot.querySelector(".fltfrm"),s=o.querySelector(".process_filter");s.addEventListener("click",function(){var t,i;e.filter=e.bx(JSON.stringify((t=o.querySelectorAll('[name^="FILTR_"]'),i={},t.forEach(function(t){var e=t.name.replace("FILTR_","");"checkbox"===t.type?t.checked&&(i[e]?i[e]+=",".concat(t.value):i[e]=t.value):i[e]=t.value}),i))),e.PG=0,e.getData(e.PG),setTimeout(function(){e.swiffle_close_modal(e.shadow.querySelector(".modal.open"))},100)})}else{var r=this.findUpTag(i,"svgtopb");if(null===r&&(r=this.findUpTag(i,"rdt")),null!==r&&i.dataset&&i.dataset.target){if(this._pageNavLoading)return;this._pageNavLoading=!0;var a=r.querySelectorAll(".spinner");return a.length>0&&(a[0].classList.contains("loading")||a[0].classList.add("loading")),this.PG=0,void this.getData(this.PG,callback="loadMore")}var l=this.findUpTag(i,"svgtopp");if(null===l&&(l=this.findUpTag(i,"rdl")),null!==l&&i.dataset&&i.dataset.target){if(this._pageNavLoading)return;this._pageNavLoading=!0;var c=l.querySelectorAll(".spinner");return c.length>0&&(c[0].classList.contains("loading")||c[0].classList.add("loading")),this.PG-=1,void this.getData(this.PG,callback="loadMore")}var d=this.findUpTag(i,"svgtop");if(null===d&&(d=this.findUpTag(i,"rdm")),null!==d&&i.dataset&&i.dataset.target){if(this._pageNavLoading)return;this._pageNavLoading=!0;var f=d.querySelectorAll(".spinner");return f.length>0&&(f[0].classList.contains("loading")||f[0].classList.add("loading")),this.PG+=1,void this.getData(this.PG,callback="loadMore")}if(!this.findUpTag(i,"swiffle-card-front"))if(null!==(d=this.findUpTag(i,"more-comment"))&&i.dataset&&i.dataset.carddata&&i.dataset.npg)this.callswiffleapi({action:"reviews",carddata:i.dataset.carddata,pg:i.dataset.npg,callback:"renderComments,"+this.ID});else if(null!==(d=this.findUpTag(i,"bcm"))&&i.dataset&&i.dataset.target&&i.dataset.id){var h=i.parentElement.querySelector('textarea[name=ucomment][data-id="'.concat(i.dataset.id,'"][data-target="').concat(i.dataset.target,'"]'));this.callswiffleapi({action:"newcomment",comment:h.value,target:h.dataset.target,id:h.dataset.id,nonce:h.dataset.nonce,callback:"newComment,"+this.ID})}else{if(i.classList&&(i.classList.contains("swiffle-btn-zoom")||i.classList.contains("swiffle-btn-zoom-g")||i.classList.contains("swiffle-bt-zoom"))||i.classList.contains("custom_fs")){var u=i.closest(".slide").style.backgroundImage.slice(4,-1).replace(/["']/g,"");if(i.classList.contains("custom")){var p=this.findUpTag(i,"custom_container");null!==p&&(u=p.querySelector("img").src)}if(i.classList.contains("custom_fs")){var w=i.closest(".slide"),m=w.querySelector("video");if(m)return void this.openVideoLightbox(m.src);var v=w.querySelector("iframe");if(v)return void this.openYouTubeLightbox(v.src);var _=document.createElement("div");_.classList.add("woo_like_lightbox"),_.innerHTML='\n <button class="woo_like_close no-flip" onclick="this.closest(\'.woo_like_lightbox\').remove()">✕</button>\n <img class="woo_like_lightbox-img no-flip" src="'.concat(u,'">\n '),this.shadow.prepend(_),_.classList.add("fulltop"),_.classList.remove("woo_like_hidden");var y=_.querySelector(".woo_like_close"),g=this._swiffle_editor_toolbar_offset();g&&(y.style.top=20+g+"px"),y.onclick=function(){_.remove()}}else this.swiffle_open_modal('\n <div style="display: flex;justify-content: center;align-items: center;height: 80vh;width: 100%;background-color: #f0f0f0;">\n <div class="zoom-container">\n <img id="zoomed-image" src="'.concat(u,'" alt="Zoom">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="zoom-drag-icon" >\n <g data-name="Layer 2"><g data-name="move"><rect width="24" height="24" transform="rotate(180 12 12)" opacity="0"></rect><path d="M21.71 11.31l-3-3a1 1 0 0 0-1.42 1.42L18.58 11H13V5.41l1.29 1.3A1 1 0 0 0 15 7a1 1 0 0 0 .71-.29 1 1 0 0 0 0-1.42l-3-3A1 1 0 0 0 12 2a1 1 0 0 0-.7.29l-3 3a1 1 0 0 0 1.41 1.42L11 5.42V11H5.41l1.3-1.29a1 1 0 0 0-1.42-1.42l-3 3A1 1 0 0 0 2 12a1 1 0 0 0 .29.71l3 3A1 1 0 0 0 6 16a1 1 0 0 0 .71-.29 1 1 0 0 0 0-1.42L5.42 13H11v5.59l-1.29-1.3a1 1 0 0 0-1.42 1.42l3 3A1 1 0 0 0 12 22a1 1 0 0 0 .7-.29l3-3a1 1 0 0 0-1.42-1.42L13 18.58V13h5.59l-1.3 1.29a1 1 0 0 0 0 1.42A1 1 0 0 0 18 16a1 1 0 0 0 .71-.29l3-3A1 1 0 0 0 22 12a1 1 0 0 0-.29-.69z"></path></g></g>\n </svg>\n\n </div>\n </div>\n '),"",""),this.swiffle_zoom_img()}if(null!==this.findUpTag(i,"circularMenu")&&this.findUpTag(i,"swiffle-circular-menu").classList.toggle("active"),!this.findUpTag(i,"no-flip")){if(this.findUpTag(i,"swiffle-card-back")){if(this.isFlipping)return;this.isFlipping=!0,setTimeout(function(){e.isFlipping=!1},500);var b=this.findUpTag(i,"swiffle-card-inner");b.querySelectorAll(".swiffle-spoiler-container").forEach(function(t){t.querySelector(".swiffle-spoiler-wrapper");var e=t.querySelector(".swiffle-spoiler-toggle"),i=t.querySelector(".swiffle-spoiler-label");e.checked=!1,e.style.display="",i.style.display=""});var k=b.querySelector(".swiffle-card-back");k&&!k.dataset.html64&&!1===this.isFlipping&&setTimeout(function(){k.dataset.html64=e.bx(k.innerHTML),k.innerHTML=""},500),b.classList.toggle("swiffle-card-flipped")}if(null!==this.findUpTag(i,"toSwipe")){this.swiffle_toSwipe(i,!0);var x=this.findUpTag(i,"toSwipe");null!==this.findUpTag(i,"swiffle-switch-nav")&&(x.style.display="none"),x.classList.contains("origin")?x.parentElement.querySelector(".swiffle-switch-nav.alt").style.display="block":x.classList.contains("alt")&&(x.parentElement.querySelector(".swiffle-switch-nav.origin").style.display="block")}if(null!==this.findUpTag(i,"toSwipeFull")){this.swiffle_toSwipe(i,!0,!0);var S=this.findUpTag(i,"toSwipeFull");null!==this.findUpTag(i,"swiffle-switch-nav")&&(S.style.display="none"),S.classList.contains("origin")?S.parentElement.querySelector(".swiffle-switch-nav.alt").style.display="block":S.classList.contains("alt")&&(S.parentElement.querySelector(".swiffle-switch-nav.origin").style.display="block")}if(null!==this.findUpTag(i,"toLine")){this.swiffle_toLine(i);var L=this.findUpTag(i,"toLine");null!==this.findUpTag(i,"swiffle-switch-nav")&&(L.style.display="none"),L.classList.contains("origin")?L.parentElement.querySelector(".swiffle-switch-nav.alt").style.display="block":L.classList.contains("alt")&&(L.parentElement.querySelector(".swiffle-switch-nav.origin").style.display="block")}if(null!==this.findUpTag(i,"toFluid")){this.swiffle_toFluid(i);var E=this.findUpTag(i,"toFluid");null!==this.findUpTag(i,"swiffle-switch-nav")&&(E.style.display="none"),E.classList.contains("origin")?E.parentElement.querySelector(".swiffle-switch-nav.alt").style.display="block":E.classList.contains("alt")&&(E.parentElement.querySelector(".swiffle-switch-nav.origin").style.display="block")}this.swiffle_sw_initEvt={}}}}}}},{key:"_keydown",value:function(t){if("Enter"===t.key){if(t.target.classList.contains("FILTR_search")){t.preventDefault(),t.stopPropagation();var e=this.findUpTag(t.target,"fltfrm");return void(null!==e&&e.querySelector(".process_filter").click())}if(t.target.name&&t.target.name.startsWith("FILTR_")){t.preventDefault(),t.stopPropagation();var i=this.findUpTag(t.target,"fltfrm");return void(null!==i&&i.querySelector(".process_filter").click())}}}},{key:"_searchfield_doc",value:function(t){var e,i=t.target;null!=i&&null!==(e=i.classList)&&void 0!==e&&e.contains("search-field")&&("keydown"===t.type&&"Enter"!==t.key||(t.preventDefault(),t.stopImmediatePropagation(),this.swiffleTop.document.querySelectorAll("swiffle-grid").forEach(function(t){!0===t.component_attributes.followpagefilter&&t.swiffleSetAttribute("filtertitle",i.value||"")})))}},{key:"_updateSizes",value:function(){var t=this.shadow.getElementById("zoomed-image");if(t){var e=Math.min(.6*window.innerHeight,.6*window.innerWidth);t.style.width="".concat(4*e,"px"),t.style.height="auto"}}},{key:"_movezoom",value:function(t){var e,i,n,o,s,r,a=this.shadow.querySelector(".zoom-container"),l=this.shadow.getElementById("zoomed-image"),c=this.shadow.querySelector(".zoom-drag-icon");if(a&&l){t.preventDefault(),c.style.display="none";var d="touchmove"===t.type?null!==(e=null===(i=t.touches[0])||void 0===i?void 0:i.clientX)&&void 0!==e?e:null===(n=t.changedTouches[0])||void 0===n?void 0:n.clientX:t.clientX,f="touchmove"===t.type?null!==(o=null===(s=t.touches[0])||void 0===s?void 0:s.clientY)&&void 0!==o?o:null===(r=t.changedTouches[0])||void 0===r?void 0:r.clientY:t.clientY,h=a.getBoundingClientRect(),u=d-h.left,p=f-h.top,w=Math.max(0,Math.min(1,u/h.width)),m=Math.max(0,Math.min(1,p/h.height)),v=-(l.clientWidth-h.width),_=-(l.clientHeight-h.height);l.style.transform="translate(".concat(w*v,"px, ").concat(m*_,"px)")}}},{key:"_zoomMouseLeave",value:function(){var t=this.shadow.getElementById("zoomed-image");t&&setTimeout(function(){t.style.transform="translate(-30%, -30%)"},200)}},{key:"_getFiltersFromModal",value:function(){var t=this._filterModal;if(!t)return{};var e=t.querySelectorAll('[name^="FILTR_"]'),i={};return e.forEach(function(t){var e=t.name.replace("FILTR_","");"checkbox"===t.type?t.checked&&(i[e]?i[e]+=",".concat(t.value):i[e]=t.value):i[e]=t.value}),i}},{key:"_onFilterClick",value:function(t){var e=this;if(this._filterModal){var i=this._getFiltersFromModal();this.filter=this.bx(JSON.stringify(i)),this.PG=0,this.getData(this.PG),setTimeout(function(){var t=e.shadow.querySelector(".modal.open");t&&e.swiffle_close_modal(t),e._filterModal=null},100)}}}],w=[{key:"observedAttributes",get:function(){return["datak","datablock","dataf","extra_search","extra_sort","extra_cats","extra_min","extra_max"]}}],u&&a(l.prototype,u),w&&a(l,w),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,u,w}(l(HTMLElement));customElements.get("swiffle-grid")||customElements.define("swiffle-grid",w),window.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".swiffle-blockBody").forEach(function(t){var e=t.getAttribute("data-datak");e&&(t.querySelector("swiffle-grid")||(t.innerHTML='<swiffle-grid datak="'.concat(e,'"></swiffle-grid>')))})})})();2 (()=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){var t,n,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",r=o.toStringTag||"@@toStringTag";function a(e,o,s,r){var a=o&&o.prototype instanceof c?o:c,d=Object.create(a.prototype);return i(d,"_invoke",function(e,i,o){var s,r,a,c=0,d=o||[],f=!1,h={p:0,n:0,v:t,a:u,f:u.bind(t,4),d:function(e,i){return s=e,r=0,a=t,h.n=i,l}};function u(e,i){for(r=e,a=i,n=0;!f&&c&&!o&&n<d.length;n++){var o,s=d[n],u=h.p,p=s[2];e>3?(o=p===i)&&(a=s[(r=s[4])?5:(r=3,3)],s[4]=s[5]=t):s[0]<=u&&((o=e<2&&u<s[1])?(r=0,h.v=i,h.n=s[1]):u<p&&(o=e<3||s[0]>i||i>p)&&(s[4]=e,s[5]=i,h.n=p,r=0))}if(o||e>1)return l;throw f=!0,i}return function(o,d,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===d&&u(d,p),r=d,a=p;(n=r<2?t:a)||!f;){s||(r?r<3?(r>1&&(h.n=-1),u(r,a)):h.n=a:h.v=a);try{if(c=2,s){if(r||(o="next"),n=s[o]){if(!(n=n.call(s,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,r<2&&(r=0)}else 1===r&&(n=s.return)&&n.call(s),r<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),r=1);s=t}else if((n=(f=h.n<0)?a:e.call(i,h))!==l)break}catch(e){s=t,r=1,a=e}finally{c=1}}return{value:n,done:f}}}(e,s,r),!0),d}var l={};function c(){}function d(){}function f(){}n=Object.getPrototypeOf;var h=[][s]?n(n([][s]())):(i(n={},s,function(){return this}),n),u=f.prototype=c.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,i(t,r,"GeneratorFunction")),t.prototype=Object.create(u),t}return d.prototype=f,i(u,"constructor",f),i(f,"constructor",d),d.displayName="GeneratorFunction",i(f,r,"GeneratorFunction"),i(u),i(u,r,"Generator"),i(u,s,function(){return this}),i(u,"toString",function(){return"[object Generator]"}),(e=function(){return{w:a,m:p}})()}function i(t,e,n,o){var s=Object.defineProperty;try{s({},"",{})}catch(t){s=0}i=function(t,e,n,o){function r(e,n){i(t,e,function(t){return this._invoke(e,n,t)})}e?s?s(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(r("next",0),r("throw",1),r("return",2))},i(t,e,n,o)}function n(t,e,i,n,o,s,r){try{var a=t[s](r),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(n,o)}function o(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return r(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function l(t){var e="function"==typeof Map?new Map:void 0;return l=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return function(t,e,i){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return i&&d(o,i.prototype),o}(t,arguments,f(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),d(i,t)},l(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e,i){return(e=u(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function u(e){var i=function(e){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(i)?i:i+""}var p=function(){if(document.currentScript&&document.currentScript.src)return document.currentScript.src;var t=document.querySelector('script[src*="swifflegrid.js"]');return t?t.src:null}(),w=function(i){function r(){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),h(e=function(e,i,n){return i=f(i),function(e,i){if(i&&("object"==t(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(e,c()?Reflect.construct(i,n||[],f(e).constructor):i.apply(e,n))}(this,r),"_touchstartHandle",function(t){if(t.target&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName&&!t.target.classList.contains("woo_like_thumbs")&&!t.target.classList.contains("woo_like_thumb")&&!t.target.classList.contains("woo_like_main")&&!e.findUpTag(t.target,"swiffle-card-back")&&e.findUpTag(t.target,"swiffle-card")){var i=e.findUpTag(t.target,"swiffle-card");if(i){var n="touchstart"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX,o="touchstart"===t.type?t.touches[0]?t.touches[0].clientY:t.changedTouches[0].clientY:t.clientY;e.swiffle_sw_initEvt.top=0,e.swiffle_sw_initEvt.left=0,e.swiffle_sw_initEvt.swiffle_card=i,e.swiffle_sw_initEvt.currentX=n,e.swiffle_sw_initEvt.currentY=o}}}),h(e,"_touchmoveHandle",function(t){if(t.target&&e.swiffle_sw_initEvt.swiffle_card&&!("A"==t.target.tagName||"INPUT"==t.target.tagName||t.target.id&&"zoomed-image"==t.target.id)&&e.swiffle_sw_initEvt.swiffle_card.classList.contains("swipable")){var i="touchmove"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX,n="touchmove"===t.type?t.touches[0]?t.touches[0].clientY:t.changedTouches[0].clientY:t.clientY,o=i-e.swiffle_sw_initEvt.currentX;if(0===e.currentIndex&&o>0){var s=e.swiffle_sw_initEvt.swiffle_card;return s.style.transition="transform 80ms ease",s.style.transform="scale(0.97)",setTimeout(function(){s.style.transform="scale(1)"},80),void(e.swiffle_sw_initEvt.blockSwipe=!0)}if(e.currentIndex===e.cards.length-1&&o<0){var r=e.swiffle_sw_initEvt.swiffle_card;return r.style.transition="transform 80ms ease",r.style.transform="scale(0.97)",setTimeout(function(){r.style.transform="scale(1)"},80),void(e.swiffle_sw_initEvt.blockSwipe=!0)}if(o>0&&e.currentIndex>0&&e.ghostCard&&!e.swiffle_sw_initEvt.ghostPrepared){var a=e.currentIndex+1,l=e.cards[a];l&&(l.style.visibility="hidden");var c=e.currentIndex-1,d=e.cards[c];if(d){var f=document.createElement("div");f.innerHTML=d.innerHTML,f.querySelector(".swiffle-card-back")&&f.querySelector(".swiffle-card-back").remove(),e.ghostCard.innerHTML=f.innerHTML,f.remove(),e.ghostCard.style.visibility="visible",e.ghostCard.style.transform="translate3d(0,0,0)",e.ghostCard.style.zIndex=1,e.swiffle_sw_initEvt.ghostPrepared=!0}}if(o<0&&e.swiffle_sw_initEvt.ghostPrepared){e.ghostCard&&(e.ghostCard.style.visibility="hidden",e.ghostCard.style.transform="translate3d(0,200vh,0)");var h=e.currentIndex+1,u=e.cards[h];u&&(u.style.visibility="visible"),e.swiffle_sw_initEvt.ghostPrepared=!1}if(e.swiffle_sw_initEvt.swiffle_card.style.marginTop=e.swiffle_sw_initEvt.top-(e.swiffle_sw_initEvt.currentY-n)+"px",e.swiffle_sw_initEvt.swiffle_card.style.marginLeft=e.swiffle_sw_initEvt.left-(e.swiffle_sw_initEvt.currentX-i)+"px",e.swiffle_sw_initEvt.swiffle_card.style.transform="rotate("+-.3*parseInt(e.swiffle_sw_initEvt.currentX-i)+"deg)",e.swiffle_sw_initEvt.currentX-i>200)return void e.swiffle_onSwipeSuccess("forward");if(i-e.swiffle_sw_initEvt.currentX>200)return void e.swiffle_onSwipeCancel()}}),h(e,"_touchendHandle",function(t){if(t.target&&e.swiffle_sw_initEvt.swiffle_card&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName)if(e.swiffle_sw_initEvt.blockSwipe)e.swiffle_sw_initEvt={};else{var i="touchend"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX;if(Math.abs(e.swiffle_sw_initEvt.currentX-i)<2){if(t.target.classList.contains("no-flip"))return void(e.swiffle_sw_initEvt={});var n=e.findUpTag(t.target,"swiffle-card-inner");if(n){if(n.dataset&&n.dataset.action&&"none"===n.dataset.action)return void(e.swiffle_sw_initEvt={});if(n.classList.contains("doModal")){var o=n.dataset.action.split("/")[1],s=n.querySelector(".swiffle-card-back");s&&s.dataset.html64&&(s.innerHTML=e.bxd(s.dataset.html64),delete s.dataset.html64,e.swiffle_apply_gallery_transform(s)),e.pleasewait=!0,setTimeout(function(){e.pleasewait=!1},1e3),e.swiffle_open_modal(s.innerHTML,"side","",o);try{s.querySelectorAll('input[data-item][data-var="0"]').forEach(function(t){e.shadow.querySelector('.modal.side.open input[data-item="'.concat(t.dataset.item,'"][data-var="0"]')).value=t.value}),e.shadow.querySelector(".modal.side.open").querySelectorAll(".swiffle-spoiler-container").forEach(function(t){var e=t.querySelector(".swiffle-spoiler-wrapper"),i=t.querySelector(".swiffle-spoiler-toggle"),n=t.querySelector(".swiffle-spoiler-label");e.scrollHeight<=e.clientHeight&&(i.style.display="none",n.style.display="none")});var r=e.shadow.querySelector(".modal.side.open");setTimeout(function(){r.querySelectorAll('[data-loaded="0"]').forEach(function(t){var e=t.dataset.image,i=new Image;i.src=e,i.onload=function(){t.style.backgroundImage='url("'.concat(e,'")'),t.dataset.loaded="1"}}),r.querySelectorAll('[data-loadedf="0"]').forEach(function(t){var e=t.dataset.full,i=new Image;i.src=e,i.onload=function(){t.src=e,t.dataset.loadedf="1"}}),r.querySelectorAll('[data-loadedfr="0"]').forEach(function(t){var i=t.dataset.frame;t.innerHTML=e.bxd(i),t.dataset.loaded="1"}),r.querySelectorAll('[data-loadedv="0"]').forEach(function(t){var i=t.dataset.video;t.outerHTML=e.bxd(i),t.dataset.loaded="1"}),r.querySelectorAll('[data-loadedmap="0"]').forEach(function(t){var i=t.dataset.map;t.outerHTML=e.bxd(i)})},10)}catch(t){console.error("Swiffle: error while finalizing the modal, forced close to avoid a global deadlock.",t),e.swiffle_close_all_modals(),document.body.classList.remove("swiffle-no-scroll")}return e.swiffle_sw_initEvt={},void e.swiffle_gallery_init(e.shadow.querySelector(".modal.side.open"))}if(n.dataset&&n.dataset.action&&n.dataset.nav){if("navigate"==n.dataset.action)return void(e.isInEditor()?e.swiffle_toast(e.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):e.swiffleNavigate(n.dataset.nav,window));if("navigatenew"==n.dataset.action)return void(e.isInEditor()?e.swiffle_toast(e.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):window.open(n.dataset.nav,"_blank").focus())}if(!n.classList.contains("doModal")){if(e.isFlipping)return;e.isFlipping=!0,setTimeout(function(){e.isFlipping=!1},500);var a=n.querySelector(".swiffle-card-back");a&&a.dataset.html64&&(a.innerHTML=e.bxd(a.dataset.html64),delete a.dataset.html64,e.swiffle_apply_gallery_transform(a)),n.classList.toggle("swiffle-card-flipped"),setTimeout(function(){n.querySelectorAll(".swiffle-spoiler-container").forEach(function(t){var e=t.querySelector(".swiffle-spoiler-wrapper"),i=t.querySelector(".swiffle-spoiler-toggle"),n=t.querySelector(".swiffle-spoiler-label");e.scrollHeight<=e.clientHeight&&(i.style.display="none",n.style.display="none")}),n.querySelectorAll('[data-loaded="0"]').forEach(function(t){var e=t.dataset.image,i=new Image;i.src=e,i.onload=function(){t.style.backgroundImage='url("'.concat(e,'")'),t.dataset.loaded="1"}}),n.querySelectorAll('[data-loadedf="0"]').forEach(function(t){var e=t.dataset.full,i=new Image;i.src=e,i.onload=function(){t.src=e,t.dataset.loadedf="1"}}),n.querySelectorAll('[data-loadedfr="0"]').forEach(function(t){var i=t.dataset.frame;t.innerHTML=e.bxd(i),t.dataset.loaded="1"}),n.querySelectorAll('[data-loadedv="0"]').forEach(function(t){var i=t.dataset.video;t.outerHTML=e.bxd(i),t.dataset.loaded="1"}),n.querySelectorAll('[data-loadedmap="0"]').forEach(function(t){var i=t.dataset.map;t.outerHTML=e.bxd(i)})},300),e.swiffle_gallery_init(n.querySelector(".swiffle-card-back"))}}e.swiffle_sw_initEvt={}}else{if(e.swiffle_swipeEnding)return void(e.swiffle_sw_initEvt={});if(e.swiffle_sw_initEvt.swiffle_card.classList.contains("swipable")){var l=e.swiffle_sw_initEvt.currentX-i;l>60?e.swiffle_onSwipeSuccess("forward"):l<-40?e.swiffle_onSwipeSuccess("backward"):(e.swiffle_sw_initEvt.swiffle_card.style.marginLeft="0",e.swiffle_sw_initEvt.swiffle_card.style.marginTop="0",e.swiffle_onSwipeCancel())}}e.swiffle_sw_initEvt={}}}),h(e,"_mousedownHandle",function(t){if(t.target&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName&&!e.findUpTag(t.target,"swiffle-card-back")&&e.findUpTag(t.target,"swiffle-card")){var i=e.findUpTag(t.target,"swiffle-card");if(i&&e.activeLayout&&e.activeLayout.startsWith("swipe")&&e.isInEditor()&&t.stopPropagation(),i){var n="touchstart"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX;"touchstart"===t.type?t.touches[0]?t.touches[0].clientY:t.changedTouches[0].clientY:t.clientY,e.swiffle_sw_initEvt.firstRealMove=void 0,e.swiffle_sw_initEvt.top=0,e.swiffle_sw_initEvt.left=0,e.swiffle_sw_initEvt.swiffle_card=i,e.swiffle_sw_initEvt.currentX=n,e.swiffle_sw_initEvt.currentY=t.clientY,e.swiffle_sw_initEvt.top=parseInt(e.swiffle_sw_initEvt.swiffle_card.style.marginTop||"0"),e.swiffle_sw_initEvt.left=e.swiffle_sw_initEvt.swiffle_card.offsetLeft}}}),h(e,"_mousemoveHandle",function(t){if(t.target&&e.swiffle_sw_initEvt&&e.swiffle_sw_initEvt.swiffle_card&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName&&e.swiffle_sw_initEvt.swiffle_card.classList.contains("swipable")){var i="touchmove"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX,n="touchmove"===t.type?t.touches[0]?t.touches[0].clientY:t.changedTouches[0].clientY:t.clientY,o=i-e.swiffle_sw_initEvt.currentX;if(0===e.currentIndex&&o>0){var s=e.swiffle_sw_initEvt.swiffle_card;return s.style.transition="transform 80ms ease",s.style.transform="scale(0.97)",setTimeout(function(){s.style.transform="scale(1)"},80),void(e.swiffle_sw_initEvt.blockSwipe=!0)}if(e.currentIndex===e.cards.length-1&&o<0){var r=e.swiffle_sw_initEvt.swiffle_card;return r.style.transition="transform 80ms ease",r.style.transform="scale(0.97)",setTimeout(function(){r.style.transform="scale(1)"},80),void(e.swiffle_sw_initEvt.blockSwipe=!0)}if(void 0===e.swiffle_sw_initEvt.firstRealMove&&(e.swiffle_sw_initEvt.firstRealMove=!0),e.swiffle_sw_initEvt.swiffle_card.style.marginTop=e.swiffle_sw_initEvt.top-(e.swiffle_sw_initEvt.currentY-n)+"px",e.swiffle_sw_initEvt.swiffle_card.style.marginLeft=e.swiffle_sw_initEvt.left-(e.swiffle_sw_initEvt.currentX-i)+"px",e.swiffle_sw_initEvt.swiffle_card.style.transform="rotate("+-.3*parseInt(e.swiffle_sw_initEvt.currentX-i)+"deg)",e.swiffle_sw_initEvt.currentX-i>200)return void e.swiffle_onSwipeSuccess("forward");if(i-e.swiffle_sw_initEvt.currentX>200)return void e.swiffle_onSwipeCancel();if(o>0&&e.currentIndex>0&&e.ghostCard&&!e.swiffle_sw_initEvt.ghostPrepared){var a=e.currentIndex+1,l=e.cards[a];l&&(l.style.visibility="hidden");var c=e.currentIndex-1,d=e.cards[c];if(d){var f=document.createElement("div");f.innerHTML=d.innerHTML,f.querySelector(".swiffle-card-back")&&f.querySelector(".swiffle-card-back").remove(),e.ghostCard.innerHTML=f.innerHTML,f.remove(),e.ghostCard.style.visibility="visible",e.ghostCard.style.transform="translate3d(0,0,0)",e.ghostCard.style.zIndex=1,e.swiffle_sw_initEvt.ghostPrepared=!0}}if(o<0&&e.swiffle_sw_initEvt.ghostPrepared){e.ghostCard&&(e.ghostCard.style.visibility="hidden",e.ghostCard.style.transform="translate3d(0,200vh,0)");var h=e.currentIndex+1,u=e.cards[h];u&&(u.style.visibility="visible"),e.swiffle_sw_initEvt.ghostPrepared=!1}}}),h(e,"_mouseupHandle",function(t){if("touchend"===t.type)return t.preventDefault(),void t.stopImmediatePropagation();if(t.target&&e.swiffle_sw_initEvt&&e.swiffle_sw_initEvt.swiffle_card&&"A"!=t.target.tagName&&"INPUT"!=t.target.tagName)if(e.swiffle_sw_initEvt.blockSwipe)e.swiffle_sw_initEvt={};else{var i="touchend"===t.type?t.touches[0]?t.touches[0].clientX:t.changedTouches[0].clientX:t.clientX;if(Math.abs(e.swiffle_sw_initEvt.currentX-i)<2){if(t.target.classList.contains("no-flip"))return void(e.swiffle_sw_initEvt={});var n=e.findUpTag(t.target,"swiffle-card-inner");if(n){if(n.dataset&&n.dataset.action&&"none"===n.dataset.action)return void(e.swiffle_sw_initEvt={});if(n.classList.contains("doModal")){var o=n.dataset.action.split("/")[1],s=n.querySelector(".swiffle-card-back");s&&s.dataset.html64&&(s.innerHTML=e.bxd(s.dataset.html64),delete s.dataset.html64,e.swiffle_apply_gallery_transform(s)),e.swiffle_open_modal(s.innerHTML,"side","",o),e.pleasewait=!0,setTimeout(function(){e.pleasewait=!1},1e3);try{s.querySelectorAll('input[data-item][data-var="0"]').forEach(function(t){e.shadow.querySelector('.modal.side.open input[data-item="'.concat(t.dataset.item,'"][data-var="0"]')).value=t.value}),e.shadow.querySelector(".modal.side.open").querySelectorAll(".swiffle-spoiler-container").forEach(function(t){var e=t.querySelector(".swiffle-spoiler-wrapper"),i=t.querySelector(".swiffle-spoiler-toggle"),n=t.querySelector(".swiffle-spoiler-label");e.scrollHeight<=e.clientHeight&&(i.style.display="none",n.style.display="none")});var r=e.shadow.querySelector(".modal.side.open");setTimeout(function(){r.querySelectorAll('[data-loaded="0"]').forEach(function(t){var e=t.dataset.image,i=new Image;i.src=e,i.onload=function(){t.style.backgroundImage='url("'.concat(e,'")'),t.dataset.loaded="1"}}),r.querySelectorAll('[data-loadedf="0"]').forEach(function(t){var e=t.dataset.full,i=new Image;i.src=e,i.onload=function(){t.src=e,t.dataset.loadedf="1"}}),r.querySelectorAll('[data-loadedfr="0"]').forEach(function(t){var i=t.dataset.frame;t.innerHTML=e.bxd(i),t.dataset.loaded="1"}),r.querySelectorAll('[data-loadedv="0"]').forEach(function(t){var i=t.dataset.video;t.outerHTML=e.bxd(i),t.dataset.loaded="1"}),r.querySelectorAll('[data-loadedmap="0"]').forEach(function(t){var i=t.dataset.map;t.outerHTML=e.bxd(i)})},10)}catch(t){console.error("Swiffle: error while finalizing the modal, forced close to avoid a global deadlock.",t),e.swiffle_close_all_modals(),document.body.classList.remove("swiffle-no-scroll")}return e.swiffle_sw_initEvt={},void e.swiffle_gallery_init(e.shadow.querySelector(".modal.side.open"))}if(n.dataset&&n.dataset.action&&n.dataset.nav){if("navigate"==n.dataset.action)return void(e.isInEditor()?e.swiffle_toast(e.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):e.swiffleNavigate(n.dataset.nav,window));if("navigatenew"==n.dataset.action)return void(e.isInEditor()?e.swiffle_toast(e.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):window.open(n.dataset.nav,"_blank").focus())}if(!n.classList.contains("doModal")){if(e.isFlipping)return;e.isFlipping=!0,setTimeout(function(){e.isFlipping=!1},500);var a=n.querySelector(".swiffle-card-back");a&&a.dataset.html64&&(a.innerHTML=e.bxd(a.dataset.html64),delete a.dataset.html64,e.swiffle_apply_gallery_transform(a)),n.classList.toggle("swiffle-card-flipped"),setTimeout(function(){n.querySelectorAll(".swiffle-spoiler-container").forEach(function(t){var e=t.querySelector(".swiffle-spoiler-wrapper"),i=t.querySelector(".swiffle-spoiler-toggle"),n=t.querySelector(".swiffle-spoiler-label");e.scrollHeight<=e.clientHeight&&(i.style.display="none",n.style.display="none")}),n.querySelectorAll('[data-loaded="0"]').forEach(function(t){var e=t.dataset.image,i=new Image;i.src=e,i.onload=function(){t.style.backgroundImage='url("'.concat(e,'")'),t.dataset.loaded="1"}}),n.querySelectorAll('[data-loadedf="0"]').forEach(function(t){var e=t.dataset.full,i=new Image;i.src=e,i.onload=function(){t.src=e,t.dataset.loadedf="1"}}),n.querySelectorAll('[data-loadedfr="0"]').forEach(function(t){var i=t.dataset.frame;t.innerHTML=e.bxd(i),t.dataset.loaded="1"}),n.querySelectorAll('[data-loadedv="0"]').forEach(function(t){var i=t.dataset.video;t.outerHTML=e.bxd(i),t.dataset.loaded="1"}),n.querySelectorAll('[data-loadedmap="0"]').forEach(function(t){var i=t.dataset.map;t.outerHTML=e.bxd(i)})},300),e.swiffle_gallery_init(n.querySelector(".swiffle-card-back"))}}e.swiffle_sw_initEvt={}}else if(e.swiffle_sw_initEvt.swiffle_card.classList.contains("swipable")){var l=e.swiffle_sw_initEvt.currentX-i;l>60?e.swiffle_onSwipeSuccess("forward"):l<-40?e.swiffle_onSwipeSuccess("backward"):(e.swiffle_sw_initEvt.swiffle_card.style.marginLeft="0",e.swiffle_sw_initEvt.swiffle_card.style.marginTop="0",e.swiffle_onSwipeCancel())}e.swiffle_sw_initEvt={}}}),e.ID="Fe"+btoa(Date.now().toString()+Math.random().toString(36).substring(2,8)).replace(/=/g,""),e.shadow=e.attachShadow({mode:"open"}),e.style.display="none",e._isWP="undefined"!=typeof wp&&void 0!==wp.hooks,e.translate_ready=0,e.filter="e30=",e.retried=0,e.isFlipping=!1,e.param_css=document.createElement("style"),e.docHTML=document.createElement("div"),e.shadow.appendChild(e.param_css),e.shadow.appendChild(e.docHTML),e.cssLoaded=!1,e._isSafariIOS=/iP(ad|hone|od)/.test(navigator.userAgent)&&"Apple Computer, Inc."===navigator.vendor&&!/CriOS/.test(navigator.userAgent)&&!/FxiOS/.test(navigator.userAgent),e.isTouchDevice=window.matchMedia("(pointer: coarse)").matches,e.swiffle_isIOSDangerous=e.isTouchDevice;var i=e.ownerDocument?e.ownerDocument.defaultView.innerWidth||e.ownerDocument.documentElement.clientWidth:window.innerWidth||document.documentElement.clientWidth;return e.swiffle_isPhoneSize=e.isTouchDevice?i<900:i<500,e._swiffleBootTime=Date.now(),e._swiffleLastWidth=window.innerWidth||document.documentElement.clientWidth,e.currentIndex=0,e.cards=[],e.swiffle_refreshCards=function(){var t=e.shadowRoot.querySelector(".swiffle-card-container");t&&(e.cards=o(t.querySelectorAll(".swiffle-card")).filter(function(t){return!t.classList.contains("swiffle-card-ghost")&&!!t.querySelector(".swiffle-card-front")&&"none"!==t.style.display}))},e.isInEditor=function(){var t=document.body.classList.contains("elementor-editor-active"),e="editor-canvas"===window.name,i=document.body.classList.contains("block-editor-page");return t||e||i},e.component_attributes={},e.PG=0,e.MAP=0,e.have_more=!1,e.activeLayout="fluid",e.memoScroll=null,e.pleasewait=!1,e.setAllParams(),e._pendingApiCalls=[],e._msgHooked=!1,e._onFilterClick=e._onFilterClick.bind(e),e._listeners=[],e._cleanupDone=!1,e._listeners_zoom=[],e._movezoom=e._movezoom.bind(e),e._updateSizes=e._updateSizes.bind(e),e._zoomMouseLeave=e._zoomMouseLeave.bind(e),e.swiffleTop=e.getSwiffleGlobalWindow(),e._msgHooked||(e._msgHooked=!0,e._message=e._message.bind(e),e.swiffleTop.addEventListener("message",e._message),e._listeners.push(function(){return e.swiffleTop.removeEventListener("message",e._message)}),e.swiffleTop!==window&&"null"===window.location.origin&&(window.addEventListener("message",e._message),e._listeners.push(function(){return window.removeEventListener("message",e._message)}))),e.loadSwiffleCss(),e.renderScheduled=!1,e.isRemote=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i="";try{var n=new URL(top.location.href);i=n.origin+n.pathname}catch(t){var o=new URL(window.location.href);i=o.origin+o.pathname}if(t){var s=e.swiffleTop._swiffle__("sx_internal"),r=Array.isArray(s)?s:s?[s]:[],a=function(t){return String(t).replace(/\/+$/,"")},l=r.some(function(t){return function(t,e){if(a(t)===a(e))return!0;if(-1===String(t).indexOf("*"))return!1;try{var i=new URL(String(t).replace("*","swiffle-star")),n=new URL(e),o=i.hostname.slice(12);if(!i.hostname.startsWith("swiffle-star")||!/^[-.]/.test(o)||(o.match(/\./g)||[]).length<2)return!1;var s=n.hostname.slice(0,n.hostname.length-o.length);return i.protocol===n.protocol&&n.hostname.endsWith(o)&&/^[a-z0-9-]+$/.test(s)&&i.port===n.port&&a(i.pathname+i.search)===a(n.pathname+n.search)}catch(t){return!1}}(t,i)});if(!l&&e.isInEditor())try{var c=new URL(i).host;l=r.some(function(t){try{return new URL(t).host===c}catch(t){return!1}})}catch(t){}if(!i.startsWith(e.component_attributes.proxy)&&!l)return i}else if(!i.startsWith(e.component_attributes.proxy))return e.component_attributes.proxy;return null},e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(r,i),l=r,u=[{key:"disconnectedCallback",value:function(){this.swiffleTop&&this.cleanup()}},{key:"cleanup",value:function(){this._cleanupDone||(this._cleanupDone=!0,this._listeners.forEach(function(t){return t()}),this._listeners=[],this.shadow.querySelectorAll(".woo_like_gallery_root").forEach(function(t){t._galleryListeners&&(t._galleryListeners.forEach(function(t){return t()}),t._galleryListeners=[])}))}},{key:"swiffleSetAttribute",value:function(t,e){var i=JSON.parse(this.bxd(this.getAttribute("datak")));i[t]=e,this.setAttribute("datak",this.bx(JSON.stringify(i)))}},{key:"setAllParams",value:function(){var t=this;if(this.swiffle_isPhoneSize=Math.max(this.ownerDocument.documentElement.clientWidth,this.ownerDocument.defaultView.innerWidth||0)<500,this.ownerDocument.documentElement.querySelectorAll('[name="editor-canvas"]').length>0){var e=this.ownerDocument.documentElement.querySelector('[name="editor-canvas"]'),i=null==e?void 0:e.contentWindow,n=null==i?void 0:i.document,o=(null==i?void 0:i.innerWidth)||(null==n?void 0:n.documentElement.clientWidth);this.swiffle_isPhoneSize=o<500}this.activeLayout="fluid",this.swiffle_sw_initEvt={},this.memoScroll=null;var s=this.getAttribute("datak");if(s){try{var r=JSON.parse(this.bxd(s));if(!r)return;this.component_attributes.cardFlowTitleShow=r.cardflowtitleshow||!0,this.component_attributes.cardTitleOverPicture=r.cardtitleoverpicture||!0,this.component_attributes.cardTitleOverPictureP=r.cardtitleoverpicturep||!0,this.component_attributes.cardTitleFontSize=r.cardtitlefontsize||"16px",this.component_attributes.cardTitleFontSizeP=r.cardtitlefontsizep||"16px",this.component_attributes.cardFlowTitle=r.cardflowtitle||"",this.component_attributes.cardNavUrl=r.cardnavurl||"#",this.component_attributes.cardDirection=r.carddirection||"column",this.component_attributes.cardDirectionP=r.carddirectionp||"column",this.component_attributes.cardClick=r.cardclick||"modal/80",this.component_attributes.cardClickP=r.cardclickp||"flip",this.component_attributes.cardAbstractShow=r.cardabstractshow||!0,this.component_attributes.cardAbstractShowP=r.cardabstractshowp||!0,this.component_attributes.blockDefLayout=r.blockdeflayout||"row",this.component_attributes.blockDefLayoutP=r.blockdeflayoutp||"row",this.component_attributes.blockShowLayout=r.blockshowlayout||"wrap",this.component_attributes.blockShowLayoutP=r.blockshowlayoutp||"swipefull",this.component_attributes.blockcardsperpg=r.blockcardsperpg||"20",this.component_attributes.blockcardsperpgp=r.blockcardsperpgp||"20",this.component_attributes.blockLang=r.blocklang||"",this.component_attributes.cardNavShow=r.cardnavshow||!0,this.component_attributes.cardIconShow=r.cardiconshow||!0,this.component_attributes.cardIconShowP=r.cardiconshowp||!0,this.component_attributes.cardContentOnly=r.cardcontentonly||!1,this.component_attributes.blockShowComments=void 0===r.blockshowcomments||!0===r.blockshowcomments||"true"===r.blockshowcomments,this.component_attributes.postsCategory=r.postscategory||"",this.component_attributes.postsUrl=r.postsurl||"https://.../...",this.component_attributes.postsSource=r.postssource||"category",this.component_attributes.cardHeight=r.cardheight||"400px",this.component_attributes.cardWidth=r.cardwidth||"300px",this.component_attributes.cardWidthMax=r.cardwidthmax||"95vw",this.component_attributes.cardGap=r.cardgap||"10px",this.component_attributes.cardHeightP=r.cardheightp||"400px",this.component_attributes.cardWidthP=r.cardwidthp||"300px",this.component_attributes.cardWidthMaxP=r.cardwidthmaxp||"95vw",this.component_attributes.cardGapP=r.cardgapp||"10px",this.component_attributes.cardSingleStyle=r.cardsinglestyle||"swiffle",this.component_attributes.cardgallery=r.cardgallery||"slide",this.component_attributes.cardBgColor=r.cardbgcolor||"#ffffff",this.component_attributes.cardFtColor=r.cardftcolor||"#111111",this.component_attributes.cardBgColorTitle=r.cardbgcolortitle||"#47bcd4",this.component_attributes.cardFtColorTitle=r.cardftcolortitle||"#ffffff",this.component_attributes.cardBgColorButton=r.cardbgcolorbutton||"#9555af",this.component_attributes.cardFtColorButton=r.cardftcolorbutton||"#ffffff",this.component_attributes.cardBgColorComments=r.cardbgcolorcomments||"#f3f3f3",this.component_attributes.cardRadiusPxl=r.cardradiuspxl||"5",this.component_attributes.cardRadiusPxlP=r.cardradiuspxlp||"5",this.component_attributes.cardImgPct=r.cardimgpct||"30",this.component_attributes.cardImgPctP=r.cardimgpctp||"30",this.component_attributes.cardImgRadiusPxl=r.cardimgradiuspxl||"0",this.component_attributes.cardImgRadiusPxlP=r.cardimgradiuspxlp||"0",this.component_attributes.cardimgadjustin=r.cardimgadjustin||"cover",this.component_attributes.cardimgadjustinP=r.cardimgadjustinp||"cover",this.component_attributes.cardimgsize=r.cardimgsize||"large",this.component_attributes.cardimgsizeP=r.cardimgsizep||"medium",this.component_attributes.orderby=r.orderby||"date,DESC",this.component_attributes.filtertitle=r.filtertitle||"",this.component_attributes.followpagefilter=r.followpagefilter||!0,this.component_attributes.followurlfilter=r.followurlfilter||!0,this.component_attributes.shownodataerr=r.shownodataerr||!0,this.component_attributes.filterbtnshow=r.filterbtnshow||!0,r.componentpath&&r.proxy&&(this.component_attributes.componentPath=r.componentpath||"./",this.component_attributes.proxy=r.proxy||"")}catch(t){return}this.component_attributes.cardSource="".concat(this.component_attributes.postsSource,":").concat(this.component_attributes.postsSource.includes("category")?this.component_attributes.postsCategory:this.component_attributes.postsUrl),Object.keys(this.component_attributes).forEach(function(e){"true"===t.component_attributes[e]&&(t.component_attributes[e]=!0),"false"===t.component_attributes[e]&&(t.component_attributes[e]=!1)}),!0===this.swiffle_isPhoneSize&&(this.component_attributes.blockDefLayout=this.component_attributes.blockDefLayoutP,this.component_attributes.blockShowLayout=this.component_attributes.blockShowLayoutP,this.component_attributes.blockcardsperpg=this.component_attributes.blockcardsperpgp,this.component_attributes.cardWidth=this.component_attributes.cardWidthP,this.component_attributes.cardWidthMax=this.component_attributes.cardWidthMaxP,this.component_attributes.cardHeight=this.component_attributes.cardHeightP,this.component_attributes.cardGap=this.component_attributes.cardGapP,this.component_attributes.cardClick=this.component_attributes.cardClickP,this.component_attributes.cardAbstractShow=this.component_attributes.cardAbstractShowP,this.component_attributes.cardTitleOverPicture=this.component_attributes.cardTitleOverPictureP,this.component_attributes.cardTitleFontSize=this.component_attributes.cardTitleFontSizeP,this.component_attributes.cardRadiusPxl=this.component_attributes.cardRadiusPxlP,this.component_attributes.cardImgPct=this.component_attributes.cardImgPctP,this.component_attributes.cardImgRadiusPxl=this.component_attributes.cardImgRadiusPxlP,this.component_attributes.cardDirection=this.component_attributes.cardDirectionP,this.component_attributes.cardIconShow=this.component_attributes.cardIconShowP,this.component_attributes.cardimgadjustin=this.component_attributes.cardimgadjustinP,this.component_attributes.cardimgsize=this.component_attributes.cardimgsizeP);var a=100;switch(this.component_attributes.cardClick){case"modal/80":a=80;break;case"modal/50":a=50}switch(this.activeLayout=this.component_attributes.blockDefLayout,this.param_css.innerHTML="\n /* Apply parameters */\n :host{\n --swiffle-cardHeight: ".concat(this.component_attributes.cardHeight,"!important;\n --swiffle-cardWidth: ").concat(this.component_attributes.cardWidth,"!important;\n --swiffle-cardWidthMax: ").concat(this.component_attributes.cardWidthMax,"!important;\n --swiffle-cardGap: ").concat(this.component_attributes.cardGap,";\n --swiffle-cardBgColor: ").concat(this.component_attributes.cardBgColor,";\n --swiffle-cardFtColor: ").concat(this.component_attributes.cardFtColor,";\n --swiffle-cardBgColorTitle: ").concat(this.component_attributes.cardBgColorTitle,";\n --swiffle-cardFtColorTitle: ").concat(this.component_attributes.cardFtColorTitle,";\n --swiffle-cardBgColorButton: ").concat(this.component_attributes.cardBgColorButton,";\n --swiffle-cardFtColorButton: ").concat(this.component_attributes.cardFtColorButton,";\n --swiffle-cardBgColorComments: ").concat(this.component_attributes.cardBgColorComments,";\n --swiffle-cardRadiusPxl: ").concat(this.component_attributes.cardRadiusPxl+"px",";\n --swiffle-cardImgPct: ").concat(this.component_attributes.cardImgPct+"%",";\n --swiffle-cardImgRadiusPxl: ").concat(this.component_attributes.cardImgRadiusPxl+"px",";\n }\n \n /* Apply block properties Style */\n .swiffle-card-container .swiffle-card-inner,\n .swiffle-card-container .swiffle-card-back,\n .swiffle-card-container .swiffle-card-front,\n .swiffle-card-container .swipable,\n .swiffle-card-container .swiffle-card-swipable {\n height: var(--swiffle-cardHeight);\n width: var(--swiffle-cardWidth);\n max-width: var(--swiffle-cardWidthMax);\n }\n .swiffle-card-container .swiffle-card-front,\n .swiffle-card-container .swiffle-card-back {\n background-color: var(--swiffle-cardBgColor);\n color: var(--swiffle-cardFtColor);\n }\n .swiffle-card-title{\n font-size: ").concat(this.component_attributes.cardTitleFontSize,";\n }\n .swiffle-card-container .swiffle-card-title-back,\n .swiffle-card-container .swiffle-card-tag {\n color: var(--swiffle-cardFtColorTitle);\n background-color: var(--swiffle-cardBgColorTitle);\n }\n\n .swiffle-card-container .swiffle-btn{\n color: var(--swiffle-cardFtColorButton);\n background-color: var(--swiffle-cardBgColorButton);\n }\n\n .swiffle-btn {\n color: ").concat(this.component_attributes.cardFtColorButton,";\n background-color: ").concat(this.component_attributes.cardBgColorButton,";\n }\n .prx{\n /*\n background: ").concat("swiffle"===this.component_attributes.cardSingleStyle?this.component_attributes.cardBgColorButton:"transparent",";\n color:").concat("swiffle"===this.component_attributes.cardSingleStyle?this.component_attributes.cardFtColorButton:this.component_attributes.cardFtColor,";\n */\n background: transparent;\n color: ").concat(this.component_attributes.cardFtColor,"\n }\n .prx.overpic{\n position:absolute;\n top:calc( 15px + ").concat(this.component_attributes.cardRadiusPxl/10,"% );\n left: 35px;\n }\n .btc.overpic{\n position:absolute;\n top:calc( 55px + ").concat(this.component_attributes.cardRadiusPxl/10,"% );\n left: 5px;\n }\n .bkbloc.half{\n width: ").concat(a,"%;\n }\n\n "),100==this.component_attributes.cardImgPct&&(this.param_css.innerHTML+="\n .swiffle-u-card-body{\n display:none!important;\n }\n "),this.component_attributes.cardimgadjustin){case"cover":this.param_css.innerHTML+="\n .swiffle-u-card-header img{\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n ";break;case"height100":this.param_css.innerHTML+="\n .swiffle-u-card-header img{\n width: auto;\n height: 100%;\n object-fit: contain;\n }\n ";break;case"width100":this.param_css.innerHTML+="\n .swiffle-u-card-header img{\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n "}}}},{key:"swiffle_apply_page_html",value:function(t){var e=this,i=this.docHTML.querySelector(".swiffle-card-container");if(i){var n=document.createElement("template");n.innerHTML=t;var o=n.content.querySelector("style"),s=this.docHTML.querySelector("style");o&&s&&(s.textContent=o.textContent);var r=n.content.querySelectorAll(".swiffle-card:not(.more):not(.swiffle-card-ghost)"),a=n.content.querySelector(".swiffle-card.more");this._cardSlots||(this._cardSlots=[]),Array.from(i.querySelectorAll(".swiffle-card:not(.more):not(.swiffle-card-ghost)")).filter(function(t){return!e._cardSlots.includes(t)}).forEach(function(t){return t.remove()});for(var l=i.querySelector(".swiffle-card.more")||i.querySelector(".swiffle-filter-button");this._cardSlots.length<r.length;){var c=document.createElement("div");c.className="swiffle-card";var d=document.createElement("div");d.className="swiffle-card-inner";var f=document.createElement("div");f.className="swiffle-card-front";var h=document.createElement("div");h.className="swiffle-card-back",d.appendChild(f),d.appendChild(h),c.appendChild(d),l?i.insertBefore(c,l):i.appendChild(c),this._cardSlots.push(c)}r.forEach(function(t,i){var n=e._cardSlots[i],o=n.querySelector(".swiffle-card-inner"),s=t.querySelector(".swiffle-card-inner");o&&s&&(o.innerHTML=s.innerHTML,e.swiffle_compress_card_back(o.querySelector(".swiffle-card-back")),o.className=s.className.replace(/\bswiffle-card-flipped\b/,"").trim(),s.hasAttribute("data-action")?o.setAttribute("data-action",s.getAttribute("data-action")):o.removeAttribute("data-action"),s.hasAttribute("data-nav")?o.setAttribute("data-nav",s.getAttribute("data-nav")):o.removeAttribute("data-nav"),n.className=t.className,n.removeAttribute("style"),t.hasAttribute("style")&&n.setAttribute("style",t.getAttribute("style")))});for(var u=r.length;u<this._cardSlots.length;u++){var p=this._cardSlots[u],w=p.querySelector(".swiffle-card-inner");w&&(w.innerHTML=""),p.style.display="none"}this._lastVisibleCardCount=r.length;var m=i.querySelector(".swiffle-card.more");a&&m?m.replaceWith(a):a&&!m?i.querySelector(".swiffle-filter-button")?i.insertBefore(a,i.querySelector(".swiffle-filter-button")):i.appendChild(a):!a&&m&&m.remove()}else this.docHTML.innerHTML=t}},{key:"swiffle_extract_avatar_src",value:function(t){var e="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="12" fill="#ccd0d4"/><circle cx="12" cy="9.5" r="4" fill="#fff"/><path d="M4 20c0-4.5 4-7 8-7s8 2.5 8 7" fill="#fff"/></svg>');if(!t||"string"!=typeof t)return e;try{if(t.includes("src=")){var i=t.split("src=")[1];return i&&i.split(" ")[0].replace(/^["']|["']$/g,"")||e}return t}catch(t){return e}}},{key:"swiffle_apply_gallery_transform",value:function(t){var e=this;if(t){var i=this.component_attributes.cardgallery;"slidefull"!==i&&"slidezoom"!==i&&"slide"!==i||(t.matches&&t.matches(".wp-block-gallery")?[t]:Array.from(t.querySelectorAll(".wp-block-gallery"))).forEach(function(t){if(!t.classList.contains("swiffle-revamped-gallery")){var n=Array.from(t.querySelectorAll(".wp-block-image")).map(function(t){var e=t.querySelector("img");if(!e)return null;var i=t.querySelector("a");return{full:(null==i?void 0:i.href)||e.dataset.largeFile||e.src,thumb:e.src}}).filter(Boolean);if(0!==n.length){var o="slidefull"===i?n:n.map(function(t){return t.full});t.innerHTML=e.makeSlider(i,o),t.classList.add("swiffle-revamped-gallery")}}})}}},{key:"swiffle_compress_card_back",value:function(t){if(t&&!t.dataset.html64){t.dataset.html64=this.bx(t.innerHTML);var e=t.querySelector('[class^="COMMENT_"]'),i="";e&&(i+=e.outerHTML),t.innerHTML=i}}},{key:"renderCallback",value:function(t){var e,i=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.component_attributes.cardSource||"";["csv:","csvs:","xlsx:","rss:","category:"].some(function(t){return o.startsWith(t)})||(t.posts=[],t.have_more="n");var s="";if(0===t.posts.length)return this.swiffle_endSwipe(),this.activeLayout=this.component_attributes.blockDefLayout,t.alert&&this.swiffle_toast(this.swiffleTop._swiffle__(t.alert)),s='<div class="swiffle-card"><div class="swiffle-card-inner" data-action="none"><div class="swiffle-card-front">',!0===this.component_attributes.shownodataerr?s+='<p style="width:100%;">'.concat(this.swiffleTop._swiffle__("No data"),"</p>"):s+="<span></span>",1==this.component_attributes.filterbtnshow&&this.component_attributes.postsSource.startsWith("category")&&(s+='\n <div class="swiffle-filter-button open-filter" '.concat("",' style="top: calc( ').concat(this.component_attributes.cardHeight,' *.7 );">\n <svg pointer-events="all" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="swiffle-filter-icon">\n <path d="M3 4h18l-7 9v7l-4-4v-3L3 4z" fill="currentColor" stroke="currentColor" stroke-width="1"></path>\n </svg>\n <span>').concat(this.swiffleTop._swiffle__("Filter"),"</span>\n </div>\n ")),s+="</div></div></div>",this.docHTML.className="swiffle-container-fluid",this.docHTML.innerHTML=s,this.shadow.appendChild(this.docHTML),this._cardSlots=null,void(this.style.display="");var r="<style>".concat(t.css,"</style>");switch(r+='<div class="'.concat("row"==this.component_attributes.cardDirection?"swiffle-horiz":""," swiffle-set-").concat(this.ID," swiffle-card-container forswiffle-cards defLayout_").concat(this.component_attributes.blockDefLayout,'">'),this.component_attributes.blockShowLayout){case"all":r+='\n <div class="swiffle-mini-nav">\n <div class="swiffle-circular-menu">\n <h1 class="floating-btn circularMenu">\n <div style="opacity:0;margin-left:-15px;margin-top:-15px;height:100%;width:100%;position:absolute;background:black;"></div>\n <i>\n <a class="hamb">\n <span class="bar"></span>\n <span class="bar"></span>\n <span class="bar"></span>\n </a>\n </i>\n </h1>\n <menu class="items-wrapper">\n <h1 style="cursor:pointer" class="menu-item toSwipe circularMenu">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <path transform="rotate(180,15,15)" d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(9,4.5)"></rect>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(8.2,6.5)"></rect>\n <path d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M7 6 L11 8" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M8 11 L10.5 8" fill="transparent" stroke="black" stroke-width="1"></path>\n </svg></i>\n </h1>\n <h1 style="cursor:pointer" class="menu-item toFluid circularMenu">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="4" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M20 8 L20 16 M20 16 L18 14 M20 16 L22 14" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </h1>\n <h1 style="cursor:pointer" class="menu-item toLine circularMenu">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="20" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M6 20 L24 20 M24 20 L22 18 M24 20 L22 22" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </h1>\n <h1 style="cursor:pointer" class="menu-item toSwipeFull circularMenu">\n <i><svg pointer-events="all" viewBox= "0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path transform="rotate(180,12,12)" d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(6,2.5)" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(.2,3)" /><path d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><path d="M5 4 L9 6" fill="transparent" stroke="black" stroke-width="1" /><path d="M6 9 L8.5 6" fill="transparent" stroke="black" stroke-width="1" /></svg></i>\n </h1>\n </menu>\n </div>\n \n </div>\n ';break;case"wrap":r+='\n <div style="cursor:pointer;box-sizing: content-box;" class="toFluid swiffle-switch-nav alt">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="4" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M20 8 L20 16 M20 16 L18 14 M20 16 L22 14" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </div>\n ';break;case"swipe":r+='\n <div style="cursor:pointer;box-sizing: content-box;" class="toSwipe swiffle-switch-nav alt">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <path transform="rotate(180,15,15)" d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(9,4.5)"></rect>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(8.2,6.5)"></rect>\n <path d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M7 6 L11 8" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M8 11 L10.5 8" fill="transparent" stroke="black" stroke-width="1"></path>\n </svg></i>\n </div>\n ';break;case"swipefull":r+='\n <div style="cursor:pointer;box-sizing: content-box;" class="toSwipeFull swiffle-switch-nav alt">\n <i><svg pointer-events="all" viewBox= "0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path transform="rotate(180,12,12)" d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(6,2.5)" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(.2,3)" /><path d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><path d="M5 4 L9 6" fill="transparent" stroke="black" stroke-width="1" /><path d="M6 9 L8.5 6" fill="transparent" stroke="black" stroke-width="1" /></svg></i>\n </div>\n ';break;case"row":r+='\n <div style="cursor:pointer;box-sizing: content-box;" class="toLine swiffle-switch-nav alt">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="20" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M6 20 L24 20 M24 20 L22 18 M24 20 L22 22" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </div>\n '}if("all"!==this.component_attributes.blockShowLayout)switch(this.component_attributes.blockDefLayout){case"wrap":r+='\n <div style="cursor:pointer;display:none;box-sizing: content-box;" class="toFluid swiffle-switch-nav origin">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="4" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="4" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="12" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M20 8 L20 16 M20 16 L18 14 M20 16 L22 14" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </div>\n ';break;case"swipe":r+='\n <div style="cursor:pointer;display:none;box-sizing: content-box;" class="toSwipe swiffle-switch-nav origin">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <path transform="rotate(180,15,15)" d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(9,4.5)"></rect>\n <rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(8.2,6.5)"></rect>\n <path d="M3 15 A12 6 0 0 1 27 15" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M7 6 L11 8" fill="transparent" stroke="black" stroke-width="1"></path>\n <path d="M8 11 L10.5 8" fill="transparent" stroke="black" stroke-width="1"></path>\n </svg></i>\n </div>\n ';break;case"swipefull":r+='\n <div style="cursor:pointer;display:none;box-sizing: content-box;" class="toSwipeFull swiffle-switch-nav origin">\n <i><svg pointer-events="all" viewBox= "0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path transform="rotate(180,12,12)" d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="translate(6,2.5)" /><rect rx="3" width="12" height="20" stroke-width="1" stroke="black" fill="currentColor" transform="rotate(-15) translate(.2,3)" /><path d="M1 12 A10 6 0 0 1 23 12" fill="transparent" stroke="black" stroke-width="1" /><path d="M5 4 L9 6" fill="transparent" stroke="black" stroke-width="1" /><path d="M6 9 L8.5 6" fill="transparent" stroke="black" stroke-width="1" /></svg></i>\n </div>\n ';break;case"row":r+='\n <div style="cursor:pointer;display:none;box-sizing: content-box;" class="toLine swiffle-switch-nav origin">\n <i><svg pointer-events="all" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">\n <rect x="1" y="1" width="28" height="28" stroke="currentColor" stroke-width="2" fill="transparent"></rect>\n <rect x="4" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="12" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <rect x="20" y="6" width="6" height="6" fill="currentColor" stroke="currentColor" stroke-width="1"></rect>\n <path d="M6 20 L24 20 M24 20 L22 18 M24 20 L22 22" stroke="currentColor" stroke-width="1" fill="transparent"></path>\n </svg></i>\n </div>\n '}var a=[];r+='<div class="swiffle-card-ghost" style="display:none;"></div>';try{var l=this.swiffle_load_page(t,!0,a,[],[],this.swiffleTop)}catch(t){console.error("swiffle_load_page error:",t)}r+=l;var c="";n&&parseInt(this.PG)>0&&this.swiffle_isPhoneSize&&(c='\n <svg data-target="'.concat(this.ID,'" class="no-flip rdl svgtopp" style="width:100%; height:auto; cursor:pointer;" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <circle data-target="').concat(this.ID,'" class="no-flip rdl" cx="25" cy="25" r="10" fill="transparent" stroke="black" stroke-width="1"></circle>\n <path data-target="').concat(this.ID,'" class="no-flip rdl spinner" d="M30 25 L20 25 M20 25 L23 22 M20 25 L23 28" stroke="black" stroke-width="2" fill="none"></path>\n <defs data-target="').concat(this.ID,'" class="no-flip rdl">\n <path data-target="').concat(this.ID,'" class="no-flip rdl" id="circlePathPrev" d="M25,10 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30"></path>\n </defs>\n <text data-target="').concat(this.ID,'" class="no-flip rdl" class="no-flip rdl" font-size="8" fill="black" dy="4">\n <textPath data-target="').concat(this.ID,'" class="no-flip rdl" href="#circlePathPrev" startOffset="50%" text-anchor="middle">').concat(this.swiffleTop._swiffle__("Previous"),'</textPath>\n </text>\n </svg>\n </div>\n <div data-target="').concat(this.ID,'" class="no-flip " style="width:20%; height:auto; min-width: 80px; min-height: 80px;">\n <svg data-target="').concat(this.ID,'" class="no-flip rdt svgtopb" style="width:100%; height:auto; cursor:pointer;" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <circle data-target="').concat(this.ID,'" class="no-flip rdt" cx="25" cy="25" r="10" fill="transparent" stroke="black" stroke-width="1"></circle>\n <path data-target="').concat(this.ID,'" class="no-flip rdt spinner" d="M25 19 L25 31 M25 19 L22 22 M25 19 L28 22" stroke="black" stroke-width="2" fill="none"></path>\n <defs data-target="').concat(this.ID,'" class="no-flip rdt" >\n <path data-target="').concat(this.ID,'" class="no-flip rdt" id="circlePathStart" d="M25,10 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30"></path>\n </defs>\n <text data-target="').concat(this.ID,'" class="no-flip rdt" font-size="8" fill="black" dy="4">\n <textPath data-target="').concat(this.ID,'" class="no-flip rdt" href="#circlePathStart" startOffset="50%" text-anchor="middle">').concat(this.swiffleTop._swiffle__("Beginning"),"</textPath>\n </text>\n </svg>\n ")),"y"==this.have_more?r+='\n <div class="swiffle-card more">\n <div class="swiffle-card-inner more">\n <div data-target="'.concat(this.ID,'" class="swiffle-card-front no-flip " style="text-align:center;display:flex;justify-content:center;align-items:center;overflow:hidden;">\n <div data-target="').concat(this.ID,'" class="no-flip " style="width:20%; height:auto; min-width: 80px; min-height: 80px;">\n ').concat(c,'\n <svg data-target="').concat(this.ID,'" class="no-flip rdm svgtop" style="width: 100%; height: auto; cursor: pointer;" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <circle data-target="').concat(this.ID,'" class="no-flip rdm" cx="25" cy="25" r="10" fill="transparent" stroke="black" stroke-width="1"></circle>\n <path data-target="').concat(this.ID,'" class="no-flip rdm spinner" d="M19 25 L31 25 M25 19 L25 31" stroke="black" stroke-width="2"></path>\n <defs><path data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" id="circlePath" d="M25,10 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30"></path></defs>\n <text data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" font-size="8" fill="black" dy="4">\n <textPath data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" href="#circlePath" startOffset="50%" text-anchor="middle">').concat(this.swiffleTop._swiffle__("See more"),'</textPath>\n </text>\n </svg>\n </div>\n </div>\n <div class="swiffle-card-back"></div>\n </div>\n </div>\n '):""!==c&&(r+='\n <div class="swiffle-card more">\n <div class="swiffle-card-inner more">\n <div data-target="'.concat(this.ID,'" class="swiffle-card-front no-flip" style="text-align:center;display:flex;justify-content:center;align-items:center;overflow:hidden;">\n <div data-target="').concat(this.ID,'" class="no-flip" style="width:20%; height:auto; min-width: 80px; min-height: 80px;">\n ').concat(c,'\n </div>\n </div>\n <div class="swiffle-card-back"></div>\n </div>\n </div>\n ')),1==this.component_attributes.filterbtnshow&&this.component_attributes.postsSource.startsWith("category")&&(r+='\n <div class="swiffle-filter-button open-filter" '.concat("",' style="top: calc( ').concat(this.component_attributes.cardHeight,' *.7 );">\n <svg pointer-events="all" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="swiffle-filter-icon">\n <path d="M3 4h18l-7 9v7l-4-4v-3L3 4z" fill="currentColor" stroke="currentColor" stroke-width="1"></path>\n </svg>\n <span>').concat(this.swiffleTop._swiffle__("Filter"),"</span>\n </div>\n ")),this.docHTML.className="swiffle-container-fluid",this.docHTML.className="swiffle-container-fluid",!this._cardSlots||this.isInEditor()?(this.docHTML.innerHTML=r,this.shadow.appendChild(this.docHTML),this._cardSlots=Array.from(this.docHTML.querySelectorAll(".swiffle-card-container > .swiffle-card:not(.more):not(.swiffle-card-ghost)")),this._lastVisibleCardCount=this._cardSlots.length,this._cardSlots.forEach(function(t){i.swiffle_compress_card_back(t.querySelector(".swiffle-card-back"))})):this.swiffle_apply_page_html(r);var d=this.shadow.appendChild(this.docHTML);if(this.swiffle_fix_embeds(),this.swiffle_refreshCards(),this.ghostCard=this.shadow.querySelector(".swiffle-card-ghost"),this.currentIndex=0,this.swiffle_sw_initEvt={},this.swiffle_swipeEnding=!1,this.shadow.offsetHeight,t.script){var f=document.createElement("script");f.type="text/javascript",f.textContent=t.script,this.shadow.appendChild(f)}if(null===(e=this.shadow.querySelector(".cont_mini_cart"))||void 0===e||e.remove(),this.style.display="",n&&!this.activeLayout.startsWith("swipe")&&setTimeout(function(){switch(i.activeLayout){case"wrap":case"fluid":var t=d.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:t,behavior:"auto"});break;case"row":case"line":var e=d.getBoundingClientRect().left+window.scrollX;window.scrollTo({left:e,behavior:"auto"})}},200),n){var h=this.activeLayout.replace("wrap","fluid").replace("row","line")!==this.component_attributes.blockDefLayout.replace("wrap","fluid").replace("row","line");this.shadow.querySelectorAll(".swiffle-switch-nav.alt").forEach(function(t){t.style.display=h?"none":""}),this.shadow.querySelectorAll(".swiffle-switch-nav.origin").forEach(function(t){t.style.display=h?"":"none"})}if(this.callswiffleapi({action:"reviews_mass",ids:a,callback:"renderCommentsMass,"+this.ID}),this.swiffle_apply_gallery_transform(this.shadow),"swipe"===this.activeLayout&&this.swiffle_toSwipe(this.shadow.querySelector(".swiffle-card-container"),!0),"swipefull"===this.activeLayout&&this.swiffle_toSwipe(this.shadow.querySelector(".swiffle-card-container"),!0,!0),"fluid"!==this.activeLayout&&"wrap"!==this.activeLayout||this.swiffle_toFluid(this.shadow.querySelector(".swiffle-card-container")),"row"!==this.activeLayout&&"line"!==this.activeLayout||this.swiffle_toLine(this.shadow.querySelector(".swiffle-card-container")),this._cardSlots)for(var u=this._lastVisibleCardCount||0;u<this._cardSlots.length;u++)this._cardSlots[u].style.display="none";var p=new URLSearchParams(window.location.search),w=p.get("r-product")?p.get("r-product"):p.get("ref-product");w&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="prod",this.swiffleTop.SWIFFLE_REQUEST_VALUE="pk_"+w);var m=p.get("r-cat")?p.get("r-cat"):p.get("product_category");m&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="cat",this.swiffleTop.SWIFFLE_REQUEST_VALUE=m.split("/").pop());var v=p.get("r-search")?p.get("r-search"):p.get("search");v&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="search",this.swiffleTop.SWIFFLE_REQUEST_VALUE=v.split("/").pop());var _=p.get("s"),y=p.get("post_type");_&&y&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="search",this.swiffleTop.SWIFFLE_REQUEST_VALUE=_.split("/").pop());var g=p.get("r-tag")?p.get("r-tag"):p.get("tag");g&&(this.swiffleTop.SWIFFLE_REQUEST_TYPE="tag",this.swiffleTop.SWIFFLE_REQUEST_VALUE=g.split("/").pop())}},{key:"swiffle_callback_load_more",value:function(t){var e=this;if(this._pageNavLoading=!1,this.swiffle_isPhoneSize)this.renderCallback(t,!0);else{var i=t.posts.filter(function(t){return 0===e.shadow.querySelectorAll('[data-item="'.concat(t.ID,'"]')).length});t.posts=i;var n=[],o=this.swiffle_load_page(t,!1,n,[],[],this.swiffleTop);"y"==t.have_more&&(o+='\n <div class="swiffle-card more">\n <div class="swiffle-card-inner more">\n <div data-target="'.concat(this.ID,'" class="swiffle-card-front no-flip rdm" style="text-align:center;display:flex;justify-content:center;align-items:center;overflow:hidden;">\n <div data-target="').concat(this.ID,'" class="no-flip rdm" style="width:20%; height:auto; min-width: 80px; min-height: 80px;">\n <svg data-target="').concat(this.ID,'" class="no-flip rdm svgtop" style="width: 100%; height: auto; cursor: pointer;" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">\n <circle data-target="').concat(this.ID,'" class="no-flip rdm" cx="25" cy="25" r="10" fill="transparent" stroke="black" stroke-width="1"></circle>\n <path data-target="').concat(this.ID,'" class="no-flip rdm spinner" d="M19 25 L31 25 M25 19 L25 31" stroke="black" stroke-width="2"></path>\n <defs><path data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" id="circlePath" d="M25,10 a15,15 0 1,0 0,30 a15,15 0 1,0 0,-30"></path></defs>\n <text data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" font-size="8" fill="black" dy="4">\n <textPath data-target="').concat(this.ID,'" pointer-events="all" class="no-flip rdm" href="#circlePath" startOffset="50%" text-anchor="middle">').concat(this.swiffleTop._swiffle__("See more"),'</textPath>\n </text>\n </svg>\n </div>\n </div>\n <div class="swiffle-card-back"></div>\n </div>\n </div>\n '));var s=this.shadow.querySelector(".swiffle-card-container"),r=null;if(s&&(r=s.querySelectorAll(".swiffle-card:not(.more)")[s.querySelectorAll(".swiffle-card:not(.more)").length-1]),this.shadow.querySelector(".swiffle-card-container").insertAdjacentHTML("beforeend",o),this.swiffle_fix_embeds(),t.script){var a=document.createElement("script");a.type="text/javascript",a.textContent=t.script,this.shadow.appendChild(a)}var l=this.shadow.querySelectorAll(".swiffle-card.more");l.length>0&&l[0].remove(),this.callswiffleapi({action:"reviews_mass",ids:n,callback:"renderCommentsMass,"+this.ID}),this.shadow.querySelectorAll(".swiffle-card .wp-block-gallery").forEach(function(t){var e=document.createElement("div");for(e.classList.add("swiffle-gallery-scroll");t.firstChild;)e.appendChild(t.firstChild);t.appendChild(e),e.querySelectorAll(".wp-block-image").forEach(function(t){t.classList.remove("wp-block-image"),t.classList.add("swiffle-single-img-container")})}),"swipe"==this.activeLayout&&this.swiffle_toSwipe(this.shadow.querySelector(".swiffle-card-container"),!1),"swipefull"===this.activeLayout&&this.swiffle_toSwipe(this.shadow.querySelector(".swiffle-card-container"),!1,!0),"fluid"!==this.activeLayout&&"wrap"!==this.activeLayout||(this.swiffle_toFluid(this.shadow.querySelector(".swiffle-card-container")),r.scrollIntoView({block:"nearest",inline:"nearest"})),"row"!==this.activeLayout&&"line"!==this.activeLayout||(this.swiffle_toLine(this.shadow.querySelector(".swiffle-card-container")),r.scrollIntoView({block:"nearest",inline:"nearest"})),this.activeLayout.startsWith("swipe")&&this.swiffle_add_ghost()}}},{key:"renderComments",value:function(t){var e=this,i=t.params.revs,n="";1==t.params.pg&&(""==t.params.can_comment?n+='\n <div class="container_rat">\n <p>'.concat(this.swiffleTop._swiffle__("Leave a comment"),'</p>\n <textarea class="no-flip" name="ucomment" data-target="').concat(t.params.id,'" data-id="0" data-nonce="').concat(t.params.nonce,'" cols="45" rows="8" required="" placeholder="').concat(this.swiffleTop._swiffle__("Your comment"),'..."></textarea>\n <br>\n <p class="message"></p>\n <button type="button" data-target="').concat(t.params.id,'" data-id="0" class="swiffle-btn no-flip bcm">').concat(this.swiffleTop._swiffle__("Submit"),"</button>\n <br><br>\n </div>\n "):n+='\n <div class="container_rat">\n <p>'.concat(t.params.can_comment,"</p>\n </div>")),prevlev=0,i.forEach(function(i){bt_reply="",""==t.params.can_comment&&(bt_reply="<button type=\"button\" onclick=\"this.parentElement.querySelector('.container_rat').classList.toggle('hidden');this.innerHTML=(this.innerHTML=='".concat(e.swiffleTop._swiffle__("Reply"),"'?'").concat(e.swiffleTop._swiffle__("Cancel"),"':'").concat(e.swiffleTop._swiffle__("Reply"),'\');" class="swiffle-btn no-flip">').concat(e.swiffleTop._swiffle__("Reply"),"</button>")),n+='\n <li class="comment" style="margin-left:'.concat(8*i.level,'px;"> \n <div class="customer">\n <span class="avatar">\n <img loading="lazy" src="').concat(e.swiffle_extract_avatar_src(i.avatar),'" title="').concat(i.author,'">\n </span>\n <span class="nickname">').concat(i.author,'</a>\n </div>\n <div class="assessment">\n <span class="date">').concat(i.date,'</span>\n </div>\n <div class="title">').concat(i.title,'</div>\n <div class="comment">\n <p>').concat(i.comment,'</p>\n <div class="reply">\n <div class="container_rat hidden">\n <p><b>').concat(e.swiffleTop._swiffle__("Reply"),'</b></p>\n <textarea class="no-flip" name="ucomment" data-target="').concat(t.params.id,'" data-id="').concat(i.id,'" data-nonce="').concat(i.nonce,'" cols="45" rows="8" required="" placeholder="').concat(e.swiffleTop._swiffle__("Your comment"),'..."></textarea>\n <br>\n <p class="message"></p>\n <button type="button" data-target="').concat(t.params.id,'" data-id="').concat(i.id,'" class="swiffle-btn no-flip bcm">').concat(e.swiffleTop._swiffle__("Submit"),"</button>\n <br><br>\n </div>\n ").concat(bt_reply,"\n </div>\n </div>\n </li>\n "),prevlev=i.level});var o="";t.params.more&&(o=t.params.more.replace(">More<",">"+this.swiffleTop._swiffle__("More")+"<"));var s=this.shadow.querySelectorAll(".COMMENT_".concat(t.params.id));s.length>0&&("1"==t.params.pg?s[0].innerHTML='<ul class="swiffle_comment-section">'.concat(n,"</ul>").concat(o):(s[0].querySelector(".more-comment").remove(),s[0].querySelector(".swiffle_comment-section").insertAdjacentHTML("beforeend",n),s[0].insertAdjacentHTML("beforeend","".concat(o))),s.forEach(function(i){var n=i.closest(".swiffle-card-back");if(n&&n.dataset.html64){var o=document.createElement("div");o.innerHTML=e.bxd(n.dataset.html64);var s=o.querySelector(".COMMENT_".concat(t.params.id));s&&(s.innerHTML=i.innerHTML),n.dataset.html64=e.bx(o.innerHTML)}}))}},{key:"newComment",value:function(t){var e=this.shadow.querySelectorAll('textarea[name=ucomment][data-target="'.concat(t.target,'"][data-id="').concat(t.id,'"][data-nonce="').concat(t.nonce,'"]'));if(e.length>0){var i=(e=e[0].parentElement).querySelector(".message");if(t.ERROR){switch(i.classList.add("error"),t.ERROR){case"expired":i.innerHTML=this.swiffleTop._swiffle__("An error has occurred. Please reload the page and try again.");break;case"closed":i.innerHTML=this.swiffleTop._swiffle__("Comments are closed.");break;case"success":i.classList.remove("error"),i.classList.add("success"),i.innerHTML=this.swiffleTop._swiffle__("Your comment is awaiting moderation."),e.querySelector("textarea").value="",e.querySelector("textarea").classList.toggle("hidden"),e.querySelector("button").classList.toggle("hidden"),"0"!=t.id&&(setTimeout(function(t){t.classList.toggle("hidden")},5e3,e),e.parentElement.querySelector(".reply>button").classList.toggle("hidden"),e.parentElement.querySelector(".reply>button").innerHTML=this.swiffleTop._swiffle__("Reply"),setTimeout(function(t){t.querySelector(".reply>button").classList.toggle("hidden")},5e3,e.parentElement)),setTimeout(function(t){t.innerHTML=""},5e3,i),setTimeout(function(t){t.querySelector("textarea").classList.toggle("hidden")},5e3,e),setTimeout(function(t){t.querySelector("button").classList.toggle("hidden")},5e3,e);break;default:i.innerHTML=t.ERROR}return}}}},{key:"render",value:function(){var t,i=this;if(null===this.component_attributes.proxy)this.retried<100?(setTimeout(function(){i.render()},100),this.retried+=1):console.error("Swiffle: proxy is undefined.");else{document.body.addEventListener("touchend",function(){},{passive:!0}),this.translate_ready=0;var o=this.component_attributes.proxy,s={action:"get_intl",callback:"get_intl,"+this.ID};this.callswiffleapi(s),this._lastIntlBridge=s.bridge,this._lastIntlRequestedForProxy=o,this.setAllParams(),this.filter="e30=";var r=!1,a={search:"",sort:"",cats:f,tags:"",min:"0",max:"500000"},l=this.getAttribute("extra_search");l&&(a.search=l,r=!0);var c=this.getAttribute("extra_sort");c&&(r=!0,a.sort=c);var d=this.getAttribute("extra_cats");d&&(r=!0,a.cats=d);var f=this.getAttribute("dataf");f&&(r=!0,a.cats=d);var h=this.getAttribute("extra_min");h&&(r=!0,a.min=h);var u=this.getAttribute("extra_max");u&&(r=!0,a.max=u),r&&(this.filter=this.bx(JSON.stringify(a)));var p=this._intlWaitToken=(this._intlWaitToken||0)+1;(t=e().m(function t(){return e().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,new Promise(function(t){var e=!1,n=Date.now(),o=function(){e||(i._intlWaitToken!==p||1===i.translate_ready||Date.now()-n>8e3)&&(e=!0,clearInterval(r),t())},s=function(){o(),e||requestAnimationFrame(s)},r=setInterval(o,100);s()});case 1:if(i._intlWaitToken===p){t.n=2;break}return t.a(2);case 2:i.PG=0,i.getData(i.PG);case 3:return t.a(2)}},t)}),function(){var e=this,i=arguments;return new Promise(function(o,s){var r=t.apply(e,i);function a(t){n(r,o,s,a,l,"next",t)}function l(t){n(r,o,s,a,l,"throw",t)}a(void 0)})})()}}},{key:"scheduleRender",value:function(){var t=this;if(!this.renderScheduled){this.renderScheduled=!0;var e=!1,i=function(){e||(e=!0,t.render(),t.renderScheduled=!1)};requestAnimationFrame(i),setTimeout(i,300)}}},{key:"connectedCallback",value:function(){var t=this;try{window.parent._swiffleResetLock||(window.parent._swiffleResetLock=!1,window.parent._swiffleLastDevice=null,window.parent._swiffleResetTimer=null)}catch(t){}window.swiffle_cur_bridge||(window.swiffle_cur_bridge=0),this._pendingApiCalls.length>0&&(this._pendingApiCalls.forEach(function(e){return t.callswiffleapi(e)}),this._pendingApiCalls=[]),this.swiffleTop.vh||(this.swiffleTop.vh=.01*this.swiffleTop.innerHeight,this.swiffleTop.document.documentElement.style.setProperty("--vh","".concat(this.swiffleTop.vh,"px"))),"function"!=typeof this.swiffleTop._swiffle__&&(this.swiffleTop._swiffle__=function(e){return null===t.swiffleTop.SWIFFLE_INTL||void 0===t.swiffleTop.SWIFFLE_INTL||null===t.swiffleTop.SWIFFLE_INTL[e]||void 0===t.swiffleTop.SWIFFLE_INTL[e]?e:t.swiffleTop.SWIFFLE_INTL[e]}),this.scheduleRender(),this._resize_owner=this._resize_owner.bind(this);var e=this.ownerDocument.defaultView;if(e.addEventListener("resize",this._resize_owner),this._listeners.push(function(){return e.removeEventListener("resize",t._resize_owner)}),this._visibility=this._visibility.bind(this),this.swiffleTop.addEventListener("visibilitychange",this._visibility),this._listeners.push(function(){return t.swiffleTop.removeEventListener("visibilitychange",t._visibility)}),this._focusout=this._focusout.bind(this),this.shadow.addEventListener("focusout",this._focusout),this._listeners.push(function(){return t.shadow.removeEventListener("focusout",t._focusout)}),this._change=this._change.bind(this),this.shadow.addEventListener("change",this._change),this._listeners.push(function(){return t.shadow.removeEventListener("change",t._change)}),this._click_component=this._click_component.bind(this),this.swiffleTop.addEventListener("click",this._click_component),this._listeners.push(function(){return t.swiffleTop.removeEventListener("click",t._click_component)}),this._click=this._click.bind(this),this.shadow.addEventListener("click",this._click),this._listeners.push(function(){return t.shadow.removeEventListener("click",t._click)}),this.shadow.removeEventListener("touchstart",this._touchstartHandle),document.removeEventListener("touchmove",this._touchmoveHandle),this.shadow.removeEventListener("touchend",this._touchendHandle),this.shadow.removeEventListener("mousedown",this._mousedownHandle),document.removeEventListener("mousemove",this._mousemoveHandle),this.shadow.removeEventListener("mouseup",this._mouseupHandle),this.isTouchDevice){this._touchstartHandle=this._touchstartHandle.bind(this),this.shadow.addEventListener("touchstart",this._touchstartHandle,{passive:!1}),this._listeners.push(function(){return t.shadow.removeEventListener("touchstart",t._touchstartHandle)}),this._touchmoveHandle=this._touchmoveHandle.bind(this);var i=this.shadow;i.addEventListener("touchmove",this._touchmoveHandle,{passive:!1}),this._listeners.push(function(){return i.removeEventListener("touchmove",t._touchmoveHandle)}),this._touchendHandle=this._touchendHandle.bind(this),this.shadow.addEventListener("touchend",this._touchendHandle,{passive:!1}),this._listeners.push(function(){return t.shadow.removeEventListener("touchend",t._touchendHandle)})}else{this._mousedownHandle=this._mousedownHandle.bind(this),this.shadow.addEventListener("mousedown",this._mousedownHandle,{passive:!1}),this._listeners.push(function(){return t.shadow.removeEventListener("mousedown",t._mousedownHandle)}),this._mousemoveHandle=this._mousemoveHandle.bind(this);var n=this.shadow;n.addEventListener("mousemove",this._mousemoveHandle,{passive:!1}),this._listeners.push(function(){return n.removeEventListener("mousemove",t._mousemoveHandle)}),this._mouseupHandle=this._mouseupHandle.bind(this),this.shadow.addEventListener("mouseup",this._mouseupHandle,{passive:!1}),this._listeners.push(function(){return t.shadow.removeEventListener("mouseup",t._mouseupHandle)})}var o=this.closest('[draggable="true"]');o?(o.setAttribute("draggable","false"),o.addEventListener("dragstart",function(t){t.preventDefault(),t.stopImmediatePropagation()},!0)):setTimeout(function(){var e,i=(null===(e=t.getRootNode())||void 0===e?void 0:e.host)||t.closest(".elementor-widget");i&&(i.setAttribute("draggable","false"),i.addEventListener("dragstart",function(t){t.preventDefault(),t.stopImmediatePropagation()},!0))},500),this._keydown=this._keydown.bind(this),this.shadow.addEventListener("keydown",this._keydown),this._listeners.push(function(){return t.shadow.removeEventListener("keydown",t._keydown)}),this.swiffleTop.document.addEventListener("DOMContentLoaded",function(){t._searchfield_doc=t._searchfield_doc.bind(t);var e=t.swiffleTop.document;e.addEventListener("keydown",t._searchfield_doc),t._listeners.push(function(){return e.removeEventListener("keydown",t._searchfield_doc)}),e.addEventListener("focusout",t._searchfield_doc),t._listeners.push(function(){return e.removeEventListener("focusout",t._searchfield_doc)})});var s=document.createElement("span");s.innerHTML='\n <div class="zoomfull"></div>\n <div class="overlay" data-where=""></div>\n <div class="modal" data-where="">\n <div class="modal-body">\n <div class="modal-body-header">\n <div class="modal-body-header-titre"></div>\n <span class="modal-body-header-titre-close">✖︎</span>\n </div>\n <div class="modal-content"></div>\n </div>\n </div>\n <div class="overlay side" data-where="side"></div>\n <div class="modal side" data-where="side">\n <div class="modal-body">\n <div class="modal-body-header">\n <div class="modal-body-header-titre"></div>\n <span class="modal-body-header-titre-close">✖︎</span>\n </div>\n <div class="modal-content"></div>\n </div>\n </div>\n <div id="swiffle-toast" style="display:none">\n <span id="swiffle-toast-msg"></span>\n </div>\n ',this.shadow.appendChild(s)}},{key:"_swiffle_editor_toolbar_offset",value:function(){if(!document.body.classList.contains("block-editor-page"))return 0;var t=0;return["#wpadminbar",".interface-interface-skeleton__header",".edit-post-header",".editor-header"].forEach(function(e){var i=document.querySelector(e);i&&(t=Math.max(t,i.getBoundingClientRect().bottom))}),Math.ceil(t)}},{key:"swiffle_open_modal",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"RAS",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"side",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"80",o=this.shadow.querySelector(".modal"+(""===e?"":"."+e));o.style.width=n+"%",""===e&&(o.style.right=(100-n)/2+"%");var s=this.shadow.querySelector(".overlay"+(""===e?"":"."+e));o.querySelector(".modal-body-header-titre").innerHTML=i,o.querySelector(".modal-content").innerHTML=t;var r=o.querySelector(".modal-body-header-titre-close"),a=this._swiffle_editor_toolbar_offset();r.style.marginTop=a?50+a+"px":"",o.classList.add("open"),s.classList.add("visible"),document.body.classList.add("swiffle-no-scroll")}},{key:"swiffle_close_modal",value:function(t){var e=this.shadow.querySelector('.modal[data-where="'.concat(t.dataset.where,'"]')),i=this.shadow.querySelector('.overlay[data-where="'.concat(t.dataset.where,'"]'));e.classList.remove("open"),e.style.right="",e.querySelector(".modal-content").innerHTML="",i.classList.remove("visible"),0===this.shadow.querySelectorAll(".overlay.visible").length&&document.body.classList.remove("swiffle-no-scroll")}},{key:"swiffle_close_all_modals",value:function(t){this.ownerDocument.querySelectorAll("swiffle-grid").forEach(function(t){if(t.shadowRoot){var e=t.shadowRoot.querySelectorAll(".modal.open");e.length>0&&(e.forEach(function(t){t.classList.remove("open")}),t.shadowRoot.querySelectorAll(".overlay.visible").forEach(function(t){t.classList.remove("visible")}))}})}},{key:"swiffle_toast",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"==typeof t&&t.includes("user-select:all")){this.swiffle_open_modal('<div class="swiffle-denied" style="padding:10px 4px;line-height:1.5;">'.concat(t,'<p><button type="button" class="swiffle-denied-copy" style="margin-top:12px;padding:6px 14px;cursor:pointer;">').concat(this.swiffleTop._swiffle__("Copy the address to allow"),"</button></p></div>"),"","","50");var n=this.shadow.querySelector('.modal[data-where=""] .swiffle-denied'),o=n&&n.querySelector("span"),s=n&&n.querySelector(".swiffle-denied-copy");if(o&&s){var r=function(){try{var t=document.createRange();t.selectNodeContents(o);var e=window.getSelection();e.removeAllRanges(),e.addRange(t)}catch(t){}};s.addEventListener("click",function(){try{navigator.clipboard.writeText(o.textContent).then(function(){s.textContent="✔"},r)}catch(t){r()}})}}else{this.shadow.getElementById("swiffle-toast-msg").innerHTML=t;var a=this.shadow.getElementById("swiffle-toast");a.style.display="block";var l=this._swiffle_editor_toolbar_offset();a.style.top=l?20+l+"px":"",!0===i&&(a.style.background="white",a.style.color="unset",a.style.minWidth="70vw",a.style.maxWidth="80vw"),setTimeout(function(){var t=e.shadow.getElementById("swiffle-toast");t.style.display="none",t.style.top="",t.style.background="#111111",t.style.color="#eeeeee",t.style.minWidth="unset",t.style.maxWidth="200px"},5e3)}}},{key:"swiffle_zoom_img",value:function(){var t=this;this._listeners_zoom.forEach(function(t){return t()}),this._listeners_zoom=[];var e=this.shadow.querySelector(".zoom-container"),i=this.shadow.getElementById("zoomed-image");e&&i&&(this.shadow.addEventListener("resize",this._updateSizes),this._listeners_zoom.push(function(){return t.shadow.removeEventListener("resize",t._updateSizes)}),e.addEventListener("mousemove",this._movezoom),this._listeners_zoom.push(function(){return e.removeEventListener("mousemove",t._movezoom)}),e.addEventListener("touchmove",this._movezoom),this._listeners_zoom.push(function(){return e.removeEventListener("touchmove",t._movezoom)}),i.addEventListener("touchmove",this._movezoom),this._listeners_zoom.push(function(){return i.removeEventListener("touchmove",t._movezoom)}),e.addEventListener("mouseleave",this._zoomMouseLeave),this._listeners_zoom.push(function(){return e.removeEventListener("mouseleave",t._zoomMouseLeave)}),this._updateSizes())}},{key:"swiffle_gallery_init",value:function(t){var e=this;t._galleryListeners&&t._galleryListeners.forEach(function(t){return t()}),t._galleryListeners=[];var i=t,n=i.querySelector(".woo_like_main-img");if(n){var s=i.querySelector(".woo_like_main"),r=i.querySelectorAll(".woo_like_thumbs div"),a=i.querySelector(".woo_like_zoom-btn"),l=i.querySelector(".woo_like_lightbox"),c=i.querySelector(".woo_like_lightbox-img"),d=i.querySelector(".woo_like_close"),f=i.querySelector(".woo_like_next"),h=i.querySelector(".woo_like_prev"),u=l.parentNode,p=l.nextSibling,w=0,m=!1,v=0;t._onThumbClick=function(t){var e=t.currentTarget;r.forEach(function(t){return t.classList.remove("active")}),e.classList.add("active"),n.src=e.dataset.full,w=o(r).indexOf(e)},t._onMainMouseMove=function(t){var e=s.getBoundingClientRect(),i=(t.clientX-e.left)/e.width*100,o=(t.clientY-e.top)/e.height*100;n.style.transformOrigin="".concat(i,"% ").concat(o,"%"),n.style.transform="scale(2)"},t._onMainMouseLeave=function(){n.style.transform="scale(1)"},t._onMainTouchStart=function(e){t._touchStartX=e.changedTouches[0].clientX,t._touchStartY=e.changedTouches[0].clientY},t._onMainTouchEnd=function(e){var i=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY,a=i-t._touchStartX,l=o-t._touchStartY,c=Math.sqrt(a*a+l*l),d=Date.now(),f=d-v;v=d;var h=s.getBoundingClientRect(),u=(i-h.left)/h.width*100,p=(o-h.top)/h.height*100;if(c<10)f<300?(n.style.transformOrigin="".concat(u,"% ").concat(p,"%"),n.style.transform="scale(3)",m=!0):m?(n.style.transform="scale(1)",m=!1):(n.style.transformOrigin="".concat(u,"% ").concat(p,"%"),n.style.transform="scale(2)",m=!0);else{a>50?w=(w-1+r.length)%r.length:a<-50&&(w=(w+1)%r.length);var _=r[w].dataset.full;n.src=_,r.forEach(function(t){return t.classList.remove("active")}),r[w].classList.add("active"),n.style.transform="scale(1)",m=!1}},t._onZoomClick=function(){e.shadow.querySelectorAll(".swiffle-card-inner.swiffle-card-flipped .woo_like_lightbox").length>0&&(e.shadow.prepend(l),l.classList.add("fulltop")),l.classList.remove("woo_like_hidden"),c.src=r[w].dataset.full;var t=e._swiffle_editor_toolbar_offset();d.style.top=t?20+t+"px":""},t._onCloseClick=function(){if(n.style.transform="scale(1)",m=!1,l.classList.add("woo_like_hidden"),e.shadow.querySelectorAll(".woo_like_lightbox.fulltop").length>0){var t=e.shadow.querySelector(".woo_like_lightbox.fulltop");p?u.insertBefore(t,p):u.appendChild(t),t.classList.remove("fulltop")}},t._onNextClick=function(){w=(w+1)%r.length,c.src=r[w].dataset.full},t._onPrevClick=function(){w=(w-1+r.length)%r.length,c.src=r[w].dataset.full},t._onLightboxTouchStart=function(e){t._ltouchStartX=e.changedTouches[0].clientX},t._onLightboxTouchEnd=function(e){var i=e.changedTouches[0].clientX-t._ltouchStartX;Math.abs(i)>50&&(i>0?h.click():f.click())},r.forEach(function(e){e.addEventListener("click",t._onThumbClick),t._galleryListeners.push(function(){return e.removeEventListener("click",t._onThumbClick)})});var _=matchMedia("(hover: none)").matches;_||(s.addEventListener("mousemove",t._onMainMouseMove),t._galleryListeners.push(function(){return n.removeEventListener("mousemove",t._onMainMouseMove)}),s.addEventListener("mouseleave",t._onMainMouseLeave),t._galleryListeners.push(function(){return n.removeEventListener("mouseleave",t._onMainMouseLeave)})),_&&(s.addEventListener("touchstart",t._onMainTouchStart,{passive:!0}),t._galleryListeners.push(function(){return n.removeEventListener("touchstart",t._onMainTouchStart)}),s.addEventListener("touchend",t._onMainTouchEnd,{passive:!0}),t._galleryListeners.push(function(){return n.removeEventListener("touchend",t._onMainTouchEnd)})),a.addEventListener("click",t._onZoomClick),t._galleryListeners.push(function(){return a.removeEventListener("click",t._onZoomClick)}),d.addEventListener("click",t._onCloseClick),t._galleryListeners.push(function(){return d.removeEventListener("click",t._onCloseClick)}),f.addEventListener("click",t._onNextClick),t._galleryListeners.push(function(){return f.removeEventListener("click",t._onNextClick)}),h.addEventListener("click",t._onPrevClick),t._galleryListeners.push(function(){return h.removeEventListener("click",t._onPrevClick)}),l.addEventListener("touchstart",t._onLightboxTouchStart,{passive:!0}),t._galleryListeners.push(function(){return l.removeEventListener("touchstart",t._onLightboxTouchStart)}),l.addEventListener("touchend",t._onLightboxTouchEnd,{passive:!0}),t._galleryListeners.push(function(){return l.removeEventListener("touchend",t._onLightboxTouchEnd)})}}},{key:"swiffle_add_ghost",value:function(){var t=this.shadowRoot.querySelector(".swiffle-card-container");if(t){var e=t.querySelector(".swiffle-card-ghost");e||((e=document.createElement("div")).className="swiffle-card swiffle-card-ghost",e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.zIndex="1",e.style.transform="translate3d(0,200vh,0)",t.appendChild(e)),e.style.display="",e.style.visibility="hidden",this.ghostCard=e}}},{key:"swiffle_remove_ghost",value:function(){var t=this.shadow.querySelector(".swiffle-card-ghost");t&&(t.innerHTML="",t.style.visibility="hidden")}},{key:"attributeChangedCallback",value:function(t,e,i){e!==i&&this.scheduleRender()}},{key:"swiffle_load_page",value:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=arguments.length>5?arguments[5]:void 0,r=this.component_attributes.cardSource||"",a=["csv:","csvs:","xlsx:","rss:","category:"].some(function(t){return r.startsWith(t)}),l=["csv:","csvs:","xlsx:"].find(function(t){return r.startsWith(t)}),c=l&&/^https?:\/\//i.test(r.slice(l.length));a&&!c||(t.posts=[],t.have_more="n"),this.isRemote(!0)&&(this.isInEditor()?window.top.postMessage({type:"swiffleUnauthorizedDomainNotice"},"*"):(this.swiffle_toast(this.swiffleTop._swiffle__("Service denied")),t.posts=[],t.have_more=!1,this.component_attributes.filterbtnshow=!1));var d="";if(this.have_more=t.have_more,(this.component_attributes.cardSource.startsWith("csv:")||this.component_attributes.cardSource.startsWith("csvs:")||this.component_attributes.cardSource.startsWith("xlsx:")||this.component_attributes.cardSource.startsWith("gsheet:"))&&t.posts.length>0&&t.posts[0]){var f,h,u,p=t.posts.shift(),w=p.find(function(t){return t.toLowerCase().startsWith("img_")}),m=p.find(function(t){return t.toLowerCase().startsWith("tit_")}),v=p.find(function(t){return t.toLowerCase().startsWith("nav_")}),_=p.find(function(t){return!(t.toLowerCase().startsWith("hidden_")||t.toLowerCase().startsWith("nav_")||t.toLowerCase().startsWith("img_")||t.toLowerCase().startsWith("map_")||t.toLowerCase().startsWith("imgz_")||t.toLowerCase().startsWith("slide")||t===m)}),y=Object.fromEntries(p.map(function(t,e){return[t,e]})),g=null!==(f=y[w])&&void 0!==f?f:-1,b=y[m],k=null!==(h=y[_])&&void 0!==h?h:-1,x=null!==(u=y[v])&&void 0!==u?u:-1,S=this.component_attributes.cardFlowTitle,L=this.component_attributes.cardFlowTitleShow?'<div class="swiffle-card-tag">'.concat(S,"</div>"):"";t.posts.forEach(function(t){var i=t[g],n=t[b]||"",o=n,s="";e.component_attributes.cardAbstractShow&&(s="none"===e.component_attributes.cardClick?"<div>".concat(t[k]||"","</div>"):'\n <div class="swiffle-summary"\n style="background: -webkit-linear-gradient('.concat(e.component_attributes.cardFtColor,' 10px, #eee);\n -webkit-background-clip: text;background-clip: text;">\n <div class="swiffle-bottom-blur"></div>\n ').concat(t[k]||"","\n </div>"));var r=[],a=[],l=[],c=null,f=null,h=null,u=[];p.forEach(function(i,o){var s=i.toLowerCase(),d=t[o];if(d&&i!==w&&i!==m&&i!==_&&i!==v&&!s.startsWith("hidden_")){var p="";if(s.startsWith("slide_"))return r.push(encodeURI(d)),void(null===c&&(c=o));if(s.startsWith("slidezoom_"))return a.push(encodeURI(d)),void(null===f&&(f=o));if(s.startsWith("slidefull_"))return l.push(encodeURI(d)),void(null===h&&(h=o));if(s.startsWith("map_")){e.MAP+=1;var y=e.MAP,g=JSON.stringify(String(d)).replace(/</g,"\\u003C").replace(/>/g,"\\u003E").replace(/&/g,"&").replace(/'/g,"'"),b=JSON.stringify(String(n)).replace(/</g,"\\u003C").replace(/>/g,"\\u003E").replace(/&/g,"&").replace(/'/g,"'"),k='\n <iframe style="width:100%;height:calc('.concat(e.component_attributes.cardHeight,' * .6);\n border:0;overflow:hidden;"\n srcdoc=\'<!DOCTYPE html>\n <html>\n <head>\n <title>Carte OpenStreetMap</title>\n <link rel="stylesheet" href="').concat(e._swiffleCssBase,'vendor/leaflet.css"/>\n <script src="').concat(e._swiffleJsBase,'vendor/leaflet/leaflet.js"><\/script>\n <style>\n body {overflow:hidden;padding:0;margin:0;border:0;}\n .leaflet-container {\n padding:0;margin:0;border:0;\n height: calc(').concat(e.component_attributes.cardHeight," * .6);\n width: 100%;\n }\n #fallback_").concat(y," {\n text-align:center;\n padding:1em;\n font-family:sans-serif;\n height: calc(").concat(e.component_attributes.cardHeight,' * .6);\n width: 100%;\n }\n </style>\n </head>\n <body>\n <div id="map_').concat(y,'"></div>\n <div id="fallback_').concat(y,'"></div>\n\n <script>\n const address = ').concat(g,";\n const title = ").concat(b,';\n\n async function getCoordinates(address) {\n const url = "https://nominatim.openstreetmap.org/search?format=json&q=" + encodeURIComponent(address);\n try {\n const response = await fetch(url);\n const data = await response.json();\n return data.length > 0 ? { lat: data[0].lat, lon: data[0].lon } : null;\n } catch (error) {\n return null;\n }\n }\n\n // Inside a page builder editor the map document has no address of\n // its own, so OpenStreetMap refuses its tiles (no Referer, "Access\n // blocked" image instead of an error). There, show the map embed\n // hosted by OpenStreetMap itself, which loads its own tiles.\n const inEditor = ').concat(e.isInEditor()?"true":"false",';\n function switchToOsmEmbed(coords) {\n const fallback = document.getElementById("fallback_').concat(y,'");\n document.getElementById("map_').concat(y,'").style.display = "none";\n fallback.style.display = "block";\n fallback.style.padding = "0";\n const lat = parseFloat(coords.lat), lon = parseFloat(coords.lon), d = 0.01;\n const url = "https://www.openstreetmap.org/export/embed.html?bbox=" + (lon - d) + "," + (lat - d) + "," + (lon + d) + "," + (lat + d) + "&layer=mapnik&marker=" + lat + "," + lon;\n fallback.innerHTML = "<iframe width=\\"100%\\" height=\\"100%\\" frameborder=\\"0\\" src=\\"" + url + "\\"></iframe>";\n }\n\n function switchToUmap(address, coords = null) {\n const fallback = document.getElementById("fallback_').concat(y,'");\n const mapDiv = document.getElementById("map_').concat(y,'");\n mapDiv.style.display = "none";\n fallback.style.display = "block";\n\n let iframeURL = "https://umap.openstreetmap.fr/fr/map/?scaleControl=false&miniMap=false&scrollWheelZoom=false&allowEdit=false&moreControl=false&datalayersControl=false";\n if (coords) {\n iframeURL += "#16/" + coords.lat + "/" + coords.lon;\n }\n\n fallback.innerHTML = "<iframe width=\\"100%\\" height=\\"100%\\" frameborder=\\"0\\" allowfullscreen src=\\"" + iframeURL + "\\"></iframe>";\n }\n\n async function initMap() {\n let coords = null;\n\n if (/^-?\\d{1,3}\\.\\d+,\\s*-?\\d{1,3}\\.\\d+$/.test(address)) {\n const parts = address.split(",");\n const lat = parseFloat(parts[0]);\n const lon = parseFloat(parts[1]);\n coords = { lat: lat, lon: lon };\n } else {\n coords = await getCoordinates(address);\n }\n\n if (coords && inEditor) {\n switchToOsmEmbed(coords);\n return;\n }\n if (coords) {\n try {\n var map = L.map("map_').concat(y,'").setView([coords.lat, coords.lon], 16);\n var tileLayer = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {\n attribution: "© OpenStreetMap contributors"\n });\n\n tileLayer.on("tileerror", function() {\n switchToUmap(address, coords);\n });\n\n tileLayer.addTo(map);\n L.marker([coords.lat, coords.lon]).addTo(map).bindPopup((function(s){var d=document.createElement("div");d.textContent=s;return d.innerHTML;})(title)).openPopup();\n\n setTimeout(function() {\n map.invalidateSize();\n }, 500);\n\n } catch (err) {\n switchToUmap(address, coords);\n }\n } else {\n switchToUmap(address, coords);\n }\n }\n\n initMap();\n <\/script>\n </body>\n </html>\'>\n </iframe>\n ');return p+='\n <div class="custom_container" style="text-align:center;height:220px;">\n <span data-map="'.concat(e.bx(k),'" data-loadedmap="0"></span>\n </div>\n '),void u.push({idx:o,html:p})}if(s.startsWith("img_"))return p+='\n <div data-full="'.concat(encodeURI(d),'" class="custom_container" style="height:unset;">\n <img data-loadedf="0" data-full="').concat(encodeURI(d),'"\n style="width:100%;height:auto;" src="">\n </div>\n '),void u.push({idx:o,html:p});if(s.startsWith("imgz_"))return e.swiffle_isPhoneSize?p+='\n <div class="custom_container">\n <div class="slide"\n data-image="'.concat(encodeURI(d),'"\n data-loaded="0"\n style="background-size: cover;background-position: center center;height:100%;width:100%;position:relative;">\n <button class="woo_like_zoom custom_fs no-flip" aria-label="Zoom">\n <svg class="woo_like_zoom-icon custom_fs no-flip"\n viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="custom_fs no-flip"></circle>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="custom_fs no-flip"></line>\n </svg>\n </button>\n </div>\n </div>\n '):p+='\n <div class="custom_container">\n <div class="slide"\n style="background-image: url('.concat(encodeURI(d),');\n background-size: cover;\n background-position: center center;\n height:100%;width:100%;position:relative;">\n <button class="woo_like_zoom custom_fs no-flip" aria-label="Zoom">\n <svg class="woo_like_zoom-icon custom_fs no-flip"\n viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="custom_fs no-flip"></circle>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="custom_fs no-flip"></line>\n </svg>\n </button>\n </div>\n </div>\n '),void u.push({idx:o,html:p});if(s.startsWith("imgzfs_"))return e.swiffle_isPhoneSize?p+='\n <div class="custom_container">\n <div class="slide"\n data-image="'.concat(encodeURI(d),'"\n data-loaded="0"\n style="background-size: cover;background-position: center center;height:100%;width:100%;position:relative;">\n <button class="woo_like_zoom swiffle-btn-zoom-g no-flip" aria-label="Zoom">\n <svg class="woo_like_zoom-icon swiffle-btn-zoom-g no-flip"\n viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="swiffle-btn-zoom-g no-flip"></circle>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="swiffle-btn-zoom-g no-flip"></line>\n </svg>\n </button>\n </div>\n </div>\n '):p+='\n <div class="custom_container">\n <div class="slide"\n style="background-image: url('.concat(encodeURI(d),');\n background-size: cover;\n background-position: center center;\n height:100%;width:100%;position:relative;">\n <button class="woo_like_zoom swiffle-btn-zoom-g no-flip" aria-label="Zoom">\n <svg class="woo_like_zoom-icon swiffle-btn-zoom-g no-flip"\n viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="swiffle-btn-zoom-g no-flip"></circle>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="swiffle-btn-zoom-g no-flip"></line>\n </svg>\n </button>\n </div>\n </div>\n '),void u.push({idx:o,html:p});p+='<div class="swiffle-block-back">'.concat(d,"</div>"),u.push({idx:o,html:p})}});var y=e.makeSlider("slide",r),S=e.makeSlider("slidezoom",a),E=e.makeSlider("slidefull",l),T="";p.forEach(function(t,e){var i=t.toLowerCase();t===w||t===m||t===_||t===v||i.startsWith("hidden_")||(e===c&&y&&(T+=y),e===f&&S&&(T+=S),e===h&&E&&(T+=E),u.filter(function(t){return t.idx===e}).forEach(function(t){return T+=t.html}))});var C=e.component_attributes.cardClick,I="";x>-1&&(I=t[x]),e.component_attributes.cardClick.startsWith("navigateurl")&&e.component_attributes.cardNavUrl.length>0&&(C="navigateurlnew"===e.component_attributes.cardClick?"navigatenew":"navigate",I=e.component_attributes.cardNavUrl),(x>-1||"navigate"===C||"navigatenew"===C)&&(T="");var M="",P="",q=n;e.component_attributes.cardContentOnly&&"none"!==e.component_attributes.cardClick&&(n="".concat(n,'<span class="swiffle-content-only-badge">→</span>')),e.component_attributes.cardTitleOverPicture?M='\n <div class="swiffle-card-title swiffle-over-picture"\n style="margin-bottom: calc('.concat(e.component_attributes.cardRadiusPxl,'px * .30);">\n ').concat(n,"\n </div>"):P='<div class="swiffle-card-title"><b>'.concat(n,"</b></div>"),d+='\n <div class="swiffle-card">\n <div class="swiffle-card-inner '.concat("modal"==e.component_attributes.cardClick.split("/")[0]?"doModal":"",'"\n data-action="').concat(C,'" data-nav="').concat(I,'">\n \n <div class="swiffle-card-front ').concat(e.component_attributes.cardIconShow?"icon":"",'"\n style="').concat(e.component_attributes.cardContentOnly?"background-color:transparent!important;box-shadow:unset;":"",'">\n <div class="swiffle-card-body">\n <div class="swiffle-u-card-header">\n <img src="').concat(i,'" alt="').concat(q,'">\n ').concat(M,'\n </div>\n <div class="swiffle-u-card-body">\n ').concat(P,"\n ").concat(L,"\n ").concat(s,'\n </div>\n </div>\n </div>\n\n <div class="swiffle-card-back">\n <div class="swiffle-card-title-back">').concat(o,"</div>\n ").concat(T,"\n <br><br><br><br>\n </div>\n </div>\n </div>\n ")})}if(this.component_attributes.cardSource.startsWith("rss:")&&t.posts.forEach(function(t){var i="";t.video&&(i=t.video);var n="";1==e.component_attributes.cardNavShow&&(t.url,n='<a href="'.concat(t.url,'" target="_blank" style="margin-left:15px;" class="swiffle-btn no-flip">').concat(s._swiffle__("Visit Site"),"</a>"));var o=""==e.component_attributes.cardFlowTitle.trim()?t.tag:e.component_attributes.cardFlowTitle,r="";1==e.component_attributes.cardFlowTitleShow&&(r='<div class="swiffle-card-tag">'.concat(o,"</div>"));var a="";1==e.component_attributes.cardAbstractShow&&(a="none"===e.component_attributes.cardClick?"<div>".concat(t.description,"</div>"):'<div class="swiffle-summary" style="background: -webkit-linear-gradient('.concat(e.component_attributes.cardFtColor,' 10px, #eee);-webkit-background-clip: text;background-clip: text;"><div class="swiffle-bottom-blur"></div>').concat(t.description,"</div>")),t.author_display&&t.author_display.length>1&&t.author_display;var l="",c="",f=String(t.title).replace(/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),h=f;1==e.component_attributes.cardContentOnly&&"none"!==e.component_attributes.cardClick&&(h="".concat(f,'<span class="swiffle-content-only-badge">→</span>')),1==e.component_attributes.cardTitleOverPicture?l='<div style="margin-bottom: calc( '.concat(e.component_attributes.cardRadiusPxl,'px * .30 );" class="swiffle-card-title swiffle-over-picture">').concat(h,"</div>"):c='<div class="swiffle-card-title"><b>'.concat(h,"</b></div>"),d+='\n <div class="swiffle-card">\n <div class="swiffle-card-inner '.concat("modal"==e.component_attributes.cardClick.split("/")[0]?"doModal":"",'" data-action="').concat(e.component_attributes.cardClick,'" data-nav="').concat(t.url,'">\n <div class="swiffle-card-front ').concat(1==e.component_attributes.cardIconShow?"icon":"",'" style="').concat(1==e.component_attributes.cardContentOnly?"background-color:transparent!important;box-shadow:unset;":"",'">\n <div class="swiffle-card-body">\n <div class="swiffle-u-card-header">\n <img src="').concat(t.img,'" alt="').concat(f,'">\n ').concat(l,'\n </div>\n <div class="swiffle-u-card-body">\n ').concat(c,"\n ").concat(r,"\n ").concat(a,'\n </div>\n </div>\n </div>\n <div class="swiffle-card-back">\n <div class="swiffle-card-title-back">').concat(f,"</div>\n ").concat(i,'\n <p class="adjust">').concat(t.description,'</p>\n <img src="" data-full="').concat(t.img,'" data-loadedf="0" alt="').concat(f,'" style="width:100%;">\n \x3c!--p class="adjust swiffle-font-tiny">$ {the_content}</p--\x3e\n <br>\n <div class="swiffle-author">\n ').concat(t.source_logo?'<img class="swiffle-author-logo" src="'.concat(t.source_logo,'" alt="">'):"",'\n <span class="swiffle-author-name">').concat(t.author_display,"</span>\n </div>\n <br>\n ").concat(n,"\n <br><br><br><br><br>\n </div>\n </div>\n </div>\n ")}),this.component_attributes.cardSource.startsWith("category:")){var E=this.bxd(t.site_header).replace(/.x3C/g,"<").replace(/\t/g,"").replace(/:root{/g,":host{").replace(/\bhtml\s*{/g,":host{").replace(/\bbody\s*{/g,":host{"),T=document.createElement("span");T.innerHTML=E,0==i&&(T.querySelectorAll("[id]").forEach(function(t){e.shadow.querySelectorAll("#".concat(t.id)).length>0&&t.remove()}),T.querySelectorAll("[href").forEach(function(t){e.shadow.querySelectorAll("[href='".concat(t.href,"']")).length>0&&t.remove()})),T.querySelectorAll("meta,title,.swiffle-only").forEach(function(t){t.remove()});var C=function(t){try{return new URL(t).pathname.split("/").pop()}catch(e){return t}};if(T.querySelectorAll("script").forEach(function(t){if(t.src){var i=C(t.src);if(!o(document.querySelectorAll("script[src]")).some(function(t){return C(t.src)===i})){var n=document.createElement("script");n.src=t.src,n.async=!1,document.head.appendChild(n)}}else if(!e._isWP&&t.textContent.trim()){var s=t.textContent.trim(),r="swi"+e.bx(s.slice(0,256));if(!document.head.querySelector("script[data-swk='".concat(r,"']"))){var a=document.createElement("script");a.textContent=s,a.dataset.swk=r,document.head.appendChild(a)}}t.remove()}),d+=T.innerHTML,t.posts.forEach(function(t){var i="";switch(e.component_attributes.cardimgsize){case"large":i=0==t.img?"":'<img src="'.concat(t.img,'" alt="').concat(t.title,'" />');break;case"medium":i=0==t.img?"":'<img src="'.concat(t.img_medium,'" alt="').concat(t.title,'" />');break;case"thumbnail":i=0==t.img?"":'<img src="'.concat(t.img_thumbnail,'" alt="').concat(t.title,'" />')}var o=document.createElement("span");o.innerHTML=t.content;var s=""==e.component_attributes.cardFlowTitle.trim()?t.category:e.component_attributes.cardFlowTitle,r="";1==e.component_attributes.cardFlowTitleShow&&(r='<div class="swiffle-card-tag">'.concat(s,"</div>"));var a="";1==e.component_attributes.cardAbstractShow&&(a="none"===e.component_attributes.cardClick?"<div>".concat(t.content,"</div>"):'<div class="swiffle-summary" style="background: -webkit-linear-gradient('.concat(e.component_attributes.cardFtColor,' 10px, #eee);-webkit-background-clip: text;background-clip: text;"><div class="swiffle-bottom-blur"></div>').concat(o.innerText,"</div>"));var l="",c="",f=t.title;1==e.component_attributes.cardContentOnly&&"none"!==e.component_attributes.cardClick&&(f="".concat(t.title,'<span class="swiffle-content-only-badge">→</span>')),1==e.component_attributes.cardTitleOverPicture?l='<div style="margin-bottom: calc( '.concat(e.component_attributes.cardRadiusPxl,'px * .30 );" class="swiffle-card-title swiffle-over-picture">').concat(f,"</div>"):c='<div class="swiffle-card-title"><b>'.concat(f,"</b></div>");var h=e.component_attributes.cardClick,u=t.url;e.component_attributes.cardClick.startsWith("navigateurl")&&t.navurl&&(h="navigate","navigateurlnew"===e.component_attributes.cardClick&&(h="navigatenew"),u=t.navurl),d+='\n <div class="swiffle-card">\n <div class="swiffle-card-inner '.concat("modal"==e.component_attributes.cardClick.split("/")[0]?"doModal":"",'" data-action="').concat(h,'" data-nav="').concat(u,'">\n <div class="swiffle-card-front ').concat(1==e.component_attributes.cardIconShow?"icon":"",'" style="').concat(1==e.component_attributes.cardContentOnly?"background-color:transparent!important;box-shadow:unset;":"",'">\n <div class="swiffle-card-body">\n <div class="swiffle-u-card-header">\n ').concat(i,"\n ").concat(l,'\n </div>\n <div class="swiffle-u-card-body">\n ').concat(c,"\n ").concat(r,"\n ").concat(a,'\n </div>\n </div>\n </div>\n <div class="swiffle-card-back">\n <div class="swiffle-card-title-back">').concat(t.title,"</div>\n <p>").concat(t.content,'</p>\n <span class="COMMENT_').concat(t.ID,'"></span>\n </div>\n </div>\n </div>\n '),1==e.component_attributes.blockShowComments&&n.push(t.ID)}),t.site_footer){var I=this.bxd(t.site_footer).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),M=document.createElement("div");M.innerHTML=I,M.querySelectorAll("script").forEach(function(t){if(t.src){var e=t.src.split("/").pop();if(!o(document.querySelectorAll("script[src]")).some(function(t){return t.src.split("/").pop()===e})){var i=document.createElement("script");i.src=t.src,i.async=!1,document.head.appendChild(i)}}})}requestAnimationFrame(function(){e.shadow.querySelectorAll(".wp-block-gallery").forEach(function(t){if(!t.dataset.swiffleGalleryFixed){var e=o(t.classList).find(function(t){return t.startsWith("columns-")}),i=e?parseInt(e.split("-")[1]):3;t.style.cssText+=";display:grid;grid-template-columns:repeat(".concat(i,",1fr);gap:4px;"),t.querySelectorAll("figure.wp-block-image, figure.wp-block-gallery-item, li.blocks-gallery-item").forEach(function(t){t.style.cssText+=";margin:0;width:100%;";var e=t.querySelector("img");e&&(e.style.cssText+=";width:100%;height:auto;display:block;")}),t.dataset.swiffleGalleryFixed="1"}})})}return d}},{key:"swiffle_endSwipe",value:function(t){var e=this.ownerDocument,i=this.swiffleTop||window;if(e.body.classList.remove("swiffle-no-scroll"),e.body.style.position="",e.body.style.top="",e.body.style.width="",null!==this.memoScroll&&void 0!==this.memoScroll){var n=parseInt(this.memoScroll,10);i.scrollTo(0,n),this.memoScroll=null}this.preventTouchScroll&&(e.removeEventListener("touchmove",this.preventTouchScroll),this.preventTouchScroll=null);var o=this.findUpTag(t,"swiffle-container-fluid");o&&o.classList.remove("swiffle-swipe-cards-overlay"),this.shadowRoot.host.classList.remove("swiffle-full-mode");var s=this.findUpTag(t,"swiffle-card-container");s&&(s.classList.remove("swiffle-card-swipable","swiffle-card-swipable-full"),s.querySelectorAll(".swiffle-card").forEach(function(t){t.classList.remove("swipable","viewed"),t.style.position="",t.style.top="",t.style.left="",t.style.transform="",t.style.zIndex="",t.style.transitionDuration="",t.style.marginTop="",t.style.marginLeft="";var e=t.querySelector(".swiffle-card-inner");e&&!e.classList.contains("more")&&e.classList.remove("swiffle-card-flipped"),"none"!==t.style.display&&(t.style.visibility="visible")}),this.swiffle_remove_ghost(),this.cards.forEach(function(t){t.style.position="",t.style.top="",t.style.left=""}),this.currentIndex=0)}},{key:"swiffle_toFluid",value:function(t){var e=this.findUpTag(t,"swiffle-card-container");null!==e&&(this.swiffle_endSwipe(t),e.classList.remove("auto-overflow-scroll"),this.activeLayout="fluid",this.ghostCard&&(this.ghostCard.style.display="none"))}},{key:"swiffle_toLine",value:function(t){var e=this.findUpTag(t,"swiffle-card-container");null!==e&&(this.swiffle_endSwipe(t),e.classList.add("auto-overflow-scroll"),this.activeLayout="line")}},{key:"swiffle_toSwipe",value:function(t){var e=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.ownerDocument,s=this.findUpTag(t,"swiffle-container-fluid");!0===i&&this.swiffle_endSwipe(t);var r=function(){!0===n&&!0===i&&(o.body.classList.add("swiffle-no-scroll"),o.body.style.position="fixed",o.body.style.top="-".concat(e.memoScroll||0,"px"),o.body.style.width="100%"),!0!==n||e.preventTouchScroll||(e.preventTouchScroll=function(t){var i=t.composedPath().some(function(t){return t instanceof Element&&(t.classList.contains("modal")&&t.classList.contains("open")||t.classList.contains("swiffle-card-back"))}),n="swipe"===e.activeLayout||"swipefull"===e.activeLayout;!i&&n&&t.preventDefault()},o.addEventListener("touchmove",e.preventTouchScroll,{passive:!1})),!0===n&&!0===i&&(s&&s.classList.add("swiffle-swipe-cards-overlay"),e.shadowRoot.host.style.setProperty("--swiffle-cardHeight","85vh"),e.shadowRoot.host.style.setProperty("--swiffle-cardWidth","60vh"),e.shadowRoot.host.style.setProperty("--swiffle-cardWidthMax","90vw"));var t=e.shadowRoot.querySelector(".swiffle-card-container");t&&(e.swiffle_refreshCards(),e.cards.length&&(e.activeLayout=n?"swipefull":"swipe",e.swiffle_toSwipe_continueCardStack(t,n,s)))};if(!0===n&&!0===i){var a=this.swiffleTop||window;this.memoScroll=a.scrollY||o.documentElement.scrollTop}if(this._isSafariIOS&&!0===n){var l=this.swiffleTop||window;l.scrollTo(l.scrollX||0,0),requestAnimationFrame(function(){requestAnimationFrame(r)})}else r()}},{key:"swiffle_toSwipe_continueCardStack",value:function(t,e,i){var n=this;this.cards.forEach(function(t){t.style.position="absolute",t.style.top="0",t.style.left="0"}),t.classList.remove("swiffle-card-swipable","swiffle-card-swipable-full","auto-overflow-scroll"),t.classList.add(e?"swiffle-card-swipable-full":"swiffle-card-swipable");var o=this.cards.findIndex(function(t){return!t.classList.contains("viewed")});-1===o&&(o=0),this.currentIndex=o,this.cards.forEach(function(t,e){t.classList.remove("swipable"),t.style.transitionDuration="",t.style.marginTop="",t.style.marginLeft="",e<n.currentIndex?(t.classList.add("viewed"),t.style.transform="translate3d(0,200vh,0)",t.style.zIndex=1):e===n.currentIndex?(t.classList.remove("viewed"),t.style.transform="translate3d(0,0,0)",t.style.zIndex=3,t.classList.add("swipable")):e===n.currentIndex+1?(t.classList.remove("viewed"),t.style.transform="translate3d(0,0,0)",t.style.zIndex=2):(t.classList.remove("viewed"),t.style.transform="translate3d(0,200vh,0)",t.style.zIndex=1)}),i&&this.swiffle_add_ghost()}},{key:"swiffle_onSwipeSuccess",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"forward";if(!this.swiffle_swipeEnding){this.swiffle_swipeEnding=!0,clearTimeout(this._swipeEndingWatchdog),this._swipeEndingWatchdog=setTimeout(function(){t.swiffle_swipeEnding&&(console.warn("Swiffle: swipeEnding lock force-released by the watchdog (500ms) — an unhandled exit path likely still exists."),t.swiffle_swipeEnding=!1)},500);try{if(!this.shadowRoot.querySelector(".swiffle-card-container")||!this.cards.length)return this.swiffle_swipeEnding=!1,void clearTimeout(this._swipeEndingWatchdog);if(!this.cards[this.currentIndex])return this.swiffle_swipeEnding=!1,void clearTimeout(this._swipeEndingWatchdog)}catch(t){return console.error("Swiffle: error in swiffle_onSwipeSuccess, lock released to avoid a deadlock.",t),this.swiffle_swipeEnding=!1,void clearTimeout(this._swipeEndingWatchdog)}setTimeout(function(){try{var i=t.cards[t.currentIndex];i&&(i.style.visibility="hidden"),"forward"===e&&t.currentIndex<t.cards.length-1?t.currentIndex++:"backward"===e&&t.currentIndex>0&&t.currentIndex--,t.swiffle_updateStack();var n=t.cards[t.currentIndex];if(n&&(n.style.visibility="visible"),t.ghostCard){t.ghostCard.style.visibility="hidden",t.ghostCard.style.transform="translate3d(0,200vh,0)";var o=t.currentIndex+1,s=t.cards[o];s&&(s.style.visibility="visible")}}catch(t){console.error("Swiffle: error while finalizing the swipe, lock released to avoid a deadlock.",t)}finally{t.swiffle_swipeEnding=!1,clearTimeout(t._swipeEndingWatchdog)}},3)}}},{key:"swiffle_onSwipeCancel",value:function(){var t=this;if(this.shadowRoot.querySelector(".swiffle-card-container")&&this.cards.length){var e=this.cards[this.currentIndex];if(e){if(e.style.transitionDuration=".3s",e.style.marginLeft="0",e.style.marginTop="0",e.style.left="0",e.style.top="0",e.style.transform="translate3d(0,0,0) rotate(0deg)",e.style.zIndex=3,this.cards.forEach(function(e,i){e.style.left="",e.style.top="",i<t.currentIndex?(e.classList.add("viewed"),e.style.transform="translate3d(0,200vh,0)",e.style.zIndex=1):i===t.currentIndex?(e.classList.remove("viewed"),e.style.transform="translate3d(0,0,0)",e.style.zIndex=3,e.classList.add("swipable")):i===t.currentIndex+1?(e.classList.remove("viewed"),e.style.transform="translate3d(0,0,0)",e.style.zIndex=2):(e.classList.remove("viewed"),e.style.transform="translate3d(0,200vh,0)",e.style.zIndex=1)}),this.ghostCard){this.ghostCard.style.visibility="hidden",this.ghostCard.style.transform="translate3d(0,200vh,0)";var i=this.currentIndex+1,n=this.cards[i];n&&(n.style.visibility="visible")}setTimeout(function(){e.style.transitionDuration=""},300),this.swiffle_sw_initEvt={}}}}},{key:"swiffle_updateStack",value:function(){var t=this,e=this.shadowRoot.querySelector(".swiffle-card-container");if(e&&this.cards.length){this.cards.forEach(function(e,i){e.classList.remove("swipable"),e.style.transitionDuration="",e.style.marginLeft="",e.style.marginTop="",e.style.left="",e.style.top="",e.style.visibility="visible",i<t.currentIndex?(e.classList.add("viewed"),e.style.transform="translate3d(0,200vh,0)",e.style.zIndex=1):i===t.currentIndex?(e.classList.remove("viewed"),e.style.transform="translate3d(0,0,0)",e.style.zIndex=3,e.classList.add("swipable")):i===t.currentIndex+1?(e.classList.remove("viewed"),e.style.transform="translate3d(0,0,0)",e.style.zIndex=2):(e.classList.remove("viewed"),e.style.transform="translate3d(0,200vh,0)",e.style.zIndex=1)});var i=e.querySelector(".swiffle-card-ghost");this.cards[this.currentIndex+1]&&i?this.swiffle_add_ghost():i&&this.swiffle_remove_ghost(),this.swiffle_sw_initEvt={},this.swiffle_swipeEnding=!1}}},{key:"swiffle_addCardToStack",value:function(t){this.shadowRoot.querySelector(".swiffle-card-container")&&(this.cards[this.currentIndex].insertAdjacentElement("afterend",t),this.cards.splice(this.currentIndex+1,0,t))}},{key:"swiffle_fix_embeds",value:function(){var t=this;if(!this._embedObserver&&this.component_attributes.cardSource.startsWith("category:")){var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56.25,n=document.createElement("iframe");n.src=t,n.allow=e||"accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture;web-share",n.allowFullscreen=!0,n.dataset.swkFixed="1",n.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;border:0;";var o=document.createElement("div");return o.className="no-flip",o.style.cssText="position:relative;padding-bottom:"+i.toFixed(2)+"%;height:0;overflow:hidden;max-width:100%;",o.appendChild(n),o},i=function(t){try{return JSON.parse(t.dataset.settings||"{}")}catch(t){return{}}},n=function(t){t.style.setProperty("overflow-x","auto","important"),t.style.setProperty("max-width","100%","important"),t.style.setProperty("display","block","important")};this._embedObserver=new MutationObserver(function(){t.shadow.querySelectorAll(".wp-block-audio audio:not([data-swk-fixed])").forEach(function(t){t.dataset.swkFixed="1",t.classList.add("no-flip"),t.style.setProperty("width","100%","important"),t.style.setProperty("max-width","100%","important"),t.style.setProperty("display","block","important")}),t.shadow.querySelectorAll(".wp-block-table:not([data-swk-fixed])").forEach(function(t){t.dataset.swkFixed="1",n(t);var e=t.querySelector("table");e&&e.style.setProperty("min-width","100%","important")}),t.shadow.querySelectorAll(".swiffle-card-back img:not([data-swk-fixed]), .modal-body img:not([data-swk-fixed])").forEach(function(t){t.closest(".wp-block-gallery")||(t.dataset.swkFixed="1",t.style.setProperty("max-width","100%","important"),t.style.setProperty("height","auto","important"),t.style.setProperty("display","block","important"),t.style.setProperty("border-radius","var(--swiffle-cardImgRadiusPxl)","important"))}),t.shadow.querySelectorAll(".wp-block-code:not([data-swk-fixed]),.wp-block-preformatted:not([data-swk-fixed])").forEach(function(t){t.dataset.swkFixed="1",n(t);var e="PRE"===t.tagName?t:t.querySelector("pre");e&&(e.style.setProperty("overflow-x","auto","important"),e.style.setProperty("white-space","pre","important"))}),t.shadow.querySelectorAll('.wp-block-embed__wrapper iframe:not([data-swk-fixed]),.wp-video iframe:not([data-swk-fixed]),iframe[src*="youtube"]:not([data-swk-fixed]),iframe[src*="vimeo"]:not([data-swk-fixed]),iframe[src*="spotify"]:not([data-swk-fixed]),iframe[src*="soundcloud"]:not([data-swk-fixed]),iframe[src*="dailymotion"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";var e=parseInt(t.width||t.getAttribute("width")||560),i=parseInt(t.height||t.getAttribute("height")||315)/e*100,n=t.closest(".wp-block-embed__wrapper")||t.parentElement;n&&(n.classList.add("no-flip"),n.style.setProperty("position","relative","important"),n.style.setProperty("padding-bottom",i.toFixed(2)+"%","important"),n.style.setProperty("height","0","important"),n.style.setProperty("overflow","hidden","important"),n.style.setProperty("max-width","100%","important"),t.style.setProperty("position","absolute","important"),t.style.setProperty("top","0","important"),t.style.setProperty("left","0","important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","100%","important"),t.style.setProperty("border","0","important"))}),t.shadow.querySelectorAll(".wp-block-video video:not([data-swk-fixed])").forEach(function(t){t.dataset.swkFixed="1",t.classList.add("no-flip"),t.style.setProperty("width","100%","important"),t.style.setProperty("max-width","100%","important"),t.style.setProperty("height","auto","important"),t.style.setProperty("display","block","important")}),t.shadow.querySelectorAll('[data-e-type="e-youtube"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var n=i(t),o=n.source||"",s="";try{var r=new URL(o);s=r.searchParams.get("v")||r.pathname.replace(/^\//,"")}catch(t){}if(!s)return;var a=new URLSearchParams;n.autoplay&&a.set("autoplay","1"),n.mute&&a.set("mute","1"),n.controls||a.set("controls","0"),n.cc_load_policy&&a.set("cc_load_policy","1"),n.loop&&a.set("loop","1"),!1===n.rel&&a.set("rel","0"),n.start&&a.set("start",n.start),n.end&&a.set("end",n.end);var l=(n.privacy?"https://www.youtube-nocookie.com":"https://www.youtube.com")+"/embed/"+s,c=a.toString();c&&(l+="?"+c),t.replaceWith(e(l))}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-vimeo"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var n=i(t),o="";try{o=new URL(n.source||"").pathname.replace(/^\//,"")}catch(t){}if(!o)return;var s=new URLSearchParams;n.autoplay&&s.set("autoplay","1"),n.mute&&s.set("muted","1"),n.controls||s.set("controls","0"),n.loop&&s.set("loop","1");var r="https://player.vimeo.com/video/"+o,a=s.toString();a&&(r+="?"+a),t.replaceWith(e(r))}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-dailymotion"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var n=i(t),o="";try{o=new URL(n.source||"").pathname.split("/").pop()}catch(t){}if(!o)return;var s=new URLSearchParams;n.autoplay&&s.set("autoplay","1"),n.mute&&s.set("mute","1"),n.controls||s.set("controls","0"),n.loop&&s.set("loop","1");var r="https://www.dailymotion.com/embed/video/"+o,a=s.toString();a&&(r+="?"+a),t.replaceWith(e(r))}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-soundcloud"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var e=i(t),n=e.source||e.url||"";if(!n)return;var o="https://w.soundcloud.com/player/?"+new URLSearchParams({url:encodeURIComponent(n),color:"%23ff5500",auto_play:e.autoplay?"true":"false",hide_related:"false",show_comments:"true",show_user:"true",show_reposts:"false",show_teaser:"true",visual:"true"}).toString(),s=document.createElement("div");s.className="no-flip",s.style.cssText="max-width:100%;";var r=document.createElement("iframe");r.src=o,r.style.cssText="width:100%;height:300px;border:0;display:block;",r.dataset.swkFixed="1",r.allow="autoplay",s.appendChild(r),t.replaceWith(s)}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-self-hosted-video"]:not([data-swk-fixed]),.e-self-hosted-video-base:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1",t.classList.add("no-flip"),t.style.setProperty("width","100%","important"),t.style.setProperty("max-width","100%","important"),t.style.setProperty("height","auto","important"),t.style.setProperty("display","block","important"),t.style.setProperty("margin","0","important"),t.style.setProperty("padding","0","important"),t.style.setProperty("box-sizing","border-box","important");for(var e=t.parentElement;e&&!e.classList.contains("swiffle-card-back")&&!e.classList.contains("modal-content")&&!e.classList.contains("modal-body");)e.style.setProperty("overflow","hidden","important"),e.style.setProperty("max-width","100%","important"),e.style.setProperty("margin-left","0","important"),e.style.setProperty("padding-left","0","important"),e.style.setProperty("box-sizing","border-box","important"),e=e.parentElement}),t.shadow.querySelectorAll('[data-e-type="e-google-map"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var n=i(t),o=encodeURIComponent(n.address||n.location||"");if(!o)return;var s="https://www.openstreetmap.org/export/embed.html?layer=mapnik&query="+o;t.replaceWith(e(s,"",50))}catch(t){}}),t.shadow.querySelectorAll('[data-e-type="e-countdown"]:not([data-swk-fixed])').forEach(function(t){t.dataset.swkFixed="1";try{var e=i(t),n=new Date(e.due_date||e.date+" "+(e.time||"00:00:00"));if(isNaN(n))return;var o=document.createElement("div");o.style.cssText="display:flex;gap:12px;justify-content:center;flex-wrap:wrap;font-family:inherit;";var s=["Days","Hours","Minutes","Seconds"].map(function(t){var e=document.createElement("div");e.style.cssText="text-align:center;min-width:52px;";var i=document.createElement("div");i.style.cssText="font-size:2em;font-weight:700;line-height:1;",i.textContent="00";var n=document.createElement("div");return n.style.cssText="font-size:.7em;opacity:.7;margin-top:4px;",n.textContent=t,e.appendChild(i),e.appendChild(n),o.appendChild(e),i}),r=function(){var t=Math.max(0,n-Date.now());s[0].textContent=String(Math.floor(t/864e5)).padStart(2,"0"),s[1].textContent=String(Math.floor(t/36e5)%24).padStart(2,"0"),s[2].textContent=String(Math.floor(t/6e4)%60).padStart(2,"0"),s[3].textContent=String(Math.floor(t/1e3)%60).padStart(2,"0"),t>0&&requestAnimationFrame(r)};r(),t.replaceWith(o)}catch(t){}})}),this._embedObserver.observe(this.shadow,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["src"]})}}},{key:"findUpTag",value:function(t,e){if(!t)return null;if(t.classList&&t.classList.contains(e))return t;for(;t.parentNode;)if((t=t.parentNode).classList&&t.classList.contains(e))return t;return null}},{key:"swiffle_getParamValue",value:function(t,e){return new URL(t).searchParams.get(e)}},{key:"bx",value:function(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode("0x"+e)}))}},{key:"bxd",value:function(t){return decodeURIComponent(atob(t).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))}},{key:"callswiffleapi",value:function(t){var e=this;if(this._msgHooked){if(void 0===this.awaitProxyRetries&&(this.awaitProxyRetries=10),!this.component_attributes.proxy&&this.awaitProxyRetries>0)return this.awaitProxyRetries--,void setTimeout(function(){e.callswiffleapi(t)},100);if(this.awaitProxyRetries=void 0,this._knownDeniedProxy===this.component_attributes.proxy&&(this._intlCorrectionRetries=void 0,this._correctingIntl=!1),"get_intl"!==t.action&&this._intlProxy!==this.component_attributes.proxy&&this._knownDeniedProxy!==this.component_attributes.proxy){if(void 0===this._intlCorrectionRetries&&(this._intlCorrectionRetries=30),this._intlCorrectionRetries>0){if(this._intlCorrectionRetries--,!this._correctingIntl){this._correctingIntl=!0,this.translate_ready=0;var i=this.component_attributes.proxy,n={action:"get_intl",callback:"get_intl,"+this.ID};this.callswiffleapi(n),this._lastIntlBridge=n.bridge,this._lastIntlRequestedForProxy=i}return void setTimeout(function(){e.callswiffleapi(t)},100)}this._intlCorrectionRetries=void 0}else this._intlCorrectionRetries=void 0;""!==this.component_attributes.blockLang&&(t.locale=this.component_attributes.blockLang);var o,s=document.createElement("iframe");s.style.display="none",s.classList.add("bz"),s.classList.add("swiffleX"),o=window.swiffle_cur_bridge,s.id="swifflePool"+window.swiffle_cur_bridge,window.swiffle_cur_bridge+=1,this.shadow.appendChild(s),t.bridge=o,this._bridgeProxy||(this._bridgeProxy={}),this._bridgeProxy[o]=this.component_attributes.proxy;var r=this.component_attributes.proxy;setTimeout(function(){if(e.shadow&&e.shadow.querySelector("#"+s.id)){s.remove();var i=e._lastReplyByProxy&&e._lastReplyByProxy[r];if(i&&Date.now()-i<3e4)return void console.warn("Swiffle: reply for bridge "+s.id+" ("+t.action+") not matched; the source site is answering, no alert shown.");e.style.display="",e.swiffle_toast(e.swiffleTop._swiffle__("No response from the source site — check the URL is correct and reachable."))}},1e4);var a="blob:"===window.location.protocol?"y":"n";t.isblob=a,t.iseditor=this.isInEditor()?"y":"n",this.swiffleTop||(this.swiffleTop={}),this.swiffleTop.SWIFFLE_TOKENS||(this.swiffleTop.SWIFFLE_TOKENS={});var l=this.getSwiffleTokenStorageKey();if(!this.swiffleTop.SWIFFLE_TOKENS[l])try{var c=this.swiffleTop.localStorage.getItem(l);c&&(this.swiffleTop.SWIFFLE_TOKENS[l]=c)}catch(t){}this.swiffleTop.SWIFFLE_TOKENS[l]&&(t.swiffle_token=this.swiffleTop.SWIFFLE_TOKENS[l]);var d=window;try{for(;"null"===d.location.origin&&d!==d.parent;)(d=d.parent).location.href}catch(t){d=window}var f=new URL(d.location.href);t.replyto=("y"===a?"":f.origin)+(f.pathname.endsWith("/")?f.pathname:f.pathname+"/");var h=this.component_attributes.proxy,u=null;if("y"===a&&"y"===t.iseditor)try{if(window.parent&&"blob:"!==window.parent.location.protocol&&"function"==typeof window.parent.fetch){window.swiffle_origin_verify||(window.swiffle_origin_verify={});var p=window.swiffle_origin_verify[h];if(!p||Date.now()-p.at>2e4){var w=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(function(t){return t.toString(16).padStart(2,"0")}).join(""),m=window.parent.fetch(h+"?boqVpod_verify="+w,{mode:"no-cors"}).catch(function(){});p={token:w,at:Date.now(),promise:Promise.race([m,new Promise(function(t){return setTimeout(t,2e3)})])},window.swiffle_origin_verify[h]=p}t.originToken=p.token,u=p.promise}}catch(t){}u?u.then(function(){s.src=h+"?boqVpod_call="+e.bx(JSON.stringify(t))}):s.src=h+"?boqVpod_call="+this.bx(JSON.stringify(t))}else this._pendingApiCalls.push(t)}},{key:"getData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"renderTop",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"false",n="e30=",o="e30=",s=this.getAttribute("blockdata");if(s&&(o=s),""!==this.component_attributes.proxy){if("false"!==i)return void this.callswiffleapi({action:"getposts",order:this.component_attributes.orderby,block_filter:this.filter,pg:t,ps:this.component_attributes.blockcardsperpg,gets:n,blockdata:o,maxonly:i,headers:"y",cardSource:this.component_attributes.cardSource,callback:e+","+this.ID});"e30="===this.filter?this.callswiffleapi({action:"getposts",order:this.component_attributes.orderby,filtertitle:this.component_attributes.filtertitle,pg:t,ps:this.component_attributes.blockcardsperpg,gets:n,blockdata:o,headers:"y",cardSource:this.component_attributes.cardSource,callback:e+","+this.ID}):this.callswiffleapi({action:"getposts",order:this.component_attributes.orderby,block_filter:this.filter,pg:t,ps:this.component_attributes.blockcardsperpg,gets:n,blockdata:o,headers:"y",cardSource:this.component_attributes.cardSource,callback:e+","+this.ID})}}},{key:"isInCrossOriginFrame",value:function(){if(window===window.top)return!1;try{return window.top.document,!1}catch(t){return!0}}},{key:"swiffleNavigate",value:function(t,e){if(this.isInCrossOriginFrame())try{window.top.location.href=t}catch(e){window.open(t,"_blank")}else e.location.href=t}},{key:"getSwiffleGlobalWindow",value:function(){var t=window;try{for(;t!==t.parent;){if(t.SWIFFLE_AJAX_URL&&"blob:"!==t.location.protocol)return t;t=t.parent}return window.parent.document,window.parent}catch(t){return window}}},{key:"loadSwiffleCss",value:function(){if(!this.cssLoaded){this.cssLoaded=!0;var t=new Date,e="".concat(t.getFullYear()).concat(t.getMonth()+1).concat(t.getDate()),i=e;this.swiffleTop&&this.swiffleTop.SWIFFLE_CACHE_VERSION&&(i=this.swiffleTop.SWIFFLE_CACHE_VERSION),this.swifflegrid_css=document.createElement("link"),this.swifflegrid_css.setAttribute("rel","stylesheet"),this.shadow.appendChild(this.swifflegrid_css);var n=function(){if(!p)return null;try{var t=new URL(p,document.baseURI);return/\/js\//.test(t.pathname)?(t.pathname=t.pathname.replace(/\/js\/[^/]+$/,"/css/swifflegrid.css"),t.href):null}catch(t){return null}}(),o=n||"".concat(this.component_attributes.componentPath,"swifflegrid.css?v=").concat(i),s=n?n.replace(/swifflegrid\.css.*$/,""):this.component_attributes.componentPath;this._swiffleCssBase=s,this._swiffleJsBase=function(){if(!p)return null;try{return new URL(p,document.baseURI).href.replace(/[^/]+$/,"")}catch(t){return null}}()||s.replace("/css/","/js/"),this.swifflegrid_css.setAttribute("href",o);var r="".concat(s,"swifflegrid_custom.css?v=").concat(e),a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("href",r),this.shadow.appendChild(a)}}},{key:"_swiffle_fix_yt_close",value:function(t){var e=this._swiffle_editor_toolbar_offset();if(e){var i=t.querySelector(".yt-content"),n=t.querySelector(".yt-close");i.getBoundingClientRect().top-40<e&&(n.style.top=e-i.getBoundingClientRect().top+"px")}}},{key:"openYouTubeLightbox",value:function(t){t=t.split("?")[0]+"?playsinline=1";var e=document.createElement("div");e.className="yt-lightbox",e.innerHTML='\n <div class="yt-backdrop"></div>\n <div class="yt-content">\n <button class="yt-close">✕</button>\n <iframe\n src="'.concat(t,'"\n allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen"\n allowfullscreen\n ></iframe>\n </div>\n '),this.shadow.prepend(e),this._swiffle_fix_yt_close(e),e.querySelector(".yt-close").onclick=function(){return e.remove()},e.querySelector(".yt-backdrop").onclick=function(){return e.remove()}}},{key:"openVideoLightbox",value:function(t){var e=document.createElement("div");e.className="yt-lightbox",e.innerHTML='\n <div class="yt-backdrop"></div>\n <div class="yt-content">\n <button class="yt-close">✕</button>\n <video src="'.concat(t,'" controls autoplay playsinline></video>\n </div>\n '),this.shadow.prepend(e),this._swiffle_fix_yt_close(e),e.querySelector(".yt-close").onclick=function(){return e.remove()},e.querySelector(".yt-backdrop").onclick=function(){return e.remove()}}},{key:"makeSlider",value:function(t,e){var i=this;if(!e||0===e.length)return"";var n="slidezoom"===t;if("slidefull"===t){var o=e.map(function(t){return"string"==typeof t?{full:t,thumb:t}:t}),s=o[0],r=s.full,a=s.thumb,l='\n <div data-full="'.concat(r,'" class="active no-flip woo_like_thumb">\n <img src="" data-thumb="').concat(a,'" data-full="').concat(r,'" data-loadedf="0" class="no-flip" />\n </div>\n ');return o.slice(1).forEach(function(t){l+='\n <div data-full="'.concat(t.full,'" class="no-flip woo_like_thumb">\n <img src="" data-thumb="').concat(t.thumb,'" data-full="').concat(t.full,'" data-loadedf="0" class="no-flip woo_like_thumb" />\n </div>\n ')}),'\n <div class="woo_like_gallery" style="width:95%; padding:2%;">\n <div class="woo_like_main">\n <img class="woo_like_main-img"\n src=""\n data-full="'.concat(r,'"\n data-loadedf="0"\n alt="" />\n\n <button class="swiffle-flip-back">\n ').concat(this._iconFlip(),'\n </button>\n\n <button class="woo_like_zoom-btn no-flip" aria-label="Zoom">\n ').concat(this._iconZoom(),'\n </button>\n </div>\n\n <div class="woo_like_thumbs-wrapper" style="width:95%; padding:2%;">\n <div class="woo_like_thumbs no-flip">\n ').concat(l,'\n </div>\n </div>\n\n <div class="woo_like_lightbox woo_like_hidden">\n <button class="woo_like_close no-flip">✕</button>\n <button class="woo_like_prev no-flip">←</button>\n <button class="woo_like_next no-flip">→</button>\n <img class="woo_like_lightbox-img no-flip" src="" alt="Zoom" />\n </div>\n </div>\n ')}var c=e.map(function(t){var e=t.startsWith("%3C")?decodeURIComponent(t):t;if(e.startsWith("<video"))return'\n <div class="slide no-flip" style="display:flex;justify-content:center;align-items:center;background:black;">\n <button class="woo_like_zoom custom_fs no-flip" aria-label="Zoom">\n '.concat(i._iconZoom(),'\n </button>\n <span data-video="').concat(i.bx(e),'" data-loadedv="0"></span>\n <div class="playpause custom_fs no-flip"></div>\n </div>\n ');if(e.startsWith("<iframe"))return'\n <div class="slide no-flip" style="display:flex;justify-content:center;align-items:center;background:black;">\n <button class="woo_like_zoom custom_fs no-flip" aria-label="Zoom">\n '.concat(i._iconZoom(),'\n </button>\n <span data-frame="').concat(i.bx(e),'" data-loadedfr="0"></span>\n </div>\n ');var o=n?"swiffle-btn-zoom-g":"custom_fs",s=i.swiffle_isPhoneSize?'data-image="'.concat(e,'" data-loaded="0" style="background-size:cover;background-position:center;"'):'style="background-image:url('.concat(e,');background-size:cover;background-position:center;"');return'\n <div class="slide" '.concat(s,'>\n <button class="woo_like_zoom ').concat(o,' no-flip" aria-label="Zoom">\n ').concat(i._iconZoom(),"\n </button>\n </div>\n ")}).join("");return'\n <br>\n <div class="swiffle-slider" style="width:95%; padding:2%;">\n '.concat(c,"\n </div>\n ")}},{key:"getSwiffleTokenStorageKey",value:function(){var t="default";try{t=new URL(this.component_attributes.proxy).origin}catch(t){}return"swiffle_token_"+t}},{key:"_iconZoom",value:function(){return'\n <svg class="woo_like_zoom-icon no-flip" viewBox="0 0 24 24" width="24" height="24"\n fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="8" class="no-flip"/>\n <line x1="21" y1="21" x2="16.65" y2="16.65" class="no-flip"/>\n </svg>\n '}},{key:"_iconFlip",value:function(){return'\n <svg class="woo_like_zoom-icon" width="22" height="22" viewBox="0 0 24 24"\n fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M3 12c0-4.5 3.5-8 8-8h2"></path>\n <path d="M21 12c0 4.5-3.5 8-8 8h-2"></path>\n <polyline points="11 4 13 4 13 6"></polyline>\n <polyline points="13 20 11 20 11 18"></polyline>\n </svg>\n '}},{key:"_message",value:function(t){var e=this;try{if("swiffle-refresh"===t.data.type&&this.render(),"swiffleUnauthorizedDomainNotice"===t.data.type){if(!this.isConnected)return;if(!this.isInEditor())return;this.swiffle_toast(this.swiffleTop._swiffle__('This domain is not yet on the source site\'s "URLs allowed to embed" list (Swiffle Grid settings). Add it there before publishing, or this block will show no data to visitors.'))}if("updateIsPhone"===t.data.type){if(t.data.senderId!==this.ID)return;var i=t.data.value?"mobile":"desktop";if(this._swiffleLastDevice===i)return;if(this._swiffleLastDevice=i,this._swiffleResetLock)return;if(clearTimeout(this._swiffleResetTimer),this.isInEditor())this._swiffleResetTimer=setTimeout(function(){e._swiffleResetLock=!0;var t=e.cloneNode(!1);e.replaceWith(t),setTimeout(function(){e._swiffleResetLock=!1},200)},150);else{var n=this.cloneNode(!1);this.replaceWith(n)}}else if(t.data.type&&t.data.data&&"swiffle"===t.data.type){var o=JSON.parse(this.bxd(t.data.data)),r=o.callback.split(","),a=this.shadow.querySelector("#swifflePool"+o.bridge);if(a&&a.remove(),2==r.length){var l=r[0];if(r[1]==this.ID){switch(this._bridgeProxy&&void 0!==this._bridgeProxy[o.bridge]&&(this._lastReplyByProxy||(this._lastReplyByProxy={}),this._lastReplyByProxy[this._bridgeProxy[o.bridge]]=Date.now()),l){case"get_intl":if(String(o.bridge)!==String(this._lastIntlBridge))break;this.swiffleTop.SWIFFLE_INTL=JSON.parse(this.bxd(o.intl)),this.swiffleTop.SWIFFLE_WOO_ON=!1,this._intlProxy=this._lastIntlRequestedForProxy,this._correctingIntl=!1;var c=this.swiffleTop.SWIFFLE_CLI_CS_DIR||window.SWIFFLE_CLI_CS_DIR,d=this.swiffleTop.SWIFFLE_AJAX_URL||window.SWIFFLE_AJAX_URL;this.ownerDocument.defaultView.top.postMessage({type:"updateData",value:"swiffle-translate-ready",componentPath:c?this.bxd(c):"",proxy:d?this.bxd(d).split("wp-admin")[0]:"",categories:o.wp_categories||[],woocategories:o.woo_categories||[],customConnectors:o.custom_connectors||[]},"*"),this.translate_ready=1;break;case"renderTop":this.renderCallback(o);break;case"loadMore":this.swiffle_callback_load_more(o);break;case"renderComments":this.renderComments(o);break;case"renderCommentsMass":o.massrevs.forEach(function(t){return e.renderComments(t)});break;case"newComment":this.newComment(o);break;case"swiffle_navigate":this.isInEditor()?this.swiffle_toast(this.swiffleTop._swiffle__("Edition mode, navigation cancelled!")):this.swiffleNavigate(o.url,this.swiffleTop);break;case"swiffle_display_custom_form":var f=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,o,s,r,a=[],l=!0,c=!1;try{if(s=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(c)throw o}}return a}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.form.split("\x3c!--SWIFFLE_SCRIPT--\x3e"),2),h=f[0],u=f[1],p='\n <link rel="stylesheet" href="'.concat(this._swiffleCssBase,'vendor/pico.min.css" />\n <div>\n <form class="fltfrm">\n ').concat(h,'\n <div class="form_control">\n <div class="form_control_container" style="width:100%;">\n <div class="form_control_container">\n <div type="button" class="process_filter btn">\n ').concat(this.swiffleTop._swiffle__("Filter"),"\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>\n ");this.swiffle_open_modal(p,"","<h2>".concat(this.swiffleTop._swiffle__("Filter"),"</h2>"));var w=this.shadowRoot.querySelector(".fltfrm");if(!w)break;var m=w.querySelector(".process_filter");if(!m)break;if(this._filterModal=w,u){var v=document.createElement("script");v.textContent="\n (() => {\n const modal = document.querySelector('swiffle-grid').shadowRoot.querySelector('.fltfrm');\n ".concat(u,"\n })();\n "),this.shadowRoot.appendChild(v)}m.addEventListener("click",this._onFilterClick),this._listeners.push(function(){return m.removeEventListener("click",e._onFilterClick)});break;case"notify":if(String(o.bridge)===String(this._lastIntlBridge)&&(this._correctingIntl=!1,this._knownDeniedProxy=this._lastIntlRequestedForProxy),this._bridgeProxy&&this._bridgeProxy[o.bridge]!==this.component_attributes.proxy)break;o.alert&&(this.style.display="",this.swiffle_toast(this.swiffleTop._swiffle__(o.alert)))}if(o.swiffle_token){this.swiffleTop||(this.swiffleTop={}),this.swiffleTop.SWIFFLE_TOKENS||(this.swiffleTop.SWIFFLE_TOKENS={});var _=this.getSwiffleTokenStorageKey();this.swiffleTop.SWIFFLE_TOKENS[_]=o.swiffle_token;try{this.swiffleTop.localStorage.setItem(_,o.swiffle_token)}catch(t){}}}}this._bridgeProxy&&delete this._bridgeProxy[o.bridge],delete o.bridge,a&&a.remove()}}catch(t){}}},{key:"_resize_owner",value:function(t){var e=this.ownerDocument.defaultView.innerWidth||this.ownerDocument.documentElement.clientWidth;if(e!==this._swiffleLastWidth){var i;if(this._swiffleLastWidth=e,this.swiffleTop.vh=.01*this.swiffleTop.innerHeight,this.swiffleTop.document.documentElement.style.setProperty("--vh","".concat(this.swiffleTop.vh,"px")),i=this.ownerDocument.defaultView.matchMedia("(pointer: coarse)").matches?Math.min(this.ownerDocument.defaultView.screen.width,this.ownerDocument.defaultView.screen.height)<550:e<500,this.ownerDocument.documentElement.querySelectorAll('[name="editor-canvas"]').length>0){var n=this.ownerDocument.documentElement.querySelector('[name="editor-canvas"]'),o=null==n?void 0:n.contentWindow,s=null==o?void 0:o.document;i=((null==o?void 0:o.innerWidth)||(null==s?void 0:s.documentElement.clientWidth))<500}i!==this.swiffle_isPhoneSize&&(this.swiffle_isPhoneSize=i,(this.isInCrossOriginFrame()?window:this.ownerDocument.defaultView.top).postMessage({type:"updateIsPhone",value:this.swiffle_isPhoneSize,senderId:this.ID},"*"),this.scheduleRender())}}},{key:"_visibility",value:function(){}},{key:"_focusout",value:function(t){}},{key:"_change",value:function(t){}},{key:"_click_component",value:function(t){t.target}},{key:"_click",value:function(t){var e=this;if(t.target){var i=t.target;if("A"!=i.tagName&&"INPUT"!=t.target.tagName)if(!1!==this.pleasewait||null===this.findUpTag(i,"modal-body-header-titre-close")&&null===this.findUpTag(i,"overlay")||this.swiffle_close_modal(this.findUpTag(i,"modal")||this.findUpTag(i,"overlay")),this._click_component(t),this.findUpTag(i,"open-filter")){if(this.findUpTag(i,"open-filter").dataset.type)return void this.callswiffleapi({action:"build_custom_form",type:this.findUpTag(i,"open-filter").dataset.type,callback:"swiffle_display_custom_form,"+this.ID});var n='\n <link rel="stylesheet" href="'.concat(this._swiffleCssBase,'vendor/pico.min.css" />\n <div>\n <form class="fltfrm">\n <div class="form_control">\n <div class="form_control_container" style="width:100%;">\n <input name="FILTR_search" class="FILTR_search" type="search" id="search" name="search">\n </div>\n </div>\n ');n+='\n <div class="form_control">\n <div class="form_control_container" style="width:100%;">\n <div class="form_control_container">\n <div type="button" style="background: '.concat(this.component_attributes.cardBgColorButton,"; border-color: ").concat(this.component_attributes.cardBgColorButton,"; color: ").concat(this.component_attributes.cardFtColorButton,';" class="process_filter btn">').concat(this.swiffleTop._swiffle__("Filter"),"</div>\n </div>\n </div>\n </div>\n </form>\n </div>\n "),this.swiffle_open_modal(n,"","<h2>".concat(this.swiffleTop._swiffle__("Filter"),"</h2>"));var o=this.shadowRoot.querySelector(".fltfrm"),s=o.querySelector(".process_filter");s.addEventListener("click",function(){var t,i;e.filter=e.bx(JSON.stringify((t=o.querySelectorAll('[name^="FILTR_"]'),i={},t.forEach(function(t){var e=t.name.replace("FILTR_","");"checkbox"===t.type?t.checked&&(i[e]?i[e]+=",".concat(t.value):i[e]=t.value):i[e]=t.value}),i))),e.PG=0,e.getData(e.PG),setTimeout(function(){e.swiffle_close_modal(e.shadow.querySelector(".modal.open"))},100)})}else{var r=this.findUpTag(i,"svgtopb");if(null===r&&(r=this.findUpTag(i,"rdt")),null!==r&&i.dataset&&i.dataset.target){if(this._pageNavLoading)return;this._pageNavLoading=!0;var a=r.querySelectorAll(".spinner");return a.length>0&&(a[0].classList.contains("loading")||a[0].classList.add("loading")),this.PG=0,void this.getData(this.PG,callback="loadMore")}var l=this.findUpTag(i,"svgtopp");if(null===l&&(l=this.findUpTag(i,"rdl")),null!==l&&i.dataset&&i.dataset.target){if(this._pageNavLoading)return;this._pageNavLoading=!0;var c=l.querySelectorAll(".spinner");return c.length>0&&(c[0].classList.contains("loading")||c[0].classList.add("loading")),this.PG-=1,void this.getData(this.PG,callback="loadMore")}var d=this.findUpTag(i,"svgtop");if(null===d&&(d=this.findUpTag(i,"rdm")),null!==d&&i.dataset&&i.dataset.target){if(this._pageNavLoading)return;this._pageNavLoading=!0;var f=d.querySelectorAll(".spinner");return f.length>0&&(f[0].classList.contains("loading")||f[0].classList.add("loading")),this.PG+=1,void this.getData(this.PG,callback="loadMore")}if(!this.findUpTag(i,"swiffle-card-front"))if(null!==(d=this.findUpTag(i,"more-comment"))&&i.dataset&&i.dataset.carddata&&i.dataset.npg)this.callswiffleapi({action:"reviews",carddata:i.dataset.carddata,pg:i.dataset.npg,callback:"renderComments,"+this.ID});else if(null!==(d=this.findUpTag(i,"bcm"))&&i.dataset&&i.dataset.target&&i.dataset.id){var h=i.parentElement.querySelector('textarea[name=ucomment][data-id="'.concat(i.dataset.id,'"][data-target="').concat(i.dataset.target,'"]'));this.callswiffleapi({action:"newcomment",comment:h.value,target:h.dataset.target,id:h.dataset.id,nonce:h.dataset.nonce,callback:"newComment,"+this.ID})}else{if(i.classList&&(i.classList.contains("swiffle-btn-zoom")||i.classList.contains("swiffle-btn-zoom-g")||i.classList.contains("swiffle-bt-zoom"))||i.classList.contains("custom_fs")){var u=i.closest(".slide").style.backgroundImage.slice(4,-1).replace(/["']/g,"");if(i.classList.contains("custom")){var p=this.findUpTag(i,"custom_container");null!==p&&(u=p.querySelector("img").src)}if(i.classList.contains("custom_fs")){var w=i.closest(".slide"),m=w.querySelector("video");if(m)return void this.openVideoLightbox(m.src);var v=w.querySelector("iframe");if(v)return void this.openYouTubeLightbox(v.src);var _=document.createElement("div");_.classList.add("woo_like_lightbox"),_.innerHTML='\n <button class="woo_like_close no-flip" onclick="this.closest(\'.woo_like_lightbox\').remove()">✕</button>\n <img class="woo_like_lightbox-img no-flip" src="'.concat(u,'">\n '),this.shadow.prepend(_),_.classList.add("fulltop"),_.classList.remove("woo_like_hidden");var y=_.querySelector(".woo_like_close"),g=this._swiffle_editor_toolbar_offset();g&&(y.style.top=20+g+"px"),y.onclick=function(){_.remove()}}else this.swiffle_open_modal('\n <div style="display: flex;justify-content: center;align-items: center;height: 80vh;width: 100%;background-color: #f0f0f0;">\n <div class="zoom-container">\n <img id="zoomed-image" src="'.concat(u,'" alt="Zoom">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="zoom-drag-icon" >\n <g data-name="Layer 2"><g data-name="move"><rect width="24" height="24" transform="rotate(180 12 12)" opacity="0"></rect><path d="M21.71 11.31l-3-3a1 1 0 0 0-1.42 1.42L18.58 11H13V5.41l1.29 1.3A1 1 0 0 0 15 7a1 1 0 0 0 .71-.29 1 1 0 0 0 0-1.42l-3-3A1 1 0 0 0 12 2a1 1 0 0 0-.7.29l-3 3a1 1 0 0 0 1.41 1.42L11 5.42V11H5.41l1.3-1.29a1 1 0 0 0-1.42-1.42l-3 3A1 1 0 0 0 2 12a1 1 0 0 0 .29.71l3 3A1 1 0 0 0 6 16a1 1 0 0 0 .71-.29 1 1 0 0 0 0-1.42L5.42 13H11v5.59l-1.29-1.3a1 1 0 0 0-1.42 1.42l3 3A1 1 0 0 0 12 22a1 1 0 0 0 .7-.29l3-3a1 1 0 0 0-1.42-1.42L13 18.58V13h5.59l-1.3 1.29a1 1 0 0 0 0 1.42A1 1 0 0 0 18 16a1 1 0 0 0 .71-.29l3-3A1 1 0 0 0 22 12a1 1 0 0 0-.29-.69z"></path></g></g>\n </svg>\n\n </div>\n </div>\n '),"",""),this.swiffle_zoom_img()}if(null!==this.findUpTag(i,"circularMenu")&&this.findUpTag(i,"swiffle-circular-menu").classList.toggle("active"),!this.findUpTag(i,"no-flip")){if(this.findUpTag(i,"swiffle-card-back")){if(this.isFlipping)return;this.isFlipping=!0,setTimeout(function(){e.isFlipping=!1},500);var b=this.findUpTag(i,"swiffle-card-inner");b.querySelectorAll(".swiffle-spoiler-container").forEach(function(t){t.querySelector(".swiffle-spoiler-wrapper");var e=t.querySelector(".swiffle-spoiler-toggle"),i=t.querySelector(".swiffle-spoiler-label");e.checked=!1,e.style.display="",i.style.display=""});var k=b.querySelector(".swiffle-card-back");k&&!k.dataset.html64&&!1===this.isFlipping&&setTimeout(function(){k.dataset.html64=e.bx(k.innerHTML),k.innerHTML=""},500),b.classList.toggle("swiffle-card-flipped")}if(null!==this.findUpTag(i,"toSwipe")){this.swiffle_toSwipe(i,!0);var x=this.findUpTag(i,"toSwipe");null!==this.findUpTag(i,"swiffle-switch-nav")&&(x.style.display="none"),x.classList.contains("origin")?x.parentElement.querySelector(".swiffle-switch-nav.alt").style.display="block":x.classList.contains("alt")&&(x.parentElement.querySelector(".swiffle-switch-nav.origin").style.display="block")}if(null!==this.findUpTag(i,"toSwipeFull")){this.swiffle_toSwipe(i,!0,!0);var S=this.findUpTag(i,"toSwipeFull");null!==this.findUpTag(i,"swiffle-switch-nav")&&(S.style.display="none"),S.classList.contains("origin")?S.parentElement.querySelector(".swiffle-switch-nav.alt").style.display="block":S.classList.contains("alt")&&(S.parentElement.querySelector(".swiffle-switch-nav.origin").style.display="block")}if(null!==this.findUpTag(i,"toLine")){this.swiffle_toLine(i);var L=this.findUpTag(i,"toLine");null!==this.findUpTag(i,"swiffle-switch-nav")&&(L.style.display="none"),L.classList.contains("origin")?L.parentElement.querySelector(".swiffle-switch-nav.alt").style.display="block":L.classList.contains("alt")&&(L.parentElement.querySelector(".swiffle-switch-nav.origin").style.display="block")}if(null!==this.findUpTag(i,"toFluid")){this.swiffle_toFluid(i);var E=this.findUpTag(i,"toFluid");null!==this.findUpTag(i,"swiffle-switch-nav")&&(E.style.display="none"),E.classList.contains("origin")?E.parentElement.querySelector(".swiffle-switch-nav.alt").style.display="block":E.classList.contains("alt")&&(E.parentElement.querySelector(".swiffle-switch-nav.origin").style.display="block")}this.swiffle_sw_initEvt={}}}}}}},{key:"_keydown",value:function(t){if("Enter"===t.key){if(t.target.classList.contains("FILTR_search")){t.preventDefault(),t.stopPropagation();var e=this.findUpTag(t.target,"fltfrm");return void(null!==e&&e.querySelector(".process_filter").click())}if(t.target.name&&t.target.name.startsWith("FILTR_")){t.preventDefault(),t.stopPropagation();var i=this.findUpTag(t.target,"fltfrm");return void(null!==i&&i.querySelector(".process_filter").click())}}}},{key:"_searchfield_doc",value:function(t){var e,i=t.target;null!=i&&null!==(e=i.classList)&&void 0!==e&&e.contains("search-field")&&("keydown"===t.type&&"Enter"!==t.key||(t.preventDefault(),t.stopImmediatePropagation(),this.swiffleTop.document.querySelectorAll("swiffle-grid").forEach(function(t){!0===t.component_attributes.followpagefilter&&t.swiffleSetAttribute("filtertitle",i.value||"")})))}},{key:"_updateSizes",value:function(){var t=this.shadow.getElementById("zoomed-image");if(t){var e=Math.min(.6*window.innerHeight,.6*window.innerWidth);t.style.width="".concat(4*e,"px"),t.style.height="auto"}}},{key:"_movezoom",value:function(t){var e,i,n,o,s,r,a=this.shadow.querySelector(".zoom-container"),l=this.shadow.getElementById("zoomed-image"),c=this.shadow.querySelector(".zoom-drag-icon");if(a&&l){t.preventDefault(),c.style.display="none";var d="touchmove"===t.type?null!==(e=null===(i=t.touches[0])||void 0===i?void 0:i.clientX)&&void 0!==e?e:null===(n=t.changedTouches[0])||void 0===n?void 0:n.clientX:t.clientX,f="touchmove"===t.type?null!==(o=null===(s=t.touches[0])||void 0===s?void 0:s.clientY)&&void 0!==o?o:null===(r=t.changedTouches[0])||void 0===r?void 0:r.clientY:t.clientY,h=a.getBoundingClientRect(),u=d-h.left,p=f-h.top,w=Math.max(0,Math.min(1,u/h.width)),m=Math.max(0,Math.min(1,p/h.height)),v=-(l.clientWidth-h.width),_=-(l.clientHeight-h.height);l.style.transform="translate(".concat(w*v,"px, ").concat(m*_,"px)")}}},{key:"_zoomMouseLeave",value:function(){var t=this.shadow.getElementById("zoomed-image");t&&setTimeout(function(){t.style.transform="translate(-30%, -30%)"},200)}},{key:"_getFiltersFromModal",value:function(){var t=this._filterModal;if(!t)return{};var e=t.querySelectorAll('[name^="FILTR_"]'),i={};return e.forEach(function(t){var e=t.name.replace("FILTR_","");"checkbox"===t.type?t.checked&&(i[e]?i[e]+=",".concat(t.value):i[e]=t.value):i[e]=t.value}),i}},{key:"_onFilterClick",value:function(t){var e=this;if(this._filterModal){var i=this._getFiltersFromModal();this.filter=this.bx(JSON.stringify(i)),this.PG=0,this.getData(this.PG),setTimeout(function(){var t=e.shadow.querySelector(".modal.open");t&&e.swiffle_close_modal(t),e._filterModal=null},100)}}}],w=[{key:"observedAttributes",get:function(){return["datak","datablock","dataf","extra_search","extra_sort","extra_cats","extra_min","extra_max"]}}],u&&a(l.prototype,u),w&&a(l,w),Object.defineProperty(l,"prototype",{writable:!1}),l;var l,u,w}(l(HTMLElement));customElements.get("swiffle-grid")||customElements.define("swiffle-grid",w),window.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".swiffle-blockBody").forEach(function(t){var e=t.getAttribute("data-datak");e&&(t.querySelector("swiffle-grid")||(t.innerHTML='<swiffle-grid datak="'.concat(e,'"></swiffle-grid>')))})})})(); -
swiffle-grid-embed-data-anywhere/trunk/published-source/swiffle/components/EmbedPanel.js
r3789569 r3796447 3 3 ButtonGroup, 4 4 Button, 5 ToggleControl 5 ToggleControl, 6 Slot 6 7 } = wp.components; 7 8 const { … … 17 18 const [mode, setMode] = useState('full'); 18 19 const [withSetupBar, setWithSetupBar] = useState(false); 19 const code = generateEmbedCode(attributes.componentPath, datak, cacheVersion, mode, withSetupBar); 20 const [gridAttrs, setGridAttrs] = useState({}); 21 const code = generateEmbedCode(attributes.componentPath, datak, cacheVersion, mode, withSetupBar, gridAttrs); 20 22 return <PanelBody title={_swiffle_site__('Embed code')} initialOpen={false}> 21 23 <ButtonGroup style={{ … … 31 33 32 34 <ToggleControl __nextHasNoMarginBottom={true} label={_swiffle_site__('With setup bar')} help={_swiffle_site__('Adds a settings panel to the grid, so that the person you share this code with can adjust it on their own page and copy the new code.')} checked={withSetupBar} onChange={v => setWithSetupBar(v)} /> 35 36 <Slot name="swiffle_slot_embed_1" fillProps={{ 37 attributes, 38 gridAttrs, 39 setGridAttrs 40 }} /> 33 41 34 42 <textarea readOnly style={{ -
swiffle-grid-embed-data-anywhere/trunk/published-source/swiffle/utils/generateEmbedCode.js
r3789569 r3796447 9 9 return urls.map(u => `<script src="${u}${u.indexOf('?') === -1 ? '?v=' : '&v='}${cacheVersion}" data-swiffle-setup-bar></script>`).join('\n'); 10 10 } 11 export default function generateEmbedCode(path, datak, cacheVersion, mode = 'full', withSetupBar = false ) {11 export default function generateEmbedCode(path, datak, cacheVersion, mode = 'full', withSetupBar = false, gridAttrs = {}) { 12 12 if (!path || typeof path !== 'string') return ''; 13 13 const jsDirUrl = path.replace('/css/', '/js/'); … … 16 16 const loaderUrl = jsDirUrl + 'swiffle_embed_loader.js?v=' + cacheVersion; 17 17 const loaderTag = `<script src="${loaderUrl}" data-src="${scriptUrl}" data-cache-version="${cacheVersion}"></script>`; 18 const gridTag = withSetupBar ? `<swiffle-grid data-setup-bar datak="${datak}"></swiffle-grid>` : `<swiffle-grid datak="${datak}"></swiffle-grid>`; 18 const esc = v => String(v).replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); 19 const back = Object.keys(gridAttrs || {}).filter(k => /^data-[a-z0-9-]+$/.test(k) && String(gridAttrs[k] || '').trim() !== '').map(k => ` ${k}="${esc(String(gridAttrs[k]).trim())}"`).join(''); 20 const gridTag = withSetupBar ? `<swiffle-grid data-setup-bar${back} datak="${datak}"></swiffle-grid>` : `<swiffle-grid${back} datak="${datak}"></swiffle-grid>`; 19 21 const barTags = withSetupBar ? '\n' + setupBarTags(jsDirUrl, cacheVersion) : ''; 20 22 if (mode === 'block') { -
swiffle-grid-embed-data-anywhere/trunk/published-source/webcomponent/main.js
r3781428 r3796447 115 115 const _authorizedList = Array.isArray(_authorized) ? _authorized : _authorized ? [ _authorized ] : []; 116 116 const _noSlash = u => String(u).replace(/\/+$/, ""); 117 let _isAuthorized = _authorizedList.some(entry => _noSlash(entry) === _noSlash(cleanUrl)); 117 const _matches = (entry, page) => { 118 if (_noSlash(entry) === _noSlash(page)) return true; 119 if (String(entry).indexOf("*") === -1) return false; 120 try { 121 const a = new URL(String(entry).replace("*", "swiffle-star")); 122 const p = new URL(page); 123 const rest = a.hostname.slice("swiffle-star".length); 124 if (!a.hostname.startsWith("swiffle-star") || !/^[-.]/.test(rest) || (rest.match(/\./g) || []).length < 2) return false; 125 const first = p.hostname.slice(0, p.hostname.length - rest.length); 126 return a.protocol === p.protocol && p.hostname.endsWith(rest) && /^[a-z0-9-]+$/.test(first) && a.port === p.port && _noSlash(a.pathname + a.search) === _noSlash(p.pathname + p.search); 127 } catch (e) { 128 return false; 129 } 130 }; 131 let _isAuthorized = _authorizedList.some(entry => _matches(entry, cleanUrl)); 118 132 if (!_isAuthorized && this.isInEditor()) { 119 133 try { … … 2514 2528 } 2515 2529 isInCrossOriginFrame() { 2516 if (window === window. parent) return false;2530 if (window === window.top) return false; 2517 2531 try { 2518 void window. parent.document;2532 void window.top.document; 2519 2533 return false; 2520 2534 } catch (e) { -
swiffle-grid-embed-data-anywhere/trunk/readme.txt
r3790789 r3796447 5 5 Tested up to: 7.1 6 6 Requires PHP: 8.0 7 Stable tag: 1. 197 Stable tag: 1.20 8 8 License: GPL-3.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 193 193 == Changelog == 194 194 195 = 1.20 = 196 * New: an allowed address may start with "*" in place of the first part of its domain name, for hosts that change it on each load (Google Sites embeds). The rest of the address must match exactly. 197 * Fix: inside a frame placed in another frame of the same domain, links now open in the whole page instead of the frame. 198 195 199 = 1.19 = 196 200 * RSS: cards now show the feed's short summary instead of the whole article (Substack and other newsletters), with a short excerpt when the summary is empty. … … 265 269 == Upgrade Notice == 266 270 271 = 1.20 = 272 Grids embedded in Google Sites: allowed addresses with "*". 273 267 274 = 1.19 = 268 275 RSS cards: short summary and publication date. -
swiffle-grid-embed-data-anywhere/trunk/swiffle-grid-embed-data-anywhere.php
r3790789 r3796447 4 4 Description: Any source. Any view. Anywhere. Swipe & flip grids from WordPress posts, CSV, XLSX and RSS/YouTube feeds — in Gutenberg or Elementor. 5 5 Plugin URI: https://swiffle-grid.com 6 Version: 1. 196 Version: 1.20 7 7 Requires at least: 6.3 8 8 Requires PHP: 8.0
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)