YITH WooCommerce Ajax Product Filter - Version 4.16.0

Version Description

  • Released on 14 November 2022 =

  • New: support for WooCommerce 7.1

  • New: support for WodPress 6.1

  • Tweak: add rel nofollow attribute to Active Labels anchor, when SEO option is enabled

  • Tweak: check if preset has relevant filters before showing it

  • Tweak: prevent JS error with jQuery autocomplete library and filter dropdown

  • Update: YITH plugin framework

  • Fix: patched security vulnerability

Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Ajax Product Filter
Version 4.16.0
Comparing to
See all releases

Code changes from version 4.15.0 to 4.16.0

Files changed (47) hide show
  1. assets/css/admin.css +2 -1
  2. assets/css/shortcodes.css +5 -5
  3. assets/js/shortcodes/modules/yith-wcan-dropdown.js +1 -2
  4. assets/js/yith-wcan-shortcodes.js +1 -2
  5. assets/js/yith-wcan-shortcodes.js.map +1 -1
  6. assets/js/yith-wcan-shortcodes.min.js +1 -1
  7. includes/class-yith-wcan-filter.php +33 -1
  8. includes/class-yith-wcan-preset.php +22 -0
  9. includes/filters/class-yith-wcan-filter-tax.php +5 -10
  10. init.php +4 -4
  11. languages/yith-woocommerce-ajax-navigation-de_DE.mo +0 -0
  12. languages/yith-woocommerce-ajax-navigation-de_DE.po +3 -3
  13. languages/yith-woocommerce-ajax-navigation-de_DE_formal.mo +0 -0
  14. languages/yith-woocommerce-ajax-navigation-de_DE_formal.po +3 -3
  15. languages/yith-woocommerce-ajax-navigation-el.mo +0 -0
  16. languages/yith-woocommerce-ajax-navigation-el.po +3 -3
  17. languages/yith-woocommerce-ajax-navigation-es_ES.mo +0 -0
  18. languages/yith-woocommerce-ajax-navigation-es_ES.po +3 -3
  19. languages/yith-woocommerce-ajax-navigation-fr_FR.mo +0 -0
  20. languages/yith-woocommerce-ajax-navigation-fr_FR.po +3 -3
  21. languages/yith-woocommerce-ajax-navigation-it_IT.mo +0 -0
  22. languages/yith-woocommerce-ajax-navigation-it_IT.po +3 -3
  23. languages/yith-woocommerce-ajax-navigation-nl_NL.mo +0 -0
  24. languages/yith-woocommerce-ajax-navigation-nl_NL.po +3 -3
  25. languages/yith-woocommerce-ajax-navigation-tr_TR.mo +0 -0
  26. languages/yith-woocommerce-ajax-navigation-tr_TR.po +3 -3
  27. languages/yith-woocommerce-ajax-navigation.pot +3 -3
  28. plugin-fw/assets/js/yith-system-info.js +2 -1
  29. plugin-fw/assets/js/yith-system-info.min.js +1 -1
  30. plugin-fw/dist/gutenberg/index.asset.php +1 -1
  31. plugin-fw/dist/gutenberg/index.js +1 -1
  32. plugin-fw/includes/builders/gutenberg/class-yith-gutenberg.php +28 -18
  33. plugin-fw/includes/class-yit-ajax.php +2 -1
  34. plugin-fw/includes/class-yith-system-status.php +31 -23
  35. plugin-fw/init.php +2 -2
  36. plugin-fw/languages/yith-plugin-fw-el.po +23 -23
  37. plugin-fw/languages/yith-plugin-fw-es_ES.po +23 -23
  38. plugin-fw/languages/yith-plugin-fw-it_IT.po +23 -23
  39. plugin-fw/languages/yith-plugin-fw-nl_NL.po +23 -23
  40. plugin-fw/languages/yith-plugin-fw-ru_RU.po +23 -23
  41. plugin-fw/languages/yith-plugin-fw-zh_CN.po +23 -23
  42. plugin-fw/languages/yith-plugin-fw.pot +23 -23
  43. plugin-fw/templates/components/action-button.php +1 -1
  44. plugin-fw/templates/sysinfo/tabs/error-log.php +7 -6
  45. readme.txt +13 -3
  46. templates/filters/filter-tax.php +20 -21
  47. templates/shortcodes/filters.php +1 -1
assets/css/admin.css CHANGED
@@ -1,3 +1,4 @@
 
1
  /* === Filter Preset List === */
2
  #yith_wcan_panel_filter-preset {
3
  position: relative;
@@ -119,7 +120,7 @@
119
  }
120
  #yith_wcan_panel_filter-preset .yith-plugin-fw-list-table-container table.wp-list-table tbody tr td.shortcode .copy-on-click:after {
121
  color: #9d9d9d;
122
- content: "\f101";
123
  font-family: "yith-icon";
124
  font-size: 14px;
125
  position: absolute;
1
+ @charset "UTF-8";
2
  /* === Filter Preset List === */
3
  #yith_wcan_panel_filter-preset {
4
  position: relative;
120
  }
121
  #yith_wcan_panel_filter-preset .yith-plugin-fw-list-table-container table.wp-list-table tbody tr td.shortcode .copy-on-click:after {
122
  color: #9d9d9d;
123
+ content: "";
124
  font-family: "yith-icon";
125
  font-size: 14px;
126
  position: absolute;
assets/css/shortcodes.css CHANGED
@@ -115,11 +115,11 @@
115
  border: 2px solid transparent;
116
  border-radius: var(--yith-wcan-color_swatches_border_radius, 4px);
117
  display: inline-block;
118
- height: calc(var(--yith-wcan-color_swatches_size, 45px) + 4px);
119
  margin-bottom: 5px;
120
  overflow: hidden;
121
  vertical-align: middle;
122
- width: calc(var(--yith-wcan-color_swatches_size, 45px) + 4px);
123
  }
124
  .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.color .term-color .color-swatch {
125
  display: block;
@@ -431,7 +431,7 @@
431
  border-left: 5px solid transparent;
432
  border-right: 5px solid transparent;
433
  border-top: 5px solid var(--yith-wcan-filters_colors_accent, #4e8ba2);
434
- left: calc(50% - 2px);
435
  top: 100%;
436
  }
437
  .yith-wcan-filters .yith-wcan-filter .price-slider.both {
@@ -1034,8 +1034,8 @@ body.rtl .yith-wcan-filters .yith-wcan-filter .filter-title.collapsable:after {
1034
  color: #fff;
1035
  }
1036
  .yith-wcan-active-filters .reset-filters:hover {
1037
- background-color: rgb(calc(var(--yith-wcan-filters_colors_accent_r, 73) * 0.8), calc(var(--yith-wcan-filters_colors_accent_g, 139) * 0.8), calc(var(--yith-wcan-filters_colors_accent_b, 162) * 0.8));
1038
- border-color: rgb(calc(var(--yith-wcan-filters_colors_accent_r, 73) * 0.8), calc(var(--yith-wcan-filters_colors_accent_g, 139) * 0.8), calc(var(--yith-wcan-filters_colors_accent_b, 162) * 0.8));
1039
  }
1040
 
1041
  /* === 3. MOBILE FILTERS === */
115
  border: 2px solid transparent;
116
  border-radius: var(--yith-wcan-color_swatches_border_radius, 4px);
117
  display: inline-block;
118
+ height: calc(var( --yith-wcan-color_swatches_size, 45px ) + 4px);
119
  margin-bottom: 5px;
120
  overflow: hidden;
121
  vertical-align: middle;
122
+ width: calc(var( --yith-wcan-color_swatches_size, 45px ) + 4px);
123
  }
124
  .yith-wcan-filters .yith-wcan-filter .filter-items .filter-item.color .term-color .color-swatch {
125
  display: block;
431
  border-left: 5px solid transparent;
432
  border-right: 5px solid transparent;
433
  border-top: 5px solid var(--yith-wcan-filters_colors_accent, #4e8ba2);
434
+ left: calc(50% - 5px);
435
  top: 100%;
436
  }
437
  .yith-wcan-filters .yith-wcan-filter .price-slider.both {
1034
  color: #fff;
1035
  }
1036
  .yith-wcan-active-filters .reset-filters:hover {
1037
+ background-color: rgb(calc( var( --yith-wcan-filters_colors_accent_r, 73 ) * 0.8), calc( var( --yith-wcan-filters_colors_accent_g, 139 ) * 0.8), calc( var( --yith-wcan-filters_colors_accent_b, 162 ) * 0.8));
1038
+ border-color: rgb(calc( var( --yith-wcan-filters_colors_accent_r, 73 ) * 0.8), calc( var( --yith-wcan-filters_colors_accent_g, 139 ) * 0.8), calc( var( --yith-wcan-filters_colors_accent_b, 162 ) * 0.8));
1039
  }
1040
 
1041
  /* === 3. MOBILE FILTERS === */
assets/js/shortcodes/modules/yith-wcan-dropdown.js CHANGED
@@ -116,10 +116,9 @@ export default class YITH_WCAN_Dropdown {
116
  $search = $( '<input/>', {
117
  name: 's',
118
  class: 'search-field',
119
- autocomplete: 'off',
120
  type: 'search',
121
  placeholder: this.options.labels.searchPlaceholder,
122
- } );
123
 
124
  $container.append( $search ).prependTo( $dropdwonSpan );
125
  this.$_search = $search;
116
  $search = $( '<input/>', {
117
  name: 's',
118
  class: 'search-field',
 
119
  type: 'search',
120
  placeholder: this.options.labels.searchPlaceholder,
121
+ } ).attr( 'autocomplete', 'off' );
122
 
123
  $container.append( $search ).prependTo( $dropdwonSpan );
124
  this.$_search = $search;
assets/js/yith-wcan-shortcodes.js CHANGED
@@ -537,10 +537,9 @@ var YITH_WCAN_Dropdown = /*#__PURE__*/function () {
537
  $search = $('<input/>', {
538
  name: 's',
539
  "class": 'search-field',
540
- autocomplete: 'off',
541
  type: 'search',
542
  placeholder: this.options.labels.searchPlaceholder
543
- });
544
  $container.append($search).prependTo($dropdwonSpan);
545
  this.$_search = $search;
546
  } // create showMore field
537
  $search = $('<input/>', {
538
  name: 's',
539
  "class": 'search-field',
 
540
  type: 'search',
541
  placeholder: this.options.labels.searchPlaceholder
542
+ }).attr('autocomplete', 'off');
543
  $container.append($search).prependTo($dropdwonSpan);
544
  this.$_search = $search;
545
  } // create showMore field
assets/js/yith-wcan-shortcodes.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/config.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-filter.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-reset-button.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-dropdown.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-preset.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/index.js"],"names":["$","jQuery","$body","YITH_WCAN_Filter","location","search","initPopState","initialized","yith_wcan_shortcodes","reload_on_back","pushUrlToHistory","window","document","title","on","history","state","_yithWcan","reload","filters","target","preset","targetUrl","$target","customFilters","triggerHandler","block","buildUrl","ajax_filters","doingAjax","_doAjax","done","response","searchAlternativeUrl","_beforeFilter","refreshFragments","pageTitle","originalSearch","unblock","_afterFilter","trigger","closest","submit","filtered","Object","keys","length","queryParam","query_param","params","url","base_url","origin","pathname","self","haveFilters","session_param","replace","RegExp","searchParams","split","reduce","a","v","items","isFilterParam","i","_cleanParam","defaultUrl","matches","indexOf","match","current","change_browser_url","navigator","userAgent","method","responseDom","createElement","$response","innerHTML","$preset","$destination","find","replaceWith","first","content","param","process_sanitize","skip_sanitize","encodeURIComponent","xhr","abort","headers","$el","background","loader","message","overlayCSS","opacity","supportedParams","customParams","concat","supported_taxonomies","map","YITH_WCAN_Reset_Button","el","$reset","ev","preventDefault","each","data","deactivateAllFilters","closeModal","addClass","YITH_WCAN_Dropdown","opts","$originalSelect","is","defaultPerPage","defaultOrder","defaultAll","defaults","showSearch","paginate","perPage","order","getElements","labels","emptyLabel","empty_option","searchPlaceholder","search_placeholder","noItemsFound","no_items","showMore","show_more","options","_hideSelect","_initTemplate","_initActions","hide","$mainSpan","$labelSpan","html","getLabel","$dropdownSpan","$matchingItemsList","append","_initSearchTemplate","_initShowMoreTemplate","after","$_main","$_label","$_dropdown","$_items","$dropdwonSpan","$container","$search","name","autocomplete","type","placeholder","prependTo","$_search","$showMore","text","loadNextPage","bind","$_showMore","stopPropagation","toggleDropdown","_populateItems","$li","value","isActive","hasClass","isValueSelected","toggleClass","_changeItemStatus","siblings","removeClass","input","parent","prop","change","selfOriginated","_selectItem","_deselectItem","updateLabel","globalThis","yith_wcan_dropdown_init","_closeAllDropdowns","_afterDropdownOpen","dropdowns","filter","select","closeDropdown","_closeOtherDropdowns","val","limit","matchingElements","$options","getOptions","promise","Promise","resolve","t","label","regex","show","test","push","then","retrievedElements","_formatItems","indexes","hasMore","sort","b","mod","slice","active","option","getOptionByValue","$item","attr","$anchor","template","count","href","rel","$checkbox","$label","prepend","page","parseInt","getMatchingElements","resultSet","matchingItems","_emptyItems","_hideLoadMore","currentPage","unshift","_generateItem","_showLoadMore","status","$option","hasSelectedValues","getSelectedLabels","join","getSelectedOptions","found","getSelectedValues","toString","values","YITH_WCAN_Preset","_regiterStatus","_initFilterButton","_initResponsive","_initFilters","getFilters","$filter","_initFilter","maybeShowClearAllFilters","$filterButtons","modal_on_mobile","media","matchMedia","mobile_media_query","isMobile","_afterLayoutChange","resize","handleChange","$currentFilter","multiple","$items","not","children","activeFilters","maybeFilter","maybeToggleClearAllFilters","maybeToggleClearFilter","delegateTarget","call","$input","_initTooltip","_initPriceSlider","_initDropdown","_initCollapsable","maybeShowClearFilter","_initCustomInput","$dropdown","$current","position","th","tooltip","wrapperWidth","outerWidth","left","width","container","css","toFixed","fadeIn","fadeOut","remove","selectWoo","_initDropdownObject","terms_per_page","$minInput","$maxInput","min","parseFloat","max","currentMin","currentMax","step","handleSliderChange","sliderTimeout","clearTimeout","setTimeout","ionRangeSlider","skin","from","to","min_interval","values_separator","prettify","formatPrice","onChange","onFinish","add","off","_initTitleCollapsable","_initHierarchyCollapsable","$title","_initToggle","parents","show_current_children","$t","$toggle","appendTo","slideToggle","containerClass","wrap","originalFilters","getFiltersProperties","_addCloseModalButton","_addApplyFiltersModalButton","_switchToCollapsables","removeAttr","_removeCloseModalButton","_removeApplyFiltersModalButton","_switchBackCollapsables","$closeButton","close","modalElements","closeButton","$filterButton","show_results","applyFiltersButton","removeData","$filters","isFilterActive","end","currentFilters","currentStr","JSON","stringify","originalStr","dirty","$initiator","maybeRegisterStatusChange","instant_filters","product_filter","doFilter","newPreset","scroll_top","targetOffset","offset","top","scroll_target","$scrollTarget","animate","scrollTop","getActiveFilters","filterType","filteredActive","Math","abs","properties","filteredProperties","$active","activeTerms","taxonomy","isAttr","relation","get","pop","glue","rating_filter","price_ranges","min_price","max_price","onsale_filter","instock_filter","featured_filter","orderby","filterProperties","getFilterProperties","mergeProperties","hasProp","includes","maybeHideClearFilter","isAnyFilterActive","maybeHideClearAllFilters","show_clear_filter","clear_selection","role","deactivateFilter","clear_all_selections","$activeItems","click","formattedRange","$priceSlider","getFiltersByProperties","toggles_open_on_modal","_openAllCollapsables","_closeAllCollapsables","price","accounting","formatMoney","symbol","currency_format","decimal","thousand","precision","format","set1","set2","hasOwnProperty","newValue","index","arr","queryTypeParam"],"mappings":";;;;;AAAa;AAEb;;AAEA,IAAMA,CAAC,GAAGC,MAAV,C,CAAkB;;AAClB,IAAMC,KAAK,GAAGF,CAAC,CAAE,MAAF,CAAf;;;ACLa;AAEb;;;;;;;;;;;;AAEA;;IAEqBG,gB;AACpB;AAGA;AAGA;AAGA;AAGA;AAGA;AACA,8BAAc;AAAA;;AAAA,iCAfR,I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AAA,yBACCA,GAAG,CAACtX,OAAJ,CAAawG,KAAb,MAAyB6Q,KAD1B;AAAA,iBAHS,EAMTjM,IANS,CAMHsJ,IANG,CAAX;AAQAuC,oBAAI,CAAE/P,IAAF,CAAJ,GAAekQ,QAAf;;AAEA,oBAAK9C,MAAL,EAAc;AACb,sBAAMiD,cAAc,GAAGrQ,IAAI,CAAC/H,OAAL,CACtB,SADsB,EAEtB,aAFsB,CAAvB;AAKA8X,sBAAI,CAAEM,cAAF,CAAJ,GAAyB,KAAzB;AACAL,sBAAI,CAAEK,cAAF,CAAJ,GAAyB,KAAzB;AACA;AACD;;AA3CH;;AA8CA,iBAAOL,IAAI,CAAEhQ,IAAF,CAAX;AACA;AACD;;AAEDxL,cAAA,CAAUub,IAAV,EAAgBC,IAAhB;AAEA,aAAOD,IAAP;AACA;;;;;;;;AC9gDW;AAEb;;AAEA;AACA;AACA;AAEAtb,MAAM,CAAE,UAAWD,CAAX,EAAe;AACtBA,GAAC,CAAEY,QAAF,CAAD,CACEE,EADF,CAEE,yEAFF,EAGE,YAAY;AACXd,KAAC,CAAE,oBAAF,CAAD,CACEqR,GADF,CACO,WADP,EAEEvK,IAFF,CAEQ,YAAY;AAClB,UAAIkJ,gBAAJ,CAAsBhQ,CAAC,CAAE,IAAF,CAAvB;AACA,KAJF;AAMAA,KAAC,CAAE,0BAAF,CAAD,CACEqR,GADF,CACO,WADP,EAEEvK,IAFF,CAEQ,YAAY;AAClB,UAAIL,sBAAJ,CAA4BzG,CAAC,CAAE,IAAF,CAA7B;AACA,KAJF;AAKA,GAfH,EAiBEwC,OAjBF,CAiBW,2BAjBX;AAmBAsJ,YAAU,CAACyL,cAAX,GAA4B,IAAIpX,gBAAJ,EAA5B;AACA,CArBK,CAAN,C","file":"yith-wcan-shortcodes.js","sourcesContent":["'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nconst $ = jQuery; // we can do this as WebPack will compact all together inside a closure.\nconst $body = $( 'body' );\n\nexport { $, $body };\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $, $body } from '../config.js';\n\nexport default class YITH_WCAN_Filter {\n\t// currently executing xhr\n\txhr = null;\n\n\t// flag set during ajax call handling\n\tdoingAjax = false;\n\n\t// register original url search param\n\toriginalSearch = location.search;\n\n\t// flag set once init has executed\n\tinitialized = false;\n\n\t// flag set when page has at least one active filter.\n\tfiltered = false;\n\n\t// init object\n\tconstructor() {\n\t\tthis.initPopState();\n\t\tthis.initialized = true;\n\t}\n\n\t// init page reload when popstate event alter filters\n\tinitPopState() {\n\t\tif ( ! yith_wcan_shortcodes.reload_on_back ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pushUrlToHistory( window.location, document.title, null, true );\n\n\t\t$( window ).on( 'popstate', function () {\n\t\t\tif ( ! window.history.state?._yithWcan ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twindow.location.reload( true );\n\t\t} );\n\t}\n\n\t// execute call to filter products in current view\n\tdoFilter( filters, target, preset ) {\n\t\tlet targetUrl,\n\t\t\t$target = target ? $( target ) : $( 'body' ),\n\t\t\tcustomFilters;\n\n\t\t// filter properties\n\t\tcustomFilters = $( document ).triggerHandler(\n\t\t\t'yith_wcan_filters_parameters',\n\t\t\t[ filters ]\n\t\t);\n\n\t\tif ( !! customFilters ) {\n\t\t\tfilters = customFilters;\n\t\t}\n\n\t\t// block elements before filtering\n\t\t$target && this.block( $target );\n\n\t\t// calculate target url\n\t\ttargetUrl = this.buildUrl( filters );\n\n\t\t// if no ajax, simply change page url\n\t\tif ( ! yith_wcan_shortcodes.ajax_filters ) {\n\t\t\tthis.pushUrlToHistory( targetUrl, document.title, filters );\n\n\t\t\twindow.location = targetUrl;\n\t\t\treturn;\n\t\t}\n\n\t\t// start doing ajax\n\t\tthis.doingAjax = true;\n\n\t\treturn this._doAjax( targetUrl ).done( ( response ) => {\n\t\t\ttargetUrl = this.searchAlternativeUrl( response, targetUrl );\n\n\t\t\tthis._beforeFilter( response, filters );\n\n\t\t\tthis.refreshFragments( target, preset, response );\n\t\t\tthis.pushUrlToHistory( targetUrl, response.pageTitle, filters );\n\t\t\tthis.originalSearch = location.search;\n\n\t\t\t$target && this.unblock( $target );\n\n\t\t\tthis._afterFilter( response, filters );\n\n\t\t\tthis.doingAjax = false;\n\t\t} );\n\t}\n\n\t// actions performed before filter\n\t_beforeFilter( response, filters ) {\n\t\t$( document ).trigger( 'yith-wcan-ajax-loading', [\n\t\t\tresponse,\n\t\t\tfilters,\n\t\t] );\n\t}\n\n\t// actions performed after filter\n\t_afterFilter( response, filters ) {\n\t\t$( '.woocommerce-ordering' ).on(\n\t\t\t'change',\n\t\t\t'select.orderby',\n\t\t\tfunction () {\n\t\t\t\t$( this ).closest( 'form' ).submit();\n\t\t\t}\n\t\t);\n\n\t\tthis.filtered = filters && !! Object.keys( filters ).length;\n\t\tthis.filtered\n\t\t\t? $body.addClass( 'filtered' )\n\t\t\t: $body.removeClass( 'filtered' );\n\n\t\t$( window ).trigger( 'scroll' );\n\n\t\t$( document )\n\t\t\t.trigger( 'yith-wcan-ajax-filtered', [ response, filters ] )\n\t\t\t.trigger( 'yith_wcwl_reload_fragments' );\n\t}\n\n\t// build url to show\n\tbuildUrl( filters ) {\n\t\tlet queryParam = yith_wcan_shortcodes.query_param,\n\t\t\tparams = {},\n\t\t\tlocation = window.location,\n\t\t\turl = !! yith_wcan_shortcodes.base_url\n\t\t\t\t? yith_wcan_shortcodes.base_url\n\t\t\t\t: location?.origin + location?.pathname,\n\t\t\tsearch = '',\n\t\t\tself = this;\n\n\t\tconst haveFilters =\n\t\t\ttypeof filters === 'object' && Object.keys( filters ).length;\n\n\t\t// remove filter session from current url, if any\n\t\tif ( !! yith_wcan_shortcodes.session_param ) {\n\t\t\turl = url.replace(\n\t\t\t\tnew RegExp(\n\t\t\t\t\t'/' + yith_wcan_shortcodes.session_param + '/[^/]*/'\n\t\t\t\t),\n\t\t\t\t''\n\t\t\t);\n\t\t}\n\n\t\tif ( haveFilters ) {\n\t\t\tparams[ queryParam ] = 1;\n\t\t}\n\n\t\tif ( !! this.originalSearch ) {\n\t\t\tconst searchParams = this.originalSearch\n\t\t\t\t.replace( '?', '' )\n\t\t\t\t.split( '&' )\n\t\t\t\t.reduce( ( a, v ) => {\n\t\t\t\t\tconst items = v.split( '=' );\n\n\t\t\t\t\tif ( items.length === 2 ) {\n\t\t\t\t\t\tif ( this.isFilterParam( items[ 0 ] ) ) {\n\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ta[ items[ 0 ] ] = items[ 1 ];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn a;\n\t\t\t\t}, {} );\n\n\t\t\tparams = $.extend( params, searchParams );\n\t\t}\n\n\t\tif ( haveFilters ) {\n\t\t\tparams = $.extend( params, filters );\n\t\t}\n\n\t\tsearch = Object.keys( params )\n\t\t\t.reduce( function ( a, i ) {\n\t\t\t\tconst v = params[ i ];\n\n\t\t\t\tif ( ! v || ! i ) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\n\t\t\t\ta += self._cleanParam( i ) + '=' + self._cleanParam( v ) + '&';\n\n\t\t\t\treturn a;\n\t\t\t}, '?' )\n\t\t\t.replace( /&$/g, '' )\n\t\t\t.replace( /%2B/g, '+' )\n\t\t\t.replace( /%2C/g, ',' );\n\n\t\tif ( search.length > 1 ) {\n\t\t\turl += search;\n\t\t}\n\n\t\treturn url;\n\t}\n\n\t// retrieves alternative sharing url in response body\n\tsearchAlternativeUrl( response, defaultUrl = '' ) {\n\t\tlet url = defaultUrl,\n\t\t\tmatches;\n\n\t\tif ( -1 === response.indexOf( 'yith_wcan:sharing_url' ) ) {\n\t\t\treturn url;\n\t\t}\n\n\t\tmatches = response.match(\n\t\t\t/<meta name=\"yith_wcan:sharing_url\" content=\"([^\"]*)\">/\n\t\t);\n\t\turl = matches && 1 in matches ? matches[ 1 ] : url;\n\n\t\treturn url;\n\t}\n\n\t// push url to browser history\n\tpushUrlToHistory( url, title, filters, current ) {\n\t\tif (\n\t\t\t! yith_wcan_shortcodes.change_browser_url ||\n\t\t\tnavigator.userAgent.match( /msie/i )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet method = 'pushState';\n\n\t\tif ( !! current ) {\n\t\t\tmethod = 'replaceState';\n\t\t}\n\n\t\twindow.history[ method ](\n\t\t\t{\n\t\t\t\t_yithWcan: true,\n\t\t\t\tpageTitle: title,\n\t\t\t\tfilters,\n\t\t\t},\n\t\t\t'',\n\t\t\turl\n\t\t);\n\t}\n\n\t// replaces elements in the page with refreshed ones\n\trefreshFragments( target, preset, response ) {\n\t\tconst responseDom = document.createElement( 'html' ),\n\t\t\t$response = $( responseDom );\n\n\t\tresponseDom.innerHTML = response;\n\n\t\tif ( target ) {\n\t\t\tlet $preset = $( preset ),\n\t\t\t\t$target = $( target ),\n\t\t\t\t$destination;\n\n\t\t\tif ( $preset.length ) {\n\t\t\t\t$destination = $response.find( preset );\n\n\t\t\t\tif ( $destination.length ) {\n\t\t\t\t\t$preset.replaceWith( $destination.first() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $target.length ) {\n\t\t\t\t$destination = $response.find( target );\n\n\t\t\t\tif ( $destination.length ) {\n\t\t\t\t\t$target.replaceWith( $destination.first() );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst content = $( yith_wcan_shortcodes.content );\n\n\t\t\tif ( content.length ) {\n\t\t\t\tcontent.replaceWith(\n\t\t\t\t\t$response.find( yith_wcan_shortcodes.content )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$( 'body' ).replaceWith( $response.find( 'body' ) );\n\t\t\t}\n\t\t}\n\n\t\t$( document ).trigger( 'yith_wcan_init_shortcodes' );\n\t}\n\n\t// clean url parameters\n\t_cleanParam( param ) {\n\t\tif (\n\t\t\t! yith_wcan_shortcodes?.process_sanitize ||\n\t\t\tyith_wcan_shortcodes?.skip_sanitize\n\t\t) {\n\t\t\treturn param;\n\t\t}\n\n\t\treturn encodeURIComponent( param );\n\t}\n\n\t// executes Ajax calls\n\t_doAjax( url, params ) {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tparams = $.extend(\n\t\t\t{\n\t\t\t\turl,\n\t\t\t\theaders: {\n\t\t\t\t\t'X-YITH-WCAN': 1,\n\t\t\t\t},\n\t\t\t},\n\t\t\tparams\n\t\t);\n\n\t\tthis.xhr = $.ajax( params );\n\n\t\treturn this.xhr;\n\t}\n\n\t// block dom elements\n\tblock( $el ) {\n\t\tif ( typeof $.fn.block === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet background = '#fff center center no-repeat';\n\n\t\tif ( yith_wcan_shortcodes?.loader ) {\n\t\t\tbackground = `url('${ yith_wcan_shortcodes.loader }') ${ background }`;\n\t\t}\n\n\t\t$el.block( {\n\t\t\tmessage: null,\n\t\t\toverlayCSS: {\n\t\t\t\tbackground,\n\t\t\t\topacity: 0.7,\n\t\t\t},\n\t\t} );\n\t}\n\n\t// unblock dom elements\n\tunblock( $el ) {\n\t\tif ( typeof $.fn.unblock === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$el.unblock();\n\t}\n\n\t// checks if param is one used by layared nav to filter products.\n\tisFilterParam( param ) {\n\t\tlet supportedParams = [\n\t\t\t\t'rating_filter',\n\t\t\t\t'min_price',\n\t\t\t\t'max_price',\n\t\t\t\t'price_ranges',\n\t\t\t\t'onsale_filter',\n\t\t\t\t'instock_filter',\n\t\t\t\t'featured_filter',\n\t\t\t\t'orderby',\n\t\t\t\t'product-page',\n\t\t\t\tyith_wcan_shortcodes.query_param,\n\t\t\t],\n\t\t\tcustomParams;\n\n\t\t// filter properties\n\t\tcustomParams = $( document ).triggerHandler(\n\t\t\t'yith_wcan_supported_filters_parameters',\n\t\t\t[ supportedParams ]\n\t\t);\n\n\t\tif ( !! customParams ) {\n\t\t\tsupportedParams = customParams;\n\t\t}\n\n\t\tsupportedParams = supportedParams.concat(\n\t\t\tyith_wcan_shortcodes.supported_taxonomies.map( ( i ) =>\n\t\t\t\ti.replace( 'pa_', 'filter_' )\n\t\t\t)\n\t\t);\n\n\t\tif ( -1 !== supportedParams.indexOf( param ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( -1 !== param.indexOf( 'filter_' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( -1 !== param.indexOf( 'query_type_' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\n\nexport default class YITH_WCAN_Reset_Button {\n\t// current button\n\t$reset = null;\n\n\t// init object\n\tconstructor( el ) {\n\t\t// current button\n\t\tthis.$reset = el;\n\n\t\tthis.$reset.on( 'click', function ( ev ) {\n\t\t\tev.preventDefault();\n\n\t\t\t$( '.yith-wcan-filters' ).each( function () {\n\t\t\t\tconst preset = $( this ).data( 'preset' );\n\n\t\t\t\tpreset.deactivateAllFilters( true );\n\t\t\t\tpreset.closeModal();\n\t\t\t} );\n\t\t} );\n\n\t\tthis.$reset.data( 'reset', this ).addClass( 'enhanced' );\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\n\nexport default class YITH_WCAN_Dropdown {\n\t// current button\n\t$originalSelect = null;\n\n\t// main element\n\t$_main = null;\n\n\t// label element\n\t$_label = null;\n\n\t// dropdown\n\t$_dropdown = null;\n\n\t// search input\n\t$_search = null;\n\n\t// show more link\n\t$_showMore = null;\n\n\t// items list\n\t$_items = null;\n\n\t// current page\n\tcurrentPage = 1;\n\n\t// options\n\toptions = {};\n\n\t// init object\n\tconstructor( el, opts ) {\n\t\tthis.$originalSelect = el;\n\n\t\tif ( ! this.$originalSelect.is( 'select' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst defaultPerPage = this.$originalSelect.data( 'per_page' ),\n\t\t\tdefaultOrder = this.$originalSelect.data( 'order' ),\n\t\t\tdefaultAll = this.$originalSelect.data( 'all-label' ),\n\t\t\tdefaults = {\n\t\t\t\tshowSearch: this.$originalSelect.data( 'show_search' ),\n\t\t\t\tpaginate: this.$originalSelect.data( 'paginate' ),\n\t\t\t\tperPage: defaultPerPage ? defaultPerPage : 10,\n\t\t\t\torder: defaultOrder ? defaultOrder : 'ASC',\n\t\t\t\tgetElements: null,\n\t\t\t\tlabels: {\n\t\t\t\t\temptyLabel: defaultAll\n\t\t\t\t\t\t? defaultAll\n\t\t\t\t\t\t: yith_wcan_shortcodes.labels?.empty_option,\n\t\t\t\t\tsearchPlaceholder:\n\t\t\t\t\t\tyith_wcan_shortcodes.labels?.search_placeholder,\n\t\t\t\t\tnoItemsFound: yith_wcan_shortcodes.labels?.no_items,\n\t\t\t\t\tshowMore: yith_wcan_shortcodes.labels?.show_more,\n\t\t\t\t},\n\t\t\t};\n\n\t\tthis.options = $.extend( defaults, opts );\n\n\t\tthis._hideSelect();\n\t\tthis._initTemplate();\n\t\tthis._initActions();\n\n\t\tthis.$originalSelect.data( 'dropdown', this ).addClass( 'enhanced' );\n\t}\n\n\t// hide select\n\t_hideSelect() {\n\t\tthis.$originalSelect.hide();\n\t}\n\n\t// create dropdown\n\t_initTemplate() {\n\t\tconst $mainSpan = $( '<div/>', {\n\t\t\t\tclass: 'yith-wcan-dropdown closed',\n\t\t\t} ),\n\t\t\t$labelSpan = $( '<div/>', {\n\t\t\t\tclass: 'dropdown-label',\n\t\t\t\thtml: this.getLabel(),\n\t\t\t} ),\n\t\t\t$dropdownSpan = $( '<div>', {\n\t\t\t\tclass: 'dropdown-wrapper',\n\t\t\t} ),\n\t\t\t$matchingItemsList = $( '<ul/>', {\n\t\t\t\tclass: 'matching-items filter-items',\n\t\t\t} );\n\n\t\t$dropdownSpan.append( $matchingItemsList );\n\t\t$mainSpan.append( $labelSpan ).append( $dropdownSpan );\n\n\t\tif ( this.options.showSearch ) {\n\t\t\tthis._initSearchTemplate( $dropdownSpan );\n\t\t}\n\n\t\tif ( this.options.paginate ) {\n\t\t\tthis._initShowMoreTemplate( $dropdownSpan );\n\t\t}\n\n\t\tthis.$originalSelect.after( $mainSpan );\n\t\tthis.$_main = $mainSpan;\n\t\tthis.$_label = $labelSpan;\n\t\tthis.$_dropdown = $dropdownSpan;\n\t\tthis.$_items = $matchingItemsList;\n\t}\n\n\t// create search field\n\t_initSearchTemplate( $dropdwonSpan ) {\n\t\tconst $container = $( '<div/>', {\n\t\t\t\tclass: 'search-field-container',\n\t\t\t} ),\n\t\t\t$search = $( '<input/>', {\n\t\t\t\tname: 's',\n\t\t\t\tclass: 'search-field',\n\t\t\t\tautocomplete: 'off',\n\t\t\t\ttype: 'search',\n\t\t\t\tplaceholder: this.options.labels.searchPlaceholder,\n\t\t\t} );\n\n\t\t$container.append( $search ).prependTo( $dropdwonSpan );\n\t\tthis.$_search = $search;\n\t}\n\n\t// create showMore field\n\t_initShowMoreTemplate( $dropdwonSpan ) {\n\t\tconst $showMore = $( '<a/>', {\n\t\t\tclass: 'show-more',\n\t\t\ttext: this.options.labels.showMore?.replace(\n\t\t\t\t'%d',\n\t\t\t\tthis.options.perPage\n\t\t\t),\n\t\t} );\n\n\t\t$showMore.on( 'click', this.loadNextPage.bind( this ) ).hide();\n\n\t\t$dropdwonSpan.append( $showMore );\n\t\tthis.$_showMore = $showMore;\n\t}\n\n\t// init actions performed over dropdown elements\n\t_initActions() {\n\t\tconst self = this;\n\n\t\t// main open event\n\t\tthis.$_main?.on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t\tself.toggleDropdown();\n\t\t} );\n\t\tthis.$_dropdown.on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t} );\n\n\t\t// search event\n\t\tthis.$_search?.on( 'keyup search', () => {\n\t\t\tself._populateItems();\n\t\t} );\n\n\t\t// select event\n\t\tthis.$_items.on( 'change', ':input', function () {\n\t\t\tlet $li = $( this ).closest( 'li' ),\n\t\t\t\tvalue = $li.data( 'value' ),\n\t\t\t\tisActive = false;\n\n\t\t\tif (\n\t\t\t\t$li.hasClass( 'disabled' ) &&\n\t\t\t\t! self.isValueSelected( value )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$li.toggleClass( 'active' );\n\t\t\tisActive = $li.hasClass( 'active' );\n\n\t\t\tself._changeItemStatus( value, isActive );\n\t\t} );\n\t\tthis.$_items.on( 'click', 'li:not(.checkbox) a', function ( ev ) {\n\t\t\tlet $li = $( this ).closest( 'li' ),\n\t\t\t\tvalue = $li.data( 'value' ),\n\t\t\t\tisActive = false;\n\n\t\t\tev.preventDefault();\n\n\t\t\tif (\n\t\t\t\t$li.hasClass( 'disabled' ) &&\n\t\t\t\t! self.isValueSelected( value )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$li.toggleClass( 'active' );\n\t\t\tisActive = $li.hasClass( 'active' );\n\n\t\t\tif ( isActive ) {\n\t\t\t\t$li.siblings().removeClass( 'active' );\n\t\t\t}\n\n\t\t\tself._changeItemStatus( value, isActive );\n\t\t} );\n\t\tthis.$_items.on( 'click', 'label > a', function ( ev ) {\n\t\t\tconst input = $( this ).parent().find( ':input' );\n\n\t\t\tev.preventDefault();\n\n\t\t\tif (\n\t\t\t\tinput.is( '[type=\"radio\"]' ) ||\n\t\t\t\tinput.is( '[type=\"checkbox\"]' )\n\t\t\t) {\n\t\t\t\tinput.prop( 'checked', ! input.prop( 'checked' ) );\n\t\t\t}\n\n\t\t\tinput.change();\n\t\t} );\n\n\t\t// select change\n\t\tthis.$originalSelect.on( 'change', ( ev, selfOriginated ) => {\n\t\t\tif ( selfOriginated ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.$_items.find( 'li' ).each( function () {\n\t\t\t\tconst value = $( this ).data( 'value' );\n\n\t\t\t\tif ( self.isValueSelected( value ) ) {\n\t\t\t\t\tself._selectItem( value );\n\t\t\t\t} else {\n\t\t\t\t\tself._deselectItem( value );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tself.updateLabel();\n\t\t} );\n\n\t\t// close dropdown on external click; do this handler only once for any dropdown in the page\n\t\tif ( ! globalThis?.yith_wcan_dropdown_init ) {\n\t\t\t$( document ).on( 'click', this._closeAllDropdowns );\n\t\t\tglobalThis.yith_wcan_dropdown_init = true;\n\t\t}\n\t}\n\n\t// open dropdown\n\topenDropdown() {\n\t\tthis.$_main?.addClass( 'open' ).removeClass( 'closed' );\n\t\tthis._afterDropdownOpen();\n\t}\n\n\t// close dropdown\n\tcloseDropdown() {\n\t\tthis.$_main?.removeClass( 'open' ).addClass( 'closed' );\n\t}\n\n\t// close all dropdowns\n\t_closeAllDropdowns() {\n\t\tconst dropdowns = $( document )\n\t\t\t.find( 'select.enhanced' )\n\t\t\t.filter( function ( i, select ) {\n\t\t\t\tconst $el = $( select );\n\n\t\t\t\treturn !! $el.data( 'dropdown' );\n\t\t\t} );\n\n\t\tdropdowns.each( function () {\n\t\t\t$( this ).data( 'dropdown' ).closeDropdown();\n\t\t} );\n\t}\n\n\t// close other dropdowns\n\t_closeOtherDropdowns() {\n\t\tconst self = this,\n\t\t\tdropdowns = $( document )\n\t\t\t\t.find( 'select.enhanced' )\n\t\t\t\t.filter( function ( i, select ) {\n\t\t\t\t\tconst $el = $( select );\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! $el.data( 'dropdown' ) &&\n\t\t\t\t\t\t! $el.is( self.$originalSelect )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\tdropdowns.each( function () {\n\t\t\t$( this ).data( 'dropdown' ).closeDropdown();\n\t\t} );\n\t}\n\n\t// toggle dropdown\n\ttoggleDropdown() {\n\t\tthis.$_main?.toggleClass( 'open' ).toggleClass( 'closed' );\n\n\t\tif ( this.$_main?.hasClass( 'open' ) ) {\n\t\t\tthis._afterDropdownOpen();\n\t\t}\n\t}\n\n\t// perform operations after dropdown is open\n\t_afterDropdownOpen() {\n\t\tthis._closeOtherDropdowns();\n\n\t\tif ( this.$_search?.length ) {\n\t\t\tthis.$_search.val( '' );\n\t\t}\n\n\t\tthis._populateItems();\n\t}\n\n\t// get elements\n\tgetMatchingElements( search, limit ) {\n\t\tlet matchingElements = [],\n\t\t\t$options = this.getOptions(),\n\t\t\tpromise;\n\n\t\tpromise = new Promise( ( resolve ) => {\n\t\t\t// first of all, search across select option\n\t\t\t$options.each( function () {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\tvalue = t.val(),\n\t\t\t\t\tlabel = t.html(),\n\t\t\t\t\tregex = new RegExp( '.*' + search + '.*', 'i' ),\n\t\t\t\t\tshow =\n\t\t\t\t\t\t! search || regex.test( value ) || regex.test( label );\n\n\t\t\t\tif ( show ) {\n\t\t\t\t\tmatchingElements.push( {\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// then retrieve additional items\n\t\t\tif ( this.options.getElements ) {\n\t\t\t\t// we're expecting key => value pairs\n\t\t\t\tthis.options\n\t\t\t\t\t.getElements( search )\n\t\t\t\t\t.then( ( retrievedElements ) => {\n\t\t\t\t\t\tif ( retrievedElements ) {\n\t\t\t\t\t\t\t// reformat retrieved array\n\t\t\t\t\t\t\tretrievedElements = retrievedElements.reduce(\n\t\t\t\t\t\t\t\t( a, v, i ) => {\n\t\t\t\t\t\t\t\t\ta.push( { label: i, value: v } );\n\t\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// merge found results with options\n\t\t\t\t\t\t\tmatchingElements = $.extend(\n\t\t\t\t\t\t\t\tmatchingElements,\n\t\t\t\t\t\t\t\tretrievedElements\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresolve( this._formatItems( matchingElements, limit ) );\n\t\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tresolve( this._formatItems( matchingElements, limit ) );\n\t\t\t}\n\t\t} );\n\n\t\treturn promise;\n\t}\n\n\t// format items as key/value pairs for further processing\n\t_formatItems( items, limit ) {\n\t\tlet indexes = [],\n\t\t\thasMore = false;\n\n\t\t// remove duplicates and sort array of results\n\t\titems\n\t\t\t.filter( ( v ) => {\n\t\t\t\tif ( -1 === indexes.indexOf( v.value ) ) {\n\t\t\t\t\tindexes.push( v.value );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} )\n\t\t\t.sort( ( a, b ) => {\n\t\t\t\tconst order = this.options.order,\n\t\t\t\t\tmod = order === 'ASC' ? 1 : -1;\n\n\t\t\t\tif ( a.value < b.value ) {\n\t\t\t\t\treturn -1 * mod;\n\t\t\t\t} else if ( a.value > b.value ) {\n\t\t\t\t\treturn mod;\n\t\t\t\t}\n\n\t\t\t\treturn 0;\n\t\t\t} );\n\n\t\t// paginate when needed\n\t\tif ( limit ) {\n\t\t\thasMore = limit < Object.keys( items ).length;\n\t\t\titems = items.slice( 0, limit );\n\t\t}\n\n\t\treturn {\n\t\t\titems,\n\t\t\thasMore,\n\t\t};\n\t}\n\n\t// generate item to append to items list\n\t_generateItem( value, label ) {\n\t\tlet active = this.isValueSelected( value ),\n\t\t\toption = this.getOptionByValue( value ),\n\t\t\t$item = $( '<li/>', {\n\t\t\t\t'data-value': value,\n\t\t\t\tclass: option.length ? option.attr( 'class' ) : '',\n\t\t\t} ),\n\t\t\t$anchor;\n\n\t\tif ( option.length ) {\n\t\t\tconst template = option.data( 'template' ),\n\t\t\t\tcount = option.data( 'count' );\n\n\t\t\tlabel = template ? template : label;\n\n\t\t\tif ( !! count ) {\n\t\t\t\tlabel += count;\n\t\t\t}\n\t\t}\n\n\t\t$anchor = $( '<a/>', {\n\t\t\thref: option.length ? option.data( 'filter_url' ) : '#',\n\t\t\thtml: label,\n\t\t\trel: 'nofollow',\n\t\t\t'data-title': option.length ? option.data( 'title' ) : '',\n\t\t} );\n\n\t\tif ( this.$originalSelect.prop( 'multiple' ) ) {\n\t\t\tconst $checkbox = $( '<input/>', {\n\t\t\t\t\ttype: 'checkbox',\n\t\t\t\t\tvalue,\n\t\t\t\t} ),\n\t\t\t\t$label = $( '<label>' );\n\n\t\t\t$checkbox.prop( 'checked', active );\n\t\t\t$label.prepend( $checkbox ).append( $anchor );\n\t\t\t$item.append( $label ).addClass( 'checkbox' );\n\t\t} else {\n\t\t\t$item.append( $anchor );\n\t\t}\n\n\t\tactive ? $item.addClass( 'active' ) : $item.removeClass( 'active' );\n\n\t\treturn $item;\n\t}\n\n\t// populate items list\n\t_populateItems( page ) {\n\t\tlet search = this.$_search?.length ? this.$_search.val() : '',\n\t\t\tperPage = this.options.paginate ? this.options.perPage : 0,\n\t\t\tlimit;\n\n\t\tpage = page ? parseInt( page ) : 1;\n\t\tlimit = page * perPage;\n\n\t\tthis.getMatchingElements( search, limit ).then( ( resultSet ) => {\n\t\t\tlet matchingItems = resultSet.items,\n\t\t\t\titems = [],\n\t\t\t\thasMore = false;\n\n\t\t\t// remove all previous items\n\t\t\tthis._emptyItems();\n\t\t\tthis._hideLoadMore();\n\n\t\t\tif ( ! matchingItems.length ) {\n\t\t\t\titems.push(\n\t\t\t\t\t$( '<li/>', { text: this.options.labels.noItemsFound } )\n\t\t\t\t);\n\n\t\t\t\tthis.currentPage = 1;\n\t\t\t} else {\n\t\t\t\tfor ( const v of matchingItems ) {\n\t\t\t\t\tif ( v.value === '' ) {\n\t\t\t\t\t\titems.unshift( this._generateItem( v.value, v.label ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\titems.push( this._generateItem( v.value, v.label ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.currentPage = page;\n\t\t\t\thasMore = resultSet.hasMore;\n\t\t\t}\n\n\t\t\tthis.$_items.append( items );\n\n\t\t\tthis.$originalSelect.trigger( 'yith_wcan_dropdown_updated' );\n\n\t\t\tif ( hasMore ) {\n\t\t\t\tthis._showLoadMore();\n\t\t\t}\n\t\t} );\n\t}\n\n\t// load next page of items\n\tloadNextPage() {\n\t\tconst page = this.currentPage + 1;\n\n\t\tthis._populateItems( page );\n\t}\n\n\t// set an item as active\n\t_selectItem( value ) {\n\t\treturn this._changeItemStatus( value, true );\n\t}\n\n\t// disable an item\n\t_deselectItem( value ) {\n\t\treturn this._changeItemStatus( value, false );\n\t}\n\n\t// change item status\n\t_changeItemStatus( value, status ) {\n\t\tconst $option = this.$originalSelect.find(\n\t\t\t`option[value=\"${ value }\"]`\n\t\t);\n\n\t\tif ( $option.length ) {\n\t\t\t$option.prop( 'selected', status );\n\n\t\t\tthis.closeDropdown();\n\t\t\tthis.updateLabel();\n\n\t\t\tthis.$originalSelect.trigger( 'change', [ true ] );\n\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// empty items list\n\t_emptyItems() {\n\t\tthis.$_items.html( '' );\n\t}\n\n\t// show \"Load more\" link\n\t_showLoadMore() {\n\t\tthis.$_showMore.show();\n\t}\n\n\t// hide \"Load more\" link\n\t_hideLoadMore() {\n\t\tthis.$_showMore.hide();\n\t}\n\n\t// returns select label\n\tgetLabel() {\n\t\treturn this.hasSelectedValues()\n\t\t\t? this.getSelectedLabels().join( ', ' )\n\t\t\t: this.options.labels.emptyLabel;\n\t}\n\n\t// update label to match new selection\n\tupdateLabel() {\n\t\tconst label = this.getLabel();\n\n\t\tthis.$_label?.html( label );\n\t}\n\n\t// returns select options\n\tgetOptions() {\n\t\treturn this.$originalSelect.find( 'option' );\n\t}\n\n\t// checks whether select has selected values\n\thasSelectedValues() {\n\t\treturn this.getSelectedOptions().length;\n\t}\n\n\t// checks whether a value is selected\n\tisValueSelected( value ) {\n\t\tconst found = this.getSelectedValues().indexOf( value.toString() );\n\n\t\treturn -1 !== found;\n\t}\n\n\t// retrieve selected options\n\tgetSelectedOptions() {\n\t\treturn this.$originalSelect.find( 'option' ).filter( ':selected' );\n\t}\n\n\t// retrieves an option node by value\n\tgetOptionByValue( value ) {\n\t\treturn this.$originalSelect.find( `option[value=\"${ value }\"]` );\n\t}\n\n\t// retrieve labels for selected options\n\tgetSelectedLabels() {\n\t\tconst labels = [];\n\n\t\tthis.getSelectedOptions().each( function () {\n\t\t\tlet $option = $( this ),\n\t\t\t\ttemplate = $option.data( 'template' );\n\n\t\t\ttemplate = template\n\t\t\t\t? template\n\t\t\t\t: $option.html().replace( /\\([0-9]*\\)/, '' );\n\n\t\t\tlabels.push( template );\n\t\t} );\n\n\t\treturn labels;\n\t}\n\n\t// retrieve values for selected options\n\tgetSelectedValues() {\n\t\tconst values = [];\n\n\t\tthis.getSelectedOptions().each( function () {\n\t\t\tvalues.push( $( this ).val() );\n\t\t} );\n\n\t\treturn values;\n\t}\n\n\tdestroy() {\n\t\t// TBD\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\nimport YITH_WCAN_Dropdown from './yith-wcan-dropdown';\n\nexport default class YITH_WCAN_Preset {\n\t// main preset node\n\tpreset = false;\n\t$preset = false;\n\n\t// target of the filter, if any\n\ttarget = false;\n\t$target = false;\n\n\t// filters node\n\t$filters = false;\n\n\t// filter button\n\t$filterButtons = false;\n\n\t// nodes created just for modal layout\n\tmodalElements = {};\n\n\t// retains current status of filters\n\tactiveFilters = false;\n\n\t// mobile flag\n\tisMobile = false;\n\n\t// slider timeout\n\tsliderTimeout = false;\n\n\t// registers when status has changed\n\toriginalFilters = null;\n\tdirty = false;\n\n\t// init object\n\tconstructor( el ) {\n\t\t// main preset node\n\t\tthis.preset = '#' + el.attr( 'id' );\n\t\tthis.$preset = el;\n\n\t\t// target of the filter, if any\n\t\tthis.target = this.$preset.data( 'target' );\n\t\tthis.$target = this.target ? $( this.target ) : false;\n\n\t\tthis._regiterStatus();\n\t\tthis._initFilterButton();\n\t\tthis._initResponsive();\n\t\tthis._initFilters();\n\t\tthis._initActions();\n\n\t\tthis.$preset\n\t\t\t.data( 'preset', this )\n\t\t\t.addClass( 'enhanced' )\n\t\t\t.trigger( 'yith_wcan_preset_initialized', [ this ] );\n\t}\n\n\t// init filters\n\t_initFilters() {\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself._initFilter( $filter );\n\t\t} );\n\n\t\tthis.maybeShowClearAllFilters();\n\t}\n\n\t// init filter button\n\t_initFilterButton() {\n\t\tthis.$filterButtons = this.$preset.find( '.apply-filters' );\n\n\t\tif ( ! this.$filterButtons.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// manage filter button\n\t\tthis.$filterButtons\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\t\t\t\tthis.filter();\n\t\t\t} )\n\t\t\t.hide();\n\t}\n\n\t// init generic actions\n\t_initActions() {\n\t\tthis.$preset.find( 'form' ).on( 'submit', ( ev ) => {\n\t\t\tev.preventDefault();\n\t\t} );\n\t}\n\n\t// init responsive\n\t_initResponsive() {\n\t\tif ( ! yith_wcan_shortcodes.modal_on_mobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst media = window.matchMedia(\n\t\t\t`(max-width: ${ yith_wcan_shortcodes.mobile_media_query }px)`\n\t\t);\n\n\t\t$( window )\n\t\t\t.on( 'resize', () => {\n\t\t\t\tconst isMobile = !! media.matches;\n\n\t\t\t\tif ( isMobile !== this.isMobile ) {\n\t\t\t\t\tthis.isMobile = isMobile;\n\t\t\t\t\tthis._afterLayoutChange();\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.resize();\n\t}\n\n\t// init filter\n\t_initFilter( $filter ) {\n\t\tconst self = this,\n\t\t\thandleChange = function ( ev ) {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\t$currentFilter = t.closest( '.yith-wcan-filter' ),\n\t\t\t\t\tmultiple = $currentFilter.length\n\t\t\t\t\t\t? 'yes' === $currentFilter.data( 'multiple' )\n\t\t\t\t\t\t: false,\n\t\t\t\t\t$item = t.closest( '.filter-item' ),\n\t\t\t\t\t$items = $item.length\n\t\t\t\t\t\t? $currentFilter.find( '.filter-item' ).not( $item )\n\t\t\t\t\t\t: [];\n\n\t\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tev.preventDefault();\n\n\t\t\t\t$items.length &&\n\t\t\t\t\t! multiple &&\n\t\t\t\t\t$items\n\t\t\t\t\t\t.removeClass( 'active' )\n\t\t\t\t\t\t.children( 'label' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.parent( '.checked' )\n\t\t\t\t\t\t.removeClass( 'checked' );\n\t\t\t\t$item.length && $item.toggleClass( 'active' );\n\n\t\t\t\t// reset active filters.\n\t\t\t\tself.activeFilters = false;\n\n\t\t\t\tself.maybeFilter( $filter );\n\t\t\t\tself.maybeToggleClearAllFilters();\n\t\t\t\tself.maybeToggleClearFilter( $currentFilter );\n\t\t\t};\n\n\t\t// handle filter activation/deactivation by click on label (no input involved)\n\t\t$filter\n\t\t\t.find( '.filter-item' )\n\t\t\t.not( '.checkbox' )\n\t\t\t.not( '.radio' )\n\t\t\t.on( 'click', 'a', function ( ev ) {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\t\tif ( ! $( ev?.delegateTarget ).is( $item ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\thandleChange.call( this, ev );\n\t\t\t} );\n\n\t\t// handle filter activation/deactivation from input change\n\t\t$filter.find( ':input' ).on( 'change', function ( ev ) {\n\t\t\tconst t = $( this ),\n\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\tt.prop( 'checked', false );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\thandleChange.call( this, ev );\n\t\t} );\n\n\t\t// handle filter activation/deactivation by click on label (there is an input whose state can be switched)\n\t\t$filter.find( 'label > a' ).on( 'click', function ( ev ) {\n\t\t\tconst t = $( this ),\n\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\tev.preventDefault();\n\n\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst $input = t.parent().find( ':input' );\n\n\t\t\tif (\n\t\t\t\t$input.is( '[type=\"radio\"]' ) ||\n\t\t\t\t$input.is( '[type=\"checkbox\"]' )\n\t\t\t) {\n\t\t\t\t$input.prop( 'checked', ! $input.prop( 'checked' ) );\n\t\t\t}\n\n\t\t\t$input.change();\n\t\t} );\n\n\t\t// init tooltip\n\t\tthis._initTooltip( $filter );\n\n\t\t// init price slider\n\t\tthis._initPriceSlider( $filter );\n\n\t\t// init dropdown\n\t\tthis._initDropdown( $filter );\n\n\t\t// init collapsable\n\t\tthis._initCollapsable( $filter );\n\n\t\t// init clear anchors\n\t\tthis.maybeShowClearFilter( $filter );\n\n\t\t// init custom inputs\n\t\tif ( this.$preset?.hasClass( 'custom-style' ) ) {\n\t\t\tthis._initCustomInput( $filter );\n\t\t\t$filter.on( 'yith_wcan_dropdown_updated', function () {\n\t\t\t\tconst $dropdown = $( this ),\n\t\t\t\t\t$current = $dropdown.closest( '.yith-wcan-filter' );\n\n\t\t\t\tself._initCustomInput( $current );\n\t\t\t} );\n\t\t}\n\t}\n\n\t// init tooltip\n\t_initTooltip( $filter, position ) {\n\t\t$filter.find( '[data-title]' ).each( function () {\n\t\t\tconst t = $( this );\n\n\t\t\tif ( t.hasClass( 'tooltip-added' ) || ! t.data( 'title' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tt.on( 'mouseenter', function () {\n\t\t\t\tlet th = $( this ),\n\t\t\t\t\ttooltip = null,\n\t\t\t\t\twrapperWidth = th.outerWidth(),\n\t\t\t\t\tleft = 0,\n\t\t\t\t\twidth = 0;\n\n\t\t\t\tif (\n\t\t\t\t\t! position ||\n\t\t\t\t\t( 'top' !== position && 'right' !== position )\n\t\t\t\t) {\n\t\t\t\t\tconst container = th.closest( '.filter-item' );\n\n\t\t\t\t\tposition =\n\t\t\t\t\t\tcontainer.hasClass( 'color' ) ||\n\t\t\t\t\t\tcontainer.hasClass( 'label' )\n\t\t\t\t\t\t\t? 'top'\n\t\t\t\t\t\t\t: 'right';\n\t\t\t\t}\n\n\t\t\t\ttooltip = $( '<span>', {\n\t\t\t\t\tclass: 'yith-wcan-tooltip',\n\t\t\t\t\thtml: th.data( 'title' ),\n\t\t\t\t} );\n\n\t\t\t\tth.append( tooltip );\n\n\t\t\t\twidth = tooltip.outerWidth() + 6;\n\t\t\t\ttooltip.outerWidth( width );\n\n\t\t\t\tif ( 'top' === position ) {\n\t\t\t\t\tleft = ( wrapperWidth - width ) / 2;\n\t\t\t\t} else {\n\t\t\t\t\tleft = wrapperWidth + 15;\n\t\t\t\t}\n\n\t\t\t\ttooltip.css( { left: left.toFixed( 0 ) + 'px' } ).fadeIn( 200 );\n\n\t\t\t\tth.addClass( 'with-tooltip' );\n\t\t\t} ).on( 'mouseleave', function () {\n\t\t\t\tconst th = $( this );\n\n\t\t\t\tth.find( '.yith-wcan-tooltip' ).fadeOut( 200, function () {\n\t\t\t\t\tth.removeClass( 'with-tooltip' )\n\t\t\t\t\t\t.find( '.yith-wcan-tooltip' )\n\t\t\t\t\t\t.remove();\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tt.addClass( 'tooltip-added' );\n\t\t} );\n\t}\n\n\t// init dropdown\n\t_initDropdown( $filter ) {\n\t\tconst $dropdown = $filter.find( 'select.filter-dropdown' );\n\n\t\tif ( ! $dropdown.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t$dropdown.hasClass( 'select2-hidden-accessible' ) &&\n\t\t\t'undefined' !== typeof $.fn.selectWoo\n\t\t) {\n\t\t\t$dropdown.selectWoo( 'destroy' );\n\t\t}\n\n\t\tthis._initDropdownObject( $dropdown, {\n\t\t\tpaginate: true,\n\t\t\tperPage: yith_wcan_shortcodes.terms_per_page,\n\t\t} );\n\t}\n\n\t// init dropdown object\n\t_initDropdownObject( $dropdown, opts ) {\n\t\treturn new YITH_WCAN_Dropdown( $dropdown, opts );\n\t}\n\n\t// init price slider\n\t_initPriceSlider( $filter ) {\n\t\tif ( ! $filter.hasClass( 'filter-price-slider' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst self = this,\n\t\t\t$container = $filter.find( '.price-slider' ),\n\t\t\t$minInput = $container.find( '.price-slider-min' ),\n\t\t\t$maxInput = $container.find( '.price-slider-max' ),\n\t\t\tmin = parseFloat( $container.data( 'min' ) ),\n\t\t\tmax = parseFloat( $container.data( 'max' ) ),\n\t\t\tcurrentMin = parseFloat( $minInput.val() ),\n\t\t\tcurrentMax = parseFloat( $maxInput.val() ),\n\t\t\tstep = parseFloat( $container.data( 'step' ) ),\n\t\t\thandleSliderChange = function () {\n\t\t\t\tif ( self.sliderTimeout ) {\n\t\t\t\t\tclearTimeout( self.sliderTimeout );\n\t\t\t\t}\n\n\t\t\t\tself.sliderTimeout = setTimeout( () => {\n\t\t\t\t\tself.maybeFilter( $filter );\n\t\t\t\t}, 200 );\n\t\t\t};\n\n\t\t$filter.find( '.price-slider-ui' ).ionRangeSlider( {\n\t\t\tskin: 'round',\n\t\t\ttype: 'double',\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\tfrom: currentMin,\n\t\t\tto: currentMax,\n\t\t\tmin_interval: step,\n\t\t\tvalues_separator: ' - ',\n\t\t\tprettify: ( v ) => this.formatPrice( v ),\n\t\t\tonChange: ( data ) => {\n\t\t\t\t$minInput.val( data.from );\n\t\t\t\t$maxInput.val( data.to );\n\t\t\t},\n\t\t\tonFinish: handleSliderChange,\n\t\t} );\n\n\t\t$minInput\n\t\t\t.add( $maxInput )\n\t\t\t.off( 'change' )\n\t\t\t.on( 'keyup', () => {\n\t\t\t\tif ( ! $minInput.val() || ! $maxInput.val() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\thandleSliderChange();\n\t\t\t} );\n\t}\n\n\t// init collapsable\n\t_initCollapsable( $filter ) {\n\t\tthis._initTitleCollapsable( $filter );\n\t\tthis._initHierarchyCollapsable( $filter );\n\t}\n\n\t// init toggle on click of the title\n\t_initTitleCollapsable( $filter ) {\n\t\tconst $title = $filter.find( '.collapsable' );\n\n\t\tif ( ! $title.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._initToggle( $title, $title, $filter.find( '.filter-content' ) );\n\t}\n\n\t// init toggle on click of the parent li\n\t_initHierarchyCollapsable( $filter ) {\n\t\tconst $items = $filter.find( '.hierarchy-collapsable' );\n\n\t\tif ( ! $items.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// set parents of currently active term as open\n\t\tconst self = this,\n\t\t\tactive = $filter.find( '.active' );\n\n\t\tif ( active.length ) {\n\t\t\tactive\n\t\t\t\t.parents( '.hierarchy-collapsable' )\n\t\t\t\t.removeClass( 'closed' )\n\t\t\t\t.addClass( 'opened' );\n\n\t\t\tif (\n\t\t\t\tactive.hasClass( 'hierarchy-collapsable' ) &&\n\t\t\t\tyith_wcan_shortcodes.show_current_children\n\t\t\t) {\n\t\t\t\tactive.removeClass( 'closed' ).addClass( 'opened' );\n\t\t\t}\n\t\t}\n\n\t\t$items.each( function () {\n\t\t\tconst $t = $( this ),\n\t\t\t\t$toggle = $( '<span/>', {\n\t\t\t\t\tclass: 'toggle-handle',\n\t\t\t\t} );\n\n\t\t\t$toggle.appendTo( $t );\n\n\t\t\tself._initToggle( $toggle, $t, $t.children( 'ul.filter-items' ) );\n\t\t} );\n\t}\n\n\t// init toggle to generic toggle/target pair\n\t_initToggle( $toggle, $container, $target ) {\n\t\tif ( $container.hasClass( 'closed' ) ) {\n\t\t\t$target.hide();\n\t\t}\n\n\t\t$toggle.off( 'click' ).on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t\tev.preventDefault();\n\n\t\t\t$target.slideToggle( 400, () => {\n\t\t\t\t$container.toggleClass( 'opened' ).toggleClass( 'closed' );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// init custom input\n\t_initCustomInput( $filter ) {\n\t\t$filter.find( ':input' ).each( function () {\n\t\t\tlet input = $( this ),\n\t\t\t\ttype = input.attr( 'type' ),\n\t\t\t\tcontainerClass = `${ type }button`,\n\t\t\t\tcontainer;\n\n\t\t\tif ( 'checkbox' !== type && 'radio' !== type ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( input.closest( `.${ containerClass }` ).length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( input.is( ':checked' ) ) {\n\t\t\t\tcontainerClass += ' checked';\n\t\t\t}\n\n\t\t\tcontainer = $( '<span/>', {\n\t\t\t\tclass: containerClass,\n\t\t\t} );\n\n\t\t\tinput.wrap( container ).on( 'change', function () {\n\t\t\t\tconst t = $( this );\n\n\t\t\t\tt.prop( 'checked' )\n\t\t\t\t\t? t.parent().addClass( 'checked' )\n\t\t\t\t\t: t.parent().removeClass( 'checked' );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// register initial status\n\t_regiterStatus() {\n\t\tthis.originalFilters = this.getFiltersProperties();\n\t}\n\n\t// trigger handling after layout change\n\t_afterLayoutChange() {\n\t\tif ( this.isMobile ) {\n\t\t\tthis.$preset\n\t\t\t\t.addClass( 'filters-modal' )\n\t\t\t\t.attr( 'role', 'dialog' )\n\t\t\t\t.attr( 'tabindex', '-1' )\n\t\t\t\t.hide();\n\n\t\t\tthis._addCloseModalButton();\n\t\t\tthis._addApplyFiltersModalButton();\n\t\t\tthis._switchToCollapsables();\n\n\t\t\tthis.$filterButtons?.hide();\n\t\t} else {\n\t\t\tthis.$preset\n\t\t\t\t.removeClass( 'filters-modal' )\n\t\t\t\t.removeClass( 'open' )\n\t\t\t\t.removeAttr( 'role' )\n\t\t\t\t.removeAttr( 'tabindex' )\n\t\t\t\t.show();\n\n\t\t\t$( 'body' )\n\t\t\t\t.css( 'overflow', 'auto' )\n\t\t\t\t.removeClass( 'yith-wcan-preset-modal-open' );\n\n\t\t\tthis._removeCloseModalButton();\n\t\t\tthis._removeApplyFiltersModalButton();\n\t\t\tthis._switchBackCollapsables();\n\n\t\t\tthis.$filterButtons?.show();\n\t\t}\n\t}\n\n\t// add modal close button\n\t_addCloseModalButton() {\n\t\tconst $closeButton = $( '<a/>', {\n\t\t\tclass: 'close-button',\n\t\t\thtml: '&times;',\n\t\t\t'data-dismiss': 'modal',\n\t\t\t'aria-label': yith_wcan_shortcodes.labels.close,\n\t\t} );\n\n\t\t$closeButton\n\t\t\t.prependTo( this.$preset )\n\t\t\t.on( 'click', this.closeModal.bind( this ) );\n\t\tthis.modalElements.closeButton = $closeButton;\n\t}\n\n\t// remove modal close button\n\t_removeCloseModalButton() {\n\t\tthis.modalElements?.closeButton?.remove();\n\t}\n\n\t// show main filter button for the modal\n\t_addApplyFiltersModalButton() {\n\t\tconst $filterButton = $( '<button/>', {\n\t\t\tclass: 'apply-filters main-modal-button',\n\t\t\thtml: yith_wcan_shortcodes.labels.show_results,\n\t\t\t'data-dismiss': 'modal',\n\t\t} );\n\n\t\t$filterButton.appendTo( this.$preset ).on( 'click', () => {\n\t\t\tthis.filter();\n\t\t\tthis.closeModal();\n\t\t} );\n\t\tthis.modalElements.applyFiltersButton = $filterButton;\n\t}\n\n\t// hide main filter button for the modal\n\t_removeApplyFiltersModalButton() {\n\t\tthis.modalElements?.applyFiltersButton?.remove();\n\t}\n\n\t// convert all filters to collapsable\n\t_switchToCollapsables() {\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this ),\n\t\t\t\t$title = $filter.find( '.filter-title' );\n\n\t\t\tif ( ! $title.length || $title.hasClass( 'collapsable' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$title.addClass( 'collapsable' ).data( 'disable-collapse', true );\n\n\t\t\tself._initTitleCollapsable( $filter );\n\t\t} );\n\t}\n\n\t// switch back filters to their previous collapsable state\n\t_switchBackCollapsables() {\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this ),\n\t\t\t\t$title = $filter.find( '.filter-title' );\n\n\t\t\tif (\n\t\t\t\t! $title.length ||\n\t\t\t\t! $title.hasClass( 'collapsable' ) ||\n\t\t\t\t! $title.data( 'disable-collapse' )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$title\n\t\t\t\t.removeClass( 'collapsable' )\n\t\t\t\t.removeData( 'disable-collapse', true )\n\t\t\t\t.off( 'click' );\n\n\t\t\t$filter.find( '.filter-content' ).show();\n\t\t} );\n\t}\n\n\t// close all collpasable before showing modal\n\t_openAllCollapsables() {\n\t\tthis.$filters\n\t\t\t.not( '.no-title' )\n\t\t\t.not( ( i, v ) => {\n\t\t\t\treturn this.isFilterActive( $( v ) );\n\t\t\t} )\n\t\t\t.find( '.filter-content' )\n\t\t\t.show()\n\t\t\t.end()\n\t\t\t.find( '.filter-title' )\n\t\t\t.removeClass( 'closed' )\n\t\t\t.addClass( 'opened' );\n\t}\n\n\t// close all collpasable before showing modal\n\t_closeAllCollapsables() {\n\t\tthis.$filters\n\t\t\t.not( '.no-title' )\n\t\t\t.not( ( i, v ) => {\n\t\t\t\treturn this.isFilterActive( $( v ) );\n\t\t\t} )\n\t\t\t.find( '.filter-content' )\n\t\t\t.hide()\n\t\t\t.end()\n\t\t\t.find( '.filter-title' )\n\t\t\t.addClass( 'closed' )\n\t\t\t.removeClass( 'opened' );\n\t}\n\n\t// update status change flag, if filters have changed\n\tmaybeRegisterStatusChange() {\n\t\tconst currentFilters = this.getFiltersProperties(),\n\t\t\tcurrentStr = JSON.stringify( currentFilters ),\n\t\t\toriginalStr = JSON.stringify( this.originalFilters );\n\n\t\tthis.dirty = currentStr !== originalStr;\n\t}\n\n\t// apply filters when possible\n\tmaybeFilter( $initiator ) {\n\t\t// register status change\n\t\tthis.maybeRegisterStatusChange();\n\n\t\t// filter, or show filter button.\n\t\tif ( yith_wcan_shortcodes.instant_filters && ! this.isMobile ) {\n\t\t\tthis.filter();\n\t\t} else if (\n\t\t\t! yith_wcan_shortcodes.instant_filters &&\n\t\t\t! this.isMobile\n\t\t) {\n\t\t\tthis.dirty\n\t\t\t\t? this.$filterButtons?.show()\n\t\t\t\t: this.$filterButtons?.hide();\n\t\t} else if ( this.isMobile && this.dirty ) {\n\t\t\tthis.$preset.addClass( 'with-filter-button' );\n\t\t\tthis.modalElements.applyFiltersButton?.show();\n\t\t}\n\t}\n\n\t// main filtering method\n\tfilter() {\n\t\tconst filter = window?.product_filter;\n\n\t\tfilter\n\t\t\t?.doFilter( this.getFiltersProperties(), this.target, this.preset )\n\t\t\t?.done( () => {\n\t\t\t\tlet newPreset = $( this.preset );\n\n\t\t\t\tif ( newPreset.length && yith_wcan_shortcodes.scroll_top ) {\n\t\t\t\t\t// by default, scroll till top of first preset in the page.\n\t\t\t\t\tlet targetOffset = newPreset.offset().top;\n\n\t\t\t\t\tif ( !! yith_wcan_shortcodes.scroll_target ) {\n\t\t\t\t\t\t// when we have a specific target, use that for the offset.\n\t\t\t\t\t\tconst $scrollTarget = $(\n\t\t\t\t\t\t\tyith_wcan_shortcodes.scroll_target\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\ttargetOffset = $scrollTarget.length\n\t\t\t\t\t\t\t? $scrollTarget.offset().top\n\t\t\t\t\t\t\t: targetOffset;\n\t\t\t\t\t} else if ( this.isMobile ) {\n\t\t\t\t\t\t// otherwise, if we're on mobile, scroll to the top of the page\n\t\t\t\t\t\t// (preset could be in an unexpected location).\n\t\t\t\t\t\ttargetOffset = 100;\n\t\t\t\t\t}\n\n\t\t\t\t\t$( 'body, html' ).animate( {\n\t\t\t\t\t\tscrollTop: targetOffset - 100,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// register new filters, clear status flag\n\t\t\t\tthis.originalFilters = this.getFiltersProperties();\n\t\t\t\tthis.dirty = false;\n\t\t\t} );\n\n\t\tif ( this.isMobile ) {\n\t\t\tthis.$preset.removeClass( 'with-filter-button' );\n\t\t\tthis.modalElements.applyFiltersButton?.hide();\n\t\t\tthis.closeModal();\n\t\t}\n\t}\n\n\t// get all filter nodes\n\tgetFilters() {\n\t\tif ( false === this.$filters ) {\n\t\t\tthis.$filters = this.$preset.find( '.yith-wcan-filter' );\n\t\t}\n\n\t\treturn this.$filters;\n\t}\n\n\t// retrieves all filters that we want to apply\n\tgetActiveFilters() {\n\t\tif ( false === this.activeFilters ) {\n\t\t\tthis.activeFilters = this.getFiltersProperties();\n\t\t}\n\n\t\treturn this.activeFilters;\n\t}\n\n\t// check whether there is any filter active\n\tisAnyFilterActive() {\n\t\treturn !! Object.keys( this.getActiveFilters() ).length;\n\t}\n\n\t// checks whether current filter is active\n\tisFilterActive( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tactive,\n\t\t\tfilteredActive;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\tcase 'review':\n\t\t\tcase 'price_range':\n\t\t\t\tconst $dropdown = $filter.find( '.filter-dropdown' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tconst val = $dropdown.val();\n\n\t\t\t\t\tactive = 'object' === typeof val ? !! val?.length : !! val;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t// if we use type other than dropdown, fallthrough\n\t\t\tcase 'stock_sale':\n\t\t\t\tactive = $filter\n\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t.filter( '.active' ).length;\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tconst step = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'step' )\n\t\t\t\t\t),\n\t\t\t\t\tmin = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'min' )\n\t\t\t\t\t),\n\t\t\t\t\tmax = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'max' )\n\t\t\t\t\t),\n\t\t\t\t\tcurrentMin = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider-min' ).val()\n\t\t\t\t\t),\n\t\t\t\t\tcurrentMax = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider-max' ).val()\n\t\t\t\t\t);\n\n\t\t\t\tactive =\n\t\t\t\t\tMath.abs( currentMin - min ) >= step ||\n\t\t\t\t\tMath.abs( currentMax - max ) >= step;\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tactive =\n\t\t\t\t\t'menu_order' !== $filter.find( '.filter-order-by' ).val();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tactive = false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfilteredActive = $filter.triggerHandler( 'yith_wcan_is_filter_active', [\n\t\t\tactive,\n\t\t\tthis,\n\t\t] );\n\t\tactive =\n\t\t\ttypeof filteredActive !== 'undefined' ? filteredActive : active;\n\n\t\treturn active;\n\t}\n\n\t// count the number of active items per filter\n\tcountActiveItems( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tcount;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\tcase 'review':\n\t\t\tcase 'price_range':\n\t\t\t\tconst $dropdown = $filter.find( '.filter-dropdown' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tconst val = $dropdown.val();\n\n\t\t\t\t\tcount = 'object' === typeof val ? val?.length : +!! val;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t// if we use type other than dropdown, fallthrough\n\t\t\tcase 'stock_sale':\n\t\t\t\tcount = $filter\n\t\t\t\t\t.find( '.filter-items' )\n\t\t\t\t\t.find( '.active' ).length;\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tif ( this.isFilterActive( $filter ) ) {\n\t\t\t\t\tcount = 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\tdefault:\n\t\t\t\tcount = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t// retrieves filter properties for the filter\n\tgetFilterProperties( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tmultiple = 'yes' === $filter.data( 'multiple' ),\n\t\t\t$dropdown = $filter.find( '.filter-dropdown' ),\n\t\t\tproperties = {},\n\t\t\tfilteredProperties,\n\t\t\t$active;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\t\tlet activeTerms = [],\n\t\t\t\t\ttaxonomy = $filter.data( 'taxonomy' ),\n\t\t\t\t\tisAttr = 0 === taxonomy.indexOf( 'filter' ),\n\t\t\t\t\trelation = $filter.data( 'relation' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tactiveTerms = $dropdown.val();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactiveTerms.push( $dropdown.val() );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tactiveTerms = $active.get().reduce( function ( a, v ) {\n\t\t\t\t\t\tlet val;\n\n\t\t\t\t\t\tv = $( v );\n\t\t\t\t\t\tval = v.is( 'label' )\n\t\t\t\t\t\t\t? v.find( ':input' ).val()\n\t\t\t\t\t\t\t: v.data( 'term-slug' );\n\n\t\t\t\t\t\tif ( ! val ) {\n\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ta.push( val );\n\n\t\t\t\t\t\treturn a;\n\t\t\t\t\t}, activeTerms );\n\t\t\t\t}\n\n\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\tproperties[ taxonomy ] = activeTerms.pop();\n\t\t\t\t} else {\n\t\t\t\t\tconst glue = ! isAttr && 'and' === relation ? '+' : ',';\n\t\t\t\t\tproperties[ taxonomy ] = activeTerms.join( glue );\n\t\t\t\t}\n\n\t\t\t\tif ( isAttr ) {\n\t\t\t\t\tproperties[ taxonomy.replace( 'filter_', 'query_type_' ) ] =\n\t\t\t\t\t\trelation;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'review':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tproperties.rating_filter = $dropdown.val();\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\t\t$active = $active.first();\n\t\t\t\t\t\tproperties.rating_filter = $active.is( 'label' )\n\t\t\t\t\t\t\t? $active.find( ':input' ).val()\n\t\t\t\t\t\t\t: $active.data( 'rating' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.rating_filter = $active\n\t\t\t\t\t\t\t.get()\n\t\t\t\t\t\t\t.reduce( function ( a, v ) {\n\t\t\t\t\t\t\t\tlet val;\n\n\t\t\t\t\t\t\t\tv = $( v );\n\t\t\t\t\t\t\t\tval = v.is( 'label' )\n\t\t\t\t\t\t\t\t\t? v.find( ':input' ).val()\n\t\t\t\t\t\t\t\t\t: v.data( 'rating' );\n\n\t\t\t\t\t\t\t\tif ( ! val ) {\n\t\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\ta.push( val );\n\n\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t}, [] )\n\t\t\t\t\t\t\t.join( ',' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_range':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tproperties.price_ranges = $dropdown.val().join( ',' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.min_price = $dropdown\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.split( '-' )[ 0 ];\n\t\t\t\t\t\tproperties.max_price = $dropdown\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.split( '-' )[ 1 ];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tproperties.price_ranges = $active\n\t\t\t\t\t\t\t.get()\n\t\t\t\t\t\t\t.reduce( ( a, v ) => {\n\t\t\t\t\t\t\t\tlet min = $( v ).data( 'range-min' ),\n\t\t\t\t\t\t\t\t\tmax = $( v ).data( 'range-max' );\n\n\t\t\t\t\t\t\t\ta += ( max ? `${ min }-${ max }` : min ) + ',';\n\n\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t}, '' )\n\t\t\t\t\t\t\t.replace( /^(.*),$/, '$1' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.min_price = parseFloat(\n\t\t\t\t\t\t\t$active.first().data( 'range-min' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tproperties.max_price = parseFloat(\n\t\t\t\t\t\t\t$active.first().data( 'range-max' )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tproperties.min_price = parseFloat(\n\t\t\t\t\t$filter.find( '.price-slider-min' ).val()\n\t\t\t\t);\n\t\t\t\tproperties.max_price = parseFloat(\n\t\t\t\t\t$filter.find( '.price-slider-max' ).val()\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'stock_sale':\n\t\t\t\tif ( $filter.find( '.filter-on-sale' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.onsale_filter = 1;\n\t\t\t\t}\n\t\t\t\tif ( $filter.find( '.filter-in-stock' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.instock_filter = 1;\n\t\t\t\t}\n\t\t\t\tif ( $filter.find( '.filter-featured' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.featured_filter = 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tproperties.orderby = $filter.find( '.filter-order-by' ).val();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfilteredProperties = $filter.triggerHandler(\n\t\t\t'yith_wcan_filter_properties',\n\t\t\t[ properties, self ]\n\t\t);\n\t\tproperties =\n\t\t\ttypeof filteredProperties !== 'undefined'\n\t\t\t\t? filteredProperties\n\t\t\t\t: properties;\n\n\t\treturn properties;\n\t}\n\n\t// retrieves properties for all filters of the preset\n\tgetFiltersProperties() {\n\t\tlet properties = {};\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tif ( self.isFilterActive( $filter ) ) {\n\t\t\t\tconst filterProperties = self.getFilterProperties( $filter );\n\n\t\t\t\tproperties = self.mergeProperties(\n\t\t\t\t\tproperties,\n\t\t\t\t\tfilterProperties,\n\t\t\t\t\t$filter\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t\treturn properties;\n\t}\n\n\t// retrieve filters matching any of the properties passed\n\tgetFiltersByProperties( properties ) {\n\t\tconst self = this;\n\n\t\treturn this.getFilters().filter( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tif ( self.isFilterActive( $filter ) ) {\n\t\t\t\tlet filterProperties = self.getFilterProperties( $filter ),\n\t\t\t\t\thasProp = false;\n\n\t\t\t\tfor ( const prop in properties ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t[ 'min_price', 'max_price', 'price_ranges' ].includes(\n\t\t\t\t\t\t\tprop\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\t( filterProperties.min_price ||\n\t\t\t\t\t\t\tfilterProperties.price_ranges )\n\t\t\t\t\t) {\n\t\t\t\t\t\thasProp = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if ( filterProperties[ prop ] ) {\n\t\t\t\t\t\thasProp = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn hasProp;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} );\n\t}\n\n\t// show clear selection anchor\n\tmaybeToggleClearFilter( $filter ) {\n\t\tif ( ! this.isFilterActive( $filter ) ) {\n\t\t\tthis.maybeHideClearFilter( $filter );\n\t\t} else {\n\t\t\tthis.maybeShowClearFilter( $filter );\n\t\t}\n\t}\n\n\t// show clear all selections anchor\n\tmaybeToggleClearAllFilters() {\n\t\tif ( ! this.isAnyFilterActive() ) {\n\t\t\tthis.maybeHideClearAllFilters();\n\t\t} else {\n\t\t\tthis.maybeShowClearAllFilters();\n\t\t}\n\t}\n\n\t// show clear selection anchor\n\tmaybeShowClearFilter( $filter ) {\n\t\tif (\n\t\t\t! this.isFilterActive( $filter ) ||\n\t\t\t! yith_wcan_shortcodes.show_clear_filter\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link if already added.\n\t\t$filter.find( '.clear-selection' ).remove();\n\n\t\t// add new clear selection link.\n\t\t$( '<a/>', {\n\t\t\tclass: 'clear-selection',\n\t\t\ttext: yith_wcan_shortcodes.labels.clear_selection,\n\t\t\trole: 'button',\n\t\t} )\n\t\t\t.prependTo( $filter.find( '.filter-content' ) )\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\n\t\t\t\tthis.deactivateFilter(\n\t\t\t\t\t$filter,\n\t\t\t\t\tfalse,\n\t\t\t\t\tyith_wcan_shortcodes.instant_filters\n\t\t\t\t);\n\t\t\t\tthis.maybeHideClearFilter( $filter );\n\n\t\t\t\tif ( yith_wcan_shortcodes.instant_filters ) {\n\t\t\t\t\tthis.closeModal();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t// show clearAll anchor, when on mobile layout\n\tmaybeShowClearAllFilters() {\n\t\tif ( ! this.isAnyFilterActive() || ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link if already added.\n\t\tthis.$preset.find( '.clear-selection' ).remove();\n\n\t\t// add new clear selection link.\n\t\t$( '<a/>', {\n\t\t\tclass: 'clear-selection',\n\t\t\ttext: yith_wcan_shortcodes.labels.clear_all_selections,\n\t\t\trole: 'button',\n\t\t} )\n\t\t\t.prependTo( this.$preset.find( '.filters-container' ) )\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\n\t\t\t\tthis.deactivateAllFilters(\n\t\t\t\t\tyith_wcan_shortcodes.instant_filters\n\t\t\t\t);\n\t\t\t\tthis.maybeHideClearAllFilters();\n\n\t\t\t\tif ( yith_wcan_shortcodes.instant_filters ) {\n\t\t\t\t\tthis.closeModal();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t// hide clear selection anchor\n\tmaybeHideClearFilter( $filter ) {\n\t\tif (\n\t\t\tthis.isFilterActive( $filter ) ||\n\t\t\t! yith_wcan_shortcodes.show_clear_filter\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link.\n\t\t$filter.find( '.clear-selection' ).remove();\n\t}\n\n\t// show clearAll anchor, when on mobile layout\n\tmaybeHideClearAllFilters() {\n\t\tif ( this.isAnyFilterActive() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link.\n\t\tthis.$preset\n\t\t\t.find( '.filters-container' )\n\t\t\t.children( '.clear-selection' )\n\t\t\t.remove();\n\t}\n\n\t// deactivate filter\n\tdeactivateFilter( $filter, properties, doFilter ) {\n\t\tconst filterType = $filter.data( 'filter-type' ),\n\t\t\t$items = $filter.find( '.filter-item' ),\n\t\t\t$activeItems = $items.filter( '.active' ),\n\t\t\t$dropdown = $filter.find( '.filter-dropdown' );\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\t\tconst taxonomy = $filter.data( 'taxonomy' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t$option.val().toString() ===\n\t\t\t\t\t\t\t\tproperties[ taxonomy ].toString()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'term-slug' );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tvalue.toString() ===\n\t\t\t\t\t\t\tproperties[ taxonomy ].toString()\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'review':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this );\n\n\t\t\t\t\t\t\tif ( $option.val() === properties.rating_filter ) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'rating' );\n\n\t\t\t\t\t\tif ( value === properties.rating_filter ) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_range':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this ),\n\t\t\t\t\t\t\t\tformattedRange =\n\t\t\t\t\t\t\t\t\tproperties.min_price +\n\t\t\t\t\t\t\t\t\t( properties.max_price\n\t\t\t\t\t\t\t\t\t\t? `-${ properties.max_price }`\n\t\t\t\t\t\t\t\t\t\t: '' );\n\n\t\t\t\t\t\t\tif ( $option.val() === formattedRange ) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tformattedRange,\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'min_price' ) +\n\t\t\t\t\t\t\t ( $anchor.data( 'max_price' )\n\t\t\t\t\t\t\t\t\t? '-' + $anchor.data( 'max_price' )\n\t\t\t\t\t\t\t\t\t: '' );\n\n\t\t\t\t\t\tif ( properties.min_price ) {\n\t\t\t\t\t\t\tformattedRange =\n\t\t\t\t\t\t\t\tproperties.min_price +\n\t\t\t\t\t\t\t\t( properties.max_price\n\t\t\t\t\t\t\t\t\t? '-' + properties.max_price\n\t\t\t\t\t\t\t\t\t: '' );\n\t\t\t\t\t\t} else if ( properties.price_ranges ) {\n\t\t\t\t\t\t\tformattedRange = properties.price_ranges;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( value === formattedRange ) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tconst $priceSlider = $filter.find( '.price-slider' );\n\n\t\t\t\t$filter\n\t\t\t\t\t.find( '.price-slider-min' )\n\t\t\t\t\t.val( $priceSlider.data( 'min' ) );\n\t\t\t\t$filter\n\t\t\t\t\t.find( '.price-slider-max' )\n\t\t\t\t\t.val( $priceSlider.data( 'max' ) )\n\t\t\t\t\t.change();\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\t$filter.find( 'select' ).val( 'menu_order' );\n\t\t\t\tbreak;\n\t\t\tcase 'stock_sale':\n\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-in-stock' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-on-sale' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-featured' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\n\t\t\t\t\t$items.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\tif ( properties?.instock_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-in-stock' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( properties?.onsale_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-on-sale' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( properties?.featured_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-featured' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$items.removeClass( 'active' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.activeFilters = false;\n\n\t\tif ( doFilter ) {\n\t\t\tthis.filter();\n\t\t}\n\t}\n\n\t// deactivate all filters\n\tdeactivateAllFilters( doFilter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFilters();\n\n\t\t$filters.each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself.deactivateFilter( $filter );\n\t\t} );\n\n\t\tthis.activeFilters = false;\n\n\t\tif ( doFilter ) {\n\t\t\tthis.filter();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t// deactivate filters that matches a specific set of properties\n\tdeactivateFilterByProperties( properties, doFilter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFiltersByProperties( properties );\n\n\t\tif ( ! $filters.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$filters.each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself.deactivateFilter( $filter, properties, doFilter );\n\t\t} );\n\n\t\treturn true;\n\t}\n\n\t// open filters as a modal, when in mobile layout\n\topenModal() {\n\t\tif ( ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( yith_wcan_shortcodes.toggles_open_on_modal ) {\n\t\t\tthis._openAllCollapsables();\n\t\t} else {\n\t\t\tthis._closeAllCollapsables();\n\t\t}\n\n\t\t$( 'body' )\n\t\t\t.css( 'overflow', 'hidden' )\n\t\t\t.addClass( 'yith-wcan-preset-modal-open' );\n\n\t\tthis.$preset.show();\n\n\t\tsetTimeout( () => {\n\t\t\tthis.$preset.addClass( 'open' );\n\t\t}, 100 );\n\t}\n\n\t// close filters modal, when in mobile layout\n\tcloseModal() {\n\t\tif ( ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.$preset.removeClass( 'open' );\n\n\t\tsetTimeout( () => {\n\t\t\tthis.$preset.hide();\n\t\t\t$( 'body' )\n\t\t\t\t.css( 'overflow', 'auto' )\n\t\t\t\t.removeClass( 'yith-wcan-preset-modal-open' );\n\t\t}, 300 );\n\t}\n\n\t// utility that formats the price according to store configuration.\n\tformatPrice( price ) {\n\t\tif ( 'undefined' !== typeof accounting ) {\n\t\t\tprice = accounting.formatMoney( price, {\n\t\t\t\tsymbol: yith_wcan_shortcodes.currency_format?.symbol,\n\t\t\t\tdecimal: yith_wcan_shortcodes.currency_format?.decimal,\n\t\t\t\tthousand: yith_wcan_shortcodes.currency_format?.thousand,\n\t\t\t\tprecision: 0,\n\t\t\t\tformat: yith_wcan_shortcodes.currency_format?.format,\n\t\t\t} );\n\t\t}\n\n\t\treturn price;\n\t}\n\n\t// utility that merges together sets of filter properties\n\tmergeProperties( set1, set2, $filter ) {\n\t\t// search for common properties\n\t\tfor ( const prop in set2 ) {\n\t\t\tif ( ! set2.hasOwnProperty( prop ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !! set1[ prop ] ) {\n\t\t\t\tswitch ( prop ) {\n\t\t\t\t\tcase 'rating_filter':\n\t\t\t\t\tcase 'min_price':\n\t\t\t\t\tcase 'max_price':\n\t\t\t\t\tcase 'onsale_filter':\n\t\t\t\t\tcase 'instock_filter':\n\t\t\t\t\tcase 'orderby':\n\t\t\t\t\t\t// just override default value\n\t\t\t\t\t\tset1[ prop ] = set2[ prop ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif ( 0 === prop.indexOf( 'query_type_' ) ) {\n\t\t\t\t\t\t\t// query_type param\n\t\t\t\t\t\t\tset1[ prop ] = set2[ prop ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// we're dealing with taxonomy\n\t\t\t\t\t\t\tconst isAttr = 0 === prop.indexOf( 'filter_' ),\n\t\t\t\t\t\t\t\tglue = isAttr ? ',' : '+';\n\n\t\t\t\t\t\t\tlet newValue =\n\t\t\t\t\t\t\t\tset1[ prop ].replace( ',', glue ) +\n\t\t\t\t\t\t\t\tglue +\n\t\t\t\t\t\t\t\tset2[ prop ].replace( ',', glue );\n\n\t\t\t\t\t\t\tnewValue = newValue\n\t\t\t\t\t\t\t\t.split( glue )\n\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t( value, index, arr ) =>\n\t\t\t\t\t\t\t\t\t\tarr.indexOf( value ) === index\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.join( glue );\n\n\t\t\t\t\t\t\tset1[ prop ] = newValue;\n\n\t\t\t\t\t\t\tif ( isAttr ) {\n\t\t\t\t\t\t\t\tconst queryTypeParam = prop.replace(\n\t\t\t\t\t\t\t\t\t'filter_',\n\t\t\t\t\t\t\t\t\t'query_type_'\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tset1[ queryTypeParam ] = 'and';\n\t\t\t\t\t\t\t\tset2[ queryTypeParam ] = 'and';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdelete set2[ prop ];\n\t\t\t}\n\t\t}\n\n\t\t$.extend( set1, set2 );\n\n\t\treturn set1;\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport YITH_WCAN_Filter from './modules/yith-wcan-filter';\nimport YITH_WCAN_Reset_Button from './modules/yith-wcan-reset-button';\nimport YITH_WCAN_Preset from './modules/yith-wcan-preset';\n\njQuery( function ( $ ) {\n\t$( document )\n\t\t.on(\n\t\t\t'yith_wcan_init_shortcodes yith_plugin_fw_gutenberg_success_do_shortcode',\n\t\t\tfunction () {\n\t\t\t\t$( '.yith-wcan-filters' )\n\t\t\t\t\t.not( '.enhanced' )\n\t\t\t\t\t.each( function () {\n\t\t\t\t\t\tnew YITH_WCAN_Preset( $( this ) );\n\t\t\t\t\t} );\n\n\t\t\t\t$( '.yith-wcan-reset-filters' )\n\t\t\t\t\t.not( '.enhanced' )\n\t\t\t\t\t.each( function () {\n\t\t\t\t\t\tnew YITH_WCAN_Reset_Button( $( this ) );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t)\n\t\t.trigger( 'yith_wcan_init_shortcodes' );\n\n\tglobalThis.product_filter = new YITH_WCAN_Filter();\n} );\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/config.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-filter.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-reset-button.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-dropdown.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/modules/yith-wcan-preset.js","webpack://yith-woocommerce-ajax-navigation/./assets/js/shortcodes/index.js"],"names":["$","jQuery","$body","YITH_WCAN_Filter","location","search","initPopState","initialized","yith_wcan_shortcodes","reload_on_back","pushUrlToHistory","window","document","title","on","history","state","_yithWcan","reload","filters","target","preset","targetUrl","$target","customFilters","triggerHandler","block","buildUrl","ajax_filters","doingAjax","_doAjax","done","response","searchAlternativeUrl","_beforeFilter","refreshFragments","pageTitle","originalSearch","unblock","_afterFilter","trigger","closest","submit","filtered","Object","keys","length","queryParam","query_param","params","url","base_url","origin","pathname","self","haveFilters","session_param","replace","RegExp","searchParams","split","reduce","a","v","items","isFilterParam","i","_cleanParam","defaultUrl","matches","indexOf","match","current","change_browser_url","navigator","userAgent","method","responseDom","createElement","$response","innerHTML","$preset","$destination","find","replaceWith","first","content","param","process_sanitize","skip_sanitize","encodeURIComponent","xhr","abort","headers","$el","background","loader","message","overlayCSS","opacity","supportedParams","customParams","concat","supported_taxonomies","map","YITH_WCAN_Reset_Button","el","$reset","ev","preventDefault","each","data","deactivateAllFilters","closeModal","addClass","YITH_WCAN_Dropdown","opts","$originalSelect","is","defaultPerPage","defaultOrder","defaultAll","defaults","showSearch","paginate","perPage","order","getElements","labels","emptyLabel","empty_option","searchPlaceholder","search_placeholder","noItemsFound","no_items","showMore","show_more","options","_hideSelect","_initTemplate","_initActions","hide","$mainSpan","$labelSpan","html","getLabel","$dropdownSpan","$matchingItemsList","append","_initSearchTemplate","_initShowMoreTemplate","after","$_main","$_label","$_dropdown","$_items","$dropdwonSpan","$container","$search","name","type","placeholder","attr","prependTo","$_search","$showMore","text","loadNextPage","bind","$_showMore","stopPropagation","toggleDropdown","_populateItems","$li","value","isActive","hasClass","isValueSelected","toggleClass","_changeItemStatus","siblings","removeClass","input","parent","prop","change","selfOriginated","_selectItem","_deselectItem","updateLabel","globalThis","yith_wcan_dropdown_init","_closeAllDropdowns","_afterDropdownOpen","dropdowns","filter","select","closeDropdown","_closeOtherDropdowns","val","limit","matchingElements","$options","getOptions","promise","Promise","resolve","t","label","regex","show","test","push","then","retrievedElements","_formatItems","indexes","hasMore","sort","b","mod","slice","active","option","getOptionByValue","$item","$anchor","template","count","href","rel","$checkbox","$label","prepend","page","parseInt","getMatchingElements","resultSet","matchingItems","_emptyItems","_hideLoadMore","currentPage","unshift","_generateItem","_showLoadMore","status","$option","hasSelectedValues","getSelectedLabels","join","getSelectedOptions","found","getSelectedValues","toString","values","YITH_WCAN_Preset","_regiterStatus","_initFilterButton","_initResponsive","_initFilters","getFilters","$filter","_initFilter","maybeShowClearAllFilters","$filterButtons","modal_on_mobile","media","matchMedia","mobile_media_query","isMobile","_afterLayoutChange","resize","handleChange","$currentFilter","multiple","$items","not","children","activeFilters","maybeFilter","maybeToggleClearAllFilters","maybeToggleClearFilter","delegateTarget","call","$input","_initTooltip","_initPriceSlider","_initDropdown","_initCollapsable","maybeShowClearFilter","_initCustomInput","$dropdown","$current","position","th","tooltip","wrapperWidth","outerWidth","left","width","container","css","toFixed","fadeIn","fadeOut","remove","selectWoo","_initDropdownObject","terms_per_page","$minInput","$maxInput","min","parseFloat","max","currentMin","currentMax","step","handleSliderChange","sliderTimeout","clearTimeout","setTimeout","ionRangeSlider","skin","from","to","min_interval","values_separator","prettify","formatPrice","onChange","onFinish","add","off","_initTitleCollapsable","_initHierarchyCollapsable","$title","_initToggle","parents","show_current_children","$t","$toggle","appendTo","slideToggle","containerClass","wrap","originalFilters","getFiltersProperties","_addCloseModalButton","_addApplyFiltersModalButton","_switchToCollapsables","removeAttr","_removeCloseModalButton","_removeApplyFiltersModalButton","_switchBackCollapsables","$closeButton","close","modalElements","closeButton","$filterButton","show_results","applyFiltersButton","removeData","$filters","isFilterActive","end","currentFilters","currentStr","JSON","stringify","originalStr","dirty","$initiator","maybeRegisterStatusChange","instant_filters","product_filter","doFilter","newPreset","scroll_top","targetOffset","offset","top","scroll_target","$scrollTarget","animate","scrollTop","getActiveFilters","filterType","filteredActive","Math","abs","properties","filteredProperties","$active","activeTerms","taxonomy","isAttr","relation","get","pop","glue","rating_filter","price_ranges","min_price","max_price","onsale_filter","instock_filter","featured_filter","orderby","filterProperties","getFilterProperties","mergeProperties","hasProp","includes","maybeHideClearFilter","isAnyFilterActive","maybeHideClearAllFilters","show_clear_filter","clear_selection","role","deactivateFilter","clear_all_selections","$activeItems","click","formattedRange","$priceSlider","getFiltersByProperties","toggles_open_on_modal","_openAllCollapsables","_closeAllCollapsables","price","accounting","formatMoney","symbol","currency_format","decimal","thousand","precision","format","set1","set2","hasOwnProperty","newValue","index","arr","queryTypeParam"],"mappings":";;;;;AAAa;AAEb;;AAEA,IAAMA,CAAC,GAAGC,M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,gBAAJ,EAA5B;AACA,CArBK,CAAN,C","file":"yith-wcan-shortcodes.js","sourcesContent":["'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nconst $ = jQuery; // we can do this as WebPack will compact all together inside a closure.\nconst $body = $( 'body' );\n\nexport { $, $body };\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $, $body } from '../config.js';\n\nexport default class YITH_WCAN_Filter {\n\t// currently executing xhr\n\txhr = null;\n\n\t// flag set during ajax call handling\n\tdoingAjax = false;\n\n\t// register original url search param\n\toriginalSearch = location.search;\n\n\t// flag set once init has executed\n\tinitialized = false;\n\n\t// flag set when page has at least one active filter.\n\tfiltered = false;\n\n\t// init object\n\tconstructor() {\n\t\tthis.initPopState();\n\t\tthis.initialized = true;\n\t}\n\n\t// init page reload when popstate event alter filters\n\tinitPopState() {\n\t\tif ( ! yith_wcan_shortcodes.reload_on_back ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pushUrlToHistory( window.location, document.title, null, true );\n\n\t\t$( window ).on( 'popstate', function () {\n\t\t\tif ( ! window.history.state?._yithWcan ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twindow.location.reload( true );\n\t\t} );\n\t}\n\n\t// execute call to filter products in current view\n\tdoFilter( filters, target, preset ) {\n\t\tlet targetUrl,\n\t\t\t$target = target ? $( target ) : $( 'body' ),\n\t\t\tcustomFilters;\n\n\t\t// filter properties\n\t\tcustomFilters = $( document ).triggerHandler(\n\t\t\t'yith_wcan_filters_parameters',\n\t\t\t[ filters ]\n\t\t);\n\n\t\tif ( !! customFilters ) {\n\t\t\tfilters = customFilters;\n\t\t}\n\n\t\t// block elements before filtering\n\t\t$target && this.block( $target );\n\n\t\t// calculate target url\n\t\ttargetUrl = this.buildUrl( filters );\n\n\t\t// if no ajax, simply change page url\n\t\tif ( ! yith_wcan_shortcodes.ajax_filters ) {\n\t\t\tthis.pushUrlToHistory( targetUrl, document.title, filters );\n\n\t\t\twindow.location = targetUrl;\n\t\t\treturn;\n\t\t}\n\n\t\t// start doing ajax\n\t\tthis.doingAjax = true;\n\n\t\treturn this._doAjax( targetUrl ).done( ( response ) => {\n\t\t\ttargetUrl = this.searchAlternativeUrl( response, targetUrl );\n\n\t\t\tthis._beforeFilter( response, filters );\n\n\t\t\tthis.refreshFragments( target, preset, response );\n\t\t\tthis.pushUrlToHistory( targetUrl, response.pageTitle, filters );\n\t\t\tthis.originalSearch = location.search;\n\n\t\t\t$target && this.unblock( $target );\n\n\t\t\tthis._afterFilter( response, filters );\n\n\t\t\tthis.doingAjax = false;\n\t\t} );\n\t}\n\n\t// actions performed before filter\n\t_beforeFilter( response, filters ) {\n\t\t$( document ).trigger( 'yith-wcan-ajax-loading', [\n\t\t\tresponse,\n\t\t\tfilters,\n\t\t] );\n\t}\n\n\t// actions performed after filter\n\t_afterFilter( response, filters ) {\n\t\t$( '.woocommerce-ordering' ).on(\n\t\t\t'change',\n\t\t\t'select.orderby',\n\t\t\tfunction () {\n\t\t\t\t$( this ).closest( 'form' ).submit();\n\t\t\t}\n\t\t);\n\n\t\tthis.filtered = filters && !! Object.keys( filters ).length;\n\t\tthis.filtered\n\t\t\t? $body.addClass( 'filtered' )\n\t\t\t: $body.removeClass( 'filtered' );\n\n\t\t$( window ).trigger( 'scroll' );\n\n\t\t$( document )\n\t\t\t.trigger( 'yith-wcan-ajax-filtered', [ response, filters ] )\n\t\t\t.trigger( 'yith_wcwl_reload_fragments' );\n\t}\n\n\t// build url to show\n\tbuildUrl( filters ) {\n\t\tlet queryParam = yith_wcan_shortcodes.query_param,\n\t\t\tparams = {},\n\t\t\tlocation = window.location,\n\t\t\turl = !! yith_wcan_shortcodes.base_url\n\t\t\t\t? yith_wcan_shortcodes.base_url\n\t\t\t\t: location?.origin + location?.pathname,\n\t\t\tsearch = '',\n\t\t\tself = this;\n\n\t\tconst haveFilters =\n\t\t\ttypeof filters === 'object' && Object.keys( filters ).length;\n\n\t\t// remove filter session from current url, if any\n\t\tif ( !! yith_wcan_shortcodes.session_param ) {\n\t\t\turl = url.replace(\n\t\t\t\tnew RegExp(\n\t\t\t\t\t'/' + yith_wcan_shortcodes.session_param + '/[^/]*/'\n\t\t\t\t),\n\t\t\t\t''\n\t\t\t);\n\t\t}\n\n\t\tif ( haveFilters ) {\n\t\t\tparams[ queryParam ] = 1;\n\t\t}\n\n\t\tif ( !! this.originalSearch ) {\n\t\t\tconst searchParams = this.originalSearch\n\t\t\t\t.replace( '?', '' )\n\t\t\t\t.split( '&' )\n\t\t\t\t.reduce( ( a, v ) => {\n\t\t\t\t\tconst items = v.split( '=' );\n\n\t\t\t\t\tif ( items.length === 2 ) {\n\t\t\t\t\t\tif ( this.isFilterParam( items[ 0 ] ) ) {\n\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ta[ items[ 0 ] ] = items[ 1 ];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn a;\n\t\t\t\t}, {} );\n\n\t\t\tparams = $.extend( params, searchParams );\n\t\t}\n\n\t\tif ( haveFilters ) {\n\t\t\tparams = $.extend( params, filters );\n\t\t}\n\n\t\tsearch = Object.keys( params )\n\t\t\t.reduce( function ( a, i ) {\n\t\t\t\tconst v = params[ i ];\n\n\t\t\t\tif ( ! v || ! i ) {\n\t\t\t\t\treturn a;\n\t\t\t\t}\n\n\t\t\t\ta += self._cleanParam( i ) + '=' + self._cleanParam( v ) + '&';\n\n\t\t\t\treturn a;\n\t\t\t}, '?' )\n\t\t\t.replace( /&$/g, '' )\n\t\t\t.replace( /%2B/g, '+' )\n\t\t\t.replace( /%2C/g, ',' );\n\n\t\tif ( search.length > 1 ) {\n\t\t\turl += search;\n\t\t}\n\n\t\treturn url;\n\t}\n\n\t// retrieves alternative sharing url in response body\n\tsearchAlternativeUrl( response, defaultUrl = '' ) {\n\t\tlet url = defaultUrl,\n\t\t\tmatches;\n\n\t\tif ( -1 === response.indexOf( 'yith_wcan:sharing_url' ) ) {\n\t\t\treturn url;\n\t\t}\n\n\t\tmatches = response.match(\n\t\t\t/<meta name=\"yith_wcan:sharing_url\" content=\"([^\"]*)\">/\n\t\t);\n\t\turl = matches && 1 in matches ? matches[ 1 ] : url;\n\n\t\treturn url;\n\t}\n\n\t// push url to browser history\n\tpushUrlToHistory( url, title, filters, current ) {\n\t\tif (\n\t\t\t! yith_wcan_shortcodes.change_browser_url ||\n\t\t\tnavigator.userAgent.match( /msie/i )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet method = 'pushState';\n\n\t\tif ( !! current ) {\n\t\t\tmethod = 'replaceState';\n\t\t}\n\n\t\twindow.history[ method ](\n\t\t\t{\n\t\t\t\t_yithWcan: true,\n\t\t\t\tpageTitle: title,\n\t\t\t\tfilters,\n\t\t\t},\n\t\t\t'',\n\t\t\turl\n\t\t);\n\t}\n\n\t// replaces elements in the page with refreshed ones\n\trefreshFragments( target, preset, response ) {\n\t\tconst responseDom = document.createElement( 'html' ),\n\t\t\t$response = $( responseDom );\n\n\t\tresponseDom.innerHTML = response;\n\n\t\tif ( target ) {\n\t\t\tlet $preset = $( preset ),\n\t\t\t\t$target = $( target ),\n\t\t\t\t$destination;\n\n\t\t\tif ( $preset.length ) {\n\t\t\t\t$destination = $response.find( preset );\n\n\t\t\t\tif ( $destination.length ) {\n\t\t\t\t\t$preset.replaceWith( $destination.first() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $target.length ) {\n\t\t\t\t$destination = $response.find( target );\n\n\t\t\t\tif ( $destination.length ) {\n\t\t\t\t\t$target.replaceWith( $destination.first() );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst content = $( yith_wcan_shortcodes.content );\n\n\t\t\tif ( content.length ) {\n\t\t\t\tcontent.replaceWith(\n\t\t\t\t\t$response.find( yith_wcan_shortcodes.content )\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$( 'body' ).replaceWith( $response.find( 'body' ) );\n\t\t\t}\n\t\t}\n\n\t\t$( document ).trigger( 'yith_wcan_init_shortcodes' );\n\t}\n\n\t// clean url parameters\n\t_cleanParam( param ) {\n\t\tif (\n\t\t\t! yith_wcan_shortcodes?.process_sanitize ||\n\t\t\tyith_wcan_shortcodes?.skip_sanitize\n\t\t) {\n\t\t\treturn param;\n\t\t}\n\n\t\treturn encodeURIComponent( param );\n\t}\n\n\t// executes Ajax calls\n\t_doAjax( url, params ) {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tparams = $.extend(\n\t\t\t{\n\t\t\t\turl,\n\t\t\t\theaders: {\n\t\t\t\t\t'X-YITH-WCAN': 1,\n\t\t\t\t},\n\t\t\t},\n\t\t\tparams\n\t\t);\n\n\t\tthis.xhr = $.ajax( params );\n\n\t\treturn this.xhr;\n\t}\n\n\t// block dom elements\n\tblock( $el ) {\n\t\tif ( typeof $.fn.block === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet background = '#fff center center no-repeat';\n\n\t\tif ( yith_wcan_shortcodes?.loader ) {\n\t\t\tbackground = `url('${ yith_wcan_shortcodes.loader }') ${ background }`;\n\t\t}\n\n\t\t$el.block( {\n\t\t\tmessage: null,\n\t\t\toverlayCSS: {\n\t\t\t\tbackground,\n\t\t\t\topacity: 0.7,\n\t\t\t},\n\t\t} );\n\t}\n\n\t// unblock dom elements\n\tunblock( $el ) {\n\t\tif ( typeof $.fn.unblock === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$el.unblock();\n\t}\n\n\t// checks if param is one used by layared nav to filter products.\n\tisFilterParam( param ) {\n\t\tlet supportedParams = [\n\t\t\t\t'rating_filter',\n\t\t\t\t'min_price',\n\t\t\t\t'max_price',\n\t\t\t\t'price_ranges',\n\t\t\t\t'onsale_filter',\n\t\t\t\t'instock_filter',\n\t\t\t\t'featured_filter',\n\t\t\t\t'orderby',\n\t\t\t\t'product-page',\n\t\t\t\tyith_wcan_shortcodes.query_param,\n\t\t\t],\n\t\t\tcustomParams;\n\n\t\t// filter properties\n\t\tcustomParams = $( document ).triggerHandler(\n\t\t\t'yith_wcan_supported_filters_parameters',\n\t\t\t[ supportedParams ]\n\t\t);\n\n\t\tif ( !! customParams ) {\n\t\t\tsupportedParams = customParams;\n\t\t}\n\n\t\tsupportedParams = supportedParams.concat(\n\t\t\tyith_wcan_shortcodes.supported_taxonomies.map( ( i ) =>\n\t\t\t\ti.replace( 'pa_', 'filter_' )\n\t\t\t)\n\t\t);\n\n\t\tif ( -1 !== supportedParams.indexOf( param ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( -1 !== param.indexOf( 'filter_' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( -1 !== param.indexOf( 'query_type_' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\n\nexport default class YITH_WCAN_Reset_Button {\n\t// current button\n\t$reset = null;\n\n\t// init object\n\tconstructor( el ) {\n\t\t// current button\n\t\tthis.$reset = el;\n\n\t\tthis.$reset.on( 'click', function ( ev ) {\n\t\t\tev.preventDefault();\n\n\t\t\t$( '.yith-wcan-filters' ).each( function () {\n\t\t\t\tconst preset = $( this ).data( 'preset' );\n\n\t\t\t\tpreset.deactivateAllFilters( true );\n\t\t\t\tpreset.closeModal();\n\t\t\t} );\n\t\t} );\n\n\t\tthis.$reset.data( 'reset', this ).addClass( 'enhanced' );\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\n\nexport default class YITH_WCAN_Dropdown {\n\t// current button\n\t$originalSelect = null;\n\n\t// main element\n\t$_main = null;\n\n\t// label element\n\t$_label = null;\n\n\t// dropdown\n\t$_dropdown = null;\n\n\t// search input\n\t$_search = null;\n\n\t// show more link\n\t$_showMore = null;\n\n\t// items list\n\t$_items = null;\n\n\t// current page\n\tcurrentPage = 1;\n\n\t// options\n\toptions = {};\n\n\t// init object\n\tconstructor( el, opts ) {\n\t\tthis.$originalSelect = el;\n\n\t\tif ( ! this.$originalSelect.is( 'select' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst defaultPerPage = this.$originalSelect.data( 'per_page' ),\n\t\t\tdefaultOrder = this.$originalSelect.data( 'order' ),\n\t\t\tdefaultAll = this.$originalSelect.data( 'all-label' ),\n\t\t\tdefaults = {\n\t\t\t\tshowSearch: this.$originalSelect.data( 'show_search' ),\n\t\t\t\tpaginate: this.$originalSelect.data( 'paginate' ),\n\t\t\t\tperPage: defaultPerPage ? defaultPerPage : 10,\n\t\t\t\torder: defaultOrder ? defaultOrder : 'ASC',\n\t\t\t\tgetElements: null,\n\t\t\t\tlabels: {\n\t\t\t\t\temptyLabel: defaultAll\n\t\t\t\t\t\t? defaultAll\n\t\t\t\t\t\t: yith_wcan_shortcodes.labels?.empty_option,\n\t\t\t\t\tsearchPlaceholder:\n\t\t\t\t\t\tyith_wcan_shortcodes.labels?.search_placeholder,\n\t\t\t\t\tnoItemsFound: yith_wcan_shortcodes.labels?.no_items,\n\t\t\t\t\tshowMore: yith_wcan_shortcodes.labels?.show_more,\n\t\t\t\t},\n\t\t\t};\n\n\t\tthis.options = $.extend( defaults, opts );\n\n\t\tthis._hideSelect();\n\t\tthis._initTemplate();\n\t\tthis._initActions();\n\n\t\tthis.$originalSelect.data( 'dropdown', this ).addClass( 'enhanced' );\n\t}\n\n\t// hide select\n\t_hideSelect() {\n\t\tthis.$originalSelect.hide();\n\t}\n\n\t// create dropdown\n\t_initTemplate() {\n\t\tconst $mainSpan = $( '<div/>', {\n\t\t\t\tclass: 'yith-wcan-dropdown closed',\n\t\t\t} ),\n\t\t\t$labelSpan = $( '<div/>', {\n\t\t\t\tclass: 'dropdown-label',\n\t\t\t\thtml: this.getLabel(),\n\t\t\t} ),\n\t\t\t$dropdownSpan = $( '<div>', {\n\t\t\t\tclass: 'dropdown-wrapper',\n\t\t\t} ),\n\t\t\t$matchingItemsList = $( '<ul/>', {\n\t\t\t\tclass: 'matching-items filter-items',\n\t\t\t} );\n\n\t\t$dropdownSpan.append( $matchingItemsList );\n\t\t$mainSpan.append( $labelSpan ).append( $dropdownSpan );\n\n\t\tif ( this.options.showSearch ) {\n\t\t\tthis._initSearchTemplate( $dropdownSpan );\n\t\t}\n\n\t\tif ( this.options.paginate ) {\n\t\t\tthis._initShowMoreTemplate( $dropdownSpan );\n\t\t}\n\n\t\tthis.$originalSelect.after( $mainSpan );\n\t\tthis.$_main = $mainSpan;\n\t\tthis.$_label = $labelSpan;\n\t\tthis.$_dropdown = $dropdownSpan;\n\t\tthis.$_items = $matchingItemsList;\n\t}\n\n\t// create search field\n\t_initSearchTemplate( $dropdwonSpan ) {\n\t\tconst $container = $( '<div/>', {\n\t\t\t\tclass: 'search-field-container',\n\t\t\t} ),\n\t\t\t$search = $( '<input/>', {\n\t\t\t\tname: 's',\n\t\t\t\tclass: 'search-field',\n\t\t\t\ttype: 'search',\n\t\t\t\tplaceholder: this.options.labels.searchPlaceholder,\n\t\t\t} ).attr( 'autocomplete', 'off' );\n\n\t\t$container.append( $search ).prependTo( $dropdwonSpan );\n\t\tthis.$_search = $search;\n\t}\n\n\t// create showMore field\n\t_initShowMoreTemplate( $dropdwonSpan ) {\n\t\tconst $showMore = $( '<a/>', {\n\t\t\tclass: 'show-more',\n\t\t\ttext: this.options.labels.showMore?.replace(\n\t\t\t\t'%d',\n\t\t\t\tthis.options.perPage\n\t\t\t),\n\t\t} );\n\n\t\t$showMore.on( 'click', this.loadNextPage.bind( this ) ).hide();\n\n\t\t$dropdwonSpan.append( $showMore );\n\t\tthis.$_showMore = $showMore;\n\t}\n\n\t// init actions performed over dropdown elements\n\t_initActions() {\n\t\tconst self = this;\n\n\t\t// main open event\n\t\tthis.$_main?.on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t\tself.toggleDropdown();\n\t\t} );\n\t\tthis.$_dropdown.on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t} );\n\n\t\t// search event\n\t\tthis.$_search?.on( 'keyup search', () => {\n\t\t\tself._populateItems();\n\t\t} );\n\n\t\t// select event\n\t\tthis.$_items.on( 'change', ':input', function () {\n\t\t\tlet $li = $( this ).closest( 'li' ),\n\t\t\t\tvalue = $li.data( 'value' ),\n\t\t\t\tisActive = false;\n\n\t\t\tif (\n\t\t\t\t$li.hasClass( 'disabled' ) &&\n\t\t\t\t! self.isValueSelected( value )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$li.toggleClass( 'active' );\n\t\t\tisActive = $li.hasClass( 'active' );\n\n\t\t\tself._changeItemStatus( value, isActive );\n\t\t} );\n\t\tthis.$_items.on( 'click', 'li:not(.checkbox) a', function ( ev ) {\n\t\t\tlet $li = $( this ).closest( 'li' ),\n\t\t\t\tvalue = $li.data( 'value' ),\n\t\t\t\tisActive = false;\n\n\t\t\tev.preventDefault();\n\n\t\t\tif (\n\t\t\t\t$li.hasClass( 'disabled' ) &&\n\t\t\t\t! self.isValueSelected( value )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$li.toggleClass( 'active' );\n\t\t\tisActive = $li.hasClass( 'active' );\n\n\t\t\tif ( isActive ) {\n\t\t\t\t$li.siblings().removeClass( 'active' );\n\t\t\t}\n\n\t\t\tself._changeItemStatus( value, isActive );\n\t\t} );\n\t\tthis.$_items.on( 'click', 'label > a', function ( ev ) {\n\t\t\tconst input = $( this ).parent().find( ':input' );\n\n\t\t\tev.preventDefault();\n\n\t\t\tif (\n\t\t\t\tinput.is( '[type=\"radio\"]' ) ||\n\t\t\t\tinput.is( '[type=\"checkbox\"]' )\n\t\t\t) {\n\t\t\t\tinput.prop( 'checked', ! input.prop( 'checked' ) );\n\t\t\t}\n\n\t\t\tinput.change();\n\t\t} );\n\n\t\t// select change\n\t\tthis.$originalSelect.on( 'change', ( ev, selfOriginated ) => {\n\t\t\tif ( selfOriginated ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.$_items.find( 'li' ).each( function () {\n\t\t\t\tconst value = $( this ).data( 'value' );\n\n\t\t\t\tif ( self.isValueSelected( value ) ) {\n\t\t\t\t\tself._selectItem( value );\n\t\t\t\t} else {\n\t\t\t\t\tself._deselectItem( value );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tself.updateLabel();\n\t\t} );\n\n\t\t// close dropdown on external click; do this handler only once for any dropdown in the page\n\t\tif ( ! globalThis?.yith_wcan_dropdown_init ) {\n\t\t\t$( document ).on( 'click', this._closeAllDropdowns );\n\t\t\tglobalThis.yith_wcan_dropdown_init = true;\n\t\t}\n\t}\n\n\t// open dropdown\n\topenDropdown() {\n\t\tthis.$_main?.addClass( 'open' ).removeClass( 'closed' );\n\t\tthis._afterDropdownOpen();\n\t}\n\n\t// close dropdown\n\tcloseDropdown() {\n\t\tthis.$_main?.removeClass( 'open' ).addClass( 'closed' );\n\t}\n\n\t// close all dropdowns\n\t_closeAllDropdowns() {\n\t\tconst dropdowns = $( document )\n\t\t\t.find( 'select.enhanced' )\n\t\t\t.filter( function ( i, select ) {\n\t\t\t\tconst $el = $( select );\n\n\t\t\t\treturn !! $el.data( 'dropdown' );\n\t\t\t} );\n\n\t\tdropdowns.each( function () {\n\t\t\t$( this ).data( 'dropdown' ).closeDropdown();\n\t\t} );\n\t}\n\n\t// close other dropdowns\n\t_closeOtherDropdowns() {\n\t\tconst self = this,\n\t\t\tdropdowns = $( document )\n\t\t\t\t.find( 'select.enhanced' )\n\t\t\t\t.filter( function ( i, select ) {\n\t\t\t\t\tconst $el = $( select );\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t!! $el.data( 'dropdown' ) &&\n\t\t\t\t\t\t! $el.is( self.$originalSelect )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\tdropdowns.each( function () {\n\t\t\t$( this ).data( 'dropdown' ).closeDropdown();\n\t\t} );\n\t}\n\n\t// toggle dropdown\n\ttoggleDropdown() {\n\t\tthis.$_main?.toggleClass( 'open' ).toggleClass( 'closed' );\n\n\t\tif ( this.$_main?.hasClass( 'open' ) ) {\n\t\t\tthis._afterDropdownOpen();\n\t\t}\n\t}\n\n\t// perform operations after dropdown is open\n\t_afterDropdownOpen() {\n\t\tthis._closeOtherDropdowns();\n\n\t\tif ( this.$_search?.length ) {\n\t\t\tthis.$_search.val( '' );\n\t\t}\n\n\t\tthis._populateItems();\n\t}\n\n\t// get elements\n\tgetMatchingElements( search, limit ) {\n\t\tlet matchingElements = [],\n\t\t\t$options = this.getOptions(),\n\t\t\tpromise;\n\n\t\tpromise = new Promise( ( resolve ) => {\n\t\t\t// first of all, search across select option\n\t\t\t$options.each( function () {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\tvalue = t.val(),\n\t\t\t\t\tlabel = t.html(),\n\t\t\t\t\tregex = new RegExp( '.*' + search + '.*', 'i' ),\n\t\t\t\t\tshow =\n\t\t\t\t\t\t! search || regex.test( value ) || regex.test( label );\n\n\t\t\t\tif ( show ) {\n\t\t\t\t\tmatchingElements.push( {\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// then retrieve additional items\n\t\t\tif ( this.options.getElements ) {\n\t\t\t\t// we're expecting key => value pairs\n\t\t\t\tthis.options\n\t\t\t\t\t.getElements( search )\n\t\t\t\t\t.then( ( retrievedElements ) => {\n\t\t\t\t\t\tif ( retrievedElements ) {\n\t\t\t\t\t\t\t// reformat retrieved array\n\t\t\t\t\t\t\tretrievedElements = retrievedElements.reduce(\n\t\t\t\t\t\t\t\t( a, v, i ) => {\n\t\t\t\t\t\t\t\t\ta.push( { label: i, value: v } );\n\t\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// merge found results with options\n\t\t\t\t\t\t\tmatchingElements = $.extend(\n\t\t\t\t\t\t\t\tmatchingElements,\n\t\t\t\t\t\t\t\tretrievedElements\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresolve( this._formatItems( matchingElements, limit ) );\n\t\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tresolve( this._formatItems( matchingElements, limit ) );\n\t\t\t}\n\t\t} );\n\n\t\treturn promise;\n\t}\n\n\t// format items as key/value pairs for further processing\n\t_formatItems( items, limit ) {\n\t\tlet indexes = [],\n\t\t\thasMore = false;\n\n\t\t// remove duplicates and sort array of results\n\t\titems\n\t\t\t.filter( ( v ) => {\n\t\t\t\tif ( -1 === indexes.indexOf( v.value ) ) {\n\t\t\t\t\tindexes.push( v.value );\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} )\n\t\t\t.sort( ( a, b ) => {\n\t\t\t\tconst order = this.options.order,\n\t\t\t\t\tmod = order === 'ASC' ? 1 : -1;\n\n\t\t\t\tif ( a.value < b.value ) {\n\t\t\t\t\treturn -1 * mod;\n\t\t\t\t} else if ( a.value > b.value ) {\n\t\t\t\t\treturn mod;\n\t\t\t\t}\n\n\t\t\t\treturn 0;\n\t\t\t} );\n\n\t\t// paginate when needed\n\t\tif ( limit ) {\n\t\t\thasMore = limit < Object.keys( items ).length;\n\t\t\titems = items.slice( 0, limit );\n\t\t}\n\n\t\treturn {\n\t\t\titems,\n\t\t\thasMore,\n\t\t};\n\t}\n\n\t// generate item to append to items list\n\t_generateItem( value, label ) {\n\t\tlet active = this.isValueSelected( value ),\n\t\t\toption = this.getOptionByValue( value ),\n\t\t\t$item = $( '<li/>', {\n\t\t\t\t'data-value': value,\n\t\t\t\tclass: option.length ? option.attr( 'class' ) : '',\n\t\t\t} ),\n\t\t\t$anchor;\n\n\t\tif ( option.length ) {\n\t\t\tconst template = option.data( 'template' ),\n\t\t\t\tcount = option.data( 'count' );\n\n\t\t\tlabel = template ? template : label;\n\n\t\t\tif ( !! count ) {\n\t\t\t\tlabel += count;\n\t\t\t}\n\t\t}\n\n\t\t$anchor = $( '<a/>', {\n\t\t\thref: option.length ? option.data( 'filter_url' ) : '#',\n\t\t\thtml: label,\n\t\t\trel: 'nofollow',\n\t\t\t'data-title': option.length ? option.data( 'title' ) : '',\n\t\t} );\n\n\t\tif ( this.$originalSelect.prop( 'multiple' ) ) {\n\t\t\tconst $checkbox = $( '<input/>', {\n\t\t\t\t\ttype: 'checkbox',\n\t\t\t\t\tvalue,\n\t\t\t\t} ),\n\t\t\t\t$label = $( '<label>' );\n\n\t\t\t$checkbox.prop( 'checked', active );\n\t\t\t$label.prepend( $checkbox ).append( $anchor );\n\t\t\t$item.append( $label ).addClass( 'checkbox' );\n\t\t} else {\n\t\t\t$item.append( $anchor );\n\t\t}\n\n\t\tactive ? $item.addClass( 'active' ) : $item.removeClass( 'active' );\n\n\t\treturn $item;\n\t}\n\n\t// populate items list\n\t_populateItems( page ) {\n\t\tlet search = this.$_search?.length ? this.$_search.val() : '',\n\t\t\tperPage = this.options.paginate ? this.options.perPage : 0,\n\t\t\tlimit;\n\n\t\tpage = page ? parseInt( page ) : 1;\n\t\tlimit = page * perPage;\n\n\t\tthis.getMatchingElements( search, limit ).then( ( resultSet ) => {\n\t\t\tlet matchingItems = resultSet.items,\n\t\t\t\titems = [],\n\t\t\t\thasMore = false;\n\n\t\t\t// remove all previous items\n\t\t\tthis._emptyItems();\n\t\t\tthis._hideLoadMore();\n\n\t\t\tif ( ! matchingItems.length ) {\n\t\t\t\titems.push(\n\t\t\t\t\t$( '<li/>', { text: this.options.labels.noItemsFound } )\n\t\t\t\t);\n\n\t\t\t\tthis.currentPage = 1;\n\t\t\t} else {\n\t\t\t\tfor ( const v of matchingItems ) {\n\t\t\t\t\tif ( v.value === '' ) {\n\t\t\t\t\t\titems.unshift( this._generateItem( v.value, v.label ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\titems.push( this._generateItem( v.value, v.label ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.currentPage = page;\n\t\t\t\thasMore = resultSet.hasMore;\n\t\t\t}\n\n\t\t\tthis.$_items.append( items );\n\n\t\t\tthis.$originalSelect.trigger( 'yith_wcan_dropdown_updated' );\n\n\t\t\tif ( hasMore ) {\n\t\t\t\tthis._showLoadMore();\n\t\t\t}\n\t\t} );\n\t}\n\n\t// load next page of items\n\tloadNextPage() {\n\t\tconst page = this.currentPage + 1;\n\n\t\tthis._populateItems( page );\n\t}\n\n\t// set an item as active\n\t_selectItem( value ) {\n\t\treturn this._changeItemStatus( value, true );\n\t}\n\n\t// disable an item\n\t_deselectItem( value ) {\n\t\treturn this._changeItemStatus( value, false );\n\t}\n\n\t// change item status\n\t_changeItemStatus( value, status ) {\n\t\tconst $option = this.$originalSelect.find(\n\t\t\t`option[value=\"${ value }\"]`\n\t\t);\n\n\t\tif ( $option.length ) {\n\t\t\t$option.prop( 'selected', status );\n\n\t\t\tthis.closeDropdown();\n\t\t\tthis.updateLabel();\n\n\t\t\tthis.$originalSelect.trigger( 'change', [ true ] );\n\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// empty items list\n\t_emptyItems() {\n\t\tthis.$_items.html( '' );\n\t}\n\n\t// show \"Load more\" link\n\t_showLoadMore() {\n\t\tthis.$_showMore.show();\n\t}\n\n\t// hide \"Load more\" link\n\t_hideLoadMore() {\n\t\tthis.$_showMore.hide();\n\t}\n\n\t// returns select label\n\tgetLabel() {\n\t\treturn this.hasSelectedValues()\n\t\t\t? this.getSelectedLabels().join( ', ' )\n\t\t\t: this.options.labels.emptyLabel;\n\t}\n\n\t// update label to match new selection\n\tupdateLabel() {\n\t\tconst label = this.getLabel();\n\n\t\tthis.$_label?.html( label );\n\t}\n\n\t// returns select options\n\tgetOptions() {\n\t\treturn this.$originalSelect.find( 'option' );\n\t}\n\n\t// checks whether select has selected values\n\thasSelectedValues() {\n\t\treturn this.getSelectedOptions().length;\n\t}\n\n\t// checks whether a value is selected\n\tisValueSelected( value ) {\n\t\tconst found = this.getSelectedValues().indexOf( value.toString() );\n\n\t\treturn -1 !== found;\n\t}\n\n\t// retrieve selected options\n\tgetSelectedOptions() {\n\t\treturn this.$originalSelect.find( 'option' ).filter( ':selected' );\n\t}\n\n\t// retrieves an option node by value\n\tgetOptionByValue( value ) {\n\t\treturn this.$originalSelect.find( `option[value=\"${ value }\"]` );\n\t}\n\n\t// retrieve labels for selected options\n\tgetSelectedLabels() {\n\t\tconst labels = [];\n\n\t\tthis.getSelectedOptions().each( function () {\n\t\t\tlet $option = $( this ),\n\t\t\t\ttemplate = $option.data( 'template' );\n\n\t\t\ttemplate = template\n\t\t\t\t? template\n\t\t\t\t: $option.html().replace( /\\([0-9]*\\)/, '' );\n\n\t\t\tlabels.push( template );\n\t\t} );\n\n\t\treturn labels;\n\t}\n\n\t// retrieve values for selected options\n\tgetSelectedValues() {\n\t\tconst values = [];\n\n\t\tthis.getSelectedOptions().each( function () {\n\t\t\tvalues.push( $( this ).val() );\n\t\t} );\n\n\t\treturn values;\n\t}\n\n\tdestroy() {\n\t\t// TBD\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport { $ } from '../config.js';\nimport YITH_WCAN_Dropdown from './yith-wcan-dropdown';\n\nexport default class YITH_WCAN_Preset {\n\t// main preset node\n\tpreset = false;\n\t$preset = false;\n\n\t// target of the filter, if any\n\ttarget = false;\n\t$target = false;\n\n\t// filters node\n\t$filters = false;\n\n\t// filter button\n\t$filterButtons = false;\n\n\t// nodes created just for modal layout\n\tmodalElements = {};\n\n\t// retains current status of filters\n\tactiveFilters = false;\n\n\t// mobile flag\n\tisMobile = false;\n\n\t// slider timeout\n\tsliderTimeout = false;\n\n\t// registers when status has changed\n\toriginalFilters = null;\n\tdirty = false;\n\n\t// init object\n\tconstructor( el ) {\n\t\t// main preset node\n\t\tthis.preset = '#' + el.attr( 'id' );\n\t\tthis.$preset = el;\n\n\t\t// target of the filter, if any\n\t\tthis.target = this.$preset.data( 'target' );\n\t\tthis.$target = this.target ? $( this.target ) : false;\n\n\t\tthis._regiterStatus();\n\t\tthis._initFilterButton();\n\t\tthis._initResponsive();\n\t\tthis._initFilters();\n\t\tthis._initActions();\n\n\t\tthis.$preset\n\t\t\t.data( 'preset', this )\n\t\t\t.addClass( 'enhanced' )\n\t\t\t.trigger( 'yith_wcan_preset_initialized', [ this ] );\n\t}\n\n\t// init filters\n\t_initFilters() {\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself._initFilter( $filter );\n\t\t} );\n\n\t\tthis.maybeShowClearAllFilters();\n\t}\n\n\t// init filter button\n\t_initFilterButton() {\n\t\tthis.$filterButtons = this.$preset.find( '.apply-filters' );\n\n\t\tif ( ! this.$filterButtons.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// manage filter button\n\t\tthis.$filterButtons\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\t\t\t\tthis.filter();\n\t\t\t} )\n\t\t\t.hide();\n\t}\n\n\t// init generic actions\n\t_initActions() {\n\t\tthis.$preset.find( 'form' ).on( 'submit', ( ev ) => {\n\t\t\tev.preventDefault();\n\t\t} );\n\t}\n\n\t// init responsive\n\t_initResponsive() {\n\t\tif ( ! yith_wcan_shortcodes.modal_on_mobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst media = window.matchMedia(\n\t\t\t`(max-width: ${ yith_wcan_shortcodes.mobile_media_query }px)`\n\t\t);\n\n\t\t$( window )\n\t\t\t.on( 'resize', () => {\n\t\t\t\tconst isMobile = !! media.matches;\n\n\t\t\t\tif ( isMobile !== this.isMobile ) {\n\t\t\t\t\tthis.isMobile = isMobile;\n\t\t\t\t\tthis._afterLayoutChange();\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.resize();\n\t}\n\n\t// init filter\n\t_initFilter( $filter ) {\n\t\tconst self = this,\n\t\t\thandleChange = function ( ev ) {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\t$currentFilter = t.closest( '.yith-wcan-filter' ),\n\t\t\t\t\tmultiple = $currentFilter.length\n\t\t\t\t\t\t? 'yes' === $currentFilter.data( 'multiple' )\n\t\t\t\t\t\t: false,\n\t\t\t\t\t$item = t.closest( '.filter-item' ),\n\t\t\t\t\t$items = $item.length\n\t\t\t\t\t\t? $currentFilter.find( '.filter-item' ).not( $item )\n\t\t\t\t\t\t: [];\n\n\t\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tev.preventDefault();\n\n\t\t\t\t$items.length &&\n\t\t\t\t\t! multiple &&\n\t\t\t\t\t$items\n\t\t\t\t\t\t.removeClass( 'active' )\n\t\t\t\t\t\t.children( 'label' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.parent( '.checked' )\n\t\t\t\t\t\t.removeClass( 'checked' );\n\t\t\t\t$item.length && $item.toggleClass( 'active' );\n\n\t\t\t\t// reset active filters.\n\t\t\t\tself.activeFilters = false;\n\n\t\t\t\tself.maybeFilter( $filter );\n\t\t\t\tself.maybeToggleClearAllFilters();\n\t\t\t\tself.maybeToggleClearFilter( $currentFilter );\n\t\t\t};\n\n\t\t// handle filter activation/deactivation by click on label (no input involved)\n\t\t$filter\n\t\t\t.find( '.filter-item' )\n\t\t\t.not( '.checkbox' )\n\t\t\t.not( '.radio' )\n\t\t\t.on( 'click', 'a', function ( ev ) {\n\t\t\t\tconst t = $( this ),\n\t\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\t\tif ( ! $( ev?.delegateTarget ).is( $item ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\thandleChange.call( this, ev );\n\t\t\t} );\n\n\t\t// handle filter activation/deactivation from input change\n\t\t$filter.find( ':input' ).on( 'change', function ( ev ) {\n\t\t\tconst t = $( this ),\n\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\tt.prop( 'checked', false );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\thandleChange.call( this, ev );\n\t\t} );\n\n\t\t// handle filter activation/deactivation by click on label (there is an input whose state can be switched)\n\t\t$filter.find( 'label > a' ).on( 'click', function ( ev ) {\n\t\t\tconst t = $( this ),\n\t\t\t\t$item = t.closest( '.filter-item' );\n\n\t\t\tev.preventDefault();\n\n\t\t\tif ( $item.is( '.disabled' ) && ! $item.is( '.active' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst $input = t.parent().find( ':input' );\n\n\t\t\tif (\n\t\t\t\t$input.is( '[type=\"radio\"]' ) ||\n\t\t\t\t$input.is( '[type=\"checkbox\"]' )\n\t\t\t) {\n\t\t\t\t$input.prop( 'checked', ! $input.prop( 'checked' ) );\n\t\t\t}\n\n\t\t\t$input.change();\n\t\t} );\n\n\t\t// init tooltip\n\t\tthis._initTooltip( $filter );\n\n\t\t// init price slider\n\t\tthis._initPriceSlider( $filter );\n\n\t\t// init dropdown\n\t\tthis._initDropdown( $filter );\n\n\t\t// init collapsable\n\t\tthis._initCollapsable( $filter );\n\n\t\t// init clear anchors\n\t\tthis.maybeShowClearFilter( $filter );\n\n\t\t// init custom inputs\n\t\tif ( this.$preset?.hasClass( 'custom-style' ) ) {\n\t\t\tthis._initCustomInput( $filter );\n\t\t\t$filter.on( 'yith_wcan_dropdown_updated', function () {\n\t\t\t\tconst $dropdown = $( this ),\n\t\t\t\t\t$current = $dropdown.closest( '.yith-wcan-filter' );\n\n\t\t\t\tself._initCustomInput( $current );\n\t\t\t} );\n\t\t}\n\t}\n\n\t// init tooltip\n\t_initTooltip( $filter, position ) {\n\t\t$filter.find( '[data-title]' ).each( function () {\n\t\t\tconst t = $( this );\n\n\t\t\tif ( t.hasClass( 'tooltip-added' ) || ! t.data( 'title' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tt.on( 'mouseenter', function () {\n\t\t\t\tlet th = $( this ),\n\t\t\t\t\ttooltip = null,\n\t\t\t\t\twrapperWidth = th.outerWidth(),\n\t\t\t\t\tleft = 0,\n\t\t\t\t\twidth = 0;\n\n\t\t\t\tif (\n\t\t\t\t\t! position ||\n\t\t\t\t\t( 'top' !== position && 'right' !== position )\n\t\t\t\t) {\n\t\t\t\t\tconst container = th.closest( '.filter-item' );\n\n\t\t\t\t\tposition =\n\t\t\t\t\t\tcontainer.hasClass( 'color' ) ||\n\t\t\t\t\t\tcontainer.hasClass( 'label' )\n\t\t\t\t\t\t\t? 'top'\n\t\t\t\t\t\t\t: 'right';\n\t\t\t\t}\n\n\t\t\t\ttooltip = $( '<span>', {\n\t\t\t\t\tclass: 'yith-wcan-tooltip',\n\t\t\t\t\thtml: th.data( 'title' ),\n\t\t\t\t} );\n\n\t\t\t\tth.append( tooltip );\n\n\t\t\t\twidth = tooltip.outerWidth() + 6;\n\t\t\t\ttooltip.outerWidth( width );\n\n\t\t\t\tif ( 'top' === position ) {\n\t\t\t\t\tleft = ( wrapperWidth - width ) / 2;\n\t\t\t\t} else {\n\t\t\t\t\tleft = wrapperWidth + 15;\n\t\t\t\t}\n\n\t\t\t\ttooltip.css( { left: left.toFixed( 0 ) + 'px' } ).fadeIn( 200 );\n\n\t\t\t\tth.addClass( 'with-tooltip' );\n\t\t\t} ).on( 'mouseleave', function () {\n\t\t\t\tconst th = $( this );\n\n\t\t\t\tth.find( '.yith-wcan-tooltip' ).fadeOut( 200, function () {\n\t\t\t\t\tth.removeClass( 'with-tooltip' )\n\t\t\t\t\t\t.find( '.yith-wcan-tooltip' )\n\t\t\t\t\t\t.remove();\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tt.addClass( 'tooltip-added' );\n\t\t} );\n\t}\n\n\t// init dropdown\n\t_initDropdown( $filter ) {\n\t\tconst $dropdown = $filter.find( 'select.filter-dropdown' );\n\n\t\tif ( ! $dropdown.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t$dropdown.hasClass( 'select2-hidden-accessible' ) &&\n\t\t\t'undefined' !== typeof $.fn.selectWoo\n\t\t) {\n\t\t\t$dropdown.selectWoo( 'destroy' );\n\t\t}\n\n\t\tthis._initDropdownObject( $dropdown, {\n\t\t\tpaginate: true,\n\t\t\tperPage: yith_wcan_shortcodes.terms_per_page,\n\t\t} );\n\t}\n\n\t// init dropdown object\n\t_initDropdownObject( $dropdown, opts ) {\n\t\treturn new YITH_WCAN_Dropdown( $dropdown, opts );\n\t}\n\n\t// init price slider\n\t_initPriceSlider( $filter ) {\n\t\tif ( ! $filter.hasClass( 'filter-price-slider' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst self = this,\n\t\t\t$container = $filter.find( '.price-slider' ),\n\t\t\t$minInput = $container.find( '.price-slider-min' ),\n\t\t\t$maxInput = $container.find( '.price-slider-max' ),\n\t\t\tmin = parseFloat( $container.data( 'min' ) ),\n\t\t\tmax = parseFloat( $container.data( 'max' ) ),\n\t\t\tcurrentMin = parseFloat( $minInput.val() ),\n\t\t\tcurrentMax = parseFloat( $maxInput.val() ),\n\t\t\tstep = parseFloat( $container.data( 'step' ) ),\n\t\t\thandleSliderChange = function () {\n\t\t\t\tif ( self.sliderTimeout ) {\n\t\t\t\t\tclearTimeout( self.sliderTimeout );\n\t\t\t\t}\n\n\t\t\t\tself.sliderTimeout = setTimeout( () => {\n\t\t\t\t\tself.maybeFilter( $filter );\n\t\t\t\t}, 200 );\n\t\t\t};\n\n\t\t$filter.find( '.price-slider-ui' ).ionRangeSlider( {\n\t\t\tskin: 'round',\n\t\t\ttype: 'double',\n\t\t\tmin,\n\t\t\tmax,\n\t\t\tstep,\n\t\t\tfrom: currentMin,\n\t\t\tto: currentMax,\n\t\t\tmin_interval: step,\n\t\t\tvalues_separator: ' - ',\n\t\t\tprettify: ( v ) => this.formatPrice( v ),\n\t\t\tonChange: ( data ) => {\n\t\t\t\t$minInput.val( data.from );\n\t\t\t\t$maxInput.val( data.to );\n\t\t\t},\n\t\t\tonFinish: handleSliderChange,\n\t\t} );\n\n\t\t$minInput\n\t\t\t.add( $maxInput )\n\t\t\t.off( 'change' )\n\t\t\t.on( 'keyup', () => {\n\t\t\t\tif ( ! $minInput.val() || ! $maxInput.val() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\thandleSliderChange();\n\t\t\t} );\n\t}\n\n\t// init collapsable\n\t_initCollapsable( $filter ) {\n\t\tthis._initTitleCollapsable( $filter );\n\t\tthis._initHierarchyCollapsable( $filter );\n\t}\n\n\t// init toggle on click of the title\n\t_initTitleCollapsable( $filter ) {\n\t\tconst $title = $filter.find( '.collapsable' );\n\n\t\tif ( ! $title.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._initToggle( $title, $title, $filter.find( '.filter-content' ) );\n\t}\n\n\t// init toggle on click of the parent li\n\t_initHierarchyCollapsable( $filter ) {\n\t\tconst $items = $filter.find( '.hierarchy-collapsable' );\n\n\t\tif ( ! $items.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// set parents of currently active term as open\n\t\tconst self = this,\n\t\t\tactive = $filter.find( '.active' );\n\n\t\tif ( active.length ) {\n\t\t\tactive\n\t\t\t\t.parents( '.hierarchy-collapsable' )\n\t\t\t\t.removeClass( 'closed' )\n\t\t\t\t.addClass( 'opened' );\n\n\t\t\tif (\n\t\t\t\tactive.hasClass( 'hierarchy-collapsable' ) &&\n\t\t\t\tyith_wcan_shortcodes.show_current_children\n\t\t\t) {\n\t\t\t\tactive.removeClass( 'closed' ).addClass( 'opened' );\n\t\t\t}\n\t\t}\n\n\t\t$items.each( function () {\n\t\t\tconst $t = $( this ),\n\t\t\t\t$toggle = $( '<span/>', {\n\t\t\t\t\tclass: 'toggle-handle',\n\t\t\t\t} );\n\n\t\t\t$toggle.appendTo( $t );\n\n\t\t\tself._initToggle( $toggle, $t, $t.children( 'ul.filter-items' ) );\n\t\t} );\n\t}\n\n\t// init toggle to generic toggle/target pair\n\t_initToggle( $toggle, $container, $target ) {\n\t\tif ( $container.hasClass( 'closed' ) ) {\n\t\t\t$target.hide();\n\t\t}\n\n\t\t$toggle.off( 'click' ).on( 'click', ( ev ) => {\n\t\t\tev.stopPropagation();\n\t\t\tev.preventDefault();\n\n\t\t\t$target.slideToggle( 400, () => {\n\t\t\t\t$container.toggleClass( 'opened' ).toggleClass( 'closed' );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// init custom input\n\t_initCustomInput( $filter ) {\n\t\t$filter.find( ':input' ).each( function () {\n\t\t\tlet input = $( this ),\n\t\t\t\ttype = input.attr( 'type' ),\n\t\t\t\tcontainerClass = `${ type }button`,\n\t\t\t\tcontainer;\n\n\t\t\tif ( 'checkbox' !== type && 'radio' !== type ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( input.closest( `.${ containerClass }` ).length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( input.is( ':checked' ) ) {\n\t\t\t\tcontainerClass += ' checked';\n\t\t\t}\n\n\t\t\tcontainer = $( '<span/>', {\n\t\t\t\tclass: containerClass,\n\t\t\t} );\n\n\t\t\tinput.wrap( container ).on( 'change', function () {\n\t\t\t\tconst t = $( this );\n\n\t\t\t\tt.prop( 'checked' )\n\t\t\t\t\t? t.parent().addClass( 'checked' )\n\t\t\t\t\t: t.parent().removeClass( 'checked' );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// register initial status\n\t_regiterStatus() {\n\t\tthis.originalFilters = this.getFiltersProperties();\n\t}\n\n\t// trigger handling after layout change\n\t_afterLayoutChange() {\n\t\tif ( this.isMobile ) {\n\t\t\tthis.$preset\n\t\t\t\t.addClass( 'filters-modal' )\n\t\t\t\t.attr( 'role', 'dialog' )\n\t\t\t\t.attr( 'tabindex', '-1' )\n\t\t\t\t.hide();\n\n\t\t\tthis._addCloseModalButton();\n\t\t\tthis._addApplyFiltersModalButton();\n\t\t\tthis._switchToCollapsables();\n\n\t\t\tthis.$filterButtons?.hide();\n\t\t} else {\n\t\t\tthis.$preset\n\t\t\t\t.removeClass( 'filters-modal' )\n\t\t\t\t.removeClass( 'open' )\n\t\t\t\t.removeAttr( 'role' )\n\t\t\t\t.removeAttr( 'tabindex' )\n\t\t\t\t.show();\n\n\t\t\t$( 'body' )\n\t\t\t\t.css( 'overflow', 'auto' )\n\t\t\t\t.removeClass( 'yith-wcan-preset-modal-open' );\n\n\t\t\tthis._removeCloseModalButton();\n\t\t\tthis._removeApplyFiltersModalButton();\n\t\t\tthis._switchBackCollapsables();\n\n\t\t\tthis.$filterButtons?.show();\n\t\t}\n\t}\n\n\t// add modal close button\n\t_addCloseModalButton() {\n\t\tconst $closeButton = $( '<a/>', {\n\t\t\tclass: 'close-button',\n\t\t\thtml: '&times;',\n\t\t\t'data-dismiss': 'modal',\n\t\t\t'aria-label': yith_wcan_shortcodes.labels.close,\n\t\t} );\n\n\t\t$closeButton\n\t\t\t.prependTo( this.$preset )\n\t\t\t.on( 'click', this.closeModal.bind( this ) );\n\t\tthis.modalElements.closeButton = $closeButton;\n\t}\n\n\t// remove modal close button\n\t_removeCloseModalButton() {\n\t\tthis.modalElements?.closeButton?.remove();\n\t}\n\n\t// show main filter button for the modal\n\t_addApplyFiltersModalButton() {\n\t\tconst $filterButton = $( '<button/>', {\n\t\t\tclass: 'apply-filters main-modal-button',\n\t\t\thtml: yith_wcan_shortcodes.labels.show_results,\n\t\t\t'data-dismiss': 'modal',\n\t\t} );\n\n\t\t$filterButton.appendTo( this.$preset ).on( 'click', () => {\n\t\t\tthis.filter();\n\t\t\tthis.closeModal();\n\t\t} );\n\t\tthis.modalElements.applyFiltersButton = $filterButton;\n\t}\n\n\t// hide main filter button for the modal\n\t_removeApplyFiltersModalButton() {\n\t\tthis.modalElements?.applyFiltersButton?.remove();\n\t}\n\n\t// convert all filters to collapsable\n\t_switchToCollapsables() {\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this ),\n\t\t\t\t$title = $filter.find( '.filter-title' );\n\n\t\t\tif ( ! $title.length || $title.hasClass( 'collapsable' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$title.addClass( 'collapsable' ).data( 'disable-collapse', true );\n\n\t\t\tself._initTitleCollapsable( $filter );\n\t\t} );\n\t}\n\n\t// switch back filters to their previous collapsable state\n\t_switchBackCollapsables() {\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this ),\n\t\t\t\t$title = $filter.find( '.filter-title' );\n\n\t\t\tif (\n\t\t\t\t! $title.length ||\n\t\t\t\t! $title.hasClass( 'collapsable' ) ||\n\t\t\t\t! $title.data( 'disable-collapse' )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$title\n\t\t\t\t.removeClass( 'collapsable' )\n\t\t\t\t.removeData( 'disable-collapse', true )\n\t\t\t\t.off( 'click' );\n\n\t\t\t$filter.find( '.filter-content' ).show();\n\t\t} );\n\t}\n\n\t// close all collpasable before showing modal\n\t_openAllCollapsables() {\n\t\tthis.$filters\n\t\t\t.not( '.no-title' )\n\t\t\t.not( ( i, v ) => {\n\t\t\t\treturn this.isFilterActive( $( v ) );\n\t\t\t} )\n\t\t\t.find( '.filter-content' )\n\t\t\t.show()\n\t\t\t.end()\n\t\t\t.find( '.filter-title' )\n\t\t\t.removeClass( 'closed' )\n\t\t\t.addClass( 'opened' );\n\t}\n\n\t// close all collpasable before showing modal\n\t_closeAllCollapsables() {\n\t\tthis.$filters\n\t\t\t.not( '.no-title' )\n\t\t\t.not( ( i, v ) => {\n\t\t\t\treturn this.isFilterActive( $( v ) );\n\t\t\t} )\n\t\t\t.find( '.filter-content' )\n\t\t\t.hide()\n\t\t\t.end()\n\t\t\t.find( '.filter-title' )\n\t\t\t.addClass( 'closed' )\n\t\t\t.removeClass( 'opened' );\n\t}\n\n\t// update status change flag, if filters have changed\n\tmaybeRegisterStatusChange() {\n\t\tconst currentFilters = this.getFiltersProperties(),\n\t\t\tcurrentStr = JSON.stringify( currentFilters ),\n\t\t\toriginalStr = JSON.stringify( this.originalFilters );\n\n\t\tthis.dirty = currentStr !== originalStr;\n\t}\n\n\t// apply filters when possible\n\tmaybeFilter( $initiator ) {\n\t\t// register status change\n\t\tthis.maybeRegisterStatusChange();\n\n\t\t// filter, or show filter button.\n\t\tif ( yith_wcan_shortcodes.instant_filters && ! this.isMobile ) {\n\t\t\tthis.filter();\n\t\t} else if (\n\t\t\t! yith_wcan_shortcodes.instant_filters &&\n\t\t\t! this.isMobile\n\t\t) {\n\t\t\tthis.dirty\n\t\t\t\t? this.$filterButtons?.show()\n\t\t\t\t: this.$filterButtons?.hide();\n\t\t} else if ( this.isMobile && this.dirty ) {\n\t\t\tthis.$preset.addClass( 'with-filter-button' );\n\t\t\tthis.modalElements.applyFiltersButton?.show();\n\t\t}\n\t}\n\n\t// main filtering method\n\tfilter() {\n\t\tconst filter = window?.product_filter;\n\n\t\tfilter\n\t\t\t?.doFilter( this.getFiltersProperties(), this.target, this.preset )\n\t\t\t?.done( () => {\n\t\t\t\tlet newPreset = $( this.preset );\n\n\t\t\t\tif ( newPreset.length && yith_wcan_shortcodes.scroll_top ) {\n\t\t\t\t\t// by default, scroll till top of first preset in the page.\n\t\t\t\t\tlet targetOffset = newPreset.offset().top;\n\n\t\t\t\t\tif ( !! yith_wcan_shortcodes.scroll_target ) {\n\t\t\t\t\t\t// when we have a specific target, use that for the offset.\n\t\t\t\t\t\tconst $scrollTarget = $(\n\t\t\t\t\t\t\tyith_wcan_shortcodes.scroll_target\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\ttargetOffset = $scrollTarget.length\n\t\t\t\t\t\t\t? $scrollTarget.offset().top\n\t\t\t\t\t\t\t: targetOffset;\n\t\t\t\t\t} else if ( this.isMobile ) {\n\t\t\t\t\t\t// otherwise, if we're on mobile, scroll to the top of the page\n\t\t\t\t\t\t// (preset could be in an unexpected location).\n\t\t\t\t\t\ttargetOffset = 100;\n\t\t\t\t\t}\n\n\t\t\t\t\t$( 'body, html' ).animate( {\n\t\t\t\t\t\tscrollTop: targetOffset - 100,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// register new filters, clear status flag\n\t\t\t\tthis.originalFilters = this.getFiltersProperties();\n\t\t\t\tthis.dirty = false;\n\t\t\t} );\n\n\t\tif ( this.isMobile ) {\n\t\t\tthis.$preset.removeClass( 'with-filter-button' );\n\t\t\tthis.modalElements.applyFiltersButton?.hide();\n\t\t\tthis.closeModal();\n\t\t}\n\t}\n\n\t// get all filter nodes\n\tgetFilters() {\n\t\tif ( false === this.$filters ) {\n\t\t\tthis.$filters = this.$preset.find( '.yith-wcan-filter' );\n\t\t}\n\n\t\treturn this.$filters;\n\t}\n\n\t// retrieves all filters that we want to apply\n\tgetActiveFilters() {\n\t\tif ( false === this.activeFilters ) {\n\t\t\tthis.activeFilters = this.getFiltersProperties();\n\t\t}\n\n\t\treturn this.activeFilters;\n\t}\n\n\t// check whether there is any filter active\n\tisAnyFilterActive() {\n\t\treturn !! Object.keys( this.getActiveFilters() ).length;\n\t}\n\n\t// checks whether current filter is active\n\tisFilterActive( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tactive,\n\t\t\tfilteredActive;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\tcase 'review':\n\t\t\tcase 'price_range':\n\t\t\t\tconst $dropdown = $filter.find( '.filter-dropdown' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tconst val = $dropdown.val();\n\n\t\t\t\t\tactive = 'object' === typeof val ? !! val?.length : !! val;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t// if we use type other than dropdown, fallthrough\n\t\t\tcase 'stock_sale':\n\t\t\t\tactive = $filter\n\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t.filter( '.active' ).length;\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tconst step = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'step' )\n\t\t\t\t\t),\n\t\t\t\t\tmin = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'min' )\n\t\t\t\t\t),\n\t\t\t\t\tmax = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider' ).data( 'max' )\n\t\t\t\t\t),\n\t\t\t\t\tcurrentMin = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider-min' ).val()\n\t\t\t\t\t),\n\t\t\t\t\tcurrentMax = parseFloat(\n\t\t\t\t\t\t$filter.find( '.price-slider-max' ).val()\n\t\t\t\t\t);\n\n\t\t\t\tactive =\n\t\t\t\t\tMath.abs( currentMin - min ) >= step ||\n\t\t\t\t\tMath.abs( currentMax - max ) >= step;\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tactive =\n\t\t\t\t\t'menu_order' !== $filter.find( '.filter-order-by' ).val();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tactive = false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfilteredActive = $filter.triggerHandler( 'yith_wcan_is_filter_active', [\n\t\t\tactive,\n\t\t\tthis,\n\t\t] );\n\t\tactive =\n\t\t\ttypeof filteredActive !== 'undefined' ? filteredActive : active;\n\n\t\treturn active;\n\t}\n\n\t// count the number of active items per filter\n\tcountActiveItems( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tcount;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\tcase 'review':\n\t\t\tcase 'price_range':\n\t\t\t\tconst $dropdown = $filter.find( '.filter-dropdown' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tconst val = $dropdown.val();\n\n\t\t\t\t\tcount = 'object' === typeof val ? val?.length : +!! val;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t// if we use type other than dropdown, fallthrough\n\t\t\tcase 'stock_sale':\n\t\t\t\tcount = $filter\n\t\t\t\t\t.find( '.filter-items' )\n\t\t\t\t\t.find( '.active' ).length;\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tif ( this.isFilterActive( $filter ) ) {\n\t\t\t\t\tcount = 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\tdefault:\n\t\t\t\tcount = 0;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t// retrieves filter properties for the filter\n\tgetFilterProperties( $filter ) {\n\t\tlet filterType = $filter.data( 'filter-type' ),\n\t\t\tmultiple = 'yes' === $filter.data( 'multiple' ),\n\t\t\t$dropdown = $filter.find( '.filter-dropdown' ),\n\t\t\tproperties = {},\n\t\t\tfilteredProperties,\n\t\t\t$active;\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\t\tlet activeTerms = [],\n\t\t\t\t\ttaxonomy = $filter.data( 'taxonomy' ),\n\t\t\t\t\tisAttr = 0 === taxonomy.indexOf( 'filter' ),\n\t\t\t\t\trelation = $filter.data( 'relation' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tactiveTerms = $dropdown.val();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactiveTerms.push( $dropdown.val() );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tactiveTerms = $active.get().reduce( function ( a, v ) {\n\t\t\t\t\t\tlet val;\n\n\t\t\t\t\t\tv = $( v );\n\t\t\t\t\t\tval = v.is( 'label' )\n\t\t\t\t\t\t\t? v.find( ':input' ).val()\n\t\t\t\t\t\t\t: v.data( 'term-slug' );\n\n\t\t\t\t\t\tif ( ! val ) {\n\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ta.push( val );\n\n\t\t\t\t\t\treturn a;\n\t\t\t\t\t}, activeTerms );\n\t\t\t\t}\n\n\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\tproperties[ taxonomy ] = activeTerms.pop();\n\t\t\t\t} else {\n\t\t\t\t\tconst glue = ! isAttr && 'and' === relation ? '+' : ',';\n\t\t\t\t\tproperties[ taxonomy ] = activeTerms.join( glue );\n\t\t\t\t}\n\n\t\t\t\tif ( isAttr ) {\n\t\t\t\t\tproperties[ taxonomy.replace( 'filter_', 'query_type_' ) ] =\n\t\t\t\t\t\trelation;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'review':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tproperties.rating_filter = $dropdown.val();\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\t\t$active = $active.first();\n\t\t\t\t\t\tproperties.rating_filter = $active.is( 'label' )\n\t\t\t\t\t\t\t? $active.find( ':input' ).val()\n\t\t\t\t\t\t\t: $active.data( 'rating' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.rating_filter = $active\n\t\t\t\t\t\t\t.get()\n\t\t\t\t\t\t\t.reduce( function ( a, v ) {\n\t\t\t\t\t\t\t\tlet val;\n\n\t\t\t\t\t\t\t\tv = $( v );\n\t\t\t\t\t\t\t\tval = v.is( 'label' )\n\t\t\t\t\t\t\t\t\t? v.find( ':input' ).val()\n\t\t\t\t\t\t\t\t\t: v.data( 'rating' );\n\n\t\t\t\t\t\t\t\tif ( ! val ) {\n\t\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\ta.push( val );\n\n\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t}, [] )\n\t\t\t\t\t\t\t.join( ',' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_range':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tproperties.price_ranges = $dropdown.val().join( ',' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.min_price = $dropdown\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.split( '-' )[ 0 ];\n\t\t\t\t\t\tproperties.max_price = $dropdown\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.split( '-' )[ 1 ];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$active = $filter\n\t\t\t\t\t\t.find( '.filter-item' )\n\t\t\t\t\t\t.filter( '.active' )\n\t\t\t\t\t\t.children( 'a, label' );\n\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tproperties.price_ranges = $active\n\t\t\t\t\t\t\t.get()\n\t\t\t\t\t\t\t.reduce( ( a, v ) => {\n\t\t\t\t\t\t\t\tlet min = $( v ).data( 'range-min' ),\n\t\t\t\t\t\t\t\t\tmax = $( v ).data( 'range-max' );\n\n\t\t\t\t\t\t\t\ta += ( max ? `${ min }-${ max }` : min ) + ',';\n\n\t\t\t\t\t\t\t\treturn a;\n\t\t\t\t\t\t\t}, '' )\n\t\t\t\t\t\t\t.replace( /^(.*),$/, '$1' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperties.min_price = parseFloat(\n\t\t\t\t\t\t\t$active.first().data( 'range-min' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tproperties.max_price = parseFloat(\n\t\t\t\t\t\t\t$active.first().data( 'range-max' )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tproperties.min_price = parseFloat(\n\t\t\t\t\t$filter.find( '.price-slider-min' ).val()\n\t\t\t\t);\n\t\t\t\tproperties.max_price = parseFloat(\n\t\t\t\t\t$filter.find( '.price-slider-max' ).val()\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'stock_sale':\n\t\t\t\tif ( $filter.find( '.filter-on-sale' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.onsale_filter = 1;\n\t\t\t\t}\n\t\t\t\tif ( $filter.find( '.filter-in-stock' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.instock_filter = 1;\n\t\t\t\t}\n\t\t\t\tif ( $filter.find( '.filter-featured' ).is( '.active' ) ) {\n\t\t\t\t\tproperties.featured_filter = 1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\tproperties.orderby = $filter.find( '.filter-order-by' ).val();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfilteredProperties = $filter.triggerHandler(\n\t\t\t'yith_wcan_filter_properties',\n\t\t\t[ properties, self ]\n\t\t);\n\t\tproperties =\n\t\t\ttypeof filteredProperties !== 'undefined'\n\t\t\t\t? filteredProperties\n\t\t\t\t: properties;\n\n\t\treturn properties;\n\t}\n\n\t// retrieves properties for all filters of the preset\n\tgetFiltersProperties() {\n\t\tlet properties = {};\n\t\tconst self = this;\n\n\t\tthis.getFilters().each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tif ( self.isFilterActive( $filter ) ) {\n\t\t\t\tconst filterProperties = self.getFilterProperties( $filter );\n\n\t\t\t\tproperties = self.mergeProperties(\n\t\t\t\t\tproperties,\n\t\t\t\t\tfilterProperties,\n\t\t\t\t\t$filter\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t\treturn properties;\n\t}\n\n\t// retrieve filters matching any of the properties passed\n\tgetFiltersByProperties( properties ) {\n\t\tconst self = this;\n\n\t\treturn this.getFilters().filter( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tif ( self.isFilterActive( $filter ) ) {\n\t\t\t\tlet filterProperties = self.getFilterProperties( $filter ),\n\t\t\t\t\thasProp = false;\n\n\t\t\t\tfor ( const prop in properties ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t[ 'min_price', 'max_price', 'price_ranges' ].includes(\n\t\t\t\t\t\t\tprop\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\t( filterProperties.min_price ||\n\t\t\t\t\t\t\tfilterProperties.price_ranges )\n\t\t\t\t\t) {\n\t\t\t\t\t\thasProp = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if ( filterProperties[ prop ] ) {\n\t\t\t\t\t\thasProp = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn hasProp;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} );\n\t}\n\n\t// show clear selection anchor\n\tmaybeToggleClearFilter( $filter ) {\n\t\tif ( ! this.isFilterActive( $filter ) ) {\n\t\t\tthis.maybeHideClearFilter( $filter );\n\t\t} else {\n\t\t\tthis.maybeShowClearFilter( $filter );\n\t\t}\n\t}\n\n\t// show clear all selections anchor\n\tmaybeToggleClearAllFilters() {\n\t\tif ( ! this.isAnyFilterActive() ) {\n\t\t\tthis.maybeHideClearAllFilters();\n\t\t} else {\n\t\t\tthis.maybeShowClearAllFilters();\n\t\t}\n\t}\n\n\t// show clear selection anchor\n\tmaybeShowClearFilter( $filter ) {\n\t\tif (\n\t\t\t! this.isFilterActive( $filter ) ||\n\t\t\t! yith_wcan_shortcodes.show_clear_filter\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link if already added.\n\t\t$filter.find( '.clear-selection' ).remove();\n\n\t\t// add new clear selection link.\n\t\t$( '<a/>', {\n\t\t\tclass: 'clear-selection',\n\t\t\ttext: yith_wcan_shortcodes.labels.clear_selection,\n\t\t\trole: 'button',\n\t\t} )\n\t\t\t.prependTo( $filter.find( '.filter-content' ) )\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\n\t\t\t\tthis.deactivateFilter(\n\t\t\t\t\t$filter,\n\t\t\t\t\tfalse,\n\t\t\t\t\tyith_wcan_shortcodes.instant_filters\n\t\t\t\t);\n\t\t\t\tthis.maybeHideClearFilter( $filter );\n\n\t\t\t\tif ( yith_wcan_shortcodes.instant_filters ) {\n\t\t\t\t\tthis.closeModal();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t// show clearAll anchor, when on mobile layout\n\tmaybeShowClearAllFilters() {\n\t\tif ( ! this.isAnyFilterActive() || ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link if already added.\n\t\tthis.$preset.find( '.clear-selection' ).remove();\n\n\t\t// add new clear selection link.\n\t\t$( '<a/>', {\n\t\t\tclass: 'clear-selection',\n\t\t\ttext: yith_wcan_shortcodes.labels.clear_all_selections,\n\t\t\trole: 'button',\n\t\t} )\n\t\t\t.prependTo( this.$preset.find( '.filters-container' ) )\n\t\t\t.on( 'click', ( ev ) => {\n\t\t\t\tev.preventDefault();\n\n\t\t\t\tthis.deactivateAllFilters(\n\t\t\t\t\tyith_wcan_shortcodes.instant_filters\n\t\t\t\t);\n\t\t\t\tthis.maybeHideClearAllFilters();\n\n\t\t\t\tif ( yith_wcan_shortcodes.instant_filters ) {\n\t\t\t\t\tthis.closeModal();\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\t// hide clear selection anchor\n\tmaybeHideClearFilter( $filter ) {\n\t\tif (\n\t\t\tthis.isFilterActive( $filter ) ||\n\t\t\t! yith_wcan_shortcodes.show_clear_filter\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link.\n\t\t$filter.find( '.clear-selection' ).remove();\n\t}\n\n\t// show clearAll anchor, when on mobile layout\n\tmaybeHideClearAllFilters() {\n\t\tif ( this.isAnyFilterActive() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// remove clear selection link.\n\t\tthis.$preset\n\t\t\t.find( '.filters-container' )\n\t\t\t.children( '.clear-selection' )\n\t\t\t.remove();\n\t}\n\n\t// deactivate filter\n\tdeactivateFilter( $filter, properties, doFilter ) {\n\t\tconst filterType = $filter.data( 'filter-type' ),\n\t\t\t$items = $filter.find( '.filter-item' ),\n\t\t\t$activeItems = $items.filter( '.active' ),\n\t\t\t$dropdown = $filter.find( '.filter-dropdown' );\n\n\t\tswitch ( filterType ) {\n\t\t\tcase 'tax':\n\t\t\t\tconst taxonomy = $filter.data( 'taxonomy' );\n\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this );\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t$option.val().toString() ===\n\t\t\t\t\t\t\t\tproperties[ taxonomy ].toString()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'term-slug' );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tvalue.toString() ===\n\t\t\t\t\t\t\tproperties[ taxonomy ].toString()\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'review':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this );\n\n\t\t\t\t\t\t\tif ( $option.val() === properties.rating_filter ) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'rating' );\n\n\t\t\t\t\t\tif ( value === properties.rating_filter ) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_range':\n\t\t\t\tif ( $dropdown.length ) {\n\t\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t\t$dropdown.find( 'option' ).prop( 'selected', false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$dropdown.find( 'option' ).each( function () {\n\t\t\t\t\t\t\tconst $option = $( this ),\n\t\t\t\t\t\t\t\tformattedRange =\n\t\t\t\t\t\t\t\t\tproperties.min_price +\n\t\t\t\t\t\t\t\t\t( properties.max_price\n\t\t\t\t\t\t\t\t\t\t? `-${ properties.max_price }`\n\t\t\t\t\t\t\t\t\t\t: '' );\n\n\t\t\t\t\t\t\tif ( $option.val() === formattedRange ) {\n\t\t\t\t\t\t\t\t$option.prop( 'selected', false );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$dropdown.change();\n\t\t\t\t} else if ( ! properties ) {\n\t\t\t\t\t$activeItems.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t$activeItems.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\t$activeItems.each( function () {\n\t\t\t\t\t\tlet $item = $( this ),\n\t\t\t\t\t\t\t$label = $item.children( 'label' ),\n\t\t\t\t\t\t\t$anchor = $item.children( 'a' ),\n\t\t\t\t\t\t\tformattedRange,\n\t\t\t\t\t\t\tvalue;\n\n\t\t\t\t\t\tvalue = $label.length\n\t\t\t\t\t\t\t? $label.find( ':input' ).val()\n\t\t\t\t\t\t\t: $anchor.data( 'min_price' ) +\n\t\t\t\t\t\t\t ( $anchor.data( 'max_price' )\n\t\t\t\t\t\t\t\t\t? '-' + $anchor.data( 'max_price' )\n\t\t\t\t\t\t\t\t\t: '' );\n\n\t\t\t\t\t\tif ( properties.min_price ) {\n\t\t\t\t\t\t\tformattedRange =\n\t\t\t\t\t\t\t\tproperties.min_price +\n\t\t\t\t\t\t\t\t( properties.max_price\n\t\t\t\t\t\t\t\t\t? '-' + properties.max_price\n\t\t\t\t\t\t\t\t\t: '' );\n\t\t\t\t\t\t} else if ( properties.price_ranges ) {\n\t\t\t\t\t\t\tformattedRange = properties.price_ranges;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( value === formattedRange ) {\n\t\t\t\t\t\t\t$item.children( 'label' ).children( 'a' ).click();\n\t\t\t\t\t\t\t$item.removeClass( 'active' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'price_slider':\n\t\t\t\tconst $priceSlider = $filter.find( '.price-slider' );\n\n\t\t\t\t$filter\n\t\t\t\t\t.find( '.price-slider-min' )\n\t\t\t\t\t.val( $priceSlider.data( 'min' ) );\n\t\t\t\t$filter\n\t\t\t\t\t.find( '.price-slider-max' )\n\t\t\t\t\t.val( $priceSlider.data( 'max' ) )\n\t\t\t\t\t.change();\n\t\t\t\tbreak;\n\t\t\tcase 'orderby':\n\t\t\t\t$filter.find( 'select' ).val( 'menu_order' );\n\t\t\t\tbreak;\n\t\t\tcase 'stock_sale':\n\t\t\t\tif ( ! properties ) {\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-in-stock' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-on-sale' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\t\t\t\t\t$filter\n\t\t\t\t\t\t.find( '.filter-featured' )\n\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t.change();\n\n\t\t\t\t\t$items.removeClass( 'active' );\n\t\t\t\t} else {\n\t\t\t\t\tif ( properties?.instock_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-in-stock' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( properties?.onsale_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-on-sale' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( properties?.featured_filter ) {\n\t\t\t\t\t\t$filter\n\t\t\t\t\t\t\t.find( '.filter-featured' )\n\t\t\t\t\t\t\t.find( ':input' )\n\t\t\t\t\t\t\t.prop( 'checked', false )\n\t\t\t\t\t\t\t.change()\n\t\t\t\t\t\t\t.closest( '.filter-item' )\n\t\t\t\t\t\t\t.removeClass( 'active' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$items.removeClass( 'active' );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.activeFilters = false;\n\n\t\tif ( doFilter ) {\n\t\t\tthis.filter();\n\t\t}\n\t}\n\n\t// deactivate all filters\n\tdeactivateAllFilters( doFilter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFilters();\n\n\t\t$filters.each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself.deactivateFilter( $filter );\n\t\t} );\n\n\t\tthis.activeFilters = false;\n\n\t\tif ( doFilter ) {\n\t\t\tthis.filter();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t// deactivate filters that matches a specific set of properties\n\tdeactivateFilterByProperties( properties, doFilter ) {\n\t\tconst self = this,\n\t\t\t$filters = this.getFiltersByProperties( properties );\n\n\t\tif ( ! $filters.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$filters.each( function () {\n\t\t\tconst $filter = $( this );\n\n\t\t\tself.deactivateFilter( $filter, properties, doFilter );\n\t\t} );\n\n\t\treturn true;\n\t}\n\n\t// open filters as a modal, when in mobile layout\n\topenModal() {\n\t\tif ( ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( yith_wcan_shortcodes.toggles_open_on_modal ) {\n\t\t\tthis._openAllCollapsables();\n\t\t} else {\n\t\t\tthis._closeAllCollapsables();\n\t\t}\n\n\t\t$( 'body' )\n\t\t\t.css( 'overflow', 'hidden' )\n\t\t\t.addClass( 'yith-wcan-preset-modal-open' );\n\n\t\tthis.$preset.show();\n\n\t\tsetTimeout( () => {\n\t\t\tthis.$preset.addClass( 'open' );\n\t\t}, 100 );\n\t}\n\n\t// close filters modal, when in mobile layout\n\tcloseModal() {\n\t\tif ( ! this.isMobile ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.$preset.removeClass( 'open' );\n\n\t\tsetTimeout( () => {\n\t\t\tthis.$preset.hide();\n\t\t\t$( 'body' )\n\t\t\t\t.css( 'overflow', 'auto' )\n\t\t\t\t.removeClass( 'yith-wcan-preset-modal-open' );\n\t\t}, 300 );\n\t}\n\n\t// utility that formats the price according to store configuration.\n\tformatPrice( price ) {\n\t\tif ( 'undefined' !== typeof accounting ) {\n\t\t\tprice = accounting.formatMoney( price, {\n\t\t\t\tsymbol: yith_wcan_shortcodes.currency_format?.symbol,\n\t\t\t\tdecimal: yith_wcan_shortcodes.currency_format?.decimal,\n\t\t\t\tthousand: yith_wcan_shortcodes.currency_format?.thousand,\n\t\t\t\tprecision: 0,\n\t\t\t\tformat: yith_wcan_shortcodes.currency_format?.format,\n\t\t\t} );\n\t\t}\n\n\t\treturn price;\n\t}\n\n\t// utility that merges together sets of filter properties\n\tmergeProperties( set1, set2, $filter ) {\n\t\t// search for common properties\n\t\tfor ( const prop in set2 ) {\n\t\t\tif ( ! set2.hasOwnProperty( prop ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !! set1[ prop ] ) {\n\t\t\t\tswitch ( prop ) {\n\t\t\t\t\tcase 'rating_filter':\n\t\t\t\t\tcase 'min_price':\n\t\t\t\t\tcase 'max_price':\n\t\t\t\t\tcase 'onsale_filter':\n\t\t\t\t\tcase 'instock_filter':\n\t\t\t\t\tcase 'orderby':\n\t\t\t\t\t\t// just override default value\n\t\t\t\t\t\tset1[ prop ] = set2[ prop ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif ( 0 === prop.indexOf( 'query_type_' ) ) {\n\t\t\t\t\t\t\t// query_type param\n\t\t\t\t\t\t\tset1[ prop ] = set2[ prop ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// we're dealing with taxonomy\n\t\t\t\t\t\t\tconst isAttr = 0 === prop.indexOf( 'filter_' ),\n\t\t\t\t\t\t\t\tglue = isAttr ? ',' : '+';\n\n\t\t\t\t\t\t\tlet newValue =\n\t\t\t\t\t\t\t\tset1[ prop ].replace( ',', glue ) +\n\t\t\t\t\t\t\t\tglue +\n\t\t\t\t\t\t\t\tset2[ prop ].replace( ',', glue );\n\n\t\t\t\t\t\t\tnewValue = newValue\n\t\t\t\t\t\t\t\t.split( glue )\n\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t( value, index, arr ) =>\n\t\t\t\t\t\t\t\t\t\tarr.indexOf( value ) === index\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.join( glue );\n\n\t\t\t\t\t\t\tset1[ prop ] = newValue;\n\n\t\t\t\t\t\t\tif ( isAttr ) {\n\t\t\t\t\t\t\t\tconst queryTypeParam = prop.replace(\n\t\t\t\t\t\t\t\t\t'filter_',\n\t\t\t\t\t\t\t\t\t'query_type_'\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tset1[ queryTypeParam ] = 'and';\n\t\t\t\t\t\t\t\tset2[ queryTypeParam ] = 'and';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdelete set2[ prop ];\n\t\t\t}\n\t\t}\n\n\t\t$.extend( set1, set2 );\n\n\t\treturn set1;\n\t}\n}\n","'use strict';\n\n/* global globalThis, jQuery, yith_wcan_shortcodes, accounting */\n\nimport YITH_WCAN_Filter from './modules/yith-wcan-filter';\nimport YITH_WCAN_Reset_Button from './modules/yith-wcan-reset-button';\nimport YITH_WCAN_Preset from './modules/yith-wcan-preset';\n\njQuery( function ( $ ) {\n\t$( document )\n\t\t.on(\n\t\t\t'yith_wcan_init_shortcodes yith_plugin_fw_gutenberg_success_do_shortcode',\n\t\t\tfunction () {\n\t\t\t\t$( '.yith-wcan-filters' )\n\t\t\t\t\t.not( '.enhanced' )\n\t\t\t\t\t.each( function () {\n\t\t\t\t\t\tnew YITH_WCAN_Preset( $( this ) );\n\t\t\t\t\t} );\n\n\t\t\t\t$( '.yith-wcan-reset-filters' )\n\t\t\t\t\t.not( '.enhanced' )\n\t\t\t\t\t.each( function () {\n\t\t\t\t\t\tnew YITH_WCAN_Reset_Button( $( this ) );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t)\n\t\t.trigger( 'yith_wcan_init_shortcodes' );\n\n\tglobalThis.product_filter = new YITH_WCAN_Filter();\n} );\n"],"sourceRoot":""}
assets/js/yith-wcan-shortcodes.min.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e=jQuery,t=e("body");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var l=function(){function l(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),n(this,"xhr",null),n(this,"doingAjax",!1),n(this,"originalSearch",location.search),n(this,"initialized",!1),n(this,"filtered",!1),this.initPopState(),this.initialized=!0}var r,s,o;return r=l,(s=[{key:"initPopState",value:function(){yith_wcan_shortcodes.reload_on_back&&(this.pushUrlToHistory(window.location,document.title,null,!0),e(window).on("popstate",(function(){var e;null!==(e=window.history.state)&&void 0!==e&&e._yithWcan&&window.location.reload(!0)})))}},{key:"doFilter",value:function(t,i,a){var n,l,r=this,s=e(i||"body");return(l=e(document).triggerHandler("yith_wcan_filters_parameters",[t]))&&(t=l),s&&this.block(s),n=this.buildUrl(t),yith_wcan_shortcodes.ajax_filters?(this.doingAjax=!0,this._doAjax(n).done((function(e){n=r.searchAlternativeUrl(e,n),r._beforeFilter(e,t),r.refreshFragments(i,a,e),r.pushUrlToHistory(n,e.pageTitle,t),r.originalSearch=location.search,s&&r.unblock(s),r._afterFilter(e,t),r.doingAjax=!1}))):(this.pushUrlToHistory(n,document.title,t),void(window.location=n))}},{key:"_beforeFilter",value:function(t,i){e(document).trigger("yith-wcan-ajax-loading",[t,i])}},{key:"_afterFilter",value:function(i,a){e(".woocommerce-ordering").on("change","select.orderby",(function(){e(this).closest("form").submit()})),this.filtered=a&&!!Object.keys(a).length,this.filtered?t.addClass("filtered"):t.removeClass("filtered"),e(window).trigger("scroll"),e(document).trigger("yith-wcan-ajax-filtered",[i,a]).trigger("yith_wcwl_reload_fragments")}},{key:"buildUrl",value:function(t){var a,n=this,l=yith_wcan_shortcodes.query_param,r={},s=window.location,o=yith_wcan_shortcodes.base_url?yith_wcan_shortcodes.base_url:(null==s?void 0:s.origin)+(null==s?void 0:s.pathname),c=this,h="object"===i(t)&&Object.keys(t).length;if(yith_wcan_shortcodes.session_param&&(o=o.replace(new RegExp("/"+yith_wcan_shortcodes.session_param+"/[^/]*/"),"")),h&&(r[l]=1),this.originalSearch){var d=this.originalSearch.replace("?","").split("&").reduce((function(e,t){var i=t.split("=");if(2===i.length){if(n.isFilterParam(i[0]))return e;e[i[0]]=i[1]}return e}),{});r=e.extend(r,d)}return h&&(r=e.extend(r,t)),(a=Object.keys(r).reduce((function(e,t){var i=r[t];return i&&t?e+=c._cleanParam(t)+"="+c._cleanParam(i)+"&":e}),"?").replace(/&$/g,"").replace(/%2B/g,"+").replace(/%2C/g,",")).length>1&&(o+=a),o}},{key:"searchAlternativeUrl",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=i;return-1===e.indexOf("yith_wcan:sharing_url")?a:a=(t=e.match(/<meta name="yith_wcan:sharing_url" content="([^"]*)">/))&&1 in t?t[1]:a}},{key:"pushUrlToHistory",value:function(e,t,i,a){if(yith_wcan_shortcodes.change_browser_url&&!navigator.userAgent.match(/msie/i)){var n="pushState";a&&(n="replaceState"),window.history[n]({_yithWcan:!0,pageTitle:t,filters:i},"",e)}}},{key:"refreshFragments",value:function(t,i,a){var n=document.createElement("html"),l=e(n);if(n.innerHTML=a,t){var r,s=e(i),o=e(t);s.length&&(r=l.find(i)).length&&s.replaceWith(r.first()),o.length&&(r=l.find(t)).length&&o.replaceWith(r.first())}else{var c=e(yith_wcan_shortcodes.content);c.length?c.replaceWith(l.find(yith_wcan_shortcodes.content)):e("body").replaceWith(l.find("body"))}e(document).trigger("yith_wcan_init_shortcodes")}},{key:"_cleanParam",value:function(e){var t,i;return null===(t=yith_wcan_shortcodes)||void 0===t||!t.process_sanitize||null!==(i=yith_wcan_shortcodes)&&void 0!==i&&i.skip_sanitize?e:encodeURIComponent(e)}},{key:"_doAjax",value:function(t,i){return this.xhr&&this.xhr.abort(),i=e.extend({url:t,headers:{"X-YITH-WCAN":1}},i),this.xhr=e.ajax(i),this.xhr}},{key:"block",value:function(t){var i;if(void 0!==e.fn.block){var a="#fff center center no-repeat";null!==(i=yith_wcan_shortcodes)&&void 0!==i&&i.loader&&(a="url('".concat(yith_wcan_shortcodes.loader,"') ").concat(a)),t.block({message:null,overlayCSS:{background:a,opacity:.7}})}}},{key:"unblock",value:function(t){void 0!==e.fn.unblock&&t.unblock()}},{key:"isFilterParam",value:function(t){var i,a=["rating_filter","min_price","max_price","price_ranges","onsale_filter","instock_filter","featured_filter","orderby","product-page",yith_wcan_shortcodes.query_param];return(i=e(document).triggerHandler("yith_wcan_supported_filters_parameters",[a]))&&(a=i),-1!==(a=a.concat(yith_wcan_shortcodes.supported_taxonomies.map((function(e){return e.replace("pa_","filter_")})))).indexOf(t)||-1!==t.indexOf("filter_")||-1!==t.indexOf("query_type_")}}])&&a(r.prototype,s),o&&a(r,o),l}();var r=function t(i){var a,n,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l=null,(n="$reset")in(a=this)?Object.defineProperty(a,n,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[n]=l,this.$reset=i,this.$reset.on("click",(function(t){t.preventDefault(),e(".yith-wcan-filters").each((function(){var t=e(this).data("preset");t.deactivateAllFilters(!0),t.closeModal()}))})),this.$reset.data("reset",this).addClass("enhanced")};function s(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,l=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=new Array(t);i<t;i++)a[i]=e[i];return a}function c(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function h(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var d=function(){function t(i,a){var n,l,r,s;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"$originalSelect",null),h(this,"$_main",null),h(this,"$_label",null),h(this,"$_dropdown",null),h(this,"$_search",null),h(this,"$_showMore",null),h(this,"$_items",null),h(this,"currentPage",1),h(this,"options",{}),this.$originalSelect=i,this.$originalSelect.is("select")){var o=this.$originalSelect.data("per_page"),c=this.$originalSelect.data("order"),d=this.$originalSelect.data("all-label"),u={showSearch:this.$originalSelect.data("show_search"),paginate:this.$originalSelect.data("paginate"),perPage:o||10,order:c||"ASC",getElements:null,labels:{emptyLabel:d||(null===(n=yith_wcan_shortcodes.labels)||void 0===n?void 0:n.empty_option),searchPlaceholder:null===(l=yith_wcan_shortcodes.labels)||void 0===l?void 0:l.search_placeholder,noItemsFound:null===(r=yith_wcan_shortcodes.labels)||void 0===r?void 0:r.no_items,showMore:null===(s=yith_wcan_shortcodes.labels)||void 0===s?void 0:s.show_more}};this.options=e.extend(u,a),this._hideSelect(),this._initTemplate(),this._initActions(),this.$originalSelect.data("dropdown",this).addClass("enhanced")}}var i,a,n;return i=t,(a=[{key:"_hideSelect",value:function(){this.$originalSelect.hide()}},{key:"_initTemplate",value:function(){var t=e("<div/>",{class:"yith-wcan-dropdown closed"}),i=e("<div/>",{class:"dropdown-label",html:this.getLabel()}),a=e("<div>",{class:"dropdown-wrapper"}),n=e("<ul/>",{class:"matching-items filter-items"});a.append(n),t.append(i).append(a),this.options.showSearch&&this._initSearchTemplate(a),this.options.paginate&&this._initShowMoreTemplate(a),this.$originalSelect.after(t),this.$_main=t,this.$_label=i,this.$_dropdown=a,this.$_items=n}},{key:"_initSearchTemplate",value:function(t){var i=e("<div/>",{class:"search-field-container"}),a=e("<input/>",{name:"s",class:"search-field",autocomplete:"off",type:"search",placeholder:this.options.labels.searchPlaceholder});i.append(a).prependTo(t),this.$_search=a}},{key:"_initShowMoreTemplate",value:function(t){var i,a=e("<a/>",{class:"show-more",text:null===(i=this.options.labels.showMore)||void 0===i?void 0:i.replace("%d",this.options.perPage)});a.on("click",this.loadNextPage.bind(this)).hide(),t.append(a),this.$_showMore=a}},{key:"_initActions",value:function(){var t,i,a=this;null===(t=this.$_main)||void 0===t||t.on("click",(function(e){e.stopPropagation(),a.toggleDropdown()})),this.$_dropdown.on("click",(function(e){e.stopPropagation()})),null===(i=this.$_search)||void 0===i||i.on("keyup search",(function(){a._populateItems()})),this.$_items.on("change",":input",(function(){var t,i=e(this).closest("li"),n=i.data("value");if(i.hasClass("disabled")&&!a.isValueSelected(n))return!1;i.toggleClass("active"),t=i.hasClass("active"),a._changeItemStatus(n,t)})),this.$_items.on("click","li:not(.checkbox) a",(function(t){var i,n=e(this).closest("li"),l=n.data("value");if(t.preventDefault(),n.hasClass("disabled")&&!a.isValueSelected(l))return!1;n.toggleClass("active"),(i=n.hasClass("active"))&&n.siblings().removeClass("active"),a._changeItemStatus(l,i)})),this.$_items.on("click","label > a",(function(t){var i=e(this).parent().find(":input");t.preventDefault(),(i.is('[type="radio"]')||i.is('[type="checkbox"]'))&&i.prop("checked",!i.prop("checked")),i.change()})),this.$originalSelect.on("change",(function(t,i){i||(a.$_items.find("li").each((function(){var t=e(this).data("value");a.isValueSelected(t)?a._selectItem(t):a._deselectItem(t)})),a.updateLabel())})),null!==globalThis&&void 0!==globalThis&&globalThis.yith_wcan_dropdown_init||(e(document).on("click",this._closeAllDropdowns),globalThis.yith_wcan_dropdown_init=!0)}},{key:"openDropdown",value:function(){var e;null===(e=this.$_main)||void 0===e||e.addClass("open").removeClass("closed"),this._afterDropdownOpen()}},{key:"closeDropdown",value:function(){var e;null===(e=this.$_main)||void 0===e||e.removeClass("open").addClass("closed")}},{key:"_closeAllDropdowns",value:function(){e(document).find("select.enhanced").filter((function(t,i){return!!e(i).data("dropdown")})).each((function(){e(this).data("dropdown").closeDropdown()}))}},{key:"_closeOtherDropdowns",value:function(){var t=this;e(document).find("select.enhanced").filter((function(i,a){var n=e(a);return!!n.data("dropdown")&&!n.is(t.$originalSelect)})).each((function(){e(this).data("dropdown").closeDropdown()}))}},{key:"toggleDropdown",value:function(){var e,t;null===(e=this.$_main)||void 0===e||e.toggleClass("open").toggleClass("closed"),null!==(t=this.$_main)&&void 0!==t&&t.hasClass("open")&&this._afterDropdownOpen()}},{key:"_afterDropdownOpen",value:function(){var e;this._closeOtherDropdowns(),null!==(e=this.$_search)&&void 0!==e&&e.length&&this.$_search.val(""),this._populateItems()}},{key:"getMatchingElements",value:function(t,i){var a=this,n=[],l=this.getOptions();return new Promise((function(r){l.each((function(){var i=e(this),a=i.val(),l=i.html(),r=new RegExp(".*"+t+".*","i");(!t||r.test(a)||r.test(l))&&n.push({value:a,label:l})})),a.options.getElements?a.options.getElements(t).then((function(t){t&&(t=t.reduce((function(e,t,i){return e.push({label:i,value:t}),e}),[]),n=e.extend(n,t)),r(a._formatItems(n,i))})):r(a._formatItems(n,i))}))}},{key:"_formatItems",value:function(e,t){var i=this,a=[],n=!1;return e.filter((function(e){return-1===a.indexOf(e.value)&&(a.push(e.value),!0)})).sort((function(e,t){var a="ASC"===i.options.order?1:-1;return e.value<t.value?-1*a:e.value>t.value?a:0})),t&&(n=t<Object.keys(e).length,e=e.slice(0,t)),{items:e,hasMore:n}}},{key:"_generateItem",value:function(t,i){var a,n=this.isValueSelected(t),l=this.getOptionByValue(t),r=e("<li/>",{"data-value":t,class:l.length?l.attr("class"):""});if(l.length){var s=l.data("template"),o=l.data("count");i=s||i,o&&(i+=o)}if(a=e("<a/>",{href:l.length?l.data("filter_url"):"#",html:i,rel:"nofollow","data-title":l.length?l.data("title"):""}),this.$originalSelect.prop("multiple")){var c=e("<input/>",{type:"checkbox",value:t}),h=e("<label>");c.prop("checked",n),h.prepend(c).append(a),r.append(h).addClass("checkbox")}else r.append(a);return n?r.addClass("active"):r.removeClass("active"),r}},{key:"_populateItems",value:function(t){var i,a,n=this,l=null!==(i=this.$_search)&&void 0!==i&&i.length?this.$_search.val():"",r=this.options.paginate?this.options.perPage:0;a=(t=t?parseInt(t):1)*r,this.getMatchingElements(l,a).then((function(i){var a=i.items,l=[],r=!1;if(n._emptyItems(),n._hideLoadMore(),a.length){var o,c=s(a);try{for(c.s();!(o=c.n()).done;){var h=o.value;""===h.value?l.unshift(n._generateItem(h.value,h.label)):l.push(n._generateItem(h.value,h.label))}}catch(e){c.e(e)}finally{c.f()}n.currentPage=t,r=i.hasMore}else l.push(e("<li/>",{text:n.options.labels.noItemsFound})),n.currentPage=1;n.$_items.append(l),n.$originalSelect.trigger("yith_wcan_dropdown_updated"),r&&n._showLoadMore()}))}},{key:"loadNextPage",value:function(){var e=this.currentPage+1;this._populateItems(e)}},{key:"_selectItem",value:function(e){return this._changeItemStatus(e,!0)}},{key:"_deselectItem",value:function(e){return this._changeItemStatus(e,!1)}},{key:"_changeItemStatus",value:function(e,t){var i=this.$originalSelect.find('option[value="'.concat(e,'"]'));return!!i.length&&(i.prop("selected",t),this.closeDropdown(),this.updateLabel(),this.$originalSelect.trigger("change",[!0]),!0)}},{key:"_emptyItems",value:function(){this.$_items.html("")}},{key:"_showLoadMore",value:function(){this.$_showMore.show()}},{key:"_hideLoadMore",value:function(){this.$_showMore.hide()}},{key:"getLabel",value:function(){return this.hasSelectedValues()?this.getSelectedLabels().join(", "):this.options.labels.emptyLabel}},{key:"updateLabel",value:function(){var e,t=this.getLabel();null===(e=this.$_label)||void 0===e||e.html(t)}},{key:"getOptions",value:function(){return this.$originalSelect.find("option")}},{key:"hasSelectedValues",value:function(){return this.getSelectedOptions().length}},{key:"isValueSelected",value:function(e){return-1!==this.getSelectedValues().indexOf(e.toString())}},{key:"getSelectedOptions",value:function(){return this.$originalSelect.find("option").filter(":selected")}},{key:"getOptionByValue",value:function(e){return this.$originalSelect.find('option[value="'.concat(e,'"]'))}},{key:"getSelectedLabels",value:function(){var t=[];return this.getSelectedOptions().each((function(){var i=e(this),a=i.data("template");a=a||i.html().replace(/\([0-9]*\)/,""),t.push(a)})),t}},{key:"getSelectedValues",value:function(){var t=[];return this.getSelectedOptions().each((function(){t.push(e(this).val())})),t}},{key:"destroy",value:function(){}}])&&c(i.prototype,a),n&&c(i,n),t}();function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function p(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var v=function(){function t(i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,"preset",!1),p(this,"$preset",!1),p(this,"target",!1),p(this,"$target",!1),p(this,"$filters",!1),p(this,"$filterButtons",!1),p(this,"modalElements",{}),p(this,"activeFilters",!1),p(this,"isMobile",!1),p(this,"sliderTimeout",!1),p(this,"originalFilters",null),p(this,"dirty",!1),this.preset="#"+i.attr("id"),this.$preset=i,this.target=this.$preset.data("target"),this.$target=!!this.target&&e(this.target),this._regiterStatus(),this._initFilterButton(),this._initResponsive(),this._initFilters(),this._initActions(),this.$preset.data("preset",this).addClass("enhanced").trigger("yith_wcan_preset_initialized",[this])}var i,a,n;return i=t,(a=[{key:"_initFilters",value:function(){var t=this;this.getFilters().each((function(){var i=e(this);t._initFilter(i)})),this.maybeShowClearAllFilters()}},{key:"_initFilterButton",value:function(){var e=this;this.$filterButtons=this.$preset.find(".apply-filters"),this.$filterButtons.length&&this.$filterButtons.on("click",(function(t){t.preventDefault(),e.filter()})).hide()}},{key:"_initActions",value:function(){this.$preset.find("form").on("submit",(function(e){e.preventDefault()}))}},{key:"_initResponsive",value:function(){var t=this;if(yith_wcan_shortcodes.modal_on_mobile){var i=window.matchMedia("(max-width: ".concat(yith_wcan_shortcodes.mobile_media_query,"px)"));e(window).on("resize",(function(){var e=!!i.matches;e!==t.isMobile&&(t.isMobile=e,t._afterLayoutChange())})).resize()}}},{key:"_initFilter",value:function(t){var i,a=this,n=function(i){var n=e(this),l=n.closest(".yith-wcan-filter"),r=!!l.length&&"yes"===l.data("multiple"),s=n.closest(".filter-item"),o=s.length?l.find(".filter-item").not(s):[];if(s.is(".disabled")&&!s.is(".active"))return i.preventDefault(),!1;i.preventDefault(),o.length&&!r&&o.removeClass("active").children("label").find(":input").prop("checked",!1).parent(".checked").removeClass("checked"),s.length&&s.toggleClass("active"),a.activeFilters=!1,a.maybeFilter(t),a.maybeToggleClearAllFilters(),a.maybeToggleClearFilter(l)};t.find(".filter-item").not(".checkbox").not(".radio").on("click","a",(function(t){var i=e(this).closest(".filter-item");if(!e(null==t?void 0:t.delegateTarget).is(i))return!1;n.call(this,t)})),t.find(":input").on("change",(function(t){var i=e(this),a=i.closest(".filter-item");if(a.is(".disabled")&&!a.is(".active"))return i.prop("checked",!1),!1;n.call(this,t)})),t.find("label > a").on("click",(function(t){var i=e(this),a=i.closest(".filter-item");if(t.preventDefault(),a.is(".disabled")&&!a.is(".active"))return!1;var n=i.parent().find(":input");(n.is('[type="radio"]')||n.is('[type="checkbox"]'))&&n.prop("checked",!n.prop("checked")),n.change()})),this._initTooltip(t),this._initPriceSlider(t),this._initDropdown(t),this._initCollapsable(t),this.maybeShowClearFilter(t),null!==(i=this.$preset)&&void 0!==i&&i.hasClass("custom-style")&&(this._initCustomInput(t),t.on("yith_wcan_dropdown_updated",(function(){var t=e(this).closest(".yith-wcan-filter");a._initCustomInput(t)})))}},{key:"_initTooltip",value:function(t,i){t.find("[data-title]").each((function(){var t=e(this);!t.hasClass("tooltip-added")&&t.data("title")&&(t.on("mouseenter",(function(){var t,a=e(this),n=null,l=a.outerWidth(),r=0;if(!i||"top"!==i&&"right"!==i){var s=a.closest(".filter-item");i=s.hasClass("color")||s.hasClass("label")?"top":"right"}n=e("<span>",{class:"yith-wcan-tooltip",html:a.data("title")}),a.append(n),t=n.outerWidth()+6,n.outerWidth(t),r="top"===i?(l-t)/2:l+15,n.css({left:r.toFixed(0)+"px"}).fadeIn(200),a.addClass("with-tooltip")})).on("mouseleave",(function(){var t=e(this);t.find(".yith-wcan-tooltip").fadeOut(200,(function(){t.removeClass("with-tooltip").find(".yith-wcan-tooltip").remove()}))})),t.addClass("tooltip-added"))}))}},{key:"_initDropdown",value:function(t){var i=t.find("select.filter-dropdown");i.length&&(i.hasClass("select2-hidden-accessible")&&void 0!==e.fn.selectWoo&&i.selectWoo("destroy"),this._initDropdownObject(i,{paginate:!0,perPage:yith_wcan_shortcodes.terms_per_page}))}},{key:"_initDropdownObject",value:function(e,t){return new d(e,t)}},{key:"_initPriceSlider",value:function(e){var t=this;if(e.hasClass("filter-price-slider")){var i=this,a=e.find(".price-slider"),n=a.find(".price-slider-min"),l=a.find(".price-slider-max"),r=parseFloat(a.data("min")),s=parseFloat(a.data("max")),o=parseFloat(n.val()),c=parseFloat(l.val()),h=parseFloat(a.data("step")),d=function(){i.sliderTimeout&&clearTimeout(i.sliderTimeout),i.sliderTimeout=setTimeout((function(){i.maybeFilter(e)}),200)};e.find(".price-slider-ui").ionRangeSlider({skin:"round",type:"double",min:r,max:s,step:h,from:o,to:c,min_interval:h,values_separator:" - ",prettify:function(e){return t.formatPrice(e)},onChange:function(e){n.val(e.from),l.val(e.to)},onFinish:d}),n.add(l).off("change").on("keyup",(function(){n.val()&&l.val()&&d()}))}}},{key:"_initCollapsable",value:function(e){this._initTitleCollapsable(e),this._initHierarchyCollapsable(e)}},{key:"_initTitleCollapsable",value:function(e){var t=e.find(".collapsable");t.length&&this._initToggle(t,t,e.find(".filter-content"))}},{key:"_initHierarchyCollapsable",value:function(t){var i=t.find(".hierarchy-collapsable");if(i.length){var a=this,n=t.find(".active");n.length&&(n.parents(".hierarchy-collapsable").removeClass("closed").addClass("opened"),n.hasClass("hierarchy-collapsable")&&yith_wcan_shortcodes.show_current_children&&n.removeClass("closed").addClass("opened")),i.each((function(){var t=e(this),i=e("<span/>",{class:"toggle-handle"});i.appendTo(t),a._initToggle(i,t,t.children("ul.filter-items"))}))}}},{key:"_initToggle",value:function(e,t,i){t.hasClass("closed")&&i.hide(),e.off("click").on("click",(function(e){e.stopPropagation(),e.preventDefault(),i.slideToggle(400,(function(){t.toggleClass("opened").toggleClass("closed")}))}))}},{key:"_initCustomInput",value:function(t){t.find(":input").each((function(){var t,i=e(this),a=i.attr("type"),n="".concat(a,"button");"checkbox"!==a&&"radio"!==a||i.closest(".".concat(n)).length||(i.is(":checked")&&(n+=" checked"),t=e("<span/>",{class:n}),i.wrap(t).on("change",(function(){var t=e(this);t.prop("checked")?t.parent().addClass("checked"):t.parent().removeClass("checked")})))}))}},{key:"_regiterStatus",value:function(){this.originalFilters=this.getFiltersProperties()}},{key:"_afterLayoutChange",value:function(){var t,i;this.isMobile?(this.$preset.addClass("filters-modal").attr("role","dialog").attr("tabindex","-1").hide(),this._addCloseModalButton(),this._addApplyFiltersModalButton(),this._switchToCollapsables(),null===(t=this.$filterButtons)||void 0===t||t.hide()):(this.$preset.removeClass("filters-modal").removeClass("open").removeAttr("role").removeAttr("tabindex").show(),e("body").css("overflow","auto").removeClass("yith-wcan-preset-modal-open"),this._removeCloseModalButton(),this._removeApplyFiltersModalButton(),this._switchBackCollapsables(),null===(i=this.$filterButtons)||void 0===i||i.show())}},{key:"_addCloseModalButton",value:function(){var t=e("<a/>",{class:"close-button",html:"&times;","data-dismiss":"modal","aria-label":yith_wcan_shortcodes.labels.close});t.prependTo(this.$preset).on("click",this.closeModal.bind(this)),this.modalElements.closeButton=t}},{key:"_removeCloseModalButton",value:function(){var e,t;null===(e=this.modalElements)||void 0===e||null===(t=e.closeButton)||void 0===t||t.remove()}},{key:"_addApplyFiltersModalButton",value:function(){var t=this,i=e("<button/>",{class:"apply-filters main-modal-button",html:yith_wcan_shortcodes.labels.show_results,"data-dismiss":"modal"});i.appendTo(this.$preset).on("click",(function(){t.filter(),t.closeModal()})),this.modalElements.applyFiltersButton=i}},{key:"_removeApplyFiltersModalButton",value:function(){var e,t;null===(e=this.modalElements)||void 0===e||null===(t=e.applyFiltersButton)||void 0===t||t.remove()}},{key:"_switchToCollapsables",value:function(){var t=this;this.getFilters().each((function(){var i=e(this),a=i.find(".filter-title");a.length&&!a.hasClass("collapsable")&&(a.addClass("collapsable").data("disable-collapse",!0),t._initTitleCollapsable(i))}))}},{key:"_switchBackCollapsables",value:function(){this.getFilters().each((function(){var t=e(this),i=t.find(".filter-title");i.length&&i.hasClass("collapsable")&&i.data("disable-collapse")&&(i.removeClass("collapsable").removeData("disable-collapse",!0).off("click"),t.find(".filter-content").show())}))}},{key:"_openAllCollapsables",value:function(){var t=this;this.$filters.not(".no-title").not((function(i,a){return t.isFilterActive(e(a))})).find(".filter-content").show().end().find(".filter-title").removeClass("closed").addClass("opened")}},{key:"_closeAllCollapsables",value:function(){var t=this;this.$filters.not(".no-title").not((function(i,a){return t.isFilterActive(e(a))})).find(".filter-content").hide().end().find(".filter-title").addClass("closed").removeClass("opened")}},{key:"maybeRegisterStatusChange",value:function(){var e=this.getFiltersProperties(),t=JSON.stringify(e),i=JSON.stringify(this.originalFilters);this.dirty=t!==i}},{key:"maybeFilter",value:function(e){if(this.maybeRegisterStatusChange(),yith_wcan_shortcodes.instant_filters&&!this.isMobile)this.filter();else if(yith_wcan_shortcodes.instant_filters||this.isMobile){if(this.isMobile&&this.dirty){var t;this.$preset.addClass("with-filter-button"),null===(t=this.modalElements.applyFiltersButton)||void 0===t||t.show()}}else{var i,a;this.dirty?null===(i=this.$filterButtons)||void 0===i||i.show():null===(a=this.$filterButtons)||void 0===a||a.hide()}}},{key:"filter",value:function(){var t,i,a,n=this,l=null===(t=window)||void 0===t?void 0:t.product_filter;null==l||null===(i=l.doFilter(this.getFiltersProperties(),this.target,this.preset))||void 0===i||i.done((function(){var t=e(n.preset);if(t.length&&yith_wcan_shortcodes.scroll_top){var i=t.offset().top;if(yith_wcan_shortcodes.scroll_target){var a=e(yith_wcan_shortcodes.scroll_target);i=a.length?a.offset().top:i}else n.isMobile&&(i=100);e("body, html").animate({scrollTop:i-100})}n.originalFilters=n.getFiltersProperties(),n.dirty=!1})),this.isMobile&&(this.$preset.removeClass("with-filter-button"),null===(a=this.modalElements.applyFiltersButton)||void 0===a||a.hide(),this.closeModal())}},{key:"getFilters",value:function(){return!1===this.$filters&&(this.$filters=this.$preset.find(".yith-wcan-filter")),this.$filters}},{key:"getActiveFilters",value:function(){return!1===this.activeFilters&&(this.activeFilters=this.getFiltersProperties()),this.activeFilters}},{key:"isAnyFilterActive",value:function(){return!!Object.keys(this.getActiveFilters()).length}},{key:"isFilterActive",value:function(e){var t,i;switch(e.data("filter-type")){case"tax":case"review":case"price_range":var a=e.find(".filter-dropdown");if(a.length){var n=a.val();t="object"===u(n)?!(null==n||!n.length):!!n;break}case"stock_sale":t=e.find(".filter-item").filter(".active").length;break;case"price_slider":var l=parseFloat(e.find(".price-slider").data("step")),r=parseFloat(e.find(".price-slider").data("min")),s=parseFloat(e.find(".price-slider").data("max")),o=parseFloat(e.find(".price-slider-min").val()),c=parseFloat(e.find(".price-slider-max").val());t=Math.abs(o-r)>=l||Math.abs(c-s)>=l;break;case"orderby":t="menu_order"!==e.find(".filter-order-by").val();break;default:t=!1}return t=void 0!==(i=e.triggerHandler("yith_wcan_is_filter_active",[t,this]))?i:t}},{key:"countActiveItems",value:function(e){var t;switch(e.data("filter-type")){case"tax":case"review":case"price_range":var i=e.find(".filter-dropdown");if(i.length){var a=i.val();t="object"===u(a)?null==a?void 0:a.length:+!!a;break}case"stock_sale":t=e.find(".filter-items").find(".active").length;break;case"orderby":this.isFilterActive(e)&&(t=1);break;case"price_slider":default:t=0}return t}},{key:"getFilterProperties",value:function(t){var i,a,n=t.data("filter-type"),l="yes"===t.data("multiple"),r=t.find(".filter-dropdown"),s={};switch(n){case"tax":var o=[],c=t.data("taxonomy"),h=0===c.indexOf("filter"),d=t.data("relation");if(r.length?l?o=r.val():o.push(r.val()):o=(a=t.find(".filter-item").filter(".active").children("a, label")).get().reduce((function(t,i){var a;return(a=(i=e(i)).is("label")?i.find(":input").val():i.data("term-slug"))?(t.push(a),t):t}),o),l){var u=h||"and"!==d?",":"+";s[c]=o.join(u)}else s[c]=o.pop();h&&(s[c.replace("filter_","query_type_")]=d);break;case"review":r.length?s.rating_filter=r.val():(a=t.find(".filter-item").filter(".active").children("a, label"),l?s.rating_filter=a.get().reduce((function(t,i){var a;return(a=(i=e(i)).is("label")?i.find(":input").val():i.data("rating"))?(t.push(a),t):t}),[]).join(","):(a=a.first(),s.rating_filter=a.is("label")?a.find(":input").val():a.data("rating")));break;case"price_range":r.length?l?s.price_ranges=r.val().join(","):(s.min_price=r.val().split("-")[0],s.max_price=r.val().split("-")[1]):(a=t.find(".filter-item").filter(".active").children("a, label"),l?s.price_ranges=a.get().reduce((function(t,i){var a=e(i).data("range-min"),n=e(i).data("range-max");return t+=(n?"".concat(a,"-").concat(n):a)+","}),"").replace(/^(.*),$/,"$1"):(s.min_price=parseFloat(a.first().data("range-min")),s.max_price=parseFloat(a.first().data("range-max"))));break;case"price_slider":s.min_price=parseFloat(t.find(".price-slider-min").val()),s.max_price=parseFloat(t.find(".price-slider-max").val());break;case"stock_sale":t.find(".filter-on-sale").is(".active")&&(s.onsale_filter=1),t.find(".filter-in-stock").is(".active")&&(s.instock_filter=1),t.find(".filter-featured").is(".active")&&(s.featured_filter=1);break;case"orderby":s.orderby=t.find(".filter-order-by").val()}return s=void 0!==(i=t.triggerHandler("yith_wcan_filter_properties",[s,self]))?i:s}},{key:"getFiltersProperties",value:function(){var t={},i=this;return this.getFilters().each((function(){var a=e(this);if(i.isFilterActive(a)){var n=i.getFilterProperties(a);t=i.mergeProperties(t,n,a)}})),t}},{key:"getFiltersByProperties",value:function(t){var i=this;return this.getFilters().filter((function(){var a=e(this);if(i.isFilterActive(a)){var n=i.getFilterProperties(a),l=!1;for(var r in t){if(["min_price","max_price","price_ranges"].includes(r)&&(n.min_price||n.price_ranges)){l=!0;break}if(n[r]){l=!0;break}}return l}return!1}))}},{key:"maybeToggleClearFilter",value:function(e){this.isFilterActive(e)?this.maybeShowClearFilter(e):this.maybeHideClearFilter(e)}},{key:"maybeToggleClearAllFilters",value:function(){this.isAnyFilterActive()?this.maybeShowClearAllFilters():this.maybeHideClearAllFilters()}},{key:"maybeShowClearFilter",value:function(t){var i=this;this.isFilterActive(t)&&yith_wcan_shortcodes.show_clear_filter&&(t.find(".clear-selection").remove(),e("<a/>",{class:"clear-selection",text:yith_wcan_shortcodes.labels.clear_selection,role:"button"}).prependTo(t.find(".filter-content")).on("click",(function(e){e.preventDefault(),i.deactivateFilter(t,!1,yith_wcan_shortcodes.instant_filters),i.maybeHideClearFilter(t),yith_wcan_shortcodes.instant_filters&&i.closeModal()})))}},{key:"maybeShowClearAllFilters",value:function(){var t=this;this.isAnyFilterActive()&&this.isMobile&&(this.$preset.find(".clear-selection").remove(),e("<a/>",{class:"clear-selection",text:yith_wcan_shortcodes.labels.clear_all_selections,role:"button"}).prependTo(this.$preset.find(".filters-container")).on("click",(function(e){e.preventDefault(),t.deactivateAllFilters(yith_wcan_shortcodes.instant_filters),t.maybeHideClearAllFilters(),yith_wcan_shortcodes.instant_filters&&t.closeModal()})))}},{key:"maybeHideClearFilter",value:function(e){!this.isFilterActive(e)&&yith_wcan_shortcodes.show_clear_filter&&e.find(".clear-selection").remove()}},{key:"maybeHideClearAllFilters",value:function(){this.isAnyFilterActive()||this.$preset.find(".filters-container").children(".clear-selection").remove()}},{key:"deactivateFilter",value:function(t,i,a){var n=t.data("filter-type"),l=t.find(".filter-item"),r=l.filter(".active"),s=t.find(".filter-dropdown");switch(n){case"tax":var o=t.data("taxonomy");s.length?(i?s.find("option").each((function(){var t=e(this);t.val().toString()===i[o].toString()&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t=e(this),a=t.children("label"),n=t.children("a");(a.length?a.find(":input").val():n.data("term-slug")).toString()===i[o].toString()&&(t.children("label").children("a").click(),t.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"review":s.length?(i?s.find("option").each((function(){var t=e(this);t.val()===i.rating_filter&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t=e(this),a=t.children("label"),n=t.children("a");(a.length?a.find(":input").val():n.data("rating"))===i.rating_filter&&(t.children("label").children("a").click(),t.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"price_range":s.length?(i?s.find("option").each((function(){var t=e(this),a=i.min_price+(i.max_price?"-".concat(i.max_price):"");t.val()===a&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t,a,n=e(this),l=n.children("label"),r=n.children("a");a=l.length?l.find(":input").val():r.data("min_price")+(r.data("max_price")?"-"+r.data("max_price"):""),i.min_price?t=i.min_price+(i.max_price?"-"+i.max_price:""):i.price_ranges&&(t=i.price_ranges),a===t&&(n.children("label").children("a").click(),n.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"price_slider":var c=t.find(".price-slider");t.find(".price-slider-min").val(c.data("min")),t.find(".price-slider-max").val(c.data("max")).change();break;case"orderby":t.find("select").val("menu_order");break;case"stock_sale":i?(null!=i&&i.instock_filter&&t.find(".filter-in-stock").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active"),null!=i&&i.onsale_filter&&t.find(".filter-on-sale").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active"),null!=i&&i.featured_filter&&t.find(".filter-featured").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active")):(t.find(".filter-in-stock").find(":input").prop("checked",!1).change(),t.find(".filter-on-sale").find(":input").prop("checked",!1).change(),t.find(".filter-featured").find(":input").prop("checked",!1).change(),l.removeClass("active"));break;default:l.removeClass("active")}this.activeFilters=!1,a&&this.filter()}},{key:"deactivateAllFilters",value:function(t){var i=this;return this.getFilters().each((function(){var t=e(this);i.deactivateFilter(t)})),this.activeFilters=!1,t&&this.filter(),!0}},{key:"deactivateFilterByProperties",value:function(t,i){var a=this,n=this.getFiltersByProperties(t);return!!n.length&&(n.each((function(){var n=e(this);a.deactivateFilter(n,t,i)})),!0)}},{key:"openModal",value:function(){var t=this;this.isMobile&&(yith_wcan_shortcodes.toggles_open_on_modal?this._openAllCollapsables():this._closeAllCollapsables(),e("body").css("overflow","hidden").addClass("yith-wcan-preset-modal-open"),this.$preset.show(),setTimeout((function(){t.$preset.addClass("open")}),100))}},{key:"closeModal",value:function(){var t=this;this.isMobile&&(this.$preset.removeClass("open"),setTimeout((function(){t.$preset.hide(),e("body").css("overflow","auto").removeClass("yith-wcan-preset-modal-open")}),300))}},{key:"formatPrice",value:function(e){var t,i,a,n;return"undefined"!=typeof accounting&&(e=accounting.formatMoney(e,{symbol:null===(t=yith_wcan_shortcodes.currency_format)||void 0===t?void 0:t.symbol,decimal:null===(i=yith_wcan_shortcodes.currency_format)||void 0===i?void 0:i.decimal,thousand:null===(a=yith_wcan_shortcodes.currency_format)||void 0===a?void 0:a.thousand,precision:0,format:null===(n=yith_wcan_shortcodes.currency_format)||void 0===n?void 0:n.format})),e}},{key:"mergeProperties",value:function(t,i,a){for(var n in i)if(i.hasOwnProperty(n)&&t[n]){switch(n){case"rating_filter":case"min_price":case"max_price":case"onsale_filter":case"instock_filter":case"orderby":t[n]=i[n];break;default:if(0===n.indexOf("query_type_"))t[n]=i[n];else{var l=0===n.indexOf("filter_"),r=l?",":"+",s=t[n].replace(",",r)+r+i[n].replace(",",r);if(s=s.split(r).filter((function(e,t,i){return i.indexOf(e)===t})).join(r),t[n]=s,l){var o=n.replace("filter_","query_type_");t[o]="and",i[o]="and"}}}delete i[n]}return e.extend(t,i),t}}])&&f(i.prototype,a),n&&f(i,n),t}();jQuery((function(e){e(document).on("yith_wcan_init_shortcodes yith_plugin_fw_gutenberg_success_do_shortcode",(function(){e(".yith-wcan-filters").not(".enhanced").each((function(){new v(e(this))})),e(".yith-wcan-reset-filters").not(".enhanced").each((function(){new r(e(this))}))})).trigger("yith_wcan_init_shortcodes"),globalThis.product_filter=new l}))})();
1
+ (()=>{"use strict";var e=jQuery,t=e("body");function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var l=function(){function l(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),n(this,"xhr",null),n(this,"doingAjax",!1),n(this,"originalSearch",location.search),n(this,"initialized",!1),n(this,"filtered",!1),this.initPopState(),this.initialized=!0}var r,s,o;return r=l,(s=[{key:"initPopState",value:function(){yith_wcan_shortcodes.reload_on_back&&(this.pushUrlToHistory(window.location,document.title,null,!0),e(window).on("popstate",(function(){var e;null!==(e=window.history.state)&&void 0!==e&&e._yithWcan&&window.location.reload(!0)})))}},{key:"doFilter",value:function(t,i,a){var n,l,r=this,s=e(i||"body");return(l=e(document).triggerHandler("yith_wcan_filters_parameters",[t]))&&(t=l),s&&this.block(s),n=this.buildUrl(t),yith_wcan_shortcodes.ajax_filters?(this.doingAjax=!0,this._doAjax(n).done((function(e){n=r.searchAlternativeUrl(e,n),r._beforeFilter(e,t),r.refreshFragments(i,a,e),r.pushUrlToHistory(n,e.pageTitle,t),r.originalSearch=location.search,s&&r.unblock(s),r._afterFilter(e,t),r.doingAjax=!1}))):(this.pushUrlToHistory(n,document.title,t),void(window.location=n))}},{key:"_beforeFilter",value:function(t,i){e(document).trigger("yith-wcan-ajax-loading",[t,i])}},{key:"_afterFilter",value:function(i,a){e(".woocommerce-ordering").on("change","select.orderby",(function(){e(this).closest("form").submit()})),this.filtered=a&&!!Object.keys(a).length,this.filtered?t.addClass("filtered"):t.removeClass("filtered"),e(window).trigger("scroll"),e(document).trigger("yith-wcan-ajax-filtered",[i,a]).trigger("yith_wcwl_reload_fragments")}},{key:"buildUrl",value:function(t){var a,n=this,l=yith_wcan_shortcodes.query_param,r={},s=window.location,o=yith_wcan_shortcodes.base_url?yith_wcan_shortcodes.base_url:(null==s?void 0:s.origin)+(null==s?void 0:s.pathname),c=this,h="object"===i(t)&&Object.keys(t).length;if(yith_wcan_shortcodes.session_param&&(o=o.replace(new RegExp("/"+yith_wcan_shortcodes.session_param+"/[^/]*/"),"")),h&&(r[l]=1),this.originalSearch){var d=this.originalSearch.replace("?","").split("&").reduce((function(e,t){var i=t.split("=");if(2===i.length){if(n.isFilterParam(i[0]))return e;e[i[0]]=i[1]}return e}),{});r=e.extend(r,d)}return h&&(r=e.extend(r,t)),(a=Object.keys(r).reduce((function(e,t){var i=r[t];return i&&t?e+=c._cleanParam(t)+"="+c._cleanParam(i)+"&":e}),"?").replace(/&$/g,"").replace(/%2B/g,"+").replace(/%2C/g,",")).length>1&&(o+=a),o}},{key:"searchAlternativeUrl",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=i;return-1===e.indexOf("yith_wcan:sharing_url")?a:a=(t=e.match(/<meta name="yith_wcan:sharing_url" content="([^"]*)">/))&&1 in t?t[1]:a}},{key:"pushUrlToHistory",value:function(e,t,i,a){if(yith_wcan_shortcodes.change_browser_url&&!navigator.userAgent.match(/msie/i)){var n="pushState";a&&(n="replaceState"),window.history[n]({_yithWcan:!0,pageTitle:t,filters:i},"",e)}}},{key:"refreshFragments",value:function(t,i,a){var n=document.createElement("html"),l=e(n);if(n.innerHTML=a,t){var r,s=e(i),o=e(t);s.length&&(r=l.find(i)).length&&s.replaceWith(r.first()),o.length&&(r=l.find(t)).length&&o.replaceWith(r.first())}else{var c=e(yith_wcan_shortcodes.content);c.length?c.replaceWith(l.find(yith_wcan_shortcodes.content)):e("body").replaceWith(l.find("body"))}e(document).trigger("yith_wcan_init_shortcodes")}},{key:"_cleanParam",value:function(e){var t,i;return null===(t=yith_wcan_shortcodes)||void 0===t||!t.process_sanitize||null!==(i=yith_wcan_shortcodes)&&void 0!==i&&i.skip_sanitize?e:encodeURIComponent(e)}},{key:"_doAjax",value:function(t,i){return this.xhr&&this.xhr.abort(),i=e.extend({url:t,headers:{"X-YITH-WCAN":1}},i),this.xhr=e.ajax(i),this.xhr}},{key:"block",value:function(t){var i;if(void 0!==e.fn.block){var a="#fff center center no-repeat";null!==(i=yith_wcan_shortcodes)&&void 0!==i&&i.loader&&(a="url('".concat(yith_wcan_shortcodes.loader,"') ").concat(a)),t.block({message:null,overlayCSS:{background:a,opacity:.7}})}}},{key:"unblock",value:function(t){void 0!==e.fn.unblock&&t.unblock()}},{key:"isFilterParam",value:function(t){var i,a=["rating_filter","min_price","max_price","price_ranges","onsale_filter","instock_filter","featured_filter","orderby","product-page",yith_wcan_shortcodes.query_param];return(i=e(document).triggerHandler("yith_wcan_supported_filters_parameters",[a]))&&(a=i),-1!==(a=a.concat(yith_wcan_shortcodes.supported_taxonomies.map((function(e){return e.replace("pa_","filter_")})))).indexOf(t)||-1!==t.indexOf("filter_")||-1!==t.indexOf("query_type_")}}])&&a(r.prototype,s),o&&a(r,o),l}();var r=function t(i){var a,n,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),l=null,(n="$reset")in(a=this)?Object.defineProperty(a,n,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[n]=l,this.$reset=i,this.$reset.on("click",(function(t){t.preventDefault(),e(".yith-wcan-filters").each((function(){var t=e(this).data("preset");t.deactivateAllFilters(!0),t.closeModal()}))})),this.$reset.data("reset",this).addClass("enhanced")};function s(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,l=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw l}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=new Array(t);i<t;i++)a[i]=e[i];return a}function c(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function h(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var d=function(){function t(i,a){var n,l,r,s;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"$originalSelect",null),h(this,"$_main",null),h(this,"$_label",null),h(this,"$_dropdown",null),h(this,"$_search",null),h(this,"$_showMore",null),h(this,"$_items",null),h(this,"currentPage",1),h(this,"options",{}),this.$originalSelect=i,this.$originalSelect.is("select")){var o=this.$originalSelect.data("per_page"),c=this.$originalSelect.data("order"),d=this.$originalSelect.data("all-label"),u={showSearch:this.$originalSelect.data("show_search"),paginate:this.$originalSelect.data("paginate"),perPage:o||10,order:c||"ASC",getElements:null,labels:{emptyLabel:d||(null===(n=yith_wcan_shortcodes.labels)||void 0===n?void 0:n.empty_option),searchPlaceholder:null===(l=yith_wcan_shortcodes.labels)||void 0===l?void 0:l.search_placeholder,noItemsFound:null===(r=yith_wcan_shortcodes.labels)||void 0===r?void 0:r.no_items,showMore:null===(s=yith_wcan_shortcodes.labels)||void 0===s?void 0:s.show_more}};this.options=e.extend(u,a),this._hideSelect(),this._initTemplate(),this._initActions(),this.$originalSelect.data("dropdown",this).addClass("enhanced")}}var i,a,n;return i=t,(a=[{key:"_hideSelect",value:function(){this.$originalSelect.hide()}},{key:"_initTemplate",value:function(){var t=e("<div/>",{class:"yith-wcan-dropdown closed"}),i=e("<div/>",{class:"dropdown-label",html:this.getLabel()}),a=e("<div>",{class:"dropdown-wrapper"}),n=e("<ul/>",{class:"matching-items filter-items"});a.append(n),t.append(i).append(a),this.options.showSearch&&this._initSearchTemplate(a),this.options.paginate&&this._initShowMoreTemplate(a),this.$originalSelect.after(t),this.$_main=t,this.$_label=i,this.$_dropdown=a,this.$_items=n}},{key:"_initSearchTemplate",value:function(t){var i=e("<div/>",{class:"search-field-container"}),a=e("<input/>",{name:"s",class:"search-field",type:"search",placeholder:this.options.labels.searchPlaceholder}).attr("autocomplete","off");i.append(a).prependTo(t),this.$_search=a}},{key:"_initShowMoreTemplate",value:function(t){var i,a=e("<a/>",{class:"show-more",text:null===(i=this.options.labels.showMore)||void 0===i?void 0:i.replace("%d",this.options.perPage)});a.on("click",this.loadNextPage.bind(this)).hide(),t.append(a),this.$_showMore=a}},{key:"_initActions",value:function(){var t,i,a=this;null===(t=this.$_main)||void 0===t||t.on("click",(function(e){e.stopPropagation(),a.toggleDropdown()})),this.$_dropdown.on("click",(function(e){e.stopPropagation()})),null===(i=this.$_search)||void 0===i||i.on("keyup search",(function(){a._populateItems()})),this.$_items.on("change",":input",(function(){var t,i=e(this).closest("li"),n=i.data("value");if(i.hasClass("disabled")&&!a.isValueSelected(n))return!1;i.toggleClass("active"),t=i.hasClass("active"),a._changeItemStatus(n,t)})),this.$_items.on("click","li:not(.checkbox) a",(function(t){var i,n=e(this).closest("li"),l=n.data("value");if(t.preventDefault(),n.hasClass("disabled")&&!a.isValueSelected(l))return!1;n.toggleClass("active"),(i=n.hasClass("active"))&&n.siblings().removeClass("active"),a._changeItemStatus(l,i)})),this.$_items.on("click","label > a",(function(t){var i=e(this).parent().find(":input");t.preventDefault(),(i.is('[type="radio"]')||i.is('[type="checkbox"]'))&&i.prop("checked",!i.prop("checked")),i.change()})),this.$originalSelect.on("change",(function(t,i){i||(a.$_items.find("li").each((function(){var t=e(this).data("value");a.isValueSelected(t)?a._selectItem(t):a._deselectItem(t)})),a.updateLabel())})),null!==globalThis&&void 0!==globalThis&&globalThis.yith_wcan_dropdown_init||(e(document).on("click",this._closeAllDropdowns),globalThis.yith_wcan_dropdown_init=!0)}},{key:"openDropdown",value:function(){var e;null===(e=this.$_main)||void 0===e||e.addClass("open").removeClass("closed"),this._afterDropdownOpen()}},{key:"closeDropdown",value:function(){var e;null===(e=this.$_main)||void 0===e||e.removeClass("open").addClass("closed")}},{key:"_closeAllDropdowns",value:function(){e(document).find("select.enhanced").filter((function(t,i){return!!e(i).data("dropdown")})).each((function(){e(this).data("dropdown").closeDropdown()}))}},{key:"_closeOtherDropdowns",value:function(){var t=this;e(document).find("select.enhanced").filter((function(i,a){var n=e(a);return!!n.data("dropdown")&&!n.is(t.$originalSelect)})).each((function(){e(this).data("dropdown").closeDropdown()}))}},{key:"toggleDropdown",value:function(){var e,t;null===(e=this.$_main)||void 0===e||e.toggleClass("open").toggleClass("closed"),null!==(t=this.$_main)&&void 0!==t&&t.hasClass("open")&&this._afterDropdownOpen()}},{key:"_afterDropdownOpen",value:function(){var e;this._closeOtherDropdowns(),null!==(e=this.$_search)&&void 0!==e&&e.length&&this.$_search.val(""),this._populateItems()}},{key:"getMatchingElements",value:function(t,i){var a=this,n=[],l=this.getOptions();return new Promise((function(r){l.each((function(){var i=e(this),a=i.val(),l=i.html(),r=new RegExp(".*"+t+".*","i");(!t||r.test(a)||r.test(l))&&n.push({value:a,label:l})})),a.options.getElements?a.options.getElements(t).then((function(t){t&&(t=t.reduce((function(e,t,i){return e.push({label:i,value:t}),e}),[]),n=e.extend(n,t)),r(a._formatItems(n,i))})):r(a._formatItems(n,i))}))}},{key:"_formatItems",value:function(e,t){var i=this,a=[],n=!1;return e.filter((function(e){return-1===a.indexOf(e.value)&&(a.push(e.value),!0)})).sort((function(e,t){var a="ASC"===i.options.order?1:-1;return e.value<t.value?-1*a:e.value>t.value?a:0})),t&&(n=t<Object.keys(e).length,e=e.slice(0,t)),{items:e,hasMore:n}}},{key:"_generateItem",value:function(t,i){var a,n=this.isValueSelected(t),l=this.getOptionByValue(t),r=e("<li/>",{"data-value":t,class:l.length?l.attr("class"):""});if(l.length){var s=l.data("template"),o=l.data("count");i=s||i,o&&(i+=o)}if(a=e("<a/>",{href:l.length?l.data("filter_url"):"#",html:i,rel:"nofollow","data-title":l.length?l.data("title"):""}),this.$originalSelect.prop("multiple")){var c=e("<input/>",{type:"checkbox",value:t}),h=e("<label>");c.prop("checked",n),h.prepend(c).append(a),r.append(h).addClass("checkbox")}else r.append(a);return n?r.addClass("active"):r.removeClass("active"),r}},{key:"_populateItems",value:function(t){var i,a,n=this,l=null!==(i=this.$_search)&&void 0!==i&&i.length?this.$_search.val():"",r=this.options.paginate?this.options.perPage:0;a=(t=t?parseInt(t):1)*r,this.getMatchingElements(l,a).then((function(i){var a=i.items,l=[],r=!1;if(n._emptyItems(),n._hideLoadMore(),a.length){var o,c=s(a);try{for(c.s();!(o=c.n()).done;){var h=o.value;""===h.value?l.unshift(n._generateItem(h.value,h.label)):l.push(n._generateItem(h.value,h.label))}}catch(e){c.e(e)}finally{c.f()}n.currentPage=t,r=i.hasMore}else l.push(e("<li/>",{text:n.options.labels.noItemsFound})),n.currentPage=1;n.$_items.append(l),n.$originalSelect.trigger("yith_wcan_dropdown_updated"),r&&n._showLoadMore()}))}},{key:"loadNextPage",value:function(){var e=this.currentPage+1;this._populateItems(e)}},{key:"_selectItem",value:function(e){return this._changeItemStatus(e,!0)}},{key:"_deselectItem",value:function(e){return this._changeItemStatus(e,!1)}},{key:"_changeItemStatus",value:function(e,t){var i=this.$originalSelect.find('option[value="'.concat(e,'"]'));return!!i.length&&(i.prop("selected",t),this.closeDropdown(),this.updateLabel(),this.$originalSelect.trigger("change",[!0]),!0)}},{key:"_emptyItems",value:function(){this.$_items.html("")}},{key:"_showLoadMore",value:function(){this.$_showMore.show()}},{key:"_hideLoadMore",value:function(){this.$_showMore.hide()}},{key:"getLabel",value:function(){return this.hasSelectedValues()?this.getSelectedLabels().join(", "):this.options.labels.emptyLabel}},{key:"updateLabel",value:function(){var e,t=this.getLabel();null===(e=this.$_label)||void 0===e||e.html(t)}},{key:"getOptions",value:function(){return this.$originalSelect.find("option")}},{key:"hasSelectedValues",value:function(){return this.getSelectedOptions().length}},{key:"isValueSelected",value:function(e){return-1!==this.getSelectedValues().indexOf(e.toString())}},{key:"getSelectedOptions",value:function(){return this.$originalSelect.find("option").filter(":selected")}},{key:"getOptionByValue",value:function(e){return this.$originalSelect.find('option[value="'.concat(e,'"]'))}},{key:"getSelectedLabels",value:function(){var t=[];return this.getSelectedOptions().each((function(){var i=e(this),a=i.data("template");a=a||i.html().replace(/\([0-9]*\)/,""),t.push(a)})),t}},{key:"getSelectedValues",value:function(){var t=[];return this.getSelectedOptions().each((function(){t.push(e(this).val())})),t}},{key:"destroy",value:function(){}}])&&c(i.prototype,a),n&&c(i,n),t}();function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function p(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var v=function(){function t(i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,"preset",!1),p(this,"$preset",!1),p(this,"target",!1),p(this,"$target",!1),p(this,"$filters",!1),p(this,"$filterButtons",!1),p(this,"modalElements",{}),p(this,"activeFilters",!1),p(this,"isMobile",!1),p(this,"sliderTimeout",!1),p(this,"originalFilters",null),p(this,"dirty",!1),this.preset="#"+i.attr("id"),this.$preset=i,this.target=this.$preset.data("target"),this.$target=!!this.target&&e(this.target),this._regiterStatus(),this._initFilterButton(),this._initResponsive(),this._initFilters(),this._initActions(),this.$preset.data("preset",this).addClass("enhanced").trigger("yith_wcan_preset_initialized",[this])}var i,a,n;return i=t,(a=[{key:"_initFilters",value:function(){var t=this;this.getFilters().each((function(){var i=e(this);t._initFilter(i)})),this.maybeShowClearAllFilters()}},{key:"_initFilterButton",value:function(){var e=this;this.$filterButtons=this.$preset.find(".apply-filters"),this.$filterButtons.length&&this.$filterButtons.on("click",(function(t){t.preventDefault(),e.filter()})).hide()}},{key:"_initActions",value:function(){this.$preset.find("form").on("submit",(function(e){e.preventDefault()}))}},{key:"_initResponsive",value:function(){var t=this;if(yith_wcan_shortcodes.modal_on_mobile){var i=window.matchMedia("(max-width: ".concat(yith_wcan_shortcodes.mobile_media_query,"px)"));e(window).on("resize",(function(){var e=!!i.matches;e!==t.isMobile&&(t.isMobile=e,t._afterLayoutChange())})).resize()}}},{key:"_initFilter",value:function(t){var i,a=this,n=function(i){var n=e(this),l=n.closest(".yith-wcan-filter"),r=!!l.length&&"yes"===l.data("multiple"),s=n.closest(".filter-item"),o=s.length?l.find(".filter-item").not(s):[];if(s.is(".disabled")&&!s.is(".active"))return i.preventDefault(),!1;i.preventDefault(),o.length&&!r&&o.removeClass("active").children("label").find(":input").prop("checked",!1).parent(".checked").removeClass("checked"),s.length&&s.toggleClass("active"),a.activeFilters=!1,a.maybeFilter(t),a.maybeToggleClearAllFilters(),a.maybeToggleClearFilter(l)};t.find(".filter-item").not(".checkbox").not(".radio").on("click","a",(function(t){var i=e(this).closest(".filter-item");if(!e(null==t?void 0:t.delegateTarget).is(i))return!1;n.call(this,t)})),t.find(":input").on("change",(function(t){var i=e(this),a=i.closest(".filter-item");if(a.is(".disabled")&&!a.is(".active"))return i.prop("checked",!1),!1;n.call(this,t)})),t.find("label > a").on("click",(function(t){var i=e(this),a=i.closest(".filter-item");if(t.preventDefault(),a.is(".disabled")&&!a.is(".active"))return!1;var n=i.parent().find(":input");(n.is('[type="radio"]')||n.is('[type="checkbox"]'))&&n.prop("checked",!n.prop("checked")),n.change()})),this._initTooltip(t),this._initPriceSlider(t),this._initDropdown(t),this._initCollapsable(t),this.maybeShowClearFilter(t),null!==(i=this.$preset)&&void 0!==i&&i.hasClass("custom-style")&&(this._initCustomInput(t),t.on("yith_wcan_dropdown_updated",(function(){var t=e(this).closest(".yith-wcan-filter");a._initCustomInput(t)})))}},{key:"_initTooltip",value:function(t,i){t.find("[data-title]").each((function(){var t=e(this);!t.hasClass("tooltip-added")&&t.data("title")&&(t.on("mouseenter",(function(){var t,a=e(this),n=null,l=a.outerWidth(),r=0;if(!i||"top"!==i&&"right"!==i){var s=a.closest(".filter-item");i=s.hasClass("color")||s.hasClass("label")?"top":"right"}n=e("<span>",{class:"yith-wcan-tooltip",html:a.data("title")}),a.append(n),t=n.outerWidth()+6,n.outerWidth(t),r="top"===i?(l-t)/2:l+15,n.css({left:r.toFixed(0)+"px"}).fadeIn(200),a.addClass("with-tooltip")})).on("mouseleave",(function(){var t=e(this);t.find(".yith-wcan-tooltip").fadeOut(200,(function(){t.removeClass("with-tooltip").find(".yith-wcan-tooltip").remove()}))})),t.addClass("tooltip-added"))}))}},{key:"_initDropdown",value:function(t){var i=t.find("select.filter-dropdown");i.length&&(i.hasClass("select2-hidden-accessible")&&void 0!==e.fn.selectWoo&&i.selectWoo("destroy"),this._initDropdownObject(i,{paginate:!0,perPage:yith_wcan_shortcodes.terms_per_page}))}},{key:"_initDropdownObject",value:function(e,t){return new d(e,t)}},{key:"_initPriceSlider",value:function(e){var t=this;if(e.hasClass("filter-price-slider")){var i=this,a=e.find(".price-slider"),n=a.find(".price-slider-min"),l=a.find(".price-slider-max"),r=parseFloat(a.data("min")),s=parseFloat(a.data("max")),o=parseFloat(n.val()),c=parseFloat(l.val()),h=parseFloat(a.data("step")),d=function(){i.sliderTimeout&&clearTimeout(i.sliderTimeout),i.sliderTimeout=setTimeout((function(){i.maybeFilter(e)}),200)};e.find(".price-slider-ui").ionRangeSlider({skin:"round",type:"double",min:r,max:s,step:h,from:o,to:c,min_interval:h,values_separator:" - ",prettify:function(e){return t.formatPrice(e)},onChange:function(e){n.val(e.from),l.val(e.to)},onFinish:d}),n.add(l).off("change").on("keyup",(function(){n.val()&&l.val()&&d()}))}}},{key:"_initCollapsable",value:function(e){this._initTitleCollapsable(e),this._initHierarchyCollapsable(e)}},{key:"_initTitleCollapsable",value:function(e){var t=e.find(".collapsable");t.length&&this._initToggle(t,t,e.find(".filter-content"))}},{key:"_initHierarchyCollapsable",value:function(t){var i=t.find(".hierarchy-collapsable");if(i.length){var a=this,n=t.find(".active");n.length&&(n.parents(".hierarchy-collapsable").removeClass("closed").addClass("opened"),n.hasClass("hierarchy-collapsable")&&yith_wcan_shortcodes.show_current_children&&n.removeClass("closed").addClass("opened")),i.each((function(){var t=e(this),i=e("<span/>",{class:"toggle-handle"});i.appendTo(t),a._initToggle(i,t,t.children("ul.filter-items"))}))}}},{key:"_initToggle",value:function(e,t,i){t.hasClass("closed")&&i.hide(),e.off("click").on("click",(function(e){e.stopPropagation(),e.preventDefault(),i.slideToggle(400,(function(){t.toggleClass("opened").toggleClass("closed")}))}))}},{key:"_initCustomInput",value:function(t){t.find(":input").each((function(){var t,i=e(this),a=i.attr("type"),n="".concat(a,"button");"checkbox"!==a&&"radio"!==a||i.closest(".".concat(n)).length||(i.is(":checked")&&(n+=" checked"),t=e("<span/>",{class:n}),i.wrap(t).on("change",(function(){var t=e(this);t.prop("checked")?t.parent().addClass("checked"):t.parent().removeClass("checked")})))}))}},{key:"_regiterStatus",value:function(){this.originalFilters=this.getFiltersProperties()}},{key:"_afterLayoutChange",value:function(){var t,i;this.isMobile?(this.$preset.addClass("filters-modal").attr("role","dialog").attr("tabindex","-1").hide(),this._addCloseModalButton(),this._addApplyFiltersModalButton(),this._switchToCollapsables(),null===(t=this.$filterButtons)||void 0===t||t.hide()):(this.$preset.removeClass("filters-modal").removeClass("open").removeAttr("role").removeAttr("tabindex").show(),e("body").css("overflow","auto").removeClass("yith-wcan-preset-modal-open"),this._removeCloseModalButton(),this._removeApplyFiltersModalButton(),this._switchBackCollapsables(),null===(i=this.$filterButtons)||void 0===i||i.show())}},{key:"_addCloseModalButton",value:function(){var t=e("<a/>",{class:"close-button",html:"&times;","data-dismiss":"modal","aria-label":yith_wcan_shortcodes.labels.close});t.prependTo(this.$preset).on("click",this.closeModal.bind(this)),this.modalElements.closeButton=t}},{key:"_removeCloseModalButton",value:function(){var e,t;null===(e=this.modalElements)||void 0===e||null===(t=e.closeButton)||void 0===t||t.remove()}},{key:"_addApplyFiltersModalButton",value:function(){var t=this,i=e("<button/>",{class:"apply-filters main-modal-button",html:yith_wcan_shortcodes.labels.show_results,"data-dismiss":"modal"});i.appendTo(this.$preset).on("click",(function(){t.filter(),t.closeModal()})),this.modalElements.applyFiltersButton=i}},{key:"_removeApplyFiltersModalButton",value:function(){var e,t;null===(e=this.modalElements)||void 0===e||null===(t=e.applyFiltersButton)||void 0===t||t.remove()}},{key:"_switchToCollapsables",value:function(){var t=this;this.getFilters().each((function(){var i=e(this),a=i.find(".filter-title");a.length&&!a.hasClass("collapsable")&&(a.addClass("collapsable").data("disable-collapse",!0),t._initTitleCollapsable(i))}))}},{key:"_switchBackCollapsables",value:function(){this.getFilters().each((function(){var t=e(this),i=t.find(".filter-title");i.length&&i.hasClass("collapsable")&&i.data("disable-collapse")&&(i.removeClass("collapsable").removeData("disable-collapse",!0).off("click"),t.find(".filter-content").show())}))}},{key:"_openAllCollapsables",value:function(){var t=this;this.$filters.not(".no-title").not((function(i,a){return t.isFilterActive(e(a))})).find(".filter-content").show().end().find(".filter-title").removeClass("closed").addClass("opened")}},{key:"_closeAllCollapsables",value:function(){var t=this;this.$filters.not(".no-title").not((function(i,a){return t.isFilterActive(e(a))})).find(".filter-content").hide().end().find(".filter-title").addClass("closed").removeClass("opened")}},{key:"maybeRegisterStatusChange",value:function(){var e=this.getFiltersProperties(),t=JSON.stringify(e),i=JSON.stringify(this.originalFilters);this.dirty=t!==i}},{key:"maybeFilter",value:function(e){if(this.maybeRegisterStatusChange(),yith_wcan_shortcodes.instant_filters&&!this.isMobile)this.filter();else if(yith_wcan_shortcodes.instant_filters||this.isMobile){if(this.isMobile&&this.dirty){var t;this.$preset.addClass("with-filter-button"),null===(t=this.modalElements.applyFiltersButton)||void 0===t||t.show()}}else{var i,a;this.dirty?null===(i=this.$filterButtons)||void 0===i||i.show():null===(a=this.$filterButtons)||void 0===a||a.hide()}}},{key:"filter",value:function(){var t,i,a,n=this,l=null===(t=window)||void 0===t?void 0:t.product_filter;null==l||null===(i=l.doFilter(this.getFiltersProperties(),this.target,this.preset))||void 0===i||i.done((function(){var t=e(n.preset);if(t.length&&yith_wcan_shortcodes.scroll_top){var i=t.offset().top;if(yith_wcan_shortcodes.scroll_target){var a=e(yith_wcan_shortcodes.scroll_target);i=a.length?a.offset().top:i}else n.isMobile&&(i=100);e("body, html").animate({scrollTop:i-100})}n.originalFilters=n.getFiltersProperties(),n.dirty=!1})),this.isMobile&&(this.$preset.removeClass("with-filter-button"),null===(a=this.modalElements.applyFiltersButton)||void 0===a||a.hide(),this.closeModal())}},{key:"getFilters",value:function(){return!1===this.$filters&&(this.$filters=this.$preset.find(".yith-wcan-filter")),this.$filters}},{key:"getActiveFilters",value:function(){return!1===this.activeFilters&&(this.activeFilters=this.getFiltersProperties()),this.activeFilters}},{key:"isAnyFilterActive",value:function(){return!!Object.keys(this.getActiveFilters()).length}},{key:"isFilterActive",value:function(e){var t,i;switch(e.data("filter-type")){case"tax":case"review":case"price_range":var a=e.find(".filter-dropdown");if(a.length){var n=a.val();t="object"===u(n)?!(null==n||!n.length):!!n;break}case"stock_sale":t=e.find(".filter-item").filter(".active").length;break;case"price_slider":var l=parseFloat(e.find(".price-slider").data("step")),r=parseFloat(e.find(".price-slider").data("min")),s=parseFloat(e.find(".price-slider").data("max")),o=parseFloat(e.find(".price-slider-min").val()),c=parseFloat(e.find(".price-slider-max").val());t=Math.abs(o-r)>=l||Math.abs(c-s)>=l;break;case"orderby":t="menu_order"!==e.find(".filter-order-by").val();break;default:t=!1}return t=void 0!==(i=e.triggerHandler("yith_wcan_is_filter_active",[t,this]))?i:t}},{key:"countActiveItems",value:function(e){var t;switch(e.data("filter-type")){case"tax":case"review":case"price_range":var i=e.find(".filter-dropdown");if(i.length){var a=i.val();t="object"===u(a)?null==a?void 0:a.length:+!!a;break}case"stock_sale":t=e.find(".filter-items").find(".active").length;break;case"orderby":this.isFilterActive(e)&&(t=1);break;case"price_slider":default:t=0}return t}},{key:"getFilterProperties",value:function(t){var i,a,n=t.data("filter-type"),l="yes"===t.data("multiple"),r=t.find(".filter-dropdown"),s={};switch(n){case"tax":var o=[],c=t.data("taxonomy"),h=0===c.indexOf("filter"),d=t.data("relation");if(r.length?l?o=r.val():o.push(r.val()):o=(a=t.find(".filter-item").filter(".active").children("a, label")).get().reduce((function(t,i){var a;return(a=(i=e(i)).is("label")?i.find(":input").val():i.data("term-slug"))?(t.push(a),t):t}),o),l){var u=h||"and"!==d?",":"+";s[c]=o.join(u)}else s[c]=o.pop();h&&(s[c.replace("filter_","query_type_")]=d);break;case"review":r.length?s.rating_filter=r.val():(a=t.find(".filter-item").filter(".active").children("a, label"),l?s.rating_filter=a.get().reduce((function(t,i){var a;return(a=(i=e(i)).is("label")?i.find(":input").val():i.data("rating"))?(t.push(a),t):t}),[]).join(","):(a=a.first(),s.rating_filter=a.is("label")?a.find(":input").val():a.data("rating")));break;case"price_range":r.length?l?s.price_ranges=r.val().join(","):(s.min_price=r.val().split("-")[0],s.max_price=r.val().split("-")[1]):(a=t.find(".filter-item").filter(".active").children("a, label"),l?s.price_ranges=a.get().reduce((function(t,i){var a=e(i).data("range-min"),n=e(i).data("range-max");return t+=(n?"".concat(a,"-").concat(n):a)+","}),"").replace(/^(.*),$/,"$1"):(s.min_price=parseFloat(a.first().data("range-min")),s.max_price=parseFloat(a.first().data("range-max"))));break;case"price_slider":s.min_price=parseFloat(t.find(".price-slider-min").val()),s.max_price=parseFloat(t.find(".price-slider-max").val());break;case"stock_sale":t.find(".filter-on-sale").is(".active")&&(s.onsale_filter=1),t.find(".filter-in-stock").is(".active")&&(s.instock_filter=1),t.find(".filter-featured").is(".active")&&(s.featured_filter=1);break;case"orderby":s.orderby=t.find(".filter-order-by").val()}return s=void 0!==(i=t.triggerHandler("yith_wcan_filter_properties",[s,self]))?i:s}},{key:"getFiltersProperties",value:function(){var t={},i=this;return this.getFilters().each((function(){var a=e(this);if(i.isFilterActive(a)){var n=i.getFilterProperties(a);t=i.mergeProperties(t,n,a)}})),t}},{key:"getFiltersByProperties",value:function(t){var i=this;return this.getFilters().filter((function(){var a=e(this);if(i.isFilterActive(a)){var n=i.getFilterProperties(a),l=!1;for(var r in t){if(["min_price","max_price","price_ranges"].includes(r)&&(n.min_price||n.price_ranges)){l=!0;break}if(n[r]){l=!0;break}}return l}return!1}))}},{key:"maybeToggleClearFilter",value:function(e){this.isFilterActive(e)?this.maybeShowClearFilter(e):this.maybeHideClearFilter(e)}},{key:"maybeToggleClearAllFilters",value:function(){this.isAnyFilterActive()?this.maybeShowClearAllFilters():this.maybeHideClearAllFilters()}},{key:"maybeShowClearFilter",value:function(t){var i=this;this.isFilterActive(t)&&yith_wcan_shortcodes.show_clear_filter&&(t.find(".clear-selection").remove(),e("<a/>",{class:"clear-selection",text:yith_wcan_shortcodes.labels.clear_selection,role:"button"}).prependTo(t.find(".filter-content")).on("click",(function(e){e.preventDefault(),i.deactivateFilter(t,!1,yith_wcan_shortcodes.instant_filters),i.maybeHideClearFilter(t),yith_wcan_shortcodes.instant_filters&&i.closeModal()})))}},{key:"maybeShowClearAllFilters",value:function(){var t=this;this.isAnyFilterActive()&&this.isMobile&&(this.$preset.find(".clear-selection").remove(),e("<a/>",{class:"clear-selection",text:yith_wcan_shortcodes.labels.clear_all_selections,role:"button"}).prependTo(this.$preset.find(".filters-container")).on("click",(function(e){e.preventDefault(),t.deactivateAllFilters(yith_wcan_shortcodes.instant_filters),t.maybeHideClearAllFilters(),yith_wcan_shortcodes.instant_filters&&t.closeModal()})))}},{key:"maybeHideClearFilter",value:function(e){!this.isFilterActive(e)&&yith_wcan_shortcodes.show_clear_filter&&e.find(".clear-selection").remove()}},{key:"maybeHideClearAllFilters",value:function(){this.isAnyFilterActive()||this.$preset.find(".filters-container").children(".clear-selection").remove()}},{key:"deactivateFilter",value:function(t,i,a){var n=t.data("filter-type"),l=t.find(".filter-item"),r=l.filter(".active"),s=t.find(".filter-dropdown");switch(n){case"tax":var o=t.data("taxonomy");s.length?(i?s.find("option").each((function(){var t=e(this);t.val().toString()===i[o].toString()&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t=e(this),a=t.children("label"),n=t.children("a");(a.length?a.find(":input").val():n.data("term-slug")).toString()===i[o].toString()&&(t.children("label").children("a").click(),t.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"review":s.length?(i?s.find("option").each((function(){var t=e(this);t.val()===i.rating_filter&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t=e(this),a=t.children("label"),n=t.children("a");(a.length?a.find(":input").val():n.data("rating"))===i.rating_filter&&(t.children("label").children("a").click(),t.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"price_range":s.length?(i?s.find("option").each((function(){var t=e(this),a=i.min_price+(i.max_price?"-".concat(i.max_price):"");t.val()===a&&t.prop("selected",!1)})):s.find("option").prop("selected",!1),s.change()):i?r.each((function(){var t,a,n=e(this),l=n.children("label"),r=n.children("a");a=l.length?l.find(":input").val():r.data("min_price")+(r.data("max_price")?"-"+r.data("max_price"):""),i.min_price?t=i.min_price+(i.max_price?"-"+i.max_price:""):i.price_ranges&&(t=i.price_ranges),a===t&&(n.children("label").children("a").click(),n.removeClass("active"))})):(r.children("label").children("a").click(),r.removeClass("active"));break;case"price_slider":var c=t.find(".price-slider");t.find(".price-slider-min").val(c.data("min")),t.find(".price-slider-max").val(c.data("max")).change();break;case"orderby":t.find("select").val("menu_order");break;case"stock_sale":i?(null!=i&&i.instock_filter&&t.find(".filter-in-stock").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active"),null!=i&&i.onsale_filter&&t.find(".filter-on-sale").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active"),null!=i&&i.featured_filter&&t.find(".filter-featured").find(":input").prop("checked",!1).change().closest(".filter-item").removeClass("active")):(t.find(".filter-in-stock").find(":input").prop("checked",!1).change(),t.find(".filter-on-sale").find(":input").prop("checked",!1).change(),t.find(".filter-featured").find(":input").prop("checked",!1).change(),l.removeClass("active"));break;default:l.removeClass("active")}this.activeFilters=!1,a&&this.filter()}},{key:"deactivateAllFilters",value:function(t){var i=this;return this.getFilters().each((function(){var t=e(this);i.deactivateFilter(t)})),this.activeFilters=!1,t&&this.filter(),!0}},{key:"deactivateFilterByProperties",value:function(t,i){var a=this,n=this.getFiltersByProperties(t);return!!n.length&&(n.each((function(){var n=e(this);a.deactivateFilter(n,t,i)})),!0)}},{key:"openModal",value:function(){var t=this;this.isMobile&&(yith_wcan_shortcodes.toggles_open_on_modal?this._openAllCollapsables():this._closeAllCollapsables(),e("body").css("overflow","hidden").addClass("yith-wcan-preset-modal-open"),this.$preset.show(),setTimeout((function(){t.$preset.addClass("open")}),100))}},{key:"closeModal",value:function(){var t=this;this.isMobile&&(this.$preset.removeClass("open"),setTimeout((function(){t.$preset.hide(),e("body").css("overflow","auto").removeClass("yith-wcan-preset-modal-open")}),300))}},{key:"formatPrice",value:function(e){var t,i,a,n;return"undefined"!=typeof accounting&&(e=accounting.formatMoney(e,{symbol:null===(t=yith_wcan_shortcodes.currency_format)||void 0===t?void 0:t.symbol,decimal:null===(i=yith_wcan_shortcodes.currency_format)||void 0===i?void 0:i.decimal,thousand:null===(a=yith_wcan_shortcodes.currency_format)||void 0===a?void 0:a.thousand,precision:0,format:null===(n=yith_wcan_shortcodes.currency_format)||void 0===n?void 0:n.format})),e}},{key:"mergeProperties",value:function(t,i,a){for(var n in i)if(i.hasOwnProperty(n)&&t[n]){switch(n){case"rating_filter":case"min_price":case"max_price":case"onsale_filter":case"instock_filter":case"orderby":t[n]=i[n];break;default:if(0===n.indexOf("query_type_"))t[n]=i[n];else{var l=0===n.indexOf("filter_"),r=l?",":"+",s=t[n].replace(",",r)+r+i[n].replace(",",r);if(s=s.split(r).filter((function(e,t,i){return i.indexOf(e)===t})).join(r),t[n]=s,l){var o=n.replace("filter_","query_type_");t[o]="and",i[o]="and"}}}delete i[n]}return e.extend(t,i),t}}])&&f(i.prototype,a),n&&f(i,n),t}();jQuery((function(e){e(document).on("yith_wcan_init_shortcodes yith_plugin_fw_gutenberg_success_do_shortcode",(function(){e(".yith-wcan-filters").not(".enhanced").each((function(){new v(e(this))})),e(".yith-wcan-reset-filters").not(".enhanced").each((function(){new r(e(this))}))})).trigger("yith_wcan_init_shortcodes"),globalThis.product_filter=new l}))})();
includes/class-yith-wcan-filter.php CHANGED
@@ -53,6 +53,13 @@ if ( ! class_exists( 'YITH_WCAN_Filter' ) ) {
53
  */
54
  protected $type = 'tax';
55
 
 
 
 
 
 
 
 
56
  /**
57
  * Core data for this object. Name value pairs (name + default value).
58
  *
@@ -225,6 +232,15 @@ if ( ! class_exists( 'YITH_WCAN_Filter' ) ) {
225
  return apply_filters( 'yith_wcan_is_filter_active', YITH_WCAN_Query()->is_filtered_by( $this->type ), $this );
226
  }
227
 
 
 
 
 
 
 
 
 
 
228
  /**
229
  * Get taxonomy for the filter
230
  *
@@ -1417,7 +1433,23 @@ if ( ! class_exists( 'YITH_WCAN_Filter' ) ) {
1417
  *
1418
  * @return string Filter template.
1419
  */
1420
- abstract public function render();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1421
 
1422
  /**
1423
  * Render filter title
53
  */
54
  protected $type = 'tax';
55
 
56
+ /**
57
+ * Name of the template to use for filter rendering
58
+ *
59
+ * @var string
60
+ */
61
+ protected $template = '';
62
+
63
  /**
64
  * Core data for this object. Name value pairs (name + default value).
65
  *
232
  return apply_filters( 'yith_wcan_is_filter_active', YITH_WCAN_Query()->is_filtered_by( $this->type ), $this );
233
  }
234
 
235
+ /**
236
+ * Checks if filter is relevant to current product selection
237
+ *
238
+ * @return bool Whether filter is relevant or not.
239
+ */
240
+ public function is_relevant() {
241
+ return apply_filters( 'yith_wcan_is_filter_relevant', $this->is_enabled(), $this );
242
+ }
243
+
244
  /**
245
  * Get taxonomy for the filter
246
  *
1433
  *
1434
  * @return string Filter template.
1435
  */
1436
+ public function render() {
1437
+ $atts = array(
1438
+ 'filter' => $this,
1439
+ 'preset' => $this->get_preset(),
1440
+ );
1441
+
1442
+ if ( ! $this->is_relevant() ) {
1443
+ return '';
1444
+ }
1445
+
1446
+ if ( ! $this->template ) {
1447
+ $formatted_type = str_replace( '_', '-', $this->type );
1448
+ $this->template = "filter-{$formatted_type}";
1449
+ }
1450
+
1451
+ return yith_wcan_get_template( "filters/{$this->template}.php", $atts, false );
1452
+ }
1453
 
1454
  /**
1455
  * Render filter title
includes/class-yith-wcan-preset.php CHANGED
@@ -365,6 +365,28 @@ if ( ! class_exists( 'YITH_WCAN_Preset' ) ) {
365
  return ! ! $this->get_raw_filters( $context );
366
  }
367
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
  /**
369
  * Returns true if preset needs pagination
370
  *
365
  return ! ! $this->get_raw_filters( $context );
366
  }
367
 
368
+ /**
369
+ * Checks if preset has any relevant filter for current product selection
370
+ *
371
+ * @return bool Whether preset has relevant filters.
372
+ * @author Antonio La Rocca <antonio.larocca@yithemes.com>
373
+ */
374
+ public function has_relevant_filters() {
375
+ $filters = $this->get_filters();
376
+
377
+ if ( ! $filters ) {
378
+ return false;
379
+ }
380
+
381
+ foreach ( $filters as $filter ) {
382
+ if ( $filter->is_relevant() ) {
383
+ return true;
384
+ }
385
+ }
386
+
387
+ return false;
388
+ }
389
+
390
  /**
391
  * Returns true if preset needs pagination
392
  *
includes/filters/class-yith-wcan-filter-tax.php CHANGED
@@ -38,17 +38,12 @@ if ( ! class_exists( 'YITH_WCAN_Filter_Tax' ) ) {
38
  }
39
 
40
  /**
41
- * Method that will output content of the filter on frontend
42
  *
43
- * @return string Template for current filter
44
  */
45
- public function render() {
46
- $atts = array(
47
- 'filter' => $this,
48
- 'preset' => $this->get_preset(),
49
- );
50
-
51
- return yith_wcan_get_template( 'filters/filter-tax.php', $atts, false );
52
  }
53
 
54
  /**
@@ -423,7 +418,7 @@ if ( ! class_exists( 'YITH_WCAN_Filter_Tax' ) ) {
423
  }
424
  }
425
 
426
- $this->formatted_terms = $result;
427
 
428
  return $result;
429
  }
38
  }
39
 
40
  /**
41
+ * Checks if filter is relevant to current product selection
42
  *
43
+ * @return bool Whether filter is relevant or not.
44
  */
45
+ public function is_relevant() {
46
+ return apply_filters( 'yith_wcan_is_filter_relevant', $this->is_enabled() && $this->has_relevant_terms(), $this );
 
 
 
 
 
47
  }
48
 
49
  /**
418
  }
419
  }
420
 
421
+ $this->formatted_terms = apply_filters( "yith_wcan_filter_get_formatted_terms_for_{$taxonomy}", $result, $this );
422
 
423
  return $result;
424
  }
init.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
5
  * Description: <code><strong>YITH WooCommerce AJAX Product Filter</strong></code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products and improve the user experience of your shop. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
- * Version: 4.15.0
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-navigation
10
  * Domain Path: /languages/
11
  *
12
- * WC requires at least: 6.8
13
- * WC tested up to: 7.0
14
  *
15
  * @author YITH
16
  * @package YITH\AjaxProductFilter
@@ -45,7 +45,7 @@ if ( ! defined( 'ABSPATH' ) ) {
45
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
46
  ! defined( 'YITH_WCAN_INC' ) && define( 'YITH_WCAN_INC', YITH_WCAN_DIR . 'includes/' );
47
  ! defined( 'YITH_WCAN_ASSETS' ) && define( 'YITH_WCAN_ASSETS', YITH_WCAN_URL . 'assets/' );
48
- ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '4.15.0' );
49
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
50
  ! defined( 'YITH_WCAN_SLUG' ) && define( 'YITH_WCAN_SLUG', 'yith-woocommerce-ajax-navigation' );
51
  ! defined( 'YITH_WCAN_INIT' ) && define( 'YITH_WCAN_INIT', plugin_basename( __FILE__ ) );
3
  * Plugin Name: YITH WooCommerce Ajax Product Filter
4
  * Plugin URI: https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/
5
  * Description: <code><strong>YITH WooCommerce AJAX Product Filter</strong></code> allows your users to find the product they are looking for as quickly as possible. Thanks to the plugin you will be able to set up one or more search filters for your WooCommerce products and improve the user experience of your shop. <a href="https://yithemes.com/" target="_blank">Get more plugins for your e-commerce shop on <strong>YITH</strong></a>
6
+ * Version: 4.16.0
7
  * Author: YITH
8
  * Author URI: https://yithemes.com/
9
  * Text Domain: yith-woocommerce-ajax-navigation
10
  * Domain Path: /languages/
11
  *
12
+ * WC requires at least: 6.9
13
+ * WC tested up to: 7.1
14
  *
15
  * @author YITH
16
  * @package YITH\AjaxProductFilter
45
  ! defined( 'YITH_WCAN_DIR' ) && define( 'YITH_WCAN_DIR', plugin_dir_path( __FILE__ ) );
46
  ! defined( 'YITH_WCAN_INC' ) && define( 'YITH_WCAN_INC', YITH_WCAN_DIR . 'includes/' );
47
  ! defined( 'YITH_WCAN_ASSETS' ) && define( 'YITH_WCAN_ASSETS', YITH_WCAN_URL . 'assets/' );
48
+ ! defined( 'YITH_WCAN_VERSION' ) && define( 'YITH_WCAN_VERSION', '4.16.0' );
49
  ! defined( 'YITH_WCAN_FILE' ) && define( 'YITH_WCAN_FILE', __FILE__ );
50
  ! defined( 'YITH_WCAN_SLUG' ) && define( 'YITH_WCAN_SLUG', 'yith-woocommerce-ajax-navigation' );
51
  ! defined( 'YITH_WCAN_INIT' ) && define( 'YITH_WCAN_INIT', plugin_basename( __FILE__ ) );
languages/yith-woocommerce-ajax-navigation-de_DE.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-de_DE.po CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-09-20 12:09:06+00:00\n"
9
  "PO-Revision-Date: 2021-03-02 11:03+0100\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
@@ -566,13 +566,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
566
  msgid "Sort by price: high to low"
567
  msgstr "Sortieren nach Preis: Preis absteigend"
568
 
569
- #: includes/class-yith-wcan-filter.php:116
570
  msgctxt "[Admin] Default filter title"
571
  msgid "New filter"
572
  msgstr "Neuer Filter"
573
 
574
  #: includes/class-yith-wcan-frontend.php:626
575
- #: includes/filters/class-yith-wcan-filter-tax.php:62
576
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
577
  msgid "All"
578
  msgstr "Alle"
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-11-14 15:59:20+00:00\n"
9
  "PO-Revision-Date: 2021-03-02 11:03+0100\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
566
  msgid "Sort by price: high to low"
567
  msgstr "Sortieren nach Preis: Preis absteigend"
568
 
569
+ #: includes/class-yith-wcan-filter.php:123
570
  msgctxt "[Admin] Default filter title"
571
  msgid "New filter"
572
  msgstr "Neuer Filter"
573
 
574
  #: includes/class-yith-wcan-frontend.php:626
575
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
576
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
577
  msgid "All"
578
  msgstr "Alle"
languages/yith-woocommerce-ajax-navigation-de_DE_formal.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-de_DE_formal.po CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-09-20 12:09:06+00:00\n"
9
  "PO-Revision-Date: 2021-03-02 11:03+0100\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
@@ -567,13 +567,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
567
  msgid "Sort by price: high to low"
568
  msgstr "Sortieren nach Preis: Preis absteigend"
569
 
570
- #: includes/class-yith-wcan-filter.php:116
571
  msgctxt "[Admin] Default filter title"
572
  msgid "New filter"
573
  msgstr "Neuer Filter"
574
 
575
  #: includes/class-yith-wcan-frontend.php:626
576
- #: includes/filters/class-yith-wcan-filter-tax.php:62
577
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
578
  msgid "All"
579
  msgstr "Alle"
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-11-14 15:59:20+00:00\n"
9
  "PO-Revision-Date: 2021-03-02 11:03+0100\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
567
  msgid "Sort by price: high to low"
568
  msgstr "Sortieren nach Preis: Preis absteigend"
569
 
570
+ #: includes/class-yith-wcan-filter.php:123
571
  msgctxt "[Admin] Default filter title"
572
  msgid "New filter"
573
  msgstr "Neuer Filter"
574
 
575
  #: includes/class-yith-wcan-frontend.php:626
576
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
577
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
578
  msgid "All"
579
  msgstr "Alle"
languages/yith-woocommerce-ajax-navigation-el.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-el.po CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-09-20 12:09:06+00:00\n"
9
  "PO-Revision-Date: 2021-02-12 13:32:43+0000\n"
10
  "Language: el_GR\n"
11
  "MIME-Version: 1.0\n"
@@ -566,13 +566,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
566
  msgid "Sort by price: high to low"
567
  msgstr "Ταξινόμηση ανά τιμή: υψηλή προς χαμηλή"
568
 
569
- #: includes/class-yith-wcan-filter.php:116
570
  msgctxt "[Admin] Default filter title"
571
  msgid "New filter"
572
  msgstr "Νέο φίλτρο"
573
 
574
  #: includes/class-yith-wcan-frontend.php:626
575
- #: includes/filters/class-yith-wcan-filter-tax.php:62
576
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
577
  msgid "All"
578
  msgstr "Όλα"
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-11-14 15:59:20+00:00\n"
9
  "PO-Revision-Date: 2021-02-12 13:32:43+0000\n"
10
  "Language: el_GR\n"
11
  "MIME-Version: 1.0\n"
566
  msgid "Sort by price: high to low"
567
  msgstr "Ταξινόμηση ανά τιμή: υψηλή προς χαμηλή"
568
 
569
+ #: includes/class-yith-wcan-filter.php:123
570
  msgctxt "[Admin] Default filter title"
571
  msgid "New filter"
572
  msgstr "Νέο φίλτρο"
573
 
574
  #: includes/class-yith-wcan-frontend.php:626
575
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
576
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
577
  msgid "All"
578
  msgstr "Όλα"
languages/yith-woocommerce-ajax-navigation-es_ES.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-es_ES.po CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-09-20 12:09:06+00:00\n"
9
  "PO-Revision-Date: 2021-02-12 13:30:42+0000\n"
10
  "Language: es\n"
11
  "MIME-Version: 1.0\n"
@@ -564,13 +564,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
564
  msgid "Sort by price: high to low"
565
  msgstr "Ordenar por precio: de alto a bajo"
566
 
567
- #: includes/class-yith-wcan-filter.php:116
568
  msgctxt "[Admin] Default filter title"
569
  msgid "New filter"
570
  msgstr "Nuevo filtro"
571
 
572
  #: includes/class-yith-wcan-frontend.php:626
573
- #: includes/filters/class-yith-wcan-filter-tax.php:62
574
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
575
  msgid "All"
576
  msgstr "Todo"
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-11-14 15:59:20+00:00\n"
9
  "PO-Revision-Date: 2021-02-12 13:30:42+0000\n"
10
  "Language: es\n"
11
  "MIME-Version: 1.0\n"
564
  msgid "Sort by price: high to low"
565
  msgstr "Ordenar por precio: de alto a bajo"
566
 
567
+ #: includes/class-yith-wcan-filter.php:123
568
  msgctxt "[Admin] Default filter title"
569
  msgid "New filter"
570
  msgstr "Nuevo filtro"
571
 
572
  #: includes/class-yith-wcan-frontend.php:626
573
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
574
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
575
  msgid "All"
576
  msgstr "Todo"
languages/yith-woocommerce-ajax-navigation-fr_FR.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-fr_FR.po CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-09-20 12:09:06+00:00\n"
9
  "PO-Revision-Date: 2020-12-29 14:36:56+0000\n"
10
  "Language: fr\n"
11
  "MIME-Version: 1.0\n"
@@ -540,13 +540,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
540
  msgid "Sort by price: high to low"
541
  msgstr ""
542
 
543
- #: includes/class-yith-wcan-filter.php:116
544
  msgctxt "[Admin] Default filter title"
545
  msgid "New filter"
546
  msgstr ""
547
 
548
  #: includes/class-yith-wcan-frontend.php:626
549
- #: includes/filters/class-yith-wcan-filter-tax.php:62
550
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
551
  msgid "All"
552
  msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-11-14 15:59:20+00:00\n"
9
  "PO-Revision-Date: 2020-12-29 14:36:56+0000\n"
10
  "Language: fr\n"
11
  "MIME-Version: 1.0\n"
540
  msgid "Sort by price: high to low"
541
  msgstr ""
542
 
543
+ #: includes/class-yith-wcan-filter.php:123
544
  msgctxt "[Admin] Default filter title"
545
  msgid "New filter"
546
  msgstr ""
547
 
548
  #: includes/class-yith-wcan-frontend.php:626
549
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
550
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
551
  msgid "All"
552
  msgstr ""
languages/yith-woocommerce-ajax-navigation-it_IT.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-it_IT.po CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-09-20 12:09:06+00:00\n"
9
  "PO-Revision-Date: 2021-03-03 10:36+0100\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
@@ -562,13 +562,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
562
  msgid "Sort by price: high to low"
563
  msgstr "Ordina per prezzo: decrescente"
564
 
565
- #: includes/class-yith-wcan-filter.php:116
566
  msgctxt "[Admin] Default filter title"
567
  msgid "New filter"
568
  msgstr "Nuovo filtro"
569
 
570
  #: includes/class-yith-wcan-frontend.php:626
571
- #: includes/filters/class-yith-wcan-filter-tax.php:62
572
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
573
  msgid "All"
574
  msgstr "Tutte"
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-11-14 15:59:20+00:00\n"
9
  "PO-Revision-Date: 2021-03-03 10:36+0100\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
562
  msgid "Sort by price: high to low"
563
  msgstr "Ordina per prezzo: decrescente"
564
 
565
+ #: includes/class-yith-wcan-filter.php:123
566
  msgctxt "[Admin] Default filter title"
567
  msgid "New filter"
568
  msgstr "Nuovo filtro"
569
 
570
  #: includes/class-yith-wcan-frontend.php:626
571
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
572
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
573
  msgid "All"
574
  msgstr "Tutte"
languages/yith-woocommerce-ajax-navigation-nl_NL.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-nl_NL.po CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-09-20 12:09:06+00:00\n"
9
  "PO-Revision-Date: 2021-02-12 13:32:05+0000\n"
10
  "Language: nl\n"
11
  "MIME-Version: 1.0\n"
@@ -560,13 +560,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
560
  msgid "Sort by price: high to low"
561
  msgstr "Sorteren op prijs: hoog naar laag"
562
 
563
- #: includes/class-yith-wcan-filter.php:116
564
  msgctxt "[Admin] Default filter title"
565
  msgid "New filter"
566
  msgstr "Nieuwe filter"
567
 
568
  #: includes/class-yith-wcan-frontend.php:626
569
- #: includes/filters/class-yith-wcan-filter-tax.php:62
570
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
571
  msgid "All"
572
  msgstr "Alle"
5
  "Project-Id-Version: YITH WooCommerce Ajax Product Filter\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
7
  "ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-11-14 15:59:20+00:00\n"
9
  "PO-Revision-Date: 2021-02-12 13:32:05+0000\n"
10
  "Language: nl\n"
11
  "MIME-Version: 1.0\n"
560
  msgid "Sort by price: high to low"
561
  msgstr "Sorteren op prijs: hoog naar laag"
562
 
563
+ #: includes/class-yith-wcan-filter.php:123
564
  msgctxt "[Admin] Default filter title"
565
  msgid "New filter"
566
  msgstr "Nieuwe filter"
567
 
568
  #: includes/class-yith-wcan-frontend.php:626
569
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
570
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
571
  msgid "All"
572
  msgstr "Alle"
languages/yith-woocommerce-ajax-navigation-tr_TR.mo CHANGED
Binary file
languages/yith-woocommerce-ajax-navigation-tr_TR.po CHANGED
@@ -3,7 +3,7 @@ msgstr ""
3
  "Project-Id-Version: YITH WooCommerce Ajax Product filter\n"
4
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
5
  "ajax-product-filter\n"
6
- "POT-Creation-Date: 2022-09-20 12:09:06+00:00\n"
7
  "PO-Revision-Date: 2019-06-06 10:16+0200\n"
8
  "Last-Translator: Caner Öncel <caneroncel@gmail.com>\n"
9
  "Language-Team: Caner Öncel <caneroncel@gmail.com>\n"
@@ -561,13 +561,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
561
  msgid "Sort by price: high to low"
562
  msgstr ""
563
 
564
- #: includes/class-yith-wcan-filter.php:116
565
  msgctxt "[Admin] Default filter title"
566
  msgid "New filter"
567
  msgstr ""
568
 
569
  #: includes/class-yith-wcan-frontend.php:626
570
- #: includes/filters/class-yith-wcan-filter-tax.php:62
571
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
572
  msgid "All"
573
  msgstr ""
3
  "Project-Id-Version: YITH WooCommerce Ajax Product filter\n"
4
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/yith-woocommerce-"
5
  "ajax-product-filter\n"
6
+ "POT-Creation-Date: 2022-11-14 15:59:20+00:00\n"
7
  "PO-Revision-Date: 2019-06-06 10:16+0200\n"
8
  "Last-Translator: Caner Öncel <caneroncel@gmail.com>\n"
9
  "Language-Team: Caner Öncel <caneroncel@gmail.com>\n"
561
  msgid "Sort by price: high to low"
562
  msgstr ""
563
 
564
+ #: includes/class-yith-wcan-filter.php:123
565
  msgctxt "[Admin] Default filter title"
566
  msgid "New filter"
567
  msgstr ""
568
 
569
  #: includes/class-yith-wcan-frontend.php:626
570
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
571
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
572
  msgid "All"
573
  msgstr ""
languages/yith-woocommerce-ajax-navigation.pot CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Navigation\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/yith-woocommerce-ajax-product-filter\n"
8
- "POT-Creation-Date: 2022-10-05 14:27:13+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -548,13 +548,13 @@ msgctxt "[Admin] Filter edit form, sorting options"
548
  msgid "Sort by price: high to low"
549
  msgstr ""
550
 
551
- #: includes/class-yith-wcan-filter.php:116
552
  msgctxt "[Admin] Default filter title"
553
  msgid "New filter"
554
  msgstr ""
555
 
556
  #: includes/class-yith-wcan-frontend.php:626
557
- #: includes/filters/class-yith-wcan-filter-tax.php:62
558
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
559
  msgid "All"
560
  msgstr ""
5
  "Project-Id-Version: YITH WooCommerce Ajax Navigation\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/yith-woocommerce-ajax-product-filter\n"
8
+ "POT-Creation-Date: 2022-11-15 10:41:58+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
548
  msgid "Sort by price: high to low"
549
  msgstr ""
550
 
551
+ #: includes/class-yith-wcan-filter.php:123
552
  msgctxt "[Admin] Default filter title"
553
  msgid "New filter"
554
  msgstr ""
555
 
556
  #: includes/class-yith-wcan-frontend.php:626
557
+ #: includes/filters/class-yith-wcan-filter-tax.php:57
558
  msgctxt "[FRONTEND] \"All\" label shown when no term is selected"
559
  msgid "All"
560
  msgstr ""
plugin-fw/assets/js/yith-system-info.js CHANGED
@@ -35,6 +35,7 @@ jQuery(
35
  var data = {
36
  action: 'yith_create_log_file',
37
  file : $( this ).data( 'file' ),
 
38
  };
39
 
40
  container.addClass( 'progress' );
@@ -74,7 +75,7 @@ jQuery(
74
  if ( ! $this.find( '.copied-tooltip' ).length ) {
75
  $this
76
  .append(
77
- $( '<span/>', {class: 'copied-tooltip'} )
78
  .html( $this.data( "tooltip" ) ).fadeIn( 300 )
79
  );
80
  setTimeout(
35
  var data = {
36
  action: 'yith_create_log_file',
37
  file : $( this ).data( 'file' ),
38
+ nonce : $( this ).data( 'nonce' ),
39
  };
40
 
41
  container.addClass( 'progress' );
75
  if ( ! $this.find( '.copied-tooltip' ).length ) {
76
  $this
77
  .append(
78
+ $( '<span/>', { class: 'copied-tooltip' } )
79
  .html( $this.data( "tooltip" ) ).fadeIn( 300 )
80
  );
81
  setTimeout(
plugin-fw/assets/js/yith-system-info.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){e(document).on("click",".notice-dismiss",function(){if("yith-system-alert"===e(this).parent().attr("id")){document.cookie="hide_yith_system_alert=yes;path=/"}}),e(document).on("click",".yith-download-log",function(){var t=e(this).parent(),o={action:"yith_create_log_file",file:e(this).data("file")};t.addClass("progress"),e.post(yith_sysinfo.ajax_url,o,function(e){if(!1!==e.file){var o=document.createElement("a"),i=e.file.split("/").pop();o.href=e.file,o.download=i,document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(e.file),o.remove()}t.removeClass("progress")})}),e(document).on("click",".copy-link",function(t){t.preventDefault();var o=e(this),i=e("<textarea>");e("body").append(i),i.val("define( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\ndefine( 'WP_DEBUG_DISPLAY', false );").select(),document.execCommand("Copy"),i.remove(),o.find(".copied-tooltip").length||(o.append(e("<span/>",{"class":"copied-tooltip"}).html(o.data("tooltip")).fadeIn(300)),setTimeout(function(){o.find(".copied-tooltip").fadeOut().remove()},3e3))})});
1
+ jQuery(function(e){e(document).on("click",".notice-dismiss",function(){if("yith-system-alert"===e(this).parent().attr("id")){document.cookie="hide_yith_system_alert=yes;path=/"}}),e(document).on("click",".yith-download-log",function(){var t=e(this).parent(),o={action:"yith_create_log_file",file:e(this).data("file"),nonce:e(this).data("nonce")};t.addClass("progress"),e.post(yith_sysinfo.ajax_url,o,function(e){if(!1!==e.file){var o=document.createElement("a"),i=e.file.split("/").pop();o.href=e.file,o.download=i,document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(e.file),o.remove()}t.removeClass("progress")})}),e(document).on("click",".copy-link",function(t){t.preventDefault();var o=e(this),i=e("<textarea>");e("body").append(i),i.val("define( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\ndefine( 'WP_DEBUG_DISPLAY', false );").select(),document.execCommand("Copy"),i.remove(),o.find(".copied-tooltip").length||(o.append(e("<span/>",{"class":"copied-tooltip"}).html(o.data("tooltip")).fadeIn(300)),setTimeout(function(){o.find(".copied-tooltip").fadeOut().remove()},3e3))})});
plugin-fw/dist/gutenberg/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'ccb6b74ecd1dbb4cb1db833b49ebe4fb');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '38c85839447dbb33cdd5faa58bc6e790');
plugin-fw/dist/gutenberg/index.js CHANGED
@@ -1 +1 @@
1
- !function(){var e,t={784:function(e,t,n){"use strict";var o=window.wp.element,r=window.React,l=n(568),a=n.n(l),s=window.wp.blocks,i=window.wp.url;function c(e){if(e.status>=200&&e.status<300)return e;throw e}function u(e){return e.json?e.json():e.text()}const p=(0,o.createElement)("svg",{viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",role:"img","aria-hidden":"true",focusable:"false"},(0,o.createElement)("path",{width:"22",height:"22",d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));var h=window.lodash,d=n.n(h);const f=(e,t,n)=>{let o=!0;if(t&&t.id&&"value"in t){let r=t.value;["toggle","checkbox"].includes(n)&&(r=!0===r||"yes"===r||1===r),r=d().isArray(r)?r:[r],o=void 0!==e[t.id]&&r.includes(e[t.id])}return o},m=(e,t)=>{const{controlType:n}=e;let o=!0;if(e.deps)if(d().isArray(e.deps))for(let r in e.deps){const l=e.deps[r];if(o=f(t,l,n),!o)break}else o=f(t,e.deps,n);return o},g=(e,t)=>{let n="",o=!1;if(void 0!==e.callback&&(jQuery&&e.callback in jQuery.fn?o=jQuery.fn[e.callback]:e.callback in window&&(o=window[e.callback])),"function"==typeof o)n=o(t,e);else{const o=e.attributes?Object.entries(e.attributes).map((e=>{let[n,o]=e;const r=m(o,t),l=t[n];if(r&&void 0!==l)return n+"="+(o.remove_quotes?l:`"${l}"`)})):[],r=o.length?" "+o.join(" "):"";n=`[${e.shortcode_name}${r}]`}return n};var _=window.wp.components,y=window.wp.blockEditor,b=window.wp.hooks;class v extends r.Component{constructor(){super(...arguments),this.state={html:"",shortcode:"",shortcodeHash:"",ajaxUpdated:!1,ajaxSuccess:!1,ajaxResponse:!1,loading:!1,firstLoading:!0},this.ajaxTimeout=!1}componentDidMount(){this.updateShortcode()}componentDidUpdate(e,t,n){const{shortcode:o,shortcodeHash:r,ajaxSuccess:l,ajaxResponse:a,ajaxUpdated:s}=this.state;(0,h.isEqual)(e,this.props)||this.updateShortcode(),this.props.blockArgs.do_shortcode&&s&&(l&&(0,b.doAction)("yith_plugin_fw_gutenberg_success_do_shortcode",o,r,a),(0,b.doAction)("yith_plugin_fw_gutenberg_after_do_shortcode",o,r,a),this.setState({ajaxUpdated:!1}))}updateShortcode(){const{attributes:e,blockArgs:t}=this.props;this.setState({loading:!0,ajaxSuccess:!1,ajaxResponse:!1});const n=g(t,e),o=a()(n);t.do_shortcode?(this.ajaxTimeout&&clearTimeout(this.ajaxTimeout),(0,b.doAction)("yith_plugin_fw_gutenberg_before_do_shortcode",n,o),this.ajaxTimeout=setTimeout((()=>{(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yithGutenberg.ajaxurl;return t=(0,i.addQueryArgs)(t,e),fetch(t).then(c).then(u)})({action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:n}).then((e=>{this.setState({loading:!1,firstLoading:!1,html:e.html,shortcode:n,shortcodeHash:o,ajaxSuccess:!0,ajaxUpdated:!0,ajaxResponse:e})})).catch((e=>{console.log({error:e})}))}),300)):this.setState({loading:!1,firstLoading:!1,html:n,shortcode:n,shortcodeHash:o})}render(){const{html:e,loading:t,firstLoading:n,shortcode:r,shortcodeHash:l}=this.state,{blockArgs:a}=this.props,{do_shortcode:s,title:i,empty_message:c}=a,u="block-editor-yith-plugin-fw-shortcode-block";let h=[u],d=s?"html":"shortcode",f=e,m="";n&&t?d="first-loading":s&&!e&&(d="empty-html",f=r,!t&&c&&(m=c));const g=["first-loading","empty-html","shortcode"].includes(d),y=!["first-loading","empty-html"].includes(d),b=!!m;return h.push(`${u}--${d}`),h.push(b?`${u}--has-message`:`${u}--no-message`),h.push(`yith_block_${l}`),(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:h.join(" ")},t?(0,o.createElement)("div",{className:`${u}__spinner-wrap`},(0,o.createElement)(_.Spinner,null)):"",g&&(0,o.createElement)("div",{className:`${u}__title components-placeholder__label`},p,i),b&&(0,o.createElement)(o.RawHTML,{className:`${u}__message`},m),y&&(0,o.createElement)(o.RawHTML,{className:`${u}__content`},f)))}}var w=window.wp.compose;function C(e){let{className:t,label:n,onChange:r,value:l,help:a,disableAlpha:s}=e;const i=`inspector-yith-color-picker-control-${(0,w.useInstanceId)(C)}`;return(0,o.createElement)(_.BaseControl,{id:i,label:n,className:`block-editor-yith-color-control ${t}`,help:a},(0,o.createElement)(_.ColorPicker,{color:l,disableAlpha:s,onChangeComplete:r}))}function k(e){let{label:t,colorValue:n}=e;return(0,o.createElement)(o.Fragment,null,t,!!n&&(0,o.createElement)(_.ColorIndicator,{colorValue:n}))}function E(e){let{className:t,label:n,onChange:r,value:l,help:a,palette:s,clearable:i}=e;s=s||(0,y.useSetting)("color.palette");const c=`inspector-yith-color-palette-control-${(0,w.useInstanceId)(E)}`;return(0,o.createElement)(_.BaseControl,{id:c,className:`block-editor-yith-color-palette-control ${t}`,help:a},(0,o.createElement)("fieldset",null,(0,o.createElement)("legend",null,(0,o.createElement)("div",{className:"block-editor-yith-color-palette-control__color-indicator"},(0,o.createElement)(_.BaseControl.VisualLabel,null,(0,o.createElement)(k,{colorValue:l,label:n})))),(0,o.createElement)(_.ColorPalette,{value:l,onChange:r,colors:s,clearable:i})))}var x=n(184),T=n.n(x),j=n(697),N=n.n(j),S=window.wp.i18n;const O={noItems:(0,S.__)("No items found.","yith-plugin-fw"),noResults:(0,S.__)('No results for "%s"',"yith-plugin-fw"),search:(0,S.__)("Search for items...","yith-plugin-fw")};function A(e){const t=(0,w.useInstanceId)(B);return e||`inspector-yith-multiple-select-control-${t}`}function R(e){var t;let{id:n,value:l,options:a,onChange:s,messages:i}=e;const[c,u]=(0,r.useState)(""),[p,h]=(0,r.useState)(!1),[d,f]=(0,r.useState)(248),m={...O,...i},g=(0,r.useRef)(),y=(0,r.useRef)(),b=(0,r.useRef)(),v=(0,r.useRef)(),w=(0,r.useRef)(),C=T()("yith-fw-components__multiple-select"),k=(0,r.useMemo)((()=>a.map((e=>e.value))),[a]),E=(0,r.useMemo)((()=>l.filter((e=>k.includes(e)))),[l,k]),x=(0,r.useMemo)((()=>a.filter((e=>e.label.toLowerCase().indexOf(c.toLowerCase())>=0))),[a,c]),j=(0,r.useMemo)((()=>a.filter((e=>E.includes(e.value)))),[a,E]),N=e=>{const t=[...E].filter((t=>t!==e));s(t)},R=()=>!!y.current&&y.current.focus(),B=e=>{const t=(null==g?void 0:g.current)&&g.current.contains(e.target),n=(null==v?void 0:v.current)&&v.current.contains(e.target);t||n||h(!1)};return(0,r.useEffect)((()=>(document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)))),(0,r.useEffect)((()=>{(()=>{var e;if(!g.current)return;const t=null===(e=g.current.getBoundingClientRect())||void 0===e?void 0:e.width;f(t)})()}),[]),(0,o.createElement)("div",{className:C,ref:g},(0,o.createElement)("div",{className:"yith-fw-components__multiple-select__input-container",ref:b,onClick:e=>{(null==b?void 0:b.current)&&b.current===e.target&&R()}},j.map((e=>(0,o.createElement)("span",{key:e.value,className:"yith-fw-components__multiple-select__item"},(0,o.createElement)("span",{className:"yith-fw-components__multiple-select__item__label"},e.label),(0,o.createElement)("i",{className:"yith-fw-components__multiple-select__item__remove yith-icon-close-alt",onClick:()=>{N(e.value),h(!1)}})))),(0,o.createElement)("input",{className:"yith-fw-components__multiple-select__input",id:A(n),ref:y,type:"text",autoComplete:"off",placeholder:m.search,onFocus:()=>h(!0),value:c,onChange:e=>u(e.target.value)})),p&&(0,o.createElement)(_.Popover,{className:"yith-fw-components__multiple-select__popover",position:"bottom",offset:20,anchorRef:null!==(t=null==g?void 0:g.current)&&void 0!==t?t:void 0,anchorRect:(null==g?void 0:g.current)&&(null==g?void 0:g.current.getBoundingClientRect()),focusOnMount:!1,ref:v},(0,o.createElement)("div",{className:T()("yith-fw-components__multiple-select__suggestions",!x.length&&"no-results"),ref:w,style:{width:d}},a.length&&x.length?x.map((e=>{const t=E.includes(e.value);return(0,o.createElement)("div",{key:e.value,className:T()("yith-fw-components__multiple-select__suggestion",t&&"selected"),onClick:()=>{var n;t||(n=e.value,s([...E,n]),u(""),R())}},(0,o.createElement)("div",{className:"yith-fw-components__multiple-select__suggestion__label"},e.label),t&&(0,o.createElement)("i",{className:"yith-fw-components__multiple-select__suggestion__remove yith-icon yith-icon-close-alt",onClick:()=>{N(e.value),R()}}))})):(0,o.createElement)("div",{className:"yith-fw-components__multiple-select__suggestions__message"},a.length&&c?(0,S.sprintf)(m.noResults,c):m.noItems))))}function B(e){let{className:t,label:n,onChange:r,value:l,help:a,options:s,messages:i}=e;const c=`inspector-yith-multiple-select-control-${(0,w.useInstanceId)(B)}`;return(0,o.createElement)(_.BaseControl,{id:c,label:n,className:`block-editor-yith-multiple-select-control ${t}`,help:a},(0,o.createElement)(R,{id:c,value:l,options:s,onChange:r,messages:i}))}R.propTypes={id:N().string,className:N().string,value:N().array,options:N().arrayOf(N().shape({label:N().string,value:N().oneOfType([N().string,N().number])})),onChange:N().func},R.defaultProps={id:"",value:[],className:"",options:[],onChange:d()};const $=e=>{var t,n,r;let{attributeName:l,attributeArgs:a,attributes:s,onChange:i,blockName:c}=e;const{controlType:u,label:p,wrapper_class:h}=a,d=s[l],f=((e,t)=>{let n="";return e.helps&&e.helps.checked&&e.helps.unchecked?n=t?e.helps.checked:e.helps.unchecked:e.help&&(n=e.help),n})(a,d),g=m(a,s),y=T()(`${c}__${l}-field-wrapper`,h);let b=!1;if(g)switch(u){case"select":var v,w,k;b=a.multiple?(0,o.createElement)(B,{className:y,value:d,label:p,options:null!==(v=null==a?void 0:a.options)&&void 0!==v?v:[],help:f,onChange:i,messages:null!==(w=null==a?void 0:a.messages)&&void 0!==w?w:{}}):(0,o.createElement)(_.SelectControl,{className:y,value:d,label:p,options:null!==(k=null==a?void 0:a.options)&&void 0!==k?k:[],help:f,onChange:i});break;case"text":b=(0,o.createElement)(_.TextControl,{className:y,key:l,value:d,label:p,help:f,onChange:i});break;case"textarea":b=(0,o.createElement)(_.TextareaControl,{className:y,key:l,value:d,label:p,help:f,onChange:i});break;case"toggle":b=(0,o.createElement)(_.ToggleControl,{className:y,key:l,label:p,help:f,checked:d,onChange:i});break;case"checkbox":b=(0,o.createElement)(_.CheckboxControl,{className:y,key:l,label:p,help:f,checked:d,onChange:i});break;case"number":case"range":b=(0,o.createElement)(_.RangeControl,{className:y,key:l,value:d,label:p,help:f,min:null==a?void 0:a.min,max:null==a?void 0:a.max,onChange:i});break;case"color":case"colorpicker":b=(0,o.createElement)(C,{className:y,key:l,label:p,help:f,value:d,disableAlpha:null!==(t=null==a?void 0:a.disableAlpha)&&void 0!==t&&t,onChange:i});break;case"color-palette":b=(0,o.createElement)(E,{className:y,key:l,label:p,help:f,value:d,clearable:null!==(n=null==a?void 0:a.clearable)&&void 0!==n&&n,onChange:i});break;case"radio":b=(0,o.createElement)(_.RadioControl,{key:l,label:p,options:null!==(r=null==a?void 0:a.options)&&void 0!==r?r:[],selected:d,help:f,onChange:i});break;default:b=!1}return b},I=(e,t)=>function(n){let{attributes:r,className:l,setAttributes:a}=n;return(0,o.createElement)(o.Fragment,null,!!t.attributes&&(0,o.createElement)(y.InspectorControls,null,(0,o.createElement)(_.PanelBody,null,Object.entries(t.attributes).map((t=>{let[n,l]=t;const{controlType:s}=l;return(0,o.createElement)($,{key:n,attributeArgs:l,attributeName:n,attributes:r,blockName:e,onChange:e=>((e,t,n)=>{if(["colorpicker","color"].includes(n))if("rgb"in e&&"hex"in e){const{r:t,g:n,b:o,a:r}=e.rgb;e=r<1?`rgba(${t}, ${n}, ${o}, ${r})`:e.hex}else e=e.color.getAlpha()<1?e.color.toRgbString():e.color.toHexString();a({[t]:e})})(e,n,s)})})))),(0,o.createElement)(v,{attributes:r,blockArgs:t}))},L=[{key:"yith_plugin_fw_gutenberg_before_do_shortcode",delay:0},{key:"yith_plugin_fw_gutenberg_success_do_shortcode",delay:200},{key:"yith_plugin_fw_gutenberg_after_do_shortcode",delay:200}];for(const e of L)(0,b.addAction)(e.key,"yith-plugin-fw/jquery-events",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];"jQuery"in window&&(e.delay?setTimeout((()=>{jQuery(document).trigger(e.key,Object.values(n))}),e.delay):jQuery(document).trigger(e.key,Object.values(n)))}));for(const[e,t]of Object.entries(yithGutenbergBlocks))(0,s.registerBlockType)("yith/"+e,{title:t.title,description:t.description,category:t.category,attributes:t.attributes,icon:void 0!==t.icon?t.icon:p,keywords:t.keywords,edit:I(e,t),save:e=>{let{attributes:n}=e;return g(t,n)},deprecated:[{attributes:t.attributes,save:e=>{let{attributes:n}=e;const r=g(t,n),l='<span class="yith_block_'+a()(r)+'">'+r+"</span>";return(0,o.createElement)(o.RawHTML,null,l)}}]})},487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},12:function(e){var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,o=0;n<e.length;n++,o+=8)t[o>>>5]|=e[n]<<24-o%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],o=0;o<e.length;o+=3)for(var r=e[o]<<16|e[o+1]<<8|e[o+2],l=0;l<4;l++)8*o+6*l<=8*e.length?n.push(t.charAt(r>>>6*(3-l)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,r=0;o<e.length;r=++o%4)0!=r&&n.push((t.indexOf(e.charAt(o-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(o))>>>6-2*r);return n}},e.exports=n},738:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},568:function(e,t,n){var o,r,l,a,s;o=n(12),r=n(487).utf8,l=n(738),a=n(487).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):r.stringToBytes(e):l(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=o.bytesToWords(e),i=8*e.length,c=1732584193,u=-271733879,p=-1732584194,h=271733878,d=0;d<n.length;d++)n[d]=16711935&(n[d]<<8|n[d]>>>24)|4278255360&(n[d]<<24|n[d]>>>8);n[i>>>5]|=128<<i%32,n[14+(i+64>>>9<<4)]=i;var f=s._ff,m=s._gg,g=s._hh,_=s._ii;for(d=0;d<n.length;d+=16){var y=c,b=u,v=p,w=h;c=f(c,u,p,h,n[d+0],7,-680876936),h=f(h,c,u,p,n[d+1],12,-389564586),p=f(p,h,c,u,n[d+2],17,606105819),u=f(u,p,h,c,n[d+3],22,-1044525330),c=f(c,u,p,h,n[d+4],7,-176418897),h=f(h,c,u,p,n[d+5],12,1200080426),p=f(p,h,c,u,n[d+6],17,-1473231341),u=f(u,p,h,c,n[d+7],22,-45705983),c=f(c,u,p,h,n[d+8],7,1770035416),h=f(h,c,u,p,n[d+9],12,-1958414417),p=f(p,h,c,u,n[d+10],17,-42063),u=f(u,p,h,c,n[d+11],22,-1990404162),c=f(c,u,p,h,n[d+12],7,1804603682),h=f(h,c,u,p,n[d+13],12,-40341101),p=f(p,h,c,u,n[d+14],17,-1502002290),c=m(c,u=f(u,p,h,c,n[d+15],22,1236535329),p,h,n[d+1],5,-165796510),h=m(h,c,u,p,n[d+6],9,-1069501632),p=m(p,h,c,u,n[d+11],14,643717713),u=m(u,p,h,c,n[d+0],20,-373897302),c=m(c,u,p,h,n[d+5],5,-701558691),h=m(h,c,u,p,n[d+10],9,38016083),p=m(p,h,c,u,n[d+15],14,-660478335),u=m(u,p,h,c,n[d+4],20,-405537848),c=m(c,u,p,h,n[d+9],5,568446438),h=m(h,c,u,p,n[d+14],9,-1019803690),p=m(p,h,c,u,n[d+3],14,-187363961),u=m(u,p,h,c,n[d+8],20,1163531501),c=m(c,u,p,h,n[d+13],5,-1444681467),h=m(h,c,u,p,n[d+2],9,-51403784),p=m(p,h,c,u,n[d+7],14,1735328473),c=g(c,u=m(u,p,h,c,n[d+12],20,-1926607734),p,h,n[d+5],4,-378558),h=g(h,c,u,p,n[d+8],11,-2022574463),p=g(p,h,c,u,n[d+11],16,1839030562),u=g(u,p,h,c,n[d+14],23,-35309556),c=g(c,u,p,h,n[d+1],4,-1530992060),h=g(h,c,u,p,n[d+4],11,1272893353),p=g(p,h,c,u,n[d+7],16,-155497632),u=g(u,p,h,c,n[d+10],23,-1094730640),c=g(c,u,p,h,n[d+13],4,681279174),h=g(h,c,u,p,n[d+0],11,-358537222),p=g(p,h,c,u,n[d+3],16,-722521979),u=g(u,p,h,c,n[d+6],23,76029189),c=g(c,u,p,h,n[d+9],4,-640364487),h=g(h,c,u,p,n[d+12],11,-421815835),p=g(p,h,c,u,n[d+15],16,530742520),c=_(c,u=g(u,p,h,c,n[d+2],23,-995338651),p,h,n[d+0],6,-198630844),h=_(h,c,u,p,n[d+7],10,1126891415),p=_(p,h,c,u,n[d+14],15,-1416354905),u=_(u,p,h,c,n[d+5],21,-57434055),c=_(c,u,p,h,n[d+12],6,1700485571),h=_(h,c,u,p,n[d+3],10,-1894986606),p=_(p,h,c,u,n[d+10],15,-1051523),u=_(u,p,h,c,n[d+1],21,-2054922799),c=_(c,u,p,h,n[d+8],6,1873313359),h=_(h,c,u,p,n[d+15],10,-30611744),p=_(p,h,c,u,n[d+6],15,-1560198380),u=_(u,p,h,c,n[d+13],21,1309151649),c=_(c,u,p,h,n[d+4],6,-145523070),h=_(h,c,u,p,n[d+11],10,-1120210379),p=_(p,h,c,u,n[d+2],15,718787259),u=_(u,p,h,c,n[d+9],21,-343485551),c=c+y>>>0,u=u+b>>>0,p=p+v>>>0,h=h+w>>>0}return o.endian([c,u,p,h])})._ff=function(e,t,n,o,r,l,a){var s=e+(t&n|~t&o)+(r>>>0)+a;return(s<<l|s>>>32-l)+t},s._gg=function(e,t,n,o,r,l,a){var s=e+(t&o|n&~o)+(r>>>0)+a;return(s<<l|s>>>32-l)+t},s._hh=function(e,t,n,o,r,l,a){var s=e+(t^n^o)+(r>>>0)+a;return(s<<l|s>>>32-l)+t},s._ii=function(e,t,n,o,r,l,a){var s=e+(n^(t|~o))+(r>>>0)+a;return(s<<l|s>>>32-l)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=o.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):o.bytesToHex(n)}},703:function(e,t,n){"use strict";var o=n(414);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,o),l.exports}o.m=t,e=[],o.O=function(t,n,r,l){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],l=e[u][2];for(var s=!0,i=0;i<n.length;i++)(!1&l||a>=l)&&Object.keys(o.O).every((function(e){return o.O[e](n[i])}))?n.splice(i--,1):(s=!1,l<a&&(a=l));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}l=l||0;for(var u=e.length;u>0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[n,r,l]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,46:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,l,a=n[0],s=n[1],i=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(i)var u=i(o)}for(t&&t(n);c<a.length;c++)l=a[c],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(u)},n=self.webpackChunkyith_plugin_framewowrk=self.webpackChunkyith_plugin_framewowrk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var r=o.O(void 0,[46],(function(){return o(784)}));r=o.O(r)}();
1
+ !function(){var e,t={784:function(e,t,n){"use strict";var o=window.wp.element,r=window.React,l=n(568),a=n.n(l),s=window.wp.blocks,i=window.wp.url;function c(e){if(e.status>=200&&e.status<300)return e;throw e}function u(e){return e.json?e.json():e.text()}const p=(0,o.createElement)("svg",{viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",role:"img","aria-hidden":"true",focusable:"false"},(0,o.createElement)("path",{width:"22",height:"22",d:"M 18.24 7.628 C 17.291 8.284 16.076 8.971 14.587 9.688 C 15.344 7.186 15.765 4.851 15.849 2.684 C 15.912 0.939 15.133 0.045 13.514 0.003 C 11.558 -0.06 10.275 1.033 9.665 3.284 C 10.007 3.137 10.359 3.063 10.723 3.063 C 11.021 3.063 11.267 3.184 11.459 3.426 C 11.651 3.668 11.736 3.947 11.715 4.262 C 11.695 5.082 11.276 5.961 10.46 6.896 C 9.644 7.833 8.918 8.3 8.282 8.3 C 7.837 8.3 7.625 7.922 7.646 7.165 C 7.667 6.765 7.804 5.955 8.056 4.735 C 8.287 3.579 8.403 2.801 8.403 2.401 C 8.403 1.707 8.224 1.144 7.867 0.713 C 7.509 0.282 6.994 0.098 6.321 0.161 C 5.858 0.203 5.175 0.624 4.27 1.422 C 3.596 2.035 2.923 2.644 2.25 3.254 L 2.976 4.106 C 3.564 3.664 3.922 3.443 4.048 3.443 C 4.448 3.443 4.637 3.717 4.617 4.263 C 4.617 4.306 4.427 4.968 4.049 6.251 C 3.671 7.534 3.471 8.491 3.449 9.122 C 3.407 9.985 3.565 10.647 3.924 11.109 C 4.367 11.677 5.106 11.919 6.142 11.835 C 7.366 11.751 8.591 11.298 9.816 10.479 C 10.323 10.142 10.808 9.753 11.273 9.311 C 11.105 10.153 10.905 10.868 10.673 11.457 C 8.402 12.487 6.762 13.37 5.752 14.107 C 4.321 15.137 3.554 16.241 3.449 17.419 C 3.259 19.459 4.29 20.479 6.541 20.479 C 8.055 20.479 9.517 19.554 10.926 17.703 C 12.125 16.126 13.166 14.022 14.049 11.394 C 15.578 10.635 16.87 9.892 17.928 9.164 C 17.894 9.409 18.319 7.308 18.24 7.628 Z M 7.393 16.095 C 7.056 16.095 6.898 15.947 6.919 15.653 C 6.961 15.106 7.908 14.38 9.759 13.476 C 8.791 15.221 8.002 16.095 7.393 16.095 Z"}));var h=window.lodash,d=n.n(h);const f=(e,t,n)=>{let o=!0;if(t&&t.id&&"value"in t){let r=t.value;["toggle","checkbox"].includes(n)&&(r=!0===r||"yes"===r||1===r),r=d().isArray(r)?r:[r],o=void 0!==e[t.id]&&r.includes(e[t.id])}return o},m=(e,t)=>{const{controlType:n}=e;let o=!0;if(e.deps)if(d().isArray(e.deps))for(let r in e.deps){const l=e.deps[r];if(o=f(t,l,n),!o)break}else o=f(t,e.deps,n);return o},g=(e,t)=>{let n="",o=!1;if(void 0!==e.callback&&(jQuery&&e.callback in jQuery.fn?o=jQuery.fn[e.callback]:e.callback in window&&(o=window[e.callback])),"function"==typeof o)n=o(t,e);else{const o=e.attributes?Object.entries(e.attributes).map((e=>{let[n,o]=e;const r=m(o,t),l=t[n];if(r&&void 0!==l)return n+"="+(o.remove_quotes?l:`"${l}"`)})):[],r=o.length?" "+o.join(" "):"";n=`[${e.shortcode_name}${r}]`}return n};var y=window.wp.components,v=window.wp.blockEditor,_=window.wp.hooks;class b extends r.Component{constructor(){super(...arguments),this.state={html:"",shortcode:"",shortcodeHash:"",ajaxUpdated:!1,ajaxSuccess:!1,ajaxResponse:!1,loading:!1,firstLoading:!0},this.ajaxTimeout=!1}componentDidMount(){this.updateShortcode()}componentDidUpdate(e,t,n){const{shortcode:o,shortcodeHash:r,ajaxSuccess:l,ajaxResponse:a,ajaxUpdated:s}=this.state;(0,h.isEqual)(e,this.props)||this.updateShortcode(),this.props.blockArgs.do_shortcode&&s&&(l&&(0,_.doAction)("yith_plugin_fw_gutenberg_success_do_shortcode",o,r,a),(0,_.doAction)("yith_plugin_fw_gutenberg_after_do_shortcode",o,r,a),this.setState({ajaxUpdated:!1}))}updateShortcode(){const{attributes:e,blockArgs:t}=this.props;this.setState({loading:!0,ajaxSuccess:!1,ajaxResponse:!1});const n=g(t,e),o=a()(n);t.do_shortcode?(this.ajaxTimeout&&clearTimeout(this.ajaxTimeout),(0,_.doAction)("yith_plugin_fw_gutenberg_before_do_shortcode",n,o),this.ajaxTimeout=setTimeout((()=>{var e,t,r;(function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yithGutenberg.ajaxurl;return e.security=null!==(t=e.security)&&void 0!==t?t:yithGutenberg.ajaxNonce,n=(0,i.addQueryArgs)(n,e),fetch(n).then(c).then(u)})({action:"yith_plugin_fw_gutenberg_do_shortcode",shortcode:n,context:{...null!==(e=this.props.context)&&void 0!==e?e:{},adminPage:null!==(t=null===(r=window)||void 0===r?void 0:r.adminpage)&&void 0!==t?t:""}}).then((e=>{this.setState({loading:!1,firstLoading:!1,html:e.html,shortcode:n,shortcodeHash:o,ajaxSuccess:!0,ajaxUpdated:!0,ajaxResponse:e})})).catch((e=>{console.log({error:e})}))}),300)):this.setState({loading:!1,firstLoading:!1,html:n,shortcode:n,shortcodeHash:o})}render(){const{html:e,loading:t,firstLoading:n,shortcode:r,shortcodeHash:l}=this.state,{blockArgs:a}=this.props,{do_shortcode:s,title:i,empty_message:c}=a,u="block-editor-yith-plugin-fw-shortcode-block";let h=[u],d=s?"html":"shortcode",f=e,m="";n&&t?d="first-loading":s&&!e&&(d="empty-html",f=r,!t&&c&&(m=c));const g=["first-loading","empty-html","shortcode"].includes(d),v=!["first-loading","empty-html"].includes(d),_=!!m;return h.push(`${u}--${d}`),h.push(_?`${u}--has-message`:`${u}--no-message`),h.push(`yith_block_${l}`),(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:h.join(" ")},t?(0,o.createElement)("div",{className:`${u}__spinner-wrap`},(0,o.createElement)(y.Spinner,null)):"",g&&(0,o.createElement)("div",{className:`${u}__title components-placeholder__label`},p,i),_&&(0,o.createElement)(o.RawHTML,{className:`${u}__message`},m),v&&(0,o.createElement)(o.RawHTML,{className:`${u}__content`},f)))}}var w=window.wp.compose;function C(e){let{className:t,label:n,onChange:r,value:l,help:a,disableAlpha:s}=e;const i=`inspector-yith-color-picker-control-${(0,w.useInstanceId)(C)}`;return(0,o.createElement)(y.BaseControl,{id:i,label:n,className:`block-editor-yith-color-control ${t}`,help:a},(0,o.createElement)(y.ColorPicker,{color:l,disableAlpha:s,onChangeComplete:r}))}function k(e){let{label:t,colorValue:n}=e;return(0,o.createElement)(o.Fragment,null,t,!!n&&(0,o.createElement)(y.ColorIndicator,{colorValue:n}))}function E(e){let{className:t,label:n,onChange:r,value:l,help:a,palette:s,clearable:i}=e;s=s||(0,v.useSetting)("color.palette");const c=`inspector-yith-color-palette-control-${(0,w.useInstanceId)(E)}`;return(0,o.createElement)(y.BaseControl,{id:c,className:`block-editor-yith-color-palette-control ${t}`,help:a},(0,o.createElement)("fieldset",null,(0,o.createElement)("legend",null,(0,o.createElement)("div",{className:"block-editor-yith-color-palette-control__color-indicator"},(0,o.createElement)(y.BaseControl.VisualLabel,null,(0,o.createElement)(k,{colorValue:l,label:n})))),(0,o.createElement)(y.ColorPalette,{value:l,onChange:r,colors:s,clearable:i})))}var x=n(184),T=n.n(x),j=n(697),N=n.n(j),S=window.wp.i18n;const O={noItems:(0,S.__)("No items found.","yith-plugin-fw"),noResults:(0,S.__)('No results for "%s"',"yith-plugin-fw"),search:(0,S.__)("Search for items...","yith-plugin-fw")};function A(e){const t=(0,w.useInstanceId)(B);return e||`inspector-yith-multiple-select-control-${t}`}function R(e){var t;let{id:n,value:l,options:a,onChange:s,messages:i}=e;const[c,u]=(0,r.useState)(""),[p,h]=(0,r.useState)(!1),[d,f]=(0,r.useState)(248),m={...O,...i},g=(0,r.useRef)(),v=(0,r.useRef)(),_=(0,r.useRef)(),b=(0,r.useRef)(),w=(0,r.useRef)(),C=T()("yith-fw-components__multiple-select"),k=(0,r.useMemo)((()=>a.map((e=>e.value))),[a]),E=(0,r.useMemo)((()=>l.filter((e=>k.includes(e)))),[l,k]),x=(0,r.useMemo)((()=>a.filter((e=>e.label.toLowerCase().indexOf(c.toLowerCase())>=0))),[a,c]),j=(0,r.useMemo)((()=>a.filter((e=>E.includes(e.value)))),[a,E]),N=e=>{const t=[...E].filter((t=>t!==e));s(t)},R=()=>!!v.current&&v.current.focus(),B=e=>{const t=(null==g?void 0:g.current)&&g.current.contains(e.target),n=(null==b?void 0:b.current)&&b.current.contains(e.target);t||n||h(!1)};return(0,r.useEffect)((()=>(document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)))),(0,r.useEffect)((()=>{(()=>{var e;if(!g.current)return;const t=null===(e=g.current.getBoundingClientRect())||void 0===e?void 0:e.width;f(t)})()}),[]),(0,o.createElement)("div",{className:C,ref:g},(0,o.createElement)("div",{className:"yith-fw-components__multiple-select__input-container",ref:_,onClick:e=>{(null==_?void 0:_.current)&&_.current===e.target&&R()}},j.map((e=>(0,o.createElement)("span",{key:e.value,className:"yith-fw-components__multiple-select__item"},(0,o.createElement)("span",{className:"yith-fw-components__multiple-select__item__label"},e.label),(0,o.createElement)("i",{className:"yith-fw-components__multiple-select__item__remove yith-icon-close-alt",onClick:()=>{N(e.value),h(!1)}})))),(0,o.createElement)("input",{className:"yith-fw-components__multiple-select__input",id:A(n),ref:v,type:"text",autoComplete:"off",placeholder:m.search,onFocus:()=>h(!0),value:c,onChange:e=>u(e.target.value)})),p&&(0,o.createElement)(y.Popover,{className:"yith-fw-components__multiple-select__popover",position:"bottom",offset:20,anchorRef:null!==(t=null==g?void 0:g.current)&&void 0!==t?t:void 0,anchorRect:(null==g?void 0:g.current)&&(null==g?void 0:g.current.getBoundingClientRect()),focusOnMount:!1,ref:b},(0,o.createElement)("div",{className:T()("yith-fw-components__multiple-select__suggestions",!x.length&&"no-results"),ref:w,style:{width:d}},a.length&&x.length?x.map((e=>{const t=E.includes(e.value);return(0,o.createElement)("div",{key:e.value,className:T()("yith-fw-components__multiple-select__suggestion",t&&"selected"),onClick:()=>{var n;t||(n=e.value,s([...E,n]),u(""),R())}},(0,o.createElement)("div",{className:"yith-fw-components__multiple-select__suggestion__label"},e.label),t&&(0,o.createElement)("i",{className:"yith-fw-components__multiple-select__suggestion__remove yith-icon yith-icon-close-alt",onClick:()=>{N(e.value),R()}}))})):(0,o.createElement)("div",{className:"yith-fw-components__multiple-select__suggestions__message"},a.length&&c?(0,S.sprintf)(m.noResults,c):m.noItems))))}function B(e){let{className:t,label:n,onChange:r,value:l,help:a,options:s,messages:i}=e;const c=`inspector-yith-multiple-select-control-${(0,w.useInstanceId)(B)}`;return(0,o.createElement)(y.BaseControl,{id:c,label:n,className:`block-editor-yith-multiple-select-control ${t}`,help:a},(0,o.createElement)(R,{id:c,value:l,options:s,onChange:r,messages:i}))}R.propTypes={id:N().string,className:N().string,value:N().array,options:N().arrayOf(N().shape({label:N().string,value:N().oneOfType([N().string,N().number])})),onChange:N().func},R.defaultProps={id:"",value:[],className:"",options:[],onChange:d()};const $=e=>{var t,n,r;let{attributeName:l,attributeArgs:a,attributes:s,onChange:i,blockName:c}=e;const{controlType:u,label:p,wrapper_class:h}=a,d=s[l],f=((e,t)=>{let n="";return e.helps&&e.helps.checked&&e.helps.unchecked?n=t?e.helps.checked:e.helps.unchecked:e.help&&(n=e.help),n})(a,d),g=m(a,s),v=T()(`${c}__${l}-field-wrapper`,h);let _=!1;if(g)switch(u){case"select":var b,w,k;_=a.multiple?(0,o.createElement)(B,{className:v,value:d,label:p,options:null!==(b=null==a?void 0:a.options)&&void 0!==b?b:[],help:f,onChange:i,messages:null!==(w=null==a?void 0:a.messages)&&void 0!==w?w:{}}):(0,o.createElement)(y.SelectControl,{className:v,value:d,label:p,options:null!==(k=null==a?void 0:a.options)&&void 0!==k?k:[],help:f,onChange:i});break;case"text":_=(0,o.createElement)(y.TextControl,{className:v,key:l,value:d,label:p,help:f,onChange:i});break;case"textarea":_=(0,o.createElement)(y.TextareaControl,{className:v,key:l,value:d,label:p,help:f,onChange:i});break;case"toggle":_=(0,o.createElement)(y.ToggleControl,{className:v,key:l,label:p,help:f,checked:d,onChange:i});break;case"checkbox":_=(0,o.createElement)(y.CheckboxControl,{className:v,key:l,label:p,help:f,checked:d,onChange:i});break;case"number":case"range":_=(0,o.createElement)(y.RangeControl,{className:v,key:l,value:d,label:p,help:f,min:null==a?void 0:a.min,max:null==a?void 0:a.max,onChange:i});break;case"color":case"colorpicker":_=(0,o.createElement)(C,{className:v,key:l,label:p,help:f,value:d,disableAlpha:null!==(t=null==a?void 0:a.disableAlpha)&&void 0!==t&&t,onChange:i});break;case"color-palette":_=(0,o.createElement)(E,{className:v,key:l,label:p,help:f,value:d,clearable:null!==(n=null==a?void 0:a.clearable)&&void 0!==n&&n,onChange:i});break;case"radio":_=(0,o.createElement)(y.RadioControl,{key:l,label:p,options:null!==(r=null==a?void 0:a.options)&&void 0!==r?r:[],selected:d,help:f,onChange:i});break;default:_=!1}return _},I=(e,t)=>function(n){let{context:r,attributes:l,className:a,setAttributes:s}=n;return(0,o.createElement)(o.Fragment,null,!!t.attributes&&(0,o.createElement)(v.InspectorControls,null,(0,o.createElement)(y.PanelBody,null,Object.entries(t.attributes).map((t=>{let[n,r]=t;const{controlType:a}=r;return(0,o.createElement)($,{key:n,attributeArgs:r,attributeName:n,attributes:l,blockName:e,onChange:e=>((e,t,n)=>{if(["colorpicker","color"].includes(n))if("rgb"in e&&"hex"in e){const{r:t,g:n,b:o,a:r}=e.rgb;e=r<1?`rgba(${t}, ${n}, ${o}, ${r})`:e.hex}else e=e.color.getAlpha()<1?e.color.toRgbString():e.color.toHexString();s({[t]:e})})(e,n,a)})})))),(0,o.createElement)(b,{attributes:l,blockArgs:t,context:r}))},L=[{key:"yith_plugin_fw_gutenberg_before_do_shortcode",delay:0},{key:"yith_plugin_fw_gutenberg_success_do_shortcode",delay:200},{key:"yith_plugin_fw_gutenberg_after_do_shortcode",delay:200}];for(const e of L)(0,_.addAction)(e.key,"yith-plugin-fw/jquery-events",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];"jQuery"in window&&(e.delay?setTimeout((()=>{jQuery(document).trigger(e.key,Object.values(n))}),e.delay):jQuery(document).trigger(e.key,Object.values(n)))}));for(const[e,t]of Object.entries(yithGutenbergBlocks))(0,s.registerBlockType)("yith/"+e,{title:t.title,description:t.description,category:t.category,attributes:t.attributes,icon:void 0!==t.icon?t.icon:p,keywords:t.keywords,edit:I(e,t),usesContext:["postId"],save:e=>{let{attributes:n}=e;return g(t,n)},deprecated:[{attributes:t.attributes,save:e=>{let{attributes:n}=e;const r=g(t,n),l='<span class="yith_block_'+a()(r)+'">'+r+"</span>";return(0,o.createElement)(o.RawHTML,null,l)}}]})},487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},12:function(e){var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,o=0;n<e.length;n++,o+=8)t[o>>>5]|=e[n]<<24-o%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],o=0;o<e.length;o+=3)for(var r=e[o]<<16|e[o+1]<<8|e[o+2],l=0;l<4;l++)8*o+6*l<=8*e.length?n.push(t.charAt(r>>>6*(3-l)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,r=0;o<e.length;r=++o%4)0!=r&&n.push((t.indexOf(e.charAt(o-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(o))>>>6-2*r);return n}},e.exports=n},738:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},568:function(e,t,n){var o,r,l,a,s;o=n(12),r=n(487).utf8,l=n(738),a=n(487).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):r.stringToBytes(e):l(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=o.bytesToWords(e),i=8*e.length,c=1732584193,u=-271733879,p=-1732584194,h=271733878,d=0;d<n.length;d++)n[d]=16711935&(n[d]<<8|n[d]>>>24)|4278255360&(n[d]<<24|n[d]>>>8);n[i>>>5]|=128<<i%32,n[14+(i+64>>>9<<4)]=i;var f=s._ff,m=s._gg,g=s._hh,y=s._ii;for(d=0;d<n.length;d+=16){var v=c,_=u,b=p,w=h;c=f(c,u,p,h,n[d+0],7,-680876936),h=f(h,c,u,p,n[d+1],12,-389564586),p=f(p,h,c,u,n[d+2],17,606105819),u=f(u,p,h,c,n[d+3],22,-1044525330),c=f(c,u,p,h,n[d+4],7,-176418897),h=f(h,c,u,p,n[d+5],12,1200080426),p=f(p,h,c,u,n[d+6],17,-1473231341),u=f(u,p,h,c,n[d+7],22,-45705983),c=f(c,u,p,h,n[d+8],7,1770035416),h=f(h,c,u,p,n[d+9],12,-1958414417),p=f(p,h,c,u,n[d+10],17,-42063),u=f(u,p,h,c,n[d+11],22,-1990404162),c=f(c,u,p,h,n[d+12],7,1804603682),h=f(h,c,u,p,n[d+13],12,-40341101),p=f(p,h,c,u,n[d+14],17,-1502002290),c=m(c,u=f(u,p,h,c,n[d+15],22,1236535329),p,h,n[d+1],5,-165796510),h=m(h,c,u,p,n[d+6],9,-1069501632),p=m(p,h,c,u,n[d+11],14,643717713),u=m(u,p,h,c,n[d+0],20,-373897302),c=m(c,u,p,h,n[d+5],5,-701558691),h=m(h,c,u,p,n[d+10],9,38016083),p=m(p,h,c,u,n[d+15],14,-660478335),u=m(u,p,h,c,n[d+4],20,-405537848),c=m(c,u,p,h,n[d+9],5,568446438),h=m(h,c,u,p,n[d+14],9,-1019803690),p=m(p,h,c,u,n[d+3],14,-187363961),u=m(u,p,h,c,n[d+8],20,1163531501),c=m(c,u,p,h,n[d+13],5,-1444681467),h=m(h,c,u,p,n[d+2],9,-51403784),p=m(p,h,c,u,n[d+7],14,1735328473),c=g(c,u=m(u,p,h,c,n[d+12],20,-1926607734),p,h,n[d+5],4,-378558),h=g(h,c,u,p,n[d+8],11,-2022574463),p=g(p,h,c,u,n[d+11],16,1839030562),u=g(u,p,h,c,n[d+14],23,-35309556),c=g(c,u,p,h,n[d+1],4,-1530992060),h=g(h,c,u,p,n[d+4],11,1272893353),p=g(p,h,c,u,n[d+7],16,-155497632),u=g(u,p,h,c,n[d+10],23,-1094730640),c=g(c,u,p,h,n[d+13],4,681279174),h=g(h,c,u,p,n[d+0],11,-358537222),p=g(p,h,c,u,n[d+3],16,-722521979),u=g(u,p,h,c,n[d+6],23,76029189),c=g(c,u,p,h,n[d+9],4,-640364487),h=g(h,c,u,p,n[d+12],11,-421815835),p=g(p,h,c,u,n[d+15],16,530742520),c=y(c,u=g(u,p,h,c,n[d+2],23,-995338651),p,h,n[d+0],6,-198630844),h=y(h,c,u,p,n[d+7],10,1126891415),p=y(p,h,c,u,n[d+14],15,-1416354905),u=y(u,p,h,c,n[d+5],21,-57434055),c=y(c,u,p,h,n[d+12],6,1700485571),h=y(h,c,u,p,n[d+3],10,-1894986606),p=y(p,h,c,u,n[d+10],15,-1051523),u=y(u,p,h,c,n[d+1],21,-2054922799),c=y(c,u,p,h,n[d+8],6,1873313359),h=y(h,c,u,p,n[d+15],10,-30611744),p=y(p,h,c,u,n[d+6],15,-1560198380),u=y(u,p,h,c,n[d+13],21,1309151649),c=y(c,u,p,h,n[d+4],6,-145523070),h=y(h,c,u,p,n[d+11],10,-1120210379),p=y(p,h,c,u,n[d+2],15,718787259),u=y(u,p,h,c,n[d+9],21,-343485551),c=c+v>>>0,u=u+_>>>0,p=p+b>>>0,h=h+w>>>0}return o.endian([c,u,p,h])})._ff=function(e,t,n,o,r,l,a){var s=e+(t&n|~t&o)+(r>>>0)+a;return(s<<l|s>>>32-l)+t},s._gg=function(e,t,n,o,r,l,a){var s=e+(t&o|n&~o)+(r>>>0)+a;return(s<<l|s>>>32-l)+t},s._hh=function(e,t,n,o,r,l,a){var s=e+(t^n^o)+(r>>>0)+a;return(s<<l|s>>>32-l)+t},s._ii=function(e,t,n,o,r,l,a){var s=e+(n^(t|~o))+(r>>>0)+a;return(s<<l|s>>>32-l)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=o.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):o.bytesToHex(n)}},703:function(e,t,n){"use strict";var o=n(414);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,o),l.exports}o.m=t,e=[],o.O=function(t,n,r,l){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],l=e[u][2];for(var s=!0,i=0;i<n.length;i++)(!1&l||a>=l)&&Object.keys(o.O).every((function(e){return o.O[e](n[i])}))?n.splice(i--,1):(s=!1,l<a&&(a=l));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}l=l||0;for(var u=e.length;u>0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[n,r,l]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,46:0};o.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,l,a=n[0],s=n[1],i=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(i)var u=i(o)}for(t&&t(n);c<a.length;c++)l=a[c],o.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return o.O(u)},n=self.webpackChunkyith_plugin_framewowrk=self.webpackChunkyith_plugin_framewowrk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var r=o.O(void 0,[46],(function(){return o(784)}));r=o.O(r)}();
plugin-fw/includes/builders/gutenberg/class-yith-gutenberg.php CHANGED
@@ -83,7 +83,10 @@ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
83
  */
84
  public function enqueue_block_editor_assets() {
85
  $ajax_url = function_exists( 'WC' ) ? add_query_arg( 'wc-ajax', 'yith_plugin_fw_gutenberg_do_shortcode', trailingslashit( site_url() ) ) : admin_url( 'admin-ajax.php' );
86
- $gutenberg = array( 'ajaxurl' => $ajax_url );
 
 
 
87
  $asset_file = include YIT_CORE_PLUGIN_PATH . '/dist/gutenberg/index.asset.php';
88
 
89
  $gutenberg_assets_url = YIT_CORE_PLUGIN_URL . '/dist/gutenberg';
@@ -309,29 +312,36 @@ if ( ! class_exists( 'YITH_Gutenberg' ) ) {
309
  * Get a do_shortcode in ajax call to show block preview
310
  **/
311
  public function do_shortcode() {
312
- // phpcs:disable WordPress.Security.NonceVerification
313
- $current_action = current_action();
314
- $shortcode = ! empty( $_REQUEST['shortcode'] ) ? wp_unslash( $_REQUEST['shortcode'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
315
 
316
- if ( ! apply_filters( 'yith_plugin_fw_gutenberg_skip_shortcode_sanitize', false ) ) {
317
- $shortcode = sanitize_text_field( stripslashes( $shortcode ) );
318
- }
 
319
 
320
- ob_start();
 
 
321
 
322
- do_action( 'yith_plugin_fw_gutenberg_before_do_shortcode', $shortcode, $current_action );
323
- echo do_shortcode( apply_filters( 'yith_plugin_fw_gutenberg_shortcode', $shortcode, $current_action ) );
324
- do_action( 'yith_plugin_fw_gutenberg_after_do_shortcode', $shortcode, $current_action );
325
 
326
- $html = ob_get_clean();
327
 
328
- wp_send_json(
329
- array(
330
- 'html' => $html,
331
- )
332
- );
333
 
334
- // phpcs:enable
 
 
 
 
 
 
335
  }
336
  }
337
  }
83
  */
84
  public function enqueue_block_editor_assets() {
85
  $ajax_url = function_exists( 'WC' ) ? add_query_arg( 'wc-ajax', 'yith_plugin_fw_gutenberg_do_shortcode', trailingslashit( site_url() ) ) : admin_url( 'admin-ajax.php' );
86
+ $gutenberg = array(
87
+ 'ajaxurl' => $ajax_url,
88
+ 'ajaxNonce' => wp_create_nonce( 'gutenberg-ajax-action' ),
89
+ );
90
  $asset_file = include YIT_CORE_PLUGIN_PATH . '/dist/gutenberg/index.asset.php';
91
 
92
  $gutenberg_assets_url = YIT_CORE_PLUGIN_URL . '/dist/gutenberg';
312
  * Get a do_shortcode in ajax call to show block preview
313
  **/
314
  public function do_shortcode() {
315
+ check_ajax_referer( 'gutenberg-ajax-action', 'security' );
 
 
316
 
317
+ $post_id = absint( $_REQUEST['context']['postId'] ?? 0 );
318
+ $admin_page = sanitize_text_field( wp_unslash( $_REQUEST['context']['adminPage'] ?? '' ) );
319
+ $has_access = ( in_array( $admin_page, array( 'widgets-php', 'site-editor-php' ), true ) && current_user_can( 'edit_theme_options' ) );
320
+ $has_access = $has_access || $post_id && current_user_can( 'edit_post', $post_id );
321
 
322
+ if ( $has_access ) {
323
+ $current_action = current_action();
324
+ $shortcode = ! empty( $_REQUEST['shortcode'] ) ? wp_unslash( $_REQUEST['shortcode'] ) : ''; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
325
 
326
+ if ( ! apply_filters( 'yith_plugin_fw_gutenberg_skip_shortcode_sanitize', false ) ) {
327
+ $shortcode = sanitize_text_field( stripslashes( $shortcode ) );
328
+ }
329
 
330
+ ob_start();
331
 
332
+ do_action( 'yith_plugin_fw_gutenberg_before_do_shortcode', $shortcode, $current_action );
333
+ echo do_shortcode( apply_filters( 'yith_plugin_fw_gutenberg_shortcode', $shortcode, $current_action ) );
334
+ do_action( 'yith_plugin_fw_gutenberg_after_do_shortcode', $shortcode, $current_action );
335
+
336
+ $html = ob_get_clean();
337
 
338
+ wp_send_json(
339
+ array(
340
+ 'html' => $html,
341
+ )
342
+ );
343
+
344
+ }
345
  }
346
  }
347
  }
plugin-fw/includes/class-yit-ajax.php CHANGED
@@ -241,7 +241,7 @@ if ( ! class_exists( 'YIT_Ajax' ) ) {
241
  die();
242
  }
243
 
244
- $terms = yith_get_terms( $args );
245
 
246
  if ( 'id' !== $args['term_field'] ) {
247
  $temp_terms = $terms;
@@ -252,6 +252,7 @@ if ( ! class_exists( 'YIT_Ajax' ) ) {
252
  }
253
  }
254
 
 
255
  wp_send_json( $terms );
256
  }
257
  }
241
  die();
242
  }
243
 
244
+ $terms = get_terms( $args );
245
 
246
  if ( 'id' !== $args['term_field'] ) {
247
  $temp_terms = $terms;
252
  }
253
  }
254
 
255
+ $terms = apply_filters( 'yith_plugin_fw_json_search_found_terms', $terms, $args );
256
  wp_send_json( $terms );
257
  }
258
  }
plugin-fw/includes/class-yith-system-status.php CHANGED
@@ -55,9 +55,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
55
  /**
56
  * Main plugin Instance
57
  *
 
58
  * @return YITH_System_Status
59
  * @since 1.0.0
60
- * @author Alberto Ruggiero
61
  */
62
  public static function instance() {
63
  if ( is_null( self::$instance ) ) {
@@ -70,9 +70,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
70
  /**
71
  * Constructor
72
  *
 
73
  * @return void
74
  * @since 1.0.0
75
- * @author Alberto Ruggiero
76
  */
77
  public function __construct() {
78
 
@@ -100,9 +100,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
100
  /**
101
  * Set requirements labels
102
  *
 
103
  * @return void
104
  * @since 1.0.0
105
- * @author Alberto Ruggiero
106
  */
107
  public function set_requirements_labels() {
108
 
@@ -127,9 +127,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
127
  /**
128
  * Add "System Information" submenu page under YITH Plugins
129
  *
 
130
  * @return void
131
  * @since 1.0.0
132
- * @author Alberto Ruggiero
133
  */
134
  public function add_submenu_page() {
135
 
@@ -156,9 +156,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
156
  /**
157
  * Add "System Information" page template under YITH Plugins
158
  *
 
159
  * @return void
160
  * @since 1.0.0
161
- * @author Alberto Ruggiero
162
  */
163
  public function show_information_panel() {
164
 
@@ -171,9 +171,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
171
  /**
172
  * Perform system status check
173
  *
 
174
  * @return void
175
  * @since 1.0.0
176
- * @author Alberto Ruggiero
177
  */
178
  public function check_system_status() {
179
 
@@ -272,9 +272,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
272
  * @param string $plugin_name The name of the plugin.
273
  * @param array $requirements Array of plugin requirements.
274
  *
 
275
  * @return void
276
  * @since 1.0.0
277
- * @author Alberto Ruggiero
278
  */
279
  public function add_requirements( $plugin_name, $requirements ) {
280
 
@@ -292,9 +292,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
292
  /**
293
  * Manages notice dismissing
294
  *
 
295
  * @return void
296
  * @since 1.0.0
297
- * @author Alberto Ruggiero
298
  */
299
  public function enqueue_scripts() {
300
  $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
@@ -318,9 +318,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
318
  /**
319
  * Show system notice
320
  *
 
321
  * @return void
322
  * @since 1.0.0
323
- * @author Alberto Ruggiero
324
  */
325
  public function activate_system_notice() {
326
 
@@ -337,10 +337,10 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
337
  ?>
338
  <div id="yith-system-alert" class="notice notice-error is-dismissible" style="position: relative;">
339
  <p>
340
- <span class="yith-logo"><img src="<?php echo esc_attr( yith_plugin_fw_get_default_logo() ); ?>" /></span>
341
  <b>
342
  <?php esc_html_e( 'Warning!', 'yith-plugin-fw' ); ?>
343
- </b><br />
344
  <?php
345
  /* translators: %1$s open link tag, %2$s open link tag*/
346
  echo sprintf( esc_html__( 'The system check has detected some compatibility issues on your installation.%1$sClick here%2$s to know more', 'yith-plugin-fw' ), '<a href="' . esc_url( add_query_arg( array( 'page' => $this->page ), admin_url( 'admin.php' ) ) ) . '">', '</a>' );
@@ -356,9 +356,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
356
  /**
357
  * Get system information
358
  *
 
359
  * @return array
360
  * @since 1.0.0
361
- * @author Alberto Ruggiero
362
  */
363
  public function get_system_info() {
364
  $tls = $this->get_tls_version();
@@ -403,11 +403,16 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
403
  /**
404
  * Get log file
405
  *
 
406
  * @return void
407
  * @since 1.0.0
408
- * @author Alberto Ruggiero
409
  */
410
  public function create_log_file() {
 
 
 
 
 
411
  try {
412
 
413
  global $wp_filesystem;
@@ -419,7 +424,7 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
419
 
420
  $download_file = false;
421
  $file_content = '';
422
- $requested_file = $_POST['file']; //phpcs:ignore
423
 
424
  switch ( $requested_file ) {
425
  case 'error_log':
@@ -431,9 +436,12 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
431
  }
432
 
433
  if ( '' !== $file_content ) {
434
- $file = wp_upload_dir()['basedir'] . '/' . $requested_file . '.txt';
435
- $download_file = wp_upload_dir()['baseurl'] . '/' . $requested_file . '.txt';
436
- $wp_filesystem->put_contents( $file, $file_content );
 
 
 
437
  }
438
 
439
  wp_send_json( array( 'file' => $download_file ) );
@@ -447,9 +455,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
447
  *
448
  * @param string $memory_size Memory size to convert.
449
  *
 
450
  * @return integer
451
  * @since 1.0.0
452
- * @author Alberto Ruggiero
453
  */
454
  public function memory_size_to_num( $memory_size ) {
455
  $unit = strtoupper( substr( $memory_size, - 1 ) );
@@ -478,9 +486,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
478
  * @param string $key Requirement Key.
479
  * @param mixed $value Requirement value.
480
  *
 
481
  * @return void
482
  * @since 1.0.0
483
- * @author Alberto Ruggiero
484
  */
485
  public function format_requirement_value( $key, $value ) {
486
 
@@ -505,9 +513,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
505
  * @param array $item Requirement item.
506
  * @param string $label Requirement label.
507
  *
 
508
  * @return void
509
  * @since 1.0.0
510
- * @author Alberto Ruggiero
511
  */
512
  public function print_error_messages( $key, $item, $label ) {
513
  ?>
@@ -539,9 +547,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
539
  * @param array $item Requirement item.
540
  * @param string $label Requirement label.
541
  *
 
542
  * @return void
543
  * @since 1.0.0
544
- * @author Alberto Ruggiero
545
  */
546
  public function print_solution_suggestion( $key, $item, $label ) {
547
  switch ( $key ) {
@@ -586,9 +594,9 @@ if ( ! class_exists( 'YITH_System_Status' ) ) {
586
  *
587
  * @param string $key Requirement Key.
588
  *
 
589
  * @return void
590
  * @since 1.0.0
591
- * @author Alberto Ruggiero
592
  */
593
  public function print_warning_messages( $key ) {
594
  switch ( $key ) {
@@ -801,9 +809,9 @@ if ( ! function_exists( 'YITH_System_Status' ) ) {
801
  /**
802
  * Single instance of YITH_System_Status
803
  *
 
804
  * @return YITH_System_Status
805
  * @since 1.0
806
- * @author Alberto Ruggiero
807
  */
808
  function YITH_System_Status() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
809
  return YITH_System_Status::instance();
55
  /**
56
  * Main plugin Instance
57
  *
58
+ * @author Alberto Ruggiero
59
  * @return YITH_System_Status
60
  * @since 1.0.0
 
61
  */
62
  public static function instance() {
63
  if ( is_null( self::$instance ) ) {
70
  /**
71
  * Constructor
72
  *
73
+ * @author Alberto Ruggiero
74
  * @return void
75
  * @since 1.0.0
 
76
  */
77
  public function __construct() {
78
 
100
  /**
101
  * Set requirements labels
102
  *
103
+ * @author Alberto Ruggiero
104
  * @return void
105
  * @since 1.0.0
 
106
  */
107
  public function set_requirements_labels() {
108
 
127
  /**
128
  * Add "System Information" submenu page under YITH Plugins
129
  *
130
+ * @author Alberto Ruggiero
131
  * @return void
132
  * @since 1.0.0
 
133
  */
134
  public function add_submenu_page() {
135
 
156
  /**
157
  * Add "System Information" page template under YITH Plugins
158
  *
159
+ * @author Alberto Ruggiero
160
  * @return void
161
  * @since 1.0.0
 
162
  */
163
  public function show_information_panel() {
164
 
171
  /**
172
  * Perform system status check
173
  *
174
+ * @author Alberto Ruggiero
175
  * @return void
176
  * @since 1.0.0
 
177
  */
178
  public function check_system_status() {
179
 
272
  * @param string $plugin_name The name of the plugin.
273
  * @param array $requirements Array of plugin requirements.
274
  *
275
+ * @author Alberto Ruggiero
276
  * @return void
277
  * @since 1.0.0
 
278
  */
279
  public function add_requirements( $plugin_name, $requirements ) {
280
 
292
  /**
293
  * Manages notice dismissing
294
  *
295
+ * @author Alberto Ruggiero
296
  * @return void
297
  * @since 1.0.0
 
298
  */
299
  public function enqueue_scripts() {
300
  $script_path = defined( 'YIT_CORE_PLUGIN_URL' ) ? YIT_CORE_PLUGIN_URL : get_template_directory_uri() . '/core/plugin-fw';
318
  /**
319
  * Show system notice
320
  *
321
+ * @author Alberto Ruggiero
322
  * @return void
323
  * @since 1.0.0
 
324
  */
325
  public function activate_system_notice() {
326
 
337
  ?>
338
  <div id="yith-system-alert" class="notice notice-error is-dismissible" style="position: relative;">
339
  <p>
340
+ <span class="yith-logo"><img src="<?php echo esc_attr( yith_plugin_fw_get_default_logo() ); ?>"/></span>
341
  <b>
342
  <?php esc_html_e( 'Warning!', 'yith-plugin-fw' ); ?>
343
+ </b><br/>
344
  <?php
345
  /* translators: %1$s open link tag, %2$s open link tag*/
346
  echo sprintf( esc_html__( 'The system check has detected some compatibility issues on your installation.%1$sClick here%2$s to know more', 'yith-plugin-fw' ), '<a href="' . esc_url( add_query_arg( array( 'page' => $this->page ), admin_url( 'admin.php' ) ) ) . '">', '</a>' );
356
  /**
357
  * Get system information
358
  *
359
+ * @author Alberto Ruggiero
360
  * @return array
361
  * @since 1.0.0
 
362
  */
363
  public function get_system_info() {
364
  $tls = $this->get_tls_version();
403
  /**
404
  * Get log file
405
  *
406
+ * @author Alberto Ruggiero
407
  * @return void
408
  * @since 1.0.0
 
409
  */
410
  public function create_log_file() {
411
+ if ( ! current_user_can( 'manage_options' ) || ! isset( $_POST['nonce'], $_POST['file'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'yith-export-log' ) ) {
412
+ wp_send_json( array( 'file' => false ) );
413
+ exit;
414
+ }
415
+
416
  try {
417
 
418
  global $wp_filesystem;
424
 
425
  $download_file = false;
426
  $file_content = '';
427
+ $requested_file = sanitize_text_field( wp_unslash( $_POST['file'] ) );
428
 
429
  switch ( $requested_file ) {
430
  case 'error_log':
436
  }
437
 
438
  if ( '' !== $file_content ) {
439
+ $domain = str_replace( array( 'http://', 'https://' ), '', network_site_url() );
440
+ $hash = substr( wp_hash( $domain ), 0, 16 );
441
+ $file = wp_upload_dir()['basedir'] . '/log-' . $hash . '.txt';
442
+ $download_file = wp_upload_dir()['baseurl'] . '/log-' . $hash . '.txt';
443
+
444
+ $r = $wp_filesystem->put_contents( $file, $file_content );
445
  }
446
 
447
  wp_send_json( array( 'file' => $download_file ) );
455
  *
456
  * @param string $memory_size Memory size to convert.
457
  *
458
+ * @author Alberto Ruggiero
459
  * @return integer
460
  * @since 1.0.0
 
461
  */
462
  public function memory_size_to_num( $memory_size ) {
463
  $unit = strtoupper( substr( $memory_size, - 1 ) );
486
  * @param string $key Requirement Key.
487
  * @param mixed $value Requirement value.
488
  *
489
+ * @author Alberto Ruggiero
490
  * @return void
491
  * @since 1.0.0
 
492
  */
493
  public function format_requirement_value( $key, $value ) {
494
 
513
  * @param array $item Requirement item.
514
  * @param string $label Requirement label.
515
  *
516
+ * @author Alberto Ruggiero
517
  * @return void
518
  * @since 1.0.0
 
519
  */
520
  public function print_error_messages( $key, $item, $label ) {
521
  ?>
547
  * @param array $item Requirement item.
548
  * @param string $label Requirement label.
549
  *
550
+ * @author Alberto Ruggiero
551
  * @return void
552
  * @since 1.0.0
 
553
  */
554
  public function print_solution_suggestion( $key, $item, $label ) {
555
  switch ( $key ) {
594
  *
595
  * @param string $key Requirement Key.
596
  *
597
+ * @author Alberto Ruggiero
598
  * @return void
599
  * @since 1.0.0
 
600
  */
601
  public function print_warning_messages( $key ) {
602
  switch ( $key ) {
809
  /**
810
  * Single instance of YITH_System_Status
811
  *
812
+ * @author Alberto Ruggiero
813
  * @return YITH_System_Status
814
  * @since 1.0
 
815
  */
816
  function YITH_System_Status() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
817
  return YITH_System_Status::instance();
plugin-fw/init.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
- * Version: 3.9.16
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author YITH
10
- * @version 3.9.16
11
  * @package YITH\PluginFramework
12
  */
13
 
1
  <?php
2
  /**
3
  * Framework Name: YIT Plugin Framework
4
+ * Version: 3.9.17
5
  * Author: YITH
6
  * Text Domain: yith-plugin-fw
7
  * Domain Path: /languages/
8
  *
9
  * @author YITH
10
+ * @version 3.9.17
11
  * @package YITH\PluginFramework
12
  */
13
 
plugin-fw/languages/yith-plugin-fw-el.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2022-10-04 10:25:50+00:00\n"
8
  "PO-Revision-Date: 2021-02-11 18:07:46+0000\n"
9
  "Language: el_GR\n"
10
  "MIME-Version: 1.0\n"
@@ -329,34 +329,34 @@ msgstr ""
329
  "Ο έλεγχος συστήματος έχει εντοπίσει κάποια προβλήματα συμβατότητας στην "
330
  "εγκατάστασή σας.%1$sΚάντε κλικ εδώ%2$s για να μάθετε περισσότερα"
331
 
332
- #: includes/class-yith-system-status.php:488
333
  msgid "Enabled"
334
  msgstr "Ενεργοποιημένο"
335
 
336
- #: includes/class-yith-system-status.php:488
337
  msgid "Disabled"
338
  msgstr "Απενεργοποιημένο"
339
 
340
- #: includes/class-yith-system-status.php:493
341
  msgid "N/A"
342
  msgstr "N/A"
343
 
344
  #. translators: %1$s plugin name, %2$s requirement name
345
- #: includes/class-yith-system-status.php:520
346
  msgid "%1$s needs %2$s enabled"
347
  msgstr "%1$s χρειάζεται %2$s ενεργοποιημένο"
348
 
349
  #. translators: %1$s plugin name, %2$s required memory amount
350
- #: includes/class-yith-system-status.php:523
351
  msgid "%1$s needs at least %2$s of available memory"
352
  msgstr "%1$s χρειάζεται τουλάχιστον %2$s διαθέσιμης μνήμης"
353
 
354
  #. translators: %1$s plugin name, %2$s version number
355
- #: includes/class-yith-system-status.php:526
356
  msgid "%1$s needs at least %2$s version"
357
  msgstr "%1$s χρειάζεται τουλάχιστον %2$s έκδοση"
358
 
359
- #: includes/class-yith-system-status.php:550
360
  msgid ""
361
  "Update it to the latest version in order to benefit of all new features and "
362
  "security updates."
@@ -364,27 +364,27 @@ msgstr ""
364
  "Κάντε αναβάθμιση της τελευταίας έκδοσης για να επωφεληθείτε από τα νέα "
365
  "χαρακτηριστικά και τις αναβαθμίσεις προστασίας."
366
 
367
- #: includes/class-yith-system-status.php:554
368
- #: includes/class-yith-system-status.php:560
369
  msgid "Contact your hosting company in order to update it."
370
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να αναβαθμίσετε."
371
 
372
- #: includes/class-yith-system-status.php:558
373
  msgid "Contact your hosting company in order to install it."
374
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να το ενεργοποιήσετε."
375
 
376
  #. translators: %1$s code, %2$s file name
377
- #: includes/class-yith-system-status.php:565
378
  msgid "Remove %1$s from %2$s file"
379
  msgstr "Αφαίρεση %1$s από αρχείο %2$s"
380
 
381
- #: includes/class-yith-system-status.php:573
382
  msgid "Contact your hosting company in order to enable it."
383
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να ενεργοποιήσετε."
384
 
385
  #. translators: %1$s opening link tag, %2$s closing link tag
386
- #: includes/class-yith-system-status.php:577
387
- #: includes/class-yith-system-status.php:600
388
  msgid ""
389
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
390
  "it."
@@ -393,7 +393,7 @@ msgstr ""
393
  "για να το βελτιώσετε."
394
 
395
  #. translators: %s recommended memory amount
396
- #: includes/class-yith-system-status.php:597
397
  msgid ""
398
  "For optimal functioning of our plugins, we suggest setting at least %s of "
399
  "available memory"
@@ -402,7 +402,7 @@ msgstr ""
402
  "τουλάχιστον %s διαθέσιμης μνήμης"
403
 
404
  #. translators: %1$s TLS label, %2$s cURL label
405
- #: includes/class-yith-system-status.php:605
406
  msgid ""
407
  "The system check cannot determine which %1$s version is installed because "
408
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -412,7 +412,7 @@ msgstr ""
412
  "να το ενεργοποιήσει."
413
 
414
  #. translators: %1$s TLS label
415
- #: includes/class-yith-system-status.php:608
416
  msgid ""
417
  "The system check cannot determine which %1$s version is installed due to a "
418
  "connection issue between your site and our server."
@@ -618,13 +618,13 @@ msgstr "Αρχείο PHP error_log"
618
  msgid "Download"
619
  msgstr "Κατέβασμα"
620
 
621
- #: templates/sysinfo/tabs/error-log.php:72
622
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
623
  msgstr ""
624
  "Το μέγεθος αρχείου υπερβαίνει τα 8 megabytes οπότε θα πρέπει να το κατεβάσετε"
625
 
626
  #. translators: %s file name.
627
- #: templates/sysinfo/tabs/error-log.php:96
628
  msgid ""
629
  "No Log file available. Enable the WordPress debug by adding this in the %s "
630
  "file of your installation"
@@ -632,11 +632,11 @@ msgstr ""
632
  "Δεν υπάρχει διαθέσιμο αρχείο Καταγραφής. Ενεργοποιήστε την αποσφαλμάτωση "
633
  "WordPress προσθέτοντάς το στο αρχείο %s της εγκατάστασής σας"
634
 
635
- #: templates/sysinfo/tabs/error-log.php:105
636
  msgid "Copied!"
637
  msgstr "Έγινε αντιγραφή!"
638
 
639
- #: templates/sysinfo/tabs/error-log.php:105
640
  msgid "Copy Code"
641
  msgstr "Αντιγραφή Κώδικα"
642
 
@@ -755,7 +755,7 @@ msgctxt "Elementor Widget - section title"
755
  msgid "%s - Options"
756
  msgstr ""
757
 
758
- #: includes/builders/gutenberg/class-yith-gutenberg.php:149
759
  msgctxt "[gutenberg]: Category Name"
760
  msgid "YITH"
761
  msgstr "YITH"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2022-11-11 07:31:10+00:00\n"
8
  "PO-Revision-Date: 2021-02-11 18:07:46+0000\n"
9
  "Language: el_GR\n"
10
  "MIME-Version: 1.0\n"
329
  "Ο έλεγχος συστήματος έχει εντοπίσει κάποια προβλήματα συμβατότητας στην "
330
  "εγκατάστασή σας.%1$sΚάντε κλικ εδώ%2$s για να μάθετε περισσότερα"
331
 
332
+ #: includes/class-yith-system-status.php:496
333
  msgid "Enabled"
334
  msgstr "Ενεργοποιημένο"
335
 
336
+ #: includes/class-yith-system-status.php:496
337
  msgid "Disabled"
338
  msgstr "Απενεργοποιημένο"
339
 
340
+ #: includes/class-yith-system-status.php:501
341
  msgid "N/A"
342
  msgstr "N/A"
343
 
344
  #. translators: %1$s plugin name, %2$s requirement name
345
+ #: includes/class-yith-system-status.php:528
346
  msgid "%1$s needs %2$s enabled"
347
  msgstr "%1$s χρειάζεται %2$s ενεργοποιημένο"
348
 
349
  #. translators: %1$s plugin name, %2$s required memory amount
350
+ #: includes/class-yith-system-status.php:531
351
  msgid "%1$s needs at least %2$s of available memory"
352
  msgstr "%1$s χρειάζεται τουλάχιστον %2$s διαθέσιμης μνήμης"
353
 
354
  #. translators: %1$s plugin name, %2$s version number
355
+ #: includes/class-yith-system-status.php:534
356
  msgid "%1$s needs at least %2$s version"
357
  msgstr "%1$s χρειάζεται τουλάχιστον %2$s έκδοση"
358
 
359
+ #: includes/class-yith-system-status.php:558
360
  msgid ""
361
  "Update it to the latest version in order to benefit of all new features and "
362
  "security updates."
364
  "Κάντε αναβάθμιση της τελευταίας έκδοσης για να επωφεληθείτε από τα νέα "
365
  "χαρακτηριστικά και τις αναβαθμίσεις προστασίας."
366
 
367
+ #: includes/class-yith-system-status.php:562
368
+ #: includes/class-yith-system-status.php:568
369
  msgid "Contact your hosting company in order to update it."
370
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να αναβαθμίσετε."
371
 
372
+ #: includes/class-yith-system-status.php:566
373
  msgid "Contact your hosting company in order to install it."
374
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να το ενεργοποιήσετε."
375
 
376
  #. translators: %1$s code, %2$s file name
377
+ #: includes/class-yith-system-status.php:573
378
  msgid "Remove %1$s from %2$s file"
379
  msgstr "Αφαίρεση %1$s από αρχείο %2$s"
380
 
381
+ #: includes/class-yith-system-status.php:581
382
  msgid "Contact your hosting company in order to enable it."
383
  msgstr "Επικοινωνήστε με την εταιρεία hosting σας για να ενεργοποιήσετε."
384
 
385
  #. translators: %1$s opening link tag, %2$s closing link tag
386
+ #: includes/class-yith-system-status.php:585
387
+ #: includes/class-yith-system-status.php:608
388
  msgid ""
389
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
390
  "it."
393
  "για να το βελτιώσετε."
394
 
395
  #. translators: %s recommended memory amount
396
+ #: includes/class-yith-system-status.php:605
397
  msgid ""
398
  "For optimal functioning of our plugins, we suggest setting at least %s of "
399
  "available memory"
402
  "τουλάχιστον %s διαθέσιμης μνήμης"
403
 
404
  #. translators: %1$s TLS label, %2$s cURL label
405
+ #: includes/class-yith-system-status.php:613
406
  msgid ""
407
  "The system check cannot determine which %1$s version is installed because "
408
  "%2$s module is disabled. Ask your hosting company to enable it."
412
  "να το ενεργοποιήσει."
413
 
414
  #. translators: %1$s TLS label
415
+ #: includes/class-yith-system-status.php:616
416
  msgid ""
417
  "The system check cannot determine which %1$s version is installed due to a "
418
  "connection issue between your site and our server."
618
  msgid "Download"
619
  msgstr "Κατέβασμα"
620
 
621
+ #: templates/sysinfo/tabs/error-log.php:73
622
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
623
  msgstr ""
624
  "Το μέγεθος αρχείου υπερβαίνει τα 8 megabytes οπότε θα πρέπει να το κατεβάσετε"
625
 
626
  #. translators: %s file name.
627
+ #: templates/sysinfo/tabs/error-log.php:97
628
  msgid ""
629
  "No Log file available. Enable the WordPress debug by adding this in the %s "
630
  "file of your installation"
632
  "Δεν υπάρχει διαθέσιμο αρχείο Καταγραφής. Ενεργοποιήστε την αποσφαλμάτωση "
633
  "WordPress προσθέτοντάς το στο αρχείο %s της εγκατάστασής σας"
634
 
635
+ #: templates/sysinfo/tabs/error-log.php:106
636
  msgid "Copied!"
637
  msgstr "Έγινε αντιγραφή!"
638
 
639
+ #: templates/sysinfo/tabs/error-log.php:106
640
  msgid "Copy Code"
641
  msgstr "Αντιγραφή Κώδικα"
642
 
755
  msgid "%s - Options"
756
  msgstr ""
757
 
758
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:152
759
  msgctxt "[gutenberg]: Category Name"
760
  msgid "YITH"
761
  msgstr "YITH"
plugin-fw/languages/yith-plugin-fw-es_ES.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2022-10-04 10:25:50+00:00\n"
8
  "PO-Revision-Date: 2022-09-22 14:14:01+0000\n"
9
  "Language: es\n"
10
  "MIME-Version: 1.0\n"
@@ -340,34 +340,34 @@ msgstr ""
340
  "La comprobación del sistema ha detectado algunos problemas de compatibilidad "
341
  "en tu instalación.%1$sHaz clic quí%2$s para saber más"
342
 
343
- #: includes/class-yith-system-status.php:488
344
  msgid "Enabled"
345
  msgstr "Activado"
346
 
347
- #: includes/class-yith-system-status.php:488
348
  msgid "Disabled"
349
  msgstr "Desactivado"
350
 
351
- #: includes/class-yith-system-status.php:493
352
  msgid "N/A"
353
  msgstr "N/D"
354
 
355
  #. translators: %1$s plugin name, %2$s requirement name
356
- #: includes/class-yith-system-status.php:520
357
  msgid "%1$s needs %2$s enabled"
358
  msgstr "%1$s necesita %2$s activado"
359
 
360
  #. translators: %1$s plugin name, %2$s required memory amount
361
- #: includes/class-yith-system-status.php:523
362
  msgid "%1$s needs at least %2$s of available memory"
363
  msgstr "%1$s necesita al menos %2$s de memoria disponible"
364
 
365
  #. translators: %1$s plugin name, %2$s version number
366
- #: includes/class-yith-system-status.php:526
367
  msgid "%1$s needs at least %2$s version"
368
  msgstr "%1$s necesita al menos la versión %2$s"
369
 
370
- #: includes/class-yith-system-status.php:550
371
  msgid ""
372
  "Update it to the latest version in order to benefit of all new features and "
373
  "security updates."
@@ -375,27 +375,27 @@ msgstr ""
375
  "Actualízalo a la última versión para beneficiarte de todas las "
376
  "características y actualizaciones de seguridad."
377
 
378
- #: includes/class-yith-system-status.php:554
379
- #: includes/class-yith-system-status.php:560
380
  msgid "Contact your hosting company in order to update it."
381
  msgstr "Ponte en contacto con tu empresa de hosting para actualizarlo."
382
 
383
- #: includes/class-yith-system-status.php:558
384
  msgid "Contact your hosting company in order to install it."
385
  msgstr "Ponte en contacto con tu empresa de hosting para instalarlo."
386
 
387
  #. translators: %1$s code, %2$s file name
388
- #: includes/class-yith-system-status.php:565
389
  msgid "Remove %1$s from %2$s file"
390
  msgstr "Eliminar %1$s desde el archivo %2$s "
391
 
392
- #: includes/class-yith-system-status.php:573
393
  msgid "Contact your hosting company in order to enable it."
394
  msgstr "Contacta con tu empresa de hosting para activarlo."
395
 
396
  #. translators: %1$s opening link tag, %2$s closing link tag
397
- #: includes/class-yith-system-status.php:577
398
- #: includes/class-yith-system-status.php:600
399
  msgid ""
400
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
401
  "it."
@@ -403,7 +403,7 @@ msgstr ""
403
  "Lee más %1$saquí%2$s o contacta a tu empresa de hosting para incrementarlo."
404
 
405
  #. translators: %s recommended memory amount
406
- #: includes/class-yith-system-status.php:597
407
  msgid ""
408
  "For optimal functioning of our plugins, we suggest setting at least %s of "
409
  "available memory"
@@ -412,7 +412,7 @@ msgstr ""
412
  "memoria disponible"
413
 
414
  #. translators: %1$s TLS label, %2$s cURL label
415
- #: includes/class-yith-system-status.php:605
416
  msgid ""
417
  "The system check cannot determine which %1$s version is installed because "
418
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -422,7 +422,7 @@ msgstr ""
422
  "hosting que lo active."
423
 
424
  #. translators: %1$s TLS label
425
- #: includes/class-yith-system-status.php:608
426
  msgid ""
427
  "The system check cannot determine which %1$s version is installed due to a "
428
  "connection issue between your site and our server."
@@ -627,12 +627,12 @@ msgstr "Archivo PHP error_log"
627
  msgid "Download"
628
  msgstr "Descargar"
629
 
630
- #: templates/sysinfo/tabs/error-log.php:72
631
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
632
  msgstr "El archivo excede los 8 megabytes por lo que debe ser descargado"
633
 
634
  #. translators: %s file name.
635
- #: templates/sysinfo/tabs/error-log.php:96
636
  msgid ""
637
  "No Log file available. Enable the WordPress debug by adding this in the %s "
638
  "file of your installation"
@@ -640,11 +640,11 @@ msgstr ""
640
  "No hay archivo de registro disponible. Activa la depuración de WordPress "
641
  "añadiendo este código en el archivo %s de tu instalación"
642
 
643
- #: templates/sysinfo/tabs/error-log.php:105
644
  msgid "Copied!"
645
  msgstr "¡Copiado!"
646
 
647
- #: templates/sysinfo/tabs/error-log.php:105
648
  msgid "Copy Code"
649
  msgstr "Copiar código"
650
 
@@ -767,7 +767,7 @@ msgctxt "Elementor Widget - section title"
767
  msgid "%s - Options"
768
  msgstr "%s - Opciones"
769
 
770
- #: includes/builders/gutenberg/class-yith-gutenberg.php:149
771
  msgctxt "[gutenberg]: Category Name"
772
  msgid "YITH"
773
  msgstr "YITH"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2022-11-11 07:31:10+00:00\n"
8
  "PO-Revision-Date: 2022-09-22 14:14:01+0000\n"
9
  "Language: es\n"
10
  "MIME-Version: 1.0\n"
340
  "La comprobación del sistema ha detectado algunos problemas de compatibilidad "
341
  "en tu instalación.%1$sHaz clic quí%2$s para saber más"
342
 
343
+ #: includes/class-yith-system-status.php:496
344
  msgid "Enabled"
345
  msgstr "Activado"
346
 
347
+ #: includes/class-yith-system-status.php:496
348
  msgid "Disabled"
349
  msgstr "Desactivado"
350
 
351
+ #: includes/class-yith-system-status.php:501
352
  msgid "N/A"
353
  msgstr "N/D"
354
 
355
  #. translators: %1$s plugin name, %2$s requirement name
356
+ #: includes/class-yith-system-status.php:528
357
  msgid "%1$s needs %2$s enabled"
358
  msgstr "%1$s necesita %2$s activado"
359
 
360
  #. translators: %1$s plugin name, %2$s required memory amount
361
+ #: includes/class-yith-system-status.php:531
362
  msgid "%1$s needs at least %2$s of available memory"
363
  msgstr "%1$s necesita al menos %2$s de memoria disponible"
364
 
365
  #. translators: %1$s plugin name, %2$s version number
366
+ #: includes/class-yith-system-status.php:534
367
  msgid "%1$s needs at least %2$s version"
368
  msgstr "%1$s necesita al menos la versión %2$s"
369
 
370
+ #: includes/class-yith-system-status.php:558
371
  msgid ""
372
  "Update it to the latest version in order to benefit of all new features and "
373
  "security updates."
375
  "Actualízalo a la última versión para beneficiarte de todas las "
376
  "características y actualizaciones de seguridad."
377
 
378
+ #: includes/class-yith-system-status.php:562
379
+ #: includes/class-yith-system-status.php:568
380
  msgid "Contact your hosting company in order to update it."
381
  msgstr "Ponte en contacto con tu empresa de hosting para actualizarlo."
382
 
383
+ #: includes/class-yith-system-status.php:566
384
  msgid "Contact your hosting company in order to install it."
385
  msgstr "Ponte en contacto con tu empresa de hosting para instalarlo."
386
 
387
  #. translators: %1$s code, %2$s file name
388
+ #: includes/class-yith-system-status.php:573
389
  msgid "Remove %1$s from %2$s file"
390
  msgstr "Eliminar %1$s desde el archivo %2$s "
391
 
392
+ #: includes/class-yith-system-status.php:581
393
  msgid "Contact your hosting company in order to enable it."
394
  msgstr "Contacta con tu empresa de hosting para activarlo."
395
 
396
  #. translators: %1$s opening link tag, %2$s closing link tag
397
+ #: includes/class-yith-system-status.php:585
398
+ #: includes/class-yith-system-status.php:608
399
  msgid ""
400
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
401
  "it."
403
  "Lee más %1$saquí%2$s o contacta a tu empresa de hosting para incrementarlo."
404
 
405
  #. translators: %s recommended memory amount
406
+ #: includes/class-yith-system-status.php:605
407
  msgid ""
408
  "For optimal functioning of our plugins, we suggest setting at least %s of "
409
  "available memory"
412
  "memoria disponible"
413
 
414
  #. translators: %1$s TLS label, %2$s cURL label
415
+ #: includes/class-yith-system-status.php:613
416
  msgid ""
417
  "The system check cannot determine which %1$s version is installed because "
418
  "%2$s module is disabled. Ask your hosting company to enable it."
422
  "hosting que lo active."
423
 
424
  #. translators: %1$s TLS label
425
+ #: includes/class-yith-system-status.php:616
426
  msgid ""
427
  "The system check cannot determine which %1$s version is installed due to a "
428
  "connection issue between your site and our server."
627
  msgid "Download"
628
  msgstr "Descargar"
629
 
630
+ #: templates/sysinfo/tabs/error-log.php:73
631
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
632
  msgstr "El archivo excede los 8 megabytes por lo que debe ser descargado"
633
 
634
  #. translators: %s file name.
635
+ #: templates/sysinfo/tabs/error-log.php:97
636
  msgid ""
637
  "No Log file available. Enable the WordPress debug by adding this in the %s "
638
  "file of your installation"
640
  "No hay archivo de registro disponible. Activa la depuración de WordPress "
641
  "añadiendo este código en el archivo %s de tu instalación"
642
 
643
+ #: templates/sysinfo/tabs/error-log.php:106
644
  msgid "Copied!"
645
  msgstr "¡Copiado!"
646
 
647
+ #: templates/sysinfo/tabs/error-log.php:106
648
  msgid "Copy Code"
649
  msgstr "Copiar código"
650
 
767
  msgid "%s - Options"
768
  msgstr "%s - Opciones"
769
 
770
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:152
771
  msgctxt "[gutenberg]: Category Name"
772
  msgid "YITH"
773
  msgstr "YITH"
plugin-fw/languages/yith-plugin-fw-it_IT.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2022-10-04 10:25:50+00:00\n"
8
  "PO-Revision-Date: 2022-08-12 07:42:56+0000\n"
9
  "Language: it\n"
10
  "MIME-Version: 1.0\n"
@@ -337,34 +337,34 @@ msgstr ""
337
  "Il controllo di sistema ha individuato delle incompatibilità con la tua "
338
  "installazione. %1$sVedi qui%2$s per maggiori dettagli"
339
 
340
- #: includes/class-yith-system-status.php:488
341
  msgid "Enabled"
342
  msgstr "Abilitato"
343
 
344
- #: includes/class-yith-system-status.php:488
345
  msgid "Disabled"
346
  msgstr "Disabilitato"
347
 
348
- #: includes/class-yith-system-status.php:493
349
  msgid "N/A"
350
  msgstr "N.D."
351
 
352
  #. translators: %1$s plugin name, %2$s requirement name
353
- #: includes/class-yith-system-status.php:520
354
  msgid "%1$s needs %2$s enabled"
355
  msgstr "%1$s necessita dell'attivazione di %2$s"
356
 
357
  #. translators: %1$s plugin name, %2$s required memory amount
358
- #: includes/class-yith-system-status.php:523
359
  msgid "%1$s needs at least %2$s of available memory"
360
  msgstr "%1$s necessita di almeno %2$s di memoria disponibile"
361
 
362
  #. translators: %1$s plugin name, %2$s version number
363
- #: includes/class-yith-system-status.php:526
364
  msgid "%1$s needs at least %2$s version"
365
  msgstr "%1$s necessita almeno della versione %2$s"
366
 
367
- #: includes/class-yith-system-status.php:550
368
  msgid ""
369
  "Update it to the latest version in order to benefit of all new features and "
370
  "security updates."
@@ -372,27 +372,27 @@ msgstr ""
372
  "Aggiorna all'ultima versione per beneficiare di tutte le nuove funzionalità "
373
  "e degli aggiornamenti di sicurezza."
374
 
375
- #: includes/class-yith-system-status.php:554
376
- #: includes/class-yith-system-status.php:560
377
  msgid "Contact your hosting company in order to update it."
378
  msgstr "Contatta il tuo servizio hosting per aggiornarlo."
379
 
380
- #: includes/class-yith-system-status.php:558
381
  msgid "Contact your hosting company in order to install it."
382
  msgstr "Per installarlo contatta il tuo servizio di hosting."
383
 
384
  #. translators: %1$s code, %2$s file name
385
- #: includes/class-yith-system-status.php:565
386
  msgid "Remove %1$s from %2$s file"
387
  msgstr "Rimuovi %1$s dal file %2$s"
388
 
389
- #: includes/class-yith-system-status.php:573
390
  msgid "Contact your hosting company in order to enable it."
391
  msgstr "Per attivarlo contatta il tuo servizio di hosting."
392
 
393
  #. translators: %1$s opening link tag, %2$s closing link tag
394
- #: includes/class-yith-system-status.php:577
395
- #: includes/class-yith-system-status.php:600
396
  msgid ""
397
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
398
  "it."
@@ -401,7 +401,7 @@ msgstr ""
401
  "per un upgrade."
402
 
403
  #. translators: %s recommended memory amount
404
- #: includes/class-yith-system-status.php:597
405
  msgid ""
406
  "For optimal functioning of our plugins, we suggest setting at least %s of "
407
  "available memory"
@@ -410,7 +410,7 @@ msgstr ""
410
  "almeno %s della memoria disponibile"
411
 
412
  #. translators: %1$s TLS label, %2$s cURL label
413
- #: includes/class-yith-system-status.php:605
414
  msgid ""
415
  "The system check cannot determine which %1$s version is installed because "
416
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -420,7 +420,7 @@ msgstr ""
420
  "attivarlo."
421
 
422
  #. translators: %1$s TLS label
423
- #: includes/class-yith-system-status.php:608
424
  msgid ""
425
  "The system check cannot determine which %1$s version is installed due to a "
426
  "connection issue between your site and our server."
@@ -625,14 +625,14 @@ msgstr "PHP error_log file"
625
  msgid "Download"
626
  msgstr "Scarica"
627
 
628
- #: templates/sysinfo/tabs/error-log.php:72
629
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
630
  msgstr ""
631
  "La dimensione del file supera gli 8 megabyte ed è quindi necessario "
632
  "scaricarlo"
633
 
634
  #. translators: %s file name.
635
- #: templates/sysinfo/tabs/error-log.php:96
636
  msgid ""
637
  "No Log file available. Enable the WordPress debug by adding this in the %s "
638
  "file of your installation"
@@ -640,11 +640,11 @@ msgstr ""
640
  "Nessun file log disponibile. Abilita il debug WordPress aggiungendo questo "
641
  "nel file %s della tua installazione"
642
 
643
- #: templates/sysinfo/tabs/error-log.php:105
644
  msgid "Copied!"
645
  msgstr "Copiato!"
646
 
647
- #: templates/sysinfo/tabs/error-log.php:105
648
  msgid "Copy Code"
649
  msgstr "Copia codice"
650
 
@@ -767,7 +767,7 @@ msgctxt "Elementor Widget - section title"
767
  msgid "%s - Options"
768
  msgstr "%s - Opzioni"
769
 
770
- #: includes/builders/gutenberg/class-yith-gutenberg.php:149
771
  msgctxt "[gutenberg]: Category Name"
772
  msgid "YITH"
773
  msgstr "YITH"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2022-11-11 07:31:10+00:00\n"
8
  "PO-Revision-Date: 2022-08-12 07:42:56+0000\n"
9
  "Language: it\n"
10
  "MIME-Version: 1.0\n"
337
  "Il controllo di sistema ha individuato delle incompatibilità con la tua "
338
  "installazione. %1$sVedi qui%2$s per maggiori dettagli"
339
 
340
+ #: includes/class-yith-system-status.php:496
341
  msgid "Enabled"
342
  msgstr "Abilitato"
343
 
344
+ #: includes/class-yith-system-status.php:496
345
  msgid "Disabled"
346
  msgstr "Disabilitato"
347
 
348
+ #: includes/class-yith-system-status.php:501
349
  msgid "N/A"
350
  msgstr "N.D."
351
 
352
  #. translators: %1$s plugin name, %2$s requirement name
353
+ #: includes/class-yith-system-status.php:528
354
  msgid "%1$s needs %2$s enabled"
355
  msgstr "%1$s necessita dell'attivazione di %2$s"
356
 
357
  #. translators: %1$s plugin name, %2$s required memory amount
358
+ #: includes/class-yith-system-status.php:531
359
  msgid "%1$s needs at least %2$s of available memory"
360
  msgstr "%1$s necessita di almeno %2$s di memoria disponibile"
361
 
362
  #. translators: %1$s plugin name, %2$s version number
363
+ #: includes/class-yith-system-status.php:534
364
  msgid "%1$s needs at least %2$s version"
365
  msgstr "%1$s necessita almeno della versione %2$s"
366
 
367
+ #: includes/class-yith-system-status.php:558
368
  msgid ""
369
  "Update it to the latest version in order to benefit of all new features and "
370
  "security updates."
372
  "Aggiorna all'ultima versione per beneficiare di tutte le nuove funzionalità "
373
  "e degli aggiornamenti di sicurezza."
374
 
375
+ #: includes/class-yith-system-status.php:562
376
+ #: includes/class-yith-system-status.php:568
377
  msgid "Contact your hosting company in order to update it."
378
  msgstr "Contatta il tuo servizio hosting per aggiornarlo."
379
 
380
+ #: includes/class-yith-system-status.php:566
381
  msgid "Contact your hosting company in order to install it."
382
  msgstr "Per installarlo contatta il tuo servizio di hosting."
383
 
384
  #. translators: %1$s code, %2$s file name
385
+ #: includes/class-yith-system-status.php:573
386
  msgid "Remove %1$s from %2$s file"
387
  msgstr "Rimuovi %1$s dal file %2$s"
388
 
389
+ #: includes/class-yith-system-status.php:581
390
  msgid "Contact your hosting company in order to enable it."
391
  msgstr "Per attivarlo contatta il tuo servizio di hosting."
392
 
393
  #. translators: %1$s opening link tag, %2$s closing link tag
394
+ #: includes/class-yith-system-status.php:585
395
+ #: includes/class-yith-system-status.php:608
396
  msgid ""
397
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
398
  "it."
401
  "per un upgrade."
402
 
403
  #. translators: %s recommended memory amount
404
+ #: includes/class-yith-system-status.php:605
405
  msgid ""
406
  "For optimal functioning of our plugins, we suggest setting at least %s of "
407
  "available memory"
410
  "almeno %s della memoria disponibile"
411
 
412
  #. translators: %1$s TLS label, %2$s cURL label
413
+ #: includes/class-yith-system-status.php:613
414
  msgid ""
415
  "The system check cannot determine which %1$s version is installed because "
416
  "%2$s module is disabled. Ask your hosting company to enable it."
420
  "attivarlo."
421
 
422
  #. translators: %1$s TLS label
423
+ #: includes/class-yith-system-status.php:616
424
  msgid ""
425
  "The system check cannot determine which %1$s version is installed due to a "
426
  "connection issue between your site and our server."
625
  msgid "Download"
626
  msgstr "Scarica"
627
 
628
+ #: templates/sysinfo/tabs/error-log.php:73
629
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
630
  msgstr ""
631
  "La dimensione del file supera gli 8 megabyte ed è quindi necessario "
632
  "scaricarlo"
633
 
634
  #. translators: %s file name.
635
+ #: templates/sysinfo/tabs/error-log.php:97
636
  msgid ""
637
  "No Log file available. Enable the WordPress debug by adding this in the %s "
638
  "file of your installation"
640
  "Nessun file log disponibile. Abilita il debug WordPress aggiungendo questo "
641
  "nel file %s della tua installazione"
642
 
643
+ #: templates/sysinfo/tabs/error-log.php:106
644
  msgid "Copied!"
645
  msgstr "Copiato!"
646
 
647
+ #: templates/sysinfo/tabs/error-log.php:106
648
  msgid "Copy Code"
649
  msgstr "Copia codice"
650
 
767
  msgid "%s - Options"
768
  msgstr "%s - Opzioni"
769
 
770
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:152
771
  msgctxt "[gutenberg]: Category Name"
772
  msgid "YITH"
773
  msgstr "YITH"
plugin-fw/languages/yith-plugin-fw-nl_NL.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2022-10-04 10:25:50+00:00\n"
8
  "PO-Revision-Date: 2021-12-13 12:45:02+0000\n"
9
  "Language: nl\n"
10
  "MIME-Version: 1.0\n"
@@ -339,34 +339,34 @@ msgstr ""
339
  "Het systeem heeft enkele compatibiliteitsproblemen gevonden op uw "
340
  "installatie.%1$sklik hier%2$s om meer te weten te komen"
341
 
342
- #: includes/class-yith-system-status.php:488
343
  msgid "Enabled"
344
  msgstr "Ingeschakeld"
345
 
346
- #: includes/class-yith-system-status.php:488
347
  msgid "Disabled"
348
  msgstr "Uitgeschakeld"
349
 
350
- #: includes/class-yith-system-status.php:493
351
  msgid "N/A"
352
  msgstr "N.v.t"
353
 
354
  #. translators: %1$s plugin name, %2$s requirement name
355
- #: includes/class-yith-system-status.php:520
356
  msgid "%1$s needs %2$s enabled"
357
  msgstr "%1$s heeft nodig %2$s ingeschakeld"
358
 
359
  #. translators: %1$s plugin name, %2$s required memory amount
360
- #: includes/class-yith-system-status.php:523
361
  msgid "%1$s needs at least %2$s of available memory"
362
  msgstr "%1$ss heeft ten minste %2$s beschikbaar geheugen nodig"
363
 
364
  #. translators: %1$s plugin name, %2$s version number
365
- #: includes/class-yith-system-status.php:526
366
  msgid "%1$s needs at least %2$s version"
367
  msgstr "%1$s heeft minstens %2$s versie nodig"
368
 
369
- #: includes/class-yith-system-status.php:550
370
  msgid ""
371
  "Update it to the latest version in order to benefit of all new features and "
372
  "security updates."
@@ -374,27 +374,27 @@ msgstr ""
374
  "Bijwerken naar de laatste versie, om te profiteren van alle nieuwe opties en "
375
  "veiligheidsupdates."
376
 
377
- #: includes/class-yith-system-status.php:554
378
- #: includes/class-yith-system-status.php:560
379
  msgid "Contact your hosting company in order to update it."
380
  msgstr "Neem contact op met uw hosting provider om het bij te werken."
381
 
382
- #: includes/class-yith-system-status.php:558
383
  msgid "Contact your hosting company in order to install it."
384
  msgstr "Neem contact op met je hostingbedrijf om het te installeren."
385
 
386
  #. translators: %1$s code, %2$s file name
387
- #: includes/class-yith-system-status.php:565
388
  msgid "Remove %1$s from %2$s file"
389
  msgstr "Verwijder %1$s uit %2$s bestand"
390
 
391
- #: includes/class-yith-system-status.php:573
392
  msgid "Contact your hosting company in order to enable it."
393
  msgstr "Neem contact op met uw hosting provider om het in te schakelen."
394
 
395
  #. translators: %1$s opening link tag, %2$s closing link tag
396
- #: includes/class-yith-system-status.php:577
397
- #: includes/class-yith-system-status.php:600
398
  msgid ""
399
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
400
  "it."
@@ -403,7 +403,7 @@ msgstr ""
403
  "het te verhogen."
404
 
405
  #. translators: %s recommended memory amount
406
- #: includes/class-yith-system-status.php:597
407
  msgid ""
408
  "For optimal functioning of our plugins, we suggest setting at least %s of "
409
  "available memory"
@@ -412,7 +412,7 @@ msgstr ""
412
  "beschikbaar geheugen"
413
 
414
  #. translators: %1$s TLS label, %2$s cURL label
415
- #: includes/class-yith-system-status.php:605
416
  msgid ""
417
  "The system check cannot determine which %1$s version is installed because "
418
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -421,7 +421,7 @@ msgstr ""
421
  "module is uitgeschakeld. Vraag je hostingmaatschappij om het in te schakelen."
422
 
423
  #. translators: %1$s TLS label
424
- #: includes/class-yith-system-status.php:608
425
  msgid ""
426
  "The system check cannot determine which %1$s version is installed due to a "
427
  "connection issue between your site and our server."
@@ -626,13 +626,13 @@ msgstr "PHP error_log bestand"
626
  msgid "Download"
627
  msgstr "Download"
628
 
629
- #: templates/sysinfo/tabs/error-log.php:72
630
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
631
  msgstr ""
632
  "De bestandsgrootte overschrijd 8 megabytes, dus het moet worden gedownload "
633
 
634
  #. translators: %s file name.
635
- #: templates/sysinfo/tabs/error-log.php:96
636
  msgid ""
637
  "No Log file available. Enable the WordPress debug by adding this in the %s "
638
  "file of your installation"
@@ -640,11 +640,11 @@ msgstr ""
640
  "Geen log bestand beschikbaar. WordPress debug inschakelen door dit bestand "
641
  "toe te voegen aan het %s bestand van je installatie "
642
 
643
- #: templates/sysinfo/tabs/error-log.php:105
644
  msgid "Copied!"
645
  msgstr "Gekopieerd!"
646
 
647
- #: templates/sysinfo/tabs/error-log.php:105
648
  msgid "Copy Code"
649
  msgstr "Code kopiëren"
650
 
@@ -763,7 +763,7 @@ msgctxt "Elementor Widget - section title"
763
  msgid "%s - Options"
764
  msgstr "%s - Opties"
765
 
766
- #: includes/builders/gutenberg/class-yith-gutenberg.php:149
767
  msgctxt "[gutenberg]: Category Name"
768
  msgid "YITH"
769
  msgstr "YITH"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2022-11-11 07:31:10+00:00\n"
8
  "PO-Revision-Date: 2021-12-13 12:45:02+0000\n"
9
  "Language: nl\n"
10
  "MIME-Version: 1.0\n"
339
  "Het systeem heeft enkele compatibiliteitsproblemen gevonden op uw "
340
  "installatie.%1$sklik hier%2$s om meer te weten te komen"
341
 
342
+ #: includes/class-yith-system-status.php:496
343
  msgid "Enabled"
344
  msgstr "Ingeschakeld"
345
 
346
+ #: includes/class-yith-system-status.php:496
347
  msgid "Disabled"
348
  msgstr "Uitgeschakeld"
349
 
350
+ #: includes/class-yith-system-status.php:501
351
  msgid "N/A"
352
  msgstr "N.v.t"
353
 
354
  #. translators: %1$s plugin name, %2$s requirement name
355
+ #: includes/class-yith-system-status.php:528
356
  msgid "%1$s needs %2$s enabled"
357
  msgstr "%1$s heeft nodig %2$s ingeschakeld"
358
 
359
  #. translators: %1$s plugin name, %2$s required memory amount
360
+ #: includes/class-yith-system-status.php:531
361
  msgid "%1$s needs at least %2$s of available memory"
362
  msgstr "%1$ss heeft ten minste %2$s beschikbaar geheugen nodig"
363
 
364
  #. translators: %1$s plugin name, %2$s version number
365
+ #: includes/class-yith-system-status.php:534
366
  msgid "%1$s needs at least %2$s version"
367
  msgstr "%1$s heeft minstens %2$s versie nodig"
368
 
369
+ #: includes/class-yith-system-status.php:558
370
  msgid ""
371
  "Update it to the latest version in order to benefit of all new features and "
372
  "security updates."
374
  "Bijwerken naar de laatste versie, om te profiteren van alle nieuwe opties en "
375
  "veiligheidsupdates."
376
 
377
+ #: includes/class-yith-system-status.php:562
378
+ #: includes/class-yith-system-status.php:568
379
  msgid "Contact your hosting company in order to update it."
380
  msgstr "Neem contact op met uw hosting provider om het bij te werken."
381
 
382
+ #: includes/class-yith-system-status.php:566
383
  msgid "Contact your hosting company in order to install it."
384
  msgstr "Neem contact op met je hostingbedrijf om het te installeren."
385
 
386
  #. translators: %1$s code, %2$s file name
387
+ #: includes/class-yith-system-status.php:573
388
  msgid "Remove %1$s from %2$s file"
389
  msgstr "Verwijder %1$s uit %2$s bestand"
390
 
391
+ #: includes/class-yith-system-status.php:581
392
  msgid "Contact your hosting company in order to enable it."
393
  msgstr "Neem contact op met uw hosting provider om het in te schakelen."
394
 
395
  #. translators: %1$s opening link tag, %2$s closing link tag
396
+ #: includes/class-yith-system-status.php:585
397
+ #: includes/class-yith-system-status.php:608
398
  msgid ""
399
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
400
  "it."
403
  "het te verhogen."
404
 
405
  #. translators: %s recommended memory amount
406
+ #: includes/class-yith-system-status.php:605
407
  msgid ""
408
  "For optimal functioning of our plugins, we suggest setting at least %s of "
409
  "available memory"
412
  "beschikbaar geheugen"
413
 
414
  #. translators: %1$s TLS label, %2$s cURL label
415
+ #: includes/class-yith-system-status.php:613
416
  msgid ""
417
  "The system check cannot determine which %1$s version is installed because "
418
  "%2$s module is disabled. Ask your hosting company to enable it."
421
  "module is uitgeschakeld. Vraag je hostingmaatschappij om het in te schakelen."
422
 
423
  #. translators: %1$s TLS label
424
+ #: includes/class-yith-system-status.php:616
425
  msgid ""
426
  "The system check cannot determine which %1$s version is installed due to a "
427
  "connection issue between your site and our server."
626
  msgid "Download"
627
  msgstr "Download"
628
 
629
+ #: templates/sysinfo/tabs/error-log.php:73
630
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
631
  msgstr ""
632
  "De bestandsgrootte overschrijd 8 megabytes, dus het moet worden gedownload "
633
 
634
  #. translators: %s file name.
635
+ #: templates/sysinfo/tabs/error-log.php:97
636
  msgid ""
637
  "No Log file available. Enable the WordPress debug by adding this in the %s "
638
  "file of your installation"
640
  "Geen log bestand beschikbaar. WordPress debug inschakelen door dit bestand "
641
  "toe te voegen aan het %s bestand van je installatie "
642
 
643
+ #: templates/sysinfo/tabs/error-log.php:106
644
  msgid "Copied!"
645
  msgstr "Gekopieerd!"
646
 
647
+ #: templates/sysinfo/tabs/error-log.php:106
648
  msgid "Copy Code"
649
  msgstr "Code kopiëren"
650
 
763
  msgid "%s - Options"
764
  msgstr "%s - Opties"
765
 
766
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:152
767
  msgctxt "[gutenberg]: Category Name"
768
  msgid "YITH"
769
  msgstr "YITH"
plugin-fw/languages/yith-plugin-fw-ru_RU.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2022-10-04 10:25:50+00:00\n"
8
  "PO-Revision-Date: 2022-04-05 17:22:32+0000\n"
9
  "Language: ru\n"
10
  "MIME-Version: 1.0\n"
@@ -337,34 +337,34 @@ msgstr ""
337
  "Проверка системы обнаружила некоторые проблемы совместимости в вашей "
338
  "установке.%1$sНажмите сюда%2$s чтобы узнать больше"
339
 
340
- #: includes/class-yith-system-status.php:488
341
  msgid "Enabled"
342
  msgstr "Включено"
343
 
344
- #: includes/class-yith-system-status.php:488
345
  msgid "Disabled"
346
  msgstr "Отключено"
347
 
348
- #: includes/class-yith-system-status.php:493
349
  msgid "N/A"
350
  msgstr "Б/н"
351
 
352
  #. translators: %1$s plugin name, %2$s requirement name
353
- #: includes/class-yith-system-status.php:520
354
  msgid "%1$s needs %2$s enabled"
355
  msgstr "%1$s требует включения %2$s"
356
 
357
  #. translators: %1$s plugin name, %2$s required memory amount
358
- #: includes/class-yith-system-status.php:523
359
  msgid "%1$s needs at least %2$s of available memory"
360
  msgstr "%1$s требуется не менее %2$s доступной памяти"
361
 
362
  #. translators: %1$s plugin name, %2$s version number
363
- #: includes/class-yith-system-status.php:526
364
  msgid "%1$s needs at least %2$s version"
365
  msgstr "%1$s требует как минимум %2$s версии"
366
 
367
- #: includes/class-yith-system-status.php:550
368
  msgid ""
369
  "Update it to the latest version in order to benefit of all new features and "
370
  "security updates."
@@ -372,27 +372,27 @@ msgstr ""
372
  "Обновите его до последней версии, чтобы воспользоваться всеми новыми "
373
  "функциями и обновлениями безопасности."
374
 
375
- #: includes/class-yith-system-status.php:554
376
- #: includes/class-yith-system-status.php:560
377
  msgid "Contact your hosting company in order to update it."
378
  msgstr "Свяжитесь с вашей хостинговой компанией, чтобы обновить его."
379
 
380
- #: includes/class-yith-system-status.php:558
381
  msgid "Contact your hosting company in order to install it."
382
  msgstr "Для его установки обратитесь в свою хостинговую компанию."
383
 
384
  #. translators: %1$s code, %2$s file name
385
- #: includes/class-yith-system-status.php:565
386
  msgid "Remove %1$s from %2$s file"
387
  msgstr "Удалить %1$s из файла %2$s"
388
 
389
- #: includes/class-yith-system-status.php:573
390
  msgid "Contact your hosting company in order to enable it."
391
  msgstr "Свяжитесь с вашей хостинговой компанией, чтобы включить его."
392
 
393
  #. translators: %1$s opening link tag, %2$s closing link tag
394
- #: includes/class-yith-system-status.php:577
395
- #: includes/class-yith-system-status.php:600
396
  msgid ""
397
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
398
  "it."
@@ -401,7 +401,7 @@ msgstr ""
401
  "чтобы увеличить его."
402
 
403
  #. translators: %s recommended memory amount
404
- #: includes/class-yith-system-status.php:597
405
  msgid ""
406
  "For optimal functioning of our plugins, we suggest setting at least %s of "
407
  "available memory"
@@ -410,7 +410,7 @@ msgstr ""
410
  "не менее %s доступной памяти"
411
 
412
  #. translators: %1$s TLS label, %2$s cURL label
413
- #: includes/class-yith-system-status.php:605
414
  msgid ""
415
  "The system check cannot determine which %1$s version is installed because "
416
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -420,7 +420,7 @@ msgstr ""
420
  "его."
421
 
422
  #. translators: %1$s TLS label
423
- #: includes/class-yith-system-status.php:608
424
  msgid ""
425
  "The system check cannot determine which %1$s version is installed due to a "
426
  "connection issue between your site and our server."
@@ -625,12 +625,12 @@ msgstr "PHP error_log file"
625
  msgid "Download"
626
  msgstr "Загрузка"
627
 
628
- #: templates/sysinfo/tabs/error-log.php:72
629
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
630
  msgstr "Размер файла превышает 8 мегабайт, поэтому его необходимо загрузить"
631
 
632
  #. translators: %s file name.
633
- #: templates/sysinfo/tabs/error-log.php:96
634
  msgid ""
635
  "No Log file available. Enable the WordPress debug by adding this in the %s "
636
  "file of your installation"
@@ -638,11 +638,11 @@ msgstr ""
638
  "Файл журнала недоступен. Включите отладку WordPress, добавив следующее в "
639
  "файл %s вашей установки"
640
 
641
- #: templates/sysinfo/tabs/error-log.php:105
642
  msgid "Copied!"
643
  msgstr "Скопирован!"
644
 
645
- #: templates/sysinfo/tabs/error-log.php:105
646
  msgid "Copy Code"
647
  msgstr "Копировать Код"
648
 
@@ -763,7 +763,7 @@ msgctxt "Elementor Widget - section title"
763
  msgid "%s - Options"
764
  msgstr "%s - Параметры"
765
 
766
- #: includes/builders/gutenberg/class-yith-gutenberg.php:149
767
  msgctxt "[gutenberg]: Category Name"
768
  msgid "YITH"
769
  msgstr "YITH"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2022-11-11 07:31:10+00:00\n"
8
  "PO-Revision-Date: 2022-04-05 17:22:32+0000\n"
9
  "Language: ru\n"
10
  "MIME-Version: 1.0\n"
337
  "Проверка системы обнаружила некоторые проблемы совместимости в вашей "
338
  "установке.%1$sНажмите сюда%2$s чтобы узнать больше"
339
 
340
+ #: includes/class-yith-system-status.php:496
341
  msgid "Enabled"
342
  msgstr "Включено"
343
 
344
+ #: includes/class-yith-system-status.php:496
345
  msgid "Disabled"
346
  msgstr "Отключено"
347
 
348
+ #: includes/class-yith-system-status.php:501
349
  msgid "N/A"
350
  msgstr "Б/н"
351
 
352
  #. translators: %1$s plugin name, %2$s requirement name
353
+ #: includes/class-yith-system-status.php:528
354
  msgid "%1$s needs %2$s enabled"
355
  msgstr "%1$s требует включения %2$s"
356
 
357
  #. translators: %1$s plugin name, %2$s required memory amount
358
+ #: includes/class-yith-system-status.php:531
359
  msgid "%1$s needs at least %2$s of available memory"
360
  msgstr "%1$s требуется не менее %2$s доступной памяти"
361
 
362
  #. translators: %1$s plugin name, %2$s version number
363
+ #: includes/class-yith-system-status.php:534
364
  msgid "%1$s needs at least %2$s version"
365
  msgstr "%1$s требует как минимум %2$s версии"
366
 
367
+ #: includes/class-yith-system-status.php:558
368
  msgid ""
369
  "Update it to the latest version in order to benefit of all new features and "
370
  "security updates."
372
  "Обновите его до последней версии, чтобы воспользоваться всеми новыми "
373
  "функциями и обновлениями безопасности."
374
 
375
+ #: includes/class-yith-system-status.php:562
376
+ #: includes/class-yith-system-status.php:568
377
  msgid "Contact your hosting company in order to update it."
378
  msgstr "Свяжитесь с вашей хостинговой компанией, чтобы обновить его."
379
 
380
+ #: includes/class-yith-system-status.php:566
381
  msgid "Contact your hosting company in order to install it."
382
  msgstr "Для его установки обратитесь в свою хостинговую компанию."
383
 
384
  #. translators: %1$s code, %2$s file name
385
+ #: includes/class-yith-system-status.php:573
386
  msgid "Remove %1$s from %2$s file"
387
  msgstr "Удалить %1$s из файла %2$s"
388
 
389
+ #: includes/class-yith-system-status.php:581
390
  msgid "Contact your hosting company in order to enable it."
391
  msgstr "Свяжитесь с вашей хостинговой компанией, чтобы включить его."
392
 
393
  #. translators: %1$s opening link tag, %2$s closing link tag
394
+ #: includes/class-yith-system-status.php:585
395
+ #: includes/class-yith-system-status.php:608
396
  msgid ""
397
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
398
  "it."
401
  "чтобы увеличить его."
402
 
403
  #. translators: %s recommended memory amount
404
+ #: includes/class-yith-system-status.php:605
405
  msgid ""
406
  "For optimal functioning of our plugins, we suggest setting at least %s of "
407
  "available memory"
410
  "не менее %s доступной памяти"
411
 
412
  #. translators: %1$s TLS label, %2$s cURL label
413
+ #: includes/class-yith-system-status.php:613
414
  msgid ""
415
  "The system check cannot determine which %1$s version is installed because "
416
  "%2$s module is disabled. Ask your hosting company to enable it."
420
  "его."
421
 
422
  #. translators: %1$s TLS label
423
+ #: includes/class-yith-system-status.php:616
424
  msgid ""
425
  "The system check cannot determine which %1$s version is installed due to a "
426
  "connection issue between your site and our server."
625
  msgid "Download"
626
  msgstr "Загрузка"
627
 
628
+ #: templates/sysinfo/tabs/error-log.php:73
629
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
630
  msgstr "Размер файла превышает 8 мегабайт, поэтому его необходимо загрузить"
631
 
632
  #. translators: %s file name.
633
+ #: templates/sysinfo/tabs/error-log.php:97
634
  msgid ""
635
  "No Log file available. Enable the WordPress debug by adding this in the %s "
636
  "file of your installation"
638
  "Файл журнала недоступен. Включите отладку WordPress, добавив следующее в "
639
  "файл %s вашей установки"
640
 
641
+ #: templates/sysinfo/tabs/error-log.php:106
642
  msgid "Copied!"
643
  msgstr "Скопирован!"
644
 
645
+ #: templates/sysinfo/tabs/error-log.php:106
646
  msgid "Copy Code"
647
  msgstr "Копировать Код"
648
 
763
  msgid "%s - Options"
764
  msgstr "%s - Параметры"
765
 
766
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:152
767
  msgctxt "[gutenberg]: Category Name"
768
  msgid "YITH"
769
  msgstr "YITH"
plugin-fw/languages/yith-plugin-fw-zh_CN.po CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2022-10-04 10:25:50+00:00\n"
8
  "PO-Revision-Date: 2022-06-29 13:12:18+0000\n"
9
  "Language: zh\n"
10
  "MIME-Version: 1.0\n"
@@ -328,74 +328,74 @@ msgid ""
328
  msgstr ""
329
  "系統檢查檢測到您的安裝存在一些相容性問題。%1$s 點擊此處 %2$s 了解更多訊息"
330
 
331
- #: includes/class-yith-system-status.php:488
332
  msgid "Enabled"
333
  msgstr "啟用"
334
 
335
- #: includes/class-yith-system-status.php:488
336
  msgid "Disabled"
337
  msgstr "關閉"
338
 
339
- #: includes/class-yith-system-status.php:493
340
  msgid "N/A"
341
  msgstr "不詳"
342
 
343
  #. translators: %1$s plugin name, %2$s requirement name
344
- #: includes/class-yith-system-status.php:520
345
  msgid "%1$s needs %2$s enabled"
346
  msgstr "%1$s 需要 %2$s 啟動"
347
 
348
  #. translators: %1$s plugin name, %2$s required memory amount
349
- #: includes/class-yith-system-status.php:523
350
  msgid "%1$s needs at least %2$s of available memory"
351
  msgstr "%1$s 需要最少 %2$s 的可用記憶體"
352
 
353
  #. translators: %1$s plugin name, %2$s version number
354
- #: includes/class-yith-system-status.php:526
355
  msgid "%1$s needs at least %2$s version"
356
  msgstr "%1$s 需要最低 %2$s 的版本"
357
 
358
- #: includes/class-yith-system-status.php:550
359
  msgid ""
360
  "Update it to the latest version in order to benefit of all new features and "
361
  "security updates."
362
  msgstr "將其更新到最新版本,以便從所有新功能和安全更新中受益。"
363
 
364
- #: includes/class-yith-system-status.php:554
365
- #: includes/class-yith-system-status.php:560
366
  msgid "Contact your hosting company in order to update it."
367
  msgstr "聯絡您的網站主機托管公司進行更新"
368
 
369
- #: includes/class-yith-system-status.php:558
370
  msgid "Contact your hosting company in order to install it."
371
  msgstr "聯絡您的網站主機托管公司進行安裝"
372
 
373
  #. translators: %1$s code, %2$s file name
374
- #: includes/class-yith-system-status.php:565
375
  msgid "Remove %1$s from %2$s file"
376
  msgstr "從 %1$s 到 %2$s 移除這些檔案"
377
 
378
- #: includes/class-yith-system-status.php:573
379
  msgid "Contact your hosting company in order to enable it."
380
  msgstr "聯絡你的主機托管公司去啟動"
381
 
382
  #. translators: %1$s opening link tag, %2$s closing link tag
383
- #: includes/class-yith-system-status.php:577
384
- #: includes/class-yith-system-status.php:600
385
  msgid ""
386
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
387
  "it."
388
  msgstr "閱讀更多 %1$shere%2$s 或聯繫您的託管公司以增加它。"
389
 
390
  #. translators: %s recommended memory amount
391
- #: includes/class-yith-system-status.php:597
392
  msgid ""
393
  "For optimal functioning of our plugins, we suggest setting at least %s of "
394
  "available memory"
395
  msgstr "為了使我們的外掛發揮最佳功能,我們建議至少設置 %s 的可用記憶體"
396
 
397
  #. translators: %1$s TLS label, %2$s cURL label
398
- #: includes/class-yith-system-status.php:605
399
  msgid ""
400
  "The system check cannot determine which %1$s version is installed because "
401
  "%2$s module is disabled. Ask your hosting company to enable it."
@@ -404,7 +404,7 @@ msgstr ""
404
  "公司啟用它。"
405
 
406
  #. translators: %1$s TLS label
407
- #: includes/class-yith-system-status.php:608
408
  msgid ""
409
  "The system check cannot determine which %1$s version is installed due to a "
410
  "connection issue between your site and our server."
@@ -609,23 +609,23 @@ msgstr "PHP 錯誤日誌檔"
609
  msgid "Download"
610
  msgstr "下載"
611
 
612
- #: templates/sysinfo/tabs/error-log.php:72
613
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
614
  msgstr "檔案大小超過 8 兆位元,因此必須下載"
615
 
616
  #. translators: %s file name.
617
- #: templates/sysinfo/tabs/error-log.php:96
618
  msgid ""
619
  "No Log file available. Enable the WordPress debug by adding this in the %s "
620
  "file of your installation"
621
  msgstr ""
622
  "沒有可用的日誌文件。 通過將其添加到安裝的 %s 文件中來啟用 WordPress 除錯"
623
 
624
- #: templates/sysinfo/tabs/error-log.php:105
625
  msgid "Copied!"
626
  msgstr "已複製!"
627
 
628
- #: templates/sysinfo/tabs/error-log.php:105
629
  msgid "Copy Code"
630
  msgstr "複製程式碼"
631
 
@@ -743,7 +743,7 @@ msgctxt "Elementor Widget - section title"
743
  msgid "%s - Options"
744
  msgstr "%s - 選項"
745
 
746
- #: includes/builders/gutenberg/class-yith-gutenberg.php:149
747
  msgctxt "[gutenberg]: Category Name"
748
  msgid "YITH"
749
  msgstr "YITH"
4
  msgstr ""
5
  "Project-Id-Version: YITH Framework\n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2022-11-11 07:31:10+00:00\n"
8
  "PO-Revision-Date: 2022-06-29 13:12:18+0000\n"
9
  "Language: zh\n"
10
  "MIME-Version: 1.0\n"
328
  msgstr ""
329
  "系統檢查檢測到您的安裝存在一些相容性問題。%1$s 點擊此處 %2$s 了解更多訊息"
330
 
331
+ #: includes/class-yith-system-status.php:496
332
  msgid "Enabled"
333
  msgstr "啟用"
334
 
335
+ #: includes/class-yith-system-status.php:496
336
  msgid "Disabled"
337
  msgstr "關閉"
338
 
339
+ #: includes/class-yith-system-status.php:501
340
  msgid "N/A"
341
  msgstr "不詳"
342
 
343
  #. translators: %1$s plugin name, %2$s requirement name
344
+ #: includes/class-yith-system-status.php:528
345
  msgid "%1$s needs %2$s enabled"
346
  msgstr "%1$s 需要 %2$s 啟動"
347
 
348
  #. translators: %1$s plugin name, %2$s required memory amount
349
+ #: includes/class-yith-system-status.php:531
350
  msgid "%1$s needs at least %2$s of available memory"
351
  msgstr "%1$s 需要最少 %2$s 的可用記憶體"
352
 
353
  #. translators: %1$s plugin name, %2$s version number
354
+ #: includes/class-yith-system-status.php:534
355
  msgid "%1$s needs at least %2$s version"
356
  msgstr "%1$s 需要最低 %2$s 的版本"
357
 
358
+ #: includes/class-yith-system-status.php:558
359
  msgid ""
360
  "Update it to the latest version in order to benefit of all new features and "
361
  "security updates."
362
  msgstr "將其更新到最新版本,以便從所有新功能和安全更新中受益。"
363
 
364
+ #: includes/class-yith-system-status.php:562
365
+ #: includes/class-yith-system-status.php:568
366
  msgid "Contact your hosting company in order to update it."
367
  msgstr "聯絡您的網站主機托管公司進行更新"
368
 
369
+ #: includes/class-yith-system-status.php:566
370
  msgid "Contact your hosting company in order to install it."
371
  msgstr "聯絡您的網站主機托管公司進行安裝"
372
 
373
  #. translators: %1$s code, %2$s file name
374
+ #: includes/class-yith-system-status.php:573
375
  msgid "Remove %1$s from %2$s file"
376
  msgstr "從 %1$s 到 %2$s 移除這些檔案"
377
 
378
+ #: includes/class-yith-system-status.php:581
379
  msgid "Contact your hosting company in order to enable it."
380
  msgstr "聯絡你的主機托管公司去啟動"
381
 
382
  #. translators: %1$s opening link tag, %2$s closing link tag
383
+ #: includes/class-yith-system-status.php:585
384
+ #: includes/class-yith-system-status.php:608
385
  msgid ""
386
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
387
  "it."
388
  msgstr "閱讀更多 %1$shere%2$s 或聯繫您的託管公司以增加它。"
389
 
390
  #. translators: %s recommended memory amount
391
+ #: includes/class-yith-system-status.php:605
392
  msgid ""
393
  "For optimal functioning of our plugins, we suggest setting at least %s of "
394
  "available memory"
395
  msgstr "為了使我們的外掛發揮最佳功能,我們建議至少設置 %s 的可用記憶體"
396
 
397
  #. translators: %1$s TLS label, %2$s cURL label
398
+ #: includes/class-yith-system-status.php:613
399
  msgid ""
400
  "The system check cannot determine which %1$s version is installed because "
401
  "%2$s module is disabled. Ask your hosting company to enable it."
404
  "公司啟用它。"
405
 
406
  #. translators: %1$s TLS label
407
+ #: includes/class-yith-system-status.php:616
408
  msgid ""
409
  "The system check cannot determine which %1$s version is installed due to a "
410
  "connection issue between your site and our server."
609
  msgid "Download"
610
  msgstr "下載"
611
 
612
+ #: templates/sysinfo/tabs/error-log.php:73
613
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
614
  msgstr "檔案大小超過 8 兆位元,因此必須下載"
615
 
616
  #. translators: %s file name.
617
+ #: templates/sysinfo/tabs/error-log.php:97
618
  msgid ""
619
  "No Log file available. Enable the WordPress debug by adding this in the %s "
620
  "file of your installation"
621
  msgstr ""
622
  "沒有可用的日誌文件。 通過將其添加到安裝的 %s 文件中來啟用 WordPress 除錯"
623
 
624
+ #: templates/sysinfo/tabs/error-log.php:106
625
  msgid "Copied!"
626
  msgstr "已複製!"
627
 
628
+ #: templates/sysinfo/tabs/error-log.php:106
629
  msgid "Copy Code"
630
  msgstr "複製程式碼"
631
 
743
  msgid "%s - Options"
744
  msgstr "%s - 選項"
745
 
746
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:152
747
  msgctxt "[gutenberg]: Category Name"
748
  msgid "YITH"
749
  msgstr "YITH"
plugin-fw/languages/yith-plugin-fw.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
- "POT-Creation-Date: 2022-10-04 10:25:50+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -329,80 +329,80 @@ msgid ""
329
  "installation.%1$sClick here%2$s to know more"
330
  msgstr ""
331
 
332
- #: includes/class-yith-system-status.php:488
333
  msgid "Enabled"
334
  msgstr ""
335
 
336
- #: includes/class-yith-system-status.php:488
337
  msgid "Disabled"
338
  msgstr ""
339
 
340
- #: includes/class-yith-system-status.php:493
341
  msgid "N/A"
342
  msgstr ""
343
 
344
- #: includes/class-yith-system-status.php:520
345
  #. translators: %1$s plugin name, %2$s requirement name
346
  msgid "%1$s needs %2$s enabled"
347
  msgstr ""
348
 
349
- #: includes/class-yith-system-status.php:523
350
  #. translators: %1$s plugin name, %2$s required memory amount
351
  msgid "%1$s needs at least %2$s of available memory"
352
  msgstr ""
353
 
354
- #: includes/class-yith-system-status.php:526
355
  #. translators: %1$s plugin name, %2$s version number
356
  msgid "%1$s needs at least %2$s version"
357
  msgstr ""
358
 
359
- #: includes/class-yith-system-status.php:550
360
  msgid ""
361
  "Update it to the latest version in order to benefit of all new features and "
362
  "security updates."
363
  msgstr ""
364
 
365
- #: includes/class-yith-system-status.php:554
366
- #: includes/class-yith-system-status.php:560
367
  msgid "Contact your hosting company in order to update it."
368
  msgstr ""
369
 
370
- #: includes/class-yith-system-status.php:558
371
  msgid "Contact your hosting company in order to install it."
372
  msgstr ""
373
 
374
- #: includes/class-yith-system-status.php:565
375
  #. translators: %1$s code, %2$s file name
376
  msgid "Remove %1$s from %2$s file"
377
  msgstr ""
378
 
379
- #: includes/class-yith-system-status.php:573
380
  msgid "Contact your hosting company in order to enable it."
381
  msgstr ""
382
 
383
- #: includes/class-yith-system-status.php:577
384
- #: includes/class-yith-system-status.php:600
385
  #. translators: %1$s opening link tag, %2$s closing link tag
386
  msgid ""
387
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
388
  "it."
389
  msgstr ""
390
 
391
- #: includes/class-yith-system-status.php:597
392
  #. translators: %s recommended memory amount
393
  msgid ""
394
  "For optimal functioning of our plugins, we suggest setting at least %s of "
395
  "available memory"
396
  msgstr ""
397
 
398
- #: includes/class-yith-system-status.php:605
399
  #. translators: %1$s TLS label, %2$s cURL label
400
  msgid ""
401
  "The system check cannot determine which %1$s version is installed because "
402
  "%2$s module is disabled. Ask your hosting company to enable it."
403
  msgstr ""
404
 
405
- #: includes/class-yith-system-status.php:608
406
  #. translators: %1$s TLS label
407
  msgid ""
408
  "The system check cannot determine which %1$s version is installed due to a "
@@ -606,22 +606,22 @@ msgstr ""
606
  msgid "Download"
607
  msgstr ""
608
 
609
- #: templates/sysinfo/tabs/error-log.php:72
610
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
611
  msgstr ""
612
 
613
- #: templates/sysinfo/tabs/error-log.php:96
614
  #. translators: %s file name.
615
  msgid ""
616
  "No Log file available. Enable the WordPress debug by adding this in the %s "
617
  "file of your installation"
618
  msgstr ""
619
 
620
- #: templates/sysinfo/tabs/error-log.php:105
621
  msgid "Copied!"
622
  msgstr ""
623
 
624
- #: templates/sysinfo/tabs/error-log.php:105
625
  msgid "Copy Code"
626
  msgstr ""
627
 
@@ -740,7 +740,7 @@ msgctxt "Elementor Widget - section title"
740
  msgid "%s - Options"
741
  msgstr ""
742
 
743
- #: includes/builders/gutenberg/class-yith-gutenberg.php:149
744
  msgctxt "[gutenberg]: Category Name"
745
  msgid "YITH"
746
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: YITH <plugins@yithemes.com>\n"
7
+ "POT-Creation-Date: 2022-11-11 07:31:10+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
329
  "installation.%1$sClick here%2$s to know more"
330
  msgstr ""
331
 
332
+ #: includes/class-yith-system-status.php:496
333
  msgid "Enabled"
334
  msgstr ""
335
 
336
+ #: includes/class-yith-system-status.php:496
337
  msgid "Disabled"
338
  msgstr ""
339
 
340
+ #: includes/class-yith-system-status.php:501
341
  msgid "N/A"
342
  msgstr ""
343
 
344
+ #: includes/class-yith-system-status.php:528
345
  #. translators: %1$s plugin name, %2$s requirement name
346
  msgid "%1$s needs %2$s enabled"
347
  msgstr ""
348
 
349
+ #: includes/class-yith-system-status.php:531
350
  #. translators: %1$s plugin name, %2$s required memory amount
351
  msgid "%1$s needs at least %2$s of available memory"
352
  msgstr ""
353
 
354
+ #: includes/class-yith-system-status.php:534
355
  #. translators: %1$s plugin name, %2$s version number
356
  msgid "%1$s needs at least %2$s version"
357
  msgstr ""
358
 
359
+ #: includes/class-yith-system-status.php:558
360
  msgid ""
361
  "Update it to the latest version in order to benefit of all new features and "
362
  "security updates."
363
  msgstr ""
364
 
365
+ #: includes/class-yith-system-status.php:562
366
+ #: includes/class-yith-system-status.php:568
367
  msgid "Contact your hosting company in order to update it."
368
  msgstr ""
369
 
370
+ #: includes/class-yith-system-status.php:566
371
  msgid "Contact your hosting company in order to install it."
372
  msgstr ""
373
 
374
+ #: includes/class-yith-system-status.php:573
375
  #. translators: %1$s code, %2$s file name
376
  msgid "Remove %1$s from %2$s file"
377
  msgstr ""
378
 
379
+ #: includes/class-yith-system-status.php:581
380
  msgid "Contact your hosting company in order to enable it."
381
  msgstr ""
382
 
383
+ #: includes/class-yith-system-status.php:585
384
+ #: includes/class-yith-system-status.php:608
385
  #. translators: %1$s opening link tag, %2$s closing link tag
386
  msgid ""
387
  "Read more %1$shere%2$s or contact your hosting company in order to increase "
388
  "it."
389
  msgstr ""
390
 
391
+ #: includes/class-yith-system-status.php:605
392
  #. translators: %s recommended memory amount
393
  msgid ""
394
  "For optimal functioning of our plugins, we suggest setting at least %s of "
395
  "available memory"
396
  msgstr ""
397
 
398
+ #: includes/class-yith-system-status.php:613
399
  #. translators: %1$s TLS label, %2$s cURL label
400
  msgid ""
401
  "The system check cannot determine which %1$s version is installed because "
402
  "%2$s module is disabled. Ask your hosting company to enable it."
403
  msgstr ""
404
 
405
+ #: includes/class-yith-system-status.php:616
406
  #. translators: %1$s TLS label
407
  msgid ""
408
  "The system check cannot determine which %1$s version is installed due to a "
606
  msgid "Download"
607
  msgstr ""
608
 
609
+ #: templates/sysinfo/tabs/error-log.php:73
610
  msgid "The file size exceeds 8 megabytes so it must be downloaded"
611
  msgstr ""
612
 
613
+ #: templates/sysinfo/tabs/error-log.php:97
614
  #. translators: %s file name.
615
  msgid ""
616
  "No Log file available. Enable the WordPress debug by adding this in the %s "
617
  "file of your installation"
618
  msgstr ""
619
 
620
+ #: templates/sysinfo/tabs/error-log.php:106
621
  msgid "Copied!"
622
  msgstr ""
623
 
624
+ #: templates/sysinfo/tabs/error-log.php:106
625
  msgid "Copy Code"
626
  msgstr ""
627
 
740
  msgid "%s - Options"
741
  msgstr ""
742
 
743
+ #: includes/builders/gutenberg/class-yith-gutenberg.php:152
744
  msgctxt "[gutenberg]: Category Name"
745
  msgid "YITH"
746
  msgstr ""
plugin-fw/templates/components/action-button.php CHANGED
@@ -46,7 +46,7 @@ $link_class = implode( ' ', array_filter( $link_classes ) );
46
  <?php echo yith_plugin_fw_html_data_to_string( $data ); ?>
47
  >
48
  <a class="<?php echo esc_attr( $link_class ); ?>"
49
-
50
  href="<?php echo esc_url( $url ); ?>"
51
  <?php if ( $the_title ) : ?>
52
  data-tip="<?php echo esc_attr( $the_title ); ?>"
46
  <?php echo yith_plugin_fw_html_data_to_string( $data ); ?>
47
  >
48
  <a class="<?php echo esc_attr( $link_class ); ?>"
49
+ aria-label="<?php echo esc_attr( $the_title ); ?>"
50
  href="<?php echo esc_url( $url ); ?>"
51
  <?php if ( $the_title ) : ?>
52
  data-tip="<?php echo esc_attr( $the_title ); ?>"
plugin-fw/templates/sysinfo/tabs/error-log.php CHANGED
@@ -40,7 +40,7 @@ $debug_files = array(
40
  <?php foreach ( $debug_files as $key => $debug_file ) : ?>
41
  <?php
42
  if ( ! file_exists( $debug_file['path'] ) ) {
43
- $missing_files ++;
44
  continue;
45
  }
46
 
@@ -62,6 +62,7 @@ $debug_files = array(
62
  'data' => array(
63
  'action' => 'yith_create_log_file',
64
  'file' => $key,
 
65
  ),
66
  ),
67
  ),
@@ -95,12 +96,12 @@ $debug_files = array(
95
  // translators: %s file name.
96
  echo sprintf( esc_html__( 'No Log file available. Enable the WordPress debug by adding this in the %s file of your installation', 'yith-plugin-fw' ), '<code>wp-config.php</code>' );
97
  ?>
98
- <br/>
99
- <br/>
100
  <span class="debug-code">
101
- define( 'WP_DEBUG', true );<br/>
102
- define( 'WP_DEBUG_LOG', true );<br/>
103
- define( 'WP_DEBUG_DISPLAY', false );<br/>
104
  </span>
105
  <a href="#" data-tooltip="<?php esc_attr_e( 'Copied!', 'yith-plugin-fw' ); ?>" class="copy-link"><?php esc_html_e( 'Copy Code', 'yith-plugin-fw' ); ?></a>
106
  </td>
40
  <?php foreach ( $debug_files as $key => $debug_file ) : ?>
41
  <?php
42
  if ( ! file_exists( $debug_file['path'] ) ) {
43
+ $missing_files++;
44
  continue;
45
  }
46
 
62
  'data' => array(
63
  'action' => 'yith_create_log_file',
64
  'file' => $key,
65
+ 'nonce' => wp_create_nonce( 'yith-export-log' ),
66
  ),
67
  ),
68
  ),
96
  // translators: %s file name.
97
  echo sprintf( esc_html__( 'No Log file available. Enable the WordPress debug by adding this in the %s file of your installation', 'yith-plugin-fw' ), '<code>wp-config.php</code>' );
98
  ?>
99
+ <br />
100
+ <br />
101
  <span class="debug-code">
102
+ define( 'WP_DEBUG', true );<br />
103
+ define( 'WP_DEBUG_LOG', true );<br />
104
+ define( 'WP_DEBUG_DISPLAY', false );<br />
105
  </span>
106
  <a href="#" data-tooltip="<?php esc_attr_e( 'Copied!', 'yith-plugin-fw' ); ?>" class="copy-link"><?php esc_html_e( 'Copy Code', 'yith-plugin-fw' ); ?></a>
107
  </td>
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
 
3
  Contributors: yithemes
4
  Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
- Requires at least: 5.8
6
- Tested up to: 6.0
7
- Stable tag: 4.15.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -152,6 +152,16 @@ If none of the previous listed actions helps you solve the problem, then, submit
152
 
153
  == Changelog ==
154
 
 
 
 
 
 
 
 
 
 
 
155
  = 4.15.0 - Released on 5 October 2022 =
156
 
157
  * New: support for WooCommerce 7.0
2
 
3
  Contributors: yithemes
4
  Tags: woocommerce ajax product filter download, woocommerce, widget, ajax, ajax filtered nav, ajax navigation, ajax filtered navigation, woocommerce layered navigation, woocommerce layered nav, product filter, product filters, ajax product filter, woocommerce ajax product filter, woocommerce filters, sidebar filter, sidebar ajax filter, ajax price filter, price filter, product sorting, woocommerce filter, taxonomy filter, attribute filter, attributes filter, woocommerce product sort, ajax sort, woocommerce ajax product filter, advanced product filters, ajax product filters, filters, woocommerce ajax product filters, woocommerce product filters, woocommerce product filters, category filter, attribute filters, woocommerce products filter, woocommerce price filter, yit, yith, yithemes
5
+ Requires at least: 5.9
6
+ Tested up to: 6.1
7
+ Stable tag: 4.16.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
152
 
153
  == Changelog ==
154
 
155
+ = 4.16.0 - Released on 14 November 2022 =
156
+
157
+ * New: support for WooCommerce 7.1
158
+ * New: support for WodPress 6.1
159
+ * Tweak: add rel nofollow attribute to Active Labels anchor, when SEO option is enabled
160
+ * Tweak: check if preset has relevant filters before showing it
161
+ * Tweak: prevent JS error with jQuery autocomplete library and filter dropdown
162
+ * Update: YITH plugin framework
163
+ * Fix: patched security vulnerability
164
+
165
  = 4.15.0 - Released on 5 October 2022 =
166
 
167
  * New: support for WooCommerce 7.0
templates/filters/filter-tax.php CHANGED
@@ -20,28 +20,27 @@ if ( ! defined( 'YITH_WCAN' ) ) {
20
  } // Exit if accessed directly
21
  ?>
22
 
23
- <?php if ( $filter->has_relevant_terms() ) : ?>
24
- <div
25
- class="yith-wcan-filter <?php echo esc_attr( $filter->get_additional_classes() ); ?>"
26
- id="filter_<?php echo esc_attr( $preset->get_id() ); ?>_<?php echo esc_attr( $filter->get_id() ); ?>"
27
- data-filter-type="<?php echo esc_attr( $filter->get_type() ); ?>"
28
- data-filter-id="<?php echo esc_attr( $filter->get_id() ); ?>"
29
- data-taxonomy="<?php echo esc_attr( $filter->get_formatted_taxonomy() ); ?>"
30
- data-multiple="<?php echo esc_attr( $filter->is_multiple_allowed() ? 'yes' : 'no' ); ?>"
31
- data-relation="<?php echo esc_attr( $filter->get_relation() ); ?>"
32
- >
33
- <?php echo $filter->render_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
34
 
35
- <div class="filter-content">
36
- <?php echo $filter->render_start(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
 
 
 
 
 
 
 
 
37
 
38
- <?php
39
- foreach ( $filter->get_formatted_terms() as $term_id => $term_options ) :
40
- echo $filter->render_item( $term_id, $term_options ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
41
- endforeach;
42
- ?>
43
 
44
- <?php echo $filter->render_end(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
45
- </div>
 
 
 
 
 
46
  </div>
47
- <?php endif; ?>
20
  } // Exit if accessed directly
21
  ?>
22
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ <div
25
+ class="yith-wcan-filter <?php echo esc_attr( $filter->get_additional_classes() ); ?>"
26
+ id="filter_<?php echo esc_attr( $preset->get_id() ); ?>_<?php echo esc_attr( $filter->get_id() ); ?>"
27
+ data-filter-type="<?php echo esc_attr( $filter->get_type() ); ?>"
28
+ data-filter-id="<?php echo esc_attr( $filter->get_id() ); ?>"
29
+ data-taxonomy="<?php echo esc_attr( $filter->get_formatted_taxonomy() ); ?>"
30
+ data-multiple="<?php echo esc_attr( $filter->is_multiple_allowed() ? 'yes' : 'no' ); ?>"
31
+ data-relation="<?php echo esc_attr( $filter->get_relation() ); ?>"
32
+ >
33
+ <?php echo $filter->render_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
34
 
35
+ <div class="filter-content">
36
+ <?php echo $filter->render_start(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
 
 
 
37
 
38
+ <?php
39
+ foreach ( $filter->get_formatted_terms() as $term_id => $term_options ) :
40
+ echo $filter->render_item( $term_id, $term_options ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
41
+ endforeach;
42
+ ?>
43
+
44
+ <?php echo $filter->render_end(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
45
  </div>
46
+ </div>
templates/shortcodes/filters.php CHANGED
@@ -20,7 +20,7 @@ if ( ! defined( 'YITH_WCAN' ) ) {
20
  } // Exit if accessed directly
21
  ?>
22
 
23
- <?php if ( $preset->has_filters() ) : ?>
24
  <div class="yith-wcan-filters <?php echo esc_attr( $preset->get_additional_classes() ); ?>" id="preset_<?php echo esc_attr( $preset->get_id() ); ?>" data-preset-id="<?php echo esc_attr( $preset->get_id() ); ?>" data-target="<?php echo esc_attr( $selector ); ?>">
25
  <div class="filters-container">
26
  <form method="POST">
20
  } // Exit if accessed directly
21
  ?>
22
 
23
+ <?php if ( $preset->has_relevant_filters() ) : ?>
24
  <div class="yith-wcan-filters <?php echo esc_attr( $preset->get_additional_classes() ); ?>" id="preset_<?php echo esc_attr( $preset->get_id() ); ?>" data-preset-id="<?php echo esc_attr( $preset->get_id() ); ?>" data-target="<?php echo esc_attr( $selector ); ?>">
25
  <div class="filters-container">
26
  <form method="POST">