Ajax Search for WooCommerce - Version 1.11.0

Version Description

Download this release

Release Info

Developer damian-gora
Plugin Icon 128x128 Ajax Search for WooCommerce
Version 1.11.0
Comparing to
See all releases

Code changes from version 1.10.0 to 1.11.0

Files changed (37) hide show
  1. ajax-search-for-woocommerce.php +3 -3
  2. assets/css/admin-style.css +58 -12
  3. assets/css/style.css +8 -0
  4. assets/css/style.min.css +1 -1
  5. assets/js/admin.js +97 -5
  6. assets/js/admin.min.js +1 -1
  7. assets/js/search.js +178 -66
  8. assets/js/search.min.js +1 -1
  9. includes/Abstracts/ThemeIntegration.php +1 -1
  10. includes/Admin/Install.php +13 -0
  11. includes/Admin/Promo/Upgrade.php +1 -3
  12. includes/Admin/RegenerateImages.php +1 -2
  13. includes/Admin/SettingsAPI.php +15 -3
  14. includes/Admin/Troubleshooting.php +5 -1
  15. includes/Engines/WordPressNative/DetailsBox.php +3 -1
  16. includes/Engines/WordPressNative/Search.php +12 -10
  17. includes/Helpers.php +19 -1
  18. includes/Integrations/Brands.php +100 -13
  19. includes/Integrations/Plugins/WooCommerce/WooCommerce.php +28 -0
  20. includes/Integrations/Themes/Goya/Goya.php +20 -0
  21. includes/Integrations/Themes/Shopical/Shopical.php +5 -101
  22. includes/Integrations/Themes/ShopicalPro/ShopicalPro.php +33 -0
  23. includes/Integrations/Themes/ThemesCompatibility.php +44 -28
  24. includes/Integrations/Themes/TopStore/TopStore.php +33 -0
  25. includes/Integrations/Themes/TopStorePro/TopStorePro.php +20 -0
  26. includes/Personalization.php +1 -1
  27. includes/ProductVariation.php +119 -117
  28. includes/Settings.php +29 -4
  29. includes/Term.php +87 -0
  30. languages/ajax-search-for-woocommerce.pot +357 -226
  31. partials/admin/search-preview.php +8 -2
  32. partials/details-panel/product-variation.php +1 -2
  33. partials/details-panel/product.php +1 -2
  34. partials/themes/goya.php +50 -0
  35. partials/themes/shopical.php +5 -0
  36. partials/themes/top-store-pro.php +91 -0
  37. readme.txt +26 -5
ajax-search-for-woocommerce.php CHANGED
@@ -4,13 +4,13 @@
4
  * Plugin Name: FiboSearch - AJAX Search for WooCommerce
5
  * Plugin URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
6
  * Description: The most popular WooCommerce product search. Gives your users a well-designed advanced AJAX search bar with live search suggestions.
7
- * Version: 1.10.0
8
- * Author: Damian Góra
9
  * Author URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
10
  * Text Domain: ajax-search-for-woocommerce
11
  * Domain Path: /languages
12
  * WC requires at least: 3.3
13
- * WC tested up to: 5.2
14
  *
15
  */
16
  // Exit if accessed directly
4
  * Plugin Name: FiboSearch - AJAX Search for WooCommerce
5
  * Plugin URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
6
  * Description: The most popular WooCommerce product search. Gives your users a well-designed advanced AJAX search bar with live search suggestions.
7
+ * Version: 1.11.0
8
+ * Author: FiboSearch Team
9
  * Author URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
10
  * Text Domain: ajax-search-for-woocommerce
11
  * Domain Path: /languages
12
  * WC requires at least: 3.3
13
+ * WC tested up to: 5.3
14
  *
15
  */
16
  // Exit if accessed directly
assets/css/admin-style.css CHANGED
@@ -11,10 +11,6 @@
11
  font-weight: lighter;
12
  }
13
 
14
- .dgwt-wcas-settings:not(.dgwt-wcas-settings-theme-supported) .dgwt-wcas-only-desc > th {
15
- display: none;
16
- }
17
-
18
  .dgwt-wcas-only-desc > td {
19
  min-width: 600px
20
  }
@@ -69,8 +65,26 @@
69
  min-width: 165px;
70
  }
71
 
 
 
 
 
 
 
 
72
  .dgwt_wcas_settings-group .form-table td fieldset label {
73
- margin: 0 !important;
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
 
76
  .dgwt_wcas_settings-group .form-table > tbody > tr > th,
@@ -341,12 +355,6 @@
341
  display: none;
342
  }
343
 
344
- .dgwt_wcas_settings-group .form-table td fieldset label {
345
- width: 100%;
346
- display: flex;
347
- align-items: center;
348
- }
349
-
350
  .dgwt_wcas_settings-group label input[type="checkbox"] {
351
  margin: 0;
352
  }
@@ -529,7 +537,7 @@
529
  padding: 15px;
530
  }
531
 
532
- .dgwt-wcas-troubleshooting-wrapper .dgwt-wcas-settings-info pre {
533
  display: inline-block;
534
  background: #eee;
535
  padding: 10px;
@@ -1063,6 +1071,17 @@ input[type=checkbox].dgwt-wcas-check:checked ~ .dgwt-wcas-switch {
1063
  border: 1px solid #f0c0c1;
1064
  margin-bottom: 20px;
1065
  font-family: monospace;
 
 
 
 
 
 
 
 
 
 
 
1066
  }
1067
 
1068
  .wcas-ajax-build-index-wait {
@@ -1234,6 +1253,9 @@ td.dgwt-wcas-indexing-details-row a {
1234
  .dgwt-wcas-is-details .dgwt-wcas-preview-source .dgwt-wcas-suggestions-wrapp {
1235
  margin: 0;
1236
  }
 
 
 
1237
 
1238
  .dgwt-wcas-hide {
1239
  display: none !important;
@@ -1249,6 +1271,21 @@ td.dgwt-wcas-indexing-details-row a {
1249
  padding: 20px 40px;
1250
  }
1251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1252
  .dgwt-wcas-search-wrapp,
1253
  .dgwt-wcas-autocomplete {
1254
  pointer-events: none;
@@ -1536,6 +1573,7 @@ td.dgwt-wcas-indexing-details-row a {
1536
  h3.dgwt-wcas-troubleshooting-issue-title {
1537
  font-size: 20px;
1538
  margin-bottom: 12px;
 
1539
  }
1540
 
1541
  .dgwt-wcas-troubleshooting-wrapper .progress-bar-inner {
@@ -1559,6 +1597,14 @@ h3.dgwt-wcas-troubleshooting-issue-title {
1559
  margin-top: 30px;
1560
  }
1561
 
 
 
 
 
 
 
 
 
1562
  /* Settings - Filters rules */
1563
  #dgwt-wcas-settings-filters-rules .dgwt-wcas-select-group {
1564
  margin-right: 10px;
11
  font-weight: lighter;
12
  }
13
 
 
 
 
 
14
  .dgwt-wcas-only-desc > td {
15
  min-width: 600px
16
  }
65
  min-width: 165px;
66
  }
67
 
68
+ .dgwt_wcas_settings-group .form-table td fieldset {
69
+ display: flex;
70
+ align-items: center;
71
+ width: 100%;
72
+ justify-content: flex-start;
73
+ }
74
+
75
  .dgwt_wcas_settings-group .form-table td fieldset label {
76
+ margin: 0 !important;
77
+ display: flex;
78
+ align-items: center;
79
+ }
80
+
81
+ .dgwt_wcas_settings-group .form-table td fieldset label + label {
82
+ border-left: 1px dashed #d7d7d7;
83
+ padding-left: 20px;
84
+ }
85
+
86
+ .dgwt_wcas_settings-group .form-table td fieldset label + label .dgwt_wcas_settings-description-field {
87
+ margin-left: 15px;
88
  }
89
 
90
  .dgwt_wcas_settings-group .form-table > tbody > tr > th,
355
  display: none;
356
  }
357
 
 
 
 
 
 
 
358
  .dgwt_wcas_settings-group label input[type="checkbox"] {
359
  margin: 0;
360
  }
537
  padding: 15px;
538
  }
539
 
540
+ .dgwt-wcas-indexing-header__troubleshooting pre, .dgwt-wcas-troubleshooting-wrapper .dgwt-wcas-settings-info pre {
541
  display: inline-block;
542
  background: #eee;
543
  padding: 10px;
1071
  border: 1px solid #f0c0c1;
1072
  margin-bottom: 20px;
1073
  font-family: monospace;
1074
+ font-size: 12px;
1075
+ }
1076
+ .dgwt-wcas-indexing-header__error-code {
1077
+ background: #f5dede;
1078
+ border: 1px solid #f0c0c1;
1079
+ padding: 1px 4px;
1080
+ display: inline-block;
1081
+ margin: 5px 0 5px 0;
1082
+ font-size: 14px;
1083
+ font-weight: bold;
1084
+ font-family: monospace;
1085
  }
1086
 
1087
  .wcas-ajax-build-index-wait {
1253
  .dgwt-wcas-is-details .dgwt-wcas-preview-source .dgwt-wcas-suggestions-wrapp {
1254
  margin: 0;
1255
  }
1256
+ .dgwt-wcas-preview-source .dgwt-wcas-details-inner {
1257
+ display: block;
1258
+ }
1259
 
1260
  .dgwt-wcas-hide {
1261
  display: none !important;
1271
  padding: 20px 40px;
1272
  }
1273
 
1274
+ .dgwt-wcas-preview-source .dgwt-wcas-suggestion-brand .dgwt-wcas-si,
1275
+ .dgwt-wcas-preview-source .dgwt-wcas-suggestion-cat .dgwt-wcas-si {
1276
+ display: none;
1277
+ }
1278
+
1279
+ .dgwt-wcas-preview-source .dgwt-wcas-suggestion-brand.dgwt-wcas-has-img .dgwt-wcas-si,
1280
+ .dgwt-wcas-preview-source .dgwt-wcas-suggestion-cat.dgwt-wcas-has-img .dgwt-wcas-si {
1281
+ display: block;
1282
+ }
1283
+
1284
+ .dgwt-wcas-preview-source .dgwt-wcas-suggestion-brand.dgwt-wcas-has-img .dgwt-wcas-st,
1285
+ .dgwt-wcas-preview-source .dgwt-wcas-suggestion-cat.dgwt-wcas-has-img .dgwt-wcas-st {
1286
+ padding-left: 10px;
1287
+ }
1288
+
1289
  .dgwt-wcas-search-wrapp,
1290
  .dgwt-wcas-autocomplete {
1291
  pointer-events: none;
1573
  h3.dgwt-wcas-troubleshooting-issue-title {
1574
  font-size: 20px;
1575
  margin-bottom: 12px;
1576
+ line-height: 1em;
1577
  }
1578
 
1579
  .dgwt-wcas-troubleshooting-wrapper .progress-bar-inner {
1597
  margin-top: 30px;
1598
  }
1599
 
1600
+ .dgwt-wcas-troubleshooting-wrapper .dgwt-wcas-error-log {
1601
+ background: #f5dede;
1602
+ padding: 10px;
1603
+ border: 1px solid #f0c0c1;
1604
+ margin-bottom: 20px;
1605
+ font-family: monospace;
1606
+ }
1607
+
1608
  /* Settings - Filters rules */
1609
  #dgwt-wcas-settings-filters-rules .dgwt-wcas-select-group {
1610
  margin-right: 10px;
assets/css/style.css CHANGED
@@ -369,6 +369,13 @@ a.dgwt-wcas-product-details-readmore:hover {
369
  border-radius: 0 0 0 5px;
370
  }
371
 
 
 
 
 
 
 
 
372
  .dgwt-wcas-details-inner-taxonomy{
373
  margin-top: 11px;
374
  }
@@ -932,6 +939,7 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
932
  .dgwt-wcas-sf-wrapp {
933
  zoom: 1;
934
  width: 100%;
 
935
  margin: 0;
936
  position: relative;
937
  background: none;
369
  border-radius: 0 0 0 5px;
370
  }
371
 
372
+ .dgwt-wcas-details-inner {
373
+ display: none;
374
+ }
375
+ .dgwt-wcas-details-inner.dgwt-wcas-details-inner-active {
376
+ display: block;
377
+ }
378
+
379
  .dgwt-wcas-details-inner-taxonomy{
380
  margin-top: 11px;
381
  }
939
  .dgwt-wcas-sf-wrapp {
940
  zoom: 1;
941
  width: 100%;
942
+ max-width: 100vw;
943
  margin: 0;
944
  position: relative;
945
  background: none;
assets/css/style.min.css CHANGED
@@ -1 +1 @@
1
- .dgwt-wcas-block-scroll{overflow:hidden}.dgwt-wcas-search-wrapp{position:relative;line-height:100%;display:block;color:#444;min-width:230px;width:100%;text-align:left;margin:0 auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dgwt-wcas-tpd-image img{margin:0 15px 0 0!important;display:block}.rtl .dgwt-wcas-tpd-image img{margin:0 0 0 15px!important}.dgwt-wcas-preloader-wrapp img{margin:10px auto 0 auto;display:block;max-width:200px}.dgwt-wcas-preloader-wrapp img.dgwt-wcas-placeholder-preloader{display:block;width:100%;height:auto;max-width:300px;margin:0}.dgwt-wcas-suggestions-wrapp{background:#fff none repeat scroll 0 0;border:1px solid #ddd;border-top:none;padding:0;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow-y:auto}.dgwt-wcas-details-wrapp *,.dgwt-wcas-search-wrapp *,.dgwt-wcas-suggestions-wrapp *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dgwt-wcas-details-wrapp a:focus,.dgwt-wcas-suggestions-wrapp a:focus{outline:0}.dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp--top{border:1px solid #ddd;border-bottom:none}.dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp{max-width:550px}.dgwt-wcas-full-width.dgwt-wcas-is-detail-box .dgwt-wcas-suggestion{padding:8px 15px}.dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp{border-radius:0 0 5px 0;border-left-color:#eee}.dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp{border-radius:0 0 0 5px;border-right-color:#eee}.dgwt-wcas-suggestion{cursor:pointer;font-size:12px;line-height:110%;text-align:left;padding:7px 10px;position:relative;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:row;justify-content:space-between;align-items:center;resize:vertical;width:100%}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{justify-content:center;color:#6d6d6d}a.dgwt-wcas-details-more-products{padding:15px 0 10px 0;display:block;border-top:1px solid #eee;text-align:center;font-size:12px;text-transform:uppercase;color:#6d6d6d;transition:all .2s ease-in-out}a.dgwt-wcas-details-more-products:hover{text-decoration:underline}a.dgwt-wcas-product-details-readmore{display:block;text-align:right;margin-top:15px;color:#6d6d6d;text-transform:uppercase;letter-spacing:1px;font-weight:400;font-size:12px}a.dgwt-wcas-product-details-readmore:hover{text-decoration:underline}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-no-border-bottom{border-bottom:none}.dgwt-wcas-suggestion:after{clear:both;display:block;content:''}.dgwt-wcas-suggestion.dgwt-wcas-nores{cursor:default;opacity:.5}.dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product{padding-top:8px;padding-bottom:8px;min-height:60px}.dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more,.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{min-height:30px;text-transform:uppercase}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more{padding:0 10px;text-align:center}.dgwt-wcas-st{display:block;color:#444;font-size:15px;width:100%;line-height:110%}.dgwt-wcas-st>span{display:inline-block;vertical-align:middle}.dgwt-wcas-has-sku .dgwt-wcas-st-title{margin-right:6px}.dgwt-wcas-st>span.dgwt-wcas-st--direct-headline{display:block;font-style:italic;font-size:10px;text-transform:uppercase;opacity:.4;line-height:10px;margin-bottom:1px;letter-spacing:2px}.dgwt-wcas-st-breadcrumbs{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:80%;text-align:left;opacity:.6;width:100%;padding-right:10px}.rtl .dgwt-wcas-st-breadcrumbs{padding-right:0;padding-left:10px;text-align:right}.dgwt-wcas-sku{font-size:80%}.dgwt-wcas-si{width:50px;display:block;height:100%}.dgwt-wcas-si img{background:#fff none repeat scroll 0 0;border:1px solid #e8e8e8;border-radius:3px;display:block;margin:auto;padding:2px;height:auto;width:auto;max-height:90%;max-width:100%}.dgwt-wcas-content-wrapp{display:flex;height:100%;width:100%;justify-content:space-between;align-items:center;resize:vertical;padding-left:10px}.rtl .dgwt-wcas-content-wrapp{padding-left:0;padding-right:10px}.dgwt-wcas-sp{color:#555;font-size:14px;line-height:120%;text-align:right;line-height:4px;padding-left:10px}.dgwt-wcas-sp *{line-height:130%}.dgwt-wcas-search-form{margin:0;padding:0;width:100%}.dgwt-wcas-sp del{opacity:.5;font-size:12px}.dgwt-wcas-sd{color:#777;display:block;line-height:14px;width:100%;margin-top:5px;font-size:.8em}.dgwt-wcas-vendor-city{margin-left:5px;font-size:.8em}.dgwt-wcas-st>.dgwt-wcas-product-vendor{font-size:12px;margin-top:5px;display:block}.dgwt-wcas-suggestion-selected{background-color:#eee}.dgwt-wcas-suggestion-selected:first-child{border-top:none}.rtl .dgwt-wcas-suggestion{padding-left:0;padding-right:15px;text-align:right}.dgwt-wcas-details-wrapp{background:#fff none repeat scroll 0 0;border:1px solid #ddd;border-top:none;border-left:none;padding:0;width:300px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;z-index:100;min-height:340px}.rtl .dgwt-wcas-details-wrapp{border-left:1px solid #ddd;border-right:none}.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp{margin-top:-1px;border-top:1px solid #ddd}.dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{margin-top:-1px;border-top:1px solid #ddd}.dgwt-wcas-details-right .dgwt-wcas-details-wrapp{border-left:none;border-right:1px solid #ddd;border-radius:0 5px 5px 0}.dgwt-wcas-details-left .dgwt-wcas-details-wrapp{border-right:none;border-left:1px solid #ddd;border-radius:5px 0 0 5px}.dgwt-wcas-details-notfit .dgwt-wcas-details-wrapp{display:none}.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{border-radius:0 0 0 5px}.dgwt-wcas-full-width .dgwt-wcas-details-wrapp{border-radius:0 0 5px 0}.rtl.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{border-radius:0 0 5px 0}.rtl.dgwt-wcas-full-width .dgwt-wcas-details-wrapp{border-radius:0 0 0 5px}.dgwt-wcas-details-inner-taxonomy{margin-top:11px}.woocommerce .dgwt-wcas-pd-rating .star-rating{float:left;margin-right:5px;font-size:12px;color:#ccae72}.rtl .dgwt-wcas-pd-rating .star-rating{float:right;margin-left:5px;margin-right:0}.dgwt-wcas-datails-title{border-bottom:1px dashed #eee;display:block;margin-bottom:15px;padding-bottom:5px;font-size:14px}.dgwt-wcas-pd-title{border-bottom:1px dashed #eee;margin-bottom:15px;padding-bottom:5px;display:block;color:#202020;text-decoration:none}.dgwt-wcas-pd-title .product-title{font-weight:900;color:#202020;text-transform:uppercase;letter-spacing:-1px;margin:0}.dgwt-wcas-details-title-tax{text-transform:uppercase;font-weight:900;letter-spacing:-1px;margin-right:3px}.dgwt-wcas-tax-product-details{text-decoration:none;display:flex;align-items:center;justify-content:left;transition:all .2s ease-in-out;padding:5px;margin:0 -5px 15px -5px}.dgwt-wcas-tax-product-details:after{content:'';clear:both;display:block}.dgwt-wcas-tax-product-details:hover{box-shadow:0 0 11px 2px rgba(0,0,0,.05)}.dgwt-wcas-details-wrapp .dgwt-wcas-pd-title{margin-bottom:8px}.dgwt-wcas-tpd-image{width:60px;margin-right:15px}.dgwt-wcas-pd-rest .product-title{display:block;line-height:100%;font-weight:500;margin-bottom:5px}.dgwt-wcas-tpd-rest{max-width:200px}.dgwt-wcas-tpd-rest-title{display:block;line-height:125%;font-size:14px;font-weight:500;letter-spacing:0;margin:0 0 8px;overflow:hidden;color:#000}.dgwt-wcas-suggestion-nores{pointer-events:none;opacity:.45}.dgwt-wcas-pd-price,.dgwt-wcas-tpd-price{font-size:14px;line-height:120%;overflow:hidden;color:#000;margin-top:15px;font-weight:700;font-size:18px}.dgwt-wcas-tpd-price{font-size:12px;color:#777}.dgwt-wcas-pd-price .woocommerce-price-suffix,.dgwt-wcas-tpd-price .woocommerce-price-suffix{font-size:12px;font-weight:lighter;color:#999;margin-left:4px;display:inline-block}.dgwt-wcas-pd-price del .amount,.dgwt-wcas-tpd-price del .amount{font-weight:lighter;background:0 0;font-size:90%;opacity:.6}.dgwt-wcas-pd-price ins,.dgwt-wcas-tpd-price ins{background:0 0;text-decoration:none}.dgwt-wcas-pd-rating{font-size:13px;line-height:13px}.dgwt-wcas-pd-rating:after{content:'';clear:both;display:block}.dgwt-wcas-pd-review{color:#777;font-size:11px;line-height:11px}.dgwt-wcas-datails-title{border-bottom:1px dashed #eee;display:block;margin:5px 0 15px 0;padding-bottom:5px}.dgwt-wcas-pd-title{border-bottom:1px dashed #eee;margin-bottom:15px;padding-bottom:5px;display:block;text-decoration:none}.dgwt-wcas-pd-title .product-title{font-weight:900;text-transform:uppercase;letter-spacing:-1px}.dgwt-wcas-details-title-tax{text-transform:uppercase;font-weight:900;letter-spacing:-1px;margin-right:3px}.rtl .dgwt-wcas-details-title-tax{margin:0 0 0 3px;float:right}.dgwt-wcas-tpd-image{width:70px;padding:4px;background-color:#fff;border:1px solid #e8e8e8;border-radius:4px;display:flex;flex-direction:column;justify-content:center}.dgwt-wcas-details-space{padding:0 15px 15px 15px}.dgwt-wcas-details-main-image{border-bottom:1px solid #eee;min-height:200px;display:flex}.dgwt-wcas-details-main-image img{width:auto;height:auto;display:block;max-height:250px;max-width:100%;margin:0 auto;padding:0;border:none;align-self:center}.dgwt-wcas-details-right .dgwt-wcas-details-main-image img{border-radius:0 3px 0 0}.dgwt-wcas-details-left .dgwt-wcas-details-main-image img{border-radius:3px 0 0 0}a.dgwt-wcas-details-post-title,a.dgwt-wcas-details-product-title{color:#333;display:block;line-height:120%;margin:10px 0 0 0;font-size:21px;font-weight:400;text-decoration:none;text-transform:none}a.dgwt-wcas-details-post-title:hover,a.dgwt-wcas-details-product-title:hover{text-decoration:underline}a.dgwt-wcas-details-post-title{margin-bottom:15px}.dgwt-wcas-details-product-sku{display:block;font-size:12px;line-height:110%;color:#999}.dgwt-wcas-tpd-image img{display:block;max-width:100%;width:100%;height:auto}.dgwt-wcas-details-hr{height:1px;width:100%;border-bottom:1px solid #eee;margin:15px 0}.rtl .dgwt-wcas-tpd-image{float:right;margin-right:0;margin-left:15px}.rtl .dgwt-wcas-tpd-rest{float:right;max-width:190px}.rtl input[type=search].dgwt-wcas-search-input{text-align:right}input[type=search].dgwt-wcas-search-input,input[type=text].dgwt-cas-search-input{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;-webkit-box-shadow:none;box-shadow:none;margin:0;-webkit-appearance:textfield;text-align:left}[type=search].dgwt-wcas-search-input::-ms-clear{display:none}[type=search].dgwt-wcas-search-input::-webkit-search-decoration{-webkit-appearance:none}[type=search].dgwt-wcas-search-input::-webkit-search-cancel-button{display:none}.dgwt-wcas-details-desc{font-size:13px;line-height:157%}.dgwt-wcas-details-desc b,.dgwt-wcas-details-desc strong{font-weight:400;color:#000;margin:0;padding:0}.dgwt-wcas-pd-addtc-form{margin:10px 0;display:flex;align-items:center;justify-content:flex-end}.dgwt-wcas-pd-addtc-form>.quantity{margin-right:10px}.dgwt-wcas-pd-addtc-form .add_to_cart_inline,.dgwt-wcas-pd-addtc-form .quantity input.qty{margin-bottom:0;margin-top:0}.dgwt-wcas-stock{display:block;text-align:right;font-size:14px;line-height:14px;margin-bottom:14px}.dgwt-wcas-stock.in-stock{color:#0f834d}.dgwt-wcas-stock.out-of-stock{color:#e2401c}.dgwt-wcas-pd-addtc .add_to_cart_button,.dgwt-wcas-pd-addtc .add_to_cart_inline{margin:0}.dgwt-wcas-pd-addtc .add_to_cart_button.added{display:none}button.dgwt-wcas-search-submit,input[type=submit].dgwt-wcas-search-submit{position:relative}.dgwt-wcas-ico-magnifier{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;height:65%;display:block}.dgwt-wcas-preloader{height:100%;position:absolute;right:0;top:0;width:40px;z-index:1;background-repeat:no-repeat;background-position:right 15px center;background-size:auto 44%}.rtl .dgwt-wcas-preloader{right:auto;left:5px}.dgwt-wcas-inner-preloader{background-repeat:no-repeat;background-position:right 8px center;background-size:auto 22px;display:flex;align-items:center;justify-content:center}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.dgwt-wcas-inner-preloader{background-image:url(../img/preloader.gif)}}.dgwt-wcas-loader-circular{height:24px;width:24px;-webkit-animation:2s linear infinite rotate;-moz-animation:2s linear infinite rotate;animation:2s linear infinite rotate}.dgwt-wcas-loader-circular-path{fill:transparent;stroke-linecap:round;stroke-width:4px;stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-animation:1s ease-in-out infinite dash;-moz-animation:1s ease-in-out infinite dash;animation:1s ease-in-out infinite dash}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes rotate{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-moz-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader){cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-transition:all 160ms ease-in-out;-moz-transition:all 160ms ease-in-out;-ms-transition:all 160ms ease-in-out;-o-transition:all 160ms ease-in-out;transition:all 160ms ease-in-out}.dgwt-wcas-close:hover{opacity:.3}@media screen and (max-width:992px){.dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp{max-width:none}}.dgwt-wcas-suggestion strong{font-weight:700}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dgwt-wcas-sf-wrapp:after,.dgwt-wcas-sf-wrapp:before{content:"";display:table}.dgwt-wcas-sf-wrapp:after{clear:both}.dgwt-wcas-sf-wrapp{zoom:1;width:100%;margin:0;position:relative;background:0 0}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{width:100%;height:40px;font-size:14px;line-height:100%;padding:10px 15px;margin:0;background:#fff;border:1px solid #ddd;border-radius:3px;-webkit-border-radius:3px;-webkit-appearance:none;box-sizing:border-box}.dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{border-radius:3px 3px 0 0}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp{display:none!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-suggestions-wrapp{min-height:0!important;border-radius:0 0 5px 5px;border-right-color:#ddd}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp,.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{min-height:41px!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.rtl):not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp{border-right-color:transparent}.dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-details-wrapp .dgwt-wcas-preloader-wrapp{display:none!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-is-details:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestion-nores{margin-top:5px}.rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp{border-left-color:transparent}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus{outline:0;background:#fff;box-shadow:0 0 9px 1px rgba(0,0,0,.06);-webkit-transition:all 150ms ease-in;-moz-transition:all 150ms ease-in;-ms-transition:all 150ms ease-in;-o-transition:all 150ms ease-in;transition:all 150ms ease-in}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::-webkit-input-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:-moz-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::-moz-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:-ms-input-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{overflow:visible;position:absolute;border:0;padding:0;margin:0;cursor:pointer;height:40px;min-width:50px;width:auto;line-height:100%;min-height:100%;right:0;left:auto;top:0;bottom:auto;padding:0 15px;color:#fff;-webkit-transition:all 250ms ease-in-out;-moz-transition:all 250ms ease-in-out;-ms-transition:all 250ms ease-in-out;-o-transition:all 250ms ease-in-out;transition:all 250ms ease-in-out;text-transform:uppercase;background-color:#333;border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;text-shadow:0 -1px 0 rgba(0,0,0,.3);-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none}.rtl .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{left:0;right:auto}.dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit{border-radius:0 2px 0 0}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover{opacity:.7}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus{opacity:.7;outline:0}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before{content:'';position:absolute;border-width:8px 8px 8px 0;border-style:solid solid solid none;border-color:transparent #333 transparent;top:12px;left:-6px;-webkit-transition:all 250ms ease-in-out;-moz-transition:all 250ms ease-in-out;-ms-transition:all 250ms ease-in-out;-o-transition:all 250ms ease-in-out;transition:all 250ms ease-in-out}.rtl .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before{left:auto;right:-6px;border-width:8px 0 8px 8px;border-style:solid none solid solid}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover:before{border-right-color:#333}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active:before,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus:before{border-right-color:#333}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::-moz-focus-inner{border:0;padding:0}.dgwt-wcas-details-wrapp .added_to_cart{display:block}.dgwt-wcas-has-desc .dgwt-wcas-sp>*,.dgwt-wcas-has-img .dgwt-wcas-sp>*{display:block}.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{min-height:340px}body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child{border-bottom:none}.dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product{min-height:40px}.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{overflow:visible}.dgwt-wcas-is-details .dgwt-wcas-si{width:30px;max-width:100%;box-sizing:border-box}.dgwt-wcas-is-details .dgwt-wcas-sp{display:flex;top:0;flex-direction:column;height:100%;justify-content:center;resize:vertical}.dgwt-wcas-is-details .dgwt-wcas-sd{font-size:11px;line-height:100%}.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_cat],.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_tag]{padding-left:15px;min-height:0}.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_cat] .dgwt-wcas-st,.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_tag] .dgwt-wcas-st{padding-left:0}.dgwt-wcas-ico-magnifier,.dgwt-wcas-ico-magnifier-handler{max-width:20px}.dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier{height:50%;margin:auto;max-height:20px;width:100%;max-width:20px;left:12px;right:auto;opacity:.5;fill:#000}.rtl .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier{left:auto;right:12px}.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:10px 15px 10px 40px}.rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:10px 40px 10px 15px}.dgwt-wcas-overlay-mobile-on,.dgwt-wcas-overlay-mobile-on body{overflow:hidden;min-width:100vw;min-height:100vh}.dgwt-wcas-om-bar{display:flex;height:45px;width:100%}.dgwt-wcas-om-bar button.dgwt-wcas-om-return,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:active,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:focus,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:hover{width:45px;height:100%;display:block;background:#ccc;cursor:pointer;position:relative;margin:0;padding:0;box-shadow:none;outline:0;border:medium none;border-spacing:0;border-radius:0}.dgwt-wcas-om-bar .dgwt-wcas-om-return svg{width:23px;height:23px;position:absolute;left:12px;top:12px}.rtl .dgwt-wcas-om-bar .dgwt-wcas-om-return svg{left:11px;top:9px;-moz-transform:rotate(180deg);-webkit-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path{fill:#fff}.dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader{right:0!important}.rtl .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader{left:4px!important;right:auto!important}@keyframes dgwt-wcas-preloader-price-anim{0%{background:rgba(128,128,128,.03)}50%{background:rgba(128,128,128,.1)}100%{background:rgba(128,128,128,.03)}}.dgwt-wcas-preloader-price-inner div:nth-child(1){left:0;animation-delay:-.1s}.dgwt-wcas-preloader-price-inner div:nth-child(2){left:13px;animation-delay:-.2s}.dgwt-wcas-preloader-price-inner div:nth-child(3){left:26px;animation-delay:-.3s}.dgwt-wcas-preloader-price{width:34px;height:10px;display:inline-block;overflow:hidden;background:0 0}.dgwt-wcas-preloader-price-inner{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.dgwt-wcas-preloader-price-inner div{position:absolute;width:8px;height:8px;background:rgba(128,128,128,.05);animation:dgwt-wcas-preloader-price-anim .8s cubic-bezier(0,.5,.5,1) infinite;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.dgwt-wcas-om-bar .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{display:none}.dgwt-wcas-om-bar .dgwt-wcas-search-wrapp-mobile{width:calc(100% - 45px);max-width:none;margin:0}.dgwt-wcas-overlay-mobile .dgwt-wcas-search-form{width:100%}.dgwt-wcas-overlay-mobile{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;background:#fff}.dgwt-wcas-overlay-mobile *{box-sizing:border-box}.dgwt-wcas-search-wrapp-mobile input[type=search].dgwt-wcas-search-input{height:45px!important;border-top:none;border-right:none;border-left:none;border-radius:0;font-size:16px!important}.dgwt-wcas-search-wrapp-mobile input[type=search].dgwt-wcas-search-input:focus{font-size:16px!important}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp{left:0!important;top:45px!important;width:100%!important;height:calc(100% - 45px)!important;position:absolute;overflow-y:auto;border:none;margin:0;display:block}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestion{width:100%}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-enable-mobile-form{display:none}.dgwt-wcas-enable-mobile-form{position:absolute;z-index:100;left:0;top:0;width:100%;height:100%;cursor:pointer}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-mobile .dgwt-wcas-search-form{display:none;position:relative}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-icon-mobile{min-width:0;display:inline-block;width:28px;height:28px}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler{height:100%;width:100%}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler .dgwt-wcas-ico-magnifier{opacity:1;position:static;max-width:none;max-height:none}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-icon-handler{display:none}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{height:calc(100% - 45px)!important}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios{overflow:visible}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{max-height:none!important;height:auto!important}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios body:not(.dgwt-wcas-theme-flatsome)>:not(.dgwt-wcas-overlay-mobile){display:none}body .dgwt-wcas-content-wrapp .rood,body .dgwt-wcas-content-wrapp .zwave{display:none}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon{min-width:unset}.dgwt-wcas-layout-icon-flexible .dgwt-wcas-search-form{opacity:0}.dgwt-wcas-layout-icon-flexible-loaded .dgwt-wcas-search-form{opacity:1}.dgwt-wcas-search-icon-arrow{display:none}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-search-form{opacity:0;display:none;position:absolute;left:0;top:calc(100% + 8px);min-width:500px;z-index:1000}.dgwt-wcas-overlay-mobile .dgwt-wcas-search-icon,.dgwt-wcas-overlay-mobile .dgwt-wcas-search-icon-arrow{display:none}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-form{display:block;opacity:1}.dgwt-wcas-search-icon{width:20px;height:auto;cursor:pointer}.dgwt-wcas-ico-magnifier-handler{margin-bottom:-.2em;width:100%}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon{opacity:.6}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open:not(.dgwt-wcas-has-submit) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier{display:none}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding-left:15px}.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow{display:block;position:absolute;top:calc(100% + 2px);left:0;z-index:5;width:15px;height:15px;background:#fff;border:1px solid #ddd;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon,.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow{display:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion{border-bottom:none}.dgwt-wcas-has-headings .dgwt-wcas-st>span.dgwt-wcas-st--direct-headline{display:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline{pointer-events:none;display:block;font-weight:500;white-space:nowrap}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st{border-bottom:1px solid #ddd;padding-bottom:3px;text-transform:uppercase;margin-top:16px;font-size:12px}.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax{border-bottom:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st{padding:0}.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover{background:0 0;text-decoration:underline}.dgwt-wcas-is-details .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax{min-height:30px}
1
+ .dgwt-wcas-block-scroll{overflow:hidden}.dgwt-wcas-search-wrapp{position:relative;line-height:100%;display:block;color:#444;min-width:230px;width:100%;text-align:left;margin:0 auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dgwt-wcas-tpd-image img{margin:0 15px 0 0!important;display:block}.rtl .dgwt-wcas-tpd-image img{margin:0 0 0 15px!important}.dgwt-wcas-preloader-wrapp img{margin:10px auto 0 auto;display:block;max-width:200px}.dgwt-wcas-preloader-wrapp img.dgwt-wcas-placeholder-preloader{display:block;width:100%;height:auto;max-width:300px;margin:0}.dgwt-wcas-suggestions-wrapp{background:#fff none repeat scroll 0 0;border:1px solid #ddd;border-top:none;padding:0;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow-y:auto}.dgwt-wcas-details-wrapp *,.dgwt-wcas-search-wrapp *,.dgwt-wcas-suggestions-wrapp *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dgwt-wcas-details-wrapp a:focus,.dgwt-wcas-suggestions-wrapp a:focus{outline:0}.dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp--top{border:1px solid #ddd;border-bottom:none}.dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp{max-width:550px}.dgwt-wcas-full-width.dgwt-wcas-is-detail-box .dgwt-wcas-suggestion{padding:8px 15px}.dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp{border-radius:0 0 5px 0;border-left-color:#eee}.dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp{border-radius:0 0 0 5px;border-right-color:#eee}.dgwt-wcas-suggestion{cursor:pointer;font-size:12px;line-height:110%;text-align:left;padding:7px 10px;position:relative;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:row;justify-content:space-between;align-items:center;resize:vertical;width:100%}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{justify-content:center;color:#6d6d6d}a.dgwt-wcas-details-more-products{padding:15px 0 10px 0;display:block;border-top:1px solid #eee;text-align:center;font-size:12px;text-transform:uppercase;color:#6d6d6d;transition:all .2s ease-in-out}a.dgwt-wcas-details-more-products:hover{text-decoration:underline}a.dgwt-wcas-product-details-readmore{display:block;text-align:right;margin-top:15px;color:#6d6d6d;text-transform:uppercase;letter-spacing:1px;font-weight:400;font-size:12px}a.dgwt-wcas-product-details-readmore:hover{text-decoration:underline}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-no-border-bottom{border-bottom:none}.dgwt-wcas-suggestion:after{clear:both;display:block;content:''}.dgwt-wcas-suggestion.dgwt-wcas-nores{cursor:default;opacity:.5}.dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product{padding-top:8px;padding-bottom:8px;min-height:60px}.dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more,.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{min-height:30px;text-transform:uppercase}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more{padding:0 10px;text-align:center}.dgwt-wcas-st{display:block;color:#444;font-size:15px;width:100%;line-height:110%}.dgwt-wcas-st>span{display:inline-block;vertical-align:middle}.dgwt-wcas-has-sku .dgwt-wcas-st-title{margin-right:6px}.dgwt-wcas-st>span.dgwt-wcas-st--direct-headline{display:block;font-style:italic;font-size:10px;text-transform:uppercase;opacity:.4;line-height:10px;margin-bottom:1px;letter-spacing:2px}.dgwt-wcas-st-breadcrumbs{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:80%;text-align:left;opacity:.6;width:100%;padding-right:10px}.rtl .dgwt-wcas-st-breadcrumbs{padding-right:0;padding-left:10px;text-align:right}.dgwt-wcas-sku{font-size:80%}.dgwt-wcas-si{width:50px;display:block;height:100%}.dgwt-wcas-si img{background:#fff none repeat scroll 0 0;border:1px solid #e8e8e8;border-radius:3px;display:block;margin:auto;padding:2px;height:auto;width:auto;max-height:90%;max-width:100%}.dgwt-wcas-content-wrapp{display:flex;height:100%;width:100%;justify-content:space-between;align-items:center;resize:vertical;padding-left:10px}.rtl .dgwt-wcas-content-wrapp{padding-left:0;padding-right:10px}.dgwt-wcas-sp{color:#555;font-size:14px;line-height:120%;text-align:right;line-height:4px;padding-left:10px}.dgwt-wcas-sp *{line-height:130%}.dgwt-wcas-search-form{margin:0;padding:0;width:100%}.dgwt-wcas-sp del{opacity:.5;font-size:12px}.dgwt-wcas-sd{color:#777;display:block;line-height:14px;width:100%;margin-top:5px;font-size:.8em}.dgwt-wcas-vendor-city{margin-left:5px;font-size:.8em}.dgwt-wcas-st>.dgwt-wcas-product-vendor{font-size:12px;margin-top:5px;display:block}.dgwt-wcas-suggestion-selected{background-color:#eee}.dgwt-wcas-suggestion-selected:first-child{border-top:none}.rtl .dgwt-wcas-suggestion{padding-left:0;padding-right:15px;text-align:right}.dgwt-wcas-details-wrapp{background:#fff none repeat scroll 0 0;border:1px solid #ddd;border-top:none;border-left:none;padding:0;width:300px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;z-index:100;min-height:340px}.rtl .dgwt-wcas-details-wrapp{border-left:1px solid #ddd;border-right:none}.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp{margin-top:-1px;border-top:1px solid #ddd}.dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{margin-top:-1px;border-top:1px solid #ddd}.dgwt-wcas-details-right .dgwt-wcas-details-wrapp{border-left:none;border-right:1px solid #ddd;border-radius:0 5px 5px 0}.dgwt-wcas-details-left .dgwt-wcas-details-wrapp{border-right:none;border-left:1px solid #ddd;border-radius:5px 0 0 5px}.dgwt-wcas-details-notfit .dgwt-wcas-details-wrapp{display:none}.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{border-radius:0 0 0 5px}.dgwt-wcas-full-width .dgwt-wcas-details-wrapp{border-radius:0 0 5px 0}.rtl.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{border-radius:0 0 5px 0}.rtl.dgwt-wcas-full-width .dgwt-wcas-details-wrapp{border-radius:0 0 0 5px}.dgwt-wcas-details-inner{display:none}.dgwt-wcas-details-inner.dgwt-wcas-details-inner-active{display:block}.dgwt-wcas-details-inner-taxonomy{margin-top:11px}.woocommerce .dgwt-wcas-pd-rating .star-rating{float:left;margin-right:5px;font-size:12px;color:#ccae72}.rtl .dgwt-wcas-pd-rating .star-rating{float:right;margin-left:5px;margin-right:0}.dgwt-wcas-datails-title{border-bottom:1px dashed #eee;display:block;margin-bottom:15px;padding-bottom:5px;font-size:14px}.dgwt-wcas-pd-title{border-bottom:1px dashed #eee;margin-bottom:15px;padding-bottom:5px;display:block;color:#202020;text-decoration:none}.dgwt-wcas-pd-title .product-title{font-weight:900;color:#202020;text-transform:uppercase;letter-spacing:-1px;margin:0}.dgwt-wcas-details-title-tax{text-transform:uppercase;font-weight:900;letter-spacing:-1px;margin-right:3px}.dgwt-wcas-tax-product-details{text-decoration:none;display:flex;align-items:center;justify-content:left;transition:all .2s ease-in-out;padding:5px;margin:0 -5px 15px -5px}.dgwt-wcas-tax-product-details:after{content:'';clear:both;display:block}.dgwt-wcas-tax-product-details:hover{box-shadow:0 0 11px 2px rgba(0,0,0,.05)}.dgwt-wcas-details-wrapp .dgwt-wcas-pd-title{margin-bottom:8px}.dgwt-wcas-tpd-image{width:60px;margin-right:15px}.dgwt-wcas-pd-rest .product-title{display:block;line-height:100%;font-weight:500;margin-bottom:5px}.dgwt-wcas-tpd-rest{max-width:200px}.dgwt-wcas-tpd-rest-title{display:block;line-height:125%;font-size:14px;font-weight:500;letter-spacing:0;margin:0 0 8px;overflow:hidden;color:#000}.dgwt-wcas-suggestion-nores{pointer-events:none;opacity:.45}.dgwt-wcas-pd-price,.dgwt-wcas-tpd-price{font-size:14px;line-height:120%;overflow:hidden;color:#000;margin-top:15px;font-weight:700;font-size:18px}.dgwt-wcas-tpd-price{font-size:12px;color:#777}.dgwt-wcas-pd-price .woocommerce-price-suffix,.dgwt-wcas-tpd-price .woocommerce-price-suffix{font-size:12px;font-weight:lighter;color:#999;margin-left:4px;display:inline-block}.dgwt-wcas-pd-price del .amount,.dgwt-wcas-tpd-price del .amount{font-weight:lighter;background:0 0;font-size:90%;opacity:.6}.dgwt-wcas-pd-price ins,.dgwt-wcas-tpd-price ins{background:0 0;text-decoration:none}.dgwt-wcas-pd-rating{font-size:13px;line-height:13px}.dgwt-wcas-pd-rating:after{content:'';clear:both;display:block}.dgwt-wcas-pd-review{color:#777;font-size:11px;line-height:11px}.dgwt-wcas-datails-title{border-bottom:1px dashed #eee;display:block;margin:5px 0 15px 0;padding-bottom:5px}.dgwt-wcas-pd-title{border-bottom:1px dashed #eee;margin-bottom:15px;padding-bottom:5px;display:block;text-decoration:none}.dgwt-wcas-pd-title .product-title{font-weight:900;text-transform:uppercase;letter-spacing:-1px}.dgwt-wcas-details-title-tax{text-transform:uppercase;font-weight:900;letter-spacing:-1px;margin-right:3px}.rtl .dgwt-wcas-details-title-tax{margin:0 0 0 3px;float:right}.dgwt-wcas-tpd-image{width:70px;padding:4px;background-color:#fff;border:1px solid #e8e8e8;border-radius:4px;display:flex;flex-direction:column;justify-content:center}.dgwt-wcas-details-space{padding:0 15px 15px 15px}.dgwt-wcas-details-main-image{border-bottom:1px solid #eee;min-height:200px;display:flex}.dgwt-wcas-details-main-image img{width:auto;height:auto;display:block;max-height:250px;max-width:100%;margin:0 auto;padding:0;border:none;align-self:center}.dgwt-wcas-details-right .dgwt-wcas-details-main-image img{border-radius:0 3px 0 0}.dgwt-wcas-details-left .dgwt-wcas-details-main-image img{border-radius:3px 0 0 0}a.dgwt-wcas-details-post-title,a.dgwt-wcas-details-product-title{color:#333;display:block;line-height:120%;margin:10px 0 0 0;font-size:21px;font-weight:400;text-decoration:none;text-transform:none}a.dgwt-wcas-details-post-title:hover,a.dgwt-wcas-details-product-title:hover{text-decoration:underline}a.dgwt-wcas-details-post-title{margin-bottom:15px}.dgwt-wcas-details-product-sku{display:block;font-size:12px;line-height:110%;color:#999}.dgwt-wcas-tpd-image img{display:block;max-width:100%;width:100%;height:auto}.dgwt-wcas-details-hr{height:1px;width:100%;border-bottom:1px solid #eee;margin:15px 0}.rtl .dgwt-wcas-tpd-image{float:right;margin-right:0;margin-left:15px}.rtl .dgwt-wcas-tpd-rest{float:right;max-width:190px}.rtl input[type=search].dgwt-wcas-search-input{text-align:right}input[type=search].dgwt-wcas-search-input,input[type=text].dgwt-cas-search-input{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;-webkit-box-shadow:none;box-shadow:none;margin:0;-webkit-appearance:textfield;text-align:left}[type=search].dgwt-wcas-search-input::-ms-clear{display:none}[type=search].dgwt-wcas-search-input::-webkit-search-decoration{-webkit-appearance:none}[type=search].dgwt-wcas-search-input::-webkit-search-cancel-button{display:none}.dgwt-wcas-details-desc{font-size:13px;line-height:157%}.dgwt-wcas-details-desc b,.dgwt-wcas-details-desc strong{font-weight:400;color:#000;margin:0;padding:0}.dgwt-wcas-pd-addtc-form{margin:10px 0;display:flex;align-items:center;justify-content:flex-end}.dgwt-wcas-pd-addtc-form>.quantity{margin-right:10px}.dgwt-wcas-pd-addtc-form .add_to_cart_inline,.dgwt-wcas-pd-addtc-form .quantity input.qty{margin-bottom:0;margin-top:0}.dgwt-wcas-stock{display:block;text-align:right;font-size:14px;line-height:14px;margin-bottom:14px}.dgwt-wcas-stock.in-stock{color:#0f834d}.dgwt-wcas-stock.out-of-stock{color:#e2401c}.dgwt-wcas-pd-addtc .add_to_cart_button,.dgwt-wcas-pd-addtc .add_to_cart_inline{margin:0}.dgwt-wcas-pd-addtc .add_to_cart_button.added{display:none}button.dgwt-wcas-search-submit,input[type=submit].dgwt-wcas-search-submit{position:relative}.dgwt-wcas-ico-magnifier{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;height:65%;display:block}.dgwt-wcas-preloader{height:100%;position:absolute;right:0;top:0;width:40px;z-index:1;background-repeat:no-repeat;background-position:right 15px center;background-size:auto 44%}.rtl .dgwt-wcas-preloader{right:auto;left:5px}.dgwt-wcas-inner-preloader{background-repeat:no-repeat;background-position:right 8px center;background-size:auto 22px;display:flex;align-items:center;justify-content:center}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.dgwt-wcas-inner-preloader{background-image:url(../img/preloader.gif)}}.dgwt-wcas-loader-circular{height:24px;width:24px;-webkit-animation:2s linear infinite rotate;-moz-animation:2s linear infinite rotate;animation:2s linear infinite rotate}.dgwt-wcas-loader-circular-path{fill:transparent;stroke-linecap:round;stroke-width:4px;stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-animation:1s ease-in-out infinite dash;-moz-animation:1s ease-in-out infinite dash;animation:1s ease-in-out infinite dash}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes rotate{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-moz-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader){cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-transition:all 160ms ease-in-out;-moz-transition:all 160ms ease-in-out;-ms-transition:all 160ms ease-in-out;-o-transition:all 160ms ease-in-out;transition:all 160ms ease-in-out}.dgwt-wcas-close:hover{opacity:.3}@media screen and (max-width:992px){.dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp{max-width:none}}.dgwt-wcas-suggestion strong{font-weight:700}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dgwt-wcas-sf-wrapp:after,.dgwt-wcas-sf-wrapp:before{content:"";display:table}.dgwt-wcas-sf-wrapp:after{clear:both}.dgwt-wcas-sf-wrapp{zoom:1;width:100%;max-width:100vw;margin:0;position:relative;background:0 0}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{width:100%;height:40px;font-size:14px;line-height:100%;padding:10px 15px;margin:0;background:#fff;border:1px solid #ddd;border-radius:3px;-webkit-border-radius:3px;-webkit-appearance:none;box-sizing:border-box}.dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{border-radius:3px 3px 0 0}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp{display:none!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-suggestions-wrapp{min-height:0!important;border-radius:0 0 5px 5px;border-right-color:#ddd}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp,.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{min-height:41px!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.rtl):not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp{border-right-color:transparent}.dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-details-wrapp .dgwt-wcas-preloader-wrapp{display:none!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-is-details:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestion-nores{margin-top:5px}.rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp{border-left-color:transparent}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus{outline:0;background:#fff;box-shadow:0 0 9px 1px rgba(0,0,0,.06);-webkit-transition:all 150ms ease-in;-moz-transition:all 150ms ease-in;-ms-transition:all 150ms ease-in;-o-transition:all 150ms ease-in;transition:all 150ms ease-in}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::-webkit-input-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:-moz-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::-moz-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:-ms-input-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{overflow:visible;position:absolute;border:0;padding:0;margin:0;cursor:pointer;height:40px;min-width:50px;width:auto;line-height:100%;min-height:100%;right:0;left:auto;top:0;bottom:auto;padding:0 15px;color:#fff;-webkit-transition:all 250ms ease-in-out;-moz-transition:all 250ms ease-in-out;-ms-transition:all 250ms ease-in-out;-o-transition:all 250ms ease-in-out;transition:all 250ms ease-in-out;text-transform:uppercase;background-color:#333;border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;text-shadow:0 -1px 0 rgba(0,0,0,.3);-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none}.rtl .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{left:0;right:auto}.dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit{border-radius:0 2px 0 0}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover{opacity:.7}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus{opacity:.7;outline:0}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before{content:'';position:absolute;border-width:8px 8px 8px 0;border-style:solid solid solid none;border-color:transparent #333 transparent;top:12px;left:-6px;-webkit-transition:all 250ms ease-in-out;-moz-transition:all 250ms ease-in-out;-ms-transition:all 250ms ease-in-out;-o-transition:all 250ms ease-in-out;transition:all 250ms ease-in-out}.rtl .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before{left:auto;right:-6px;border-width:8px 0 8px 8px;border-style:solid none solid solid}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover:before{border-right-color:#333}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active:before,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus:before{border-right-color:#333}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::-moz-focus-inner{border:0;padding:0}.dgwt-wcas-details-wrapp .added_to_cart{display:block}.dgwt-wcas-has-desc .dgwt-wcas-sp>*,.dgwt-wcas-has-img .dgwt-wcas-sp>*{display:block}.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{min-height:340px}body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child{border-bottom:none}.dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product{min-height:40px}.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{overflow:visible}.dgwt-wcas-is-details .dgwt-wcas-si{width:30px;max-width:100%;box-sizing:border-box}.dgwt-wcas-is-details .dgwt-wcas-sp{display:flex;top:0;flex-direction:column;height:100%;justify-content:center;resize:vertical}.dgwt-wcas-is-details .dgwt-wcas-sd{font-size:11px;line-height:100%}.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_cat],.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_tag]{padding-left:15px;min-height:0}.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_cat] .dgwt-wcas-st,.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_tag] .dgwt-wcas-st{padding-left:0}.dgwt-wcas-ico-magnifier,.dgwt-wcas-ico-magnifier-handler{max-width:20px}.dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier{height:50%;margin:auto;max-height:20px;width:100%;max-width:20px;left:12px;right:auto;opacity:.5;fill:#000}.rtl .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier{left:auto;right:12px}.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:10px 15px 10px 40px}.rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:10px 40px 10px 15px}.dgwt-wcas-overlay-mobile-on,.dgwt-wcas-overlay-mobile-on body{overflow:hidden;min-width:100vw;min-height:100vh}.dgwt-wcas-om-bar{display:flex;height:45px;width:100%}.dgwt-wcas-om-bar button.dgwt-wcas-om-return,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:active,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:focus,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:hover{width:45px;height:100%;display:block;background:#ccc;cursor:pointer;position:relative;margin:0;padding:0;box-shadow:none;outline:0;border:medium none;border-spacing:0;border-radius:0}.dgwt-wcas-om-bar .dgwt-wcas-om-return svg{width:23px;height:23px;position:absolute;left:12px;top:12px}.rtl .dgwt-wcas-om-bar .dgwt-wcas-om-return svg{left:11px;top:9px;-moz-transform:rotate(180deg);-webkit-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path{fill:#fff}.dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader{right:0!important}.rtl .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader{left:4px!important;right:auto!important}@keyframes dgwt-wcas-preloader-price-anim{0%{background:rgba(128,128,128,.03)}50%{background:rgba(128,128,128,.1)}100%{background:rgba(128,128,128,.03)}}.dgwt-wcas-preloader-price-inner div:nth-child(1){left:0;animation-delay:-.1s}.dgwt-wcas-preloader-price-inner div:nth-child(2){left:13px;animation-delay:-.2s}.dgwt-wcas-preloader-price-inner div:nth-child(3){left:26px;animation-delay:-.3s}.dgwt-wcas-preloader-price{width:34px;height:10px;display:inline-block;overflow:hidden;background:0 0}.dgwt-wcas-preloader-price-inner{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.dgwt-wcas-preloader-price-inner div{position:absolute;width:8px;height:8px;background:rgba(128,128,128,.05);animation:dgwt-wcas-preloader-price-anim .8s cubic-bezier(0,.5,.5,1) infinite;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.dgwt-wcas-om-bar .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{display:none}.dgwt-wcas-om-bar .dgwt-wcas-search-wrapp-mobile{width:calc(100% - 45px);max-width:none;margin:0}.dgwt-wcas-overlay-mobile .dgwt-wcas-search-form{width:100%}.dgwt-wcas-overlay-mobile{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;background:#fff}.dgwt-wcas-overlay-mobile *{box-sizing:border-box}.dgwt-wcas-search-wrapp-mobile input[type=search].dgwt-wcas-search-input{height:45px!important;border-top:none;border-right:none;border-left:none;border-radius:0;font-size:16px!important}.dgwt-wcas-search-wrapp-mobile input[type=search].dgwt-wcas-search-input:focus{font-size:16px!important}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp{left:0!important;top:45px!important;width:100%!important;height:calc(100% - 45px)!important;position:absolute;overflow-y:auto;border:none;margin:0;display:block}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestion{width:100%}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-enable-mobile-form{display:none}.dgwt-wcas-enable-mobile-form{position:absolute;z-index:100;left:0;top:0;width:100%;height:100%;cursor:pointer}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-mobile .dgwt-wcas-search-form{display:none;position:relative}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-icon-mobile{min-width:0;display:inline-block;width:28px;height:28px}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler{height:100%;width:100%}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler .dgwt-wcas-ico-magnifier{opacity:1;position:static;max-width:none;max-height:none}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-icon-handler{display:none}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{height:calc(100% - 45px)!important}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios{overflow:visible}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{max-height:none!important;height:auto!important}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios body:not(.dgwt-wcas-theme-flatsome)>:not(.dgwt-wcas-overlay-mobile){display:none}body .dgwt-wcas-content-wrapp .rood,body .dgwt-wcas-content-wrapp .zwave{display:none}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon{min-width:unset}.dgwt-wcas-layout-icon-flexible .dgwt-wcas-search-form{opacity:0}.dgwt-wcas-layout-icon-flexible-loaded .dgwt-wcas-search-form{opacity:1}.dgwt-wcas-search-icon-arrow{display:none}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-search-form{opacity:0;display:none;position:absolute;left:0;top:calc(100% + 8px);min-width:500px;z-index:1000}.dgwt-wcas-overlay-mobile .dgwt-wcas-search-icon,.dgwt-wcas-overlay-mobile .dgwt-wcas-search-icon-arrow{display:none}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-form{display:block;opacity:1}.dgwt-wcas-search-icon{width:20px;height:auto;cursor:pointer}.dgwt-wcas-ico-magnifier-handler{margin-bottom:-.2em;width:100%}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon{opacity:.6}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open:not(.dgwt-wcas-has-submit) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier{display:none}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding-left:15px}.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow{display:block;position:absolute;top:calc(100% + 2px);left:0;z-index:5;width:15px;height:15px;background:#fff;border:1px solid #ddd;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon,.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow{display:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion{border-bottom:none}.dgwt-wcas-has-headings .dgwt-wcas-st>span.dgwt-wcas-st--direct-headline{display:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline{pointer-events:none;display:block;font-weight:500;white-space:nowrap}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st{border-bottom:1px solid #ddd;padding-bottom:3px;text-transform:uppercase;margin-top:16px;font-size:12px}.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax{border-bottom:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st{padding:0}.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover{background:0 0;text-decoration:underline}.dgwt-wcas-is-details .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax{min-height:30px}
assets/js/admin.js CHANGED
@@ -130,6 +130,42 @@
130
 
131
  };
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  var CONDITIONAL_LAYOUT_SETTINGS = {
134
  layoutSelect: "select[id*='search_layout']",
135
  overlayMobile: "input[id*='enable_mobile_overlay']",
@@ -317,7 +353,18 @@
317
 
318
  if (response.data.loop) {
319
  _this.heartbeat();
320
- }
 
 
 
 
 
 
 
 
 
 
 
321
 
322
  }
323
  }
@@ -698,8 +745,10 @@
698
  'show_product_desc',
699
  'show_product_price',
700
  'show_matching_categories',
 
701
  'show_matching_tags',
702
  'show_matching_brands',
 
703
  'show_matching_posts',
704
  'show_matching_pages',
705
  'show_grouped_results',
@@ -707,7 +756,7 @@
707
  'show_details_box'
708
  ];
709
  for (var i = 0; i < options.length; i++) {
710
- var selector = "input[id*='" + options[i] + "']";
711
  var $el = $(selector),
712
  methodToCall = 'onChange' + _this.camelCase(options[i]);
713
 
@@ -718,7 +767,9 @@
718
  $(document).on('change', selector, function () {
719
  methodToCall = $(this).attr('id').replace(']', '').replace('dgwt_wcas_settings[', '');
720
  methodToCall = 'onChange' + _this.camelCase(methodToCall);
721
- _this[methodToCall]($(this), this.value);
 
 
722
  });
723
  }
724
  },
@@ -889,13 +940,13 @@
889
  $items = $('.dgwt-wcas-suggestion-cat');
890
 
891
  if (_this.isChecked($el)) {
892
- $headline.show();
893
  $items.show();
894
  $items.removeClass('js-dgwt-wcas-suggestion-hidden');
895
 
896
  _this.onChangeShowGroupedResults($("input[id*='show_grouped_results']"));
897
  } else {
898
- $headline.hide();
899
  $items.hide();
900
  $items.addClass('js-dgwt-wcas-suggestion-hidden');
901
  }
@@ -904,6 +955,16 @@
904
  _this.onChangeSuggestionsLimit($limitInput, $limitInput.val());
905
 
906
  },
 
 
 
 
 
 
 
 
 
 
907
  onChangeShowMatchingTags: function ($el, value) {
908
  var _this = this,
909
  $headline = $('.dgwt-wcas-suggestion-headline-tag'),
@@ -946,6 +1007,16 @@
946
  _this.onChangeSuggestionsLimit($limitInput, $limitInput.val());
947
 
948
  },
 
 
 
 
 
 
 
 
 
 
949
  onChangeShowMatchingPosts: function ($el, value) {
950
  var _this = this,
951
  $headline = $('.dgwt-wcas-suggestion-headline-post'),
@@ -1488,6 +1559,25 @@
1488
  },
1489
  }
1490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1491
  var SETTINGS_FILTERS_RULES = {
1492
  init: function () {
1493
 
@@ -1683,6 +1773,8 @@
1683
  TOOLTIP.init();
1684
  ADVANCED_SETTINGS.init();
1685
  TROUBLESHOOTING.init();
 
 
1686
 
1687
  SETTINGS_FILTERS_RULES.init();
1688
  window.DGWT_WCAS_SEARCH_PREVIEW.init();
130
 
131
  };
132
 
133
+ var CHECKBOX_SETTINGS_TOGGLE_SIBLING = {
134
+ inputSel: 'js-dgwt-wcas-options-toggle-sibling input[type=checkbox]',
135
+
136
+ toogleSibling: function ($el) {
137
+ var _this = this;
138
+ var checked = $el.is(':checked');
139
+
140
+ if (checked) {
141
+ $el.closest('label').next().fadeIn();
142
+ } else {
143
+ $el.closest('label').next().hide();
144
+ }
145
+ },
146
+
147
+ registerListeners: function () {
148
+ var _this = this;
149
+
150
+ $(document).on('change', '.' + _this.inputSel, function () {
151
+ _this.toogleSibling($(this));
152
+ });
153
+ },
154
+
155
+ init: function () {
156
+ var _this = this;
157
+ var $sel = $('.' + _this.inputSel);
158
+
159
+ if ($sel.length > 0) {
160
+ _this.registerListeners();
161
+
162
+ $sel.each(function () {
163
+ _this.toogleSibling($(this));
164
+ });
165
+ }
166
+ }
167
+ };
168
+
169
  var CONDITIONAL_LAYOUT_SETTINGS = {
170
  layoutSelect: "select[id*='search_layout']",
171
  overlayMobile: "input[id*='enable_mobile_overlay']",
353
 
354
  if (response.data.loop) {
355
  _this.heartbeat();
356
+ } else if (response.data.refresh_once.length > 0) {
357
+ // If refresh cookie non exist and Troubleshooting tab is hidden then reload
358
+ if (
359
+ !document.cookie.split(';').some(function (item) {
360
+ return item.trim().indexOf('dgwt_wcas_refresh_once=' + response.data.refresh_once) === 0;
361
+ }) &&
362
+ $('#dgwt_wcas_troubleshooting-tab').css('display') === 'none'
363
+ ) {
364
+ document.cookie = 'dgwt_wcas_refresh_once=' + response.data.refresh_once;
365
+ location.reload();
366
+ }
367
+ }
368
 
369
  }
370
  }
745
  'show_product_desc',
746
  'show_product_price',
747
  'show_matching_categories',
748
+ 'show_categories_images',
749
  'show_matching_tags',
750
  'show_matching_brands',
751
+ 'show_brands_images',
752
  'show_matching_posts',
753
  'show_matching_pages',
754
  'show_grouped_results',
756
  'show_details_box'
757
  ];
758
  for (var i = 0; i < options.length; i++) {
759
+ var selector = "input[id='dgwt_wcas_settings\\[" + options[i] + "\\]']";
760
  var $el = $(selector),
761
  methodToCall = 'onChange' + _this.camelCase(options[i]);
762
 
767
  $(document).on('change', selector, function () {
768
  methodToCall = $(this).attr('id').replace(']', '').replace('dgwt_wcas_settings[', '');
769
  methodToCall = 'onChange' + _this.camelCase(methodToCall);
770
+ if (typeof (_this[methodToCall]) === 'function') {
771
+ _this[methodToCall]($(this), this.value);
772
+ }
773
  });
774
  }
775
  },
940
  $items = $('.dgwt-wcas-suggestion-cat');
941
 
942
  if (_this.isChecked($el)) {
943
+ $headline.show();
944
  $items.show();
945
  $items.removeClass('js-dgwt-wcas-suggestion-hidden');
946
 
947
  _this.onChangeShowGroupedResults($("input[id*='show_grouped_results']"));
948
  } else {
949
+ $headline.hide();
950
  $items.hide();
951
  $items.addClass('js-dgwt-wcas-suggestion-hidden');
952
  }
955
  _this.onChangeSuggestionsLimit($limitInput, $limitInput.val());
956
 
957
  },
958
+ onChangeShowCategoriesImages: function ($el, value) {
959
+ var _this = this,
960
+ $contentWrapp = $('.js-dgwt-wcas-suggestion-cat');
961
+
962
+ if (_this.isChecked($el)) {
963
+ $contentWrapp.addClass('dgwt-wcas-has-img');
964
+ } else {
965
+ $contentWrapp.removeClass('dgwt-wcas-has-img');
966
+ }
967
+ },
968
  onChangeShowMatchingTags: function ($el, value) {
969
  var _this = this,
970
  $headline = $('.dgwt-wcas-suggestion-headline-tag'),
1007
  _this.onChangeSuggestionsLimit($limitInput, $limitInput.val());
1008
 
1009
  },
1010
+ onChangeShowBrandsImages: function ($el, value) {
1011
+ var _this = this,
1012
+ $contentWrapp = $('.js-dgwt-wcas-suggestion-brand');
1013
+
1014
+ if (_this.isChecked($el)) {
1015
+ $contentWrapp.addClass('dgwt-wcas-has-img');
1016
+ } else {
1017
+ $contentWrapp.removeClass('dgwt-wcas-has-img');
1018
+ }
1019
+ },
1020
  onChangeShowMatchingPosts: function ($el, value) {
1021
  var _this = this,
1022
  $headline = $('.dgwt-wcas-suggestion-headline-post'),
1559
  },
1560
  }
1561
 
1562
+ var MOVE_OPTIONS = {
1563
+ moveOptionClass: '.js-dgwt-wcas-move-option',
1564
+ init: function () {
1565
+ var optionsToMove = $(this.moveOptionClass);
1566
+ if (optionsToMove.length > 0) {
1567
+ $.each(optionsToMove, function (index, el) {
1568
+ var moveDest = $('#' + $(el).data('move-dest').replace(/(:|\.|\[|\])/g, '\\$1'));
1569
+ if (moveDest.length > 0) {
1570
+ if ($(el).closest('tr').hasClass('dgwt-wcas-premium-only')) {
1571
+ $(el).addClass('dgwt-wcas-premium-only');
1572
+ }
1573
+ $(el).clone().appendTo(moveDest.closest('td fieldset'));
1574
+ }
1575
+ $(el).closest('tr').remove();
1576
+ });
1577
+ }
1578
+ }
1579
+ }
1580
+
1581
  var SETTINGS_FILTERS_RULES = {
1582
  init: function () {
1583
 
1773
  TOOLTIP.init();
1774
  ADVANCED_SETTINGS.init();
1775
  TROUBLESHOOTING.init();
1776
+ MOVE_OPTIONS.init();
1777
+ CHECKBOX_SETTINGS_TOGGLE_SIBLING.init();
1778
 
1779
  SETTINGS_FILTERS_RULES.init();
1780
  window.DGWT_WCAS_SEARCH_PREVIEW.init();
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(s){var t={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=s('[name="'+t+'"]').closest("."+this.groupSel),a=s('[name="'+t+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),s("."+i).length>0&&s("."+i).fadeIn()},hideAll:function(s){s.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var t=this;s("."+t.inputSel).on("change",function(){t.reloadChoices(s(this).attr("name"))})},init:function(){var t=this,e=s("."+t.inputSel+":checked");e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=t.is(":checked"),a=this.getGroupSelector(t);s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&s("."+a).each(function(){s(this).hasClass("js-dgwt-wcas-adv-settings")&&s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||s(this).fadeIn()})},getGroupSelector(t){var e=t.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return s.each(i,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=t)}),a},registerListeners:function(){var t=this;s(document).on("change","."+t.inputSel,function(){t.reloadChoices(s(this))})},refresh:function(){var t=this,e=s("."+t.inputSel);e.length>0&&e.each(function(){var e=s(this).is(":checked"),a=t.getGroupSelector(s(this));e?s("."+a).fadeIn():s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var t=this,e=s("."+t.inputSel);e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this))}))}},a={layoutSelect:"select[id*='search_layout']",overlayMobile:"input[id*='enable_mobile_overlay']",mobileBreakpoint:"input[id*='mobile_breakpoint']",searchIconColor:"input[id*='search_icon_color']",$select:null,$overlayMobileEl:null,$mobileBreakpointEl:null,$searchIconColorEl:null,setConditions:function(){var t=this.$select.find("option:selected").val(),e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),s("input[id*='bg_search_icon_color']").closest("tr").show(),t){case"icon":e&&this.showOption(this.$searchIconColorEl);break;case"icon-flexible":e&&(this.showOption(this.$mobileBreakpointEl),this.showOption(this.$searchIconColorEl));break;default:e&&(this.showOption(this.$overlayMobileEl),s("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(s){s.closest("tr").hide()},showOption:function(s){s.closest("tr").show()},registerListeners:function(){var s=this;s.$select.on("change",function(){s.setConditions()}),s.$overlayMobileEl.on("change",function(){s.setConditions()})},init:function(){var t=this,e=s(t.layoutSelect);e.length>0&&(t.$select=e,t.$overlayMobileEl=s(t.overlayMobile),t.$mobileBreakpointEl=s(t.mobileBreakpoint),t.$searchIconColorEl=s(t.searchIconColor),t.registerListeners(),setTimeout(function(){t.setConditions()},400))}},i={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",getWrapper:function(){return s("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var t=this;s(document).on("click","."+t.actionTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(s(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),s(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i,_wpnonce:dgwt_wcas.nonces.build_index},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled"),s(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),s(document).on("click","."+t.actionStopTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var t=this;setTimeout(function(){s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat",_wpnonce:dgwt_wcas.nonces.build_index_heartbeat},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),s.data.loop&&t.heartbeat())}})},1e3)},detailsToggle:function(){var t;s(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=s(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),s(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),t=!1):(a.addClass("show"),a.removeClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),s(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),t=!0),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:t}})})},init:function(){this.registerListeners(),s("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},o={init:function(){var t=this;s(".dgwt-wcas-selectize").length>0&&s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:s(".dgwt-wcas-selectize").data("security")},success:function(s){void 0!==s&&void 0!==s.data&&t.initSelectize(s.data)}})},initSelectize:function(t){var e=s(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=s(this),a=e.data("options"),i=t;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var o="";a.forEach(function(s,t){if((t+1)%2==0){var e={value:s,label:o};i.push(e),o=""}o=s})}s(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:i,create:function(s){return{value:s.key,label:s.label}},load:function(t,a){if(!t.length)return a();s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(s){a(s.data)}})}})})}},n={init:function(){var t=s(".js-dgwt-wcas-tooltip");t.length>0&&t.each(function(){var t=s(this)[0],e=s(this).data("tooltip-html-el"),a=s(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(t,{title:s("."+e+" > .dgwt-wcas-tooltip-wrapper")[0],placement:a,trigger:"hover",html:!0})}})}},c={advClass:"js-dgwt-wcas-adv-settings",highlightClass:"dgwt-wcas-opt-highlight",transClass:"dgwt-wcas-opt-transition",init:function(){this.clickListener(),this.setStartingState()},clickListener:function(){var t=this;s(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",t.saveChoice(e)})},setStartingState:function(){var t=s("."+this.advClass);t.length>0&&(s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(t.show(),e.refresh()):t.hide())},saveChoice:function(t){s(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:t}}).done(function(t){s(".dgwt-wcas-adv-settings-saving").remove()});var e=s(".js-dgwt-wcas-adv-settings-toggle");"show"===t&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===t&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(t)},toggleAdvancedOpt:function(t){var i=this,o=s("."+i.advClass);o.length>0&&(o.addClass(i.highlightClass),o.addClass(i.transClass),"show"===t&&o.fadeIn(500,function(){setTimeout(function(){o.removeClass(i.highlightClass),setTimeout(function(){o.removeClass(i.transClass),e.refresh(),a.setConditions()},500)},500)}),"hide"===t&&setTimeout(function(){o.removeClass(i.transClass),o.fadeOut(500,function(){o.removeClass(i.highlightClass)})},500))}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=s(".js-dgwt-wcas-preview"),this.searchWrapp=s(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=s(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=s(".js-dgwt-wcas-details-wrapp"),this.searchInput=s(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(s){return!!(s.length>0&&s.is(":checked"))},isColor:function(s){return"string"==typeof s&&7===s.length&&"#"===s.charAt(0)},camelCase:function(s){for(var t=s.split("_"),e="",a=0;a<t.length;a++)e+=t[a].charAt(0).toUpperCase()+t[a].slice(1);return e},disableSubmit:function(){var t,e;s(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==t&&(clearTimeout(t),e&&e.remove()),s("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=s(".dgwt-wcas-click-alert")).css({left:i,top:o}),s(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),t=setTimeout(function(){e.fadeOut(500,function(){s(this).remove(),s(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var t=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";s(document).on("focus",a,function(){s(e).addClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),t.detailsWrapp.addClass("dgwt-wcas-hide"),t.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),s(document).on("blur",a,function(){s(e).removeClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),t.detailsWrapp.removeClass("dgwt-wcas-hide"),t.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var t=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_matching_tags","show_matching_brands","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onChange"+t.camelCase(e[a]);"function"==typeof t[n]&&t[n](o,o.val()),s(document).on("change",i,function(){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onChange"+t.camelCase(n),t[n](s(this),this.value)})}},onColorHandler:function(){for(var t=this,e=["search_icon_color","bg_input_color","text_input_color","border_input_color","bg_submit_color","text_submit_color","sug_bg_color","sug_hover_color","sug_text_color","sug_highlight_color","sug_border_color"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onColor"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("change",i,function(e){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+t.camelCase(n),t[n](s(this),this.value)})}},onColorChangeHandler:function(s,t){var e=s.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](s,t)},onTypeHandler:function(){for(var t=this,e=["search_submit_text","search_placeholder","search_no_results_text","search_see_all_results_text"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onType"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("input",i,function(e){n=s(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+t.camelCase(n),t[n](s(e.target),this.value)})}},onChangeMaxFormWidth:function(t,e){e.length>0&&"0"!=e?(this.searchWrapp.css("max-width",e+"px"),this.suggestionWrapp.css("max-width",e+"px")):(this.searchWrapp.css("max-width","100%"),this.suggestionWrapp.css("max-width","100%")),this.onChangeShowDetailsBox(s("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(t,e){var a=s(".js-dgwt-wcas-search-submit");if(this.isChecked(t)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=s("input[id*='bg_submit_color']"),o=s("input[id*='text_submit_color']");this.onColorBgSubmitColor(i,i.val()),this.onColorTextSubmitColor(o,o.val())}else this.searchWrapp.addClass("dgwt-wcas-no-submit"),this.searchWrapp.removeClass("dgwt-wcas-has-submit"),a.hide(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(t,e){var a=s(".js-dgwt-wcas-si"),i=s(".js-dgwt-wcas-content-wrapp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){s(this).closest(".dgwt-wcas-suggestion-product").append(s(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(t,e){var a=s(".js-dgwt-wcas-sku");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(t,e){var a=s(".js-dgwt-wcas-sd");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(t,e){var a=s(".js-dgwt-wcas-sp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-cat"),i=s(".dgwt-wcas-suggestion-cat");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingTags:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-tag"),i=s(".dgwt-wcas-suggestion-tag");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-brand"),i=s(".dgwt-wcas-suggestion-brand");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPosts:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-post"),i=s(".dgwt-wcas-suggestion-post");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-page"),i=s(".dgwt-wcas-suggestion-page");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(t,e){var a=s(".dgwt-wcas-st--direct-headline"),i=s(".dgwt-wcas-suggestion-headline");this.isChecked(t)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),s(".dgwt-wcas-suggestion-headline").show(),this.isChecked(s("input[id*='show_matching_categories']"))||s(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(s("input[id*='show_matching_tags']"))||s(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(s("input[id*='show_matching_brands']"))||s(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(s("input[id*='show_matching_posts']"))||s(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(s("input[id*='show_matching_pages']"))||s(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(t,e){setTimeout(function(){var a=0,i=7,o=s(".dgwt-wcas-suggestion-duplicated"),n=["brand","cat","tag","post","page","product"];e.length>0&&"0"!=e&&(i=Math.abs(e)),o.length>0&&o.remove();var c=[];for(a=0;a<n.length;a++){var r=s(".dgwt-wcas-suggestion-"+n[a]+":not(.js-dgwt-wcas-suggestion-hidden)");r.length>0&&c.push(r)}var d=c.length;if(c.length>0)for(var l=i-c.length,g=c.length-1;l>0;){var h=c[g].clone();h.addClass("dgwt-wcas-suggestion-duplicated"),h.removeClass("dgwt-wcas-suggestion-selected"),c[g].after(h),d++,--g<0&&(g=c.length-1),l--}d>i&&t.val(d)},10)},onChangeShowDetailsBox:function(t,e){var a=this;a.isChecked(t)?(a.detailsWrapp.show(),a.searchWrapp.addClass("dgwt-wcas-is-detail-box"),a.previewWrapper.addClass("dgwt-wcas-is-details"),a.previewWrapper.addClass("dgwt-wcas-details-right"),setTimeout(function(){if(s(".dgwt-wcas-suggestion-product:not(.dgwt-wcas-suggestion-duplicated)").addClass("dgwt-wcas-suggestion-selected"),a.searchWrapp.width()>=550){a.previewWrapper.addClass("dgwt-wcas-full-width");var t=getComputedStyle(a.searchWrapp[0]).width;(t=Math.round(parseFloat(t.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(t/2)),a.detailsWrapp.css("width",Math.round(t/2))):(a.suggestionWrapp.css("width",Math.floor(t/2)),a.detailsWrapp.css("width",Math.ceil(t/2)))}else a.suggestionWrapp.width(a.searchWrapp.width())},10)):(a.detailsWrapp.hide(),a.searchWrapp.removeClass("dgwt-wcas-is-detail-box"),a.previewWrapper.removeClass("dgwt-wcas-is-details"),a.previewWrapper.removeClass("dgwt-wcas-details-right"),a.previewWrapper.removeClass("dgwt-wcas-full-width"),s(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(s,t){},onColorBgInputColor:function(s,t){this.isColor(t)?this.searchInput.css("background-color",t):this.searchInput.css("background-color","")},onColorTextInputColor:function(t,e){var a="dgwt-wcas-preview-placeholder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-search-input::placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-webkit-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-ms-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-ico-magnifier path {fill:"+e+"}",i+="</style>",s("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=s("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(s,t){this.isColor(t)?this.searchInput.css("border-color",t):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(t,e){if(this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)){var a='<style class="dgwt-wcas-preview-submit-style">';a+=".dgwt-wcas-search-submit::before{border-color: transparent "+e+"!important;}",a+=".dgwt-wcas-search-submit:hover::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit:focus::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit{background-color: "+e+"!important;}",a+=".dgwt-wcas-om-bar .dgwt-wcas-om-return{background-color: "+e+"!important;}",a+="</style>",s("head").append(a)}else{var i=s(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(t,e){this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)?(s(".js-dgwt-wcas-search-submit").css("color",e),s(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),s(".js-dgwt-wcas-search-submit").css("color",""),s(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(t,e){var a="dgwt-wcas-preview-sugbgcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp",i+="{background-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(t,e){this.isColor(e)?setTimeout(function(){s(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):s(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(t,e){var a="dgwt-wcas-preview-sugtextcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp *,",i+=".dgwt-wcas-details-wrapp *,",i+=".dgwt-wcas-sd,",i+=".dgwt-wcas-suggestion *",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(t,e){var a="dgwt-wcas-preview-sughighlight-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-st strong,",i+=".dgwt-wcas-sd strong",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(t,e){var a="dgwt-wcas-preview-sugborder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp,",i+=".dgwt-wcas-suggestion,",i+=".dgwt-wcas-datails-title,",i+=".dgwt-wcas-details-more-products",i+="{border-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(t,e){var a=s(".js-dgwt-wcas-search-submit-l"),i=s(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(s,t){0==t.length&&(t=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",t)},onTypeSearchNoResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.no_results),s(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.show_more),s(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var t=this;s(document).on("click","#dgwt_wcas_autocomplete-tab",function(){t.onChangeShowDetailsBox(s("input[id*='show_details_box']"))})}};var r={settingsTab:"#dgwt_wcas_troubleshooting-tab",noIssuesClass:".js-dgwt-wcas-troubleshooting-no-issues",counterClass:".js-dgwt-wcas-troubleshooting-count",issuesListClass:".js-dgwt-wcas-troubleshooting-issues",progressBar:".dgwt-wcas-troubleshooting-wrapper .progress_bar",progressBarInner:".dgwt-wcas-troubleshooting-wrapper .progress-bar-inner",resetButtonName:"dgwt-wcas-reset-async-tests",init:function(){var t=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(s(t.counterClass).text(e),s(t.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&s.each(dgwt_wcas.troubleshooting.tests.results_async,function(){t.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&s.each(dgwt_wcas.troubleshooting.tests.direct,function(){t.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&t.maybeRunNextAsyncTest(),s(document).on("click",'input[name="'+t.resetButtonName+'"]',function(e){s('input[name="'+t.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return s.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(t,e){var a,i=wp.template("dgwt-wcas-troubleshooting-issue"),o=s(this.issuesListClass+"-"+t.status);"good"!==t.status&&(s(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[t.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(s(this.counterClass).text(a),s(this.settingsTab).addClass("enabled")),s(o).append(i(t)))},maybeRunNextAsyncTest:function(){var t=this;dgwt_wcas.troubleshooting.tests.async.length>0&&s.each(dgwt_wcas.troubleshooting.tests.async,function(){var e={action:"dgwt_wcas_troubleshooting_test",test:this.test,_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_async_test};return!!this.completed||(this.completed=!0,s(t.progressBar).show(),s.post(ajaxurl,e,function(s){s.success&&t.appendIssue(s.data,!0),t.maybeRunNextAsyncTest()}),!1)}),t.recalculateProgression()},recalculateProgression:function(){var t=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;s.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var i=Math.ceil(a/e*100);s(t.progressBarInner).css("width",i+"%"),100===i&&setTimeout(function(){s(t.progressBar).slideUp()},2e3)}},d=function(){if("undefined"!=typeof Vue){Vue.component("dgwt-wcas-rule",{template:"#dgwt-wcas-settings-filters-rules-rule",components:{Selectize:Selectize},props:["nonce","rule","rules","index"],data:()=>({isSelectActive:!0}),computed:{ruleValue(s){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var s=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){s.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(t){var e=void 0===dgwt_wcas_filters_rules_selected_options[t]?[]:dgwt_wcas_filters_rules_selected_options[t];return function({nonce:t,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(s){return{value:s.key,label:s.label}},load:function(e,i){s.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:t},error:function(){i()},success:function(s){i(s.data)}})}}}({nonce:this.nonce,type:t,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const t=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);s.each(t,function(s,e){t[s].key=Math.random()}),this.rules=t}catch(s){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(s){this.rules[s].values=[],this.updateInput()},deleteRule(s){this.rules=this.rules.filter(function(t,e){return e!==s}),this.updateInput()},updateInput(){const s=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(s.map(function(s){return s.key,delete s.key,s}))}}})}};s(document).ready(function(){var l,g;(l=s(".js-dgwt-wcas-settings-margin-nob")).length>0&&l.each(function(){var t=s(this).find("td .dgwt-wcas-fieldset");if(t.length>0){var e=s(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=s(this).attr("class").split(/\s+/),i="";s.each(a,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=t)});var o=t.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),s(this).remove()}}}),t.init(),e.init(),a.init(),(g=s(".js-dgwt-wcas-sgs-autocolspan")).length>0&&g.find("td").attr("colspan",2),i.init(),o.init(),n.init(),c.init(),r.init(),d(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
1
+ !function(s){var t={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=s('[name="'+t+'"]').closest("."+this.groupSel),a=s('[name="'+t+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),s("."+i).length>0&&s("."+i).fadeIn()},hideAll:function(s){s.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var t=this;s("."+t.inputSel).on("change",function(){t.reloadChoices(s(this).attr("name"))})},init:function(){var t=this,e=s("."+t.inputSel+":checked");e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=t.is(":checked"),a=this.getGroupSelector(t);s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&s("."+a).each(function(){s(this).hasClass("js-dgwt-wcas-adv-settings")&&s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||s(this).fadeIn()})},getGroupSelector(t){var e=t.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return s.each(i,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=t)}),a},registerListeners:function(){var t=this;s(document).on("change","."+t.inputSel,function(){t.reloadChoices(s(this))})},refresh:function(){var t=this,e=s("."+t.inputSel);e.length>0&&e.each(function(){var e=s(this).is(":checked"),a=t.getGroupSelector(s(this));e?s("."+a).fadeIn():s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var t=this,e=s("."+t.inputSel);e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this))}))}},a={inputSel:"js-dgwt-wcas-options-toggle-sibling input[type=checkbox]",toogleSibling:function(s){s.is(":checked")?s.closest("label").next().fadeIn():s.closest("label").next().hide()},registerListeners:function(){var t=this;s(document).on("change","."+t.inputSel,function(){t.toogleSibling(s(this))})},init:function(){var t=this,e=s("."+t.inputSel);e.length>0&&(t.registerListeners(),e.each(function(){t.toogleSibling(s(this))}))}},i={layoutSelect:"select[id*='search_layout']",overlayMobile:"input[id*='enable_mobile_overlay']",mobileBreakpoint:"input[id*='mobile_breakpoint']",searchIconColor:"input[id*='search_icon_color']",$select:null,$overlayMobileEl:null,$mobileBreakpointEl:null,$searchIconColorEl:null,setConditions:function(){var t=this.$select.find("option:selected").val(),e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),s("input[id*='bg_search_icon_color']").closest("tr").show(),t){case"icon":e&&this.showOption(this.$searchIconColorEl);break;case"icon-flexible":e&&(this.showOption(this.$mobileBreakpointEl),this.showOption(this.$searchIconColorEl));break;default:e&&(this.showOption(this.$overlayMobileEl),s("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(s){s.closest("tr").hide()},showOption:function(s){s.closest("tr").show()},registerListeners:function(){var s=this;s.$select.on("change",function(){s.setConditions()}),s.$overlayMobileEl.on("change",function(){s.setConditions()})},init:function(){var t=this,e=s(t.layoutSelect);e.length>0&&(t.$select=e,t.$overlayMobileEl=s(t.overlayMobile),t.$mobileBreakpointEl=s(t.mobileBreakpoint),t.$searchIconColorEl=s(t.searchIconColor),t.registerListeners(),setTimeout(function(){t.setConditions()},400))}},o={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",getWrapper:function(){return s("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var t=this;s(document).on("click","."+t.actionTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(s(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),s(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i,_wpnonce:dgwt_wcas.nonces.build_index},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled"),s(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),s(document).on("click","."+t.actionStopTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var t=this;setTimeout(function(){s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat",_wpnonce:dgwt_wcas.nonces.build_index_heartbeat},success:function(e){void 0!==e&&e.success&&(t.getWrapper().html(e.data.html),e.data.loop?t.heartbeat():e.data.refresh_once.length>0&&(document.cookie.split(";").some(function(s){return 0===s.trim().indexOf("dgwt_wcas_refresh_once="+e.data.refresh_once)})||"none"!==s("#dgwt_wcas_troubleshooting-tab").css("display")||(document.cookie="dgwt_wcas_refresh_once="+e.data.refresh_once,location.reload())))}})},1e3)},detailsToggle:function(){var t;s(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=s(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),s(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),t=!1):(a.addClass("show"),a.removeClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),s(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),t=!0),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:t}})})},init:function(){this.registerListeners(),s("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},n={init:function(){var t=this;s(".dgwt-wcas-selectize").length>0&&s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:s(".dgwt-wcas-selectize").data("security")},success:function(s){void 0!==s&&void 0!==s.data&&t.initSelectize(s.data)}})},initSelectize:function(t){var e=s(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=s(this),a=e.data("options"),i=t;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var o="";a.forEach(function(s,t){if((t+1)%2==0){var e={value:s,label:o};i.push(e),o=""}o=s})}s(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:i,create:function(s){return{value:s.key,label:s.label}},load:function(t,a){if(!t.length)return a();s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(s){a(s.data)}})}})})}},c={init:function(){var t=s(".js-dgwt-wcas-tooltip");t.length>0&&t.each(function(){var t=s(this)[0],e=s(this).data("tooltip-html-el"),a=s(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(t,{title:s("."+e+" > .dgwt-wcas-tooltip-wrapper")[0],placement:a,trigger:"hover",html:!0})}})}},r={advClass:"js-dgwt-wcas-adv-settings",highlightClass:"dgwt-wcas-opt-highlight",transClass:"dgwt-wcas-opt-transition",init:function(){this.clickListener(),this.setStartingState()},clickListener:function(){var t=this;s(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",t.saveChoice(e)})},setStartingState:function(){var t=s("."+this.advClass);t.length>0&&(s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(t.show(),e.refresh()):t.hide())},saveChoice:function(t){s(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:t}}).done(function(t){s(".dgwt-wcas-adv-settings-saving").remove()});var e=s(".js-dgwt-wcas-adv-settings-toggle");"show"===t&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===t&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(t)},toggleAdvancedOpt:function(t){var a=this,o=s("."+a.advClass);o.length>0&&(o.addClass(a.highlightClass),o.addClass(a.transClass),"show"===t&&o.fadeIn(500,function(){setTimeout(function(){o.removeClass(a.highlightClass),setTimeout(function(){o.removeClass(a.transClass),e.refresh(),i.setConditions()},500)},500)}),"hide"===t&&setTimeout(function(){o.removeClass(a.transClass),o.fadeOut(500,function(){o.removeClass(a.highlightClass)})},500))}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=s(".js-dgwt-wcas-preview"),this.searchWrapp=s(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=s(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=s(".js-dgwt-wcas-details-wrapp"),this.searchInput=s(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(s){return!!(s.length>0&&s.is(":checked"))},isColor:function(s){return"string"==typeof s&&7===s.length&&"#"===s.charAt(0)},camelCase:function(s){for(var t=s.split("_"),e="",a=0;a<t.length;a++)e+=t[a].charAt(0).toUpperCase()+t[a].slice(1);return e},disableSubmit:function(){var t,e;s(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==t&&(clearTimeout(t),e&&e.remove()),s("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=s(".dgwt-wcas-click-alert")).css({left:i,top:o}),s(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),t=setTimeout(function(){e.fadeOut(500,function(){s(this).remove(),s(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var t=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";s(document).on("focus",a,function(){s(e).addClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),t.detailsWrapp.addClass("dgwt-wcas-hide"),t.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),s(document).on("blur",a,function(){s(e).removeClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),t.detailsWrapp.removeClass("dgwt-wcas-hide"),t.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var t=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_categories_images","show_matching_tags","show_matching_brands","show_brands_images","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var i="input[id='dgwt_wcas_settings\\["+e[a]+"\\]']",o=s(i),n="onChange"+t.camelCase(e[a]);"function"==typeof t[n]&&t[n](o,o.val()),s(document).on("change",i,function(){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onChange"+t.camelCase(n),"function"==typeof t[n]&&t[n](s(this),this.value)})}},onColorHandler:function(){for(var t=this,e=["search_icon_color","bg_input_color","text_input_color","border_input_color","bg_submit_color","text_submit_color","sug_bg_color","sug_hover_color","sug_text_color","sug_highlight_color","sug_border_color"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onColor"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("change",i,function(e){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+t.camelCase(n),t[n](s(this),this.value)})}},onColorChangeHandler:function(s,t){var e=s.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](s,t)},onTypeHandler:function(){for(var t=this,e=["search_submit_text","search_placeholder","search_no_results_text","search_see_all_results_text"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onType"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("input",i,function(e){n=s(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+t.camelCase(n),t[n](s(e.target),this.value)})}},onChangeMaxFormWidth:function(t,e){e.length>0&&"0"!=e?(this.searchWrapp.css("max-width",e+"px"),this.suggestionWrapp.css("max-width",e+"px")):(this.searchWrapp.css("max-width","100%"),this.suggestionWrapp.css("max-width","100%")),this.onChangeShowDetailsBox(s("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(t,e){var a=s(".js-dgwt-wcas-search-submit");if(this.isChecked(t)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=s("input[id*='bg_submit_color']"),o=s("input[id*='text_submit_color']");this.onColorBgSubmitColor(i,i.val()),this.onColorTextSubmitColor(o,o.val())}else this.searchWrapp.addClass("dgwt-wcas-no-submit"),this.searchWrapp.removeClass("dgwt-wcas-has-submit"),a.hide(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(t,e){var a=s(".js-dgwt-wcas-si"),i=s(".js-dgwt-wcas-content-wrapp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){s(this).closest(".dgwt-wcas-suggestion-product").append(s(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(t,e){var a=s(".js-dgwt-wcas-sku");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(t,e){var a=s(".js-dgwt-wcas-sd");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(t,e){var a=s(".js-dgwt-wcas-sp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-cat"),i=s(".dgwt-wcas-suggestion-cat");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowCategoriesImages:function(t,e){var a=s(".js-dgwt-wcas-suggestion-cat");this.isChecked(t)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingTags:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-tag"),i=s(".dgwt-wcas-suggestion-tag");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-brand"),i=s(".dgwt-wcas-suggestion-brand");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowBrandsImages:function(t,e){var a=s(".js-dgwt-wcas-suggestion-brand");this.isChecked(t)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingPosts:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-post"),i=s(".dgwt-wcas-suggestion-post");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-page"),i=s(".dgwt-wcas-suggestion-page");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(t,e){var a=s(".dgwt-wcas-st--direct-headline"),i=s(".dgwt-wcas-suggestion-headline");this.isChecked(t)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),s(".dgwt-wcas-suggestion-headline").show(),this.isChecked(s("input[id*='show_matching_categories']"))||s(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(s("input[id*='show_matching_tags']"))||s(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(s("input[id*='show_matching_brands']"))||s(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(s("input[id*='show_matching_posts']"))||s(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(s("input[id*='show_matching_pages']"))||s(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(t,e){setTimeout(function(){var a=0,i=7,o=s(".dgwt-wcas-suggestion-duplicated"),n=["brand","cat","tag","post","page","product"];e.length>0&&"0"!=e&&(i=Math.abs(e)),o.length>0&&o.remove();var c=[];for(a=0;a<n.length;a++){var r=s(".dgwt-wcas-suggestion-"+n[a]+":not(.js-dgwt-wcas-suggestion-hidden)");r.length>0&&c.push(r)}var d=c.length;if(c.length>0)for(var l=i-c.length,g=c.length-1;l>0;){var h=c[g].clone();h.addClass("dgwt-wcas-suggestion-duplicated"),h.removeClass("dgwt-wcas-suggestion-selected"),c[g].after(h),d++,--g<0&&(g=c.length-1),l--}d>i&&t.val(d)},10)},onChangeShowDetailsBox:function(t,e){var a=this;a.isChecked(t)?(a.detailsWrapp.show(),a.searchWrapp.addClass("dgwt-wcas-is-detail-box"),a.previewWrapper.addClass("dgwt-wcas-is-details"),a.previewWrapper.addClass("dgwt-wcas-details-right"),setTimeout(function(){if(s(".dgwt-wcas-suggestion-product:not(.dgwt-wcas-suggestion-duplicated)").addClass("dgwt-wcas-suggestion-selected"),a.searchWrapp.width()>=550){a.previewWrapper.addClass("dgwt-wcas-full-width");var t=getComputedStyle(a.searchWrapp[0]).width;(t=Math.round(parseFloat(t.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(t/2)),a.detailsWrapp.css("width",Math.round(t/2))):(a.suggestionWrapp.css("width",Math.floor(t/2)),a.detailsWrapp.css("width",Math.ceil(t/2)))}else a.suggestionWrapp.width(a.searchWrapp.width())},10)):(a.detailsWrapp.hide(),a.searchWrapp.removeClass("dgwt-wcas-is-detail-box"),a.previewWrapper.removeClass("dgwt-wcas-is-details"),a.previewWrapper.removeClass("dgwt-wcas-details-right"),a.previewWrapper.removeClass("dgwt-wcas-full-width"),s(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(s,t){},onColorBgInputColor:function(s,t){this.isColor(t)?this.searchInput.css("background-color",t):this.searchInput.css("background-color","")},onColorTextInputColor:function(t,e){var a="dgwt-wcas-preview-placeholder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-search-input::placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-webkit-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-ms-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-ico-magnifier path {fill:"+e+"}",i+="</style>",s("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=s("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(s,t){this.isColor(t)?this.searchInput.css("border-color",t):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(t,e){if(this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)){var a='<style class="dgwt-wcas-preview-submit-style">';a+=".dgwt-wcas-search-submit::before{border-color: transparent "+e+"!important;}",a+=".dgwt-wcas-search-submit:hover::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit:focus::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit{background-color: "+e+"!important;}",a+=".dgwt-wcas-om-bar .dgwt-wcas-om-return{background-color: "+e+"!important;}",a+="</style>",s("head").append(a)}else{var i=s(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(t,e){this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)?(s(".js-dgwt-wcas-search-submit").css("color",e),s(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),s(".js-dgwt-wcas-search-submit").css("color",""),s(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(t,e){var a="dgwt-wcas-preview-sugbgcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp",i+="{background-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(t,e){this.isColor(e)?setTimeout(function(){s(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):s(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(t,e){var a="dgwt-wcas-preview-sugtextcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp *,",i+=".dgwt-wcas-details-wrapp *,",i+=".dgwt-wcas-sd,",i+=".dgwt-wcas-suggestion *",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(t,e){var a="dgwt-wcas-preview-sughighlight-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-st strong,",i+=".dgwt-wcas-sd strong",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(t,e){var a="dgwt-wcas-preview-sugborder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp,",i+=".dgwt-wcas-suggestion,",i+=".dgwt-wcas-datails-title,",i+=".dgwt-wcas-details-more-products",i+="{border-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(t,e){var a=s(".js-dgwt-wcas-search-submit-l"),i=s(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(s,t){0==t.length&&(t=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",t)},onTypeSearchNoResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.no_results),s(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.show_more),s(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var t=this;s(document).on("click","#dgwt_wcas_autocomplete-tab",function(){t.onChangeShowDetailsBox(s("input[id*='show_details_box']"))})}};var d={settingsTab:"#dgwt_wcas_troubleshooting-tab",noIssuesClass:".js-dgwt-wcas-troubleshooting-no-issues",counterClass:".js-dgwt-wcas-troubleshooting-count",issuesListClass:".js-dgwt-wcas-troubleshooting-issues",progressBar:".dgwt-wcas-troubleshooting-wrapper .progress_bar",progressBarInner:".dgwt-wcas-troubleshooting-wrapper .progress-bar-inner",resetButtonName:"dgwt-wcas-reset-async-tests",init:function(){var t=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(s(t.counterClass).text(e),s(t.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&s.each(dgwt_wcas.troubleshooting.tests.results_async,function(){t.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&s.each(dgwt_wcas.troubleshooting.tests.direct,function(){t.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&t.maybeRunNextAsyncTest(),s(document).on("click",'input[name="'+t.resetButtonName+'"]',function(e){s('input[name="'+t.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return s.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(t,e){var a,i=wp.template("dgwt-wcas-troubleshooting-issue"),o=s(this.issuesListClass+"-"+t.status);"good"!==t.status&&(s(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[t.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(s(this.counterClass).text(a),s(this.settingsTab).addClass("enabled")),s(o).append(i(t)))},maybeRunNextAsyncTest:function(){var t=this;dgwt_wcas.troubleshooting.tests.async.length>0&&s.each(dgwt_wcas.troubleshooting.tests.async,function(){var e={action:"dgwt_wcas_troubleshooting_test",test:this.test,_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_async_test};return!!this.completed||(this.completed=!0,s(t.progressBar).show(),s.post(ajaxurl,e,function(s){s.success&&t.appendIssue(s.data,!0),t.maybeRunNextAsyncTest()}),!1)}),t.recalculateProgression()},recalculateProgression:function(){var t=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;s.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var i=Math.ceil(a/e*100);s(t.progressBarInner).css("width",i+"%"),100===i&&setTimeout(function(){s(t.progressBar).slideUp()},2e3)}},l={moveOptionClass:".js-dgwt-wcas-move-option",init:function(){var t=s(this.moveOptionClass);t.length>0&&s.each(t,function(t,e){var a=s("#"+s(e).data("move-dest").replace(/(:|\.|\[|\])/g,"\\$1"));a.length>0&&(s(e).closest("tr").hasClass("dgwt-wcas-premium-only")&&s(e).addClass("dgwt-wcas-premium-only"),s(e).clone().appendTo(a.closest("td fieldset"))),s(e).closest("tr").remove()})}},g=function(){if("undefined"!=typeof Vue){Vue.component("dgwt-wcas-rule",{template:"#dgwt-wcas-settings-filters-rules-rule",components:{Selectize:Selectize},props:["nonce","rule","rules","index"],data:()=>({isSelectActive:!0}),computed:{ruleValue(s){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var s=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){s.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(t){var e=void 0===dgwt_wcas_filters_rules_selected_options[t]?[]:dgwt_wcas_filters_rules_selected_options[t];return function({nonce:t,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(s){return{value:s.key,label:s.label}},load:function(e,i){s.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:t},error:function(){i()},success:function(s){i(s.data)}})}}}({nonce:this.nonce,type:t,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const t=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);s.each(t,function(s,e){t[s].key=Math.random()}),this.rules=t}catch(s){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(s){this.rules[s].values=[],this.updateInput()},deleteRule(s){this.rules=this.rules.filter(function(t,e){return e!==s}),this.updateInput()},updateInput(){const s=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(s.map(function(s){return s.key,delete s.key,s}))}}})}};s(document).ready(function(){var h,w;(h=s(".js-dgwt-wcas-settings-margin-nob")).length>0&&h.each(function(){var t=s(this).find("td .dgwt-wcas-fieldset");if(t.length>0){var e=s(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=s(this).attr("class").split(/\s+/),i="";s.each(a,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=t)});var o=t.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),s(this).remove()}}}),t.init(),e.init(),i.init(),(w=s(".js-dgwt-wcas-sgs-autocolspan")).length>0&&w.find("td").attr("colspan",2),o.init(),n.init(),c.init(),r.init(),d.init(),l.init(),a.init(),g(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
assets/js/search.js CHANGED
@@ -46,20 +46,28 @@
46
  if (dgwt_wcas.is_premium) {
47
  var i,
48
  tokens = phrase.split(/ /),
49
- highlighted = false;
 
50
 
51
  if (tokens) {
 
52
  tokens = tokens.sort(function (a, b) {
53
  return b.length - a.length;
54
  });
55
 
56
  for (i = 0; i < tokens.length; i++) {
57
- if (tokens[i] && tokens[i].length > 1) {
58
 
59
  var token = tokens[i].replace(/[\^\@]/g, '');
60
 
61
  if (token.length > 0) {
62
- var pattern = '(' + utils.escapeRegExChars(token.trim()) + ')';
 
 
 
 
 
 
63
 
64
  suggestionValue = suggestionValue.replace(new RegExp(pattern, 'gi'), '\^\^$1\@\@');
65
  highlighted = true;
@@ -136,7 +144,14 @@
136
  }
137
 
138
  return instance;
139
- }
 
 
 
 
 
 
 
140
  };
141
  }()),
142
  ajaxDebounceState = {
@@ -289,6 +304,7 @@
289
  .replace(/</g, '&lt;')
290
  .replace(/>/g, '&gt;')
291
  .replace(/"/g, '&quot;')
 
292
  .replace(/&lt;sup/g, '<sup')
293
  .replace(/&lt;\/sup/g, '</sup')
294
  .replace(/sup&gt;/g, 'sup>')
@@ -410,10 +426,7 @@
410
  // Click close icon
411
  $(document).on('click.autocomplete', '.' + that.options.closeTrigger, function () {
412
  var that = utils.getActiveInstance();
413
- that.hide();
414
- that.clear(false);
415
- that.hideCloseButton();
416
- $(this).closest('.' + that.options.searchFormClass).find('.' + that.options.searchInputClass).val('').focus();
417
  });
418
 
419
  // Extra tasks on submit
@@ -424,6 +437,13 @@
424
  return false;
425
  }
426
 
 
 
 
 
 
 
 
427
  // If variation suggestion exist, click it instead submit search results page
428
  if (that.suggestions.length > 0) {
429
 
@@ -551,7 +571,7 @@
551
  })
552
 
553
  // Update quantity
554
- $(document).on('change', '[name="js-dgwt-wcas-quantity"]', function (e) {
555
  var $input = $(this).closest('.js-dgwt-wcas-pd-addtc').find('[data-quantity]');
556
  $input.attr('data-quantity', $(this).val());
557
  });
@@ -562,7 +582,7 @@
562
  $formWrapper = that.getFormWrapper();
563
  var $form = $formWrapper.find('.' + that.options.formClass);
564
 
565
- $formWrapper.on('click', '.js-dgwt-wcas-search-icon-handler', function (e) {
566
 
567
  var $input = $formWrapper.find('.' + that.options.searchInputClass);
568
 
@@ -594,7 +614,7 @@
594
 
595
  if ($('.js-dgwt-wcas-initialized').length == 0 && $('.js-dgwt-wcas-search-icon-handler').length > 0) {
596
 
597
- $(document).click(function (event) {
598
 
599
  if ($('.dgwt-wcas-layout-icon-open').length) {
600
 
@@ -629,7 +649,7 @@
629
  if (document.readyState == 'complete') {
630
  that.applyFlexibleMode();
631
  } else {
632
- $(window).on('load', function () {
633
  that.applyFlexibleMode();
634
  });
635
  }
@@ -638,7 +658,7 @@
638
  registerEventsFixedMenu: function () {
639
  var that = this;
640
 
641
- $(window).on('scroll', function () {
642
 
643
  if (that.suggestions.length > 0 && that.elementOrParentIsFixed(that.getFormWrapper())) {
644
  if ($(window).scrollTop() === 0) {
@@ -671,7 +691,7 @@
671
 
672
  var $el = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
673
 
674
- $el.on('click', function (e) {
675
  that.enableOverlayMobile();
676
  });
677
 
@@ -785,6 +805,14 @@
785
  this.currentValue = '';
786
  this.suggestions = [];
787
  },
 
 
 
 
 
 
 
 
788
  disable: function () {
789
  var that = this;
790
  that.disabled = true;
@@ -1184,7 +1212,7 @@
1184
  parts;
1185
 
1186
  if (!delimiter) {
1187
- return value;
1188
  }
1189
  parts = value.split(delimiter);
1190
  return $.trim(parts[parts.length - 1]);
@@ -1342,8 +1370,7 @@
1342
 
1343
  that.fixHeight();
1344
 
1345
- var cacheKey,
1346
- $containerDetails = that.getDetailsContainer(),
1347
  currentObjectID = that.prepareSuggestionObjectID(suggestion),
1348
  result;
1349
 
@@ -1353,7 +1380,7 @@
1353
  if (result != null) {
1354
 
1355
  // Load response from cache
1356
- $containerDetails.html(result.html);
1357
  that.fixHeight();
1358
  that.fixPositionCapture();
1359
 
@@ -1380,8 +1407,8 @@
1380
  });
1381
 
1382
 
1383
- $containerDetails.html('');
1384
- that.preloader('show', 'details', '', true);
1385
 
1386
  // Prevent duplicate ajax requests
1387
  if ($.inArray(currentObjectID, that.detailsRequestsSent) != -1) {
@@ -1402,6 +1429,7 @@
1402
  for (var i = 0; i < result.items.length; i++) {
1403
  var cacheKey = result.items[i]['objectID'];
1404
  that.cachedDetails[cacheKey] = {html: result.items[i]['html']}
 
1405
 
1406
  if (typeof result.items[i]['price'] != 'undefined' && result.items[i]['price'].length > 0) {
1407
  that.cachedPrices[cacheKey] = result.items[i]['price'];
@@ -1416,15 +1444,15 @@
1416
  }
1417
  }
1418
 
1419
- that.preloader('hide', 'details', '', true);
1420
 
1421
  var currentObjectID = that.prepareSuggestionObjectID(that.suggestions[that.selectedIndex]);
1422
 
1423
  if (that.cachedDetails[currentObjectID] != null) {
1424
- $containerDetails.html(that.cachedDetails[currentObjectID]['html']);
1425
  } else {
1426
- // @TODO Co wyświetlić w Details panel gdy napotkamy błąd?
1427
- $containerDetails.html('');
1428
  }
1429
  that.fixPositionCapture();
1430
  that.fixHeight();
@@ -1433,9 +1461,9 @@
1433
  },
1434
  error: function (jqXHR, exception) {
1435
 
1436
- that.preloader('hide', 'details', '', true);
1437
 
1438
- $containerDetails.html(jqXHR);
1439
  that.fixPositionCapture();
1440
  that.fixHeight();
1441
  },
@@ -1603,6 +1631,42 @@
1603
 
1604
  return objectID;
1605
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1606
  selectFirstSuggestion: function (suggestions) {
1607
  var that = this,
1608
  index = 0,
@@ -1719,6 +1783,9 @@
1719
 
1720
  formLeftValue = Math.floor(-1 * (formWidth * iconLeftRatio));
1721
 
 
 
 
1722
  $form.css({'left': formLeftValue + 'px'});
1723
 
1724
  },
@@ -1877,7 +1944,7 @@
1877
  suggestion.value = dgwt_wcas.labels.no_results;
1878
  highlight = false;
1879
  if (options.showDetailsPanel === true) {
1880
- containerDetails.html('');
1881
  }
1882
  $('body').addClass('dgwt-wcas-nores');
1883
  }
@@ -2148,54 +2215,64 @@
2148
  * @param action (show or hide)
2149
  * @param container (parent selector)
2150
  * @param cssClass
2151
- * @param detailsBox bool
2152
  */
2153
- preloader: function (action, place, cssClass, detailsBox) {
2154
-
2155
  var that = this,
2156
  html,
2157
- container,
2158
  defaultClass = 'dgwt-wcas-preloader-wrapp',
2159
  cssClasses = cssClass == null ? defaultClass : defaultClass + ' ' + cssClass;
2160
 
2161
-
2162
  if (place === 'form') {
2163
- container = that.getFormWrapper().find('.dgwt-wcas-preloader');
 
 
 
 
 
 
2164
  } else if (place === 'details') {
2165
- container = that.getDetailsContainer();
2166
  }
2167
 
2168
- // Disable preloader and check if container exist
2169
-
2170
- if (dgwt_wcas.show_preloader != 1 || container.length == 0) {
2171
  return;
2172
  }
2173
 
2174
- if (detailsBox !== true) {
 
2175
  if (action === 'hide') {
2176
- container.removeClass(cssClass);
2177
- container.html('');
2178
  } else {
2179
- container.addClass(cssClass);
2180
  if(typeof dgwt_wcas.preloader_icon == 'string'){
2181
- container.html(dgwt_wcas.preloader_icon);
2182
  }
2183
  }
2184
  return;
2185
  }
2186
 
2187
- // Action hide
2188
- if (action === 'hide') {
2189
- $(defaultClass).remove();
2190
- return
2191
- }
 
 
 
 
 
2192
 
2193
  // Action show
2194
  if (action === 'show') {
2195
- // html = '<div class="' + cssClasses + '"><div class="dgwt-wcas-default-preloadera"></div></div>';
2196
  var rtlSuffix = that.options.isRtl ? '-rtl' : '';
2197
  html = '<div class="' + cssClasses + '"><img class="dgwt-wcas-placeholder-preloader" src="' + dgwt_wcas.img_url + 'placeholder' + rtlSuffix + '.png" /></div>';
2198
- container.html(html);
 
 
 
 
2199
  }
2200
  },
2201
  verifySuggestionsFormat: function (suggestions) {
@@ -2413,11 +2490,37 @@
2413
  return currentValue.substr(0, currentValue.length - parts[parts.length - 1].length) + value;
2414
  },
2415
  dispose: function () {
2416
- var that = this;
2417
- that.el.off('.autocomplete').removeData('autocomplete');
2418
- $(window).off('resize.autocomplete', that.fixPositionCapture);
2419
- $('.' + that.options.containerClass).remove();
2420
- $('.' + that.options.containerDetailsClass).remove();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2421
  },
2422
  enableOverlayMobile: function () {
2423
  var that = this;
@@ -2440,11 +2543,6 @@
2440
  html += '<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">'
2441
  if (typeof dgwt_wcas.back_icon == 'string') {
2442
  html += dgwt_wcas.back_icon;
2443
- } else {
2444
- /* TODO Remove it soon */
2445
- html += '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#FFF">';
2446
- html += '<path fill="#FFF" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"></path>';
2447
- html += '</svg>';
2448
  }
2449
  html += '</button>';
2450
  html += '</div>';
@@ -2467,7 +2565,7 @@
2467
 
2468
  $wrapper.find('.' + that.options.searchInputClass).focus();
2469
 
2470
- $(document).on('click', '.js-dgwt-wcas-om-return', function (e) {
2471
  that.disableOverlayMobile($overlayWrap);
2472
  });
2473
  },
@@ -2539,16 +2637,17 @@
2539
  return isFixed;
2540
  },
2541
  gaEvent: function (label, category) {
2542
- var that = this;
2543
- if (that.options.sendGAEvents) {
 
2544
  try {
2545
  if (typeof gtag !== 'undefined') {
2546
  gtag('event', 'autocomplete_search', {
2547
  'event_label': label,
2548
  'event_category': category
2549
  });
2550
- } else if (typeof ga !== 'undefined') {
2551
- var tracker = ga.getAll()[0];
2552
  if (tracker) tracker.send({
2553
  hitType: 'event',
2554
  eventCategory: category,
@@ -2565,8 +2664,8 @@
2565
  gtag('event', 'page_view', {
2566
  'page_path': '/?s=' + encodeURI(label) + '&post_type=product&dgwt_wcas=1',
2567
  });
2568
- } else if (typeof ga !== 'undefined') {
2569
- var tracker2 = ga.getAll()[0];
2570
  if (tracker2) {
2571
  tracker2.set('page', '/?s=' + encodeURI(label) + '&post_type=product&dgwt_wcas=1');
2572
  tracker2.send('pageview');
@@ -2601,6 +2700,7 @@
2601
  if (instance && instance.dispose) {
2602
  instance.dispose();
2603
  }
 
2604
  instance = new DgwtWcasAutocompleteSearch(this, options);
2605
  inputElement.data(dataKey, instance);
2606
  }
@@ -2627,6 +2727,18 @@
2627
  || (navigator.userAgent.includes("Mac") && "ontouchend" in document)
2628
  }
2629
 
 
 
 
 
 
 
 
 
 
 
 
 
2630
  // RUN
2631
  $(document).ready(function () {
2632
  "use strict";
46
  if (dgwt_wcas.is_premium) {
47
  var i,
48
  tokens = phrase.split(/ /),
49
+ highlighted = false,
50
+ last = '';
51
 
52
  if (tokens) {
53
+ last = tokens[tokens.length - 1];
54
  tokens = tokens.sort(function (a, b) {
55
  return b.length - a.length;
56
  });
57
 
58
  for (i = 0; i < tokens.length; i++) {
59
+ if (tokens[i] && tokens[i].length >= 1) {
60
 
61
  var token = tokens[i].replace(/[\^\@]/g, '');
62
 
63
  if (token.length > 0) {
64
+ if (token.trim().length === 1 && tokens[i] !== last) {
65
+ var pattern = '((\\s|^)' + utils.escapeRegExChars(token.trim()) + '\\s)';
66
+ } else if (token.trim().length === 1 && tokens[i] === last) {
67
+ var pattern = '((\\s|^)' + utils.escapeRegExChars(token.trim()) + ')';
68
+ } else {
69
+ var pattern = '(' + utils.escapeRegExChars(token.trim()) + ')';
70
+ }
71
 
72
  suggestionValue = suggestionValue.replace(new RegExp(pattern, 'gi'), '\^\^$1\@\@');
73
  highlighted = true;
144
  }
145
 
146
  return instance;
147
+ },
148
+ hashCode: function (s) {
149
+ var h = 0, i = s.length;
150
+ while (i > 0) {
151
+ h = (h << 5) - h + s.charCodeAt(--i) | 0;
152
+ }
153
+ return h < 0 ? h * -1 : h;
154
+ }
155
  };
156
  }()),
157
  ajaxDebounceState = {
304
  .replace(/</g, '&lt;')
305
  .replace(/>/g, '&gt;')
306
  .replace(/"/g, '&quot;')
307
+ .replace(/'/g, '&apos;')
308
  .replace(/&lt;sup/g, '<sup')
309
  .replace(/&lt;\/sup/g, '</sup')
310
  .replace(/sup&gt;/g, 'sup>')
426
  // Click close icon
427
  $(document).on('click.autocomplete', '.' + that.options.closeTrigger, function () {
428
  var that = utils.getActiveInstance();
429
+ that.close();
 
 
 
430
  });
431
 
432
  // Extra tasks on submit
437
  return false;
438
  }
439
 
440
+ // Prevent submit empty form
441
+ var $input = $(this).find('.' + that.options.searchInputClass);
442
+ if ($input.length && $input.val().length === 0) {
443
+ e.preventDefault();
444
+ return false;
445
+ }
446
+
447
  // If variation suggestion exist, click it instead submit search results page
448
  if (that.suggestions.length > 0) {
449
 
571
  })
572
 
573
  // Update quantity
574
+ $(document).on('change.autocomplete', '[name="js-dgwt-wcas-quantity"]', function (e) {
575
  var $input = $(this).closest('.js-dgwt-wcas-pd-addtc').find('[data-quantity]');
576
  $input.attr('data-quantity', $(this).val());
577
  });
582
  $formWrapper = that.getFormWrapper();
583
  var $form = $formWrapper.find('.' + that.options.formClass);
584
 
585
+ $formWrapper.on('click.autocomplete', '.js-dgwt-wcas-search-icon-handler', function (e) {
586
 
587
  var $input = $formWrapper.find('.' + that.options.searchInputClass);
588
 
614
 
615
  if ($('.js-dgwt-wcas-initialized').length == 0 && $('.js-dgwt-wcas-search-icon-handler').length > 0) {
616
 
617
+ $(document).on('click.autocomplete', function (event) {
618
 
619
  if ($('.dgwt-wcas-layout-icon-open').length) {
620
 
649
  if (document.readyState == 'complete') {
650
  that.applyFlexibleMode();
651
  } else {
652
+ $(window).on('load.autocomplete', function () {
653
  that.applyFlexibleMode();
654
  });
655
  }
658
  registerEventsFixedMenu: function () {
659
  var that = this;
660
 
661
+ $(window).on('scroll.autocomplete', function () {
662
 
663
  if (that.suggestions.length > 0 && that.elementOrParentIsFixed(that.getFormWrapper())) {
664
  if ($(window).scrollTop() === 0) {
691
 
692
  var $el = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
693
 
694
+ $el.on('click.autocomplete', function (e) {
695
  that.enableOverlayMobile();
696
  });
697
 
805
  this.currentValue = '';
806
  this.suggestions = [];
807
  },
808
+ close: function (){
809
+ var that = this;
810
+
811
+ that.hide();
812
+ that.clear(false);
813
+ that.hideCloseButton();
814
+ that.el.closest('.' + that.options.searchFormClass).find('.' + that.options.searchInputClass).val('').focus();
815
+ },
816
  disable: function () {
817
  var that = this;
818
  that.disabled = true;
1212
  parts;
1213
 
1214
  if (!delimiter) {
1215
+ return value.trim();
1216
  }
1217
  parts = value.split(delimiter);
1218
  return $.trim(parts[parts.length - 1]);
1370
 
1371
  that.fixHeight();
1372
 
1373
+ var $containerDetails = that.getDetailsContainer(),
 
1374
  currentObjectID = that.prepareSuggestionObjectID(suggestion),
1375
  result;
1376
 
1380
  if (result != null) {
1381
 
1382
  // Load response from cache
1383
+ that.detailsPanelSetScene(currentObjectID);
1384
  that.fixHeight();
1385
  that.fixPositionCapture();
1386
 
1407
  });
1408
 
1409
 
1410
+ that.detailsPanelClearScene();
1411
+ that.preloader('show', 'details', '');
1412
 
1413
  // Prevent duplicate ajax requests
1414
  if ($.inArray(currentObjectID, that.detailsRequestsSent) != -1) {
1429
  for (var i = 0; i < result.items.length; i++) {
1430
  var cacheKey = result.items[i]['objectID'];
1431
  that.cachedDetails[cacheKey] = {html: result.items[i]['html']}
1432
+ that.detailsPanelAddToScene(cacheKey);
1433
 
1434
  if (typeof result.items[i]['price'] != 'undefined' && result.items[i]['price'].length > 0) {
1435
  that.cachedPrices[cacheKey] = result.items[i]['price'];
1444
  }
1445
  }
1446
 
1447
+ that.preloader('hide', 'details', '');
1448
 
1449
  var currentObjectID = that.prepareSuggestionObjectID(that.suggestions[that.selectedIndex]);
1450
 
1451
  if (that.cachedDetails[currentObjectID] != null) {
1452
+ that.detailsPanelSetScene(currentObjectID);
1453
  } else {
1454
+ // @TODO Maybe display some error or placeholder
1455
+ that.detailsPanelClearScene();
1456
  }
1457
  that.fixPositionCapture();
1458
  that.fixHeight();
1461
  },
1462
  error: function (jqXHR, exception) {
1463
 
1464
+ that.preloader('hide', 'details', '');
1465
 
1466
+ that.detailsPanelClearScene();
1467
  that.fixPositionCapture();
1468
  that.fixHeight();
1469
  },
1631
 
1632
  return objectID;
1633
  },
1634
+ detailsPanelSetScene: function (objectID) {
1635
+ var that = this,
1636
+ $containerDetails = that.getDetailsContainer(),
1637
+ objectHash = utils.hashCode(objectID),
1638
+ $el = $containerDetails.find('.dgwt-wcas-details-inner[data-object="' + objectHash + '"]');
1639
+
1640
+ if ($el.length) {
1641
+ that.preloader('hide', 'details', '');
1642
+ that.detailsPanelClearScene();
1643
+ $el.addClass('dgwt-wcas-details-inner-active');
1644
+ }
1645
+ },
1646
+ detailsPanelAddToScene: function (objectID) {
1647
+ var that = this,
1648
+ $containerDetails = that.getDetailsContainer(),
1649
+ object = that.cachedDetails[objectID],
1650
+ objectHash = utils.hashCode(objectID),
1651
+ html = '';
1652
+
1653
+ if (typeof object != 'undefined' && typeof object.html == 'string') {
1654
+ html = object.html.replace('<div ', '<div data-object="' + objectHash + '" ');
1655
+ }
1656
+
1657
+ if ($containerDetails.find('.dgwt-wcas-details-inner[data-object="' + objectHash + '"]').length == 0) {
1658
+ $containerDetails.append(html);
1659
+ }
1660
+ },
1661
+ detailsPanelClearScene: function () {
1662
+ var that = this,
1663
+ $containerDetails = that.getDetailsContainer(),
1664
+ $views = $containerDetails.find('.dgwt-wcas-details-inner');
1665
+
1666
+ if ($views.length) {
1667
+ $views.removeClass('dgwt-wcas-details-inner-active');
1668
+ }
1669
+ },
1670
  selectFirstSuggestion: function (suggestions) {
1671
  var that = this,
1672
  index = 0,
1783
 
1784
  formLeftValue = Math.floor(-1 * (formWidth * iconLeftRatio));
1785
 
1786
+ // Prevent shifting to the left more than the icon position (also positioned from the left)
1787
+ formLeftValue = Math.max(formLeftValue, -1 * iconLeftOffset);
1788
+
1789
  $form.css({'left': formLeftValue + 'px'});
1790
 
1791
  },
1944
  suggestion.value = dgwt_wcas.labels.no_results;
1945
  highlight = false;
1946
  if (options.showDetailsPanel === true) {
1947
+ that.detailsPanelClearScene();
1948
  }
1949
  $('body').addClass('dgwt-wcas-nores');
1950
  }
2215
  * @param action (show or hide)
2216
  * @param container (parent selector)
2217
  * @param cssClass
 
2218
  */
2219
+ preloader: function (action, place, cssClass) {
 
2220
  var that = this,
2221
  html,
2222
+ $container,
2223
  defaultClass = 'dgwt-wcas-preloader-wrapp',
2224
  cssClasses = cssClass == null ? defaultClass : defaultClass + ' ' + cssClass;
2225
 
 
2226
  if (place === 'form') {
2227
+
2228
+ // Return early if the preloader is disable via the settings for a search bar
2229
+ if (dgwt_wcas.show_preloader != 1) {
2230
+ return;
2231
+ }
2232
+
2233
+ $container = that.getFormWrapper().find('.dgwt-wcas-preloader');
2234
  } else if (place === 'details') {
2235
+ $container = that.getDetailsContainer();
2236
  }
2237
 
2238
+ if ($container.length == 0) {
 
 
2239
  return;
2240
  }
2241
 
2242
+ // Handle preloader for a search bar
2243
+ if (place === 'form') {
2244
  if (action === 'hide') {
2245
+ $container.removeClass(cssClass);
2246
+ $container.html('');
2247
  } else {
2248
+ $container.addClass(cssClass);
2249
  if(typeof dgwt_wcas.preloader_icon == 'string'){
2250
+ $container.html(dgwt_wcas.preloader_icon);
2251
  }
2252
  }
2253
  return;
2254
  }
2255
 
2256
+ // Handle preloader for a details panel
2257
+ var $preloader = $container.find('.' + defaultClass);
2258
+
2259
+ // Action hide
2260
+ if (action === 'hide') {
2261
+ if ($preloader.length) {
2262
+ $preloader.remove();
2263
+ }
2264
+ return
2265
+ }
2266
 
2267
  // Action show
2268
  if (action === 'show') {
 
2269
  var rtlSuffix = that.options.isRtl ? '-rtl' : '';
2270
  html = '<div class="' + cssClasses + '"><img class="dgwt-wcas-placeholder-preloader" src="' + dgwt_wcas.img_url + 'placeholder' + rtlSuffix + '.png" /></div>';
2271
+ that.detailsPanelClearScene();
2272
+ if ($preloader.length) {
2273
+ $preloader.remove();
2274
+ }
2275
+ $container.prepend(html);
2276
  }
2277
  },
2278
  verifySuggestionsFormat: function (suggestions) {
2490
  return currentValue.substr(0, currentValue.length - parts[parts.length - 1].length) + value;
2491
  },
2492
  dispose: function () {
2493
+ var that = this,
2494
+ $el = that.el,
2495
+ $formWrapper = that.getFormWrapper(),
2496
+ $suggestionsWrapper = that.getSuggestionsContainer(),
2497
+ $detailsWrapper = that.getDetailsContainer(),
2498
+ $form = $el.closest('.' + that.options.formClass),
2499
+ $mobileHandler = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
2500
+
2501
+ // Remove all events
2502
+ if($formWrapper.length){
2503
+ var $items = $formWrapper.find('*');
2504
+ $items.each(function(){
2505
+ $(this).off('.autocomplete');
2506
+ });
2507
+ }
2508
+
2509
+ $el.removeData('autocomplete');
2510
+ $(window).off('resize.autocomplete', that.fixPositionCapture);
2511
+
2512
+ $formWrapper.removeClass('dgwt-wcas-active');
2513
+
2514
+ that.close();
2515
+
2516
+ // Remove mobile handler
2517
+ if ($mobileHandler.length) {
2518
+ $mobileHandler.remove();
2519
+ }
2520
+
2521
+ if($suggestionsWrapper.length){
2522
+ $suggestionsWrapper.html('');
2523
+ }
2524
  },
2525
  enableOverlayMobile: function () {
2526
  var that = this;
2543
  html += '<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">'
2544
  if (typeof dgwt_wcas.back_icon == 'string') {
2545
  html += dgwt_wcas.back_icon;
 
 
 
 
 
2546
  }
2547
  html += '</button>';
2548
  html += '</div>';
2565
 
2566
  $wrapper.find('.' + that.options.searchInputClass).focus();
2567
 
2568
+ $(document).on('click.autocomplete', '.js-dgwt-wcas-om-return', function (e) {
2569
  that.disableOverlayMobile($overlayWrap);
2570
  });
2571
  },
2637
  return isFixed;
2638
  },
2639
  gaEvent: function (label, category) {
2640
+ var that = this;
2641
+ var gaObj = window.hasOwnProperty('GoogleAnalyticsObject') && window.hasOwnProperty(window['GoogleAnalyticsObject']) ? window[window['GoogleAnalyticsObject']] : false;
2642
+ if (that.options.sendGAEvents) {
2643
  try {
2644
  if (typeof gtag !== 'undefined') {
2645
  gtag('event', 'autocomplete_search', {
2646
  'event_label': label,
2647
  'event_category': category
2648
  });
2649
+ } else if (gaObj !== false) {
2650
+ var tracker = gaObj.getAll()[0];
2651
  if (tracker) tracker.send({
2652
  hitType: 'event',
2653
  eventCategory: category,
2664
  gtag('event', 'page_view', {
2665
  'page_path': '/?s=' + encodeURI(label) + '&post_type=product&dgwt_wcas=1',
2666
  });
2667
+ } else if (gaObj !== false) {
2668
+ var tracker2 = gaObj.getAll()[0];
2669
  if (tracker2) {
2670
  tracker2.set('page', '/?s=' + encodeURI(label) + '&post_type=product&dgwt_wcas=1');
2671
  tracker2.send('pageview');
2700
  if (instance && instance.dispose) {
2701
  instance.dispose();
2702
  }
2703
+
2704
  instance = new DgwtWcasAutocompleteSearch(this, options);
2705
  inputElement.data(dataKey, instance);
2706
  }
2727
  || (navigator.userAgent.includes("Mac") && "ontouchend" in document)
2728
  }
2729
 
2730
+ function isIE11() {
2731
+ return !!navigator.userAgent.match(/Trident\/7\./);
2732
+ }
2733
+
2734
+ /*-----------------------------------------------------------------
2735
+ /* IE11 polyfills
2736
+ /*-----------------------------------------------------------------*/
2737
+ if (isIE11()) {
2738
+ // https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.includes%2CString.prototype.includes
2739
+ (function(self, undefined) {function Call(t,l){var n=arguments.length>2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}function Get(n,t){return n[t]}function IsCallable(n){return"function"==typeof n}function RequireObjectCoercible(e){if(null===e||e===undefined)throw TypeError(Object.prototype.toString.call(e)+" is not coercible to Object.");return e}function SameValueNonNumber(e,n){return e===n}function ToBoolean(o){return Boolean(o)}function ToObject(e){if(null===e||e===undefined)throw TypeError();return Object(e)}function GetV(t,e){return ToObject(t)[e]}function GetMethod(e,n){var r=GetV(e,n);if(null===r||r===undefined)return undefined;if(!1===IsCallable(r))throw new TypeError("Method not callable: "+n);return r}function Type(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":"Symbol"in self&&(e instanceof self.Symbol||e.constructor===self.Symbol)?"symbol":"object"}}function IsRegExp(e){if("object"!==Type(e))return!1;var n="Symbol"in self&&"match"in self.Symbol?Get(e,self.Symbol.match):undefined;if(n!==undefined)return ToBoolean(n);try{var t=e.lastIndex;return e.lastIndex=0,RegExp.prototype.exec.call(e),!0}catch(l){}finally{e.lastIndex=t}return!1}function OrdinaryToPrimitive(r,t){if("string"===t)var e=["toString","valueOf"];else e=["valueOf","toString"];for(var i=0;i<e.length;++i){var n=e[i],a=Get(r,n);if(IsCallable(a)){var o=Call(a,r);if("object"!==Type(o))return o}}throw new TypeError("Cannot convert to primitive.")}function SameValueZero(n,e){return Type(n)===Type(e)&&("number"===Type(n)?!(!isNaN(n)||!isNaN(e))||(1/n===Infinity&&1/e==-Infinity||(1/n==-Infinity&&1/e===Infinity||n===e)):SameValueNonNumber(n,e))}function ToInteger(n){if("symbol"===Type(n))throw new TypeError("Cannot convert a Symbol value to a number");var t=Number(n);return isNaN(t)?0:1/t===Infinity||1/t==-Infinity||t===Infinity||t===-Infinity?t:(t<0?-1:1)*Math.floor(Math.abs(t))}function ToLength(n){var t=ToInteger(n);return t<=0?0:Math.min(t,Math.pow(2,53)-1)}function ToPrimitive(e){var t=arguments.length>1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}CreateMethodProperty(Array.prototype,"includes",function e(r){"use strict";var t=ToObject(this),o=ToLength(Get(t,"length"));if(0===o)return!1;var n=ToInteger(arguments[1]);if(n>=0)var a=n;else(a=o+n)<0&&(a=0);for(;a<o;){var i=Get(t,ToString(a));if(SameValueZero(r,i))return!0;a+=1}return!1});CreateMethodProperty(String.prototype,"includes",function e(t){"use strict";var r=arguments.length>1?arguments[1]:undefined,n=RequireObjectCoercible(this),i=ToString(n);if(IsRegExp(t))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=ToString(t),g=ToInteger(r),a=i.length,p=Math.min(Math.max(g,0),a);return-1!==String.prototype.indexOf.call(i,o,p)});})('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
2740
+ }
2741
+
2742
  // RUN
2743
  $(document).ready(function () {
2744
  "use strict";
assets/js/search.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"function"==typeof require?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e={escapeRegExChars:function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(t){var e=document.createElement("div");return e.className=t,e.style.position="absolute",e.style.display="none",e.setAttribute("unselectable","on"),e},highlight:function(t,s){if(dgwt_wcas.is_premium){var i,o=s.split(/ /),a=!1;if(o)for(o=o.sort(function(t,e){return e.length-t.length}),i=0;i<o.length;i++)if(o[i]&&o[i].length>1){var n=o[i].replace(/[\^\@]/g,"");if(n.length>0){var r="("+e.escapeRegExChars(n.trim())+")";t=t.replace(new RegExp(r,"gi"),"^^$1@@"),a=!0}}a&&(t=(t=t.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else r="("+e.escapeRegExChars(s)+")",t=t.replace(new RegExp(r,"gi"),"<strong>$1</strong>");return t},debounce:function(t,e){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void t();s.id=o,i=setTimeout(function(){o===s.id?(t(),s.id=""):clearTimeout(i)},e)},mouseHoverDebounce:function(e,s,i){var o;o=setTimeout(function(){t(s+":hover").length>0?e():clearTimeout(o)},i)},getActiveInstance:function(){var e,s=t(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return s.length>0&&s.each(function(){var s=t(this).find(".dgwt-wcas-search-input");if("object"==typeof s.data("autocomplete"))return e=s.data("autocomplete"),!1}),e}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=t.noop;function d(e,s){this.element=e,this.el=t(e),this.suggestions=[],this.badQueries=[],this.selectedIndex=-1,this.currentValue=this.element.value,this.timeoutId=null,this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.detailsRequestsSent=[],this.onChangeTimeout=null,this.onChange=null,this.isLocal=!1,this.suggestionsContainer=null,this.detailsContainer=null,this.autoAligmentprocess=null,this.noSuggestionsContainer=null,this.latestActivateSource="",this.actionTriggerSource="",this.options=t.extend(!0,{},d.defaults,s),this.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top"},this.hint=null,this.hintValue="",this.selection=null,this.overlayMobileState="off",this.initialize(),this.setOptions(s)}d.utils=e,t.DgwtWcasAutocompleteSearch=d,d.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",containerDetailsWidth:"auto",showDetailsPanel:!1,showImage:!1,showPrice:!1,showSKU:!1,showDescription:!1,showSaleBadge:!1,showFeaturedBadge:!1,dynamicPrices:!1,saleBadgeText:"sale",featuredBadgeText:"featured",minChars:3,maxHeight:600,deferRequestBy:0,params:{},formatResult:function(t,s,i,o){if(!s)return t;i&&(t=e.highlight(t,s));if(!o.convertHtml)return t;return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;sup/g,"<sup").replace(/&lt;\/sup/g,"</sup").replace(/sup&gt;/g,"sup>").replace(/&lt;(\/?(strong|b|br))&gt;/g,"<$1>")},delimiter:null,zIndex:999999999,type:"GET",noCache:!1,isRtl:!1,onSearchStart:c,onSearchComplete:c,onSearchError:c,preserveInput:!1,searchFormClass:"dgwt-wcas-search-wrapp",containerClass:"dgwt-wcas-suggestions-wrapp",containerDetailsClass:"dgwt-wcas-details-wrapp",searchInputClass:"dgwt-wcas-search-input",preloaderClass:"dgwt-wcas-preloader",closeTrigger:"dgwt-wcas-close",formClass:"dgwt-wcas-search-form",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,isPremium:!1,overlayMobile:!1,preventBadQueries:!0,lookupFilter:function(t,e,s){return-1!==t.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?t.parseJSON(e):e},noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1,positionFixed:!1,debounceWaitMs:400,sendGAEvents:!0,enableGASiteSearchModule:!1,showProductVendor:!1,disableHits:!1,disableSubmit:!1},d.prototype={initialize:function(){var s=this;s.element.setAttribute("autocomplete","off"),s.createContainers(),s.registerEventsSearchBar(),s.registerEventsSuggestions(),s.registerEventsDetailsPanel(),s.registerIconHandler(),s.registerEventsFixedMenu(),s.fixPositionCapture=function(){s.adjustContainerWidth(),s.visible&&s.fixPosition()},t(window).on("resize.autocomplete",function(){var t=e.getActiveInstance();void 0!==t&&t.fixPositionCapture()}),s.initMobileMode(),s.hideAfterClickOutsideListener(),s.suggestionsContainer.addClass("js-dgwt-wcas-initialized"),s.detailsContainer&&s.detailsContainer.length>0&&s.detailsContainer.addClass("js-dgwt-wcas-initialized")},createContainers:function(e){var s=this.options;0==t("."+s.containerClass).length?(this.suggestionsContainer=t(d.utils.createNode(s.containerClass)),this.suggestionsContainer.appendTo(s.appendTo||"body"),this.suggestionsContainer.addClass("woocommerce"),!0===s.showImage&&this.suggestionsContainer.addClass("dgwt-wcas-has-img"),!0===s.showPrice&&this.suggestionsContainer.addClass("dgwt-wcas-has-price"),!0===s.showDescription&&this.suggestionsContainer.addClass("dgwt-wcas-has-desc"),!0===s.showSKU&&this.suggestionsContainer.addClass("dgwt-wcas-has-sku"),!0===s.showHeadings&&this.suggestionsContainer.addClass("dgwt-wcas-has-headings"),"auto"!==s.width&&this.suggestionsContainer.width(s.width)):this.suggestionsContainer=t("."+this.options.containerClass),this.canShowDetailsBox()&&(0==t("."+s.containerDetailsClass).length?(this.detailsContainer=t(d.utils.createNode(s.containerDetailsClass)),this.detailsContainer.appendTo(s.appendTo||"body"),this.detailsContainer.addClass("woocommerce")):this.detailsContainer=t("."+s.containerDetailsClass))},registerEventsSearchBar:function(){var s=this;t(document).on("click.autocomplete","."+s.options.closeTrigger,function(){var s=e.getActiveInstance();s.hide(),s.clear(!1),s.hideCloseButton(),t(this).closest("."+s.options.searchFormClass).find("."+s.options.searchInputClass).val("").focus()}),s.el.closest("."+s.options.formClass).on("submit.autocomplete",function(e){if(s.options.disableSubmit)return e.preventDefault(),!1;s.suggestions.length>0&&t.each(s.suggestions,function(t,i){if(void 0!==i.type&&"product_variation"==i.type)return s.select(t),e.preventDefault(),!1})}),"complete"===document.readyState?s.positionPreloader():t(window).on("load",function(){s.positionPreloader()}),s.el.on("keydown.autocomplete",function(t){s.onKeyPress(t)}),s.el.on("keyup.autocomplete",function(t){s.onKeyUp(t)}),s.el.on("blur.autocomplete",function(){s.onBlur()}),s.el.on("focus.autocomplete",function(){s.onFocus()}),s.el.on("change.autocomplete",function(t){s.onKeyUp(t)}),s.el.on("input.autocomplete",function(t){s.onKeyUp(t)})},registerEventsSuggestions:function(){var s="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){t(document).on("mouseenter.autocomplete",s,function(){var s=e.getActiveInstance();if(void 0!==s){var i=t(this).data("index"),o='.dgwt-wcas-suggestion[data-index="'+i+'"]',a=s.canShowDetailsBox()?100:1;s.selectedIndex!=i&&e.mouseHoverDebounce(function(){s.selectedIndex!==i&&(s.latestActivateSource="mouse",s.getDetails(s.suggestions[i]),s.activate(i))},o,a)}});var i=!1;t(document).on("click.autocomplete",s,function(){if(!i){var s=e.getActiveInstance();s.actionTriggerSource="click",i=!0,setTimeout(function(){i=!1},500),s.select(t(this).data("index"))}}),t(document).on("mousedown.autocomplete",s,function(e){"number"==typeof e.which&&1===e.which&&t(e.target)[0].click()}),t(document).on("click.autocomplete","."+this.options.containerClass,function(){var t=e.getActiveInstance();clearTimeout(t.blurTimeoutId)})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(t(document).on("click.autocomplete","."+this.options.containerDetailsClass,function(){var t=e.getActiveInstance();clearTimeout(t.blurTimeoutId)}),t(document).on("change",'[name="js-dgwt-wcas-quantity"]',function(e){t(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",t(this).val())}))},registerIconHandler:function(){var s=this,i=s.getFormWrapper(),o=i.find("."+s.options.formClass);i.on("click",".js-dgwt-wcas-search-icon-handler",function(t){var e=i.find("."+s.options.searchInputClass);if(i.hasClass("dgwt-wcas-layout-icon-open"))s.hide(),o.hide(!0),i.removeClass("dgwt-wcas-layout-icon-open");else{var a=i.find(".dgwt-wcas-search-icon-arrow");o.hide(),a.hide(),i.addClass("dgwt-wcas-layout-icon-open"),s.positionIconSearchMode(i),o.fadeIn(200,function(){a.show(),s.positionPreloader(i),e.focus()})}}),0==t(".js-dgwt-wcas-initialized").length&&t(".js-dgwt-wcas-search-icon-handler").length>0&&t(document).click(function(i){if(t(".dgwt-wcas-layout-icon-open").length){var o=t(i.target);if(!(o.closest("."+s.options.searchFormClass).length>0||o.closest("."+s.options.containerClass).length>0||o.closest("."+s.options.containerDetailsClass).length>0)){var a=e.getActiveInstance();if(void 0!==a){var n=a.getFormWrapper().find("."+s.options.formClass);n.hide(),a.hide(!0),n.css({left:"0"})}s.hideIconModeSearch()}}}),t(window).on("resize.autocomplete",function(){s.applyFlexibleMode()}),"complete"==document.readyState?s.applyFlexibleMode():t(window).on("load",function(){s.applyFlexibleMode()})},registerEventsFixedMenu:function(){var e=this;t(window).on("scroll",function(){if(e.suggestions.length>0&&e.elementOrParentIsFixed(e.getFormWrapper()))if(0===t(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(t){setTimeout(function(){e.fixHeight(),e.fixPositionCapture()},t)})}else e.fixHeight(),e.fixPositionCapture()})},initMobileMode:function(){var t=this,e=t.getFormWrapper();e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&t.isMobileMode()&&(e.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),e.find(".js-dgwt-wcas-enable-mobile-form").on("click",function(e){t.enableOverlayMobile()}))},applyFlexibleMode:function(){var e=t(".js-dgwt-wcas-layout-icon-flexible");e.length&&(this.isMobileMode()?(e.addClass("js-dgwt-wcas-layout-icon"),e.addClass("dgwt-wcas-layout-icon")):(e.removeClass("js-dgwt-wcas-layout-icon"),e.removeClass("dgwt-wcas-layout-icon")),e.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(){t("."+this.options.searchFormClass).removeClass("dgwt-wcas-active"),this.getFormWrapper().addClass("dgwt-wcas-active"),this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var e=this,s=e.options,i=e.el.val(),o=e.getQuery(i);e.isMobileMode()||(e.blurTimeoutId=setTimeout(function(){e.hide(),e.selection&&e.currentValue!==o&&(s.onInvalidateSelection||t.noop).call(e.element)},200))},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(e){var s=this,i=s.getSuggestionsContainer(),o=t.extend({},s.options,e);(s.isLocal=Array.isArray(o.lookup),s.isLocal&&(o.lookup=s.verifySuggestionsFormat(o.lookup)),o.orientation=s.validateOrientation(o.orientation,"bottom"),i.css({"max-height":s.canShowDetailsBox()?"none":o.maxHeight+"px",width:o.width+"px","z-index":o.zIndex}),!0===o.showDetailsPanel)&&s.getDetailsContainer().css({"z-index":o.zIndex-1});o.onSearchComplete=function(){s.getFormWrapper().removeClass("dgwt-wcas-processing"),s.preloader("hide","form","dgwt-wcas-inner-preloader"),s.showCloseButton()},this.options=o},clearCache:function(){this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.badQueries=[]},clear:function(t){t&&this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this.getFormOffset();this.getSuggestionsContainer().css(t),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.getDetailsContainer(),o=this.getFormOffset(),a=o.left;if(0==i.length)return!1;var n=!0===this.options.isRtl?1:2,r=Math.round(o.left);if(o.left=r+Math.round(s.width()+n),i.css(o),e.width()>=550)return t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),void(!0===this.options.isRtl&&(s.css("left",r+Math.round(i.width()+n)+"px"),i.css("left",a+"px")));var l=t(window).width(),c=i.width(),d=i.offset();t("body").addClass("dgwt-wcas-details-outside"),!0===this.options.isRtl&&(o.left=o.left+1);var g=!1,u=!1;l<d.left+c&&(g=!0,t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-left"),i.css("left",Math.round(parseFloat(s.css("left").replace("px","")))-i.outerWidth()+"px")),(d=i.offset()).left<1&&(u=!0,t("body").removeClass("dgwt-wcas-details-left"),t("body").addClass("dgwt-wcas-details-right")),u&&g?(t("body").removeClass("dgwt-wcas-details-left"),t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-notfit")):t("body").removeClass("dgwt-wcas-details-notfit")},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var t=this.getSuggestionsContainer(),e=this.getDetailsContainer();t.css("height","auto"),e.css("height","auto");var s=t.outerHeight(),i=e.outerHeight();return t.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(t.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&e.css("height",s+"px"),s<i&&t.css("height",i+"px"),!1)},automaticAlignment:function(){var t=this,e=t.getFormWrapper().find(".dgwt-wcas-search-input"),s=t.getSuggestionsContainer(),i=t.getDetailsContainer();if(null==t.autoAligmentprocess){var o=[e.width(),s.height()];t.options.showDetailsPanel&&(o[2]=i.height()),t.autoAligmentprocess=setInterval(function(){var a=[e.width(),s.height()];t.options.showDetailsPanel&&(a[2]=i.height());for(var n=0;n<o.length;n++)if(o[n]!=a[n]){t.fixHeight(),t.fixPositionCapture(),o=a;break}t.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&t.fixHeight())},10)}},getFormOffset:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.options.orientation,o=e.outerHeight(),a=this.el.outerHeight(),n=this.el.offset(),r={top:n.top,left:n.left};if("auto"===i){var l=t(window).height(),c=t(window).scrollTop(),d=-c+n.top-o,g=c+l-(n.top+a+o);i=Math.max(d,g)===d?"top":"bottom"}if("top"===i){s[0].getBoundingClientRect().top;var u=e[0].getBoundingClientRect().top;s.css("height","auto"),u<s.height()&&s.height(u-10),r.top+=-s.outerHeight()}else r.top+=a;return r},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getSuggestionsContainer:function(){return t("."+this.options.containerClass)},getDetailsContainer:function(){return t("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var t=this.getSuggestionsContainer();t[0].scrollTop=t[0].scrollHeight},isCursorAtEnd:function(){var t,e=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)},onKeyPress:function(t){if(this.disabled||this.visible||t.which!==l||!this.currentValue){if(!this.disabled&&this.visible){switch(t.which){case i:this.el.val(this.currentValue),this.hide();break;case r:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case o:if(this.hint&&this.options.onHint)return void this.selectHint();if(-1===this.selectedIndex)return void this.hide();if(this.select(this.selectedIndex),!1===this.options.tabDisabled)return;break;case a:if(-1===this.selectedIndex)return void this.hide();this.actionTriggerSource="enter",this.select(this.selectedIndex);break;case n:this.moveUp();break;case l:this.moveDown();break;default:return}t.stopImmediatePropagation(),t.preventDefault()}}else this.suggest()},onKeyUp:function(t){var e=this;if(!e.disabled){switch(t.which){case n:case l:return}clearTimeout(e.onChangeTimeout),e.currentValue!==e.el.val()&&(e.findBestHint(),e.options.deferRequestBy>0?e.onChangeTimeout=setTimeout(function(){e.onValueChange()},e.options.deferRequestBy):e.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var e=this.options,s=this.el.val(),i=this.getQuery(s);this.selection&&this.currentValue!==i&&(this.selection=null,(e.onInvalidateSelection||t.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,e.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):i.length<e.minChars?(this.hideCloseButton(),this.hide()):this.getSuggestions(i)}},isExactMatch:function(t){var e=this.suggestions;return 1===e.length&&e[0].value.toLowerCase()===t.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return t(window).width()<this.options.mobileBreakpoint},getQuery:function(e){var s,i=this.options.delimiter;return i?(s=e.split(i),t.trim(s[s.length-1])):e},getSuggestionsLocal:function(e){var s,i=this.options,o=e.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:t.grep(i.lookup,function(t){return a(t,e,o)})},n&&s.suggestions.length>n&&(s.suggestions=s.suggestions.slice(0,n)),s},getSuggestions:function(i){var o,a,n,r,l=this,c=l.options,d=c.serviceUrl,g=l.getFormWrapper();c.params[c.paramName]=i,void 0!==dgwt_wcas.current_lang&&(c.params.l=dgwt_wcas.current_lang),c.params=l.applyCustomParams(c.params),l.preloader("show","form","dgwt-wcas-inner-preloader"),g.addClass("dgwt-wcas-processing"),!1!==c.onSearchStart.call(l.element,c.params)&&(a=c.ignoreParams?null:c.params,t.isFunction(c.lookup)?c.lookup(i,function(t){l.suggestions=t.suggestions,l.suggest(),l.selectFirstSuggestion(t.suggestions),c.onSearchComplete.call(l.element,i,t.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(t.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+t.param(a||{}),o=l.cachedResponse[n]),o&&Array.isArray(o.suggestions)?(l.suggestions=o.suggestions,l.suggest(),l.selectFirstSuggestion(o.suggestions),c.onSearchComplete.call(l.element,i,o.suggestions)):l.isBadQuery(i)?c.onSearchComplete.call(l.element,i,[]):(l.abortAjax(),r={url:d,data:a,type:c.type,dataType:c.dataType},t.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,e.debounce(function(){var e=s.object,o=s.ajaxSettings;e.currentRequest=t.ajax(o).done(function(t){var s;e.currentRequest=null,void 0!==(s=e.options.transformResult(t,i)).suggestions&&(e.processResponse(s,i,n),e.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?e.gaEvent(i,"Autocomplete Search without results"):e.gaEvent(i,"Autocomplete Search with results")),e.fixPositionCapture(),e.options.onSearchComplete.call(e.element,i,s.suggestions),e.updatePrices()}).fail(function(t,s,o){e.options.onSearchError.call(e.element,i,t,s,o)})},c.debounceWaitMs))))},getDetails:function(e){var s=this;if(!s.canShowDetailsBox())return!1;if(null!=e&&void 0!==e.type&&("string"!=typeof e.more_products||"more_products"!==e.more_products)){s.fixHeight();var i,o=s.getDetailsContainer(),a=s.prepareSuggestionObjectID(e);if(null!=(i=s.cachedDetails[a]))o.html(i.html),s.fixHeight(),s.fixPositionCapture();else{var n={action:dgwt_wcas.action_result_details,items:[]};if(t.each(s.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type){var i={objectID:s.prepareSuggestionObjectID(e),value:null!=e.value?e.value:""};n.items.push(i)}}),o.html(""),s.preloader("show","details","",!0),-1!=t.inArray(a,s.detailsRequestsSent))return;s.detailsRequestsSent.push(a),t.ajax({data:n,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(t){var e="string"==typeof t?jQuery.parseJSON(t):t;if(void 0!==e.items)for(var i=0;i<e.items.length;i++){var a=e.items[i].objectID;if(s.cachedDetails[a]={html:e.items[i].html},void 0!==e.items[i].price&&e.items[i].price.length>0&&(s.cachedPrices[a]=e.items[i].price),void 0!==e.items[i].imageSrc&&e.items[i].imageSrc.length>0)(new Image).src=e.items[i].imageSrc}s.preloader("hide","details","",!0);var n=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[n]?o.html(s.cachedDetails[n].html):o.html(""),s.fixPositionCapture(),s.fixHeight(),s.updatePrices(!0)},error:function(t,e){s.preloader("hide","details","",!0),o.html(t),s.fixPositionCapture(),s.fixHeight()}})}t(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},updatePrices:function(e){var s,i,o=this,a=[];if(o.options.showPrice&&o.options.dynamicPrices&&0!=o.suggestions.length){for(s=0;s<o.suggestions.length;s++)if(void 0!==o.suggestions[s].type&&("product"==o.suggestions[s].type||"product_variation"==o.suggestions[s].type)){var n="product__"+o.suggestions[s].post_id;void 0!==o.cachedPrices[n]?o.updatePrice(s,o.cachedPrices[n]):(o.applyPreloaderForPrice(s),a.push(o.suggestions[s].post_id))}if(!e&&a.length>0){var r={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:a};t.ajax({data:r,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(t){if(void 0!==t.success&&t.success&&t.data.length>0)for(s=0;s<t.data.length;s++){var e=t.data[s].id,a=t.data[s].price;if(o.suggestions.length>0)for(i=0;i<o.suggestions.length;i++)if(void 0!==o.suggestions[i].type&&("product"==o.suggestions[i].type||"product_variation"==o.suggestions[i].type)&&o.suggestions[i].post_id==e){var n="product__"+e;o.cachedPrices[n]=a,o.updatePrice(i,a)}}},error:function(t,e){}})}}},updatePrice:function(e,s){if(void 0!==this.suggestions[e]){this.suggestions[e].price=s;var i=t(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+e+'"] .dgwt-wcas-sp');i.length&&i.html(s)}},applyCustomParams:function(t){if("object"==typeof dgwt_wcas.custom_params){var e=dgwt_wcas.custom_params;for(var s in e)t[s]=e[s]}var i=this.el.data("custom-params");if("object"==typeof i)for(var s in i)t[s]=i[s];return t},applyPreloaderForPrice:function(e){if(void 0!==this.suggestions[e]){var s=t(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+e+'"] .dgwt-wcas-sp');s.length&&s.html('<div class="dgwt-wcas-preloader-price"><div class="dgwt-wcas-preloader-price-inner"> <div></div><div></div><div></div></div></div>')}},prepareSuggestionObjectID:function(t){var e="";return void 0!==t&&void 0!==t.type&&(null!=t.post_id&&(e=t.type+"__"+t.post_id,"product_variation"===t.type&&(e+="__"+t.variation_id),void 0!==t.post_type&&(e=t.type+"__"+t.post_id+"__"+t.post_type)),null!=t.term_id&&null!=t.taxonomy&&(e=t.type+"__"+t.term_id+"__"+t.taxonomy)),e},selectFirstSuggestion:function(e){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=e&&e.length>0&&t.each(this.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type&&"no-results"!=e.type)return s=t,!1;void 0!==e.type&&"no-results"!==e.type||(i=!0)}),i||(this.latestActivateSource="system",this.getDetails(e[s]),this.activate(s)))},isBadQuery:function(t){if(!this.options.preventBadQueries)return!1;for(var e=this.badQueries,s=e.length;s--;)if(0===t.indexOf(e[s]))return!0;return!1},hide:function(e){this.getFormWrapper();var s=this.getSuggestionsContainer(),i=this.getDetailsContainer();t.isFunction(this.options.onHide)&&this.visible&&this.options.onHide.call(this.element,container),this.visible=!1,this.selectedIndex=-1,clearTimeout(this.onChangeTimeout),s.hide(),s.removeClass(this.classes.suggestionsContainerOrientTop),i.hide(),t("body").removeClass("dgwt-wcas-open"),t("body").removeClass("dgwt-wcas-block-scroll"),t("body").removeClass("dgwt-wcas-is-details"),t("body").removeClass("dgwt-wcas-full-width"),t("body").removeClass("dgwt-wcas-nores"),t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),"boolean"==typeof e&&e&&(this.hideCloseButton(),this.currentValue="",this.suggestions=[]),this.signalHint(null)},positionIconSearchMode:function(e){var s,i=e.find("."+this.options.formClass),o=i.width(),a=t(window).width(),n=e[0].getBoundingClientRect().left;i[0].getBoundingClientRect().left;var r=(n+10)/a;s=Math.floor(o*r*-1),i.css({left:s+"px"})},hideIconModeSearch:function(){var e=t(".dgwt-wcas-layout-icon-open");e.length>0&&e.removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var e=this;e.isMobileMode()||t(document).mouseup(function(s){if(e.visible){e.getSuggestionsContainer(),e.getDetailsContainer();var i=!(t(s.target).closest("."+e.options.searchFormClass).length>0||t(s.target).hasClass(e.options.searchFormClass)),o=!(t(s.target).closest("."+e.options.containerClass).length>0||t(s.target).hasClass(e.options.containerClass));if(e.canShowDetailsBox()){var a=!(t(s.target).closest("."+e.options.containerDetailsClass).length>0||t(s.target).hasClass(e.options.containerDetailsClass));i&&o&&a&&e.hide()}else i&&o&&e.hide()}})},suggest:function(){if(this.suggestions.length){var e,s=this,i=s.options,o=i.groupBy,a=i.formatResult,n=s.getQuery(s.currentValue),r=s.classes.suggestion,l=s.classes.selected,c=s.getSuggestionsContainer(),d=s.getDetailsContainer(),g=t(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(t("body").removeClass("dgwt-wcas-nores"),t.each(s.suggestions,function(s,l){var c="",g=!1;if(o&&(h+=function(t,s){var i=t.data[o];return e===i?"":'<div class="autocomplete-group"><strong>'+(e=i)+"</strong></div>"}(l,0)),void 0===l.type||"product"!=l.type&&"product_variation"!=l.type){var u,w=r,p="dgwt-wcas-st",f="",m="",v="",C=!0;"product_cat"===l.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.category+"</span>"),void 0!==l.breadcrumbs&&l.breadcrumbs&&(v=l.breadcrumbs+" &gt; "+l.value,m+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+l.breadcrumbs+"</span>")):"product_tag"===l.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.tag+"</span>")):i.isPremium&&l.taxonomy===i.taxonomyBrands?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.brand+"</span>")):i.isPremium&&"vendor"===l.type?(w+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):i.isPremium&&"post"===l.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===l.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===l.type?(w+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",p="dgwt-wcas-st-more",l.value=dgwt_wcas.labels.show_more+" ("+l.total+")",C=!1):i.showHeadings&&"headline"===l.type?(w+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[l.value+"_plu"]&&(l.value=dgwt_wcas.labels[l.value+"_plu"]),C=!1):(w+=" dgwt-wcas-suggestion-nores",l.value=dgwt_wcas.labels.no_results,C=!1,!0===i.showDetailsPanel&&d.html(""),t("body").addClass("dgwt-wcas-nores")),void 0!==l.image_src&&l.image_src&&(u=!0),v=v.length>0?' title="'+v+'"':"",h+='<div class="'+w+'" data-index="'+s+'">',u&&(h+='<span class="dgwt-wcas-si"><img src="'+l.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+v+' class="'+p+'">',"vendor"===l.type?(h+='<span class="dgwt-wcas-st-title">'+f+a(l.value,n,C,i)+m+"</span>",l.shop_city&&(h+='<span class="dgwt-wcas-vendor-city"><span> - </span>'+a(l.shop_city,n,!0,i)+"</span>"),void 0!==l.desc&&l.desc&&(h+='<span class="dgwt-wcas-sd">'+a(l.desc,n,!0,i)+"</span>")):h+=f+a(l.value,n,C,i)+m,h+="</span>",h+=u?"</div>":"",h+="</div>"}else{!0===i.showImage&&void 0!==l.thumb_html&&(g=!0);var b="product_variation"===l.type?" dgwt-wcas-suggestion-product-var":"";if(c+=void 0!==l.post_id?'data-post-id="'+l.post_id+'" ':"",c+=void 0!==l.taxonomy?'data-taxonomy="'+l.taxonomy+'" ':"",c+=void 0!==l.term_id?'data-term-id="'+l.term_id+'" ':"",h+='<div class="'+r+" dgwt-wcas-suggestion-product"+b+'" data-index="'+s+'" '+c+">",g&&(h+='<span class="dgwt-wcas-si">'+l.thumb_html+"</span>"),h+=g?'<div class="dgwt-wcas-content-wrapp">':"",h+='<span class="dgwt-wcas-st">',h+='<span class="dgwt-wcas-st-title">'+a(l.value,n,!0,i)+"</span>",!0===i.showSKU&&void 0!==l.sku&&l.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+a(l.sku,n,!0,i)+")</span>"),!0===i.showDescription&&void 0!==l.desc&&l.desc&&(h+='<span class="dgwt-wcas-sd">'+a(l.desc,n,!0,i)+"</span>"),!0===i.showProductVendor&&void 0!==l.vendor&&l.vendor){var y='<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">'+dgwt_wcas.labels.vendor_sold_by+" </span>"+l.vendor+"</span>";void 0!==l.vendor_url&&l.vendor_url?h+='<a href="'+l.vendor_url+'">'+y+"</a>":h+=y}h+="</span>",!0===i.showPrice&&void 0!==l.price&&(h+='<span class="dgwt-wcas-sp">'+l.price+"</span>"),!0===i.showFeaturedBadge&&!0===l.on_sale&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-os">'+i.saleBadgeText+"</span>"),!0===i.showFeaturedBadge&&!0===l.featured&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-f">'+i.featuredBadgeText+"</span>"),h+=g?"</div>":"",h+="</div>"}}),this.adjustContainerWidth(),g.detach(),c.html(h),t.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),t("body").addClass("dgwt-wcas-open"),s.automaticAlignment(),!0===i.showDetailsPanel&&(t("body").addClass("dgwt-wcas-is-details"),d.show(),s.fixHeight()),i.autoSelectFirst&&(s.selectedIndex=0,c.scrollTop(0),c.children("."+r).first().addClass(l)),s.visible=!0,s.fixPositionCapture(),"top"===s.options.orientation&&(s.getSuggestionsContainer().addClass(s.classes.suggestionsContainerOrientTop),t("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var e,s=this.options,i=t("body"),o=this.getFormWrapper(),a=this.getSuggestionsContainer(),n=this.getDetailsContainer(),r=this.getFormOffset();if(o.length){var l=getComputedStyle(o[0]).width;if(l=Math.round(parseFloat(l.replace("px",""))),"auto"===s.width&&(e=this.el.outerWidth(),a.css("width",e+"px")),this.canShowDetailsBox()){if(o.width()>=550)return i.addClass("dgwt-wcas-full-width"),l%2==0?(a.css("width",Math.round(l/2)),n.css("width",Math.round(l/2))):(a.css("width",Math.floor(l/2)),n.css("width",Math.ceil(l/2))),i.removeClass("dgwt-wcas-details-left"),i.removeClass("dgwt-wcas-details-right"),void(!0===s.isRtl?n.css("left","0"):a.css("left",l/2+r.left+"px"));i.addClass("dgwt-wcas-details-right")}}},positionPreloader:function(e){var s="object"==typeof e?e.find(".dgwt-wcas-search-submit"):t(".dgwt-wcas-search-submit");s.length>0&&s.each(function(){var e=t(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?e.css("left",6+t(this).outerWidth()+"px"):e.css("right",t(this).outerWidth()+"px")})},findBestHint:function(){var e=this.el.val().toLowerCase(),s=null;e&&(t.each(this.suggestions,function(t,i){var o=0===i.value.toLowerCase().indexOf(e);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(e){var s="";e&&(s=this.currentValue+e.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=e,(this.options.onHint||t.noop)(s))},preloader:function(e,s,i,o){var a,n,r="dgwt-wcas-preloader-wrapp",l=null==i?r:r+" "+i;if("form"===s?n=this.getFormWrapper().find(".dgwt-wcas-preloader"):"details"===s&&(n=this.getDetailsContainer()),1==dgwt_wcas.show_preloader&&0!=n.length)if(!0===o)if("hide"!==e){if("show"===e){var c=this.options.isRtl?"-rtl":"";a='<div class="'+l+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+c+'.png" /></div>',n.html(a)}}else t(r).remove();else"hide"===e?(n.removeClass(i),n.html("")):(n.addClass(i),"string"==typeof dgwt_wcas.preloader_icon&&n.html(dgwt_wcas.preloader_icon))},verifySuggestionsFormat:function(e){return e.length&&"string"==typeof e[0]?t.map(e,function(t){return{value:t,data:null}}):e},validateOrientation:function(e,s){return e=t.trim(e||"").toLowerCase(),-1===t.inArray(e,["auto","bottom","top"])&&(e=s),e},processResponse:function(t,e,s){var i=this.options;t.suggestions=this.verifySuggestionsFormat(t.suggestions),i.noCache||(this.cachedResponse[s]=t,i.preventBadQueries&&!t.suggestions.length&&this.badQueries.push(e)),e===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&t.suggestions.reverse(),this.suggestions=t.suggestions,this.suggest())},activate:function(e){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=e,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),t(s).addClass(i),s):null},selectHint:function(){var e=t.inArray(this.hint,this.suggestions);this.select(e)},select:function(t){this.options.disableHits||(this.hide(),this.onSelect(t))},moveUp:function(){if(-1!==this.selectedIndex){if(this.latestActivateSource="key",0===this.selectedIndex)return this.getSuggestionsContainer().children("."+this.classes.suggestion).first().removeClass(this.classes.selected),this.selectedIndex=-1,this.ignoreValueChange=!1,this.el.val(this.currentValue),void this.findBestHint();this.adjustScroll(this.selectedIndex-1,"up")}},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&(this.latestActivateSource="key",this.adjustScroll(this.selectedIndex+1,"down"))},adjustScroll:function(e,s){if("headline"===this.suggestions[e].type&&(e="down"===s?e+1:e-1),void 0!==this.suggestions[e]){var i=this.activate(e);if(this.getDetails(this.suggestions[e]),"more_products"!==this.suggestions[e].type&&i&&!this.canShowDetailsBox()){var o,a,n,r=this.getSuggestionsContainer(),l=t(i).outerHeight();o=i.offsetTop,n=(a=r.scrollTop())+this.options.maxHeight-l,o<a?r.scrollTop(o):o>n&&r.scrollTop(o-this.options.maxHeight+l),this.options.preserveInput||(this.ignoreValueChange=!0),this.signalHint(null)}}},onSelect:function(e){var s=this.options.onSelect,i=this.suggestions[e];void 0===i.type||"more_products"!==i.type&&("enter"!==this.actionTriggerSource||"key"==this.latestActivateSource||"product_variation"==i.type)?(this.currentValue=this.getValue(i.value),this.currentValue===this.el.val()||this.options.preserveInput||this.el.val(this.currentValue),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,t.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(t){var e,s,i=this.options.delimiter;return i?1===(s=(e=this.currentValue).split(i)).length?t:e.substr(0,e.length-s[s.length-1].length)+t:t},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete"),t(window).off("resize.autocomplete",this.fixPositionCapture),t("."+this.options.containerClass).remove(),t("."+this.options.containerDetailsClass).remove()},enableOverlayMobile:function(){var e=this;if("on"!==e.overlayMobileState){e.overlayMobileState="on";var s,i=e.getFormWrapper(),o=e.getSuggestionsContainer(),a="";t("html").addClass("dgwt-wcas-overlay-mobile-on"),a+='<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">',a+='<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">',a+='<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">',"string"==typeof dgwt_wcas.back_icon?a+=dgwt_wcas.back_icon:(a+='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#FFF">',a+='<path fill="#FFF" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"></path>',a+="</svg>"),a+="</button>",a+="</div>",a+="</div>",t(e.options.mobileOverlayWrapper).append(a),(s=t(".js-dgwt-wcas-overlay-mobile")).css("zIndex",99999999999),i.after('<span class="js-dgwt-wcas-om-hook"></span>'),i.appendTo(".js-dgwt-wcas-om-bar"),o.appendTo(".js-dgwt-wcas-om-bar"),i.addClass("dgwt-wcas-search-wrapp-mobile"),i.hasClass("dgwt-wcas-has-submit")&&(i.addClass("dgwt-wcas-has-submit-off"),i.removeClass("dgwt-wcas-has-submit")),i.find("."+e.options.searchInputClass).focus(),t(document).on("click",".js-dgwt-wcas-om-return",function(t){e.disableOverlayMobile(s)})}},disableOverlayMobile:function(e){var s=this,i=s.getSuggestionsContainer(),o=t(".js-dgwt-wcas-om-bar").find("."+s.options.searchFormClass);o.hasClass("dgwt-wcas-has-submit-off")&&(o.removeClass("dgwt-wcas-has-submit-off"),o.addClass("dgwt-wcas-has-submit")),o.removeClass("dgwt-wcas-search-wrapp-mobile"),t("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),t(".js-dgwt-wcas-om-hook").after(o),t(".js-dgwt-wcas-overlay-mobile").remove(),t(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var t=o.find(".dgwt-wcas-close");o.length>0&&(t.removeClass("dgwt-wcas-close"),t.html("")),s.hide()},150),s.overlayMobileState="off"},showCloseButton:function(){var t=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",e=this.getFormWrapper().find("."+this.options.preloaderClass);e.addClass(this.options.closeTrigger),e.html(t)},hideCloseButton:function(){var t=this.getFormWrapper().find("."+this.options.closeTrigger);t.length&&(t.removeClass(this.options.closeTrigger),t.html(""))},elementOrParentIsFixed:function(e){var s=e.add(e.parents()),i=!1;return s.each(function(){if("fixed"===t(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,e){if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:t,event_category:e});else if("undefined"!=typeof ga){var s=ga.getAll()[0];s&&s.send({hitType:"event",eventCategory:e,eventAction:"autocomplete_search",eventLabel:t})}}catch(t){}if(this.options.enableGASiteSearchModule)try{if("undefined"!=typeof gtag)gtag("event","page_view",{page_path:"/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"});else if("undefined"!=typeof ga){var i=ga.getAll()[0];i&&(i.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),i.send("pageview"))}}catch(t){}}},t.fn.dgwtWcasAutocomplete=function(e,s){return arguments.length?this.each(function(){var i=t(this),o=i.data("autocomplete");"string"==typeof e?o&&"function"==typeof o[e]&&o[e](s):(o&&o.dispose&&o.dispose(),o=new d(this,e),i.data("autocomplete",o))}):this.first().data("autocomplete")},t.fn.autocomplete||(t.fn.autocomplete=t.fn.dgwtWcasAutocomplete),function(){function e(){var e=t(".dgwt-wcas-search-input"),s=[];e.length>1&&e.each(function(){var e=t(this).attr("id");if(-1==t.inArray(e,s))s.push(e);else{var i=Math.random().toString(36).substring(2,6);i="dgwt-wcas-search-input-"+i,t(this).attr("id",i),t(this).closest("form").find("label").attr("for",i)}})}function s(){var e=t(".dgwt-wcas-search-input");e.length>0&&e.each(function(){"object"!=typeof t(this).data("autocomplete")&&t(this).dgwtWcasAutocomplete(window.dgwt_wcas.config)})}t(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&t("html").addClass("dgwt-wcas-is-ios");var e=1==dgwt_wcas.show_details_box,s=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<s||"ontouchend"in document)&&(e=!1),window.dgwt_wcas.config={minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:e,showImage:1==dgwt_wcas.show_images,showPrice:1==dgwt_wcas.show_price,showDescription:1==dgwt_wcas.show_desc,showSKU:1==dgwt_wcas.show_sku,showSaleBadge:1==dgwt_wcas.show_sale_badge,showFeaturedBadge:1==dgwt_wcas.show_featured_badge,dynamicPrices:!(void 0===dgwt_wcas.dynamic_prices||!dgwt_wcas.dynamic_prices),saleBadgeText:dgwt_wcas.labels.sale_badge,featuredBadgeText:dgwt_wcas.labels.featured_badge,isRtl:1==dgwt_wcas.is_rtl,showHeadings:1==dgwt_wcas.show_headings,isPremium:1==dgwt_wcas.is_premium,taxonomyBrands:dgwt_wcas.taxonomy_brands,mobileBreakpoint:s,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events,convertHtml:dgwt_wcas.convert_html,enableGASiteSearchModule:dgwt_wcas.enable_ga_site_search_module,appendTo:void 0!==dgwt_wcas.suggestions_wrapper?dgwt_wcas.suggestions_wrapper:"body",showProductVendor:!(void 0===dgwt_wcas.show_product_vendor||!dgwt_wcas.show_product_vendor),disableHits:!(void 0===dgwt_wcas.disable_hits||!dgwt_wcas.disable_hits),disableSubmit:!(void 0===dgwt_wcas.disable_submit||!dgwt_wcas.disable_submit)},t(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),t(window).on("load",function(){var e=0,s=setInterval(function(){var i=document.activeElement;if("object"==typeof i&&t(i).length&&t(i).hasClass("dgwt-wcas-search-input")){var o=t(i).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}e>10&&clearInterval(s),e++},500)}),t(document).ready(function(){setTimeout(function(){e(),s()},500)}),t(window).on("load",function(){setTimeout(function(){e(),s()},500),void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&t.each(elementorFrontend.documentsManager.documents,function(t,e){void 0!==e.getModal&&e.getModal&&e.getModal().on("show",function(){setTimeout(function(){s()},300)})})})}()});
1
+ !function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"function"==typeof require?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e={escapeRegExChars:function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(t){var e=document.createElement("div");return e.className=t,e.style.position="absolute",e.style.display="none",e.setAttribute("unselectable","on"),e},highlight:function(t,s){if(dgwt_wcas.is_premium){var i,o=s.split(/ /),a=!1,n="";if(o)for(n=o[o.length-1],o=o.sort(function(t,e){return e.length-t.length}),i=0;i<o.length;i++)if(o[i]&&o[i].length>=1){var r=o[i].replace(/[\^\@]/g,"");if(r.length>0){if(1===r.trim().length&&o[i]!==n)var l="((\\s|^)"+e.escapeRegExChars(r.trim())+"\\s)";else l=1===r.trim().length&&o[i]===n?"((\\s|^)"+e.escapeRegExChars(r.trim())+")":"("+e.escapeRegExChars(r.trim())+")";t=t.replace(new RegExp(l,"gi"),"^^$1@@"),a=!0}}a&&(t=(t=t.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else l="("+e.escapeRegExChars(s)+")",t=t.replace(new RegExp(l,"gi"),"<strong>$1</strong>");return t},debounce:function(t,e){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void t();s.id=o,i=setTimeout(function(){o===s.id?(t(),s.id=""):clearTimeout(i)},e)},mouseHoverDebounce:function(e,s,i){var o;o=setTimeout(function(){t(s+":hover").length>0?e():clearTimeout(o)},i)},getActiveInstance:function(){var e,s=t(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return s.length>0&&s.each(function(){var s=t(this).find(".dgwt-wcas-search-input");if("object"==typeof s.data("autocomplete"))return e=s.data("autocomplete"),!1}),e},hashCode:function(t){for(var e=0,s=t.length;s>0;)e=(e<<5)-e+t.charCodeAt(--s)|0;return e<0?-1*e:e}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=t.noop;function d(e,s){this.element=e,this.el=t(e),this.suggestions=[],this.badQueries=[],this.selectedIndex=-1,this.currentValue=this.element.value,this.timeoutId=null,this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.detailsRequestsSent=[],this.onChangeTimeout=null,this.onChange=null,this.isLocal=!1,this.suggestionsContainer=null,this.detailsContainer=null,this.autoAligmentprocess=null,this.noSuggestionsContainer=null,this.latestActivateSource="",this.actionTriggerSource="",this.options=t.extend(!0,{},d.defaults,s),this.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top"},this.hint=null,this.hintValue="",this.selection=null,this.overlayMobileState="off",this.initialize(),this.setOptions(s)}d.utils=e,t.DgwtWcasAutocompleteSearch=d,d.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",containerDetailsWidth:"auto",showDetailsPanel:!1,showImage:!1,showPrice:!1,showSKU:!1,showDescription:!1,showSaleBadge:!1,showFeaturedBadge:!1,dynamicPrices:!1,saleBadgeText:"sale",featuredBadgeText:"featured",minChars:3,maxHeight:600,deferRequestBy:0,params:{},formatResult:function(t,s,i,o){if(!s)return t;i&&(t=e.highlight(t,s));if(!o.convertHtml)return t;return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/&lt;sup/g,"<sup").replace(/&lt;\/sup/g,"</sup").replace(/sup&gt;/g,"sup>").replace(/&lt;(\/?(strong|b|br))&gt;/g,"<$1>")},delimiter:null,zIndex:999999999,type:"GET",noCache:!1,isRtl:!1,onSearchStart:c,onSearchComplete:c,onSearchError:c,preserveInput:!1,searchFormClass:"dgwt-wcas-search-wrapp",containerClass:"dgwt-wcas-suggestions-wrapp",containerDetailsClass:"dgwt-wcas-details-wrapp",searchInputClass:"dgwt-wcas-search-input",preloaderClass:"dgwt-wcas-preloader",closeTrigger:"dgwt-wcas-close",formClass:"dgwt-wcas-search-form",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,isPremium:!1,overlayMobile:!1,preventBadQueries:!0,lookupFilter:function(t,e,s){return-1!==t.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?t.parseJSON(e):e},noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1,positionFixed:!1,debounceWaitMs:400,sendGAEvents:!0,enableGASiteSearchModule:!1,showProductVendor:!1,disableHits:!1,disableSubmit:!1},d.prototype={initialize:function(){var s=this;s.element.setAttribute("autocomplete","off"),s.createContainers(),s.registerEventsSearchBar(),s.registerEventsSuggestions(),s.registerEventsDetailsPanel(),s.registerIconHandler(),s.registerEventsFixedMenu(),s.fixPositionCapture=function(){s.adjustContainerWidth(),s.visible&&s.fixPosition()},t(window).on("resize.autocomplete",function(){var t=e.getActiveInstance();void 0!==t&&t.fixPositionCapture()}),s.initMobileMode(),s.hideAfterClickOutsideListener(),s.suggestionsContainer.addClass("js-dgwt-wcas-initialized"),s.detailsContainer&&s.detailsContainer.length>0&&s.detailsContainer.addClass("js-dgwt-wcas-initialized")},createContainers:function(e){var s=this.options;0==t("."+s.containerClass).length?(this.suggestionsContainer=t(d.utils.createNode(s.containerClass)),this.suggestionsContainer.appendTo(s.appendTo||"body"),this.suggestionsContainer.addClass("woocommerce"),!0===s.showImage&&this.suggestionsContainer.addClass("dgwt-wcas-has-img"),!0===s.showPrice&&this.suggestionsContainer.addClass("dgwt-wcas-has-price"),!0===s.showDescription&&this.suggestionsContainer.addClass("dgwt-wcas-has-desc"),!0===s.showSKU&&this.suggestionsContainer.addClass("dgwt-wcas-has-sku"),!0===s.showHeadings&&this.suggestionsContainer.addClass("dgwt-wcas-has-headings"),"auto"!==s.width&&this.suggestionsContainer.width(s.width)):this.suggestionsContainer=t("."+this.options.containerClass),this.canShowDetailsBox()&&(0==t("."+s.containerDetailsClass).length?(this.detailsContainer=t(d.utils.createNode(s.containerDetailsClass)),this.detailsContainer.appendTo(s.appendTo||"body"),this.detailsContainer.addClass("woocommerce")):this.detailsContainer=t("."+s.containerDetailsClass))},registerEventsSearchBar:function(){var s=this;t(document).on("click.autocomplete","."+s.options.closeTrigger,function(){e.getActiveInstance().close()}),s.el.closest("."+s.options.formClass).on("submit.autocomplete",function(e){if(s.options.disableSubmit)return e.preventDefault(),!1;var i=t(this).find("."+s.options.searchInputClass);if(i.length&&0===i.val().length)return e.preventDefault(),!1;s.suggestions.length>0&&t.each(s.suggestions,function(t,i){if(void 0!==i.type&&"product_variation"==i.type)return s.select(t),e.preventDefault(),!1})}),"complete"===document.readyState?s.positionPreloader():t(window).on("load",function(){s.positionPreloader()}),s.el.on("keydown.autocomplete",function(t){s.onKeyPress(t)}),s.el.on("keyup.autocomplete",function(t){s.onKeyUp(t)}),s.el.on("blur.autocomplete",function(){s.onBlur()}),s.el.on("focus.autocomplete",function(){s.onFocus()}),s.el.on("change.autocomplete",function(t){s.onKeyUp(t)}),s.el.on("input.autocomplete",function(t){s.onKeyUp(t)})},registerEventsSuggestions:function(){var s="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){t(document).on("mouseenter.autocomplete",s,function(){var s=e.getActiveInstance();if(void 0!==s){var i=t(this).data("index"),o='.dgwt-wcas-suggestion[data-index="'+i+'"]',a=s.canShowDetailsBox()?100:1;s.selectedIndex!=i&&e.mouseHoverDebounce(function(){s.selectedIndex!==i&&(s.latestActivateSource="mouse",s.getDetails(s.suggestions[i]),s.activate(i))},o,a)}});var i=!1;t(document).on("click.autocomplete",s,function(){if(!i){var s=e.getActiveInstance();s.actionTriggerSource="click",i=!0,setTimeout(function(){i=!1},500),s.select(t(this).data("index"))}}),t(document).on("mousedown.autocomplete",s,function(e){"number"==typeof e.which&&1===e.which&&t(e.target)[0].click()}),t(document).on("click.autocomplete","."+this.options.containerClass,function(){var t=e.getActiveInstance();clearTimeout(t.blurTimeoutId)})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(t(document).on("click.autocomplete","."+this.options.containerDetailsClass,function(){var t=e.getActiveInstance();clearTimeout(t.blurTimeoutId)}),t(document).on("change.autocomplete",'[name="js-dgwt-wcas-quantity"]',function(e){t(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",t(this).val())}))},registerIconHandler:function(){var s=this,i=s.getFormWrapper(),o=i.find("."+s.options.formClass);i.on("click.autocomplete",".js-dgwt-wcas-search-icon-handler",function(t){var e=i.find("."+s.options.searchInputClass);if(i.hasClass("dgwt-wcas-layout-icon-open"))s.hide(),o.hide(!0),i.removeClass("dgwt-wcas-layout-icon-open");else{var a=i.find(".dgwt-wcas-search-icon-arrow");o.hide(),a.hide(),i.addClass("dgwt-wcas-layout-icon-open"),s.positionIconSearchMode(i),o.fadeIn(200,function(){a.show(),s.positionPreloader(i),e.focus()})}}),0==t(".js-dgwt-wcas-initialized").length&&t(".js-dgwt-wcas-search-icon-handler").length>0&&t(document).on("click.autocomplete",function(i){if(t(".dgwt-wcas-layout-icon-open").length){var o=t(i.target);if(!(o.closest("."+s.options.searchFormClass).length>0||o.closest("."+s.options.containerClass).length>0||o.closest("."+s.options.containerDetailsClass).length>0)){var a=e.getActiveInstance();if(void 0!==a){var n=a.getFormWrapper().find("."+s.options.formClass);n.hide(),a.hide(!0),n.css({left:"0"})}s.hideIconModeSearch()}}}),t(window).on("resize.autocomplete",function(){s.applyFlexibleMode()}),"complete"==document.readyState?s.applyFlexibleMode():t(window).on("load.autocomplete",function(){s.applyFlexibleMode()})},registerEventsFixedMenu:function(){var e=this;t(window).on("scroll.autocomplete",function(){if(e.suggestions.length>0&&e.elementOrParentIsFixed(e.getFormWrapper()))if(0===t(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(t){setTimeout(function(){e.fixHeight(),e.fixPositionCapture()},t)})}else e.fixHeight(),e.fixPositionCapture()})},initMobileMode:function(){var t=this,e=t.getFormWrapper();e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&t.isMobileMode()&&(e.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),e.find(".js-dgwt-wcas-enable-mobile-form").on("click.autocomplete",function(e){t.enableOverlayMobile()}))},applyFlexibleMode:function(){var e=t(".js-dgwt-wcas-layout-icon-flexible");e.length&&(this.isMobileMode()?(e.addClass("js-dgwt-wcas-layout-icon"),e.addClass("dgwt-wcas-layout-icon")):(e.removeClass("js-dgwt-wcas-layout-icon"),e.removeClass("dgwt-wcas-layout-icon")),e.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(){t("."+this.options.searchFormClass).removeClass("dgwt-wcas-active"),this.getFormWrapper().addClass("dgwt-wcas-active"),this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var e=this,s=e.options,i=e.el.val(),o=e.getQuery(i);e.isMobileMode()||(e.blurTimeoutId=setTimeout(function(){e.hide(),e.selection&&e.currentValue!==o&&(s.onInvalidateSelection||t.noop).call(e.element)},200))},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(e){var s=this,i=s.getSuggestionsContainer(),o=t.extend({},s.options,e);(s.isLocal=Array.isArray(o.lookup),s.isLocal&&(o.lookup=s.verifySuggestionsFormat(o.lookup)),o.orientation=s.validateOrientation(o.orientation,"bottom"),i.css({"max-height":s.canShowDetailsBox()?"none":o.maxHeight+"px",width:o.width+"px","z-index":o.zIndex}),!0===o.showDetailsPanel)&&s.getDetailsContainer().css({"z-index":o.zIndex-1});o.onSearchComplete=function(){s.getFormWrapper().removeClass("dgwt-wcas-processing"),s.preloader("hide","form","dgwt-wcas-inner-preloader"),s.showCloseButton()},this.options=o},clearCache:function(){this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.badQueries=[]},clear:function(t){t&&this.clearCache(),this.currentValue="",this.suggestions=[]},close:function(){this.hide(),this.clear(!1),this.hideCloseButton(),this.el.closest("."+this.options.searchFormClass).find("."+this.options.searchInputClass).val("").focus()},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this.getFormOffset();this.getSuggestionsContainer().css(t),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.getDetailsContainer(),o=this.getFormOffset(),a=o.left;if(0==i.length)return!1;var n=!0===this.options.isRtl?1:2,r=Math.round(o.left);if(o.left=r+Math.round(s.width()+n),i.css(o),e.width()>=550)return t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),void(!0===this.options.isRtl&&(s.css("left",r+Math.round(i.width()+n)+"px"),i.css("left",a+"px")));var l=t(window).width(),c=i.width(),d=i.offset();t("body").addClass("dgwt-wcas-details-outside"),!0===this.options.isRtl&&(o.left=o.left+1);var g=!1,u=!1;l<d.left+c&&(g=!0,t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-left"),i.css("left",Math.round(parseFloat(s.css("left").replace("px","")))-i.outerWidth()+"px")),(d=i.offset()).left<1&&(u=!0,t("body").removeClass("dgwt-wcas-details-left"),t("body").addClass("dgwt-wcas-details-right")),u&&g?(t("body").removeClass("dgwt-wcas-details-left"),t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-notfit")):t("body").removeClass("dgwt-wcas-details-notfit")},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var t=this.getSuggestionsContainer(),e=this.getDetailsContainer();t.css("height","auto"),e.css("height","auto");var s=t.outerHeight(),i=e.outerHeight();return t.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(t.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&e.css("height",s+"px"),s<i&&t.css("height",i+"px"),!1)},automaticAlignment:function(){var t=this,e=t.getFormWrapper().find(".dgwt-wcas-search-input"),s=t.getSuggestionsContainer(),i=t.getDetailsContainer();if(null==t.autoAligmentprocess){var o=[e.width(),s.height()];t.options.showDetailsPanel&&(o[2]=i.height()),t.autoAligmentprocess=setInterval(function(){var a=[e.width(),s.height()];t.options.showDetailsPanel&&(a[2]=i.height());for(var n=0;n<o.length;n++)if(o[n]!=a[n]){t.fixHeight(),t.fixPositionCapture(),o=a;break}t.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&t.fixHeight())},10)}},getFormOffset:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.options.orientation,o=e.outerHeight(),a=this.el.outerHeight(),n=this.el.offset(),r={top:n.top,left:n.left};if("auto"===i){var l=t(window).height(),c=t(window).scrollTop(),d=-c+n.top-o,g=c+l-(n.top+a+o);i=Math.max(d,g)===d?"top":"bottom"}if("top"===i){s[0].getBoundingClientRect().top;var u=e[0].getBoundingClientRect().top;s.css("height","auto"),u<s.height()&&s.height(u-10),r.top+=-s.outerHeight()}else r.top+=a;return r},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getSuggestionsContainer:function(){return t("."+this.options.containerClass)},getDetailsContainer:function(){return t("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var t=this.getSuggestionsContainer();t[0].scrollTop=t[0].scrollHeight},isCursorAtEnd:function(){var t,e=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)},onKeyPress:function(t){if(this.disabled||this.visible||t.which!==l||!this.currentValue){if(!this.disabled&&this.visible){switch(t.which){case i:this.el.val(this.currentValue),this.hide();break;case r:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case o:if(this.hint&&this.options.onHint)return void this.selectHint();if(-1===this.selectedIndex)return void this.hide();if(this.select(this.selectedIndex),!1===this.options.tabDisabled)return;break;case a:if(-1===this.selectedIndex)return void this.hide();this.actionTriggerSource="enter",this.select(this.selectedIndex);break;case n:this.moveUp();break;case l:this.moveDown();break;default:return}t.stopImmediatePropagation(),t.preventDefault()}}else this.suggest()},onKeyUp:function(t){var e=this;if(!e.disabled){switch(t.which){case n:case l:return}clearTimeout(e.onChangeTimeout),e.currentValue!==e.el.val()&&(e.findBestHint(),e.options.deferRequestBy>0?e.onChangeTimeout=setTimeout(function(){e.onValueChange()},e.options.deferRequestBy):e.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var e=this.options,s=this.el.val(),i=this.getQuery(s);this.selection&&this.currentValue!==i&&(this.selection=null,(e.onInvalidateSelection||t.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,e.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):i.length<e.minChars?(this.hideCloseButton(),this.hide()):this.getSuggestions(i)}},isExactMatch:function(t){var e=this.suggestions;return 1===e.length&&e[0].value.toLowerCase()===t.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return t(window).width()<this.options.mobileBreakpoint},getQuery:function(e){var s,i=this.options.delimiter;return i?(s=e.split(i),t.trim(s[s.length-1])):e.trim()},getSuggestionsLocal:function(e){var s,i=this.options,o=e.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:t.grep(i.lookup,function(t){return a(t,e,o)})},n&&s.suggestions.length>n&&(s.suggestions=s.suggestions.slice(0,n)),s},getSuggestions:function(i){var o,a,n,r,l=this,c=l.options,d=c.serviceUrl,g=l.getFormWrapper();c.params[c.paramName]=i,void 0!==dgwt_wcas.current_lang&&(c.params.l=dgwt_wcas.current_lang),c.params=l.applyCustomParams(c.params),l.preloader("show","form","dgwt-wcas-inner-preloader"),g.addClass("dgwt-wcas-processing"),!1!==c.onSearchStart.call(l.element,c.params)&&(a=c.ignoreParams?null:c.params,t.isFunction(c.lookup)?c.lookup(i,function(t){l.suggestions=t.suggestions,l.suggest(),l.selectFirstSuggestion(t.suggestions),c.onSearchComplete.call(l.element,i,t.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(t.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+t.param(a||{}),o=l.cachedResponse[n]),o&&Array.isArray(o.suggestions)?(l.suggestions=o.suggestions,l.suggest(),l.selectFirstSuggestion(o.suggestions),c.onSearchComplete.call(l.element,i,o.suggestions)):l.isBadQuery(i)?c.onSearchComplete.call(l.element,i,[]):(l.abortAjax(),r={url:d,data:a,type:c.type,dataType:c.dataType},t.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,e.debounce(function(){var e=s.object,o=s.ajaxSettings;e.currentRequest=t.ajax(o).done(function(t){var s;e.currentRequest=null,void 0!==(s=e.options.transformResult(t,i)).suggestions&&(e.processResponse(s,i,n),e.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?e.gaEvent(i,"Autocomplete Search without results"):e.gaEvent(i,"Autocomplete Search with results")),e.fixPositionCapture(),e.options.onSearchComplete.call(e.element,i,s.suggestions),e.updatePrices()}).fail(function(t,s,o){e.options.onSearchError.call(e.element,i,t,s,o)})},c.debounceWaitMs))))},getDetails:function(e){var s=this;if(!s.canShowDetailsBox())return!1;if(null!=e&&void 0!==e.type&&("string"!=typeof e.more_products||"more_products"!==e.more_products)){s.fixHeight();s.getDetailsContainer();var i=s.prepareSuggestionObjectID(e);if(null!=s.cachedDetails[i])s.detailsPanelSetScene(i),s.fixHeight(),s.fixPositionCapture();else{var o={action:dgwt_wcas.action_result_details,items:[]};if(t.each(s.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type){var i={objectID:s.prepareSuggestionObjectID(e),value:null!=e.value?e.value:""};o.items.push(i)}}),s.detailsPanelClearScene(),s.preloader("show","details",""),-1!=t.inArray(i,s.detailsRequestsSent))return;s.detailsRequestsSent.push(i),t.ajax({data:o,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(t){var e="string"==typeof t?jQuery.parseJSON(t):t;if(void 0!==e.items)for(var i=0;i<e.items.length;i++){var o=e.items[i].objectID;if(s.cachedDetails[o]={html:e.items[i].html},s.detailsPanelAddToScene(o),void 0!==e.items[i].price&&e.items[i].price.length>0&&(s.cachedPrices[o]=e.items[i].price),void 0!==e.items[i].imageSrc&&e.items[i].imageSrc.length>0)(new Image).src=e.items[i].imageSrc}s.preloader("hide","details","");var a=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[a]?s.detailsPanelSetScene(a):s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight(),s.updatePrices(!0)},error:function(t,e){s.preloader("hide","details",""),s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight()}})}t(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},updatePrices:function(e){var s,i,o=this,a=[];if(o.options.showPrice&&o.options.dynamicPrices&&0!=o.suggestions.length){for(s=0;s<o.suggestions.length;s++)if(void 0!==o.suggestions[s].type&&("product"==o.suggestions[s].type||"product_variation"==o.suggestions[s].type)){var n="product__"+o.suggestions[s].post_id;void 0!==o.cachedPrices[n]?o.updatePrice(s,o.cachedPrices[n]):(o.applyPreloaderForPrice(s),a.push(o.suggestions[s].post_id))}if(!e&&a.length>0){var r={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:a};t.ajax({data:r,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(t){if(void 0!==t.success&&t.success&&t.data.length>0)for(s=0;s<t.data.length;s++){var e=t.data[s].id,a=t.data[s].price;if(o.suggestions.length>0)for(i=0;i<o.suggestions.length;i++)if(void 0!==o.suggestions[i].type&&("product"==o.suggestions[i].type||"product_variation"==o.suggestions[i].type)&&o.suggestions[i].post_id==e){var n="product__"+e;o.cachedPrices[n]=a,o.updatePrice(i,a)}}},error:function(t,e){}})}}},updatePrice:function(e,s){if(void 0!==this.suggestions[e]){this.suggestions[e].price=s;var i=t(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+e+'"] .dgwt-wcas-sp');i.length&&i.html(s)}},applyCustomParams:function(t){if("object"==typeof dgwt_wcas.custom_params){var e=dgwt_wcas.custom_params;for(var s in e)t[s]=e[s]}var i=this.el.data("custom-params");if("object"==typeof i)for(var s in i)t[s]=i[s];return t},applyPreloaderForPrice:function(e){if(void 0!==this.suggestions[e]){var s=t(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+e+'"] .dgwt-wcas-sp');s.length&&s.html('<div class="dgwt-wcas-preloader-price"><div class="dgwt-wcas-preloader-price-inner"> <div></div><div></div><div></div></div></div>')}},prepareSuggestionObjectID:function(t){var e="";return void 0!==t&&void 0!==t.type&&(null!=t.post_id&&(e=t.type+"__"+t.post_id,"product_variation"===t.type&&(e+="__"+t.variation_id),void 0!==t.post_type&&(e=t.type+"__"+t.post_id+"__"+t.post_type)),null!=t.term_id&&null!=t.taxonomy&&(e=t.type+"__"+t.term_id+"__"+t.taxonomy)),e},detailsPanelSetScene:function(t){var s=this.getDetailsContainer(),i=e.hashCode(t),o=s.find('.dgwt-wcas-details-inner[data-object="'+i+'"]');o.length&&(this.preloader("hide","details",""),this.detailsPanelClearScene(),o.addClass("dgwt-wcas-details-inner-active"))},detailsPanelAddToScene:function(t){var s=this.getDetailsContainer(),i=this.cachedDetails[t],o=e.hashCode(t),a="";void 0!==i&&"string"==typeof i.html&&(a=i.html.replace("<div ",'<div data-object="'+o+'" ')),0==s.find('.dgwt-wcas-details-inner[data-object="'+o+'"]').length&&s.append(a)},detailsPanelClearScene:function(){var t=this.getDetailsContainer().find(".dgwt-wcas-details-inner");t.length&&t.removeClass("dgwt-wcas-details-inner-active")},selectFirstSuggestion:function(e){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=e&&e.length>0&&t.each(this.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type&&"no-results"!=e.type)return s=t,!1;void 0!==e.type&&"no-results"!==e.type||(i=!0)}),i||(this.latestActivateSource="system",this.getDetails(e[s]),this.activate(s)))},isBadQuery:function(t){if(!this.options.preventBadQueries)return!1;for(var e=this.badQueries,s=e.length;s--;)if(0===t.indexOf(e[s]))return!0;return!1},hide:function(e){this.getFormWrapper();var s=this.getSuggestionsContainer(),i=this.getDetailsContainer();t.isFunction(this.options.onHide)&&this.visible&&this.options.onHide.call(this.element,container),this.visible=!1,this.selectedIndex=-1,clearTimeout(this.onChangeTimeout),s.hide(),s.removeClass(this.classes.suggestionsContainerOrientTop),i.hide(),t("body").removeClass("dgwt-wcas-open"),t("body").removeClass("dgwt-wcas-block-scroll"),t("body").removeClass("dgwt-wcas-is-details"),t("body").removeClass("dgwt-wcas-full-width"),t("body").removeClass("dgwt-wcas-nores"),t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),"boolean"==typeof e&&e&&(this.hideCloseButton(),this.currentValue="",this.suggestions=[]),this.signalHint(null)},positionIconSearchMode:function(e){var s=-20,i=e.find("."+this.options.formClass),o=i.width(),a=t(window).width(),n=e[0].getBoundingClientRect().left;i[0].getBoundingClientRect().left;var r=(n+10)/a;s=Math.floor(o*r*-1),s=Math.max(s,-1*n),i.css({left:s+"px"})},hideIconModeSearch:function(){var e=t(".dgwt-wcas-layout-icon-open");e.length>0&&e.removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var e=this;e.isMobileMode()||t(document).mouseup(function(s){if(e.visible){e.getSuggestionsContainer(),e.getDetailsContainer();var i=!(t(s.target).closest("."+e.options.searchFormClass).length>0||t(s.target).hasClass(e.options.searchFormClass)),o=!(t(s.target).closest("."+e.options.containerClass).length>0||t(s.target).hasClass(e.options.containerClass));if(e.canShowDetailsBox()){var a=!(t(s.target).closest("."+e.options.containerDetailsClass).length>0||t(s.target).hasClass(e.options.containerDetailsClass));i&&o&&a&&e.hide()}else i&&o&&e.hide()}})},suggest:function(){if(this.suggestions.length){var e,s=this,i=s.options,o=i.groupBy,a=i.formatResult,n=s.getQuery(s.currentValue),r=s.classes.suggestion,l=s.classes.selected,c=s.getSuggestionsContainer(),d=s.getDetailsContainer(),g=t(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(t("body").removeClass("dgwt-wcas-nores"),t.each(s.suggestions,function(l,c){var d="",g=!1;if(o&&(h+=function(t,s){var i=t.data[o];return e===i?"":'<div class="autocomplete-group"><strong>'+(e=i)+"</strong></div>"}(c,0)),void 0===c.type||"product"!=c.type&&"product_variation"!=c.type){var u,p=r,w="dgwt-wcas-st",f="",m="",v="",b=!0;"product_cat"===c.taxonomy?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.category+"</span>"),void 0!==c.breadcrumbs&&c.breadcrumbs&&(v=c.breadcrumbs+" &gt; "+c.value,m+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+c.breadcrumbs+"</span>")):"product_tag"===c.taxonomy?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.tag+"</span>")):i.isPremium&&c.taxonomy===i.taxonomyBrands?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.brand+"</span>")):i.isPremium&&"vendor"===c.type?(p+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):i.isPremium&&"post"===c.type?(p+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===c.type?(p+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(f+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===c.type?(p+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",w="dgwt-wcas-st-more",c.value=dgwt_wcas.labels.show_more+" ("+c.total+")",b=!1):i.showHeadings&&"headline"===c.type?(p+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[c.value+"_plu"]&&(c.value=dgwt_wcas.labels[c.value+"_plu"]),b=!1):(p+=" dgwt-wcas-suggestion-nores",c.value=dgwt_wcas.labels.no_results,b=!1,!0===i.showDetailsPanel&&s.detailsPanelClearScene(),t("body").addClass("dgwt-wcas-nores")),void 0!==c.image_src&&c.image_src&&(u=!0),v=v.length>0?' title="'+v+'"':"",h+='<div class="'+p+'" data-index="'+l+'">',u&&(h+='<span class="dgwt-wcas-si"><img src="'+c.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+v+' class="'+w+'">',"vendor"===c.type?(h+='<span class="dgwt-wcas-st-title">'+f+a(c.value,n,b,i)+m+"</span>",c.shop_city&&(h+='<span class="dgwt-wcas-vendor-city"><span> - </span>'+a(c.shop_city,n,!0,i)+"</span>"),void 0!==c.desc&&c.desc&&(h+='<span class="dgwt-wcas-sd">'+a(c.desc,n,!0,i)+"</span>")):h+=f+a(c.value,n,b,i)+m,h+="</span>",h+=u?"</div>":"",h+="</div>"}else{!0===i.showImage&&void 0!==c.thumb_html&&(g=!0);var C="product_variation"===c.type?" dgwt-wcas-suggestion-product-var":"";if(d+=void 0!==c.post_id?'data-post-id="'+c.post_id+'" ':"",d+=void 0!==c.taxonomy?'data-taxonomy="'+c.taxonomy+'" ':"",d+=void 0!==c.term_id?'data-term-id="'+c.term_id+'" ':"",h+='<div class="'+r+" dgwt-wcas-suggestion-product"+C+'" data-index="'+l+'" '+d+">",g&&(h+='<span class="dgwt-wcas-si">'+c.thumb_html+"</span>"),h+=g?'<div class="dgwt-wcas-content-wrapp">':"",h+='<span class="dgwt-wcas-st">',h+='<span class="dgwt-wcas-st-title">'+a(c.value,n,!0,i)+"</span>",!0===i.showSKU&&void 0!==c.sku&&c.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+a(c.sku,n,!0,i)+")</span>"),!0===i.showDescription&&void 0!==c.desc&&c.desc&&(h+='<span class="dgwt-wcas-sd">'+a(c.desc,n,!0,i)+"</span>"),!0===i.showProductVendor&&void 0!==c.vendor&&c.vendor){var y='<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">'+dgwt_wcas.labels.vendor_sold_by+" </span>"+c.vendor+"</span>";void 0!==c.vendor_url&&c.vendor_url?h+='<a href="'+c.vendor_url+'">'+y+"</a>":h+=y}h+="</span>",!0===i.showPrice&&void 0!==c.price&&(h+='<span class="dgwt-wcas-sp">'+c.price+"</span>"),!0===i.showFeaturedBadge&&!0===c.on_sale&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-os">'+i.saleBadgeText+"</span>"),!0===i.showFeaturedBadge&&!0===c.featured&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-f">'+i.featuredBadgeText+"</span>"),h+=g?"</div>":"",h+="</div>"}}),this.adjustContainerWidth(),g.detach(),c.html(h),t.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),t("body").addClass("dgwt-wcas-open"),s.automaticAlignment(),!0===i.showDetailsPanel&&(t("body").addClass("dgwt-wcas-is-details"),d.show(),s.fixHeight()),i.autoSelectFirst&&(s.selectedIndex=0,c.scrollTop(0),c.children("."+r).first().addClass(l)),s.visible=!0,s.fixPositionCapture(),"top"===s.options.orientation&&(s.getSuggestionsContainer().addClass(s.classes.suggestionsContainerOrientTop),t("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var e,s=this.options,i=t("body"),o=this.getFormWrapper(),a=this.getSuggestionsContainer(),n=this.getDetailsContainer(),r=this.getFormOffset();if(o.length){var l=getComputedStyle(o[0]).width;if(l=Math.round(parseFloat(l.replace("px",""))),"auto"===s.width&&(e=this.el.outerWidth(),a.css("width",e+"px")),this.canShowDetailsBox()){if(o.width()>=550)return i.addClass("dgwt-wcas-full-width"),l%2==0?(a.css("width",Math.round(l/2)),n.css("width",Math.round(l/2))):(a.css("width",Math.floor(l/2)),n.css("width",Math.ceil(l/2))),i.removeClass("dgwt-wcas-details-left"),i.removeClass("dgwt-wcas-details-right"),void(!0===s.isRtl?n.css("left","0"):a.css("left",l/2+r.left+"px"));i.addClass("dgwt-wcas-details-right")}}},positionPreloader:function(e){var s="object"==typeof e?e.find(".dgwt-wcas-search-submit"):t(".dgwt-wcas-search-submit");s.length>0&&s.each(function(){var e=t(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?e.css("left",6+t(this).outerWidth()+"px"):e.css("right",t(this).outerWidth()+"px")})},findBestHint:function(){var e=this.el.val().toLowerCase(),s=null;e&&(t.each(this.suggestions,function(t,i){var o=0===i.value.toLowerCase().indexOf(e);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(e){var s="";e&&(s=this.currentValue+e.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=e,(this.options.onHint||t.noop)(s))},preloader:function(t,e,s){var i,o,a="dgwt-wcas-preloader-wrapp",n=null==s?a:a+" "+s;if("form"===e){if(1!=dgwt_wcas.show_preloader)return;o=this.getFormWrapper().find(".dgwt-wcas-preloader")}else"details"===e&&(o=this.getDetailsContainer());if(0!=o.length)if("form"!==e){var r=o.find("."+a);if("hide"!==t){if("show"===t){var l=this.options.isRtl?"-rtl":"";i='<div class="'+n+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+l+'.png" /></div>',this.detailsPanelClearScene(),r.length&&r.remove(),o.prepend(i)}}else r.length&&r.remove()}else"hide"===t?(o.removeClass(s),o.html("")):(o.addClass(s),"string"==typeof dgwt_wcas.preloader_icon&&o.html(dgwt_wcas.preloader_icon))},verifySuggestionsFormat:function(e){return e.length&&"string"==typeof e[0]?t.map(e,function(t){return{value:t,data:null}}):e},validateOrientation:function(e,s){return e=t.trim(e||"").toLowerCase(),-1===t.inArray(e,["auto","bottom","top"])&&(e=s),e},processResponse:function(t,e,s){var i=this.options;t.suggestions=this.verifySuggestionsFormat(t.suggestions),i.noCache||(this.cachedResponse[s]=t,i.preventBadQueries&&!t.suggestions.length&&this.badQueries.push(e)),e===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&t.suggestions.reverse(),this.suggestions=t.suggestions,this.suggest())},activate:function(e){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=e,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),t(s).addClass(i),s):null},selectHint:function(){var e=t.inArray(this.hint,this.suggestions);this.select(e)},select:function(t){this.options.disableHits||(this.hide(),this.onSelect(t))},moveUp:function(){if(-1!==this.selectedIndex){if(this.latestActivateSource="key",0===this.selectedIndex)return this.getSuggestionsContainer().children("."+this.classes.suggestion).first().removeClass(this.classes.selected),this.selectedIndex=-1,this.ignoreValueChange=!1,this.el.val(this.currentValue),void this.findBestHint();this.adjustScroll(this.selectedIndex-1,"up")}},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&(this.latestActivateSource="key",this.adjustScroll(this.selectedIndex+1,"down"))},adjustScroll:function(e,s){if("headline"===this.suggestions[e].type&&(e="down"===s?e+1:e-1),void 0!==this.suggestions[e]){var i=this.activate(e);if(this.getDetails(this.suggestions[e]),"more_products"!==this.suggestions[e].type&&i&&!this.canShowDetailsBox()){var o,a,n,r=this.getSuggestionsContainer(),l=t(i).outerHeight();o=i.offsetTop,n=(a=r.scrollTop())+this.options.maxHeight-l,o<a?r.scrollTop(o):o>n&&r.scrollTop(o-this.options.maxHeight+l),this.options.preserveInput||(this.ignoreValueChange=!0),this.signalHint(null)}}},onSelect:function(e){var s=this.options.onSelect,i=this.suggestions[e];void 0===i.type||"more_products"!==i.type&&("enter"!==this.actionTriggerSource||"key"==this.latestActivateSource||"product_variation"==i.type)?(this.currentValue=this.getValue(i.value),this.currentValue===this.el.val()||this.options.preserveInput||this.el.val(this.currentValue),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,t.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(t){var e,s,i=this.options.delimiter;return i?1===(s=(e=this.currentValue).split(i)).length?t:e.substr(0,e.length-s[s.length-1].length)+t:t},dispose:function(){var e=this.el,s=this.getFormWrapper(),i=this.getSuggestionsContainer(),o=(this.getDetailsContainer(),e.closest("."+this.options.formClass),s.find(".js-dgwt-wcas-enable-mobile-form"));s.length&&s.find("*").each(function(){t(this).off(".autocomplete")});e.removeData("autocomplete"),t(window).off("resize.autocomplete",this.fixPositionCapture),s.removeClass("dgwt-wcas-active"),this.close(),o.length&&o.remove(),i.length&&i.html("")},enableOverlayMobile:function(){var e=this;if("on"!==e.overlayMobileState){e.overlayMobileState="on";var s,i=e.getFormWrapper(),o=e.getSuggestionsContainer(),a="";t("html").addClass("dgwt-wcas-overlay-mobile-on"),a+='<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">',a+='<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">',a+='<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">',"string"==typeof dgwt_wcas.back_icon&&(a+=dgwt_wcas.back_icon),a+="</button>",a+="</div>",a+="</div>",t(e.options.mobileOverlayWrapper).append(a),(s=t(".js-dgwt-wcas-overlay-mobile")).css("zIndex",99999999999),i.after('<span class="js-dgwt-wcas-om-hook"></span>'),i.appendTo(".js-dgwt-wcas-om-bar"),o.appendTo(".js-dgwt-wcas-om-bar"),i.addClass("dgwt-wcas-search-wrapp-mobile"),i.hasClass("dgwt-wcas-has-submit")&&(i.addClass("dgwt-wcas-has-submit-off"),i.removeClass("dgwt-wcas-has-submit")),i.find("."+e.options.searchInputClass).focus(),t(document).on("click.autocomplete",".js-dgwt-wcas-om-return",function(t){e.disableOverlayMobile(s)})}},disableOverlayMobile:function(e){var s=this,i=s.getSuggestionsContainer(),o=t(".js-dgwt-wcas-om-bar").find("."+s.options.searchFormClass);o.hasClass("dgwt-wcas-has-submit-off")&&(o.removeClass("dgwt-wcas-has-submit-off"),o.addClass("dgwt-wcas-has-submit")),o.removeClass("dgwt-wcas-search-wrapp-mobile"),t("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),t(".js-dgwt-wcas-om-hook").after(o),t(".js-dgwt-wcas-overlay-mobile").remove(),t(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var t=o.find(".dgwt-wcas-close");o.length>0&&(t.removeClass("dgwt-wcas-close"),t.html("")),s.hide()},150),s.overlayMobileState="off"},showCloseButton:function(){var t=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",e=this.getFormWrapper().find("."+this.options.preloaderClass);e.addClass(this.options.closeTrigger),e.html(t)},hideCloseButton:function(){var t=this.getFormWrapper().find("."+this.options.closeTrigger);t.length&&(t.removeClass(this.options.closeTrigger),t.html(""))},elementOrParentIsFixed:function(e){var s=e.add(e.parents()),i=!1;return s.each(function(){if("fixed"===t(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,e){var s=!(!window.hasOwnProperty("GoogleAnalyticsObject")||!window.hasOwnProperty(window.GoogleAnalyticsObject))&&window[window.GoogleAnalyticsObject];if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:t,event_category:e});else if(!1!==s){var i=s.getAll()[0];i&&i.send({hitType:"event",eventCategory:e,eventAction:"autocomplete_search",eventLabel:t})}}catch(t){}if(this.options.enableGASiteSearchModule)try{if("undefined"!=typeof gtag)gtag("event","page_view",{page_path:"/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"});else if(!1!==s){var o=s.getAll()[0];o&&(o.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),o.send("pageview"))}}catch(t){}}},t.fn.dgwtWcasAutocomplete=function(e,s){return arguments.length?this.each(function(){var i=t(this),o=i.data("autocomplete");"string"==typeof e?o&&"function"==typeof o[e]&&o[e](s):(o&&o.dispose&&o.dispose(),o=new d(this,e),i.data("autocomplete",o))}):this.first().data("autocomplete")},t.fn.autocomplete||(t.fn.autocomplete=t.fn.dgwtWcasAutocomplete),function(){function e(){var e=t(".dgwt-wcas-search-input"),s=[];e.length>1&&e.each(function(){var e=t(this).attr("id");if(-1==t.inArray(e,s))s.push(e);else{var i=Math.random().toString(36).substring(2,6);i="dgwt-wcas-search-input-"+i,t(this).attr("id",i),t(this).closest("form").find("label").attr("for",i)}})}function s(){var e=t(".dgwt-wcas-search-input");e.length>0&&e.each(function(){"object"!=typeof t(this).data("autocomplete")&&t(this).dgwtWcasAutocomplete(window.dgwt_wcas.config)})}navigator.userAgent.match(/Trident\/7\./)&&function(t,e){function s(t,e){var s=arguments.length>2?arguments[2]:[];if(!1===a(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(e,s)}function i(t,e,s){var i={value:s,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(t,e,i)}function o(t,e){return t[e]}function a(t){return"function"==typeof t}function n(t){if(null===t||t===e)throw TypeError();return Object(t)}function r(t,s){var i=function(t,e){return n(t)[e]}(t,s);if(null===i||i===e)return e;if(!1===a(i))throw new TypeError("Method not callable: "+s);return i}function l(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":"Symbol"in t&&(e instanceof t.Symbol||e.constructor===t.Symbol)?"symbol":"object"}}function c(s){if("object"!==l(s))return!1;var i="Symbol"in t&&"match"in t.Symbol?o(s,t.Symbol.match):e;if(i!==e)return Boolean(i);try{var a=s.lastIndex;return s.lastIndex=0,RegExp.prototype.exec.call(s),!0}catch(t){}finally{s.lastIndex=a}return!1}function d(t,e){return l(t)===l(e)&&("number"===l(t)?!(!isNaN(t)||!isNaN(e))||1/t==1/0&&1/e==-1/0||1/t==-1/0&&1/e==1/0||t===e:function(t,e){return t===e}(t,e))}function g(t){if("symbol"===l(t))throw new TypeError("Cannot convert a Symbol value to a number");var e=Number(t);return isNaN(e)?0:1/e==1/0||1/e==-1/0||e===1/0||e===-1/0?e:(e<0?-1:1)*Math.floor(Math.abs(e))}function u(i){var n=arguments.length>1?arguments[1]:e;if("object"===l(i)){if(arguments.length<2)var c="default";else n===String?c="string":n===Number&&(c="number");var d="function"==typeof t.Symbol&&"symbol"==typeof t.Symbol.toPrimitive?r(i,t.Symbol.toPrimitive):e;if(d!==e){var g=s(d,i,[c]);if("object"!==l(g))return g;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===c&&(c="number"),function(t,e){if("string"===e)var i=["toString","valueOf"];else i=["valueOf","toString"];for(var n=0;n<i.length;++n){var r=o(t,i[n]);if(a(r)){var c=s(r,t);if("object"!==l(c))return c}}throw new TypeError("Cannot convert to primitive.")}(i,c)}return i}function h(t){switch(l(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return h(u(t,String));default:return String(t)}}i(Array.prototype,"includes",function(t){var e=n(this),s=function(t){var e=g(t);return e<=0?0:Math.min(e,Math.pow(2,53)-1)}(o(e,"length"));if(0===s)return!1;var i=g(arguments[1]);if(i>=0)var a=i;else(a=s+i)<0&&(a=0);for(;a<s;){if(d(t,o(e,h(a))))return!0;a+=1}return!1}),i(String.prototype,"includes",function(t){var s=arguments.length>1?arguments[1]:e,i=h(function(t){if(null===t||t===e)throw TypeError(Object.prototype.toString.call(t)+" is not coercible to Object.");return t}(this));if(c(t))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=h(t),a=g(s),n=i.length,r=Math.min(Math.max(a,0),n);return-1!==String.prototype.indexOf.call(i,o,r)})}("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),t(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&t("html").addClass("dgwt-wcas-is-ios");var e=1==dgwt_wcas.show_details_box,s=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<s||"ontouchend"in document)&&(e=!1),window.dgwt_wcas.config={minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:e,showImage:1==dgwt_wcas.show_images,showPrice:1==dgwt_wcas.show_price,showDescription:1==dgwt_wcas.show_desc,showSKU:1==dgwt_wcas.show_sku,showSaleBadge:1==dgwt_wcas.show_sale_badge,showFeaturedBadge:1==dgwt_wcas.show_featured_badge,dynamicPrices:!(void 0===dgwt_wcas.dynamic_prices||!dgwt_wcas.dynamic_prices),saleBadgeText:dgwt_wcas.labels.sale_badge,featuredBadgeText:dgwt_wcas.labels.featured_badge,isRtl:1==dgwt_wcas.is_rtl,showHeadings:1==dgwt_wcas.show_headings,isPremium:1==dgwt_wcas.is_premium,taxonomyBrands:dgwt_wcas.taxonomy_brands,mobileBreakpoint:s,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events,convertHtml:dgwt_wcas.convert_html,enableGASiteSearchModule:dgwt_wcas.enable_ga_site_search_module,appendTo:void 0!==dgwt_wcas.suggestions_wrapper?dgwt_wcas.suggestions_wrapper:"body",showProductVendor:!(void 0===dgwt_wcas.show_product_vendor||!dgwt_wcas.show_product_vendor),disableHits:!(void 0===dgwt_wcas.disable_hits||!dgwt_wcas.disable_hits),disableSubmit:!(void 0===dgwt_wcas.disable_submit||!dgwt_wcas.disable_submit)},t(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),t(window).on("load",function(){var e=0,s=setInterval(function(){var i=document.activeElement;if("object"==typeof i&&t(i).length&&t(i).hasClass("dgwt-wcas-search-input")){var o=t(i).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}e>10&&clearInterval(s),e++},500)}),t(document).ready(function(){setTimeout(function(){e(),s()},500)}),t(window).on("load",function(){setTimeout(function(){e(),s()},500),void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&t.each(elementorFrontend.documentsManager.documents,function(t,e){void 0!==e.getModal&&e.getModal&&e.getModal().on("show",function(){setTimeout(function(){s()},300)})})})}()});
includes/Abstracts/ThemeIntegration.php CHANGED
@@ -95,7 +95,7 @@ abstract class ThemeIntegration {
95
  *
96
  * @return void
97
  */
98
- private function maybeOverwriteSearch() {
99
  $partialPath = DGWT_WCAS_DIR . 'partials/themes/' . $this->themeSlug . '.php';
100
  if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
101
  require_once( $partialPath );
95
  *
96
  * @return void
97
  */
98
+ protected function maybeOverwriteSearch() {
99
  $partialPath = DGWT_WCAS_DIR . 'partials/themes/' . $this->themeSlug . '.php';
100
  if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
101
  require_once( $partialPath );
includes/Admin/Install.php CHANGED
@@ -77,6 +77,19 @@ class Install
77
  }
78
  }
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  /**
81
  * Compare plugin version and install if a new version is available
82
  *
77
  }
78
  }
79
 
80
+ /**
81
+ * Check if SQL server support JSON data type
82
+ */
83
+ private static function checkIfDbSupportJson()
84
+ {
85
+ global $wpdb ;
86
+ $suppress_errors = $wpdb->suppress_errors;
87
+ $wpdb->suppress_errors();
88
+ $result = $wpdb->get_var( "SELECT JSON_CONTAINS('[1,2,3]', '2')" );
89
+ $wpdb->suppress_errors( $suppress_errors );
90
+ update_option( 'dgwt_wcas_db_json_support', ( $result === '1' && empty($wpdb->last_error) ? 'yes' : 'no' ) );
91
+ }
92
+
93
  /**
94
  * Compare plugin version and install if a new version is available
95
  *
includes/Admin/Promo/Upgrade.php CHANGED
@@ -76,9 +76,7 @@ class Upgrade {
76
  ?>
77
  <script>
78
  (function ($) {
79
- var $handler = $('.dgwt-wcas-premium-only label, .dgwt-wcas-premium-only input, .dgwt-wcas-premium-only button, .dgwt-wcas-premium-only--trigger');
80
-
81
- $handler.on('click', function (e) {
82
  triggerModal(e);
83
  });
84
 
76
  ?>
77
  <script>
78
  (function ($) {
79
+ $(document).on('click', '.dgwt-wcas-premium-only label, .dgwt-wcas-premium-only input, .dgwt-wcas-premium-only button, .dgwt-wcas-premium-only--trigger', function (e) {
 
 
80
  triggerModal(e);
81
  });
82
 
includes/Admin/RegenerateImages.php CHANGED
@@ -19,8 +19,7 @@ class RegenerateImages {
19
 
20
  public function init() {
21
 
22
- $displayImages = DGWT_WCAS()->settings->getOption( 'show_product_image' ) === 'on';
23
-
24
  $regenerated = get_option( self::ALREADY_REGENERATED_OPT_KEY );
25
 
26
  add_action( 'wp_ajax_' . self::DISMISS_AJAX_ACTION, array( $this, 'dismissNotice' ) );
19
 
20
  public function init() {
21
 
22
+ $displayImages = DGWT_WCAS()->settings->getOption( 'show_product_image' ) === 'on' || DGWT_WCAS()->settings->getOption( 'show_categories_images' );
 
23
  $regenerated = get_option( self::ALREADY_REGENERATED_OPT_KEY );
24
 
25
  add_action( 'wp_ajax_' . self::DISMISS_AJAX_ACTION, array( $this, 'dismissNotice' ) );
includes/Admin/SettingsAPI.php CHANGED
@@ -174,6 +174,7 @@ class SettingsAPI
174
  'class' => ( isset( $option['class'] ) ? $option['class'] : '' ),
175
  'sanitize_callback' => ( isset( $option['sanitize_callback'] ) ? $option['sanitize_callback'] : '' ),
176
  'type' => $type,
 
177
  );
178
  add_settings_field(
179
  "{$this->name}[" . $option['name'] . ']',
@@ -279,8 +280,19 @@ class SettingsAPI
279
  $args['std'],
280
  $args
281
  );
 
 
 
 
 
 
282
  $html = '<fieldset>';
283
- $html .= sprintf( '<label for="%1$s[%2$s]">', $this->name, $args['id'] );
 
 
 
 
 
284
  $html .= sprintf( '<input type="hidden" name="%1$s[%2$s]" value="off" />', $this->name, $args['id'] );
285
  $html .= sprintf(
286
  '<input type="checkbox" class="checkbox" id="%1$s[%2$s]" name="%1$s[%2$s]" value="on" %3$s />',
@@ -843,7 +855,7 @@ class SettingsAPI
843
  }
844
  $('.<?php
845
  echo $this->prefix ;
846
- ?>nav-tab-wrapper a:not(.js-nav-tab-minor)').click(function (evt) {
847
 
848
  if (typeof (localStorage) != 'undefined') {
849
  localStorage.setItem('<?php
@@ -897,7 +909,7 @@ class SettingsAPI
897
  });
898
  </script>
899
 
900
- <style type="text/css">
901
  /** WordPress 3.8 Fix **/
902
  .form-table th {
903
  padding: 20px 10px;
174
  'class' => ( isset( $option['class'] ) ? $option['class'] : '' ),
175
  'sanitize_callback' => ( isset( $option['sanitize_callback'] ) ? $option['sanitize_callback'] : '' ),
176
  'type' => $type,
177
+ 'move_dest' => ( isset( $option['move_dest'] ) ? $option['move_dest'] : '' ),
178
  );
179
  add_settings_field(
180
  "{$this->name}[" . $option['name'] . ']',
280
  $args['std'],
281
  $args
282
  );
283
+ $moveDest = ( empty($args['move_dest']) ? '' : sprintf(
284
+ 'data-move-dest="%1$s[%2$s]" class="%3$s"',
285
+ $this->name,
286
+ $args['move_dest'],
287
+ 'js-dgwt-wcas-move-option'
288
+ ) );
289
  $html = '<fieldset>';
290
+ $html .= sprintf(
291
+ '<label %3$s for="%1$s[%2$s]">',
292
+ $this->name,
293
+ $args['id'],
294
+ $moveDest
295
+ );
296
  $html .= sprintf( '<input type="hidden" name="%1$s[%2$s]" value="off" />', $this->name, $args['id'] );
297
  $html .= sprintf(
298
  '<input type="checkbox" class="checkbox" id="%1$s[%2$s]" name="%1$s[%2$s]" value="on" %3$s />',
855
  }
856
  $('.<?php
857
  echo $this->prefix ;
858
+ ?>nav-tab-wrapper a:not(.js-nav-tab-minor)').on('click', function (evt) {
859
 
860
  if (typeof (localStorage) != 'undefined') {
861
  localStorage.setItem('<?php
909
  });
910
  </script>
911
 
912
+ <style>
913
  /** WordPress 3.8 Fix **/
914
  .form-table th {
915
  padding: 20px 10px;
includes/Admin/Troubleshooting.php CHANGED
@@ -14,6 +14,8 @@ class Troubleshooting
14
  {
15
  const SECTION_ID = 'dgwt_wcas_troubleshooting' ;
16
  const TRANSIENT_RESULTS_KEY = 'dgwt_wcas_troubleshooting_async_results' ;
 
 
17
  const ASYNC_TEST_NONCE = 'troubleshooting-async-test' ;
18
  const RESET_ASYNC_TESTS_NONCE = 'troubleshooting-reset-async-tests' ;
19
  public function __construct()
@@ -126,6 +128,8 @@ class Troubleshooting
126
  'results_async' => array(),
127
  ),
128
  );
 
 
129
  $asyncTestsResults = get_transient( self::TRANSIENT_RESULTS_KEY );
130
 
131
  if ( !empty($asyncTestsResults) && is_array( $asyncTestsResults ) ) {
@@ -274,7 +278,7 @@ class Troubleshooting
274
 
275
  if ( $markAsCritical ) {
276
  $result['status'] = 'critical';
277
- $linkToDocs = 'https://fibosearch.com/documentation/troubleshooting/the-indexer-was-stuck/';
278
  $linkToWpHealth = admin_url( 'site-health.php' );
279
  $result['label'] = __( 'Your site could not complete a loopback request', 'ajax-search-for-woocommerce' );
280
  if ( !dgoraAsfwFs()->is_premium() ) {
14
  {
15
  const SECTION_ID = 'dgwt_wcas_troubleshooting' ;
16
  const TRANSIENT_RESULTS_KEY = 'dgwt_wcas_troubleshooting_async_results' ;
17
+ const TRANSIENT_TEST_KEY = 'dgwt_wcas_test_transients' ;
18
+ const TRANSIENT_TEST_KEY2 = 'dgwt_wcas_test_transients2' ;
19
  const ASYNC_TEST_NONCE = 'troubleshooting-async-test' ;
20
  const RESET_ASYNC_TESTS_NONCE = 'troubleshooting-reset-async-tests' ;
21
  public function __construct()
128
  'results_async' => array(),
129
  ),
130
  );
131
+ set_transient( self::TRANSIENT_TEST_KEY, '1', HOUR_IN_SECONDS );
132
+ set_transient( self::TRANSIENT_TEST_KEY2, '1', 1 );
133
  $asyncTestsResults = get_transient( self::TRANSIENT_RESULTS_KEY );
134
 
135
  if ( !empty($asyncTestsResults) && is_array( $asyncTestsResults ) ) {
278
 
279
  if ( $markAsCritical ) {
280
  $result['status'] = 'critical';
281
+ $linkToDocs = 'https://fibosearch.com/documentation/troubleshooting/the-search-index-could-not-be-built/';
282
  $linkToWpHealth = admin_url( 'site-health.php' );
283
  $result['label'] = __( 'Your site could not complete a loopback request', 'ajax-search-for-woocommerce' );
284
  if ( !dgoraAsfwFs()->is_premium() ) {
includes/Engines/WordPressNative/DetailsBox.php CHANGED
@@ -231,7 +231,9 @@ class DetailsBox
231
  while ( $products->have_posts() ) {
232
  $products->the_post();
233
  $product = new Product( get_the_ID() );
234
- include DGWT_WCAS_DIR . 'partials/details-panel/term-product.php';
 
 
235
  }
236
  echo '</div>' ;
237
 
231
  while ( $products->have_posts() ) {
232
  $products->the_post();
233
  $product = new Product( get_the_ID() );
234
+ if ( $product->isValid() ) {
235
+ include DGWT_WCAS_DIR . 'partials/details-panel/term-product.php';
236
+ }
237
  }
238
  echo '</div>' ;
239
 
includes/Engines/WordPressNative/Search.php CHANGED
@@ -403,21 +403,22 @@ class Search
403
  $args = array(
404
  'taxonomy' => 'product_cat',
405
  );
406
- $product_categories = get_terms( 'product_cat', apply_filters( 'dgwt/wcas/search/product_cat/args', $args ) );
 
407
  // Compare keyword and term name
408
  $i = 0;
409
- foreach ( $product_categories as $cat ) {
410
 
411
  if ( $i < $limit ) {
412
- $cat_name = html_entity_decode( $cat->name );
413
- $pos = strpos( mb_strtolower( $cat_name ), mb_strtolower( $keyword ) );
414
 
415
  if ( $pos !== false ) {
416
  $termLang = Multilingual::getTermLang( $cat->term_id, 'product_cat' );
417
  $results[$i] = array(
418
  'term_id' => $cat->term_id,
419
  'taxonomy' => 'product_cat',
420
- 'value' => preg_replace( sprintf( "/(%s)/", $keyword ), "\$1", $cat_name ),
421
  'url' => get_term_link( $cat, 'product_cat' ),
422
  'breadcrumbs' => Helpers::getTermBreadcrumbs(
423
  $cat->term_id,
@@ -455,20 +456,21 @@ class Search
455
  $args = array(
456
  'taxonomy' => 'product_tag',
457
  );
458
- $product_tags = get_terms( 'product_tag', apply_filters( 'dgwt/wcas/search/product_tag/args', $args ) );
 
459
  // Compare keyword and term name
460
  $i = 0;
461
- foreach ( $product_tags as $tag ) {
462
 
463
  if ( $i < $limit ) {
464
- $tag_name = html_entity_decode( $tag->name );
465
- $pos = strpos( mb_strtolower( $tag_name ), mb_strtolower( $keyword ) );
466
 
467
  if ( $pos !== false ) {
468
  $results[$i] = array(
469
  'term_id' => $tag->term_id,
470
  'taxonomy' => 'product_tag',
471
- 'value' => preg_replace( sprintf( "/(%s)/", $keyword ), "\$1", $tag_name ),
472
  'url' => get_term_link( $tag, 'product_tag' ),
473
  'parents' => '',
474
  'type' => 'taxonomy',
403
  $args = array(
404
  'taxonomy' => 'product_cat',
405
  );
406
+ $productCategories = get_terms( 'product_cat', apply_filters( 'dgwt/wcas/search/product_cat/args', $args ) );
407
+ $keywordUnslashed = wp_unslash( $keyword );
408
  // Compare keyword and term name
409
  $i = 0;
410
+ foreach ( $productCategories as $cat ) {
411
 
412
  if ( $i < $limit ) {
413
+ $catName = html_entity_decode( $cat->name );
414
+ $pos = strpos( mb_strtolower( $catName ), mb_strtolower( $keywordUnslashed ) );
415
 
416
  if ( $pos !== false ) {
417
  $termLang = Multilingual::getTermLang( $cat->term_id, 'product_cat' );
418
  $results[$i] = array(
419
  'term_id' => $cat->term_id,
420
  'taxonomy' => 'product_cat',
421
+ 'value' => $catName,
422
  'url' => get_term_link( $cat, 'product_cat' ),
423
  'breadcrumbs' => Helpers::getTermBreadcrumbs(
424
  $cat->term_id,
456
  $args = array(
457
  'taxonomy' => 'product_tag',
458
  );
459
+ $productTags = get_terms( 'product_tag', apply_filters( 'dgwt/wcas/search/product_tag/args', $args ) );
460
+ $keywordUnslashed = wp_unslash( $keyword );
461
  // Compare keyword and term name
462
  $i = 0;
463
+ foreach ( $productTags as $tag ) {
464
 
465
  if ( $i < $limit ) {
466
+ $tagName = html_entity_decode( $tag->name );
467
+ $pos = strpos( mb_strtolower( $tagName ), mb_strtolower( $keywordUnslashed ) );
468
 
469
  if ( $pos !== false ) {
470
  $results[$i] = array(
471
  'term_id' => $tag->term_id,
472
  'taxonomy' => 'product_tag',
473
+ 'value' => $tagName,
474
  'url' => get_term_link( $tag, 'product_tag' ),
475
  'parents' => '',
476
  'type' => 'taxonomy',
includes/Helpers.php CHANGED
@@ -578,6 +578,24 @@ class Helpers
578
  return ( $a['order'] < $b['order'] ? -1 : 1 );
579
  }
580
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
581
  /**
582
  * Get taxonomy parents
583
  *
@@ -1039,7 +1057,7 @@ class Helpers
1039
  if ( !$query->get( 'dgwt_wcas', false ) ) {
1040
  return $posts;
1041
  }
1042
- $query->set( 's', $query->get( 'dgwt_wcas', '' ) );
1043
  return $posts;
1044
  }
1045
 
578
  return ( $a['order'] < $b['order'] ? -1 : 1 );
579
  }
580
 
581
+ /**
582
+ * Sort from the longest to the shortest
583
+ *
584
+ * @param $a
585
+ * @param $b
586
+ *
587
+ * @return int
588
+ */
589
+ public static function sortFromLongest( $a, $b )
590
+ {
591
+ $la = mb_strlen( $a );
592
+ $lb = mb_strlen( $b );
593
+ if ( $la == $lb ) {
594
+ return strcmp( $b, $a );
595
+ }
596
+ return $lb - $la;
597
+ }
598
+
599
  /**
600
  * Get taxonomy parents
601
  *
1057
  if ( !$query->get( 'dgwt_wcas', false ) ) {
1058
  return $posts;
1059
  }
1060
+ $query->set( 's', wp_unslash( $query->get( 'dgwt_wcas', '' ) ) );
1061
  return $posts;
1062
  }
1063
 
includes/Integrations/Brands.php CHANGED
@@ -3,6 +3,7 @@
3
  namespace DgoraWcas\Integrations;
4
 
5
  use DgoraWcas\Helpers;
 
6
 
7
  // Exit if accessed directly
8
  if ( ! defined( 'ABSPATH' ) ) {
@@ -52,6 +53,8 @@ class Brands {
52
  $this->addSettings();
53
 
54
  add_filter( 'dgwt/wcas/suggestion_details/taxonomy/headline', array( $this, 'rebuildDetailsHeader' ), 10, 4 );
 
 
55
  }
56
 
57
  /**
@@ -170,22 +173,21 @@ class Brands {
170
  if ( $this->hasBrands() ) {
171
  add_filter( 'dgwt/wcas/settings/section=search', function ( $settingsScope ) {
172
 
173
- $desc = '';
174
 
175
  $pluginName = $this->getPluginName();
176
 
177
- if(!empty($pluginName)){
178
  $pluginInfo = $pluginName . ' v' . $this->getPluginVersion();
179
- $desc = sprintf( __( 'based on the plugin %s', 'ajax-search-for-woocommerce' ), $pluginInfo );
180
  }
181
 
182
  $settingsScope[220] = array(
183
  'name' => 'search_in_brands',
184
- 'label' => __( 'Search in brands', 'ajax-search-for-woocommerce' ),
185
  'class' => 'dgwt-wcas-premium-only',
186
  'type' => 'checkbox',
187
  'default' => 'off',
188
- 'desc' => $desc
189
  );
190
 
191
  return $settingsScope;
@@ -193,28 +195,37 @@ class Brands {
193
 
194
  add_filter( 'dgwt/wcas/settings/section=autocomplete', function ( $settingsScope ) {
195
 
196
- $desc = '';
197
 
198
  $pluginName = $this->getPluginName();
199
 
200
- if(!empty($pluginName)){
201
  $pluginInfo = $pluginName . ' v' . $this->getPluginVersion();
202
- $desc = sprintf( __( 'based on the plugin %s', 'ajax-search-for-woocommerce' ), $pluginInfo );
203
  }
204
 
205
  $settingsScope[1260] = array(
206
  'name' => 'show_matching_brands',
207
- 'label' => __( 'Show brands', 'ajax-search-for-woocommerce' ),
208
- 'class' => 'dgwt-wcas-premium-only',
209
  'type' => 'checkbox',
210
  'default' => 'off',
211
- 'desc' => $desc
212
  );
213
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  return $settingsScope;
215
  } );
216
-
217
-
218
  }
219
  }
220
 
@@ -244,4 +255,80 @@ class Brands {
244
 
245
  }
246
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  }
3
  namespace DgoraWcas\Integrations;
4
 
5
  use DgoraWcas\Helpers;
6
+ use DgoraWcas\Term;
7
 
8
  // Exit if accessed directly
9
  if ( ! defined( 'ABSPATH' ) ) {
53
  $this->addSettings();
54
 
55
  add_filter( 'dgwt/wcas/suggestion_details/taxonomy/headline', array( $this, 'rebuildDetailsHeader' ), 10, 4 );
56
+ add_filter( 'dgwt/wcas/taxonomies_with_images', array( $this, 'taxonomiesWithImages' ) );
57
+ add_filter( 'dgwt/wcas/term/thumbnail_src', array( $this, 'termThumbnailSrc' ), 10, 4 );
58
  }
59
 
60
  /**
173
  if ( $this->hasBrands() ) {
174
  add_filter( 'dgwt/wcas/settings/section=search', function ( $settingsScope ) {
175
 
176
+ $label = '';
177
 
178
  $pluginName = $this->getPluginName();
179
 
180
+ if ( ! empty( $pluginName ) ) {
181
  $pluginInfo = $pluginName . ' v' . $this->getPluginVersion();
182
+ $label = ' ' . Helpers::createQuestionMark( 'search-in-brands', sprintf( __( 'Based on the plugin %s', 'ajax-search-for-woocommerce' ), $pluginInfo ) );
183
  }
184
 
185
  $settingsScope[220] = array(
186
  'name' => 'search_in_brands',
187
+ 'label' => __( 'Search in brands', 'ajax-search-for-woocommerce' ) . $label,
188
  'class' => 'dgwt-wcas-premium-only',
189
  'type' => 'checkbox',
190
  'default' => 'off',
 
191
  );
192
 
193
  return $settingsScope;
195
 
196
  add_filter( 'dgwt/wcas/settings/section=autocomplete', function ( $settingsScope ) {
197
 
198
+ $label = '';
199
 
200
  $pluginName = $this->getPluginName();
201
 
202
+ if ( ! empty( $pluginName ) ) {
203
  $pluginInfo = $pluginName . ' v' . $this->getPluginVersion();
204
+ $label = ' ' . Helpers::createQuestionMark( 'show-matching-brands', sprintf( __( 'Based on the plugin %s', 'ajax-search-for-woocommerce' ), $pluginInfo ) );
205
  }
206
 
207
  $settingsScope[1260] = array(
208
  'name' => 'show_matching_brands',
209
+ 'label' => __( 'Show brands', 'ajax-search-for-woocommerce' ) . $label,
210
+ 'class' => 'dgwt-wcas-premium-only js-dgwt-wcas-options-toggle-sibling',
211
  'type' => 'checkbox',
212
  'default' => 'off',
 
213
  );
214
 
215
+ if ( $this->doesPluginSupportImages() ) {
216
+ $settingsScope[1270] = array(
217
+ 'name' => 'show_brands_images',
218
+ 'label' => __( 'show images', 'ajax-search-for-woocommerce' ),
219
+ 'class' => 'dgwt-wcas-premium-only',
220
+ 'type' => 'checkbox',
221
+ 'default' => 'off',
222
+ 'desc' => __( 'show images', 'ajax-search-for-woocommerce' ),
223
+ 'move_dest' => 'show_matching_brands',
224
+ );
225
+ }
226
+
227
  return $settingsScope;
228
  } );
 
 
229
  }
230
  }
231
 
255
 
256
  }
257
 
258
+ /**
259
+ * Add brand to the list of image supporting taxonomies
260
+ *
261
+ * @param array $taxonomies
262
+ *
263
+ * @return array
264
+ */
265
+ public function taxonomiesWithImages( $taxonomies ) {
266
+ if ( $this->hasBrands() && $this->doesPluginSupportImages() ) {
267
+ $taxonomies[] = $this->getBrandTaxonomy();
268
+ }
269
+
270
+ return $taxonomies;
271
+ }
272
+
273
+ /**
274
+ * @param string $src
275
+ * @param int $termID
276
+ * @param string $size
277
+ * @param Term $term
278
+ */
279
+ public function termThumbnailSrc( $src, $termID, $size, $term ) {
280
+ /**
281
+ * Notes:
282
+ * - "YITH WooCommerce Brands uses 'thumbnail_id' meta, so we don't need to overwrite URL in this filter
283
+ * - "WooCommerce Brands" uses 'thumbnail_id' meta, so we don't need to overwrite URL in this filter
284
+ */
285
+ if ( $this->hasBrands() && $this->doesPluginSupportImages() ) {
286
+ switch ( $this->pluginSlug ) {
287
+ case 'perfect-woocommerce-brands/main.php':
288
+ case 'perfect-woocommerce-brands/perfect-woocommerce-brands.php':
289
+ $imageID = get_term_meta( $termID, 'pwb_brand_image', true );
290
+ if ( ! empty( $imageID ) ) {
291
+ $imageSrc = wp_get_attachment_image_src( $imageID, $size );
292
+
293
+ if ( is_array( $imageSrc ) && ! empty( $imageSrc[0] ) ) {
294
+ $src = $imageSrc[0];
295
+ }
296
+ }
297
+ break;
298
+ case 'brands-for-woocommerce/woocommerce-brand.php':
299
+ $url = get_term_meta( $termID, 'brand_image_url', true );
300
+ $src = empty( $url ) ? $src : $url;
301
+ break;
302
+ }
303
+ }
304
+
305
+ return $src;
306
+ }
307
+
308
+ /**
309
+ * Check if a current brand plugin does support images
310
+ * @return bool
311
+ */
312
+ private function doesPluginSupportImages() {
313
+ $result = false;
314
+
315
+ switch ( $this->pluginSlug ) {
316
+ case 'woocommerce-brands/woocommerce-brands.php':
317
+ $result = true;
318
+ break;
319
+ case 'yith-woocommerce-brands-add-on-premium/init.php':
320
+ case 'yith-woocommerce-brands-add-on/init.php':
321
+ $result = true;
322
+ break;
323
+ case 'perfect-woocommerce-brands/main.php':
324
+ case 'perfect-woocommerce-brands/perfect-woocommerce-brands.php':
325
+ $result = true;
326
+ break;
327
+ case 'brands-for-woocommerce/woocommerce-brand.php':
328
+ $result = true;
329
+ break;
330
+ }
331
+
332
+ return apply_filters( 'dgwt/wcas/brands/image_support', $result );
333
+ }
334
  }
includes/Integrations/Plugins/WooCommerce/WooCommerce.php CHANGED
@@ -27,6 +27,34 @@ class WooCommerce {
27
 
28
  add_filter( 'woocommerce_get_filtered_term_product_counts_query', array( $this, 'filter_counts_query' ) );
29
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }
31
 
32
  /**
27
 
28
  add_filter( 'woocommerce_get_filtered_term_product_counts_query', array( $this, 'filter_counts_query' ) );
29
  }
30
+
31
+ $this->syncWithOutOfStockVisibility();
32
+ }
33
+
34
+ /**
35
+ * Sync with WooCommerce >> Settings >> Products >> Inventory >> "Out of stock visibility"
36
+ */
37
+ private function syncWithOutOfStockVisibility() {
38
+ if ( get_option( 'woocommerce_hide_out_of_stock_items' ) === 'yes' ) {
39
+ // Hide "Exclude “out of stock” products" option
40
+ add_filter( 'dgwt/wcas/settings', function ( $settingsFields ) {
41
+ if ( is_array( $settingsFields['dgwt_wcas_search'] ) ) {
42
+ foreach ( $settingsFields['dgwt_wcas_search'] as $index => $field ) {
43
+ if ( $field['name'] === 'exclude_out_of_stock' ) {
44
+ unset( $settingsFields['dgwt_wcas_search'][ $index ] );
45
+ break;
46
+ }
47
+ }
48
+ }
49
+
50
+ return $settingsFields;
51
+ }, PHP_INT_MAX - 10 );
52
+
53
+ // Force value of "Exclude “out of stock” products" option as "on"
54
+ add_filter( 'dgwt/wcas/settings/load_value/key=exclude_out_of_stock', function ( $value ) {
55
+ return 'on';
56
+ }, PHP_INT_MAX - 10 );
57
+ }
58
  }
59
 
60
  /**
includes/Integrations/Themes/Goya/Goya.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DgoraWcas\Integrations\Themes\Goya;
4
+
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ class Goya extends ThemeIntegration {
13
+
14
+ public function __construct() {
15
+ $this->themeSlug = 'goya';
16
+ $this->themeName = 'Goya';
17
+
18
+ parent::__construct();
19
+ }
20
+ }
includes/Integrations/Themes/Shopical/Shopical.php CHANGED
@@ -2,115 +2,19 @@
2
 
3
  namespace DgoraWcas\Integrations\Themes\Shopical;
4
 
5
- use DgoraWcas\Helpers;
6
 
7
  // Exit if accessed directly
8
  if ( ! defined( 'ABSPATH' ) ) {
9
  exit;
10
  }
11
 
12
- class Shopical {
13
-
14
- private $themeSlug = 'shopical';
15
-
16
- private $themeName = 'Shopical';
17
 
18
  public function __construct() {
19
- $this->maybeOverwriteSearch();
20
-
21
- add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
22
- }
23
-
24
- /**
25
- * Add settings
26
- *
27
- * @param array $settings
28
- *
29
- * @return array
30
- */
31
- public function registerSettings( $settings ) {
32
- $key = 'dgwt_wcas_basic';
33
-
34
- $settings[ $key ][10] = array(
35
- 'name' => $this->themeSlug . '_main_head',
36
- 'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
37
- 'type' => 'head',
38
- 'class' => 'dgwt-wcas-sgs-header'
39
- );
40
-
41
- $settings[ $key ][52] = array(
42
- 'name' => $this->themeSlug . '_settings_head',
43
- 'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
44
- 'type' => 'desc',
45
- 'desc' => Helpers::embeddingInThemeHtml(),
46
- 'class' => 'dgwt-wcas-sgs-themes-label',
47
- );
48
-
49
- $img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
50
- if ( ! empty( $img ) ) {
51
- $settings[ $key ][52]['label'] = '<img src="' . $img . '">';
52
- }
53
-
54
- $settings[ $key ][55] = array(
55
- 'name' => $this->themeSlug . '_replace_search',
56
- 'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
57
- 'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
58
- 'type' => 'checkbox',
59
- 'default' => 'off',
60
- );
61
-
62
- $settings[ $key ][90] = array(
63
- 'name' => $this->themeSlug . '_othersways__head',
64
- 'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
65
- 'type' => 'head',
66
- 'class' => 'dgwt-wcas-sgs-header'
67
- );
68
-
69
- return $settings;
70
- }
71
-
72
- /**
73
- * Check if can replace the native search form with the FiboSearch form.
74
- *
75
- * @return bool
76
- */
77
- private function canReplaceSearch() {
78
- $canIntegrate = false;
79
-
80
- if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
81
- $canIntegrate = true;
82
- }
83
-
84
- return $canIntegrate;
85
- }
86
-
87
- /**
88
- * Overwrite search
89
- *
90
- * @return void
91
- */
92
- private function maybeOverwriteSearch() {
93
- if ( $this->canReplaceSearch() ) {
94
- $this->applyCSS();
95
-
96
- require_once DGWT_WCAS_DIR . 'partials/themes/shopical.php';
97
- }
98
- }
99
 
100
- /**
101
- * Apply custom CSS
102
- *
103
- * @return void
104
- */
105
- private function applyCSS() {
106
- add_action( 'wp_head', function () {
107
- ?>
108
- <style>
109
- .dgwt-wcas-overlay-mobile .dgwt-wcas-search-form {
110
- padding: 0;
111
- }
112
- </style>
113
- <?php
114
- } );
115
  }
116
  }
2
 
3
  namespace DgoraWcas\Integrations\Themes\Shopical;
4
 
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
 
7
  // Exit if accessed directly
8
  if ( ! defined( 'ABSPATH' ) ) {
9
  exit;
10
  }
11
 
12
+ class Shopical extends ThemeIntegration {
 
 
 
 
13
 
14
  public function __construct() {
15
+ $this->themeSlug = 'shopical';
16
+ $this->themeName = 'Shopical';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ parent::__construct();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
  }
includes/Integrations/Themes/ShopicalPro/ShopicalPro.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DgoraWcas\Integrations\Themes\ShopicalPro;
4
+
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ class ShopicalPro extends ThemeIntegration {
13
+
14
+ public function __construct() {
15
+ $this->themeSlug = 'shopical-pro';
16
+ $this->themeName = 'Shopical Pro';
17
+
18
+ parent::__construct();
19
+ }
20
+
21
+ /**
22
+ * Overwrite search
23
+ *
24
+ * @return void
25
+ */
26
+ protected function maybeOverwriteSearch() {
27
+ // We load partial from free version of theme
28
+ $partialPath = DGWT_WCAS_DIR . 'partials/themes/shopical.php';
29
+ if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
30
+ require_once( $partialPath );
31
+ }
32
+ }
33
+ }
includes/Integrations/Themes/ThemesCompatibility.php CHANGED
@@ -47,119 +47,135 @@ class ThemesCompatibility {
47
  */
48
  public function supportedThemes() {
49
  return array(
50
- 'storefront' => array(
51
  'slug' => 'storefront',
52
  'name' => 'Storefront',
53
  ),
54
- 'flatsome' => array(
55
  'slug' => 'flatsome',
56
  'name' => 'Flatsome',
57
  ),
58
- 'astra' => array(
59
  'slug' => 'astra',
60
  'name' => 'Astra',
61
  ),
62
- 'thegem' => array(
63
  'slug' => 'thegem',
64
  'name' => 'TheGem',
65
  ),
66
- 'impreza' => array(
67
  'slug' => 'impreza',
68
  'name' => 'Impreza',
69
  ),
70
- 'woodmart' => array(
71
  'slug' => 'woodmart',
72
  'name' => 'Woodmart',
73
  ),
74
- 'enfold' => array(
75
  'slug' => 'enfold',
76
  'name' => 'Enfold',
77
  ),
78
- 'shopkeeper' => array(
79
  'slug' => 'shopkeeper',
80
  'name' => 'Shopkeeper',
81
  ),
82
- 'the7' => array(
83
  'slug' => 'the7',
84
  'name' => 'The7',
85
  ),
86
- 'dt-the7' => array(
87
  'slug' => 'dt-the7',
88
  'name' => 'The7',
89
  ),
90
- 'avada' => array(
91
  'slug' => 'avada',
92
  'name' => 'Avada',
93
  ),
94
- 'shop-isle' => array(
95
  'slug' => 'shop-isle',
96
  'className' => 'ShopIsle',
97
  'name' => 'Shop Isle',
98
  ),
99
- 'shopical' => array(
100
  'slug' => 'shopical',
101
  'name' => 'Shopical',
102
  ),
103
- 'ekommart' => array(
 
 
 
 
104
  'slug' => 'ekommart',
105
  'name' => 'Ekommart',
106
  ),
107
- 'savoy' => array(
108
  'slug' => 'savoy',
109
  'name' => 'Savoy',
110
  ),
111
- 'sober' => array(
112
  'slug' => 'sober',
113
  'name' => 'Sober',
114
  ),
115
- 'bridge' => array(
116
  'slug' => 'bridge',
117
  'name' => 'Bridge',
118
  ),
119
- 'divi' => array(
120
  'slug' => 'divi',
121
  'name' => 'Divi',
122
  ),
123
- 'block-shop' => array(
124
  'slug' => 'block-shop',
125
  'name' => 'BlockShop',
126
  ),
127
- 'dfd-ronneby' => array(
128
  'slug' => 'dfd-ronneby',
129
  'name' => 'DFDRonneby',
130
  ),
131
- 'restoration' => array(
132
  'slug' => 'restoration',
133
  'name' => 'Restoration',
134
  ),
135
- 'salient' => array(
136
  'slug' => 'salient',
137
  'name' => 'Salient',
138
  ),
139
- 'konte' => array(
140
  'slug' => 'konte',
141
  'name' => 'Konte',
142
  ),
143
- 'rehub-theme' => array(
144
  'slug' => 'rehub-theme',
145
  'name' => 'Rehub',
146
  ),
147
- 'supro' => array(
148
  'slug' => 'supro',
149
  'name' => 'Supro',
150
  ),
151
- 'open-shop' => array(
152
  'slug' => 'open-shop',
153
  'name' => 'OpenShop',
154
  ),
155
- 'ciyashop' => array(
156
  'slug' => 'ciyashop',
157
  'name' => 'CiyaShop',
158
  ),
159
- 'bigcart' => array(
160
  'slug' => 'bigcart',
161
  'name' => 'BigCart',
162
  ),
 
 
 
 
 
 
 
 
 
 
 
 
163
  );
164
  }
165
 
47
  */
48
  public function supportedThemes() {
49
  return array(
50
+ 'storefront' => array(
51
  'slug' => 'storefront',
52
  'name' => 'Storefront',
53
  ),
54
+ 'flatsome' => array(
55
  'slug' => 'flatsome',
56
  'name' => 'Flatsome',
57
  ),
58
+ 'astra' => array(
59
  'slug' => 'astra',
60
  'name' => 'Astra',
61
  ),
62
+ 'thegem' => array(
63
  'slug' => 'thegem',
64
  'name' => 'TheGem',
65
  ),
66
+ 'impreza' => array(
67
  'slug' => 'impreza',
68
  'name' => 'Impreza',
69
  ),
70
+ 'woodmart' => array(
71
  'slug' => 'woodmart',
72
  'name' => 'Woodmart',
73
  ),
74
+ 'enfold' => array(
75
  'slug' => 'enfold',
76
  'name' => 'Enfold',
77
  ),
78
+ 'shopkeeper' => array(
79
  'slug' => 'shopkeeper',
80
  'name' => 'Shopkeeper',
81
  ),
82
+ 'the7' => array(
83
  'slug' => 'the7',
84
  'name' => 'The7',
85
  ),
86
+ 'dt-the7' => array(
87
  'slug' => 'dt-the7',
88
  'name' => 'The7',
89
  ),
90
+ 'avada' => array(
91
  'slug' => 'avada',
92
  'name' => 'Avada',
93
  ),
94
+ 'shop-isle' => array(
95
  'slug' => 'shop-isle',
96
  'className' => 'ShopIsle',
97
  'name' => 'Shop Isle',
98
  ),
99
+ 'shopical' => array(
100
  'slug' => 'shopical',
101
  'name' => 'Shopical',
102
  ),
103
+ 'shopical-pro' => array(
104
+ 'slug' => 'shopical-pro',
105
+ 'name' => 'ShopicalPro',
106
+ ),
107
+ 'ekommart' => array(
108
  'slug' => 'ekommart',
109
  'name' => 'Ekommart',
110
  ),
111
+ 'savoy' => array(
112
  'slug' => 'savoy',
113
  'name' => 'Savoy',
114
  ),
115
+ 'sober' => array(
116
  'slug' => 'sober',
117
  'name' => 'Sober',
118
  ),
119
+ 'bridge' => array(
120
  'slug' => 'bridge',
121
  'name' => 'Bridge',
122
  ),
123
+ 'divi' => array(
124
  'slug' => 'divi',
125
  'name' => 'Divi',
126
  ),
127
+ 'block-shop' => array(
128
  'slug' => 'block-shop',
129
  'name' => 'BlockShop',
130
  ),
131
+ 'dfd-ronneby' => array(
132
  'slug' => 'dfd-ronneby',
133
  'name' => 'DFDRonneby',
134
  ),
135
+ 'restoration' => array(
136
  'slug' => 'restoration',
137
  'name' => 'Restoration',
138
  ),
139
+ 'salient' => array(
140
  'slug' => 'salient',
141
  'name' => 'Salient',
142
  ),
143
+ 'konte' => array(
144
  'slug' => 'konte',
145
  'name' => 'Konte',
146
  ),
147
+ 'rehub-theme' => array(
148
  'slug' => 'rehub-theme',
149
  'name' => 'Rehub',
150
  ),
151
+ 'supro' => array(
152
  'slug' => 'supro',
153
  'name' => 'Supro',
154
  ),
155
+ 'open-shop' => array(
156
  'slug' => 'open-shop',
157
  'name' => 'OpenShop',
158
  ),
159
+ 'ciyashop' => array(
160
  'slug' => 'ciyashop',
161
  'name' => 'CiyaShop',
162
  ),
163
+ 'bigcart' => array(
164
  'slug' => 'bigcart',
165
  'name' => 'BigCart',
166
  ),
167
+ 'top-store-pro' => array(
168
+ 'slug' => 'top-store-pro',
169
+ 'name' => 'TopStorePro',
170
+ ),
171
+ 'top-store' => array(
172
+ 'slug' => 'top-store',
173
+ 'name' => 'TopStore',
174
+ ),
175
+ 'goya' => array(
176
+ 'slug' => 'goya',
177
+ 'name' => 'Goya',
178
+ ),
179
  );
180
  }
181
 
includes/Integrations/Themes/TopStore/TopStore.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DgoraWcas\Integrations\Themes\TopStore;
4
+
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ class TopStore extends ThemeIntegration {
13
+
14
+ public function __construct() {
15
+ $this->themeSlug = 'top-store';
16
+ $this->themeName = 'Top Store';
17
+
18
+ parent::__construct();
19
+ }
20
+
21
+ /**
22
+ * Overwrite search
23
+ *
24
+ * @return void
25
+ */
26
+ protected function maybeOverwriteSearch() {
27
+ // We load partial from Pro version
28
+ $partialPath = DGWT_WCAS_DIR . 'partials/themes/' . $this->themeSlug . '-pro.php';
29
+ if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
30
+ require_once( $partialPath );
31
+ }
32
+ }
33
+ }
includes/Integrations/Themes/TopStorePro/TopStorePro.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DgoraWcas\Integrations\Themes\TopStorePro;
4
+
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ class TopStorePro extends ThemeIntegration {
13
+
14
+ public function __construct() {
15
+ $this->themeSlug = 'top-store-pro';
16
+ $this->themeName = 'Top Store Pro';
17
+
18
+ parent::__construct();
19
+ }
20
+ }
includes/Personalization.php CHANGED
@@ -42,7 +42,7 @@ class Personalization {
42
 
43
  ob_start();
44
  ?>
45
- <style type="text/css">
46
 
47
  .dgwt-wcas-ico-magnifier,
48
  .dgwt-wcas-ico-magnifier-handler {
42
 
43
  ob_start();
44
  ?>
45
+ <style>
46
 
47
  .dgwt-wcas-ico-magnifier,
48
  .dgwt-wcas-ico-magnifier-handler {
includes/ProductVariation.php CHANGED
@@ -2,120 +2,122 @@
2
 
3
  namespace DgoraWcas;
4
 
5
- class ProductVariation extends Product {
6
- /**
7
- * @var bool|false|\WC_Product_Variation|null
8
- */
9
- protected $wcProduct = null;
10
-
11
- public function __construct( $product ) {
12
- if ( ! empty( $product ) && is_object( $product ) && is_a( $product, 'WC_Product_Variation' ) ) {
13
- $this->productID = $product->get_id();
14
- $this->wcProduct = $product;
15
- }
16
-
17
- if ( ! empty( $product ) && is_object( $product ) && is_a( $product, 'WP_Post' ) ) {
18
- $this->productID = absint( $product->ID );
19
- $this->wcProduct = wc_get_product( $product );
20
- }
21
-
22
- if ( is_numeric( $product ) && 'product_variation' === get_post_type( $product ) ) {
23
- $this->productID = absint( $product );
24
- $this->wcProduct = wc_get_product( $product );
25
- }
26
-
27
- $this->setLanguage();
28
- }
29
-
30
- /**
31
- * Get parent product ID
32
- *
33
- * @return int
34
- */
35
- public function getParentID() {
36
- return $this->wcProduct->get_parent_id();
37
- }
38
-
39
- /**
40
- * Get parent product SKU
41
- *
42
- * @return string
43
- */
44
- public function getParentSKU() {
45
- $parentData = $this->wcProduct->get_parent_data();
46
-
47
- return isset( $parentData['sku'] ) ? $parentData['sku'] : '';
48
- }
49
-
50
- /**
51
- * WooCommerce raw product object
52
- *
53
- * @return \WC_Product_Variation
54
- */
55
- public function getWooObject() {
56
- return $this->wcProduct;
57
- }
58
-
59
- /**
60
- * Check, if class is initialized correctly
61
- * @return bool
62
- */
63
- public function isValid() {
64
- $isValid = false;
65
-
66
- if ( is_a( $this->wcProduct, 'WC_Product_Variation' ) ) {
67
- $isValid = true;
68
- }
69
-
70
- return $isValid;
71
- }
72
-
73
- /**
74
- * Prepare attributes for display
75
- * @return array
76
- */
77
- public function getVariationAttributes() {
78
- $formattedAttributes = array();
79
-
80
- $attributes = $this->wcProduct->get_variation_attributes();
81
-
82
- if ( ! empty( $attributes ) && is_array( $attributes ) ) {
83
- foreach ( $attributes as $key => $termSlug ) {
84
-
85
- if ( strpos( $key, 'attribute_' ) !== false ) {
86
- $taxonomy = str_replace( 'attribute_', '', $key );
87
-
88
- $term = get_term_by( 'slug', $termSlug, $taxonomy );
89
-
90
- if ( ! empty( $term ) && is_object( $term ) && is_a( $term, 'WP_Term' ) ) {
91
- $attributeLabel = wc_attribute_label( $taxonomy );
92
-
93
- $formattedAttributes[] = array(
94
- 'label' => $attributeLabel,
95
- 'value' => $term->name
96
- );
97
- }
98
-
99
-
100
- }
101
- }
102
- }
103
-
104
- return apply_filters( 'dgwt/wcas/product/variation_attributes', $formattedAttributes );
105
- }
106
-
107
- /**
108
- * Set info about product language
109
- *
110
- * For variation we use language of parent product
111
- *
112
- * @return void
113
- */
114
- public function setLanguage() {
115
- if ( ! $this->isValid() ) {
116
- return;
117
- }
118
-
119
- $this->langCode = Multilingual::getPostLang( $this->getParentID() );
120
- }
121
- }
 
 
2
 
3
  namespace DgoraWcas;
4
 
5
+ class ProductVariation extends Product
6
+ {
7
+ /**
8
+ * @var bool|false|\WC_Product_Variation|null
9
+ */
10
+ protected $wcProduct = null ;
11
+ public function __construct( $product )
12
+ {
13
+
14
+ if ( !empty($product) && is_object( $product ) && is_a( $product, 'WC_Product_Variation' ) ) {
15
+ $this->productID = $product->get_id();
16
+ $this->wcProduct = $product;
17
+ }
18
+
19
+
20
+ if ( !empty($product) && is_object( $product ) && is_a( $product, 'WP_Post' ) ) {
21
+ $this->productID = absint( $product->ID );
22
+ $this->wcProduct = wc_get_product( $product );
23
+ }
24
+
25
+
26
+ if ( is_numeric( $product ) && 'product_variation' === get_post_type( $product ) ) {
27
+ $this->productID = absint( $product );
28
+ $this->wcProduct = wc_get_product( $product );
29
+ }
30
+
31
+ $this->setLanguage();
32
+ }
33
+
34
+ /**
35
+ * Get parent product ID
36
+ *
37
+ * @return int
38
+ */
39
+ public function getParentID()
40
+ {
41
+ return $this->wcProduct->get_parent_id();
42
+ }
43
+
44
+ /**
45
+ * Get parent product SKU
46
+ *
47
+ * @return string
48
+ */
49
+ public function getParentSKU()
50
+ {
51
+ $parentData = $this->wcProduct->get_parent_data();
52
+ return ( isset( $parentData['sku'] ) ? $parentData['sku'] : '' );
53
+ }
54
+
55
+ /**
56
+ * WooCommerce raw product object
57
+ *
58
+ * @return \WC_Product_Variation
59
+ */
60
+ public function getWooObject()
61
+ {
62
+ return $this->wcProduct;
63
+ }
64
+
65
+ /**
66
+ * Check, if class is initialized correctly
67
+ * @return bool
68
+ */
69
+ public function isValid()
70
+ {
71
+ $isValid = false;
72
+ if ( is_a( $this->wcProduct, 'WC_Product_Variation' ) ) {
73
+ $isValid = true;
74
+ }
75
+ return $isValid;
76
+ }
77
+
78
+ /**
79
+ * Prepare attributes for display
80
+ * @return array
81
+ */
82
+ public function getVariationAttributes()
83
+ {
84
+ $formattedAttributes = array();
85
+ $attributes = $this->wcProduct->get_variation_attributes();
86
+ if ( !empty($attributes) && is_array( $attributes ) ) {
87
+ foreach ( $attributes as $key => $termSlug ) {
88
+
89
+ if ( strpos( $key, 'attribute_' ) !== false ) {
90
+ $taxonomy = str_replace( 'attribute_', '', $key );
91
+ $term = get_term_by( 'slug', $termSlug, $taxonomy );
92
+
93
+ if ( !empty($term) && is_object( $term ) && is_a( $term, 'WP_Term' ) ) {
94
+ $attributeLabel = wc_attribute_label( $taxonomy );
95
+ $formattedAttributes[] = array(
96
+ 'label' => $attributeLabel,
97
+ 'value' => $term->name,
98
+ );
99
+ }
100
+
101
+ }
102
+
103
+ }
104
+ }
105
+ return apply_filters( 'dgwt/wcas/product/variation_attributes', $formattedAttributes );
106
+ }
107
+
108
+ /**
109
+ * Set info about product language
110
+ *
111
+ * For variation we use language of parent product
112
+ *
113
+ * @return void
114
+ */
115
+ public function setLanguage()
116
+ {
117
+ if ( !$this->isValid() ) {
118
+ return;
119
+ }
120
+ $this->langCode = Multilingual::getPostLang( $this->getParentID() );
121
+ }
122
+
123
+ }
includes/Settings.php CHANGED
@@ -203,7 +203,7 @@ class Settings
203
  ),
204
  630 => array(
205
  'name' => 'layout_head',
206
- 'label' => __( 'Layout (beta)', 'ajax-search-for-woocommerce' ),
207
  'type' => 'head',
208
  'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings',
209
  ),
@@ -381,8 +381,17 @@ class Settings
381
  'name' => 'show_matching_categories',
382
  'label' => __( 'Show categories', 'ajax-search-for-woocommerce' ),
383
  'type' => 'checkbox',
384
- 'class' => 'js-dgwt-wcas-settings-margin',
385
  'default' => 'on',
 
 
 
 
 
 
 
 
 
386
  ),
387
  1300 => array(
388
  'name' => 'show_matching_tags',
@@ -541,15 +550,31 @@ class Settings
541
  ),
542
  600 => array(
543
  'name' => 'filter_products_head',
544
- 'label' => __( 'Exclude products', 'ajax-search-for-woocommerce' ),
545
  'type' => 'head',
546
  'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
  ),
548
  650 => array(
549
  'name' => 'filter_products_rules',
550
  'label' => __( 'Filters', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark(
551
  'filter_products_head',
552
- __( 'Exclude from search all products that match conditions', 'ajax-search-for-woocommerce' ),
553
  '',
554
  'right'
555
  ),
203
  ),
204
  630 => array(
205
  'name' => 'layout_head',
206
+ 'label' => __( 'Layout', 'ajax-search-for-woocommerce' ),
207
  'type' => 'head',
208
  'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings',
209
  ),
381
  'name' => 'show_matching_categories',
382
  'label' => __( 'Show categories', 'ajax-search-for-woocommerce' ),
383
  'type' => 'checkbox',
384
+ 'class' => 'js-dgwt-wcas-settings-margin js-dgwt-wcas-options-toggle-sibling',
385
  'default' => 'on',
386
+ ),
387
+ 1150 => array(
388
+ 'name' => 'show_categories_images',
389
+ 'label' => __( 'show images', 'ajax-search-for-woocommerce' ),
390
+ 'type' => 'checkbox',
391
+ 'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
392
+ 'default' => 'off',
393
+ 'desc' => __( 'show images', 'ajax-search-for-woocommerce' ),
394
+ 'move_dest' => 'show_matching_categories',
395
  ),
396
  1300 => array(
397
  'name' => 'show_matching_tags',
550
  ),
551
  600 => array(
552
  'name' => 'filter_products_head',
553
+ 'label' => __( 'Exclude/include products', 'ajax-search-for-woocommerce' ),
554
  'type' => 'head',
555
  'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings',
556
+ ),
557
+ 625 => array(
558
+ 'name' => 'filter_products_mode',
559
+ 'label' => __( 'Filtering mode', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark(
560
+ 'filter_products_mode',
561
+ __( 'Exclude the product group from the search results or allow search only among the indicated product group', 'ajax-search-for-woocommerce' ),
562
+ '',
563
+ 'right'
564
+ ),
565
+ 'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
566
+ 'type' => 'select',
567
+ 'options' => array(
568
+ 'exclude' => __( 'Exclude', 'ajax-search-for-woocommerce' ),
569
+ 'include' => __( 'Include', 'ajax-search-for-woocommerce' ),
570
+ ),
571
+ 'default' => 'exclude',
572
  ),
573
  650 => array(
574
  'name' => 'filter_products_rules',
575
  'label' => __( 'Filters', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark(
576
  'filter_products_head',
577
+ __( 'Filters that specify the product group that will be affected by the above mode', 'ajax-search-for-woocommerce' ),
578
  '',
579
  'right'
580
  ),
includes/Term.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace DgoraWcas;
5
+
6
+
7
+ class Term {
8
+ protected $termID = 0;
9
+ protected $term = null;
10
+ protected $taxonomy = null;
11
+
12
+ public function __construct( $term, $taxonomy = '' ) {
13
+ if ( ! empty( $term ) && is_object( $term ) && is_a( $term, 'WP_Term' ) ) {
14
+ $this->termID = $term->term_id;
15
+ $this->term = $term;
16
+ $this->taxonomy = $term->taxonomy;
17
+ }
18
+
19
+ if ( is_numeric( $term ) && ! empty( $taxonomy ) && term_exists( $term, $taxonomy ) ) {
20
+ $termObj = get_term( $term, $taxonomy );
21
+ if ( is_a( $termObj, 'WP_Term' ) ) {
22
+ $this->termID = $termObj->term_id;
23
+ $this->term = $termObj;
24
+ $this->taxonomy = $termObj->taxonomy;
25
+ }
26
+ }
27
+ }
28
+
29
+ /**
30
+ * Get term ID (term_id)
31
+ * @return int
32
+ */
33
+ public function getID() {
34
+ return $this->termID;
35
+ }
36
+
37
+ public function getTaxonomy() {
38
+ return $this->taxonomy;
39
+ }
40
+
41
+ /**
42
+ * @return \WP_Term|null
43
+ */
44
+ public function getTermObject() {
45
+ return $this->term;
46
+ }
47
+
48
+ /**
49
+ * Check, if class is initialized correctly
50
+ * @return bool
51
+ */
52
+ public function isValid() {
53
+ return is_a( $this->term, 'WP_Term' );
54
+ }
55
+
56
+ /**
57
+ * Get term thumbnail url
58
+ *
59
+ * @param string $size
60
+ *
61
+ * @return string
62
+ */
63
+ public function getThumbnailSrc( $size = '' ) {
64
+ $src = '';
65
+ $size = empty( $size ) ? 'dgwt-wcas-product-suggestion' : $size;
66
+
67
+ if ( ! $this->isValid() ) {
68
+ return $src;
69
+ }
70
+
71
+ $imageID = get_term_meta( $this->getID(), 'thumbnail_id', true );
72
+
73
+ if ( ! empty( $imageID ) ) {
74
+ $imageSrc = wp_get_attachment_image_src( $imageID, $size );
75
+
76
+ if ( is_array( $imageSrc ) && ! empty( $imageSrc[0] ) ) {
77
+ $src = $imageSrc[0];
78
+ }
79
+ }
80
+
81
+ if ( empty( $src ) ) {
82
+ $src = wc_placeholder_img_src( $size );
83
+ }
84
+
85
+ return apply_filters( 'dgwt/wcas/term/thumbnail_src', $src, $this->getID(), $size, $this );
86
+ }
87
+ }
languages/ajax-search-for-woocommerce.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2021-04-21 07:34+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: Damian Góra <support@fibosearch.com>\n"
9
  "Language-Team: \n"
@@ -44,7 +44,7 @@ msgstr ""
44
  msgid "%s Theme"
45
  msgstr ""
46
 
47
- #: includes/Admin/RegenerateImages.php:102
48
  #, php-format
49
  msgid ""
50
  "%s: it is recommended to generate a special small image size for existing "
@@ -59,46 +59,62 @@ msgid ""
59
  "using PHP version "
60
  msgstr ""
61
 
62
- #: includes/Settings.php:711 includes/Settings.php:761
63
  msgid "-- Disabled"
64
  msgstr ""
65
 
66
- #: partials/admin/features.php:19
 
67
  msgid ""
68
- "<b>New Ultra-Fast Search Engine</b> works very fast even with 100,000+ "
69
- "products "
 
70
  msgstr ""
71
 
72
- #: partials/admin/indexer-header.php:46
73
- #, php-format
74
  msgid ""
75
- "<b>Your server can't send an HTTP requests to itself</b>. <a "
76
- "target=\"_blank\" href=\"%s\">Visit our documentation</a> to see solutions."
77
  msgstr ""
78
 
79
- #: includes/Admin/Troubleshooting.php:636
80
  msgid ""
81
  "A real solution is to find the reason why the WP-Cron doesn’t work and fix "
82
  "it."
83
  msgstr ""
84
 
85
- #: includes/Admin/Troubleshooting.php:1023
86
  msgid "A search engine's AJAX call did not return valid results"
87
  msgstr ""
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  #: includes/EmbeddingViaMenu.php:150
90
  msgid "Add FiboSearch as a menu item."
91
  msgstr ""
92
 
93
- #: includes/Admin/SettingsAPI.php:523 includes/Admin/SettingsAPI.php:624
94
  msgid "Add new rule"
95
  msgstr ""
96
 
97
- #: includes/Admin/Troubleshooting.php:1186
98
  msgid "Add the following URL to the white list:"
99
  msgstr ""
100
 
101
- #: includes/Admin/Troubleshooting.php:1136
102
  msgid ""
103
  "Adding extra rules to <code>/usr/local/nginx/conf/wpsecure_${vhostname}."
104
  "conf</code>"
@@ -113,7 +129,7 @@ msgstr ""
113
  msgid "AJAX (live) search form for WooCommerce"
114
  msgstr ""
115
 
116
- #: includes/Settings.php:792
117
  msgid "AJAX Search for WooCommerce rebrands to FiboSearch"
118
  msgstr ""
119
 
@@ -145,7 +161,7 @@ msgstr ""
145
  msgid "Alternative ways to embed a search bar"
146
  msgstr ""
147
 
148
- #: includes/Admin/Troubleshooting.php:716
149
  #, php-format
150
  msgid ""
151
  "An error occurred while trying to connect to the database using a PDO_MYSQL "
@@ -179,7 +195,7 @@ msgstr ""
179
  msgid "As a widget - go to the %s and choose “FiboSearch bar”"
180
  msgstr ""
181
 
182
- #: includes/Admin/SettingsAPI.php:582
183
  #, php-format
184
  msgid "Attributes: %s"
185
  msgstr ""
@@ -188,28 +204,28 @@ msgstr ""
188
  msgid "Autocomplete"
189
  msgstr ""
190
 
191
- #: includes/Integrations/Brands.php:179 includes/Integrations/Brands.php:202
192
  #, php-format
193
- msgid "based on the plugin %s"
194
  msgstr ""
195
 
196
  #: includes/Settings.php:183 includes/Settings.php:333
197
  msgid "Basic"
198
  msgstr ""
199
 
200
- #: includes/Admin/Troubleshooting.php:1272
201
  msgid "Blocked search endpoint test"
202
  msgstr ""
203
 
204
- #: includes/Settings.php:532
205
  msgid "Border color"
206
  msgstr ""
207
 
208
- #: includes/Helpers.php:960
209
  msgid "Brand"
210
  msgstr ""
211
 
212
- #: includes/Helpers.php:967
213
  msgid "Brands"
214
  msgstr ""
215
 
@@ -218,11 +234,11 @@ msgid "Build ID"
218
  msgstr ""
219
 
220
  #: partials/admin/indexer-header-demo.php:15
221
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:653
222
  msgid "Build index"
223
  msgstr ""
224
 
225
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:606
226
  msgid "Canceling..."
227
  msgstr ""
228
 
@@ -243,19 +259,26 @@ msgstr ""
243
  msgid "Colors"
244
  msgstr ""
245
 
246
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:612
247
  msgid "Completed. Works."
248
  msgstr ""
249
 
250
- #: includes/Admin/SettingsAPI.php:721
251
  msgid "Contact"
252
  msgstr ""
253
 
254
- #: includes/Helpers.php:976
 
 
 
 
 
 
 
255
  msgid "continue reading"
256
  msgstr ""
257
 
258
- #: includes/Admin/Troubleshooting.php:596
259
  #, php-format
260
  msgid ""
261
  "Could not load <code>wp-load.php</code> from the locations it normally is. "
@@ -263,18 +286,14 @@ msgid ""
263
  "support</a>."
264
  msgstr ""
265
 
266
- #: includes/Admin/Troubleshooting.php:595
267
  msgid "Custom location of wp-load.php file"
268
  msgstr ""
269
 
270
- #: includes/Settings.php:671
271
  msgid "daily"
272
  msgstr ""
273
 
274
- #. Author of the plugin
275
- msgid "Damian Góra"
276
- msgstr ""
277
-
278
  #: partials/admin/indexer-body.php:46
279
  msgid "DB"
280
  msgstr ""
@@ -283,15 +302,15 @@ msgstr ""
283
  msgid "Default"
284
  msgstr ""
285
 
286
- #: includes/Admin/Troubleshooting.php:1058
287
  msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
288
  msgstr ""
289
 
290
- #: includes/Settings.php:444
291
  msgid "Details panel"
292
  msgstr ""
293
 
294
- #: includes/Admin/Troubleshooting.php:263
295
  #, php-format
296
  msgid ""
297
  "Due to the way the TranslatePress - Multilingual plugin works, we can only "
@@ -299,13 +318,13 @@ msgid ""
299
  "version</a>."
300
  msgstr ""
301
 
302
- #: includes/Admin/Troubleshooting.php:724
303
  msgid ""
304
  "Edit <code>wp-config.php</code> file, find the <code>DB_HOST</code> constant,"
305
  " and change its value from <code>localhost</code> to <code>127.0.0.1</code>."
306
  msgstr ""
307
 
308
- #: includes/Settings.php:658
309
  msgid "Enable Scheduler"
310
  msgstr ""
311
 
@@ -314,27 +333,43 @@ msgstr ""
314
  msgid "End"
315
  msgstr ""
316
 
317
- #: includes/Admin/Troubleshooting.php:715
 
 
 
 
 
318
  msgid "Error establishing a database connection"
319
  msgstr ""
320
 
321
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:617
 
 
 
 
 
322
  msgid "Errors"
323
  msgstr ""
324
 
325
- #: includes/Settings.php:630 includes/Settings.php:729
326
- msgid "Exclude from search all products that match conditions"
327
  msgstr ""
328
 
329
- #: includes/Settings.php:623 includes/Settings.php:722
330
- msgid "Exclude products"
 
 
331
  msgstr ""
332
 
333
- #: includes/Settings.php:596
334
  msgid "Exclude “out of stock” products"
335
  msgstr ""
336
 
337
- #: includes/Admin/Troubleshooting.php:497
 
 
 
 
338
  msgid "Extensions should looks like the picture below:"
339
  msgstr ""
340
 
@@ -359,22 +394,36 @@ msgstr ""
359
  msgid "FiboSearch Pro - Upgrade Now"
360
  msgstr ""
361
 
362
- #: includes/Admin/Troubleshooting.php:717
 
 
 
 
363
  msgid ""
364
  "FiboSearch uses a PDO_MYSQL driver in the search engine. A proper database "
365
  "connection is required."
366
  msgstr ""
367
 
368
- #: includes/Settings.php:629 includes/Settings.php:728
 
 
 
 
369
  msgid "Filters"
370
  msgstr ""
371
 
 
 
 
 
 
 
372
  #: partials/admin/indexer-body.php:21
373
  #, php-format
374
  msgid "Finalization... Wait a moment. (%s products)"
375
  msgstr ""
376
 
377
- #: includes/Admin/Troubleshooting.php:1185
378
  msgid "Find section <code>Access Control -> whitelist URL</code>"
379
  msgstr ""
380
 
@@ -382,11 +431,11 @@ msgstr ""
382
  msgid "Flatsome Theme"
383
  msgstr ""
384
 
385
- #: includes/Settings.php:602
386
  msgid "Fuzziness"
387
  msgstr ""
388
 
389
- #: includes/Settings.php:706 includes/Settings.php:756
390
  msgid "Fuzzy matching"
391
  msgstr ""
392
 
@@ -394,7 +443,7 @@ msgstr ""
394
  msgid "Fuzzy search"
395
  msgstr ""
396
 
397
- #: includes/Admin/Troubleshooting.php:343
398
  #, php-format
399
  msgid ""
400
  "Go to <a href=\"%s\" target=\"_blank\">Tools -> Site Health</a> in your "
@@ -410,7 +459,7 @@ msgid ""
410
  "Header -> Search</code> and enable <code>Predictive Search</code>"
411
  msgstr ""
412
 
413
- #: includes/Admin/Troubleshooting.php:1060
414
  #, php-format
415
  msgid ""
416
  "Go to <code>Defender -> Security Tweaks -> <a href=\"%s\" target=\"_blank\">"
@@ -418,14 +467,14 @@ msgid ""
418
  "exceptions: <code>%s</code>"
419
  msgstr ""
420
 
421
- #: includes/Admin/Troubleshooting.php:539
422
  #, php-format
423
  msgid ""
424
  "Go to <code>Security -> Settings -> <a href=\"%s\" target=\"_blank\">System "
425
  "Tweaks</a></code> and uncheck <code>Disable PHP in Plugins</code> option."
426
  msgstr ""
427
 
428
- #: includes/Admin/Troubleshooting.php:446
429
  #, php-format
430
  msgid ""
431
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
@@ -433,7 +482,7 @@ msgid ""
433
  "option <code>%s</code>."
434
  msgstr ""
435
 
436
- #: includes/Admin/Troubleshooting.php:496
437
  #, php-format
438
  msgid ""
439
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
@@ -441,23 +490,24 @@ msgid ""
441
  "Searching by Text</code> extension and save changes."
442
  msgstr ""
443
 
444
- #: includes/Admin/Troubleshooting.php:757
445
  #, php-format
446
  msgid ""
447
  "Go to the <code>Jetpack settings page -> <a href=\"%s\" target=\"_blank\">"
448
  "Performance tab</a> -> disable the Search module</code>"
449
  msgstr ""
450
 
451
- #: includes/Admin/Troubleshooting.php:682
 
452
  #, php-format
453
  msgid "Go to the Indexer tab and click the button <i>%s</i>."
454
  msgstr ""
455
 
456
- #: includes/Admin/Troubleshooting.php:1184
457
  msgid "Go to the settings"
458
  msgstr ""
459
 
460
- #: includes/Admin/Troubleshooting.php:407
461
  msgid "Great! Our plugin works great with this version of WordPress."
462
  msgstr ""
463
 
@@ -471,11 +521,11 @@ msgstr ""
471
  msgid "Group results"
472
  msgstr ""
473
 
474
- #: includes/Settings.php:714 includes/Settings.php:764
475
  msgid "Hard"
476
  msgstr ""
477
 
478
- #: includes/Admin/Troubleshooting.php:1135
479
  msgid "Here are few samples NGINX config which helps other users:"
480
  msgstr ""
481
 
@@ -493,11 +543,11 @@ msgid ""
493
  "time now, and I hope you like it!"
494
  msgstr ""
495
 
496
- #: partials/admin/indexer-header.php:63
497
  msgid "Hide details"
498
  msgstr ""
499
 
500
- #: includes/Settings.php:525
501
  msgid "Highlight color"
502
  msgstr ""
503
 
@@ -520,7 +570,15 @@ msgstr ""
520
  msgid "Icon on mobile, search bar on desktop"
521
  msgstr ""
522
 
523
- #: partials/admin/indexer-header.php:49
 
 
 
 
 
 
 
 
524
  msgid ""
525
  "If the indexer still doesn't work, add a constant <code>"
526
  "define('DGWT_WCAS_INDEXER_MODE', 'sync');</code> to your <code>wp-config."
@@ -533,7 +591,14 @@ msgid ""
533
  "Help your customers to find the right products even <span>10× faster</span>."
534
  msgstr ""
535
 
536
- #: partials/admin/indexer-header.php:43
 
 
 
 
 
 
 
537
  msgid ""
538
  "If you see the <b>Troubleshooting tab</b> above, click it and try to solve "
539
  "the issues mentioned there"
@@ -543,12 +608,12 @@ msgstr ""
543
  msgid "Impreza Theme"
544
  msgstr ""
545
 
546
- #: includes/Helpers.php:975
547
  msgctxt "in categories fe. in Books > Crime stories"
548
  msgid "in"
549
  msgstr ""
550
 
551
- #: includes/Settings.php:659
552
  msgid ""
553
  "In most cases, you don't need to use the scheduler because the search index "
554
  "updates when you edit products. If you use import tools or custom code to "
@@ -556,24 +621,32 @@ msgid ""
556
  "helpful."
557
  msgstr ""
558
 
559
- #: includes/Admin/Troubleshooting.php:494
 
 
 
 
560
  msgid ""
561
  "Incompatible \"Searching by Text\" extension from WOOF - WooCommerce "
562
  "Products Filter plugin is active"
563
  msgstr ""
564
 
565
- #: includes/Admin/Troubleshooting.php:1219
566
  msgid ""
567
  "Incompatible \"Searching by Text\" extension in WOOF - WooCommerce Products "
568
  "Filter"
569
  msgstr ""
570
 
571
- #: includes/Admin/Troubleshooting.php:1211
572
  msgid "Incompatible plugins"
573
  msgstr ""
574
 
575
- #: includes/Admin/Troubleshooting.php:444
576
- #: includes/Admin/Troubleshooting.php:1215
 
 
 
 
577
  msgid "Incorrect \"Add to cart\" behaviour in WooCommerce settings"
578
  msgstr ""
579
 
@@ -581,7 +654,7 @@ msgstr ""
581
  msgid "Increase sales"
582
  msgstr ""
583
 
584
- #: includes/Settings.php:687
585
  msgid "Increases sales conversions"
586
  msgstr ""
587
 
@@ -593,11 +666,11 @@ msgstr ""
593
  msgid "Index build start"
594
  msgstr ""
595
 
596
- #: includes/Admin/Troubleshooting.php:1252
597
  msgid "Index completeness test"
598
  msgstr ""
599
 
600
- #: includes/Settings.php:738 includes/Settings.php:772
601
  msgid "Index status"
602
  msgstr ""
603
 
@@ -624,7 +697,7 @@ msgstr ""
624
  msgid "Individual tips and support by FiboSearch team"
625
  msgstr ""
626
 
627
- #: includes/Admin/Troubleshooting.php:633
628
  msgid ""
629
  "Install the <a target=\"_blank\" href=\"https://wordpress."
630
  "org/plugins/advanced-cron-manager/\">Advanced Cron Manager</a> plugin to "
@@ -632,24 +705,32 @@ msgid ""
632
  "related to the Indexer:"
633
  msgstr ""
634
 
635
- #: includes/Admin/Troubleshooting.php:410
636
  msgid ""
637
  "Install the latest version of WordPress for our plugin to work as best it "
638
  "can!"
639
  msgstr ""
640
 
641
- #: includes/Settings.php:667
642
  msgid "Interval"
643
  msgstr ""
644
 
645
- #: includes/Admin/Troubleshooting.php:352 partials/admin/indexer-header.php:52
 
 
 
 
 
 
 
 
646
  #, php-format
647
  msgid ""
648
  "Is it still not working? Write a <a target=\"_blank\" href=\"%s\">support "
649
  "request</a>"
650
  msgstr ""
651
 
652
- #: includes/Admin/Troubleshooting.php:346
653
  msgid ""
654
  "Is your website publicly available only for whitelisted IPs? <b>Add your "
655
  "server IP to the whitelist</b>. That’s all. This is a common mistake when "
@@ -658,16 +739,16 @@ msgid ""
658
  "requests to itself."
659
  msgstr ""
660
 
661
- #: includes/Admin/Troubleshooting.php:610
662
- #: includes/Admin/Troubleshooting.php:1247
663
  msgid "Issue with WP-Cron"
664
  msgstr ""
665
 
666
- #: includes/Admin/Troubleshooting.php:537
667
  msgid "iThemes Security plugin blocks AJAX requests"
668
  msgstr ""
669
 
670
- #: includes/Admin/Troubleshooting.php:1262
671
  msgid "Jetpack search module"
672
  msgstr ""
673
 
@@ -676,14 +757,11 @@ msgstr ""
676
  msgid "Last build %s"
677
  msgstr ""
678
 
679
- #: widget.php:43 includes/Settings.php:234 includes/EmbeddingViaMenu.php:74
 
680
  msgid "Layout"
681
  msgstr ""
682
 
683
- #: includes/Settings.php:228
684
- msgid "Layout (beta)"
685
- msgstr ""
686
-
687
  #: includes/Settings.php:339
688
  msgid "Limit"
689
  msgstr ""
@@ -692,11 +770,11 @@ msgstr ""
692
  msgid "Logs"
693
  msgstr ""
694
 
695
- #: includes/Admin/Troubleshooting.php:1225
696
  msgid "Loopback request"
697
  msgstr ""
698
 
699
- #: partials/admin/search-preview.php:144 partials/admin/search-preview.php:189
700
  msgid ""
701
  "Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. "
702
  "Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin "
@@ -719,7 +797,7 @@ msgstr ""
719
  msgid "maximum number of suggestions"
720
  msgstr ""
721
 
722
- #: includes/Admin/Troubleshooting.php:953
723
  msgid ""
724
  "Maybe your server blocks it by Apache module <code>mod_security</code>. "
725
  "Contact your hosting provider and ask what can block the URL you see above."
@@ -737,7 +815,7 @@ msgstr ""
737
  msgid "Minimum characters"
738
  msgstr ""
739
 
740
- #: includes/Admin/Troubleshooting.php:791
741
  msgid "Missing plugin: WooCommerce Multilingual"
742
  msgstr ""
743
 
@@ -755,27 +833,27 @@ msgstr ""
755
  msgid "More results label"
756
  msgstr ""
757
 
758
- #: includes/Admin/SettingsAPI.php:728
759
  msgid "My Account"
760
  msgstr ""
761
 
762
- #: includes/Settings.php:800
763
  msgid "New plugin name"
764
  msgstr ""
765
 
766
- #: includes/Settings.php:787
767
  msgid "News"
768
  msgstr ""
769
 
770
- #: includes/Admin/Troubleshooting.php:1132
771
  msgid "NGINX configuration may blocks search requests"
772
  msgstr ""
773
 
774
- #: includes/Settings.php:357 includes/Helpers.php:977
775
  msgid "No results"
776
  msgstr ""
777
 
778
- #: includes/Admin/SettingsAPI.php:521 includes/Admin/SettingsAPI.php:620
779
  msgid "No rules"
780
  msgstr ""
781
 
@@ -783,15 +861,19 @@ msgstr ""
783
  msgid "No thanks"
784
  msgstr ""
785
 
 
 
 
 
786
  #: includes/Settings.php:410
787
  msgid "Non-products in autocomplete"
788
  msgstr ""
789
 
790
- #: includes/Settings.php:713 includes/Settings.php:763
791
  msgid "Normal"
792
  msgstr ""
793
 
794
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:623
795
  msgid "Not exist"
796
  msgstr ""
797
 
@@ -799,7 +881,7 @@ msgstr ""
799
  msgid "Note: We currently only support the header type: \"Header 10\""
800
  msgstr ""
801
 
802
- #: includes/Admin/Troubleshooting.php:368
803
  msgid "One or more required PHP extensions are missing on your server"
804
  msgstr ""
805
 
@@ -807,11 +889,11 @@ msgstr ""
807
  msgid "Overlay on mobile"
808
  msgstr ""
809
 
810
- #: includes/Admin/Troubleshooting.php:1257
811
  msgid "PDO connection test"
812
  msgstr ""
813
 
814
- #: includes/Admin/Troubleshooting.php:1207
815
  msgid "PHP extensions"
816
  msgstr ""
817
 
@@ -831,19 +913,23 @@ msgstr ""
831
  msgid "Pro"
832
  msgstr ""
833
 
834
- #: includes/Settings.php:639
835
  msgid "Pro features"
836
  msgstr ""
837
 
 
 
 
 
838
  #: partials/admin/troubleshooting.php:11
839
  msgid "Processing asynchronous tests..."
840
  msgstr ""
841
 
842
- #: includes/Admin/SettingsAPI.php:577
843
  msgid "Product categories"
844
  msgstr ""
845
 
846
- #: includes/Admin/SettingsAPI.php:579
847
  msgid "Product tags"
848
  msgstr ""
849
 
@@ -855,7 +941,7 @@ msgstr ""
855
  msgid "Products search"
856
  msgstr ""
857
 
858
- #: includes/Settings.php:541
859
  msgid "Products search scope"
860
  msgstr ""
861
 
@@ -869,23 +955,25 @@ msgstr ""
869
  msgid "px"
870
  msgstr ""
871
 
872
- #: includes/Settings.php:794
873
  msgid "Read more"
874
  msgstr ""
875
 
876
- #: includes/Admin/Troubleshooting.php:351
877
  #, php-format
878
  msgid ""
879
  "Read more about indexer issues on <a target=\"_blank\" href=\"%s\">our "
880
- "documentation</a>"
 
881
  msgstr ""
882
 
883
  #: partials/admin/indexer-body.php:90
884
  msgid "Readable"
885
  msgstr ""
886
 
887
- #: includes/Admin/Troubleshooting.php:676
888
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:647
 
889
  msgid "Rebuild index"
890
  msgstr ""
891
 
@@ -935,6 +1023,7 @@ msgstr ""
935
  msgid "Replace a search bar in TheGem "
936
  msgstr ""
937
 
 
938
  #: includes/Integrations/Themes/Shopical/Shopical.php:57
939
  #: includes/Integrations/Themes/Enfold/Enfold.php:64
940
  #: includes/Integrations/Themes/Sober/Sober.php:57
@@ -972,17 +1061,17 @@ msgstr ""
972
  msgid "Replace the TheGem default search"
973
  msgstr ""
974
 
975
- #: includes/Admin/Troubleshooting.php:378
976
- #: includes/Admin/Troubleshooting.php:381
977
  #, php-format
978
  msgid "Required PHP extension: %s"
979
  msgstr ""
980
 
981
- #: includes/Admin/Troubleshooting.php:1025
982
  msgid "Response body"
983
  msgstr ""
984
 
985
- #: includes/Settings.php:688
986
  msgid ""
987
  "returns suggestions based on likely relevance, even though a search keyword "
988
  "may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
@@ -994,39 +1083,39 @@ msgstr ""
994
  msgid "Review %s"
995
  msgstr ""
996
 
997
- #: partials/admin/search-preview.php:74
998
  msgid "Sample brand <strong>name</strong>"
999
  msgstr ""
1000
 
1001
- #: partials/admin/search-preview.php:87
1002
  msgid "Sample category <strong>name</strong>"
1003
  msgstr ""
1004
 
1005
- #: partials/admin/search-preview.php:126
1006
  msgid "Sample page <strong>name</strong>"
1007
  msgstr ""
1008
 
1009
- #: partials/admin/search-preview.php:113
1010
  msgid "Sample post <strong>name</strong>"
1011
  msgstr ""
1012
 
1013
- #: partials/admin/search-preview.php:142
1014
  msgid "Sample product <strong>name</strong>"
1015
  msgstr ""
1016
 
1017
- #: partials/admin/search-preview.php:178
1018
  msgid "Sample product name"
1019
  msgstr ""
1020
 
1021
- #: partials/admin/search-preview.php:100
1022
  msgid "Sample tag <strong>name</strong>"
1023
  msgstr ""
1024
 
1025
- #: includes/Settings.php:678
1026
  msgid "Schedule time"
1027
  msgstr ""
1028
 
1029
- #: includes/Settings.php:652
1030
  msgid "Scheduling indexing"
1031
  msgstr ""
1032
 
@@ -1055,7 +1144,7 @@ msgstr ""
1055
  msgid "Search for posts and pages"
1056
  msgstr ""
1057
 
1058
- #: includes/Settings.php:224 includes/Helpers.php:980
1059
  msgid "Search for products..."
1060
  msgstr ""
1061
 
@@ -1068,7 +1157,7 @@ msgstr ""
1068
  msgid "Search icon color"
1069
  msgstr ""
1070
 
1071
- #: includes/Settings.php:568 partials/admin/features.php:23
1072
  msgid "Search in attributes"
1073
  msgstr ""
1074
 
@@ -1076,7 +1165,7 @@ msgstr ""
1076
  msgid "Search in attributes and variation products SKUs (option)"
1077
  msgstr ""
1078
 
1079
- #: includes/Integrations/Brands.php:184
1080
  msgid "Search in brands"
1081
  msgstr ""
1082
 
@@ -1084,28 +1173,28 @@ msgstr ""
1084
  msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
1085
  msgstr ""
1086
 
1087
- #: includes/Settings.php:575 partials/admin/features.php:24
1088
  msgid "Search in categories"
1089
  msgstr ""
1090
 
1091
- #: includes/Settings.php:589 includes/Settings.php:697
1092
  #: partials/admin/features.php:22
1093
  msgid "Search in custom fields"
1094
  msgstr ""
1095
 
1096
- #: includes/Settings.php:547
1097
  msgid "Search in description"
1098
  msgstr ""
1099
 
1100
- #: includes/Settings.php:553
1101
  msgid "Search in short description"
1102
  msgstr ""
1103
 
1104
- #: includes/Settings.php:559
1105
  msgid "Search in SKU"
1106
  msgstr ""
1107
 
1108
- #: includes/Settings.php:582 partials/admin/features.php:25
1109
  msgid "Search in tags"
1110
  msgstr ""
1111
 
@@ -1141,11 +1230,11 @@ msgstr ""
1141
  msgid "Searchable"
1142
  msgstr ""
1143
 
1144
- #: includes/Settings.php:561
1145
  msgid "searching also in variable products SKU"
1146
  msgstr ""
1147
 
1148
- #: includes/Settings.php:562
1149
  #, php-format
1150
  msgid ""
1151
  "Searching in variable products SKU is available only in <a target=\"_blank\" "
@@ -1156,24 +1245,24 @@ msgstr ""
1156
  msgid "See a comparison of all free and premium features!"
1157
  msgstr ""
1158
 
1159
- #: includes/Settings.php:406 includes/Helpers.php:978 includes/Helpers.php:979
1160
  msgid "See all products..."
1161
  msgstr ""
1162
 
1163
- #: includes/Admin/SettingsAPI.php:575
1164
  msgid "Select filter type"
1165
  msgstr ""
1166
 
1167
- #: includes/Settings.php:700
1168
  msgid "select the custom fields you want to add to the search scope"
1169
  msgstr ""
1170
 
1171
- #: includes/Admin/Troubleshooting.php:1373
1172
  msgid "Server environment"
1173
  msgstr ""
1174
 
1175
- #: includes/Admin/Troubleshooting.php:946
1176
- #: includes/Admin/Troubleshooting.php:1024
1177
  #, php-format
1178
  msgid ""
1179
  "Server response with message <code>%s</code> and status code <code>%s</code>."
@@ -1188,7 +1277,7 @@ msgstr ""
1188
  msgid "Show advanced settings"
1189
  msgstr ""
1190
 
1191
- #: includes/Integrations/Brands.php:207
1192
  msgid "Show brands"
1193
  msgstr ""
1194
 
@@ -1197,19 +1286,24 @@ msgid "Show categories"
1197
  msgstr ""
1198
 
1199
  #: partials/admin/indexer-header-demo.php:16
1200
- #: partials/admin/indexer-header.php:62
1201
  msgid "Show details"
1202
  msgstr ""
1203
 
1204
- #: includes/Settings.php:450
1205
  msgid "Show Details panel"
1206
  msgstr ""
1207
 
1208
- #: includes/Settings.php:437
 
 
 
 
 
1209
  msgid "Show pages"
1210
  msgstr ""
1211
 
1212
- #: includes/Settings.php:430
1213
  msgid "Show posts"
1214
  msgstr ""
1215
 
@@ -1237,7 +1331,7 @@ msgstr ""
1237
  msgid "Show submit button"
1238
  msgstr ""
1239
 
1240
- #: includes/Settings.php:423
1241
  msgid "Show tags"
1242
  msgstr ""
1243
 
@@ -1245,38 +1339,39 @@ msgstr ""
1245
  msgid "Show vendors next to products"
1246
  msgstr ""
1247
 
1248
- #: includes/Admin/SettingsAPI.php:724
1249
  msgid "Showcase"
1250
  msgstr ""
1251
 
1252
- #: includes/Settings.php:712 includes/Settings.php:762
1253
  msgid "Soft"
1254
  msgstr ""
1255
 
1256
- #: includes/Helpers.php:973
1257
  msgid "Sold by:"
1258
  msgstr ""
1259
 
1260
- #: includes/Admin/Troubleshooting.php:445
1261
- #: includes/Admin/Troubleshooting.php:495
1262
- #: includes/Admin/Troubleshooting.php:538
1263
- #: includes/Admin/Troubleshooting.php:632
1264
- #: includes/Admin/Troubleshooting.php:723
1265
- #: includes/Admin/Troubleshooting.php:1059
1266
- #: includes/Admin/Troubleshooting.php:1106
1267
- #: includes/Admin/Troubleshooting.php:1182
 
1268
  msgid "Solution"
1269
  msgstr ""
1270
 
1271
- #: includes/Admin/Troubleshooting.php:951
1272
  msgid "Solutions"
1273
  msgstr ""
1274
 
1275
- #: includes/Admin/Troubleshooting.php:339
1276
  msgid "Solutions:"
1277
  msgstr ""
1278
 
1279
- #: includes/Admin/Troubleshooting.php:1133
1280
  #, php-format
1281
  msgid ""
1282
  "Some NGINX configuration may block executing PHP files included directly in "
@@ -1285,7 +1380,7 @@ msgid ""
1285
  "to execute the following file: %s"
1286
  msgstr ""
1287
 
1288
- #: includes/Settings.php:645
1289
  msgid "Speed up search!"
1290
  msgstr ""
1291
 
@@ -1306,7 +1401,7 @@ msgstr ""
1306
  msgid "Status"
1307
  msgstr ""
1308
 
1309
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:644
1310
  msgid "Stop process"
1311
  msgstr ""
1312
 
@@ -1318,28 +1413,28 @@ msgstr ""
1318
  msgid "Submit label"
1319
  msgstr ""
1320
 
1321
- #: includes/Admin/Troubleshooting.php:1181
1322
  msgid "Sucuri Security firewall may block AJAX calls of the live search"
1323
  msgstr ""
1324
 
1325
- #: includes/Settings.php:504
1326
  msgid "Suggestion background"
1327
  msgstr ""
1328
 
1329
- #: includes/Settings.php:511
1330
  msgid "Suggestion selected"
1331
  msgstr ""
1332
 
1333
- #: includes/Settings.php:498
1334
  msgid "Suggestions colors"
1335
  msgstr ""
1336
 
1337
- #: includes/Settings.php:608 includes/Settings.php:614
1338
  #: partials/admin/features.php:29 includes/Admin/Promo/Upgrade.php:50
1339
  msgid "Synonyms"
1340
  msgstr ""
1341
 
1342
- #: includes/Settings.php:617
1343
  msgid ""
1344
  "Synonyms should be separated by a comma. Each new synonyms group is entered "
1345
  "on a new line. You can use a phrase instead of a single word. <br /> <br />"
@@ -1351,15 +1446,15 @@ msgstr ""
1351
  msgid "Taxonomies"
1352
  msgstr ""
1353
 
1354
- #: includes/Settings.php:518
1355
  msgid "Text color"
1356
  msgstr ""
1357
 
1358
- #: includes/Admin/Troubleshooting.php:1105
1359
  msgid "The .htaccess file(s) may blocking AJAX calls of the live search"
1360
  msgstr ""
1361
 
1362
- #: includes/Settings.php:451
1363
  msgid ""
1364
  "The Details panel is an additional container for extended information. The "
1365
  "details are changed dynamically when a user mouse over one of the "
@@ -1373,18 +1468,18 @@ msgid ""
1373
  "mean a lot to me if you %ssupport it with a quick review on WordPress.org.%s"
1374
  msgstr ""
1375
 
1376
- #: partials/admin/indexer-header.php:38
1377
  msgid "The following error caused the index to be canceled:"
1378
  msgstr ""
1379
 
1380
- #: includes/Admin/Troubleshooting.php:334
1381
  msgid ""
1382
  "The Indexer uses the WordPress function <code>wp_remote_post()</code> to "
1383
  "build the index in background. Sometimes the server can block this kind of "
1384
  "request and responses with HTTP 401 Unauthorized or 403 Forbidden errors."
1385
  msgstr ""
1386
 
1387
- #: includes/Admin/Troubleshooting.php:756
1388
  #, php-format
1389
  msgid "The Jetpack Search module is incompatible with the %s plugin."
1390
  msgstr ""
@@ -1400,24 +1495,37 @@ msgstr ""
1400
  msgid "the next index rebuild: %s"
1401
  msgstr ""
1402
 
1403
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:616
1404
  msgid "The search index could not be built."
1405
  msgstr ""
1406
 
1407
  #: partials/admin/indexer-header-demo.php:11
1408
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:622
1409
  msgid "The search index does not exist yet. Build it now."
1410
  msgstr ""
1411
 
1412
- #: includes/Admin/Troubleshooting.php:680
1413
  msgid "The search index structure isn't completely"
1414
  msgstr ""
1415
 
1416
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:611
 
 
 
 
 
 
1417
  msgid "The search index was built successfully."
1418
  msgstr ""
1419
 
1420
- #: includes/Admin/Troubleshooting.php:948
 
 
 
 
 
 
 
1421
  msgid ""
1422
  "The search uses a dedicated URL to makes queries. In your case, this URL is "
1423
  "blocked for some reason. Let visit it directly in your browser:"
@@ -1427,18 +1535,26 @@ msgstr ""
1427
  msgid "The search will open in overlay on mobile"
1428
  msgstr ""
1429
 
1430
- #: includes/Admin/Troubleshooting.php:945
1431
  msgid ""
1432
  "The server returns an incorrect response for the search engine's AJAX calls"
1433
  msgstr ""
1434
 
1435
- #: includes/Settings.php:615
1436
  msgid ""
1437
  "The synonyms feature allows your users to find more relevant results. If "
1438
  "your products have alternative names and users often misspell them, consider "
1439
  "adding synonyms."
1440
  msgstr ""
1441
 
 
 
 
 
 
 
 
 
1442
  #: includes/Integrations/Themes/TheGem/TheGem.php:79
1443
  msgid "TheGem Theme"
1444
  msgstr ""
@@ -1447,27 +1563,27 @@ msgstr ""
1447
  msgid "There are four easy ways to display the search bar in your theme"
1448
  msgstr ""
1449
 
1450
- #: includes/Admin/Troubleshooting.php:952
1451
  msgid ""
1452
  "Think about what can block the execution of PHP scripts inside <code>wp-"
1453
  "content</code> or <code>wp-content/plugins</code> directory. Maybe you use "
1454
  "some security plugins or you have custom code that may block it."
1455
  msgstr ""
1456
 
1457
- #: includes/Admin/Troubleshooting.php:333
1458
  msgid ""
1459
  "This issue may affect the building of the search index. Indexer may stuck at "
1460
  "0%."
1461
  msgstr ""
1462
 
1463
- #: includes/Admin/Troubleshooting.php:329
1464
  msgid ""
1465
  "This issue may affect the search results page and e.g. display all products "
1466
  "every time"
1467
  msgstr ""
1468
 
1469
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:594
1470
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:600
1471
  msgid "This process will continue in the background. You can leave this page!"
1472
  msgstr ""
1473
 
@@ -1494,16 +1610,20 @@ msgstr ""
1494
  msgid "To set 100% width leave blank"
1495
  msgstr ""
1496
 
1497
- #: includes/Admin/Troubleshooting.php:1234
 
 
 
 
1498
  msgid "TranslatePress"
1499
  msgstr ""
1500
 
1501
- #: includes/Admin/Troubleshooting.php:47 includes/Admin/Troubleshooting.php:66
1502
- #: partials/admin/indexer-header.php:35
1503
  msgid "Troubleshooting"
1504
  msgstr ""
1505
 
1506
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:650
1507
  msgid "Try to build the index again."
1508
  msgstr ""
1509
 
@@ -1541,27 +1661,27 @@ msgstr ""
1541
  msgid "Using PHP - %s"
1542
  msgstr ""
1543
 
1544
- #: includes/Admin/Troubleshooting.php:1277
1545
  msgid "Valid search results test"
1546
  msgstr ""
1547
 
1548
- #: includes/Helpers.php:963
1549
  msgid "Vendor"
1550
  msgstr ""
1551
 
1552
- #: includes/Helpers.php:970
1553
  msgid "Vendors"
1554
  msgstr ""
1555
 
1556
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:599
1557
  msgid "Wait... Indexing in progress"
1558
  msgstr ""
1559
 
1560
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:593
1561
  msgid "Wait... Preparing indexing in progress"
1562
  msgstr ""
1563
 
1564
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:605
1565
  msgid "Wait... The index build process is canceling"
1566
  msgstr ""
1567
 
@@ -1569,7 +1689,7 @@ msgstr ""
1569
  msgid "Warning!"
1570
  msgstr ""
1571
 
1572
- #: includes/Admin/Troubleshooting.php:1107
1573
  #, php-format
1574
  msgid ""
1575
  "We recommend contact your hosting provider and ask to check <code>%s</code> "
@@ -1585,11 +1705,11 @@ msgid ""
1585
  "We support this theme and you can easily replace all default search bars."
1586
  msgstr ""
1587
 
1588
- #: includes/Settings.php:672
1589
  msgid "weekly"
1590
  msgstr ""
1591
 
1592
- #: includes/Admin/Troubleshooting.php:947
1593
  msgid "What's wrong?"
1594
  msgstr ""
1595
 
@@ -1601,45 +1721,56 @@ msgstr ""
1601
  msgid "with simple tricks"
1602
  msgstr ""
1603
 
1604
- #: includes/Admin/Troubleshooting.php:1267
1605
  msgid "WooCommerce Multilingual"
1606
  msgstr ""
1607
 
1608
- #: includes/Admin/Troubleshooting.php:796
1609
  msgid "WooCommerce Multilingual plugin is enabled but not effective"
1610
  msgstr ""
1611
 
1612
- #: includes/Admin/Troubleshooting.php:1242
1613
  msgid "WordPress loading problem"
1614
  msgstr ""
1615
 
1616
- #: includes/Admin/Troubleshooting.php:398
1617
- #: includes/Admin/Troubleshooting.php:1203
1618
  msgid "WordPress version"
1619
  msgstr ""
1620
 
1621
- #: includes/Admin/Troubleshooting.php:211
 
 
 
 
1622
  msgid "You are using one or more incompatible plugins"
1623
  msgstr ""
1624
 
1625
- #: includes/Admin/Troubleshooting.php:252
1626
  msgid "You are using TranslatePress with Free version of our plugin"
1627
  msgstr ""
1628
 
1629
- #: includes/Admin/Troubleshooting.php:635
 
 
 
 
 
 
 
1630
  msgid ""
1631
  "You can run these actions manually via Advanced Cron Manager. Then the "
1632
  "Indexer should run. If the index stuck again, run these actions manually one "
1633
  "more time until the finished index."
1634
  msgstr ""
1635
 
1636
- #: includes/Admin/Troubleshooting.php:1183
1637
  msgid ""
1638
  "You need to log in to your <a href=\"https://login.sucuri.net\" "
1639
  "target=\"_blank\">Sucuri panel</a>."
1640
  msgstr ""
1641
 
1642
- #: includes/Admin/Troubleshooting.php:950
1643
  msgid ""
1644
  "You should see <code>pong</code> word as a response. Probably you see "
1645
  "something else."
@@ -1650,16 +1781,16 @@ msgstr ""
1650
  msgid "You use %s plugin version %s"
1651
  msgstr ""
1652
 
1653
- #: includes/Admin/Troubleshooting.php:231
1654
- #: includes/Admin/Troubleshooting.php:233
1655
  #, php-format
1656
  msgid ""
1657
  "You use the %s plugin, which may cause errors in the search results returned "
1658
  "by our plugin."
1659
  msgstr ""
1660
 
1661
- #: includes/Admin/Troubleshooting.php:222
1662
- #: includes/Admin/Troubleshooting.php:226
1663
  #, php-format
1664
  msgid "You use the %s plugin. The %s does not support this plugin."
1665
  msgstr ""
@@ -1669,7 +1800,7 @@ msgstr ""
1669
  msgid "You use the <b>%s</b> theme%s. Fantastic!"
1670
  msgstr ""
1671
 
1672
- #: includes/Admin/Troubleshooting.php:797
1673
  #, php-format
1674
  msgid ""
1675
  "You use the WPML Multilingual CMS and WooCommerce Multilingual plugins, but "
@@ -1677,7 +1808,7 @@ msgid ""
1677
  "target=\"_blank\">WooCommerce Multilingual status</a>."
1678
  msgstr ""
1679
 
1680
- #: includes/Admin/Troubleshooting.php:792
1681
  #, php-format
1682
  msgid ""
1683
  "You use the WPML Multilingual CMS plugin and to correctly search for "
@@ -1685,18 +1816,18 @@ msgid ""
1685
  "target=\"_blank\">WooCommerce Multilingual</a> plugin."
1686
  msgstr ""
1687
 
1688
- #: includes/Admin/Troubleshooting.php:341
1689
  msgid "Your server can't send an HTTP request to itself"
1690
  msgstr ""
1691
 
1692
- #: includes/Admin/Troubleshooting.php:447
1693
  msgid "Your settings should looks like the picture below:"
1694
  msgstr ""
1695
 
1696
- #: includes/Admin/Troubleshooting.php:276
1697
  msgid "Your site can perform loopback requests"
1698
  msgstr ""
1699
 
1700
- #: includes/Admin/Troubleshooting.php:325
1701
  msgid "Your site could not complete a loopback request"
1702
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2021-05-19 14:23+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: Damian Góra <support@fibosearch.com>\n"
9
  "Language-Team: \n"
44
  msgid "%s Theme"
45
  msgstr ""
46
 
47
+ #: includes/Admin/RegenerateImages.php:101
48
  #, php-format
49
  msgid ""
50
  "%s: it is recommended to generate a special small image size for existing "
59
  "using PHP version "
60
  msgstr ""
61
 
62
+ #: includes/Settings.php:732 includes/Settings.php:794
63
  msgid "-- Disabled"
64
  msgstr ""
65
 
66
+ #: partials/admin/indexer-header.php:73
67
+ #, php-format
68
  msgid ""
69
+ "<b>Maybe your server can’t send an HTTP requests to itself</b>. Visit the "
70
+ "documentation and read the section <a target=\"_blank\" href=\"%s\">“Your "
71
+ "server can’t send an HTTP request to itself”</a>."
72
  msgstr ""
73
 
74
+ #: partials/admin/features.php:19
 
75
  msgid ""
76
+ "<b>New Ultra-Fast Search Engine</b> works very fast even with 100,000+ "
77
+ "products "
78
  msgstr ""
79
 
80
+ #: includes/Admin/Troubleshooting.php:641
81
  msgid ""
82
  "A real solution is to find the reason why the WP-Cron doesn’t work and fix "
83
  "it."
84
  msgstr ""
85
 
86
+ #: includes/Admin/Troubleshooting.php:1145
87
  msgid "A search engine's AJAX call did not return valid results"
88
  msgstr ""
89
 
90
+ #: includes/Admin/Troubleshooting.php:843
91
+ #, php-format
92
+ msgid ""
93
+ "Add a constant <code>%s</code> to your <code>wp-config.phps</code> file."
94
+ msgstr ""
95
+
96
+ #: partials/admin/indexer-header.php:58
97
+ msgid ""
98
+ "Add below code to your child theme’s <em>functions.php</em> file or via a "
99
+ "plugin that allows custom functions to be added, such as the <a href=\"https:"
100
+ "//wordpress.org/plugins/code-snippets/\" target=\"_blank\">Code snippets</a> "
101
+ "plugin. Please don’t add custom code directly to your parent theme’s "
102
+ "functions.php file as this will be wiped entirely when you update the theme."
103
+ msgstr ""
104
+
105
  #: includes/EmbeddingViaMenu.php:150
106
  msgid "Add FiboSearch as a menu item."
107
  msgstr ""
108
 
109
+ #: includes/Admin/SettingsAPI.php:525 includes/Admin/SettingsAPI.php:626
110
  msgid "Add new rule"
111
  msgstr ""
112
 
113
+ #: includes/Admin/Troubleshooting.php:1308
114
  msgid "Add the following URL to the white list:"
115
  msgstr ""
116
 
117
+ #: includes/Admin/Troubleshooting.php:1258
118
  msgid ""
119
  "Adding extra rules to <code>/usr/local/nginx/conf/wpsecure_${vhostname}."
120
  "conf</code>"
129
  msgid "AJAX (live) search form for WooCommerce"
130
  msgstr ""
131
 
132
+ #: includes/Settings.php:825
133
  msgid "AJAX Search for WooCommerce rebrands to FiboSearch"
134
  msgstr ""
135
 
161
  msgid "Alternative ways to embed a search bar"
162
  msgstr ""
163
 
164
+ #: includes/Admin/Troubleshooting.php:721
165
  #, php-format
166
  msgid ""
167
  "An error occurred while trying to connect to the database using a PDO_MYSQL "
195
  msgid "As a widget - go to the %s and choose “FiboSearch bar”"
196
  msgstr ""
197
 
198
+ #: includes/Admin/SettingsAPI.php:584
199
  #, php-format
200
  msgid "Attributes: %s"
201
  msgstr ""
204
  msgid "Autocomplete"
205
  msgstr ""
206
 
207
+ #: includes/Integrations/Brands.php:182 includes/Integrations/Brands.php:204
208
  #, php-format
209
+ msgid "Based on the plugin %s"
210
  msgstr ""
211
 
212
  #: includes/Settings.php:183 includes/Settings.php:333
213
  msgid "Basic"
214
  msgstr ""
215
 
216
+ #: includes/Admin/Troubleshooting.php:1404
217
  msgid "Blocked search endpoint test"
218
  msgstr ""
219
 
220
+ #: includes/Settings.php:541
221
  msgid "Border color"
222
  msgstr ""
223
 
224
+ #: includes/Helpers.php:978
225
  msgid "Brand"
226
  msgstr ""
227
 
228
+ #: includes/Helpers.php:985
229
  msgid "Brands"
230
  msgstr ""
231
 
234
  msgstr ""
235
 
236
  #: partials/admin/indexer-header-demo.php:15
237
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:675
238
  msgid "Build index"
239
  msgstr ""
240
 
241
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:624
242
  msgid "Canceling..."
243
  msgstr ""
244
 
259
  msgid "Colors"
260
  msgstr ""
261
 
262
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:634
263
  msgid "Completed. Works."
264
  msgstr ""
265
 
266
+ #: includes/Admin/SettingsAPI.php:723
267
  msgid "Contact"
268
  msgstr ""
269
 
270
+ #: partials/admin/indexer-header.php:51
271
+ msgid ""
272
+ "Contact your hosting provider and ask for increasing the value of the <code>"
273
+ "max_connections</code> variable in your MySQL server. It will definitely "
274
+ "solve the problem."
275
+ msgstr ""
276
+
277
+ #: includes/Helpers.php:994
278
  msgid "continue reading"
279
  msgstr ""
280
 
281
+ #: includes/Admin/Troubleshooting.php:601
282
  #, php-format
283
  msgid ""
284
  "Could not load <code>wp-load.php</code> from the locations it normally is. "
286
  "support</a>."
287
  msgstr ""
288
 
289
+ #: includes/Admin/Troubleshooting.php:600
290
  msgid "Custom location of wp-load.php file"
291
  msgstr ""
292
 
293
+ #: includes/Settings.php:692
294
  msgid "daily"
295
  msgstr ""
296
 
 
 
 
 
297
  #: partials/admin/indexer-body.php:46
298
  msgid "DB"
299
  msgstr ""
302
  msgid "Default"
303
  msgstr ""
304
 
305
+ #: includes/Admin/Troubleshooting.php:1180
306
  msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
307
  msgstr ""
308
 
309
+ #: includes/Settings.php:453
310
  msgid "Details panel"
311
  msgstr ""
312
 
313
+ #: includes/Admin/Troubleshooting.php:268
314
  #, php-format
315
  msgid ""
316
  "Due to the way the TranslatePress - Multilingual plugin works, we can only "
318
  "version</a>."
319
  msgstr ""
320
 
321
+ #: includes/Admin/Troubleshooting.php:729
322
  msgid ""
323
  "Edit <code>wp-config.php</code> file, find the <code>DB_HOST</code> constant,"
324
  " and change its value from <code>localhost</code> to <code>127.0.0.1</code>."
325
  msgstr ""
326
 
327
+ #: includes/Settings.php:679
328
  msgid "Enable Scheduler"
329
  msgstr ""
330
 
333
  msgid "End"
334
  msgstr ""
335
 
336
+ #: partials/admin/indexer-header.php:43
337
+ #, php-format
338
+ msgid "Error code %s"
339
+ msgstr ""
340
+
341
+ #: includes/Admin/Troubleshooting.php:720
342
  msgid "Error establishing a database connection"
343
  msgstr ""
344
 
345
+ #: includes/Admin/Troubleshooting.php:920
346
+ #, php-format
347
+ msgid "Error type: <strong>%s</strong>"
348
+ msgstr ""
349
+
350
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:639
351
  msgid "Errors"
352
  msgstr ""
353
 
354
+ #: includes/Settings.php:643 includes/Settings.php:754
355
+ msgid "Exclude"
356
  msgstr ""
357
 
358
+ #: includes/Settings.php:639 includes/Settings.php:750
359
+ msgid ""
360
+ "Exclude the product group from the search results or allow search only among "
361
+ "the indicated product group"
362
  msgstr ""
363
 
364
+ #: includes/Settings.php:605
365
  msgid "Exclude “out of stock” products"
366
  msgstr ""
367
 
368
+ #: includes/Settings.php:632 includes/Settings.php:743
369
+ msgid "Exclude/include products"
370
+ msgstr ""
371
+
372
+ #: includes/Admin/Troubleshooting.php:502
373
  msgid "Extensions should looks like the picture below:"
374
  msgstr ""
375
 
394
  msgid "FiboSearch Pro - Upgrade Now"
395
  msgstr ""
396
 
397
+ #. Author of the plugin
398
+ msgid "FiboSearch Team"
399
+ msgstr ""
400
+
401
+ #: includes/Admin/Troubleshooting.php:722
402
  msgid ""
403
  "FiboSearch uses a PDO_MYSQL driver in the search engine. A proper database "
404
  "connection is required."
405
  msgstr ""
406
 
407
+ #: includes/Settings.php:638 includes/Settings.php:749
408
+ msgid "Filtering mode"
409
+ msgstr ""
410
+
411
+ #: includes/Settings.php:650 includes/Settings.php:761
412
  msgid "Filters"
413
  msgstr ""
414
 
415
+ #: includes/Settings.php:651 includes/Settings.php:762
416
+ msgid ""
417
+ "Filters that specify the product group that will be affected by the above "
418
+ "mode"
419
+ msgstr ""
420
+
421
  #: partials/admin/indexer-body.php:21
422
  #, php-format
423
  msgid "Finalization... Wait a moment. (%s products)"
424
  msgstr ""
425
 
426
+ #: includes/Admin/Troubleshooting.php:1307
427
  msgid "Find section <code>Access Control -> whitelist URL</code>"
428
  msgstr ""
429
 
431
  msgid "Flatsome Theme"
432
  msgstr ""
433
 
434
+ #: includes/Settings.php:611
435
  msgid "Fuzziness"
436
  msgstr ""
437
 
438
+ #: includes/Settings.php:727 includes/Settings.php:789
439
  msgid "Fuzzy matching"
440
  msgstr ""
441
 
443
  msgid "Fuzzy search"
444
  msgstr ""
445
 
446
+ #: includes/Admin/Troubleshooting.php:348
447
  #, php-format
448
  msgid ""
449
  "Go to <a href=\"%s\" target=\"_blank\">Tools -> Site Health</a> in your "
459
  "Header -> Search</code> and enable <code>Predictive Search</code>"
460
  msgstr ""
461
 
462
+ #: includes/Admin/Troubleshooting.php:1182
463
  #, php-format
464
  msgid ""
465
  "Go to <code>Defender -> Security Tweaks -> <a href=\"%s\" target=\"_blank\">"
467
  "exceptions: <code>%s</code>"
468
  msgstr ""
469
 
470
+ #: includes/Admin/Troubleshooting.php:544
471
  #, php-format
472
  msgid ""
473
  "Go to <code>Security -> Settings -> <a href=\"%s\" target=\"_blank\">System "
474
  "Tweaks</a></code> and uncheck <code>Disable PHP in Plugins</code> option."
475
  msgstr ""
476
 
477
+ #: includes/Admin/Troubleshooting.php:451
478
  #, php-format
479
  msgid ""
480
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
482
  "option <code>%s</code>."
483
  msgstr ""
484
 
485
+ #: includes/Admin/Troubleshooting.php:501
486
  #, php-format
487
  msgid ""
488
  "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
490
  "Searching by Text</code> extension and save changes."
491
  msgstr ""
492
 
493
+ #: includes/Admin/Troubleshooting.php:762
494
  #, php-format
495
  msgid ""
496
  "Go to the <code>Jetpack settings page -> <a href=\"%s\" target=\"_blank\">"
497
  "Performance tab</a> -> disable the Search module</code>"
498
  msgstr ""
499
 
500
+ #: includes/Admin/Troubleshooting.php:687
501
+ #: includes/Admin/Troubleshooting.php:844
502
  #, php-format
503
  msgid "Go to the Indexer tab and click the button <i>%s</i>."
504
  msgstr ""
505
 
506
+ #: includes/Admin/Troubleshooting.php:1306
507
  msgid "Go to the settings"
508
  msgstr ""
509
 
510
+ #: includes/Admin/Troubleshooting.php:412
511
  msgid "Great! Our plugin works great with this version of WordPress."
512
  msgstr ""
513
 
521
  msgid "Group results"
522
  msgstr ""
523
 
524
+ #: includes/Settings.php:735 includes/Settings.php:797
525
  msgid "Hard"
526
  msgstr ""
527
 
528
+ #: includes/Admin/Troubleshooting.php:1257
529
  msgid "Here are few samples NGINX config which helps other users:"
530
  msgstr ""
531
 
543
  "time now, and I hope you like it!"
544
  msgstr ""
545
 
546
+ #: partials/admin/indexer-header.php:90
547
  msgid "Hide details"
548
  msgstr ""
549
 
550
+ #: includes/Settings.php:534
551
  msgid "Highlight color"
552
  msgstr ""
553
 
570
  msgid "Icon on mobile, search bar on desktop"
571
  msgstr ""
572
 
573
+ #: includes/Admin/Troubleshooting.php:875
574
+ #, php-format
575
+ msgid ""
576
+ "If the following errors are related to your theme or plugins, try to fix "
577
+ "them yourself or contact your developers. Otherwise, please <a href=\"%s\" "
578
+ "target=\"_blank\">create a support ticket</a>."
579
+ msgstr ""
580
+
581
+ #: partials/admin/indexer-header.php:76
582
  msgid ""
583
  "If the indexer still doesn't work, add a constant <code>"
584
  "define('DGWT_WCAS_INDEXER_MODE', 'sync');</code> to your <code>wp-config."
591
  "Help your customers to find the right products even <span>10× faster</span>."
592
  msgstr ""
593
 
594
+ #: includes/Admin/Troubleshooting.php:921
595
+ msgid ""
596
+ "If you have an object caching plugin, turn it off or check its settings. "
597
+ "Ideally, the transients should not be cached in any way and stored directly "
598
+ "in the database."
599
+ msgstr ""
600
+
601
+ #: partials/admin/indexer-header.php:53
602
  msgid ""
603
  "If you see the <b>Troubleshooting tab</b> above, click it and try to solve "
604
  "the issues mentioned there"
608
  msgid "Impreza Theme"
609
  msgstr ""
610
 
611
+ #: includes/Helpers.php:993
612
  msgctxt "in categories fe. in Books > Crime stories"
613
  msgid "in"
614
  msgstr ""
615
 
616
+ #: includes/Settings.php:680
617
  msgid ""
618
  "In most cases, you don't need to use the scheduler because the search index "
619
  "updates when you edit products. If you use import tools or custom code to "
621
  "helpful."
622
  msgstr ""
623
 
624
+ #: includes/Settings.php:644 includes/Settings.php:755
625
+ msgid "Include"
626
+ msgstr ""
627
+
628
+ #: includes/Admin/Troubleshooting.php:499
629
  msgid ""
630
  "Incompatible \"Searching by Text\" extension from WOOF - WooCommerce "
631
  "Products Filter plugin is active"
632
  msgstr ""
633
 
634
+ #: includes/Admin/Troubleshooting.php:1341
635
  msgid ""
636
  "Incompatible \"Searching by Text\" extension in WOOF - WooCommerce Products "
637
  "Filter"
638
  msgstr ""
639
 
640
+ #: includes/Admin/Troubleshooting.php:1333
641
  msgid "Incompatible plugins"
642
  msgstr ""
643
 
644
+ #: includes/Admin/Troubleshooting.php:840
645
+ msgid "Incompatible WPML Multilingual CMS plugin setting"
646
+ msgstr ""
647
+
648
+ #: includes/Admin/Troubleshooting.php:449
649
+ #: includes/Admin/Troubleshooting.php:1337
650
  msgid "Incorrect \"Add to cart\" behaviour in WooCommerce settings"
651
  msgstr ""
652
 
654
  msgid "Increase sales"
655
  msgstr ""
656
 
657
+ #: includes/Settings.php:708
658
  msgid "Increases sales conversions"
659
  msgstr ""
660
 
666
  msgid "Index build start"
667
  msgstr ""
668
 
669
+ #: includes/Admin/Troubleshooting.php:1374
670
  msgid "Index completeness test"
671
  msgstr ""
672
 
673
+ #: includes/Settings.php:771 includes/Settings.php:805
674
  msgid "Index status"
675
  msgstr ""
676
 
697
  msgid "Individual tips and support by FiboSearch team"
698
  msgstr ""
699
 
700
+ #: includes/Admin/Troubleshooting.php:638
701
  msgid ""
702
  "Install the <a target=\"_blank\" href=\"https://wordpress."
703
  "org/plugins/advanced-cron-manager/\">Advanced Cron Manager</a> plugin to "
705
  "related to the Indexer:"
706
  msgstr ""
707
 
708
+ #: includes/Admin/Troubleshooting.php:415
709
  msgid ""
710
  "Install the latest version of WordPress for our plugin to work as best it "
711
  "can!"
712
  msgstr ""
713
 
714
+ #: includes/Settings.php:688
715
  msgid "Interval"
716
  msgstr ""
717
 
718
+ #: partials/admin/indexer-header.php:79
719
+ #, php-format
720
+ msgid ""
721
+ "Is it still not working? Visit the <a target=\"_blank\" href=\"%s\">"
722
+ "documentation</a> or write a <a target=\"_blank\" href=\"%s\">support "
723
+ "request</a>"
724
+ msgstr ""
725
+
726
+ #: includes/Admin/Troubleshooting.php:357
727
  #, php-format
728
  msgid ""
729
  "Is it still not working? Write a <a target=\"_blank\" href=\"%s\">support "
730
  "request</a>"
731
  msgstr ""
732
 
733
+ #: includes/Admin/Troubleshooting.php:351
734
  msgid ""
735
  "Is your website publicly available only for whitelisted IPs? <b>Add your "
736
  "server IP to the whitelist</b>. That’s all. This is a common mistake when "
739
  "requests to itself."
740
  msgstr ""
741
 
742
+ #: includes/Admin/Troubleshooting.php:615
743
+ #: includes/Admin/Troubleshooting.php:1369
744
  msgid "Issue with WP-Cron"
745
  msgstr ""
746
 
747
+ #: includes/Admin/Troubleshooting.php:542
748
  msgid "iThemes Security plugin blocks AJAX requests"
749
  msgstr ""
750
 
751
+ #: includes/Admin/Troubleshooting.php:1384
752
  msgid "Jetpack search module"
753
  msgstr ""
754
 
757
  msgid "Last build %s"
758
  msgstr ""
759
 
760
+ #: widget.php:43 includes/Settings.php:228 includes/Settings.php:234
761
+ #: includes/EmbeddingViaMenu.php:74
762
  msgid "Layout"
763
  msgstr ""
764
 
 
 
 
 
765
  #: includes/Settings.php:339
766
  msgid "Limit"
767
  msgstr ""
770
  msgid "Logs"
771
  msgstr ""
772
 
773
+ #: includes/Admin/Troubleshooting.php:1347
774
  msgid "Loopback request"
775
  msgstr ""
776
 
777
+ #: partials/admin/search-preview.php:150 partials/admin/search-preview.php:195
778
  msgid ""
779
  "Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. "
780
  "Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin "
797
  msgid "maximum number of suggestions"
798
  msgstr ""
799
 
800
+ #: includes/Admin/Troubleshooting.php:1075
801
  msgid ""
802
  "Maybe your server blocks it by Apache module <code>mod_security</code>. "
803
  "Contact your hosting provider and ask what can block the URL you see above."
815
  msgid "Minimum characters"
816
  msgstr ""
817
 
818
+ #: includes/Admin/Troubleshooting.php:796
819
  msgid "Missing plugin: WooCommerce Multilingual"
820
  msgstr ""
821
 
833
  msgid "More results label"
834
  msgstr ""
835
 
836
+ #: includes/Admin/SettingsAPI.php:730
837
  msgid "My Account"
838
  msgstr ""
839
 
840
+ #: includes/Settings.php:833
841
  msgid "New plugin name"
842
  msgstr ""
843
 
844
+ #: includes/Settings.php:820
845
  msgid "News"
846
  msgstr ""
847
 
848
+ #: includes/Admin/Troubleshooting.php:1254
849
  msgid "NGINX configuration may blocks search requests"
850
  msgstr ""
851
 
852
+ #: includes/Settings.php:357 includes/Helpers.php:995
853
  msgid "No results"
854
  msgstr ""
855
 
856
+ #: includes/Admin/SettingsAPI.php:523 includes/Admin/SettingsAPI.php:622
857
  msgid "No rules"
858
  msgstr ""
859
 
861
  msgid "No thanks"
862
  msgstr ""
863
 
864
+ #: includes/Admin/Troubleshooting.php:1399
865
+ msgid "Non Critical Indexer Errors"
866
+ msgstr ""
867
+
868
  #: includes/Settings.php:410
869
  msgid "Non-products in autocomplete"
870
  msgstr ""
871
 
872
+ #: includes/Settings.php:734 includes/Settings.php:796
873
  msgid "Normal"
874
  msgstr ""
875
 
876
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:645
877
  msgid "Not exist"
878
  msgstr ""
879
 
881
  msgid "Note: We currently only support the header type: \"Header 10\""
882
  msgstr ""
883
 
884
+ #: includes/Admin/Troubleshooting.php:373
885
  msgid "One or more required PHP extensions are missing on your server"
886
  msgstr ""
887
 
889
  msgid "Overlay on mobile"
890
  msgstr ""
891
 
892
+ #: includes/Admin/Troubleshooting.php:1379
893
  msgid "PDO connection test"
894
  msgstr ""
895
 
896
+ #: includes/Admin/Troubleshooting.php:1329
897
  msgid "PHP extensions"
898
  msgstr ""
899
 
913
  msgid "Pro"
914
  msgstr ""
915
 
916
+ #: includes/Settings.php:660
917
  msgid "Pro features"
918
  msgstr ""
919
 
920
+ #: includes/Admin/Troubleshooting.php:913
921
+ msgid "Problem with WordPress Transients API"
922
+ msgstr ""
923
+
924
  #: partials/admin/troubleshooting.php:11
925
  msgid "Processing asynchronous tests..."
926
  msgstr ""
927
 
928
+ #: includes/Admin/SettingsAPI.php:579
929
  msgid "Product categories"
930
  msgstr ""
931
 
932
+ #: includes/Admin/SettingsAPI.php:581
933
  msgid "Product tags"
934
  msgstr ""
935
 
941
  msgid "Products search"
942
  msgstr ""
943
 
944
+ #: includes/Settings.php:550
945
  msgid "Products search scope"
946
  msgstr ""
947
 
955
  msgid "px"
956
  msgstr ""
957
 
958
+ #: includes/Settings.php:827
959
  msgid "Read more"
960
  msgstr ""
961
 
962
+ #: includes/Admin/Troubleshooting.php:356
963
  #, php-format
964
  msgid ""
965
  "Read more about indexer issues on <a target=\"_blank\" href=\"%s\">our "
966
+ "documentation</a> and read the section “Your server can’t send an HTTP "
967
+ "request to itself”."
968
  msgstr ""
969
 
970
  #: partials/admin/indexer-body.php:90
971
  msgid "Readable"
972
  msgstr ""
973
 
974
+ #: includes/Admin/Troubleshooting.php:681
975
+ #: includes/Admin/Troubleshooting.php:837
976
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:669
977
  msgid "Rebuild index"
978
  msgstr ""
979
 
1023
  msgid "Replace a search bar in TheGem "
1024
  msgstr ""
1025
 
1026
+ #: includes/Abstracts/ThemeIntegration.php:63
1027
  #: includes/Integrations/Themes/Shopical/Shopical.php:57
1028
  #: includes/Integrations/Themes/Enfold/Enfold.php:64
1029
  #: includes/Integrations/Themes/Sober/Sober.php:57
1061
  msgid "Replace the TheGem default search"
1062
  msgstr ""
1063
 
1064
+ #: includes/Admin/Troubleshooting.php:383
1065
+ #: includes/Admin/Troubleshooting.php:386
1066
  #, php-format
1067
  msgid "Required PHP extension: %s"
1068
  msgstr ""
1069
 
1070
+ #: includes/Admin/Troubleshooting.php:1147
1071
  msgid "Response body"
1072
  msgstr ""
1073
 
1074
+ #: includes/Settings.php:709
1075
  msgid ""
1076
  "returns suggestions based on likely relevance, even though a search keyword "
1077
  "may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
1083
  msgid "Review %s"
1084
  msgstr ""
1085
 
1086
+ #: partials/admin/search-preview.php:77
1087
  msgid "Sample brand <strong>name</strong>"
1088
  msgstr ""
1089
 
1090
+ #: partials/admin/search-preview.php:93
1091
  msgid "Sample category <strong>name</strong>"
1092
  msgstr ""
1093
 
1094
+ #: partials/admin/search-preview.php:132
1095
  msgid "Sample page <strong>name</strong>"
1096
  msgstr ""
1097
 
1098
+ #: partials/admin/search-preview.php:119
1099
  msgid "Sample post <strong>name</strong>"
1100
  msgstr ""
1101
 
1102
+ #: partials/admin/search-preview.php:148
1103
  msgid "Sample product <strong>name</strong>"
1104
  msgstr ""
1105
 
1106
+ #: partials/admin/search-preview.php:184
1107
  msgid "Sample product name"
1108
  msgstr ""
1109
 
1110
+ #: partials/admin/search-preview.php:106
1111
  msgid "Sample tag <strong>name</strong>"
1112
  msgstr ""
1113
 
1114
+ #: includes/Settings.php:699
1115
  msgid "Schedule time"
1116
  msgstr ""
1117
 
1118
+ #: includes/Settings.php:673
1119
  msgid "Scheduling indexing"
1120
  msgstr ""
1121
 
1144
  msgid "Search for posts and pages"
1145
  msgstr ""
1146
 
1147
+ #: includes/Settings.php:224 includes/Helpers.php:998
1148
  msgid "Search for products..."
1149
  msgstr ""
1150
 
1157
  msgid "Search icon color"
1158
  msgstr ""
1159
 
1160
+ #: includes/Settings.php:577 partials/admin/features.php:23
1161
  msgid "Search in attributes"
1162
  msgstr ""
1163
 
1165
  msgid "Search in attributes and variation products SKUs (option)"
1166
  msgstr ""
1167
 
1168
+ #: includes/Integrations/Brands.php:187
1169
  msgid "Search in brands"
1170
  msgstr ""
1171
 
1173
  msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
1174
  msgstr ""
1175
 
1176
+ #: includes/Settings.php:584 partials/admin/features.php:24
1177
  msgid "Search in categories"
1178
  msgstr ""
1179
 
1180
+ #: includes/Settings.php:598 includes/Settings.php:718
1181
  #: partials/admin/features.php:22
1182
  msgid "Search in custom fields"
1183
  msgstr ""
1184
 
1185
+ #: includes/Settings.php:556
1186
  msgid "Search in description"
1187
  msgstr ""
1188
 
1189
+ #: includes/Settings.php:562
1190
  msgid "Search in short description"
1191
  msgstr ""
1192
 
1193
+ #: includes/Settings.php:568
1194
  msgid "Search in SKU"
1195
  msgstr ""
1196
 
1197
+ #: includes/Settings.php:591 partials/admin/features.php:25
1198
  msgid "Search in tags"
1199
  msgstr ""
1200
 
1230
  msgid "Searchable"
1231
  msgstr ""
1232
 
1233
+ #: includes/Settings.php:570
1234
  msgid "searching also in variable products SKU"
1235
  msgstr ""
1236
 
1237
+ #: includes/Settings.php:571
1238
  #, php-format
1239
  msgid ""
1240
  "Searching in variable products SKU is available only in <a target=\"_blank\" "
1245
  msgid "See a comparison of all free and premium features!"
1246
  msgstr ""
1247
 
1248
+ #: includes/Settings.php:406 includes/Helpers.php:996 includes/Helpers.php:997
1249
  msgid "See all products..."
1250
  msgstr ""
1251
 
1252
+ #: includes/Admin/SettingsAPI.php:577
1253
  msgid "Select filter type"
1254
  msgstr ""
1255
 
1256
+ #: includes/Settings.php:721
1257
  msgid "select the custom fields you want to add to the search scope"
1258
  msgstr ""
1259
 
1260
+ #: includes/Admin/Troubleshooting.php:1510
1261
  msgid "Server environment"
1262
  msgstr ""
1263
 
1264
+ #: includes/Admin/Troubleshooting.php:1068
1265
+ #: includes/Admin/Troubleshooting.php:1146
1266
  #, php-format
1267
  msgid ""
1268
  "Server response with message <code>%s</code> and status code <code>%s</code>."
1277
  msgid "Show advanced settings"
1278
  msgstr ""
1279
 
1280
+ #: includes/Integrations/Brands.php:209
1281
  msgid "Show brands"
1282
  msgstr ""
1283
 
1286
  msgstr ""
1287
 
1288
  #: partials/admin/indexer-header-demo.php:16
1289
+ #: partials/admin/indexer-header.php:89
1290
  msgid "Show details"
1291
  msgstr ""
1292
 
1293
+ #: includes/Settings.php:459
1294
  msgid "Show Details panel"
1295
  msgstr ""
1296
 
1297
+ #: includes/Settings.php:423 includes/Settings.php:427
1298
+ #: includes/Integrations/Brands.php:218 includes/Integrations/Brands.php:222
1299
+ msgid "show images"
1300
+ msgstr ""
1301
+
1302
+ #: includes/Settings.php:446
1303
  msgid "Show pages"
1304
  msgstr ""
1305
 
1306
+ #: includes/Settings.php:439
1307
  msgid "Show posts"
1308
  msgstr ""
1309
 
1331
  msgid "Show submit button"
1332
  msgstr ""
1333
 
1334
+ #: includes/Settings.php:432
1335
  msgid "Show tags"
1336
  msgstr ""
1337
 
1339
  msgid "Show vendors next to products"
1340
  msgstr ""
1341
 
1342
+ #: includes/Admin/SettingsAPI.php:726
1343
  msgid "Showcase"
1344
  msgstr ""
1345
 
1346
+ #: includes/Settings.php:733 includes/Settings.php:795
1347
  msgid "Soft"
1348
  msgstr ""
1349
 
1350
+ #: includes/Helpers.php:991
1351
  msgid "Sold by:"
1352
  msgstr ""
1353
 
1354
+ #: includes/Admin/Troubleshooting.php:450
1355
+ #: includes/Admin/Troubleshooting.php:500
1356
+ #: includes/Admin/Troubleshooting.php:543
1357
+ #: includes/Admin/Troubleshooting.php:637
1358
+ #: includes/Admin/Troubleshooting.php:728
1359
+ #: includes/Admin/Troubleshooting.php:842
1360
+ #: includes/Admin/Troubleshooting.php:1181
1361
+ #: includes/Admin/Troubleshooting.php:1228
1362
+ #: includes/Admin/Troubleshooting.php:1304
1363
  msgid "Solution"
1364
  msgstr ""
1365
 
1366
+ #: includes/Admin/Troubleshooting.php:1073
1367
  msgid "Solutions"
1368
  msgstr ""
1369
 
1370
+ #: includes/Admin/Troubleshooting.php:344
1371
  msgid "Solutions:"
1372
  msgstr ""
1373
 
1374
+ #: includes/Admin/Troubleshooting.php:1255
1375
  #, php-format
1376
  msgid ""
1377
  "Some NGINX configuration may block executing PHP files included directly in "
1380
  "to execute the following file: %s"
1381
  msgstr ""
1382
 
1383
+ #: includes/Settings.php:666
1384
  msgid "Speed up search!"
1385
  msgstr ""
1386
 
1401
  msgid "Status"
1402
  msgstr ""
1403
 
1404
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:666
1405
  msgid "Stop process"
1406
  msgstr ""
1407
 
1413
  msgid "Submit label"
1414
  msgstr ""
1415
 
1416
+ #: includes/Admin/Troubleshooting.php:1303
1417
  msgid "Sucuri Security firewall may block AJAX calls of the live search"
1418
  msgstr ""
1419
 
1420
+ #: includes/Settings.php:513
1421
  msgid "Suggestion background"
1422
  msgstr ""
1423
 
1424
+ #: includes/Settings.php:520
1425
  msgid "Suggestion selected"
1426
  msgstr ""
1427
 
1428
+ #: includes/Settings.php:507
1429
  msgid "Suggestions colors"
1430
  msgstr ""
1431
 
1432
+ #: includes/Settings.php:617 includes/Settings.php:623
1433
  #: partials/admin/features.php:29 includes/Admin/Promo/Upgrade.php:50
1434
  msgid "Synonyms"
1435
  msgstr ""
1436
 
1437
+ #: includes/Settings.php:626
1438
  msgid ""
1439
  "Synonyms should be separated by a comma. Each new synonyms group is entered "
1440
  "on a new line. You can use a phrase instead of a single word. <br /> <br />"
1446
  msgid "Taxonomies"
1447
  msgstr ""
1448
 
1449
+ #: includes/Settings.php:527
1450
  msgid "Text color"
1451
  msgstr ""
1452
 
1453
+ #: includes/Admin/Troubleshooting.php:1227
1454
  msgid "The .htaccess file(s) may blocking AJAX calls of the live search"
1455
  msgstr ""
1456
 
1457
+ #: includes/Settings.php:460
1458
  msgid ""
1459
  "The Details panel is an additional container for extended information. The "
1460
  "details are changed dynamically when a user mouse over one of the "
1468
  "mean a lot to me if you %ssupport it with a quick review on WordPress.org.%s"
1469
  msgstr ""
1470
 
1471
+ #: partials/admin/indexer-header.php:41
1472
  msgid "The following error caused the index to be canceled:"
1473
  msgstr ""
1474
 
1475
+ #: includes/Admin/Troubleshooting.php:339
1476
  msgid ""
1477
  "The Indexer uses the WordPress function <code>wp_remote_post()</code> to "
1478
  "build the index in background. Sometimes the server can block this kind of "
1479
  "request and responses with HTTP 401 Unauthorized or 403 Forbidden errors."
1480
  msgstr ""
1481
 
1482
+ #: includes/Admin/Troubleshooting.php:761
1483
  #, php-format
1484
  msgid "The Jetpack Search module is incompatible with the %s plugin."
1485
  msgstr ""
1495
  msgid "the next index rebuild: %s"
1496
  msgstr ""
1497
 
1498
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:638
1499
  msgid "The search index could not be built."
1500
  msgstr ""
1501
 
1502
  #: partials/admin/indexer-header-demo.php:11
1503
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:644
1504
  msgid "The search index does not exist yet. Build it now."
1505
  msgstr ""
1506
 
1507
+ #: includes/Admin/Troubleshooting.php:685
1508
  msgid "The search index structure isn't completely"
1509
  msgstr ""
1510
 
1511
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:632
1512
+ msgid ""
1513
+ "The search index was built successfully, but some non-critical errors "
1514
+ "occurred."
1515
+ msgstr ""
1516
+
1517
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:630
1518
  msgid "The search index was built successfully."
1519
  msgstr ""
1520
 
1521
+ #: includes/Admin/Troubleshooting.php:874
1522
+ msgid ""
1523
+ "The search index was built, but some significant errors occurred during this "
1524
+ "process. There is a risk that some products may not be available during the "
1525
+ "search."
1526
+ msgstr ""
1527
+
1528
+ #: includes/Admin/Troubleshooting.php:1070
1529
  msgid ""
1530
  "The search uses a dedicated URL to makes queries. In your case, this URL is "
1531
  "blocked for some reason. Let visit it directly in your browser:"
1535
  msgid "The search will open in overlay on mobile"
1536
  msgstr ""
1537
 
1538
+ #: includes/Admin/Troubleshooting.php:1067
1539
  msgid ""
1540
  "The server returns an incorrect response for the search engine's AJAX calls"
1541
  msgstr ""
1542
 
1543
+ #: includes/Settings.php:624
1544
  msgid ""
1545
  "The synonyms feature allows your users to find more relevant results. If "
1546
  "your products have alternative names and users often misspell them, consider "
1547
  "adding synonyms."
1548
  msgstr ""
1549
 
1550
+ #: includes/Admin/Troubleshooting.php:918
1551
+ msgid "the transient value was cached and existed too long"
1552
+ msgstr ""
1553
+
1554
+ #: includes/Admin/Troubleshooting.php:916
1555
+ msgid "the transient value was not returned"
1556
+ msgstr ""
1557
+
1558
  #: includes/Integrations/Themes/TheGem/TheGem.php:79
1559
  msgid "TheGem Theme"
1560
  msgstr ""
1563
  msgid "There are four easy ways to display the search bar in your theme"
1564
  msgstr ""
1565
 
1566
+ #: includes/Admin/Troubleshooting.php:1074
1567
  msgid ""
1568
  "Think about what can block the execution of PHP scripts inside <code>wp-"
1569
  "content</code> or <code>wp-content/plugins</code> directory. Maybe you use "
1570
  "some security plugins or you have custom code that may block it."
1571
  msgstr ""
1572
 
1573
+ #: includes/Admin/Troubleshooting.php:338
1574
  msgid ""
1575
  "This issue may affect the building of the search index. Indexer may stuck at "
1576
  "0%."
1577
  msgstr ""
1578
 
1579
+ #: includes/Admin/Troubleshooting.php:334
1580
  msgid ""
1581
  "This issue may affect the search results page and e.g. display all products "
1582
  "every time"
1583
  msgstr ""
1584
 
1585
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:612
1586
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:618
1587
  msgid "This process will continue in the background. You can leave this page!"
1588
  msgstr ""
1589
 
1610
  msgid "To set 100% width leave blank"
1611
  msgstr ""
1612
 
1613
+ #: includes/Admin/Troubleshooting.php:1414
1614
+ msgid "Transients test"
1615
+ msgstr ""
1616
+
1617
+ #: includes/Admin/Troubleshooting.php:1356
1618
  msgid "TranslatePress"
1619
  msgstr ""
1620
 
1621
+ #: includes/Admin/Troubleshooting.php:49 includes/Admin/Troubleshooting.php:68
1622
+ #: partials/admin/indexer-header.php:38
1623
  msgid "Troubleshooting"
1624
  msgstr ""
1625
 
1626
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:672
1627
  msgid "Try to build the index again."
1628
  msgstr ""
1629
 
1661
  msgid "Using PHP - %s"
1662
  msgstr ""
1663
 
1664
+ #: includes/Admin/Troubleshooting.php:1409
1665
  msgid "Valid search results test"
1666
  msgstr ""
1667
 
1668
+ #: includes/Helpers.php:981
1669
  msgid "Vendor"
1670
  msgstr ""
1671
 
1672
+ #: includes/Helpers.php:988
1673
  msgid "Vendors"
1674
  msgstr ""
1675
 
1676
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:617
1677
  msgid "Wait... Indexing in progress"
1678
  msgstr ""
1679
 
1680
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:611
1681
  msgid "Wait... Preparing indexing in progress"
1682
  msgstr ""
1683
 
1684
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:623
1685
  msgid "Wait... The index build process is canceling"
1686
  msgstr ""
1687
 
1689
  msgid "Warning!"
1690
  msgstr ""
1691
 
1692
+ #: includes/Admin/Troubleshooting.php:1229
1693
  #, php-format
1694
  msgid ""
1695
  "We recommend contact your hosting provider and ask to check <code>%s</code> "
1705
  "We support this theme and you can easily replace all default search bars."
1706
  msgstr ""
1707
 
1708
+ #: includes/Settings.php:693
1709
  msgid "weekly"
1710
  msgstr ""
1711
 
1712
+ #: includes/Admin/Troubleshooting.php:1069
1713
  msgid "What's wrong?"
1714
  msgstr ""
1715
 
1721
  msgid "with simple tricks"
1722
  msgstr ""
1723
 
1724
+ #: includes/Admin/Troubleshooting.php:1389
1725
  msgid "WooCommerce Multilingual"
1726
  msgstr ""
1727
 
1728
+ #: includes/Admin/Troubleshooting.php:801
1729
  msgid "WooCommerce Multilingual plugin is enabled but not effective"
1730
  msgstr ""
1731
 
1732
+ #: includes/Admin/Troubleshooting.php:1364
1733
  msgid "WordPress loading problem"
1734
  msgstr ""
1735
 
1736
+ #: includes/Admin/Troubleshooting.php:403
1737
+ #: includes/Admin/Troubleshooting.php:1325
1738
  msgid "WordPress version"
1739
  msgstr ""
1740
 
1741
+ #: includes/Admin/Troubleshooting.php:1394
1742
+ msgid "WPML with disabled translations for products"
1743
+ msgstr ""
1744
+
1745
+ #: includes/Admin/Troubleshooting.php:216
1746
  msgid "You are using one or more incompatible plugins"
1747
  msgstr ""
1748
 
1749
+ #: includes/Admin/Troubleshooting.php:257
1750
  msgid "You are using TranslatePress with Free version of our plugin"
1751
  msgstr ""
1752
 
1753
+ #: includes/Admin/Troubleshooting.php:841
1754
+ msgid ""
1755
+ "You are using WPML Multilingual CMS, but you have product translations "
1756
+ "disabled, so for the search engine to function properly, you must disable "
1757
+ "its multi-language support feature."
1758
+ msgstr ""
1759
+
1760
+ #: includes/Admin/Troubleshooting.php:640
1761
  msgid ""
1762
  "You can run these actions manually via Advanced Cron Manager. Then the "
1763
  "Indexer should run. If the index stuck again, run these actions manually one "
1764
  "more time until the finished index."
1765
  msgstr ""
1766
 
1767
+ #: includes/Admin/Troubleshooting.php:1305
1768
  msgid ""
1769
  "You need to log in to your <a href=\"https://login.sucuri.net\" "
1770
  "target=\"_blank\">Sucuri panel</a>."
1771
  msgstr ""
1772
 
1773
+ #: includes/Admin/Troubleshooting.php:1072
1774
  msgid ""
1775
  "You should see <code>pong</code> word as a response. Probably you see "
1776
  "something else."
1781
  msgid "You use %s plugin version %s"
1782
  msgstr ""
1783
 
1784
+ #: includes/Admin/Troubleshooting.php:236
1785
+ #: includes/Admin/Troubleshooting.php:238
1786
  #, php-format
1787
  msgid ""
1788
  "You use the %s plugin, which may cause errors in the search results returned "
1789
  "by our plugin."
1790
  msgstr ""
1791
 
1792
+ #: includes/Admin/Troubleshooting.php:227
1793
+ #: includes/Admin/Troubleshooting.php:231
1794
  #, php-format
1795
  msgid "You use the %s plugin. The %s does not support this plugin."
1796
  msgstr ""
1800
  msgid "You use the <b>%s</b> theme%s. Fantastic!"
1801
  msgstr ""
1802
 
1803
+ #: includes/Admin/Troubleshooting.php:802
1804
  #, php-format
1805
  msgid ""
1806
  "You use the WPML Multilingual CMS and WooCommerce Multilingual plugins, but "
1808
  "target=\"_blank\">WooCommerce Multilingual status</a>."
1809
  msgstr ""
1810
 
1811
+ #: includes/Admin/Troubleshooting.php:797
1812
  #, php-format
1813
  msgid ""
1814
  "You use the WPML Multilingual CMS plugin and to correctly search for "
1816
  "target=\"_blank\">WooCommerce Multilingual</a> plugin."
1817
  msgstr ""
1818
 
1819
+ #: includes/Admin/Troubleshooting.php:346
1820
  msgid "Your server can't send an HTTP request to itself"
1821
  msgstr ""
1822
 
1823
+ #: includes/Admin/Troubleshooting.php:452
1824
  msgid "Your settings should looks like the picture below:"
1825
  msgstr ""
1826
 
1827
+ #: includes/Admin/Troubleshooting.php:281
1828
  msgid "Your site can perform loopback requests"
1829
  msgstr ""
1830
 
1831
+ #: includes/Admin/Troubleshooting.php:330
1832
  msgid "Your site could not complete a loopback request"
1833
  msgstr ""
partials/admin/search-preview.php CHANGED
@@ -68,7 +68,10 @@ $labelSeeAll = Helpers::getLabel( 'show_more' );
68
  </span>
69
  </div>
70
 
71
- <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-brand">
 
 
 
72
  <span class="dgwt-wcas-st">
73
  <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'brand' ); ?></span>
74
  <?php _e( 'Sample brand <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
@@ -81,7 +84,10 @@ $labelSeeAll = Helpers::getLabel( 'show_more' );
81
  </span>
82
  </div>
83
 
84
- <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-cat">
 
 
 
85
  <span class="dgwt-wcas-st">
86
  <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'category' ); ?></span>
87
  <?php _e( 'Sample category <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
68
  </span>
69
  </div>
70
 
71
+ <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-brand js-dgwt-wcas-suggestion-brand">
72
+ <span class="dgwt-wcas-si">
73
+ <img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
74
+ </span>
75
  <span class="dgwt-wcas-st">
76
  <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'brand' ); ?></span>
77
  <?php _e( 'Sample brand <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
84
  </span>
85
  </div>
86
 
87
+ <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-cat js-dgwt-wcas-suggestion-cat">
88
+ <span class="dgwt-wcas-si">
89
+ <img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
90
+ </span>
91
  <span class="dgwt-wcas-st">
92
  <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'category' ); ?></span>
93
  <?php _e( 'Sample category <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
partials/details-panel/product-variation.php CHANGED
@@ -35,9 +35,8 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
35
  <?php echo $vars->priceHtml; ?>
36
  </div>
37
 
38
- <div class="dgwt-wcas-details-hr"></div>
39
-
40
  <?php if ( ! empty( $vars->attributes ) ): ?>
 
41
  <div class="dgwt-wcas-details-attributes">
42
  <?php foreach ( $vars->attributes as $attribute ): ?>
43
  <div class="dgwt-wcas-details-attribute"><b><?php echo esc_html( $attribute['label'] ); ?></b>: <span><?php echo esc_html( $attribute['value'] ); ?></span></div>
35
  <?php echo $vars->priceHtml; ?>
36
  </div>
37
 
 
 
38
  <?php if ( ! empty( $vars->attributes ) ): ?>
39
+ <div class="dgwt-wcas-details-hr"></div>
40
  <div class="dgwt-wcas-details-attributes">
41
  <?php foreach ( $vars->attributes as $attribute ): ?>
42
  <div class="dgwt-wcas-details-attribute"><b><?php echo esc_html( $attribute['label'] ); ?></b>: <span><?php echo esc_html( $attribute['value'] ); ?></span></div>
partials/details-panel/product.php CHANGED
@@ -35,9 +35,8 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
35
  <?php echo $vars->priceHtml; ?>
36
  </div>
37
 
38
- <div class="dgwt-wcas-details-hr"></div>
39
-
40
  <?php if ( ! empty( $vars->desc ) ): ?>
 
41
  <div class="dgwt-wcas-details-desc">
42
  <?php echo wp_kses_post( $vars->desc ); ?>
43
  </div>
35
  <?php echo $vars->priceHtml; ?>
36
  </div>
37
 
 
 
38
  <?php if ( ! empty( $vars->desc ) ): ?>
39
+ <div class="dgwt-wcas-details-hr"></div>
40
  <div class="dgwt-wcas-details-desc">
41
  <?php echo wp_kses_post( $vars->desc ); ?>
42
  </div>
partials/themes/goya.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * Default search
9
+ */
10
+ add_action( 'wp_footer', function () {
11
+ echo '<div id="wcas-theme-search" style="display: block;"><div class="goya-search"><fieldset><div class="search-button-group">' . do_shortcode( '[wcas-search-form layout="classic"]' ) . '</div></fieldset></div></div>';
12
+ echo '<div id="wcas-theme-search-mobile" style="display: block;"><div class="goya-search"><fieldset><div class="search-button-group">' . do_shortcode( '[wcas-search-form layout="classic"]' ) . '</div></fieldset></div></div>';
13
+ ?>
14
+ <script>
15
+ var wcasThemeSearch = document.querySelector('.search-panel .side-panel-content .goya-search');
16
+ if (wcasThemeSearch !== null) {
17
+ wcasThemeSearch.replaceWith(document.querySelector('#wcas-theme-search > div'));
18
+ }
19
+ document.querySelector('#wcas-theme-search').remove();
20
+
21
+ var wcasThemeSearchMobile = document.querySelector('.side-mobile-menu .side-panel-content .goya-search');
22
+ if (wcasThemeSearchMobile !== null) {
23
+ wcasThemeSearchMobile.replaceWith(document.querySelector('#wcas-theme-search-mobile > div'));
24
+ }
25
+ document.querySelector('#wcas-theme-search-mobile').remove();
26
+
27
+ (function ($) {
28
+ $(window).on('load', function () {
29
+ $('.site-header .quick_search').on('click', function (e) {
30
+ setTimeout(function () {
31
+ var $input = $('.search-panel .side-panel-content .dgwt-wcas-search-input');
32
+ if ($input.length > 0 && $input.val().length === 0) {
33
+ $input.focus();
34
+ }
35
+ }, 500);
36
+ });
37
+ });
38
+ }(jQuery));
39
+ </script>
40
+ <style>
41
+ .search-panel .search-button-group {
42
+ border-bottom: none;
43
+ }
44
+
45
+ .search-panel .search-button-group .dgwt-wcas-search-wrapp {
46
+ max-width: 100%;
47
+ }
48
+ </style>
49
+ <?php
50
+ } );
partials/themes/shopical.php CHANGED
@@ -30,5 +30,10 @@ function dgwt_wcas_shopical_mobile_search() {
30
  });
31
  }(jQuery));
32
  </script>
 
 
 
 
 
33
  <?php
34
  }
30
  });
31
  }(jQuery));
32
  </script>
33
+ <style>
34
+ .dgwt-wcas-overlay-mobile .dgwt-wcas-search-form {
35
+ padding: 0;
36
+ }
37
+ </style>
38
  <?php
39
  }
partials/themes/top-store-pro.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * Default search
9
+ */
10
+ add_action( 'wp_footer', function () {
11
+ echo '<div id="wcas-theme-search" style="display: block;">' . do_shortcode( '[wcas-search-form]' ) . '</div>';
12
+ ?>
13
+ <script>
14
+ var wcasThemeSearch = document.querySelector('.main-header #search-box form');
15
+ if (wcasThemeSearch !== null) {
16
+ wcasThemeSearch.replaceWith(document.querySelector('#wcas-theme-search > div'));
17
+ }
18
+ document.querySelector('#wcas-theme-search').remove();
19
+ </script>
20
+ <style>
21
+ .main-header .dgwt-wcas-search-wrapp {
22
+ max-width: 800px;
23
+ }
24
+
25
+ .main-header .dgwt-wcas-search-form {
26
+ width: 100% !important;
27
+ margin: 0 !important;
28
+ }
29
+ </style>
30
+ <?php
31
+ } );
32
+
33
+ /**
34
+ * Search in sticky header
35
+ */
36
+ add_action( 'wp_footer', function () {
37
+ if ( get_theme_mod( 'top_store_pro_sticky_header', false ) === false && get_theme_mod( 'top_store_sticky_header', false ) === false ) {
38
+ return;
39
+ }
40
+ echo '<div id="wcas-theme-search-sticky" style="display: block;">' . do_shortcode( '[wcas-search-form]' ) . '</div>';
41
+ ?>
42
+ <script>
43
+ var wcasThemeSearchSticky = document.querySelector('.search-wrapper #search-box form');
44
+ if (wcasThemeSearchSticky !== null) {
45
+ wcasThemeSearchSticky.replaceWith(document.querySelector('#wcas-theme-search-sticky > div'));
46
+ }
47
+ document.querySelector('#wcas-theme-search-sticky').remove();
48
+
49
+ (function ($) {
50
+ $(document).on('click', '.prd-search', function (e) {
51
+ if ($(window).width() <= 990) {
52
+ var $handler = $('.search-wrapper .js-dgwt-wcas-enable-mobile-form');
53
+ if ($handler.length) {
54
+ $handler[0].click();
55
+ }
56
+
57
+ setTimeout(function () {
58
+ var $closeBtn = $('.search-wrapper .search-close-btn');
59
+ if ($closeBtn.length) {
60
+ $closeBtn[0].click();
61
+ }
62
+ }, 1100)
63
+ } else {
64
+ setTimeout(function () {
65
+ var $input = $('.search-wrapper .dgwt-wcas-search-input');
66
+ if ($input.length > 0) {
67
+ $input.focus();
68
+ }
69
+ }, 500);
70
+ }
71
+ });
72
+ }(jQuery));
73
+ </script>
74
+ <style>
75
+ .search-wrapper .container {
76
+ display: flex;
77
+ justify-content: center;
78
+ flex-direction: row-reverse;
79
+ align-items: center;
80
+ }
81
+
82
+ .search-wrapper .search-close {
83
+ margin: 0 0 0 30px;
84
+ }
85
+
86
+ .search-wrapper .dgwt-wcas-search-form {
87
+ min-width: 500px;
88
+ }
89
+ </style>
90
+ <?php
91
+ } );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce search, ajax search, search by sku, product search, woocommerc
4
  Requires at least: 5.0
5
  Tested up to: 5.7
6
  Requires PHP: 7.0
7
- Stable tag: 1.10.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -16,7 +16,7 @@ The most popular **WooCommerce product search plugin**. It gives your users a we
16
 
17
  By default, WooCommerce provides a very simple search solution, without live product search or even SKU search. FiboSearch (Ajax Search for WooCommerce) provides advanced search with live suggestions.
18
 
19
- Who doesn’t love instant, as-you-type suggestions? In 2021, customers expect smart product search. Baymard Institute’s latest UX research reveals that search autocomplete, auto-suggest, or an instant search feature **is now offered on 96% of major e-commerce sites**. It's a must-have feature for every online business that can’t afford to lose customers. Why? FiboSearch helps users save time and makes shopping easier. As a result, it really boosts sales.
20
 
21
  = Features =
22
  &#9989; **Search by product title, long and short description**
@@ -50,9 +50,9 @@ FiboSearch also comes in a Pro version, with a modern, inverted index-based sear
50
  &#9989; **Fuzzy search** – works even with minor typos
51
  &#9989; **Search in custom fields**
52
  &#9989; **Search in attributes**
53
- &#9989; **Search in categories**
54
  &#9989; **Search in tags**
55
- &#9989; **Search in brands** (WooCommerce Brands or YITH WooCommerce Brands)
56
  &#9989; **Search by variation product SKU** – also shows variable products in live search after typing in the exact matching SKU
57
  &#9989; **Search for posts** – also shows matching posts in live search
58
  &#9989; **Search for pages** – also shows matching posts in live search
@@ -113,7 +113,7 @@ If you want to replace your search bar in another theme, please [contact our sup
113
  We will assist with replacing the search bar in your theme for free after you upgrade to the Pro version.
114
 
115
  = Can I add the search bar as a WordPress menu item? =
116
- **Yes, you can!** Go to `Appearance → Menu`. You will see a new menu item called "FiboSearch". Select it and click “Add to menu”. Done!
117
 
118
  = How can I ask a question? =
119
  You can submit a ticket on the plugin [website](https://fibosearch.com/contact/?utm_source=readme&utm_medium=referral&utm_campaign=asfw&utm_content=contact&utm_gen=utmdc) and the support team will get in touch with you shortly. We also answer questions on the [WordPress Support Forum](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/).
@@ -143,6 +143,27 @@ You can read more and compare Pro and Free features here: [Full comparison - Pro
143
 
144
  == Changelog ==
145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  = 1.10.0, April 22, 2021 =
147
  * ADD: Possibility to disable select event on suggestions (click and hit the Enter key)
148
  * ADD: Possibility to disable submit a search form via a filter
4
  Requires at least: 5.0
5
  Tested up to: 5.7
6
  Requires PHP: 7.0
7
+ Stable tag: 1.11.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
16
 
17
  By default, WooCommerce provides a very simple search solution, without live product search or even SKU search. FiboSearch (Ajax Search for WooCommerce) provides advanced search with live suggestions.
18
 
19
+ Who doesn’t love instant, as-you-type suggestions? In 2021, customers expect smart product search. Baymard Institute’s latest UX research reveals that search autocomplete, auto-suggest, or an instant search feature **is now offered on 96% of major e-commerce sites**. It's a must-have feature for every online business that can’t afford to lose customers. Why? FiboSearch helps users save time and makes shopping easier. As a result, Fibo really boosts sales.
20
 
21
  = Features =
22
  &#9989; **Search by product title, long and short description**
50
  &#9989; **Fuzzy search** – works even with minor typos
51
  &#9989; **Search in custom fields**
52
  &#9989; **Search in attributes**
53
+ &#9989; **Search in categories**. Supports category thumbnails.
54
  &#9989; **Search in tags**
55
+ &#9989; **Search in brands** (We support WooCommerce Brands, Perfect Brands for WooCommerce, Brands for WooCommerce, YITH WooCommerce Brands). Supports brand thumbnails.
56
  &#9989; **Search by variation product SKU** – also shows variable products in live search after typing in the exact matching SKU
57
  &#9989; **Search for posts** – also shows matching posts in live search
58
  &#9989; **Search for pages** – also shows matching posts in live search
113
  We will assist with replacing the search bar in your theme for free after you upgrade to the Pro version.
114
 
115
  = Can I add the search bar as a WordPress menu item? =
116
+ **Yes, you can!** Go to `Appearance → Menu`. You will see a new menu item called FiboSearch”. Select it and click “Add to menu”. Done!
117
 
118
  = How can I ask a question? =
119
  You can submit a ticket on the plugin [website](https://fibosearch.com/contact/?utm_source=readme&utm_medium=referral&utm_campaign=asfw&utm_content=contact&utm_gen=utmdc) and the support team will get in touch with you shortly. We also answer questions on the [WordPress Support Forum](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/).
143
 
144
  == Changelog ==
145
 
146
+ = 1.11.0, May 26, 2021 =
147
+ * ADD: Integration with Goya theme
148
+ * ADD: Integration with Top and Top Store Pro theme
149
+ * ADD: Keep the state of a details panel in memory instead of replacing it every time using jQuery.html() method. Doesn't clear quantity and "add to cart" states.
150
+ * ADD: Prevent submit empty form
151
+ * FIX: W3 validator warning: The type attribute for the style element is not needed and should be omitted.
152
+ * FIX: Search terms with apostrophes
153
+ * FIX: Synchronization with the native WooCommerce option "Out of stock visibility"
154
+ * FIX: Hiding an unnecessary line in the product details when there is no description
155
+ * FIX: Adding polyfill for supporting “includes” in Internet Explorer 11
156
+ * FIX: Better elements positioning on the "Starting" tab on the plugin settings page
157
+ * FIX: Support for custom Google Analytics object name
158
+ * FIX: Better handling “plus” and “minus” buttons for a quantity field
159
+ * FIX: Uncaught Error: Call to a member function get_review_count() on null
160
+ * FIX: Displaying the search box off screen on mobile devices
161
+ * FIX: Correct way for rebuilding autocomplete feature on an input by manually recalling dgwtWcasAutocomplete(). Remove more events on dispose method
162
+ * FIX: Highlight single chars in autocomplete results
163
+ * FIX: Add trim on query value
164
+ * FIX: Clear search title and phrase from escape characters
165
+
166
+
167
  = 1.10.0, April 22, 2021 =
168
  * ADD: Possibility to disable select event on suggestions (click and hit the Enter key)
169
  * ADD: Possibility to disable submit a search form via a filter