Blocksy Companion - Version 1.8.6.2

Version Description

Download this release

Release Info

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

Code changes from version 1.8.6.1 to 1.8.6.2

Files changed (83) hide show
  1. blocksy-companion.php +1 -1
  2. framework/extensions-manager.php +72 -7
  3. framework/extensions/cookies-consent/static/bundle/main.min.css +1 -1
  4. framework/extensions/mailchimp/admin-static/bundle/2.976c8f43abfe584b1a9d.js +0 -1
  5. framework/extensions/mailchimp/admin-static/bundle/sync.js +0 -1
  6. framework/extensions/mailchimp/admin-static/js/variables.js +0 -52
  7. framework/extensions/mailchimp/ct-mailchimp/view.php +0 -109
  8. framework/extensions/mailchimp/dashboard-static/js/EditCredentials.js +0 -157
  9. framework/extensions/mailchimp/helpers.php +0 -140
  10. framework/extensions/mailchimp/static/bundle/main.js +0 -1
  11. framework/extensions/mailchimp/static/bundle/main.min.css +0 -8
  12. framework/extensions/mailchimp/static/js/main.js +0 -68
  13. framework/extensions/mailchimp/static/sass/single-block.scss +0 -70
  14. framework/extensions/mailchimp/static/sass/widget.scss +0 -39
  15. framework/extensions/{mailchimp/admin-static/bundle/1.2c9ebf0a36c6c732fee6.js → newsletter-subscribe/admin-static/bundle/1.f588f19f53311c8b6a0a.js} +2 -2
  16. framework/extensions/newsletter-subscribe/admin-static/bundle/2.61bd55d629d700145be1.js +1 -0
  17. framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/bundle/main.js +1 -1
  18. framework/extensions/newsletter-subscribe/admin-static/bundle/sync.js +1 -0
  19. framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/ListPicker.js +1 -1
  20. framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/ListPicker/Implementation.js +14 -10
  21. framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/main.js +2 -2
  22. framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/public-path.js +0 -0
  23. framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/sync.js +25 -20
  24. framework/extensions/newsletter-subscribe/admin-static/js/variables.js +51 -0
  25. framework/extensions/{mailchimp → newsletter-subscribe}/config.php +2 -2
  26. framework/extensions/{mailchimp/ct-mailchimp → newsletter-subscribe/ct-newsletter-subscribe}/options.php +13 -13
  27. framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/view.php +124 -0
  28. framework/extensions/{mailchimp/ct-mailchimp → newsletter-subscribe/ct-newsletter-subscribe}/widget.php +2 -2
  29. framework/extensions/{mailchimp → newsletter-subscribe}/customizer.php +22 -28
  30. framework/extensions/{mailchimp → newsletter-subscribe}/dashboard-static/bundle/main.js +3 -3
  31. framework/extensions/newsletter-subscribe/dashboard-static/js/EditCredentials.js +219 -0
  32. framework/extensions/{mailchimp → newsletter-subscribe}/dashboard-static/js/ListPicker.js +8 -8
  33. framework/extensions/{mailchimp/dashboard-static/js/Mailchimp.js → newsletter-subscribe/dashboard-static/js/NewsletterSubscribe.js} +2 -2
  34. framework/extensions/{mailchimp → newsletter-subscribe}/dashboard-static/js/hooks/useActivationWithRequirements.js +0 -0
  35. framework/extensions/{mailchimp → newsletter-subscribe}/dashboard-static/js/main.js +3 -3
  36. framework/extensions/{mailchimp → newsletter-subscribe}/extension.php +83 -17
  37. framework/extensions/{mailchimp → newsletter-subscribe}/global.php +25 -26
  38. framework/extensions/newsletter-subscribe/helpers.php +187 -0
  39. framework/extensions/{mailchimp/mailchimp-manager.php → newsletter-subscribe/includes/BlocksyMailchimpManager.php} +12 -50
  40. framework/extensions/newsletter-subscribe/includes/BlocksyMailerliteManager.php +104 -0
  41. framework/extensions/newsletter-subscribe/includes/BlocksyNewsletterManager.php +63 -0
  42. framework/extensions/{mailchimp → newsletter-subscribe}/pre-boot.php +27 -14
  43. framework/extensions/{mailchimp → newsletter-subscribe}/readme.php +4 -3
  44. framework/extensions/newsletter-subscribe/static/bundle/main.js +1 -0
  45. framework/extensions/newsletter-subscribe/static/bundle/main.min.css +8 -0
  46. framework/extensions/newsletter-subscribe/static/js/main.js +105 -0
  47. framework/extensions/{mailchimp → newsletter-subscribe}/static/sass/main.scss +5 -5
  48. framework/extensions/newsletter-subscribe/static/sass/single-block.scss +76 -0
  49. framework/extensions/newsletter-subscribe/static/sass/widget.scss +17 -0
  50. framework/extensions/product-reviews/pre-boot.php +1 -1
  51. framework/extensions/product-reviews/static/bundle/dashboard.js +2 -2
  52. framework/extensions/product-reviews/static/bundle/main-admin.min.css +1 -1
  53. framework/extensions/product-reviews/static/bundle/main.min.css +1 -1
  54. framework/extensions/trending/customizer.php +131 -2
  55. framework/extensions/trending/helpers.php +61 -11
  56. framework/extensions/trending/static/bundle/main.min.css +1 -1
  57. framework/extensions/trending/static/bundle/sync.js +1 -1
  58. framework/extensions/trending/static/js/sync.js +14 -0
  59. framework/extensions/widgets/static/bundle/main.min.css +2 -2
  60. framework/extensions/widgets/static/sass/social-icons.scss +13 -7
  61. framework/extensions/widgets/widgets/ct-posts/options.php +4 -3
  62. framework/extensions/widgets/widgets/ct-posts/view.php +7 -3
  63. framework/features/demo-install.php +9 -5
  64. framework/features/header.php +11 -1
  65. framework/features/header/items/account/dynamic-styles.php +42 -3
  66. framework/features/header/items/account/options.php +67 -34
  67. framework/features/header/items/account/sync.js +15 -1
  68. framework/features/header/items/account/view.php +6 -6
  69. framework/features/header/modal/login.php +11 -2
  70. framework/theme-integration.php +3 -2
  71. framework/views/blocksy-posts.php +4 -1
  72. languages/blocksy-companion.pot +1636 -2366
  73. readme.txt +16 -1
  74. static/bundle/dashboard.js +1 -1
  75. static/bundle/dashboard.min.css +2 -2
  76. static/bundle/options.min.css +1 -1
  77. static/bundle/sticky.js +1 -1
  78. static/bundle/sync.js +1 -1
  79. static/js/frontend/sticky.js +35 -35
  80. static/js/helpers/useActivationAction.js +50 -13
  81. static/sass/activation-actions/activation-modal.scss +11 -5
  82. static/sass/demo-install/demo-list.scss +1 -0
  83. static/sass/extensions/mailchimp-config.scss +12 -2
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.8.6.1
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.8.6.2
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
framework/extensions-manager.php CHANGED
@@ -181,24 +181,78 @@ class ExtensionsManager
181
 
182
  private function register_fake_extensions()
183
  {
184
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  $this->extensions['custom-fonts'] = [
186
  'path' => null,
187
  '__object' => null,
188
  'config' => [
189
  'name' => __( 'Custom Fonts', 'blc' ),
190
- 'description' => __( 'Upload unlimited number of custom fonts.', 'blc' ),
 
 
 
 
 
 
 
 
 
 
 
191
  'pro' => true,
192
  ],
193
  'readme' => '',
194
  'data' => null,
195
  ];
196
- $this->extensions['sidebars'] = [
197
  'path' => null,
198
  '__object' => null,
199
  'config' => [
200
- 'name' => __( 'Sidebars', 'blc' ),
201
- 'description' => __( 'Create unlimited number of custom sidebars.', 'blc' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  'pro' => true,
203
  ],
204
  'readme' => '',
@@ -208,8 +262,19 @@ class ExtensionsManager
208
  'path' => null,
209
  '__object' => null,
210
  'config' => [
211
- 'name' => __( 'White Label', 'blc' ),
212
- 'description' => __( 'Change theme/companion branding', 'blc' ),
 
 
 
 
 
 
 
 
 
 
 
213
  'pro' => true,
214
  ],
215
  'readme' => '',
181
 
182
  private function register_fake_extensions()
183
  {
184
+ $this->extensions['adobe-typekit'] = [
185
+ 'path' => null,
186
+ '__object' => null,
187
+ 'config' => [
188
+ 'name' => __( 'Adobe Typekit', 'blc' ),
189
+ 'description' => __( 'Connect your Typekit account and use your fonts in any typography option.', 'blc' ),
190
+ 'pro' => true,
191
+ ],
192
+ 'readme' => '',
193
+ 'data' => null,
194
+ ];
195
+ $this->extensions['custom-code-snippets'] = [
196
+ 'path' => null,
197
+ '__object' => null,
198
+ 'config' => [
199
+ 'name' => __( 'Custom Code Snippets', 'blc' ),
200
+ 'description' => __( 'Add custom code snippets in your header and footer, globally and per post or page individually.', 'blc' ),
201
+ 'pro' => true,
202
+ ],
203
+ 'readme' => '',
204
+ 'data' => null,
205
+ ];
206
  $this->extensions['custom-fonts'] = [
207
  'path' => null,
208
  '__object' => null,
209
  'config' => [
210
  'name' => __( 'Custom Fonts', 'blc' ),
211
+ 'description' => __( 'Upload unlimited number of custom fonts or variable fonts and use them in any typography option.', 'blc' ),
212
+ 'pro' => true,
213
+ ],
214
+ 'readme' => '',
215
+ 'data' => null,
216
+ ];
217
+ $this->extensions['local-google-fonts'] = [
218
+ 'path' => null,
219
+ '__object' => null,
220
+ 'config' => [
221
+ 'name' => __( 'Local Google Fonts', 'blc' ),
222
+ 'description' => __( 'Serve Google Fonts from your own server for full GDPR compliancy.', 'blc' ),
223
  'pro' => true,
224
  ],
225
  'readme' => '',
226
  'data' => null,
227
  ];
228
+ $this->extensions['advanced-menu'] = [
229
  'path' => null,
230
  '__object' => null,
231
  'config' => [
232
+ 'name' => __( 'Advanced Menu', 'blc' ),
233
+ 'description' => __( 'Create beautiful mega menus, assign icons add badges to menu items, and content blocks inside menu items.', 'blc' ),
234
+ 'pro' => true,
235
+ ],
236
+ 'readme' => '',
237
+ 'data' => null,
238
+ ];
239
+ $this->extensions['shortcuts-bar'] = [
240
+ 'path' => null,
241
+ '__object' => null,
242
+ 'config' => [
243
+ 'name' => __( 'Shortcuts Bar', 'blc' ),
244
+ 'description' => __( 'Transform your website into a app like by displaying a neat shortcuts bar at the bottom of the vieport.', 'blc' ),
245
+ 'pro' => true,
246
+ ],
247
+ 'readme' => '',
248
+ 'data' => null,
249
+ ];
250
+ $this->extensions['multiple-sidebars'] = [
251
+ 'path' => null,
252
+ '__object' => null,
253
+ 'config' => [
254
+ 'name' => __( 'Multiple Sidebars', 'blc' ),
255
+ 'description' => __( 'Create unlimited number of sidebars and display them conditionaly on any page or post.', 'blc' ),
256
  'pro' => true,
257
  ],
258
  'readme' => '',
262
  'path' => null,
263
  '__object' => null,
264
  'config' => [
265
+ 'name' => __( 'White Label (Agency Package)', 'blc' ),
266
+ 'description' => __( 'Change the theme and companion plugin branding to your own custom one.', 'blc' ),
267
+ 'pro' => true,
268
+ ],
269
+ 'readme' => '',
270
+ 'data' => null,
271
+ ];
272
+ $this->extensions['woocommerce-extra'] = [
273
+ 'path' => null,
274
+ '__object' => null,
275
+ 'config' => [
276
+ 'name' => __( 'WooCommerce Extra', 'blc' ),
277
+ 'description' => __( 'Increase the conversion rate by adding a product quick view modal, a floating cart. Control the single product gallery/slider and the layout, add a wishlits page.', 'blc' ),
278
  'pro' => true,
279
  ],
280
  'readme' => '',
framework/extensions/cookies-consent/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.6.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.6.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/mailchimp/admin-static/bundle/2.976c8f43abfe584b1a9d.js DELETED
@@ -1 +0,0 @@
1
- (window.blocksyMailchimpExtJsonp=window.blocksyMailchimpExtJsonp||[]).push([[2],{13:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(12),c=n(2),i=n(6),o=n.n(i);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t,n,r,a,c,i){try{var o=e[c](i),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(r,a)}function s(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,a=!1,c=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==o.return||o.return()}finally{if(a)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(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 f(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}var d=null;t.default=function(e){var t=e.value,n=e.onChange,i=s(Object(r.useState)(d||[]),2),f=i[0],p=i[1],m=s(Object(r.useState)(!d),2),b=m[0],v=m[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(!(a.length>0&&void 0!==a[0])||a[0])&&v(!0),(t=new FormData).append("action","blocksy_ext_mailchimp_get_actual_lists"),e.prev=4,e.next=7,fetch(ajaxurl,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=18;break}return e.next=11,n.json();case 11:if(!(r=e.sent).success){e.next=18;break}if("api_key_invalid"===r.data.result){e.next=18;break}return v(!1),p(r.data.result),d=r.data.result,e.abrupt("return");case 18:e.next=22;break;case 20:e.prev=20,e.t0=e.catch(4);case 22:v(!1);case 23:case"end":return e.stop()}}),e,null,[[4,20]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){l(c,r,a,i,o,"next",e)}function o(e){l(c,r,a,i,o,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){h(!d)}),[]),0===f.length?Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:b?Object(c.__)("Loading...","blc"):Object(c.__)("Invalid API Key...","blc")})):Object(r.createElement)(a.a,{selectedItem:t||f[0].id,onChange:function(e){return n(e)},itemToString:function(e){return e?(f.find((function(t){return t.id===e}))||{}).name:""}},(function(e){var t=e.getInputProps,n=e.getItemProps,a=(e.getLabelProps,e.getMenuProps),i=e.isOpen,l=(e.inputValue,e.highlightedIndex),s=e.selectedItem,d=e.openMenu;return Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",u({},t({onFocus:function(){return d()},onClick:function(){return d()}}),{placeholder:Object(c.__)("Select list...","blc"),readOnly:!0})),i&&Object(r.createElement)("div",a({className:"ct-select-dropdown"}),f.map((function(e,t){return Object(r.createElement)("div",n({key:e.id,index:t,item:e.id,className:o()("ct-select-dropdown-item",{active:l===t,selected:s===e.id})}),e.name)}))))}))}}}]);
 
framework/extensions/mailchimp/admin-static/bundle/sync.js DELETED
@@ -1 +0,0 @@
1
- !function(e){var t={};function o(c){if(t[c])return t[c].exports;var i=t[c]={i:c,l:!1,exports:{}};return e[c].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=e,o.c=t,o.d=function(e,t,c){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(c,i,function(t){return e[t]}.bind(null,i));return c},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t,o){"use strict";o.r(t);var c,i=o(0),n=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(" ")},a=function(e,t){var o=t.forcedOutput,c=void 0!==o&&o;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return c?"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 c?"none":"CT_CSS_SKIP_RULE";var i=[];return e.inset&&i.push("inset"),i.push("".concat(e.h_offset,"px")),i.push("".concat(e.v_offset,"px")),0!==parseFloat(e.blur)&&(i.push("".concat(e.blur,"px")),0!==parseFloat(e.spread)&&i.push("".concat(e.spread,"px"))),0===parseFloat(e.blur)&&0!==parseFloat(e.spread)&&(i.push("".concat(e.blur,"px")),i.push("".concat(e.spread,"px"))),i.push(e.color.color),i.join(" ")},r=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",c={desktop:"ct-main-styles-inline-css",tablet:"ct-main-styles-tablet-inline-css",mobile:"ct-main-styles-mobile-inline-css"},i=document.querySelector("style#".concat(c[o])),n=i.innerText,a="".concat(e["".concat(o,"_selector_prefix")]?"".concat(e["".concat(o,"_selector_prefix")]," "):"").concat(e.selector||":root"),r=null,l=n.match(r);0===n.trim().indexOf(a)?(r=new RegExp("".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=n.match(r)):(r=new RegExp("\\}\\s*?".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=n.match(r)),l||(0===(n="".concat(n," ").concat(a," { }")).trim().indexOf(a)?(r=new RegExp("".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=n.match(r)):(r=new RegExp("\\}\\s*?".concat(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),l=n.match(r))),i.innerText=n.replace(r,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(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(a," {").concat(t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";"))))},l=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",c=(e.type||"").indexOf("color")>-1?t["color"===e.type?"default":e.type.split(":")[1]].color:t;"border"===(e.type||"")&&(c=t&&"none"!==t.style?"".concat(t.width,"px ").concat(t.style," ").concat(t.color.color):"none"),"spacing"===(e.type||"")&&(c=n(t)),"box-shadow"===(e.type||"")&&(c=a(t,e)),r(e,"".concat(c).concat(e.unit||"").concat(e.important?" !important":""),o)},s=function(e,t){var o=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,o),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")),l(e,t.desktop,"desktop"),l(e,t.tablet,"tablet"),l(e,t.mobile,"mobile")):l(e,t)};c={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 c[e.id]&&(Array.isArray(c[e.id])?c[e.id]:[c[e.id]]).map((function(t){return s(t,e())}))})),wp.customize("mailchimp_subscribe_visibility",(function(e){return e.bind((function(e){var t=document.querySelector(".ct-mailchimp-block");Object(i.responsiveClassesFor)("mailchimp_subscribe_visibility",t)}))})),(document.body.classList.contains("single")||document.body.classList.contains("page"))&&Object(i.checkAndReplace)({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");Object(i.responsiveClassesFor)("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/variables.js DELETED
@@ -1,52 +0,0 @@
1
- import { handleVariablesFor } from 'customizer-sync-helpers'
2
-
3
- handleVariablesFor({
4
-
5
- mailchimpContent: [
6
- {
7
- selector: '.ct-mailchimp-block',
8
- variable: 'color',
9
- type: 'color:default'
10
- },
11
-
12
- {
13
- selector: '.ct-mailchimp-block',
14
- variable: 'linkHoverColor',
15
- type: 'color:hover'
16
- }
17
- ],
18
-
19
- mailchimpButton: [
20
- {
21
- selector: '.ct-mailchimp-block',
22
- variable: 'buttonInitialColor',
23
- type: 'color:default'
24
- },
25
-
26
- {
27
- selector: '.ct-mailchimp-block',
28
- variable: 'buttonHoverColor',
29
- type: 'color:hover'
30
- }
31
- ],
32
-
33
- mailchimpBackground: {
34
- selector: '.ct-mailchimp-block',
35
- variable: 'mailchimpBackground',
36
- type: 'color'
37
- },
38
-
39
- mailchimpShadow: {
40
- selector: '.ct-mailchimp-block',
41
- type: 'box-shadow',
42
- variable: 'box-shadow',
43
- responsive: true
44
- },
45
-
46
- mailchimpSpacing: {
47
- selector: '.ct-mailchimp-block',
48
- variable: 'padding',
49
- responsive: true,
50
- unit: ''
51
- }
52
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/mailchimp/ct-mailchimp/view.php DELETED
@@ -1,109 +0,0 @@
1
- <?php
2
- /**
3
- * Mailchimp widget
4
- *
5
- * @copyright 2019-present Creative Themes
6
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
7
- * @package Blocksy
8
- */
9
-
10
-
11
- // Widget title
12
- $title = blocksy_default_akg( 'title', $atts, __( 'Newsletter', 'blc' ) );
13
-
14
-
15
- // Message
16
- $message = blocksy_default_akg( 'mailchimp_text', $atts, __( 'Enter your email address below to subscribe to our newsletter', 'blc' ) );
17
-
18
- // Button text
19
- $button_text = blocksy_default_akg( 'mailchimp_button_text', $atts, __( 'Subscribe', 'blc' ) );
20
-
21
- // Form name
22
- $has_name = blocksy_default_akg( 'has_mailchimp_name', $atts, 'no' ) === 'yes';
23
-
24
- $list_id = null;
25
-
26
- if (blocksy_default_akg( 'mailchimp_list_id_source', $atts, 'default' ) === 'custom') {
27
- $list_id = blocksy_default_akg( 'mailchimp_list_id', $atts, '' );
28
- }
29
-
30
- $manager = new BlocksyMailchimpManager();
31
-
32
- // Button value
33
- $mailchimp_data = $manager->get_form_url_and_gdpr_for($list_id);
34
-
35
- if (! $mailchimp_data) {
36
- return;
37
- }
38
-
39
- $form_url = $mailchimp_data['form_url'];
40
- $has_gdpr_fields = $mailchimp_data['has_gdpr_fields'];
41
-
42
- $skip_submit_output = '';
43
-
44
- if ($has_gdpr_fields) {
45
- $skip_submit_output = 'data-skip-submit';
46
- }
47
-
48
- // container type
49
- $container = blocksy_default_akg( 'mailchimp_container', $atts, 'default' );
50
-
51
- $data_container = '';
52
-
53
- if ( $container !== 'default' ) {
54
- $data_container = ' data-container=' . $container;
55
- }
56
-
57
- // Content alignment
58
- $alignment = blocksy_default_akg( 'mailchimp_alignment', $atts, 'left' );
59
-
60
- $name_label = blocksy_default_akg('mailchimp_name_label', $atts, __( 'Your name', 'blc' ));
61
- $email_label = blocksy_default_akg('mailchimp_mail_label', $atts, __( 'Your email', 'blc' ));
62
-
63
- $data_alignment = '';
64
-
65
- if ( $alignment !== 'left' ) {
66
- $data_alignment = ' data-alignment=' . $alignment;
67
- }
68
-
69
- // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
70
- echo $before_widget;
71
-
72
- echo '<div class="ct-widget-inner"' . $data_alignment . '' . $data_container . '>';
73
-
74
- // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
75
- echo $before_title . wp_kses_post( $title ) . $after_title;
76
-
77
- ?>
78
-
79
-
80
- <form action="<?php echo esc_attr($form_url) ?>" method="post" class="ct-mailchimp-widget-form" target="_blank" <?php echo $skip_submit_output ?>>
81
-
82
- <?php if( !empty( $message ) ) { ?>
83
- <div class="ct-mailchimp-description">
84
- <?php echo wp_kses_post($message) ?>
85
- </div>
86
- <?php } ?>
87
-
88
- <?php if ( $has_name ) { ?>
89
- <input type="text" name="FNAME" placeholder="<?php esc_attr_e($name_label, 'blc'); ?>" title="<?php echo __('Name', 'blocksy') ?>" />
90
- <?php } ?>
91
-
92
- <input type="email" name="EMAIL" placeholder="<?php esc_attr_e($email_label, 'blc'); ?> *" title="<?php echo __('Email', 'blocksy') ?>" required />
93
-
94
- <button class="button">
95
- <?php echo esc_html($button_text) ?>
96
- </button>
97
-
98
- <div class="ct-mailchimp-message"></div>
99
-
100
- <?php
101
- if (function_exists('blocksy_ext_cookies_checkbox')) {
102
- echo blocksy_ext_cookies_checkbox('mailchimp');
103
- }
104
- ?>
105
- </form>
106
-
107
- </div>
108
-
109
- <?php echo wp_kses_post( $after_widget ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/mailchimp/dashboard-static/js/EditCredentials.js DELETED
@@ -1,157 +0,0 @@
1
- import {
2
- createElement,
3
- Component,
4
- useEffect,
5
- useState,
6
- Fragment,
7
- } from '@wordpress/element'
8
-
9
- import classnames from 'classnames'
10
- import { __, sprintf } from 'ct-i18n'
11
- import ListPicker from './ListPicker'
12
- import Overlay from '../../../../../static/js/helpers/Overlay'
13
- import { Select } from 'blocksy-options'
14
-
15
- const EditCredentials = ({
16
- extension,
17
- isEditingCredentials,
18
- setIsEditingCredentials,
19
- onCredentialsValidated,
20
- }) => {
21
- const [apiKey, setApiKey] = useState(extension.data.api_key)
22
- const [listId, setListId] = useState(extension.data.list_id)
23
- const [isLoading, setIsLoading] = useState(false)
24
- const [isApiKeyInvalid, makeKeyInvalid] = useState(false)
25
-
26
- const attemptToSaveCredentials = async () => {
27
- const body = new FormData()
28
-
29
- body.append('api_key', apiKey)
30
- body.append('list_id', listId)
31
-
32
- body.append('action', 'blocksy_ext_mailchimp_maybe_save_credentials')
33
-
34
- setIsLoading(true)
35
-
36
- try {
37
- const response = await fetch(ctDashboardLocalizations.ajax_url, {
38
- method: 'POST',
39
- body,
40
- })
41
-
42
- if (response.status === 200) {
43
- const body = await response.json()
44
-
45
- if (body.success) {
46
- if (body.data.result !== 'api_key_invalid') {
47
- onCredentialsValidated()
48
- makeKeyInvalid(false)
49
- }
50
- }
51
- }
52
-
53
- makeKeyInvalid(true)
54
- } catch (e) {
55
- makeKeyInvalid(true)
56
- }
57
-
58
- await new Promise((r) => setTimeout(() => r(), 1000))
59
-
60
- setIsLoading(false)
61
- }
62
-
63
- return (
64
- <Overlay
65
- items={isEditingCredentials}
66
- onDismiss={() => setIsEditingCredentials(false)}
67
- className={'ct-mailchimp-modal'}
68
- render={() => (
69
- <div
70
- className={classnames('ct-modal-content', {
71
- 'ct-key-invalid': isApiKeyInvalid,
72
- })}>
73
- <h2>{__('API Credentials', 'blc')}</h2>
74
-
75
- <p
76
- dangerouslySetInnerHTML={{
77
- __html: sprintf(
78
- __(
79
- 'Enter your Mailchimp API credentials in the form below. More info on how to generate an API key can be found %shere%s.',
80
- 'blc'
81
- ),
82
- '<a target="_blank" href="https://mailchimp.com/help/about-api-keys/">',
83
- '</a>'
84
- ),
85
- }}
86
- />
87
-
88
- {null && (
89
- <Fragment>
90
- <h4>{__('Pick service', 'blc')}</h4>
91
-
92
- <Select
93
- onChange={(copy) => {}}
94
- option={{
95
- placeholder: __(
96
- 'Pick Mailing Service',
97
- 'blocksy'
98
- ),
99
- choices: [
100
- {
101
- key: 'mailchimp',
102
- value: 'Mailchimp',
103
- },
104
- ],
105
- }}
106
- value={'mailchimp'}
107
- />
108
- </Fragment>
109
- )}
110
-
111
- <div className="mailchimp-credentials">
112
- <section>
113
- <label>{__('API Key', 'blc')}</label>
114
-
115
- <div className="ct-option-input">
116
- <input
117
- type="text"
118
- onChange={({ target: { value } }) =>
119
- setApiKey(value)
120
- }
121
- value={apiKey || ''}
122
- />
123
- </div>
124
- </section>
125
-
126
- <section>
127
- <label>{__('List ID', 'blc')}</label>
128
-
129
- <ListPicker
130
- listId={listId}
131
- onChange={(id) => setListId(id)}
132
- apiKey={apiKey}
133
- />
134
- </section>
135
-
136
- <section>
137
- <label>&nbsp;</label>
138
- <button
139
- className="ct-button"
140
- data-button="blue"
141
- disabled={!apiKey || !listId || isLoading}
142
- onClick={() => attemptToSaveCredentials()}>
143
- {isLoading
144
- ? __('Loading...', 'blc')
145
- : !extension.__object
146
- ? __('Activate', 'blc')
147
- : __('Save Settings', 'blc')}
148
- </button>
149
- </section>
150
- </div>
151
- </div>
152
- )}
153
- />
154
- )
155
- }
156
-
157
- export default EditCredentials
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/mailchimp/helpers.php DELETED
@@ -1,140 +0,0 @@
1
- <?php
2
-
3
- function blc_output_mailchimp_subscribe_form_cache() {
4
- if (! is_customize_preview()) return;
5
-
6
- blocksy_add_customizer_preview_cache(
7
- blocksy_html_tag(
8
- 'div',
9
- [ 'data-id' => 'blocksy-mailchimp-subscribe' ],
10
- blc_ext_mailchimp_subscribe_form(true)
11
- )
12
- );
13
- }
14
-
15
- function blc_ext_mailchimp_subscribe_form($forced = false) {
16
- if (! $forced) {
17
- blc_output_mailchimp_subscribe_form_cache();
18
- }
19
-
20
- if (get_theme_mod('mailchimp_single_post_enabled', 'yes') !== 'yes') {
21
- if (! $forced) {
22
- return '';
23
- }
24
- }
25
-
26
- if (
27
- blocksy_default_akg(
28
- 'disable_subscribe_form',
29
- blc_call_fn([
30
- 'fn' => 'blocksy_get_post_options',
31
- 'default' => 'array'
32
- ]),
33
- 'no'
34
- ) === 'yes'
35
- ) {
36
- return '';
37
- }
38
-
39
- $title = get_theme_mod('mailchimp_title', __(
40
- 'Newsletter Updates', 'blc'
41
- ));
42
-
43
- $description = get_theme_mod('mailchimp_text', __(
44
- 'Enter your email address below to subscribe to our newsletter',
45
- 'blc'
46
- ));
47
-
48
- $button_text = get_theme_mod('mailchimp_button_text', __(
49
- 'Subscribe', 'blc'
50
- ));
51
-
52
- $has_name = get_theme_mod( 'has_mailchimp_name', 'no' ) === 'yes';
53
-
54
- $name_label = get_theme_mod('mailchimp_name_label', __( 'Your name', 'blc' ));
55
- $email_label = get_theme_mod('mailchimp_mail_label', __( 'Your email', 'blc' ));
56
-
57
- if ($forced) {
58
- $has_name = true;
59
- }
60
-
61
- $list_id = null;
62
-
63
- if (get_theme_mod( 'mailchimp_list_id_source', 'default' ) === 'custom') {
64
- $list_id = get_theme_mod( 'mailchimp_list_id', '' );
65
- }
66
-
67
- $manager = new BlocksyMailchimpManager();
68
-
69
- $mailchimp_data = $manager->get_form_url_and_gdpr_for($list_id);
70
-
71
- if (! $mailchimp_data) {
72
- return '';
73
- }
74
-
75
- $form_url = $mailchimp_data['form_url'];
76
- $has_gdpr_fields = $mailchimp_data['has_gdpr_fields'];
77
-
78
- $skip_submit_output = '';
79
-
80
- if ($has_gdpr_fields) {
81
- $skip_submit_output = 'data-skip-submit';
82
- }
83
-
84
- $class = 'ct-mailchimp-block';
85
-
86
- $class .= ' ' . blc_call_fn(
87
- ['fn' => 'blocksy_visibility_classes'],
88
- get_theme_mod('mailchimp_subscribe_visibility', [
89
- 'desktop' => true,
90
- 'tablet' => true,
91
- 'mobile' => false,
92
- ])
93
- );
94
-
95
- $fields_number = '1';
96
-
97
- if ($has_name) {
98
- $fields_number = '2';
99
- }
100
-
101
- ob_start();
102
-
103
- ?>
104
-
105
- <div class="<?php echo esc_attr($class) ?>">
106
- <h3><?php echo esc_html($title) ?></h3>
107
-
108
- <p class="ct-mailchimp-description">
109
- <?php echo $description ?>
110
- </p>
111
-
112
- <form target="_blank" action="<?php echo esc_attr($form_url) ?>" method="post" class="ct-mailchimp-block-form" <?php echo $skip_submit_output ?>>
113
- <section data-fields="<?php echo $fields_number ?>">
114
- <?php if ($has_name) { ?>
115
- <input type="text" name="FNAME" placeholder="<?php esc_attr_e($name_label, 'blc'); ?>" title="<?php echo __('Name', 'blc') ?>" />
116
- <?php } ?>
117
-
118
- <input type="email" name="EMAIL" placeholder="<?php esc_attr_e($email_label, 'blc'); ?> *" title="<?php echo __('Email', 'blc') ?>" required />
119
-
120
- <button class="button">
121
- <?php echo esc_html($button_text) ?>
122
- </button>
123
- </section>
124
-
125
- <div class="ct-mailchimp-message"></div>
126
-
127
- <?php
128
- if (function_exists('blocksy_ext_cookies_checkbox')) {
129
- echo blocksy_ext_cookies_checkbox('subscribe');
130
- }
131
- ?>
132
-
133
- </form>
134
-
135
- </div>
136
-
137
- <?php
138
-
139
- return ob_get_clean();
140
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/mailchimp/static/bundle/main.js DELETED
@@ -1 +0,0 @@
1
- !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var n=r(0);Object(n.registerDynamicChunk)("blocksy_ext_mailchimp",{mount:function(e,t){var r=t.event.target;if(r.querySelector('[type="email"]').value.trim()){if(document.getElementById("js-validate-robot")&&""!==document.getElementById("js-validate-robot").value)return!1;for(var n=r.action.replace("subscribe","subscribe/post-json"),o="",c="mailchimpCallback",i=r.querySelectorAll("input"),u=0;u<i.length;u++)o+="&"+i[u].name+"="+encodeURIComponent(i[u].value);o+="&c=".concat(c);var s=document.createElement("script");s.src=n+o,document.body.appendChild(s),r.classList.remove("subscribe-error","subscribe-success"),r.classList.add("subscribe-loading"),window[c]=function(e){delete window[c],document.body.removeChild(s),r.classList.remove("subscribe-loading"),e&&(r.classList.add("error"===e.result?"subscribe-error":"subscribe-success"),r.querySelector(".ct-mailchimp-message").innerHTML=e.msg.replace("0 - ",""))}}}})}]);
 
framework/extensions/mailchimp/static/bundle/main.min.css DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * - v1.8.6.1
3
- *
4
- * Copyright (c) 2021
5
- * Licensed GPLv2+
6
- */
7
-
8
- .ct-widget-inner[data-alignment="center"]{text-align:center}.ct-widget-inner[data-alignment="right"]{text-align:right}.ct-widget-inner[data-container="boxed"]{padding:30px;background:#fff;border-radius:3px;box-shadow:0px 12px 18px -6px rgba(34,56,101,0.04)}.ct-mailchimp-widget-form .ct-mailchimp-description:not(:empty){margin-bottom:10px}.ct-mailchimp-widget-form>*:not(:first-child){margin-top:10px}.ct-mailchimp-widget-form button{width:100%}.ct-mailchimp-widget-form .gdpr-confirm-policy{--display: inline-flex;--contentSpacing: 0;margin-top:20px}.ct-mailchimp-block{margin-top:60px;text-align:center;color:var(--color);padding:var(--padding);background:var(--backgroundColor);box-shadow:var(--box-shadow);--linkInitialColor: var(--color)}.ct-mailchimp-block>*:first-child{margin-top:20px}.ct-mailchimp-block>*:last-child{margin-bottom:20px}.ct-mailchimp-block>h3{--fontSize: 25px}.ct-mailchimp-block .ct-mailchimp-description:not(:empty){margin-bottom:30px}.ct-mailchimp-block form{max-width:550px;margin:0 auto}@media (min-width: 690px){.ct-mailchimp-block form{width:85%}}.ct-mailchimp-block form button{--buttonMinHeight: var(--form-field-height, 40px);--padding: 0 15px;width:100%}.ct-mailchimp-block form [data-fields]{display:grid;grid-column-gap:15px;grid-row-gap:15px}@media (min-width: 690px){.ct-mailchimp-block form [data-fields="1"]{grid-template-columns:65% 1fr}}@media (min-width: 690px){.ct-mailchimp-block form [data-fields="2"]{grid-template-columns:32.5% 32.5% 1fr}}.ct-mailchimp-block .ct-mailchimp-message,.ct-mailchimp-block .gdpr-confirm-policy{margin-top:15px;--contentSpacing: 0}form[class*='ct-mailchimp'] .button{--buttonFontWeight: 600}.ct-mailchimp-message{display:none;font-size:16px}.ct-mailchimp-message a{text-decoration:underline}.subscribe-error .ct-mailchimp-message{display:block;font-size:14px;color:#e42b2b}.subscribe-success button.button,.subscribe-success input[type='text'],.subscribe-success input[type='email'],.subscribe-success .gdpr-confirm-policy,.subscribe-success .ct-mailchimp-description{display:none}.subscribe-success .ct-mailchimp-message{display:block}
 
 
 
 
 
 
 
 
framework/extensions/mailchimp/static/js/main.js DELETED
@@ -1,68 +0,0 @@
1
- import { registerDynamicChunk } from 'blocksy-frontend'
2
-
3
- registerDynamicChunk('blocksy_ext_mailchimp', {
4
- mount: (el, { event }) => {
5
- const form = event.target
6
-
7
- if (!form.querySelector('[type="email"]').value.trim()) {
8
- return
9
- }
10
-
11
- // Check for spam
12
- if (
13
- document.getElementById('js-validate-robot') &&
14
- document.getElementById('js-validate-robot').value !== ''
15
- ) {
16
- return false
17
- }
18
-
19
- // Get url for mailchimp
20
- var url = form.action.replace('subscribe', 'subscribe/post-json')
21
-
22
- // Add form data to object
23
- var data = ''
24
-
25
- var callback = 'mailchimpCallback'
26
-
27
- var inputs = form.querySelectorAll('input')
28
-
29
- for (var i = 0; i < inputs.length; i++) {
30
- data +=
31
- '&' + inputs[i].name + '=' + encodeURIComponent(inputs[i].value)
32
- }
33
-
34
- data += `&c=${callback}`
35
-
36
- // Create & add post script to the DOM
37
- var script = document.createElement('script')
38
- script.src = url + data
39
-
40
- document.body.appendChild(script)
41
-
42
- form.classList.remove('subscribe-error', 'subscribe-success')
43
- form.classList.add('subscribe-loading')
44
-
45
- // Callback function
46
- window[callback] = function (data) {
47
- // Remove post script from the DOM
48
- delete window[callback]
49
- document.body.removeChild(script)
50
-
51
- form.classList.remove('subscribe-loading')
52
-
53
- if (!data) {
54
- return
55
- }
56
-
57
- form.classList.add(
58
- data.result === 'error'
59
- ? 'subscribe-error'
60
- : 'subscribe-success'
61
- )
62
-
63
- form.querySelector(
64
- '.ct-mailchimp-message'
65
- ).innerHTML = data.msg.replace('0 - ', '')
66
- }
67
- },
68
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/mailchimp/static/sass/single-block.scss DELETED
@@ -1,70 +0,0 @@
1
- .ct-mailchimp-block {
2
- margin-top: 60px;
3
- text-align: center;
4
- color: var(--color);
5
- padding: var(--padding);
6
- background: var(--backgroundColor);
7
- box-shadow: var(--box-shadow);
8
- --linkInitialColor: var(--color);
9
-
10
- > * {
11
- &:first-child {
12
- margin-top: 20px;
13
- }
14
-
15
- &:last-child {
16
- margin-bottom: 20px;
17
- }
18
- }
19
-
20
- > h3 {
21
- --fontSize: 25px;
22
- }
23
-
24
- .ct-mailchimp-description {
25
- &:not(:empty) {
26
- // margin-top: 10px;
27
- margin-bottom: 30px;
28
- }
29
- }
30
-
31
- form {
32
- max-width: 550px;
33
- margin: 0 auto;
34
-
35
- @include media-breakpoint-up (md) {
36
- width: 85%;
37
- }
38
-
39
- button {
40
- --buttonMinHeight: var(--form-field-height, 40px);
41
- --padding: 0 15px;
42
- width: 100%;
43
- }
44
-
45
- [data-fields] {
46
- display: grid;
47
- grid-column-gap: 15px;
48
- grid-row-gap: 15px;
49
- }
50
-
51
- [data-fields="1"] {
52
-
53
- @include media-breakpoint-up (md) {
54
- grid-template-columns: 65% 1fr;
55
- }
56
- }
57
-
58
- [data-fields="2"] {
59
- @include media-breakpoint-up (md) {
60
- grid-template-columns: 32.5% 32.5% 1fr;
61
- }
62
- }
63
- }
64
-
65
- .ct-mailchimp-message,
66
- .gdpr-confirm-policy {
67
- margin-top: 15px;
68
- --contentSpacing: 0;
69
- }
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/mailchimp/static/sass/widget.scss DELETED
@@ -1,39 +0,0 @@
1
- .ct-widget-inner {
2
- &[data-alignment="center"] {
3
- text-align: center;
4
- }
5
-
6
- &[data-alignment="right"] {
7
- text-align: right;
8
- }
9
-
10
- &[data-container="boxed"] {
11
- padding: 30px;
12
- background: #fff;
13
- border-radius: 3px;
14
- box-shadow: 0px 12px 18px -6px rgba(34, 56, 101, 0.04);
15
- }
16
- }
17
-
18
- .ct-mailchimp-widget-form {
19
-
20
- .ct-mailchimp-description {
21
- &:not(:empty) {
22
- margin-bottom: 10px;
23
- }
24
- }
25
-
26
- > *:not(:first-child) {
27
- margin-top: 10px;
28
- }
29
-
30
- button {
31
- width: 100%;
32
- }
33
-
34
- .gdpr-confirm-policy {
35
- --display: inline-flex;
36
- --contentSpacing: 0;
37
- margin-top: 20px;
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/{mailchimp/admin-static/bundle/1.2c9ebf0a36c6c732fee6.js → newsletter-subscribe/admin-static/bundle/1.f588f19f53311c8b6a0a.js} RENAMED
@@ -1,4 +1,4 @@
1
- (window.blocksyMailchimpExtJsonp=window.blocksyMailchimpExtJsonp||[]).push([[1],[,,,,,,function(e,t,n){var o;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
@@ -11,4 +11,4 @@
11
  *
12
  * This source code is licensed under the MIT license found in the
13
  * LICENSE file in the root directory of this source tree.
14
- */var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,a=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,p=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.async_mode"):60111,c=o?Symbol.for("react.concurrent_mode"):60111,h=o?Symbol.for("react.forward_ref"):60112,f=o?Symbol.for("react.suspense"):60113,g=o?Symbol.for("react.suspense_list"):60120,m=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,y=o?Symbol.for("react.block"):60121,I=o?Symbol.for("react.fundamental"):60117,S=o?Symbol.for("react.responder"):60118,b=o?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case c:case s:case a:case u:case f:return e;default:switch(e=e&&e.$$typeof){case p:case h:case v:case m:case l:return e;default:return t}}case i:return t}}}function x(e){return w(e)===c}t.AsyncMode=d,t.ConcurrentMode=c,t.ContextConsumer=p,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=s,t.Lazy=v,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=u,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||w(e)===d},t.isConcurrentMode=x,t.isContextConsumer=function(e){return w(e)===p},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===s},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===u},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===c||e===a||e===u||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===p||e.$$typeof===h||e.$$typeof===I||e.$$typeof===S||e.$$typeof===b||e.$$typeof===y)},t.typeOf=w},function(e,t,n){"use strict";function o(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var s=n(7),u=n.n(s),a=n(1);n(10);function l(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function p(e,t){return(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e)}function d(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return p(n.overflowY,t)||p(n.overflowX,t)||function(e){var t=function(e){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.frameElement:null}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function c(e,t,n,o,r,i,s,u){return i<e&&s>t||i>e&&s<t?0:i<=e&&u<=n||s>=t&&u>=n?i-e-o:s>t&&u<n||i<e&&u>n?s-t+r:0}var h=0;function f(e){return"function"==typeof e?e:g}function g(){}function m(e,t){null!==e&&function(e,t){var n=t.scrollMode,o=t.block,r=t.inline,i=t.boundary,s=t.skipOverflowHiddenElements,u="function"==typeof i?i:function(e){return e!==i};if(!l(e))throw new TypeError("Invalid target");for(var a=document.scrollingElement||document.documentElement,p=[],h=e;l(h)&&u(h);){if((h=h.parentNode)===a){p.push(h);break}h===document.body&&d(h)&&!d(document.documentElement)||d(h,s)&&p.push(h)}for(var f=window.visualViewport?visualViewport.width:innerWidth,g=window.visualViewport?visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),I=y.height,S=y.width,b=y.top,w=y.right,x=y.bottom,C=y.left,H="start"===o||"nearest"===o?b:"end"===o?x:b+I/2,O="center"===r?C+S/2:"end"===r?w:C,E=[],P=0;P<p.length;P++){var M=p[P],D=M.getBoundingClientRect(),T=D.height,k=D.width,R=D.top,A=D.right,V=D.bottom,K=D.left;if("if-needed"===n&&b>=0&&C>=0&&x<=g&&w<=f&&b>=R&&x<=V&&C>=K&&w<=A)return E;var _=getComputedStyle(M),L=parseInt(_.borderLeftWidth,10),$=parseInt(_.borderTopWidth,10),B=parseInt(_.borderRightWidth,10),j=parseInt(_.borderBottomWidth,10),W=0,U=0,N="offsetWidth"in M?M.offsetWidth-M.clientWidth-L-B:0,F="offsetHeight"in M?M.offsetHeight-M.clientHeight-$-j:0;if(a===M)W="start"===o?H:"end"===o?H-g:"nearest"===o?c(v,v+g,g,$,j,v+H,v+H+I,I):H-g/2,U="start"===r?O:"center"===r?O-f/2:"end"===r?O-f:c(m,m+f,f,L,B,m+O,m+O+S,S),W=Math.max(0,W+v),U=Math.max(0,U+m);else{W="start"===o?H-R-$:"end"===o?H-V+j+F:"nearest"===o?c(R,V,T,$,j+F,H,H+I,I):H-(R+T/2)+F/2,U="start"===r?O-K-L:"center"===r?O-(K+k/2)+N/2:"end"===r?O-A+B+N:c(K,A,k,L,B+N,O,O+S,S);var z=M.scrollLeft,Y=M.scrollTop;H+=Y-(W=Math.max(0,Math.min(Y+W,M.scrollHeight-T+F))),O+=z-(U=Math.max(0,Math.min(z+U,M.scrollWidth-k+N)))}E.push({el:M,top:W,left:U})}return E}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,o=e.left;t.scrollTop=n,t.scrollLeft=o}))}function v(e,t){return e===t||e.contains&&e.contains(t)}function y(e,t){var n;function o(){n&&clearTimeout(n)}function r(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];o(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return r.cancel=o,r}function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.some((function(t){return t&&t.apply(void 0,[e].concat(o)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function b(e){var t=e.isOpen,n=e.selectedItem,o=e.resultCount,r=e.previousResultCount,i=e.itemToString;return t?o?o!==r?o+" result"+(1===o?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":n?i(n):""}function w(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function x(e){return"string"==typeof e.type}function C(e){return e.props}var H=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function O(e){void 0===e&&(e={});var t={};return H.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function E(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function P(e,t,n){var o=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:o+1);var r=t+e;return r<0?r=o:r>o&&(r=0),r}var M=y((function(){T().textContent=""}),500);function D(e,t){var n=T(t);e&&(n.textContent=e,M())}function T(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var k=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),R=function(){var e=function(e){var t,n;function s(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+String(h++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var o=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==o})),e()}),t);n.timeoutIds.push(o)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=O(t),n.internalSetState(r({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,o){t=O(t),n.internalSetState(r({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),o)},n.selectItemAtIndex=function(e,t,o){var r=n.items[e];null!=r&&n.selectItem(r,t,o)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var o,i,s={},u="function"==typeof e;return!u&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,r({},n.getStateAndHelpers(),{},e)),n.setState((function(t){t=n.getState(t);var a=u?e(t):e;a=n.props.stateReducer(t,a),o=a.hasOwnProperty("selectedItem");var l={},p={};return o&&a.selectedItem!==t.selectedItem&&(i=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((function(e){t[e]!==a[e]&&(s[e]=a[e]),"type"!==e&&(p[e]=a[e],n.isControlledProp(e)||(l[e]=a[e]))})),u&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,r({},n.getStateAndHelpers(),{},a)),l}),(function(){f(t)(),Object.keys(s).length>1&&n.props.onStateChange(s,n.getStateAndHelpers()),o&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==i&&n.props.onChange(i,n.getStateAndHelpers()),n.props.onUserAction(s,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var i,s=void 0===e?{}:e,u=s.refKey,a=void 0===u?"ref":u,l=s.ref,p=o(s,["refKey","ref"]),d=(void 0===t?{}:t).suppressRefError,c=void 0!==d&&d;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=c;var h=n.getState().isOpen;return r(((i={})[a]=S(l,n.rootRef),i.role="combobox",i["aria-expanded"]=h,i["aria-haspopup"]="listbox",i["aria-owns"]=h?n.menuId:null,i["aria-labelledby"]=n.labelId,i),p)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(P(1,t.getState().highlightedIndex,e),{type:4})}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(P(-1,t.getState().highlightedIndex,e),{type:4})}))},Enter:function(e){var t=this.getState(),n=t.isOpen,o=t.highlightedIndex;if(n&&null!=o){e.preventDefault();var r=this.items[o],i=this.getItemNodeFromIndex(o);if(null==r||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}},Escape:function(e){e.preventDefault(),this.reset({type:5,selectedItem:null,inputValue:""})}},n.buttonKeyDownHandlers=r({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=r({},n.keyDownHandlers,{Home:function(e){this.highlightFirstOrLastIndex(e,!0,{type:7})},End:function(e){this.highlightFirstOrLastIndex(e,!1,{type:8})}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,i=t.onClick,s=(t.onPress,t.onKeyDown),u=t.onKeyUp,a=t.onBlur,l=o(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),p=n.getState().isOpen,d={onClick:I(i,n.buttonHandleClick),onKeyDown:I(s,n.buttonHandleKeyDown),onKeyUp:I(u,n.buttonHandleKeyUp),onBlur:I(a,n.buttonHandleBlur)};return r({type:"button",role:"button","aria-label":p?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l.disabled?{}:d,{},l)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=E(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(i(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return r({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,i=t.onKeyDown,s=t.onBlur,u=t.onChange,a=t.onInput,l=(t.onChangeText,o(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),p={};var d,c=n.getState(),h=c.inputValue,f=c.isOpen,g=c.highlightedIndex;l.disabled||((d={}).onChange=I(u,a,n.inputHandleChange),d.onKeyDown=I(i,n.inputHandleKeyDown),d.onBlur=I(s,n.inputHandleBlur),p=d);return r({"aria-autocomplete":"list","aria-activedescendant":f&&"number"==typeof g&&g>=0?n.getItemId(g):null,"aria-controls":f?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:h,id:n.inputId},p,{},l)},n.inputHandleKeyDown=function(e){var t=E(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(i(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var i,s=void 0===e?{}:e,u=s.refKey,a=void 0===u?"ref":u,l=s.ref,p=o(s,["refKey","ref"]),d=(void 0===t?{}:t).suppressRefError,c=void 0!==d&&d;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=c,r(((i={})[a]=S(l,n.menuRef),i.role="listbox",i["aria-labelledby"]=p&&p["aria-label"]?null:n.labelId,i.id=n.menuId,i),p)},n.getItemProps=function(e){var t,i=void 0===e?{}:e,s=i.onMouseMove,u=i.onMouseDown,a=i.onClick,l=(i.onPress,i.index),p=i.item,d=void 0===p?void 0:p,c=o(i,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===l?(n.items.push(d),l=n.items.indexOf(d)):n.items[l]=d;var h=a,f=((t={onMouseMove:I(s,(function(){l!==n.getState().highlightedIndex&&(n.setHighlightedIndex(l,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:I(u,(function(e){e.preventDefault()}))}).onClick=I(h,(function(){n.selectItemAtIndex(l,{type:9})})),t),g=c.disabled?{onMouseDown:f.onMouseDown}:f;return r({id:n.getItemId(l),role:"option","aria-selected":n.getState().highlightedIndex===l},g,{},c)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=O(e),n.internalSetState((function(t){var o=t.selectedItem;return r({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(o)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=O(e),n.internalSetState((function(t){var o=t.isOpen;return r({isOpen:!o},o&&{highlightedIndex:n.props.defaultHighlightedIndex},{},e)}),(function(){var o=n.getState(),r=o.isOpen,i=o.highlightedIndex;r&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),f(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=y((function(){var e=n.getState(),t=n.items[e.highlightedIndex],o=n.getItemCount(),i=n.props.getA11yStatusMessage(r({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:o,highlightedItem:t},e));n.previousResultCount=o,D(i,n.props.environment.document)}),200);var s=n.props,u=s.defaultHighlightedIndex,a=s.initialHighlightedIndex,l=void 0===a?u:a,p=s.defaultIsOpen,d=s.initialIsOpen,c=void 0===d?p:d,g=s.initialInputValue,m=void 0===g?"":g,v=s.initialSelectedItem,b=void 0===v?null:v,w=n.getState({highlightedIndex:l,isOpen:c,inputValue:m,selectedItem:b});return null!=w.selectedItem&&void 0===n.props.initialInputValue&&(w.inputValue=n.props.itemToString(w.selectedItem)),n.state=w,n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var u=s.prototype;return u.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},u.getState=function(e){var t=this;return void 0===e&&(e=this.state),Object.keys(e).reduce((function(n,o){return n[o]=t.isControlledProp(o)?t.props[o]:e[o],n}),{})},u.isControlledProp=function(e){return void 0!==this.props[e]},u.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},u.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},u.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},u.moveHighlightedIndex=function(e,t){var n=this.getItemCount();if(n>0){var o=P(e,this.getState().highlightedIndex,n);this.setHighlightedIndex(o,t)}},u.highlightFirstOrLastIndex=function(e,t,n){var o=this.getItemCount()-1;o<0||!this.getState().isOpen||(e.preventDefault(),this.setHighlightedIndex(t?0:o,n))},u.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,o=e.selectedItem,r=e.isOpen,i=this.props.itemToString,s=this.id,u=this.getRootProps,a=this.getToggleButtonProps,l=this.getLabelProps,p=this.getMenuProps,d=this.getInputProps,c=this.getItemProps,h=this.openMenu,f=this.closeMenu,g=this.toggleMenu,m=this.selectItem,v=this.selectItemAtIndex,y=this.selectHighlightedItem,I=this.setHighlightedIndex,S=this.clearSelection,b=this.clearItems;return{getRootProps:u,getToggleButtonProps:a,getLabelProps:l,getMenuProps:p,getInputProps:d,getItemProps:c,reset:this.reset,openMenu:h,closeMenu:f,toggleMenu:g,selectItem:m,selectItemAtIndex:v,selectHighlightedItem:y,setHighlightedIndex:I,clearSelection:S,clearItems:b,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:s,highlightedIndex:t,inputValue:n,isOpen:r,selectedItem:o}},u.componentDidMount=function(){var e=this;var t=function(t,n){void 0===n&&(n=!0);var o=e.props.environment.document;return[e._rootNode,e._menuNode].some((function(e){return e&&(v(e,t)||n&&v(e,o.activeElement))}))},n=function(){e.isMouseDown=!0},o=function(n){e.isMouseDown=!1,!t(n.target)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},i=function(){e.isTouchMove=!0},s=function(n){var o=t(n.target,!1);e.isTouchMove||o||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},u=this.props.environment;u.addEventListener("mousedown",n),u.addEventListener("mouseup",o),u.addEventListener("touchstart",r),u.addEventListener("touchmove",i),u.addEventListener("touchend",s),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),u.removeEventListener("mousedown",n),u.removeEventListener("mouseup",o),u.removeEventListener("touchstart",r),u.removeEventListener("touchmove",i),u.removeEventListener("touchend",s)}},u.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,o=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==o},u.componentDidUpdate=function(e,t){this.isControlledProp("selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},u.componentWillUnmount=function(){this.cleanup()},u.render=function(){var e=w(this.props.children,g);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=w(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:x(t)?Object(a.cloneElement)(t,this.getRootProps(C(t))):void 0:null},s}(a.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:b,itemToString:function(e){return null==e?"":String(e)},onStateChange:g,onInputValueChange:g,onUserAction:g,onChange:g,onSelect:g,onOuterClick:g,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:m},e.stateChangeTypes=k,e}();u.a.array.isRequired,u.a.func,u.a.func,u.a.func,u.a.bool,u.a.number,u.a.number,u.a.number,u.a.bool,u.a.bool,u.a.bool,u.a.any,u.a.any,u.a.any,u.a.string,u.a.string,u.a.string,u.a.func,u.a.string,u.a.func,u.a.func,u.a.func,u.a.func,u.a.func,u.a.shape({addEventListener:u.a.func,removeEventListener:u.a.func,document:u.a.shape({getElementById:u.a.func,activeElement:u.a.any,body:u.a.any})});"undefined"==typeof window||window;t.a=R}]]);
1
+ (window.blocksyNewsletterSubscribeExtJsonp=window.blocksyNewsletterSubscribeExtJsonp||[]).push([[1],[,,,,,,function(e,t,n){var o;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
11
  *
12
  * This source code is licensed under the MIT license found in the
13
  * LICENSE file in the root directory of this source tree.
14
+ */var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,a=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,p=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.async_mode"):60111,c=o?Symbol.for("react.concurrent_mode"):60111,h=o?Symbol.for("react.forward_ref"):60112,f=o?Symbol.for("react.suspense"):60113,g=o?Symbol.for("react.suspense_list"):60120,m=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,y=o?Symbol.for("react.block"):60121,I=o?Symbol.for("react.fundamental"):60117,S=o?Symbol.for("react.responder"):60118,b=o?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case c:case s:case a:case u:case f:return e;default:switch(e=e&&e.$$typeof){case p:case h:case v:case m:case l:return e;default:return t}}case i:return t}}}function x(e){return w(e)===c}t.AsyncMode=d,t.ConcurrentMode=c,t.ContextConsumer=p,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=s,t.Lazy=v,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=u,t.Suspense=f,t.isAsyncMode=function(e){return x(e)||w(e)===d},t.isConcurrentMode=x,t.isContextConsumer=function(e){return w(e)===p},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===s},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===u},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===c||e===a||e===u||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===p||e.$$typeof===h||e.$$typeof===I||e.$$typeof===S||e.$$typeof===b||e.$$typeof===y)},t.typeOf=w},function(e,t,n){"use strict";function o(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var s=n(7),u=n.n(s),a=n(1);n(10);function l(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function p(e,t){return(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e)}function d(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return p(n.overflowY,t)||p(n.overflowX,t)||function(e){var t=function(e){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.frameElement:null}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function c(e,t,n,o,r,i,s,u){return i<e&&s>t||i>e&&s<t?0:i<=e&&u<=n||s>=t&&u>=n?i-e-o:s>t&&u<n||i<e&&u>n?s-t+r:0}var h=0;function f(e){return"function"==typeof e?e:g}function g(){}function m(e,t){null!==e&&function(e,t){var n=t.scrollMode,o=t.block,r=t.inline,i=t.boundary,s=t.skipOverflowHiddenElements,u="function"==typeof i?i:function(e){return e!==i};if(!l(e))throw new TypeError("Invalid target");for(var a=document.scrollingElement||document.documentElement,p=[],h=e;l(h)&&u(h);){if((h=h.parentNode)===a){p.push(h);break}h===document.body&&d(h)&&!d(document.documentElement)||d(h,s)&&p.push(h)}for(var f=window.visualViewport?visualViewport.width:innerWidth,g=window.visualViewport?visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),I=y.height,S=y.width,b=y.top,w=y.right,x=y.bottom,C=y.left,H="start"===o||"nearest"===o?b:"end"===o?x:b+I/2,O="center"===r?C+S/2:"end"===r?w:C,E=[],P=0;P<p.length;P++){var M=p[P],D=M.getBoundingClientRect(),T=D.height,k=D.width,R=D.top,A=D.right,V=D.bottom,K=D.left;if("if-needed"===n&&b>=0&&C>=0&&x<=g&&w<=f&&b>=R&&x<=V&&C>=K&&w<=A)return E;var _=getComputedStyle(M),L=parseInt(_.borderLeftWidth,10),$=parseInt(_.borderTopWidth,10),B=parseInt(_.borderRightWidth,10),j=parseInt(_.borderBottomWidth,10),W=0,N=0,U="offsetWidth"in M?M.offsetWidth-M.clientWidth-L-B:0,F="offsetHeight"in M?M.offsetHeight-M.clientHeight-$-j:0;if(a===M)W="start"===o?H:"end"===o?H-g:"nearest"===o?c(v,v+g,g,$,j,v+H,v+H+I,I):H-g/2,N="start"===r?O:"center"===r?O-f/2:"end"===r?O-f:c(m,m+f,f,L,B,m+O,m+O+S,S),W=Math.max(0,W+v),N=Math.max(0,N+m);else{W="start"===o?H-R-$:"end"===o?H-V+j+F:"nearest"===o?c(R,V,T,$,j+F,H,H+I,I):H-(R+T/2)+F/2,N="start"===r?O-K-L:"center"===r?O-(K+k/2)+U/2:"end"===r?O-A+B+U:c(K,A,k,L,B+U,O,O+S,S);var z=M.scrollLeft,Y=M.scrollTop;H+=Y-(W=Math.max(0,Math.min(Y+W,M.scrollHeight-T+F))),O+=z-(N=Math.max(0,Math.min(z+N,M.scrollWidth-k+U)))}E.push({el:M,top:W,left:N})}return E}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,o=e.left;t.scrollTop=n,t.scrollLeft=o}))}function v(e,t){return e===t||e.contains&&e.contains(t)}function y(e,t){var n;function o(){n&&clearTimeout(n)}function r(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];o(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return r.cancel=o,r}function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.some((function(t){return t&&t.apply(void 0,[e].concat(o)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function b(e){var t=e.isOpen,n=e.selectedItem,o=e.resultCount,r=e.previousResultCount,i=e.itemToString;return t?o?o!==r?o+" result"+(1===o?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":n?i(n):""}function w(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function x(e){return"string"==typeof e.type}function C(e){return e.props}var H=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function O(e){void 0===e&&(e={});var t={};return H.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function E(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function P(e,t,n){var o=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:o+1);var r=t+e;return r<0?r=o:r>o&&(r=0),r}var M=y((function(){T().textContent=""}),500);function D(e,t){var n=T(t);e&&(n.textContent=e,M())}function T(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var k=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),R=function(){var e=function(e){var t,n;function s(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+String(h++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var o=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==o})),e()}),t);n.timeoutIds.push(o)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=O(t),n.internalSetState(r({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,o){t=O(t),n.internalSetState(r({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),o)},n.selectItemAtIndex=function(e,t,o){var r=n.items[e];null!=r&&n.selectItem(r,t,o)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var o,i,s={},u="function"==typeof e;return!u&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,r({},n.getStateAndHelpers(),{},e)),n.setState((function(t){t=n.getState(t);var a=u?e(t):e;a=n.props.stateReducer(t,a),o=a.hasOwnProperty("selectedItem");var l={},p={};return o&&a.selectedItem!==t.selectedItem&&(i=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((function(e){t[e]!==a[e]&&(s[e]=a[e]),"type"!==e&&(p[e]=a[e],n.isControlledProp(e)||(l[e]=a[e]))})),u&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,r({},n.getStateAndHelpers(),{},a)),l}),(function(){f(t)(),Object.keys(s).length>1&&n.props.onStateChange(s,n.getStateAndHelpers()),o&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==i&&n.props.onChange(i,n.getStateAndHelpers()),n.props.onUserAction(s,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var i,s=void 0===e?{}:e,u=s.refKey,a=void 0===u?"ref":u,l=s.ref,p=o(s,["refKey","ref"]),d=(void 0===t?{}:t).suppressRefError,c=void 0!==d&&d;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=c;var h=n.getState().isOpen;return r(((i={})[a]=S(l,n.rootRef),i.role="combobox",i["aria-expanded"]=h,i["aria-haspopup"]="listbox",i["aria-owns"]=h?n.menuId:null,i["aria-labelledby"]=n.labelId,i),p)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(P(1,t.getState().highlightedIndex,e),{type:4})}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(P(-1,t.getState().highlightedIndex,e),{type:4})}))},Enter:function(e){var t=this.getState(),n=t.isOpen,o=t.highlightedIndex;if(n&&null!=o){e.preventDefault();var r=this.items[o],i=this.getItemNodeFromIndex(o);if(null==r||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}},Escape:function(e){e.preventDefault(),this.reset({type:5,selectedItem:null,inputValue:""})}},n.buttonKeyDownHandlers=r({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=r({},n.keyDownHandlers,{Home:function(e){this.highlightFirstOrLastIndex(e,!0,{type:7})},End:function(e){this.highlightFirstOrLastIndex(e,!1,{type:8})}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,i=t.onClick,s=(t.onPress,t.onKeyDown),u=t.onKeyUp,a=t.onBlur,l=o(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),p=n.getState().isOpen,d={onClick:I(i,n.buttonHandleClick),onKeyDown:I(s,n.buttonHandleKeyDown),onKeyUp:I(u,n.buttonHandleKeyUp),onBlur:I(a,n.buttonHandleBlur)};return r({type:"button",role:"button","aria-label":p?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l.disabled?{}:d,{},l)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=E(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(i(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return r({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,i=t.onKeyDown,s=t.onBlur,u=t.onChange,a=t.onInput,l=(t.onChangeText,o(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),p={};var d,c=n.getState(),h=c.inputValue,f=c.isOpen,g=c.highlightedIndex;l.disabled||((d={}).onChange=I(u,a,n.inputHandleChange),d.onKeyDown=I(i,n.inputHandleKeyDown),d.onBlur=I(s,n.inputHandleBlur),p=d);return r({"aria-autocomplete":"list","aria-activedescendant":f&&"number"==typeof g&&g>=0?n.getItemId(g):null,"aria-controls":f?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:h,id:n.inputId},p,{},l)},n.inputHandleKeyDown=function(e){var t=E(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(i(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var i,s=void 0===e?{}:e,u=s.refKey,a=void 0===u?"ref":u,l=s.ref,p=o(s,["refKey","ref"]),d=(void 0===t?{}:t).suppressRefError,c=void 0!==d&&d;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=c,r(((i={})[a]=S(l,n.menuRef),i.role="listbox",i["aria-labelledby"]=p&&p["aria-label"]?null:n.labelId,i.id=n.menuId,i),p)},n.getItemProps=function(e){var t,i=void 0===e?{}:e,s=i.onMouseMove,u=i.onMouseDown,a=i.onClick,l=(i.onPress,i.index),p=i.item,d=void 0===p?void 0:p,c=o(i,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===l?(n.items.push(d),l=n.items.indexOf(d)):n.items[l]=d;var h=a,f=((t={onMouseMove:I(s,(function(){l!==n.getState().highlightedIndex&&(n.setHighlightedIndex(l,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:I(u,(function(e){e.preventDefault()}))}).onClick=I(h,(function(){n.selectItemAtIndex(l,{type:9})})),t),g=c.disabled?{onMouseDown:f.onMouseDown}:f;return r({id:n.getItemId(l),role:"option","aria-selected":n.getState().highlightedIndex===l},g,{},c)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=O(e),n.internalSetState((function(t){var o=t.selectedItem;return r({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(o)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=O(e),n.internalSetState((function(t){var o=t.isOpen;return r({isOpen:!o},o&&{highlightedIndex:n.props.defaultHighlightedIndex},{},e)}),(function(){var o=n.getState(),r=o.isOpen,i=o.highlightedIndex;r&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),f(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=y((function(){var e=n.getState(),t=n.items[e.highlightedIndex],o=n.getItemCount(),i=n.props.getA11yStatusMessage(r({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:o,highlightedItem:t},e));n.previousResultCount=o,D(i,n.props.environment.document)}),200);var s=n.props,u=s.defaultHighlightedIndex,a=s.initialHighlightedIndex,l=void 0===a?u:a,p=s.defaultIsOpen,d=s.initialIsOpen,c=void 0===d?p:d,g=s.initialInputValue,m=void 0===g?"":g,v=s.initialSelectedItem,b=void 0===v?null:v,w=n.getState({highlightedIndex:l,isOpen:c,inputValue:m,selectedItem:b});return null!=w.selectedItem&&void 0===n.props.initialInputValue&&(w.inputValue=n.props.itemToString(w.selectedItem)),n.state=w,n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var u=s.prototype;return u.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},u.getState=function(e){var t=this;return void 0===e&&(e=this.state),Object.keys(e).reduce((function(n,o){return n[o]=t.isControlledProp(o)?t.props[o]:e[o],n}),{})},u.isControlledProp=function(e){return void 0!==this.props[e]},u.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},u.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},u.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},u.moveHighlightedIndex=function(e,t){var n=this.getItemCount();if(n>0){var o=P(e,this.getState().highlightedIndex,n);this.setHighlightedIndex(o,t)}},u.highlightFirstOrLastIndex=function(e,t,n){var o=this.getItemCount()-1;o<0||!this.getState().isOpen||(e.preventDefault(),this.setHighlightedIndex(t?0:o,n))},u.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,o=e.selectedItem,r=e.isOpen,i=this.props.itemToString,s=this.id,u=this.getRootProps,a=this.getToggleButtonProps,l=this.getLabelProps,p=this.getMenuProps,d=this.getInputProps,c=this.getItemProps,h=this.openMenu,f=this.closeMenu,g=this.toggleMenu,m=this.selectItem,v=this.selectItemAtIndex,y=this.selectHighlightedItem,I=this.setHighlightedIndex,S=this.clearSelection,b=this.clearItems;return{getRootProps:u,getToggleButtonProps:a,getLabelProps:l,getMenuProps:p,getInputProps:d,getItemProps:c,reset:this.reset,openMenu:h,closeMenu:f,toggleMenu:g,selectItem:m,selectItemAtIndex:v,selectHighlightedItem:y,setHighlightedIndex:I,clearSelection:S,clearItems:b,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:s,highlightedIndex:t,inputValue:n,isOpen:r,selectedItem:o}},u.componentDidMount=function(){var e=this;var t=function(t,n){void 0===n&&(n=!0);var o=e.props.environment.document;return[e._rootNode,e._menuNode].some((function(e){return e&&(v(e,t)||n&&v(e,o.activeElement))}))},n=function(){e.isMouseDown=!0},o=function(n){e.isMouseDown=!1,!t(n.target)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},i=function(){e.isTouchMove=!0},s=function(n){var o=t(n.target,!1);e.isTouchMove||o||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},u=this.props.environment;u.addEventListener("mousedown",n),u.addEventListener("mouseup",o),u.addEventListener("touchstart",r),u.addEventListener("touchmove",i),u.addEventListener("touchend",s),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),u.removeEventListener("mousedown",n),u.removeEventListener("mouseup",o),u.removeEventListener("touchstart",r),u.removeEventListener("touchmove",i),u.removeEventListener("touchend",s)}},u.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,o=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==o},u.componentDidUpdate=function(e,t){this.isControlledProp("selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},u.componentWillUnmount=function(){this.cleanup()},u.render=function(){var e=w(this.props.children,g);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=w(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:x(t)?Object(a.cloneElement)(t,this.getRootProps(C(t))):void 0:null},s}(a.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:b,itemToString:function(e){return null==e?"":String(e)},onStateChange:g,onInputValueChange:g,onUserAction:g,onChange:g,onSelect:g,onOuterClick:g,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:m},e.stateChangeTypes=k,e}();u.a.array.isRequired,u.a.func,u.a.func,u.a.func,u.a.bool,u.a.number,u.a.number,u.a.number,u.a.bool,u.a.bool,u.a.bool,u.a.any,u.a.any,u.a.any,u.a.string,u.a.string,u.a.string,u.a.func,u.a.string,u.a.func,u.a.func,u.a.func,u.a.func,u.a.func,u.a.shape({addEventListener:u.a.func,removeEventListener:u.a.func,document:u.a.shape({getElementById:u.a.func,activeElement:u.a.any,body:u.a.any})});"undefined"==typeof window||window;t.a=R}]]);
framework/extensions/newsletter-subscribe/admin-static/bundle/2.61bd55d629d700145be1.js ADDED
@@ -0,0 +1 @@
 
1
+ (window.blocksyNewsletterSubscribeExtJsonp=window.blocksyNewsletterSubscribeExtJsonp||[]).push([[2],{13:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(12),c=n(2),i=n(6),o=n.n(i);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t,n,r,a,c,i){try{var o=e[c](i),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(r,a)}function s(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,a=!1,c=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==o.return||o.return()}finally{if(a)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(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 f(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}var d=null;t.default=function(e){var t=e.value,n=e.onChange,i=s(Object(r.useState)(d||[]),2),f=i[0],p=i[1],b=s(Object(r.useState)(!d),2),m=b[0],v=b[1],y=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(!(a.length>0&&void 0!==a[0])||a[0])&&v(!0),(t=new FormData).append("action","blocksy_ext_newsletter_subscribe_get_actual_lists"),e.prev=4,e.next=7,fetch(ajaxurl,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=18;break}return e.next=11,n.json();case 11:if(!(r=e.sent).success){e.next=18;break}if("api_key_invalid"===r.data.result){e.next=18;break}return v(!1),p(r.data.result),d=r.data.result,e.abrupt("return");case 18:e.next=22;break;case 20:e.prev=20,e.t0=e.catch(4);case 22:v(!1);case 23:case"end":return e.stop()}}),e,null,[[4,20]])})),function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){l(c,r,a,i,o,"next",e)}function o(e){l(c,r,a,i,o,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){y(!d)}),[]),0===f.length?Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:m?Object(c.__)("Loading...","blc"):Object(c.__)("Invalid API Key...","blc")})):Object(r.createElement)(a.a,{selectedItem:t||f[0].id,onChange:function(e){return n(e)},itemToString:function(e){return e?(f.find((function(t){return t.id===e}))||{}).name:""}},(function(e){var t=e.getInputProps,n=e.getItemProps,a=(e.getLabelProps,e.getMenuProps),i=e.isOpen,l=(e.inputValue,e.highlightedIndex),s=e.selectedItem,d=e.openMenu;return Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",u({},t({onFocus:function(){return d()},onClick:function(){return d()}}),{placeholder:Object(c.__)("Select list...","blc"),readOnly:!0})),i&&Object(r.createElement)("div",a({className:"ct-select-dropdown"}),f.map((function(e,t){return Object(r.createElement)("div",n({key:e.id,index:t,item:e.id,className:o()("ct-select-dropdown-item",{active:l===t,selected:s===e.id})}),e.name)}))))}))}}}]);
framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/bundle/main.js RENAMED
@@ -1 +1 @@
1
- !function(e){function t(t){for(var n,o,c=t[0],i=t[1],u=0,a=[];u<c.length;u++)o=c[u],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&a.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(l&&l(t);a.length;)a.shift()()}var n={},r={0:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,u=document.createElement("script");u.charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.src=function(e){return o.p+""+e+"."+{1:"2c9ebf0a36c6c732fee6",2:"976c8f43abfe584b1a9d"}[e]+".js"}(e);var l=new Error;i=function(t){u.onerror=u.onload=null,clearTimeout(a);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",l.name="ChunkLoadError",l.type=o,l.request=c,n[1](l)}r[e]=void 0}};var a=setTimeout((function(){i({type:"timeout",target:u})}),12e4);u.onerror=u.onload=i,document.head.appendChild(u)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.blocksyMailchimpExtJsonp=window.blocksyMailchimpExtJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var u=0;u<c.length;u++)t(c[u]);var l=i;o(o.s=5)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.ctEvents},function(e,t,n){n.p=blocksy_ext_newsletter_subscribe_localization.public_url},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n(2),c=n(1),i=Object(c.lazy)((function(){return Promise.all([n.e(1),n.e(2)]).then(n.bind(null,13))})),u=function(e){return Object(r.createElement)("div",null,Object(r.createElement)(c.Suspense,{fallback:Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:Object(o.__)("Loading...","blc")}))},Object(r.createElement)(i,e)))},l=n(3),a=n.n(l);document.addEventListener("DOMContentLoaded",(function(){return a.a.on("blocksy:options:register",(function(e){e["blocksy-mailchimp"]=u}))}))}]);
1
+ !function(e){function t(t){for(var n,o,c=t[0],i=t[1],u=0,a=[];u<c.length;u++)o=c[u],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&a.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(l&&l(t);a.length;)a.shift()()}var n={},r={0:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,u=document.createElement("script");u.charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.src=function(e){return o.p+""+e+"."+{1:"f588f19f53311c8b6a0a",2:"61bd55d629d700145be1"}[e]+".js"}(e);var l=new Error;i=function(t){u.onerror=u.onload=null,clearTimeout(a);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",l.name="ChunkLoadError",l.type=o,l.request=c,n[1](l)}r[e]=void 0}};var a=setTimeout((function(){i({type:"timeout",target:u})}),12e4);u.onerror=u.onload=i,document.head.appendChild(u)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.blocksyNewsletterSubscribeExtJsonp=window.blocksyNewsletterSubscribeExtJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var u=0;u<c.length;u++)t(c[u]);var l=i;o(o.s=5)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.ctEvents},function(e,t,n){n.p=blocksy_ext_newsletter_subscribe_localization.public_url},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n(2),c=n(1),i=Object(c.lazy)((function(){return Promise.all([n.e(1),n.e(2)]).then(n.bind(null,13))})),u=function(e){return Object(r.createElement)("div",null,Object(r.createElement)(c.Suspense,{fallback:Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:Object(o.__)("Loading...","blc")}))},Object(r.createElement)(i,e)))},l=n(3),a=n.n(l);document.addEventListener("DOMContentLoaded",(function(){return a.a.on("blocksy:options:register",(function(e){e["blocksy-newsletter-subscribe"]=u}))}))}]);
framework/extensions/newsletter-subscribe/admin-static/bundle/sync.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t,r){"use strict";r.r(t);var n,o=r(0),c=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(" ")},s=function(e,t){var r=t.forcedOutput,n=void 0!==r&&r;if("CT_CSS_SKIP_RULE"===e)return"CT_CSS_SKIP_RULE";if("none"===e)return"none";if(!e.enable)return n?"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 n?"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(" ")},i=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",n={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(n[r])),c=o.innerText,s="".concat(e["".concat(r,"_selector_prefix")]?"".concat(e["".concat(r,"_selector_prefix")]," "):"").concat(e.selector||":root"),i=null,a=c.match(i);0===c.trim().indexOf(s)?(i=new RegExp("".concat(s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),a=c.match(i)):(i=new RegExp("\\}\\s*?".concat(s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),a=c.match(i)),a||(0===(c="".concat(c," ").concat(s," { }")).trim().indexOf(s)?(i=new RegExp("".concat(s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),a=c.match(i)):(i=new RegExp("\\}\\s*?".concat(s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{[\\s\\S]*?}"),"gm"),a=c.match(i))),o.innerText=c.replace(i,a[0].indexOf("--".concat(e.variable,":"))>-1?a[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,";")):a[0].replace(new RegExp("".concat(s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"\\s?{"),"gm"),"".concat(s," {").concat(t.indexOf("CT_CSS_SKIP_RULE")>-1||t.indexOf(e.variable)>-1?"":"--".concat(e.variable,": ").concat(t,";"))))},a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"desktop",n=(e.type||"").indexOf("color")>-1?t["color"===e.type?"default":e.type.split(":")[1]].color:t;"border"===(e.type||"")&&(n=t&&"none"!==t.style?"".concat(t.width,"px ").concat(t.style," ").concat(t.color.color):"none"),"spacing"===(e.type||"")&&(n=c(t)),"box-shadow"===(e.type||"")&&(n=s(t,e)),i(e,"".concat(n).concat(e.unit||"").concat(e.important?" !important":""),r)},l=function(e,t){var r=t;t=e.extractValue?e.extractValue(t):t,e.whenDone&&e.whenDone(t,r),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")),a(e,t.desktop,"desktop"),a(e,t.tablet,"tablet"),a(e,t.mobile,"mobile")):a(e,t)};n={newsletter_subscribe_content:[{selector:".ct-newsletter-subscribe-block",variable:"color",type:"color:default"},{selector:".ct-newsletter-subscribe-block",variable:"linkHoverColor",type:"color:hover"}],newsletter_subscribe_button:[{selector:".ct-newsletter-subscribe-block",variable:"buttonInitialColor",type:"color:default"},{selector:".ct-newsletter-subscribe-block",variable:"buttonHoverColor",type:"color:hover"}],newsletter_subscribe_background:{selector:".ct-newsletter-subscribe-block",variable:"mailchimpBackground",type:"color"},newsletter_subscribe_shadow:{selector:".ct-newsletter-subscribe-block",type:"box-shadow",variable:"box-shadow",responsive:!0},newsletter_subscribe_spacing:{selector:".ct-newsletter-subscribe-block",variable:"padding",responsive:!0,unit:"px"}},wp.customize.bind("change",(function(e){return n[e.id]&&(Array.isArray(n[e.id])?n[e.id]:[n[e.id]]).map((function(t){return l(t,e())}))})),wp.customize("newsletter_subscribe_subscribe_visibility",(function(e){return e.bind((function(e){var t=document.querySelector(".ct-newsletter-subscribe-block");Object(o.responsiveClassesFor)("newsletter_subscribe_subscribe_visibility",t)}))})),(document.body.classList.contains("single")||document.body.classList.contains("page"))&&Object(o.checkAndReplace)({id:"newsletter_subscribe_single_post_enabled",strategy:"append",parent_selector:".site-main article",selector:".ct-newsletter-subscribe-block",fragment_id:"blocksy-mailchimp-subscribe",watch:["has_newsletter_subscribe_name","newsletter_subscribe_button_text","newsletter_subscribe_title","newsletter_subscribe_text","newsletter_subscribe_name_label","newsletter_subscribe_mail_label"],whenInserted:function(){if(document.body.classList.contains("single")||document.body.classList.contains("page")){var e=document.querySelector(".ct-newsletter-subscribe-block");Object(o.responsiveClassesFor)("newsletter_subscribe_subscribe_visibility",e),"yes"!==wp.customize("has_newsletter_subscribe_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("newsletter_subscribe_name_label")()))),e.querySelector('[name="EMAIL"]').setAttribute("placeholder","".concat(wp.customize("newsletter_subscribe_mail_label")()," *")),e.querySelector("button").innerHTML=wp.customize("newsletter_subscribe_button_text")(),e.querySelector("h3").innerHTML=wp.customize("newsletter_subscribe_title")(),e.querySelector(".ct-newsletter-subscribe-description").innerHTML=wp.customize("newsletter_subscribe_text")()}}})}]);
framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/ListPicker.js RENAMED
@@ -6,7 +6,7 @@ const ListPickerImplementation = lazy(() =>
6
  import('./ListPicker/Implementation')
7
  )
8
 
9
- const ListPicker = props => (
10
  <div>
11
  <Suspense
12
  fallback={
6
  import('./ListPicker/Implementation')
7
  )
8
 
9
+ const ListPicker = (props) => (
10
  <div>
11
  <Suspense
12
  fallback={
framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/ListPicker/Implementation.js RENAMED
@@ -3,7 +3,7 @@ import {
3
  Component,
4
  useState,
5
  useEffect,
6
- Fragment
7
  } from '@wordpress/element'
8
  import Downshift from 'downshift'
9
  import { __ } from 'ct-i18n'
@@ -21,13 +21,17 @@ const ListPickerImplementation = ({ value, onChange }) => {
21
  }
22
 
23
  const body = new FormData()
24
- body.append('action', 'blocksy_ext_mailchimp_get_actual_lists')
 
 
 
25
 
26
  try {
27
  const response = await fetch(ajaxurl, {
28
  method: 'POST',
29
- body
30
  })
 
31
  if (response.status === 200) {
32
  const body = await response.json()
33
 
@@ -64,8 +68,8 @@ const ListPickerImplementation = ({ value, onChange }) => {
64
  ) : (
65
  <Downshift
66
  selectedItem={value || lists[0].id}
67
- onChange={selection => onChange(selection)}
68
- itemToString={item =>
69
  item ? (lists.find(({ id }) => id === item) || {}).name : ''
70
  }>
71
  {({
@@ -77,13 +81,13 @@ const ListPickerImplementation = ({ value, onChange }) => {
77
  inputValue,
78
  highlightedIndex,
79
  selectedItem,
80
- openMenu
81
  }) => (
82
  <div className="ct-select-input">
83
  <input
84
  {...getInputProps({
85
  onFocus: () => openMenu(),
86
- onClick: () => openMenu()
87
  })}
88
  placeholder={__('Select list...', 'blc')}
89
  readOnly
@@ -92,7 +96,7 @@ const ListPickerImplementation = ({ value, onChange }) => {
92
  {isOpen && (
93
  <div
94
  {...getMenuProps({
95
- className: 'ct-select-dropdown'
96
  })}>
97
  {lists.map((item, index) => (
98
  <div
@@ -106,9 +110,9 @@ const ListPickerImplementation = ({ value, onChange }) => {
106
  active:
107
  highlightedIndex === index,
108
  selected:
109
- selectedItem === item.id
110
  }
111
- )
112
  })}>
113
  {item.name}
114
  </div>
3
  Component,
4
  useState,
5
  useEffect,
6
+ Fragment,
7
  } from '@wordpress/element'
8
  import Downshift from 'downshift'
9
  import { __ } from 'ct-i18n'
21
  }
22
 
23
  const body = new FormData()
24
+ body.append(
25
+ 'action',
26
+ 'blocksy_ext_newsletter_subscribe_get_actual_lists'
27
+ )
28
 
29
  try {
30
  const response = await fetch(ajaxurl, {
31
  method: 'POST',
32
+ body,
33
  })
34
+
35
  if (response.status === 200) {
36
  const body = await response.json()
37
 
68
  ) : (
69
  <Downshift
70
  selectedItem={value || lists[0].id}
71
+ onChange={(selection) => onChange(selection)}
72
+ itemToString={(item) =>
73
  item ? (lists.find(({ id }) => id === item) || {}).name : ''
74
  }>
75
  {({
81
  inputValue,
82
  highlightedIndex,
83
  selectedItem,
84
+ openMenu,
85
  }) => (
86
  <div className="ct-select-input">
87
  <input
88
  {...getInputProps({
89
  onFocus: () => openMenu(),
90
+ onClick: () => openMenu(),
91
  })}
92
  placeholder={__('Select list...', 'blc')}
93
  readOnly
96
  {isOpen && (
97
  <div
98
  {...getMenuProps({
99
+ className: 'ct-select-dropdown',
100
  })}>
101
  {lists.map((item, index) => (
102
  <div
110
  active:
111
  highlightedIndex === index,
112
  selected:
113
+ selectedItem === item.id,
114
  }
115
+ ),
116
  })}>
117
  {item.name}
118
  </div>
framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/main.js RENAMED
@@ -4,7 +4,7 @@ import ListPicker from './ListPicker'
4
  import ctEvents from 'ct-events'
5
 
6
  document.addEventListener('DOMContentLoaded', () =>
7
- ctEvents.on('blocksy:options:register', opts => {
8
- opts['blocksy-mailchimp'] = ListPicker
9
  })
10
  )
4
  import ctEvents from 'ct-events'
5
 
6
  document.addEventListener('DOMContentLoaded', () =>
7
+ ctEvents.on('blocksy:options:register', (opts) => {
8
+ opts['blocksy-newsletter-subscribe'] = ListPicker
9
  })
10
  )
framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/public-path.js RENAMED
File without changes
framework/extensions/{mailchimp → newsletter-subscribe}/admin-static/js/sync.js RENAMED
@@ -2,10 +2,10 @@ import { checkAndReplace, responsiveClassesFor } from 'blocksy-customizer-sync'
2
 
3
  import './variables'
4
 
5
- wp.customize('mailchimp_subscribe_visibility', (val) =>
6
  val.bind((to) => {
7
- const block = document.querySelector('.ct-mailchimp-block')
8
- responsiveClassesFor('mailchimp_subscribe_visibility', block)
9
  })
10
  )
11
 
@@ -14,20 +14,20 @@ if (
14
  document.body.classList.contains('page')
15
  ) {
16
  checkAndReplace({
17
- id: 'mailchimp_single_post_enabled',
18
  strategy: 'append',
19
 
20
  parent_selector: '.site-main article',
21
- selector: '.ct-mailchimp-block',
22
  fragment_id: 'blocksy-mailchimp-subscribe',
23
 
24
  watch: [
25
- 'has_mailchimp_name',
26
- 'mailchimp_button_text',
27
- 'mailchimp_title',
28
- 'mailchimp_text',
29
- 'mailchimp_name_label',
30
- 'mailchimp_mail_label',
31
  ],
32
 
33
  whenInserted: () => {
@@ -37,11 +37,16 @@ if (
37
  ) {
38
  return
39
  }
40
- const block = document.querySelector('.ct-mailchimp-block')
 
 
41
 
42
- responsiveClassesFor('mailchimp_subscribe_visibility', block)
 
 
 
43
 
44
- if (wp.customize('has_mailchimp_name')() !== 'yes') {
45
  block.querySelector('[data-fields]').dataset.fields = 1
46
  block.querySelector('[name="FNAME"]').remove()
47
  } else {
@@ -51,7 +56,7 @@ if (
51
  .querySelector('[name="FNAME"]')
52
  .setAttribute(
53
  'placeholder',
54
- `${wp.customize('mailchimp_name_label')()}`
55
  )
56
  }
57
 
@@ -59,20 +64,20 @@ if (
59
  .querySelector('[name="EMAIL"]')
60
  .setAttribute(
61
  'placeholder',
62
- `${wp.customize('mailchimp_mail_label')()} *`
63
  )
64
 
65
  block.querySelector('button').innerHTML = wp.customize(
66
- 'mailchimp_button_text'
67
  )()
68
 
69
  block.querySelector('h3').innerHTML = wp.customize(
70
- 'mailchimp_title'
71
  )()
72
 
73
  block.querySelector(
74
- '.ct-mailchimp-description'
75
- ).innerHTML = wp.customize('mailchimp_text')()
76
  },
77
  })
78
  }
2
 
3
  import './variables'
4
 
5
+ wp.customize('newsletter_subscribe_subscribe_visibility', (val) =>
6
  val.bind((to) => {
7
+ const block = document.querySelector('.ct-newsletter-subscribe-block')
8
+ responsiveClassesFor('newsletter_subscribe_subscribe_visibility', block)
9
  })
10
  )
11
 
14
  document.body.classList.contains('page')
15
  ) {
16
  checkAndReplace({
17
+ id: 'newsletter_subscribe_single_post_enabled',
18
  strategy: 'append',
19
 
20
  parent_selector: '.site-main article',
21
+ selector: '.ct-newsletter-subscribe-block',
22
  fragment_id: 'blocksy-mailchimp-subscribe',
23
 
24
  watch: [
25
+ 'has_newsletter_subscribe_name',
26
+ 'newsletter_subscribe_button_text',
27
+ 'newsletter_subscribe_title',
28
+ 'newsletter_subscribe_text',
29
+ 'newsletter_subscribe_name_label',
30
+ 'newsletter_subscribe_mail_label',
31
  ],
32
 
33
  whenInserted: () => {
37
  ) {
38
  return
39
  }
40
+ const block = document.querySelector(
41
+ '.ct-newsletter-subscribe-block'
42
+ )
43
 
44
+ responsiveClassesFor(
45
+ 'newsletter_subscribe_subscribe_visibility',
46
+ block
47
+ )
48
 
49
+ if (wp.customize('has_newsletter_subscribe_name')() !== 'yes') {
50
  block.querySelector('[data-fields]').dataset.fields = 1
51
  block.querySelector('[name="FNAME"]').remove()
52
  } else {
56
  .querySelector('[name="FNAME"]')
57
  .setAttribute(
58
  'placeholder',
59
+ `${wp.customize('newsletter_subscribe_name_label')()}`
60
  )
61
  }
62
 
64
  .querySelector('[name="EMAIL"]')
65
  .setAttribute(
66
  'placeholder',
67
+ `${wp.customize('newsletter_subscribe_mail_label')()} *`
68
  )
69
 
70
  block.querySelector('button').innerHTML = wp.customize(
71
+ 'newsletter_subscribe_button_text'
72
  )()
73
 
74
  block.querySelector('h3').innerHTML = wp.customize(
75
+ 'newsletter_subscribe_title'
76
  )()
77
 
78
  block.querySelector(
79
+ '.ct-newsletter-subscribe-description'
80
+ ).innerHTML = wp.customize('newsletter_subscribe_text')()
81
  },
82
  })
83
  }
framework/extensions/newsletter-subscribe/admin-static/js/variables.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { handleVariablesFor } from 'customizer-sync-helpers'
2
+
3
+ handleVariablesFor({
4
+ newsletter_subscribe_content: [
5
+ {
6
+ selector: '.ct-newsletter-subscribe-block',
7
+ variable: 'color',
8
+ type: 'color:default',
9
+ },
10
+
11
+ {
12
+ selector: '.ct-newsletter-subscribe-block',
13
+ variable: 'linkHoverColor',
14
+ type: 'color:hover',
15
+ },
16
+ ],
17
+
18
+ newsletter_subscribe_button: [
19
+ {
20
+ selector: '.ct-newsletter-subscribe-block',
21
+ variable: 'buttonInitialColor',
22
+ type: 'color:default',
23
+ },
24
+
25
+ {
26
+ selector: '.ct-newsletter-subscribe-block',
27
+ variable: 'buttonHoverColor',
28
+ type: 'color:hover',
29
+ },
30
+ ],
31
+
32
+ newsletter_subscribe_background: {
33
+ selector: '.ct-newsletter-subscribe-block',
34
+ variable: 'mailchimpBackground',
35
+ type: 'color',
36
+ },
37
+
38
+ newsletter_subscribe_shadow: {
39
+ selector: '.ct-newsletter-subscribe-block',
40
+ type: 'box-shadow',
41
+ variable: 'box-shadow',
42
+ responsive: true,
43
+ },
44
+
45
+ newsletter_subscribe_spacing: {
46
+ selector: '.ct-newsletter-subscribe-block',
47
+ variable: 'padding',
48
+ responsive: true,
49
+ unit: 'px',
50
+ },
51
+ })
framework/extensions/{mailchimp → newsletter-subscribe}/config.php RENAMED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  $config = [
4
- 'name' => __('Mailchimp Subscribe', 'blc'),
5
- 'description' => __('Display a subscribe form with the help of a widget or a block.', 'blc')
6
  ];
7
 
1
  <?php
2
 
3
  $config = [
4
+ 'name' => __('Newsletter Subscribe', 'blc'),
5
+ 'description' => __('Display a subscribe form with the help of a widget, shortcode or a block.', 'blc')
6
  ];
7
 
framework/extensions/{mailchimp/ct-mailchimp → newsletter-subscribe/ct-newsletter-subscribe}/options.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Mailchimp widget
4
  *
5
  * @copyright 2019-present Creative Themes
6
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
@@ -18,7 +18,7 @@ $options = [
18
  'disableRevertButton' => true,
19
  ],
20
 
21
- 'mailchimp_text' => [
22
  'label' => __( 'Message', 'blc' ),
23
  'type' => 'textarea',
24
  'value' => __( 'Enter your email address below to subscribe to our newsletter', 'blc' ),
@@ -26,7 +26,7 @@ $options = [
26
  'disableRevertButton' => true,
27
  ],
28
 
29
- 'mailchimp_list_id_source' => [
30
  'type' => 'ct-radio',
31
  'label' => __( 'List Source', 'blc' ),
32
  'value' => 'default',
@@ -42,12 +42,12 @@ $options = [
42
 
43
  blocksy_rand_md5() => [
44
  'type' => 'ct-condition',
45
- 'condition' => [ 'mailchimp_list_id_source' => 'custom' ],
46
  'options' => [
47
 
48
- 'mailchimp_list_id' => [
49
  'label' => __( 'List ID', 'blc' ),
50
- 'type' => 'blocksy-mailchimp',
51
  'value' => '',
52
  'design' => 'inline',
53
  'disableRevertButton' => true,
@@ -56,7 +56,7 @@ $options = [
56
  ],
57
  ],
58
 
59
- 'has_mailchimp_name' => [
60
  'type' => 'ct-switch',
61
  'label' => __( 'Name Field', 'blc' ),
62
  'value' => 'no',
@@ -65,10 +65,10 @@ $options = [
65
 
66
  blocksy_rand_md5() => [
67
  'type' => 'ct-condition',
68
- 'condition' => [ 'has_mailchimp_name' => 'yes' ],
69
  'options' => [
70
 
71
- 'mailchimp_name_label' => [
72
  'type' => 'text',
73
  'label' => __( 'Name Label', 'blc' ),
74
  'design' => 'inline',
@@ -79,7 +79,7 @@ $options = [
79
  ],
80
  ],
81
 
82
- 'mailchimp_mail_label' => [
83
  'type' => 'text',
84
  'label' => __( 'Mail Label', 'blc' ),
85
  'design' => 'inline',
@@ -87,7 +87,7 @@ $options = [
87
  'disableRevertButton' => true,
88
  ],
89
 
90
- 'mailchimp_button_text' => [
91
  'type' => 'text',
92
  'label' => __( 'Button Label', 'blc' ),
93
  'design' => 'inline',
@@ -95,7 +95,7 @@ $options = [
95
  'disableRevertButton' => true,
96
  ],
97
 
98
- 'mailchimp_container' => [
99
  'label' => __( 'Container Type', 'blc' ),
100
  'type' => 'ct-select',
101
  'value' => 'default',
@@ -107,7 +107,7 @@ $options = [
107
  ],
108
  ],
109
 
110
- 'mailchimp_alignment' => [
111
  'type' => 'ct-radio',
112
  'label' => __( 'Content Alignment', 'blc' ),
113
  'value' => 'left',
1
  <?php
2
  /**
3
+ * Newsletter Subscribe widget
4
  *
5
  * @copyright 2019-present Creative Themes
6
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
18
  'disableRevertButton' => true,
19
  ],
20
 
21
+ 'newsletter_subscribe_text' => [
22
  'label' => __( 'Message', 'blc' ),
23
  'type' => 'textarea',
24
  'value' => __( 'Enter your email address below to subscribe to our newsletter', 'blc' ),
26
  'disableRevertButton' => true,
27
  ],
28
 
29
+ 'newsletter_subscribe_list_id_source' => [
30
  'type' => 'ct-radio',
31
  'label' => __( 'List Source', 'blc' ),
32
  'value' => 'default',
42
 
43
  blocksy_rand_md5() => [
44
  'type' => 'ct-condition',
45
+ 'condition' => [ 'newsletter_subscribe_list_id_source' => 'custom' ],
46
  'options' => [
47
 
48
+ 'newsletter_subscribe_list_id' => [
49
  'label' => __( 'List ID', 'blc' ),
50
+ 'type' => 'blocksy-newsletter-subscribe',
51
  'value' => '',
52
  'design' => 'inline',
53
  'disableRevertButton' => true,
56
  ],
57
  ],
58
 
59
+ 'has_newsletter_subscribe_name' => [
60
  'type' => 'ct-switch',
61
  'label' => __( 'Name Field', 'blc' ),
62
  'value' => 'no',
65
 
66
  blocksy_rand_md5() => [
67
  'type' => 'ct-condition',
68
+ 'condition' => [ 'has_newsletter_subscribe_name' => 'yes' ],
69
  'options' => [
70
 
71
+ 'newsletter_subscribe_name_label' => [
72
  'type' => 'text',
73
  'label' => __( 'Name Label', 'blc' ),
74
  'design' => 'inline',
79
  ],
80
  ],
81
 
82
+ 'newsletter_subscribe_mail_label' => [
83
  'type' => 'text',
84
  'label' => __( 'Mail Label', 'blc' ),
85
  'design' => 'inline',
87
  'disableRevertButton' => true,
88
  ],
89
 
90
+ 'newsletter_subscribe_button_text' => [
91
  'type' => 'text',
92
  'label' => __( 'Button Label', 'blc' ),
93
  'design' => 'inline',
95
  'disableRevertButton' => true,
96
  ],
97
 
98
+ 'newsletter_subscribe_container' => [
99
  'label' => __( 'Container Type', 'blc' ),
100
  'type' => 'ct-select',
101
  'value' => 'default',
107
  ],
108
  ],
109
 
110
+ 'newsletter_subscribe_alignment' => [
111
  'type' => 'ct-radio',
112
  'label' => __( 'Content Alignment', 'blc' ),
113
  'value' => 'left',
framework/extensions/newsletter-subscribe/ct-newsletter-subscribe/view.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Newsletter Subscribe widget
4
+ *
5
+ * @copyright 2019-present Creative Themes
6
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
7
+ * @package Blocksy
8
+ */
9
+
10
+
11
+ // Widget title
12
+ $title = blocksy_default_akg( 'title', $atts, __( 'Newsletter', 'blc' ) );
13
+
14
+
15
+ // Message
16
+ $message = blocksy_default_akg( 'newsletter_subscribe_text', $atts, __( 'Enter your email address below to subscribe to our newsletter', 'blc' ) );
17
+
18
+ // Button text
19
+ $button_text = blocksy_default_akg( 'newsletter_subscribe_button_text', $atts, __( 'Subscribe', 'blc' ) );
20
+
21
+ // Form name
22
+ $has_name = blocksy_default_akg( 'has_newsletter_subscribe_name', $atts, 'no' ) === 'yes';
23
+
24
+ $list_id = null;
25
+
26
+ if (blocksy_default_akg(
27
+ 'newsletter_subscribe_list_id_source',
28
+ $atts,
29
+ 'default'
30
+ ) === 'custom') {
31
+ $list_id = blocksy_default_akg('newsletter_subscribe_list_id', $atts, '');
32
+ }
33
+
34
+ $manager = BlocksyNewsletterManager::get_for_settings();
35
+
36
+ // Button value
37
+ $provider_data = $manager->get_form_url_and_gdpr_for($list_id);
38
+
39
+ if (! $provider_data) {
40
+ return;
41
+ }
42
+
43
+ if ($provider_data['provider'] === 'mailerlite') {
44
+ $settings = $manager->get_settings();
45
+ $provider_data['provider'] .= ':' . $settings['list_id'];
46
+ }
47
+
48
+ $form_url = $provider_data['form_url'];
49
+ $has_gdpr_fields = $provider_data['has_gdpr_fields'];
50
+
51
+ $skip_submit_output = '';
52
+
53
+ if ($has_gdpr_fields) {
54
+ $skip_submit_output = 'data-skip-submit';
55
+ }
56
+
57
+ // container type
58
+ $container = blocksy_default_akg('newsletter_subscribe_container', $atts, 'default');
59
+
60
+ $data_container = '';
61
+
62
+ if ( $container !== 'default' ) {
63
+ $data_container = ' data-container=' . $container;
64
+ }
65
+
66
+ // Content alignment
67
+ $alignment = blocksy_default_akg('newsletter_subscribe_alignment', $atts, 'left');
68
+
69
+ $name_label = blocksy_default_akg('newsletter_subscribe_name_label', $atts, __('Your name', 'blc'));
70
+ $email_label = blocksy_default_akg('newsletter_subscribe_mail_label', $atts, __('Your email', 'blc'));
71
+
72
+ $data_alignment = '';
73
+
74
+ if ($alignment !== 'left') {
75
+ $data_alignment = ' data-alignment=' . $alignment;
76
+ }
77
+
78
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
79
+ echo $before_widget;
80
+
81
+ echo '<div class="ct-widget-inner"' . $data_alignment . '' . $data_container . '>';
82
+
83
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
84
+ echo $before_title . wp_kses_post($title) . $after_title;
85
+
86
+
87
+ ?>
88
+
89
+ <form
90
+ action="<?php echo esc_attr($form_url) ?>"
91
+ method="post"
92
+ class="ct-newsletter-subscribe-widget-form"
93
+ target="_blank"
94
+ data-provider="<?php echo $provider_data['provider'] ?>"
95
+ <?php echo $skip_submit_output ?>>
96
+
97
+ <?php if (! empty($message)) { ?>
98
+ <div class="ct-newsletter-subscribe-description">
99
+ <?php echo wp_kses_post($message) ?>
100
+ </div>
101
+ <?php } ?>
102
+
103
+ <?php if ($has_name) { ?>
104
+ <input type="text" name="FNAME" placeholder="<?php esc_attr_e($name_label, 'blc'); ?>" title="<?php echo __('Name', 'blocksy') ?>" />
105
+ <?php } ?>
106
+
107
+ <input type="email" name="EMAIL" placeholder="<?php esc_attr_e($email_label, 'blc'); ?> *" title="<?php echo __('Email', 'blocksy') ?>" required />
108
+
109
+ <button class="button">
110
+ <?php echo esc_html($button_text) ?>
111
+ </button>
112
+
113
+ <div class="ct-newsletter-subscribe-message"></div>
114
+
115
+ <?php