Blocksy Companion - Version 1.7.38

Version Description

Download this release

Release Info

Developer creativethemeshq
Plugin Icon wp plugin Blocksy Companion
Version 1.7.38
Comparing to
See all releases

Code changes from version 1.7.37 to 1.7.38

Files changed (41) hide show
  1. blocksy-companion.php +1 -1
  2. framework/cache-reset-manager.php +7 -0
  3. framework/extensions/cookies-consent/static/bundle/main.css +1 -1
  4. framework/extensions/mailchimp/admin-static/bundle/sync.js +1 -1
  5. framework/extensions/mailchimp/admin-static/js/sync.js +10 -7
  6. framework/extensions/mailchimp/extension.php +1 -1
  7. framework/extensions/mailchimp/static/bundle/main.css +1 -1
  8. framework/extensions/widgets/static/bundle/main.css +1 -1
  9. framework/extensions/woocommerce-extra/config.php +0 -7
  10. framework/extensions/woocommerce-extra/customizer.php +0 -45
  11. framework/extensions/woocommerce-extra/extension.php +0 -100
  12. framework/extensions/woocommerce-extra/floating-cart.php +0 -92
  13. framework/extensions/woocommerce-extra/global.php +0 -70
  14. framework/extensions/woocommerce-extra/helpers.php +0 -281
  15. framework/extensions/woocommerce-extra/readme.php +0 -37
  16. framework/extensions/woocommerce-extra/static/bundle/main.css +0 -8
  17. framework/extensions/woocommerce-extra/static/bundle/main.js +0 -1
  18. framework/extensions/woocommerce-extra/static/bundle/sync.js +0 -1
  19. framework/extensions/woocommerce-extra/static/js/floating-cart.js +0 -94
  20. framework/extensions/woocommerce-extra/static/js/helpers.js +0 -15
  21. framework/extensions/woocommerce-extra/static/js/main.js +0 -217
  22. framework/extensions/woocommerce-extra/static/js/sync.js +0 -19
  23. framework/extensions/woocommerce-extra/static/js/variables.js +0 -28
  24. framework/extensions/woocommerce-extra/static/sass/floating-bar/main.scss +0 -156
  25. framework/extensions/woocommerce-extra/static/sass/main.scss +0 -3
  26. framework/extensions/woocommerce-extra/static/sass/quick-view/main.scss +0 -8
  27. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-button.scss +0 -44
  28. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-card.scss +0 -39
  29. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-gallery.scss +0 -32
  30. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-loader.scss +0 -10
  31. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-modal.scss +0 -23
  32. framework/extensions/woocommerce-extra/static/sass/quick-view/quick-view-summary.scss +0 -63
  33. framework/features/demo-install/wp-importer.php +3 -2
  34. freemius/includes/class-fs-logger.php +1 -1
  35. readme.txt +9 -1
  36. static/bundle/dashboard.css +1 -1
  37. static/bundle/main.js +1 -1
  38. static/bundle/options.css +1 -1
  39. static/bundle/options.js +1 -1
  40. static/js/frontend/sticky.js +7 -8
  41. static/js/options/ConditionsManager.js +5 -0
blocksy-companion.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
- Version: 1.7.37
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
+ Version: 1.7.38
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
framework/cache-reset-manager.php CHANGED
@@ -4,6 +4,13 @@ namespace Blocksy;
4
 
5
  class CacheResetManager {
6
  public function __construct() {
 
 
 
 
 
 
 
7
  add_action(
8
  'upgrader_process_complete',
9
  [$this, 'handle_update'],
4
 
5
  class CacheResetManager {
6
  public function __construct() {
7
+ add_action(
8
+ 'blocksy:cache-manager:purge-all',
9
+ function () {
10
+ $this->run_cache_purge();
11
+ }
12
+ );
13
+
14
  add_action(
15
  'upgrader_process_complete',
16
  [$this, 'handle_update'],
framework/extensions/cookies-consent/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.37
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.38
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/mailchimp/admin-static/bundle/sync.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t);var u,p=function(){var e=document.createElement("div");return e.innerHTML=document.querySelector(".ct-customizer-preview-cache-container").value,e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(t||(t=p()),t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]'))){var r=t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]')).innerHTML,o=document.createElement("div");return o.innerHTML=r,o}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},should_insert:!0},e);var t=document.querySelector(e.parent_selector);if(o(document.querySelectorAll("".concat(e.parent_selector," ").concat(e.selector))).map((function(e){return e.parentNode.removeChild(e)})),e.should_insert){var n=m(e.fragment_id);if(n){for(;n.firstElementChild;)if(e.beforeInsert(n.firstElementChild),"append"===e.strategy&&t.appendChild(n.firstElementChild),"firstChild"===e.strategy&&t.insertBefore(n.firstElementChild,t.firstElementChild),e.strategy.indexOf("maybeBefore")>-1){var i=e.strategy.split(":"),c=r(i,2),a=(c[0],c[1]);t.querySelector(a)?t.insertBefore(n.firstElementChild,t.querySelector(a)):t.appendChild(n.firstElementChild)}e.whenInserted()}}},f=function(e,t){if(t.classList.remove("ct-hidden-sm","ct-hidden-md","ct-hidden-lg"),wp.customize(e)){var n=wp.customize(e)()||{mobile:!1,tablet:!0,desktop:!0};n.mobile||t.classList.add("ct-hidden-sm"),n.tablet||t.classList.add("ct-hidden-md"),n.desktop||t.classList.add("ct-hidden-lg")}},b=function(e){if([e.top,e.right,e.bottom,e.left].reduce((function(e,t){return!!e&&!("auto"!==t&&t&&t.toString().match(/\d/g))}),!0))return"CT_CSS_SKIP_RULE";var t=["auto"!==e.top&&e.top.toString().match(/\d/g)?e.top:0,"auto"!==e.right&&e.right.toString().match(/\d/g)?e.right:0,"auto"!==e.bottom&&e.bottom.toString().match(/\d/g)?e.bottom:0,"auto"!==e.left&&e.left.toString().match(/\d/g)?e.left:0];return t[0]===t[1]&&t[0]===t[2]&&t[0]===t[3]?t[0]:t[0]===t[2]&&t[1]===t[3]?"".concat(t[0]," ").concat(t[3]):t.join(" ")},h=function(e,t){var n=t.forcedOutput,r=void 0!==n&&n;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return r?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(e.blur)&&0===parseFloat(e.spread)&&0===parseFloat(e.v_offset)&&0===parseFloat(e.h_offset))return r?"none":"CT_CSS_SKIP_RULE";var o=[];return e.inset&&o.push("inset"),o.push("".concat(e.h_offset,"px")),o.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(o.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&o.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(o.push("".concat(e.blur,"px")),o.push("".concat(e.spread,"px"))),o.push(e.color.color),o.join(" ")},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},o=document.querySelector("style#".concat(r[n])),i=o.innerText,c="".concat(e["".concat(n,"_selector_prefix")]?"".concat(e["".concat(n,"_selector_prefix")]," "):"").concat(e.selector||":root"),a=null,l=i.match(a);0===i.trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)),l||(0===(i="".concat(i," ").concat(c," { }")).trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a))),o.innerText=i.replace(a,l[0].indexOf("--".concat(e.variable,":"))>-1?l[0].replace(new RegExp("--".concat(e.variable,":[\\s\\S]*?;"),"gm"),t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";")):l[0].replace(new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(c," {").concat(t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";"))))},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r=(e.type||"").indexOf("color")>-1?t["color"===e.type?"default":e.type.split(":")[1]].color:t;"border"===(e.type||"")&&(r=t&&"none"!==t.style?"".concat(t.width,"px ").concat(t.style," ").concat(t.color.color):"none"),"spacing"===(e.type||"")&&(r=b(t)),"box-shadow"===(e.type||"")&&(r=h(t,e)),y(e,"".concat(r).concat(e.unit||"").concat(e.important?" !important":""),n)},g=function(e,t){var n=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,n),t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}(t,!!e.responsive),e.responsive?(e.enabled&&"no"===!wp.customize(e.enabled)()&&(t.mobile="0"+(e.unit?"":"px"),t.tablet="0"+(e.unit?"":"px"),t.desktop="0"+(e.unit?"":"px")),v(e,t.desktop,"desktop"),v(e,t.tablet,"tablet"),v(e,t.mobile,"mobile")):v(e,t)};u={mailchimpContent:[{selector:".ct-mailchimp-block",variable:"color",type:"color:default"},{selector:".ct-mailchimp-block",variable:"linkHoverColor",type:"color:hover"}],mailchimpButton:[{selector:".ct-mailchimp-block",variable:"buttonInitialColor",type:"color:default"},{selector:".ct-mailchimp-block",variable:"buttonHoverColor",type:"color:hover"}],mailchimpBackground:{selector:".ct-mailchimp-block",variable:"mailchimpBackground",type:"color"},mailchimpShadow:{selector:".ct-mailchimp-block",type:"box-shadow",variable:"box-shadow",responsive:!0},mailchimpSpacing:{selector:".ct-mailchimp-block",variable:"padding",responsive:!0,unit:""}},wp.customize.bind("change",(function(e){return u[e.id]&&(Array.isArray(u[e.id])?u[e.id]:[u[e.id]]).map((function(t){return g(t,e())}))})),wp.customize("mailchimp_subscribe_visibility",(function(e){return e.bind((function(e){var t=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",t)}))})),(document.body.classList.contains("single")||document.body.classList.contains("page"))&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({id:null,fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},watch:[]},e);var t=function(){var t=wp.customize(e.id)();d(l(l({},e),{},{should_insert:"yes"===t}))};wp.customize(e.id,(function(e){return e.bind((function(e){return t()}))})),e.watch.map((function(e){return wp.customize(e,(function(e){return e.bind((function(){return t()}))}))}))}({id:"mailchimp_single_post_enabled",strategy:"append",parent_selector:".content-area article",selector:".ct-mailchimp-block",fragment_id:"blocksy-mailchimp-subscribe",watch:["has_mailchimp_name","mailchimp_button_text","mailchimp_title","mailchimp_text","mailchimp_name_label","mailchimp_mail_label"],whenInserted:function(){if(document.body.classList.contains("single")||document.body.classList.contains("page")){var e=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",e),"yes"!==wp.customize("has_mailchimp_name")()?e.querySelector('[name="FNAME"]').remove():e.querySelector('[name="FNAME"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_name_label")())),e.querySelector('[name="EMAIL"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_mail_label")()," *")),e.querySelector("button").innerHTML=wp.customize("mailchimp_button_text")(),e.querySelector("h4").innerHTML=wp.customize("mailchimp_title")(),e.querySelector(".ct-mailchimp-description").innerHTML=wp.customize("mailchimp_text")()}}})}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t);var u,p=function(){var e=document.createElement("div");return e.innerHTML=document.querySelector(".ct-customizer-preview-cache-container").value,e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(t||(t=p()),t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]'))){var r=t.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(e,'"]')).innerHTML,o=document.createElement("div");return o.innerHTML=r,o}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},should_insert:!0},e);var t=document.querySelector(e.parent_selector);if(o(document.querySelectorAll("".concat(e.parent_selector," ").concat(e.selector))).map((function(e){return e.parentNode.removeChild(e)})),e.should_insert){var n=m(e.fragment_id);if(n){for(;n.firstElementChild;)if(e.beforeInsert(n.firstElementChild),"append"===e.strategy&&t.appendChild(n.firstElementChild),"firstChild"===e.strategy&&t.insertBefore(n.firstElementChild,t.firstElementChild),e.strategy.indexOf("maybeBefore")>-1){var i=e.strategy.split(":"),c=r(i,2),a=(c[0],c[1]);t.querySelector(a)?t.insertBefore(n.firstElementChild,t.querySelector(a)):t.appendChild(n.firstElementChild)}e.whenInserted()}}},f=function(e,t){if(t.classList.remove("ct-hidden-sm","ct-hidden-md","ct-hidden-lg"),wp.customize(e)){var n=wp.customize(e)()||{mobile:!1,tablet:!0,desktop:!0};n.mobile||t.classList.add("ct-hidden-sm"),n.tablet||t.classList.add("ct-hidden-md"),n.desktop||t.classList.add("ct-hidden-lg")}},b=function(e){if([e.top,e.right,e.bottom,e.left].reduce((function(e,t){return!!e&&!("auto"!==t&&t&&t.toString().match(/\d/g))}),!0))return"CT_CSS_SKIP_RULE";var t=["auto"!==e.top&&e.top.toString().match(/\d/g)?e.top:0,"auto"!==e.right&&e.right.toString().match(/\d/g)?e.right:0,"auto"!==e.bottom&&e.bottom.toString().match(/\d/g)?e.bottom:0,"auto"!==e.left&&e.left.toString().match(/\d/g)?e.left:0];return t[0]===t[1]&&t[0]===t[2]&&t[0]===t[3]?t[0]:t[0]===t[2]&&t[1]===t[3]?"".concat(t[0]," ").concat(t[3]):t.join(" ")},h=function(e,t){var n=t.forcedOutput,r=void 0!==n&&n;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return r?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(e.blur)&&0===parseFloat(e.spread)&&0===parseFloat(e.v_offset)&&0===parseFloat(e.h_offset))return r?"none":"CT_CSS_SKIP_RULE";var o=[];return e.inset&&o.push("inset"),o.push("".concat(e.h_offset,"px")),o.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(o.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&o.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(o.push("".concat(e.blur,"px")),o.push("".concat(e.spread,"px"))),o.push(e.color.color),o.join(" ")},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},o=document.querySelector("style#".concat(r[n])),i=o.innerText,c="".concat(e["".concat(n,"_selector_prefix")]?"".concat(e["".concat(n,"_selector_prefix")]," "):"").concat(e.selector||":root"),a=null,l=i.match(a);0===i.trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)),l||(0===(i="".concat(i," ").concat(c," { }")).trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a))),o.innerText=i.replace(a,l[0].indexOf("--".concat(e.variable,":"))>-1?l[0].replace(new RegExp("--".concat(e.variable,":[\\s\\S]*?;"),"gm"),t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";")):l[0].replace(new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(c," {").concat(t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";"))))},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r=(e.type||"").indexOf("color")>-1?t["color"===e.type?"default":e.type.split(":")[1]].color:t;"border"===(e.type||"")&&(r=t&&"none"!==t.style?"".concat(t.width,"px ").concat(t.style," ").concat(t.color.color):"none"),"spacing"===(e.type||"")&&(r=b(t)),"box-shadow"===(e.type||"")&&(r=h(t,e)),y(e,"".concat(r).concat(e.unit||"").concat(e.important?" !important":""),n)},g=function(e,t){var n=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,n),t=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&Object.keys(e).indexOf("desktop")>-1?t?e:e.desktop:t?{desktop:e,tablet:e,mobile:e}:e}(t,!!e.responsive),e.responsive?(e.enabled&&"no"===!wp.customize(e.enabled)()&&(t.mobile="0"+(e.unit?"":"px"),t.tablet="0"+(e.unit?"":"px"),t.desktop="0"+(e.unit?"":"px")),v(e,t.desktop,"desktop"),v(e,t.tablet,"tablet"),v(e,t.mobile,"mobile")):v(e,t)};u={mailchimpContent:[{selector:".ct-mailchimp-block",variable:"color",type:"color:default"},{selector:".ct-mailchimp-block",variable:"linkHoverColor",type:"color:hover"}],mailchimpButton:[{selector:".ct-mailchimp-block",variable:"buttonInitialColor",type:"color:default"},{selector:".ct-mailchimp-block",variable:"buttonHoverColor",type:"color:hover"}],mailchimpBackground:{selector:".ct-mailchimp-block",variable:"mailchimpBackground",type:"color"},mailchimpShadow:{selector:".ct-mailchimp-block",type:"box-shadow",variable:"box-shadow",responsive:!0},mailchimpSpacing:{selector:".ct-mailchimp-block",variable:"padding",responsive:!0,unit:""}},wp.customize.bind("change",(function(e){return u[e.id]&&(Array.isArray(u[e.id])?u[e.id]:[u[e.id]]).map((function(t){return g(t,e())}))})),wp.customize("mailchimp_subscribe_visibility",(function(e){return e.bind((function(e){var t=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",t)}))})),(document.body.classList.contains("single")||document.body.classList.contains("page"))&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=l({id:null,fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(e){},watch:[]},e);var t=function(){var t=wp.customize(e.id)();d(l(l({},e),{},{should_insert:"yes"===t}))};wp.customize(e.id,(function(e){return e.bind((function(e){return t()}))})),e.watch.map((function(e){return wp.customize(e,(function(e){return e.bind((function(){return t()}))}))}))}({id:"mailchimp_single_post_enabled",strategy:"append",parent_selector:".site-main article",selector:".ct-mailchimp-block",fragment_id:"blocksy-mailchimp-subscribe",watch:["has_mailchimp_name","mailchimp_button_text","mailchimp_title","mailchimp_text","mailchimp_name_label","mailchimp_mail_label"],whenInserted:function(){if(document.body.classList.contains("single")||document.body.classList.contains("page")){var e=document.querySelector(".ct-mailchimp-block");f("mailchimp_subscribe_visibility",e),"yes"!==wp.customize("has_mailchimp_name")()?(e.querySelector("[data-fields]").dataset.fields=1,e.querySelector('[name="FNAME"]').remove()):(e.querySelector("[data-fields]").dataset.fields=2,e.querySelector('[name="FNAME"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_name_label")()))),e.querySelector('[name="EMAIL"]').setAttribute("placeholder","".concat(wp.customize("mailchimp_mail_label")()," *")),e.querySelector("button").innerHTML=wp.customize("mailchimp_button_text")(),e.querySelector("h3").innerHTML=wp.customize("mailchimp_title")(),e.querySelector(".ct-mailchimp-description").innerHTML=wp.customize("mailchimp_text")()}}})}]);
framework/extensions/mailchimp/admin-static/js/sync.js CHANGED
@@ -1,12 +1,12 @@
1
  import {
2
  checkAndReplace,
3
- responsiveClassesFor
4
  } from '../../../cookies-consent/static/js/sync/helpers'
5
 
6
  import './variables'
7
 
8
- wp.customize('mailchimp_subscribe_visibility', val =>
9
- val.bind(to => {
10
  const block = document.querySelector('.ct-mailchimp-block')
11
  responsiveClassesFor('mailchimp_subscribe_visibility', block)
12
  })
@@ -20,7 +20,7 @@ if (
20
  id: 'mailchimp_single_post_enabled',
21
  strategy: 'append',
22
 
23
- parent_selector: '.content-area article',
24
  selector: '.ct-mailchimp-block',
25
  fragment_id: 'blocksy-mailchimp-subscribe',
26
 
@@ -30,7 +30,7 @@ if (
30
  'mailchimp_title',
31
  'mailchimp_text',
32
  'mailchimp_name_label',
33
- 'mailchimp_mail_label'
34
  ],
35
 
36
  whenInserted: () => {
@@ -45,8 +45,11 @@ if (
45
  responsiveClassesFor('mailchimp_subscribe_visibility', block)
46
 
47
  if (wp.customize('has_mailchimp_name')() !== 'yes') {
 
48
  block.querySelector('[name="FNAME"]').remove()
49
  } else {
 
 
50
  block
51
  .querySelector('[name="FNAME"]')
52
  .setAttribute(
@@ -66,13 +69,13 @@ if (
66
  'mailchimp_button_text'
67
  )()
68
 
69
- block.querySelector('h4').innerHTML = wp.customize(
70
  'mailchimp_title'
71
  )()
72
 
73
  block.querySelector(
74
  '.ct-mailchimp-description'
75
  ).innerHTML = wp.customize('mailchimp_text')()
76
- }
77
  })
78
  }
1
  import {
2
  checkAndReplace,
3
+ responsiveClassesFor,
4
  } from '../../../cookies-consent/static/js/sync/helpers'
5
 
6
  import './variables'
7
 
8
+ wp.customize('mailchimp_subscribe_visibility', (val) =>
9
+ val.bind((to) => {
10
  const block = document.querySelector('.ct-mailchimp-block')
11
  responsiveClassesFor('mailchimp_subscribe_visibility', block)
12
  })
20
  id: 'mailchimp_single_post_enabled',
21
  strategy: 'append',
22
 
23
+ parent_selector: '.site-main article',
24
  selector: '.ct-mailchimp-block',
25
  fragment_id: 'blocksy-mailchimp-subscribe',
26
 
30
  'mailchimp_title',
31
  'mailchimp_text',
32
  'mailchimp_name_label',
33
+ 'mailchimp_mail_label',
34
  ],
35
 
36
  whenInserted: () => {
45
  responsiveClassesFor('mailchimp_subscribe_visibility', block)
46
 
47
  if (wp.customize('has_mailchimp_name')() !== 'yes') {
48
+ block.querySelector('[data-fields]').dataset.fields = 1
49
  block.querySelector('[name="FNAME"]').remove()
50
  } else {
51
+ block.querySelector('[data-fields]').dataset.fields = 2
52
+
53
  block
54
  .querySelector('[name="FNAME"]')
55
  .setAttribute(
69
  'mailchimp_button_text'
70
  )()
71
 
72
+ block.querySelector('h3').innerHTML = wp.customize(
73
  'mailchimp_title'
74
  )()
75
 
76
  block.querySelector(
77
  '.ct-mailchimp-description'
78
  ).innerHTML = wp.customize('mailchimp_text')()
79
+ },
80
  })
81
  }
framework/extensions/mailchimp/extension.php CHANGED
@@ -121,7 +121,7 @@ class BlocksyExtensionMailchimp {
121
  }, 5);
122
 
123
  add_action(
124
- 'customize_controls_enqueue_scripts',
125
  function () {
126
  if (! function_exists('get_plugin_data')) {
127
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
121
  }, 5);
122
 
123
  add_action(
124
+ 'customize_preview_init',
125
  function () {
126
  if (! function_exists('get_plugin_data')) {
127
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
framework/extensions/mailchimp/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.37
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.38
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/widgets/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.37
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.38
3
  *
4
  * Copyright (c) 2020
5
  * Licensed GPLv2+
framework/extensions/woocommerce-extra/config.php DELETED
@@ -1,7 +0,0 @@
1
- <?php
2
-
3
- $config = [
4
- 'name' => __('WooCommerce Extra', 'blc'),
5
- 'description' => __('WooCommerce extra functionality.', 'blc')
6
- ];
7
-
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/customizer.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- $options = [
4
- 'woocommerce_quickview_enabled' => [
5
- 'label' => __( 'Quick View', 'blc' ),
6
- 'type' => 'ct-switch',
7
- 'switch' => true,
8
- 'value' => 'yes',
9
- 'setting' => [ 'transport' => 'postMessage' ],
10
- 'sync' => blc_call_fn([
11
- 'fn' => 'blocksy_sync_whole_page',
12
- 'default' => []
13
- ], [
14
- 'loader_selector' => '#primary.content-area .ct-open-quick-view'
15
- ]),
16
- ],
17
-
18
- 'woocommerce_quick_view_trigger' => [
19
- 'label' => __( 'Trigger Modal On', 'blocksy' ),
20
- 'type' => 'ct-select',
21
- 'value' => 'button',
22
- 'view' => 'text',
23
- 'design' => 'inline',
24
- 'setting' => [ 'transport' => 'postMessage' ],
25
- 'choices' => blocksy_ordered_keys(
26
- [
27
- 'button' => __( 'Button click', 'blocksy' ),
28
- 'image' => __( 'Image click', 'blocksy' ),
29
- 'card' => __( 'Card click', 'blocksy' ),
30
- ]
31
- ),
32
-
33
- 'sync' => blc_call_fn([
34
- 'fn' => 'blocksy_sync_whole_page',
35
- 'default' => []
36
- ], [
37
- 'loader_selector' => '#primary.content-area .ct-open-quick-view'
38
- ]),
39
- ],
40
-
41
- blocksy_rand_md5() => [
42
- 'type' => 'ct-divider',
43
- ],
44
- ];
45
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/extension.php DELETED
@@ -1,100 +0,0 @@
1
- <?php
2
-
3
- require_once dirname( __FILE__ ) . '/helpers.php';
4
-
5
- class BlocksyExtensionWoocommerceExtra {
6
- public function __construct() {
7
- add_action('blocksy:global-dynamic-css:enqueue', function ($args) {
8
-
9
- blocksy_theme_get_dynamic_styles(array_merge([
10
- 'path' => dirname( __FILE__ ) . '/global.php',
11
- 'chunk' => 'woocommerce'
12
- ], $args));
13
-
14
- }, 10, 3);
15
-
16
- add_filter('blocksy-async-scripts-handles', function ($d) {
17
- $d[] = 'blocksy-ext-woocommerce-extra-scripts';
18
- return $d;
19
- });
20
-
21
- add_action('wp_enqueue_scripts', function () {
22
- if (! function_exists('get_plugin_data')){
23
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
24
- }
25
-
26
- $data = get_plugin_data(BLOCKSY__FILE__);
27
-
28
- if (is_admin()) return;
29
-
30
- wp_enqueue_style(
31
- 'blocksy-ext-woocommerce-extra-styles',
32
- BLOCKSY_URL . 'framework/extensions/woocommerce-extra/static/bundle/main.css',
33
- ['ct-main-styles'],
34
- $data['Version']
35
- );
36
-
37
- wp_enqueue_script(
38
- 'blocksy-ext-woocommerce-extra-scripts',
39
- BLOCKSY_URL . 'framework/extensions/woocommerce-extra/static/bundle/main.js',
40
- [
41
- 'wc-single-product',
42
- 'wc-add-to-cart-variation',
43
- 'flexslider',
44
- 'ct-scripts',
45
- // 'photoswipe-ui-default',
46
- // 'photoswipe-default-skin',
47
- // 'wc-single-product',
48
- // 'wc-product-gallery-lightbox'
49
- ],
50
- $data['Version'],
51
- true
52
- );
53
- });
54
-
55
- add_action(
56
- 'customize_preview_init',
57
- function () {
58
- if (! function_exists('get_plugin_data')){
59
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
60
- }
61
-
62
- $data = get_plugin_data(BLOCKSY__FILE__);
63
-
64
- wp_enqueue_script(
65
- 'blocksy-woocommerce-extra-customizer-sync',
66
- BLOCKSY_URL . 'framework/extensions/woocommerce-extra/static/bundle/sync.js',
67
- [ 'customize-preview', 'ct-scripts', 'ct-events' ],
68
- $data['Version'],
69
- true
70
- );
71
- }
72
- );
73
-
74
- add_filter(
75
- 'blocksy_woo_card_options_elements',
76
- function ($opts) {
77
- $opts[] = blc_call_fn(
78
- ['fn' => 'blocksy_get_options'],
79
- dirname( __FILE__ ) . '/customizer.php',
80
- [], false
81
- );
82
-
83
- return $opts;
84
- }
85
- );
86
-
87
- add_filter(
88
- 'blocksy_single_product_elements_end_customizer_options',
89
- function ($opts) {
90
- $opts['has_floating_bar'] = blc_call_fn(
91
- ['fn' => 'blocksy_get_options'],
92
- dirname( __FILE__ ) . '/floating-cart.php',
93
- [], false
94
- );
95
-
96
- return $opts;
97
- }
98
- );
99
- }
100
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/floating-cart.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
-
3
- $options = [
4
- 'label' => __( 'Floating Cart', 'blocksy' ),
5
- 'type' => 'ct-panel',
6
- 'switch' => true,
7
- 'value' => 'yes',
8
- 'setting' => [ 'transport' => 'postMessage' ],
9
- 'inner-options' => [
10
-
11
- 'floatingBarFontColor' => [
12
- 'label' => __( 'Font Color', 'blocksy' ),
13
- 'type' => 'ct-color-picker',
14
- 'design' => 'inline',
15
- 'setting' => [ 'transport' => 'postMessage' ],
16
- 'value' => [
17
- 'default' => [
18
- 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
19
- ],
20
- ],
21
-
22
- 'pickers' => [
23
- [
24
- 'title' => __( 'Initial', 'blocksy' ),
25
- 'id' => 'default',
26
- 'inherit' => 'var(--color)'
27
- ],
28
- ],
29
- ],
30
-
31
- 'floatingBarBackground' => [
32
- 'label' => __( 'Background Color', 'blocksy' ),
33
- 'type' => 'ct-color-picker',
34
- 'design' => 'inline',
35
- 'setting' => [ 'transport' => 'postMessage' ],
36
- 'value' => [
37
- 'default' => [
38
- 'color' => '#ffffff',
39
- ],
40
- ],
41
-
42
- 'pickers' => [
43
- [
44
- 'title' => __( 'Initial', 'blocksy' ),
45
- 'id' => 'default',
46
- ],
47
- ],
48
- ],
49
-
50
- 'floatingBarShadow' => [
51
- 'label' => __( 'Shadow', 'blocksy' ),
52
- 'type' => 'ct-box-shadow',
53
- 'responsive' => true,
54
- 'divider' => 'top',
55
- 'value' => blc_call_fn(['fn' => 'blocksy_box_shadow_value'], [
56
- 'enable' => true,
57
- 'h_offset' => 0,
58
- 'v_offset' => 10,
59
- 'blur' => 20,
60
- 'spread' => 0,
61
- 'inset' => false,
62
- 'color' => [
63
- 'color' => 'rgba(44,62,80,0.15)',
64
- ],
65
- ]),
66
- 'setting' => [ 'transport' => 'postMessage' ],
67
- ],
68
-
69
- 'floatingBarVisibility' => [
70
- 'label' => __('Visibility', 'blocksy'),
71
- 'type' => 'ct-visibility',
72
- 'design' => 'block',
73
- 'divider' => 'top',
74
- 'setting' => ['transport' => 'postMessage'],
75
- 'allow_empty' => true,
76
-
77
- 'value' => [
78
- 'desktop' => true,
79
- 'tablet' => true,
80
- 'mobile' => false,
81
- ],
82
-
83
- 'choices' => blocksy_ordered_keys([
84
- 'desktop' => __( 'Desktop', 'blocksy' ),
85
- 'tablet' => __( 'Tablet', 'blocksy' ),
86
- 'mobile' => __( 'Mobile', 'blocksy' ),
87
- ]),
88
- ],
89
-
90
- ],
91
- ];
92
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/global.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
-
3
- if (! function_exists('is_woocommerce')) {
4
- return;
5
- }
6
-
7
- // Floating bar
8
- blc_call_fn(['fn' => 'blocksy_output_colors'], [
9
- 'value' => get_theme_mod('floatingBarFontColor'),
10
- 'default' => [
11
- 'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
12
- ],
13
- 'css' => $css,
14
- 'variables' => [
15
- 'default' => [
16
- 'selector' => '.ct-floating-bar',
17
- 'variable' => 'color'
18
- ],
19
- ],
20
- ]);
21
-
22
- blc_call_fn(['fn' => 'blocksy_output_colors'], [
23
- 'value' => get_theme_mod('floatingBarBackground'),
24
- 'default' => [
25
- 'default' => [ 'color' => '#ffffff' ],
26
- ],
27
- 'css' => $css,
28
- 'variables' => [
29
- 'default' => [
30
- 'selector' => '.ct-floating-bar',
31
- 'variable' => 'backgroundColor'
32
- ],
33
- ],
34
- ]);
35
-
36
- blc_call_fn(['fn' => 'blocksy_output_box_shadow'], [
37
- 'css' => $css,
38
- 'tablet_css' => $tablet_css,
39
- 'mobile_css' => $mobile_css,
40
- 'selector' => '.ct-floating-bar',
41
- 'value' => get_theme_mod(
42
- 'floatingBarShadow',
43
- blc_call_fn(['fn' => 'blocksy_box_shadow_value'], [
44
- 'enable' => true,
45
- 'h_offset' => 0,
46
- 'v_offset' => 10,
47
- 'blur' => 20,
48
- 'spread' => 0,
49
- 'inset' => false,
50
- 'color' => [
51
- 'color' => 'rgba(44,62,80,0.15)',
52
- ],
53
- ])
54
- ),
55
- 'responsive' => true
56
- ]);
57
-
58
- blc_call_fn(['fn' => 'blocksy_output_responsive_switch'], [
59
- 'css' => $css,
60
- 'tablet_css' => $tablet_css,
61
- 'mobile_css' => $mobile_css,
62
- 'selector' => '.ct-floating-bar',
63
- 'on' => 'flex',
64
- 'off' => 'none',
65
- 'value' => get_theme_mod('floatingBarVisibility', [
66
- 'desktop' => true,
67
- 'tablet' => true,
68
- 'mobile' => false,
69
- ])
70
- ]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/helpers.php DELETED
@@ -1,281 +0,0 @@
1
- <?php
2
-
3
- add_action('wp_ajax_blocsky_get_woo_quick_view', 'blocksy_get_woocommerce_quickview');
4
- add_action('wp_ajax_nopriv_blocsky_get_woo_quick_view', 'blocksy_get_woocommerce_quickview');
5
-
6
- function blocksy_get_woocommerce_quickview() {
7
- global $product;
8
- global $post;
9
-
10
- global $blocksy_is_quick_view;
11
-
12
- $blocksy_is_quick_view = true;
13
-
14
- $product = wc_get_product(sanitize_text_field( $_GET['product_id'] ));
15
-
16
- $GLOBALS['product'] = $product;
17
-
18
- $id = $product->get_id();
19
-
20
- $post = get_post($id);
21
-
22
- if (! $product) {
23
- wp_send_json_error();
24
- }
25
-
26
- $is_in_stock = true;
27
-
28
- if (! $product->managing_stock() && ! $product->is_in_stock()) {
29
- $is_in_stock = false;
30
- }
31
-
32
- $content = ob_start();
33
-
34
- remove_filter(
35
- 'woocommerce_post_class',
36
- 'blocksy_woo_single_post_class',
37
- 999,
38
- 2
39
- );
40
-
41
- ?>
42
-
43
- <div id="quick-view-<?php echo esc_attr($id) ?>" data-behaviour="modal" class="ct-panel quick-view-modal">
44
- <div class="content-container" data-align="middle">
45
- <div <?php wc_product_class('ct-container ct-quick-view-card single-product', $product->get_id()) ?>>
46
-
47
- <div class="close-button">
48
- <span class="ct-trigger closed"><span></span></span>
49
- </div>
50
-
51
- <section>
52
- <?php woocommerce_show_product_sale_flash() ?>
53
- <?php woocommerce_show_product_images() ?>
54
-
55
- <div class="entry-summary">
56
- <?php
57
- woocommerce_template_single_title();
58
- woocommerce_template_single_price();
59
- woocommerce_template_single_excerpt();
60
- woocommerce_template_single_add_to_cart();
61
- ?>
62
-
63
- <a href="<?php echo get_permalink($product->get_id()) ?>" class="ct-button ct-quick-more">
64
- <?php echo __('Go to product page', 'blc') ?>
65
- </a>
66
- </div>
67
- </section>
68
- </div>
69
- </div>
70
- </div>
71
-
72
- <?php
73
-
74
- wp_send_json_success([
75
- 'quickview' => ob_get_clean()
76
- ]);
77
- }
78
-
79
- function blocksy_quick_view_attr() {
80
- if (get_theme_mod('woocommerce_quickview_enabled', 'yes') !== 'yes') {
81
- return [];
82
- }
83
-
84
- if (get_theme_mod('woocommerce_quick_view_trigger', 'button') === 'button') {
85
- return [];
86
- }
87
-
88
- return [
89
- 'data-quick-view' => get_theme_mod('woocommerce_quick_view_trigger', 'button')
90
- ];
91
- }
92
-
93
- function blocksy_output_quick_view_link() {
94
- global $product;
95
-
96
- $id = $product->get_id();
97
-
98
- if (
99
- get_theme_mod('woocommerce_quickview_enabled', 'yes') === 'yes'
100
- &&
101
- get_theme_mod('woocommerce_quick_view_trigger', 'button') === 'button'
102
- ) {
103
- return '<a href="#quick-view-' . $id . '" class="ct-open-quick-view" aria-label="' . __('Quick view', 'blocksy') . '"><span hidden>' . __('Quick view', 'blocksy') . '</span><svg width="16" height="16" viewBox="0 0 40 40"><path d="M39.6,18.6C34.9,11.5,29.2,5,20,5C10.8,5,5.1,11.5,0.4,18.6c-0.6,0.8-0.6,1.9,0,2.8C5.1,28.5,10.8,35,20,35s14.9-6.5,19.6-13.6C40.1,20.5,40.1,19.5,39.6,18.6z M20,30.7c-5.7,0-10.1-3-15.5-10.7C9.9,12.3,14.3,9.3,20,9.3s10.1,3,15.5,10.7C30.1,27.7,25.7,30.7,20,30.7zM25,20c0,2.8-2.2,5-5,5s-5-2.2-5-5s2.2-5,5-5C22.8,15,25,17.2,25,20z"/></svg></a>';
104
- }
105
-
106
- return '';
107
- }
108
-
109
- function blc_output_woo_floating_cart_cache() {
110
- if (! is_customize_preview()) return;
111
-
112
- blocksy_add_customizer_preview_cache(
113
- blocksy_html_tag(
114
- 'div',
115
- [ 'data-id' => 'blocksy-woo-floating-cart' ],
116
- blocksy_woo_floating_cart(true)
117
- )
118
- );
119
- }
120
-
121
- function blocksy_woo_product_check_required_addons(
122
- $product_id, $check_for_required = true
123
- ) {
124
- if (! class_exists('WC_Product_Addons_Helper')) {
125
- return false;
126
- }
127
-
128
- // No parent add-ons, but yes to global.
129
- $addons = WC_Product_Addons_Helper::get_product_addons(
130
- $product_id,
131
- false,
132
- false,
133
- true
134
- );
135
-
136
- if ($addons && !empty($addons)) {
137
- foreach ($addons as $addon) {
138
- if (isset($addon['required']) && '1' == $addon['required']) {
139
- return true;
140
- }
141
- }
142
- }
143
-
144
- return false;
145
- }
146
-
147
- function blocksy_woo_product_addons_change_text($text, $product = null) {
148
- if (null === $product) {
149
- global $product;
150
- }
151
-
152
- if (! is_a($product, 'WC_Product')) {
153
- return $text;
154
- }
155
-
156
- return __('Select options', 'blc');
157
- }
158
-
159
- function blocksy_woo_floating_cart($forced = false) {
160
- if (! function_exists('is_woocommerce')) {
161
- return '';
162
- }
163
-
164
- global $product;
165
-
166
- if (! is_product()) {
167
- return '';
168
- }
169
-
170
- if (! $forced) {
171
- blc_output_woo_floating_cart_cache();
172
- }
173
-
174
- if (get_theme_mod('has_floating_bar', 'yes') !== 'yes') {
175
- if (! $forced) {
176
- return '';
177
- }
178
- }
179
-
180
- $image_output = blc_call_fn(['fn' => 'blocksy_image'], [
181
- 'attachment_id' => $product->get_image_id(),
182
- 'size' => 'woocommerce_gallery_thumbnail',
183
- 'ratio' => '1/1',
184
- 'lazyload' => false,
185
- 'tag_name' => 'div',
186
- ]);
187
-
188
- ob_start();
189
-
190
- ?>
191
- <div class="ct-floating-bar">
192
- <div class="ct-container">
193
- <section class="floating-bar-content">
194
- <?php echo $image_output ?>
195
- <div>
196
- <?php the_title( '<h6 class="product_title entry-title">', '</h6>' ); ?>
197
- <?php woocommerce_template_single_price(); ?>
198
- </div>
199
- </section>
200
-
201
- <section class="floating-bar-actions">
202
- <?php
203
- woocommerce_template_single_price();
204
-
205
- if (blocksy_woo_product_check_required_addons($product->get_id())) {
206
- add_filter('woocommerce_product_add_to_cart_text', 'blocksy_woo_product_addons_change_text', 15);
207
- woocommerce_template_loop_add_to_cart();
208
- remove_filter('woocommerce_product_add_to_cart_text', 'blocksy_woo_product_addons_change_text', 15);
209
- } else {
210
- if ($product->is_type('simple')) {
211
- global $wp_filter;
212
-
213
- if (isset($wp_filter['woocommerce_before_add_to_cart_quantity'])) {
214
- $old_before = $wp_filter['woocommerce_before_add_to_cart_quantity'];
215
- }
216
-
217
- if (isset($wp_filter['woocommerce_after_add_to_cart_quantity'])) {
218
- $old = $wp_filter['woocommerce_after_add_to_cart_quantity'];
219
- }
220
-
221
- if (isset($wp_filter['woocommerce_before_add_to_cart_button'])) {
222
- $old_button = $wp_filter['woocommerce_before_add_to_cart_button'];
223
- }
224
- if (isset($wp_filter['woocommerce_before_add_to_cart_form'])) {
225
- $old_before_form = $wp_filter['woocommerce_before_add_to_cart_form'];
226
- }
227
-
228
- if (isset($wp_filter['woocommerce_after_add_to_cart_form'])) {
229
- $old_after_form = $wp_filter['woocommerce_after_add_to_cart_form'];
230
- }
231
-
232
- if (isset($wp_filter['woocommerce_after_add_to_cart_button'])) {
233
- $old_after_button = $wp_filter['woocommerce_after_add_to_cart_button'];
234
- }
235
-
236
- unset($wp_filter['woocommerce_before_add_to_cart_quantity']);
237
- unset($wp_filter['woocommerce_after_add_to_cart_quantity']);
238
- unset($wp_filter['woocommerce_before_add_to_cart_button']);
239
- unset($wp_filter['woocommerce_before_add_to_cart_form']);
240
- unset($wp_filter['woocommerce_after_add_to_cart_form']);
241
- unset($wp_filter['woocommerce_after_add_to_cart_button']);
242
-
243
- woocommerce_simple_add_to_cart();
244
-
245
- if (isset($old_before)) {
246
- $wp_filter['woocommerce_before_add_to_cart_quantity'] = $old_before;
247
- }
248
-
249
- if (isset($old)) {
250
- $wp_filter['woocommerce_after_add_to_cart_quantity'] = $old;
251
- }
252
-
253
- if (isset($old_button)) {
254
- $wp_filter['woocommerce_before_add_to_cart_button'] = $old_button;
255
- }
256
-
257
- if (isset($old_after_form)) {
258
- $wp_filter['woocommerce_after_add_to_cart_form'] = $old_after_form;
259
- }
260
-
261
- if (isset($old_before_form)) {
262
- $wp_filter['woocommerce_before_add_to_cart_form'] = $old_before_form;
263
- }
264
-
265
- if (isset($old_after_button)) {
266
- $wp_filter['woocommerce_after_add_to_cart_button'] = $old_after_button;
267
- }
268
- } else {
269
- woocommerce_template_loop_add_to_cart();
270
- }
271
- }
272
- ?>
273
- </section>
274
- </div>
275
- </div>
276
- <?php
277
-
278
- return ob_get_clean();
279
- }
280
-
281
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/readme.php DELETED
@@ -1,37 +0,0 @@
1
- <h2><?php echo __('Instructions', 'blc'); ?></h2>
2
-
3
- <p>
4
- <?php echo __('After installing and activating the WooCommerce Extra extension you will have these features:', 'blc') ?>
5
- </p>
6
-
7
- <ol class="ct-modal-list">
8
- <li>
9
- <h4><?php echo __('Product Quick View', 'blc') ?></h4>
10
- <i>
11
- <?php
12
- echo sprintf(
13
- __('Navigate to %s and enable or disable it.', 'blc'),
14
- sprintf(
15
- '<code>%s</code>',
16
- __('Customizer ➝ WooCommerce ➝ Product Archives ➝ Card Options ➝ Quick View', 'blc')
17
- )
18
- );
19
- ?>
20
- </i>
21
- </li>
22
-
23
- <li>
24
- <h4><?php echo __('Floating Cart', 'blc') ?></h4>
25
- <i>
26
- <?php
27
- echo sprintf(
28
- __('Navigate to %s and enable or disable it.', 'blc'),
29
- sprintf(
30
- '<code>%s</code>',
31
- __('Customizer ➝ WooCommerce ➝ Single Product ➝ Floating Cart', 'blc')
32
- )
33
- );
34
- ?>
35
- </i>
36
- </li>
37
- </ol>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/bundle/main.css DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * - v1.7.37
3
- *
4
- * Copyright (c) 2020
5
- * Licensed GPLv2+
6
- */
7
-
8
- [id*="quick-view"] [data-loader]{--loaderColor: #fff;--loaderSize: 60px;opacity:1;visibility:visible;-webkit-animation-play-state:running;animation-play-state:running}.ct-open-quick-view{--trigger-size: 36px;--linkInitialColor: var(--color);--linkHoverColor: #fff;position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--trigger-size);height:var(--trigger-size);opacity:0;transition:color 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),opacity 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-open-quick-view:focus{opacity:1}.ct-open-quick-view:after{position:absolute;content:'';width:100%;height:100%;border-radius:100%;background:#fff;transition:transform 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955),background 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-open-quick-view:hover:after{background:var(--paletteColor1);transform:scale3d(1.1, 1.1, 1)}.ct-open-quick-view svg{position:relative;z-index:1;fill:currentColor}.ct-quick-view-card>section{position:relative;border-radius:7px;background:#fff;-webkit-mask-image:-webkit-radial-gradient(white, black)}@media (max-width: 689.98px){.ct-quick-view-card>section{overflow-y:auto;max-height:inherit}}.ct-quick-view-card .onsale{--badgeTop: 25px;--badgeLeft: 25px}.ct-quick-view-card .close-button{--top: 25px;--right: 25px;--triggerWidth: 14px;--closeButtonSize: 34px;--closeButtonRadius: 100%;--closeButtonColor: var(--color);--closeButtonBackground: #F2F2F2}.ct-quick-view-card .close-button:hover:before{transform:scale(1.15)}[id*="quick-view"]{--backgroundColor: rgba(18, 21, 25, 0.8)}[id*="quick-view"] .content-container{overflow:initial}[id*="quick-view"] .ct-container{--container-max-width: 1000px;min-height:200px;position:relative;border-radius:7px;box-shadow:0px 50px 100px 0px rgba(18,21,25,0.5)}@media (max-width: 689.98px){[id*="quick-view"] .ct-container{max-height:85vh}}@media (min-width: 690px){[id*="quick-view"] .ct-container{max-height:700px}}.ct-quick-view-card .ct-product-view{margin-bottom:0}.ct-quick-view-card .ct-product-view .ct-image-container{pointer-events:none}@media (max-width: 689.98px){.ct-quick-view-card .ct-product-view .ct-ratio{padding-bottom:100% !important}}@media (min-width: 690px){.ct-quick-view-card .ct-product-view{width:50%}}.ct-quick-view-card .flexy-pills[data-type="circle"]{position:absolute;z-index:2;left:0;right:0;bottom:20px;--flexyInitialPill: rgba(255, 255, 255, 0.6);--flexyActivePill: #fff}.ct-quick-view-card{position:relative}@media (max-width: 689.98px){.ct-quick-view-card .entry-summary{padding:6vw 6vw 0 6vw}.ct-quick-view-card .entry-summary:after{padding-bottom:6vw}}@media (min-width: 690px){.ct-quick-view-card .entry-summary{position:absolute;top:0;left:50%;right:0;z-index:1;height:100%;overflow-y:auto;padding:40px 40px 0 40px}.ct-quick-view-card .entry-summary:after{padding-bottom:40px}}.ct-quick-view-card .entry-summary:after{content:'';display:block}.ct-quick-view-card .entry-summary .product_title{padding-right:40px}.ct-quick-view-card .entry-summary form.cart{border-top-style:dashed;border-bottom:1px dashed rgba(224,229,235,0.8)}@media (max-width: 689.98px){.ct-quick-view-card .entry-summary form.cart{margin-bottom:30px;padding-bottom:30px}}@media (min-width: 690px){.ct-quick-view-card .entry-summary form.cart{margin-bottom:40px;padding-bottom:40px}}.ct-quick-view-card .ct-quick-more{--buttonMinHeight: 55px;--buttonTextInitialColor: var(--color);--buttonTextHoverColor: var(--color);--buttonInitialColor: rgba(224,229,235,0.6);--buttonHoverColor: rgba(224,229,235,1);width:100%}.ct-floating-bar{position:fixed;z-index:5;top:calc(var(--admin-bar, 0px) + var(--frame-size, 0px) + var(--headerStickyHeight, 0px));left:var(--frame-size, 0px);right:var(--frame-size, 0px);display:var(--visibility, flex);align-items:center;height:75px;color:var(--color);background:var(--backgroundColor);box-shadow:var(--box-shadow);opacity:0;visibility:hidden;transform:translateY(-75px);transition:opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease}.ct-floating-bar.ct-active{opacity:1;visibility:visible;transform:translateY(0)}.ct-floating-bar>div{display:grid;grid-template-columns:auto auto}.ct-floating-bar section{display:flex;align-items:center}.ct-floating-bar section p{--contentSpacing: 0}.ct-floating-bar section:last-child{justify-content:flex-end}.ct-floating-bar .ct-image-container{border-radius:3px}@media (max-width: 689.98px){.ct-floating-bar .ct-image-container{max-width:40px;margin-right:10px}}@media (min-width: 690px){.ct-floating-bar .ct-image-container{max-width:50px;margin-right:15px}}.ct-floating-bar .product_title{--fontWeight: 600;--headingColor: var(--color);margin-bottom:0}@media (max-width: 689.98px){.ct-floating-bar .product_title{--fontSize: 15px;--fontWeight: 500}}@media (max-width: 689.98px){.ct-floating-bar .price{font-size:12px}}@media (min-width: 690px){.ct-floating-bar .price{margin-right:15px}}.ct-floating-bar .stock{font-size:13px;font-weight:500;text-transform:uppercase;margin-right:15px}.ct-floating-bar .stock:before{content:'/';margin-right:10px}.ct-floating-bar form.cart{display:flex}.ct-floating-bar .quantity{--quantityHeight: 40px;width:80px;margin-right:10px}.ct-floating-bar .quantity input[type="number"]{--formFontSize: 13px}.ct-floating-bar .button,.ct-floating-bar .added_to_cart,.ct-floating-bar .single_add_to_cart_button{--buttonMinHeight: 40px;--padding: 0 15px}.ct-floating-bar .single_add_to_cart_button.added{display:none}@media (min-width: 690px){.floating-bar-content .price{display:none}}@media (max-width: 689.98px){.floating-bar-actions .price,.floating-bar-actions .quantity{display:none}.floating-bar-actions .added_to_cart,.floating-bar-actions .single_add_to_cart_button{--padding: 0 5px;--buttonShadow: none;--buttonTransform: none;min-width:40px;font-size:0 !important}.floating-bar-actions .added_to_cart:after,.floating-bar-actions .single_add_to_cart_button:after{font-family:'woo';font-size:15px;margin:0 !important}.floating-bar-actions .added_to_cart:after{content:'\e906'}.floating-bar-actions .single_add_to_cart_button:not(.loading):after{content:'\e909'}}
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/bundle/main.js DELETED
@@ -1 +0,0 @@
1
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e){t.exports=ctEvents},function(t,e){t.exports=window.jQuery},function(t,e){t.exports=window.ctFrontend},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r);function i(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var a=function(){var t=document.querySelector(".ct-floating-bar");if(t){var e=!1,n=function(){var t=document.querySelector(".ct-floating-bar");if(document.querySelector(".single-product .single_add_to_cart_button")){var e=document.querySelector(".single-product .single_add_to_cart_button").getBoundingClientRect();t&&(window.scrollY>window.scrollY+e.top+e.height?t.classList.add("ct-active"):t.classList.remove("ct-active"))}};n(),window.addEventListener("scroll",(function(){e||(e=!0,requestAnimationFrame((function(){n(),e=!1})))}));var r=t.querySelector(".button:not(.single_add_to_cart_button):not(.product_type_external)");r&&r.addEventListener("click",(function(t){t.preventDefault();var e=window.scrollY,n=null;requestAnimationFrame((function t(r){n||(n=r);var o=r-n;if(document.querySelector(".single-product .single_add_to_cart_button")){var i,c,a,u=document.querySelector(".single-product .single_add_to_cart_button").getBoundingClientRect(),l=Math.max((i=o,c=e,a=-e,(i/=700/2)<1?a/2*i*i+c:-a/2*(--i*(i-2)-1)+c),window.scrollY+u.top);scrollTo(0,l),o<700&&requestAnimationFrame(t)}}))}))}},u=n(0),l=n.n(u),s=n(2);function d(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var m={};l.a.on("blocksy:woo:floating-cart:init",(function(){a()}));var y,p=function(t){var e=t.e,n=t.el;if(!e.target.matches(".add_to_cart_button")&&!e.target.matches(".added_to_cart")){e.preventDefault();var r=Array.from(n.classList).find((function(t){return 0===t.indexOf("post-")})).split("-")[1],c="#quick-view-".concat(r);if(document.querySelector(c))l.a.trigger("ct:overlay:handle-click",{e:e,href:c,options:{clickOutside:!0}});else{var a,u='\n\t\t<div id="quick-view-'.concat(r,'" data-behaviour="modal" class="ct-panel quick-view-modal">\n\t\t\t<span data-loader="circles">\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t\t<span></span>\n\t\t\t</span>\n\t\t</div>\n '),f=document.createElement("div");f.innerHTML=u,document.body.appendChild(f.firstElementChild),setTimeout((function(){l.a.trigger("ct:overlay:handle-click",{e:e,href:c,options:{skipScrollLock:!0,scrollContainer:s.getCurrentScreen&&"mobile"===Object(s.getCurrentScreen)()?document.querySelector(c).firstElementChild.lastElementChild.lastElementChild:null,clickOutside:!0,focus:!1}})}),100),(a="".concat(ct_localizations.ajax_url,"?action=blocsky_get_woo_quick_view&product_id=").concat(r),m[a]?new Promise((function(t){t(m[a]),m[a]=m[a].clone()})):new Promise((function(t){return fetch(a).then((function(e){t(e),m[a]=e.clone()}))}))).then((function(t){200===t.status&&t.json().then((function(t){var n=t.success,r=t.data;if(n){var a=document.createElement("div");a.innerHTML=r.quickview,function(t){i(t.querySelectorAll(".ct-image-container.ct-lazy")).map((function(t){t.querySelector("img")&&(t.querySelector("img").setAttribute("src",t.querySelector("img").dataset.ctLazy),t.querySelector("img").dataset.ctLazySet&&t.querySelector("img").setAttribute("srcset",t.querySelector("img").dataset.ctLazySet)),t.classList.remove("ct-lazy"),t.classList.add("ct-lazy-loaded")}))}(a),document.querySelector(c)&&(document.querySelector(c).innerHTML=a.firstElementChild.innerHTML);d(document.querySelectorAll("".concat(c," .variations_form"))).map((function(t){return o()(t).wc_variation_form()})),l.a.trigger("ct:custom-select:init"),l.a.trigger("ct:custom-select-allow:init"),l.a.trigger("ct:add-to-cart:update"),setTimeout((function(){o.a&&o.a.wcpaInit&&o.a.wcpaInit()}),50),setTimeout((function(){l.a.trigger("ct:overlay:handle-click",{e:e,href:c,options:{scrollContainer:s.getCurrentScreen&&"mobile"===Object(s.getCurrentScreen)()?document.querySelector(c).firstElementChild.lastElementChild.lastElementChild:null,clickOutside:!0,focus:!1,forceOpen:!0}}),setTimeout((function(){return l.a.trigger("ct:flexy:update")}))}),100)}}))}))}}},v=function(){a(),d(document.querySelectorAll('.ct-open-quick-view, [data-quick-view="image"] .ct-image-container')).map((function(t){t.hasQuickViewInit||(t.hasQuickViewInit=!0,t.addEventListener("click",(function(e){p({e:e,el:t.closest(".product")})})))})),d(document.querySelectorAll('[data-quick-view="card"] > *')).map((function(t){t.hasQuickViewInit||(t.hasQuickViewInit=!0,t.addEventListener("click",(function(e){p({e:e,el:t})})))}))};y=function(){v(),l.a.on("ct:quick-view:update",(function(){return v()})),l.a.on("ct:infinite-scroll:load",(function(){return v()})),l.a.on("blocksy:frontend:init",(function(){return v()})),l.a.on("ct:modal:closed",(function(t){if(t.closest(".quick-view-modal")){if(t.querySelector(".flexy-container")){var e=t.querySelector(".flexy-container").parentNode;e.flexy&&e.flexy.destroy&&e.flexy.destroy()}setTimeout((function(){t.remove()}))}}))},/comp|inter|loaded/.test(document.readyState)?y():document.addEventListener("DOMContentLoaded",y,!1)}]);
 
framework/extensions/woocommerce-extra/static/bundle/sync.js DELETED
@@ -1 +0,0 @@
1
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){t.exports=ctEvents},function(t,e){window.ctEvents=window.ctEvents||new function(){var t={},e=1,n=!1;function r(t,e){if("string"!=typeof t)return t;for(var n=t.replace(/\s\s+/g," ").trim().split(" "),r=n.length,o=Object.create(null),i=0;i<r;i++)o[n[i]]=e;return o}function o(t,e){for(var n={},r=Object.keys(t),o=r.length,i=0;i<o;i++){var c=r[i];n[c]=e(c,t[c])}return n}function i(t,r){function o(){return new Array(e).join("│ ")}n&&(void 0!==r?console.log("[Event] "+o()+t,"─",r):console.log("[Event] "+o()+t))}this.countAll=function(e){return t[e]},this.log=i,this.debug=function(t){return n=Boolean(t),this},this.on=function(e,c){return o(r(e,c),(function(e,r){(t[e]||(t[e]=[])).push(r),n&&i("✚ "+e)})),this},this.one=function(e,c){return o(r(e,c),(function(e,r){var o,c,a;(t[e]||(t[e]=[])).push((o=r,a=2,function(){return--a>0&&(c=o.apply(this,arguments)),a<=1&&(o=null),c})),n&&i("✚ ["+e+"]")})),this},this.off=function(e,c){return o(r(e,c),(function(e,r){t[e]&&(r?t[e].splice(t[e].indexOf(r)>>>0,1):t[e]=[],n&&i("✖ "+e))})),this},this.trigger=function(n,c){return o(r(n),(function(e){i("╭─ "+e,c),a(1);try{"fw:options:init"===e&&fw.options.startListeningToEvents(c.$elements||document.body),(t[e]||[]).map(n),(t.all||[]).map(n)}catch(t){if(console.log("%c [Events] Exception raised.","color: red; font-weight: bold;"),"undefined"==typeof console)throw t;console.error(t)}function n(t){t&&t.call(window,c)}a(-1),i("╰─ "+e,c)})),this;function a(t){void 0!==t&&(e+=t>0?1:-1),e<0&&(e=0)}},this.hasListeners=function(e){return!!t&&(t[e]||[]).length>0}}},function(t,e,n){"use strict";n.r(e);var r,o,i,c,a,l,u,s,f,p=function(t){if([t.top,t.right,t.bottom,t.left].reduce((function(t,e){return!!t&&!("auto"!==e&&e&&e.toString().match(/\d/g))}),!0))return"CT_CSS_SKIP_RULE";var e=["auto"!==t.top&&t.top.toString().match(/\d/g)?t.top:0,"auto"!==t.right&&t.right.toString().match(/\d/g)?t.right:0,"auto"!==t.bottom&&t.bottom.toString().match(/\d/g)?t.bottom:0,"auto"!==t.left&&t.left.toString().match(/\d/g)?t.left:0];return e[0]===e[1]&&e[0]===e[2]&&e[0]===e[3]?e[0]:e[0]===e[2]&&e[1]===e[3]?"".concat(e[0]," ").concat(e[3]):e.join(" ")},d=function(t,e){var n=e.forcedOutput,r=void 0!==n&&n;if("CT_CSS_SKIP_RULE"===t)return"CT_CSS_SKIP_RULE";if("none"===t)return"none";if(!t.enable)return r?"none":"CT_CSS_SKIP_RULE";if(0===parseFloat(t.blur)&&0===parseFloat(t.spread)&&0===parseFloat(t.v_offset)&&0===parseFloat(t.h_offset))return r?"none":"CT_CSS_SKIP_RULE";var o=[];return t.inset&&o.push("inset"),o.push("".concat(t.h_offset,"px")),o.push("".concat(t.v_offset,"px")),0!==parseFloat(t.blur)&&(o.push("".concat(t.blur,"px")),0!==parseFloat(t.spread)&&o.push("".concat(t.spread,"px"))),0===parseFloat(t.blur)&&0!==parseFloat(t.spread)&&(o.push("".concat(t.blur,"px")),o.push("".concat(t.spread,"px"))),o.push(t.color.color),o.join(" ")},b=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},o=document.querySelector("style#".concat(r[n])),i=o.innerText,c="".concat(t["".concat(n,"_selector_prefix")]?"".concat(t["".concat(n,"_selector_prefix")]," "):"").concat(t.selector||":root"),a=null,l=i.match(a);0===i.trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)),l||(0===(i="".concat(i," ").concat(c," { }")).trim().indexOf(c)?(a=new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a)):(a=new RegExp("\\}\\s*?".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=i.match(a))),o.innerText=i.replace(a,l[0].indexOf("--".concat(t.variable,":"))>-1?l[0].replace(new RegExp("--".concat(t.variable,":[\\s\\S]*?;"),"gm"),e.indexOf("CT_CSS_SKIP_RULE")>-1||e.indexOf(t.variable)>-1?"":"--".concat(t.variable,": ").concat(e,";")):l[0].replace(new RegExp("".concat(c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(c," {").concat(e.indexOf("CT_CSS_SKIP_RULE")>-1||e.indexOf(t.variable)>-1?"":"--".concat(t.variable,": ").concat(e,";"))))},h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",r=(t.type||"").indexOf("color")>-1?e["color"===t.type?"default":t.type.split(":")[1]].color:e;"border"===(t.type||"")&&(r=e&&"none"!==e.style?"".concat(e.width,"px ").concat(e.style," ").concat(e.color.color):"none"),"spacing"===(t.type||"")&&(r=p(e)),"box-shadow"===(t.type||"")&&(r=d(e,t)),b(t,"".concat(r).concat(t.unit||"").concat(t.important?" !important":""),n)},g=function(t,e){var n=e;e=t.extractValue?t.extractValue(e):e,t.whenDone&&t.whenDone(e,n),e=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t&&Object.keys(t).indexOf("desktop")>-1?e?t:t.desktop:e?{desktop:t,tablet:t,mobile:t}:t}(e,!!t.responsive),t.responsive?(t.enabled&&"no"===!wp.customize(t.enabled)()&&(e.mobile="0"+(t.unit?"":"px"),e.tablet="0"+(t.unit?"":"px"),e.desktop="0"+(t.unit?"":"px")),h(t,e.desktop,"desktop"),h(t,e.tablet,"tablet"),h(t,e.mobile,"mobile")):h(t,e)};r={floatingBarFontColor:{selector:".ct-floating-bar",variable:"color",type:"color"},floatingBarBackground:{selector:".ct-floating-bar",variable:"backgroundColor",type:"color"},floatingBarShadow:{selector:".ct-floating-bar",type:"box-shadow",variable:"box-shadow",responsive:!0},floatingBarVisibility:(o={on:"flex",selector:".ct-floating-bar"},i=o.selector,c=o.variable,a=void 0===c?"visibility":c,l=o.on,u=void 0===l?"block":l,s=o.off,f=void 0===s?"none":s,{selector:i,variable:a,responsive:!0,extractValue:function(t){var e=t.mobile,n=t.tablet,r=t.desktop;return{mobile:e?u:f,tablet:n?u:f,desktop:r?u:f}}})},wp.customize.bind("change",(function(t){return r[t.id]&&(Array.isArray(r[t.id])?r[t.id]:[r[t.id]]).map((function(e){return g(e,t())}))}));n(1);var m=n(0),y=n.n(m);function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=t[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(t,e)||w(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||w(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){E(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var j=function(){var t=document.createElement("div");return t.innerHTML=document.querySelector(".ct-customizer-preview-cache-container").value,t},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(e||(e=j()),e.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(t,'"]'))){var r=e.querySelector(".ct-customizer-preview-cache [data-".concat(n,'="').concat(t,'"]')).innerHTML,o=document.createElement("div");return o.innerHTML=r,o}},P=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=O({fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(t){},should_insert:!0},t);var e=document.querySelector(t.parent_selector);if(S(document.querySelectorAll("".concat(t.parent_selector," ").concat(t.selector))).map((function(t){return t.parentNode.removeChild(t)})),t.should_insert){var n=C(t.fragment_id);if(n){for(;n.firstElementChild;)if(t.beforeInsert(n.firstElementChild),"append"===t.strategy&&e.appendChild(n.firstElementChild),"firstChild"===t.strategy&&e.insertBefore(n.firstElementChild,e.firstElementChild),t.strategy.indexOf("maybeBefore")>-1){var r=t.strategy.split(":"),o=v(r,2),i=(o[0],o[1]);e.querySelector(i)?e.insertBefore(n.firstElementChild,e.querySelector(i)):e.appendChild(n.firstElementChild)}t.whenInserted()}}};!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=O({id:null,fragment_id:null,selector:null,parent_selector:null,strategy:"append",whenInserted:function(){},beforeInsert:function(t){},watch:[]},t);var e=function(){var e=wp.customize(t.id)();P(O(O({},t),{},{should_insert:"yes"===e}))};wp.customize(t.id,(function(t){return t.bind((function(t){return e()}))})),t.watch.map((function(t){return wp.customize(t,(function(t){return t.bind((function(){return e()}))}))}))}({id:"has_floating_bar",strategy:"append",parent_selector:"body",selector:".ct-floating-bar",fragment_id:"blocksy-woo-floating-cart",whenInserted:function(){return y.a.trigger("blocksy:woo:floating-cart:init")}})}]);
 
framework/extensions/woocommerce-extra/static/js/floating-cart.js DELETED
@@ -1,94 +0,0 @@
1
- export const mountFloatingCart = () => {
2
- var floatingCart = document.querySelector('.ct-floating-bar')
3
-
4
- if (!floatingCart) return
5
-
6
- // browser window scroll (in pixels) after which the "back to top" link is shown
7
- // browser window scroll (in pixels) after which the "back to top" link opacity is reduced
8
- var scrolling = false
9
-
10
- const compute = () => {
11
- var floatingCart = document.querySelector('.ct-floating-bar')
12
-
13
- if (
14
- !document.querySelector(
15
- '.single-product .single_add_to_cart_button'
16
- )
17
- ) {
18
- return
19
- }
20
-
21
- const summary = document
22
- .querySelector('.single-product .single_add_to_cart_button')
23
- .getBoundingClientRect()
24
-
25
- if (!floatingCart) return
26
-
27
- window.scrollY > window.scrollY + summary.top + summary.height
28
- ? floatingCart.classList.add('ct-active')
29
- : floatingCart.classList.remove('ct-active')
30
- }
31
-
32
- compute()
33
-
34
- window.addEventListener('scroll', () => {
35
- if (scrolling) return
36
-
37
- scrolling = true
38
-
39
- requestAnimationFrame(() => {
40
- compute()
41
- scrolling = false
42
- })
43
- })
44
-
45
- const maybeButton = floatingCart.querySelector(
46
- '.button:not(.single_add_to_cart_button):not(.product_type_external)'
47
- )
48
-
49
- if (maybeButton) {
50
- maybeButton.addEventListener('click', event => {
51
- event.preventDefault()
52
-
53
- var start = window.scrollY
54
- var currentTime = null
55
-
56
- const animateScroll = timestamp => {
57
- if (!currentTime) currentTime = timestamp
58
- var progress = timestamp - currentTime
59
-
60
- const easeInOutQuad = (t, b, c, d) => {
61
- t /= d / 2
62
- if (t < 1) return (c / 2) * t * t + b
63
- t--
64
- return (-c / 2) * (t * (t - 2) - 1) + b
65
- }
66
-
67
- if (
68
- !document.querySelector(
69
- '.single-product .single_add_to_cart_button'
70
- )
71
- ) {
72
- return
73
- }
74
-
75
- const summary = document
76
- .querySelector('.single-product .single_add_to_cart_button')
77
- .getBoundingClientRect()
78
-
79
- var val = Math.max(
80
- easeInOutQuad(progress, start, -start, 700),
81
- window.scrollY + summary.top
82
- )
83
-
84
- scrollTo(0, val)
85
-
86
- if (progress < 700) {
87
- requestAnimationFrame(animateScroll)
88
- }
89
- }
90
-
91
- requestAnimationFrame(animateScroll)
92
- })
93
- }
94
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/js/helpers.js DELETED
@@ -1,15 +0,0 @@
1
- export const handleResponsiveSwitch = ({
2
- selector,
3
- variable = 'visibility',
4
- on = 'block',
5
- off = 'none'
6
- }) => ({
7
- selector,
8
- variable,
9
- responsive: true,
10
- extractValue: ({ mobile, tablet, desktop }) => ({
11
- mobile: mobile ? on : off,
12
- tablet: tablet ? on : off,
13
- desktop: desktop ? on : off
14
- })
15
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/js/main.js DELETED
@@ -1,217 +0,0 @@
1
- import $ from 'jquery'
2
- import { markImagesAsLoaded } from '../../../cookies-consent/static/js/lazy-load-helpers'
3
- import { onDocumentLoaded } from '../../../cookies-consent/static/js/helpers'
4
- import { mountFloatingCart } from './floating-cart'
5
- import ctEvents from 'ct-events'
6
- import { getCurrentScreen } from 'blocksy-frontend'
7
-
8
- const store = {}
9
-
10
- const cachedFetch = url =>
11
- store[url]
12
- ? new Promise(resolve => {
13
- resolve(store[url])
14
- store[url] = store[url].clone()
15
- })
16
- : new Promise(resolve =>
17
- fetch(url).then(response => {
18
- resolve(response)
19
- store[url] = response.clone()
20
- })
21
- )
22
-
23
- ctEvents.on('blocksy:woo:floating-cart:init', () => {
24
- mountFloatingCart()
25
- })
26
-
27
- const openQuickViewFor = ({ e, el }) => {
28
- if (e.target.matches('.add_to_cart_button')) {
29
- return
30
- }
31
-
32
- if (e.target.matches('.added_to_cart')) {
33
- return
34
- }
35
-
36
- e.preventDefault()
37
-
38
- let productId = Array.from(el.classList)
39
- .find(className => className.indexOf('post-') === 0)
40
- .split('-')[1]
41
-
42
- let href = `#quick-view-${productId}`
43
-
44
- if (document.querySelector(href)) {
45
- ctEvents.trigger('ct:overlay:handle-click', {
46
- e,
47
- href,
48
- options: {
49
- clickOutside: true
50
- }
51
- })
52
- return
53
- }
54
-
55
- const loadingHtml = `
56
- <div id="quick-view-${productId}" data-behaviour="modal" class="ct-panel quick-view-modal">
57
- <span data-loader="circles">
58
- <span></span>
59
- <span></span>
60
- <span></span>
61
- </span>
62
- </div>
63
- `
64
-
65
- const div = document.createElement('div')
66
-
67
- div.innerHTML = loadingHtml
68
-
69
- document.body.appendChild(div.firstElementChild)
70
-
71
- setTimeout(() => {
72
- ctEvents.trigger('ct:overlay:handle-click', {
73
- e,
74
- href,
75
- options: {
76
- skipScrollLock: true,
77
- scrollContainer:
78
- getCurrentScreen && getCurrentScreen() === 'mobile'
79
- ? document.querySelector(href).firstElementChild
80
- .lastElementChild.lastElementChild
81
- : null,
82
- clickOutside: true,
83
- focus: false
84
- }
85
- })
86
- }, 100)
87
-
88
- cachedFetch(
89
- `${ct_localizations.ajax_url}?action=blocsky_get_woo_quick_view&product_id=${productId}`
90
- ).then(r => {
91
- if (r.status === 200) {
92
- r.json().then(({ success, data }) => {
93
- if (!success) return
94
-
95
- const div = document.createElement('div')
96
-
97
- div.innerHTML = data.quickview
98
-
99
- markImagesAsLoaded(div)
100
-
101
- if (document.querySelector(href)) {
102
- document.querySelector(href).innerHTML =
103
- div.firstElementChild.innerHTML
104
- }
105
-
106
- const wc_single_product_params = {
107
- i18n_required_rating_text: 'Please select a rating',
108
- review_rating_required: 'yes',
109
- flexslider: {
110
- rtl: false,
111
- animation: 'slide',
112
- smoothHeight: true,
113
- directionNav: false,
114
- controlNav: 'thumbnails',
115
- slideshow: false,
116
- animationSpeed: 500,
117
- animationLoop: false,
118
- allowOneSlide: false
119
- },
120
- zoom_enabled: '',
121
- zoom_options: [],
122
- photoswipe_enabled: '1',
123
- photoswipe_options: {
124
- shareEl: false,
125
- closeOnScroll: false,
126
- history: false,
127
- hideAnimationDuration: 0,
128
- showAnimationDuration: 0
129
- },
130
- flexslider_enabled: '1'
131
- }
132
- ;[
133
- ...document.querySelectorAll(`${href} .variations_form`)
134
- ].map(el => $(el).wc_variation_form())
135
-
136
- ctEvents.trigger('ct:custom-select:init')
137
- ctEvents.trigger('ct:custom-select-allow:init')
138
-
139
- ctEvents.trigger('ct:add-to-cart:update')
140
-
141
- setTimeout(() => {
142
- if ($) {
143
- $.wcpaInit && $.wcpaInit()
144
- }
145
- }, 50)
146
-
147
- setTimeout(() => {
148
- ctEvents.trigger('ct:overlay:handle-click', {
149
- e,
150
- href,
151
- options: {
152
- scrollContainer:
153
- getCurrentScreen &&
154
- getCurrentScreen() === 'mobile'
155
- ? document.querySelector(href)
156
- .firstElementChild.lastElementChild
157
- .lastElementChild
158
- : null,
159
- clickOutside: true,
160
- focus: false,
161
- forceOpen: true
162
- }
163
- })
164
- setTimeout(() => ctEvents.trigger('ct:flexy:update'))
165
- }, 100)
166
- })
167
- }
168
- })
169
- }
170
-
171
- const mount = () => {
172
- mountFloatingCart()
173
- ;[
174
- ...document.querySelectorAll(
175
- '.ct-open-quick-view, [data-quick-view="image"] .ct-image-container'
176
- )
177
- ].map(el => {
178
- if (el.hasQuickViewInit) return
179
- el.hasQuickViewInit = true
180
-
181
- el.addEventListener('click', e => {
182
- openQuickViewFor({ e, el: el.closest('.product') })
183
- })
184
- })
185
- ;[...document.querySelectorAll('[data-quick-view="card"] > *')].map(el => {
186
- if (el.hasQuickViewInit) return
187
- el.hasQuickViewInit = true
188
-
189
- el.addEventListener('click', e => {
190
- openQuickViewFor({ e, el })
191
- })
192
- })
193
- }
194
-
195
- onDocumentLoaded(() => {
196
- mount()
197
- ctEvents.on('ct:quick-view:update', () => mount())
198
- ctEvents.on('ct:infinite-scroll:load', () => mount())
199
- ctEvents.on('blocksy:frontend:init', () => mount())
200
-
201
- ctEvents.on('ct:modal:closed', modalContainer => {
202
- if (!modalContainer.closest('.quick-view-modal')) {
203
- return
204
- }
205
-
206
- if (modalContainer.querySelector('.flexy-container')) {
207
- const flexyEl = modalContainer.querySelector('.flexy-container')
208
- .parentNode
209
-
210
- flexyEl.flexy && flexyEl.flexy.destroy && flexyEl.flexy.destroy()
211
- }
212
-
213
- setTimeout(() => {
214
- modalContainer.remove()
215
- })
216
- })
217
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/js/sync.js DELETED
@@ -1,19 +0,0 @@
1
- import './variables'
2
- import '../../../cookies-consent/static/js/ct-events'
3
- import ctEvents from 'ct-events'
4
-
5
- import {
6
- checkAndReplace,
7
- responsiveClassesFor
8
- } from '../../../cookies-consent/static/js/sync/helpers'
9
-
10
- checkAndReplace({
11
- id: 'has_floating_bar',
12
- strategy: 'append',
13
-
14
- parent_selector: 'body',
15
- selector: '.ct-floating-bar',
16
- fragment_id: 'blocksy-woo-floating-cart',
17
-
18
- whenInserted: () => ctEvents.trigger('blocksy:woo:floating-cart:init')
19
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/js/variables.js DELETED
@@ -1,28 +0,0 @@
1
- import { handleVariablesFor } from 'customizer-sync-helpers'
2
- import { handleResponsiveSwitch } from './helpers'
3
-
4
- handleVariablesFor({
5
- floatingBarFontColor: {
6
- selector: '.ct-floating-bar',
7
- variable: 'color',
8
- type: 'color'
9
- },
10
-
11
- floatingBarBackground: {
12
- selector: '.ct-floating-bar',
13
- variable: 'backgroundColor',
14
- type: 'color'
15
- },
16
-
17
- floatingBarShadow: {
18
- selector: '.ct-floating-bar',
19
- type: 'box-shadow',
20
- variable: 'box-shadow',
21
- responsive: true
22
- },
23
-
24
- floatingBarVisibility: handleResponsiveSwitch({
25
- on: 'flex',
26
- selector: '.ct-floating-bar'
27
- })
28
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/woocommerce-extra/static/sass/floating-bar/main.scss DELETED
@@ -1,156 +0,0 @@
1
- .ct-floating-bar {
2
- position: fixed;
3
- z-index: 5;
4
- top: calc(var(--admin-bar, 0px) + var(--frame-size, 0px) + var(--headerStickyHeight, 0px));
5
- left: var(--frame-size, 0px);
6
- right: var(--frame-size, 0px);
7
- display: var(--visibility, flex);
8
- align-items: center;
9
- height: 75px;
10
- color: var(--color);
11
- background: var(--backgroundColor);
12
- box-shadow: var(--box-shadow);
13
- opacity: 0;
14
- visibility: hidden;
15
- transform: translateY(-75px);
16
- transition: opacity 0.2s ease,
17
- transform 0.2s ease,
18
- visibility 0.2s ease;
19
-
20
- &.ct-active {
21
- opacity: 1;
22
- visibility: visible;
23
- transform: translateY(0);
24
- }
25
-
26
- > div {
27
- display: grid;
28
- // grid-template-columns: repeat(2, 1fr);
29
- grid-template-columns: auto auto;
30
- }
31
-
32
- section {
33
- display: flex;
34
- align-items: center;
35
-
36
- p {
37
- --contentSpacing: 0;
38
- }
39
-
40
- &:last-child {
41
- justify-content: flex-end;
42
- }
43
- }
44
-
45
- .ct-image-container {
46
- border-radius: 3px;
47
-
48
- @include media-breakpoint-down (sm) {
49
- max-width: 40px;
50
- margin-right: 10px;
51
- }
52
-
53
- @include media-breakpoint-up (md) {
54
- max-width: 50px;
55
- margin-right: 15px;
56
- }
57
- }
58
-
59
- .product_title {
60
- --fontWeight: 600;
61
- --headingColor: var(--color);
62
- margin-bottom: 0;
63
-
64
- @include media-breakpoint-down (sm) {
65
- --fontSize: 15px;
66
- --fontWeight: 500;
67
- }
68
- }
69
-
70
- .price {
71
- @include media-breakpoint-down (sm) {
72
- font-size: 12px;
73
- }
74
-
75
- @include media-breakpoint-up (md) {
76
- margin-right: 15px;
77
- }
78
- }
79
-
80
- .stock {
81
- font-size: 13px;
82
- font-weight: 500;
83
- text-transform: uppercase;
84
- margin-right: 15px;
85
-
86
- &:before {
87
- content: '/';
88
- margin-right: 10px;
89
- }
90
- }
91
-
92
- form.cart {
93
- display: flex;
94
- }
95
-
96
- .quantity {
97
- --quantityHeight: 40px;
98
- width: 80px;
99
- margin-right: 10px;
100
-
101
- input[type="number"] {
102
- --formFontSize: 13px;
103
- }
104
- }
105
-
106
- .button,
107
- .added_to_cart,
108
- .single_add_to_cart_button {
109
- --buttonMinHeight: 40px;
110
- --padding: 0 15px;
111
- }
112
-
113
- .single_add_to_cart_button.added {
114
- display: none;
115
- }
116
- }
117
-
118
-
119
- @include media-breakpoint-up (md) {
120
- .floating-bar-content .price {
121
- display: none;
122
- }
123
- }
124
-
125
- @include media-breakpoint-down (sm) {
126
- .floating-bar-actions {
127
-
128
- .price,
129
- .quantity {
130
- display: none;
131
- }
132
-
133
- .added_to_cart,
134
- .single_add_to_cart_button {
135
- --padding: 0 5px;
136
- --buttonShadow: none;
137
- --buttonTransform: none;
138
- min-width: 40px;
139
- font-size: 0 !important;
140
-
141
- &:after {
142
- font-family: 'woo';
143
- font-size: 15px;
144
- margin: 0 !important;
145
- }
146
- }
147
-
148
- .added_to_cart:after {
149
- content: '\e906';
150
- }
151
-
152
- .single_add_to_cart_button:not(.loading):after {
153
- content: '\e909';
154
- }
155
- }
156
- }