Ajax Search for WooCommerce - Version 1.17.0

Version Description

Download this release

Release Info

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

Code changes from version 1.16.0 to 1.17.0

Files changed (61) hide show
  1. ajax-search-for-woocommerce.php +6 -5
  2. assets/css/admin-style.css +15 -4
  3. assets/css/style.css +743 -666
  4. assets/css/style.min.css +1 -1
  5. assets/js/admin.js +1 -0
  6. assets/js/admin.min.js +1 -1
  7. assets/js/search.js +1099 -804
  8. assets/js/search.min.js +1 -1
  9. fs/lib/includes/class-freemius.php +25 -2
  10. fs/lib/includes/managers/class-fs-admin-notice-manager.php +7 -2
  11. fs/lib/includes/managers/class-fs-key-value-storage.php +1 -11
  12. fs/lib/includes/sdk/Exceptions/ArgumentNotExistException.php +5 -1
  13. fs/lib/includes/sdk/Exceptions/EmptyArgumentException.php +5 -1
  14. fs/lib/includes/sdk/Exceptions/Exception.php +5 -1
  15. fs/lib/includes/sdk/Exceptions/InvalidArgumentException.php +5 -1
  16. fs/lib/includes/sdk/Exceptions/OAuthException.php +5 -1
  17. fs/lib/includes/sdk/FreemiusBase.php +4 -0
  18. fs/lib/includes/sdk/FreemiusWordPress.php +4 -1
  19. fs/lib/languages/freemius-ru_RU.mo +0 -0
  20. fs/lib/require.php +5 -1
  21. fs/lib/start.php +1 -1
  22. fs/lib/templates/account/partials/addon.php +6 -1
  23. fs/lib/templates/ajax-loader.php +6 -1
  24. fs/lib/templates/debug.php +8 -2
  25. fs/lib/templates/firewall-issues-js.php +10 -6
  26. fs/lib/templates/partials/network-activation.php +6 -1
  27. fs/lib/templates/sticky-admin-notice-js.php +4 -2
  28. includes/Admin/AdminMenu.php +1 -1
  29. includes/Admin/Promo/FeedbackNotice.php +12 -11
  30. includes/Admin/RegenerateImages.php +12 -18
  31. includes/Admin/SettingsAPI.php +14 -12
  32. includes/EmbeddingViaMenu.php +3 -3
  33. includes/Helpers.php +93 -9
  34. includes/Integrations/Themes/Enfold/Enfold.php +19 -1
  35. includes/Integrations/Themes/Impreza/Impreza.php +45 -26
  36. includes/Integrations/Themes/Kadence/Kadence.php +20 -0
  37. includes/Integrations/Themes/Storefront/Storefront.php +9 -1
  38. includes/Integrations/Themes/TheGem/TheGem.php +9 -1
  39. includes/Integrations/Themes/TheGemElementor/TheGemElementor.php +19 -0
  40. includes/Integrations/Themes/TheGemWPBakery/TheGemWPBakery.php +31 -0
  41. includes/Integrations/Themes/ThemesCompatibility.php +19 -5
  42. includes/Integrations/Themes/Woodmart/Woodmart.php +1 -1
  43. includes/Multilingual.php +4 -1
  44. includes/Personalization.php +4 -0
  45. includes/Product.php +4 -0
  46. includes/ProductVariation.php +4 -0
  47. includes/Settings.php +10 -0
  48. includes/Shortcode.php +1 -0
  49. includes/Term.php +4 -1
  50. languages/ajax-search-for-woocommerce.pot +190 -158
  51. partials/admin/how-to-use.php +0 -1
  52. partials/admin/search-preview.php +0 -2
  53. partials/details-panel/product-variation.php +5 -0
  54. partials/details-panel/product.php +5 -1
  55. partials/details-panel/term-product.php +6 -0
  56. partials/themes/kadence.php +51 -0
  57. partials/themes/salient.php +3 -0
  58. partials/themes/storefront.php +9 -5
  59. partials/themes/thegem-elementor.php +182 -0
  60. readme.txt +19 -1
  61. widget.php +0 -1
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.16.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: 6.1
14
  *
15
  */
16
  // Exit if accessed directly
@@ -274,9 +274,10 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
274
  $localize = array(
275
  'labels' => \DgoraWcas\Helpers::getLabels(),
276
  'nonces' => array(
277
- 'build_index' => wp_create_nonce( 'dgwt_wcas_build_index' ),
278
- 'stop_build_index' => wp_create_nonce( 'dgwt_wcas_stop_build_index' ),
279
- 'build_index_heartbeat' => wp_create_nonce( 'dgwt_wcas_build_index_heartbeat' ),
 
280
  ),
281
  );
282
  $localize = apply_filters( 'dgwt/wcas/scripts/admin/localize', $localize );
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.17.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: 6.3
14
  *
15
  */
16
  // Exit if accessed directly
274
  $localize = array(
275
  'labels' => \DgoraWcas\Helpers::getLabels(),
276
  'nonces' => array(
277
+ 'build_index' => wp_create_nonce( 'dgwt_wcas_build_index' ),
278
+ 'stop_build_index' => wp_create_nonce( 'dgwt_wcas_stop_build_index' ),
279
+ 'build_index_heartbeat' => wp_create_nonce( 'dgwt_wcas_build_index_heartbeat' ),
280
+ 'advanced_options_switch' => wp_create_nonce( 'dgwt_wcas_advanced_options_switch' ),
281
  ),
282
  );
283
  $localize = apply_filters( 'dgwt/wcas/scripts/admin/localize', $localize );
assets/css/admin-style.css CHANGED
@@ -1470,15 +1470,16 @@ td.dgwt-wcas-indexing-details-row a {
1470
  }
1471
 
1472
  .dgwt-wcas-tooltip-inner {
1473
- max-width: 190px;
1474
- line-height: 16px;
1475
- font-size: 13px;
1476
- padding: 5px 9px;
1477
  color: #222;
1478
  text-align: left;
1479
  background-color: #fff;
1480
  border-radius: 0.25rem;
1481
  box-shadow: 0 -8px 25px 13px #ddd;
 
1482
  }
1483
 
1484
  .dgwt-wcas-tooltip__head {
@@ -1730,3 +1731,13 @@ h3.dgwt-wcas-troubleshooting-issue-title {
1730
  column-rule: 1px solid #eee;
1731
  font-family: monospace;
1732
  }
 
 
 
 
 
 
 
 
 
 
1470
  }
1471
 
1472
  .dgwt-wcas-tooltip-inner {
1473
+ max-width: 280px;
1474
+ line-height: 158%;
1475
+ font-size: 14px;
1476
+ padding: 10px 15px;
1477
  color: #222;
1478
  text-align: left;
1479
  background-color: #fff;
1480
  border-radius: 0.25rem;
1481
  box-shadow: 0 -8px 25px 13px #ddd;
1482
+ cursor: auto;
1483
  }
1484
 
1485
  .dgwt-wcas-tooltip__head {
1731
  column-rule: 1px solid #eee;
1732
  font-family: monospace;
1733
  }
1734
+
1735
+ .dashicons.dgwt-wcas-override-tooltip {
1736
+ line-height: 16px;
1737
+ font-size: 16px;
1738
+ margin-right: 4px;
1739
+ display: inline-block;
1740
+ }
1741
+ .dgwt-wcas-override-tooltip {
1742
+ cursor: auto;
1743
+ }
assets/css/style.css CHANGED
@@ -1,54 +1,54 @@
1
  .dgwt-wcas-block-scroll {
2
- overflow: hidden;
3
  }
4
 
5
  .dgwt-wcas-search-wrapp {
6
- position: relative;
7
  line-height: 100%;
8
- display: block;
9
- color: #444;
10
- min-width: 230px;
11
- width: 100%;
12
- text-align: left;
13
- margin: 0 auto;
14
- -webkit-box-sizing: border-box;
15
- -moz-box-sizing: border-box;
16
- box-sizing: border-box;
17
  }
18
 
19
  .dgwt-wcas-tpd-image img {
20
- margin: 0 15px 0 0 !important;
21
- display: block;
22
  }
23
 
24
  .rtl .dgwt-wcas-tpd-image img {
25
- margin: 0 0 0 15px !important;
26
  }
27
 
28
  .dgwt-wcas-preloader-wrapp img {
29
- margin: 10px auto 0 auto;
30
- display: block;
31
- max-width: 200px;
32
  }
33
 
34
  .dgwt-wcas-preloader-wrapp img.dgwt-wcas-placeholder-preloader {
35
- display: block;
36
- width: 100%;
37
- height: auto;
38
- max-width: 300px;
39
- margin: 0;
40
  }
41
 
42
  .dgwt-wcas-suggestions-wrapp {
43
- background: #fff none repeat scroll 0 0;
44
- border: 1px solid #ddd;
45
- border-top: none;
46
- padding: 0;
47
  margin: 0;
48
- -webkit-box-sizing: border-box;
49
- -moz-box-sizing: border-box;
50
- box-sizing: border-box;
51
- overflow-y: auto;
52
  }
53
 
54
  .dgwt-wcas-search-wrapp *,
@@ -61,398 +61,404 @@
61
 
62
  .dgwt-wcas-details-wrapp a:focus,
63
  .dgwt-wcas-suggestions-wrapp a:focus {
64
- outline:none;
65
  }
66
 
67
  .dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp--top {
68
- border: 1px solid #ddd;
69
- border-bottom: none;
70
  }
71
 
72
  .dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp {
73
- max-width: 550px;
74
  }
75
 
76
  .dgwt-wcas-full-width.dgwt-wcas-is-detail-box .dgwt-wcas-suggestion {
77
- padding: 8px 15px;
78
  }
79
 
80
  .dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp {
81
- border-radius: 0 0 5px 0;
82
- border-left-color: #eee;
83
  }
84
 
85
  .dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp {
86
- border-radius: 0 0 0 5px;
87
- border-right-color: #eee;
88
  }
89
 
90
  .dgwt-wcas-suggestion {
91
- cursor: pointer;
92
- font-size: 12px;
93
- line-height: 110%;
94
- text-align: left;
95
- padding: 7px 10px;
96
- position: relative;
97
- border-bottom: 1px solid #dfdfdf;
98
- display: flex;
99
- flex-direction: row;
100
- justify-content: space-between;
101
- align-items: center;
102
- resize: vertical;
103
  width: 100%;
104
  }
105
 
106
  .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
107
- justify-content: center;
108
- color: #6d6d6d;
109
  }
 
110
  a.dgwt-wcas-details-more-products {
111
- padding: 15px 0 10px 0;
112
- display: block;
113
- border-top: 1px solid #eee;
114
- text-align: center;
115
- font-size: 12px;
116
- text-transform: uppercase;
117
- color: #6d6d6d;
118
- transition: all 200ms ease-in-out;
119
  }
 
120
  a.dgwt-wcas-details-more-products:hover {
121
- text-decoration: underline;
122
  }
123
 
124
  a.dgwt-wcas-product-details-readmore {
125
- display: block;
126
- text-align: right;
127
- margin-top: 15px;
128
- color: #6d6d6d;
129
- text-transform: uppercase;
130
- letter-spacing: 1px;
131
- font-weight: normal;
132
- font-size: 12px;
133
  }
 
134
  a.dgwt-wcas-product-details-readmore:hover {
135
- text-decoration: underline;
136
  }
137
 
138
  .dgwt-wcas-suggestion.dgwt-wcas-suggestion-no-border-bottom {
139
- border-bottom: none;
140
  }
141
 
142
  .dgwt-wcas-suggestion:after {
143
- clear: both;
144
- display: block;
145
- content: '';
146
  }
147
 
148
  .dgwt-wcas-suggestion.dgwt-wcas-nores {
149
- cursor: default;
150
- opacity: 0.5;
151
  }
152
 
153
  .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
154
- padding-top: 8px;
155
- padding-bottom: 8px;
156
- min-height: 60px;
157
  }
158
 
159
  .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more,
160
  .dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
161
- min-height: 30px;
162
- text-transform: uppercase;
163
  }
164
 
165
  .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more {
166
- padding: 0 10px;
167
- text-align: center;
168
  }
169
 
170
  .dgwt-wcas-st {
171
- display: block;
172
- color: #444;
173
- font-size: 15px;
174
- width: 100%;
175
- line-height: 110%;
176
  }
177
 
178
  .dgwt-wcas-st > span {
179
- display: inline-block;
180
- vertical-align: middle;
181
  }
182
 
183
  .dgwt-wcas-has-sku .dgwt-wcas-st-title {
184
- margin-right: 6px;
185
  }
186
 
187
  .dgwt-wcas-st > span.dgwt-wcas-st--direct-headline {
188
- display: block;
189
- font-style: italic;
190
- font-size: 10px;
191
- text-transform: uppercase;
192
- opacity: 0.4;
193
- line-height: 10px;
194
- margin-bottom: 1px;
195
- letter-spacing: 2px;
196
  }
197
 
198
  .dgwt-wcas-st-breadcrumbs {
199
- overflow: hidden;
200
- text-overflow: ellipsis;
201
- white-space: nowrap;
202
- font-size: 80%;
203
- text-align: left;
204
- opacity: 0.6;
205
- width: 100%;
206
- padding-right: 10px;
207
  }
208
 
209
  .rtl .dgwt-wcas-st-breadcrumbs {
210
- padding-right: 0;
211
- padding-left: 10px;
212
- text-align: right;
213
  }
214
 
215
  .dgwt-wcas-sku {
216
- font-size: 80%;
217
  }
218
 
219
  .dgwt-wcas-si {
220
- width: 50px;
221
- display: block;
222
- height: 100%;
223
  }
224
 
225
  .dgwt-wcas-si img {
226
- background: #fff none repeat scroll 0 0;
227
- border: 1px solid #e8e8e8;
228
- border-radius: 3px;
229
- display: block;
230
- margin: auto;
231
- padding: 2px;
232
- height: auto;
233
- width: auto;
234
- max-height: 90%;
235
- max-width: 100%;
236
  }
237
 
238
  .dgwt-wcas-content-wrapp {
239
- display: flex;
240
- height: 100%;
241
- width: 100%;
242
- justify-content: space-between;
243
- align-items: center;
244
- resize: vertical;
245
- padding-left: 10px;
246
  }
247
 
248
  .rtl .dgwt-wcas-content-wrapp {
249
- padding-left: 0;
250
- padding-right: 10px;
251
  }
252
 
253
  .dgwt-wcas-sp {
254
- color: #555;
255
- font-size: 14px;
256
- line-height: 120%;
257
- text-align: right;
258
- line-height: 4px;
259
- padding-left: 10px;
260
  }
261
 
262
  .dgwt-wcas-sp * {
263
- line-height: 130%;
264
  }
265
 
266
  .dgwt-wcas-search-form {
267
- margin: 0;
268
- padding: 0;
269
  width: 100%;
270
  }
271
 
272
  .dgwt-wcas-sp del {
273
- opacity: 0.5;
274
- font-size: 12px;
275
  }
276
 
277
  .dgwt-wcas-sd {
278
- color: #777;
279
- display: block;
280
- line-height: 14px;
281
- width: 100%;
282
- margin-top: 5px;
283
- font-size: 0.8em;
284
  }
285
 
286
- .dgwt-wcas-vendor-city{
287
- margin-left:5px;
288
  font-size: 0.8em;;
289
  }
290
 
291
- .dgwt-wcas-st > .dgwt-wcas-product-vendor{
292
- font-size:12px;
293
- margin-top:5px;
294
  display: block;
295
  }
296
 
297
  .dgwt-wcas-suggestion-selected {
298
- background-color: #eeeeee;
299
  }
300
 
301
  .dgwt-wcas-suggestion-selected:first-child {
302
- border-top: none;
303
  }
304
 
305
  .rtl .dgwt-wcas-suggestion {
306
- padding-left: 0;
307
- padding-right: 15px;
308
- text-align: right;
309
  }
310
 
311
  .dgwt-wcas-details-wrapp {
312
- background: #fff none repeat scroll 0 0;
313
- border: 1px solid #ddd;
314
- border-top: none;
315
- border-left: none;
316
- padding: 0;
317
- width: 300px;
318
- -webkit-box-sizing: border-box;
319
- -moz-box-sizing: border-box;
320
- box-sizing: border-box;
321
- z-index: 100;
322
- min-height: 340px;
323
  }
324
 
325
  .rtl .dgwt-wcas-details-wrapp {
326
- border-left: 1px solid #ddd;
327
- border-right: none;
328
  }
329
 
330
  .dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
331
- margin-top: -1px;
332
- border-top: 1px solid #ddd;
333
  }
334
 
335
  .dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
336
- margin-top: -1px;
337
- border-top: 1px solid #ddd;
338
  }
339
 
340
  .dgwt-wcas-details-right .dgwt-wcas-details-wrapp {
341
- border-left: none;
342
- border-right: 1px solid #ddd;
343
- border-radius: 0 5px 5px 0;
344
  }
345
 
346
  .dgwt-wcas-details-left .dgwt-wcas-details-wrapp {
347
- border-right: none;
348
- border-left: 1px solid #ddd;
349
- border-radius: 5px 0 0 5px;
350
  }
351
 
352
  .dgwt-wcas-details-notfit .dgwt-wcas-details-wrapp {
353
- display: none;
354
  }
355
 
356
  .dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
357
- border-radius: 0 0 0 5px;
358
  }
359
 
360
  .dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
361
- border-radius: 0 0 5px 0;
362
  }
363
 
364
  .rtl.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
365
- border-radius: 0 0 5px 0;
366
  }
367
 
368
  .rtl.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
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
  }
382
 
383
  .woocommerce .dgwt-wcas-pd-rating .star-rating {
384
- float: left;
385
- margin-right: 5px;
386
- font-size: 12px;
387
- color: #CCAE72;
388
  }
389
 
390
  .rtl .dgwt-wcas-pd-rating .star-rating {
391
- float: right;
392
- margin-left: 5px;
393
- margin-right: 0;
394
  }
395
 
396
  .dgwt-wcas-datails-title {
397
- border-bottom: 1px dashed #eee;
398
- display: block;
399
- margin-bottom: 15px;
400
- padding-bottom: 5px;
401
- font-size: 14px;
402
  }
403
 
404
  .dgwt-wcas-pd-title {
405
- border-bottom: 1px dashed #eee;
406
- margin-bottom: 15px;
407
- padding-bottom: 5px;
408
- display: block;
409
- color: #202020;
410
- text-decoration: none;
411
  }
412
 
413
  .dgwt-wcas-pd-title .product-title {
414
- font-weight: 900;
415
- color: #202020;
416
- text-transform: uppercase;
417
- letter-spacing: -1px;
418
- margin: 0;
419
  }
420
 
421
  .dgwt-wcas-details-title-tax {
422
- text-transform: uppercase;
423
- font-weight: 900;
424
- letter-spacing: -1px;
425
- margin-right: 3px;
426
  }
427
 
428
  .dgwt-wcas-tax-product-details {
429
- text-decoration: none;
430
- display: flex;
431
- align-items: center;
432
- justify-content: left;
433
- transition: all 200ms ease-in-out;
434
- padding: 5px;
435
- margin: 0 -5px 15px -5px;
436
  }
437
 
438
  .dgwt-wcas-tax-product-details:after {
439
- content: '';
440
- clear: both;
441
- display: block;
442
  }
443
 
444
  .dgwt-wcas-tax-product-details:hover {
445
- box-shadow: 0 0 11px 2px rgba(0,0,0,0.05);
 
 
 
446
  }
447
-
448
 
449
  .dgwt-wcas-details-wrapp .dgwt-wcas-pd-title {
450
- margin-bottom: 8px;
451
  }
452
 
453
  .dgwt-wcas-tpd-image {
454
- width: 60px;
455
- margin-right: 15px;
456
  }
457
 
458
  .dgwt-wcas-pd-rest {
@@ -460,347 +466,358 @@ a.dgwt-wcas-product-details-readmore:hover {
460
  }
461
 
462
  .dgwt-wcas-pd-rest .product-title {
463
- display: block;
464
- line-height: 100%;
465
- font-weight: 500;
466
- margin-bottom: 5px;
467
  }
468
 
469
  .dgwt-wcas-tpd-rest {
470
- max-width: 200px;
471
  }
472
 
473
  .dgwt-wcas-tpd-rest-title {
474
- display: block;
475
- line-height: 125%;
476
- font-size: 14px;
477
- font-weight: 500;
478
- letter-spacing: 0;
479
- margin: 0 0 8px;
480
- overflow: hidden;
481
- color: #000;
482
  }
483
 
484
  .dgwt-wcas-suggestion-nores {
485
- pointer-events: none;
486
- opacity: 0.45;
487
  }
 
488
  .dgwt-wcas-tpd-price {
489
 
490
  }
 
491
  .dgwt-wcas-pd-price,
492
  .dgwt-wcas-tpd-price {
493
- font-size: 14px;
494
- line-height: 120%;
495
- overflow: hidden;
496
- color: #000;
497
- margin-top: 15px;
498
- font-weight: bold;
499
- font-size: 18px;
500
  }
 
501
  .dgwt-wcas-tpd-price {
502
- font-size: 12px;
503
- color: #777;
504
  }
 
505
  .dgwt-wcas-tpd-price .woocommerce-price-suffix,
506
  .dgwt-wcas-pd-price .woocommerce-price-suffix {
507
- font-size: 12px;
508
- font-weight: lighter;
509
- color: #999;
510
- margin-left: 4px;
511
- display: inline-block;
512
  }
513
 
514
  .dgwt-wcas-tpd-price del .amount,
515
  .dgwt-wcas-pd-price del .amount {
516
- font-weight: lighter;
517
- background: transparent;
518
- font-size: 90%;
519
- opacity: 0.6;
520
  }
521
 
522
  .dgwt-wcas-tpd-price ins,
523
  .dgwt-wcas-pd-price ins {
524
- background: transparent;
525
- text-decoration: none;
526
  }
527
 
528
  .dgwt-wcas-pd-rating {
529
- font-size: 13px;
530
- line-height: 13px;
531
  }
532
 
533
  .dgwt-wcas-pd-rating:after {
534
- content: '';
535
- clear: both;
536
- display: block;
537
  }
538
 
539
  .dgwt-wcas-pd-review {
540
- color: #777;
541
- font-size: 11px;
542
- line-height: 11px;
543
  }
544
 
545
  .dgwt-wcas-datails-title {
546
- border-bottom: 1px dashed #eee;
547
- display: block;
548
- margin: 5px 0 15px 0;
549
- padding-bottom: 5px;
550
  }
551
 
552
  .dgwt-wcas-pd-title {
553
- border-bottom: 1px dashed #eee;
554
- margin-bottom: 15px;
555
- padding-bottom: 5px;
556
- display: block;
557
 
558
- text-decoration: none;
559
  }
560
 
561
  .dgwt-wcas-pd-title .product-title {
562
- font-weight: 900;
563
 
564
- text-transform: uppercase;
565
- letter-spacing: -1px;
566
  }
567
 
568
  .dgwt-wcas-details-title-tax {
569
- text-transform: uppercase;
570
- font-weight: 900;
571
- letter-spacing: -1px;
572
- margin-right: 3px;
573
 
574
  }
575
 
576
  .rtl .dgwt-wcas-details-title-tax {
577
- margin: 0 0 0 3px;
578
- float: right;
579
  }
580
 
581
 
582
  .dgwt-wcas-tpd-image {
583
- width: 70px;
584
- padding: 4px;
585
- background-color: #fff;
586
- border: 1px solid #e8e8e8;
587
- border-radius: 4px;
588
- display: flex;
589
- flex-direction: column;
590
- justify-content: center;
591
  }
592
 
593
 
594
  .dgwt-wcas-details-space {
595
- padding: 0 15px 15px 15px;
596
  }
597
 
598
  .dgwt-wcas-details-main-image {
599
- border-bottom: 1px solid #eee;
600
- min-height: 200px;
601
- display: flex;
602
  }
603
 
604
  .dgwt-wcas-details-main-image img {
605
- width: auto;
606
- height: auto;
607
- display: block;
608
- max-height: 250px;
609
- max-width: 100%;
610
- margin: 0 auto;
611
- padding: 0;
612
- border: none;
613
- align-self: center;
614
  }
615
- .dgwt-wcas-details-right .dgwt-wcas-details-main-image img{
616
- border-radius: 0 3px 0 0;
 
617
  }
618
- .dgwt-wcas-details-left .dgwt-wcas-details-main-image img{
619
- border-radius: 3px 0 0 0;
 
620
  }
621
 
622
 
623
  a.dgwt-wcas-details-post-title,
624
  a.dgwt-wcas-details-product-title {
625
- color: #333;
626
- display: block;
627
- line-height: 120%;
628
- margin: 10px 0 0 0;
629
- font-size: 21px;
630
- font-weight: normal;
631
- text-decoration: none;
632
- text-transform: none;
633
  }
 
634
  a.dgwt-wcas-details-post-title:hover,
635
  a.dgwt-wcas-details-product-title:hover {
636
- text-decoration: underline;
637
  }
 
638
  a.dgwt-wcas-details-post-title {
639
- margin-bottom: 15px;
640
  }
641
 
642
  .dgwt-wcas-details-product-sku {
643
- display: block;
644
- font-size: 12px;
645
- line-height: 110%;
646
- color: #999;
647
  }
648
 
649
  .dgwt-wcas-tpd-image img {
650
- display: block;
651
- max-width: 100%;
652
- width: 100%;
653
- height: auto;
654
  }
655
 
656
  .dgwt-wcas-details-hr {
657
- height: 1px;
658
- width: 100%;
659
- border-bottom: 1px solid #eee;
660
- margin: 15px 0;
661
  }
662
 
663
  .rtl .dgwt-wcas-tpd-image {
664
- float: right;
665
- margin-right: 0;
666
- margin-left: 15px;
667
  }
668
 
669
  .rtl .dgwt-wcas-tpd-rest {
670
- float: right;
671
- max-width: 190px;
672
  }
673
 
674
  .rtl input[type="search"].dgwt-wcas-search-input {
675
- text-align: right;
676
  }
677
 
678
  input[type="search"].dgwt-wcas-search-input,
679
  input[type="text"].dgwt-cas-search-input {
680
- -webkit-transition: none;
681
- -moz-transition: none;
682
- -ms-transition: none;
683
- -o-transition: none;
684
- transition: none;
685
- -webkit-box-shadow: none;
686
- box-shadow: none;
687
- margin: 0;
688
- -webkit-appearance: textfield;
689
- text-align: left;
690
  }
691
 
692
  [type="search"].dgwt-wcas-search-input::-ms-clear {
693
- display: none;
694
  }
695
 
696
  [type="search"].dgwt-wcas-search-input::-webkit-search-decoration {
697
- -webkit-appearance: none;
698
  }
699
 
700
  [type="search"].dgwt-wcas-search-input::-webkit-search-cancel-button {
701
- display: none;
702
  }
703
 
704
  .dgwt-wcas-details-desc {
705
- font-size: 13px;
706
- line-height: 157%;
707
  }
708
 
709
  .dgwt-wcas-details-desc strong,
710
  .dgwt-wcas-details-desc b {
711
- font-weight: normal;
712
- color: #000;
713
- margin: 0;
714
- padding: 0;
715
  }
716
 
717
 
718
  .dgwt-wcas-pd-addtc-form {
719
- margin: 10px 0;
720
- display: flex;
721
- align-items: center;
722
- justify-content: flex-end;
723
  }
724
 
725
  .dgwt-wcas-pd-addtc-form > .quantity {
726
- margin-right: 10px;
727
  }
728
 
729
  .dgwt-wcas-pd-addtc-form .quantity input.qty,
730
  .dgwt-wcas-pd-addtc-form .add_to_cart_inline {
731
- margin-bottom: 0;
732
- margin-top: 0;
733
  }
734
 
735
  .dgwt-wcas-stock {
736
- display: block;
737
- text-align: right;
738
- font-size: 14px;
739
- line-height: 14px;
740
- margin-bottom: 14px;
741
 
742
  }
 
743
  .dgwt-wcas-stock.in-stock {
744
- color: #0f834d;
745
  }
746
 
747
  .dgwt-wcas-stock.out-of-stock {
748
- color: #e2401c;
749
  }
750
 
751
  .dgwt-wcas-pd-addtc .add_to_cart_inline,
752
  .dgwt-wcas-pd-addtc .add_to_cart_button {
753
- margin: 0;
754
  }
 
755
  .dgwt-wcas-pd-addtc .add_to_cart_button.added {
756
- display: none;
757
  }
758
 
759
  input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
760
- position: relative;
761
  }
762
 
763
  .dgwt-wcas-ico-magnifier {
764
- bottom: 0;
765
- left: 0;
766
- margin: auto;
767
- position: absolute;
768
- right: 0;
769
- top: 0;
770
- height: 65%;
771
- display: block;
772
  }
773
 
774
  .dgwt-wcas-preloader {
775
- height: 100%;
776
- position: absolute;
777
- right: 0;
778
- top: 0;
779
- width: 40px;
780
- z-index: 1;
781
- background-repeat: no-repeat;
782
- background-position: right 15px center;
783
- background-size: auto 44%;
784
  }
785
 
786
  .rtl .dgwt-wcas-preloader {
787
- right: auto;
788
- left: 5px;
789
  }
790
 
791
  .dgwt-wcas-inner-preloader {
792
- background-repeat: no-repeat;
793
- background-position: right 8px center;
794
- background-size: auto 22px;
795
  display: flex;
796
  align-items: center;
797
  justify-content: center;
 
798
  }
799
 
800
  @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
801
- .dgwt-wcas-inner-preloader {
802
- background-image: url('../img/preloader.gif');
803
- }
804
  }
805
 
806
  .dgwt-wcas-loader-circular {
@@ -849,18 +866,18 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
849
  }
850
 
851
  @-webkit-keyframes dash {
852
- 0% {
853
- stroke-dasharray: 1, 200;
854
- stroke-dashoffset: 0;
855
- }
856
- 50% {
857
- stroke-dasharray: 89, 200;
858
- stroke-dashoffset: -35px;
859
- }
860
- 100% {
861
- stroke-dasharray: 89, 200;
862
- stroke-dashoffset: -124px;
863
- }
864
  }
865
 
866
  @-moz-keyframes dash {
@@ -894,110 +911,130 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
894
  }
895
 
896
  .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader) {
897
- cursor: pointer;
898
  display: flex;
899
  align-items: center;
900
  justify-content: center;
901
- -webkit-transition: all 160ms ease-in-out;
902
- -moz-transition: all 160ms ease-in-out;
903
- -ms-transition: all 160ms ease-in-out;
904
- -o-transition: all 160ms ease-in-out;
905
- transition: all 160ms ease-in-out;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
906
  }
907
 
908
  .dgwt-wcas-close:hover {
909
- opacity: 0.3;
910
  }
911
 
912
  @media screen and (max-width: 992px) {
913
- .dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp {
914
- max-width: none;
915
- }
916
  }
917
 
918
  .dgwt-wcas-suggestion strong {
919
- font-weight: bold;
920
  }
921
 
922
  .screen-reader-text {
923
- clip: rect(1px, 1px, 1px, 1px);
924
- height: 1px;
925
- overflow: hidden;
926
- position: absolute !important;
927
- width: 1px;
928
  }
929
 
930
  .dgwt-wcas-sf-wrapp:before, .dgwt-wcas-sf-wrapp:after {
931
- content: "";
932
- display: table;
933
  }
934
 
935
  .dgwt-wcas-sf-wrapp:after {
936
- clear: both;
937
  }
938
 
939
  .dgwt-wcas-sf-wrapp {
940
- zoom: 1;
941
- width: 100%;
942
  max-width: 100vw;
943
- margin: 0;
944
- position: relative;
945
- background: none;
946
  }
947
 
948
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
949
- width: 100%;
950
- height: 40px;
951
- font-size: 14px;
952
- line-height: 100%;
953
- padding: 10px 15px;
954
- margin: 0;
955
- background: #fff;
956
- border: 1px solid #ddd;
957
- border-radius: 3px;
958
- -webkit-border-radius: 3px;
959
- -webkit-appearance: none;
960
- box-sizing: border-box;
961
  }
962
 
963
  .dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
964
- border-radius: 3px 3px 0 0;
965
  }
966
 
967
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
968
- display: none !important;
969
  }
970
 
971
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-suggestions-wrapp {
972
- min-height: 0 !important;
973
- border-radius: 0 0 5px 5px;
974
- border-right-color: #ddd;
975
  }
976
 
977
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp,
978
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
979
- min-height: 41px !important;
980
  }
981
 
982
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.rtl):not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp {
983
- border-right-color: transparent;
984
  }
985
 
986
  .dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-details-wrapp .dgwt-wcas-preloader-wrapp {
987
- display: none!important;
988
  }
 
989
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-is-details:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestion-nores {
990
- margin-top: 5px;
991
  }
992
 
993
  .rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp {
994
- border-left-color: transparent;
995
  }
996
 
997
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
998
- outline: 0;
999
- background: #fff;
1000
- box-shadow: 0 0 9px 1px rgba(0, 0, 0, 0.06);
1001
  -webkit-transition: all 150ms ease-in;
1002
  -moz-transition: all 150ms ease-in;
1003
  -ms-transition: all 150ms ease-in;
@@ -1006,131 +1043,131 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
1006
  }
1007
 
1008
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
1009
- color: #999;
1010
- font-weight: normal;
1011
- font-style: italic;
1012
- line-height: normal;
1013
  }
1014
 
1015
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-webkit-input-placeholder {
1016
- color: #999;
1017
- font-weight: normal;
1018
- font-style: italic;
1019
- line-height: normal;
1020
  }
1021
 
1022
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:-moz-placeholder {
1023
- color: #999;
1024
- font-weight: normal;
1025
- font-style: italic;
1026
- line-height: normal;
1027
  }
1028
 
1029
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-moz-placeholder {
1030
- color: #999;
1031
- font-weight: normal;
1032
- font-style: italic;
1033
- line-height: normal;
1034
  }
1035
 
1036
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:-ms-input-placeholder {
1037
- color: #999;
1038
- font-weight: normal;
1039
- font-style: italic;
1040
- line-height: normal;
1041
  }
1042
 
1043
  /* Form submit button */
1044
  .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
1045
- overflow: visible;
1046
- position: absolute;
1047
- border: 0;
1048
- padding: 0;
1049
- margin: 0;
1050
- cursor: pointer;
1051
- height: 40px;
1052
- min-width: 50px;
1053
  width: auto;
1054
  line-height: 100%;
1055
  min-height: 100%;
1056
- right: 0;
1057
- left: auto;
1058
- top: 0;
1059
- bottom: auto;
1060
- padding: 0 15px;
1061
- color: #fff;
1062
- -webkit-transition: all 250ms ease-in-out;
1063
- -moz-transition: all 250ms ease-in-out;
1064
- -ms-transition: all 250ms ease-in-out;
1065
- -o-transition: all 250ms ease-in-out;
1066
- transition: all 250ms ease-in-out;
1067
- text-transform: uppercase;
1068
- background-color: #333;
1069
- border-radius: 0 2px 2px 0;
1070
- -webkit-border-radius: 0 2px 2px 0;
1071
- text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
1072
- -webkit-box-shadow: none;
1073
- box-shadow: none;
1074
- -webkit-appearance: none;
1075
  }
1076
 
1077
  .rtl .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
1078
- left: 0;
1079
- right: auto;
1080
  }
1081
 
1082
  .dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit {
1083
- border-radius: 0 2px 0 0;
1084
  }
1085
 
1086
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover {
1087
- opacity: 0.7;
1088
  }
1089
 
1090
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,
1091
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus {
1092
- opacity: 0.7;
1093
- outline: 0;
1094
  }
1095
 
1096
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before {
1097
- content: '';
1098
- position: absolute;
1099
- border-width: 8px 8px 8px 0;
1100
- border-style: solid solid solid none;
1101
- border-color: transparent #333 transparent;
1102
- top: 12px;
1103
- left: -6px;
1104
- -webkit-transition: all 250ms ease-in-out;
1105
- -moz-transition: all 250ms ease-in-out;
1106
- -ms-transition: all 250ms ease-in-out;
1107
- -o-transition: all 250ms ease-in-out;
1108
- transition: all 250ms ease-in-out;
1109
  }
1110
 
1111
  .rtl .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before {
1112
- left: auto;
1113
- right: -6px;
1114
- border-width: 8px 0 8px 8px;
1115
- border-style: solid none solid solid;
1116
  }
1117
 
1118
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover:before {
1119
- border-right-color: #333;
1120
  }
1121
 
1122
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus:before,
1123
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active:before {
1124
- border-right-color: #333;
1125
  }
1126
 
1127
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::-moz-focus-inner { /* remove extra button spacing for Mozilla Firefox */
1128
- border: 0;
1129
- padding: 0;
1130
  }
1131
 
1132
  .dgwt-wcas-details-wrapp .added_to_cart {
1133
- display: block;
1134
  }
1135
 
1136
  /*------------------------------------------------------
@@ -1138,7 +1175,7 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
1138
  ---------------------------------------------------------*/
1139
  .dgwt-wcas-has-img .dgwt-wcas-sp > *,
1140
  .dgwt-wcas-has-desc .dgwt-wcas-sp > * {
1141
- display: block;
1142
  }
1143
 
1144
  /*------------------------------------------------------
@@ -1146,50 +1183,50 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
1146
  ---------------------------------------------------------*/
1147
 
1148
  .dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
1149
- min-height: 340px;
1150
  }
1151
 
1152
  body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child {
1153
- border-bottom: none;
1154
  }
1155
 
1156
  .dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
1157
- min-height: 40px;
1158
  }
1159
 
1160
  .dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
1161
- overflow: visible;
1162
  }
1163
 
1164
  .dgwt-wcas-is-details .dgwt-wcas-si {
1165
- width: 30px;
1166
- max-width: 100%;
1167
- box-sizing: border-box;
1168
  }
1169
 
1170
  .dgwt-wcas-is-details .dgwt-wcas-sp {
1171
- display: flex;
1172
- top: 0;
1173
- flex-direction: column;
1174
- height: 100%;
1175
- justify-content: center;
1176
- resize: vertical;
1177
  }
1178
 
1179
  .dgwt-wcas-is-details .dgwt-wcas-sd {
1180
- font-size: 11px;
1181
- line-height: 100%;
1182
  }
1183
 
1184
  .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_cat'],
1185
  .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_tag'] {
1186
- padding-left: 15px;
1187
- min-height: 0;
1188
  }
1189
 
1190
  .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_cat'] .dgwt-wcas-st,
1191
  .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_tag'] .dgwt-wcas-st {
1192
- padding-left: 0;
1193
  }
1194
 
1195
  .dgwt-wcas-ico-magnifier,
@@ -1198,32 +1235,33 @@ body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child {
1198
  }
1199
 
1200
  .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier {
1201
- height: 50%;
1202
  margin: auto;
1203
- max-height: 20px;
1204
- width: 100%;
1205
- max-width: 20px;
1206
- left: 12px;
1207
- right: auto;
1208
- opacity: 0.5;
1209
- fill: #000;
1210
  }
1211
 
1212
  .rtl .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier {
1213
- left: auto;
1214
- right: 12px;
1215
  }
1216
 
1217
  .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
1218
- padding: 10px 15px 10px 40px;
1219
  }
 
1220
  .rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
1221
- padding: 10px 40px 10px 15px;
1222
  }
1223
 
1224
  .dgwt-wcas-overlay-mobile-on,
1225
  .dgwt-wcas-overlay-mobile-on body {
1226
- overflow: hidden;
1227
  min-width: 100vw;
1228
  min-height: 100vh;
1229
  }
@@ -1233,9 +1271,9 @@ html.dgwt-wcas-overlay-mobile-on {
1233
  }
1234
 
1235
  .dgwt-wcas-om-bar {
1236
- display: flex;
1237
- height: 45px;
1238
- width: 100%;
1239
  }
1240
 
1241
  .dgwt-wcas-om-bar button.dgwt-wcas-om-return,
@@ -1258,21 +1296,21 @@ html.dgwt-wcas-overlay-mobile-on {
1258
  }
1259
 
1260
  .dgwt-wcas-om-bar .dgwt-wcas-om-return svg {
1261
- width: 23px;
1262
- height: 23px;
1263
- position: absolute;
1264
- left: 12px;
1265
- top: 12px;
1266
  }
1267
 
1268
  .rtl .dgwt-wcas-om-bar .dgwt-wcas-om-return svg {
1269
- left: 11px;
1270
- top: 9px;
1271
- -moz-transform: rotate(180deg);
1272
- -webkit-transform: rotate(180deg);
1273
- -o-transform: rotate(180deg);
1274
- -ms-transform: rotate(180deg);
1275
- transform: rotate(180deg);
1276
  }
1277
 
1278
  .dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path {
@@ -1280,19 +1318,25 @@ html.dgwt-wcas-overlay-mobile-on {
1280
  }
1281
 
1282
  .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader {
1283
- right: 0 !important;
1284
  }
1285
 
1286
  .rtl .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader {
1287
- left: 4px !important;
1288
- right: auto !important;
1289
  }
1290
 
1291
 
1292
  @keyframes dgwt-wcas-preloader-price-anim {
1293
- 0% { background: rgba(128, 128, 128, 0.03) }
1294
- 50% { background: rgba(128, 128, 128, 0.1) }
1295
- 100% { background: rgba(128, 128, 128, 0.03) }
 
 
 
 
 
 
1296
  }
1297
 
1298
  .dgwt-wcas-preloader-price-inner div:nth-child(1) {
@@ -1317,6 +1361,7 @@ html.dgwt-wcas-overlay-mobile-on {
1317
  overflow: hidden;
1318
  background: none;
1319
  }
 
1320
  .dgwt-wcas-preloader-price-inner {
1321
  width: 100%;
1322
  height: 100%;
@@ -1325,6 +1370,7 @@ html.dgwt-wcas-overlay-mobile-on {
1325
  backface-visibility: hidden;
1326
  transform-origin: 0 0; /* see note above */
1327
  }
 
1328
  .dgwt-wcas-preloader-price-inner div {
1329
  position: absolute;
1330
  width: 8px;
@@ -1339,53 +1385,54 @@ html.dgwt-wcas-overlay-mobile-on {
1339
  }
1340
 
1341
  .dgwt-wcas-om-bar .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
1342
- display: none;
1343
  }
1344
 
1345
  .dgwt-wcas-om-bar .dgwt-wcas-search-wrapp-mobile {
1346
- width: calc(100% - 45px);
1347
- max-width: none;
1348
  margin: 0;
1349
  }
 
1350
  .dgwt-wcas-overlay-mobile .dgwt-wcas-search-form {
1351
  width: 100%;
1352
  }
1353
 
1354
  .dgwt-wcas-overlay-mobile {
1355
- position: absolute;
1356
- left: 0;
1357
- right: 0;
1358
- top: 0;
1359
- bottom: 0;
1360
- width: 100%;
1361
- background: #fff;
1362
  }
1363
 
1364
  .dgwt-wcas-overlay-mobile * {
1365
- box-sizing: border-box;
1366
  }
1367
 
1368
  .dgwt-wcas-search-wrapp-mobile input[type="search"].dgwt-wcas-search-input {
1369
- height: 45px !important;
1370
- border-top: none;
1371
- border-right: none;
1372
- border-left: none;
1373
- border-radius: 0;
1374
- font-size: 16px !important;
1375
  }
1376
 
1377
  .dgwt-wcas-search-wrapp-mobile input[type="search"].dgwt-wcas-search-input:focus {
1378
- font-size: 16px !important;
1379
  }
1380
 
1381
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
1382
- left: 0 !important;
1383
- top: 45px !important;
1384
- width: 100% !important;
1385
- height: calc(100% - 45px) !important;
1386
- position: absolute;
1387
- overflow-y: auto;
1388
- border: none;
1389
  margin: 0;
1390
  display: block;
1391
  }
@@ -1395,66 +1442,68 @@ html.dgwt-wcas-overlay-mobile-on {
1395
  }
1396
 
1397
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-enable-mobile-form {
1398
- display: none;
1399
  }
1400
 
1401
  .dgwt-wcas-enable-mobile-form {
1402
- position: absolute;
1403
- z-index: 100;
1404
- left: 0;
1405
- top: 0;
1406
- width: 100%;
1407
- height: 100%;
1408
- cursor: pointer;
1409
  }
1410
 
1411
  html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-mobile .dgwt-wcas-search-form {
1412
- display: none;
1413
- position: relative;
1414
  }
 
1415
  html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-icon-mobile {
1416
- min-width:0;
1417
- display: inline-block;
1418
- width: 28px;
1419
- height: 28px;
1420
  }
 
1421
  html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler {
1422
- height: 100%;
1423
- width: 100%;
1424
  }
1425
 
1426
- html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler .dgwt-wcas-ico-magnifier{
1427
- opacity: 1;
1428
- position: static;
1429
- max-width: none;
1430
- max-height:none;
1431
  }
1432
 
1433
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-icon-handler {
1434
- display: none;
1435
  }
1436
 
1437
  .dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp {
1438
- height: calc(100% - 45px) !important;
1439
  }
1440
 
1441
  .dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios {
1442
- overflow: visible;
1443
  }
1444
 
1445
  .dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp {
1446
- max-height: none !important;
1447
- height: auto !important;
1448
  }
1449
 
1450
  .dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios body:not(.dgwt-wcas-theme-flatsome) > *:not(.dgwt-wcas-overlay-mobile) {
1451
- display: none;
1452
  }
1453
 
1454
  /* compatibility with external plugins and themes */
1455
  body .dgwt-wcas-content-wrapp .zwave,
1456
  body .dgwt-wcas-content-wrapp .rood {
1457
- display: none;
1458
  }
1459
 
1460
  /*------------------------------------------------------
@@ -1468,9 +1517,11 @@ body .dgwt-wcas-content-wrapp .rood {
1468
  .dgwt-wcas-layout-icon-flexible .dgwt-wcas-search-form {
1469
  opacity: 0;
1470
  }
 
1471
  .dgwt-wcas-layout-icon-flexible-loaded .dgwt-wcas-search-form {
1472
  opacity: 1;
1473
  }
 
1474
  .dgwt-wcas-search-icon-arrow {
1475
  display: none;
1476
  }
@@ -1495,15 +1546,18 @@ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-
1495
  display: block;
1496
  opacity: 1;
1497
  }
 
1498
  .dgwt-wcas-search-icon {
1499
  width: 20px;
1500
  height: auto;
1501
  cursor: pointer;
1502
  }
 
1503
  .dgwt-wcas-ico-magnifier-handler {
1504
  margin-bottom: -0.2em;
1505
- width:100%;
1506
  }
 
1507
  .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon {
1508
  opacity: 0.6;
1509
  }
@@ -1511,9 +1565,11 @@ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-
1511
  .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 {
1512
  display: none;
1513
  }
 
1514
  .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 {
1515
  padding-left: 15px;
1516
  }
 
1517
  .dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow {
1518
  display: block;
1519
  position: absolute;
@@ -1536,47 +1592,68 @@ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-
1536
  .dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow {
1537
  display: none;
1538
  }
 
1539
  /*------------------------------------------------------
1540
  Style with headings
1541
  ---------------------------------------------------------*/
1542
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion {
1543
- border-bottom: none;
1544
  }
1545
 
1546
  .dgwt-wcas-has-headings .dgwt-wcas-st > span.dgwt-wcas-st--direct-headline {
1547
- display: none;
1548
  }
1549
 
1550
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline {
1551
- pointer-events: none;
1552
- display: block;
1553
- font-weight: 500;
1554
- white-space: nowrap;
1555
  }
1556
 
1557
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
1558
- border-bottom: 1px solid #ddd;
1559
- padding-bottom: 3px;
1560
- text-transform: uppercase;
1561
- margin-top: 16px;
1562
- font-size: 12px;
1563
  }
1564
 
1565
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,
1566
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
1567
- border-bottom: none;
1568
  }
1569
 
1570
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st {
1571
- padding: 0;
1572
  }
1573
 
1574
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover,
1575
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected {
1576
- background: transparent;
1577
- text-decoration: underline;
1578
  }
1579
 
1580
  .dgwt-wcas-is-details .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
1581
- min-height: 30px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1582
  }
1
  .dgwt-wcas-block-scroll {
2
+ overflow: hidden;
3
  }
4
 
5
  .dgwt-wcas-search-wrapp {
6
+ position: relative;
7
  line-height: 100%;
8
+ display: block;
9
+ color: #444;
10
+ min-width: 230px;
11
+ width: 100%;
12
+ text-align: left;
13
+ margin: 0 auto;
14
+ -webkit-box-sizing: border-box;
15
+ -moz-box-sizing: border-box;
16
+ box-sizing: border-box;
17
  }
18
 
19
  .dgwt-wcas-tpd-image img {
20
+ margin: 0 15px 0 0 !important;
21
+ display: block;
22
  }
23
 
24
  .rtl .dgwt-wcas-tpd-image img {
25
+ margin: 0 0 0 15px !important;
26
  }
27
 
28
  .dgwt-wcas-preloader-wrapp img {
29
+ margin: 10px auto 0 auto;
30
+ display: block;
31
+ max-width: 200px;
32
  }
33
 
34
  .dgwt-wcas-preloader-wrapp img.dgwt-wcas-placeholder-preloader {
35
+ display: block;
36
+ width: 100%;
37
+ height: auto;
38
+ max-width: 300px;
39
+ margin: 0;
40
  }
41
 
42
  .dgwt-wcas-suggestions-wrapp {
43
+ background: #fff none repeat scroll 0 0;
44
+ border: 1px solid #ddd;
45
+ border-top: none;
46
+ padding: 0;
47
  margin: 0;
48
+ -webkit-box-sizing: border-box;
49
+ -moz-box-sizing: border-box;
50
+ box-sizing: border-box;
51
+ overflow-y: auto;
52
  }
53
 
54
  .dgwt-wcas-search-wrapp *,
61
 
62
  .dgwt-wcas-details-wrapp a:focus,
63
  .dgwt-wcas-suggestions-wrapp a:focus {
64
+ outline: none;
65
  }
66
 
67
  .dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp--top {
68
+ border: 1px solid #ddd;
69
+ border-bottom: none;
70
  }
71
 
72
  .dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp {
73
+ max-width: 550px;
74
  }
75
 
76
  .dgwt-wcas-full-width.dgwt-wcas-is-detail-box .dgwt-wcas-suggestion {
77
+ padding: 8px 15px;
78
  }
79
 
80
  .dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp {
81
+ border-radius: 0 0 5px 0;
82
+ border-left-color: #eee;
83
  }
84
 
85
  .dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp {
86
+ border-radius: 0 0 0 5px;
87
+ border-right-color: #eee;
88
  }
89
 
90
  .dgwt-wcas-suggestion {
91
+ cursor: pointer;
92
+ font-size: 12px;
93
+ line-height: 110%;
94
+ text-align: left;
95
+ padding: 7px 10px;
96
+ position: relative;
97
+ border-bottom: 1px solid #dfdfdf;
98
+ display: flex;
99
+ flex-direction: row;
100
+ justify-content: space-between;
101
+ align-items: center;
102
+ resize: vertical;
103
  width: 100%;
104
  }
105
 
106
  .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
107
+ justify-content: center;
108
+ color: #6d6d6d;
109
  }
110
+
111
  a.dgwt-wcas-details-more-products {
112
+ padding: 15px 0 10px 0;
113
+ display: block;
114
+ border-top: 1px solid #eee;
115
+ text-align: center;
116
+ font-size: 12px;
117
+ text-transform: uppercase;
118
+ color: #6d6d6d;
119
+ transition: all 200ms ease-in-out;
120
  }
121
+
122
  a.dgwt-wcas-details-more-products:hover {
123
+ text-decoration: underline;
124
  }
125
 
126
  a.dgwt-wcas-product-details-readmore {
127
+ display: block;
128
+ text-align: right;
129
+ margin-top: 15px;
130
+ color: #6d6d6d;
131
+ text-transform: uppercase;
132
+ letter-spacing: 1px;
133
+ font-weight: normal;
134
+ font-size: 12px;
135
  }
136
+
137
  a.dgwt-wcas-product-details-readmore:hover {
138
+ text-decoration: underline;
139
  }
140
 
141
  .dgwt-wcas-suggestion.dgwt-wcas-suggestion-no-border-bottom {
142
+ border-bottom: none;
143
  }
144
 
145
  .dgwt-wcas-suggestion:after {
146
+ clear: both;
147
+ display: block;
148
+ content: '';
149
  }
150
 
151
  .dgwt-wcas-suggestion.dgwt-wcas-nores {
152
+ cursor: default;
153
+ opacity: 0.5;
154
  }
155
 
156
  .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
157
+ padding-top: 8px;
158
+ padding-bottom: 8px;
159
+ min-height: 60px;
160
  }
161
 
162
  .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more,
163
  .dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
164
+ min-height: 30px;
165
+ text-transform: uppercase;
166
  }
167
 
168
  .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more {
169
+ padding: 0 10px;
170
+ text-align: center;
171
  }
172
 
173
  .dgwt-wcas-st {
174
+ display: block;
175
+ color: #444;
176
+ font-size: 15px;
177
+ width: 100%;
178
+ line-height: 110%;
179
  }
180
 
181
  .dgwt-wcas-st > span {
182
+ display: inline-block;
183
+ vertical-align: middle;
184
  }
185
 
186
  .dgwt-wcas-has-sku .dgwt-wcas-st-title {
187
+ margin-right: 6px;
188
  }
189
 
190
  .dgwt-wcas-st > span.dgwt-wcas-st--direct-headline {
191
+ display: block;
192
+ font-style: italic;
193
+ font-size: 10px;
194
+ text-transform: uppercase;
195
+ opacity: 0.4;
196
+ line-height: 10px;
197
+ margin-bottom: 1px;
198
+ letter-spacing: 2px;
199
  }
200
 
201
  .dgwt-wcas-st-breadcrumbs {
202
+ overflow: hidden;
203
+ text-overflow: ellipsis;
204
+ white-space: nowrap;
205
+ font-size: 80%;
206
+ text-align: left;
207
+ opacity: 0.6;
208
+ width: 100%;
209
+ padding-right: 10px;
210
  }
211
 
212
  .rtl .dgwt-wcas-st-breadcrumbs {
213
+ padding-right: 0;
214
+ padding-left: 10px;
215
+ text-align: right;
216
  }
217
 
218
  .dgwt-wcas-sku {
219
+ font-size: 80%;
220
  }
221
 
222
  .dgwt-wcas-si {
223
+ width: 50px;
224
+ display: block;
225
+ height: 100%;
226
  }
227
 
228
  .dgwt-wcas-si img {
229
+ background: #fff none repeat scroll 0 0;
230
+ border: 1px solid #e8e8e8;
231
+ border-radius: 3px;
232
+ display: block;
233
+ margin: auto;
234
+ padding: 2px;
235
+ height: auto;
236
+ width: auto;
237
+ max-height: 90%;
238
+ max-width: 100%;
239
  }
240
 
241
  .dgwt-wcas-content-wrapp {
242
+ display: flex;
243
+ height: 100%;
244
+ width: 100%;
245
+ justify-content: space-between;
246
+ align-items: center;
247
+ resize: vertical;
248
+ padding-left: 10px;
249
  }
250
 
251
  .rtl .dgwt-wcas-content-wrapp {
252
+ padding-left: 0;
253
+ padding-right: 10px;
254
  }
255
 
256
  .dgwt-wcas-sp {
257
+ color: #555;
258
+ font-size: 14px;
259
+ line-height: 120%;
260
+ text-align: right;
261
+ line-height: 4px;
262
+ padding-left: 10px;
263
  }
264
 
265
  .dgwt-wcas-sp * {
266
+ line-height: 130%;
267
  }
268
 
269
  .dgwt-wcas-search-form {
270
+ margin: 0;
271
+ padding: 0;
272
  width: 100%;
273
  }
274
 
275
  .dgwt-wcas-sp del {
276
+ opacity: 0.5;
277
+ font-size: 12px;
278
  }
279
 
280
  .dgwt-wcas-sd {
281
+ color: #777;
282
+ display: block;
283
+ line-height: 14px;
284
+ width: 100%;
285
+ margin-top: 5px;
286
+ font-size: 0.8em;
287
  }
288
 
289
+ .dgwt-wcas-vendor-city {
290
+ margin-left: 5px;
291
  font-size: 0.8em;;
292
  }
293
 
294
+ .dgwt-wcas-st > .dgwt-wcas-product-vendor {
295
+ font-size: 12px;
296
+ margin-top: 5px;
297
  display: block;
298
  }
299
 
300
  .dgwt-wcas-suggestion-selected {
301
+ background-color: #eeeeee;
302
  }
303
 
304
  .dgwt-wcas-suggestion-selected:first-child {
305
+ border-top: none;
306
  }
307
 
308
  .rtl .dgwt-wcas-suggestion {
309
+ padding-left: 0;
310
+ padding-right: 15px;
311
+ text-align: right;
312
  }
313
 
314
  .dgwt-wcas-details-wrapp {
315
+ background: #fff none repeat scroll 0 0;
316
+ border: 1px solid #ddd;
317
+ border-top: none;
318
+ border-left: none;
319
+ padding: 0;
320
+ width: 300px;
321
+ -webkit-box-sizing: border-box;
322
+ -moz-box-sizing: border-box;
323
+ box-sizing: border-box;
324
+ z-index: 100;
325
+ min-height: 340px;
326
  }
327
 
328
  .rtl .dgwt-wcas-details-wrapp {
329
+ border-left: 1px solid #ddd;
330
+ border-right: none;
331
  }
332
 
333
  .dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
334
+ margin-top: -1px;
335
+ border-top: 1px solid #ddd;
336
  }
337
 
338
  .dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
339
+ margin-top: -1px;
340
+ border-top: 1px solid #ddd;
341
  }
342
 
343
  .dgwt-wcas-details-right .dgwt-wcas-details-wrapp {
344
+ border-left: none;
345
+ border-right: 1px solid #ddd;
346
+ border-radius: 0 5px 5px 0;
347
  }
348
 
349
  .dgwt-wcas-details-left .dgwt-wcas-details-wrapp {
350
+ border-right: none;
351
+ border-left: 1px solid #ddd;
352
+ border-radius: 5px 0 0 5px;
353
  }
354
 
355
  .dgwt-wcas-details-notfit .dgwt-wcas-details-wrapp {
356
+ display: none;
357
  }
358
 
359
  .dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
360
+ border-radius: 0 0 0 5px;
361
  }
362
 
363
  .dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
364
+ border-radius: 0 0 5px 0;
365
  }
366
 
367
  .rtl.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
368
+ border-radius: 0 0 5px 0;
369
  }
370
 
371
  .rtl.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
372
+ border-radius: 0 0 0 5px;
373
  }
374
 
375
  .dgwt-wcas-details-inner {
376
  display: none;
377
  }
378
+
379
  .dgwt-wcas-details-inner.dgwt-wcas-details-inner-active {
380
  display: block;
381
  }
382
 
383
+ .dgwt-wcas-details-inner-taxonomy {
384
+ margin-top: 11px;
385
  }
386
 
387
  .woocommerce .dgwt-wcas-pd-rating .star-rating {
388
+ float: left;
389
+ margin-right: 5px;
390
+ font-size: 12px;
391
+ color: #CCAE72;
392
  }
393
 
394
  .rtl .dgwt-wcas-pd-rating .star-rating {
395
+ float: right;
396
+ margin-left: 5px;
397
+ margin-right: 0;
398
  }
399
 
400
  .dgwt-wcas-datails-title {
401
+ border-bottom: 1px dashed #eee;
402
+ display: block;
403
+ margin-bottom: 15px;
404
+ padding-bottom: 5px;
405
+ font-size: 14px;
406
  }
407
 
408
  .dgwt-wcas-pd-title {
409
+ border-bottom: 1px dashed #eee;
410
+ margin-bottom: 15px;
411
+ padding-bottom: 5px;
412
+ display: block;
413
+ color: #202020;
414
+ text-decoration: none;
415
  }
416
 
417
  .dgwt-wcas-pd-title .product-title {
418
+ font-weight: 900;
419
+ color: #202020;
420
+ text-transform: uppercase;
421
+ letter-spacing: -1px;
422
+ margin: 0;
423
  }
424
 
425
  .dgwt-wcas-details-title-tax {
426
+ text-transform: uppercase;
427
+ font-weight: 900;
428
+ letter-spacing: -1px;
429
+ margin-right: 3px;
430
  }
431
 
432
  .dgwt-wcas-tax-product-details {
433
+ text-decoration: none;
434
+ display: flex;
435
+ align-items: center;
436
+ justify-content: left;
437
+ transition: all 200ms ease-in-out;
438
+ padding: 5px;
439
+ margin: 0 -5px 15px -5px;
440
  }
441
 
442
  .dgwt-wcas-tax-product-details:after {
443
+ content: '';
444
+ clear: both;
445
+ display: block;
446
  }
447
 
448
  .dgwt-wcas-tax-product-details:hover {
449
+ box-shadow: 0 0 11px 2px rgba(0, 0, 0, 0.05);
450
+ }
451
+ .rtl .dgwt-wcas-tax-product-details {
452
+ justify-content: right;
453
  }
 
454
 
455
  .dgwt-wcas-details-wrapp .dgwt-wcas-pd-title {
456
+ margin-bottom: 8px;
457
  }
458
 
459
  .dgwt-wcas-tpd-image {
460
+ width: 60px;
461
+ margin-right: 15px;
462
  }
463
 
464
  .dgwt-wcas-pd-rest {
466
  }
467
 
468
  .dgwt-wcas-pd-rest .product-title {
469
+ display: block;
470
+ line-height: 100%;
471
+ font-weight: 500;
472
+ margin-bottom: 5px;
473
  }
474
 
475
  .dgwt-wcas-tpd-rest {
476
+ max-width: 200px;
477
  }
478
 
479
  .dgwt-wcas-tpd-rest-title {
480
+ display: block;
481
+ line-height: 125%;
482
+ font-size: 14px;
483
+ font-weight: 500;
484
+ letter-spacing: 0;
485
+ margin: 0 0 8px;
486
+ overflow: hidden;
487
+ color: #000;
488
  }
489
 
490
  .dgwt-wcas-suggestion-nores {
491
+ pointer-events: none;
492
+ opacity: 0.45;
493
  }
494
+
495
  .dgwt-wcas-tpd-price {
496
 
497
  }
498
+
499
  .dgwt-wcas-pd-price,
500
  .dgwt-wcas-tpd-price {
501
+ font-size: 14px;
502
+ line-height: 120%;
503
+ overflow: hidden;
504
+ color: #000;
505
+ margin-top: 15px;
506
+ font-weight: bold;
507
+ font-size: 18px;
508
  }
509
+
510
  .dgwt-wcas-tpd-price {
511
+ font-size: 12px;
512
+ color: #777;
513
  }
514
+
515
  .dgwt-wcas-tpd-price .woocommerce-price-suffix,
516
  .dgwt-wcas-pd-price .woocommerce-price-suffix {
517
+ font-size: 12px;
518
+ font-weight: lighter;
519
+ color: #999;
520
+ margin-left: 4px;
521
+ display: inline-block;
522
  }
523
 
524
  .dgwt-wcas-tpd-price del .amount,
525
  .dgwt-wcas-pd-price del .amount {
526
+ font-weight: lighter;
527
+ background: transparent;
528
+ font-size: 90%;
529
+ opacity: 0.6;
530
  }
531
 
532
  .dgwt-wcas-tpd-price ins,
533
  .dgwt-wcas-pd-price ins {
534
+ background: transparent;
535
+ text-decoration: none;
536
  }
537
 
538
  .dgwt-wcas-pd-rating {
539
+ font-size: 13px;
540
+ line-height: 13px;
541
  }
542
 
543
  .dgwt-wcas-pd-rating:after {
544
+ content: '';
545
+ clear: both;
546
+ display: block;
547
  }
548
 
549
  .dgwt-wcas-pd-review {
550
+ color: #777;
551
+ font-size: 11px;
552
+ line-height: 11px;
553
  }
554
 
555
  .dgwt-wcas-datails-title {
556
+ border-bottom: 1px dashed #eee;
557
+ display: block;
558
+ margin: 5px 0 15px 0;
559
+ padding-bottom: 5px;
560
  }
561
 
562
  .dgwt-wcas-pd-title {
563
+ border-bottom: 1px dashed #eee;
564
+ margin-bottom: 15px;
565
+ padding-bottom: 5px;
566
+ display: block;
567
 
568
+ text-decoration: none;
569
  }
570
 
571
  .dgwt-wcas-pd-title .product-title {
572
+ font-weight: 900;
573
 
574
+ text-transform: uppercase;
575
+ letter-spacing: -1px;
576
  }
577
 
578
  .dgwt-wcas-details-title-tax {
579
+ text-transform: uppercase;
580
+ font-weight: 900;
581
+ letter-spacing: -1px;
582
+ margin-right: 3px;
583
 
584
  }
585
 
586
  .rtl .dgwt-wcas-details-title-tax {
587
+ margin: 0 0 0 3px;
588
+ float: right;
589
  }
590
 
591
 
592
  .dgwt-wcas-tpd-image {
593
+ width: 70px;
594
+ padding: 4px;
595
+ background-color: #fff;
596
+ border: 1px solid #e8e8e8;
597
+ border-radius: 4px;
598
+ display: flex;
599
+ flex-direction: column;
600
+ justify-content: center;
601
  }
602
 
603
 
604
  .dgwt-wcas-details-space {
605
+ padding: 0 15px 15px 15px;
606
  }
607
 
608
  .dgwt-wcas-details-main-image {
609
+ border-bottom: 1px solid #eee;
610
+ min-height: 200px;
611
+ display: flex;
612
  }
613
 
614
  .dgwt-wcas-details-main-image img {
615
+ width: auto;
616
+ height: auto;
617
+ display: block;
618
+ max-height: 250px;
619
+ max-width: 100%;
620
+ margin: 0 auto;
621
+ padding: 0;
622
+ border: none;
623
+ align-self: center;
624
  }
625
+
626
+ .dgwt-wcas-details-right .dgwt-wcas-details-main-image img {
627
+ border-radius: 0 3px 0 0;
628
  }
629
+
630
+ .dgwt-wcas-details-left .dgwt-wcas-details-main-image img {
631
+ border-radius: 3px 0 0 0;
632
  }
633
 
634
 
635
  a.dgwt-wcas-details-post-title,
636
  a.dgwt-wcas-details-product-title {
637
+ color: #333;
638
+ display: block;
639
+ line-height: 120%;
640
+ margin: 10px 0 0 0;
641
+ font-size: 21px;
642
+ font-weight: normal;
643
+ text-decoration: none;
644
+ text-transform: none;
645
  }
646
+
647
  a.dgwt-wcas-details-post-title:hover,
648
  a.dgwt-wcas-details-product-title:hover {
649
+ text-decoration: underline;
650
  }
651
+
652
  a.dgwt-wcas-details-post-title {
653
+ margin-bottom: 15px;
654
  }
655
 
656
  .dgwt-wcas-details-product-sku {
657
+ display: block;
658
+ font-size: 12px;
659
+ line-height: 110%;
660
+ color: #999;
661
  }
662
 
663
  .dgwt-wcas-tpd-image img {
664
+ display: block;
665
+ max-width: 100%;
666
+ width: 100%;
667
+ height: auto;
668
  }
669
 
670
  .dgwt-wcas-details-hr {
671
+ height: 1px;
672
+ width: 100%;
673
+ border-bottom: 1px solid #eee;
674
+ margin: 15px 0;
675
  }
676
 
677
  .rtl .dgwt-wcas-tpd-image {
678
+ float: right;
679
+ margin-right: 0;
680
+ margin-left: 15px;
681
  }
682
 
683
  .rtl .dgwt-wcas-tpd-rest {
684
+ float: right;
685
+ max-width: 190px;
686
  }
687
 
688
  .rtl input[type="search"].dgwt-wcas-search-input {
689
+ text-align: right;
690
  }
691
 
692
  input[type="search"].dgwt-wcas-search-input,
693
  input[type="text"].dgwt-cas-search-input {
694
+ -webkit-transition: none;
695
+ -moz-transition: none;
696
+ -ms-transition: none;
697
+ -o-transition: none;
698
+ transition: none;
699
+ -webkit-box-shadow: none;
700
+ box-shadow: none;
701
+ margin: 0;
702
+ -webkit-appearance: textfield;
703
+ text-align: left;
704
  }
705
 
706
  [type="search"].dgwt-wcas-search-input::-ms-clear {
707
+ display: none;
708
  }
709
 
710
  [type="search"].dgwt-wcas-search-input::-webkit-search-decoration {
711
+ -webkit-appearance: none;
712
  }
713
 
714
  [type="search"].dgwt-wcas-search-input::-webkit-search-cancel-button {
715
+ display: none;
716
  }
717
 
718
  .dgwt-wcas-details-desc {
719
+ font-size: 13px;
720
+ line-height: 157%;
721
  }
722
 
723
  .dgwt-wcas-details-desc strong,
724
  .dgwt-wcas-details-desc b {
725
+ font-weight: normal;
726
+ color: #000;
727
+ margin: 0;
728
+ padding: 0;
729
  }
730
 
731
 
732
  .dgwt-wcas-pd-addtc-form {
733
+ margin: 10px 0;
734
+ display: flex;
735
+ align-items: center;
736
+ justify-content: flex-end;
737
  }
738
 
739
  .dgwt-wcas-pd-addtc-form > .quantity {
740
+ margin-right: 10px;
741
  }
742
 
743
  .dgwt-wcas-pd-addtc-form .quantity input.qty,
744
  .dgwt-wcas-pd-addtc-form .add_to_cart_inline {
745
+ margin-bottom: 0;
746
+ margin-top: 0;
747
  }
748
 
749
  .dgwt-wcas-stock {
750
+ display: block;
751
+ text-align: right;
752
+ font-size: 14px;
753
+ line-height: 14px;
754
+ margin-bottom: 14px;
755
 
756
  }
757
+
758
  .dgwt-wcas-stock.in-stock {
759
+ color: #0f834d;
760
  }
761
 
762
  .dgwt-wcas-stock.out-of-stock {
763
+ color: #e2401c;
764
  }
765
 
766
  .dgwt-wcas-pd-addtc .add_to_cart_inline,
767
  .dgwt-wcas-pd-addtc .add_to_cart_button {
768
+ margin: 0;
769
  }
770
+
771
  .dgwt-wcas-pd-addtc .add_to_cart_button.added {
772
+ display: none;
773
  }
774
 
775
  input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
776
+ position: relative;
777
  }
778
 
779
  .dgwt-wcas-ico-magnifier {
780
+ bottom: 0;
781
+ left: 0;
782
+ margin: auto;
783
+ position: absolute;
784
+ right: 0;
785
+ top: 0;
786
+ height: 65%;
787
+ display: block;
788
  }
789
 
790
  .dgwt-wcas-preloader {
791
+ height: 100%;
792
+ position: absolute;
793
+ right: 0;
794
+ top: 0;
795
+ width: 40px;
796
+ z-index: -1;
797
+ background-repeat: no-repeat;
798
+ background-position: right 15px center;
799
+ background-size: auto 44%;
800
  }
801
 
802
  .rtl .dgwt-wcas-preloader {
803
+ right: auto;
804
+ left: 5px;
805
  }
806
 
807
  .dgwt-wcas-inner-preloader {
808
+ background-repeat: no-repeat;
809
+ background-position: right 8px center;
810
+ background-size: auto 22px;
811
  display: flex;
812
  align-items: center;
813
  justify-content: center;
814
+ z-index: 1;
815
  }
816
 
817
  @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
818
+ .dgwt-wcas-inner-preloader {
819
+ background-image: url('../img/preloader.gif');
820
+ }
821
  }
822
 
823
  .dgwt-wcas-loader-circular {
866
  }
867
 
868
  @-webkit-keyframes dash {
869
+ 0% {
870
+ stroke-dasharray: 1, 200;
871
+ stroke-dashoffset: 0;
872
+ }
873
+ 50% {
874
+ stroke-dasharray: 89, 200;
875
+ stroke-dashoffset: -35px;
876
+ }
877
+ 100% {
878
+ stroke-dasharray: 89, 200;
879
+ stroke-dashoffset: -124px;
880
+ }
881
  }
882
 
883
  @-moz-keyframes dash {
911
  }
912
 
913
  .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader) {
914
+ cursor: pointer;
915
  display: flex;
916
  align-items: center;
917
  justify-content: center;
918
+ -webkit-transition: all 160ms ease-in-out;
919
+ -moz-transition: all 160ms ease-in-out;
920
+ -ms-transition: all 160ms ease-in-out;
921
+ -o-transition: all 160ms ease-in-out;
922
+ transition: all 160ms ease-in-out;
923
+ z-index: 1;
924
+ }
925
+
926
+ /* There is no possible to use jQuery closest for SVG elements.
927
+ The solution cover this are by transparent overlay
928
+ https://stackoverflow.com/questions/33672395/use-within-svg-not-finding-closest-div-in-ie
929
+ */
930
+ .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader):before {
931
+ content: '';
932
+ display: block;
933
+ position: absolute;
934
+ background: transparent;
935
+ height: 100%;
936
+ width: 100%;
937
+ left: 0;
938
+ bottom: 0;
939
+ top: 0;
940
+ right: 0;
941
+ margin: auto;
942
  }
943
 
944
  .dgwt-wcas-close:hover {
945
+ opacity: 0.3;
946
  }
947
 
948
  @media screen and (max-width: 992px) {
949
+ .dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp {
950
+ max-width: none;
951
+ }
952
  }
953
 
954
  .dgwt-wcas-suggestion strong {
955
+ font-weight: bold;
956
  }
957
 
958
  .screen-reader-text {
959
+ clip: rect(1px, 1px, 1px, 1px);
960
+ height: 1px;
961
+ overflow: hidden;
962
+ position: absolute !important;
963
+ width: 1px;
964
  }
965
 
966
  .dgwt-wcas-sf-wrapp:before, .dgwt-wcas-sf-wrapp:after {
967
+ content: "";
968
+ display: table;
969
  }
970
 
971
  .dgwt-wcas-sf-wrapp:after {
972
+ clear: both;
973
  }
974
 
975
  .dgwt-wcas-sf-wrapp {
976
+ zoom: 1;
977
+ width: 100%;
978
  max-width: 100vw;
979
+ margin: 0;
980
+ position: relative;
981
+ background: none;
982
  }
983
 
984
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
985
+ width: 100%;
986
+ height: 40px;
987
+ font-size: 14px;
988
+ line-height: 100%;
989
+ padding: 10px 15px;
990
+ margin: 0;
991
+ background: #fff;
992
+ border: 1px solid #ddd;
993
+ border-radius: 3px;
994
+ -webkit-border-radius: 3px;
995
+ -webkit-appearance: none;
996
+ box-sizing: border-box;
997
  }
998
 
999
  .dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
1000
+ border-radius: 3px 3px 0 0;
1001
  }
1002
 
1003
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
1004
+ display: none !important;
1005
  }
1006
 
1007
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-suggestions-wrapp {
1008
+ min-height: 0 !important;
1009
+ border-radius: 0 0 5px 5px;
1010
+ border-right-color: #ddd;
1011
  }
1012
 
1013
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp,
1014
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
1015
+ min-height: 41px !important;
1016
  }
1017
 
1018
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.rtl):not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp {
1019
+ border-right-color: transparent;
1020
  }
1021
 
1022
  .dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-details-wrapp .dgwt-wcas-preloader-wrapp {
1023
+ display: none !important;
1024
  }
1025
+
1026
  .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-is-details:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestion-nores {
1027
+ margin-top: 5px;
1028
  }
1029
 
1030
  .rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp {
1031
+ border-left-color: transparent;
1032
  }
1033
 
1034
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
1035
+ outline: 0;
1036
+ background: #fff;
1037
+ box-shadow: 0 0 9px 1px rgba(0, 0, 0, 0.06);
1038
  -webkit-transition: all 150ms ease-in;
1039
  -moz-transition: all 150ms ease-in;
1040
  -ms-transition: all 150ms ease-in;
1043
  }
1044
 
1045
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
1046
+ color: #999;
1047
+ font-weight: normal;
1048
+ font-style: italic;
1049
+ line-height: normal;
1050
  }
1051
 
1052
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-webkit-input-placeholder {
1053
+ color: #999;
1054
+ font-weight: normal;
1055
+ font-style: italic;
1056
+ line-height: normal;
1057
  }
1058
 
1059
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:-moz-placeholder {
1060
+ color: #999;
1061
+ font-weight: normal;
1062
+ font-style: italic;
1063
+ line-height: normal;
1064
  }
1065
 
1066
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-moz-placeholder {
1067
+ color: #999;
1068
+ font-weight: normal;
1069
+ font-style: italic;
1070
+ line-height: normal;
1071
  }
1072
 
1073
  .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:-ms-input-placeholder {
1074
+ color: #999;
1075
+ font-weight: normal;
1076
+ font-style: italic;
1077
+ line-height: normal;
1078
  }
1079
 
1080
  /* Form submit button */
1081
  .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
1082
+ overflow: visible;
1083
+ position: absolute;
1084
+ border: 0;
1085
+ padding: 0;
1086
+ margin: 0;
1087
+ cursor: pointer;
1088
+ height: 40px;
1089
+ min-width: 50px;
1090
  width: auto;
1091
  line-height: 100%;
1092
  min-height: 100%;
1093
+ right: 0;
1094
+ left: auto;
1095
+ top: 0;
1096
+ bottom: auto;
1097
+ padding: 0 15px;
1098
+ color: #fff;
1099
+ -webkit-transition: all 250ms ease-in-out;
1100
+ -moz-transition: all 250ms ease-in-out;
1101
+ -ms-transition: all 250ms ease-in-out;
1102
+ -o-transition: all 250ms ease-in-out;
1103
+ transition: all 250ms ease-in-out;
1104
+ text-transform: uppercase;
1105
+ background-color: #333;
1106
+ border-radius: 0 2px 2px 0;
1107
+ -webkit-border-radius: 0 2px 2px 0;
1108
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
1109
+ -webkit-box-shadow: none;
1110
+ box-shadow: none;
1111
+ -webkit-appearance: none;
1112
  }
1113
 
1114
  .rtl .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
1115
+ left: 0;
1116
+ right: auto;
1117
  }
1118
 
1119
  .dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit {
1120
+ border-radius: 0 2px 0 0;
1121
  }
1122
 
1123
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover {
1124
+ opacity: 0.7;
1125
  }
1126
 
1127
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,
1128
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus {
1129
+ opacity: 0.7;
1130
+ outline: 0;
1131
  }
1132
 
1133
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before {
1134
+ content: '';
1135
+ position: absolute;
1136
+ border-width: 8px 8px 8px 0;
1137
+ border-style: solid solid solid none;
1138
+ border-color: transparent #333 transparent;
1139
+ top: 12px;
1140
+ left: -6px;
1141
+ -webkit-transition: all 250ms ease-in-out;
1142
+ -moz-transition: all 250ms ease-in-out;
1143
+ -ms-transition: all 250ms ease-in-out;
1144
+ -o-transition: all 250ms ease-in-out;
1145
+ transition: all 250ms ease-in-out;
1146
  }
1147
 
1148
  .rtl .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before {
1149
+ left: auto;
1150
+ right: -6px;
1151
+ border-width: 8px 0 8px 8px;
1152
+ border-style: solid none solid solid;
1153
  }
1154
 
1155
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover:before {
1156
+ border-right-color: #333;
1157
  }
1158
 
1159
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus:before,
1160
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active:before {
1161
+ border-right-color: #333;
1162
  }
1163
 
1164
  .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::-moz-focus-inner { /* remove extra button spacing for Mozilla Firefox */
1165
+ border: 0;
1166
+ padding: 0;
1167
  }
1168
 
1169
  .dgwt-wcas-details-wrapp .added_to_cart {
1170
+ display: block;
1171
  }
1172
 
1173
  /*------------------------------------------------------
1175
  ---------------------------------------------------------*/
1176
  .dgwt-wcas-has-img .dgwt-wcas-sp > *,
1177
  .dgwt-wcas-has-desc .dgwt-wcas-sp > * {
1178
+ display: block;
1179
  }
1180
 
1181
  /*------------------------------------------------------
1183
  ---------------------------------------------------------*/
1184
 
1185
  .dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
1186
+ min-height: 340px;
1187
  }
1188
 
1189
  body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child {
1190
+ border-bottom: none;
1191
  }
1192
 
1193
  .dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
1194
+ min-height: 40px;
1195
  }
1196
 
1197
  .dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
1198
+ overflow: visible;
1199
  }
1200
 
1201
  .dgwt-wcas-is-details .dgwt-wcas-si {
1202
+ width: 30px;
1203
+ max-width: 100%;
1204
+ box-sizing: border-box;
1205
  }
1206
 
1207
  .dgwt-wcas-is-details .dgwt-wcas-sp {
1208
+ display: flex;
1209
+ top: 0;
1210
+ flex-direction: column;
1211
+ height: 100%;
1212
+ justify-content: center;
1213
+ resize: vertical;
1214
  }
1215
 
1216
  .dgwt-wcas-is-details .dgwt-wcas-sd {
1217
+ font-size: 11px;
1218
+ line-height: 100%;
1219
  }
1220
 
1221
  .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_cat'],
1222
  .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_tag'] {
1223
+ padding-left: 15px;
1224
+ min-height: 0;
1225
  }
1226
 
1227
  .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_cat'] .dgwt-wcas-st,
1228
  .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_tag'] .dgwt-wcas-st {
1229
+ padding-left: 0;
1230
  }
1231
 
1232
  .dgwt-wcas-ico-magnifier,
1235
  }
1236
 
1237
  .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier {
1238
+ height: 50%;
1239
  margin: auto;
1240
+ max-height: 20px;
1241
+ width: 100%;
1242
+ max-width: 20px;
1243
+ left: 12px;
1244
+ right: auto;
1245
+ opacity: 0.5;
1246
+ fill: #000;
1247
  }
1248
 
1249
  .rtl .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier {
1250
+ left: auto;
1251
+ right: 12px;
1252
  }
1253
 
1254
  .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
1255
+ padding: 10px 15px 10px 40px;
1256
  }
1257
+
1258
  .rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
1259
+ padding: 10px 40px 10px 15px;
1260
  }
1261
 
1262
  .dgwt-wcas-overlay-mobile-on,
1263
  .dgwt-wcas-overlay-mobile-on body {
1264
+ overflow: hidden;
1265
  min-width: 100vw;
1266
  min-height: 100vh;
1267
  }
1271
  }
1272
 
1273
  .dgwt-wcas-om-bar {
1274
+ display: flex;
1275
+ height: 45px;
1276
+ width: 100%;
1277
  }
1278
 
1279
  .dgwt-wcas-om-bar button.dgwt-wcas-om-return,
1296
  }
1297
 
1298
  .dgwt-wcas-om-bar .dgwt-wcas-om-return svg {
1299
+ width: 23px;
1300
+ height: 23px;
1301
+ position: absolute;
1302
+ left: 12px;
1303
+ top: 12px;
1304
  }
1305
 
1306
  .rtl .dgwt-wcas-om-bar .dgwt-wcas-om-return svg {
1307
+ left: 11px;
1308
+ top: 9px;
1309
+ -moz-transform: rotate(180deg);
1310
+ -webkit-transform: rotate(180deg);
1311
+ -o-transform: rotate(180deg);
1312
+ -ms-transform: rotate(180deg);
1313
+ transform: rotate(180deg);
1314
  }
1315
 
1316
  .dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path {
1318
  }
1319
 
1320
  .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader {
1321
+ right: 0 !important;
1322
  }
1323
 
1324
  .rtl .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader {
1325
+ left: 4px !important;
1326
+ right: auto !important;
1327
  }
1328
 
1329
 
1330
  @keyframes dgwt-wcas-preloader-price-anim {
1331
+ 0% {
1332
+ background: rgba(128, 128, 128, 0.03)
1333
+ }
1334
+ 50% {
1335
+ background: rgba(128, 128, 128, 0.1)
1336
+ }
1337
+ 100% {
1338
+ background: rgba(128, 128, 128, 0.03)
1339
+ }
1340
  }
1341
 
1342
  .dgwt-wcas-preloader-price-inner div:nth-child(1) {
1361
  overflow: hidden;
1362
  background: none;
1363
  }
1364
+
1365
  .dgwt-wcas-preloader-price-inner {
1366
  width: 100%;
1367
  height: 100%;
1370
  backface-visibility: hidden;
1371
  transform-origin: 0 0; /* see note above */
1372
  }
1373
+
1374
  .dgwt-wcas-preloader-price-inner div {
1375
  position: absolute;
1376
  width: 8px;
1385
  }
1386
 
1387
  .dgwt-wcas-om-bar .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
1388
+ display: none;
1389
  }
1390
 
1391
  .dgwt-wcas-om-bar .dgwt-wcas-search-wrapp-mobile {
1392
+ width: calc(100% - 45px);
1393
+ max-width: none;
1394
  margin: 0;
1395
  }
1396
+
1397
  .dgwt-wcas-overlay-mobile .dgwt-wcas-search-form {
1398
  width: 100%;
1399
  }
1400
 
1401
  .dgwt-wcas-overlay-mobile {
1402
+ position: absolute;
1403
+ left: 0;
1404
+ right: 0;
1405
+ top: 0;
1406
+ bottom: 0;
1407
+ width: 100%;
1408
+ background: #fff;
1409
  }
1410
 
1411
  .dgwt-wcas-overlay-mobile * {
1412
+ box-sizing: border-box;
1413
  }
1414
 
1415
  .dgwt-wcas-search-wrapp-mobile input[type="search"].dgwt-wcas-search-input {
1416
+ height: 45px !important;
1417
+ border-top: none;
1418
+ border-right: none;
1419
+ border-left: none;
1420
+ border-radius: 0;
1421
+ font-size: 16px !important;
1422
  }
1423
 
1424
  .dgwt-wcas-search-wrapp-mobile input[type="search"].dgwt-wcas-search-input:focus {
1425
+ font-size: 16px !important;
1426
  }
1427
 
1428
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
1429
+ left: 0 !important;
1430
+ top: 45px !important;
1431
+ width: 100% !important;
1432
+ height: calc(100% - 45px) !important;
1433
+ position: absolute;
1434
+ overflow-y: auto;
1435
+ border: none;
1436
  margin: 0;
1437
  display: block;
1438
  }
1442
  }
1443
 
1444
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-enable-mobile-form {
1445
+ display: none;
1446
  }
1447
 
1448
  .dgwt-wcas-enable-mobile-form {
1449
+ position: absolute;
1450
+ z-index: 100;
1451
+ left: 0;
1452
+ top: 0;
1453
+ width: 100%;
1454
+ height: 100%;
1455
+ cursor: pointer;
1456
  }
1457
 
1458
  html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-mobile .dgwt-wcas-search-form {
1459
+ display: none;
1460
+ position: relative;
1461
  }
1462
+
1463
  html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-icon-mobile {
1464
+ min-width: 0;
1465
+ display: inline-block;
1466
+ width: 28px;
1467
+ height: 28px;
1468
  }
1469
+
1470
  html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler {
1471
+ height: 100%;
1472
+ width: 100%;
1473
  }
1474
 
1475
+ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler .dgwt-wcas-ico-magnifier {
1476
+ opacity: 1;
1477
+ position: static;
1478
+ max-width: none;
1479
+ max-height: none;
1480
  }
1481
 
1482
  .dgwt-wcas-overlay-mobile-on .dgwt-wcas-icon-handler {
1483
+ display: none;
1484
  }
1485
 
1486
  .dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp {
1487
+ height: calc(100% - 45px) !important;
1488
  }
1489
 
1490
  .dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios {
1491
+ overflow: visible;
1492
  }
1493
 
1494
  .dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp {
1495
+ max-height: none !important;
1496
+ height: auto !important;
1497
  }
1498
 
1499
  .dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios body:not(.dgwt-wcas-theme-flatsome) > *:not(.dgwt-wcas-overlay-mobile) {
1500
+ display: none;
1501
  }
1502
 
1503
  /* compatibility with external plugins and themes */
1504
  body .dgwt-wcas-content-wrapp .zwave,
1505
  body .dgwt-wcas-content-wrapp .rood {
1506
+ display: none;
1507
  }
1508
 
1509
  /*------------------------------------------------------
1517
  .dgwt-wcas-layout-icon-flexible .dgwt-wcas-search-form {
1518
  opacity: 0;
1519
  }
1520
+
1521
  .dgwt-wcas-layout-icon-flexible-loaded .dgwt-wcas-search-form {
1522
  opacity: 1;
1523
  }
1524
+
1525
  .dgwt-wcas-search-icon-arrow {
1526
  display: none;
1527
  }
1546
  display: block;
1547
  opacity: 1;
1548
  }
1549
+
1550
  .dgwt-wcas-search-icon {
1551
  width: 20px;
1552
  height: auto;
1553
  cursor: pointer;
1554
  }
1555
+
1556
  .dgwt-wcas-ico-magnifier-handler {
1557
  margin-bottom: -0.2em;
1558
+ width: 100%;
1559
  }
1560
+
1561
  .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon {
1562
  opacity: 0.6;
1563
  }
1565
  .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 {
1566
  display: none;
1567
  }
1568
+
1569
  .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 {
1570
  padding-left: 15px;
1571
  }
1572
+
1573
  .dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow {
1574
  display: block;
1575
  position: absolute;
1592
  .dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow {
1593
  display: none;
1594
  }
1595
+
1596
  /*------------------------------------------------------
1597
  Style with headings
1598
  ---------------------------------------------------------*/
1599
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion {
1600
+ border-bottom: none;
1601
  }
1602
 
1603
  .dgwt-wcas-has-headings .dgwt-wcas-st > span.dgwt-wcas-st--direct-headline {
1604
+ display: none;
1605
  }
1606
 
1607
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline {
1608
+ pointer-events: none;
1609
+ display: block;
1610
+ font-weight: 500;
1611
+ white-space: nowrap;
1612
  }
1613
 
1614
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
1615
+ border-bottom: 1px solid #ddd;
1616
+ padding-bottom: 3px;
1617
+ text-transform: uppercase;
1618
+ margin-top: 16px;
1619
+ font-size: 12px;
1620
  }
1621
 
1622
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,
1623
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
1624
+ border-bottom: none;
1625
  }
1626
 
1627
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st {
1628
+ padding: 0;
1629
  }
1630
 
1631
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover,
1632
  .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected {
1633
+ background: transparent;
1634
+ text-decoration: underline;
1635
  }
1636
 
1637
  .dgwt-wcas-is-details .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
1638
+ min-height: 30px;
1639
+ }
1640
+
1641
+ .dgwt-wcas-darkened-overlay {
1642
+ display: block;
1643
+ position: absolute;
1644
+ opacity: .15;
1645
+ z-index: 100000;
1646
+ left: 0;
1647
+ top: 0;
1648
+ }
1649
+
1650
+ .dgwt-wcas-darkened-overlay > div {
1651
+ background: #111;
1652
+ position: absolute;
1653
+ }
1654
+
1655
+ .dgwt-wcas-search-wrapp.dgwt-wcas-search-darkoverl-on .dgwt-wcas-search-form {
1656
+ background-color: rgba(17, 17, 17, .15);
1657
+ border: none;
1658
+ border-radius: 0;
1659
  }
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{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}html.dgwt-wcas-overlay-mobile-on{scroll-behavior:unset}.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)}.rtl .dgwt-wcas-tax-product-details{justify-content:right}.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;z-index:1}@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;z-index:1}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader):before{content:'';display:block;position:absolute;background:0 0;height:100%;width:100%;left:0;bottom:0;top:0;right:0;margin:auto}.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}html.dgwt-wcas-overlay-mobile-on{scroll-behavior:unset}.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}.dgwt-wcas-darkened-overlay{display:block;position:absolute;opacity:.15;z-index:100000;left:0;top:0}.dgwt-wcas-darkened-overlay>div{background:#111;position:absolute}.dgwt-wcas-search-wrapp.dgwt-wcas-search-darkoverl-on .dgwt-wcas-search-form{background-color:rgba(17,17,17,.15);border:none;border-radius:0}
assets/js/admin.js CHANGED
@@ -595,6 +595,7 @@
595
  $.ajax({
596
  url: ajaxurl,
597
  data: {
 
598
  action: 'dgwt_wcas_adv_settings',
599
  adv_settings_value: choice
600
  }
595
  $.ajax({
596
  url: ajaxurl,
597
  data: {
598
+ _wpnonce: dgwt_wcas.nonces.advanced_options_switch,
599
  action: 'dgwt_wcas_adv_settings',
600
  adv_settings_value: choice
601
  }
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var s={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=t('[name="'+s+'"]').closest("."+this.groupSel),a=t('[name="'+s+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),t("."+i).length>0&&t("."+i).fadeIn()},hideAll:function(t){t.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var s=this;t("."+s.inputSel).on("change",function(){s.reloadChoices(t(this).attr("name"))})},init:function(){var s=this,e=t("."+s.inputSel+":checked");e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=s.is(":checked"),a=this.getGroupSelector(s);t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&t("."+a).each(function(){t(this).hasClass("js-dgwt-wcas-adv-settings")&&t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||t(this).fadeIn()})},getGroupSelector(s){var e=s.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return t.each(i,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=s)}),a},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.reloadChoices(t(this))})},refresh:function(){var s=this,e=t("."+s.inputSel);e.length>0&&e.each(function(){var e=t(this).is(":checked"),a=s.getGroupSelector(t(this));e?t("."+a).fadeIn():t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this))}))}},a={inputSel:"js-dgwt-wcas-options-toggle-sibling input[type=checkbox]",toogleSibling:function(t){t.is(":checked")?t.closest("label").next().fadeIn():t.closest("label").next().hide()},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.toogleSibling(t(this))})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.toogleSibling(t(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 s=this.$select.find("option:selected").val(),e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),t("input[id*='bg_search_icon_color']").closest("tr").show(),s){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),t("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(t){t.closest("tr").hide()},showOption:function(t){t.closest("tr").show()},registerListeners:function(){var t=this;t.$select.on("change",function(){t.setConditions()}),t.$overlayMobileEl.on("change",function(){t.setConditions()})},init:function(){var s=this,e=t(s.layoutSelect);e.length>0&&(s.$select=e,s.$overlayMobileEl=t(s.overlayMobile),s.$mobileBreakpointEl=t(s.mobileBreakpoint),s.$searchIconColorEl=t(s.searchIconColor),s.registerListeners(),setTimeout(function(){s.setConditions()},400))}},o={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",indexerTabProgressClass:"js-dgwt-wcas-indexer-tab-progress",indexerTabErrorClass:"js-dgwt-wcas-indexer-tab-error",getWrapper:function(){return t("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var s=this;t(document).on("click","."+s.actionTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait"),t("."+s.indexerTabErrorClass).removeClass("active"),t("."+s.indexerTabProgressClass).addClass("active");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(t(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),t(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i,_wpnonce:dgwt_wcas.nonces.build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled"),t(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),t(document).on("click","."+s.actionStopTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var s=this;setTimeout(function(){t.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&&(s.getWrapper().html(e.data.html),e.data.loop?s.heartbeat():(t("."+s.indexerTabProgressClass).removeClass("active"),"error"===e.data.status&&t("."+s.indexerTabErrorClass).addClass("active")),!e.data.loop&&e.data.refresh_once.length>0&&(document.cookie.split(";").some(function(t){return 0===t.trim().indexOf("dgwt_wcas_refresh_once="+e.data.refresh_once)})||"none"!==t("#dgwt_wcas_troubleshooting-tab").css("display")||(document.cookie="dgwt_wcas_refresh_once="+e.data.refresh_once,location.reload())))}})},1e3)},detailsToggle:function(){var s;t(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=t(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),t(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),s=!1):(a.addClass("show"),a.removeClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),t(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),s=!0),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:s}})})},init:function(){this.registerListeners(),t("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},n={init:function(){var s=this;t(".dgwt-wcas-selectize").length>0&&t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:t(".dgwt-wcas-selectize").data("security")},success:function(t){void 0!==t&&void 0!==t.data&&s.initSelectize(t.data)}})},initSelectize:function(s){var e=t(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=t(this),a=e.data("options"),i=s;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var o="";a.forEach(function(t,s){if((s+1)%2==0){var e={value:t,label:o};i.push(e),o=""}o=t})}t(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:i,create:function(t){return{value:t.key,label:t.label}},load:function(s,a){if(!s.length)return a();t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(t){a(t.data)}})}})})}},r={init:function(){var s=t(".js-dgwt-wcas-tooltip");s.length>0&&s.each(function(){var s=t(this)[0],e=t(this).data("tooltip-html-el"),a=t(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(s,{title:t("."+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 s=this;t(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",s.saveChoice(e)})},setStartingState:function(){var s=t("."+this.advClass);s.length>0&&(t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(s.show(),e.refresh()):s.hide())},saveChoice:function(s){t(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:s}}).done(function(s){t(".dgwt-wcas-adv-settings-saving").remove()});var e=t(".js-dgwt-wcas-adv-settings-toggle");"show"===s&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===s&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(s)},toggleAdvancedOpt:function(s){var a=this,o=t("."+a.advClass);o.length>0&&(o.addClass(a.highlightClass),o.addClass(a.transClass),"show"===s&&o.fadeIn(500,function(){setTimeout(function(){o.removeClass(a.highlightClass),setTimeout(function(){o.removeClass(a.transClass),e.refresh(),i.setConditions()},500)},500)}),"hide"===s&&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=t(".js-dgwt-wcas-preview"),this.searchWrapp=t(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=t(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=t(".js-dgwt-wcas-details-wrapp"),this.searchInput=t(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(t){return!!(t.length>0&&t.is(":checked"))},isColor:function(t){return"string"==typeof t&&7===t.length&&"#"===t.charAt(0)},camelCase:function(t){for(var s=t.split("_"),e="",a=0;a<s.length;a++)e+=s[a].charAt(0).toUpperCase()+s[a].slice(1);return e},disableSubmit:function(){var s,e;t(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==s&&(clearTimeout(s),e&&e.remove()),t("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=t(".dgwt-wcas-click-alert")).css({left:i,top:o}),t(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),s=setTimeout(function(){e.fadeOut(500,function(){t(this).remove(),t(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var s=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";t(document).on("focus",a,function(){t(e).addClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),s.detailsWrapp.addClass("dgwt-wcas-hide"),s.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),t(document).on("blur",a,function(){t(e).removeClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),s.detailsWrapp.removeClass("dgwt-wcas-hide"),s.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var s=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="input[id^='dgwt_wcas_settings'][data-option-trigger='"+e[a]+"']",n=t(i),r=t(o);methodToCall="onChange"+s.camelCase(e[a]),"function"==typeof s[methodToCall]&&n.length>0?(s[methodToCall](n,n.val()),t(document).on("change",i,function(){methodToCall=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):"function"==typeof s[methodToCall]&&r.length>0?(s[methodToCall](r,r.val()),t(document).on("change",o,function(){methodToCall=t(this).data("option-trigger"),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):s[methodToCall]("","")}},onColorHandler:function(){for(var s=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=t(i),n="onColor"+s.camelCase(e[a]);s[n](o,o.val()),t(document).on("change",i,function(e){n=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+s.camelCase(n),s[n](t(this),this.value)})}},onColorChangeHandler:function(t,s){var e=t.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](t,s)},onTypeHandler:function(){for(var s=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=t(i),n="onType"+s.camelCase(e[a]);s[n](o,o.val()),t(document).on("input",i,function(e){n=t(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+s.camelCase(n),s[n](t(e.target),this.value)})}},onChangeMaxFormWidth:function(s,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(t("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(s,e){var a=t(".js-dgwt-wcas-search-submit");if(this.isChecked(s)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=t("input[id*='bg_submit_color']"),o=t("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(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(s,e){var a=t(".js-dgwt-wcas-si"),i=t(".js-dgwt-wcas-content-wrapp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){t(this).closest(".dgwt-wcas-suggestion-product").append(t(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(s,e){var a=t(".js-dgwt-wcas-sku");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(s,e){var a=t(".js-dgwt-wcas-sd");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(s,e){var a=t(".js-dgwt-wcas-sp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-cat"),i=t(".dgwt-wcas-suggestion-cat");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowCategoriesImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-cat");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingTags:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-tag"),i=t(".dgwt-wcas-suggestion-tag");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-brand"),i=t(".dgwt-wcas-suggestion-brand");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowBrandsImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-brand");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingPosts:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-post"),i=t(".dgwt-wcas-suggestion-post");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-page"),i=t(".dgwt-wcas-suggestion-page");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(s,e){var a=t(".dgwt-wcas-st--direct-headline"),i=t(".dgwt-wcas-suggestion-headline");this.isChecked(s)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),t(".dgwt-wcas-suggestion-headline").show(),this.isChecked(t("input[data-option-trigger='show_matching_categories']"))||t(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(t("input[data-option-trigger='show_matching_tags']"))||t(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(t("input[data-option-trigger='show_matching_brands']"))||t(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(t("input[id*='show_matching_posts']"))||t(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(t("input[id*='show_matching_pages']"))||t(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(s,e){setTimeout(function(){var a=0,i=7,o=t(".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 r=[];for(a=0;a<n.length;a++){var c=t(".dgwt-wcas-suggestion-"+n[a]+":not(.js-dgwt-wcas-suggestion-hidden)");c.length>0&&r.push(c)}var d=r.length;if(r.length>0)for(var l=i-r.length,g=r.length-1;l>0;){var h=r[g].clone();h.addClass("dgwt-wcas-suggestion-duplicated"),h.removeClass("dgwt-wcas-suggestion-selected"),r[g].after(h),d++,--g<0&&(g=r.length-1),l--}d>i&&s.val(d)},10)},onChangeShowDetailsBox:function(s,e){var a=this;a.isChecked(s)?(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(t(".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 s=getComputedStyle(a.searchWrapp[0]).width;(s=Math.round(parseFloat(s.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(s/2)),a.detailsWrapp.css("width",Math.round(s/2))):(a.suggestionWrapp.css("width",Math.floor(s/2)),a.detailsWrapp.css("width",Math.ceil(s/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"),t(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(t,s){},onColorBgInputColor:function(t,s){this.isColor(s)?this.searchInput.css("background-color",s):this.searchInput.css("background-color","")},onColorTextInputColor:function(s,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>",t("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=t("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(t,s){this.isColor(s)?this.searchInput.css("border-color",s):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(s,e){if(this.isChecked(t("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>",t("head").append(a)}else{var i=t(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(s,e){this.isChecked(t("input[id*='show_submit_button']"))&&this.isColor(e)?(t(".js-dgwt-wcas-search-submit").css("color",e),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),t(".js-dgwt-wcas-search-submit").css("color",""),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(s,e){this.isColor(e)?setTimeout(function(){t(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):t(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(s,e){var a=t(".js-dgwt-wcas-search-submit-l"),i=t(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(t,s){0==s.length&&(s=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",s)},onTypeSearchNoResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.no_results),t(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.show_more),t(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var s=this;t(document).on("click","#dgwt_wcas_autocomplete-tab",function(){s.onChangeShowDetailsBox(t("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",fixOutofstockButtonName:"dgwt-wcas-fix-out-of-stock-relationships",switchAlternativeEndpoint:"dgwt-wcas-switch-alternative-endpoint",dismissElementorTemplateButtonName:"dgwt-wcas-dismiss-elementor-template",init:function(){var s=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(t(s.counterClass).text(e).addClass("active"),t(s.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&t.each(dgwt_wcas.troubleshooting.tests.results_async,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&t.each(dgwt_wcas.troubleshooting.tests.direct,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&s.maybeRunNextAsyncTest(),t(document).on("click",'input[name="'+s.resetButtonName+'"]',function(e){t('input[name="'+s.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.fixOutofstockButtonName+'"]',function(e){t('input[name="'+s.fixOutofstockButtonName+'"]').attr("disabled","disabled").next().addClass("loading");var a={action:"dgwt_wcas_troubleshooting_fix_outofstock",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_fix_outofstock};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.switchAlternativeEndpoint+'"]',function(e){var a=1===parseInt(t(this).data("switch"))?"enable":"disable";t('input[name="'+s.switchAlternativeEndpoint+'"]').attr("disabled","disabled").next().addClass("loading");var i={action:"dgwt_wcas_troubleshooting_switch_alternative_endpoint",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_switch_alternative_endpoint,switch:a};return t.post(ajaxurl,i,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.dismissElementorTemplateButtonName+'"]',function(e){t('input[name="'+s.dismissElementorTemplateButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_dismiss_elementor_template",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_dismiss_elementor_template};return t.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(s,e){var a,i=wp.template("dgwt-wcas-troubleshooting-issue"),o=t(this.issuesListClass+"-"+s.status);"good"!==s.status&&(t(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[s.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(t(this.counterClass).text(a).addClass("active"),t(this.settingsTab).addClass("enabled")),t(o).append(i(s)))},maybeRunNextAsyncTest:function(){var s=this;dgwt_wcas.troubleshooting.tests.async.length>0&&t.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,t(s.progressBar).show(),t.post(ajaxurl,e,function(t){t.success&&s.appendIssue(t.data,!0),s.maybeRunNextAsyncTest()}),!1)}),s.recalculateProgression()},recalculateProgression:function(){var s=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;t.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var i=Math.ceil(a/e*100);t(s.progressBarInner).css("width",i+"%"),100===i&&setTimeout(function(){t(s.progressBar).slideUp()},2e3)}},l={moveOptionClass:".js-dgwt-wcas-move-option",init:function(){var s=t(this.moveOptionClass);s.length>0&&t.each(s,function(s,e){var a=t("#"+t(e).data("move-dest").replace(/(:|\.|\[|\])/g,"\\$1"));a.length>0&&(t(e).closest("tr").hasClass("dgwt-wcas-premium-only")&&t(e).addClass("dgwt-wcas-premium-only"),t(e).clone().appendTo(a.closest("td fieldset"))),t(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(t){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var t=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){t.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(s){var e=void 0===dgwt_wcas_filters_rules_selected_options[s]?[]:dgwt_wcas_filters_rules_selected_options[s];return function({nonce:s,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(t){return{value:t.key,label:t.label}},load:function(e,i){t.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:s},error:function(){i()},success:function(t){i(t.data)}})}}}({nonce:this.nonce,type:s,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const s=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);t.each(s,function(t,e){s[t].key=Math.random()}),this.rules=s}catch(t){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(t){this.rules[t].values=[],this.updateInput()},deleteRule(t){this.rules=this.rules.filter(function(s,e){return e!==t}),this.updateInput()},updateInput(){const t=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(t.map(function(t){return t.key,delete t.key,t}))}}})}};t(document).ready(function(){var h,u;(h=t(".js-dgwt-wcas-settings-margin-nob")).length>0&&h.each(function(){var s=t(this).find("td .dgwt-wcas-fieldset");if(s.length>0){var e=t(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=t(this).attr("class").split(/\s+/),i="";t.each(a,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=s)});var o=s.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),t(this).remove()}}}),s.init(),e.init(),i.init(),(u=t(".js-dgwt-wcas-sgs-autocolspan")).length>0&&u.find("td").attr("colspan",2),o.init(),n.init(),r.init(),c.init(),d.init(),l.init(),a.init(),g(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
1
+ !function(t){var s={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=t('[name="'+s+'"]').closest("."+this.groupSel),a=t('[name="'+s+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),t("."+i).length>0&&t("."+i).fadeIn()},hideAll:function(t){t.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var s=this;t("."+s.inputSel).on("change",function(){s.reloadChoices(t(this).attr("name"))})},init:function(){var s=this,e=t("."+s.inputSel+":checked");e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=s.is(":checked"),a=this.getGroupSelector(s);t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&t("."+a).each(function(){t(this).hasClass("js-dgwt-wcas-adv-settings")&&t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||t(this).fadeIn()})},getGroupSelector(s){var e=s.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return t.each(i,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=s)}),a},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.reloadChoices(t(this))})},refresh:function(){var s=this,e=t("."+s.inputSel);e.length>0&&e.each(function(){var e=t(this).is(":checked"),a=s.getGroupSelector(t(this));e?t("."+a).fadeIn():t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this))}))}},a={inputSel:"js-dgwt-wcas-options-toggle-sibling input[type=checkbox]",toogleSibling:function(t){t.is(":checked")?t.closest("label").next().fadeIn():t.closest("label").next().hide()},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.toogleSibling(t(this))})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.toogleSibling(t(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 s=this.$select.find("option:selected").val(),e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),t("input[id*='bg_search_icon_color']").closest("tr").show(),s){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),t("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(t){t.closest("tr").hide()},showOption:function(t){t.closest("tr").show()},registerListeners:function(){var t=this;t.$select.on("change",function(){t.setConditions()}),t.$overlayMobileEl.on("change",function(){t.setConditions()})},init:function(){var s=this,e=t(s.layoutSelect);e.length>0&&(s.$select=e,s.$overlayMobileEl=t(s.overlayMobile),s.$mobileBreakpointEl=t(s.mobileBreakpoint),s.$searchIconColorEl=t(s.searchIconColor),s.registerListeners(),setTimeout(function(){s.setConditions()},400))}},o={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",indexerTabProgressClass:"js-dgwt-wcas-indexer-tab-progress",indexerTabErrorClass:"js-dgwt-wcas-indexer-tab-error",getWrapper:function(){return t("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var s=this;t(document).on("click","."+s.actionTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait"),t("."+s.indexerTabErrorClass).removeClass("active"),t("."+s.indexerTabProgressClass).addClass("active");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(t(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),t(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i,_wpnonce:dgwt_wcas.nonces.build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled"),t(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),t(document).on("click","."+s.actionStopTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var s=this;setTimeout(function(){t.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&&(s.getWrapper().html(e.data.html),e.data.loop?s.heartbeat():(t("."+s.indexerTabProgressClass).removeClass("active"),"error"===e.data.status&&t("."+s.indexerTabErrorClass).addClass("active")),!e.data.loop&&e.data.refresh_once.length>0&&(document.cookie.split(";").some(function(t){return 0===t.trim().indexOf("dgwt_wcas_refresh_once="+e.data.refresh_once)})||"none"!==t("#dgwt_wcas_troubleshooting-tab").css("display")||(document.cookie="dgwt_wcas_refresh_once="+e.data.refresh_once,location.reload())))}})},1e3)},detailsToggle:function(){var s;t(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=t(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),t(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),s=!1):(a.addClass("show"),a.removeClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),t(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),s=!0),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:s}})})},init:function(){this.registerListeners(),t("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},n={init:function(){var s=this;t(".dgwt-wcas-selectize").length>0&&t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:t(".dgwt-wcas-selectize").data("security")},success:function(t){void 0!==t&&void 0!==t.data&&s.initSelectize(t.data)}})},initSelectize:function(s){var e=t(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=t(this),a=e.data("options"),i=s;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var o="";a.forEach(function(t,s){if((s+1)%2==0){var e={value:t,label:o};i.push(e),o=""}o=t})}t(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:i,create:function(t){return{value:t.key,label:t.label}},load:function(s,a){if(!s.length)return a();t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(t){a(t.data)}})}})})}},c={init:function(){var s=t(".js-dgwt-wcas-tooltip");s.length>0&&s.each(function(){var s=t(this)[0],e=t(this).data("tooltip-html-el"),a=t(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(s,{title:t("."+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 s=this;t(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",s.saveChoice(e)})},setStartingState:function(){var s=t("."+this.advClass);s.length>0&&(t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(s.show(),e.refresh()):s.hide())},saveChoice:function(s){t(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),t.ajax({url:ajaxurl,data:{_wpnonce:dgwt_wcas.nonces.advanced_options_switch,action:"dgwt_wcas_adv_settings",adv_settings_value:s}}).done(function(s){t(".dgwt-wcas-adv-settings-saving").remove()});var e=t(".js-dgwt-wcas-adv-settings-toggle");"show"===s&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===s&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(s)},toggleAdvancedOpt:function(s){var a=this,o=t("."+a.advClass);o.length>0&&(o.addClass(a.highlightClass),o.addClass(a.transClass),"show"===s&&o.fadeIn(500,function(){setTimeout(function(){o.removeClass(a.highlightClass),setTimeout(function(){o.removeClass(a.transClass),e.refresh(),i.setConditions()},500)},500)}),"hide"===s&&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=t(".js-dgwt-wcas-preview"),this.searchWrapp=t(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=t(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=t(".js-dgwt-wcas-details-wrapp"),this.searchInput=t(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(t){return!!(t.length>0&&t.is(":checked"))},isColor:function(t){return"string"==typeof t&&7===t.length&&"#"===t.charAt(0)},camelCase:function(t){for(var s=t.split("_"),e="",a=0;a<s.length;a++)e+=s[a].charAt(0).toUpperCase()+s[a].slice(1);return e},disableSubmit:function(){var s,e;t(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==s&&(clearTimeout(s),e&&e.remove()),t("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=t(".dgwt-wcas-click-alert")).css({left:i,top:o}),t(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),s=setTimeout(function(){e.fadeOut(500,function(){t(this).remove(),t(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var s=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";t(document).on("focus",a,function(){t(e).addClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),s.detailsWrapp.addClass("dgwt-wcas-hide"),s.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),t(document).on("blur",a,function(){t(e).removeClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),s.detailsWrapp.removeClass("dgwt-wcas-hide"),s.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var s=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="input[id^='dgwt_wcas_settings'][data-option-trigger='"+e[a]+"']",n=t(i),c=t(o);methodToCall="onChange"+s.camelCase(e[a]),"function"==typeof s[methodToCall]&&n.length>0?(s[methodToCall](n,n.val()),t(document).on("change",i,function(){methodToCall=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):"function"==typeof s[methodToCall]&&c.length>0?(s[methodToCall](c,c.val()),t(document).on("change",o,function(){methodToCall=t(this).data("option-trigger"),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):s[methodToCall]("","")}},onColorHandler:function(){for(var s=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=t(i),n="onColor"+s.camelCase(e[a]);s[n](o,o.val()),t(document).on("change",i,function(e){n=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+s.camelCase(n),s[n](t(this),this.value)})}},onColorChangeHandler:function(t,s){var e=t.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](t,s)},onTypeHandler:function(){for(var s=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=t(i),n="onType"+s.camelCase(e[a]);s[n](o,o.val()),t(document).on("input",i,function(e){n=t(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+s.camelCase(n),s[n](t(e.target),this.value)})}},onChangeMaxFormWidth:function(s,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(t("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(s,e){var a=t(".js-dgwt-wcas-search-submit");if(this.isChecked(s)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=t("input[id*='bg_submit_color']"),o=t("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(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(s,e){var a=t(".js-dgwt-wcas-si"),i=t(".js-dgwt-wcas-content-wrapp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){t(this).closest(".dgwt-wcas-suggestion-product").append(t(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(s,e){var a=t(".js-dgwt-wcas-sku");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(s,e){var a=t(".js-dgwt-wcas-sd");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(s,e){var a=t(".js-dgwt-wcas-sp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-cat"),i=t(".dgwt-wcas-suggestion-cat");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowCategoriesImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-cat");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingTags:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-tag"),i=t(".dgwt-wcas-suggestion-tag");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-brand"),i=t(".dgwt-wcas-suggestion-brand");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowBrandsImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-brand");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingPosts:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-post"),i=t(".dgwt-wcas-suggestion-post");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-page"),i=t(".dgwt-wcas-suggestion-page");this.isChecked(s)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(s,e){var a=t(".dgwt-wcas-st--direct-headline"),i=t(".dgwt-wcas-suggestion-headline");this.isChecked(s)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),t(".dgwt-wcas-suggestion-headline").show(),this.isChecked(t("input[data-option-trigger='show_matching_categories']"))||t(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(t("input[data-option-trigger='show_matching_tags']"))||t(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(t("input[data-option-trigger='show_matching_brands']"))||t(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(t("input[id*='show_matching_posts']"))||t(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(t("input[id*='show_matching_pages']"))||t(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(s,e){setTimeout(function(){var a=0,i=7,o=t(".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=t(".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&&s.val(d)},10)},onChangeShowDetailsBox:function(s,e){var a=this;a.isChecked(s)?(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(t(".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 s=getComputedStyle(a.searchWrapp[0]).width;(s=Math.round(parseFloat(s.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(s/2)),a.detailsWrapp.css("width",Math.round(s/2))):(a.suggestionWrapp.css("width",Math.floor(s/2)),a.detailsWrapp.css("width",Math.ceil(s/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"),t(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(t,s){},onColorBgInputColor:function(t,s){this.isColor(s)?this.searchInput.css("background-color",s):this.searchInput.css("background-color","")},onColorTextInputColor:function(s,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>",t("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=t("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(t,s){this.isColor(s)?this.searchInput.css("border-color",s):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(s,e){if(this.isChecked(t("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>",t("head").append(a)}else{var i=t(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(s,e){this.isChecked(t("input[id*='show_submit_button']"))&&this.isColor(e)?(t(".js-dgwt-wcas-search-submit").css("color",e),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),t(".js-dgwt-wcas-search-submit").css("color",""),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(s,e){this.isColor(e)?setTimeout(function(){t(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):t(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(s,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>",t("head").append(i)}else{var o=t("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(s,e){var a=t(".js-dgwt-wcas-search-submit-l"),i=t(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(t,s){0==s.length&&(s=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",s)},onTypeSearchNoResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.no_results),t(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.show_more),t(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var s=this;t(document).on("click","#dgwt_wcas_autocomplete-tab",function(){s.onChangeShowDetailsBox(t("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",fixOutofstockButtonName:"dgwt-wcas-fix-out-of-stock-relationships",switchAlternativeEndpoint:"dgwt-wcas-switch-alternative-endpoint",dismissElementorTemplateButtonName:"dgwt-wcas-dismiss-elementor-template",init:function(){var s=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(t(s.counterClass).text(e).addClass("active"),t(s.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&t.each(dgwt_wcas.troubleshooting.tests.results_async,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&t.each(dgwt_wcas.troubleshooting.tests.direct,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&s.maybeRunNextAsyncTest(),t(document).on("click",'input[name="'+s.resetButtonName+'"]',function(e){t('input[name="'+s.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.fixOutofstockButtonName+'"]',function(e){t('input[name="'+s.fixOutofstockButtonName+'"]').attr("disabled","disabled").next().addClass("loading");var a={action:"dgwt_wcas_troubleshooting_fix_outofstock",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_fix_outofstock};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.switchAlternativeEndpoint+'"]',function(e){var a=1===parseInt(t(this).data("switch"))?"enable":"disable";t('input[name="'+s.switchAlternativeEndpoint+'"]').attr("disabled","disabled").next().addClass("loading");var i={action:"dgwt_wcas_troubleshooting_switch_alternative_endpoint",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_switch_alternative_endpoint,switch:a};return t.post(ajaxurl,i,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.dismissElementorTemplateButtonName+'"]',function(e){t('input[name="'+s.dismissElementorTemplateButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_dismiss_elementor_template",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_dismiss_elementor_template};return t.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(s,e){var a,i=wp.template("dgwt-wcas-troubleshooting-issue"),o=t(this.issuesListClass+"-"+s.status);"good"!==s.status&&(t(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[s.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(t(this.counterClass).text(a).addClass("active"),t(this.settingsTab).addClass("enabled")),t(o).append(i(s)))},maybeRunNextAsyncTest:function(){var s=this;dgwt_wcas.troubleshooting.tests.async.length>0&&t.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,t(s.progressBar).show(),t.post(ajaxurl,e,function(t){t.success&&s.appendIssue(t.data,!0),s.maybeRunNextAsyncTest()}),!1)}),s.recalculateProgression()},recalculateProgression:function(){var s=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;t.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var i=Math.ceil(a/e*100);t(s.progressBarInner).css("width",i+"%"),100===i&&setTimeout(function(){t(s.progressBar).slideUp()},2e3)}},l={moveOptionClass:".js-dgwt-wcas-move-option",init:function(){var s=t(this.moveOptionClass);s.length>0&&t.each(s,function(s,e){var a=t("#"+t(e).data("move-dest").replace(/(:|\.|\[|\])/g,"\\$1"));a.length>0&&(t(e).closest("tr").hasClass("dgwt-wcas-premium-only")&&t(e).addClass("dgwt-wcas-premium-only"),t(e).clone().appendTo(a.closest("td fieldset"))),t(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(t){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var t=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){t.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(s){var e=void 0===dgwt_wcas_filters_rules_selected_options[s]?[]:dgwt_wcas_filters_rules_selected_options[s];return function({nonce:s,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(t){return{value:t.key,label:t.label}},load:function(e,i){t.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:s},error:function(){i()},success:function(t){i(t.data)}})}}}({nonce:this.nonce,type:s,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const s=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);t.each(s,function(t,e){s[t].key=Math.random()}),this.rules=s}catch(t){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(t){this.rules[t].values=[],this.updateInput()},deleteRule(t){this.rules=this.rules.filter(function(s,e){return e!==t}),this.updateInput()},updateInput(){const t=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(t.map(function(t){return t.key,delete t.key,t}))}}})}};t(document).ready(function(){var h,u;(h=t(".js-dgwt-wcas-settings-margin-nob")).length>0&&h.each(function(){var s=t(this).find("td .dgwt-wcas-fieldset");if(s.length>0){var e=t(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=t(this).attr("class").split(/\s+/),i="";t.each(a,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=s)});var o=s.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),t(this).remove()}}}),s.init(),e.init(),i.init(),(u=t(".js-dgwt-wcas-sgs-autocolspan")).length>0&&u.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
@@ -41,54 +41,54 @@
41
  div.setAttribute('unselectable', 'on');
42
  return div;
43
  },
44
- highlight: function (suggestionValue, phrase) {
45
-
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;
74
- }
75
- }
76
- }
77
- }
78
-
79
- if (highlighted) {
80
- suggestionValue = suggestionValue.replace(/\^\^/g, '<strong>');
81
- suggestionValue = suggestionValue.replace(/@@/g, '<\/strong>');
82
- }
83
-
84
-
85
- } else {
86
- var pattern = '(' + utils.escapeRegExChars(phrase) + ')';
87
- suggestionValue = suggestionValue.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
88
- }
89
-
90
- return suggestionValue;
91
- },
92
  debounce: function (func, wait) {
93
  var timeout,
94
  debounceID = new Date().getUTCMilliseconds();
@@ -145,13 +145,13 @@
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 = {
@@ -199,13 +199,16 @@
199
  that.classes = {
200
  selected: 'dgwt-wcas-suggestion-selected',
201
  suggestion: 'dgwt-wcas-suggestion',
202
- suggestionsContainerOrientTop: 'dgwt-wcas-suggestions-wrapp--top'
 
 
203
  };
204
  that.hint = null;
205
  that.hintValue = '';
206
  that.selection = null;
207
  that.overlayMobileState = 'off';
208
- that.isMouseDownOnSearchElements = false;
 
209
 
210
  // Initialize and set options:
211
  that.initialize();
@@ -224,7 +227,6 @@
224
  serviceUrl: null,
225
  lookup: null,
226
  onSelect: null,
227
- width: 'auto',
228
  containerDetailsWidth: 'auto',
229
  showDetailsPanel: false,
230
  showImage: false,
@@ -238,6 +240,7 @@
238
  featuredBadgeText: 'featured',
239
  minChars: 3,
240
  maxHeight: 600,
 
241
  deferRequestBy: 0,
242
  params: {},
243
  formatResult: _formatResult,
@@ -253,6 +256,7 @@
253
  searchFormClass: 'dgwt-wcas-search-wrapp',
254
  containerClass: 'dgwt-wcas-suggestions-wrapp',
255
  containerDetailsClass: 'dgwt-wcas-details-wrapp',
 
256
  searchInputClass: 'dgwt-wcas-search-input',
257
  preloaderClass: 'dgwt-wcas-preloader',
258
  closeTrigger: 'dgwt-wcas-close',
@@ -273,10 +277,10 @@
273
  positionFixed: false,
274
  debounceWaitMs: 400,
275
  sendGAEvents: true,
276
- enableGASiteSearchModule: false,
277
- showProductVendor: false,
278
- disableHits: false,
279
- disableSubmit: false,
280
  }
281
 
282
  function _lookupFilter(suggestion, originalQuery, queryLowerCase) {
@@ -297,9 +301,9 @@
297
  suggestionValue = utils.highlight(suggestionValue, currentValue);
298
  }
299
 
300
- if(!options.convertHtml){
301
- return suggestionValue;
302
- }
303
 
304
  return suggestionValue.replace(/&/g, '&amp;')
305
  .replace(/</g, '&lt;')
@@ -326,7 +330,7 @@
326
  that.registerEventsSearchBar();
327
  that.registerEventsSuggestions();
328
  that.registerEventsDetailsPanel();
329
- that.registerIconHandler();
330
  that.registerEventsFixedMenu();
331
 
332
  that.fixPositionCapture = function () {
@@ -334,20 +338,27 @@
334
  if (that.visible) {
335
  that.fixPosition();
336
  }
 
337
  };
338
 
339
- $(window).on('resize.autocomplete', function(){
340
- var that = utils.getActiveInstance();
341
- if(typeof that != 'undefined') {
342
- that.fixPositionCapture();
343
- }
344
- });
345
 
346
- $(window).on('resize.autocomplete', function(){
347
- that.toggleMobileMode();
 
 
 
 
 
 
348
  });
349
 
350
- if(that.isMobileMode()) {
351
  that.initMobileMode();
352
  }
353
 
@@ -400,11 +411,6 @@
400
  that.suggestionsContainer.addClass('dgwt-wcas-has-headings');
401
  }
402
 
403
- // Only set width if it was provided:
404
- if (options.width !== 'auto') {
405
- that.suggestionsContainer.width(options.width);
406
- }
407
-
408
  } else {
409
 
410
  that.suggestionsContainer = $('.' + that.options.containerClass);
@@ -426,63 +432,61 @@
426
  }
427
 
428
  }
429
-
430
  },
431
  registerEventsSearchBar: function () {
432
  var that = this;
433
 
434
  // Click close icon
435
- $(document).on('click.autocomplete', '.' + that.options.closeTrigger, function () {
436
- var that = utils.getActiveInstance();
437
- that.close(true);
438
- });
439
-
440
- // Extra tasks on submit
441
- that.el.closest('.' + that.options.formClass).on('submit.autocomplete', function (e) {
442
-
443
- if (that.options.disableSubmit) {
444
- e.preventDefault();
445
- return false;
446
- }
447
-
448
- // Prevent submit empty form
449
- var $input = $(this).find('.' + that.options.searchInputClass);
450
- if ($input.length && $input.val().length === 0) {
451
- e.preventDefault();
452
- return false;
453
- }
454
-
455
- // If variation suggestion exist, click it instead submit search results page
456
- if (that.suggestions.length > 0) {
457
-
458
- $.each(that.suggestions, function (i, suggestion) {
459
-
460
- if (
461
- typeof suggestion.type != 'undefined'
462
- && suggestion.type == 'product_variation'
463
- ) {
464
- that.select(i);
465
- e.preventDefault();
466
- return false;
467
- }
468
- });
469
-
470
- }
471
-
472
- // Clean before submit
473
- that.disableOverlayMobile();
474
-
475
- });
476
-
477
- // Position preloader
478
- if (document.readyState === 'complete') {
479
- that.positionPreloader();
480
- } else {
481
- $(window).on('load', function () {
482
- that.positionPreloader();
483
- });
484
- }
485
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
 
487
  that.el.on('keydown.autocomplete', function (e) {
488
  that.onKeyPress(e);
@@ -493,8 +497,8 @@
493
  that.el.on('blur.autocomplete', function () {
494
  that.onBlur();
495
  });
496
- that.el.on('focus.autocomplete', function () {
497
- that.onFocus();
498
  });
499
  that.el.on('change.autocomplete', function (e) {
500
  that.onKeyUp(e);
@@ -518,9 +522,9 @@
518
  $(document).on('mouseenter.autocomplete', suggestionSelector, function () {
519
  var that = utils.getActiveInstance();
520
 
521
- if(typeof that == 'undefined'){
522
- return;
523
- }
524
 
525
  var currentIndex = $(this).data('index');
526
  var selector = '.dgwt-wcas-suggestion[data-index="' + currentIndex + '"]';
@@ -530,7 +534,7 @@
530
  if (that.selectedIndex != currentIndex) {
531
  utils.mouseHoverDebounce(function () {
532
  if (that.selectedIndex !== currentIndex) {
533
- that.latestActivateSource = 'mouse';
534
  that.getDetails(that.suggestions[currentIndex]);
535
  that.activate(currentIndex);
536
  }
@@ -541,43 +545,43 @@
541
 
542
  var alreadyClicked = false;
543
  // Redirect to the new URL after click a suggestions
544
- $(document).on('click.autocomplete', suggestionSelector, function (e) {
545
- if (!alreadyClicked) {
546
- var that = utils.getActiveInstance();
547
- that.actionTriggerSource = 'click';
548
-
549
- alreadyClicked = true;
550
- setTimeout(function () {
551
- alreadyClicked = false;
552
- }, 500);
553
-
554
- if (typeof e.ctrlKey === 'undefined' || e.ctrlKey === false) {
555
- that.select($(this).data('index'));
556
- e.preventDefault();
557
- }
558
- } else {
559
- e.preventDefault();
560
- }
561
- });
562
-
563
- // FIX issue with touchpads for some laptops (marginal cases)
564
- $(document).on('mousedown.autocomplete', suggestionSelector, function (e) {
565
- var _this = this;
566
- if (e.button === 0) {
567
- setTimeout(function () {
568
- if (!alreadyClicked) {
569
- var that = utils.getActiveInstance();
570
- that.select($(_this).data('index'));
571
- }
572
- }, 250);
573
- }
574
- });
575
-
576
- // Mark cursor position for onBlur event
577
- $('.' + that.options.containerClass).on('mousedown.autocomplete', function (e) {
578
- var that = utils.getActiveInstance();
579
- that.isMouseDownOnSearchElements = true;
580
- });
581
 
582
  },
583
  registerEventsDetailsPanel: function () {
@@ -594,80 +598,86 @@
594
  $input.attr('data-quantity', $(this).val());
595
  });
596
 
597
- // Mark cursor position for onBlur event
598
- $('.' + that.options.containerDetailsClass).on('mousedown.autocomplete', function (e) {
599
- var that = utils.getActiveInstance();
600
- that.isMouseDownOnSearchElements = true;
601
- });
602
 
603
  },
604
- registerIconHandler: function () {
605
- var that = this,
606
- $formWrapper = that.getFormWrapper();
607
- var $form = $formWrapper.find('.' + that.options.formClass);
608
-
609
- $formWrapper.on('click.autocomplete', '.js-dgwt-wcas-search-icon-handler', function (e) {
610
 
611
- var $input = $formWrapper.find('.' + that.options.searchInputClass);
612
 
613
- if ($formWrapper.hasClass('dgwt-wcas-layout-icon-open')) {
614
 
615
- that.hide();
616
- $form.hide(true);
617
 
618
- $formWrapper.removeClass('dgwt-wcas-layout-icon-open');
 
619
 
 
620
 
621
- } else {
622
- var $arrow = $formWrapper.find('.dgwt-wcas-search-icon-arrow');
623
- $form.hide();
624
- $arrow.hide();
625
- $formWrapper.addClass('dgwt-wcas-layout-icon-open');
626
- that.positionIconSearchMode($formWrapper);
627
 
628
- $form.fadeIn(200, function () {
629
- $arrow.show();
630
- that.positionPreloader($formWrapper);
631
- $input.focus();
632
- });
 
 
 
 
 
 
 
633
 
634
- }
635
 
636
 
637
- });
638
 
639
- if ($('.js-dgwt-wcas-initialized').length == 0 && $('.js-dgwt-wcas-search-icon-handler').length > 0) {
640
 
641
- $(document).on('click.autocomplete', function (event) {
642
 
643
- if ($('.dgwt-wcas-layout-icon-open').length) {
644
 
645
- var $target = $(event.target);
646
 
647
- if (!($target.closest('.' + that.options.searchFormClass).length > 0
648
- || $target.closest('.' + that.options.containerClass).length > 0
649
- || $target.closest('.' + that.options.containerDetailsClass).length > 0
650
- )) {
651
- that.hideIconModeSearch();
652
- }
653
 
654
- }
655
- });
656
- }
657
 
658
- $(window).on('resize.autocomplete', function () {
659
- that.applyFlexibleMode();
660
- });
 
 
 
 
 
 
661
 
662
- if (document.readyState == 'complete') {
663
- that.applyFlexibleMode();
664
- } else {
665
- $(window).on('load.autocomplete', function () {
666
- that.applyFlexibleMode();
667
- });
668
- }
669
 
670
- },
671
  registerEventsFixedMenu: function () {
672
  var that = this;
673
 
@@ -696,7 +706,7 @@
696
  $formWrapper = that.getFormWrapper();
697
 
698
  if (
699
- $formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')
700
  && !$formWrapper.find('.js-dgwt-wcas-enable-mobile-form').length
701
  ) {
702
 
@@ -741,7 +751,12 @@
741
  $formWrapper = that.getFormWrapper(),
742
  currentMode = 'desktop';
743
 
744
- // Determine the current mode
 
 
 
 
 
745
  if ($formWrapper.find('.js-dgwt-wcas-enable-mobile-form').length) {
746
  currentMode = 'mobile';
747
  }
@@ -773,32 +788,38 @@
773
  that.destroyMobileMode();
774
  }
775
  },
776
- applyFlexibleMode: function () {
777
- var that = this;
778
- var $flexibleSearch = $('.js-dgwt-wcas-layout-icon-flexible');
779
 
780
- if ($flexibleSearch.length) {
781
 
782
- if (that.isMobileMode()) {
783
- $flexibleSearch.addClass('js-dgwt-wcas-layout-icon');
784
- $flexibleSearch.addClass('dgwt-wcas-layout-icon');
785
- } else {
786
- $flexibleSearch.removeClass('js-dgwt-wcas-layout-icon');
787
- $flexibleSearch.removeClass('dgwt-wcas-layout-icon');
788
- }
789
 
790
- $flexibleSearch.addClass('dgwt-wcas-layout-icon-flexible-loaded');
791
- }
792
- },
793
- onFocus: function () {
794
- var that = this;
 
 
795
  // Mark as active
796
- $('.' + this.options.searchFormClass).removeClass('dgwt-wcas-active');
797
- that.getFormWrapper().addClass('dgwt-wcas-active');
798
 
799
  // Mark as focus
800
  $('body').addClass('dgwt-wcas-focused');
801
- that.getFormWrapper().addClass('dgwt-wcas-search-focused');
 
 
 
 
802
 
803
  that.fixPositionCapture();
804
  if (that.el.val().length >= that.options.minChars) {
@@ -814,19 +835,20 @@
814
 
815
  // Remove focused classes
816
  $('body').removeClass('dgwt-wcas-focused');
817
- $('.' + this.options.searchFormClass).removeClass('dgwt-wcas-search-focused');
 
818
 
819
- if(that.isMobileMode()){
820
- return;
821
- }
822
 
823
- if (!that.isMouseDownOnSearchElements) {
824
- that.hide();
825
 
826
- if (that.selection && that.currentValue !== query) {
827
- (options.onInvalidateSelection || $.noop).call(that.element);
828
- }
829
- }
830
  },
831
  abortAjax: function () {
832
  var that = this;
@@ -849,11 +871,8 @@
849
 
850
  options.orientation = that.validateOrientation(options.orientation, 'bottom');
851
 
852
- // Adjust height, width and z-index:
853
- //@TODO nie działa obliczanie prawej krawędzi ekranu
854
  $suggestionsContainer.css({
855
  'max-height': !that.canShowDetailsBox() ? options.maxHeight + 'px' : 'none',
856
- 'width': options.width + 'px',
857
  'z-index': options.zIndex
858
  });
859
 
@@ -889,13 +908,20 @@
889
  this.suggestions = [];
890
  },
891
  close: function (focus) {
892
- var that = this;
 
 
893
 
894
  that.hide();
895
  that.clear(false);
896
  that.hideCloseButton();
897
- var $el = that.el.closest('.' + that.options.searchFormClass).find('.' + that.options.searchInputClass);
898
  $el.val('');
 
 
 
 
 
 
899
  if (focus) {
900
  $el.focus();
901
  }
@@ -922,87 +948,59 @@
922
 
923
  },
924
  fixPositionDetailsBox: function () {
925
-
926
  var that = this,
927
- $form = that.getFormWrapper(),
928
  $containerSuggestions = that.getSuggestionsContainer(),
929
  $containerDetails = that.getDetailsContainer(),
930
- offset = that.getFormOffset(),
931
- nativeOffsetLeft = offset.left,
932
- maxWidth = 550;
933
-
934
 
935
  if ($containerDetails.length == 0) {
936
  return false;
937
  }
938
 
939
- var borderCorrection = that.options.isRtl === true ? 1 : 2;
940
- var leftOffset = Math.round(offset.left);
941
- offset.left = leftOffset + Math.round($containerSuggestions.width() + borderCorrection);
942
-
943
- $containerDetails.css(offset);
944
 
 
945
 
946
- // Not set position on the bigger search form
947
- if ($form.width() >= maxWidth) {
948
-
949
- $('body').removeClass('dgwt-wcas-details-outside');
950
- $('body').removeClass('dgwt-wcas-details-right');
951
- $('body').removeClass('dgwt-wcas-details-left');
952
 
953
  if (that.options.isRtl === true) {
954
- $containerSuggestions.css('left', leftOffset + Math.round($containerDetails.width() + borderCorrection) + 'px');
955
- $containerDetails.css('left', (nativeOffsetLeft) + 'px');
 
956
  }
957
 
958
  return;
959
  }
960
 
 
 
961
  var windowWidth = $(window).width(),
962
- cDWidth = $containerDetails.width(),
963
  cOffset = $containerDetails.offset();
964
 
965
- $('body').addClass('dgwt-wcas-details-outside');
966
-
967
-
968
- if (that.options.isRtl === true) {
969
- offset.left = offset.left + 1;
970
- }
971
-
972
- var rightBorderCrossed = false;
973
- var leftBorderCrossed = false;
974
 
975
- // Right border crossed
 
976
  if (windowWidth < (cOffset.left + cDWidth)) {
977
- rightBorderCrossed = true;
978
-
979
  $('body').removeClass('dgwt-wcas-details-right');
980
  $('body').addClass('dgwt-wcas-details-left');
981
-
982
- $containerDetails.css('left', (Math.round(parseFloat($containerSuggestions.css('left').replace('px', ''))) - $containerDetails.outerWidth()) + 'px');
983
-
984
  }
985
 
986
- cOffset = $containerDetails.offset();
987
-
988
- // Left border crossed
989
  if (cOffset.left < 1) {
990
- leftBorderCrossed = true;
991
-
992
- $('body').removeClass('dgwt-wcas-details-left');
993
- $('body').addClass('dgwt-wcas-details-right');
994
-
995
- }
996
-
997
- if (leftBorderCrossed && rightBorderCrossed) {
998
- $('body').removeClass('dgwt-wcas-details-left');
999
- $('body').removeClass('dgwt-wcas-details-right');
1000
  $('body').addClass('dgwt-wcas-details-notfit');
1001
- } else {
1002
- $('body').removeClass('dgwt-wcas-details-notfit');
1003
  }
1004
-
1005
-
1006
  },
1007
  fixHeight: function () {
1008
 
@@ -1088,30 +1086,57 @@
1088
  }, 10);
1089
 
1090
  },
1091
- getFormOffset: function () {
1092
  var that = this,
1093
  $form = that.getFormWrapper(),
1094
- $suggestionsContainer = that.getSuggestionsContainer();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1095
 
1096
  // Choose orientation
1097
  var orientation = that.options.orientation,
1098
- containerHeight = $form.outerHeight(false),
1099
- height = that.el.outerHeight(false),
1100
- offset = that.el.offset(),
1101
- styles = {'top': offset.top, 'left': offset.left};
1102
 
1103
  if (orientation === 'auto') {
1104
  var viewPortHeight = $(window).height(),
1105
  scrollTop = $(window).scrollTop(),
1106
- topOverflow = -scrollTop + offset.top - containerHeight,
1107
- bottomOverflow = scrollTop + viewPortHeight - (offset.top + height + containerHeight);
1108
 
1109
  orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow) ? 'top' : 'bottom';
1110
  }
1111
 
1112
  if (orientation === 'top') {
1113
- var sh = $suggestionsContainer[0].getBoundingClientRect().top,
1114
- ft = $form[0].getBoundingClientRect().top;
1115
 
1116
  $suggestionsContainer.css('height', 'auto');
1117
  if (ft < $suggestionsContainer.height()) {
@@ -1163,7 +1188,7 @@
1163
  var that = this;
1164
 
1165
  // If suggestions are hidden and user presses arrow down, display suggestions:
1166
- if (!that.disabled && !that.visible && e.which === keys.DOWN && that.currentValue) {
1167
  that.suggest();
1168
  return;
1169
  }
@@ -1172,7 +1197,7 @@
1172
  return;
1173
  }
1174
 
1175
- switch (e.which) {
1176
  case keys.ESC:
1177
  that.el.val(that.currentValue);
1178
  that.hide();
@@ -1197,19 +1222,19 @@
1197
  return;
1198
  }
1199
  break;
1200
- case keys.RETURN:
1201
-
1202
- if (that.selectedIndex === -1) {
1203
- if (that.options.disableSubmit) {
1204
- return false;
1205
- }
1206
- that.hide();
1207
- return;
1208
- }
1209
- that.actionTriggerSource = 'enter';
1210
- that.select(that.selectedIndex);
1211
- break;
1212
- case keys.UP:
1213
  that.moveUp();
1214
  break;
1215
  case keys.DOWN:
@@ -1230,7 +1255,7 @@
1230
  return;
1231
  }
1232
 
1233
- switch (e.which) {
1234
  case keys.UP:
1235
  case keys.DOWN:
1236
  return;
@@ -1259,7 +1284,8 @@
1259
  var that = this,
1260
  options = that.options,
1261
  value = that.el.val(),
1262
- query = that.getQuery(value);
 
1263
 
1264
  if (that.selection && that.currentValue !== query) {
1265
  that.selection = null;
@@ -1276,6 +1302,15 @@
1276
  return;
1277
  }
1278
 
 
 
 
 
 
 
 
 
 
1279
  if (query.length < options.minChars) {
1280
  that.hideCloseButton();
1281
  that.hide();
@@ -1343,7 +1378,7 @@
1343
  options.params['l'] = dgwt_wcas.current_lang;
1344
  }
1345
 
1346
- options.params = that.applyCustomParams(options.params);
1347
 
1348
  that.preloader('show', 'form', 'dgwt-wcas-inner-preloader');
1349
  searchForm.addClass('dgwt-wcas-processing');
@@ -1425,14 +1460,14 @@
1425
 
1426
  that.options.onSearchComplete.call(that.element, q, result.suggestions);
1427
 
1428
- that.updatePrices();
1429
 
1430
  }).fail(function (jqXHR, textStatus, errorThrown) {
1431
  that.options.onSearchError.call(that.element, q, jqXHR, textStatus, errorThrown);
1432
  });
1433
 
1434
 
1435
- }, options.debounceWaitMs);
1436
 
1437
 
1438
  } else {
@@ -1470,7 +1505,7 @@
1470
  if (result != null) {
1471
 
1472
  // Load response from cache
1473
- that.detailsPanelSetScene(currentObjectID);
1474
  that.fixHeight();
1475
  that.fixPositionCapture();
1476
 
@@ -1517,13 +1552,13 @@
1517
 
1518
  if (typeof result.items != 'undefined') {
1519
  for (var i = 0; i < result.items.length; i++) {
1520
- var cacheKey = result.items[i]['objectID'];
1521
- that.cachedDetails[cacheKey] = {html: result.items[i]['html']}
1522
- that.detailsPanelAddToScene(cacheKey);
1523
 
1524
- if (typeof result.items[i]['price'] != 'undefined' && result.items[i]['price'].length > 0) {
1525
- that.cachedPrices[cacheKey] = result.items[i]['price'];
1526
- }
1527
  }
1528
  }
1529
 
@@ -1532,10 +1567,10 @@
1532
  var currentObjectID = that.prepareSuggestionObjectID(that.suggestions[that.selectedIndex]);
1533
 
1534
  if (that.cachedDetails[currentObjectID] != null) {
1535
- that.detailsPanelSetScene(currentObjectID);
1536
  } else {
1537
  // @TODO Maybe display some error or placeholder
1538
- that.detailsPanelClearScene();
1539
  }
1540
  that.fixPositionCapture();
1541
  that.fixHeight();
@@ -1546,7 +1581,7 @@
1546
 
1547
  that.preloader('hide', 'details', '');
1548
 
1549
- that.detailsPanelClearScene();
1550
  that.fixPositionCapture();
1551
  that.fixHeight();
1552
  },
@@ -1555,137 +1590,137 @@
1555
 
1556
  $(document).trigger('dgwtWcasDetailsPanelLoaded', that);
1557
  },
1558
- updatePrices: function (noAjax) {
1559
- var that = this,
1560
- i, j,
1561
- productsToLoad = [];
1562
 
1563
- if (!(that.options.showPrice && that.options.dynamicPrices)) {
1564
- return;
1565
- }
1566
 
1567
- if (that.suggestions.length == 0) {
1568
- return;
1569
- }
1570
 
1571
- for (i = 0; i < that.suggestions.length; i++) {
1572
 
1573
- if (
1574
- typeof that.suggestions[i].type != 'undefined'
1575
- && (that.suggestions[i].type == 'product' || that.suggestions[i].type == 'product_variation')
1576
- ) {
1577
- var key = 'product__' + that.suggestions[i].post_id;
1578
 
1579
- if (typeof that.cachedPrices[key] != 'undefined') {
1580
 
1581
- that.updatePrice(i, that.cachedPrices[key]);
1582
 
1583
- } else {
1584
 
1585
- that.applyPreloaderForPrice(i);
1586
 
1587
- productsToLoad.push(that.suggestions[i].post_id);
1588
- }
1589
- }
1590
 
1591
- }
1592
 
1593
 
1594
- if (!noAjax && productsToLoad.length > 0) {
1595
 
1596
- var data = {
1597
- action: typeof dgwt_wcas.action_get_prices == 'undefined' ? 'dgwt_wcas_get_prices' : dgwt_wcas.action_get_prices,
1598
- items: productsToLoad
1599
- };
1600
 
1601
- $.ajax({
1602
- data: data,
1603
- type: 'post',
1604
- url: dgwt_wcas.ajax_prices_endpoint,
1605
- success: function (response) {
1606
 
1607
- if (typeof response.success != 'undefined' && response.success && response.data.length > 0) {
1608
- for (i = 0; i < response.data.length; i++) {
1609
 
1610
- var postID = response.data[i].id,
1611
- price = response.data[i].price;
1612
 
1613
- if (that.suggestions.length > 0) {
1614
- for (j = 0; j < that.suggestions.length; j++) {
1615
- if (
1616
- typeof that.suggestions[j].type != 'undefined'
1617
- && (that.suggestions[j].type == 'product' || that.suggestions[j].type == 'product_variation')
1618
- && that.suggestions[j].post_id == postID
1619
- ) {
1620
 
1621
- var key = 'product__' + postID;
1622
 
1623
- that.cachedPrices[key] = price;
1624
 
1625
- that.updatePrice(j, price);
1626
 
1627
- }
1628
- }
1629
- }
1630
- }
1631
- }
1632
 
1633
- },
1634
- error: function (jqXHR, exception) {
1635
 
1636
- },
1637
- });
1638
 
1639
- }
1640
 
1641
- },
1642
- updatePrice: function (index, price) {
1643
- var that = this;
1644
 
1645
- if(typeof that.suggestions[index] != 'undefined'){
1646
 
1647
- that.suggestions[index].price = price;
1648
 
1649
- var $price = $('.dgwt-wcas-suggestions-wrapp').find('[data-index="' + index + '"] .dgwt-wcas-sp');
1650
 
1651
- if($price.length){
1652
- $price.html(price);
1653
- }
1654
- }
1655
 
1656
- },
1657
- applyCustomParams: function(params){
1658
- var that = this;
1659
 
1660
- // Custom params (global)
1661
- if (typeof dgwt_wcas.custom_params == 'object') {
1662
- var cp = dgwt_wcas.custom_params;
1663
- for (var property in cp) {
1664
- params[property] = cp[property];
1665
- }
1666
- }
1667
 
1668
- // Custom params (local)
1669
- var inputCustomParams = that.el.data('custom-params');
1670
 
1671
- if(typeof inputCustomParams === 'object'){
1672
- for (var property in inputCustomParams) {
1673
- params[property] = inputCustomParams[property];
1674
- }
1675
- }
1676
 
1677
- return params;
1678
- },
1679
- applyPreloaderForPrice: function(index){
1680
- var that = this;
1681
 
1682
- if(typeof that.suggestions[index] != 'undefined'){
1683
- var $price = $('.dgwt-wcas-suggestions-wrapp').find('[data-index="' + index + '"] .dgwt-wcas-sp');
1684
- if($price.length){
1685
- $price.html('<div class="dgwt-wcas-preloader-price"><div class="dgwt-wcas-preloader-price-inner"> <div></div><div></div><div></div></div></div>');
1686
- }
1687
- }
1688
- },
1689
  prepareSuggestionObjectID: function (suggestion) {
1690
  var objectID = '';
1691
 
@@ -1714,42 +1749,42 @@
1714
 
1715
  return objectID;
1716
  },
1717
- detailsPanelSetScene: function (objectID) {
1718
- var that = this,
1719
- $containerDetails = that.getDetailsContainer(),
1720
- objectHash = utils.hashCode(objectID),
1721
- $el = $containerDetails.find('.dgwt-wcas-details-inner[data-object="' + objectHash + '"]');
1722
-
1723
- if ($el.length) {
1724
- that.preloader('hide', 'details', '');
1725
- that.detailsPanelClearScene();
1726
- $el.addClass('dgwt-wcas-details-inner-active');
1727
- }
1728
- },
1729
- detailsPanelAddToScene: function (objectID) {
1730
- var that = this,
1731
- $containerDetails = that.getDetailsContainer(),
1732
- object = that.cachedDetails[objectID],
1733
- objectHash = utils.hashCode(objectID),
1734
- html = '';
1735
-
1736
- if (typeof object != 'undefined' && typeof object.html == 'string') {
1737
- html = object.html.replace('<div ', '<div data-object="' + objectHash + '" ');
1738
- }
1739
-
1740
- if ($containerDetails.find('.dgwt-wcas-details-inner[data-object="' + objectHash + '"]').length == 0) {
1741
- $containerDetails.append(html);
1742
- }
1743
- },
1744
- detailsPanelClearScene: function () {
1745
- var that = this,
1746
- $containerDetails = that.getDetailsContainer(),
1747
- $views = $containerDetails.find('.dgwt-wcas-details-inner');
1748
-
1749
- if ($views.length) {
1750
- $views.removeClass('dgwt-wcas-details-inner-active');
1751
- }
1752
- },
1753
  selectFirstSuggestion: function (suggestions) {
1754
  var that = this,
1755
  index = 0,
@@ -1783,7 +1818,7 @@
1783
  return;
1784
  }
1785
 
1786
- that.latestActivateSource = 'system';
1787
  that.getDetails(suggestions[index]);
1788
  that.activate(index);
1789
  },
@@ -1805,7 +1840,7 @@
1805
  },
1806
  hide: function (clear) {
1807
  var that = this,
1808
- $formWrapper = that.getFormWrapper(),
1809
  $container = that.getSuggestionsContainer(),
1810
  $containerDetails = that.getDetailsContainer();
1811
 
@@ -1834,52 +1869,54 @@
1834
  that.autoAligmentprocess = null;
1835
  }
1836
 
1837
- if (typeof clear == 'boolean' && clear) {
 
 
1838
 
1839
- that.hideCloseButton();
1840
 
1841
- that.currentValue = '';
1842
- that.suggestions = [];
1843
 
1844
- }
1845
 
1846
- that.signalHint(null);
1847
- },
1848
- positionIconSearchMode: function ($formWrapper) {
1849
- var that = this,
1850
- side = 'right',
1851
- formLeftValue = -20;
1852
 
1853
- var $form = $formWrapper.find('.' + that.options.formClass);
1854
- var formWidth = $form.width(),
1855
- windowWidth = $(window).width();
1856
 
1857
- var iconLeftOffset = $formWrapper[0].getBoundingClientRect().left;
1858
- var formLeftOffset = $form[0].getBoundingClientRect().left;
1859
 
1860
- // Is the icon on left or right side of screen?
1861
- if (iconLeftOffset + 10 < windowWidth / 2) {
1862
- side = 'left';
1863
- }
1864
 
1865
- var iconLeftRatio = (iconLeftOffset + 10) / windowWidth;
1866
 
1867
- formLeftValue = Math.floor(-1 * (formWidth * iconLeftRatio));
1868
 
1869
- // Prevent shifting to the left more than the icon position (also positioned from the left)
1870
- formLeftValue = Math.max(formLeftValue, -1 * iconLeftOffset);
1871
 
1872
- $form.css({'left': formLeftValue + 'px'});
1873
 
1874
- },
1875
- hideIconModeSearch: function () {
1876
 
1877
- var $openedElements = $('.dgwt-wcas-layout-icon-open');
1878
 
1879
- if ($openedElements.length > 0) {
1880
- $openedElements.removeClass('dgwt-wcas-layout-icon-open');
1881
- }
1882
- },
1883
  hideAfterClickOutsideListener: function () {
1884
  var that = this;
1885
  if (!that.isMobileMode()) {
@@ -1959,7 +1996,7 @@
1959
  var parent = '',
1960
  dataAttrs = '',
1961
  is_img = false,
1962
- url = typeof suggestion.url == 'string' && suggestion.url.length ? suggestion.url : '#';
1963
 
1964
  if (groupBy) {
1965
  html += formatGroup(suggestion, value, i);
@@ -2002,11 +2039,11 @@
2002
  prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels['tax_' + suggestion.taxonomy] + '</span>';
2003
  }
2004
  } else if (options.isPremium && suggestion.type === 'vendor') {
2005
- classes += ' dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor';
2006
- if (!options.showHeadings) {
2007
- prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.vendor + '</span>';
2008
- }
2009
- } else if (options.isPremium && suggestion.type === 'post') {
2010
  classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post';
2011
  if (!options.showHeadings) {
2012
  prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.post + '</span>';
@@ -2032,47 +2069,47 @@
2032
  suggestion.value = dgwt_wcas.labels.no_results;
2033
  highlight = false;
2034
  if (options.showDetailsPanel === true) {
2035
- that.detailsPanelClearScene();
2036
  }
2037
  $('body').addClass('dgwt-wcas-nores');
2038
  }
2039
 
2040
- // Image
2041
- if (typeof suggestion.image_src != 'undefined' && suggestion.image_src) {
2042
- isImg = true;
2043
- }
2044
 
2045
  title = title.length > 0 ? ' title="' + title + '"' : '';
2046
 
2047
- html += '<a href="' + url + '" class="' + classes + '" data-index="' + i + '">';
2048
 
2049
- if(isImg) {
2050
- html += '<span class="dgwt-wcas-si"><img src="' + suggestion.image_src + '" /></span>';
2051
- html += '<div class="dgwt-wcas-content-wrapp">';
2052
- }
2053
 
2054
- html += '<span' + title + ' class="' + innerClass + '">';
2055
 
2056
- if (suggestion.type === 'vendor') {
2057
- html += '<span class="dgwt-wcas-st-title">' + prepend + formatResult(suggestion.value, value, highlight, options) + append + '</span>';
2058
 
2059
- // Vendor city
2060
- if (suggestion.shop_city) {
2061
- html += '<span class="dgwt-wcas-vendor-city"><span> - </span>' + formatResult(suggestion.shop_city, value, true, options) + '</span>';
2062
- }
2063
 
2064
- // Description
2065
- if (typeof suggestion.desc != 'undefined' && suggestion.desc) {
2066
- html += '<span class="dgwt-wcas-sd">' + formatResult(suggestion.desc, value, true, options) + '</span>';
2067
- }
2068
 
2069
- }else{
2070
- html += prepend + formatResult(suggestion.value, value, highlight, options) + append;
2071
- }
2072
 
2073
- html += '</span>';
2074
 
2075
- html += isImg ? '</div>' : '';
2076
  html += '</a>';
2077
  } else {
2078
 
@@ -2123,18 +2160,18 @@
2123
  html += '<span class="dgwt-wcas-sd">' + formatResult(suggestion.desc, value, true, options) + '</span>';
2124
  }
2125
 
2126
- // Vendor
2127
- if (options.showProductVendor === true && typeof suggestion.vendor != 'undefined' && suggestion.vendor) {
2128
- var vendorBody = '<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">' + dgwt_wcas.labels.vendor_sold_by + ' </span>' + suggestion.vendor + '</span>'
2129
 
2130
- if (typeof suggestion.vendor_url != 'undefined' && suggestion.vendor_url) {
2131
- // Since version v1.12.0 suggestions tag was changed from <div> to <a> and vendor links are no longer supported.
2132
- html += '<span class="dgwt-wcas-product-vendor-link" data-url="' + suggestion.vendor_url + '">' + vendorBody + '</span>';
2133
- } else {
2134
- html += vendorBody;
2135
- }
2136
 
2137
- }
2138
 
2139
  // Custom content after description (3rd party)
2140
  if (typeof suggestion.content_after != 'undefined' && suggestion.content_after) {
@@ -2193,7 +2230,7 @@
2193
  $('body').addClass('dgwt-wcas-open');
2194
 
2195
  // Reset the latest mousedown position
2196
- that.isMouseDownOnSearchElements = false;
2197
 
2198
  that.automaticAlignment();
2199
 
@@ -2225,81 +2262,52 @@
2225
  },
2226
  adjustContainerWidth: function () {
2227
  var that = this,
2228
- options = that.options,
2229
- width,
2230
- container = $('body'),
2231
- searchForm = that.getFormWrapper(),
2232
- containerSugg = that.getSuggestionsContainer(),
2233
- containerDetails = that.getDetailsContainer(),
2234
- maxWidth = 550,
2235
- offset = that.getFormOffset();
2236
 
2237
- if(!searchForm.length){
2238
  return;
2239
  }
2240
 
2241
- var realWidth = getComputedStyle(searchForm[0]).width;
 
2242
 
2243
- realWidth = Math.round(parseFloat(realWidth.replace('px', '')));
 
 
2244
 
2245
- // If width is auto, adjust width before displaying suggestions,
2246
- if (options.width === 'auto') {
2247
- width = that.el.outerWidth();
2248
- containerSugg.css('width', width + 'px');
2249
- }
2250
 
2251
- if (that.canShowDetailsBox()) {
 
 
 
 
 
 
 
2252
 
2253
- // Set specific style on the bigger search form
2254
- if (searchForm.width() >= maxWidth) {
2255
 
2256
- container.addClass('dgwt-wcas-full-width');
 
2257
 
 
2258
 
2259
- if (realWidth % 2 == 0) {
2260
- containerSugg.css('width', Math.round(realWidth / 2));
2261
- containerDetails.css('width', Math.round(realWidth / 2));
2262
  } else {
2263
- containerSugg.css('width', Math.floor(realWidth / 2));
2264
- containerDetails.css('width', Math.ceil(realWidth / 2));
2265
  }
2266
-
2267
-
2268
- container.removeClass('dgwt-wcas-details-left');
2269
- container.removeClass('dgwt-wcas-details-right');
2270
-
2271
- if (options.isRtl === true) {
2272
- containerDetails.css('left', '0');
2273
- } else {
2274
- containerSugg.css('left', (realWidth / 2 + offset.left) + 'px');
2275
- }
2276
-
2277
- return;
2278
- }
2279
-
2280
- container.addClass('dgwt-wcas-details-right');
2281
-
2282
  }
2283
 
2284
  },
2285
- positionPreloader: function ($formWrapper) {
2286
-
2287
- var $submit = typeof $formWrapper == 'object' ? $formWrapper.find('.dgwt-wcas-search-submit') : $('.dgwt-wcas-search-submit');
2288
-
2289
- if ($submit.length > 0) {
2290
- $submit.each(function () {
2291
-
2292
- var $preloader = $(this).closest('.dgwt-wcas-search-wrapp').find('.dgwt-wcas-preloader');
2293
-
2294
- if (dgwt_wcas.is_rtl == 1) {
2295
- $preloader.css('left', (6 + $(this).outerWidth()) + 'px');
2296
- } else {
2297
- $preloader.css('right', $(this).outerWidth() + 'px');
2298
- }
2299
- });
2300
- }
2301
-
2302
- },
2303
  findBestHint: function () {
2304
  var that = this,
2305
  value = that.el.val().toLowerCase(),
@@ -2347,10 +2355,10 @@
2347
 
2348
  if (place === 'form') {
2349
 
2350
- // Return early if the preloader is disable via the settings for a search bar
2351
- if (dgwt_wcas.show_preloader != 1) {
2352
- return;
2353
- }
2354
 
2355
  $container = that.getFormWrapper().find('.dgwt-wcas-preloader');
2356
  } else if (place === 'details') {
@@ -2365,35 +2373,35 @@
2365
  if (place === 'form') {
2366
  if (action === 'hide') {
2367
  $container.removeClass(cssClass);
2368
- $container.html('');
2369
  } else {
2370
  $container.addClass(cssClass);
2371
- if(typeof dgwt_wcas.preloader_icon == 'string'){
2372
- $container.html(dgwt_wcas.preloader_icon);
2373
- }
2374
  }
2375
  return;
2376
  }
2377
 
2378
- // Handle preloader for a details panel
2379
- var $preloader = $container.find('.' + defaultClass);
2380
 
2381
- // Action hide
2382
- if (action === 'hide') {
2383
- if ($preloader.length) {
2384
- $preloader.remove();
2385
- }
2386
- return
2387
- }
2388
 
2389
  // Action show
2390
  if (action === 'show') {
2391
  var rtlSuffix = that.options.isRtl ? '-rtl' : '';
2392
  html = '<div class="' + cssClasses + '"><img class="dgwt-wcas-placeholder-preloader" src="' + dgwt_wcas.img_url + 'placeholder' + rtlSuffix + '.png" /></div>';
2393
  that.detailsPanelClearScene();
2394
- if ($preloader.length) {
2395
- $preloader.remove();
2396
- }
2397
  $container.prepend(html);
2398
  }
2399
  },
@@ -2471,11 +2479,11 @@
2471
  select: function (i) {
2472
  var that = this;
2473
 
2474
- if(that.options.disableHits){
2475
- return;
2476
- }
2477
 
2478
- that.disableOverlayMobile();
2479
  that.hide();
2480
  that.onSelect(i);
2481
  },
@@ -2486,7 +2494,7 @@
2486
  return;
2487
  }
2488
 
2489
- that.latestActivateSource = 'key';
2490
 
2491
  if (that.selectedIndex === 0) {
2492
  that.getSuggestionsContainer().children('.' + that.classes.suggestion).first().removeClass(that.classes.selected);
@@ -2506,7 +2514,7 @@
2506
  return;
2507
  }
2508
 
2509
- that.latestActivateSource = 'key';
2510
 
2511
  that.adjustScroll(that.selectedIndex + 1, 'down');
2512
  },
@@ -2514,22 +2522,22 @@
2514
  var that = this;
2515
 
2516
 
2517
- if(that.suggestions[index].type === 'headline'){
2518
- index = direction === 'down' ? index + 1 : index - 1;
2519
- }
2520
 
2521
- if(typeof that.suggestions[index] == 'undefined'){
2522
- return;
2523
- }
2524
 
2525
  var activeItem = that.activate(index);
2526
 
2527
  that.getDetails(that.suggestions[index]);
2528
 
2529
- if(that.suggestions[index].type === 'more_products'){
2530
 
2531
- return;
2532
- }
2533
 
2534
  if (!activeItem || that.canShowDetailsBox()) {
2535
  return;
@@ -2566,20 +2574,20 @@
2566
  onSelectCallback = that.options.onSelect,
2567
  suggestion = that.suggestions[index];
2568
 
2569
- if (typeof suggestion.type != 'undefined') {
2570
- if (
2571
- suggestion.type === 'more_products'
2572
- || (that.actionTriggerSource === 'enter' && that.latestActivateSource != 'key' && suggestion.type != 'product_variation')
2573
- ) {
2574
- that.el.closest('form').trigger('submit');
2575
- return;
2576
- }
2577
- }
2578
 
2579
  that.currentValue = that.getValue(suggestion.value);
2580
 
2581
  if (that.currentValue !== that.el.val() && !that.options.preserveInput) {
2582
- that.el.val(that.currentValue.replace(/(<([^>]+)>)/gi, ' ').replace(/\s\s+/g, ' '));
2583
  }
2584
 
2585
  if (suggestion.url.length > 0) {
@@ -2614,36 +2622,157 @@
2614
  },
2615
  dispose: function () {
2616
  var that = this,
2617
- $el = that.el,
2618
- $formWrapper = that.getFormWrapper(),
2619
- $suggestionsWrapper = that.getSuggestionsContainer(),
2620
- $detailsWrapper = that.getDetailsContainer(),
2621
- $form = $el.closest('.' + that.options.formClass),
2622
- $mobileHandler = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
2623
 
2624
  // Remove all events
2625
- if($formWrapper.length){
2626
- var $items = $formWrapper.find('*');
2627
- $items.each(function(){
2628
- $(this).off('.autocomplete');
2629
- });
2630
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2631
 
2632
- $el.removeData('autocomplete');
2633
- $(window).off('resize.autocomplete', that.fixPositionCapture);
 
 
 
2634
 
2635
- $formWrapper.removeClass('dgwt-wcas-active');
 
 
 
 
2636
 
2637
- that.close(false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2638
 
2639
- // Remove mobile handler
2640
- if ($mobileHandler.length) {
2641
- $mobileHandler.remove();
2642
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2643
 
2644
- if($suggestionsWrapper.length){
2645
- $suggestionsWrapper.html('');
2646
- }
2647
  },
2648
  enableOverlayMobile: function () {
2649
  var that = this;
@@ -2664,9 +2793,9 @@
2664
  html += '<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">';
2665
  html += '<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">';
2666
  html += '<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">'
2667
- if (typeof dgwt_wcas.back_icon == 'string') {
2668
- html += dgwt_wcas.back_icon;
2669
- }
2670
  html += '</button>';
2671
  html += '</div>';
2672
  html += '</div>';
@@ -2695,10 +2824,10 @@
2695
  disableOverlayMobile: function ($overlayWrap) {
2696
  var that = this;
2697
 
2698
- if (!$('html').hasClass('dgwt-wcas-overlay-mobile-on')) {
2699
  that.overlayMobileState = 'off';
2700
- return;
2701
- }
2702
 
2703
  var $suggestionsWrapp = that.getSuggestionsContainer();
2704
 
@@ -2722,34 +2851,34 @@
2722
  var $closeBtn = $clonedForm.find('.dgwt-wcas-close');
2723
  if ($clonedForm.length > 0) {
2724
  $closeBtn.removeClass('dgwt-wcas-close');
2725
- $closeBtn.html('');
2726
  }
2727
 
2728
- that.hide();
2729
 
2730
  }, 150);
2731
 
2732
 
2733
  that.overlayMobileState = 'off';
2734
  },
2735
- showCloseButton: function(){
2736
- var that = this,
2737
- iconBody = typeof dgwt_wcas.close_icon != 'undefined' ? dgwt_wcas.close_icon : '',
2738
- $actionsEl = that.getFormWrapper().find('.' + that.options.preloaderClass);
2739
 
2740
- $actionsEl.addClass(that.options.closeTrigger);
2741
- $actionsEl.html(iconBody);
2742
 
2743
- },
2744
- hideCloseButton: function () {
2745
- var that = this,
2746
- $btn = that.getFormWrapper().find('.' + that.options.closeTrigger);
2747
 
2748
- if ($btn.length) {
2749
- $btn.removeClass(that.options.closeTrigger);
2750
- $btn.html('');
2751
- }
2752
- },
2753
  elementOrParentIsFixed: function ($element) {
2754
 
2755
  var $checkElements = $element.add($element.parents());
@@ -2765,9 +2894,9 @@
2765
  return isFixed;
2766
  },
2767
  gaEvent: function (label, category) {
2768
- var that = this;
2769
- var gaObj = window.hasOwnProperty('GoogleAnalyticsObject') && window.hasOwnProperty(window['GoogleAnalyticsObject']) ? window[window['GoogleAnalyticsObject']] : false;
2770
- if (that.options.sendGAEvents) {
2771
  try {
2772
  if (typeof gtag !== 'undefined') {
2773
  gtag('event', 'autocomplete_search', {
@@ -2775,33 +2904,33 @@
2775
  'event_category': category
2776
  });
2777
  } else if (gaObj !== false) {
2778
- var tracker = gaObj.getAll()[0];
2779
- if (tracker) tracker.send({
2780
- hitType: 'event',
2781
- eventCategory: category,
2782
- eventAction: 'autocomplete_search',
2783
- eventLabel: label
2784
- });
2785
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2786
  } catch (error) {
2787
  }
2788
  }
2789
- if (that.options.enableGASiteSearchModule) {
2790
- try {
2791
- if (typeof gtag !== 'undefined') {
2792
- gtag('event', 'page_view', {
2793
- 'page_path': '/?s=' + encodeURI(label) + '&post_type=product&dgwt_wcas=1',
2794
- });
2795
- } else if (gaObj !== false) {
2796
- var tracker2 = gaObj.getAll()[0];
2797
- if (tracker2) {
2798
- tracker2.set('page', '/?s=' + encodeURI(label) + '&post_type=product&dgwt_wcas=1');
2799
- tracker2.send('pageview');
2800
- }
2801
- }
2802
- } catch (error) {
2803
- }
2804
- }
2805
 
2806
  $(document).trigger('dgwtWcasGAEvent', {'term': label, 'category': category});
2807
  }
@@ -2844,41 +2973,195 @@
2844
 
2845
  (function () {
2846
 
2847
- function isIOS() {
2848
- return [
2849
- 'iPad Simulator',
2850
- 'iPhone Simulator',
2851
- 'iPod Simulator',
2852
- 'iPad',
2853
- 'iPhone',
2854
- 'iPod'
2855
- ].includes(navigator.platform)
2856
- // iPad on iOS 13 detection
2857
- || (navigator.userAgent.includes("Mac") && "ontouchend" in document)
2858
- }
2859
-
2860
- function isIE11() {
2861
- return !!navigator.userAgent.match(/Trident\/7\./);
2862
- }
2863
-
2864
- /*-----------------------------------------------------------------
2865
- /* IE11 polyfills
2866
- /*-----------------------------------------------------------------*/
2867
- if (isIE11()) {
2868
- // https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.includes%2CString.prototype.includes
2869
- (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 || {});
2870
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2871
 
2872
  // RUN
2873
  $(document).ready(function () {
2874
  "use strict";
2875
 
2876
- /*-----------------------------------------------------------------
2877
- /* Mobile detection
2878
- /*-----------------------------------------------------------------*/
2879
- if(isIOS()){
2880
- $('html').addClass('dgwt-wcas-is-ios');
2881
- }
2882
 
2883
  /*-----------------------------------------------------------------
2884
  /* Fire autocomplete
@@ -2918,52 +3201,52 @@
2918
  debounceWaitMs: dgwt_wcas.debounce_wait_ms,
2919
  sendGAEvents: dgwt_wcas.send_ga_events,
2920
  convertHtml: dgwt_wcas.convert_html,
2921
- enableGASiteSearchModule: dgwt_wcas.enable_ga_site_search_module,
2922
- appendTo: typeof dgwt_wcas.suggestions_wrapper != 'undefined' ? dgwt_wcas.suggestions_wrapper : 'body',
2923
- showProductVendor: typeof dgwt_wcas.show_product_vendor != 'undefined' && dgwt_wcas.show_product_vendor ? true : false,
2924
- disableHits: typeof dgwt_wcas.disable_hits != 'undefined' && dgwt_wcas.disable_hits ? true : false,
2925
- disableSubmit: typeof dgwt_wcas.disable_submit != 'undefined' && dgwt_wcas.disable_submit ? true : false
2926
  };
2927
 
2928
  $('.dgwt-wcas-search-input').dgwtWcasAutocomplete(window.dgwt_wcas.config);
2929
 
2930
  });
2931
 
2932
- /*-----------------------------------------------------------------
2933
  /* Fix broken search bars after click browser's back arrow.
2934
  /* Not worked for some browsers especially Safari and FF
2935
  /* Add dgwt-wcas-active class if wasn't added for some reason
2936
- /*
2937
  /*------------ -----------------------------------------------------*/
2938
- $(window).on('load', function () {
2939
- var i = 0;
2940
- var interval = setInterval(function () {
2941
 
2942
- var activeEl = document.activeElement;
2943
 
2944
- if (
2945
- typeof activeEl == 'object'
2946
- && $(activeEl).length
2947
- && $(activeEl).hasClass('dgwt-wcas-search-input')
2948
- ) {
2949
 
2950
- var $search = $(activeEl).closest('.dgwt-wcas-search-wrapp');
2951
 
2952
- if ($search.length && !$search.hasClass('dgwt-wcas-active')) {
2953
- $search.addClass('dgwt-wcas-active');
2954
- clearInterval(interval);
2955
- }
2956
- }
2957
 
2958
- // Stop after 5 seconds
2959
- if (i > 10) {
2960
- clearInterval(interval);
2961
- }
2962
 
2963
- i++;
2964
 
2965
- }, 500);
2966
- });
2967
 
2968
  /*-----------------------------------------------------------------
2969
  /* Fix broken search bars by 3rd party plugins
@@ -2971,24 +3254,24 @@
2971
  /* for eg. mobile usage. We try to fix all broken search bars.
2972
  /*------------ -----------------------------------------------------*/
2973
  $(document).ready(function () {
2974
- setTimeout(function() {
2975
  makeIDUnique();
2976
  maybeReinit();
2977
  }, 500);
2978
  });
2979
 
2980
  $(window).on('load', function () {
2981
- setTimeout(function() {
2982
  makeIDUnique();
2983
  maybeReinit();
2984
  }, 500);
2985
 
2986
  // Support for Elementor popups
2987
- if(
2988
  typeof window.elementorFrontend != 'undefined'
2989
  && typeof window.elementorFrontend.documentsManager != 'undefined'
2990
  && typeof window.elementorFrontend.documentsManager.documents != 'undefined'
2991
- ){
2992
 
2993
  $.each(elementorFrontend.documentsManager.documents, function (id, document) {
2994
  if (typeof document.getModal != 'undefined' && document.getModal) {
@@ -3035,6 +3318,7 @@
3035
  }
3036
 
3037
  }
 
3038
  /**
3039
  * Init not initialized search bar
3040
  */
@@ -3054,6 +3338,17 @@
3054
 
3055
  }
3056
 
 
 
 
 
 
 
 
 
 
 
 
3057
  }());
3058
 
3059
  }));
41
  div.setAttribute('unselectable', 'on');
42
  return div;
43
  },
44
+ highlight: function (suggestionValue, phrase) {
45
+
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;
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ if (highlighted) {
80
+ suggestionValue = suggestionValue.replace(/\^\^/g, '<strong>');
81
+ suggestionValue = suggestionValue.replace(/@@/g, '<\/strong>');
82
+ }
83
+
84
+
85
+ } else {
86
+ var pattern = '(' + utils.escapeRegExChars(phrase) + ')';
87
+ suggestionValue = suggestionValue.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>');
88
+ }
89
+
90
+ return suggestionValue;
91
+ },
92
  debounce: function (func, wait) {
93
  var timeout,
94
  debounceID = new Date().getUTCMilliseconds();
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 = {
199
  that.classes = {
200
  selected: 'dgwt-wcas-suggestion-selected',
201
  suggestion: 'dgwt-wcas-suggestion',
202
+ suggestionsContainerOrientTop: 'dgwt-wcas-suggestions-wrapp--top',
203
+ inputFilled: 'dgwt-wcas-search-filled',
204
+ darkenOverlayMounted: 'js-dgwt-wcas-search-darkoverl-mounted'
205
  };
206
  that.hint = null;
207
  that.hintValue = '';
208
  that.selection = null;
209
  that.overlayMobileState = 'off';
210
+ that.overlayDarkenedState = 'off';
211
+ that.isMouseDownOnSearchElements = false;
212
 
213
  // Initialize and set options:
214
  that.initialize();
227
  serviceUrl: null,
228
  lookup: null,
229
  onSelect: null,
 
230
  containerDetailsWidth: 'auto',
231
  showDetailsPanel: false,
232
  showImage: false,
240
  featuredBadgeText: 'featured',
241
  minChars: 3,
242
  maxHeight: 600,
243
+ dpusbBreakpoint: 550, // (details panel under search bar - breakpoint) If search bar width is lower than this option, suggestions wrapper and details panel will show under search bar with the same width
244
  deferRequestBy: 0,
245
  params: {},
246
  formatResult: _formatResult,
256
  searchFormClass: 'dgwt-wcas-search-wrapp',
257
  containerClass: 'dgwt-wcas-suggestions-wrapp',
258
  containerDetailsClass: 'dgwt-wcas-details-wrapp',
259
+ darkenedOverlayClass: 'dgwt-wcas-darkened-overlay',
260
  searchInputClass: 'dgwt-wcas-search-input',
261
  preloaderClass: 'dgwt-wcas-preloader',
262
  closeTrigger: 'dgwt-wcas-close',
277
  positionFixed: false,
278
  debounceWaitMs: 400,
279
  sendGAEvents: true,
280
+ enableGASiteSearchModule: false,
281
+ showProductVendor: false,
282
+ disableHits: false,
283
+ disableSubmit: false,
284
  }
285
 
286
  function _lookupFilter(suggestion, originalQuery, queryLowerCase) {
301
  suggestionValue = utils.highlight(suggestionValue, currentValue);
302
  }
303
 
304
+ if (!options.convertHtml) {
305
+ return suggestionValue;
306
+ }
307
 
308
  return suggestionValue.replace(/&/g, '&amp;')
309
  .replace(/</g, '&lt;')
330
  that.registerEventsSearchBar();
331
  that.registerEventsSuggestions();
332
  that.registerEventsDetailsPanel();
333
+ that.registerIconHandler();
334
  that.registerEventsFixedMenu();
335
 
336
  that.fixPositionCapture = function () {
338
  if (that.visible) {
339
  that.fixPosition();
340
  }
341
+ that.positionOverlayDarkened();
342
  };
343
 
344
+ $(window).on('resize.autocomplete', function () {
345
+ var that = utils.getActiveInstance();
346
+ if (typeof that != 'undefined') {
347
+ that.fixPositionCapture();
348
+ }
349
+ });
350
 
351
+ // Trigger only when x axis is changed
352
+ var windowWidth = $(window).width();
353
+ $(window).on('resize.autocomplete', function () {
354
+ var newWidth = $(window).width();
355
+ if (newWidth != windowWidth) {
356
+ that.toggleMobileMode();
357
+ windowWidth = newWidth;
358
+ }
359
  });
360
 
361
+ if (that.isMobileMode()) {
362
  that.initMobileMode();
363
  }
364
 
411
  that.suggestionsContainer.addClass('dgwt-wcas-has-headings');
412
  }
413
 
 
 
 
 
 
414
  } else {
415
 
416
  that.suggestionsContainer = $('.' + that.options.containerClass);
432
  }
433
 
434
  }
 
435
  },
436
  registerEventsSearchBar: function () {
437
  var that = this;
438
 
439
  // Click close icon
440
+ $(document).on('click.autocomplete', '.' + that.options.closeTrigger, function () {
441
+ var that = utils.getActiveInstance();
442
+ that.close(true);
443
+ });
444
+
445
+ // Extra tasks on submit
446
+ that.el.closest('.' + that.options.formClass).on('submit.autocomplete', function (e) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
 
448
+ if (that.options.disableSubmit) {
449
+ e.preventDefault();
450
+ return false;
451
+ }
452
+
453
+ // Prevent submit empty form
454
+ var $input = $(this).find('.' + that.options.searchInputClass);
455
+ if ($input.length && $input.val().length === 0) {
456
+ e.preventDefault();
457
+ return false;
458
+ }
459
+
460
+ // If variation suggestion exist, click it instead submit search results page
461
+ if (that.suggestions.length > 0) {
462
+
463
+ $.each(that.suggestions, function (i, suggestion) {
464
+
465
+ if (
466
+ typeof suggestion.type != 'undefined'
467
+ && suggestion.type == 'product_variation'
468
+ ) {
469
+ that.select(i);
470
+ e.preventDefault();
471
+ return false;
472
+ }
473
+ });
474
+
475
+ }
476
+
477
+ // Clean before submit
478
+ that.disableOverlayMobile();
479
+
480
+ });
481
+
482
+ // Position preloader
483
+ if (document.readyState === 'complete') {
484
+ that.positionPreloader();
485
+ } else {
486
+ $(window).on('load', function () {
487
+ that.positionPreloader();
488
+ });
489
+ }
490
 
491
  that.el.on('keydown.autocomplete', function (e) {
492
  that.onKeyPress(e);
497
  that.el.on('blur.autocomplete', function () {
498
  that.onBlur();
499
  });
500
+ that.el.on('focus.autocomplete', function (e) {
501
+ that.onFocus(e);
502
  });
503
  that.el.on('change.autocomplete', function (e) {
504
  that.onKeyUp(e);
522
  $(document).on('mouseenter.autocomplete', suggestionSelector, function () {
523
  var that = utils.getActiveInstance();
524
 
525
+ if (typeof that == 'undefined') {
526
+ return;
527
+ }
528
 
529
  var currentIndex = $(this).data('index');
530
  var selector = '.dgwt-wcas-suggestion[data-index="' + currentIndex + '"]';
534
  if (that.selectedIndex != currentIndex) {
535
  utils.mouseHoverDebounce(function () {
536
  if (that.selectedIndex !== currentIndex) {
537
+ that.latestActivateSource = 'mouse';
538
  that.getDetails(that.suggestions[currentIndex]);
539
  that.activate(currentIndex);
540
  }
545
 
546
  var alreadyClicked = false;
547
  // Redirect to the new URL after click a suggestions
548
+ $(document).on('click.autocomplete', suggestionSelector, function (e) {
549
+ if (!alreadyClicked) {
550
+ var that = utils.getActiveInstance();
551
+ that.actionTriggerSource = 'click';
552
+
553
+ alreadyClicked = true;
554
+ setTimeout(function () {
555
+ alreadyClicked = false;
556
+ }, 500);
557
+
558
+ if (typeof e.ctrlKey === 'undefined' || e.ctrlKey === false) {
559
+ that.select($(this).data('index'));
560
+ e.preventDefault();
561
+ }
562
+ } else {
563
+ e.preventDefault();
564
+ }
565
+ });
566
+
567
+ // FIX issue with touchpads for some laptops (marginal cases)
568
+ $(document).on('mousedown.autocomplete', suggestionSelector, function (e) {
569
+ var _this = this;
570
+ if (e.button === 0) {
571
+ setTimeout(function () {
572
+ if (!alreadyClicked) {
573
+ var that = utils.getActiveInstance();
574
+ that.select($(_this).data('index'));
575
+ }
576
+ }, 250);
577
+ }
578
+ });
579
+
580
+ // Mark cursor position for onBlur event
581
+ $('.' + that.options.containerClass).on('mousedown.autocomplete', function (e) {
582
+ var that = utils.getActiveInstance();
583
+ that.isMouseDownOnSearchElements = true;
584
+ });
585
 
586
  },
587
  registerEventsDetailsPanel: function () {
598
  $input.attr('data-quantity', $(this).val());
599
  });
600
 
601
+ // Mark cursor position for onBlur event
602
+ $('.' + that.options.containerDetailsClass).on('mousedown.autocomplete', function (e) {
603
+ var that = utils.getActiveInstance();
604
+ that.isMouseDownOnSearchElements = true;
605
+ });
606
 
607
  },
608
+ registerIconHandler: function () {
609
+ var that = this,
610
+ $formWrapper = that.getFormWrapper();
611
+ var $form = $formWrapper.find('.' + that.options.formClass);
 
 
612
 
613
+ $formWrapper.on('click.autocomplete', '.js-dgwt-wcas-search-icon-handler', function (e) {
614
 
615
+ var $input = $formWrapper.find('.' + that.options.searchInputClass);
616
 
617
+ if ($formWrapper.hasClass('dgwt-wcas-layout-icon-open')) {
 
618
 
619
+ that.hide();
620
+ $form.hide(true);
621
 
622
+ $formWrapper.removeClass('dgwt-wcas-layout-icon-open');
623
 
 
 
 
 
 
 
624
 
625
+ } else {
626
+ var $arrow = $formWrapper.find('.dgwt-wcas-search-icon-arrow');
627
+ $form.hide();
628
+ $arrow.hide();
629
+ $formWrapper.addClass('dgwt-wcas-layout-icon-open');
630
+ that.positionIconSearchMode($formWrapper);
631
+
632
+ $form.fadeIn(200, function () {
633
+ $arrow.show();
634
+ that.positionPreloader($formWrapper);
635
+ $input.focus();
636
+ });
637
 
638
+ }
639
 
640
 
641
+ });
642
 
643
+ if ($('.js-dgwt-wcas-initialized').length == 0 && $('.js-dgwt-wcas-search-icon-handler').length > 0) {
644
 
645
+ $(document).on('click.autocomplete', function (event) {
646
 
647
+ if ($('.dgwt-wcas-layout-icon-open').length) {
648
 
649
+ var $target = $(event.target);
650
 
651
+ if (!($target.closest('.' + that.options.searchFormClass).length > 0
652
+ || $target.closest('.' + that.options.containerClass).length > 0
653
+ || $target.closest('.' + that.options.containerDetailsClass).length > 0
654
+ )) {
655
+ that.hideIconModeSearch();
656
+ }
657
 
658
+ }
659
+ });
660
+ }
661
 
662
+ // Trigger only when x axis is changed
663
+ var windowWidth = $(window).width();
664
+ $(window).on('resize.autocomplete', function () {
665
+ var newWidth = $(window).width();
666
+ if (newWidth != windowWidth) {
667
+ that.applyFlexibleMode();
668
+ windowWidth = newWidth;
669
+ }
670
+ });
671
 
672
+ if (document.readyState == 'complete') {
673
+ that.applyFlexibleMode();
674
+ } else {
675
+ $(window).on('load.autocomplete', function () {
676
+ that.applyFlexibleMode();
677
+ });
678
+ }
679
 
680
+ },
681
  registerEventsFixedMenu: function () {
682
  var that = this;
683
 
706
  $formWrapper = that.getFormWrapper();
707
 
708
  if (
709
+ $formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')
710
  && !$formWrapper.find('.js-dgwt-wcas-enable-mobile-form').length
711
  ) {
712
 
751
  $formWrapper = that.getFormWrapper(),
752
  currentMode = 'desktop';
753
 
754
+ // Break early if this search bar shouldn't open in overlay mobile mode
755
+ if (!$formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')) {
756
+ return;
757
+ }
758
+
759
+ // Determine the search should open in mobile overlay
760
  if ($formWrapper.find('.js-dgwt-wcas-enable-mobile-form').length) {
761
  currentMode = 'mobile';
762
  }
788
  that.destroyMobileMode();
789
  }
790
  },
791
+ applyFlexibleMode: function () {
792
+ var that = this;
793
+ var $flexibleSearch = $('.js-dgwt-wcas-layout-icon-flexible');
794
 
795
+ if ($flexibleSearch.length) {
796
 
797
+ if (that.isMobileMode()) {
798
+ $flexibleSearch.addClass('js-dgwt-wcas-layout-icon');
799
+ $flexibleSearch.addClass('dgwt-wcas-layout-icon');
800
+ } else {
801
+ $flexibleSearch.removeClass('js-dgwt-wcas-layout-icon');
802
+ $flexibleSearch.removeClass('dgwt-wcas-layout-icon');
803
+ }
804
 
805
+ $flexibleSearch.addClass('dgwt-wcas-layout-icon-flexible-loaded');
806
+ }
807
+ },
808
+ onFocus: function (e) {
809
+ var that = this,
810
+ $formWrapper = that.getFormWrapper(),
811
+ options = that.options;
812
  // Mark as active
813
+ $('.' + options.searchFormClass).removeClass('dgwt-wcas-active');
814
+ $formWrapper.addClass('dgwt-wcas-active');
815
 
816
  // Mark as focus
817
  $('body').addClass('dgwt-wcas-focused');
818
+ $formWrapper.addClass('dgwt-wcas-search-focused');
819
+
820
+ if ($(e.target).closest('.dgwt-wcas-search-wrapp-mobile').length == 0) {
821
+ that.enableOverlayDarkened();
822
+ }
823
 
824
  that.fixPositionCapture();
825
  if (that.el.val().length >= that.options.minChars) {
835
 
836
  // Remove focused classes
837
  $('body').removeClass('dgwt-wcas-focused');
838
+ $('.' + options.searchFormClass).removeClass('dgwt-wcas-search-focused');
839
+
840
 
841
+ if (that.isMobileMode()) {
842
+ return;
843
+ }
844
 
845
+ if (!that.isMouseDownOnSearchElements) {
846
+ that.hide();
847
 
848
+ if (that.selection && that.currentValue !== query) {
849
+ (options.onInvalidateSelection || $.noop).call(that.element);
850
+ }
851
+ }
852
  },
853
  abortAjax: function () {
854
  var that = this;
871
 
872
  options.orientation = that.validateOrientation(options.orientation, 'bottom');
873
 
 
 
874
  $suggestionsContainer.css({
875
  'max-height': !that.canShowDetailsBox() ? options.maxHeight + 'px' : 'none',
 
876
  'z-index': options.zIndex
877
  });
878
 
908
  this.suggestions = [];
909
  },
910
  close: function (focus) {
911
+ var that = this,
912
+ $el = that.el.closest('.' + that.options.searchFormClass).find('.' + that.options.searchInputClass),
913
+ $wrapp = that.getFormWrapper();
914
 
915
  that.hide();
916
  that.clear(false);
917
  that.hideCloseButton();
 
918
  $el.val('');
919
+ $wrapp.removeClass(that.classes.inputFilled);
920
+
921
+ if ($wrapp.hasClass('js-dgwt-wcas-layout-icon')) {
922
+ that.disableOverlayDarkened();
923
+ }
924
+
925
  if (focus) {
926
  $el.focus();
927
  }
948
 
949
  },
950
  fixPositionDetailsBox: function () {
 
951
  var that = this,
952
+ $searchBar = that.getFormWrapper(),
953
  $containerSuggestions = that.getSuggestionsContainer(),
954
  $containerDetails = that.getDetailsContainer(),
955
+ searchBarOffset = that.getFormOffset();
 
 
 
956
 
957
  if ($containerDetails.length == 0) {
958
  return false;
959
  }
960
 
961
+ // Set details panel to the right side of the suggestion wrapper
962
+ var leftAbsolute = searchBarOffset.left + $containerSuggestions.outerWidth(false);
963
+ $containerDetails.css({top: searchBarOffset.top, 'left': leftAbsolute});
 
 
964
 
965
+ $('body').removeClass('dgwt-wcas-full-width dgwt-wcas-details-outside dgwt-wcas-details-right dgwt-wcas-details-left dgwt-wcas-details-notfit');
966
 
967
+ // Details Panel Mode 1: Both suggestions wrapper and details panel wrapper have the same width as the search bar
968
+ if ($searchBar.outerWidth() >= that.options.dpusbBreakpoint) {
969
+ $('body').addClass('dgwt-wcas-full-width');
 
 
 
970
 
971
  if (that.options.isRtl === true) {
972
+ leftAbsolute = searchBarOffset.left + $containerDetails.outerWidth(false);
973
+ $containerSuggestions.css('left', leftAbsolute);
974
+ $containerDetails.css('left', searchBarOffset.left);
975
  }
976
 
977
  return;
978
  }
979
 
980
+ // Details Panel Mode 2: The suggestions wrapper has the same width as the search bar.
981
+ // Details panel clings to the left or right side of the suggestion wrapper.
982
  var windowWidth = $(window).width(),
983
+ cDWidth = $containerDetails.outerWidth(),
984
  cOffset = $containerDetails.offset();
985
 
986
+ $('body').addClass('dgwt-wcas-details-outside dgwt-wcas-details-right');
 
 
 
 
 
 
 
 
987
 
988
+ // Is the details panel fits the space of the right side?
989
+ // Not? Try to move to the left side
990
  if (windowWidth < (cOffset.left + cDWidth)) {
 
 
991
  $('body').removeClass('dgwt-wcas-details-right');
992
  $('body').addClass('dgwt-wcas-details-left');
993
+ leftAbsolute = $containerSuggestions.offset().left - $containerDetails.outerWidth();
994
+ $containerDetails.css('left', leftAbsolute);
995
+ cOffset = $containerDetails.offset();
996
  }
997
 
998
+ // Is the details panel fits the space of the left side?
999
+ // Not? Try to hide it by adding class "dgwt-wcas-details-notfit"
 
1000
  if (cOffset.left < 1) {
1001
+ $('body').removeClass('dgwt-wcas-details-left dgwt-wcas-details-right');
 
 
 
 
 
 
 
 
 
1002
  $('body').addClass('dgwt-wcas-details-notfit');
 
 
1003
  }
 
 
1004
  },
1005
  fixHeight: function () {
1006
 
1086
  }, 10);
1087
 
1088
  },
1089
+ getFormElementInfo: function () {
1090
  var that = this,
1091
  $form = that.getFormWrapper(),
1092
+ data = {},
1093
+ offset;
1094
+
1095
+ // Different position for search icon layout
1096
+ if ($form.hasClass('js-dgwt-wcas-layout-icon')) {
1097
+ $form = $form.find('.' + that.options.formClass);
1098
+ }
1099
+
1100
+
1101
+ offset = $form.offset();
1102
+
1103
+ data.left = offset.left;
1104
+ data.top = offset.top;
1105
+ data.width = $form.outerWidth(false);
1106
+ data.height = $form.outerHeight(false);
1107
+ data.right = data.left + data.width;
1108
+ data.bottom = data.top + data.height;
1109
+
1110
+ return data;
1111
+
1112
+ },
1113
+ getFormOffset: function () {
1114
+ var that = this,
1115
+ $wrapp = that.getFormWrapper(),
1116
+ $suggestionsContainer = that.getSuggestionsContainer(),
1117
+ $baseElementXAxis = $wrapp.find('.' + that.options.formClass),
1118
+ $baseElementYAxis = that.el,
1119
+ offsetTop = $baseElementYAxis.offset().top,
1120
+ offsetLeft = $baseElementXAxis.offset().left;
1121
+
1122
 
1123
  // Choose orientation
1124
  var orientation = that.options.orientation,
1125
+ containerHeight = $wrapp.outerHeight(false),
1126
+ height = $baseElementYAxis.outerHeight(false),
1127
+ styles = {'top': offsetTop, 'left': offsetLeft};
 
1128
 
1129
  if (orientation === 'auto') {
1130
  var viewPortHeight = $(window).height(),
1131
  scrollTop = $(window).scrollTop(),
1132
+ topOverflow = -scrollTop + offsetTop - containerHeight,
1133
+ bottomOverflow = scrollTop + viewPortHeight - (offsetTop + height + containerHeight);
1134
 
1135
  orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow) ? 'top' : 'bottom';
1136
  }
1137
 
1138
  if (orientation === 'top') {
1139
+ var ft = $baseElementYAxis[0].getBoundingClientRect().top;
 
1140
 
1141
  $suggestionsContainer.css('height', 'auto');
1142
  if (ft < $suggestionsContainer.height()) {
1188
  var that = this;
1189
 
1190
  // If suggestions are hidden and user presses arrow down, display suggestions:
1191
+ if (!that.disabled && !that.visible && e.keyCode === keys.DOWN && that.currentValue) {
1192
  that.suggest();
1193
  return;
1194
  }
1197
  return;
1198
  }
1199
 
1200
+ switch (e.keyCode) {
1201
  case keys.ESC:
1202
  that.el.val(that.currentValue);
1203
  that.hide();
1222
  return;
1223
  }
1224
  break;
1225
+ case keys.RETURN:
1226
+
1227
+ if (that.selectedIndex === -1) {
1228
+ if (that.options.disableSubmit) {
1229
+ return false;
1230
+ }
1231
+ that.hide();
1232
+ return;
1233
+ }
1234
+ that.actionTriggerSource = 'enter';
1235
+ that.select(that.selectedIndex);
1236
+ break;
1237
+ case keys.UP:
1238
  that.moveUp();
1239
  break;
1240
  case keys.DOWN:
1255
  return;
1256
  }
1257
 
1258
+ switch (e.keyCode) {
1259
  case keys.UP:
1260
  case keys.DOWN:
1261
  return;
1284
  var that = this,
1285
  options = that.options,
1286
  value = that.el.val(),
1287
+ query = that.getQuery(value),
1288
+ $wrapp = that.getFormWrapper();
1289
 
1290
  if (that.selection && that.currentValue !== query) {
1291
  that.selection = null;
1302
  return;
1303
  }
1304
 
1305
+ // Mark as filled
1306
+ if (query.length > 0) {
1307
+ if (!$wrapp.hasClass(that.classes.inputFilled)) {
1308
+ $wrapp.addClass(that.classes.inputFilled);
1309
+ }
1310
+ } else {
1311
+ $wrapp.removeClass(that.classes.inputFilled);
1312
+ }
1313
+
1314
  if (query.length < options.minChars) {
1315
  that.hideCloseButton();
1316
  that.hide();
1378
  options.params['l'] = dgwt_wcas.current_lang;
1379
  }
1380
 
1381
+ options.params = that.applyCustomParams(options.params);
1382
 
1383
  that.preloader('show', 'form', 'dgwt-wcas-inner-preloader');
1384
  searchForm.addClass('dgwt-wcas-processing');
1460
 
1461
  that.options.onSearchComplete.call(that.element, q, result.suggestions);
1462
 
1463
+ that.updatePrices();
1464
 
1465
  }).fail(function (jqXHR, textStatus, errorThrown) {
1466
  that.options.onSearchError.call(that.element, q, jqXHR, textStatus, errorThrown);
1467
  });
1468
 
1469
 
1470
+ }, options.debounceWaitMs);
1471
 
1472
 
1473
  } else {
1505
  if (result != null) {
1506
 
1507
  // Load response from cache
1508
+ that.detailsPanelSetScene(currentObjectID);
1509
  that.fixHeight();
1510
  that.fixPositionCapture();
1511
 
1552
 
1553
  if (typeof result.items != 'undefined') {
1554
  for (var i = 0; i < result.items.length; i++) {
1555
+ var cacheKey = result.items[i]['objectID'];
1556
+ that.cachedDetails[cacheKey] = {html: result.items[i]['html']}
1557
+ that.detailsPanelAddToScene(cacheKey);
1558
 
1559
+ if (typeof result.items[i]['price'] != 'undefined' && result.items[i]['price'].length > 0) {
1560
+ that.cachedPrices[cacheKey] = result.items[i]['price'];
1561
+ }
1562
  }
1563
  }
1564
 
1567
  var currentObjectID = that.prepareSuggestionObjectID(that.suggestions[that.selectedIndex]);
1568
 
1569
  if (that.cachedDetails[currentObjectID] != null) {
1570
+ that.detailsPanelSetScene(currentObjectID);
1571
  } else {
1572
  // @TODO Maybe display some error or placeholder
1573
+ that.detailsPanelClearScene();
1574
  }
1575
  that.fixPositionCapture();
1576
  that.fixHeight();
1581
 
1582
  that.preloader('hide', 'details', '');
1583
 
1584
+ that.detailsPanelClearScene();
1585
  that.fixPositionCapture();
1586
  that.fixHeight();
1587
  },
1590
 
1591
  $(document).trigger('dgwtWcasDetailsPanelLoaded', that);
1592
  },
1593
+ updatePrices: function (noAjax) {
1594
+ var that = this,
1595
+ i, j,
1596
+ productsToLoad = [];
1597
 
1598
+ if (!(that.options.showPrice && that.options.dynamicPrices)) {
1599
+ return;
1600
+ }
1601
 
1602
+ if (that.suggestions.length == 0) {
1603
+ return;
1604
+ }
1605
 
1606
+ for (i = 0; i < that.suggestions.length; i++) {
1607
 
1608
+ if (
1609
+ typeof that.suggestions[i].type != 'undefined'
1610
+ && (that.suggestions[i].type == 'product' || that.suggestions[i].type == 'product_variation')
1611
+ ) {
1612
+ var key = 'product__' + that.suggestions[i].post_id;
1613
 
1614
+ if (typeof that.cachedPrices[key] != 'undefined') {
1615
 
1616
+ that.updatePrice(i, that.cachedPrices[key]);
1617
 
1618
+ } else {
1619
 
1620
+ that.applyPreloaderForPrice(i);
1621
 
1622
+ productsToLoad.push(that.suggestions[i].post_id);
1623
+ }
1624
+ }
1625
 
1626
+ }
1627
 
1628
 
1629
+ if (!noAjax && productsToLoad.length > 0) {
1630
 
1631
+ var data = {
1632
+ action: typeof dgwt_wcas.action_get_prices == 'undefined' ? 'dgwt_wcas_get_prices' : dgwt_wcas.action_get_prices,
1633
+ items: productsToLoad
1634
+ };
1635
 
1636
+ $.ajax({
1637
+ data: data,
1638
+ type: 'post',
1639
+ url: dgwt_wcas.ajax_prices_endpoint,
1640
+ success: function (response) {
1641
 
1642
+ if (typeof response.success != 'undefined' && response.success && response.data.length > 0) {
1643
+ for (i = 0; i < response.data.length; i++) {
1644
 
1645
+ var postID = response.data[i].id,
1646
+ price = response.data[i].price;
1647
 
1648
+ if (that.suggestions.length > 0) {
1649
+ for (j = 0; j < that.suggestions.length; j++) {
1650
+ if (
1651
+ typeof that.suggestions[j].type != 'undefined'
1652
+ && (that.suggestions[j].type == 'product' || that.suggestions[j].type == 'product_variation')
1653
+ && that.suggestions[j].post_id == postID
1654
+ ) {
1655
 
1656
+ var key = 'product__' + postID;
1657
 
1658
+ that.cachedPrices[key] = price;
1659
 
1660
+ that.updatePrice(j, price);
1661
 
1662
+ }
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1667
 
1668
+ },
1669
+ error: function (jqXHR, exception) {
1670
 
1671
+ },
1672
+ });
1673
 
1674
+ }
1675
 
1676
+ },
1677
+ updatePrice: function (index, price) {
1678
+ var that = this;
1679
 
1680
+ if (typeof that.suggestions[index] != 'undefined') {
1681
 
1682
+ that.suggestions[index].price = price;
1683
 
1684
+ var $price = $('.dgwt-wcas-suggestions-wrapp').find('[data-index="' + index + '"] .dgwt-wcas-sp');
1685
 
1686
+ if ($price.length) {
1687
+ $price.html(price);
1688
+ }
1689
+ }
1690
 
1691
+ },
1692
+ applyCustomParams: function (params) {
1693
+ var that = this;
1694
 
1695
+ // Custom params (global)
1696
+ if (typeof dgwt_wcas.custom_params == 'object') {
1697
+ var cp = dgwt_wcas.custom_params;
1698
+ for (var property in cp) {
1699
+ params[property] = cp[property];
1700
+ }
1701
+ }
1702
 
1703
+ // Custom params (local)
1704
+ var inputCustomParams = that.el.data('custom-params');
1705
 
1706
+ if (typeof inputCustomParams === 'object') {
1707
+ for (var property in inputCustomParams) {
1708
+ params[property] = inputCustomParams[property];
1709
+ }
1710
+ }
1711
 
1712
+ return params;
1713
+ },
1714
+ applyPreloaderForPrice: function (index) {
1715
+ var that = this;
1716
 
1717
+ if (typeof that.suggestions[index] != 'undefined') {
1718
+ var $price = $('.dgwt-wcas-suggestions-wrapp').find('[data-index="' + index + '"] .dgwt-wcas-sp');
1719
+ if ($price.length) {
1720
+ $price.html('<div class="dgwt-wcas-preloader-price"><div class="dgwt-wcas-preloader-price-inner"> <div></div><div></div><div></div></div></div>');
1721
+ }
1722
+ }
1723
+ },
1724
  prepareSuggestionObjectID: function (suggestion) {
1725
  var objectID = '';
1726
 
1749
 
1750
  return objectID;
1751
  },
1752
+ detailsPanelSetScene: function (objectID) {
1753
+ var that = this,
1754
+ $containerDetails = that.getDetailsContainer(),
1755
+ objectHash = utils.hashCode(objectID),
1756
+ $el = $containerDetails.find('.dgwt-wcas-details-inner[data-object="' + objectHash + '"]');
1757
+
1758
+ if ($el.length) {
1759
+ that.preloader('hide', 'details', '');
1760
+ that.detailsPanelClearScene();
1761
+ $el.addClass('dgwt-wcas-details-inner-active');
1762
+ }
1763
+ },
1764
+ detailsPanelAddToScene: function (objectID) {
1765
+ var that = this,
1766
+ $containerDetails = that.getDetailsContainer(),
1767
+ object = that.cachedDetails[objectID],
1768
+ objectHash = utils.hashCode(objectID),
1769
+ html = '';
1770
+
1771
+ if (typeof object != 'undefined' && typeof object.html == 'string') {
1772
+ html = object.html.replace('<div ', '<div data-object="' + objectHash + '" ');
1773
+ }
1774
+
1775
+ if ($containerDetails.find('.dgwt-wcas-details-inner[data-object="' + objectHash + '"]').length == 0) {
1776
+ $containerDetails.append(html);
1777
+ }
1778
+ },
1779
+ detailsPanelClearScene: function () {
1780
+ var that = this,
1781
+ $containerDetails = that.getDetailsContainer(),
1782
+ $views = $containerDetails.find('.dgwt-wcas-details-inner');
1783
+
1784
+ if ($views.length) {
1785
+ $views.removeClass('dgwt-wcas-details-inner-active');
1786
+ }
1787
+ },
1788
  selectFirstSuggestion: function (suggestions) {
1789
  var that = this,
1790
  index = 0,
1818
  return;
1819
  }
1820
 
1821
+ that.latestActivateSource = 'system';
1822
  that.getDetails(suggestions[index]);
1823
  that.activate(index);
1824
  },
1840
  },
1841
  hide: function (clear) {
1842
  var that = this,
1843
+ $formWrapper = that.getFormWrapper(),
1844
  $container = that.getSuggestionsContainer(),
1845
  $containerDetails = that.getDetailsContainer();
1846
 
1869
  that.autoAligmentprocess = null;
1870
  }
1871
 
1872
+ that.isMouseDownOnSearchElements = false;
1873
+
1874
+ if (typeof clear == 'boolean' && clear) {
1875
 
1876
+ that.hideCloseButton();
1877
 
1878
+ that.currentValue = '';
1879
+ that.suggestions = [];
1880
 
1881
+ }
1882
 
1883
+ that.signalHint(null);
1884
+ },
1885
+ positionIconSearchMode: function ($formWrapper) {
1886
+ var that = this,
1887
+ side = 'right',
1888
+ formLeftValue = -20;
1889
 
1890
+ var $form = $formWrapper.find('.' + that.options.formClass);
1891
+ var formWidth = $form.width(),
1892
+ windowWidth = $(window).width();
1893
 
1894
+ var iconLeftOffset = $formWrapper[0].getBoundingClientRect().left;
1895
+ var formLeftOffset = $form[0].getBoundingClientRect().left;
1896
 
1897
+ // Is the icon on left or right side of screen?
1898
+ if (iconLeftOffset + 10 < windowWidth / 2) {
1899
+ side = 'left';
1900
+ }
1901
 
1902
+ var iconLeftRatio = (iconLeftOffset + 10) / windowWidth;
1903
 
1904
+ formLeftValue = Math.floor(-1 * (formWidth * iconLeftRatio));
1905
 
1906
+ // Prevent shifting to the left more than the icon position (also positioned from the left)
1907
+ formLeftValue = Math.max(formLeftValue, -1 * iconLeftOffset);
1908
 
1909
+ $form.css({'left': formLeftValue + 'px'});
1910
 
1911
+ },
1912
+ hideIconModeSearch: function () {
1913
 
1914
+ var $openedElements = $('.dgwt-wcas-layout-icon-open');
1915
 
1916
+ if ($openedElements.length > 0) {
1917
+ $openedElements.removeClass('dgwt-wcas-layout-icon-open');
1918
+ }
1919
+ },
1920
  hideAfterClickOutsideListener: function () {
1921
  var that = this;
1922
  if (!that.isMobileMode()) {
1996
  var parent = '',
1997
  dataAttrs = '',
1998
  is_img = false,
1999
+ url = typeof suggestion.url == 'string' && suggestion.url.length ? suggestion.url : '#';
2000
 
2001
  if (groupBy) {
2002
  html += formatGroup(suggestion, value, i);
2039
  prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels['tax_' + suggestion.taxonomy] + '</span>';
2040
  }
2041
  } else if (options.isPremium && suggestion.type === 'vendor') {
2042
+ classes += ' dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor';
2043
+ if (!options.showHeadings) {
2044
+ prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.vendor + '</span>';
2045
+ }
2046
+ } else if (options.isPremium && suggestion.type === 'post') {
2047
  classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post';
2048
  if (!options.showHeadings) {
2049
  prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.post + '</span>';
2069
  suggestion.value = dgwt_wcas.labels.no_results;
2070
  highlight = false;
2071
  if (options.showDetailsPanel === true) {
2072
+ that.detailsPanelClearScene();
2073
  }
2074
  $('body').addClass('dgwt-wcas-nores');
2075
  }
2076
 
2077
+ // Image
2078
+ if (typeof suggestion.image_src != 'undefined' && suggestion.image_src) {
2079
+ isImg = true;
2080
+ }
2081
 
2082
  title = title.length > 0 ? ' title="' + title + '"' : '';
2083
 
2084
+ html += '<a href="' + url + '" class="' + classes + '" data-index="' + i + '">';
2085
 
2086
+ if (isImg) {
2087
+ html += '<span class="dgwt-wcas-si"><img src="' + suggestion.image_src + '" /></span>';
2088
+ html += '<div class="dgwt-wcas-content-wrapp">';
2089
+ }
2090
 
2091
+ html += '<span' + title + ' class="' + innerClass + '">';
2092
 
2093
+ if (suggestion.type === 'vendor') {
2094
+ html += '<span class="dgwt-wcas-st-title">' + prepend + formatResult(suggestion.value, value, highlight, options) + append + '</span>';
2095
 
2096
+ // Vendor city
2097
+ if (suggestion.shop_city) {
2098
+ html += '<span class="dgwt-wcas-vendor-city"><span> - </span>' + formatResult(suggestion.shop_city, value, true, options) + '</span>';
2099
+ }
2100
 
2101
+ // Description
2102
+ if (typeof suggestion.desc != 'undefined' && suggestion.desc) {
2103
+ html += '<span class="dgwt-wcas-sd">' + formatResult(suggestion.desc, value, true, options) + '</span>';
2104
+ }
2105
 
2106
+ } else {
2107
+ html += prepend + formatResult(suggestion.value, value, highlight, options) + append;
2108
+ }
2109
 
2110
+ html += '</span>';
2111
 
2112
+ html += isImg ? '</div>' : '';
2113
  html += '</a>';
2114
  } else {
2115
 
2160
  html += '<span class="dgwt-wcas-sd">' + formatResult(suggestion.desc, value, true, options) + '</span>';
2161
  }
2162
 
2163
+ // Vendor
2164
+ if (options.showProductVendor === true && typeof suggestion.vendor != 'undefined' && suggestion.vendor) {
2165
+ var vendorBody = '<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">' + dgwt_wcas.labels.vendor_sold_by + ' </span>' + suggestion.vendor + '</span>'
2166
 
2167
+ if (typeof suggestion.vendor_url != 'undefined' && suggestion.vendor_url) {
2168
+ // Since version v1.12.0 suggestions tag was changed from <div> to <a> and vendor links are no longer supported.
2169
+ html += '<span class="dgwt-wcas-product-vendor-link" data-url="' + suggestion.vendor_url + '">' + vendorBody + '</span>';
2170
+ } else {
2171
+ html += vendorBody;
2172
+ }
2173
 
2174
+ }
2175
 
2176
  // Custom content after description (3rd party)
2177
  if (typeof suggestion.content_after != 'undefined' && suggestion.content_after) {
2230
  $('body').addClass('dgwt-wcas-open');
2231
 
2232
  // Reset the latest mousedown position
2233
+ that.isMouseDownOnSearchElements = false;
2234
 
2235
  that.automaticAlignment();
2236
 
2262
  },
2263
  adjustContainerWidth: function () {
2264
  var that = this,
2265
+ $searchBar = that.getFormWrapper(),
2266
+ $suggestions = that.getSuggestionsContainer(),
2267
+ $detailsPanel = that.getDetailsContainer(),
2268
+ $baseElement = $searchBar.find('.' + that.options.formClass),
2269
+ baseWidth = $baseElement.outerWidth();
 
 
 
2270
 
2271
+ if (!$searchBar.length) {
2272
  return;
2273
  }
2274
 
2275
+ // Mode 1 - suggestions wrapper width is the same as search bar width
2276
+ $suggestions.css('width', baseWidth + 'px');
2277
 
2278
+ // Mode 2 - keep the suggestions wrapper and the details panel together under the search bar
2279
+ if (that.canShowDetailsBox() && baseWidth >= that.options.dpusbBreakpoint) {
2280
+ var measurementError = 0;
2281
 
2282
+ // Width 50:50
2283
+ $suggestions.css('width', baseWidth / 2);
2284
+ $detailsPanel.css('width', baseWidth / 2);
 
 
2285
 
2286
+ // Fix browsers subtleties such as calculating sizes as float numbers.
2287
+ measurementError = baseWidth - ($suggestions.outerWidth() + $detailsPanel.outerWidth());
2288
+ if (measurementError != 0) {
2289
+ $detailsPanel.css('width', $detailsPanel.outerWidth() + measurementError);
2290
+ }
2291
+ }
2292
+ },
2293
+ positionPreloader: function ($formWrapper) {
2294
 
2295
+ var $submit = typeof $formWrapper == 'object' ? $formWrapper.find('.dgwt-wcas-search-submit') : $('.dgwt-wcas-search-submit');
 
2296
 
2297
+ if ($submit.length > 0) {
2298
+ $submit.each(function () {
2299
 
2300
+ var $preloader = $(this).closest('.dgwt-wcas-search-wrapp').find('.dgwt-wcas-preloader');
2301
 
2302
+ if (dgwt_wcas.is_rtl == 1) {
2303
+ $preloader.css('left', (6 + $(this).outerWidth()) + 'px');
 
2304
  } else {
2305
+ $preloader.css('right', $(this).outerWidth() + 'px');
 
2306
  }
2307
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2308
  }
2309
 
2310
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2311
  findBestHint: function () {
2312
  var that = this,
2313
  value = that.el.val().toLowerCase(),
2355
 
2356
  if (place === 'form') {
2357
 
2358
+ // Return early if the preloader is disable via the settings for a search bar
2359
+ if (dgwt_wcas.show_preloader != 1) {
2360
+ return;
2361
+ }
2362
 
2363
  $container = that.getFormWrapper().find('.dgwt-wcas-preloader');
2364
  } else if (place === 'details') {
2373
  if (place === 'form') {
2374
  if (action === 'hide') {
2375
  $container.removeClass(cssClass);
2376
+ $container.html('');
2377
  } else {
2378
  $container.addClass(cssClass);
2379
+ if (typeof dgwt_wcas.preloader_icon == 'string') {
2380
+ $container.html(dgwt_wcas.preloader_icon);
2381
+ }
2382
  }
2383
  return;
2384
  }
2385
 
2386
+ // Handle preloader for a details panel
2387
+ var $preloader = $container.find('.' + defaultClass);
2388
 
2389
+ // Action hide
2390
+ if (action === 'hide') {
2391
+ if ($preloader.length) {
2392
+ $preloader.remove();
2393
+ }
2394
+ return
2395
+ }
2396
 
2397
  // Action show
2398
  if (action === 'show') {
2399
  var rtlSuffix = that.options.isRtl ? '-rtl' : '';
2400
  html = '<div class="' + cssClasses + '"><img class="dgwt-wcas-placeholder-preloader" src="' + dgwt_wcas.img_url + 'placeholder' + rtlSuffix + '.png" /></div>';
2401
  that.detailsPanelClearScene();
2402
+ if ($preloader.length) {
2403
+ $preloader.remove();
2404
+ }
2405
  $container.prepend(html);
2406
  }
2407
  },
2479
  select: function (i) {
2480
  var that = this;
2481
 
2482
+ if (that.options.disableHits) {
2483
+ return;
2484
+ }
2485
 
2486
+ that.disableOverlayMobile();
2487
  that.hide();
2488
  that.onSelect(i);
2489
  },
2494
  return;
2495
  }
2496
 
2497
+ that.latestActivateSource = 'key';
2498
 
2499
  if (that.selectedIndex === 0) {
2500
  that.getSuggestionsContainer().children('.' + that.classes.suggestion).first().removeClass(that.classes.selected);
2514
  return;
2515
  }
2516
 
2517
+ that.latestActivateSource = 'key';
2518
 
2519
  that.adjustScroll(that.selectedIndex + 1, 'down');
2520
  },
2522
  var that = this;
2523
 
2524
 
2525
+ if (that.suggestions[index].type === 'headline') {
2526
+ index = direction === 'down' ? index + 1 : index - 1;
2527
+ }
2528
 
2529
+ if (typeof that.suggestions[index] == 'undefined') {
2530
+ return;
2531
+ }
2532
 
2533
  var activeItem = that.activate(index);
2534
 
2535
  that.getDetails(that.suggestions[index]);
2536
 
2537
+ if (that.suggestions[index].type === 'more_products') {
2538
 
2539
+ return;
2540
+ }
2541
 
2542
  if (!activeItem || that.canShowDetailsBox()) {
2543
  return;
2574
  onSelectCallback = that.options.onSelect,
2575
  suggestion = that.suggestions[index];
2576
 
2577
+ if (typeof suggestion.type != 'undefined') {
2578
+ if (
2579
+ suggestion.type === 'more_products'
2580
+ || (that.actionTriggerSource === 'enter' && that.latestActivateSource != 'key' && suggestion.type != 'product_variation')
2581
+ ) {
2582
+ that.el.closest('form').trigger('submit');
2583
+ return;
2584
+ }
2585
+ }
2586
 
2587
  that.currentValue = that.getValue(suggestion.value);
2588
 
2589
  if (that.currentValue !== that.el.val() && !that.options.preserveInput) {
2590
+ that.el.val(that.currentValue.replace(/(<([^>]+)>)/gi, ' ').replace(/\s\s+/g, ' '));
2591
  }
2592
 
2593
  if (suggestion.url.length > 0) {
2622
  },
2623
  dispose: function () {
2624
  var that = this,
2625
+ $el = that.el,
2626
+ $formWrapper = that.getFormWrapper(),
2627
+ $suggestionsWrapper = that.getSuggestionsContainer(),
2628
+ $detailsWrapper = that.getDetailsContainer(),
2629
+ $form = $el.closest('.' + that.options.formClass),
2630
+ $mobileHandler = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
2631
 
2632
  // Remove all events
2633
+ if ($formWrapper.length) {
2634
+ var $items = $formWrapper.find('*');
2635
+ $items.each(function () {
2636
+ $(this).off('.autocomplete');
2637
+ });
2638
+ }
2639
+
2640
+ $el.removeData('autocomplete');
2641
+ $(window).off('resize.autocomplete', that.fixPositionCapture);
2642
+
2643
+ $formWrapper.removeClass('dgwt-wcas-active');
2644
+
2645
+ that.close(false);
2646
+
2647
+ // Remove mobile handler
2648
+ if ($mobileHandler.length) {
2649
+ $mobileHandler.remove();
2650
+ }
2651
+
2652
+ if ($suggestionsWrapper.length) {
2653
+ $suggestionsWrapper.html('');
2654
+ }
2655
+ },
2656
+ isMountedOverlayDarkened: function () {
2657
+ var that = this,
2658
+ $wrapp = that.getFormWrapper(),
2659
+ mounted = false;
2660
+
2661
+ if ($wrapp.hasClass(that.classes.darkenOverlayMounted)) {
2662
+ mounted = true;
2663
+ }
2664
+ return mounted;
2665
+ },
2666
+ enableOverlayDarkened: function () {
2667
+ var that = this,
2668
+ options = that.options,
2669
+ $formWrapper;
2670
+
2671
+ if (!that.isMountedOverlayDarkened()) {
2672
+ return;
2673
+ }
2674
+
2675
+ $formWrapper = that.getFormWrapper();
2676
+
2677
+ $formWrapper.addClass('dgwt-wcas-search-darkoverl-on');
2678
+ $('body').addClass('dgwt-wcas-darkoverl-on');
2679
+
2680
+ // Create node
2681
+ if ($('.' + options.darkenedOverlayClass).length == 0) {
2682
+ var html = '<div class="' + options.darkenedOverlayClass + '"><div></div><div></div><div></div><div></div></div>';
2683
+ $('body').append(html);
2684
+ var $darkenedOverlay = $('.' + that.options.darkenedOverlayClass);
2685
+
2686
+ that.positionOverlayDarkened();
2687
+
2688
+ $darkenedOverlay.on('click.autocomplete', function (e) {
2689
+ that.disableOverlayDarkened();
2690
+ });
2691
+
2692
+ }
2693
+
2694
+ that.overlayDarkenedState = 'on';
2695
 
2696
+ },
2697
+ disableOverlayDarkened: function () {
2698
+ var that = this,
2699
+ options = that.options,
2700
+ $wrapps;
2701
 
2702
+ if (!that.isMountedOverlayDarkened()) {
2703
+ return;
2704
+ }
2705
+
2706
+ $wrapps = $('.dgwt-wcas-search-darkoverl-on');
2707
 
2708
+ if ($wrapps.length) {
2709
+ $wrapps.removeClass('dgwt-wcas-search-darkoverl-on');
2710
+ }
2711
+ $('body').removeClass('dgwt-wcas-darkoverl-on');
2712
+
2713
+
2714
+ var $el = $('.' + options.darkenedOverlayClass);
2715
+ if ($el.length > 0) {
2716
+ $el.remove();
2717
+ that.overlayDarkenedState = 'off';
2718
+ }
2719
+ },
2720
+ positionOverlayDarkened: function () {
2721
+ var that = this,
2722
+ $darkenedOverlay = $('.' + that.options.darkenedOverlayClass);
2723
 
2724
+ if ($darkenedOverlay.length > 0) {
2725
+ $darkenedOverlay.children('div').each(function (i) {
2726
+ that.positionOverlayDarkenedDiv($(this), i + 1);
2727
+ });
2728
+ }
2729
+ },
2730
+ positionOverlayDarkenedDiv: function ($el, orient) {
2731
+ var that = this,
2732
+ elData = that.getFormElementInfo(),
2733
+ css,
2734
+ secureOffset = 200; // Secure buffor
2735
+
2736
+ // Note! It concerns cases 1,3 and 4. 1px is subtracted to achieve an exact match of document height. I don't know why it's needed.
2737
+
2738
+ switch (orient) {
2739
+ case 1:
2740
+ css = {
2741
+ left: (-secureOffset) + 'px',
2742
+ top: (-secureOffset) + 'px',
2743
+ width: (elData.left + secureOffset) + 'px',
2744
+ height: ($(document).outerHeight(false) + secureOffset - 1) + 'px'
2745
+ };
2746
+ break;
2747
+ case 2:
2748
+ css = {
2749
+ left: (-secureOffset) + 'px',
2750
+ top: (-secureOffset) + 'px',
2751
+ width: ($(window).outerWidth(false) + secureOffset) + 'px',
2752
+ height: (elData.top + secureOffset) + 'px',
2753
+ };
2754
+ break;
2755
+ case 3:
2756
+ css = {
2757
+ left: (elData.left + elData.width) + 'px',
2758
+ top: (-secureOffset) + 'px',
2759
+ width: ($(window).outerWidth(false) - elData.right) + 'px',
2760
+ height: ($(document).outerHeight(false) + secureOffset - 1) + 'px'
2761
+ };
2762
+ break;
2763
+ case 4:
2764
+ css = {
2765
+ left: (-secureOffset) + 'px',
2766
+ top: (elData.top + elData.height) + 'px',
2767
+ width: ($(window).outerWidth(false) + secureOffset) + 'px',
2768
+ height: ($(document).outerHeight(false) - elData.bottom - 1) + 'px'
2769
+ };
2770
+ break;
2771
+ }
2772
 
2773
+ if (css) {
2774
+ $el.css(css);
2775
+ }
2776
  },
2777
  enableOverlayMobile: function () {
2778
  var that = this;
2793
  html += '<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">';
2794
  html += '<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">';
2795
  html += '<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">'
2796
+ if (typeof dgwt_wcas.back_icon == 'string') {
2797
+ html += dgwt_wcas.back_icon;
2798
+ }
2799
  html += '</button>';
2800
  html += '</div>';
2801
  html += '</div>';
2824
  disableOverlayMobile: function ($overlayWrap) {
2825
  var that = this;
2826
 
2827
+ if (!$('html').hasClass('dgwt-wcas-overlay-mobile-on')) {
2828
  that.overlayMobileState = 'off';
2829
+ return;
2830
+ }
2831
 
2832
  var $suggestionsWrapp = that.getSuggestionsContainer();
2833
 
2851
  var $closeBtn = $clonedForm.find('.dgwt-wcas-close');
2852
  if ($clonedForm.length > 0) {
2853
  $closeBtn.removeClass('dgwt-wcas-close');
2854
+ $closeBtn.html('');
2855
  }
2856
 
2857
+ that.hide();
2858
 
2859
  }, 150);
2860
 
2861
 
2862
  that.overlayMobileState = 'off';
2863
  },
2864
+ showCloseButton: function () {
2865
+ var that = this,
2866
+ iconBody = typeof dgwt_wcas.close_icon != 'undefined' ? dgwt_wcas.close_icon : '',
2867
+ $actionsEl = that.getFormWrapper().find('.' + that.options.preloaderClass);
2868
 
2869
+ $actionsEl.addClass(that.options.closeTrigger);
2870
+ $actionsEl.html(iconBody);
2871
 
2872
+ },
2873
+ hideCloseButton: function () {
2874
+ var that = this,
2875
+ $btn = that.getFormWrapper().find('.' + that.options.closeTrigger);
2876
 
2877
+ if ($btn.length) {
2878
+ $btn.removeClass(that.options.closeTrigger);
2879
+ $btn.html('');
2880
+ }
2881
+ },
2882
  elementOrParentIsFixed: function ($element) {
2883
 
2884
  var $checkElements = $element.add($element.parents());
2894
  return isFixed;
2895
  },
2896
  gaEvent: function (label, category) {
2897
+ var that = this;
2898
+ var gaObj = window.hasOwnProperty('GoogleAnalyticsObject') && window.hasOwnProperty(window['GoogleAnalyticsObject']) ? window[window['GoogleAnalyticsObject']] : false;
2899
+ if (that.options.sendGAEvents) {
2900
  try {
2901
  if (typeof gtag !== 'undefined') {
2902
  gtag('event', 'autocomplete_search', {
2904
  'event_category': category
2905
  });
2906
  } else if (gaObj !== false) {
2907
+ var tracker = gaObj.getAll()[0];
2908
+ if (tracker) tracker.send({
2909
+ hitType: 'event',
2910
+ eventCategory: category,
2911
+ eventAction: 'autocomplete_search',
2912
+ eventLabel: label
2913
+ });
2914
+ }
2915
+ } catch (error) {
2916
+ }
2917
+ }
2918
+ if (that.options.enableGASiteSearchModule) {
2919
+ try {
2920
+ if (typeof gtag !== 'undefined') {
2921
+ gtag('event', 'page_view', {
2922
+ 'page_path': '/?s=' + encodeURI(label) + '&post_type=product&dgwt_wcas=1',
2923
+ });
2924
+ } else if (gaObj !== false) {
2925
+ var tracker2 = gaObj.getAll()[0];
2926
+ if (tracker2) {
2927
+ tracker2.set('page', '/?s=' + encodeURI(label) + '&post_type=product&dgwt_wcas=1');
2928
+ tracker2.send('pageview');
2929
+ }
2930
+ }
2931
  } catch (error) {
2932
  }
2933
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2934
 
2935
  $(document).trigger('dgwtWcasGAEvent', {'term': label, 'category': category});
2936
  }
2973
 
2974
  (function () {
2975
 
2976
+ function isIOS() {
2977
+ return [
2978
+ 'iPad Simulator',
2979
+ 'iPhone Simulator',
2980
+ 'iPod Simulator',
2981
+ 'iPad',
2982
+ 'iPhone',
2983
+ 'iPod'
2984
+ ].includes(navigator.platform)
2985
+ // iPad on iOS 13 detection
2986
+ || (navigator.userAgent.includes("Mac") && "ontouchend" in document)
2987
+ }
2988
+
2989
+ function isIE11() {
2990
+ return !!navigator.userAgent.match(/Trident\/7\./);
2991
+ }
2992
+
2993
+ /*-----------------------------------------------------------------
2994
+ /* IE11 polyfills
2995
+ /*-----------------------------------------------------------------*/
2996
+ if (isIE11()) {
2997
+ // https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.includes%2CString.prototype.includes
2998
+ (function (self, undefined) {
2999
+ function Call(t, l) {
3000
+ var n = arguments.length > 2 ? arguments[2] : [];
3001
+ if (!1 === IsCallable(t)) throw new TypeError(Object.prototype.toString.call(t) + "is not a function.");
3002
+ return t.apply(l, n)
3003
+ }
3004
+
3005
+ function CreateMethodProperty(e, r, t) {
3006
+ var a = {value: t, writable: !0, enumerable: !1, configurable: !0};
3007
+ Object.defineProperty(e, r, a)
3008
+ }
3009
+
3010
+ function Get(n, t) {
3011
+ return n[t]
3012
+ }
3013
+
3014
+ function IsCallable(n) {
3015
+ return "function" == typeof n
3016
+ }
3017
+
3018
+ function RequireObjectCoercible(e) {
3019
+ if (null === e || e === undefined) throw TypeError(Object.prototype.toString.call(e) + " is not coercible to Object.");
3020
+ return e
3021
+ }
3022
+
3023
+ function SameValueNonNumber(e, n) {
3024
+ return e === n
3025
+ }
3026
+
3027
+ function ToBoolean(o) {
3028
+ return Boolean(o)
3029
+ }
3030
+
3031
+ function ToObject(e) {
3032
+ if (null === e || e === undefined) throw TypeError();
3033
+ return Object(e)
3034
+ }
3035
+
3036
+ function GetV(t, e) {
3037
+ return ToObject(t)[e]
3038
+ }
3039
+
3040
+ function GetMethod(e, n) {
3041
+ var r = GetV(e, n);
3042
+ if (null === r || r === undefined) return undefined;
3043
+ if (!1 === IsCallable(r)) throw new TypeError("Method not callable: " + n);
3044
+ return r
3045
+ }
3046
+
3047
+ function Type(e) {
3048
+ switch (typeof e) {
3049
+ case"undefined":
3050
+ return "undefined";
3051
+ case"boolean":
3052
+ return "boolean";
3053
+ case"number":
3054
+ return "number";
3055
+ case"string":
3056
+ return "string";
3057
+ case"symbol":
3058
+ return "symbol";
3059
+ default:
3060
+ return null === e ? "null" : "Symbol" in self && (e instanceof self.Symbol || e.constructor === self.Symbol) ? "symbol" : "object"
3061
+ }
3062
+ }
3063
+
3064
+ function IsRegExp(e) {
3065
+ if ("object" !== Type(e)) return !1;
3066
+ var n = "Symbol" in self && "match" in self.Symbol ? Get(e, self.Symbol.match) : undefined;
3067
+ if (n !== undefined) return ToBoolean(n);
3068
+ try {
3069
+ var t = e.lastIndex;
3070
+ return e.lastIndex = 0, RegExp.prototype.exec.call(e), !0
3071
+ } catch (l) {
3072
+ } finally {
3073
+ e.lastIndex = t
3074
+ }
3075
+ return !1
3076
+ }
3077
+
3078
+ function OrdinaryToPrimitive(r, t) {
3079
+ if ("string" === t) var e = ["toString", "valueOf"]; else e = ["valueOf", "toString"];
3080
+ for (var i = 0; i < e.length; ++i) {
3081
+ var n = e[i], a = Get(r, n);
3082
+ if (IsCallable(a)) {
3083
+ var o = Call(a, r);
3084
+ if ("object" !== Type(o)) return o
3085
+ }
3086
+ }
3087
+ throw new TypeError("Cannot convert to primitive.")
3088
+ }
3089
+
3090
+ function SameValueZero(n, e) {
3091
+ 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))
3092
+ }
3093
+
3094
+ function ToInteger(n) {
3095
+ if ("symbol" === Type(n)) throw new TypeError("Cannot convert a Symbol value to a number");
3096
+ var t = Number(n);
3097
+ return isNaN(t) ? 0 : 1 / t === Infinity || 1 / t == -Infinity || t === Infinity || t === -Infinity ? t : (t < 0 ? -1 : 1) * Math.floor(Math.abs(t))
3098
+ }
3099
+
3100
+ function ToLength(n) {
3101
+ var t = ToInteger(n);
3102
+ return t <= 0 ? 0 : Math.min(t, Math.pow(2, 53) - 1)
3103
+ }
3104
+
3105
+ function ToPrimitive(e) {
3106
+ var t = arguments.length > 1 ? arguments[1] : undefined;
3107
+ if ("object" === Type(e)) {
3108
+ if (arguments.length < 2) var i = "default"; else t === String ? i = "string" : t === Number && (i = "number");
3109
+ var r = "function" == typeof self.Symbol && "symbol" == typeof self.Symbol.toPrimitive ? GetMethod(e, self.Symbol.toPrimitive) : undefined;
3110
+ if (r !== undefined) {
3111
+ var n = Call(r, e, [i]);
3112
+ if ("object" !== Type(n)) return n;
3113
+ throw new TypeError("Cannot convert exotic object to primitive.")
3114
+ }
3115
+ return "default" === i && (i = "number"), OrdinaryToPrimitive(e, i)
3116
+ }
3117
+ return e
3118
+ }
3119
+
3120
+ function ToString(t) {
3121
+ switch (Type(t)) {
3122
+ case"symbol":
3123
+ throw new TypeError("Cannot convert a Symbol value to a string");
3124
+ case"object":
3125
+ return ToString(ToPrimitive(t, String));
3126
+ default:
3127
+ return String(t)
3128
+ }
3129
+ }
3130
+
3131
+ CreateMethodProperty(Array.prototype, "includes", function e(r) {
3132
+ "use strict";
3133
+ var t = ToObject(this), o = ToLength(Get(t, "length"));
3134
+ if (0 === o) return !1;
3135
+ var n = ToInteger(arguments[1]);
3136
+ if (n >= 0) var a = n; else (a = o + n) < 0 && (a = 0);
3137
+ for (; a < o;) {
3138
+ var i = Get(t, ToString(a));
3139
+ if (SameValueZero(r, i)) return !0;
3140
+ a += 1
3141
+ }
3142
+ return !1
3143
+ });
3144
+ CreateMethodProperty(String.prototype, "includes", function e(t) {
3145
+ "use strict";
3146
+ var r = arguments.length > 1 ? arguments[1] : undefined, n = RequireObjectCoercible(this),
3147
+ i = ToString(n);
3148
+ if (IsRegExp(t)) throw new TypeError("First argument to String.prototype.includes must not be a regular expression");
3149
+ var o = ToString(t), g = ToInteger(r), a = i.length, p = Math.min(Math.max(g, 0), a);
3150
+ return -1 !== String.prototype.indexOf.call(i, o, p)
3151
+ });
3152
+ })('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
3153
+ }
3154
 
3155
  // RUN
3156
  $(document).ready(function () {
3157
  "use strict";
3158
 
3159
+ /*-----------------------------------------------------------------
3160
+ /* Mobile detection
3161
+ /*-----------------------------------------------------------------*/
3162
+ if (isIOS()) {
3163
+ $('html').addClass('dgwt-wcas-is-ios');
3164
+ }
3165
 
3166
  /*-----------------------------------------------------------------
3167
  /* Fire autocomplete
3201
  debounceWaitMs: dgwt_wcas.debounce_wait_ms,
3202
  sendGAEvents: dgwt_wcas.send_ga_events,
3203
  convertHtml: dgwt_wcas.convert_html,
3204
+ enableGASiteSearchModule: dgwt_wcas.enable_ga_site_search_module,
3205
+ appendTo: typeof dgwt_wcas.suggestions_wrapper != 'undefined' ? dgwt_wcas.suggestions_wrapper : 'body',
3206
+ showProductVendor: typeof dgwt_wcas.show_product_vendor != 'undefined' && dgwt_wcas.show_product_vendor ? true : false,
3207
+ disableHits: typeof dgwt_wcas.disable_hits != 'undefined' && dgwt_wcas.disable_hits ? true : false,
3208
+ disableSubmit: typeof dgwt_wcas.disable_submit != 'undefined' && dgwt_wcas.disable_submit ? true : false,
3209
  };
3210
 
3211
  $('.dgwt-wcas-search-input').dgwtWcasAutocomplete(window.dgwt_wcas.config);
3212
 
3213
  });
3214
 
3215
+ /*-----------------------------------------------------------------
3216
  /* Fix broken search bars after click browser's back arrow.
3217
  /* Not worked for some browsers especially Safari and FF
3218
  /* Add dgwt-wcas-active class if wasn't added for some reason
3219
+ /*
3220
  /*------------ -----------------------------------------------------*/
3221
+ $(window).on('load', function () {
3222
+ var i = 0;
3223
+ var interval = setInterval(function () {
3224
 
3225
+ var activeEl = document.activeElement;
3226
 
3227
+ if (
3228
+ typeof activeEl == 'object'
3229
+ && $(activeEl).length
3230
+ && $(activeEl).hasClass('dgwt-wcas-search-input')
3231
+ ) {
3232
 
3233
+ var $search = $(activeEl).closest('.dgwt-wcas-search-wrapp');
3234
 
3235
+ if ($search.length && !$search.hasClass('dgwt-wcas-active')) {
3236
+ $search.addClass('dgwt-wcas-active');
3237
+ clearInterval(interval);
3238
+ }
3239
+ }
3240
 
3241
+ // Stop after 5 seconds
3242
+ if (i > 10) {
3243
+ clearInterval(interval);
3244
+ }
3245
 
3246
+ i++;
3247
 
3248
+ }, 500);
3249
+ });
3250
 
3251
  /*-----------------------------------------------------------------
3252
  /* Fix broken search bars by 3rd party plugins
3254
  /* for eg. mobile usage. We try to fix all broken search bars.
3255
  /*------------ -----------------------------------------------------*/
3256
  $(document).ready(function () {
3257
+ setTimeout(function () {
3258
  makeIDUnique();
3259
  maybeReinit();
3260
  }, 500);
3261
  });
3262
 
3263
  $(window).on('load', function () {
3264
+ setTimeout(function () {
3265
  makeIDUnique();
3266
  maybeReinit();
3267
  }, 500);
3268
 
3269
  // Support for Elementor popups
3270
+ if (
3271
  typeof window.elementorFrontend != 'undefined'
3272
  && typeof window.elementorFrontend.documentsManager != 'undefined'
3273
  && typeof window.elementorFrontend.documentsManager.documents != 'undefined'
3274
+ ) {
3275
 
3276
  $.each(elementorFrontend.documentsManager.documents, function (id, document) {
3277
  if (typeof document.getModal != 'undefined' && document.getModal) {
3318
  }
3319
 
3320
  }
3321
+
3322
  /**
3323
  * Init not initialized search bar
3324
  */
3338
 
3339
  }
3340
 
3341
+ /**
3342
+ * Refreshing the content on the checkout page when a product is added to the cart from the search Details Panel
3343
+ */
3344
+ $(document.body).on('added_to_cart', function () {
3345
+ if (
3346
+ $(document.body).hasClass('woocommerce-checkout') &&
3347
+ $('.dgwt-wcas-search-input').length > 0
3348
+ ) {
3349
+ $(document.body).trigger('update_checkout');
3350
+ }
3351
+ });
3352
  }());
3353
 
3354
  }));
assets/js/search.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}(function(e){"use strict";var t={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t.setAttribute("unselectable","on"),t},highlight:function(e,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(e,t){return t.length-e.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|^)"+t.escapeRegExChars(r.trim())+"\\s)";else l=1===r.trim().length&&o[i]===n?"((\\s|^)"+t.escapeRegExChars(r.trim())+")":"("+t.escapeRegExChars(r.trim())+")";e=e.replace(new RegExp(l,"gi"),"^^$1@@"),a=!0}}a&&(e=(e=e.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else l="("+t.escapeRegExChars(s)+")",e=e.replace(new RegExp(l,"gi"),"<strong>$1</strong>");return e},debounce:function(e,t){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void e();s.id=o,i=setTimeout(function(){o===s.id?(e(),s.id=""):clearTimeout(i)},t)},mouseHoverDebounce:function(t,s,i){var o;o=setTimeout(function(){e(s+":hover").length>0?t():clearTimeout(o)},i)},getActiveInstance:function(){var t,s=e(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return s.length>0&&s.each(function(){var s=e(this).find(".dgwt-wcas-search-input");if("object"==typeof s.data("autocomplete"))return t=s.data("autocomplete"),!1}),t},hashCode:function(e){for(var t=0,s=e.length;s>0;)t=(t<<5)-t+e.charCodeAt(--s)|0;return t<0?-1*t:t}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=e.noop;function d(t,s){this.element=t,this.el=e(t),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=e.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.isMouseDownOnSearchElements=!1,this.initialize(),this.setOptions(s)}d.utils=t,e.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(e,s,i,o){if(!s)return e;i&&(e=t.highlight(e,s));if(!o.convertHtml)return e;return e.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|span))&gt;/g,"<$1>").replace(/&lt;(strong|span)\s+class\s*=\s*&quot;([^&]+)&quot;&gt;/g,'<$1 class="$2">')},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(e,t,s){return-1!==e.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?JSON.parse(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()},e(window).on("resize.autocomplete",function(){var e=t.getActiveInstance();void 0!==e&&e.fixPositionCapture()}),e(window).on("resize.autocomplete",function(){s.toggleMobileMode()}),s.isMobileMode()&&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(t){var s=this.options;0==e("."+s.containerClass).length?(this.suggestionsContainer=e(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=e("."+this.options.containerClass),this.canShowDetailsBox()&&(0==e("."+s.containerDetailsClass).length?(this.detailsContainer=e(d.utils.createNode(s.containerDetailsClass)),this.detailsContainer.appendTo(s.appendTo||"body"),this.detailsContainer.addClass("woocommerce")):this.detailsContainer=e("."+s.containerDetailsClass))},registerEventsSearchBar:function(){var s=this;e(document).on("click.autocomplete","."+s.options.closeTrigger,function(){t.getActiveInstance().close(!0)}),s.el.closest("."+s.options.formClass).on("submit.autocomplete",function(t){if(s.options.disableSubmit)return t.preventDefault(),!1;var i=e(this).find("."+s.options.searchInputClass);if(i.length&&0===i.val().length)return t.preventDefault(),!1;s.suggestions.length>0&&e.each(s.suggestions,function(e,i){if(void 0!==i.type&&"product_variation"==i.type)return s.select(e),t.preventDefault(),!1}),s.disableOverlayMobile()}),"complete"===document.readyState?s.positionPreloader():e(window).on("load",function(){s.positionPreloader()}),s.el.on("keydown.autocomplete",function(e){s.onKeyPress(e)}),s.el.on("keyup.autocomplete",function(e){s.onKeyUp(e)}),s.el.on("blur.autocomplete",function(){s.onBlur()}),s.el.on("focus.autocomplete",function(){s.onFocus()}),s.el.on("change.autocomplete",function(e){s.onKeyUp(e)}),s.el.on("input.autocomplete",function(e){s.onKeyUp(e)})},registerEventsSuggestions:function(){var s="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){e(document).on("mouseenter.autocomplete",s,function(){var s=t.getActiveInstance();if(void 0!==s){var i=e(this).data("index"),o='.dgwt-wcas-suggestion[data-index="'+i+'"]',a=s.canShowDetailsBox()?100:1;s.selectedIndex!=i&&t.mouseHoverDebounce(function(){s.selectedIndex!==i&&(s.latestActivateSource="mouse",s.getDetails(s.suggestions[i]),s.activate(i))},o,a)}});var i=!1;e(document).on("click.autocomplete",s,function(s){if(i)s.preventDefault();else{var o=t.getActiveInstance();o.actionTriggerSource="click",i=!0,setTimeout(function(){i=!1},500),void 0!==s.ctrlKey&&!1!==s.ctrlKey||(o.select(e(this).data("index")),s.preventDefault())}}),e(document).on("mousedown.autocomplete",s,function(s){var o=this;0===s.button&&setTimeout(function(){i||t.getActiveInstance().select(e(o).data("index"))},250)}),e("."+this.options.containerClass).on("mousedown.autocomplete",function(e){t.getActiveInstance().isMouseDownOnSearchElements=!0})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(e(document).on("change.autocomplete",'[name="js-dgwt-wcas-quantity"]',function(t){e(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",e(this).val())}),e("."+this.options.containerDetailsClass).on("mousedown.autocomplete",function(e){t.getActiveInstance().isMouseDownOnSearchElements=!0}))},registerIconHandler:function(){var t=this,s=t.getFormWrapper(),i=s.find("."+t.options.formClass);s.on("click.autocomplete",".js-dgwt-wcas-search-icon-handler",function(e){var o=s.find("."+t.options.searchInputClass);if(s.hasClass("dgwt-wcas-layout-icon-open"))t.hide(),i.hide(!0),s.removeClass("dgwt-wcas-layout-icon-open");else{var a=s.find(".dgwt-wcas-search-icon-arrow");i.hide(),a.hide(),s.addClass("dgwt-wcas-layout-icon-open"),t.positionIconSearchMode(s),i.fadeIn(200,function(){a.show(),t.positionPreloader(s),o.focus()})}}),0==e(".js-dgwt-wcas-initialized").length&&e(".js-dgwt-wcas-search-icon-handler").length>0&&e(document).on("click.autocomplete",function(s){if(e(".dgwt-wcas-layout-icon-open").length){var i=e(s.target);i.closest("."+t.options.searchFormClass).length>0||i.closest("."+t.options.containerClass).length>0||i.closest("."+t.options.containerDetailsClass).length>0||t.hideIconModeSearch()}}),e(window).on("resize.autocomplete",function(){t.applyFlexibleMode()}),"complete"==document.readyState?t.applyFlexibleMode():e(window).on("load.autocomplete",function(){t.applyFlexibleMode()})},registerEventsFixedMenu:function(){var t=this;e(window).on("scroll.autocomplete",function(){if(t.suggestions.length>0&&t.elementOrParentIsFixed(t.getFormWrapper()))if(0===e(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(e){setTimeout(function(){t.fixHeight(),t.fixPositionCapture()},e)})}else t.fixHeight(),t.fixPositionCapture()})},initMobileMode:function(){var e=this,t=e.getFormWrapper();t.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&!t.find(".js-dgwt-wcas-enable-mobile-form").length&&(t.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),t.find(".js-dgwt-wcas-enable-mobile-form").on("click.autocomplete",function(t){e.options.mobileOverlayDelay>0?setTimeout(function(){e.enableOverlayMobile()},e.options.mobileOverlayDelay):e.enableOverlayMobile()}))},destroyMobileMode:function(){var e=this.getFormWrapper(),t=(this.getSuggestionsContainer(),e.find(".js-dgwt-wcas-enable-mobile-form"));e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&t.length&&(this.disableOverlayMobile(),t.remove())},toggleMobileMode:function(){var e="desktop";if(this.getFormWrapper().find(".js-dgwt-wcas-enable-mobile-form").length&&(e="mobile"),"desktop"===e&&this.isMobileMode()||"mobile"===e&&!this.isMobileMode()){var t=this.getSuggestionsContainer();this.close(!1),t.length&&t.html(""),this.hideIconModeSearch()}"desktop"===e&&this.isMobileMode()&&this.initMobileMode(),"mobile"!==e||this.isMobileMode()||this.destroyMobileMode()},applyFlexibleMode:function(){var t=e(".js-dgwt-wcas-layout-icon-flexible");t.length&&(this.isMobileMode()?(t.addClass("js-dgwt-wcas-layout-icon"),t.addClass("dgwt-wcas-layout-icon")):(t.removeClass("js-dgwt-wcas-layout-icon"),t.removeClass("dgwt-wcas-layout-icon")),t.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(){e("."+this.options.searchFormClass).removeClass("dgwt-wcas-active"),this.getFormWrapper().addClass("dgwt-wcas-active"),e("body").addClass("dgwt-wcas-focused"),this.getFormWrapper().addClass("dgwt-wcas-search-focused"),this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var t=this.options,s=this.el.val(),i=this.getQuery(s);e("body").removeClass("dgwt-wcas-focused"),e("."+this.options.searchFormClass).removeClass("dgwt-wcas-search-focused"),this.isMobileMode()||this.isMouseDownOnSearchElements||(this.hide(),this.selection&&this.currentValue!==i&&(t.onInvalidateSelection||e.noop).call(this.element))},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(t){var s=this,i=s.getSuggestionsContainer(),o=e.extend({},s.options,t);(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(e){e&&this.clearCache(),this.currentValue="",this.suggestions=[]},close:function(e){this.hide(),this.clear(!1),this.hideCloseButton();var t=this.el.closest("."+this.options.searchFormClass).find("."+this.options.searchInputClass);t.val(""),e&&t.focus()},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var e=this.getFormOffset();this.getSuggestionsContainer().css(e),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var t=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),t.width()>=550)return e("body").removeClass("dgwt-wcas-details-outside"),e("body").removeClass("dgwt-wcas-details-right"),e("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=e(window).width(),c=i.width(),d=i.offset();e("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,e("body").removeClass("dgwt-wcas-details-right"),e("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,e("body").removeClass("dgwt-wcas-details-left"),e("body").addClass("dgwt-wcas-details-right")),u&&g?(e("body").removeClass("dgwt-wcas-details-left"),e("body").removeClass("dgwt-wcas-details-right"),e("body").addClass("dgwt-wcas-details-notfit")):e("body").removeClass("dgwt-wcas-details-notfit")},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var e=this.getSuggestionsContainer(),t=this.getDetailsContainer();e.css("height","auto"),t.css("height","auto");var s=e.outerHeight(!1),i=t.outerHeight(!1);return e.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(e.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&t.css("height",s+"px"),s<i&&e.css("height",i+"px"),!1)},automaticAlignment:function(){var e=this,t=e.getFormWrapper().find(".dgwt-wcas-search-input"),s=e.getSuggestionsContainer(),i=e.getDetailsContainer();if(null==e.autoAligmentprocess){var o=[t.width(),s.height()];e.options.showDetailsPanel&&(o[2]=i.height()),e.autoAligmentprocess=setInterval(function(){var a=[t.width(),s.height()];e.options.showDetailsPanel&&(a[2]=i.height());for(var n=0;n<o.length;n++)if(o[n]!=a[n]){e.fixHeight(),e.fixPositionCapture(),o=a;break}e.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&e.fixHeight())},10)}},getFormOffset:function(){var t=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.options.orientation,o=t.outerHeight(!1),a=this.el.outerHeight(!1),n=this.el.offset(),r={top:n.top,left:n.left};if("auto"===i){var l=e(window).height(),c=e(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=t[0].getBoundingClientRect().top;s.css("height","auto"),u<s.height()&&s.height(u-10),r.top+=-s.outerHeight(!1)}else r.top+=a;return r},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getSuggestionsContainer:function(){return e("."+this.options.containerClass)},getDetailsContainer:function(){return e("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var e=this.getSuggestionsContainer();e[0].scrollTop=e[0].scrollHeight},isCursorAtEnd:function(){var e,t=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){if(this.disabled||this.visible||e.which!==l||!this.currentValue){if(!this.disabled&&this.visible){switch(e.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!this.options.disableSubmit&&void this.hide();this.actionTriggerSource="enter",this.select(this.selectedIndex);break;case n:this.moveUp();break;case l:this.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else this.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.which){case n:case l:return}clearTimeout(t.onChangeTimeout),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeTimeout=setTimeout(function(){t.onValueChange()},t.options.deferRequestBy):t.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var t=this.options,s=this.el.val(),i=this.getQuery(s);this.selection&&this.currentValue!==i&&(this.selection=null,(t.onInvalidateSelection||e.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,t.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):i.length<t.minChars?(this.hideCloseButton(),this.hide()):this.getSuggestions(i)}},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return e(window).width()<this.options.mobileBreakpoint},getQuery:function(t){var s,i=this.options.delimiter;return i?(s=t.split(i),e.trim(s[s.length-1])):t.trim()},getSuggestionsLocal:function(t){var s,i=this.options,o=t.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:e.grep(i.lookup,function(e){return a(e,t,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,e.isFunction(c.lookup)?c.lookup(i,function(e){l.suggestions=e.suggestions,l.suggest(),l.selectFirstSuggestion(e.suggestions),c.onSearchComplete.call(l.element,i,e.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(e.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+e.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},e.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,t.debounce(function(){var t=s.object,o=s.ajaxSettings;t.currentRequest=e.ajax(o).done(function(e){var s;t.currentRequest=null,void 0!==(s=t.options.transformResult(e,i)).suggestions&&(t.processResponse(s,i,n),t.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?t.gaEvent(i,"Autocomplete Search without results"):t.gaEvent(i,"Autocomplete Search with results")),t.fixPositionCapture(),t.options.onSearchComplete.call(t.element,i,s.suggestions),t.updatePrices()}).fail(function(e,s,o){t.options.onSearchError.call(t.element,i,e,s,o)})},c.debounceWaitMs))))},getDetails:function(t){var s=this;if(!s.canShowDetailsBox())return!1;if(null!=t&&void 0!==t.type&&("string"!=typeof t.type||"more_products"!==t.type)){s.fixHeight();s.getDetailsContainer();var i=s.prepareSuggestionObjectID(t);if(null!=s.cachedDetails[i])s.detailsPanelSetScene(i),s.fixHeight(),s.fixPositionCapture();else{var o={action:dgwt_wcas.action_result_details,items:[]};if(e.each(s.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type){var i={objectID:s.prepareSuggestionObjectID(t),value:null!=t.value?t.value:""};o.items.push(i)}}),s.detailsPanelClearScene(),s.preloader("show","details",""),-1!=e.inArray(i,s.detailsRequestsSent))return;s.detailsRequestsSent.push(i),e.ajax({data:o,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(e){var t="string"==typeof e?JSON.parse(e):e;if(void 0!==t.items)for(var i=0;i<t.items.length;i++){var o=t.items[i].objectID;s.cachedDetails[o]={html:t.items[i].html},s.detailsPanelAddToScene(o),void 0!==t.items[i].price&&t.items[i].price.length>0&&(s.cachedPrices[o]=t.items[i].price)}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(e,t){s.preloader("hide","details",""),s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight()}})}e(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},updatePrices:function(t){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(!t&&a.length>0){var r={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:a};e.ajax({data:r,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(e){if(void 0!==e.success&&e.success&&e.data.length>0)for(s=0;s<e.data.length;s++){var t=e.data[s].id,a=e.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==t){var n="product__"+t;o.cachedPrices[n]=a,o.updatePrice(i,a)}}},error:function(e,t){}})}}},updatePrice:function(t,s){if(void 0!==this.suggestions[t]){this.suggestions[t].price=s;var i=e(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+t+'"] .dgwt-wcas-sp');i.length&&i.html(s)}},applyCustomParams:function(e){if("object"==typeof dgwt_wcas.custom_params){var t=dgwt_wcas.custom_params;for(var s in t)e[s]=t[s]}var i=this.el.data("custom-params");if("object"==typeof i)for(var s in i)e[s]=i[s];return e},applyPreloaderForPrice:function(t){if(void 0!==this.suggestions[t]){var s=e(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+t+'"] .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(e){var t="";return void 0!==e&&void 0!==e.type&&(null!=e.post_id&&(t=e.type+"__"+e.post_id,"product_variation"===e.type&&(t+="__"+e.variation_id),void 0!==e.post_type&&(t=e.type+"__"+e.post_id+"__"+e.post_type)),null!=e.term_id&&null!=e.taxonomy&&(t=e.type+"__"+e.term_id+"__"+e.taxonomy)),t},detailsPanelSetScene:function(e){var s=this.getDetailsContainer(),i=t.hashCode(e),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(e){var s=this.getDetailsContainer(),i=this.cachedDetails[e],o=t.hashCode(e),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 e=this.getDetailsContainer().find(".dgwt-wcas-details-inner");e.length&&e.removeClass("dgwt-wcas-details-inner-active")},selectFirstSuggestion:function(t){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=t&&t.length>0&&e.each(this.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type&&"no-results"!=t.type)return s=e,!1;void 0!==t.type&&"no-results"!==t.type||(i=!0)}),i||(this.latestActivateSource="system",this.getDetails(t[s]),this.activate(s)))},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,s=t.length;s--;)if(0===e.indexOf(t[s]))return!0;return!1},hide:function(t){this.getFormWrapper();var s=this.getSuggestionsContainer(),i=this.getDetailsContainer();e.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(),e("body").removeClass("dgwt-wcas-open"),e("body").removeClass("dgwt-wcas-block-scroll"),e("body").removeClass("dgwt-wcas-is-details"),e("body").removeClass("dgwt-wcas-full-width"),e("body").removeClass("dgwt-wcas-nores"),e("body").removeClass("dgwt-wcas-details-outside"),e("body").removeClass("dgwt-wcas-details-right"),e("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),"boolean"==typeof t&&t&&(this.hideCloseButton(),this.currentValue="",this.suggestions=[]),this.signalHint(null)},positionIconSearchMode:function(t){var s=-20,i=t.find("."+this.options.formClass),o=i.width(),a=e(window).width(),n=t[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 t=e(".dgwt-wcas-layout-icon-open");t.length>0&&t.removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var t=this;t.isMobileMode()||e(document).mouseup(function(s){if(t.visible){t.getSuggestionsContainer(),t.getDetailsContainer();var i=!(e(s.target).closest("."+t.options.searchFormClass).length>0||e(s.target).hasClass(t.options.searchFormClass)),o=!(e(s.target).closest("."+t.options.containerClass).length>0||e(s.target).hasClass(t.options.containerClass));if(t.canShowDetailsBox()){var a=!(e(s.target).closest("."+t.options.containerDetailsClass).length>0||e(s.target).hasClass(t.options.containerDetailsClass));i&&o&&a&&t.hide()}else i&&o&&t.hide()}})},suggest:function(){if(this.suggestions.length){var t,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=e(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(e("body").removeClass("dgwt-wcas-nores"),e.each(s.suggestions,function(l,c){var d="",g=!1,u="string"==typeof c.url&&c.url.length?c.url:"#";if(o&&(h+=function(e,s){var i=e.data[o];return t===i?"":'<div class="autocomplete-group"><strong>'+(t=i)+"</strong></div>"}(c,0)),void 0===c.type||"product"!=c.type&&"product_variation"!=c.type){var w,p=r,f="dgwt-wcas-st",m="",v="",b="",y=!0;"product_cat"===c.taxonomy?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>"),void 0!==c.breadcrumbs&&c.breadcrumbs&&(b=c.breadcrumbs+" &gt; "+c.value,v+='<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||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&c.taxonomy===i.taxonomyBrands?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"taxonomy"===c.type?(p+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tax-"+c.taxonomy,i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"vendor"===c.type?(p+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(m+='<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||(m+='<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||(m+='<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",f="dgwt-wcas-st-more",c.value=dgwt_wcas.labels.show_more+" ("+c.total+")",y=!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"]),y=!1):(p+=" dgwt-wcas-suggestion-nores",c.value=dgwt_wcas.labels.no_results,y=!1,!0===i.showDetailsPanel&&s.detailsPanelClearScene(),e("body").addClass("dgwt-wcas-nores")),void 0!==c.image_src&&c.image_src&&(w=!0),b=b.length>0?' title="'+b+'"':"",h+='<a href="'+u+'" class="'+p+'" data-index="'+l+'">',w&&(h+='<span class="dgwt-wcas-si"><img src="'+c.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+b+' class="'+f+'">',"vendor"===c.type?(h+='<span class="dgwt-wcas-st-title">'+m+a(c.value,n,y,i)+v+"</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+=m+a(c.value,n,y,i)+v,h+="</span>",h+=w?"</div>":"",h+="</a>"}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+='<a href="'+u+'" 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+='<div class="dgwt-wcas-st">',void 0!==c.title_before&&c.title_before&&(h+=c.title_before),h+='<span class="dgwt-wcas-st-title">'+a(c.value,n,!0,i)+"</span>",void 0!==c.title_after&&c.title_after&&(h+=c.title_after),!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 _='<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+='<span class="dgwt-wcas-product-vendor-link" data-url="'+c.vendor_url+'">'+_+"</span>":h+=_}void 0!==c.content_after&&c.content_after&&(h+=c.content_after),h+="</div>";var S=!0===i.showPrice&&void 0!==c.price,x=void 0!==c.meta_before,M=void 0!==c.meta_after,P=S||x||M;h+=P?'<div class="dgwt-wcas-meta">':"",x&&(h+=c.meta_before),S&&(h+='<span class="dgwt-wcas-sp">'+c.price+"</span>"),M&&(h+=c.meta_after),h+=P?"</div>":"",h+=g?"</div>":"",h+="</a>"}}),this.adjustContainerWidth(),g.detach(),c.html(h),e.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),e("body").addClass("dgwt-wcas-open"),s.isMouseDownOnSearchElements=!1,s.automaticAlignment(),!0===i.showDetailsPanel&&(e("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),e("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var t,s=this.options,i=e("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&&(t=this.el.outerWidth(),a.css("width",t+"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(t){var s="object"==typeof t?t.find(".dgwt-wcas-search-submit"):e(".dgwt-wcas-search-submit");s.length>0&&s.each(function(){var t=e(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?t.css("left",6+e(this).outerWidth()+"px"):t.css("right",e(this).outerWidth()+"px")})},findBestHint:function(){var t=this.el.val().toLowerCase(),s=null;t&&(e.each(this.suggestions,function(e,i){var o=0===i.value.toLowerCase().indexOf(t);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(t){var s="";t&&(s=this.currentValue+t.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=t,(this.options.onHint||e.noop)(s))},preloader:function(e,t,s){var i,o,a="dgwt-wcas-preloader-wrapp",n=null==s?a:a+" "+s;if("form"===t){if(1!=dgwt_wcas.show_preloader)return;o=this.getFormWrapper().find(".dgwt-wcas-preloader")}else"details"===t&&(o=this.getDetailsContainer());if(0!=o.length)if("form"!==t){var r=o.find("."+a);if("hide"!==e){if("show"===e){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"===e?(o.removeClass(s),o.html("")):(o.addClass(s),"string"==typeof dgwt_wcas.preloader_icon&&o.html(dgwt_wcas.preloader_icon))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,function(e){return{value:e,data:null}}):t},validateOrientation:function(t,s){return t=e.trim(t||"").toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=s),t},processResponse:function(e,t,s){var i=this.options;e.suggestions=this.verifySuggestionsFormat(e.suggestions),i.noCache||(this.cachedResponse[s]=e,i.preventBadQueries&&!e.suggestions.length&&this.badQueries.push(t)),t===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&e.suggestions.reverse(),this.suggestions=e.suggestions,this.suggest())},activate:function(t){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=t,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),e(s).addClass(i),s):null},selectHint:function(){var t=e.inArray(this.hint,this.suggestions);this.select(t)},select:function(e){this.options.disableHits||(this.disableOverlayMobile(),this.hide(),this.onSelect(e))},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(t,s){if("headline"===this.suggestions[t].type&&(t="down"===s?t+1:t-1),void 0!==this.suggestions[t]){var i=this.activate(t);if(this.getDetails(this.suggestions[t]),"more_products"!==this.suggestions[t].type&&i&&!this.canShowDetailsBox()){var o,a,n,r=this.getSuggestionsContainer(),l=e(i).outerHeight(!1);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(t){var s=this.options.onSelect,i=this.suggestions[t];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.replace(/(<([^>]+)>)/gi," ").replace(/\s\s+/g," ")),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,e.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(e){var t,s,i=this.options.delimiter;return i?1===(s=(t=this.currentValue).split(i)).length?e:t.substr(0,t.length-s[s.length-1].length)+e:e},dispose:function(){var t=this.el,s=this.getFormWrapper(),i=this.getSuggestionsContainer(),o=(this.getDetailsContainer(),t.closest("."+this.options.formClass),s.find(".js-dgwt-wcas-enable-mobile-form"));s.length&&s.find("*").each(function(){e(this).off(".autocomplete")});t.removeData("autocomplete"),e(window).off("resize.autocomplete",this.fixPositionCapture),s.removeClass("dgwt-wcas-active"),this.close(!1),o.length&&o.remove(),i.length&&i.html("")},enableOverlayMobile:function(){var t=this;if("on"!==t.overlayMobileState){t.overlayMobileState="on";var s,i=t.getFormWrapper(),o=t.getSuggestionsContainer(),a="";e("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>",e(t.options.mobileOverlayWrapper).append(a),(s=e(".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("."+t.options.searchInputClass).focus(),e(document).on("click.autocomplete",".js-dgwt-wcas-om-return",function(e){t.disableOverlayMobile(s)})}},disableOverlayMobile:function(t){var s=this;if(e("html").hasClass("dgwt-wcas-overlay-mobile-on")){var i=s.getSuggestionsContainer(),o=e(".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"),e("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),e(".js-dgwt-wcas-om-hook").after(o),e(".js-dgwt-wcas-overlay-mobile").remove(),e(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var e=o.find(".dgwt-wcas-close");o.length>0&&(e.removeClass("dgwt-wcas-close"),e.html("")),s.hide()},150),s.overlayMobileState="off"}else s.overlayMobileState="off"},showCloseButton:function(){var e=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",t=this.getFormWrapper().find("."+this.options.preloaderClass);t.addClass(this.options.closeTrigger),t.html(e)},hideCloseButton:function(){var e=this.getFormWrapper().find("."+this.options.closeTrigger);e.length&&(e.removeClass(this.options.closeTrigger),e.html(""))},elementOrParentIsFixed:function(t){var s=t.add(t.parents()),i=!1;return s.each(function(){if("fixed"===e(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,s){var i=!(!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:s});else if(!1!==i){var o=i.getAll()[0];o&&o.send({hitType:"event",eventCategory:s,eventAction:"autocomplete_search",eventLabel:t})}}catch(e){}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!==i){var a=i.getAll()[0];a&&(a.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),a.send("pageview"))}}catch(e){}e(document).trigger("dgwtWcasGAEvent",{term:t,category:s})}},e.fn.dgwtWcasAutocomplete=function(t,s){return arguments.length?this.each(function(){var i=e(this),o=i.data("autocomplete");"string"==typeof t?o&&"function"==typeof o[t]&&o[t](s):(o&&o.dispose&&o.dispose(),o=new d(this,t),i.data("autocomplete",o))}):this.first().data("autocomplete")},e.fn.autocomplete||(e.fn.autocomplete=e.fn.dgwtWcasAutocomplete),function(){function t(){var t=e(".dgwt-wcas-search-input"),s=[];t.length>1&&t.each(function(){var t=e(this).attr("id");if(-1==e.inArray(t,s))s.push(t);else{var i=Math.random().toString(36).substring(2,6);i="dgwt-wcas-search-input-"+i,e(this).attr("id",i),e(this).closest("form").find("label").attr("for",i)}})}function s(){var t=e(".dgwt-wcas-search-input");t.length>0&&t.each(function(){"object"!=typeof e(this).data("autocomplete")&&e(this).dgwtWcasAutocomplete(window.dgwt_wcas.config)})}navigator.userAgent.match(/Trident\/7\./)&&function(e,t){function s(e,t){var s=arguments.length>2?arguments[2]:[];if(!1===a(e))throw new TypeError(Object.prototype.toString.call(e)+"is not a function.");return e.apply(t,s)}function i(e,t,s){var i={value:s,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,t,i)}function o(e,t){return e[t]}function a(e){return"function"==typeof e}function n(e){if(null===e||e===t)throw TypeError();return Object(e)}function r(e,s){var i=function(e,t){return n(e)[t]}(e,s);if(null===i||i===t)return t;if(!1===a(i))throw new TypeError("Method not callable: "+s);return i}function l(t){switch(typeof t){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===t?"null":"Symbol"in e&&(t instanceof e.Symbol||t.constructor===e.Symbol)?"symbol":"object"}}function c(s){if("object"!==l(s))return!1;var i="Symbol"in e&&"match"in e.Symbol?o(s,e.Symbol.match):t;if(i!==t)return Boolean(i);try{var a=s.lastIndex;return s.lastIndex=0,RegExp.prototype.exec.call(s),!0}catch(e){}finally{s.lastIndex=a}return!1}function d(e,t){return l(e)===l(t)&&("number"===l(e)?!(!isNaN(e)||!isNaN(t))||1/e==1/0&&1/t==-1/0||1/e==-1/0&&1/t==1/0||e===t:function(e,t){return e===t}(e,t))}function g(e){if("symbol"===l(e))throw new TypeError("Cannot convert a Symbol value to a number");var t=Number(e);return isNaN(t)?0:1/t==1/0||1/t==-1/0||t===1/0||t===-1/0?t:(t<0?-1:1)*Math.floor(Math.abs(t))}function u(i){var n=arguments.length>1?arguments[1]:t;if("object"===l(i)){if(arguments.length<2)var c="default";else n===String?c="string":n===Number&&(c="number");var d="function"==typeof e.Symbol&&"symbol"==typeof e.Symbol.toPrimitive?r(i,e.Symbol.toPrimitive):t;if(d!==t){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(e,t){if("string"===t)var i=["toString","valueOf"];else i=["valueOf","toString"];for(var n=0;n<i.length;++n){var r=o(e,i[n]);if(a(r)){var c=s(r,e);if("object"!==l(c))return c}}throw new TypeError("Cannot convert to primitive.")}(i,c)}return i}function h(e){switch(l(e)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return h(u(e,String));default:return String(e)}}i(Array.prototype,"includes",function(e){var t=n(this),s=function(e){var t=g(e);return t<=0?0:Math.min(t,Math.pow(2,53)-1)}(o(t,"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(e,o(t,h(a))))return!0;a+=1}return!1}),i(String.prototype,"includes",function(e){var s=arguments.length>1?arguments[1]:t,i=h(function(e){if(null===e||e===t)throw TypeError(Object.prototype.toString.call(e)+" is not coercible to Object.");return e}(this));if(c(e))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=h(e),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||{}),e(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&e("html").addClass("dgwt-wcas-is-ios");var t=1==dgwt_wcas.show_details_box,s=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<s||"ontouchend"in document)&&(t=!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:t,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,mobileOverlayDelay:dgwt_wcas.mobile_overlay_delay,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)},e(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),e(window).on("load",function(){var t=0,s=setInterval(function(){var i=document.activeElement;if("object"==typeof i&&e(i).length&&e(i).hasClass("dgwt-wcas-search-input")){var o=e(i).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}t>10&&clearInterval(s),t++},500)}),e(document).ready(function(){setTimeout(function(){t(),s()},500)}),e(window).on("load",function(){setTimeout(function(){t(),s()},500),void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&e.each(elementorFrontend.documentsManager.documents,function(e,t){void 0!==t.getModal&&t.getModal&&t.getModal().on("show",function(){setTimeout(function(){s()},300)})})})}()});
1
+ !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}(function(e){"use strict";var t={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t.setAttribute("unselectable","on"),t},highlight:function(e,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(e,t){return t.length-e.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|^)"+t.escapeRegExChars(r.trim())+"\\s)";else l=1===r.trim().length&&o[i]===n?"((\\s|^)"+t.escapeRegExChars(r.trim())+")":"("+t.escapeRegExChars(r.trim())+")";e=e.replace(new RegExp(l,"gi"),"^^$1@@"),a=!0}}a&&(e=(e=e.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else l="("+t.escapeRegExChars(s)+")",e=e.replace(new RegExp(l,"gi"),"<strong>$1</strong>");return e},debounce:function(e,t){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void e();s.id=o,i=setTimeout(function(){o===s.id?(e(),s.id=""):clearTimeout(i)},t)},mouseHoverDebounce:function(t,s,i){var o;o=setTimeout(function(){e(s+":hover").length>0?t():clearTimeout(o)},i)},getActiveInstance:function(){var t,s=e(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return s.length>0&&s.each(function(){var s=e(this).find(".dgwt-wcas-search-input");if("object"==typeof s.data("autocomplete"))return t=s.data("autocomplete"),!1}),t},hashCode:function(e){for(var t=0,s=e.length;s>0;)t=(t<<5)-t+e.charCodeAt(--s)|0;return t<0?-1*t:t}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=e.noop;function d(t,s){this.element=t,this.el=e(t),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=e.extend(!0,{},d.defaults,s),this.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top",inputFilled:"dgwt-wcas-search-filled",darkenOverlayMounted:"js-dgwt-wcas-search-darkoverl-mounted"},this.hint=null,this.hintValue="",this.selection=null,this.overlayMobileState="off",this.overlayDarkenedState="off",this.isMouseDownOnSearchElements=!1,this.initialize(),this.setOptions(s)}d.utils=t,e.DgwtWcasAutocompleteSearch=d,d.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,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,dpusbBreakpoint:550,deferRequestBy:0,params:{},formatResult:function(e,s,i,o){if(!s)return e;i&&(e=t.highlight(e,s));if(!o.convertHtml)return e;return e.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|span))&gt;/g,"<$1>").replace(/&lt;(strong|span)\s+class\s*=\s*&quot;([^&]+)&quot;&gt;/g,'<$1 class="$2">')},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",darkenedOverlayClass:"dgwt-wcas-darkened-overlay",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(e,t,s){return-1!==e.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?JSON.parse(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(),s.positionOverlayDarkened()},e(window).on("resize.autocomplete",function(){var e=t.getActiveInstance();void 0!==e&&e.fixPositionCapture()});var i=e(window).width();e(window).on("resize.autocomplete",function(){var t=e(window).width();t!=i&&(s.toggleMobileMode(),i=t)}),s.isMobileMode()&&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(t){var s=this.options;0==e("."+s.containerClass).length?(this.suggestionsContainer=e(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")):this.suggestionsContainer=e("."+this.options.containerClass),this.canShowDetailsBox()&&(0==e("."+s.containerDetailsClass).length?(this.detailsContainer=e(d.utils.createNode(s.containerDetailsClass)),this.detailsContainer.appendTo(s.appendTo||"body"),this.detailsContainer.addClass("woocommerce")):this.detailsContainer=e("."+s.containerDetailsClass))},registerEventsSearchBar:function(){var s=this;e(document).on("click.autocomplete","."+s.options.closeTrigger,function(){t.getActiveInstance().close(!0)}),s.el.closest("."+s.options.formClass).on("submit.autocomplete",function(t){if(s.options.disableSubmit)return t.preventDefault(),!1;var i=e(this).find("."+s.options.searchInputClass);if(i.length&&0===i.val().length)return t.preventDefault(),!1;s.suggestions.length>0&&e.each(s.suggestions,function(e,i){if(void 0!==i.type&&"product_variation"==i.type)return s.select(e),t.preventDefault(),!1}),s.disableOverlayMobile()}),"complete"===document.readyState?s.positionPreloader():e(window).on("load",function(){s.positionPreloader()}),s.el.on("keydown.autocomplete",function(e){s.onKeyPress(e)}),s.el.on("keyup.autocomplete",function(e){s.onKeyUp(e)}),s.el.on("blur.autocomplete",function(){s.onBlur()}),s.el.on("focus.autocomplete",function(e){s.onFocus(e)}),s.el.on("change.autocomplete",function(e){s.onKeyUp(e)}),s.el.on("input.autocomplete",function(e){s.onKeyUp(e)})},registerEventsSuggestions:function(){var s="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){e(document).on("mouseenter.autocomplete",s,function(){var s=t.getActiveInstance();if(void 0!==s){var i=e(this).data("index"),o='.dgwt-wcas-suggestion[data-index="'+i+'"]',a=s.canShowDetailsBox()?100:1;s.selectedIndex!=i&&t.mouseHoverDebounce(function(){s.selectedIndex!==i&&(s.latestActivateSource="mouse",s.getDetails(s.suggestions[i]),s.activate(i))},o,a)}});var i=!1;e(document).on("click.autocomplete",s,function(s){if(i)s.preventDefault();else{var o=t.getActiveInstance();o.actionTriggerSource="click",i=!0,setTimeout(function(){i=!1},500),void 0!==s.ctrlKey&&!1!==s.ctrlKey||(o.select(e(this).data("index")),s.preventDefault())}}),e(document).on("mousedown.autocomplete",s,function(s){var o=this;0===s.button&&setTimeout(function(){i||t.getActiveInstance().select(e(o).data("index"))},250)}),e("."+this.options.containerClass).on("mousedown.autocomplete",function(e){t.getActiveInstance().isMouseDownOnSearchElements=!0})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(e(document).on("change.autocomplete",'[name="js-dgwt-wcas-quantity"]',function(t){e(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",e(this).val())}),e("."+this.options.containerDetailsClass).on("mousedown.autocomplete",function(e){t.getActiveInstance().isMouseDownOnSearchElements=!0}))},registerIconHandler:function(){var t=this,s=t.getFormWrapper(),i=s.find("."+t.options.formClass);s.on("click.autocomplete",".js-dgwt-wcas-search-icon-handler",function(e){var o=s.find("."+t.options.searchInputClass);if(s.hasClass("dgwt-wcas-layout-icon-open"))t.hide(),i.hide(!0),s.removeClass("dgwt-wcas-layout-icon-open");else{var a=s.find(".dgwt-wcas-search-icon-arrow");i.hide(),a.hide(),s.addClass("dgwt-wcas-layout-icon-open"),t.positionIconSearchMode(s),i.fadeIn(200,function(){a.show(),t.positionPreloader(s),o.focus()})}}),0==e(".js-dgwt-wcas-initialized").length&&e(".js-dgwt-wcas-search-icon-handler").length>0&&e(document).on("click.autocomplete",function(s){if(e(".dgwt-wcas-layout-icon-open").length){var i=e(s.target);i.closest("."+t.options.searchFormClass).length>0||i.closest("."+t.options.containerClass).length>0||i.closest("."+t.options.containerDetailsClass).length>0||t.hideIconModeSearch()}});var o=e(window).width();e(window).on("resize.autocomplete",function(){var s=e(window).width();s!=o&&(t.applyFlexibleMode(),o=s)}),"complete"==document.readyState?t.applyFlexibleMode():e(window).on("load.autocomplete",function(){t.applyFlexibleMode()})},registerEventsFixedMenu:function(){var t=this;e(window).on("scroll.autocomplete",function(){if(t.suggestions.length>0&&t.elementOrParentIsFixed(t.getFormWrapper()))if(0===e(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(e){setTimeout(function(){t.fixHeight(),t.fixPositionCapture()},e)})}else t.fixHeight(),t.fixPositionCapture()})},initMobileMode:function(){var e=this,t=e.getFormWrapper();t.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&!t.find(".js-dgwt-wcas-enable-mobile-form").length&&(t.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),t.find(".js-dgwt-wcas-enable-mobile-form").on("click.autocomplete",function(t){e.options.mobileOverlayDelay>0?setTimeout(function(){e.enableOverlayMobile()},e.options.mobileOverlayDelay):e.enableOverlayMobile()}))},destroyMobileMode:function(){var e=this.getFormWrapper(),t=(this.getSuggestionsContainer(),e.find(".js-dgwt-wcas-enable-mobile-form"));e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&t.length&&(this.disableOverlayMobile(),t.remove())},toggleMobileMode:function(){var e=this.getFormWrapper(),t="desktop";if(e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")){if(e.find(".js-dgwt-wcas-enable-mobile-form").length&&(t="mobile"),"desktop"===t&&this.isMobileMode()||"mobile"===t&&!this.isMobileMode()){var s=this.getSuggestionsContainer();this.close(!1),s.length&&s.html(""),this.hideIconModeSearch()}"desktop"===t&&this.isMobileMode()&&this.initMobileMode(),"mobile"!==t||this.isMobileMode()||this.destroyMobileMode()}},applyFlexibleMode:function(){var t=e(".js-dgwt-wcas-layout-icon-flexible");t.length&&(this.isMobileMode()?(t.addClass("js-dgwt-wcas-layout-icon"),t.addClass("dgwt-wcas-layout-icon")):(t.removeClass("js-dgwt-wcas-layout-icon"),t.removeClass("dgwt-wcas-layout-icon")),t.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(t){var s=this.getFormWrapper(),i=this.options;e("."+i.searchFormClass).removeClass("dgwt-wcas-active"),s.addClass("dgwt-wcas-active"),e("body").addClass("dgwt-wcas-focused"),s.addClass("dgwt-wcas-search-focused"),0==e(t.target).closest(".dgwt-wcas-search-wrapp-mobile").length&&this.enableOverlayDarkened(),this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var t=this.options,s=this.el.val(),i=this.getQuery(s);e("body").removeClass("dgwt-wcas-focused"),e("."+t.searchFormClass).removeClass("dgwt-wcas-search-focused"),this.isMobileMode()||this.isMouseDownOnSearchElements||(this.hide(),this.selection&&this.currentValue!==i&&(t.onInvalidateSelection||e.noop).call(this.element))},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(t){var s=this,i=s.getSuggestionsContainer(),o=e.extend({},s.options,t);(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","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(e){e&&this.clearCache(),this.currentValue="",this.suggestions=[]},close:function(e){var t=this.el.closest("."+this.options.searchFormClass).find("."+this.options.searchInputClass),s=this.getFormWrapper();this.hide(),this.clear(!1),this.hideCloseButton(),t.val(""),s.removeClass(this.classes.inputFilled),s.hasClass("js-dgwt-wcas-layout-icon")&&this.disableOverlayDarkened(),e&&t.focus()},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var e=this.getFormOffset();this.getSuggestionsContainer().css(e),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var t=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.getDetailsContainer(),o=this.getFormOffset();if(0==i.length)return!1;var a=o.left+s.outerWidth(!1);if(i.css({top:o.top,left:a}),e("body").removeClass("dgwt-wcas-full-width dgwt-wcas-details-outside dgwt-wcas-details-right dgwt-wcas-details-left dgwt-wcas-details-notfit"),t.outerWidth()>=this.options.dpusbBreakpoint)return e("body").addClass("dgwt-wcas-full-width"),void(!0===this.options.isRtl&&(a=o.left+i.outerWidth(!1),s.css("left",a),i.css("left",o.left)));var n=e(window).width(),r=i.outerWidth(),l=i.offset();e("body").addClass("dgwt-wcas-details-outside dgwt-wcas-details-right"),n<l.left+r&&(e("body").removeClass("dgwt-wcas-details-right"),e("body").addClass("dgwt-wcas-details-left"),a=s.offset().left-i.outerWidth(),i.css("left",a),l=i.offset()),l.left<1&&(e("body").removeClass("dgwt-wcas-details-left dgwt-wcas-details-right"),e("body").addClass("dgwt-wcas-details-notfit"))},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var e=this.getSuggestionsContainer(),t=this.getDetailsContainer();e.css("height","auto"),t.css("height","auto");var s=e.outerHeight(!1),i=t.outerHeight(!1);return e.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(e.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&t.css("height",s+"px"),s<i&&e.css("height",i+"px"),!1)},automaticAlignment:function(){var e=this,t=e.getFormWrapper().find(".dgwt-wcas-search-input"),s=e.getSuggestionsContainer(),i=e.getDetailsContainer();if(null==e.autoAligmentprocess){var o=[t.width(),s.height()];e.options.showDetailsPanel&&(o[2]=i.height()),e.autoAligmentprocess=setInterval(function(){var a=[t.width(),s.height()];e.options.showDetailsPanel&&(a[2]=i.height());for(var n=0;n<o.length;n++)if(o[n]!=a[n]){e.fixHeight(),e.fixPositionCapture(),o=a;break}e.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&e.fixHeight())},10)}},getFormElementInfo:function(){var e,t=this.getFormWrapper(),s={};return t.hasClass("js-dgwt-wcas-layout-icon")&&(t=t.find("."+this.options.formClass)),e=t.offset(),s.left=e.left,s.top=e.top,s.width=t.outerWidth(!1),s.height=t.outerHeight(!1),s.right=s.left+s.width,s.bottom=s.top+s.height,s},getFormOffset:function(){var t=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=t.find("."+this.options.formClass),o=this.el,a=o.offset().top,n=i.offset().left,r=this.options.orientation,l=t.outerHeight(!1),c=o.outerHeight(!1),d={top:a,left:n};if("auto"===r){var g=e(window).height(),u=e(window).scrollTop(),h=-u+a-l,p=u+g-(a+c+l);r=Math.max(h,p)===h?"top":"bottom"}if("top"===r){var w=o[0].getBoundingClientRect().top;s.css("height","auto"),w<s.height()&&s.height(w-10),d.top+=-s.outerHeight(!1)}else d.top+=c;return d},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getSuggestionsContainer:function(){return e("."+this.options.containerClass)},getDetailsContainer:function(){return e("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var e=this.getSuggestionsContainer();e[0].scrollTop=e[0].scrollHeight},isCursorAtEnd:function(){var e,t=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){if(this.disabled||this.visible||e.keyCode!==l||!this.currentValue){if(!this.disabled&&this.visible){switch(e.keyCode){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!this.options.disableSubmit&&void this.hide();this.actionTriggerSource="enter",this.select(this.selectedIndex);break;case n:this.moveUp();break;case l:this.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else this.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.keyCode){case n:case l:return}clearTimeout(t.onChangeTimeout),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeTimeout=setTimeout(function(){t.onValueChange()},t.options.deferRequestBy):t.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var t=this.options,s=this.el.val(),i=this.getQuery(s),o=this.getFormWrapper();this.selection&&this.currentValue!==i&&(this.selection=null,(t.onInvalidateSelection||e.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,t.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):(i.length>0?o.hasClass(this.classes.inputFilled)||o.addClass(this.classes.inputFilled):o.removeClass(this.classes.inputFilled),i.length<t.minChars?(this.hideCloseButton(),this.hide()):this.getSuggestions(i))}},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return e(window).width()<this.options.mobileBreakpoint},getQuery:function(t){var s,i=this.options.delimiter;return i?(s=t.split(i),e.trim(s[s.length-1])):t.trim()},getSuggestionsLocal:function(t){var s,i=this.options,o=t.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:e.grep(i.lookup,function(e){return a(e,t,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,e.isFunction(c.lookup)?c.lookup(i,function(e){l.suggestions=e.suggestions,l.suggest(),l.selectFirstSuggestion(e.suggestions),c.onSearchComplete.call(l.element,i,e.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(e.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+e.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},e.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,t.debounce(function(){var t=s.object,o=s.ajaxSettings;t.currentRequest=e.ajax(o).done(function(e){var s;t.currentRequest=null,void 0!==(s=t.options.transformResult(e,i)).suggestions&&(t.processResponse(s,i,n),t.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?t.gaEvent(i,"Autocomplete Search without results"):t.gaEvent(i,"Autocomplete Search with results")),t.fixPositionCapture(),t.options.onSearchComplete.call(t.element,i,s.suggestions),t.updatePrices()}).fail(function(e,s,o){t.options.onSearchError.call(t.element,i,e,s,o)})},c.debounceWaitMs))))},getDetails:function(t){var s=this;if(!s.canShowDetailsBox())return!1;if(null!=t&&void 0!==t.type&&("string"!=typeof t.type||"more_products"!==t.type)){s.fixHeight();s.getDetailsContainer();var i=s.prepareSuggestionObjectID(t);if(null!=s.cachedDetails[i])s.detailsPanelSetScene(i),s.fixHeight(),s.fixPositionCapture();else{var o={action:dgwt_wcas.action_result_details,items:[]};if(e.each(s.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type){var i={objectID:s.prepareSuggestionObjectID(t),value:null!=t.value?t.value:""};o.items.push(i)}}),s.detailsPanelClearScene(),s.preloader("show","details",""),-1!=e.inArray(i,s.detailsRequestsSent))return;s.detailsRequestsSent.push(i),e.ajax({data:o,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(e){var t="string"==typeof e?JSON.parse(e):e;if(void 0!==t.items)for(var i=0;i<t.items.length;i++){var o=t.items[i].objectID;s.cachedDetails[o]={html:t.items[i].html},s.detailsPanelAddToScene(o),void 0!==t.items[i].price&&t.items[i].price.length>0&&(s.cachedPrices[o]=t.items[i].price)}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(e,t){s.preloader("hide","details",""),s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight()}})}e(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},updatePrices:function(t){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(!t&&a.length>0){var r={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:a};e.ajax({data:r,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(e){if(void 0!==e.success&&e.success&&e.data.length>0)for(s=0;s<e.data.length;s++){var t=e.data[s].id,a=e.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==t){var n="product__"+t;o.cachedPrices[n]=a,o.updatePrice(i,a)}}},error:function(e,t){}})}}},updatePrice:function(t,s){if(void 0!==this.suggestions[t]){this.suggestions[t].price=s;var i=e(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+t+'"] .dgwt-wcas-sp');i.length&&i.html(s)}},applyCustomParams:function(e){if("object"==typeof dgwt_wcas.custom_params){var t=dgwt_wcas.custom_params;for(var s in t)e[s]=t[s]}var i=this.el.data("custom-params");if("object"==typeof i)for(var s in i)e[s]=i[s];return e},applyPreloaderForPrice:function(t){if(void 0!==this.suggestions[t]){var s=e(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+t+'"] .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(e){var t="";return void 0!==e&&void 0!==e.type&&(null!=e.post_id&&(t=e.type+"__"+e.post_id,"product_variation"===e.type&&(t+="__"+e.variation_id),void 0!==e.post_type&&(t=e.type+"__"+e.post_id+"__"+e.post_type)),null!=e.term_id&&null!=e.taxonomy&&(t=e.type+"__"+e.term_id+"__"+e.taxonomy)),t},detailsPanelSetScene:function(e){var s=this.getDetailsContainer(),i=t.hashCode(e),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(e){var s=this.getDetailsContainer(),i=this.cachedDetails[e],o=t.hashCode(e),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 e=this.getDetailsContainer().find(".dgwt-wcas-details-inner");e.length&&e.removeClass("dgwt-wcas-details-inner-active")},selectFirstSuggestion:function(t){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=t&&t.length>0&&e.each(this.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type&&"no-results"!=t.type)return s=e,!1;void 0!==t.type&&"no-results"!==t.type||(i=!0)}),i||(this.latestActivateSource="system",this.getDetails(t[s]),this.activate(s)))},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,s=t.length;s--;)if(0===e.indexOf(t[s]))return!0;return!1},hide:function(t){this.getFormWrapper();var s=this.getSuggestionsContainer(),i=this.getDetailsContainer();e.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(),e("body").removeClass("dgwt-wcas-open"),e("body").removeClass("dgwt-wcas-block-scroll"),e("body").removeClass("dgwt-wcas-is-details"),e("body").removeClass("dgwt-wcas-full-width"),e("body").removeClass("dgwt-wcas-nores"),e("body").removeClass("dgwt-wcas-details-outside"),e("body").removeClass("dgwt-wcas-details-right"),e("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),this.isMouseDownOnSearchElements=!1,"boolean"==typeof t&&t&&(this.hideCloseButton(),this.currentValue="",this.suggestions=[]),this.signalHint(null)},positionIconSearchMode:function(t){var s=-20,i=t.find("."+this.options.formClass),o=i.width(),a=e(window).width(),n=t[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 t=e(".dgwt-wcas-layout-icon-open");t.length>0&&t.removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var t=this;t.isMobileMode()||e(document).mouseup(function(s){if(t.visible){t.getSuggestionsContainer(),t.getDetailsContainer();var i=!(e(s.target).closest("."+t.options.searchFormClass).length>0||e(s.target).hasClass(t.options.searchFormClass)),o=!(e(s.target).closest("."+t.options.containerClass).length>0||e(s.target).hasClass(t.options.containerClass));if(t.canShowDetailsBox()){var a=!(e(s.target).closest("."+t.options.containerDetailsClass).length>0||e(s.target).hasClass(t.options.containerDetailsClass));i&&o&&a&&t.hide()}else i&&o&&t.hide()}})},suggest:function(){if(this.suggestions.length){var t,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=e(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(e("body").removeClass("dgwt-wcas-nores"),e.each(s.suggestions,function(l,c){var d="",g=!1,u="string"==typeof c.url&&c.url.length?c.url:"#";if(o&&(h+=function(e,s){var i=e.data[o];return t===i?"":'<div class="autocomplete-group"><strong>'+(t=i)+"</strong></div>"}(c,0)),void 0===c.type||"product"!=c.type&&"product_variation"!=c.type){var p,w=r,f="dgwt-wcas-st",m="",v="",b="",y=!0;"product_cat"===c.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>"),void 0!==c.breadcrumbs&&c.breadcrumbs&&(b=c.breadcrumbs+" &gt; "+c.value,v+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+c.breadcrumbs+"</span>")):"product_tag"===c.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&c.taxonomy===i.taxonomyBrands?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"taxonomy"===c.type?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tax-"+c.taxonomy,i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"vendor"===c.type?(w+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):i.isPremium&&"post"===c.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===c.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===c.type?(w+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",f="dgwt-wcas-st-more",c.value=dgwt_wcas.labels.show_more+" ("+c.total+")",y=!1):i.showHeadings&&"headline"===c.type?(w+=" 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"]),y=!1):(w+=" dgwt-wcas-suggestion-nores",c.value=dgwt_wcas.labels.no_results,y=!1,!0===i.showDetailsPanel&&s.detailsPanelClearScene(),e("body").addClass("dgwt-wcas-nores")),void 0!==c.image_src&&c.image_src&&(p=!0),b=b.length>0?' title="'+b+'"':"",h+='<a href="'+u+'" class="'+w+'" data-index="'+l+'">',p&&(h+='<span class="dgwt-wcas-si"><img src="'+c.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+b+' class="'+f+'">',"vendor"===c.type?(h+='<span class="dgwt-wcas-st-title">'+m+a(c.value,n,y,i)+v+"</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+=m+a(c.value,n,y,i)+v,h+="</span>",h+=p?"</div>":"",h+="</a>"}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+='<a href="'+u+'" 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+='<div class="dgwt-wcas-st">',void 0!==c.title_before&&c.title_before&&(h+=c.title_before),h+='<span class="dgwt-wcas-st-title">'+a(c.value,n,!0,i)+"</span>",void 0!==c.title_after&&c.title_after&&(h+=c.title_after),!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 _='<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+='<span class="dgwt-wcas-product-vendor-link" data-url="'+c.vendor_url+'">'+_+"</span>":h+=_}void 0!==c.content_after&&c.content_after&&(h+=c.content_after),h+="</div>";var x=!0===i.showPrice&&void 0!==c.price,S=void 0!==c.meta_before,D=void 0!==c.meta_after,j=x||S||D;h+=j?'<div class="dgwt-wcas-meta">':"",S&&(h+=c.meta_before),x&&(h+='<span class="dgwt-wcas-sp">'+c.price+"</span>"),D&&(h+=c.meta_after),h+=j?"</div>":"",h+=g?"</div>":"",h+="</a>"}}),this.adjustContainerWidth(),g.detach(),c.html(h),e.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),e("body").addClass("dgwt-wcas-open"),s.isMouseDownOnSearchElements=!1,s.automaticAlignment(),!0===i.showDetailsPanel&&(e("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),e("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var e=this.getFormWrapper(),t=this.getSuggestionsContainer(),s=this.getDetailsContainer(),i=e.find("."+this.options.formClass).outerWidth();if(e.length&&(t.css("width",i+"px"),this.canShowDetailsBox()&&i>=this.options.dpusbBreakpoint)){var o;t.css("width",i/2),s.css("width",i/2),0!=(o=i-(t.outerWidth()+s.outerWidth()))&&s.css("width",s.outerWidth()+o)}},positionPreloader:function(t){var s="object"==typeof t?t.find(".dgwt-wcas-search-submit"):e(".dgwt-wcas-search-submit");s.length>0&&s.each(function(){var t=e(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?t.css("left",6+e(this).outerWidth()+"px"):t.css("right",e(this).outerWidth()+"px")})},findBestHint:function(){var t=this.el.val().toLowerCase(),s=null;t&&(e.each(this.suggestions,function(e,i){var o=0===i.value.toLowerCase().indexOf(t);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(t){var s="";t&&(s=this.currentValue+t.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=t,(this.options.onHint||e.noop)(s))},preloader:function(e,t,s){var i,o,a="dgwt-wcas-preloader-wrapp",n=null==s?a:a+" "+s;if("form"===t){if(1!=dgwt_wcas.show_preloader)return;o=this.getFormWrapper().find(".dgwt-wcas-preloader")}else"details"===t&&(o=this.getDetailsContainer());if(0!=o.length)if("form"!==t){var r=o.find("."+a);if("hide"!==e){if("show"===e){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"===e?(o.removeClass(s),o.html("")):(o.addClass(s),"string"==typeof dgwt_wcas.preloader_icon&&o.html(dgwt_wcas.preloader_icon))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,function(e){return{value:e,data:null}}):t},validateOrientation:function(t,s){return t=e.trim(t||"").toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=s),t},processResponse:function(e,t,s){var i=this.options;e.suggestions=this.verifySuggestionsFormat(e.suggestions),i.noCache||(this.cachedResponse[s]=e,i.preventBadQueries&&!e.suggestions.length&&this.badQueries.push(t)),t===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&e.suggestions.reverse(),this.suggestions=e.suggestions,this.suggest())},activate:function(t){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=t,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),e(s).addClass(i),s):null},selectHint:function(){var t=e.inArray(this.hint,this.suggestions);this.select(t)},select:function(e){this.options.disableHits||(this.disableOverlayMobile(),this.hide(),this.onSelect(e))},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(t,s){if("headline"===this.suggestions[t].type&&(t="down"===s?t+1:t-1),void 0!==this.suggestions[t]){var i=this.activate(t);if(this.getDetails(this.suggestions[t]),"more_products"!==this.suggestions[t].type&&i&&!this.canShowDetailsBox()){var o,a,n,r=this.getSuggestionsContainer(),l=e(i).outerHeight(!1);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(t){var s=this.options.onSelect,i=this.suggestions[t];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.replace(/(<([^>]+)>)/gi," ").replace(/\s\s+/g," ")),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,e.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(e){var t,s,i=this.options.delimiter;return i?1===(s=(t=this.currentValue).split(i)).length?e:t.substr(0,t.length-s[s.length-1].length)+e:e},dispose:function(){var t=this.el,s=this.getFormWrapper(),i=this.getSuggestionsContainer(),o=(this.getDetailsContainer(),t.closest("."+this.options.formClass),s.find(".js-dgwt-wcas-enable-mobile-form"));s.length&&s.find("*").each(function(){e(this).off(".autocomplete")});t.removeData("autocomplete"),e(window).off("resize.autocomplete",this.fixPositionCapture),s.removeClass("dgwt-wcas-active"),this.close(!1),o.length&&o.remove(),i.length&&i.html("")},isMountedOverlayDarkened:function(){var e=!1;return this.getFormWrapper().hasClass(this.classes.darkenOverlayMounted)&&(e=!0),e},enableOverlayDarkened:function(){var t=this,s=t.options;if(t.isMountedOverlayDarkened()){if(t.getFormWrapper().addClass("dgwt-wcas-search-darkoverl-on"),e("body").addClass("dgwt-wcas-darkoverl-on"),0==e("."+s.darkenedOverlayClass).length){var i='<div class="'+s.darkenedOverlayClass+'"><div></div><div></div><div></div><div></div></div>';e("body").append(i);var o=e("."+t.options.darkenedOverlayClass);t.positionOverlayDarkened(),o.on("click.autocomplete",function(e){t.disableOverlayDarkened()})}t.overlayDarkenedState="on"}},disableOverlayDarkened:function(){var t,s=this.options;if(this.isMountedOverlayDarkened()){(t=e(".dgwt-wcas-search-darkoverl-on")).length&&t.removeClass("dgwt-wcas-search-darkoverl-on"),e("body").removeClass("dgwt-wcas-darkoverl-on");var i=e("."+s.darkenedOverlayClass);i.length>0&&(i.remove(),this.overlayDarkenedState="off")}},positionOverlayDarkened:function(){var t=this,s=e("."+t.options.darkenedOverlayClass);s.length>0&&s.children("div").each(function(s){t.positionOverlayDarkenedDiv(e(this),s+1)})},positionOverlayDarkenedDiv:function(t,s){var i,o=this.getFormElementInfo();switch(s){case 1:i={left:"-200px",top:"-200px",width:o.left+200+"px",height:e(document).outerHeight(!1)+200-1+"px"};break;case 2:i={left:"-200px",top:"-200px",width:e(window).outerWidth(!1)+200+"px",height:o.top+200+"px"};break;case 3:i={left:o.left+o.width+"px",top:"-200px",width:e(window).outerWidth(!1)-o.right+"px",height:e(document).outerHeight(!1)+200-1+"px"};break;case 4:i={left:"-200px",top:o.top+o.height+"px",width:e(window).outerWidth(!1)+200+"px",height:e(document).outerHeight(!1)-o.bottom-1+"px"}}i&&t.css(i)},enableOverlayMobile:function(){var t=this;if("on"!==t.overlayMobileState){t.overlayMobileState="on";var s,i=t.getFormWrapper(),o=t.getSuggestionsContainer(),a="";e("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>",e(t.options.mobileOverlayWrapper).append(a),(s=e(".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("."+t.options.searchInputClass).focus(),e(document).on("click.autocomplete",".js-dgwt-wcas-om-return",function(e){t.disableOverlayMobile(s)})}},disableOverlayMobile:function(t){var s=this;if(e("html").hasClass("dgwt-wcas-overlay-mobile-on")){var i=s.getSuggestionsContainer(),o=e(".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"),e("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),e(".js-dgwt-wcas-om-hook").after(o),e(".js-dgwt-wcas-overlay-mobile").remove(),e(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var e=o.find(".dgwt-wcas-close");o.length>0&&(e.removeClass("dgwt-wcas-close"),e.html("")),s.hide()},150),s.overlayMobileState="off"}else s.overlayMobileState="off"},showCloseButton:function(){var e=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",t=this.getFormWrapper().find("."+this.options.preloaderClass);t.addClass(this.options.closeTrigger),t.html(e)},hideCloseButton:function(){var e=this.getFormWrapper().find("."+this.options.closeTrigger);e.length&&(e.removeClass(this.options.closeTrigger),e.html(""))},elementOrParentIsFixed:function(t){var s=t.add(t.parents()),i=!1;return s.each(function(){if("fixed"===e(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,s){var i=!(!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:s});else if(!1!==i){var o=i.getAll()[0];o&&o.send({hitType:"event",eventCategory:s,eventAction:"autocomplete_search",eventLabel:t})}}catch(e){}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!==i){var a=i.getAll()[0];a&&(a.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),a.send("pageview"))}}catch(e){}e(document).trigger("dgwtWcasGAEvent",{term:t,category:s})}},e.fn.dgwtWcasAutocomplete=function(t,s){return arguments.length?this.each(function(){var i=e(this),o=i.data("autocomplete");"string"==typeof t?o&&"function"==typeof o[t]&&o[t](s):(o&&o.dispose&&o.dispose(),o=new d(this,t),i.data("autocomplete",o))}):this.first().data("autocomplete")},e.fn.autocomplete||(e.fn.autocomplete=e.fn.dgwtWcasAutocomplete),function(){function t(){var t=e(".dgwt-wcas-search-input"),s=[];t.length>1&&t.each(function(){var t=e(this).attr("id");if(-1==e.inArray(t,s))s.push(t);else{var i=Math.random().toString(36).substring(2,6);i="dgwt-wcas-search-input-"+i,e(this).attr("id",i),e(this).closest("form").find("label").attr("for",i)}})}function s(){var t=e(".dgwt-wcas-search-input");t.length>0&&t.each(function(){"object"!=typeof e(this).data("autocomplete")&&e(this).dgwtWcasAutocomplete(window.dgwt_wcas.config)})}navigator.userAgent.match(/Trident\/7\./)&&function(e,t){function s(e,t){var s=arguments.length>2?arguments[2]:[];if(!1===a(e))throw new TypeError(Object.prototype.toString.call(e)+"is not a function.");return e.apply(t,s)}function i(e,t,s){var i={value:s,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,t,i)}function o(e,t){return e[t]}function a(e){return"function"==typeof e}function n(e){if(null===e||e===t)throw TypeError();return Object(e)}function r(e,s){var i=function(e,t){return n(e)[t]}(e,s);if(null===i||i===t)return t;if(!1===a(i))throw new TypeError("Method not callable: "+s);return i}function l(t){switch(typeof t){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===t?"null":"Symbol"in e&&(t instanceof e.Symbol||t.constructor===e.Symbol)?"symbol":"object"}}function c(s){if("object"!==l(s))return!1;var i="Symbol"in e&&"match"in e.Symbol?o(s,e.Symbol.match):t;if(i!==t)return Boolean(i);try{var a=s.lastIndex;return s.lastIndex=0,RegExp.prototype.exec.call(s),!0}catch(e){}finally{s.lastIndex=a}return!1}function d(e,t){return l(e)===l(t)&&("number"===l(e)?!(!isNaN(e)||!isNaN(t))||1/e==1/0&&1/t==-1/0||1/e==-1/0&&1/t==1/0||e===t:function(e,t){return e===t}(e,t))}function g(e){if("symbol"===l(e))throw new TypeError("Cannot convert a Symbol value to a number");var t=Number(e);return isNaN(t)?0:1/t==1/0||1/t==-1/0||t===1/0||t===-1/0?t:(t<0?-1:1)*Math.floor(Math.abs(t))}function u(i){var n=arguments.length>1?arguments[1]:t;if("object"===l(i)){if(arguments.length<2)var c="default";else n===String?c="string":n===Number&&(c="number");var d="function"==typeof e.Symbol&&"symbol"==typeof e.Symbol.toPrimitive?r(i,e.Symbol.toPrimitive):t;if(d!==t){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(e,t){if("string"===t)var i=["toString","valueOf"];else i=["valueOf","toString"];for(var n=0;n<i.length;++n){var r=o(e,i[n]);if(a(r)){var c=s(r,e);if("object"!==l(c))return c}}throw new TypeError("Cannot convert to primitive.")}(i,c)}return i}function h(e){switch(l(e)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return h(u(e,String));default:return String(e)}}i(Array.prototype,"includes",function(e){var t=n(this),s=function(e){var t=g(e);return t<=0?0:Math.min(t,Math.pow(2,53)-1)}(o(t,"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(e,o(t,h(a))))return!0;a+=1}return!1}),i(String.prototype,"includes",function(e){var s=arguments.length>1?arguments[1]:t,i=h(function(e){if(null===e||e===t)throw TypeError(Object.prototype.toString.call(e)+" is not coercible to Object.");return e}(this));if(c(e))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=h(e),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||{}),e(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&e("html").addClass("dgwt-wcas-is-ios");var t=1==dgwt_wcas.show_details_box,s=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<s||"ontouchend"in document)&&(t=!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:t,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,mobileOverlayDelay:dgwt_wcas.mobile_overlay_delay,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)},e(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),e(window).on("load",function(){var t=0,s=setInterval(function(){var i=document.activeElement;if("object"==typeof i&&e(i).length&&e(i).hasClass("dgwt-wcas-search-input")){var o=e(i).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}t>10&&clearInterval(s),t++},500)}),e(document).ready(function(){setTimeout(function(){t(),s()},500)}),e(window).on("load",function(){setTimeout(function(){t(),s()},500),void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&e.each(elementorFrontend.documentsManager.documents,function(e,t){void 0!==t.getModal&&t.getModal&&t.getModal().on("show",function(){setTimeout(function(){s()},300)})})}),e(document.body).on("added_to_cart",function(){e(document.body).hasClass("woocommerce-checkout")&&e(".dgwt-wcas-search-input").length>0&&e(document.body).trigger("update_checkout")})}()});
fs/lib/includes/class-freemius.php CHANGED
@@ -3550,6 +3550,8 @@
3550
  * @since 1.1.7.3
3551
  */
3552
  static function _toggle_debug_mode() {
 
 
3553
  if ( ! is_super_admin() ) {
3554
  return;
3555
  }
@@ -3571,10 +3573,19 @@
3571
  * @since 1.2.1.6
3572
  */
3573
  static function _get_debug_log() {
 
 
 
 
 
 
 
 
 
3574
  $logs = FS_Logger::load_db_logs(
3575
  fs_request_get( 'filters', false, 'post' ),
3576
- ! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? $_POST['limit'] : 200,
3577
- ! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? $_POST['offset'] : 0
3578
  );
3579
 
3580
  self::shoot_ajax_success( $logs );
@@ -4447,6 +4458,12 @@
4447
  * @since 1.0.9
4448
  */
4449
  function _email_about_firewall_issue() {
 
 
 
 
 
 
4450
  $this->_admin_notices->remove_sticky( 'failed_connect_api' );
4451
 
4452
  $pong = $this->ping();
@@ -4521,6 +4538,12 @@
4521
  * @since 1.1.7.4
4522
  */
4523
  function _retry_connectivity_test() {
 
 
 
 
 
 
4524
  $this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
4525
 
4526
  $pong = $this->ping();
3550
  * @since 1.1.7.3
3551
  */
3552
  static function _toggle_debug_mode() {
3553
+ check_admin_referer( 'fs_toggle_debug_mode' );
3554
+
3555
  if ( ! is_super_admin() ) {
3556
  return;
3557
  }
3573
  * @since 1.2.1.6
3574
  */
3575
  static function _get_debug_log() {
3576
+ check_admin_referer( 'fs_get_debug_log' );
3577
+
3578
+ if ( ! is_super_admin() ) {
3579
+ return;
3580
+ }
3581
+
3582
+ $limit = min( ! empty( $_POST['limit'] ) ? absint( $_POST['limit'] ) : 200, 200 );
3583
+ $offset = min( ! empty( $_POST['offset'] ) ? absint( $_POST['offset'] ) : 200, 200 );
3584
+
3585
  $logs = FS_Logger::load_db_logs(
3586
  fs_request_get( 'filters', false, 'post' ),
3587
+ $limit,
3588
+ $offset
3589
  );
3590
 
3591
  self::shoot_ajax_success( $logs );
4458
  * @since 1.0.9
4459
  */
4460
  function _email_about_firewall_issue() {
4461
+ check_admin_referer( 'fs_resolve_firewall_issues' );
4462
+
4463
+ if ( ! current_user_can( is_multisite() ? 'manage_options' : 'activate_plugins' ) ) {
4464
+ return;
4465
+ }
4466
+
4467
  $this->_admin_notices->remove_sticky( 'failed_connect_api' );
4468
 
4469
  $pong = $this->ping();
4538
  * @since 1.1.7.4
4539
  */
4540
  function _retry_connectivity_test() {
4541
+ check_admin_referer( 'fs_retry_connectivity_test' );
4542
+
4543
+ if ( ! current_user_can( is_multisite() ? 'manage_options' : 'activate_plugins' ) ) {
4544
+ return;
4545
+ }
4546
+
4547
  $this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
4548
 
4549
  $pong = $this->ping();
fs/lib/includes/managers/class-fs-admin-notice-manager.php CHANGED
@@ -175,7 +175,12 @@
175
  *
176
  */
177
  function dismiss_notice_ajax_callback() {
178
- $this->_sticky_storage->remove( $_POST['message_id'] );
 
 
 
 
 
179
  wp_die();
180
  }
181
 
@@ -469,4 +474,4 @@
469
  }
470
 
471
  #endregion
472
- }
175
  *
176
  */
177
  function dismiss_notice_ajax_callback() {
178
+ check_admin_referer( 'fs_dismiss_notice_action' );
179
+
180
+ if ( ! is_numeric( $_POST['message_id'] ) ) {
181
+ $this->_sticky_storage->remove( $_POST['message_id'] );
182
+ }
183
+
184
  wp_die();
185
  }
186
 
474
  }
475
 
476
  #endregion
477
+ }
fs/lib/includes/managers/class-fs-key-value-storage.php CHANGED
@@ -298,7 +298,6 @@
298
  return $this->get( $k, null );
299
  }
300
 
301
- #[ReturnTypeWillChange]
302
  function offsetSet( $k, $v ) {
303
  if ( is_null( $k ) ) {
304
  throw new Exception( 'Can\'t append value to request params.' );
@@ -307,17 +306,14 @@
307
  }
308
  }
309
 
310
- #[ReturnTypeWillChange]
311
  function offsetExists( $k ) {
312
  return array_key_exists( $k, $this->_data );
313
  }
314
 
315
- #[ReturnTypeWillChange]
316
  function offsetUnset( $k ) {
317
  unset( $this->$k );
318
  }
319
 
320
- #[ReturnTypeWillChange]
321
  function offsetGet( $k ) {
322
  return $this->get( $k, null );
323
  }
@@ -329,7 +325,6 @@
329
  * @link http://php.net/manual/en/iterator.current.php
330
  * @return mixed Can return any type.
331
  */
332
- #[ReturnTypeWillChange]
333
  public function current() {
334
  return current( $this->_data );
335
  }
@@ -341,7 +336,6 @@
341
  * @link http://php.net/manual/en/iterator.next.php
342
  * @return void Any returned value is ignored.
343
  */
344
- #[ReturnTypeWillChange]
345
  public function next() {
346
  next( $this->_data );
347
  }
@@ -353,7 +347,6 @@
353
  * @link http://php.net/manual/en/iterator.key.php
354
  * @return mixed scalar on success, or null on failure.
355
  */
356
- #[ReturnTypeWillChange]
357
  public function key() {
358
  return key( $this->_data );
359
  }
@@ -366,7 +359,6 @@
366
  * @return boolean The return value will be casted to boolean and then evaluated.
367
  * Returns true on success or false on failure.
368
  */
369
- #[ReturnTypeWillChange]
370
  public function valid() {
371
  $key = key( $this->_data );
372
 
@@ -380,7 +372,6 @@
380
  * @link http://php.net/manual/en/iterator.rewind.php
381
  * @return void Any returned value is ignored.
382
  */
383
- #[ReturnTypeWillChange]
384
  public function rewind() {
385
  reset( $this->_data );
386
  }
@@ -395,8 +386,7 @@
395
  * <p>
396
  * The return value is cast to an integer.
397
  */
398
- #[ReturnTypeWillChange]
399
  public function count() {
400
  return count( $this->_data );
401
  }
402
- }
298
  return $this->get( $k, null );
299
  }
300
 
 
301
  function offsetSet( $k, $v ) {
302
  if ( is_null( $k ) ) {
303
  throw new Exception( 'Can\'t append value to request params.' );
306
  }
307
  }
308
 
 
309
  function offsetExists( $k ) {
310
  return array_key_exists( $k, $this->_data );
311
  }
312
 
 
313
  function offsetUnset( $k ) {
314
  unset( $this->$k );
315
  }
316
 
 
317
  function offsetGet( $k ) {
318
  return $this->get( $k, null );
319
  }
325
  * @link http://php.net/manual/en/iterator.current.php
326
  * @return mixed Can return any type.
327
  */
 
328
  public function current() {
329
  return current( $this->_data );
330
  }
336
  * @link http://php.net/manual/en/iterator.next.php
337
  * @return void Any returned value is ignored.
338
  */
 
339
  public function next() {
340
  next( $this->_data );
341
  }
347
  * @link http://php.net/manual/en/iterator.key.php
348
  * @return mixed scalar on success, or null on failure.
349
  */
 
350
  public function key() {
351
  return key( $this->_data );
352
  }
359
  * @return boolean The return value will be casted to boolean and then evaluated.
360
  * Returns true on success or false on failure.
361
  */
 
362
  public function valid() {
363
  $key = key( $this->_data );
364
 
372
  * @link http://php.net/manual/en/iterator.rewind.php
373
  * @return void Any returned value is ignored.
374
  */
 
375
  public function rewind() {
376
  reset( $this->_data );
377
  }
386
  * <p>
387
  * The return value is cast to an integer.
388
  */
 
389
  public function count() {
390
  return count( $this->_data );
391
  }
392
+ }
fs/lib/includes/sdk/Exceptions/ArgumentNotExistException.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
3
  exit;
4
  }
@@ -6,4 +10,4 @@
6
  if ( ! class_exists( 'Freemius_ArgumentNotExistException' ) ) {
7
  class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException {
8
  }
9
- }
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
  if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
7
  exit;
8
  }
10
  if ( ! class_exists( 'Freemius_ArgumentNotExistException' ) ) {
11
  class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException {
12
  }
13
+ }
fs/lib/includes/sdk/Exceptions/EmptyArgumentException.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
3
  exit;
4
  }
@@ -6,4 +10,4 @@
6
  if ( ! class_exists( 'Freemius_EmptyArgumentException' ) ) {
7
  class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException {
8
  }
9
- }
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
  if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
7
  exit;
8
  }
10
  if ( ! class_exists( 'Freemius_EmptyArgumentException' ) ) {
11
  class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException {
12
  }
13
+ }
fs/lib/includes/sdk/Exceptions/Exception.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  if ( ! class_exists( 'Freemius_Exception' ) ) {
3
  /**
4
  * Thrown when an API call returns an exception.
@@ -71,4 +75,4 @@
71
  return $str . $this->getMessage();
72
  }
73
  }
74
- }
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
  if ( ! class_exists( 'Freemius_Exception' ) ) {
7
  /**
8
  * Thrown when an API call returns an exception.
75
  return $str . $this->getMessage();
76
  }
77
  }
78
+ }
fs/lib/includes/sdk/Exceptions/InvalidArgumentException.php CHANGED
@@ -1,8 +1,12 @@
1
  <?php
 
 
 
 
2
  if ( ! class_exists( 'Freemius_Exception' ) ) {
3
  exit;
4
  }
5
 
6
  if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
7
  class Freemius_InvalidArgumentException extends Freemius_Exception { }
8
- }
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
  if ( ! class_exists( 'Freemius_Exception' ) ) {
7
  exit;
8
  }
9
 
10
  if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
11
  class Freemius_InvalidArgumentException extends Freemius_Exception { }
12
+ }
fs/lib/includes/sdk/Exceptions/OAuthException.php CHANGED
@@ -1,4 +1,8 @@
1
  <?php
 
 
 
 
2
  if ( ! class_exists( 'Freemius_Exception' ) ) {
3
  exit;
4
  }
@@ -9,4 +13,4 @@
9
  parent::__construct( $pResult );
10
  }
11
  }
12
- }
1
  <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
  if ( ! class_exists( 'Freemius_Exception' ) ) {
7
  exit;
8
  }
13
  parent::__construct( $pResult );
14
  }
15
  }
16
+ }
fs/lib/includes/sdk/FreemiusBase.php CHANGED
@@ -15,6 +15,10 @@
15
  * under the License.
16
  */
17
 
 
 
 
 
18
  if ( ! defined( 'FS_API__VERSION' ) ) {
19
  define( 'FS_API__VERSION', '1' );
20
  }
15
  * under the License.
16
  */
17
 
18
+ if ( ! defined( 'ABSPATH' ) ) {
19
+ exit;
20
+ }
21
+
22
  if ( ! defined( 'FS_API__VERSION' ) ) {
23
  define( 'FS_API__VERSION', '1' );
24
  }
fs/lib/includes/sdk/FreemiusWordPress.php CHANGED
@@ -14,6 +14,9 @@
14
  * License for the specific language governing permissions and limitations
15
  * under the License.
16
  */
 
 
 
17
 
18
  require_once dirname( __FILE__ ) . '/FreemiusBase.php';
19
 
@@ -709,4 +712,4 @@
709
  }
710
 
711
  #endregion
712
- }
14
  * License for the specific language governing permissions and limitations
15
  * under the License.
16
  */
17
+ if ( ! defined( 'ABSPATH' ) ) {
18
+ exit;
19
+ }
20
 
21
  require_once dirname( __FILE__ ) . '/FreemiusBase.php';
22
 
712
  }
713
 
714
  #endregion
715
+ }
fs/lib/languages/freemius-ru_RU.mo CHANGED
Binary file
fs/lib/require.php CHANGED
@@ -6,6 +6,10 @@
6
  * @since 1.1.9
7
  */
8
 
 
 
 
 
9
  // Configuration should be loaded first.
10
  require_once dirname( __FILE__ ) . '/config.php';
11
  require_once WP_FS__DIR_INCLUDES . '/fs-core-functions.php';
@@ -46,4 +50,4 @@
46
  require_once WP_FS__DIR_INCLUDES . '/class-fs-admin-notices.php';
47
  require_once WP_FS__DIR_INCLUDES . '/class-freemius-abstract.php';
48
  require_once WP_FS__DIR_INCLUDES . '/sdk/Exceptions/Exception.php';
49
- require_once WP_FS__DIR_INCLUDES . '/class-freemius.php';
6
  * @since 1.1.9
7
  */
8
 
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
  // Configuration should be loaded first.
14
  require_once dirname( __FILE__ ) . '/config.php';
15
  require_once WP_FS__DIR_INCLUDES . '/fs-core-functions.php';
50
  require_once WP_FS__DIR_INCLUDES . '/class-fs-admin-notices.php';
51
  require_once WP_FS__DIR_INCLUDES . '/class-freemius-abstract.php';
52
  require_once WP_FS__DIR_INCLUDES . '/sdk/Exceptions/Exception.php';
53
+ require_once WP_FS__DIR_INCLUDES . '/class-freemius.php';
fs/lib/start.php CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @var string
17
  */
18
- $this_sdk_version = '2.4.2';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
15
  *
16
  * @var string
17
  */
18
+ $this_sdk_version = '2.4.3';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
fs/lib/templates/account/partials/addon.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  /**
3
  * @var array $VARS
4
  * @var Freemius $fs
@@ -443,4 +448,4 @@
443
  </td>
444
  <!--/ Optional Delete Action -->
445
  <?php endif ?>
446
- </tr>
1
  <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
  /**
8
  * @var array $VARS
9
  * @var Freemius $fs
448
  </td>
449
  <!--/ Optional Delete Action -->
450
  <?php endif ?>
451
+ </tr>
fs/lib/templates/ajax-loader.php CHANGED
@@ -1 +1,6 @@
1
- <div class="fs-ajax-loader" style="display: none"><?php for ( $i = 1; $i <= 8; $i ++ ) : ?><div class="fs-ajax-loader-bar fs-ajax-loader-bar-<?php echo $i ?>"></div><?php endfor ?></div>
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+ ?>
6
+ <div class="fs-ajax-loader" style="display: none"><?php for ( $i = 1; $i <= 8; $i ++ ) : ?><div class="fs-ajax-loader-bar fs-ajax-loader-bar-<?php echo $i ?>"></div><?php endfor ?></div>
fs/lib/templates/debug.php CHANGED
@@ -37,6 +37,8 @@
37
 
38
  $.post( ajaxurl, {
39
  action: 'fs_toggle_debug_mode',
 
 
40
  is_on : ($(this).hasClass( 'fs-on' ) ? 1 : 0)
41
  }, function ( response ) {
42
  if ( 1 == response ) {
@@ -111,7 +113,8 @@
111
  if (optionName) {
112
  $.post(ajaxurl, {
113
  action : 'fs_get_db_option',
114
- _wpnonce : '<?php echo wp_create_nonce( 'fs_get_db_option' ) ?>',
 
115
  option_name: optionName
116
  }, function (response) {
117
  if (response.data.value)
@@ -131,7 +134,8 @@
131
  if (optionValue) {
132
  $.post(ajaxurl, {
133
  action : 'fs_set_db_option',
134
- _wpnonce : '<?php echo wp_create_nonce( 'fs_set_db_option' ) ?>',
 
135
  option_name : optionName,
136
  option_value: optionValue
137
  }, function () {
@@ -724,6 +728,8 @@
724
 
725
  $.post(ajaxurl, {
726
  action : 'fs_get_debug_log',
 
 
727
  filters: filters,
728
  offset : offset,
729
  limit : limit
37
 
38
  $.post( ajaxurl, {
39
  action: 'fs_toggle_debug_mode',
40
+ // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
41
+ _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_toggle_debug_mode' ) ); ?>,
42
  is_on : ($(this).hasClass( 'fs-on' ) ? 1 : 0)
43
  }, function ( response ) {
44
  if ( 1 == response ) {
113
  if (optionName) {
114
  $.post(ajaxurl, {
115
  action : 'fs_get_db_option',
116
+ // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
117
+ _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_db_option' ) ); ?>,
118
  option_name: optionName
119
  }, function (response) {
120
  if (response.data.value)
134
  if (optionValue) {
135
  $.post(ajaxurl, {
136
  action : 'fs_set_db_option',
137
+ // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
138
+ _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_set_db_option' ) ); ?>,
139
  option_name : optionName,
140
  option_value: optionValue
141
  }, function () {
728
 
729
  $.post(ajaxurl, {
730
  action : 'fs_get_debug_log',
731
+ // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
732
+ _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_debug_log' ) ); ?>,
733
  filters: filters,
734
  offset : offset,
735
  limit : limit
fs/lib/templates/firewall-issues-js.php CHANGED
@@ -22,10 +22,12 @@
22
  notice = $( this ).parents( '.fs-notice' ),
23
  ajaxActionSuffix = notice.attr( 'data-manager-id' ).replace( ':', '-' );
24
 
25
- var data = {
26
- action : 'fs_resolve_firewall_issues_' + ajaxActionSuffix,
27
- error_type: error_type
28
- };
 
 
29
 
30
  if ( 'squid' === error_type ) {
31
  data.hosting_company = prompt( 'What is the name or URL of your hosting company?' );
@@ -39,7 +41,9 @@
39
  }
40
 
41
  if ( 'retry_ping' === error_type ) {
42
- data.action = 'fs_retry_connectivity_test_' + ajaxActionSuffix;
 
 
43
  }
44
 
45
  $( this ).css({'cursor': 'wait'});
@@ -56,4 +60,4 @@
56
  });
57
  });
58
  });
59
- </script>
22
  notice = $( this ).parents( '.fs-notice' ),
23
  ajaxActionSuffix = notice.attr( 'data-manager-id' ).replace( ':', '-' );
24
 
25
+ var data = {
26
+ action : 'fs_resolve_firewall_issues_' + ajaxActionSuffix,
27
+ // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
28
+ _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_resolve_firewall_issues' ) ); ?>,
29
+ error_type: error_type
30
+ };
31
 
32
  if ( 'squid' === error_type ) {
33
  data.hosting_company = prompt( 'What is the name or URL of your hosting company?' );
41
  }
42
 
43
  if ( 'retry_ping' === error_type ) {
44
+ data.action = 'fs_retry_connectivity_test_' + ajaxActionSuffix;
45
+ // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
46
+ data._wpnonce = <?php echo wp_json_encode( wp_create_nonce( 'fs_retry_connectivity_test' ) ); ?>;
47
  }
48
 
49
  $( this ).css({'cursor': 'wait'});
60
  });
61
  });
62
  });
63
+ </script>
fs/lib/templates/partials/network-activation.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  /**
3
  * @var array $VARS
4
  * @var Freemius $fs
@@ -86,4 +91,4 @@
86
  </tbody>
87
  </table>
88
  </div>
89
- </div>
1
  <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
  /**
8
  * @var array $VARS
9
  * @var Freemius $fs
91
  </tbody>
92
  </table>
93
  </div>
94
+ </div>
fs/lib/templates/sticky-admin-notice-js.php CHANGED
@@ -23,7 +23,9 @@
23
 
24
  notice.fadeOut( 'fast', function() {
25
  var data = {
26
- action : 'fs_dismiss_notice_action_' + ajaxActionSuffix,
 
 
27
  message_id: id
28
  };
29
 
@@ -36,4 +38,4 @@
36
  });
37
  });
38
  });
39
- </script>
23
 
24
  notice.fadeOut( 'fast', function() {
25
  var data = {
26
+ action : 'fs_dismiss_notice_action_' + ajaxActionSuffix,
27
+ // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
28
+ _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_dismiss_notice_action' ) ); ?>,
29
  message_id: id
30
  };
31
 
38
  });
39
  });
40
  });
41
+ </script>
includes/Admin/AdminMenu.php CHANGED
@@ -2,9 +2,9 @@
2
 
3
  namespace DgoraWcas\Admin;
4
 
5
- // Exit if accessed directly
6
  use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
7
  use DgoraWcas\Settings ;
 
8
  if ( !defined( 'ABSPATH' ) ) {
9
  exit;
10
  }
2
 
3
  namespace DgoraWcas\Admin;
4
 
 
5
  use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
6
  use DgoraWcas\Settings ;
7
+ // Exit if accessed directly
8
  if ( !defined( 'ABSPATH' ) ) {
9
  exit;
10
  }
includes/Admin/Promo/FeedbackNotice.php CHANGED
@@ -7,7 +7,6 @@ if ( ! defined( 'ABSPATH' ) ) {
7
  exit;
8
  }
9
 
10
-
11
  class FeedbackNotice {
12
 
13
  const ACTIVATION_DATE_OPT = 'dgwt_wcas_activation_date';
@@ -25,7 +24,6 @@ class FeedbackNotice {
25
  private $offset;
26
 
27
  function __construct() {
28
-
29
  $this->offset = strtotime( '-7 days' );
30
 
31
  add_action( 'admin_init', array( $this, 'checkInstallationDate' ) );
@@ -35,11 +33,11 @@ class FeedbackNotice {
35
  add_action( 'admin_head', array( $this, 'loadStyle' ) );
36
 
37
  add_action( 'admin_footer', array( $this, 'printDismissJS' ) );
38
-
39
  }
40
 
41
  /**
42
  * Check if is possible to display admin notice on the current screen
 
43
  * @return bool
44
  */
45
  private function allowDisplay() {
@@ -55,12 +53,12 @@ class FeedbackNotice {
55
  }
56
 
57
  return false;
58
-
59
  }
60
 
61
  /**
62
  * Display feedback notice
63
- * @return null | echo HTML
 
64
  */
65
  public function displayNotice() {
66
  global $current_user;
@@ -96,7 +94,8 @@ class FeedbackNotice {
96
 
97
  /**
98
  * Check instalation date
99
- * @return null
 
100
  */
101
  public function checkInstallationDate() {
102
 
@@ -114,7 +113,6 @@ class FeedbackNotice {
114
  add_action( 'admin_notices', array( $this, 'displayNotice' ) );
115
  }
116
  }
117
-
118
  }
119
 
120
 
@@ -128,6 +126,8 @@ class FeedbackNotice {
128
  wp_die( - 1, 403 );
129
  }
130
 
 
 
131
  update_option( self::HIDE_NOTICE_OPT, true );
132
 
133
  wp_send_json_success();
@@ -135,11 +135,12 @@ class FeedbackNotice {
135
 
136
  /**
137
  * Print JS for close admin notice
 
 
138
  */
139
  public function printDismissJS() {
140
-
141
  if ( ! $this->allowDisplay() ) {
142
- return false;
143
  }
144
  ?>
145
  <script>
@@ -154,6 +155,7 @@ class FeedbackNotice {
154
  $.ajax({
155
  url: ajaxurl,
156
  data: {
 
157
  action: '<?php echo self::DISMISS_AJAX_ACTION; ?>',
158
  }
159
  }).done(function (data) {
@@ -177,13 +179,12 @@ class FeedbackNotice {
177
 
178
  /**
179
  * Load the necessary CSS
 
180
  * @return void
181
  */
182
  public function loadStyle() {
183
  if ( $this->allowDisplay() ) {
184
  wp_enqueue_style( 'dgwt-wcas-admin-style' );
185
  }
186
-
187
  }
188
-
189
  }
7
  exit;
8
  }
9
 
 
10
  class FeedbackNotice {
11
 
12
  const ACTIVATION_DATE_OPT = 'dgwt_wcas_activation_date';
24
  private $offset;
25
 
26
  function __construct() {
 
27
  $this->offset = strtotime( '-7 days' );
28
 
29
  add_action( 'admin_init', array( $this, 'checkInstallationDate' ) );
33
  add_action( 'admin_head', array( $this, 'loadStyle' ) );
34
 
35
  add_action( 'admin_footer', array( $this, 'printDismissJS' ) );
 
36
  }
37
 
38
  /**
39
  * Check if is possible to display admin notice on the current screen
40
+ *
41
  * @return bool
42
  */
43
  private function allowDisplay() {
53
  }
54
 
55
  return false;
 
56
  }
57
 
58
  /**
59
  * Display feedback notice
60
+ *
61
+ * @return void
62
  */
63
  public function displayNotice() {
64
  global $current_user;
94
 
95
  /**
96
  * Check instalation date
97
+ *
98
+ * @return void
99
  */
100
  public function checkInstallationDate() {
101
 
113
  add_action( 'admin_notices', array( $this, 'displayNotice' ) );
114
  }
115
  }
 
116
  }
117
 
118
 
126
  wp_die( - 1, 403 );
127
  }
128
 
129
+ check_ajax_referer( 'dgwt_wcas_dismiss_feedback_notice' );
130
+
131
  update_option( self::HIDE_NOTICE_OPT, true );
132
 
133
  wp_send_json_success();
135
 
136
  /**
137
  * Print JS for close admin notice
138
+ *
139
+ * @return void
140
  */
141
  public function printDismissJS() {
 
142
  if ( ! $this->allowDisplay() ) {
143
+ return;
144
  }
145
  ?>
146
  <script>
155
  $.ajax({
156
  url: ajaxurl,
157
  data: {
158
+ _wpnonce: '<?php echo wp_create_nonce( 'dgwt_wcas_dismiss_feedback_notice' ); ?>',
159
  action: '<?php echo self::DISMISS_AJAX_ACTION; ?>',
160
  }
161
  }).done(function (data) {
179
 
180
  /**
181
  * Load the necessary CSS
182
+ *
183
  * @return void
184
  */
185
  public function loadStyle() {
186
  if ( $this->allowDisplay() ) {
187
  wp_enqueue_style( 'dgwt-wcas-admin-style' );
188
  }
 
189
  }
 
190
  }
includes/Admin/RegenerateImages.php CHANGED
@@ -1,26 +1,28 @@
1
  <?php
2
 
3
-
4
  namespace DgoraWcas\Admin;
5
 
6
-
7
  use DgoraWcas\Admin\Promo\FeedbackNotice;
8
  use DgoraWcas\Helpers;
9
 
 
 
 
 
 
10
  class RegenerateImages {
11
 
12
  const ALREADY_REGENERATED_OPT_KEY = 'dgwt_wcas_images_regenerated';
13
- const REGENERATE_ACTION = 'dgwt_wcas_regenerate_images';
14
- const REGENERATE_ACTION_NONCE = 'dgwt_wcas_regenerate_images_nonce';
15
- const DISMISS_AJAX_ACTION = 'dgwt_wcas_dismiss_notice_regenerate_images';
16
 
17
  public function __construct() {
18
  }
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' ) );
26
  add_action( 'wp_ajax_' . self::REGENERATE_ACTION, array( $this, 'regenerateImages' ) );
@@ -33,14 +35,9 @@ class RegenerateImages {
33
  && $displayImages
34
  && $this->isTimeToDisplay()
35
  ) {
36
-
37
-
38
  add_action( 'admin_notices', array( $this, 'adminNotice' ) );
39
-
40
  add_action( 'admin_footer', array( $this, 'printJS' ) );
41
-
42
  }
43
-
44
  }
45
 
46
  /**
@@ -79,11 +76,9 @@ class RegenerateImages {
79
  * @return array
80
  */
81
  public function getImageSizes( $sizes ) {
82
-
83
  array_push( $sizes, 'dgwt-wcas-product-suggestion' );
84
 
85
  return $sizes;
86
-
87
  }
88
 
89
  /**
@@ -117,6 +112,8 @@ class RegenerateImages {
117
  wp_die( - 1, 403 );
118
  }
119
 
 
 
120
  update_option( self::ALREADY_REGENERATED_OPT_KEY, true );
121
 
122
  wp_send_json_success();
@@ -128,7 +125,6 @@ class RegenerateImages {
128
  * @return boolean
129
  */
130
  public function isTimeToDisplay() {
131
-
132
  $isTime = false;
133
 
134
  $date = get_option( FeedbackNotice::ACTIVATION_DATE_OPT );
@@ -138,7 +134,6 @@ class RegenerateImages {
138
  $isTime = true;
139
  }
140
 
141
-
142
  return $isTime;
143
  }
144
 
@@ -157,6 +152,7 @@ class RegenerateImages {
157
  $.ajax({
158
  url: ajaxurl,
159
  data: {
 
160
  action: '<?php echo self::DISMISS_AJAX_ACTION; ?>',
161
  }
162
  });
@@ -189,6 +185,4 @@ class RegenerateImages {
189
 
190
  <?php
191
  }
192
-
193
-
194
  }
1
  <?php
2
 
 
3
  namespace DgoraWcas\Admin;
4
 
 
5
  use DgoraWcas\Admin\Promo\FeedbackNotice;
6
  use DgoraWcas\Helpers;
7
 
8
+ // Exit if accessed directly
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
  class RegenerateImages {
14
 
15
  const ALREADY_REGENERATED_OPT_KEY = 'dgwt_wcas_images_regenerated';
16
+ const REGENERATE_ACTION = 'dgwt_wcas_regenerate_images';
17
+ const REGENERATE_ACTION_NONCE = 'dgwt_wcas_regenerate_images_nonce';
18
+ const DISMISS_AJAX_ACTION = 'dgwt_wcas_dismiss_notice_regenerate_images';
19
 
20
  public function __construct() {
21
  }
22
 
23
  public function init() {
 
24
  $displayImages = DGWT_WCAS()->settings->getOption( 'show_product_image' ) === 'on' || DGWT_WCAS()->settings->getOption( 'show_categories_images' );
25
+ $regenerated = get_option( self::ALREADY_REGENERATED_OPT_KEY );
26
 
27
  add_action( 'wp_ajax_' . self::DISMISS_AJAX_ACTION, array( $this, 'dismissNotice' ) );
28
  add_action( 'wp_ajax_' . self::REGENERATE_ACTION, array( $this, 'regenerateImages' ) );
35
  && $displayImages
36
  && $this->isTimeToDisplay()
37
  ) {
 
 
38
  add_action( 'admin_notices', array( $this, 'adminNotice' ) );
 
39
  add_action( 'admin_footer', array( $this, 'printJS' ) );
 
40
  }
 
41
  }
42
 
43
  /**
76
  * @return array
77
  */
78
  public function getImageSizes( $sizes ) {
 
79
  array_push( $sizes, 'dgwt-wcas-product-suggestion' );
80
 
81
  return $sizes;
 
82
  }
83
 
84
  /**
112
  wp_die( - 1, 403 );
113
  }
114
 
115
+ check_ajax_referer( 'dgwt_wcas_dismiss_regenerate_images_notice' );
116
+
117
  update_option( self::ALREADY_REGENERATED_OPT_KEY, true );
118
 
119
  wp_send_json_success();
125
  * @return boolean
126
  */
127
  public function isTimeToDisplay() {
 
128
  $isTime = false;
129
 
130
  $date = get_option( FeedbackNotice::ACTIVATION_DATE_OPT );
134
  $isTime = true;
135
  }
136
 
 
137
  return $isTime;
138
  }
139
 
152
  $.ajax({
153
  url: ajaxurl,
154
  data: {
155
+ _wpnonce: '<?php echo wp_create_nonce( 'dgwt_wcas_dismiss_regenerate_images_notice' ); ?>',
156
  action: '<?php echo self::DISMISS_AJAX_ACTION; ?>',
157
  }
158
  });
185
 
186
  <?php
187
  }
 
 
188
  }
includes/Admin/SettingsAPI.php CHANGED
@@ -2,8 +2,8 @@
2
 
3
  namespace DgoraWcas\Admin;
4
 
5
- // Exit if accessed directly
6
  use DgoraWcas\Helpers ;
 
7
  if ( !defined( 'ABSPATH' ) ) {
8
  exit;
9
  }
@@ -20,10 +20,6 @@ if ( !defined( 'ABSPATH' ) ) {
20
  * @link http://tareq.weDevs.com Tareq's Planet
21
  * @example src/settings-api.php How to use the class
22
  */
23
- // Exit if accessed directly
24
- if ( !defined( 'ABSPATH' ) ) {
25
- exit;
26
- }
27
  class SettingsAPI
28
  {
29
  /**
@@ -176,6 +172,7 @@ class SettingsAPI
176
  'type' => $type,
177
  'move_dest' => ( isset( $option['move_dest'] ) ? $option['move_dest'] : '' ),
178
  'input_data' => ( isset( $option['input_data'] ) ? $option['input_data'] : '' ),
 
179
  );
180
  add_settings_field(
181
  "{$this->name}[" . $option['name'] . ']',
@@ -234,14 +231,16 @@ class SettingsAPI
234
  );
235
  $size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular' );
236
  $type = ( isset( $args['type'] ) ? $args['type'] : 'text' );
 
237
  $html = '<fieldset class="dgwt-wcas-fieldset">';
238
  $html .= sprintf(
239
- '<input type="%1$s" class="%2$s-text" id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s"/>',
240
  $type,
241
  $size,
242
  $this->name,
243
  $args['id'],
244
- $value
 
245
  );
246
  $html .= $this->get_field_description( $args );
247
  $html .= '</fieldset>';
@@ -281,6 +280,7 @@ class SettingsAPI
281
  $args['std'],
282
  $args
283
  );
 
284
  $moveDest = ( empty($args['move_dest']) ? '' : sprintf(
285
  'data-move-dest="%1$s[%2$s]" class="%3$s"',
286
  $this->name,
@@ -296,11 +296,12 @@ class SettingsAPI
296
  );
297
  $html .= sprintf( '<input type="hidden" name="%1$s[%2$s]" value="off" />', $this->name, $args['id'] );
298
  $html .= sprintf(
299
- '<input type="checkbox" class="checkbox" id="%1$s[%2$s]" name="%1$s[%2$s]" value="on" %3$s %4$s />',
300
  $this->name,
301
  $args['id'],
302
  checked( $value, 'on', false ),
303
- $args['input_data']
 
304
  );
305
  $html .= sprintf( '<p class="%1$s-description-field">%2$s</p></label>', $this->name, $args['desc'] );
306
  $html .= '</fieldset>';
@@ -692,18 +693,19 @@ class SettingsAPI
692
  function get_option( $option, $default = '', $allow_empty = true )
693
  {
694
  $options = get_option( $this->name );
 
695
  if ( isset( $options[$option] ) ) {
696
 
697
  if ( $allow_empty ) {
698
- return $options[$option];
699
  } else {
700
  if ( !empty($options[$option]) ) {
701
- return $options[$option];
702
  }
703
  }
704
 
705
  }
706
- return $default;
707
  }
708
 
709
  /**
2
 
3
  namespace DgoraWcas\Admin;
4
 
 
5
  use DgoraWcas\Helpers ;
6
+ // Exit if accessed directly
7
  if ( !defined( 'ABSPATH' ) ) {
8
  exit;
9
  }
20
  * @link http://tareq.weDevs.com Tareq's Planet
21
  * @example src/settings-api.php How to use the class
22
  */
 
 
 
 
23
  class SettingsAPI
24
  {
25
  /**
172
  'type' => $type,
173
  'move_dest' => ( isset( $option['move_dest'] ) ? $option['move_dest'] : '' ),
174
  'input_data' => ( isset( $option['input_data'] ) ? $option['input_data'] : '' ),
175
+ 'disabled' => ( isset( $option['disabled'] ) ? $option['disabled'] : false ),
176
  );
177
  add_settings_field(
178
  "{$this->name}[" . $option['name'] . ']',
231
  );
232
  $size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular' );
233
  $type = ( isset( $args['type'] ) ? $args['type'] : 'text' );
234
+ $disabled = ( !empty($args['disabled']) ? 'disabled' : '' );
235
  $html = '<fieldset class="dgwt-wcas-fieldset">';
236
  $html .= sprintf(
237
+ '<input type="%1$s" class="%2$s-text" id="%3$s[%4$s]" name="%3$s[%4$s]" value="%5$s" %6$s/>',
238
  $type,
239
  $size,
240
  $this->name,
241
  $args['id'],
242
+ $value,
243
+ $disabled
244
  );
245
  $html .= $this->get_field_description( $args );
246
  $html .= '</fieldset>';
280
  $args['std'],
281
  $args
282
  );
283
+ $disabled = ( !empty($args['disabled']) ? 'disabled' : '' );
284
  $moveDest = ( empty($args['move_dest']) ? '' : sprintf(
285
  'data-move-dest="%1$s[%2$s]" class="%3$s"',
286
  $this->name,
296
  );
297
  $html .= sprintf( '<input type="hidden" name="%1$s[%2$s]" value="off" />', $this->name, $args['id'] );
298
  $html .= sprintf(
299
+ '<input type="checkbox" class="checkbox" id="%1$s[%2$s]" name="%1$s[%2$s]" value="on" %3$s %4$s %5$s />',
300
  $this->name,
301
  $args['id'],
302
  checked( $value, 'on', false ),
303
+ $args['input_data'],
304
+ $disabled
305
  );
306
  $html .= sprintf( '<p class="%1$s-description-field">%2$s</p></label>', $this->name, $args['desc'] );
307
  $html .= '</fieldset>';
693
  function get_option( $option, $default = '', $allow_empty = true )
694
  {
695
  $options = get_option( $this->name );
696
+ $value = $default;
697
  if ( isset( $options[$option] ) ) {
698
 
699
  if ( $allow_empty ) {
700
+ $value = $options[$option];
701
  } else {
702
  if ( !empty($options[$option]) ) {
703
+ $value = $options[$option];
704
  }
705
  }
706
 
707
  }
708
+ return apply_filters( 'dgwt/wcas/settings/load_value/key=' . $option, $value );
709
  }
710
 
711
  /**
includes/EmbeddingViaMenu.php CHANGED
@@ -101,10 +101,10 @@ class EmbeddingViaMenu {
101
  return;
102
  }
103
 
104
- $layout = isset( $_POST['menu-item-dgwt-wcas-layout'][ $menu_item_db_id ] ) ? $_POST['menu-item-dgwt-wcas-layout'][ $menu_item_db_id ] : '';
105
  update_post_meta( $menu_item_db_id, '_menu_item_dgwt_wcas_layout', $layout );
106
 
107
- $searchIconColor = isset( $_POST['menu-item-dgwt-wcas-search-icon-color'][ $menu_item_db_id ] ) ? $_POST['menu-item-dgwt-wcas-search-icon-color'][ $menu_item_db_id ] : '';
108
  update_post_meta( $menu_item_db_id, '_menu_item_dgwt_wcas_search_icon_color', $searchIconColor );
109
  }
110
 
@@ -131,7 +131,7 @@ class EmbeddingViaMenu {
131
  $searchIconColor = get_post_meta( $item->ID, '_menu_item_dgwt_wcas_search_icon_color', true );
132
  if ( in_array( $layout, array( 'icon', 'icon-flexible' ) ) && ! empty( $searchIconColor ) ) {
133
  $args .= 'class="dgwt-wcas-menu-item-' . $item->ID . ' " ';
134
- $style = sprintf( '<style>.dgwt-wcas-menu-item-%d .dgwt-wcas-ico-magnifier-handler path {fill: %s;}</style>', $item->ID, $searchIconColor );
135
  }
136
  $itemOutput = do_shortcode( sprintf( '[wcas-search-form %s]', $args ) ) . $style;
137
  }
101
  return;
102
  }
103
 
104
+ $layout = isset( $_POST['menu-item-dgwt-wcas-layout'][ $menu_item_db_id ] ) ? sanitize_key( $_POST['menu-item-dgwt-wcas-layout'][ $menu_item_db_id ] ) : '';
105
  update_post_meta( $menu_item_db_id, '_menu_item_dgwt_wcas_layout', $layout );
106
 
107
+ $searchIconColor = isset( $_POST['menu-item-dgwt-wcas-search-icon-color'][ $menu_item_db_id ] ) ? sanitize_hex_color( $_POST['menu-item-dgwt-wcas-search-icon-color'][ $menu_item_db_id ] ) : '';
108
  update_post_meta( $menu_item_db_id, '_menu_item_dgwt_wcas_search_icon_color', $searchIconColor );
109
  }
110
 
131
  $searchIconColor = get_post_meta( $item->ID, '_menu_item_dgwt_wcas_search_icon_color', true );
132
  if ( in_array( $layout, array( 'icon', 'icon-flexible' ) ) && ! empty( $searchIconColor ) ) {
133
  $args .= 'class="dgwt-wcas-menu-item-' . $item->ID . ' " ';
134
+ $style = sprintf( '<style>.dgwt-wcas-menu-item-%d .dgwt-wcas-ico-magnifier-handler path {fill: %s;}</style>', $item->ID, esc_attr( $searchIconColor ) );
135
  }
136
  $itemOutput = do_shortcode( sprintf( '[wcas-search-form %s]', $args ) ) . $style;
137
  }
includes/Helpers.php CHANGED
@@ -86,12 +86,18 @@ class Helpers
86
  }
87
 
88
 
89
- if ( !empty($args['mobile_overlay']) && in_array( $args['mobile_overlay'], array( '1', 'on' ) ) ) {
90
  $classes[] = 'js-dgwt-wcas-mobile-overlay-enabled';
91
  } else {
92
  $classes[] = 'js-dgwt-wcas-mobile-overlay-disabled';
93
  }
94
 
 
 
 
 
 
 
95
  return implode( ' ', $classes );
96
  }
97
 
@@ -138,7 +144,8 @@ class Helpers
138
  ?>
139
  <svg class="<?php
140
  echo $class ;
141
- ?>" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
 
142
  <path fill="<?php
143
  echo $color ;
144
  ?>"
@@ -154,7 +161,8 @@ class Helpers
154
  ?>" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
155
  <path fill="<?php
156
  echo $color ;
157
- ?>" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"/>
 
158
  </svg>
159
  <?php
160
  break;
@@ -163,7 +171,8 @@ class Helpers
163
  ?>
164
  <svg class="<?php
165
  echo $class ;
166
- ?>" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
 
167
  <path fill="<?php
168
  echo $color ;
169
  ?>"
@@ -177,7 +186,8 @@ class Helpers
177
  <svg class="dgwt-wcas-loader-circular <?php
178
  echo $class ;
179
  ?>" viewBox="25 25 50 50">
180
- <circle class="dgwt-wcas-loader-circular-path" cx="50" cy="50" r="20" fill="none" stroke="<?php
 
181
  echo $color ;
182
  ?>" stroke-miterlimit="10"/>
183
  </svg>
@@ -841,19 +851,22 @@ class Helpers
841
  }
842
 
843
  /**
844
- * Create HTML question mark with tooltip
845
  *
846
  * @param string $id
847
  * @param string $content
848
  * @param string $template
 
 
849
  *
850
  * @return string
851
  */
852
- public static function createQuestionMark(
853
  $id,
854
  $content = '',
855
  $template = '',
856
- $placement = 'top'
 
857
  )
858
  {
859
 
@@ -870,11 +883,81 @@ class Helpers
870
  }
871
 
872
  $id = 'js-dgwt-wcas-tooltip-id' . sanitize_key( $id );
873
- $html = '<div class="js-dgwt-wcas-tooltip dgwt-wcas-questio-mark dashicons dashicons-editor-help" data-tooltip-html-el="' . $id . '" data-tooltip-placement="' . $placement . '"></div>';
874
  $html .= '<div class="' . $id . '" style="display:none;"><div class="dgwt-wcas-tooltip-wrapper">' . $content . '</div></div>';
875
  return $html;
876
  }
877
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
878
  /**
879
  * Get list of 24 hours
880
  */
@@ -1095,6 +1178,7 @@ class Helpers
1095
  'mobile_overlay' => ( DGWT_WCAS()->settings->getOption( 'enable_mobile_overlay' ) === 'on' ? true : false ),
1096
  'mobile_overlay_wrapper' => apply_filters( 'dgwt/wcas/scripts/mobile_overlay_wrapper', 'body' ),
1097
  'breakpoint' => apply_filters( 'dgwt/wcas/scripts/mobile_breakpoint', $breakpoint ),
 
1098
  );
1099
  if ( in_array( $layout['layout'], array( 'icon', 'icon-flexible' ) ) ) {
1100
  $layout['mobile_overlay'] = true;
86
  }
87
 
88
 
89
+ if ( !empty($args['mobile_overlay']) ) {
90
  $classes[] = 'js-dgwt-wcas-mobile-overlay-enabled';
91
  } else {
92
  $classes[] = 'js-dgwt-wcas-mobile-overlay-disabled';
93
  }
94
 
95
+
96
+ if ( !empty($args['darken_bg']) ) {
97
+ $classes[] = 'dgwt-wcas-search-darkoverl-mounted';
98
+ $classes[] = 'js-dgwt-wcas-search-darkoverl-mounted';
99
+ }
100
+
101
  return implode( ' ', $classes );
102
  }
103
 
144
  ?>
145
  <svg class="<?php
146
  echo $class ;
147
+ ?>" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24"
148
+ width="24">
149
  <path fill="<?php
150
  echo $color ;
151
  ?>"
161
  ?>" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
162
  <path fill="<?php
163
  echo $color ;
164
+ ?>"
165
+ d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"/>
166
  </svg>
167
  <?php
168
  break;
171
  ?>
172
  <svg class="<?php
173
  echo $class ;
174
+ ?>" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24"
175
+ width="24">
176
  <path fill="<?php
177
  echo $color ;
178
  ?>"
186
  <svg class="dgwt-wcas-loader-circular <?php
187
  echo $class ;
188
  ?>" viewBox="25 25 50 50">
189
+ <circle class="dgwt-wcas-loader-circular-path" cx="50" cy="50" r="20" fill="none"
190
+ stroke="<?php
191
  echo $color ;
192
  ?>" stroke-miterlimit="10"/>
193
  </svg>
851
  }
852
 
853
  /**
854
+ * Create tooltip
855
  *
856
  * @param string $id
857
  * @param string $content
858
  * @param string $template
859
+ * @param string $placement
860
+ * @param string $class
861
  *
862
  * @return string
863
  */
864
+ public static function createTooltip(
865
  $id,
866
  $content = '',
867
  $template = '',
868
+ $placement = 'right',
869
+ $class = ''
870
  )
871
  {
872
 
883
  }
884
 
885
  $id = 'js-dgwt-wcas-tooltip-id' . sanitize_key( $id );
886
+ $html = '<div class="js-dgwt-wcas-tooltip ' . $class . '" data-tooltip-html-el="' . $id . '" data-tooltip-placement="' . $placement . '"></div>';
887
  $html .= '<div class="' . $id . '" style="display:none;"><div class="dgwt-wcas-tooltip-wrapper">' . $content . '</div></div>';
888
  return $html;
889
  }
890
 
891
+ /**
892
+ * Create HTML override option tooltip
893
+ *
894
+ * @param string $id
895
+ * @param string $content
896
+ * @param string $template
897
+ * @param string $placement
898
+ *
899
+ * @return string
900
+ */
901
+ public static function getOverrideOptionText( $theme )
902
+ {
903
+ $linkToShortcodesDoc = 'https://fibosearch.com/documentation/get-started/how-to-add-fibosearch-to-your-website/#add-fibosearch-with-a-shortcode';
904
+ $content = '<p>' . sprintf( __( 'This option is <b>overridden</b> by the seamless integration with the %s theme. If you want to change the value of this option, disable the integration in <br /><b>WooCommerce -> FiboSearch -> Starting (tab)</b>.', 'ajax-search-for-woocommerce' ), $theme ) . '</p>';
905
+ $content .= '<p>' . sprintf( __( 'Furthermore, you can override this option for a specific search bar via shortcode params. <a href="%s" target="_blank">Learn more about shortcodes parameters</a>.', 'ajax-search-for-woocommerce' ), $linkToShortcodesDoc ) . '</p>';
906
+ return $content;
907
+ }
908
+
909
+ /**
910
+ * Create HTML question mark with tooltip
911
+ *
912
+ * @param string $id
913
+ * @param string $content
914
+ * @param string $template
915
+ * @param string $placement
916
+ *
917
+ * @return string
918
+ */
919
+ public static function createQuestionMark(
920
+ $id,
921
+ $content = '',
922
+ $template = '',
923
+ $placement = 'right'
924
+ )
925
+ {
926
+ return self::createTooltip(
927
+ $id,
928
+ $content,
929
+ $template,
930
+ $placement,
931
+ 'dashicons dashicons-editor-help dgwt-wcas-questio-mark'
932
+ );
933
+ }
934
+
935
+ /**
936
+ * Create HTML option override tooltip
937
+ *
938
+ * @param string $id
939
+ * @param string $content
940
+ * @param string $template
941
+ * @param string $placement
942
+ *
943
+ * @return string
944
+ */
945
+ public static function createOverrideTooltip(
946
+ $id,
947
+ $content = '',
948
+ $template = '',
949
+ $placement = 'right'
950
+ )
951
+ {
952
+ return self::createTooltip(
953
+ $id,
954
+ $content,
955
+ $template,
956
+ $placement,
957
+ 'dashicons dashicons-lock dgwt-wcas-override-tooltip'
958
+ );
959
+ }
960
+
961
  /**
962
  * Get list of 24 hours
963
  */
1178
  'mobile_overlay' => ( DGWT_WCAS()->settings->getOption( 'enable_mobile_overlay' ) === 'on' ? true : false ),
1179
  'mobile_overlay_wrapper' => apply_filters( 'dgwt/wcas/scripts/mobile_overlay_wrapper', 'body' ),
1180
  'breakpoint' => apply_filters( 'dgwt/wcas/scripts/mobile_breakpoint', $breakpoint ),
1181
+ 'darken_background' => ( DGWT_WCAS()->settings->getOption( 'darken_background', 'off' ) === 'on' ? true : false ),
1182
  );
1183
  if ( in_array( $layout['layout'], array( 'icon', 'icon-flexible' ) ) ) {
1184
  $layout['mobile_overlay'] = true;
includes/Integrations/Themes/Enfold/Enfold.php CHANGED
@@ -104,11 +104,29 @@ class Enfold {
104
  return 'on';
105
  } );
106
 
 
 
 
 
 
 
 
 
 
107
  // Change mobile breakpoint to 768
108
- add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
109
  return 768;
110
  } );
111
 
 
 
 
 
 
 
 
 
 
112
  require_once DGWT_WCAS_DIR . 'partials/themes/enfold.php';
113
  }
114
  }
104
  return 'on';
105
  } );
106
 
107
+ // Mark that the value of the option "mobile overlay" is forced
108
+ add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
109
+ $settings[680]['disabled'] = true;
110
+ $settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
111
+
112
+ return $settings;
113
+ } );
114
+
115
+
116
  // Change mobile breakpoint to 768
117
+ add_filter( 'dgwt/wcas/settings/load_value/key=mobile_breakpoint', function () {
118
  return 768;
119
  } );
120
 
121
+ // Mark that the value of the option "mobile breakpoint" is forced
122
+ add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
123
+ $settings[690]['disabled'] = true;
124
+ $settings[690]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-breakpoint', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[690]['label'];
125
+
126
+ return $settings;
127
+ } );
128
+
129
+
130
  require_once DGWT_WCAS_DIR . 'partials/themes/enfold.php';
131
  }
132
  }
includes/Integrations/Themes/Impreza/Impreza.php CHANGED
@@ -32,7 +32,7 @@ class Impreza {
32
  $key = 'dgwt_wcas_basic';
33
 
34
  $articleLink = 'https://fibosearch.com/documentation/themes-integrations/impreza-theme/';
35
- $articleText = sprintf(__( 'Here is <a href="%s" target="_blank">article</a> about how to do it using Impreza child-theme.', 'ajax-search-for-woocommerce' ), $articleLink);
36
 
37
  $settings[ $key ][10] = array(
38
  'name' => $this->themeSlug . '_main_head',
@@ -73,24 +73,41 @@ class Impreza {
73
  */
74
  private function replaceForm() {
75
 
76
- $this->applyCSS();
77
- $this->applyJS();
78
 
79
- add_filter( 'body_class', function ( $classes ) {
80
- $classes[] = 'dgwt-wcas-theme-' . $this->themeSlug;
81
 
82
- return $classes;
83
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
- // Force enable overlay for mobile search
86
- add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
87
- return 'on';
88
- } );
89
 
90
- // Change mobile breakpoint from 992 to 850
91
- add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
92
- return 899;
93
- } );
94
 
95
  }
96
 
@@ -108,17 +125,21 @@ class Impreza {
108
  .w-search.layout_modern .w-search-close {
109
 
110
  }
 
111
  .w-search.layout_modern .w-search-close {
112
- color: rgba(0,0,0,0.5)!important;
113
  }
 
114
  .w-search.layout_modern .dgwt-wcas-close {
115
  display: none;
116
  }
 
117
  .w-search.layout_modern .dgwt-wcas-preloader {
118
  right: 20px;
119
  }
 
120
  .w-search.layout_fullscreen .w-form-row-field {
121
- top:48px;
122
  }
123
  </style>
124
  <?php
@@ -157,11 +178,11 @@ class Impreza {
157
 
158
  $(document).ready(function () {
159
 
160
- $('.w-search.layout_modern .w-search-close').on('click', function(){
161
 
162
  var instance = dgwtWcasImprezaGetActiveInstance();
163
 
164
- if(typeof instance == 'object'){
165
  instance.suggestions = [];
166
  instance.hide();
167
  instance.el.val('');
@@ -169,20 +190,20 @@ class Impreza {
169
 
170
  });
171
 
172
- $('.w-search-open').on('click', function(e){
173
 
174
- if($(window).width() < 900){
175
  e.preventDefault();
176
 
177
  var $mobileHandler = $(e.target).closest('.w-search').find('.js-dgwt-wcas-enable-mobile-form');
178
 
179
- if($mobileHandler.length){
180
  $mobileHandler[0].click();
181
  }
182
 
183
- setTimeout(function(){
184
  $('.w-search').removeClass('active');
185
- },500);
186
  }
187
 
188
  });
@@ -190,8 +211,6 @@ class Impreza {
190
  });
191
 
192
 
193
-
194
-
195
  })(jQuery);
196
 
197
  </script>
32
  $key = 'dgwt_wcas_basic';
33
 
34
  $articleLink = 'https://fibosearch.com/documentation/themes-integrations/impreza-theme/';
35
+ $articleText = sprintf( __( 'Here is <a href="%s" target="_blank">article</a> about how to do it using Impreza child-theme.', 'ajax-search-for-woocommerce' ), $articleLink );
36
 
37
  $settings[ $key ][10] = array(
38
  'name' => $this->themeSlug . '_main_head',
73
  */
74
  private function replaceForm() {
75
 
76
+ $this->applyCSS();
77
+ $this->applyJS();
78
 
79
+ add_filter( 'body_class', function ( $classes ) {
80
+ $classes[] = 'dgwt-wcas-theme-' . $this->themeSlug;
81
 
82
+ return $classes;
83
+ } );
84
+
85
+ // Force enable overlay for mobile search
86
+ add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
87
+ return 'on';
88
+ } );
89
+
90
+ // Mark that the value of the option "mobile overlay" is forced
91
+ add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
92
+ $settings[680]['disabled'] = true;
93
+ $settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
94
+
95
+ return $settings;
96
+ } );
97
+
98
+
99
+ // Change mobile breakpoint to 768
100
+ add_filter( 'dgwt/wcas/settings/load_value/key=mobile_breakpoint', function () {
101
+ return 899;
102
+ } );
103
 
104
+ // Mark that the value of the option "mobile breakpoint" is forced
105
+ add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
106
+ $settings[690]['disabled'] = true;
107
+ $settings[690]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-breakpoint', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[690]['label'];
108
 
109
+ return $settings;
110
+ } );
 
 
111
 
112
  }
113
 
125
  .w-search.layout_modern .w-search-close {
126
 
127
  }
128
+
129
  .w-search.layout_modern .w-search-close {
130
+ color: rgba(0, 0, 0, 0.5) !important;
131
  }
132
+
133
  .w-search.layout_modern .dgwt-wcas-close {
134
  display: none;
135
  }
136
+
137
  .w-search.layout_modern .dgwt-wcas-preloader {
138
  right: 20px;
139
  }
140
+
141
  .w-search.layout_fullscreen .w-form-row-field {
142
+ top: 48px;
143
  }
144
  </style>
145
  <?php
178
 
179
  $(document).ready(function () {
180
 
181
+ $('.w-search.layout_modern .w-search-close').on('click', function () {
182
 
183
  var instance = dgwtWcasImprezaGetActiveInstance();
184
 
185
+ if (typeof instance == 'object') {
186
  instance.suggestions = [];
187
  instance.hide();
188
  instance.el.val('');
190
 
191
  });
192
 
193
+ $('.w-search-open').on('click', function (e) {
194
 
195
+ if ($(window).width() < 900) {
196
  e.preventDefault();
197
 
198
  var $mobileHandler = $(e.target).closest('.w-search').find('.js-dgwt-wcas-enable-mobile-form');
199
 
200
+ if ($mobileHandler.length) {
201
  $mobileHandler[0].click();
202
  }
203
 
204
+ setTimeout(function () {
205
  $('.w-search').removeClass('active');
206
+ }, 500);
207
  }
208
 
209
  });
211
  });
212
 
213
 
 
 
214
  })(jQuery);
215
 
216
  </script>
includes/Integrations/Themes/Kadence/Kadence.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DgoraWcas\Integrations\Themes\Kadence;
4
+
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ class Kadence extends ThemeIntegration {
13
+
14
+ public function __construct() {
15
+ $this->themeSlug = 'kadence';
16
+ $this->themeName = 'Kadence';
17
+
18
+ parent::__construct();
19
+ }
20
+ }
includes/Integrations/Themes/Storefront/Storefront.php CHANGED
@@ -93,11 +93,19 @@ class Storefront {
93
  private function overwriteFunctions() {
94
  if ( $this->canReplaceSearch() ) {
95
 
96
- // Force enable overlay for mobile search
97
  add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
98
  return 'on';
99
  } );
100
 
 
 
 
 
 
 
 
 
101
  require_once DGWT_WCAS_DIR . 'partials/themes/storefront.php';
102
  }
103
  }
93
  private function overwriteFunctions() {
94
  if ( $this->canReplaceSearch() ) {
95
 
96
+ // Force enabling the option "mobile overlay"
97
  add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
98
  return 'on';
99
  } );
100
 
101
+ // Mark that the value of the option "mobile overlay" is forced
102
+ add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
103
+ $settings[680]['disabled'] = true;
104
+ $settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
105
+
106
+ return $settings;
107
+ } );
108
+
109
  require_once DGWT_WCAS_DIR . 'partials/themes/storefront.php';
110
  }
111
  }
includes/Integrations/Themes/TheGem/TheGem.php CHANGED
@@ -44,11 +44,19 @@ class TheGem {
44
  add_filter( 'get_search_form', array( $this, 'removeSearchBarFromVerticalHeader' ), 100 );
45
  add_action( 'thegem_before_header', array( $this, 'addSearchBarToVerticalHeader' ), 20 );
46
 
47
- // Force enable overlay for mobile search
48
  add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
49
  return 'on';
50
  } );
51
 
 
 
 
 
 
 
 
 
52
  add_action( 'wp_head', array( $this, 'customCSS' ) );
53
  add_action( 'wp_footer', array( $this, 'customJS' ) );
54
  }
44
  add_filter( 'get_search_form', array( $this, 'removeSearchBarFromVerticalHeader' ), 100 );
45
  add_action( 'thegem_before_header', array( $this, 'addSearchBarToVerticalHeader' ), 20 );
46
 
47
+ // Force enabling the option "mobile overlay"
48
  add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
49
  return 'on';
50
  } );
51
 
52
+ // Mark that the value of the option "mobile overlay" is forced
53
+ add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
54
+ $settings[680]['disabled'] = true;
55
+ $settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
56
+
57
+ return $settings;
58
+ } );
59
+
60
  add_action( 'wp_head', array( $this, 'customCSS' ) );
61
  add_action( 'wp_footer', array( $this, 'customJS' ) );
62
  }
includes/Integrations/Themes/TheGemElementor/TheGemElementor.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DgoraWcas\Integrations\Themes\TheGemElementor;
4
+
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ class TheGemElementor extends ThemeIntegration {
13
+ public function __construct() {
14
+ $this->themeSlug = 'thegem-elementor';
15
+ $this->themeName = 'TheGem (Elementor)';
16
+
17
+ parent::__construct();
18
+ }
19
+ }
includes/Integrations/Themes/TheGemWPBakery/TheGemWPBakery.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace DgoraWcas\Integrations\Themes\TheGemWPBakery;
4
+
5
+ use DgoraWcas\Abstracts\ThemeIntegration;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ class TheGemWPBakery extends ThemeIntegration {
13
+ public function __construct() {
14
+ $this->themeSlug = 'thegem-wpbakery';
15
+ $this->themeName = 'TheGem (WPBakery)';
16
+
17
+ parent::__construct();
18
+ }
19
+
20
+ /**
21
+ * Overwrite search
22
+ *
23
+ * @return void
24
+ */
25
+ protected function maybeOverwriteSearch() {
26
+ $partialPath = DGWT_WCAS_DIR . 'partials/themes/thegem-elementor.php';
27
+ if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
28
+ require_once( $partialPath );
29
+ }
30
+ }
31
+ }
includes/Integrations/Themes/ThemesCompatibility.php CHANGED
@@ -190,7 +190,7 @@ class ThemesCompatibility {
190
  'className' => 'Estore',
191
  'name' => 'eStore',
192
  ),
193
- 'estore-pro' => array(
194
  'slug' => 'estore-pro',
195
  'className' => 'EstorePro',
196
  'name' => 'eStore Pro',
@@ -204,15 +204,29 @@ class ThemesCompatibility {
204
  'className' => 'OpenShopPro',
205
  'name' => 'Open Shop Pro',
206
  ),
207
- 'uncode' => array(
208
- 'slug' => 'uncode',
209
- 'name' => 'Uncode',
210
  ),
211
- 'xstore' => array(
212
  'slug' => 'xstore',
213
  'className' => 'Xstore',
214
  'name' => 'XStore',
215
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  );
217
  }
218
 
190
  'className' => 'Estore',
191
  'name' => 'eStore',
192
  ),
193
+ 'estore-pro' => array(
194
  'slug' => 'estore-pro',
195
  'className' => 'EstorePro',
196
  'name' => 'eStore Pro',
204
  'className' => 'OpenShopPro',
205
  'name' => 'Open Shop Pro',
206
  ),
207
+ 'uncode' => array(
208
+ 'slug' => 'uncode',
209
+ 'name' => 'Uncode',
210
  ),
211
+ 'xstore' => array(
212
  'slug' => 'xstore',
213
  'className' => 'Xstore',
214
  'name' => 'XStore',
215
  ),
216
+ 'kadence' => array(
217
+ 'slug' => 'kadence',
218
+ 'name' => 'Kadence',
219
+ ),
220
+ 'thegem-elementor' => array(
221
+ 'slug' => 'thegem-elementor',
222
+ 'className' => 'TheGemElementor',
223
+ 'name' => 'TheGem (Elementor)',
224
+ ),
225
+ 'thegem-wpbakery' => array(
226
+ 'slug' => 'thegem-wpbakery',
227
+ 'className' => 'TheGemWPBakery',
228
+ 'name' => 'TheGem (WPBakery)',
229
+ ),
230
  );
231
  }
232
 
includes/Integrations/Themes/Woodmart/Woodmart.php CHANGED
@@ -33,7 +33,7 @@ class Woodmart {
33
  */
34
  public function shop_page_link( $link, $keep_query, $taxonomy ) {
35
  if ( $keep_query && isset( $_GET['dgwt_wcas'] ) ) {
36
- $link = add_query_arg( 'dgwt_wcas', wc_clean( $_GET['dgwt_wcas'] ), $link );
37
  }
38
 
39
  return $link;
33
  */
34
  public function shop_page_link( $link, $keep_query, $taxonomy ) {
35
  if ( $keep_query && isset( $_GET['dgwt_wcas'] ) ) {
36
+ $link = add_query_arg( 'dgwt_wcas', '1', $link );
37
  }
38
 
39
  return $link;
includes/Multilingual.php CHANGED
@@ -1,8 +1,11 @@
1
  <?php
2
 
3
-
4
  namespace DgoraWcas;
5
 
 
 
 
 
6
 
7
  class Multilingual {
8
 
1
  <?php
2
 
 
3
  namespace DgoraWcas;
4
 
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
 
10
  class Multilingual {
11
 
includes/Personalization.php CHANGED
@@ -2,6 +2,10 @@
2
 
3
  namespace DgoraWcas;
4
 
 
 
 
 
5
 
6
  class Personalization {
7
 
2
 
3
  namespace DgoraWcas;
4
 
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
 
10
  class Personalization {
11
 
includes/Product.php CHANGED
@@ -2,6 +2,10 @@
2
 
3
  namespace DgoraWcas;
4
 
 
 
 
 
5
  class Product
6
  {
7
  protected $productID = 0 ;
2
 
3
  namespace DgoraWcas;
4
 
5
+ // Exit if accessed directly
6
+ if ( !defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
  class Product
10
  {
11
  protected $productID = 0 ;
includes/ProductVariation.php CHANGED
@@ -2,6 +2,10 @@
2
 
3
  namespace DgoraWcas;
4
 
 
 
 
 
5
  class ProductVariation extends Product
6
  {
7
  /**
2
 
3
  namespace DgoraWcas;
4
 
5
+ // Exit if accessed directly
6
+ if ( !defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
  class ProductVariation extends Product
10
  {
11
  /**
includes/Settings.php CHANGED
@@ -246,6 +246,15 @@ class Settings
246
  'class' => 'js-dgwt-wcas-adv-settings',
247
  'size' => 'small',
248
  'default' => 992,
 
 
 
 
 
 
 
 
 
249
  ),
250
  700 => array(
251
  'name' => 'search_form',
@@ -850,6 +859,7 @@ class Settings
850
  if ( !current_user_can( 'administrator' ) ) {
851
  wp_die( -1, 403 );
852
  }
 
853
  $show = ( !empty($_GET['adv_settings_value']) && $_GET['adv_settings_value'] === 'show' ? 'on' : 'off' );
854
  update_option( 'dgwt_wcas_settings_show_advanced', $show );
855
  wp_send_json_success();
246
  'class' => 'js-dgwt-wcas-adv-settings',
247
  'size' => 'small',
248
  'default' => 992,
249
+ ),
250
+ 695 => array(
251
+ 'name' => 'darken_background',
252
+ 'label' => __( 'Darkened background', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'darken-_background', __( 'Darkening the page background while autocomplete is active gives it stronger emphasis, minimizing elements (e.g., ads, carousels, and other page content) that could distract users from considering autocomplete suggestions.', 'ajax-search-for-woocommerce' ) ),
253
+ 'desc' => __( '(beta feature)', 'ajax-search-for-woocommerce' ),
254
+ 'type' => 'checkbox',
255
+ 'class' => 'js-dgwt-wcas-adv-settings',
256
+ 'size' => 'small',
257
+ 'default' => 'off',
258
  ),
259
  700 => array(
260
  'name' => 'search_form',
859
  if ( !current_user_can( 'administrator' ) ) {
860
  wp_die( -1, 403 );
861
  }
862
+ check_ajax_referer( 'dgwt_wcas_advanced_options_switch' );
863
  $show = ( !empty($_GET['adv_settings_value']) && $_GET['adv_settings_value'] === 'show' ? 'on' : 'off' );
864
  update_option( 'dgwt_wcas_settings_show_advanced', $show );
865
  wp_send_json_success();
includes/Shortcode.php CHANGED
@@ -28,6 +28,7 @@ class Shortcode {
28
  'class' => '',
29
  'layout' => $layout->layout,
30
  'mobile_overlay' => $layout->mobile_overlay,
 
31
  'details_box' => 'hide'
32
  ), $atts, $tag );
33
 
28
  'class' => '',
29
  'layout' => $layout->layout,
30
  'mobile_overlay' => $layout->mobile_overlay,
31
+ 'darken_bg' => $layout->darken_background,
32
  'details_box' => 'hide'
33
  ), $atts, $tag );
34
 
includes/Term.php CHANGED
@@ -1,8 +1,11 @@
1
  <?php
2
 
3
-
4
  namespace DgoraWcas;
5
 
 
 
 
 
6
 
7
  class Term {
8
  protected $termID = 0;
1
  <?php
2
 
 
3
  namespace DgoraWcas;
4
 
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
 
10
  class Term {
11
  protected $termID = 0;
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: 2022-01-24 10:47+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"
@@ -18,7 +18,7 @@ msgstr ""
18
  msgid "\"Out of stock\" relationships"
19
  msgstr ""
20
 
21
- #: includes/Engines/TNTSearchMySQL/Indexer/Logger.php:36
22
  #, php-format
23
  msgid "%1$s was called with an invalid level \"%2$s\"."
24
  msgstr ""
@@ -46,7 +46,7 @@ msgstr ""
46
  msgid "%s Theme"
47
  msgstr ""
48
 
49
- #: includes/Admin/RegenerateImages.php:101
50
  #, php-format
51
  msgid ""
52
  "%s: it is recommended to generate a special small image size for existing "
@@ -61,7 +61,11 @@ msgid ""
61
  "using PHP version "
62
  msgstr ""
63
 
64
- #: includes/Settings.php:743 includes/Settings.php:805
 
 
 
 
65
  msgid "-- Disabled"
66
  msgstr ""
67
 
@@ -145,7 +149,7 @@ msgstr ""
145
  msgid "Add FiboSearch as a menu item."
146
  msgstr ""
147
 
148
- #: includes/Admin/SettingsAPI.php:526 includes/Admin/SettingsAPI.php:627
149
  msgid "Add new rule"
150
  msgstr ""
151
 
@@ -165,12 +169,12 @@ msgid ""
165
  "conf</code>"
166
  msgstr ""
167
 
168
- #: includes/Settings.php:363
169
  msgctxt "admin"
170
  msgid "No results label"
171
  msgstr ""
172
 
173
- #: widget.php:25
174
  msgid "AJAX (live) search form for WooCommerce"
175
  msgstr ""
176
 
@@ -188,8 +192,8 @@ msgid "Alternative search endpoint"
188
  msgstr ""
189
 
190
  #: includes/Abstracts/ThemeIntegration.php:70
191
- #: includes/Integrations/Themes/TheGem/TheGem.php:100
192
  #: includes/Integrations/Themes/TheGem/TheGem.php:108
 
193
  #: includes/Integrations/Themes/Enfold/Enfold.php:71
194
  #: includes/Integrations/Themes/Sober/Sober.php:64
195
  #: includes/Integrations/Themes/The7/The7.php:67
@@ -224,7 +228,7 @@ msgstr ""
224
  msgid "and more..."
225
  msgstr ""
226
 
227
- #: partials/admin/how-to-use.php:22
228
  #, php-format
229
  msgid ""
230
  "Are there any difficulties? <b>We will do it for you!</b> We offer free of "
@@ -232,23 +236,23 @@ msgid ""
232
  "href=\"%s\">Become one now!</a>"
233
  msgstr ""
234
 
235
- #: partials/admin/how-to-use.php:16
236
  #, php-format
237
  msgid ""
238
  "As a menu item - go to the %s and add the menu item “FiboSearch bar”. Done!"
239
  msgstr ""
240
 
241
- #: partials/admin/how-to-use.php:18
242
  #, php-format
243
  msgid "As a widget - go to the %s and choose “FiboSearch bar”"
244
  msgstr ""
245
 
246
- #: includes/Admin/SettingsAPI.php:585
247
  #, php-format
248
  msgid "Attributes: %s"
249
  msgstr ""
250
 
251
- #: includes/Settings.php:121 partials/admin/search-preview.php:24
252
  msgid "Autocomplete"
253
  msgstr ""
254
 
@@ -257,7 +261,7 @@ msgstr ""
257
  msgid "Based on the plugin %s"
258
  msgstr ""
259
 
260
- #: includes/Settings.php:191 includes/Settings.php:341
261
  msgid "Basic"
262
  msgstr ""
263
 
@@ -265,7 +269,7 @@ msgstr ""
265
  msgid "Blocked search endpoint test"
266
  msgstr ""
267
 
268
- #: includes/Settings.php:552
269
  msgid "Border color"
270
  msgstr ""
271
 
@@ -282,11 +286,11 @@ msgid "Build ID"
282
  msgstr ""
283
 
284
  #: partials/admin/indexer-header-demo.php:15
285
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:706
286
  msgid "Build index"
287
  msgstr ""
288
 
289
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:655
290
  msgid "Canceling..."
291
  msgstr ""
292
 
@@ -319,15 +323,15 @@ msgstr ""
319
  msgid "child theme of <b>%s</b>"
320
  msgstr ""
321
 
322
- #: includes/Settings.php:271
323
  msgid "Colors"
324
  msgstr ""
325
 
326
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:665
327
  msgid "Completed. Works."
328
  msgstr ""
329
 
330
- #: includes/Admin/SettingsAPI.php:724
331
  msgid "Contact"
332
  msgstr ""
333
 
@@ -353,7 +357,7 @@ msgid ""
353
  "variables, try to solve it in an alternative way. Follow steps below:"
354
  msgstr ""
355
 
356
- #: includes/Helpers.php:994
357
  msgid "continue reading"
358
  msgstr ""
359
 
@@ -374,19 +378,30 @@ msgstr ""
374
  msgid "Custom location of wp-load.php file"
375
  msgstr ""
376
 
377
- #: includes/Settings.php:703
378
  msgid "daily"
379
  msgstr ""
380
 
 
 
 
 
 
 
 
 
 
 
 
381
  #: partials/admin/indexer-body.php:46
382
  msgid "DB"
383
  msgstr ""
384
 
385
- #: partials/admin/debug/debug.php:21
386
  msgid "Debug page"
387
  msgstr ""
388
 
389
- #: widget.php:38 includes/EmbeddingViaMenu.php:186
390
  msgid "Default"
391
  msgstr ""
392
 
@@ -399,7 +414,7 @@ msgstr ""
399
  msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
400
  msgstr ""
401
 
402
- #: includes/Settings.php:464
403
  msgid "Details panel"
404
  msgstr ""
405
 
@@ -429,7 +444,7 @@ msgstr ""
429
  msgid "Enable alternative search endpoint"
430
  msgstr ""
431
 
432
- #: includes/Settings.php:690
433
  msgid "Enable Scheduler"
434
  msgstr ""
435
 
@@ -447,25 +462,25 @@ msgstr ""
447
  msgid "Error establishing a database connection"
448
  msgstr ""
449
 
450
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:670
451
  msgid "Errors"
452
  msgstr ""
453
 
454
- #: includes/Settings.php:654 includes/Settings.php:765
455
  msgid "Exclude"
456
  msgstr ""
457
 
458
- #: includes/Settings.php:650 includes/Settings.php:761
459
  msgid ""
460
  "Exclude the product group from the search results or allow search only among "
461
  "the indicated product group"
462
  msgstr ""
463
 
464
- #: includes/Settings.php:616
465
  msgid "Exclude “out of stock” products"
466
  msgstr ""
467
 
468
- #: includes/Settings.php:643 includes/Settings.php:754
469
  msgid "Exclude/include products"
470
  msgstr ""
471
 
@@ -481,7 +496,7 @@ msgstr ""
481
  msgid "FiboSearch - AJAX Search for WooCommerce"
482
  msgstr ""
483
 
484
- #: widget.php:27 includes/EmbeddingViaMenu.php:55
485
  #: includes/EmbeddingViaMenu.php:156
486
  msgid "FiboSearch bar"
487
  msgstr ""
@@ -504,15 +519,15 @@ msgid ""
504
  "connection is required."
505
  msgstr ""
506
 
507
- #: includes/Settings.php:649 includes/Settings.php:760
508
  msgid "Filtering mode"
509
  msgstr ""
510
 
511
- #: includes/Settings.php:661 includes/Settings.php:772
512
  msgid "Filters"
513
  msgstr ""
514
 
515
- #: includes/Settings.php:662 includes/Settings.php:773
516
  msgid ""
517
  "Filters that specify the product group that will be affected by the above "
518
  "mode"
@@ -535,11 +550,19 @@ msgstr ""
535
  msgid "Flatsome Theme"
536
  msgstr ""
537
 
538
- #: includes/Settings.php:622
 
 
 
 
 
 
 
 
539
  msgid "Fuzziness"
540
  msgstr ""
541
 
542
- #: includes/Settings.php:738 includes/Settings.php:800
543
  msgid "Fuzzy matching"
544
  msgstr ""
545
 
@@ -630,11 +653,11 @@ msgid ""
630
  "functioning of our plugin."
631
  msgstr ""
632
 
633
- #: includes/Settings.php:355
634
  msgid "Group results"
635
  msgstr ""
636
 
637
- #: includes/Settings.php:746 includes/Settings.php:808
638
  msgid "Hard"
639
  msgstr ""
640
 
@@ -649,7 +672,7 @@ msgid ""
649
  "using Impreza child-theme."
650
  msgstr ""
651
 
652
- #: includes/Admin/Promo/FeedbackNotice.php:73
653
  #, php-format
654
  msgid ""
655
  "Hey %s, it's Damian Góra from %s. You have used this free plugin for some "
@@ -660,7 +683,7 @@ msgstr ""
660
  msgid "Hide details"
661
  msgstr ""
662
 
663
- #: includes/Settings.php:545
664
  msgid "Highlight color"
665
  msgstr ""
666
 
@@ -683,7 +706,7 @@ msgstr ""
683
  msgid "I've fixed it! Restore the default endpoint"
684
  msgstr ""
685
 
686
- #: widget.php:41 includes/Settings.php:247 includes/EmbeddingViaMenu.php:189
687
  msgid "Icon on mobile, search bar on desktop"
688
  msgstr ""
689
 
@@ -732,12 +755,12 @@ msgstr ""
732
  msgid "Impreza Theme"
733
  msgstr ""
734
 
735
- #: includes/Helpers.php:993
736
  msgctxt "in categories fe. in Books > Crime stories"
737
  msgid "in"
738
  msgstr ""
739
 
740
- #: includes/Settings.php:691
741
  msgid ""
742
  "In most cases, you don't need to use the scheduler because the search index "
743
  "updates when you edit products. If you use import tools or custom code to "
@@ -745,7 +768,7 @@ msgid ""
745
  "helpful."
746
  msgstr ""
747
 
748
- #: includes/Settings.php:655 includes/Settings.php:766
749
  msgid "Include"
750
  msgstr ""
751
 
@@ -786,7 +809,7 @@ msgstr ""
786
  msgid "Increase sales"
787
  msgstr ""
788
 
789
- #: includes/Settings.php:719
790
  msgid "Increases sales conversions"
791
  msgstr ""
792
 
@@ -802,7 +825,7 @@ msgstr ""
802
  msgid "Index completeness test"
803
  msgstr ""
804
 
805
- #: includes/Settings.php:782 includes/Settings.php:816
806
  msgid "Index status"
807
  msgstr ""
808
 
@@ -847,7 +870,7 @@ msgid ""
847
  "can!"
848
  msgstr ""
849
 
850
- #: includes/Settings.php:699
851
  msgid "Interval"
852
  msgstr ""
853
 
@@ -901,12 +924,12 @@ msgstr ""
901
  msgid "Last build %s"
902
  msgstr ""
903
 
904
- #: widget.php:43 includes/Settings.php:236 includes/Settings.php:242
905
  #: includes/EmbeddingViaMenu.php:74
906
  msgid "Layout"
907
  msgstr ""
908
 
909
- #: includes/Settings.php:347
910
  msgid "Limit"
911
  msgstr ""
912
 
@@ -918,7 +941,7 @@ msgstr ""
918
  msgid "Loopback request"
919
  msgstr ""
920
 
921
- #: partials/admin/search-preview.php:150 partials/admin/search-preview.php:195
922
  msgid ""
923
  "Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. "
924
  "Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin "
@@ -937,7 +960,7 @@ msgstr ""
937
  msgid "Max form width"
938
  msgstr ""
939
 
940
- #: includes/Settings.php:350
941
  msgid "maximum number of suggestions"
942
  msgstr ""
943
 
@@ -947,7 +970,7 @@ msgid ""
947
  "Contact your hosting provider and ask what can block the URL you see above."
948
  msgstr ""
949
 
950
- #: partials/admin/how-to-use.php:16
951
  msgid "Menu Screen"
952
  msgstr ""
953
 
@@ -973,7 +996,7 @@ msgid ""
973
  "algorithms"
974
  msgstr ""
975
 
976
- #: includes/Settings.php:412
977
  msgid "More results label"
978
  msgstr ""
979
 
@@ -981,7 +1004,7 @@ msgstr ""
981
  msgid "Multilingual slugs"
982
  msgstr ""
983
 
984
- #: includes/Admin/SettingsAPI.php:731
985
  msgid "My Account"
986
  msgstr ""
987
 
@@ -989,15 +1012,15 @@ msgstr ""
989
  msgid "NGINX configuration may blocks search requests"
990
  msgstr ""
991
 
992
- #: includes/Settings.php:365 includes/Helpers.php:995
993
  msgid "No results"
994
  msgstr ""
995
 
996
- #: includes/Admin/SettingsAPI.php:524 includes/Admin/SettingsAPI.php:623
997
  msgid "No rules"
998
  msgstr ""
999
 
1000
- #: includes/Admin/Promo/FeedbackNotice.php:88
1001
  msgid "No thanks"
1002
  msgstr ""
1003
 
@@ -1005,15 +1028,15 @@ msgstr ""
1005
  msgid "Non Critical Indexer Errors"
1006
  msgstr ""
1007
 
1008
- #: includes/Settings.php:418
1009
  msgid "Non-products in autocomplete"
1010
  msgstr ""
1011
 
1012
- #: includes/Settings.php:745 includes/Settings.php:807
1013
  msgid "Normal"
1014
  msgstr ""
1015
 
1016
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:676
1017
  msgid "Not exist"
1018
  msgstr ""
1019
 
@@ -1049,19 +1072,19 @@ msgstr ""
1049
  msgid "Posts & pages"
1050
  msgstr ""
1051
 
1052
- #: includes/Settings.php:319
1053
  msgid "Preloader"
1054
  msgstr ""
1055
 
1056
- #: partials/admin/search-preview.php:22
1057
  msgid "Preview"
1058
  msgstr ""
1059
 
1060
- #: includes/Helpers.php:478 includes/Helpers.php:482
1061
  msgid "Pro"
1062
  msgstr ""
1063
 
1064
- #: includes/Settings.php:671
1065
  msgid "Pro features"
1066
  msgstr ""
1067
 
@@ -1069,23 +1092,23 @@ msgstr ""
1069
  msgid "Processing asynchronous tests..."
1070
  msgstr ""
1071
 
1072
- #: includes/Admin/SettingsAPI.php:580
1073
  msgid "Product categories"
1074
  msgstr ""
1075
 
1076
- #: includes/Admin/SettingsAPI.php:582
1077
  msgid "Product tags"
1078
  msgstr ""
1079
 
1080
- #: includes/Settings.php:369 partials/admin/indexer-body.php:58
1081
  msgid "Products"
1082
  msgstr ""
1083
 
1084
- #: partials/search-form.php:31 partials/admin/search-preview.php:34
1085
  msgid "Products search"
1086
  msgstr ""
1087
 
1088
- #: includes/Settings.php:561
1089
  msgid "Products search scope"
1090
  msgstr ""
1091
 
@@ -1123,12 +1146,12 @@ msgstr ""
1123
  #: includes/Admin/Troubleshooting.php:1067
1124
  #: includes/Admin/Troubleshooting.php:1150
1125
  #: includes/Admin/Troubleshooting.php:1188
1126
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:700
1127
  msgid "Rebuild index"
1128
  msgstr ""
1129
 
1130
  #: includes/Abstracts/ThemeIntegration.php:62
1131
- #: includes/Integrations/Themes/TheGem/TheGem.php:92
1132
  #: includes/Integrations/Themes/Enfold/Enfold.php:63
1133
  #: includes/Integrations/Themes/Sober/Sober.php:56
1134
  #: includes/Integrations/Themes/The7/The7.php:59
@@ -1165,7 +1188,7 @@ msgstr ""
1165
  msgid "Replace %s search bar"
1166
  msgstr ""
1167
 
1168
- #: includes/Integrations/Themes/TheGem/TheGem.php:72
1169
  msgid "Replace a search bar in TheGem "
1170
  msgstr ""
1171
 
@@ -1201,7 +1224,7 @@ msgstr ""
1201
  msgid "Replace Storefront search bar"
1202
  msgstr ""
1203
 
1204
- #: includes/Integrations/Themes/TheGem/TheGem.php:93
1205
  msgid "Replace the TheGem default search"
1206
  msgstr ""
1207
 
@@ -1215,51 +1238,51 @@ msgstr ""
1215
  msgid "Response body"
1216
  msgstr ""
1217
 
1218
- #: includes/Settings.php:720
1219
  msgid ""
1220
  "returns suggestions based on likely relevance, even though a search keyword "
1221
  "may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
1222
  "results as for “iphone”"
1223
  msgstr ""
1224
 
1225
- #: includes/Admin/Promo/FeedbackNotice.php:84
1226
  #, php-format
1227
  msgid "Review %s"
1228
  msgstr ""
1229
 
1230
- #: partials/admin/search-preview.php:77
1231
  msgid "Sample brand <strong>name</strong>"
1232
  msgstr ""
1233
 
1234
- #: partials/admin/search-preview.php:93
1235
  msgid "Sample category <strong>name</strong>"
1236
  msgstr ""
1237
 
1238
- #: partials/admin/search-preview.php:132
1239
  msgid "Sample page <strong>name</strong>"
1240
  msgstr ""
1241
 
1242
- #: partials/admin/search-preview.php:119
1243
  msgid "Sample post <strong>name</strong>"
1244
  msgstr ""
1245
 
1246
- #: partials/admin/search-preview.php:148
1247
  msgid "Sample product <strong>name</strong>"
1248
  msgstr ""
1249
 
1250
- #: partials/admin/search-preview.php:184
1251
  msgid "Sample product name"
1252
  msgstr ""
1253
 
1254
- #: partials/admin/search-preview.php:106
1255
  msgid "Sample tag <strong>name</strong>"
1256
  msgstr ""
1257
 
1258
- #: includes/Settings.php:710
1259
  msgid "Schedule time"
1260
  msgstr ""
1261
 
1262
- #: includes/Settings.php:684
1263
  msgid "Scheduling indexing"
1264
  msgstr ""
1265
 
@@ -1268,11 +1291,11 @@ msgid "Search"
1268
  msgstr ""
1269
 
1270
  #: includes/Settings.php:117 includes/EmbeddingViaMenu.php:247
1271
- #: partials/admin/search-preview.php:23
1272
  msgid "Search bar"
1273
  msgstr ""
1274
 
1275
- #: widget.php:39 includes/Settings.php:245 includes/EmbeddingViaMenu.php:187
1276
  msgid "Search bar only"
1277
  msgstr ""
1278
 
@@ -1288,11 +1311,11 @@ msgstr ""
1288
  msgid "Search for posts and pages"
1289
  msgstr ""
1290
 
1291
- #: includes/Settings.php:232 includes/Helpers.php:998
1292
  msgid "Search for products..."
1293
  msgstr ""
1294
 
1295
- #: widget.php:40 includes/Settings.php:246 includes/Settings.php:277
1296
  #: includes/EmbeddingViaMenu.php:188
1297
  msgid "Search icon"
1298
  msgstr ""
@@ -1301,12 +1324,12 @@ msgstr ""
1301
  msgid "Search icon color"
1302
  msgstr ""
1303
 
1304
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:196
1305
  #, php-format
1306
  msgid "Search in %s"
1307
  msgstr ""
1308
 
1309
- #: includes/Settings.php:588 partials/admin/features.php:23
1310
  msgid "Search in attributes"
1311
  msgstr ""
1312
 
@@ -1322,28 +1345,28 @@ msgstr ""
1322
  msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
1323
  msgstr ""
1324
 
1325
- #: includes/Settings.php:595 partials/admin/features.php:24
1326
  msgid "Search in categories"
1327
  msgstr ""
1328
 
1329
- #: includes/Settings.php:609 includes/Settings.php:729
1330
  #: partials/admin/features.php:22
1331
  msgid "Search in custom fields"
1332
  msgstr ""
1333
 
1334
- #: includes/Settings.php:567
1335
  msgid "Search in description"
1336
  msgstr ""
1337
 
1338
- #: includes/Settings.php:573
1339
  msgid "Search in short description"
1340
  msgstr ""
1341
 
1342
- #: includes/Settings.php:579
1343
  msgid "Search in SKU"
1344
  msgstr ""
1345
 
1346
- #: includes/Settings.php:602 partials/admin/features.php:25
1347
  msgid "Search in tags"
1348
  msgstr ""
1349
 
@@ -1351,11 +1374,11 @@ msgstr ""
1351
  msgid "Search in vendors"
1352
  msgstr ""
1353
 
1354
- #: includes/Settings.php:284
1355
  msgid "Search input background"
1356
  msgstr ""
1357
 
1358
- #: includes/Settings.php:298
1359
  msgid "Search input border"
1360
  msgstr ""
1361
 
@@ -1363,15 +1386,15 @@ msgstr ""
1363
  msgid "Search input placeholder"
1364
  msgstr ""
1365
 
1366
- #: includes/Settings.php:291
1367
  msgid "Search input text"
1368
  msgstr ""
1369
 
1370
- #: includes/Settings.php:305
1371
  msgid "Search submit background"
1372
  msgstr ""
1373
 
1374
- #: includes/Settings.php:312
1375
  msgid "Search submit text"
1376
  msgstr ""
1377
 
@@ -1379,11 +1402,11 @@ msgstr ""
1379
  msgid "Searchable"
1380
  msgstr ""
1381
 
1382
- #: includes/Settings.php:581
1383
  msgid "searching also in variable products SKU"
1384
  msgstr ""
1385
 
1386
- #: includes/Settings.php:582
1387
  #, php-format
1388
  msgid ""
1389
  "Searching in variable products SKU is available only in <a target=\"_blank\" "
@@ -1394,15 +1417,16 @@ msgstr ""
1394
  msgid "See a comparison of all free and premium features!"
1395
  msgstr ""
1396
 
1397
- #: includes/Settings.php:414 includes/Helpers.php:996 includes/Helpers.php:997
 
1398
  msgid "See all products..."
1399
  msgstr ""
1400
 
1401
- #: includes/Admin/SettingsAPI.php:578
1402
  msgid "Select filter type"
1403
  msgstr ""
1404
 
1405
- #: includes/Settings.php:732
1406
  msgid "select the custom fields you want to add to the search scope"
1407
  msgstr ""
1408
 
@@ -1422,7 +1446,7 @@ msgstr ""
1422
  msgid "Settings"
1423
  msgstr ""
1424
 
1425
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:242
1426
  #, php-format
1427
  msgid "Show %s"
1428
  msgstr ""
@@ -1435,7 +1459,7 @@ msgstr ""
1435
  msgid "Show brands"
1436
  msgstr ""
1437
 
1438
- #: includes/Settings.php:424
1439
  msgid "Show categories"
1440
  msgstr ""
1441
 
@@ -1444,44 +1468,44 @@ msgstr ""
1444
  msgid "Show details"
1445
  msgstr ""
1446
 
1447
- #: includes/Settings.php:470
1448
  msgid "Show Details panel"
1449
  msgstr ""
1450
 
1451
- #: includes/Settings.php:432 includes/Settings.php:436
1452
  #: includes/Integrations/Brands.php:229 includes/Integrations/Brands.php:233
1453
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:208
1454
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:212
1455
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:253
1456
- #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:257
1457
  msgid "show images"
1458
  msgstr ""
1459
 
1460
- #: includes/Settings.php:457
1461
  msgid "Show pages"
1462
  msgstr ""
1463
 
1464
- #: includes/Settings.php:450
1465
  msgid "Show posts"
1466
  msgstr ""
1467
 
1468
- #: includes/Settings.php:325
1469
  msgid "Show preloader"
1470
  msgstr ""
1471
 
1472
- #: includes/Settings.php:381
1473
  msgid "Show price"
1474
  msgstr ""
1475
 
1476
- #: includes/Settings.php:387
1477
  msgid "Show product description"
1478
  msgstr ""
1479
 
1480
- #: includes/Settings.php:375
1481
  msgid "Show product image"
1482
  msgstr ""
1483
 
1484
- #: includes/Settings.php:394
1485
  msgid "Show SKU"
1486
  msgstr ""
1487
 
@@ -1489,7 +1513,7 @@ msgstr ""
1489
  msgid "Show submit button"
1490
  msgstr ""
1491
 
1492
- #: includes/Settings.php:442
1493
  msgid "Show tags"
1494
  msgstr ""
1495
 
@@ -1497,15 +1521,15 @@ msgstr ""
1497
  msgid "Show vendors next to products"
1498
  msgstr ""
1499
 
1500
- #: includes/Admin/SettingsAPI.php:727
1501
  msgid "Showcase"
1502
  msgstr ""
1503
 
1504
- #: includes/Settings.php:744 includes/Settings.php:806
1505
  msgid "Soft"
1506
  msgstr ""
1507
 
1508
- #: includes/Helpers.php:991
1509
  msgid "Sold by:"
1510
  msgstr ""
1511
 
@@ -1540,7 +1564,7 @@ msgid ""
1540
  "to execute the following file: %s"
1541
  msgstr ""
1542
 
1543
- #: includes/Settings.php:677
1544
  msgid "Speed up search!"
1545
  msgstr ""
1546
 
@@ -1567,7 +1591,7 @@ msgstr ""
1567
  msgid "Step %d"
1568
  msgstr ""
1569
 
1570
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:697
1571
  msgid "Stop process"
1572
  msgstr ""
1573
 
@@ -1583,24 +1607,24 @@ msgstr ""
1583
  msgid "Sucuri Security firewall may block AJAX calls of the live search"
1584
  msgstr ""
1585
 
1586
- #: includes/Settings.php:524
1587
  msgid "Suggestion background"
1588
  msgstr ""
1589
 
1590
- #: includes/Settings.php:531
1591
  msgid "Suggestion selected"
1592
  msgstr ""
1593
 
1594
- #: includes/Settings.php:518
1595
  msgid "Suggestions colors"
1596
  msgstr ""
1597
 
1598
- #: includes/Settings.php:628 includes/Settings.php:634
1599
  #: partials/admin/features.php:29 includes/Admin/Promo/Upgrade.php:50
1600
  msgid "Synonyms"
1601
  msgstr ""
1602
 
1603
- #: includes/Settings.php:637
1604
  msgid ""
1605
  "Synonyms should be separated by a comma. Each new synonyms group is entered "
1606
  "on a new line. You can use a phrase instead of a single word. <br /> <br />"
@@ -1612,7 +1636,7 @@ msgstr ""
1612
  msgid "Taxonomies"
1613
  msgstr ""
1614
 
1615
- #: includes/Settings.php:538
1616
  msgid "Text color"
1617
  msgstr ""
1618
 
@@ -1627,14 +1651,14 @@ msgid ""
1627
  "should you do next?"
1628
  msgstr ""
1629
 
1630
- #: includes/Settings.php:471
1631
  msgid ""
1632
  "The Details panel is an additional container for extended information. The "
1633
  "details are changed dynamically when a user mouse over one of the "
1634
  "suggestions."
1635
  msgstr ""
1636
 
1637
- #: includes/Admin/Promo/FeedbackNotice.php:78
1638
  #, php-format
1639
  msgid ""
1640
  "The FiboSearch team have spent countless hours developing it, and it would "
@@ -1678,17 +1702,17 @@ msgstr ""
1678
  msgid "The MySQL server has the InnoDB engine turned off"
1679
  msgstr ""
1680
 
1681
- #: includes/Engines/TNTSearchMySQL/Indexer/Scheduler.php:281
1682
  #, php-format
1683
  msgid "the next index rebuild: %s"
1684
  msgstr ""
1685
 
1686
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:669
1687
  msgid "The search index could not be built."
1688
  msgstr ""
1689
 
1690
  #: partials/admin/indexer-header-demo.php:11
1691
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:675
1692
  msgid "The search index does not exist yet. Build it now."
1693
  msgstr ""
1694
 
@@ -1696,13 +1720,13 @@ msgstr ""
1696
  msgid "The search index structure isn't complete"
1697
  msgstr ""
1698
 
1699
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:663
1700
  msgid ""
1701
  "The search index was built successfully, but some non-critical errors "
1702
  "occurred."
1703
  msgstr ""
1704
 
1705
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:661
1706
  msgid "The search index was built successfully."
1707
  msgstr ""
1708
 
@@ -1728,18 +1752,18 @@ msgid ""
1728
  "The server returns an incorrect response for the search engine's AJAX calls"
1729
  msgstr ""
1730
 
1731
- #: includes/Settings.php:635
1732
  msgid ""
1733
  "The synonyms feature allows your users to find more relevant results. If "
1734
  "your products have alternative names and users often misspell them, consider "
1735
  "adding synonyms."
1736
  msgstr ""
1737
 
1738
- #: includes/Integrations/Themes/TheGem/TheGem.php:79
1739
  msgid "TheGem Theme"
1740
  msgstr ""
1741
 
1742
- #: partials/admin/how-to-use.php:14
1743
  msgid "There are four easy ways to display the search bar in your theme"
1744
  msgstr ""
1745
 
@@ -1773,8 +1797,16 @@ msgid ""
1773
  "every time"
1774
  msgstr ""
1775
 
1776
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:643
1777
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:649
 
 
 
 
 
 
 
 
1778
  msgid "This process will continue in the background. You can leave this page!"
1779
  msgstr ""
1780
 
@@ -1783,7 +1815,7 @@ msgstr ""
1783
  msgid "Time"
1784
  msgstr ""
1785
 
1786
- #: widget.php:32
1787
  msgid "Title"
1788
  msgstr ""
1789
 
@@ -1824,7 +1856,7 @@ msgstr ""
1824
  msgid "Troubleshooting"
1825
  msgstr ""
1826
 
1827
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:703
1828
  msgid "Try to build the index again."
1829
  msgstr ""
1830
 
@@ -1854,16 +1886,16 @@ msgstr ""
1854
  msgid "Upgrade Now!"
1855
  msgstr ""
1856
 
1857
- #: includes/Settings.php:332
1858
  msgid "Upload preloader image"
1859
  msgstr ""
1860
 
1861
- #: partials/admin/how-to-use.php:17
1862
  #, php-format
1863
  msgid "Using a shortcode - %s"
1864
  msgstr ""
1865
 
1866
- #: partials/admin/how-to-use.php:19
1867
  #, php-format
1868
  msgid "Using PHP - %s"
1869
  msgstr ""
@@ -1872,23 +1904,23 @@ msgstr ""
1872
  msgid "Valid search results test"
1873
  msgstr ""
1874
 
1875
- #: includes/Helpers.php:984
1876
  msgid "Vendor"
1877
  msgstr ""
1878
 
1879
- #: includes/Helpers.php:988
1880
  msgid "Vendors"
1881
  msgstr ""
1882
 
1883
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:648
1884
  msgid "Wait... Indexing in progress"
1885
  msgstr ""
1886
 
1887
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:642
1888
  msgid "Wait... Preparing indexing in progress"
1889
  msgstr ""
1890
 
1891
- #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:654
1892
  msgid "Wait... The index build process is canceling"
1893
  msgstr ""
1894
 
@@ -1920,7 +1952,7 @@ msgid ""
1920
  "from a different WordPress."
1921
  msgstr ""
1922
 
1923
- #: includes/Settings.php:704
1924
  msgid "weekly"
1925
  msgstr ""
1926
 
@@ -1928,7 +1960,7 @@ msgstr ""
1928
  msgid "What's wrong?"
1929
  msgstr ""
1930
 
1931
- #: partials/admin/how-to-use.php:18
1932
  msgid "Widgets Screen"
1933
  msgstr ""
1934
 
3
  msgstr ""
4
  "Project-Id-Version: PACKAGE VERSION\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2022-02-23 21:16+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"
18
  msgid "\"Out of stock\" relationships"
19
  msgstr ""
20
 
21
+ #: includes/Engines/TNTSearchMySQL/Indexer/Logger.php:41
22
  #, php-format
23
  msgid "%1$s was called with an invalid level \"%2$s\"."
24
  msgstr ""
46
  msgid "%s Theme"
47
  msgstr ""
48
 
49
+ #: includes/Admin/RegenerateImages.php:96
50
  #, php-format
51
  msgid ""
52
  "%s: it is recommended to generate a special small image size for existing "
61
  "using PHP version "
62
  msgstr ""
63
 
64
+ #: includes/Settings.php:272
65
+ msgid "(beta feature)"
66
+ msgstr ""
67
+
68
+ #: includes/Settings.php:752 includes/Settings.php:814
69
  msgid "-- Disabled"
70
  msgstr ""
71
 
149
  msgid "Add FiboSearch as a menu item."
150
  msgstr ""
151
 
152
+ #: includes/Admin/SettingsAPI.php:524 includes/Admin/SettingsAPI.php:625
153
  msgid "Add new rule"
154
  msgstr ""
155
 
169
  "conf</code>"
170
  msgstr ""
171
 
172
+ #: includes/Settings.php:372
173
  msgctxt "admin"
174
  msgid "No results label"
175
  msgstr ""
176
 
177
+ #: widget.php:24
178
  msgid "AJAX (live) search form for WooCommerce"
179
  msgstr ""
180
 
192
  msgstr ""
193
 
194
  #: includes/Abstracts/ThemeIntegration.php:70
 
195
  #: includes/Integrations/Themes/TheGem/TheGem.php:108
196
+ #: includes/Integrations/Themes/TheGem/TheGem.php:116
197
  #: includes/Integrations/Themes/Enfold/Enfold.php:71
198
  #: includes/Integrations/Themes/Sober/Sober.php:64
199
  #: includes/Integrations/Themes/The7/The7.php:67
228
  msgid "and more..."
229
  msgstr ""
230
 
231
+ #: partials/admin/how-to-use.php:21
232
  #, php-format
233
  msgid ""
234
  "Are there any difficulties? <b>We will do it for you!</b> We offer free of "
236
  "href=\"%s\">Become one now!</a>"
237
  msgstr ""
238
 
239
+ #: partials/admin/how-to-use.php:15
240
  #, php-format
241
  msgid ""
242
  "As a menu item - go to the %s and add the menu item “FiboSearch bar”. Done!"
243
  msgstr ""
244
 
245
+ #: partials/admin/how-to-use.php:17
246
  #, php-format
247
  msgid "As a widget - go to the %s and choose “FiboSearch bar”"
248
  msgstr ""
249
 
250
+ #: includes/Admin/SettingsAPI.php:583
251
  #, php-format
252
  msgid "Attributes: %s"
253
  msgstr ""
254
 
255
+ #: includes/Settings.php:121 partials/admin/search-preview.php:22
256
  msgid "Autocomplete"
257
  msgstr ""
258
 
261
  msgid "Based on the plugin %s"
262
  msgstr ""
263
 
264
+ #: includes/Settings.php:191 includes/Settings.php:350
265
  msgid "Basic"
266
  msgstr ""
267
 
269
  msgid "Blocked search endpoint test"
270
  msgstr ""
271
 
272
+ #: includes/Settings.php:561
273
  msgid "Border color"
274
  msgstr ""
275
 
286
  msgstr ""
287
 
288
  #: partials/admin/indexer-header-demo.php:15
289
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:710
290
  msgid "Build index"
291
  msgstr ""
292
 
293
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:659
294
  msgid "Canceling..."
295
  msgstr ""
296
 
323
  msgid "child theme of <b>%s</b>"
324
  msgstr ""
325
 
326
+ #: includes/Settings.php:280
327
  msgid "Colors"
328
  msgstr ""
329
 
330
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:669
331
  msgid "Completed. Works."
332
  msgstr ""
333
 
334
+ #: includes/Admin/SettingsAPI.php:723
335
  msgid "Contact"
336
  msgstr ""
337
 
357
  "variables, try to solve it in an alternative way. Follow steps below:"
358
  msgstr ""
359
 
360
+ #: includes/Helpers.php:1054
361
  msgid "continue reading"
362
  msgstr ""
363
 
378
  msgid "Custom location of wp-load.php file"
379
  msgstr ""
380
 
381
+ #: includes/Settings.php:712
382
  msgid "daily"
383
  msgstr ""
384
 
385
+ #: includes/Settings.php:271
386
+ msgid "Darkened background"
387
+ msgstr ""
388
+
389
+ #: includes/Settings.php:271
390
+ msgid ""
391
+ "Darkening the page background while autocomplete is active gives it stronger "
392
+ "emphasis, minimizing elements (e.g., ads, carousels, and other page content) "
393
+ "that could distract users from considering autocomplete suggestions."
394
+ msgstr ""
395
+
396
  #: partials/admin/indexer-body.php:46
397
  msgid "DB"
398
  msgstr ""
399
 
400
+ #: partials/admin/debug/debug.php:20
401
  msgid "Debug page"
402
  msgstr ""
403
 
404
+ #: widget.php:37 includes/EmbeddingViaMenu.php:186
405
  msgid "Default"
406
  msgstr ""
407
 
414
  msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
415
  msgstr ""
416
 
417
+ #: includes/Settings.php:473
418
  msgid "Details panel"
419
  msgstr ""
420
 
444
  msgid "Enable alternative search endpoint"
445
  msgstr ""
446
 
447
+ #: includes/Settings.php:699
448
  msgid "Enable Scheduler"
449
  msgstr ""
450
 
462
  msgid "Error establishing a database connection"
463
  msgstr ""
464
 
465
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:674
466
  msgid "Errors"
467
  msgstr ""
468
 
469
+ #: includes/Settings.php:663 includes/Settings.php:774
470
  msgid "Exclude"
471
  msgstr ""
472
 
473
+ #: includes/Settings.php:659 includes/Settings.php:770
474
  msgid ""
475
  "Exclude the product group from the search results or allow search only among "
476
  "the indicated product group"
477
  msgstr ""
478
 
479
+ #: includes/Settings.php:625
480
  msgid "Exclude “out of stock” products"
481
  msgstr ""
482
 
483
+ #: includes/Settings.php:652 includes/Settings.php:763
484
  msgid "Exclude/include products"
485
  msgstr ""
486
 
496
  msgid "FiboSearch - AJAX Search for WooCommerce"
497
  msgstr ""
498
 
499
+ #: widget.php:26 includes/EmbeddingViaMenu.php:55
500
  #: includes/EmbeddingViaMenu.php:156
501
  msgid "FiboSearch bar"
502
  msgstr ""
519
  "connection is required."
520
  msgstr ""
521
 
522
+ #: includes/Settings.php:658 includes/Settings.php:769
523
  msgid "Filtering mode"
524
  msgstr ""
525
 
526
+ #: includes/Settings.php:670 includes/Settings.php:781
527
  msgid "Filters"
528
  msgstr ""
529
 
530
+ #: includes/Settings.php:671 includes/Settings.php:782
531
  msgid ""
532
  "Filters that specify the product group that will be affected by the above "
533
  "mode"
550
  msgid "Flatsome Theme"
551
  msgstr ""
552
 
553
+ #: includes/Helpers.php:952
554
+ #, php-format
555
+ msgid ""
556
+ "Furthermore, you can override this option for a specific search bar via "
557
+ "shortcode params. <a href=\"%s\" target=\"_blank\">Learn more about "
558
+ "shortcodes parameters</a>."
559
+ msgstr ""
560
+
561
+ #: includes/Settings.php:631
562
  msgid "Fuzziness"
563
  msgstr ""
564
 
565
+ #: includes/Settings.php:747 includes/Settings.php:809
566
  msgid "Fuzzy matching"
567
  msgstr ""
568
 
653
  "functioning of our plugin."
654
  msgstr ""
655
 
656
+ #: includes/Settings.php:364
657
  msgid "Group results"
658
  msgstr ""
659
 
660
+ #: includes/Settings.php:755 includes/Settings.php:817
661
  msgid "Hard"
662
  msgstr ""
663
 
672
  "using Impreza child-theme."
673
  msgstr ""
674
 
675
+ #: includes/Admin/Promo/FeedbackNotice.php:71
676
  #, php-format
677
  msgid ""
678
  "Hey %s, it's Damian Góra from %s. You have used this free plugin for some "
683
  msgid "Hide details"
684
  msgstr ""
685
 
686
+ #: includes/Settings.php:554
687
  msgid "Highlight color"
688
  msgstr ""
689
 
706
  msgid "I've fixed it! Restore the default endpoint"
707
  msgstr ""
708
 
709
+ #: widget.php:40 includes/Settings.php:247 includes/EmbeddingViaMenu.php:189
710
  msgid "Icon on mobile, search bar on desktop"
711
  msgstr ""
712
 
755
  msgid "Impreza Theme"
756
  msgstr ""
757
 
758
+ #: includes/Helpers.php:1053
759
  msgctxt "in categories fe. in Books > Crime stories"
760
  msgid "in"
761
  msgstr ""
762
 
763
+ #: includes/Settings.php:700
764
  msgid ""
765
  "In most cases, you don't need to use the scheduler because the search index "
766
  "updates when you edit products. If you use import tools or custom code to "
768
  "helpful."
769
  msgstr ""
770
 
771
+ #: includes/Settings.php:664 includes/Settings.php:775
772
  msgid "Include"
773
  msgstr ""
774
 
809
  msgid "Increase sales"
810
  msgstr ""
811
 
812
+ #: includes/Settings.php:728
813
  msgid "Increases sales conversions"
814
  msgstr ""
815
 
825
  msgid "Index completeness test"
826
  msgstr ""
827
 
828
+ #: includes/Settings.php:791 includes/Settings.php:825
829
  msgid "Index status"
830
  msgstr ""
831
 
870
  "can!"
871
  msgstr ""
872
 
873
+ #: includes/Settings.php:708
874
  msgid "Interval"
875
  msgstr ""
876
 
924
  msgid "Last build %s"
925
  msgstr ""
926
 
927
+ #: widget.php:42 includes/Settings.php:236 includes/Settings.php:242
928
  #: includes/EmbeddingViaMenu.php:74
929
  msgid "Layout"
930
  msgstr ""
931
 
932
+ #: includes/Settings.php:356
933
  msgid "Limit"
934
  msgstr ""
935
 
941
  msgid "Loopback request"
942
  msgstr ""
943
 
944
+ #: partials/admin/search-preview.php:148 partials/admin/search-preview.php:193
945
  msgid ""
946
  "Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. "
947
  "Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin "
960
  msgid "Max form width"
961
  msgstr ""
962
 
963
+ #: includes/Settings.php:359
964
  msgid "maximum number of suggestions"
965
  msgstr ""
966
 
970
  "Contact your hosting provider and ask what can block the URL you see above."
971
  msgstr ""
972
 
973
+ #: partials/admin/how-to-use.php:15
974
  msgid "Menu Screen"
975
  msgstr ""
976
 
996
  "algorithms"
997
  msgstr ""
998
 
999
+ #: includes/Settings.php:421
1000
  msgid "More results label"
1001
  msgstr ""
1002
 
1004
  msgid "Multilingual slugs"
1005
  msgstr ""
1006
 
1007
+ #: includes/Admin/SettingsAPI.php:730
1008
  msgid "My Account"
1009
  msgstr ""
1010
 
1012
  msgid "NGINX configuration may blocks search requests"
1013
  msgstr ""
1014
 
1015
+ #: includes/Settings.php:374 includes/Helpers.php:1055
1016
  msgid "No results"
1017
  msgstr ""
1018
 
1019
+ #: includes/Admin/SettingsAPI.php:522 includes/Admin/SettingsAPI.php:621
1020
  msgid "No rules"
1021
  msgstr ""
1022
 
1023
+ #: includes/Admin/Promo/FeedbackNotice.php:86
1024
  msgid "No thanks"
1025
  msgstr ""
1026
 
1028
  msgid "Non Critical Indexer Errors"
1029
  msgstr ""
1030
 
1031
+ #: includes/Settings.php:427
1032
  msgid "Non-products in autocomplete"
1033
  msgstr ""
1034
 
1035
+ #: includes/Settings.php:754 includes/Settings.php:816
1036
  msgid "Normal"
1037
  msgstr ""
1038
 
1039
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:680
1040
  msgid "Not exist"
1041
  msgstr ""
1042
 
1072
  msgid "Posts & pages"
1073
  msgstr ""
1074
 
1075
+ #: includes/Settings.php:328
1076
  msgid "Preloader"
1077
  msgstr ""
1078
 
1079
+ #: partials/admin/search-preview.php:20
1080
  msgid "Preview"
1081
  msgstr ""
1082
 
1083
+ #: includes/Helpers.php:488 includes/Helpers.php:492
1084
  msgid "Pro"
1085
  msgstr ""
1086
 
1087
+ #: includes/Settings.php:680
1088
  msgid "Pro features"
1089
  msgstr ""
1090
 
1092
  msgid "Processing asynchronous tests..."
1093
  msgstr ""
1094
 
1095
+ #: includes/Admin/SettingsAPI.php:578
1096
  msgid "Product categories"
1097
  msgstr ""
1098
 
1099
+ #: includes/Admin/SettingsAPI.php:580
1100
  msgid "Product tags"
1101
  msgstr ""
1102
 
1103
+ #: includes/Settings.php:378 partials/admin/indexer-body.php:58
1104
  msgid "Products"
1105
  msgstr ""
1106
 
1107
+ #: partials/search-form.php:31 partials/admin/search-preview.php:32
1108
  msgid "Products search"
1109
  msgstr ""
1110
 
1111
+ #: includes/Settings.php:570
1112
  msgid "Products search scope"
1113
  msgstr ""
1114
 
1146
  #: includes/Admin/Troubleshooting.php:1067
1147
  #: includes/Admin/Troubleshooting.php:1150
1148
  #: includes/Admin/Troubleshooting.php:1188
1149
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:704
1150
  msgid "Rebuild index"
1151
  msgstr ""
1152
 
1153
  #: includes/Abstracts/ThemeIntegration.php:62
1154
+ #: includes/Integrations/Themes/TheGem/TheGem.php:100
1155
  #: includes/Integrations/Themes/Enfold/Enfold.php:63
1156
  #: includes/Integrations/Themes/Sober/Sober.php:56
1157
  #: includes/Integrations/Themes/The7/The7.php:59
1188
  msgid "Replace %s search bar"
1189
  msgstr ""
1190
 
1191
+ #: includes/Integrations/Themes/TheGem/TheGem.php:80
1192
  msgid "Replace a search bar in TheGem "
1193
  msgstr ""
1194
 
1224
  msgid "Replace Storefront search bar"
1225
  msgstr ""
1226
 
1227
+ #: includes/Integrations/Themes/TheGem/TheGem.php:101
1228
  msgid "Replace the TheGem default search"
1229
  msgstr ""
1230
 
1238
  msgid "Response body"
1239
  msgstr ""
1240
 
1241
+ #: includes/Settings.php:729
1242
  msgid ""
1243
  "returns suggestions based on likely relevance, even though a search keyword "
1244
  "may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
1245
  "results as for “iphone”"
1246
  msgstr ""
1247
 
1248
+ #: includes/Admin/Promo/FeedbackNotice.php:82
1249
  #, php-format
1250
  msgid "Review %s"
1251
  msgstr ""
1252
 
1253
+ #: partials/admin/search-preview.php:75
1254
  msgid "Sample brand <strong>name</strong>"
1255
  msgstr ""
1256
 
1257
+ #: partials/admin/search-preview.php:91
1258
  msgid "Sample category <strong>name</strong>"
1259
  msgstr ""
1260
 
1261
+ #: partials/admin/search-preview.php:130
1262
  msgid "Sample page <strong>name</strong>"
1263
  msgstr ""
1264
 
1265
+ #: partials/admin/search-preview.php:117
1266
  msgid "Sample post <strong>name</strong>"
1267
  msgstr ""
1268
 
1269
+ #: partials/admin/search-preview.php:146
1270
  msgid "Sample product <strong>name</strong>"
1271
  msgstr ""
1272
 
1273
+ #: partials/admin/search-preview.php:182
1274
  msgid "Sample product name"
1275
  msgstr ""
1276
 
1277
+ #: partials/admin/search-preview.php:104
1278
  msgid "Sample tag <strong>name</strong>"
1279
  msgstr ""
1280
 
1281
+ #: includes/Settings.php:719
1282
  msgid "Schedule time"
1283
  msgstr ""
1284
 
1285
+ #: includes/Settings.php:693
1286
  msgid "Scheduling indexing"
1287
  msgstr ""
1288
 
1291
  msgstr ""
1292
 
1293
  #: includes/Settings.php:117 includes/EmbeddingViaMenu.php:247
1294
+ #: partials/admin/search-preview.php:21
1295
  msgid "Search bar"
1296
  msgstr ""
1297
 
1298
+ #: widget.php:38 includes/Settings.php:245 includes/EmbeddingViaMenu.php:187
1299
  msgid "Search bar only"
1300
  msgstr ""
1301
 
1311
  msgid "Search for posts and pages"
1312
  msgstr ""
1313
 
1314
+ #: includes/Settings.php:232 includes/Helpers.php:1058
1315
  msgid "Search for products..."
1316
  msgstr ""
1317
 
1318
+ #: widget.php:39 includes/Settings.php:246 includes/Settings.php:286
1319
  #: includes/EmbeddingViaMenu.php:188
1320
  msgid "Search icon"
1321
  msgstr ""
1324
  msgid "Search icon color"
1325
  msgstr ""
1326
 
1327
+ #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:201
1328
  #, php-format
1329
  msgid "Search in %s"
1330
  msgstr ""
1331
 
1332
+ #: includes/Settings.php:597 partials/admin/features.php:23
1333
  msgid "Search in attributes"
1334
  msgstr ""
1335
 
1345
  msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
1346
  msgstr ""
1347
 
1348
+ #: includes/Settings.php:604 partials/admin/features.php:24
1349
  msgid "Search in categories"
1350
  msgstr ""
1351
 
1352
+ #: includes/Settings.php:618 includes/Settings.php:738
1353
  #: partials/admin/features.php:22
1354
  msgid "Search in custom fields"
1355
  msgstr ""
1356
 
1357
+ #: includes/Settings.php:576
1358
  msgid "Search in description"
1359
  msgstr ""
1360
 
1361
+ #: includes/Settings.php:582
1362
  msgid "Search in short description"
1363
  msgstr ""
1364
 
1365
+ #: includes/Settings.php:588
1366
  msgid "Search in SKU"
1367
  msgstr ""
1368
 
1369
+ #: includes/Settings.php:611 partials/admin/features.php:25
1370
  msgid "Search in tags"
1371
  msgstr ""
1372
 
1374
  msgid "Search in vendors"
1375
  msgstr ""
1376
 
1377
+ #: includes/Settings.php:293
1378
  msgid "Search input background"
1379
  msgstr ""
1380
 
1381
+ #: includes/Settings.php:307
1382
  msgid "Search input border"
1383
  msgstr ""
1384
 
1386
  msgid "Search input placeholder"
1387
  msgstr ""
1388
 
1389
+ #: includes/Settings.php:300
1390
  msgid "Search input text"
1391
  msgstr ""
1392
 
1393
+ #: includes/Settings.php:314
1394
  msgid "Search submit background"
1395
  msgstr ""
1396
 
1397
+ #: includes/Settings.php:321
1398
  msgid "Search submit text"
1399
  msgstr ""
1400
 
1402
  msgid "Searchable"
1403
  msgstr ""
1404
 
1405
+ #: includes/Settings.php:590
1406
  msgid "searching also in variable products SKU"
1407
  msgstr ""
1408
 
1409
+ #: includes/Settings.php:591
1410
  #, php-format
1411
  msgid ""
1412
  "Searching in variable products SKU is available only in <a target=\"_blank\" "
1417
  msgid "See a comparison of all free and premium features!"
1418
  msgstr ""
1419
 
1420
+ #: includes/Settings.php:423 includes/Helpers.php:1056
1421
+ #: includes/Helpers.php:1057
1422
  msgid "See all products..."
1423
  msgstr ""
1424
 
1425
+ #: includes/Admin/SettingsAPI.php:576
1426
  msgid "Select filter type"
1427
  msgstr ""
1428
 
1429
+ #: includes/Settings.php:741
1430
  msgid "select the custom fields you want to add to the search scope"
1431
  msgstr ""
1432
 
1446
  msgid "Settings"
1447
  msgstr ""
1448
 
1449
+ #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:247
1450
  #, php-format
1451
  msgid "Show %s"
1452
  msgstr ""
1459
  msgid "Show brands"
1460
  msgstr ""
1461
 
1462
+ #: includes/Settings.php:433
1463
  msgid "Show categories"
1464
  msgstr ""
1465
 
1468
  msgid "Show details"
1469
  msgstr ""
1470
 
1471
+ #: includes/Settings.php:479
1472
  msgid "Show Details panel"
1473
  msgstr ""
1474
 
1475
+ #: includes/Settings.php:441 includes/Settings.php:445
1476
  #: includes/Integrations/Brands.php:229 includes/Integrations/Brands.php:233
1477
+ #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:213
1478
+ #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:217
1479
+ #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:258
1480
+ #: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:262
1481
  msgid "show images"
1482
  msgstr ""
1483
 
1484
+ #: includes/Settings.php:466
1485
  msgid "Show pages"
1486
  msgstr ""
1487
 
1488
+ #: includes/Settings.php:459
1489
  msgid "Show posts"
1490
  msgstr ""
1491
 
1492
+ #: includes/Settings.php:334
1493
  msgid "Show preloader"
1494
  msgstr ""
1495
 
1496
+ #: includes/Settings.php:390
1497
  msgid "Show price"
1498
  msgstr ""
1499
 
1500
+ #: includes/Settings.php:396
1501
  msgid "Show product description"
1502
  msgstr ""
1503
 
1504
+ #: includes/Settings.php:384
1505
  msgid "Show product image"
1506
  msgstr ""
1507
 
1508
+ #: includes/Settings.php:403
1509
  msgid "Show SKU"
1510
  msgstr ""
1511
 
1513
  msgid "Show submit button"
1514
  msgstr ""
1515
 
1516
+ #: includes/Settings.php:451
1517
  msgid "Show tags"
1518
  msgstr ""
1519
 
1521
  msgid "Show vendors next to products"
1522
  msgstr ""
1523
 
1524
+ #: includes/Admin/SettingsAPI.php:726
1525
  msgid "Showcase"
1526
  msgstr ""
1527
 
1528
+ #: includes/Settings.php:753 includes/Settings.php:815
1529
  msgid "Soft"
1530
  msgstr ""
1531
 
1532
+ #: includes/Helpers.php:1051
1533
  msgid "Sold by:"
1534
  msgstr ""
1535
 
1564
  "to execute the following file: %s"
1565
  msgstr ""
1566
 
1567
+ #: includes/Settings.php:686
1568
  msgid "Speed up search!"
1569
  msgstr ""
1570
 
1591
  msgid "Step %d"
1592
  msgstr ""
1593
 
1594
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:701
1595
  msgid "Stop process"
1596
  msgstr ""
1597
 
1607
  msgid "Sucuri Security firewall may block AJAX calls of the live search"
1608
  msgstr ""
1609
 
1610
+ #: includes/Settings.php:533
1611
  msgid "Suggestion background"
1612
  msgstr ""
1613
 
1614
+ #: includes/Settings.php:540
1615
  msgid "Suggestion selected"
1616
  msgstr ""
1617
 
1618
+ #: includes/Settings.php:527
1619
  msgid "Suggestions colors"
1620
  msgstr ""
1621
 
1622
+ #: includes/Settings.php:637 includes/Settings.php:643
1623
  #: partials/admin/features.php:29 includes/Admin/Promo/Upgrade.php:50
1624
  msgid "Synonyms"
1625
  msgstr ""
1626
 
1627
+ #: includes/Settings.php:646
1628
  msgid ""
1629
  "Synonyms should be separated by a comma. Each new synonyms group is entered "
1630
  "on a new line. You can use a phrase instead of a single word. <br /> <br />"
1636
  msgid "Taxonomies"
1637
  msgstr ""
1638
 
1639
+ #: includes/Settings.php:547
1640
  msgid "Text color"
1641
  msgstr ""
1642
 
1651
  "should you do next?"
1652
  msgstr ""
1653
 
1654
+ #: includes/Settings.php:480
1655
  msgid ""
1656
  "The Details panel is an additional container for extended information. The "
1657
  "details are changed dynamically when a user mouse over one of the "
1658
  "suggestions."
1659
  msgstr ""
1660
 
1661
+ #: includes/Admin/Promo/FeedbackNotice.php:76
1662
  #, php-format
1663
  msgid ""
1664
  "The FiboSearch team have spent countless hours developing it, and it would "
1702
  msgid "The MySQL server has the InnoDB engine turned off"
1703
  msgstr ""
1704
 
1705
+ #: includes/Engines/TNTSearchMySQL/Indexer/Scheduler.php:285
1706
  #, php-format
1707
  msgid "the next index rebuild: %s"
1708
  msgstr ""
1709
 
1710
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:673
1711
  msgid "The search index could not be built."
1712
  msgstr ""
1713
 
1714
  #: partials/admin/indexer-header-demo.php:11
1715
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:679
1716
  msgid "The search index does not exist yet. Build it now."
1717
  msgstr ""
1718
 
1720
  msgid "The search index structure isn't complete"
1721
  msgstr ""
1722
 
1723
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:667
1724
  msgid ""
1725
  "The search index was built successfully, but some non-critical errors "
1726
  "occurred."
1727
  msgstr ""
1728
 
1729
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:665
1730
  msgid "The search index was built successfully."
1731
  msgstr ""
1732
 
1752
  "The server returns an incorrect response for the search engine's AJAX calls"
1753
  msgstr ""
1754
 
1755
+ #: includes/Settings.php:644
1756
  msgid ""
1757
  "The synonyms feature allows your users to find more relevant results. If "
1758
  "your products have alternative names and users often misspell them, consider "
1759
  "adding synonyms."
1760
  msgstr ""
1761
 
1762
+ #: includes/Integrations/Themes/TheGem/TheGem.php:87
1763
  msgid "TheGem Theme"
1764
  msgstr ""
1765
 
1766
+ #: partials/admin/how-to-use.php:13
1767
  msgid "There are four easy ways to display the search bar in your theme"
1768
  msgstr ""
1769
 
1797
  "every time"
1798
  msgstr ""
1799
 
1800
+ #: includes/Helpers.php:950
1801
+ #, php-format
1802
+ msgid ""
1803
+ "This option is <b>overridden</b> by the seamless integration with the %s "
1804
+ "theme. If you want to change the value of this option, disable the "
1805
+ "integration in <br /><b>WooCommerce -> FiboSearch -> Starting (tab)</b>."
1806
+ msgstr ""
1807
+
1808
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:647
1809
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:653
1810
  msgid "This process will continue in the background. You can leave this page!"
1811
  msgstr ""
1812
 
1815
  msgid "Time"
1816
  msgstr ""
1817
 
1818
+ #: widget.php:31
1819
  msgid "Title"
1820
  msgstr ""
1821
 
1856
  msgid "Troubleshooting"
1857
  msgstr ""
1858
 
1859
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:707
1860
  msgid "Try to build the index again."
1861
  msgstr ""
1862
 
1886
  msgid "Upgrade Now!"
1887
  msgstr ""
1888
 
1889
+ #: includes/Settings.php:341
1890
  msgid "Upload preloader image"
1891
  msgstr ""
1892
 
1893
+ #: partials/admin/how-to-use.php:16
1894
  #, php-format
1895
  msgid "Using a shortcode - %s"
1896
  msgstr ""
1897
 
1898
+ #: partials/admin/how-to-use.php:18
1899
  #, php-format
1900
  msgid "Using PHP - %s"
1901
  msgstr ""
1904
  msgid "Valid search results test"
1905
  msgstr ""
1906
 
1907
+ #: includes/Helpers.php:1044
1908
  msgid "Vendor"
1909
  msgstr ""
1910
 
1911
+ #: includes/Helpers.php:1048
1912
  msgid "Vendors"
1913
  msgstr ""
1914
 
1915
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:652
1916
  msgid "Wait... Indexing in progress"
1917
  msgstr ""
1918
 
1919
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:646
1920
  msgid "Wait... Preparing indexing in progress"
1921
  msgstr ""
1922
 
1923
+ #: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:658
1924
  msgid "Wait... The index build process is canceling"
1925
  msgstr ""
1926
 
1952
  "from a different WordPress."
1953
  msgstr ""
1954
 
1955
+ #: includes/Settings.php:713
1956
  msgid "weekly"
1957
  msgstr ""
1958
 
1960
  msgid "What's wrong?"
1961
  msgstr ""
1962
 
1963
+ #: partials/admin/how-to-use.php:17
1964
  msgid "Widgets Screen"
1965
  msgstr ""
1966
 
partials/admin/how-to-use.php CHANGED
@@ -7,7 +7,6 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
7
  exit;
8
  }
9
 
10
-
11
  $utmLink = 'https://fibosearch.com/pricing/?utm_source=wp-admin&utm_medium=referral&utm_campaign=upgrade-link&utm_content=how-to-use';
12
 
13
  ?>
7
  exit;
8
  }
9
 
 
10
  $utmLink = 'https://fibosearch.com/pricing/?utm_source=wp-admin&utm_medium=referral&utm_campaign=upgrade-link&utm_content=how-to-use';
11
 
12
  ?>
partials/admin/search-preview.php CHANGED
@@ -2,13 +2,11 @@
2
 
3
  use DgoraWcas\Helpers;
4
 
5
-
6
  // Exit if accessed directly
7
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
8
  exit;
9
  }
10
 
11
-
12
  $submitText = Helpers::getLabel( 'submit' );
13
  $hasSubmit = DGWT_WCAS()->settings->getOption( 'show_submit_button' );
14
 
2
 
3
  use DgoraWcas\Helpers;
4
 
 
5
  // Exit if accessed directly
6
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
7
  exit;
8
  }
9
 
 
10
  $submitText = Helpers::getLabel( 'submit' );
11
  $hasSubmit = DGWT_WCAS()->settings->getOption( 'show_submit_button' );
12
 
partials/details-panel/product-variation.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
 
3
  // Exit if accessed directly
4
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
1
  <?php
2
+ /**
3
+ * The Template for displaying product variation info in Details Panel
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/fibosearch/details-panel/product-variation.php.
6
+ */
7
 
8
  // Exit if accessed directly
9
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
partials/details-panel/product.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
 
3
  // Exit if accessed directly
4
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
@@ -88,4 +93,3 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
88
  <?php do_action( 'dgwt/wcas/details_panel/product/container_after', $vars ); ?>
89
 
90
  </div>
91
-
1
  <?php
2
+ /**
3
+ * The Template for displaying product info in Details Panel
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/fibosearch/details-panel/product.php.
6
+ */
7
 
8
  // Exit if accessed directly
9
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
93
  <?php do_action( 'dgwt/wcas/details_panel/product/container_after', $vars ); ?>
94
 
95
  </div>
 
partials/details-panel/term-product.php CHANGED
@@ -1,4 +1,10 @@
1
  <?php
 
 
 
 
 
 
2
  // Exit if accessed directly
3
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
4
  exit;
1
  <?php
2
+ /**
3
+ * The Template for displaying single product on the list of products from a given category, etc. in the Details Panel
4
+ *
5
+ * This template can be overridden by copying it to yourtheme/fibosearch/details-panel/term-product.php.
6
+ */
7
+
8
  // Exit if accessed directly
9
  if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
10
  exit;
partials/themes/kadence.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+
4
+ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
5
+ exit;
6
+ }
7
+
8
+ function fibosearchKadenceRenderColor( $color ) {
9
+ if ( empty( $color ) ) {
10
+ return false;
11
+ }
12
+ if ( ! is_array( $color ) && strpos( $color, 'palette' ) !== false ) {
13
+ $color = 'var(--global-' . $color . ')';
14
+ }
15
+
16
+ return $color;
17
+ }
18
+
19
+ add_action( 'after_setup_theme', function () {
20
+ remove_action( 'kadence_header_search', 'Kadence\header_search' );
21
+ } );
22
+
23
+ add_action( 'kadence_header_search', function () {
24
+ echo do_shortcode( '[fibosearch layout="icon"]' );
25
+ } );
26
+
27
+ add_action( 'wp_footer', function () {
28
+ $color = '';
29
+ $hoverColor = '';
30
+ if ( function_exists( 'Kadence\kadence' ) ) {
31
+ $color = Kadence\kadence()->sub_option( 'header_search_color', 'color' );
32
+ $hoverColor = Kadence\kadence()->sub_option( 'header_search_color', 'hover' );
33
+ }
34
+ ?>
35
+ <style>
36
+ <?php if (!empty($color)) { ?>
37
+ .dgwt-wcas-search-icon path {
38
+ fill: <?php echo fibosearchKadenceRenderColor($color); ?>;
39
+ }
40
+
41
+ <?php } ?>
42
+
43
+ <?php if (!empty($hoverColor)) { ?>
44
+ .dgwt-wcas-search-icon:hover path {
45
+ fill: <?php echo fibosearchKadenceRenderColor($hoverColor); ?>;
46
+ }
47
+
48
+ <?php } ?>
49
+ </style>
50
+ <?php
51
+ } );
partials/themes/salient.php CHANGED
@@ -30,6 +30,9 @@ add_action( 'wp_footer', function () {
30
  $(window).on('load', function () {
31
  var themeSearch = $('#search .inner-wrap > div');
32
  var wcasSearch = $('#wcas-search-instance > div');
 
 
 
33
  if (themeSearch.eq(0)) {
34
  themeSearch.html(wcasSearch);
35
  }
30
  $(window).on('load', function () {
31
  var themeSearch = $('#search .inner-wrap > div');
32
  var wcasSearch = $('#wcas-search-instance > div');
33
+ if (wcasSearch.length === 0) {
34
+ return;
35
+ }
36
  if (themeSearch.eq(0)) {
37
  themeSearch.html(wcasSearch);
38
  }
partials/themes/storefront.php CHANGED
@@ -11,16 +11,14 @@ if ( ! function_exists( 'storefront_product_search' ) ) {
11
  function storefront_product_search() {
12
  if ( storefront_is_woocommerce_activated() ) { ?>
13
  <div class="site-search">
14
- <?php echo do_shortcode( '[wcas-search-form]' ); ?>
15
  </div>
16
  <?php
17
  }
18
  }
19
  }
20
 
21
- add_action( 'wp_footer', 'dgwt_wcas_storefront_inverse_orientation', 100 );
22
-
23
- function dgwt_wcas_storefront_inverse_orientation() {
24
  if ( Helpers::isAMPEndpoint() ) {
25
  ?>
26
  <style>
@@ -33,6 +31,12 @@ function dgwt_wcas_storefront_inverse_orientation() {
33
  return;
34
  }
35
  ?>
 
 
 
 
 
 
36
  <script>
37
  (function ($) {
38
  $(window).on('load', function () {
@@ -49,7 +53,7 @@ function dgwt_wcas_storefront_inverse_orientation() {
49
  }(jQuery));
50
  </script>
51
  <?php
52
- }
53
 
54
  /**
55
  * Toole mobile search when AMP is active
11
  function storefront_product_search() {
12
  if ( storefront_is_woocommerce_activated() ) { ?>
13
  <div class="site-search">
14
+ <?php echo do_shortcode( '[fibosearch]' ); ?>
15
  </div>
16
  <?php
17
  }
18
  }
19
  }
20
 
21
+ add_action( 'wp_footer', function () {
 
 
22
  if ( Helpers::isAMPEndpoint() ) {
23
  ?>
24
  <style>
31
  return;
32
  }
33
  ?>
34
+ <style>
35
+ .dgwt-wcas-open .storefront-handheld-footer-bar,
36
+ .dgwt-wcas-focused .storefront-handheld-footer-bar {
37
+ display: none;
38
+ }
39
+ </style>
40
  <script>
41
  (function ($) {
42
  $(window).on('load', function () {
53
  }(jQuery));
54
  </script>
55
  <?php
56
+ }, 100 );
57
 
58
  /**
59
  * Toole mobile search when AMP is active
partials/themes/thegem-elementor.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
4
+ exit;
5
+ }
6
+
7
+ add_action( 'init', function () {
8
+ // Header Vertical
9
+ remove_filter( 'wp_nav_menu_items', 'thegem_menu_item_search', 10, 2 );
10
+ add_filter( 'wp_nav_menu_items', function ( $items, $args ) {
11
+ if ( $args->theme_location == 'primary' && ! thegem_get_option( 'hide_search_icon' ) ) {
12
+ $items .= '<li class="menu-item menu-item-search dgwt-wcas-thegem-menu-search">';
13
+ $items .= do_shortcode( '[fibosearch layout="icon"]' );
14
+ $items .= '</li>';
15
+ }
16
+
17
+ return $items;
18
+ }, 10, 2 );
19
+
20
+ // Header Fullwidth hamburger
21
+ remove_filter( 'wp_nav_menu_items', 'thegem_menu_item_hamburger_widget', 100, 2 );
22
+ add_action( 'thegem_before_nav_menu', function () {
23
+ if ( in_array( thegem_get_option( 'header_layout' ), array(
24
+ 'perspective',
25
+ 'fullwidth_hamburger',
26
+ 'overlay'
27
+ ) ) ) {
28
+ echo do_shortcode( '[fibosearch]' );
29
+ }
30
+ } );
31
+
32
+ // Perspective header
33
+ remove_filter( 'get_search_form', 'thegem_serch_form_vertical_header' );
34
+ add_action( 'thegem_perspective_menu_buttons', function () {
35
+ echo do_shortcode( '[fibosearch]' );
36
+ } );
37
+
38
+ // Remove the search bar from vertical header
39
+ add_filter( 'get_search_form', function ( $form ) {
40
+ if ( in_array( thegem_get_option( 'header_layout' ), array( 'fullwidth_hamburger', 'vertical' ) ) ) {
41
+ $form = '';
42
+ }
43
+
44
+ return $form;
45
+ }, 100 );
46
+
47
+ add_action( 'thegem_before_header', function () {
48
+ if ( ! in_array( thegem_get_option( 'header_layout' ), array( 'vertical' ) ) ) {
49
+ return;
50
+ }
51
+
52
+ $html = '<div class="dgwt-wcas-thegem-vertical-search">';
53
+ $html .= do_shortcode( '[fibosearch]' );
54
+ $html .= '</div>';
55
+
56
+ echo $html;
57
+ }, 20 );
58
+
59
+ // Force enable overlay for mobile search
60
+ add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
61
+ return 'on';
62
+ } );
63
+ } );
64
+
65
+ add_action( 'wp_head', function () {
66
+ $color = thegem_get_option( 'main_menu_level1_color' );
67
+ $colorHover = thegem_get_option( 'main_menu_level1_hover_color' );
68
+ $mobileColor = thegem_get_option( 'mobile_menu_level1_color' );
69
+ ?>
70
+ <style>
71
+ .dgwt-wcas-thegem-menu-search .dgwt-wcas-search-wrapp {
72
+ margin-left: 10px;
73
+ margin-right: 10px;
74
+ }
75
+
76
+ .dgwt-wcas-thegem-menu-search .dgwt-wcas-ico-magnifier-handler {
77
+ max-width: 19px;
78
+ }
79
+
80
+ .dgwt-wcas-thegem-menu-search .dgwt-wcas-search-icon path {
81
+ fill: <?php echo $color; ?>;
82
+ }
83
+
84
+ .dgwt-wcas-thegem-menu-search .dgwt-wcas-search-icon:hover path {
85
+ fill: <?php echo $colorHover; ?>;
86
+ }
87
+
88
+ #primary-navigation.responsive .dgwt-wcas-thegem-menu-search .dgwt-wcas-search-icon path {
89
+ fill: <?php echo $mobileColor; ?>;
90
+ }
91
+
92
+ #primary-navigation.responsive .dgwt-wcas-thegem-menu-search {
93
+ padding: 16px 20px;
94
+ }
95
+
96
+ .header-layout-perspective > .dgwt-wcas-search-wrapp {
97
+ top: 30px;
98
+ position: absolute;
99
+ max-width: 600px;
100
+ left: 270px;
101
+ right: auto;
102
+ margin: 0 auto;
103
+ z-index: 10;
104
+ }
105
+
106
+ @media (max-width: 979px) {
107
+ .header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
108
+ .header-layout-perspective > .dgwt-wcas-search-wrapp {
109
+ max-width: 350px;
110
+ }
111
+
112
+ .header-style-vertical #site-header-wrapper .dgwt-wcas-thegem-vertical-search {
113
+ display: none;
114
+ }
115
+ }
116
+
117
+ @media (max-width: 769px) {
118
+ .header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
119
+ .header-layout-overlay .primary-navigation.responsive .overlay-menu-cell > .dgwt-wcas-search-wrapp,
120
+ .header-layout-perspective > .dgwt-wcas-search-wrapp {
121
+ display: none !important;
122
+ }
123
+ }
124
+
125
+ #page.vertical-header .dgwt-wcas-thegem-vertical-search {
126
+ margin-right: auto;
127
+ margin-left: auto;
128
+ padding-left: 21px;
129
+ padding-right: 21px;
130
+ }
131
+
132
+ .header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp {
133
+ top: 30px;
134
+ position: absolute;
135
+ left: 150px;
136
+ max-width: 600px;
137
+
138
+ -webkit-transition: all .3s, transform 1s;
139
+ transition: all .3s, transform 1s;
140
+ -webkit-transform: translateX(0);
141
+ transform: translateX(0);
142
+ }
143
+
144
+ @media (max-width: 979px) {
145
+ .header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp {
146
+ top: 12px;
147
+ }
148
+ }
149
+
150
+ .header-layout-fullwidth_hamburger #primary-navigation.hamburger-active > .dgwt-wcas-search-wrapp {
151
+ -moz-transform: translateX(-450px);
152
+ -webkit-transform: translateX(-450px);
153
+ transform: translateX(-450px);
154
+ }
155
+
156
+ .site-header.fixed .header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
157
+ .site-header.fixed .header-layout-perspective > .dgwt-wcas-search-wrapp {
158
+ top: 4px;
159
+ }
160
+
161
+ .site-header.fixed .header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp {
162
+ left: 80px;
163
+ }
164
+
165
+ @media (max-width: 979px) {
166
+ .header-layout-perspective > .dgwt-wcas-search-wrapp {
167
+ top: 10px;
168
+ }
169
+ }
170
+
171
+ @media (max-width: 1212px) and (min-width: 980px) {
172
+ .header-layout-perspective #perspective-menu-buttons {
173
+ padding-bottom: 30px;
174
+ }
175
+
176
+ .header-layout-perspective > .dgwt-wcas-search-wrapp {
177
+ top: 110px;
178
+ }
179
+ }
180
+ </style>
181
+ <?php
182
+ } );
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.9
6
  Requires PHP: 7.0
7
- Stable tag: 1.16.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -142,6 +142,24 @@ You can read more and compare Pro and Free features here: [Full comparison - Pro
142
 
143
  == Changelog ==
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  = 1.16.0, February 03, 2022 =
146
  * ADD: Integration with a XStore theme
147
  * ADD: Allow customization of the Details Panel with actions and filters
4
  Requires at least: 5.0
5
  Tested up to: 5.9
6
  Requires PHP: 7.0
7
+ Stable tag: 1.17.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
142
 
143
  == Changelog ==
144
 
145
+ = 1.17.0, February 28, 2022 =
146
+ * ADD: New beta feature - “Darkened background”
147
+ * ADD: Integration with Kadence theme
148
+ * ADD: Integration with TheGem (Elementor) and renamed TheGem (WPBakery)
149
+ * ADD: Comments in template files for the Details Panel
150
+ * ADD: Refreshing the content on the checkout page when a product is added to the cart from the search Details Panel
151
+ * ADD: Tooltip with information about overriding when an option is overridden by theme integration
152
+ * FIX: Conflict between Salient theme and Shipmondo plugin
153
+ * FIX: Unexpected hiding from the search bar right after the “focus” event. Bug occurred only on mobiles
154
+ * FIX: Hide the Storefront handheld footer bar when the search results are open. Otherwise, handheld footer bar covers the autocomplete dropdown
155
+ * FIX: Prevent toggle mobile overlay if the search bar doesn't have this mode
156
+ * FIX: Non-existing table during the database repair process
157
+ * FIX: Minor security issues
158
+ * FIX: Fatal errors in PHP 8 when the dashboard language is set to “ru_RU”
159
+ * FIX: Add artificial overlay to cover the “Close Button” because SVG elements don't provide information about parents elements in "event.target"
160
+ * CHANGE: General tooltip style on the plugin settings page - more padding, bigger font, right position of the tooltip, auto cursor, wider
161
+
162
+
163
  = 1.16.0, February 03, 2022 =
164
  * ADD: Integration with a XStore theme
165
  * ADD: Allow customization of the Details Panel with actions and filters
widget.php CHANGED
@@ -1,6 +1,5 @@
1
  <?php
2
 
3
-
4
  // Exit if accessed directly
5
  if ( ! defined( 'ABSPATH' ) ) {
6
  exit;
1
  <?php
2
 
 
3
  // Exit if accessed directly
4
  if ( ! defined( 'ABSPATH' ) ) {
5
  exit;