iubenda Cookie Solution for GDPR - Version 3.0.0

Version Description

  • New: Support Privacy Policy
  • New: Support Terms and Conditions
  • New: Generate your cookie solution with few clicks
  • New: Use Radar to scan current website
Download this release

Release Info

Developer iubenda
Plugin Icon 128x128 iubenda Cookie Solution for GDPR
Version 3.0.0
Comparing to
See all releases

Code changes from version 2.5.91 to 3.0.0

Files changed (95) hide show
  1. assets/css/admin.css +57 -0
  2. assets/css/style.css +2354 -0
  3. assets/fonts/HKGrotesk-Bold.eot +0 -0
  4. assets/fonts/HKGrotesk-Bold.woff +0 -0
  5. assets/fonts/HKGrotesk-Bold.woff2 +0 -0
  6. assets/fonts/HKGrotesk-Regular.eot +0 -0
  7. assets/fonts/HKGrotesk-Regular.woff +0 -0
  8. assets/fonts/HKGrotesk-Regular.woff2 +0 -0
  9. assets/images/banner_failure.svg +1 -0
  10. assets/images/banner_success.svg +1 -0
  11. assets/images/checkboxes/button_style_dark.svg +1 -0
  12. assets/images/checkboxes/button_style_light.svg +1 -0
  13. assets/images/checkboxes/cons_icon.svg +1 -0
  14. assets/images/checkboxes/cs_icon.svg +1 -0
  15. assets/images/checkboxes/eu_only_icon.svg +1 -0
  16. assets/images/checkboxes/pp_icon.svg +1 -0
  17. assets/images/checkboxes/tc_icon.svg +1 -0
  18. assets/images/checkboxes/worldwide.svg +1 -0
  19. assets/images/iubenda_logo.svg +1 -0
  20. assets/images/list_radar_cons.svg +1 -0
  21. assets/images/list_radar_cs.svg +1 -0
  22. assets/images/list_radar_pp.svg +1 -0
  23. assets/images/list_radar_tc.svg +1 -0
  24. assets/images/modals/modal_almost_there.svg +1 -0
  25. assets/images/modals/modal_no_website_found.svg +1 -0
  26. assets/images/modals/modal_pp_created.svg +1 -0
  27. assets/images/modals/modal_sync.svg +1 -0
  28. assets/images/pc_screen_icon.svg +1 -0
  29. assets/images/question_mark.svg +1 -0
  30. assets/images/question_mark_light.svg +1 -0
  31. assets/images/service_cards/cons_icon.svg +1 -0
  32. assets/images/service_cards/cs_icon.svg +1 -0
  33. assets/images/service_cards/pp_icon.svg +1 -0
  34. assets/images/service_cards/tc_icon.svg +1 -0
  35. assets/images/warning-icon.svg +1 -0
  36. assets/images/welcome_screen_bg.svg +1 -0
  37. assets/images/white_checkmark.svg +1 -0
  38. assets/images/white_x.svg +1 -0
  39. assets/js/admin.js +697 -0
  40. {js → assets/js}/frontend.js +1 -1
  41. assets/js/tabs.js +25 -0
  42. css/admin.css +0 -164
  43. includes/CookieSolutionGenerator.php +144 -0
  44. includes/PrivacyPolicyGenerator.php +31 -0
  45. includes/ProductHelper.php +102 -0
  46. includes/QuickGeneratorService.php +600 -0
  47. includes/RadarService.php +170 -0
  48. includes/ServiceRating.php +94 -0
  49. includes/forms-list-table.php +91 -18
  50. includes/forms.php +1 -3
  51. includes/settings.php +969 -1571
  52. includes/widget/IubendaLegalWidget.php +224 -0
  53. iubenda_cookie_solution.php +331 -53
  54. js/admin.js +0 -282
  55. languages/iubenda-cookie-law-solution-it_IT.mo +0 -0
  56. languages/iubenda-cookie-law-solution-it_IT.po +0 -863
  57. languages/iubenda-cookie-law-solution.pot +0 -647
  58. languages/iubenda-it_IT.mo +0 -0
  59. languages/iubenda-it_IT.po +1038 -0
  60. languages/iubenda.pot +875 -0
  61. readme.txt +212 -116
  62. views/cons-configuration.php +68 -0
  63. views/cons-single-form.php +285 -0
  64. views/cs-configuration.php +40 -0
  65. views/frontpage.php +42 -0
  66. views/integrate-setup.php +153 -0
  67. views/partials/alert.php +13 -0
  68. views/partials/auto_detect_forms.php +33 -0
  69. views/partials/bannerPosition.php +52 -0
  70. views/partials/bannerStyle.php +19 -0
  71. views/partials/breadcrumb.php +21 -0
  72. views/partials/buttonPosition.php +77 -0
  73. views/partials/buttonStyle.php +23 -0
  74. views/partials/csGeneralSettings.php +146 -0
  75. views/partials/csManualConfiguration.php +17 -0
  76. views/partials/csPluginSettings.php +135 -0
  77. views/partials/csSimplifiedConfiguration.php +97 -0
  78. views/partials/footer.php +5 -0
  79. views/partials/frontpage_main_box.php +59 -0
  80. views/partials/header.php +14 -0
  81. views/partials/header_scanned.php +5 -0
  82. views/partials/integrateFooter.php +5 -0
  83. views/partials/languagesTabs.php +29 -0
  84. views/partials/modals/modal_almost_there.php +75 -0
  85. views/partials/modals/modal_no_website_found.php +14 -0
  86. views/partials/modals/modal_ops_embed_invalid.php +13 -0
  87. views/partials/modals/modal_pp_created.php +11 -0
  88. views/partials/modals/modal_select_language.php +79 -0
  89. views/partials/modals/modal_sync.php +9 -0
  90. views/partials/product-card.php +48 -0
  91. views/partials/siteInfo.php +20 -0
  92. views/partials/welcomeScreenHeader.php +4 -0
  93. views/pp-configuration.php +41 -0
  94. views/products-page.php +34 -0
  95. views/tc-configuration.php +135 -0
assets/css/admin.css ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .iubenda-notice {
2
+ border-left-color: #1CC691;
3
+ padding-left: 0;
4
+ display: flex;
5
+ justify-content: flex-start;
6
+ align-items: center;
7
+ }
8
+ .iubenda-notice::before {
9
+ display: inline-block;
10
+ content: '';
11
+ height: 49px;
12
+ width: 22px;
13
+ margin: 1em 2em;
14
+ background-size: contain;
15
+ background-position: center center;
16
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMjFweCIgaGVpZ2h0PSI0OTBweCIgdmlld0JveD0iMCAwIDIyMSA0OTAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+aXViZW5kYSB2ZWN0b3IgbG9nb192M19vbmx5X2lfZ3JlZW48L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJpdWJlbmRhLXZlY3Rvci1sb2dvX3YzX29ubHlfaV9ncmVlbiIgZmlsbD0iIzFDQzY5MSIgZmlsbC1ydWxlPSJub256ZXJvIj4gICAgICAgICAgICA8cGF0aCBkPSJNMjIwLjYsMTA4LjQgQzIyMC42LDEzNSAyMTAuOCwxNTkuMyAxOTQuNSwxNzguMSBMMjE3LjksNDg5LjQgTDguNSw0ODkuNCBMMzEuMiwxODMuNSBDMTEuOSwxNjQuMiAwLDEzNy43IDAsMTA4LjQgQzAsNDguNyA0OS40LDAuNCAxMTAuMywwLjQgQzE3MS4yLDAuNCAyMjAuNiw0OC43IDIyMC42LDEwOC40IFogTTExMC4zLDEzMyBDMTI1LDEzMyAxMzYuOCwxMjEuMiAxMzYuOCwxMDYuNyBDMTM2LjgsOTIuMiAxMjQuOSw4MC41IDExMC4zLDgwLjUgQzk1LjYsODAuNSA4My44LDkyLjMgODMuOCwxMDYuNyBDODMuOCwxMjEuMyA5NS42LDEzMyAxMTAuMywxMzMgWiBNMTMxLjIsMjI3IEw5NC45LDI2My4zIEw5NC45LDQwMy44IEwxMzEuMiw0MDMuOCBMMTMxLjIsMjI3IFoiIGlkPSJTaGFwZSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+);
17
+ }
18
+ .iubenda-notice .notice-question {
19
+ margin-bottom: 5px;
20
+ display: block;
21
+ }
22
+ .iubenda-notice .notice-reply {
23
+ margin-top: 0;
24
+ }
25
+ .iubenda-notice .step-2 {
26
+ display: none;
27
+ }
28
+ .iubenda-notice .reply-yes {
29
+ margin-right: 10px;
30
+ }
31
+ .iubenda-notice .reply-yes:before,
32
+ .iubenda-notice .reply-no:before {
33
+ font-family: dashicons;
34
+ display: inline-block;
35
+ line-height: 1;
36
+ font-weight: 400;
37
+ font-style: normal;
38
+ speak: none;
39
+ text-decoration: inherit;
40
+ text-transform: none;
41
+ text-rendering: auto;
42
+ -webkit-font-smoothing: antialiased;
43
+ -moz-osx-font-smoothing: grayscale;
44
+ width: 20px;
45
+ height: 20px;
46
+ font-size: 20px;
47
+ vertical-align: top;
48
+ text-align: center;
49
+ transition: color .1s ease-in;
50
+ text-decoration: none;
51
+ }
52
+ .iubenda-notice .reply-yes:before {
53
+ content: "\f147";
54
+ }
55
+ .iubenda-notice .reply-no:before {
56
+ content: "\f335";
57
+ }
assets/css/style.css ADDED
@@ -0,0 +1,2354 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "UTF-8";
2
+ @font-face {
3
+ font-family: "hkgrotesk";
4
+ src: url("../fonts/HKGrotesk-Regular.eot");
5
+ src: url("../fonts/HKGrotesk-Regular.eot?#iefix") format("embedded-opentype"), url("../fonts/HKGrotesk-Regular.woff2") format("woff2"), url("../fonts/HKGrotesk-Regular.woff") format("woff");
6
+ font-weight: 400;
7
+ font-style: normal;
8
+ font-display: swap;
9
+ }
10
+ @font-face {
11
+ font-family: "hkgrotesk";
12
+ src: url("../fonts/HKGrotesk-Bold.eot");
13
+ src: url("../fonts/hk-grotesk/HKGrotesk-Bold.eot?#iefix") format("embedded-opentype"), url("../fonts/HKGrotesk-Bold.woff2") format("woff2"), url("../fonts/hk-grotesk/HKGrotesk-Bold.woff") format("woff");
14
+ font-weight: 700;
15
+ font-style: normal;
16
+ font-display: swap;
17
+ }
18
+ .text-xs, .link-helper {
19
+ font-size: 0.8rem;
20
+ }
21
+
22
+ .text-sm {
23
+ font-size: 0.9rem;
24
+ }
25
+
26
+ .text-regular {
27
+ font-size: 1rem;
28
+ }
29
+
30
+ .text-md {
31
+ font-size: 1.125rem;
32
+ }
33
+
34
+ .text-lg {
35
+ font-size: 1.5rem;
36
+ }
37
+
38
+ .text-xl {
39
+ font-size: 2rem;
40
+ }
41
+
42
+ .text-gray-lighter {
43
+ color: #808080;
44
+ }
45
+
46
+ .text-gray {
47
+ color: #595959;
48
+ }
49
+
50
+ .text-warning {
51
+ color: #804123;
52
+ }
53
+
54
+ .text-green {
55
+ color: #1cc691;
56
+ }
57
+
58
+ h1 {
59
+ line-height: 1.25;
60
+ }
61
+
62
+ h4 {
63
+ margin: 0;
64
+ margin-bottom: 1rem;
65
+ color: #585858;
66
+ font-size: 0.95rem;
67
+ }
68
+
69
+ .m-0 {
70
+ margin: 0 !important;
71
+ }
72
+
73
+ .mt-0,
74
+ .my-0 {
75
+ margin-top: 0 !important;
76
+ }
77
+
78
+ .mr-0,
79
+ .mx-0 {
80
+ margin-right: 0 !important;
81
+ }
82
+
83
+ .mb-0,
84
+ .my-0 {
85
+ margin-bottom: 0 !important;
86
+ }
87
+
88
+ .ml-0,
89
+ .mx-0 {
90
+ margin-left: 0 !important;
91
+ }
92
+
93
+ .m-1 {
94
+ margin: 0.25rem !important;
95
+ }
96
+
97
+ .mt-1,
98
+ .my-1 {
99
+ margin-top: 0.25rem !important;
100
+ }
101
+
102
+ .mr-1,
103
+ .mx-1 {
104
+ margin-right: 0.25rem !important;
105
+ }
106
+
107
+ .mb-1,
108
+ .my-1 {
109
+ margin-bottom: 0.25rem !important;
110
+ }
111
+
112
+ .ml-1,
113
+ .mx-1 {
114
+ margin-left: 0.25rem !important;
115
+ }
116
+
117
+ .m-2 {
118
+ margin: 0.5rem !important;
119
+ }
120
+
121
+ .mt-2,
122
+ .my-2 {
123
+ margin-top: 0.5rem !important;
124
+ }
125
+
126
+ .mr-2,
127
+ .mx-2 {
128
+ margin-right: 0.5rem !important;
129
+ }
130
+
131
+ .mb-2,
132
+ .my-2 {
133
+ margin-bottom: 0.5rem !important;
134
+ }
135
+
136
+ .ml-2,
137
+ .mx-2 {
138
+ margin-left: 0.5rem !important;
139
+ }
140
+
141
+ .m-3 {
142
+ margin: 1rem !important;
143
+ }
144
+
145
+ .mt-3,
146
+ .my-3 {
147
+ margin-top: 1rem !important;
148
+ }
149
+
150
+ .mr-3,
151
+ .mx-3 {
152
+ margin-right: 1rem !important;
153
+ }
154
+
155
+ .mb-3,
156
+ .my-3 {
157
+ margin-bottom: 1rem !important;
158
+ }
159
+
160
+ .ml-3,
161
+ .mx-3 {
162
+ margin-left: 1rem !important;
163
+ }
164
+
165
+ .m-4 {
166
+ margin: 1.5rem !important;
167
+ }
168
+
169
+ .mt-4,
170
+ .my-4 {
171
+ margin-top: 1.5rem !important;
172
+ }
173
+
174
+ .mr-4,
175
+ .mx-4 {
176
+ margin-right: 1.5rem !important;
177
+ }
178
+
179
+ .mb-4,
180
+ .my-4 {
181
+ margin-bottom: 1.5rem !important;
182
+ }
183
+
184
+ .ml-4,
185
+ .mx-4 {
186
+ margin-left: 1.5rem !important;
187
+ }
188
+
189
+ .m-5 {
190
+ margin: 3rem !important;
191
+ }
192
+
193
+ .mt-5,
194
+ .my-5 {
195
+ margin-top: 3rem !important;
196
+ }
197
+
198
+ .mr-5,
199
+ .mx-5 {
200
+ margin-right: 3rem !important;
201
+ }
202
+
203
+ .mb-5,
204
+ .my-5 {
205
+ margin-bottom: 3rem !important;
206
+ }
207
+
208
+ .ml-5,
209
+ .mx-5 {
210
+ margin-left: 3rem !important;
211
+ }
212
+
213
+ .p-0 {
214
+ padding: 0 !important;
215
+ }
216
+
217
+ .pt-0,
218
+ .py-0 {
219
+ padding-top: 0 !important;
220
+ }
221
+
222
+ .pr-0,
223
+ .px-0 {
224
+ padding-right: 0 !important;
225
+ }
226
+
227
+ .pb-0,
228
+ .py-0 {
229
+ padding-bottom: 0 !important;
230
+ }
231
+
232
+ .pl-0,
233
+ .px-0 {
234
+ padding-left: 0 !important;
235
+ }
236
+
237
+ .p-1 {
238
+ padding: 0.25rem !important;
239
+ }
240
+
241
+ .pt-1,
242
+ .py-1 {
243
+ padding-top: 0.25rem !important;
244
+ }
245
+
246
+ .pr-1,
247
+ .px-1 {
248
+ padding-right: 0.25rem !important;
249
+ }
250
+
251
+ .pb-1,
252
+ .py-1 {
253
+ padding-bottom: 0.25rem !important;
254
+ }
255
+
256
+ .pl-1,
257
+ .px-1 {
258
+ padding-left: 0.25rem !important;
259
+ }
260
+
261
+ .p-2 {
262
+ padding: 0.5rem !important;
263
+ }
264
+
265
+ .pt-2,
266
+ .py-2 {
267
+ padding-top: 0.5rem !important;
268
+ }
269
+
270
+ .pr-2,
271
+ .px-2 {
272
+ padding-right: 0.5rem !important;
273
+ }
274
+
275
+ .pb-2,
276
+ .py-2 {
277
+ padding-bottom: 0.5rem !important;
278
+ }
279
+
280
+ .pl-2,
281
+ .px-2 {
282
+ padding-left: 0.5rem !important;
283
+ }
284
+
285
+ .p-3 {
286
+ padding: 1rem !important;
287
+ }
288
+
289
+ .pt-3,
290
+ .py-3 {
291
+ padding-top: 1rem !important;
292
+ }
293
+
294
+ .pr-3,
295
+ .px-3 {
296
+ padding-right: 1rem !important;
297
+ }
298
+
299
+ .pb-3,
300
+ .py-3 {
301
+ padding-bottom: 1rem !important;
302
+ }
303
+
304
+ .pl-3,
305
+ .px-3 {
306
+ padding-left: 1rem !important;
307
+ }
308
+
309
+ .p-4 {
310
+ padding: 1.5rem !important;
311
+ }
312
+
313
+ .pt-4,
314
+ .py-4 {
315
+ padding-top: 1.5rem !important;
316
+ }
317
+
318
+ .pr-4,
319
+ .px-4 {
320
+ padding-right: 1.5rem !important;
321
+ }
322
+
323
+ .pb-4,
324
+ .py-4 {
325
+ padding-bottom: 1.5rem !important;
326
+ }
327
+
328
+ .pl-4,
329
+ .px-4 {
330
+ padding-left: 1.5rem !important;
331
+ }
332
+
333
+ .p-5 {
334
+ padding: 3rem !important;
335
+ }
336
+
337
+ .pt-5,
338
+ .py-5 {
339
+ padding-top: 3rem !important;
340
+ }
341
+
342
+ .pr-5,
343
+ .px-5 {
344
+ padding-right: 3rem !important;
345
+ }
346
+
347
+ .pb-5,
348
+ .py-5 {
349
+ padding-bottom: 3rem !important;
350
+ }
351
+
352
+ .pl-5,
353
+ .px-5 {
354
+ padding-left: 3rem !important;
355
+ }
356
+
357
+ @media (min-width: 768px) {
358
+ .m-lg-0 {
359
+ margin: 0 !important;
360
+ }
361
+
362
+ .mt-lg-0,
363
+ .my-lg-0 {
364
+ margin-top: 0 !important;
365
+ }
366
+
367
+ .mr-lg-0,
368
+ .mx-lg-0 {
369
+ margin-right: 0 !important;
370
+ }
371
+
372
+ .mb-lg-0,
373
+ .my-lg-0 {
374
+ margin-bottom: 0 !important;
375
+ }
376
+
377
+ .ml-lg-0,
378
+ .mx-lg-0 {
379
+ margin-left: 0 !important;
380
+ }
381
+
382
+ .m-lg-1 {
383
+ margin: 0.25rem !important;
384
+ }
385
+
386
+ .mt-lg-1,
387
+ .my-lg-1 {
388
+ margin-top: 0.25rem !important;
389
+ }
390
+
391
+ .mr-lg-1,
392
+ .mx-lg-1 {
393
+ margin-right: 0.25rem !important;
394
+ }
395
+
396
+ .mb-lg-1,
397
+ .my-lg-1 {
398
+ margin-bottom: 0.25rem !important;
399
+ }
400
+
401
+ .ml-lg-1,
402
+ .mx-lg-1 {
403
+ margin-left: 0.25rem !important;
404
+ }
405
+
406
+ .m-lg-2 {
407
+ margin: 0.5rem !important;
408
+ }
409
+
410
+ .mt-lg-2,
411
+ .my-lg-2 {
412
+ margin-top: 0.5rem !important;
413
+ }
414
+
415
+ .mr-lg-2,
416
+ .mx-lg-2 {
417
+ margin-right: 0.5rem !important;
418
+ }
419
+
420
+ .mb-lg-2,
421
+ .my-lg-2 {
422
+ margin-bottom: 0.5rem !important;
423
+ }
424
+
425
+ .ml-lg-2,
426
+ .mx-lg-2 {
427
+ margin-left: 0.5rem !important;
428
+ }
429
+
430
+ .m-lg-3 {
431
+ margin: 1rem !important;
432
+ }
433
+
434
+ .mt-lg-3,
435
+ .my-lg-3 {
436
+ margin-top: 1rem !important;
437
+ }
438
+
439
+ .mr-lg-3,
440
+ .mx-lg-3 {
441
+ margin-right: 1rem !important;
442
+ }
443
+
444
+ .mb-lg-3,
445
+ .my-lg-3 {
446
+ margin-bottom: 1rem !important;
447
+ }
448
+
449
+ .ml-lg-3,
450
+ .mx-lg-3 {
451
+ margin-left: 1rem !important;
452
+ }
453
+
454
+ .m-lg-4 {
455
+ margin: 1.5rem !important;
456
+ }
457
+
458
+ .mt-lg-4,
459
+ .my-lg-4 {
460
+ margin-top: 1.5rem !important;
461
+ }
462
+
463
+ .mr-lg-4,
464
+ .mx-lg-4 {
465
+ margin-right: 1.5rem !important;
466
+ }
467
+
468
+ .mb-lg-4,
469
+ .my-lg-4 {
470
+ margin-bottom: 1.5rem !important;
471
+ }
472
+
473
+ .ml-lg-4,
474
+ .mx-lg-4 {
475
+ margin-left: 1.5rem !important;
476
+ }
477
+
478
+ .m-lg-5 {
479
+ margin: 3rem !important;
480
+ }
481
+
482
+ .mt-lg-5,
483
+ .my-lg-5 {
484
+ margin-top: 3rem !important;
485
+ }
486
+
487
+ .mr-lg-5,
488
+ .mx-lg-5 {
489
+ margin-right: 3rem !important;
490
+ }
491
+
492
+ .mb-lg-5,
493
+ .my-lg-5 {
494
+ margin-bottom: 3rem !important;
495
+ }
496
+
497
+ .ml-lg-5,
498
+ .mx-lg-5 {
499
+ margin-left: 3rem !important;
500
+ }
501
+
502
+ .p-lg-0 {
503
+ padding: 0 !important;
504
+ }
505
+
506
+ .pt-lg-0,
507
+ .py-lg-0 {
508
+ padding-top: 0 !important;
509
+ }
510
+
511
+ .pr-lg-0,
512
+ .px-lg-0 {
513
+ padding-right: 0 !important;
514
+ }
515
+
516
+ .pb-lg-0,
517
+ .py-lg-0 {
518
+ padding-bottom: 0 !important;
519
+ }
520
+
521
+ .pl-lg-0,
522
+ .px-lg-0 {
523
+ padding-left: 0 !important;
524
+ }
525
+
526
+ .p-lg-1 {
527
+ padding: 0.25rem !important;
528
+ }
529
+
530
+ .pt-lg-1,
531
+ .py-lg-1 {
532
+ padding-top: 0.25rem !important;
533
+ }
534
+
535
+ .pr-lg-1,
536
+ .px-lg-1 {
537
+ padding-right: 0.25rem !important;
538
+ }
539
+
540
+ .pb-lg-1,
541
+ .py-lg-1 {
542
+ padding-bottom: 0.25rem !important;
543
+ }
544
+
545
+ .pl-lg-1,
546
+ .px-lg-1 {
547
+ padding-left: 0.25rem !important;
548
+ }
549
+
550
+ .p-lg-2 {
551
+ padding: 0.5rem !important;
552
+ }
553
+
554
+ .pt-lg-2,
555
+ .py-lg-2 {
556
+ padding-top: 0.5rem !important;
557
+ }
558
+
559
+ .pr-lg-2,
560
+ .px-lg-2 {
561
+ padding-right: 0.5rem !important;
562
+ }
563
+
564
+ .pb-lg-2,
565
+ .py-lg-2 {
566
+ padding-bottom: 0.5rem !important;
567
+ }
568
+
569
+ .pl-lg-2,
570
+ .px-lg-2 {
571
+ padding-left: 0.5rem !important;
572
+ }
573
+
574
+ .p-lg-3 {
575
+ padding: 1rem !important;
576
+ }
577
+
578
+ .pt-lg-3,
579
+ .py-lg-3 {
580
+ padding-top: 1rem !important;
581
+ }
582
+
583
+ .pr-lg-3,
584
+ .px-lg-3 {
585
+ padding-right: 1rem !important;
586
+ }
587
+
588
+ .pb-lg-3,
589
+ .py-lg-3 {
590
+ padding-bottom: 1rem !important;
591
+ }
592
+
593
+ .pl-lg-3,
594
+ .px-lg-3 {
595
+ padding-left: 1rem !important;
596
+ }
597
+
598
+ .p-lg-4 {
599
+ padding: 1.5rem !important;
600
+ }
601
+
602
+ .pt-lg-4,
603
+ .py-lg-4 {
604
+ padding-top: 1.5rem !important;
605
+ }
606
+
607
+ .pr-lg-4,
608
+ .px-lg-4 {
609
+ padding-right: 1.5rem !important;
610
+ }
611
+
612
+ .pb-lg-4,
613
+ .py-lg-4 {
614
+ padding-bottom: 1.5rem !important;
615
+ }
616
+
617
+ .pl-lg-4,
618
+ .px-lg-4 {
619
+ padding-left: 1.5rem !important;
620
+ }
621
+
622
+ .p-lg-5 {
623
+ padding: 3rem !important;
624
+ }
625
+
626
+ .pt-lg-5,
627
+ .py-lg-5 {
628
+ padding-top: 3rem !important;
629
+ }
630
+
631
+ .pr-lg-5,
632
+ .px-lg-5 {
633
+ padding-right: 3rem !important;
634
+ }
635
+
636
+ .pb-lg-5,
637
+ .py-lg-5 {
638
+ padding-bottom: 3rem !important;
639
+ }
640
+
641
+ .pl-lg-5,
642
+ .px-lg-5 {
643
+ padding-left: 3rem !important;
644
+ }
645
+ }
646
+ html,
647
+ body {
648
+ font-family: "hkgrotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
649
+ font-weight: 400;
650
+ margin: 0;
651
+ height: 100vh;
652
+ background: #f0f0f1;
653
+ color: #333;
654
+ }
655
+
656
+ * {
657
+ -webkit-box-sizing: border-box;
658
+ box-sizing: border-box;
659
+ }
660
+
661
+ header {
662
+ padding: 1.5rem 0 1.5rem 0;
663
+ }
664
+
665
+ a {
666
+ text-decoration: none;
667
+ color: #333;
668
+ }
669
+ a:hover, a:focus {
670
+ color: currentColor;
671
+ -webkit-box-shadow: none;
672
+ box-shadow: none;
673
+ }
674
+
675
+ ul {
676
+ list-style: none;
677
+ }
678
+
679
+ hr {
680
+ margin: 0;
681
+ border: 0;
682
+ border-top: 1px solid rgba(151, 151, 151, 0.28);
683
+ }
684
+
685
+ .d-block {
686
+ display: block !important;
687
+ }
688
+
689
+ .d-flex {
690
+ display: -webkit-box !important;
691
+ display: -ms-flexbox !important;
692
+ display: flex !important;
693
+ }
694
+
695
+ .d-inline {
696
+ display: inline !important;
697
+ }
698
+
699
+ .d-inline-block {
700
+ display: inline-block !important;
701
+ }
702
+
703
+ .d-none {
704
+ display: none !important;
705
+ }
706
+
707
+ .text-left {
708
+ text-align: left !important;
709
+ }
710
+
711
+ .text-center, .modalSync {
712
+ text-align: center !important;
713
+ }
714
+
715
+ .text-right {
716
+ text-align: right !important;
717
+ }
718
+
719
+ .text-light {
720
+ font-weight: light !important;
721
+ }
722
+
723
+ .text-normal {
724
+ font-weight: normal !important;
725
+ }
726
+
727
+ .text-bold {
728
+ font-weight: bold !important;
729
+ }
730
+
731
+ @media (min-width: 768px) {
732
+ .d-lg-block {
733
+ display: block !important;
734
+ }
735
+
736
+ .d-lg-flex {
737
+ display: -webkit-box !important;
738
+ display: -ms-flexbox !important;
739
+ display: flex !important;
740
+ }
741
+
742
+ .d-lg-inline {
743
+ display: inline !important;
744
+ }
745
+
746
+ .d-lg-inline-block {
747
+ display: inline-block !important;
748
+ }
749
+
750
+ .d-lg-none {
751
+ display: none !important;
752
+ }
753
+
754
+ .text-lg-left {
755
+ text-align: left !important;
756
+ }
757
+
758
+ .text-lg-center {
759
+ text-align: center !important;
760
+ }
761
+
762
+ .text-lg-right {
763
+ text-align: right !important;
764
+ }
765
+
766
+ .text-lg-light {
767
+ font-weight: light !important;
768
+ }
769
+
770
+ .text-lg-normal {
771
+ font-weight: normal !important;
772
+ }
773
+
774
+ .text-lg-bold {
775
+ font-weight: bold !important;
776
+ }
777
+ }
778
+ .flex-fill {
779
+ -webkit-box-flex: 1;
780
+ -ms-flex: 1;
781
+ flex: 1;
782
+ }
783
+
784
+ .flex-wrap {
785
+ -ms-flex-wrap: wrap;
786
+ flex-wrap: wrap;
787
+ }
788
+
789
+ .flex-shrink {
790
+ -ms-flex-negative: 0;
791
+ flex-shrink: 0;
792
+ }
793
+
794
+ .flex-direction-column {
795
+ -webkit-box-orient: vertical;
796
+ -webkit-box-direction: normal;
797
+ -ms-flex-direction: column;
798
+ flex-direction: column;
799
+ }
800
+
801
+ .justify-content-center {
802
+ -webkit-box-pack: center;
803
+ -ms-flex-pack: center;
804
+ justify-content: center;
805
+ }
806
+
807
+ .justify-content-between {
808
+ -webkit-box-pack: justify;
809
+ -ms-flex-pack: justify;
810
+ justify-content: space-between;
811
+ }
812
+
813
+ .justify-content-end {
814
+ -webkit-box-pack: end;
815
+ -ms-flex-pack: end;
816
+ justify-content: flex-end;
817
+ }
818
+
819
+ .align-items-center {
820
+ -webkit-box-align: center;
821
+ -ms-flex-align: center;
822
+ align-items: center;
823
+ }
824
+
825
+ .btn {
826
+ text-align: center;
827
+ cursor: pointer;
828
+ text-decoration: none;
829
+ border-radius: 3rem;
830
+ font-weight: bold;
831
+ -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
832
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
833
+ -ms-flex-negative: 0;
834
+ flex-shrink: 0;
835
+ display: inline-block;
836
+ border: 1px solid transparent;
837
+ }
838
+
839
+ .btn-xs {
840
+ padding: 0.45rem 1.3rem !important;
841
+ font-size: 0.75rem;
842
+ }
843
+
844
+ .btn-sm {
845
+ padding: 0.5rem 1.7rem !important;
846
+ font-size: 1rem;
847
+ }
848
+
849
+ .btn-regular {
850
+ padding: 1rem 2.5rem !important;
851
+ font-size: 1rem;
852
+ }
853
+
854
+ .btn-lg {
855
+ padding: 1rem 3rem !important;
856
+ font-size: 1.125rem;
857
+ }
858
+
859
+ .btn-green-primary {
860
+ background-color: #1cc691;
861
+ color: #fff;
862
+ }
863
+ .btn-green-primary:hover, .btn-green-primary:focus {
864
+ background-color: #18ab7d;
865
+ color: #f0f0f0;
866
+ }
867
+
868
+ .btn-blue-primary {
869
+ background-color: #0073ce;
870
+ color: #fff;
871
+ }
872
+ .btn-blue-primary:hover, .btn-blue-primary:focus {
873
+ background-color: #0062af;
874
+ color: #f0f0f0;
875
+ }
876
+
877
+ .btn-gray-lighter {
878
+ background-color: #e7e7e7;
879
+ color: #585858;
880
+ }
881
+ .btn-gray-lighter:hover, .btn-gray-lighter:focus {
882
+ background-color: #d8d8d8;
883
+ color: #494949;
884
+ }
885
+
886
+ .btn-gray-darker {
887
+ background-color: #c8c8c8;
888
+ color: #585858;
889
+ }
890
+ .btn-gray-darker:hover, .btn-gray-darker:focus {
891
+ background-color: #b9b9b9;
892
+ color: #494949;
893
+ }
894
+
895
+ .btn-green-secondary {
896
+ background-color: #d2f4e9;
897
+ color: #009248;
898
+ }
899
+ .btn-green-secondary:hover, .btn-green-secondary:focus {
900
+ background-color: #b9eedd;
901
+ color: #007339;
902
+ }
903
+
904
+ .btn-gray-outline {
905
+ border-color: #595959;
906
+ background-color: transparent;
907
+ color: #595959;
908
+ }
909
+ .btn-gray-outline:hover, .btn-gray-outline:focus {
910
+ background-color: #595959;
911
+ color: #fff;
912
+ }
913
+
914
+ .btn-block {
915
+ display: block;
916
+ width: 75%;
917
+ margin: 0 auto;
918
+ }
919
+
920
+ .alert {
921
+ border: 1px solid rgba(151, 151, 151, 0.28);
922
+ border-radius: 0.4rem;
923
+ position: relative;
924
+ overflow: hidden;
925
+ }
926
+ .alert p {
927
+ padding: 1rem;
928
+ margin: auto;
929
+ }
930
+ @media (min-width: 768px) {
931
+ .alert {
932
+ display: -webkit-box;
933
+ display: -ms-flexbox;
934
+ display: flex;
935
+ }
936
+ .alert p {
937
+ padding: 0 4rem 0 2rem;
938
+ }
939
+ }
940
+ .alert--success .alert__icon {
941
+ background-color: #e8f9f4;
942
+ }
943
+ .alert--failure .alert__icon {
944
+ background-color: #f9eaea;
945
+ }
946
+ @media (max-width: 767px) {
947
+ .alert p {
948
+ text-align: center;
949
+ }
950
+ .alert img {
951
+ margin: 0 auto !important;
952
+ display: block;
953
+ }
954
+ }
955
+ .alert .btn-close {
956
+ background-color: #c8c8c8;
957
+ font-size: 1.25rem;
958
+ color: #fff;
959
+ cursor: pointer;
960
+ -ms-flex-negative: 0;
961
+ flex-shrink: 0;
962
+ height: 1.5rem;
963
+ width: 1.5rem;
964
+ line-height: 1.5rem;
965
+ border-radius: 50%;
966
+ border: 0;
967
+ padding: 0px;
968
+ margin-bottom: 2.5rem;
969
+ position: absolute;
970
+ top: 1rem;
971
+ right: 0.2rem;
972
+ }
973
+ .alert .btn-close:before {
974
+ display: none;
975
+ }
976
+
977
+ .notice {
978
+ border-radius: 0.25rem;
979
+ display: -webkit-inline-box;
980
+ display: -ms-inline-flexbox;
981
+ display: inline-flex;
982
+ margin: 0;
983
+ border: 0;
984
+ }
985
+ .notice p {
986
+ margin: 0;
987
+ }
988
+ .notice--warning {
989
+ background-color: #fff4e6;
990
+ }
991
+ .notice--general {
992
+ background-color: #f5f5f5;
993
+ }
994
+
995
+ /* SWITCH TOOGGLE*/
996
+ .switch {
997
+ display: -webkit-inline-box;
998
+ display: -ms-inline-flexbox;
999
+ display: inline-flex;
1000
+ margin: 0 10px 0 0;
1001
+ position: relative;
1002
+ }
1003
+ .switch input {
1004
+ position: absolute;
1005
+ top: 0;
1006
+ left: 0;
1007
+ }
1008
+ .switch .selected:before {
1009
+ content: " off";
1010
+ }
1011
+ .switch label {
1012
+ cursor: pointer;
1013
+ width: 48px;
1014
+ height: 24px;
1015
+ background: #c8c8c8;
1016
+ display: block;
1017
+ border-radius: 24px;
1018
+ position: relative;
1019
+ }
1020
+ .switch label:after {
1021
+ content: "";
1022
+ position: absolute;
1023
+ top: 4px;
1024
+ left: 4px;
1025
+ width: 16px;
1026
+ height: 16px;
1027
+ background: white;
1028
+ border-radius: 16px;
1029
+ -webkit-transition: 0.3s;
1030
+ transition: 0.3s;
1031
+ }
1032
+ .switch input[type=checkbox] {
1033
+ height: 0;
1034
+ width: 0;
1035
+ visibility: hidden;
1036
+ }
1037
+ .switch input[type=checkbox]:checked ~ .notification > .selected:before {
1038
+ content: " on";
1039
+ }
1040
+ .switch input[type=checkbox]:checked .selected {
1041
+ content: "on";
1042
+ }
1043
+ .switch input[type=checkbox]:checked + label {
1044
+ background: #1cc691;
1045
+ }
1046
+ .switch input[type=checkbox]:checked + label:after {
1047
+ left: calc(100% - 4px);
1048
+ -webkit-transform: translateX(-100%);
1049
+ transform: translateX(-100%);
1050
+ }
1051
+
1052
+ /* Regular checkbox*/
1053
+ .checkbox-regular {
1054
+ display: -webkit-box;
1055
+ display: -ms-flexbox;
1056
+ display: flex;
1057
+ -webkit-box-align: start;
1058
+ -ms-flex-align: start;
1059
+ align-items: flex-start;
1060
+ margin-bottom: 0.75rem;
1061
+ }
1062
+ .checkbox-regular span {
1063
+ -webkit-box-flex: 1;
1064
+ -ms-flex: 1 1 auto;
1065
+ flex: 1 1 auto;
1066
+ font-size: 0.9rem;
1067
+ padding: 0.25rem;
1068
+ }
1069
+ .checkbox-regular input[type=checkbox] {
1070
+ margin: 0;
1071
+ -webkit-box-shadow: none;
1072
+ box-shadow: none;
1073
+ -ms-flex-negative: 0;
1074
+ flex-shrink: 0;
1075
+ -webkit-appearance: none;
1076
+ -moz-appearance: none;
1077
+ appearance: none;
1078
+ min-width: 1.75rem;
1079
+ min-height: 1.75rem;
1080
+ border-radius: 0.25rem;
1081
+ border: 1px solid #ced4da;
1082
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1083
+ margin-right: 0.5rem;
1084
+ }
1085
+ .checkbox-regular input[type=checkbox]:before {
1086
+ display: none;
1087
+ }
1088
+ .checkbox-regular input[type=checkbox]:checked {
1089
+ background-size: 1.125rem auto;
1090
+ background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3Csvg width='34px' height='24px' viewBox='0 0 34 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3ERectangle 13%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cdefs%3E%3C/defs%3E%3Cg id='spec' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='elements' transform='translate(-2505.000000, -3840.000000)' fill-rule='nonzero' fill='%231CC691'%3E%3Cpath d='M2515,3858.6 C2513.89543,3858.6 2513,3859.49543 2513,3860.6 C2513,3861.70457 2513.89543,3862.6 2515,3862.6 L2529,3862.6 C2530.10457,3862.6 2531,3861.70457 2531,3860.6 L2531,3834 C2531,3832.89543 2530.10457,3832 2529,3832 C2527.89543,3832 2527,3832.89543 2527,3834 L2527,3858.6 L2515,3858.6 Z' id='Rectangle-13' transform='translate(2522.000000, 3847.300000) rotate(-315.000000) translate(-2522.000000, -3847.300000) '%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
1091
+ background-repeat: no-repeat;
1092
+ background-position: center;
1093
+ }
1094
+ .checkbox-regular input[type=checkbox]:focus {
1095
+ border-color: #1cc691;
1096
+ -webkit-box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1097
+ box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1098
+ }
1099
+
1100
+ /*RADIO LARGE*/
1101
+ .radio-large input[type=radio] {
1102
+ -webkit-appearance: none;
1103
+ -moz-appearance: none;
1104
+ appearance: none;
1105
+ width: 0;
1106
+ height: 0;
1107
+ opacity: 0;
1108
+ }
1109
+ .radio-large input[type=radio]:before {
1110
+ display: none;
1111
+ }
1112
+ .radio-large input[type=radio]:checked + label {
1113
+ border-color: #1cc691;
1114
+ -webkit-box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1115
+ box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1116
+ font-weight: bold;
1117
+ color: #1cc691;
1118
+ }
1119
+ .radio-large label {
1120
+ display: inline-block;
1121
+ padding: 1rem 2rem;
1122
+ white-space: nowrap;
1123
+ min-width: 12rem;
1124
+ display: -webkit-box;
1125
+ display: -ms-flexbox;
1126
+ display: flex;
1127
+ -webkit-box-align: center;
1128
+ -ms-flex-align: center;
1129
+ align-items: center;
1130
+ -webkit-box-pack: center;
1131
+ -ms-flex-pack: center;
1132
+ justify-content: center;
1133
+ font-size: 1rem;
1134
+ border: 1px solid #ced4da;
1135
+ -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1136
+ transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1137
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
1138
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1139
+ border-radius: 0.25rem;
1140
+ }
1141
+
1142
+ /*RADIO BUTTON REGULAR*/
1143
+ .radio-regular {
1144
+ display: -webkit-box;
1145
+ display: -ms-flexbox;
1146
+ display: flex;
1147
+ -webkit-box-align: start;
1148
+ -ms-flex-align: start;
1149
+ align-items: flex-start;
1150
+ }
1151
+ .radio-regular span {
1152
+ -webkit-box-flex: 1;
1153
+ -ms-flex: 1 1 auto;
1154
+ flex: 1 1 auto;
1155
+ font-size: 0.9rem;
1156
+ }
1157
+ .radio-regular input[type=radio] {
1158
+ -webkit-box-shadow: none;
1159
+ box-shadow: none;
1160
+ -webkit-appearance: none;
1161
+ -moz-appearance: none;
1162
+ appearance: none;
1163
+ min-width: 1.75rem;
1164
+ min-height: 1.75rem;
1165
+ border-radius: 1.75rem;
1166
+ border: 1px solid #ced4da;
1167
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1168
+ }
1169
+ .radio-regular input[type=radio]:before {
1170
+ display: none;
1171
+ }
1172
+ .radio-regular input[type=radio]:checked {
1173
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5PdmFsIDEyPC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9InNwZWMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImVsZW1lbnRzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjQ2Ny4wMDAwMDAsIC0zNzk1LjAwMDAwMCkiIGZpbGw9IiMxQ0M2OTEiPiAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMTIiIGN4PSIyNDcxIiBjeT0iMzc5OSIgcj0iNCI+PC9jaXJjbGU+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=);
1174
+ background-size: 6px 6px;
1175
+ background-repeat: no-repeat;
1176
+ background-position: center;
1177
+ }
1178
+ .radio-regular input[type=radio]:focus {
1179
+ border-color: #1cc691;
1180
+ -webkit-box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1181
+ box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1182
+ }
1183
+
1184
+ .radio-controller {
1185
+ position: relative;
1186
+ margin: 0.25rem;
1187
+ }
1188
+ .radio-controller input {
1189
+ position: absolute;
1190
+ top: 0;
1191
+ left: 0;
1192
+ }
1193
+
1194
+ .radio-toggle {
1195
+ display: -webkit-box;
1196
+ display: -ms-flexbox;
1197
+ display: flex;
1198
+ -webkit-box-align: start;
1199
+ -ms-flex-align: start;
1200
+ align-items: flex-start;
1201
+ padding: 1.5rem 0;
1202
+ margin-top: 2rem;
1203
+ }
1204
+ .radio-toggle .switch {
1205
+ margin-right: 1rem;
1206
+ }
1207
+ .radio-toggle span {
1208
+ margin: 0.125rem 0;
1209
+ font-size: 1.5rem;
1210
+ font-weight: bold;
1211
+ }
1212
+
1213
+ /*RADIO THEME*/
1214
+ .radio-theme input[type=radio] {
1215
+ -webkit-box-shadow: none;
1216
+ box-shadow: none;
1217
+ -webkit-appearance: none;
1218
+ -moz-appearance: none;
1219
+ appearance: none;
1220
+ width: 163px;
1221
+ height: 86px;
1222
+ border-radius: 0.25rem;
1223
+ border: 1px solid #ced4da;
1224
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1225
+ background-size: 132px auto;
1226
+ background-repeat: no-repeat;
1227
+ background-position: 30px 6px;
1228
+ }
1229
+ .radio-theme input[type=radio]:before {
1230
+ display: none;
1231
+ }
1232
+ .radio-theme input[type=radio]:checked {
1233
+ border-color: #1cc691;
1234
+ -webkit-box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1235
+ box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1236
+ }
1237
+ .radio-theme input[type=radio]:disabled {
1238
+ border: 1px solid #ced4da;
1239
+ }
1240
+
1241
+ .radio-theme-dark input[type=radio] {
1242
+ background-image: url("data:image/svg+xml,%3Csvg height='86' viewBox='0 0 138 86' width='138' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Crect fill='%23373737' height='86' rx='4' width='192'/%3E%3Cg transform='translate(18 15)'%3E%3Cpath d='m5.09179202 3.53571429v-3.39452802h-5.09179202v3.39452802zm4.8375 0v-3.39452802h-5.09179202v3.39452802zm4.83749998 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm14.6433594 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802z' fill='%23fff' fill-rule='nonzero'/%3E%3Cpath d='m5.09179202 19.4785714v-3.394528h-5.09179202v3.394528zm4.8375 0v-3.394528h-5.09179202v3.394528zm4.83749998 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm14.6433594 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm14.6433594 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm-82.49921878 11.3v-3.394528h-5.09179202v3.394528zm4.8375 0v-3.394528h-5.09179202v3.394528zm4.83749998 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528z' fill='%23afafaf' fill-rule='nonzero'/%3E%3Cg fill='%230073ce'%3E%3Crect height='10.857143' rx='5' width='35.413793' x='51.362069' y='46.142857'/%3E%3Crect height='10.857143' rx='5' width='35.413793' x='93.586207' y='46.142857'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
1243
+ }
1244
+
1245
+ .radio-theme-light input[type=radio] {
1246
+ background-image: url("data:image/svg+xml,%3Csvg height='86' viewBox='0 0 138 86' width='138' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Crect fill='%23f9f9f9' height='86' rx='4' width='192'/%3E%3Cg transform='translate(18 11)'%3E%3Cpath d='m5.09179202 7.53571429v-3.39452802h-5.09179202v3.39452802zm4.8375 0v-3.39452802h-5.09179202v3.39452802zm4.83749998 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm14.6433594 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802zm4.8375 0v-3.39452802h-5.091792v3.39452802z' fill='%23565656' fill-rule='nonzero'/%3E%3Cpath d='m5.09179202 23.4785714v-3.394528h-5.09179202v3.394528zm4.8375 0v-3.394528h-5.09179202v3.394528zm4.83749998 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm14.6433594 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm14.6433594 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm-82.49921878 11.3v-3.394528h-5.09179202v3.394528zm4.8375 0v-3.394528h-5.09179202v3.394528zm4.83749998 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528zm4.8375 0v-3.394528h-5.091792v3.394528z' fill='%23afafaf' fill-rule='nonzero'/%3E%3Cg fill='%230073ce'%3E%3Crect height='10.857143' rx='5' width='35.413793' x='51.362069' y='50.142857'/%3E%3Crect height='10.857143' rx='5' width='35.413793' x='93.586207' y='50.142857'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
1247
+ }
1248
+
1249
+ .radio-theme-custom input[type=radio] {
1250
+ background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='15px' height='15px' viewBox='0 0 15 15' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3E+%3C/title%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' font-family='HelveticaNeue, Helvetica Neue' font-size='28' font-weight='normal'%3E%3Cg id='wizard_configurator' transform='translate(-972.000000, -622.000000)' fill='%23333333'%3E%3Ctext id='+'%3E%3Ctspan x='971.6' y='637'%3E+%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
1251
+ background-size: 16px 16px;
1252
+ background-repeat: no-repeat;
1253
+ background-position: center;
1254
+ }
1255
+
1256
+ .radio-cards {
1257
+ display: -webkit-box;
1258
+ display: -ms-flexbox;
1259
+ display: flex;
1260
+ grid-gap: 0.625rem;
1261
+ grid-auto-flow: column;
1262
+ -ms-grid-rows: auto;
1263
+ grid-template-rows: auto;
1264
+ overflow-x: auto;
1265
+ padding: 0.5rem;
1266
+ margin: 0 -0.5rem;
1267
+ }
1268
+ .radio-cards .radio-card {
1269
+ text-align: center;
1270
+ position: relative;
1271
+ min-width: 7rem;
1272
+ -webkit-box-flex: 1;
1273
+ -ms-flex: 1;
1274
+ flex: 1;
1275
+ display: -webkit-box;
1276
+ display: -ms-flexbox;
1277
+ display: flex;
1278
+ }
1279
+ .radio-cards .radio-card input {
1280
+ position: absolute;
1281
+ top: 0;
1282
+ left: 0;
1283
+ opacity: 0;
1284
+ }
1285
+ .radio-cards .radio-card input:checked ~ div {
1286
+ -webkit-box-shadow: 0 0 0 0.35rem rgba(28, 198, 145, 0.15), 0 0 0 1px #1cc691;
1287
+ box-shadow: 0 0 0 0.35rem rgba(28, 198, 145, 0.15), 0 0 0 1px #1cc691;
1288
+ }
1289
+ .radio-cards .radio-card input:checked ~ .check-icon {
1290
+ display: block;
1291
+ }
1292
+ .radio-cards .radio-card .check-icon {
1293
+ position: absolute;
1294
+ display: none;
1295
+ top: 0.5rem;
1296
+ right: 0.5rem;
1297
+ }
1298
+ .radio-cards .radio-card > div {
1299
+ -webkit-box-flex: 1;
1300
+ -ms-flex: 1;
1301
+ flex: 1;
1302
+ padding: 1.5rem 1rem;
1303
+ border: 1px solid rgba(0, 0, 0, 0.2);
1304
+ border-radius: 0.35rem;
1305
+ display: -webkit-box;
1306
+ display: -ms-flexbox;
1307
+ display: flex;
1308
+ -webkit-box-align: center;
1309
+ -ms-flex-align: center;
1310
+ align-items: center;
1311
+ -webkit-box-pack: center;
1312
+ -ms-flex-pack: center;
1313
+ justify-content: center;
1314
+ -webkit-box-orient: vertical;
1315
+ -webkit-box-direction: normal;
1316
+ -ms-flex-direction: column;
1317
+ flex-direction: column;
1318
+ cursor: pointer;
1319
+ }
1320
+ .radio-cards .radio-card > div img {
1321
+ width: 45%;
1322
+ margin-bottom: 0.35rem;
1323
+ }
1324
+ .radio-cards .radio-card > div span {
1325
+ font-weight: bold;
1326
+ font-size: 0.85rem;
1327
+ line-height: 1;
1328
+ display: inline-block;
1329
+ }
1330
+
1331
+ .check-icon {
1332
+ display: inline-block;
1333
+ width: 2rem;
1334
+ height: 2rem;
1335
+ background-image: url("data:image/svg+xml,%3Csvg height='7' viewBox='0 0 8 7' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m14.8113573 11.5935296h-5.33333337l.03831907-1.99999999' fill='none' stroke='%23fff' stroke-linecap='round' stroke-width='2' transform='matrix(.64278761 -.76604444 .76604444 .64278761 -11.776881 5.087513)'/%3E%3C/svg%3E");
1336
+ background-repeat: no-repeat;
1337
+ background-position: center;
1338
+ background-size: 0.75rem;
1339
+ border-radius: 50%;
1340
+ background-color: #1cc691;
1341
+ }
1342
+
1343
+ /*RADIO BUTTON STYLE*/
1344
+ .radio-btn-style {
1345
+ position: relative;
1346
+ }
1347
+ .radio-btn-style > div {
1348
+ border-radius: 0.25rem;
1349
+ border: 1px solid #ced4da;
1350
+ padding: 1.5rem 2rem;
1351
+ overflow: hidden;
1352
+ }
1353
+ .radio-btn-style input {
1354
+ -webkit-appearance: none;
1355
+ -moz-appearance: none;
1356
+ appearance: none;
1357
+ opacity: 0;
1358
+ position: absolute;
1359
+ top: 0;
1360
+ left: 0;
1361
+ }
1362
+ .radio-btn-style input:checked + div {
1363
+ border-color: #1cc691;
1364
+ -webkit-box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1365
+ box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1366
+ }
1367
+ .radio-btn-style .btn-fake {
1368
+ background-image: url("data:image/svg+xml,%3Csvg height='21' viewBox='0 0 11 21' width='11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m5.328 0c2.94257315 0 5.328 2.38542685 5.328 5.328 0 1.8242202-.91678202 3.43431448-2.31474111 4.39467789l1.28526555 10.92332211h-8.59704888l1.28526555-10.92332211c-1.39795909-.96036341-2.31474111-2.57045769-2.31474111-4.39467789 0-2.94257315 2.38542685-5.328 5.328-5.328z' fill='%231cc691' fill-rule='evenodd'/%3E%3C/svg%3E");
1369
+ background-position: left 1rem center;
1370
+ background-repeat: no-repeat;
1371
+ border: 2px solid rgba(0, 0, 0, 0.2);
1372
+ padding: 1rem 1.5rem 1rem 3rem;
1373
+ border-radius: 0.35rem;
1374
+ display: -webkit-box;
1375
+ display: -ms-flexbox;
1376
+ display: flex;
1377
+ margin-right: -4rem;
1378
+ color: #444;
1379
+ }
1380
+ .radio-btn-style .btn-fake:before, .radio-btn-style .btn-fake:after {
1381
+ content: "";
1382
+ display: inline-block;
1383
+ height: 0.5rem;
1384
+ background-color: currentColor;
1385
+ white-space: nowrap;
1386
+ margin-right: 0.5rem;
1387
+ }
1388
+ .radio-btn-style .btn-fake:before {
1389
+ width: 4rem;
1390
+ }
1391
+ .radio-btn-style .btn-fake:after {
1392
+ width: 2rem;
1393
+ }
1394
+
1395
+ .radio-btn-style-dark .btn-fake {
1396
+ color: white;
1397
+ background-color: #444;
1398
+ }
1399
+
1400
+ .paste_embed_code {
1401
+ min-inline-size: auto;
1402
+ }
1403
+ .paste_embed_code textarea {
1404
+ -webkit-appearance: none;
1405
+ -moz-appearance: none;
1406
+ appearance: none;
1407
+ width: 100%;
1408
+ background: transparent;
1409
+ padding: 1rem;
1410
+ font-family: monospace;
1411
+ border: 0;
1412
+ resize: none;
1413
+ outline: 0;
1414
+ }
1415
+ .paste_embed_code textarea:focus {
1416
+ -webkit-box-shadow: none;
1417
+ box-shadow: none;
1418
+ }
1419
+ .paste_embed_code input[type=text] {
1420
+ width: 100% !important;
1421
+ display: block !important;
1422
+ border: 1px solid rgba(0, 0, 0, 0.2) !important;
1423
+ padding: 1rem !important;
1424
+ font-family: monospace !important;
1425
+ }
1426
+ .paste_embed_code input[type=text]:focus {
1427
+ -webkit-box-shadow: none !important;
1428
+ box-shadow: none !important;
1429
+ }
1430
+
1431
+ .paste-api-form {
1432
+ border: 1px solid #979797;
1433
+ border-radius: 0.25rem;
1434
+ position: relative;
1435
+ -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1436
+ transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1437
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
1438
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1439
+ display: -webkit-box;
1440
+ display: -ms-flexbox;
1441
+ display: flex;
1442
+ }
1443
+ @media (max-width: 767px) {
1444
+ .paste-api-form {
1445
+ -webkit-box-orient: vertical;
1446
+ -webkit-box-direction: normal;
1447
+ -ms-flex-direction: column;
1448
+ flex-direction: column;
1449
+ }
1450
+ }
1451
+ .paste-api-form:focus-within {
1452
+ border-color: #1cc691;
1453
+ -webkit-box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1454
+ box-shadow: 0 0 0 0.25rem rgba(28, 198, 145, 0.25);
1455
+ outline: none;
1456
+ }
1457
+ .paste-api-form button {
1458
+ margin: 1rem;
1459
+ -ms-flex-item-align: end;
1460
+ align-self: flex-end;
1461
+ }
1462
+ .paste-api-form input[type=text],
1463
+ .paste-api-form button {
1464
+ padding: 1rem;
1465
+ }
1466
+ .paste-api-form input[type=text] {
1467
+ -webkit-box-flex: 2;
1468
+ -ms-flex-positive: 2;
1469
+ flex-grow: 2;
1470
+ outline: none;
1471
+ border: none;
1472
+ border-radius: 0.25rem;
1473
+ font-family: "hkgrotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
1474
+ }
1475
+ .paste-api-form input[type=text]:focus {
1476
+ -webkit-box-shadow: none;
1477
+ box-shadow: none;
1478
+ }
1479
+
1480
+ fieldset {
1481
+ border: none;
1482
+ margin: 0;
1483
+ padding: 0;
1484
+ }
1485
+
1486
+ label,
1487
+ input {
1488
+ cursor: pointer;
1489
+ }
1490
+
1491
+ .custom-iframe-field,
1492
+ .custom-script-field {
1493
+ margin-bottom: 0.5rem;
1494
+ }
1495
+ .custom-iframe-field.shown,
1496
+ .custom-script-field.shown {
1497
+ display: -webkit-box;
1498
+ display: -ms-flexbox;
1499
+ display: flex;
1500
+ }
1501
+
1502
+ .tabs .tabs__target:not(.active) {
1503
+ display: none;
1504
+ }
1505
+ .tabs .tabs__nav__item {
1506
+ margin: 0;
1507
+ cursor: pointer;
1508
+ }
1509
+ .tabs--style2 {
1510
+ border: 1px solid rgba(0, 0, 0, 0.2);
1511
+ border-radius: 0.35rem;
1512
+ }
1513
+ .tabs--style2 > .tabs__nav {
1514
+ display: -webkit-box;
1515
+ display: -ms-flexbox;
1516
+ display: flex;
1517
+ overflow-x: auto;
1518
+ overflow-y: hidden;
1519
+ margin: 0;
1520
+ padding: 0;
1521
+ list-style: none;
1522
+ font-size: 0.95rem;
1523
+ }
1524
+ .tabs--style2 > .tabs__nav li {
1525
+ -webkit-box-flex: 1;
1526
+ -ms-flex: 1;
1527
+ flex: 1;
1528
+ text-align: center;
1529
+ padding: 0.75rem 1rem;
1530
+ white-space: nowrap;
1531
+ border: 1px solid transparent;
1532
+ border-bottom-color: rgba(0, 0, 0, 0.2);
1533
+ border-right-color: rgba(0, 0, 0, 0.05);
1534
+ }
1535
+ .tabs--style2 > .tabs__nav li:last-of-type {
1536
+ border-right-color: transparent;
1537
+ }
1538
+ .tabs--style2 > .tabs__nav li.active {
1539
+ margin: 0 0 0 -1px;
1540
+ font-weight: bold;
1541
+ border-bottom-color: transparent;
1542
+ border-left-color: rgba(0, 0, 0, 0.2);
1543
+ border-right-color: rgba(0, 0, 0, 0.2);
1544
+ }
1545
+ .tabs--style2 > .tabs__nav li.active:first-of-type {
1546
+ border-left-color: transparent;
1547
+ }
1548
+ .tabs--style2 > .tabs__nav li.active:last-of-type {
1549
+ border-right-color: transparent;
1550
+ }
1551
+ .tabs--style1 > .tabs__nav {
1552
+ display: -webkit-box;
1553
+ display: -ms-flexbox;
1554
+ display: flex;
1555
+ list-style: none;
1556
+ margin: 0;
1557
+ padding: 0;
1558
+ text-transform: uppercase;
1559
+ overflow-x: auto;
1560
+ }
1561
+ .tabs--style1 > .tabs__nav .tabs__nav__item {
1562
+ font-size: 0.85rem;
1563
+ padding: 0 0 0.5rem;
1564
+ border-bottom: 2px solid rgba(0, 0, 0, 0.1);
1565
+ font-weight: bold;
1566
+ white-space: nowrap;
1567
+ color: #777;
1568
+ }
1569
+ .tabs--style1 > .tabs__nav .tabs__nav__item:not(:last-of-type) {
1570
+ margin-right: 3rem;
1571
+ }
1572
+ .tabs--style1 > .tabs__nav .tabs__nav__item.active {
1573
+ border-bottom-color: #1cc691;
1574
+ color: #333;
1575
+ }
1576
+
1577
+ .modal {
1578
+ position: fixed;
1579
+ top: 0;
1580
+ left: 0;
1581
+ width: 100%;
1582
+ height: 100%;
1583
+ padding: 1rem;
1584
+ background: rgba(0, 0, 0, 0.5);
1585
+ display: none;
1586
+ overflow-y: auto;
1587
+ z-index: 99999;
1588
+ }
1589
+ .modal.shown {
1590
+ display: -webkit-box;
1591
+ display: -ms-flexbox;
1592
+ display: flex;
1593
+ }
1594
+ .modal__window {
1595
+ margin: auto;
1596
+ background: white;
1597
+ border-radius: 0.5rem;
1598
+ -webkit-box-shadow: 0 0 2rem rgba(0, 0, 0, 0.1);
1599
+ box-shadow: 0 0 2rem rgba(0, 0, 0, 0.1);
1600
+ max-width: 320px;
1601
+ }
1602
+ .modal__window--md {
1603
+ max-width: 640px;
1604
+ }
1605
+ @media (max-width: 767px) {
1606
+ .modal__window--md {
1607
+ max-width: 100%;
1608
+ }
1609
+ }
1610
+
1611
+ .breadcrumb {
1612
+ background-color: rgba(0, 0, 0, 0.035);
1613
+ padding: 1.5rem;
1614
+ margin: 0;
1615
+ display: -webkit-box;
1616
+ display: -ms-flexbox;
1617
+ display: flex;
1618
+ }
1619
+ .breadcrumb li {
1620
+ margin: 0;
1621
+ }
1622
+ .breadcrumb li:not(:last-of-type) {
1623
+ margin-right: 1rem;
1624
+ }
1625
+ .breadcrumb li:not(:last-of-type):after {
1626
+ content: "→";
1627
+ margin-left: 1rem;
1628
+ }
1629
+
1630
+ @-webkit-keyframes spin {
1631
+ from {
1632
+ -webkit-transform: rotate(0);
1633
+ transform: rotate(0);
1634
+ }
1635
+ to {
1636
+ -webkit-transform: rotate(359deg);
1637
+ transform: rotate(359deg);
1638
+ }
1639
+ }
1640
+
1641
+ @keyframes spin {
1642
+ from {
1643
+ -webkit-transform: rotate(0);
1644
+ transform: rotate(0);
1645
+ }
1646
+ to {
1647
+ -webkit-transform: rotate(359deg);
1648
+ transform: rotate(359deg);
1649
+ }
1650
+ }
1651
+ @-webkit-keyframes spin_button {
1652
+ from {
1653
+ -webkit-transform: translate(-50%, -50%) rotate(0);
1654
+ transform: translate(-50%, -50%) rotate(0);
1655
+ }
1656
+ to {
1657
+ -webkit-transform: translate(-50%, -50%) rotate(359deg);
1658
+ transform: translate(-50%, -50%) rotate(359deg);
1659
+ }
1660
+ }
1661
+ @keyframes spin_button {
1662
+ from {
1663
+ -webkit-transform: translate(-50%, -50%) rotate(0);
1664
+ transform: translate(-50%, -50%) rotate(0);
1665
+ }
1666
+ to {
1667
+ -webkit-transform: translate(-50%, -50%) rotate(359deg);
1668
+ transform: translate(-50%, -50%) rotate(359deg);
1669
+ }
1670
+ }
1671
+ .btn-loading {
1672
+ position: relative;
1673
+ }
1674
+ .btn-loading, .btn-loading:hover {
1675
+ color: transparent;
1676
+ }
1677
+ .btn-loading:before {
1678
+ content: "";
1679
+ border: solid 2px transparent;
1680
+ border-top-color: white;
1681
+ border-left-color: white;
1682
+ -webkit-animation: spin_button 0.8s linear infinite;
1683
+ animation: spin_button 0.8s linear infinite;
1684
+ width: 1rem;
1685
+ height: 1rem;
1686
+ border-radius: 50%;
1687
+ display: inline-block;
1688
+ vertical-align: middle;
1689
+ position: absolute;
1690
+ top: 50%;
1691
+ left: 50%;
1692
+ }
1693
+
1694
+ .inline-spinner {
1695
+ border: solid 2px transparent;
1696
+ border-top-color: currentColor;
1697
+ border-left-color: currentColor;
1698
+ -webkit-animation: spin 0.8s linear infinite;
1699
+ animation: spin 0.8s linear infinite;
1700
+ width: 1.5rem;
1701
+ height: 1.5rem;
1702
+ border-radius: 50%;
1703
+ display: inline-block;
1704
+ }
1705
+ .inline-spinner.lg {
1706
+ width: 5rem;
1707
+ height: 5rem;
1708
+ }
1709
+
1710
+ .position-select {
1711
+ position: relative;
1712
+ }
1713
+ .position-select .form-control {
1714
+ overflow: auto;
1715
+ height: auto;
1716
+ resize: vertical;
1717
+ padding: 1rem;
1718
+ border: 1px solid #ddd;
1719
+ border-radius: 0.25rem;
1720
+ position: relative;
1721
+ width: 100%;
1722
+ -webkit-box-sizing: border-box;
1723
+ box-sizing: border-box;
1724
+ -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1725
+ transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1726
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
1727
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
1728
+ }
1729
+ .position-select .form-control.form-control:focus {
1730
+ color: #495057;
1731
+ background-color: #fff;
1732
+ border-color: #76ecc7;
1733
+ outline: 0;
1734
+ border-radius: 0.25rem;
1735
+ outline: 0;
1736
+ -webkit-box-shadow: 0 0 0 0.2rem rgba(28, 198, 145, 0.25);
1737
+ box-shadow: 0 0 0 0.2rem rgba(28, 198, 145, 0.25);
1738
+ }
1739
+ .position-select .overlaybox {
1740
+ display: none;
1741
+ -webkit-box-flex: 0;
1742
+ -ms-flex: 0 0 100%;
1743
+ flex: 0 0 100%;
1744
+ width: 100%;
1745
+ padding: 1rem;
1746
+ }
1747
+ .position-select .position-select-radio {
1748
+ -webkit-appearance: none;
1749
+ -moz-appearance: none;
1750
+ appearance: none;
1751
+ margin: 0;
1752
+ border: 0;
1753
+ padding: 0;
1754
+ outline: 0;
1755
+ background: none;
1756
+ width: 0;
1757
+ height: 0;
1758
+ opacity: 0;
1759
+ visibility: 0;
1760
+ position: absolute;
1761
+ }
1762
+ .position-select .position-select-radio + label {
1763
+ display: block;
1764
+ cursor: pointer;
1765
+ margin: 0;
1766
+ }
1767
+ .position-select:before {
1768
+ content: "";
1769
+ display: block;
1770
+ width: 150px;
1771
+ height: 90px;
1772
+ }
1773
+ .position-select > div {
1774
+ border: 1px solid rgba(0, 0, 0, 0.1);
1775
+ -webkit-box-shadow: 0 2px 1px rgba(0, 0, 0, 0.025);
1776
+ box-shadow: 0 2px 1px rgba(0, 0, 0, 0.025);
1777
+ border-radius: 0.25rem;
1778
+ background-color: white;
1779
+ position: absolute;
1780
+ top: 0;
1781
+ left: 0;
1782
+ display: -webkit-box;
1783
+ display: -ms-flexbox;
1784
+ display: flex;
1785
+ -ms-flex-wrap: wrap;
1786
+ flex-wrap: wrap;
1787
+ }
1788
+ .position-select > div.open {
1789
+ width: 456px;
1790
+ z-index: 2;
1791
+ -webkit-box-shadow: 0 2px 1px rgba(0, 0, 0, 0.025), 0 0 32px rgba(0, 0, 0, 0.05);
1792
+ box-shadow: 0 2px 1px rgba(0, 0, 0, 0.025), 0 0 32px rgba(0, 0, 0, 0.05);
1793
+ }
1794
+ .position-select > div.open .overlaybox {
1795
+ display: block;
1796
+ }
1797
+ @media (max-width: 767px) {
1798
+ .position-select > div.open {
1799
+ width: 300px;
1800
+ display: -webkit-box;
1801
+ display: -ms-flexbox;
1802
+ display: flex;
1803
+ -ms-flex-wrap: wrap;
1804
+ flex-wrap: wrap;
1805
+ }
1806
+ }
1807
+ .position-select > div.open > label {
1808
+ -webkit-box-flex: 0;
1809
+ -ms-flex: 0 0 33.3333333%;
1810
+ flex: 0 0 33.3333333%;
1811
+ max-width: 33.333333%;
1812
+ display: block !important;
1813
+ }
1814
+ .position-select > div.open > label:hover {
1815
+ background-color: rgba(0, 0, 0, 0.025);
1816
+ }
1817
+ .position-select > div.open > label:not(:last-of-type) {
1818
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
1819
+ }
1820
+ .position-select > div.open > .position-select-radio:checked + label {
1821
+ -webkit-box-shadow: inset 0 0 0 1px #1cc691, inset 0 0 0 4px #c9f1e5;
1822
+ box-shadow: inset 0 0 0 1px #1cc691, inset 0 0 0 4px #c9f1e5;
1823
+ }
1824
+ .position-select > div:not(.open) {
1825
+ width: 148px;
1826
+ }
1827
+ .position-select > div:not(.open) .position-select-radio + label {
1828
+ padding-right: 1.5rem;
1829
+ }
1830
+ .position-select > div:not(.open) .position-select-radio + label:after {
1831
+ pointer-events: none;
1832
+ display: inline-block;
1833
+ width: 0;
1834
+ height: 0;
1835
+ margin-left: 0.25em;
1836
+ vertical-align: 0.25em;
1837
+ content: "";
1838
+ border-top: 0.25rem solid;
1839
+ border-right: 0.25rem solid transparent;
1840
+ border-bottom: 0;
1841
+ border-left: 0.25rem solid transparent;
1842
+ position: absolute;
1843
+ top: 50%;
1844
+ right: 0.75rem;
1845
+ -webkit-transform: translateY(-50%);
1846
+ transform: translateY(-50%);
1847
+ opacity: 0.5;
1848
+ }
1849
+ .position-select > div:not(.open) > .position-select-radio:checked + label {
1850
+ -webkit-box-ordinal-group: 0;
1851
+ -ms-flex-order: -1;
1852
+ order: -1;
1853
+ }
1854
+ .position-select > div:not(.open):hover {
1855
+ background-color: rgba(0, 0, 0, 0.025);
1856
+ }
1857
+ .position-select > div > .position-select-radio:not(:checked) + label {
1858
+ display: none;
1859
+ }
1860
+ .position-select > div > .position-select-radio + label {
1861
+ width: 100%;
1862
+ -webkit-transition: display 0.4s ease 0.1s;
1863
+ transition: display 0.4s ease 0.1s;
1864
+ }
1865
+ .position-select > div > .position-select-radio + label > div {
1866
+ display: -webkit-box;
1867
+ display: -ms-flexbox;
1868
+ display: flex;
1869
+ -webkit-box-align: center;
1870
+ -ms-flex-align: center;
1871
+ align-items: center;
1872
+ padding: 0.5rem;
1873
+ position: relative;
1874
+ }
1875
+ .position-select > div > .position-select-radio + label > div > div {
1876
+ -webkit-box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
1877
+ box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
1878
+ border-radius: 0.25rem;
1879
+ overflow: hidden;
1880
+ background-color: rgba(0, 0, 0, 0.05);
1881
+ position: relative;
1882
+ display: -webkit-box;
1883
+ display: -ms-flexbox;
1884
+ display: flex;
1885
+ width: 100%;
1886
+ }
1887
+ .position-select > div > .position-select-radio + label > div > div:after {
1888
+ padding-bottom: 65%;
1889
+ content: "";
1890
+ }
1891
+ .position-select > div > .position-select-radio + label > div > div > span {
1892
+ background-color: rgba(0, 0, 0, 0.45);
1893
+ height: 20px;
1894
+ }
1895
+ .position-select > div > .position-select-radio + label > div > div.center {
1896
+ -webkit-box-align: center !important;
1897
+ -ms-flex-align: center !important;
1898
+ align-items: center !important;
1899
+ -webkit-box-pack: center !important;
1900
+ -ms-flex-pack: center !important;
1901
+ justify-content: center !important;
1902
+ }
1903
+ .position-select > div > .position-select-radio + label > div > div.top {
1904
+ -webkit-box-align: start !important;
1905
+ -ms-flex-align: start !important;
1906
+ align-items: flex-start !important;
1907
+ }
1908
+ .position-select > div > .position-select-radio + label > div > div.bottom {
1909
+ -webkit-box-align: end !important;
1910
+ -ms-flex-align: end !important;
1911
+ align-items: flex-end !important;
1912
+ }
1913
+ .position-select > div > .position-select-radio + label > div > div.left {
1914
+ -webkit-box-pack: start !important;
1915
+ -ms-flex-pack: start !important;
1916
+ justify-content: flex-start !important;
1917
+ }
1918
+ .position-select > div > .position-select-radio + label > div > div.right {
1919
+ -webkit-box-pack: end !important;
1920
+ -ms-flex-pack: end !important;
1921
+ justify-content: flex-end !important;
1922
+ }
1923
+ .position-select > div > .position-select-radio + label > div > div.full span {
1924
+ width: 100%;
1925
+ }
1926
+ .position-select > div > .position-select-radio + label > div > div.float span {
1927
+ width: 30px;
1928
+ margin: 0.5rem;
1929
+ border-radius: 0.25rem;
1930
+ }
1931
+ .position-select > div > .position-select-radio + label > div > div.top.center span, .position-select > div > .position-select-radio + label > div > div.bottom.center span {
1932
+ width: 60px;
1933
+ }
1934
+
1935
+ .list_radar {
1936
+ display: -webkit-box;
1937
+ display: -ms-flexbox;
1938
+ display: flex;
1939
+ -webkit-box-align: center;
1940
+ -ms-flex-align: center;
1941
+ align-items: center;
1942
+ -webkit-box-pack: justify;
1943
+ -ms-flex-pack: justify;
1944
+ justify-content: space-between;
1945
+ list-style: none;
1946
+ text-align: center;
1947
+ padding: 0;
1948
+ }
1949
+ @media (max-width: 768px) {
1950
+ .list_radar {
1951
+ display: block;
1952
+ }
1953
+ }
1954
+ .list_radar__item {
1955
+ display: -webkit-box;
1956
+ display: -ms-flexbox;
1957
+ display: flex;
1958
+ -webkit-box-orient: vertical;
1959
+ -webkit-box-direction: normal;
1960
+ -ms-flex-direction: column;
1961
+ flex-direction: column;
1962
+ -webkit-box-align: center;
1963
+ -ms-flex-align: center;
1964
+ align-items: center;
1965
+ }
1966
+ .list_radar__item figure {
1967
+ position: relative;
1968
+ margin: 0;
1969
+ }
1970
+ .list_radar__item figure:after {
1971
+ content: "";
1972
+ position: absolute;
1973
+ width: 2rem;
1974
+ height: 2rem;
1975
+ border-radius: 2rem;
1976
+ top: 0;
1977
+ right: 0;
1978
+ }
1979
+ .list_radar__item--on figure:after {
1980
+ background: #1cc691;
1981
+ background-image: url("../images/white_checkmark.svg");
1982
+ background-position: center;
1983
+ background-repeat: no-repeat;
1984
+ background-size: 0.7rem;
1985
+ }
1986
+ .list_radar__item--off figure:after {
1987
+ background: #cf7463;
1988
+ background-image: url("../images/white_x.svg");
1989
+ background-position: center;
1990
+ background-repeat: no-repeat;
1991
+ background-size: 0.7rem;
1992
+ }
1993
+
1994
+ .circularBar {
1995
+ --progress-bar-stroke-width: 2;
1996
+ --progress-bar-size: 125px;
1997
+ --progress-bar-color: #78bec7;
1998
+ --progress-bar-stroke-dash: 85;
1999
+ --progress-bar-font-size: 2rem;
2000
+ display: inline-block;
2001
+ font-family: sans-serif;
2002
+ position: relative;
2003
+ -webkit-user-select: none;
2004
+ -moz-user-select: none;
2005
+ -ms-user-select: none;
2006
+ user-select: none;
2007
+ }
2008
+ .circularBar.lg {
2009
+ --progress-bar-stroke-width: 1;
2010
+ --progress-bar-size: 150px;
2011
+ --progress-bar-stroke-dash: 84;
2012
+ }
2013
+ .circularBar.sm {
2014
+ --progress-bar-stroke-width: 3;
2015
+ --progress-bar-size: 75px;
2016
+ --progress-bar-stroke-dash: 84;
2017
+ --progress-bar-font-size: 1.25rem;
2018
+ }
2019
+ .circularBar span {
2020
+ position: absolute;
2021
+ top: calc(50% - 2px);
2022
+ left: 50%;
2023
+ -webkit-transform: translate(-50%, -50%);
2024
+ transform: translate(-50%, -50%);
2025
+ font-size: var(--progress-bar-font-size);
2026
+ font-weight: bold;
2027
+ line-height: 0;
2028
+ }
2029
+ .circularBar span b {
2030
+ font-size: 0.65em;
2031
+ }
2032
+ .circularBar svg {
2033
+ height: var(--progress-bar-size);
2034
+ width: var(--progress-bar-size);
2035
+ -webkit-transform: rotate(-90deg);
2036
+ transform: rotate(-90deg);
2037
+ }
2038
+ .circularBar circle {
2039
+ fill: none;
2040
+ stroke-width: var(--progress-bar-stroke-width);
2041
+ }
2042
+ .circularBar .circle1 {
2043
+ stroke: #e2eff0;
2044
+ }
2045
+ .circularBar .circle2 {
2046
+ stroke: currentColor;
2047
+ stroke-dasharray: var(--progress-bar-stroke-dash);
2048
+ stroke-dashoffset: var(--progress-bar-stroke-dash);
2049
+ stroke-linecap: round;
2050
+ -webkit-transition: stroke-dashoffset 1s ease-in-out;
2051
+ transition: stroke-dashoffset 1s ease-in-out;
2052
+ }
2053
+
2054
+ .siteinfo--icon {
2055
+ background-color: rgba(0, 0, 0, 0.05);
2056
+ height: 5rem;
2057
+ width: 5rem;
2058
+ border-radius: 0.25rem;
2059
+ display: -webkit-box;
2060
+ display: -ms-flexbox;
2061
+ display: flex;
2062
+ -webkit-box-pack: center;
2063
+ -ms-flex-pack: center;
2064
+ justify-content: center;
2065
+ margin-right: 1rem;
2066
+ }
2067
+ .siteinfo--icon img {
2068
+ width: 50%;
2069
+ }
2070
+ @media (max-width: 767px) {
2071
+ .siteinfo--icon {
2072
+ margin: 0 auto 1rem auto;
2073
+ }
2074
+ }
2075
+
2076
+ .sitenav {
2077
+ background-color: rgba(0, 0, 0, 0.025);
2078
+ }
2079
+
2080
+ @media (min-width: 768px) {
2081
+ .configure-services-cards {
2082
+ display: -webkit-box;
2083
+ display: -ms-flexbox;
2084
+ display: flex;
2085
+ -ms-flex-wrap: wrap;
2086
+ flex-wrap: wrap;
2087
+ -webkit-box-pack: center;
2088
+ -ms-flex-pack: center;
2089
+ justify-content: center;
2090
+ max-width: 800px;
2091
+ margin: 0 auto;
2092
+ }
2093
+ }
2094
+ .configure-services-cards .service-card {
2095
+ display: -webkit-box;
2096
+ display: -ms-flexbox;
2097
+ display: flex;
2098
+ -webkit-box-orient: vertical;
2099
+ -webkit-box-direction: normal;
2100
+ -ms-flex-direction: column;
2101
+ flex-direction: column;
2102
+ border: 1px solid rgba(151, 151, 151, 0.28);
2103
+ border-radius: 0.35rem;
2104
+ margin: 0.5rem;
2105
+ -ms-flex-negative: 0;
2106
+ flex-shrink: 0;
2107
+ -webkit-box-shadow: 0 0 16px rgba(0, 0, 0, 0.06);
2108
+ box-shadow: 0 0 16px rgba(0, 0, 0, 0.06);
2109
+ }
2110
+ @media (min-width: 768px) {
2111
+ .configure-services-cards .service-card {
2112
+ max-width: calc(50% - 1rem);
2113
+ -webkit-box-flex: 0;
2114
+ -ms-flex: 0 0 calc(50% - 1rem);
2115
+ flex: 0 0 calc(50% - 1rem);
2116
+ }
2117
+ }
2118
+
2119
+ .service-on {
2120
+ background-color: rgba(0, 0, 0, 0.04);
2121
+ border-radius: 0.25rem;
2122
+ text-align: center;
2123
+ margin: 1rem;
2124
+ padding: 1rem;
2125
+ white-space: nowrap;
2126
+ overflow: hidden;
2127
+ text-overflow: ellipsis;
2128
+ }
2129
+ .service-on li {
2130
+ display: inline;
2131
+ margin: 0;
2132
+ }
2133
+
2134
+ .iubenda-consent-forms table {
2135
+ border: 1px solid #c3c4c7;
2136
+ }
2137
+
2138
+ .consent-forms-tabs {
2139
+ display: -webkit-box;
2140
+ display: -ms-flexbox;
2141
+ display: flex;
2142
+ }
2143
+ .consent-forms-tabs li {
2144
+ margin-right: 0.5rem;
2145
+ }
2146
+ .consent-forms-tabs--current {
2147
+ font-weight: bold;
2148
+ }
2149
+
2150
+ /* CUSTOME SETTINGS TABS*/
2151
+ .custom-scripts {
2152
+ border: 1px solid rgba(0, 0, 0, 0.2);
2153
+ border-radius: 0.35rem;
2154
+ }
2155
+ .custom-scripts .tabs__nav {
2156
+ display: -webkit-box;
2157
+ display: -ms-flexbox;
2158
+ display: flex;
2159
+ overflow-x: auto;
2160
+ overflow-y: hidden;
2161
+ margin: 0;
2162
+ padding: 0;
2163
+ list-style: none;
2164
+ font-size: 0.95rem;
2165
+ }
2166
+ .custom-scripts .tabs__nav li {
2167
+ -webkit-box-flex: 1;
2168
+ -ms-flex: 1;
2169
+ flex: 1;
2170
+ text-align: center;
2171
+ padding: 0.75rem 1rem;
2172
+ white-space: nowrap;
2173
+ border: 1px solid transparent;
2174
+ border-bottom-color: rgba(0, 0, 0, 0.2);
2175
+ border-right-color: rgba(0, 0, 0, 0.05);
2176
+ }
2177
+ .custom-scripts .tabs__nav li:last-of-type {
2178
+ border-right-color: transparent;
2179
+ }
2180
+ .custom-scripts .tabs__nav li.active {
2181
+ margin: 0 -1px;
2182
+ font-weight: bold;
2183
+ border-bottom-color: transparent;
2184
+ border-left-color: rgba(0, 0, 0, 0.2);
2185
+ border-right-color: rgba(0, 0, 0, 0.2);
2186
+ }
2187
+ .custom-scripts .tabs__nav li.active:first-of-type {
2188
+ border-left-color: transparent;
2189
+ }
2190
+ .custom-scripts .tabs__nav li.active:last-of-type {
2191
+ border-right-color: transparent;
2192
+ }
2193
+
2194
+ .modalSync img {
2195
+ width: 13rem;
2196
+ height: auto;
2197
+ }
2198
+
2199
+ .modalAlmostThere img {
2200
+ width: 90%;
2201
+ height: auto;
2202
+ margin-right: auto;
2203
+ margin-left: auto;
2204
+ }
2205
+
2206
+ .tooltip-icon {
2207
+ width: 1.25rem;
2208
+ height: 1.25rem;
2209
+ display: -webkit-box;
2210
+ display: -ms-flexbox;
2211
+ display: flex;
2212
+ place-items: center;
2213
+ line-height: 0.25rem;
2214
+ background-color: #c8c8c8;
2215
+ color: #fff;
2216
+ border-radius: 50%;
2217
+ font-size: 0.75rem;
2218
+ display: -webkit-inline-box;
2219
+ display: -ms-inline-flexbox;
2220
+ display: inline-flex;
2221
+ -webkit-box-pack: center;
2222
+ -ms-flex-pack: center;
2223
+ justify-content: center;
2224
+ font-weight: bold;
2225
+ }
2226
+
2227
+ .steps {
2228
+ border-radius: 50%;
2229
+ border: 1px solid #979797;
2230
+ margin: 0;
2231
+ width: 2rem;
2232
+ height: 2rem;
2233
+ display: -webkit-box;
2234
+ display: -ms-flexbox;
2235
+ display: flex;
2236
+ -webkit-box-pack: center;
2237
+ -ms-flex-pack: center;
2238
+ justify-content: center;
2239
+ -webkit-box-align: center;
2240
+ -ms-flex-align: center;
2241
+ align-items: center;
2242
+ }
2243
+
2244
+ .main-box {
2245
+ width: 90%;
2246
+ max-width: 1140px;
2247
+ margin: 0 auto;
2248
+ border: 1px solid rgba(151, 151, 151, 0.28);
2249
+ border-radius: 0.4rem;
2250
+ background: #fff;
2251
+ }
2252
+ .main-box__bg {
2253
+ background: #fff;
2254
+ background-image: url("../images/welcome_screen_bg.svg");
2255
+ background-position: 97% -14%;
2256
+ background-repeat: no-repeat;
2257
+ }
2258
+
2259
+ .subOptions {
2260
+ border-left: 1px solid rgba(0, 0, 0, 0.1);
2261
+ padding: 0.5rem 0 0.5rem 1.5rem;
2262
+ margin-left: 1rem;
2263
+ }
2264
+
2265
+ .link-helper {
2266
+ display: -webkit-inline-box;
2267
+ display: -ms-inline-flexbox;
2268
+ display: inline-flex;
2269
+ -webkit-box-align: center;
2270
+ -ms-flex-align: center;
2271
+ align-items: center;
2272
+ }
2273
+
2274
+ .link:hover {
2275
+ text-decoration: underline;
2276
+ }
2277
+
2278
+ .link-underline {
2279
+ text-decoration: underline;
2280
+ }
2281
+
2282
+ .hidden {
2283
+ display: none;
2284
+ }
2285
+
2286
+ @media (max-width: 767px) {
2287
+ .scrollable {
2288
+ overflow-x: auto;
2289
+ }
2290
+ }
2291
+ .inactive {
2292
+ pointer-events: none;
2293
+ opacity: 0.6;
2294
+ }
2295
+ #iubenda-header {
2296
+ margin-bottom: 30px;
2297
+ }
2298
+ .iubenda-notice {
2299
+ border-left-color: #1CC691;
2300
+ padding-left: 0;
2301
+ display: flex;
2302
+ justify-content: flex-start;
2303
+ align-items: center;
2304
+ }
2305
+ .iubenda-notice::before {
2306
+ display: inline-block;
2307
+ content: '';
2308
+ height: 49px;
2309
+ width: 22px;
2310
+ margin: 1em 2em;
2311
+ background-size: contain;
2312
+ background-position: center center;
2313
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMjFweCIgaGVpZ2h0PSI0OTBweCIgdmlld0JveD0iMCAwIDIyMSA0OTAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+aXViZW5kYSB2ZWN0b3IgbG9nb192M19vbmx5X2lfZ3JlZW48L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJpdWJlbmRhLXZlY3Rvci1sb2dvX3YzX29ubHlfaV9ncmVlbiIgZmlsbD0iIzFDQzY5MSIgZmlsbC1ydWxlPSJub256ZXJvIj4gICAgICAgICAgICA8cGF0aCBkPSJNMjIwLjYsMTA4LjQgQzIyMC42LDEzNSAyMTAuOCwxNTkuMyAxOTQuNSwxNzguMSBMMjE3LjksNDg5LjQgTDguNSw0ODkuNCBMMzEuMiwxODMuNSBDMTEuOSwxNjQuMiAwLDEzNy43IDAsMTA4LjQgQzAsNDguNyA0OS40LDAuNCAxMTAuMywwLjQgQzE3MS4yLDAuNCAyMjAuNiw0OC43IDIyMC42LDEwOC40IFogTTExMC4zLDEzMyBDMTI1LDEzMyAxMzYuOCwxMjEuMiAxMzYuOCwxMDYuNyBDMTM2LjgsOTIuMiAxMjQuOSw4MC41IDExMC4zLDgwLjUgQzk1LjYsODAuNSA4My44LDkyLjMgODMuOCwxMDYuNyBDODMuOCwxMjEuMyA5NS42LDEzMyAxMTAuMywxMzMgWiBNMTMxLjIsMjI3IEw5NC45LDI2My4zIEw5NC45LDQwMy44IEwxMzEuMiw0MDMuOCBMMTMxLjIsMjI3IFoiIGlkPSJTaGFwZSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+);
2314
+ }
2315
+ .iubenda-notice .notice-question {
2316
+ margin-bottom: 5px;
2317
+ display: block;
2318
+ }
2319
+ .iubenda-notice .notice-reply {
2320
+ margin-top: 0;
2321
+ }
2322
+ .iubenda-notice .step-2 {
2323
+ display: none;
2324
+ }
2325
+ .iubenda-notice .reply-yes {
2326
+ margin-right: 10px;
2327
+ }
2328
+ .iubenda-notice .reply-yes:before,
2329
+ .iubenda-notice .reply-no:before {
2330
+ font-family: dashicons;
2331
+ display: inline-block;
2332
+ line-height: 1;
2333
+ font-weight: 400;
2334
+ font-style: normal;
2335
+ speak: none;
2336
+ text-decoration: inherit;
2337
+ text-transform: none;
2338
+ text-rendering: auto;
2339
+ -webkit-font-smoothing: antialiased;
2340
+ -moz-osx-font-smoothing: grayscale;
2341
+ width: 20px;
2342
+ height: 20px;
2343
+ font-size: 20px;
2344
+ vertical-align: top;
2345
+ text-align: center;
2346
+ transition: color .1s ease-in;
2347
+ text-decoration: none;
2348
+ }
2349
+ .iubenda-notice .reply-yes:before {
2350
+ content: "\f147";
2351
+ }
2352
+ .iubenda-notice .reply-no:before {
2353
+ content: "\f335";
2354
+ }
assets/fonts/HKGrotesk-Bold.eot ADDED
Binary file
assets/fonts/HKGrotesk-Bold.woff ADDED
Binary file
assets/fonts/HKGrotesk-Bold.woff2 ADDED
Binary file
assets/fonts/HKGrotesk-Regular.eot ADDED
Binary file
assets/fonts/HKGrotesk-Regular.woff ADDED
Binary file
assets/fonts/HKGrotesk-Regular.woff2 ADDED
Binary file
assets/images/banner_failure.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="45" viewBox="0 0 45 45" width="45" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" stroke="#cf7463"><circle cx="22.5" cy="22.5" r="21.5"/><g stroke-linecap="round" stroke-linejoin="round"><path d="m22.5 13.5v11"/><path d="m22.5 28.5v2"/></g></g></svg>
assets/images/banner_success.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="45" viewBox="0 0 45 45" width="45" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" stroke="#1cc691" transform="translate(1 1)"><circle cx="21.5" cy="21.5" r="21.5"/><path d="m11 21.1543779 7.8986384 7.8456221 15.1013616-15"/></g></svg>
assets/images/checkboxes/button_style_dark.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="38" viewBox="0 0 194 38" width="194" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect fill="#454141" height="36" rx="6" stroke="#000" stroke-opacity=".233894" stroke-width="1.5" width="192" x=".75" y=".75"/><g fill="#1cc691" transform="translate(15 8)"><circle cx="5.328" cy="5.328" r="5.328"/><path d="m3.33 1.11h3.996l2.30052444 19.536h-8.59704888z"/></g><text fill="#fff" font-family="HelveticaNeue-Bold, Helvetica Neue" font-size="19.5" font-weight="bold"><tspan x="37.5" y="25">Privacy policy</tspan></text></g></svg>
assets/images/checkboxes/button_style_light.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="38" viewBox="0 0 194 38" width="194" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect fill="#fff" height="36" rx="6" stroke="#979797" stroke-width="1.5" width="192" x=".75" y=".75"/><g fill="#1cc691" transform="translate(15 8)"><circle cx="5.328" cy="5.328" r="5.328"/><path d="m3.33 1.11h3.996l2.30052444 19.536h-8.59704888z"/></g><text fill="#3f3e3e" font-family="HelveticaNeue-Bold, Helvetica Neue" font-size="19.5" font-weight="bold"><tspan x="38.5" y="25">Privacy policy</tspan></text></g></svg>
assets/images/checkboxes/cons_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="35" viewBox="0 0 34 35" width="34" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" stroke="#7e818d" stroke-width=".94" transform="translate(1.3008 1)"><path d="m0 25.563551v2.1463524c0 2.677675 5.23114681 4.8491035 12.3464727 4.8491035 2.8181842 0 5.3407908-.3406392 7.3598622-.9184546.4732992-.1354482.9189291-.2839292 1.3342109-.4441104"/><path d="m0 18.5826026v3.1113008c0 2.677675 5.23114681 4.8491035 12.3464727 4.8491035 1.8738531 0 3.6170278-.1506007 5.1683914-.4213874" fill="#fff"/><path d="m0 12.6738342v2.5865796c0 2.5989198 5.23114681 4.7064828 12.3464727 4.7064828 7.1153259 0 12.3464728-2.107563 12.3464728-4.7064828v-2.5865796"/><path d="m0 4.56386207v4.70648276c0 2.59891977 5.23114681 4.70648277 12.3464727 4.70648277 7.1153259 0 12.3464728-2.107563 12.3464728-4.70648277v-4.70648276" fill="#ededed"/><path d="m12.3464727 9.41296552c7.1153259 0 12.3464728-2.10756298 12.3464728-4.70648276s-5.2311469-4.70648276-12.3464728-4.70648276c-7.11532589 0-12.3464727 2.10756298-12.3464727 4.70648276s5.23114681 4.70648276 12.3464727 4.70648276z" fill="#ededed"/><circle cx="25.574543" cy="24.972943" fill="#d2ecfe" r="5.721743"/><circle cx="25.574543" cy="24.972943" r="5.721743"/><path d="m27.8577432 25.5710401h-4.3752727l.0314356-2.4064" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -9.497168 28.368937)"/></g></svg>
assets/images/checkboxes/cs_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="36" viewBox="0 0 40 36" width="40" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(1.3008 1)"><g stroke="#7e818d"><path d="m6.24843636 27.2700267h-6.24843636v-27.2700267h36.6976v27.2700267h-6.6176" fill="#fff" stroke-linejoin="round" stroke-width=".94"/><path d="m0 4.8128h36.6976" stroke-linejoin="round" stroke-width=".94"/><path d="m2.4064 2.4064h1.668073" stroke-linejoin="round" stroke-width=".94"/><path d="m5.4144 2.4064h1.668073" stroke-linejoin="round" stroke-width=".94"/><path d="m8.4224 2.4064h1.668073" stroke-linejoin="round" stroke-width=".94"/></g><path d="m1.8048 6.6176h33.088v7.2192h-33.088z" fill="#efefef"/><g stroke="#bdbdbd" stroke-linecap="square" stroke-width=".94" transform="translate(29.4784 9.024)"><path d="m.3008.3008 1.8048 1.8048"/><path d="m.3008.3008 1.8048 1.8048" transform="matrix(1 0 0 -1 0 2.4064)"/></g><g stroke="#7e818d" stroke-width=".94" transform="translate(9.6256 16.8448)"><path d="m16.116112 4.099904c-.152656-.261696-.43616-.45804069-.7415447-.50165669-.3270473-.04354331-.6323593.04368869-.8722473.23996069-.3926167.34885531-.894128.523392-1.41752.523392-1.19944 0-2.1808-.98136-2.1808-2.1808 0-.21815269.0436887-.45804069.10904-.65424.0873047-.305312.0436887-.63250469-.10904-.89420069-.1745367-.283504-.4580407-.4580407-.7632073-.523392-.4580407-.065424-.93788939-.10896731-1.4175927-.10896731-4.81964069 0-8.7232 3.90355931-8.7232 8.7232 0 4.8194953 3.90355931 8.7232 8.7232 8.7232 4.8196407 0 8.7232-3.9037047 8.7232-8.7232 0-1.6356-.4580407-3.22765669-1.330288-4.623296z" fill="#d2ecfe" fill-rule="nonzero"/><path d="m16.116112 4.099904c-.152656-.261696-.43616-.45804069-.7415447-.50165669-.3270473-.04354331-.6323593.04368869-.8722473.23996069-.3926167.34885531-.894128.523392-1.41752.523392-1.19944 0-2.1808-.98136-2.1808-2.1808 0-.21815269.0436887-.45804069.10904-.65424.0873047-.305312.0436887-.63250469-.10904-.89420069-.1745367-.283504-.4580407-.4580407-.7632073-.523392-.4580407-.065424-.93788939-.10896731-1.4175927-.10896731-4.81964069 0-8.7232 3.90355931-8.7232 8.7232 0 4.8194953 3.90355931 8.7232 8.7232 8.7232 4.8196407 0 8.7232-3.9037047 8.7232-8.7232 0-1.6356-.4580407-3.22765669-1.330288-4.623296z" fill-rule="nonzero"/><path d="m11.4304 9.6256h-4.8128l.03457912-1.8048" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -3.458874 10.02882)"/></g></g></svg>
assets/images/checkboxes/eu_only_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="28" viewBox="0 0 30 28" width="30" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m4.5 5.5h25.5v18h-25.5z" fill="#bcbcbc" fill-opacity=".1"/><path d="m13.5 7a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm0 10.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5zm4.5-6a.75.75 0 1 0 1.5 0 .75.75 0 0 0 -1.5 0zm-10.5 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0 -1.5 0zm9.182 3.182a.75.75 0 1 0 1.06 1.06.75.75 0 0 0 -1.06-1.06zm-7.425-7.425a.75.75 0 1 0 1.061 1.061.75.75 0 0 0 -1.06-1.06zm1.061 7.425a.75.75 0 1 0 -1.06 1.06.75.75 0 0 0 1.06-1.06zm7.425-7.425a.75.75 0 1 0 -1.061 1.061.75.75 0 0 0 1.06-1.06z" fill="#333"/><g stroke="#333" stroke-linecap="round" stroke-linejoin="round"><path d="m.75 2.5h25.391v18h-25.391z"/><path d="m.75 1v26.027" fill="#d8d8d8"/></g></g></svg>
assets/images/checkboxes/pp_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="41" viewBox="0 0 35 41" width="35" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m19.0034824 25.2672v-3.9895579c0-2.4478154 1.9962574-4.4328421 4.4589176-4.4328421s4.4589176 1.9850267 4.4589176 4.4328421v3.9895579"/><filter id="b" height="158.7%" width="155.4%" x="-27.7%" y="-29.3%"><feMorphology in="SourceAlpha" operator="dilate" radius="1.47" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feMorphology in="SourceAlpha" operator="erode" radius="2" result="shadowInner"/><feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"/><feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter></defs><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><path d="m28.8459487 4.22139661h4.2420513v-.84427932c0-1.86501302-1.5195028-3.37711729-3.393641-3.37711729h-9.3325128" fill="#d8d8d8" stroke="#7e818d" stroke-width=".94"/><path d="m11.9132253 32.0826142h-11.9132253v-28.70549691c0-1.86501302 1.51950277-3.37711729 3.39364103-3.37711729h26.75546587c-2.0404267 0-3.848389 1.45553755-3.848389 3.4826522v10.5300274m0 18.0699346h-5.0904615" fill="#fff" stroke="#7e818d" stroke-width=".94"/><g stroke-linejoin="round"><use fill="#000" filter="url(#b)" xlink:href="#a"/><use stroke="#7e818d" stroke-width=".94" xlink:href="#a"/></g><g stroke="#7e818d" stroke-width=".94"><path d="m31.8848 38.0054261c0 .6064128-.4851302 1.0985739-1.08288 1.0985739h-14.07744c-.5977498 0-1.08288-.4921611-1.08288-1.0985739v-10.4364522c0-.6064128.4851302-1.0985739 1.08288-1.0985739h14.07744c.5977498 0 1.08288.4921611 1.08288 1.0985739z" fill="#d2ecfe" stroke-linejoin="round"/><path d="m31.8848 38.0054261c0 .6064128-.4851302 1.0985739-1.08288 1.0985739h-14.07744c-.5977498 0-1.08288-.4921611-1.08288-1.0985739v-10.4364522c0-.6064128.4851302-1.0985739 1.08288-1.0985739h14.07744c.5977498 0 1.08288.4921611 1.08288 1.0985739z" stroke-linejoin="round"/><path d="m23.2580881 29.5403052c-.7465194.1832499-1.3540535.8174054-1.535682 1.6020479-.2432242 1.0484113.2226923 2.0007552.9876378 2.4705412v1.9741006c0 .613054.4717076 1.1106051 1.0529187 1.1106051.5817376 0 1.0529187-.4975511 1.0529187-1.1106051v-1.9741006c.6270131-.3848247 1.0529187-1.0933908 1.0529187-1.9130174 0-1.4004731-1.2287561-2.4983062-2.6107119-2.1595717z" fill="#fff" stroke-linejoin="round"/><path d="m4.242051 8.442793h17.816616"/><path d="m4.242051 11.819911h17.816616"/><path d="m4.242051 15.197028h11.029334"/><path d="m6.787282 25.32838h4.242051"/><path d="m4.242051 25.32838h1.696821"/></g></g></svg>
assets/images/checkboxes/tc_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="40" viewBox="0 0 35 40" width="35" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" stroke="#7e818d" stroke-width=".94" transform="translate(1 1)"><path d="m28.8459487 4.22139661h4.2420513v-.84427932c0-1.86501302-1.5195028-3.37711729-3.393641-3.37711729h-9.3325128" fill="#d8d8d8"/><path d="m11.9985445 32.0826142h-11.9985445v-28.70549691c0-1.86501302 1.51950277-3.37711729 3.39364103-3.37711729h26.75546587c-2.0404267 0-3.848389 1.45553755-3.848389 3.4826522v10.5300274m0 18.0699346h-5.0904615" fill="#fff"/><path d="m4.242051 8.442793h17.816616"/><path d="m4.242051 11.819911h17.816616"/><path d="m4.242051 15.197028h11.029334"/><path d="m6.787282 25.32838h4.242051"/><path d="m4.242051 25.32838h1.696821"/><g stroke-linejoin="round"><path d="m23.4672761 17.4464-8.4272761 3.5583699v8.4511286c0 3.9733649 7.9547352 8.3199138 8.4224 8.4449015.4681081-.1249877 8.4224-4.7753325 8.4224-8.0001052v-8.8959249z" fill="#d2ecfe"/><path d="m23.4672761 17.4464-8.4272761 3.5583699v8.4511286c0 3.9733649 7.9547352 8.3199138 8.4224 8.4449015.4681081-.1249877 8.4224-4.7753325 8.4224-8.0001052v-8.8959249z"/><path d="m19.8528 28.0680483 2.4691351 2.6135517 5.9532649-7.2192"/></g></g></svg>
assets/images/checkboxes/worldwide.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="30" viewBox="0 0 32 30" width="32" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(1 1.632)"><circle cx="18" cy="14.368" fill="#bcbcbc" fill-opacity=".1" r="13"/><g stroke="#333"><circle cx="13" cy="13.368" r="13"/><path d="m17.545 4.368h-3.409l-2.045 1.715v1.143h-2.046l-2.045 1.142v1.143h3.409l.682.572h1.364l1.363 1.143h2.727l1.364 1.142 1.364-1.142h2.727m-7.5 4.017h-1.25l-1.875-1.875h-2.5l-1.875 1.875 1.25 3.125h1.875l1.25 1.25v3.125l.625.625h1.25l1.875-1.875v-1.875l1.875-1.875z"/></g></g></svg>
assets/images/iubenda_logo.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="170" height="62" viewBox="0 0 170 62"><title>Group 56</title><g fill="none" fill-rule="evenodd"><path fill="#1CC691" d="M13.665 0c7.55 0 13.666 6.093 13.666 13.615 0 3.35-1.213 6.416-3.233 8.79L27 61.64H1.055l2.813-38.55A13.509 13.509 0 0 1 0 13.616C0 6.093 6.116 0 13.665 0zm2.595 28.552l-4.497 4.498v17.795h4.497V28.552zM13.665 10.1c-1.815 0-3.286 1.481-3.286 3.309 0 1.827 1.471 3.308 3.286 3.308s3.287-1.481 3.287-3.308c0-1.828-1.472-3.309-3.287-3.309z"/><g fill="#5A5A5A" transform="translate(43.238 18.109)"><path d="M23.293 24.622c-1.754 1.903-3.474 3.101-4.395 3.593a6.13 6.13 0 01-2.926.738c-1.146 0-2.14-.332-2.98-.996a5.148 5.148 0 01-1.754-2.561c-.327-1.044-.491-2.521-.491-4.43v-7.494c0-.013 0-.025.002-.038v-1.103c0-.217 0-1.164-.588-1.455-.089-.045-.248-.08-.478-.106a.347.347 0 01-.307-.344l-.007-1a.347.347 0 01.344-.35h3.764c.541 0 .98.442.98.987v5.134h-.003v6.35c0 1.91.331 3.163.994 3.76.662.596 1.462.894 2.4.894.64 0 1.366-.201 2.177-.604.81-.402 2.157-1.17 3.273-2.301l.003-.968h.002l.012-9.115v-.882c0-.217 0-1.164-.58-1.455-.088-.044-.242-.08-.463-.105a.347.347 0 01-.306-.344l-.007-1a.347.347 0 01.344-.351H26.012c.536 0 .97.437.97.976v3.307a.55.55 0 01.004.068v6.823c0 1.58-.001 3.035-.004 4.363h-.004l.004.513c0 .217-.025 1.256.557 1.548.088.045.243.08.466.106.174.02.305.167.306.343l.007 1.004a.347.347 0 01-.344.35H24.253a.972.972 0 01-.968-.975V27.5l.006-1.859h-.004l.006-1.018zM30.778 5.88h-.002V3.31c0-.208 0-1.118-.565-1.399a1.13 1.13 0 00-.226-.08.348.348 0 01-.261-.335L29.717.53a.347.347 0 01.344-.35H33.403c.521 0 .943.424.943.949v.001L34.34 6.07v6.344c1.913-2.642 3.977-3.963 6.192-3.963 2.028 0 3.797.86 5.307 2.581 1.51 1.721 2.266 4.074 2.266 7.06 0 3.484-1.165 6.29-3.495 8.419-2 1.828-4.229 2.742-6.688 2.742-1.151 0-2.32-.207-3.506-.621-1.015-.355-2.047-.86-3.099-1.517a1.145 1.145 0 01-.536-.971V7.234l-.002-1.354zm3.894 19.956c.63.562 1.278.997 1.943 1.307a5.654 5.654 0 002.406.546c1.309 0 2.528-.714 3.657-2.142 1.129-1.429 1.693-3.507 1.693-6.235 0-2.513-.564-4.445-1.693-5.795-1.13-1.35-2.413-2.024-3.851-2.024-.763 0-1.525.193-2.287.578-.505.251-1.132.722-1.88 1.413a.996.996 0 00-.32.732V25.09c0 .285.12.556.332.745zM73.484 22.502V13.96c1.692-1.827 4.132-2.74 5.84-2.74 1.104 0 1.89.396 2.356 1.19.466.795.699 2.07.699 3.826v6.268h-.006v4.992c0 .524.421.948.941.948h2.62c.217 0 .493-.003.826-.009a.347.347 0 00.34-.35l-.006-.962a.348.348 0 00-.294-.342c-.13-.02-.23-.048-.303-.084-.564-.283-.564-1.202-.564-1.412V22.69h-.003v-6.793c0-1.742-.158-3.035-.474-3.879-.459-1.208-1.076-2.076-1.85-2.603-.775-.527-1.7-.79-2.777-.79-1.969 0-4.772 1.204-6.931 3.614l-.02.022a.225.225 0 01-.394-.152v-.761s0 .002-.002.003v-1.39a.936.936 0 00-.932-.939H69.266a.347.347 0 00-.343.35l.006.966a.348.348 0 00.257.334c.08.022.151.048.212.078.558.28.558 1.19.558 1.397v.045c-.005.193-.004.405 0 .62v1.9h.003c-.01.704-.026 1.483-.026 2.26v8.304c0 .209 0 1.126-.563 1.408a1.412 1.412 0 01-.418.1.347.347 0 00-.303.343l-.006.949a.347.347 0 00.343.35h3.559c.518 0 .939-.423.939-.945v-4.98zM123.322 23.683v1.296a17.107 17.107 0 00.01.27c.04.594.225.974.553 1.138.067.034.154.063.259.086a.348.348 0 01.273.338l.006.968a.347.347 0 01-.344.35H120.71a.942.942 0 01-.94-.945v-1.846c-2.028 1.585-3.301 2.501-3.819 2.749a5.785 5.785 0 01-2.482.545c-1.367 0-2.493-.473-3.378-1.418-.884-.945-1.327-2.189-1.327-3.73 0-.975.216-1.819.648-2.532.59-.988 1.475-2.118 3.075-2.792 1.6-.674 2.968-.828 7.283-1.815v-1.757c-.017-1.866-.314-3.77-3.388-3.582-2.154.132-4.134.817-5.94 2.056a.345.345 0 01-.542-.287v-1.14c0-.6.115-.994.344-1.18 1.271-1.03 4.41-2.26 7.47-2.052 3.397.23 4.618 1.656 5.23 3.831.186.664.388 1.15.388 3.084v5.962c0 .837-.003 1.638-.01 2.403zm-3.552-5.838c-2.672.552-4.21.895-4.612 1.03-1.49.503-2.671 1.076-2.768 3.583-.04 1.046.31 1.916.928 2.607.619.69 1.33 1.036 2.137 1.036 1 0 2.29-.76 3.868-1.979a1.15 1.15 0 00.447-.91v-5.367zM105.585 25.185v.009c0 .203 0 1.092.546 1.366.06.03.133.056.217.078a.348.348 0 01.263.335l.005.927a.347.347 0 01-.343.35h-3.222a.914.914 0 01-.91-.917v-.899l-.01.004c-.935 1.003-1.849 1.722-2.742 2.16a6.486 6.486 0 01-2.89.655c-2.093 0-3.921-.9-5.484-2.697-1.563-1.798-2.345-4.108-2.345-6.93 0-2.823.865-5.405 2.596-7.747 1.73-2.343 3.957-3.514 6.678-3.514 1.689 0 3.085.552 4.187 1.655V3.14c0-.209 0-1.122-.547-1.404a1.097 1.097 0 00-.19-.075.348.348 0 01-.25-.332L101.14.35a.347.347 0 01.343-.35h3.19c.505 0 .914.412.914.92v24.265zm-5.872-13.75c-.69-.408-1.364-.613-2.02-.613-1.228 0-2.347.531-3.35 1.566-1.103 1.14-1.842 2.674-1.842 5.54 0 2.894.614 5.11 1.843 6.65 1.228 1.541 2.595 2.311 4.103 2.311 1.076 0 2.121-.468 3.137-1.403a1.7 1.7 0 00.547-1.25v-8.55c0-1.748-.92-3.366-2.418-4.251zM52.081 26.673c-1.562-1.785-2.374-4.639-2.374-7.47 0-2.99.923-5.725 2.599-7.7 1.745-2.057 4.132-3.145 6.901-3.145 2.348 0 4.138.807 5.32 2.398 1.102 1.484 1.66 3.608 1.66 6.313 0 .327-.019.783-.058 1.368a.694.694 0 01-.69.65H53.413a.2.2 0 00-.2.203c.042 2.222.743 4.1 2.03 5.432 1.264 1.309 2.998 2 5.014 2 1.504 0 3.476-.396 4.998-.862a.405.405 0 01.51.494l-.205.792c-.075.29-.272.531-.54.662-1.502.738-3.753 1.445-6.065 1.445-2.809 0-5.218-.689-6.874-2.58zm.998-10.159a.173.173 0 00.054.142c.038.038.09.06.146.06h9.658c.103 0 .19-.074.2-.17.11-1.018.153-2.863-1.352-4.431-.743-.774-1.64-1.166-3.365-1.166-3.008 0-5.007 2.991-5.341 5.565z"/><path d="M82.386 22.618v2.619c0 .212 0 1.14-.56 1.426a.533.533 0 01-.065.028.982.982 0 00-.655.92.812.812 0 00.813.817h3.068a.935.935 0 00.935-.935v-5.066l-3.536.19zM73.486 22.618v2.619c0 .212 0 1.14.56 1.426.019.01.04.019.064.028.39.138.652.505.655.92a.812.812 0 01-.812.817h-3.069a.935.935 0 01-.935-.936v-5.065l3.537.19zM5.062 10.612v15.2c0 .397.226.76.582.934.357.175.583.537.583.934v.294c0 .321-.26.582-.583.582H.577A.577.577 0 010 27.98v-.306c0-.393.223-.753.577-.928.353-.174.576-.534.576-.928V11.144a.374.374 0 00-.374-.374.374.374 0 01-.374-.374v-.484c0-.473.384-.858.858-.858h2.24c.861 0 1.559.698 1.559 1.558z"/><ellipse cx="3.114" cy="2.786" rx="2.422" ry="2.438"/></g></g></svg>
assets/images/list_radar_cons.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="89" viewBox="0 0 89 89" width="89" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m59 25h18"/><filter id="b" height="100%" width="105.6%" x="-2.8%" y="-50%"><feMorphology in="SourceAlpha" operator="dilate" radius="0.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feMorphology in="SourceAlpha" operator="erode" radius="1" result="shadowInner"/><feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"/><feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"/></filter><path id="c" d="m77 32h-18"/><filter id="d" height="100%" width="105.6%" x="-2.8%" y="-50%"><feMorphology in="SourceAlpha" operator="dilate" radius="0.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feMorphology in="SourceAlpha" operator="erode" radius="1" result="shadowInner"/><feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"/><feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"/></filter></defs><g fill="none" fill-rule="evenodd" transform="translate(1 16)"><path d="m65 47v-39.80729931c0-.56033171-.2128492-1.12009801-.6329609-1.54868674-.426257-.42858874-.9798883-.64401395-1.5340782-.64401395-22.3509384 0-39.1141422 0-50.2896114 0" stroke="#7e818d"/><path d="m14 47h47v-37h-47" fill="#e7e7e7"/><path d="m18.8838533 47h41.1161467v-37h-47.0250335m-2.5263518 0h-5.4486147" stroke="#7e818d"/><path d="m70 47v3.5009062c0 .896522-.3195867 1.793648-.96046 2.4757055-.6386067.6790369-1.4789383 1.0233883-2.3243698 1.0233883-18.4816432 0-36.1908559 0-48.4812095 0m-3.8044798 0c-1.606173 0-3.0874112 0-4.4294809 0" stroke="#7e818d"/><use fill="#000" filter="url(#b)" xlink:href="#a"/><use stroke="#7e818d" xlink:href="#a"/><path d="m81 25h4" stroke="#7e818d"/><use fill="#000" filter="url(#d)" xlink:href="#c"/><use stroke="#7e818d" xlink:href="#c"/><path d="m81 32h4" stroke="#7e818d"/><path d="m78.6403901 6.65260873.7192198.69478254-9.807648 10.15260873h-14.5519619v-1h14.127589z" fill="#7e818d" fill-rule="nonzero"/><path d="m87 4.50038399c0 2.484427-2.0140773 4.49961601-4.4988482 4.49961601-2.4855388 0-4.5011518-2.01518901-4.5011518-4.49961601 0-2.48519498 2.015613-4.50038399 4.5011518-4.50038399 2.4847709 0 4.4988482 2.01518901 4.4988482 4.50038399z" stroke="#7e818d"/><path d="m55 39.5v-1h14.5519619l9.807648 10.1526087-.7192198.6947826-9.5128011-9.8473913z" fill="#7e818d" fill-rule="nonzero"/><g stroke="#7e818d"><path d="m87 52.4992321c0-2.4834471-2.0140773-4.4992321-4.4988482-4.4992321-2.4855388 0-4.5011518 2.015785-4.5011518 4.4992321 0 2.4849829 2.015613 4.5007679 4.5011518 4.5007679 2.4847709 0 4.4988482-2.015785 4.4988482-4.5007679z"/><circle cx="36.5" cy="28.5" fill="#fff" r="9.5"/><path d="m41 29h-8l.0574786-4" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -7.466342 37.988379)"/></g></g></svg>
assets/images/list_radar_cs.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="89" viewBox="0 0 89 89" width="89" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(14 16)"><g stroke="#7e818d"><path d="m10.3863636 45.3291667h-10.3863636v-45.3291667h61v45.3291667h-11" fill="#fff" stroke-linejoin="round"/><path d="m0 8h61" stroke-linejoin="round"/><path d="m4 4h2.772727" stroke-linejoin="round"/><path d="m9 4h2.772727" stroke-linejoin="round"/><path d="m14 4h2.772727" stroke-linejoin="round"/></g><path d="m3 11h55v12h-55z" fill="#efefef"/><g stroke="#bdbdbd" stroke-linecap="square" transform="translate(49 15)"><path d="m.5.5 3 3"/><path d="m.5.5 3 3" transform="matrix(1 0 0 -1 0 4)"/></g><g fill-rule="nonzero" transform="translate(16 28)"><path d="m26.78875 6.815c-.25375-.435-.725-.76137083-1.2326208-.83387083-.5436292-.07237917-1.0511292.07262083-1.4498792.39887083-.6526208.57987917-1.48625.87-2.35625.87-1.99375 0-3.625-1.63125-3.625-3.625 0-.36262083.0726208-.76137083.18125-1.0875.1451208-.5075.0726208-1.05137083-.18125-1.48637083-.2901208-.47125-.7613708-.76137084-1.2686292-.87-.7613708-.10875-1.5589916-.18112917-2.3563708-.18112917-8.01137083 0-14.5 6.48862917-14.5 14.5 0 8.0111292 6.48862917 14.5 14.5 14.5 8.0113708 0 14.5-6.4888708 14.5-14.5 0-2.71875-.7613708-5.36512083-2.21125-7.685z" fill="#e7e7e7"/><path d="m26.78875 6.815c-.25375-.435-.725-.76137083-1.2326208-.83387083-.5436292-.07237917-1.0511292.07262083-1.4498792.39887083-.6526208.57987917-1.48625.87-2.35625.87-1.99375 0-3.625-1.63125-3.625-3.625 0-.36262083.0726208-.76137083.18125-1.0875.1451208-.5075.0726208-1.05137083-.18125-1.48637083-.2901208-.47125-.7613708-.76137084-1.2686292-.87-.7613708-.10875-1.5589916-.18112917-2.3563708-.18112917-8.01137083 0-14.5 6.48862917-14.5 14.5 0 8.0111292 6.48862917 14.5 14.5 14.5 8.0113708 0 14.5-6.4888708 14.5-14.5 0-2.71875-.7613708-5.36512083-2.21125-7.685z" stroke="#7e818d"/></g><path d="m35 44h-8l.0574786-3" stroke="#7e818d" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -21.483305 38.928904)"/></g></svg>
assets/images/list_radar_pp.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="89" viewBox="0 0 89 89" width="89" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m31.5882353 42v-6.6315789c0-4.0688422 3.3182471-7.3684211 7.4117647-7.3684211s7.4117647 3.2995789 7.4117647 7.3684211v6.6315789"/><filter id="b" height="150%" width="147.2%" x="-23.6%" y="-25%"><feMorphology in="SourceAlpha" operator="dilate" radius="2" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feMorphology in="SourceAlpha" operator="erode" radius="2.5" result="shadowInner"/><feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"/><feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter></defs><g fill="none" fill-rule="evenodd" transform="translate(17 12)"><path d="m47.9487179 7.01694915h7.0512821v-1.40338983c0-3.10008813-2.5257692-5.61355932-5.6410256-5.61355932h-15.5128206" fill="#d8d8d8" stroke="#7e818d"/><path d="m19.8025686 53.3288136h-19.8025686v-47.71525428c0-3.10008813 2.52576923-5.61355932 5.64102564-5.61355932h44.47384616c-3.3916667 0-6.3969231 2.41944407-6.3969231 5.78898305v17.50337005m0 30.0364605h-8.4615384" fill="#fff" stroke="#7e818d"/><g stroke-linejoin="round"><use fill="#000" filter="url(#b)" xlink:href="#a"/><use stroke="#7e818d" xlink:href="#a"/></g><path d="m53 63.173913c0 1.008-.8064 1.826087-1.8 1.826087h-23.4c-.9936 0-1.8-.818087-1.8-1.826087v-17.347826c0-1.008.8064-1.826087 1.8-1.826087h23.4c.9936 0 1.8.818087 1.8 1.826087z" fill="#e7e7e7"/><g stroke="#7e818d"><path d="m53 63.173913c0 1.008-.8064 1.826087-1.8 1.826087h-23.4c-.9936 0-1.8-.818087-1.8-1.826087v-17.347826c0-1.008.8064-1.826087 1.8-1.826087h23.4c.9936 0 1.8.818087 1.8 1.826087z" stroke-linejoin="round"/><path d="m38.6603857 49.102901c-1.2408899.3046041-2.2507537 1.358719-2.5526627 2.6629786-.4042956 1.7427048.3701667 3.3257233 1.641685 4.1066175v3.2814172c0 1.0190393.7840884 1.8460857 1.7501974 1.8460857.966984 0 1.7501973-.8270464 1.7501973-1.8460857v-3.2814172c1.0422425-.6396687 1.7501973-1.8174713 1.7501973-3.1798825 0-2.3279141-2.0424803-4.1527697-4.3396143-3.5897136z" fill="#fff" stroke-linejoin="round"/><path d="m7.051282 14.033898h29.615385"/><path d="m7.051282 19.647458h29.615385"/><path d="m7.051282 25.261017h18.333333"/><path d="m11.282051 42.101695h7.051282"/><path d="m7.051282 42.101695h2.820513"/></g></g></svg>
assets/images/list_radar_tc.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="89" viewBox="0 0 89 89" width="89" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(17 13)"><g stroke="#7e818d"><path d="m47.9487179 7.01694915h7.0512821v-1.40338983c0-3.10008813-2.5257692-5.61355932-5.6410256-5.61355932h-15.5128206" fill="#d8d8d8"/><path d="m19.9443891 53.3288136h-19.9443891v-47.71525428c0-3.10008813 2.52576923-5.61355932 5.64102564-5.61355932h44.47384616c-3.3916667 0-6.3969231 2.41944407-6.3969231 5.78898305v17.50337005m0 30.0364605h-8.4615384" fill="#fff"/><path d="m7.051282 14.033898h29.615385"/><path d="m7.051282 19.647458h29.615385"/><path d="m7.051282 25.261017h18.333333"/><path d="m11.282051 42.101695h7.051282"/><path d="m7.051282 42.101695h2.820513"/></g><path d="m39.0081053 29-14.0081053 5.9148436v14.0477537c0 6.6046623 13.2226316 13.8296438 14 14.0374027.7781053-.2077589 14-7.9377202 14-13.2980472v-14.7871092z" fill="#e7e7e7"/><path d="m39.0081053 29-14.0081053 5.9148436v14.0477537c0 6.6046623 13.2226316 13.8296438 14 14.0374027.7781053-.2077589 14-7.9377202 14-13.2980472v-14.7871092z" stroke="#7e818d" stroke-linejoin="round"/><path d="m33 46.6556654 4.1042805 4.3443346 9.8957195-12" stroke="#7e818d" stroke-linejoin="round"/></g></svg>
assets/images/modals/modal_almost_there.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="124" viewBox="0 0 371 124" width="371" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m23.5995742 40.9132972-6.5269404 6.5531046v25.3627558h6.5269404zm-3.764931-16.9684197c2.6348039 0 4.7696192-2.123861 4.7696192-4.7402544 0-2.6169847-2.1348153-4.7384806-4.7696192-4.7384806-2.6365706 0-4.7713859 2.1214959-4.7713859 4.7384806 0 2.6163934 2.1348153 4.7402544 4.7713859 4.7402544zm19.8328765-4.4434342c0 4.8005645-1.7596768 9.1919664-4.6918825 12.5912084l4.212506 56.1989473h-37.65637636l4.0823559-55.216839c-3.47518497-3.5092191-5.61412274-8.2914541-5.61412274-13.5733167 0-10.77244544 8.87788737-19.5014433 19.8346432-19.5014433 10.9567559 0 19.8328765 8.72899786 19.8328765 19.5014433z"/><filter id="b" height="107.9%" width="117.6%" x="-8.8%" y="-4%"><feMorphology in="SourceAlpha" operator="dilate" radius="1.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter></defs><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><g stroke="#7e818d"><path d="m151 60.6575186v58.3424814c0 1.656854-1.343146 3-3 3h-145c-1.65685425 0-3-1.343146-3-3v-116c0-1.65685425 1.34314575-3 3-3h145c1.656854 0 3 1.34314575 3 3v27.0786124" stroke-linecap="round" stroke-linejoin="round"/><path d="m12.5 13.5h5" stroke-linecap="round" stroke-linejoin="round"/><path d="m21.5 13.5h5" stroke-linecap="round" stroke-linejoin="round"/><path d="m30.5 13.5h5" stroke-linecap="round" stroke-linejoin="round"/><path d="m.5 26.5h45" stroke-linecap="square"/><path d="m105.5 26.5h45" stroke-linecap="round" stroke-linejoin="round"/></g><g transform="translate(53 14)"><use fill="#000" filter="url(#b)" xlink:href="#a"/><use fill="#1cc691" fill-rule="evenodd" stroke="#7e818d" xlink:href="#a"/></g><rect height="122" rx="3" stroke="#7e818d" width="151" x="218"/><path d="m218.5 26.5h45" stroke="#7e818d" stroke-linecap="round" stroke-linejoin="round"/><path d="m323.5 26.5h45" stroke="#7e818d" stroke-linecap="round" stroke-linejoin="round"/><rect fill="#fff" height="50" rx="3" stroke="#7e818d" width="136" x="107" y="50"/><g stroke="#7e818d" stroke-linecap="round" stroke-linejoin="round"><path d="m153.5 64.5h27" opacity=".468442"/><g transform="translate(136 30.5)"><path d="m10.5 7h29"/><path d="m38.1502072 2.5v9h-9" transform="matrix(.70710678 -.70710678 .70710678 .70710678 4.90617 25.844542)"/><path d="m.5 7h6"/></g><g transform="translate(181 107.795455)"><path d="m7.266667 4.704545h15.466666"/><path d="m22.1855545 1.56818182v6.27272727h-6.2727273" transform="matrix(.70710678 -.70710678 .70710678 .70710678 2.252763 14.847741)"/><path d="m.277778 4.704545h4.444444"/></g><path d="m206.5 64.5h15"/><path d="m185.5 64.5h15"/><path d="m153.5 74.5h33"/><path d="m190.5 74.5h19" opacity=".468442"/><path d="m153.5 79.5h19" opacity=".468442"/><path d="m153.5 84.5h24"/><path d="m181.5 84.5h16" opacity=".648597"/><path d="m153.5 69.5h14"/><path d="m172.5 69.5h14"/></g><g stroke="#7e818d"><circle cx="132" cy="75" fill="#d2ecfe" r="14"/><g stroke-linecap="round" stroke-linejoin="round" transform="translate(123 67)"><path d="m10.719983.803419-3.428571 15.111111"/><path d="m1.76638796 11.9192344.08689792-5.61626249c.01671576-1.0803492.88847004-1.95210348 1.96881924-1.96881924l5.61626251-.08689792" transform="matrix(.70710678 -.70710678 .70710678 .70710678 -4.074819 6.329007)"/><path d="m8.56995939 11.9192344.08689792-5.61626249c.01671576-1.0803492.88847004-1.95210348 1.96881929-1.96881924l5.6162625-.08689792" transform="matrix(-.70710678 -.70710678 -.70710678 .70710678 26.893997 11.139858)"/></g></g><g fill-rule="nonzero" transform="translate(258 25)"><g fill="#676767"><path d="m33 0c-18.1959228 0-33 14.8040772-33 33s14.8040772 33 33 33 33-14.8040772 33-33-14.8040772-33-33-33zm0 63.25c-16.6799317 0-30.25-13.5700683-30.25-30.25s13.5700683-30.25 30.25-30.25 30.25 13.5700683 30.25 30.25-13.5700683 30.25-30.25 30.25z"/><path d="m8.2830858 22c-1.46012055 3.3678858-2.2830858 7.0797686-2.2830858 10.9864491 0 11.1210638 6.5805715 20.6981643 16 25.0135509l-12.53260687-36z"/><path d="m21.8849214 20.9687708c0 .7521595-.6200711 1.3607973-1.3863598 1.3607973h-.7997968l7.7735658 23.6704319c1.4168218-3.9656147 2.8745982-8.086711 4.0059233-11.3775749l-4.409545-12.292857h-1.0247081c-.7662888 0-1.3863598-.6086378-1.3863598-1.3607973s.620071-1.3607974 1.3863598-1.3607974h12.4772381c.7662887 0 1.3863598.6086379 1.3863598 1.3607974s-.6200711 1.3607973-1.3863598 1.3607973h-.5425622l7.7735659 23.6704319c1.6111017-4.5076412 3.2858352-9.2451829 4.4582841-12.7003322.5320696-2.6112958-1.5325775-5.8923589-3.3657134-8.8039868-1.425622-2.2657807-2.6576411-4.2232558-2.6576411-5.8936876 0-5.0963455 3.0218312-5.8578075 4.8224741-5.8578075 1.0854629 0 2.0781858.2850498 2.9903537.7249169-4.9705532-4.61611279-11.6574714-7.4691028-19.0242003-7.4691028-10.236419 0-19.1727872 5.486877-23.9757997 13.6079734h11.4985616c.7662887 0 1.3863598.6086379 1.3863598 1.3607974z"/><path d="m25 59.9702579c2.3921697.6531429 4.9003193 1.0297421 7.5011153 1.0297421 2.6001098 0 5.1074015-.3764303 7.4988847-1.0292359l-7.5078062-20.9707641c-2.6850359 7.6877168-6.2562194 17.5621376-7.4921938 20.9702579z"/><path d="m54.9005596 17c1.1103833 3.5154217-.2520206 9.4992717-1.6958342 14.1146991-.2347773.7529093-.5265908 1.6547898-.8595235 2.6680633-.0318343.1382347-.0676475.2764692-.1087669.414704-.0305079.1060246-.0742799.2066809-.1273368.2992847-2.3136166 6.980683-6.3058238 18.3781651-8.1090982 23.5032489 9.4197723-4.3196655 16-13.9019787 16-25.0291984 0-5.9581826-1.9035854-11.4635795-5.0994404-15.9708016z"/></g><path d="m33 0c-18.1959228 0-33 14.8040772-33 33s14.8040772 33 33 33 33-14.8040772 33-33-14.8040772-33-33-33z"/></g><path d="m227.5 13.5h5" stroke="#7e818d" stroke-linecap="round" stroke-linejoin="round"/><path d="m236.5 13.5h5" stroke="#7e818d" stroke-linecap="round" stroke-linejoin="round"/><path d="m245.5 13.5h5" stroke="#7e818d" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
assets/images/modals/modal_no_website_found.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="124" viewBox="0 0 176 124" width="176" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m23.6 40.913-6.527 6.553v25.364h6.527zm-3.765-16.968c2.634 0 4.77-2.124 4.77-4.74 0-2.617-2.136-4.739-4.77-4.739-2.637 0-4.772 2.122-4.772 4.739 0 2.616 2.135 4.74 4.772 4.74zm19.833-4.445c0 4.801-1.76 9.192-4.692 12.592l4.212 56.199h-37.656l4.082-55.217c-3.474-3.509-5.614-8.291-5.614-13.574 0-10.77 8.878-19.5 19.835-19.5 10.955 0 19.833 8.729 19.833 19.501z"/><filter id="b" height="107.9%" width="117.6%" x="-8.8%" y="-4%"><feMorphology in="SourceAlpha" operator="dilate" radius="1.5" result="shadowSpreadOuter1"/><feOffset in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter></defs><g fill="none" fill-rule="evenodd"><g stroke="#7e818d"><path d="m152 92.634v27.366a3 3 0 0 1 -3 3h-145a3 3 0 0 1 -3-3v-116a3 3 0 0 1 3-3h145a3 3 0 0 1 3 3v27.079" stroke-linecap="round" stroke-linejoin="round"/><g stroke-linecap="round" stroke-linejoin="round"><path d="m169.496 50.386c-4.31-5.126-10.773-8.386-17.996-8.386-12.979 0-23.5 10.521-23.5 23.5s10.521 23.5 23.5 23.5c12.061 0 22-9.087 23.345-20.788.102-.89.155-1.795.155-2.712m-.945-6.617a23.376 23.376 0 0 0 -2.508-5.652" fill="#fff"/><path d="m142.528 56.5 17.944 18m0-18-17.944 18"/></g><path d="m13.5 14.5h5m4 0h5m4 0h5" stroke-linecap="round" stroke-linejoin="round"/><path d="m1.5 27.5h45" stroke-linecap="square"/><path d="m106.5 27.5h45" stroke-linecap="round" stroke-linejoin="round"/></g><g transform="translate(54 15)"><use fill="#000" filter="url(#b)" xlink:href="#a"/><use fill="#1cc691" stroke="#7e818d" xlink:href="#a"/></g></g></svg>
assets/images/modals/modal_pp_created.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="132" viewBox="0 0 133 132" width="133" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m63.1764706 84v-13.2631579c0-8.1376842 6.6364941-14.7368421 14.8235294-14.7368421s14.8235294 6.5991579 14.8235294 14.7368421v13.2631579"/><filter id="b" height="148.2%" width="145.5%" x="-22.8%" y="-24.1%"><feMorphology in="SourceAlpha" operator="dilate" radius="3.75" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feMorphology in="SourceAlpha" operator="erode" radius="4" result="shadowInner"/><feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"/><feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter></defs><g fill="none" fill-rule="evenodd"><g transform="translate(22 1)"><path d="m95.8974359 14.0338983h14.1025641v-2.8067797c0-6.20017623-5.051538-11.2271186-11.2820513-11.2271186h-31.025641" fill="#d8d8d8" stroke="#7e818d" stroke-width="1.5"/><path d="m39.6051373 106.657627h-39.6051373v-95.4305084c0-6.20017623 5.05153846-11.2271186 11.2820513-11.2271186h88.9476927c-6.7833337 0-12.7938466 4.83888814-12.7938466 11.5779661v35.00674m0 60.0729209h-16.9230769" fill="#fff" stroke="#7e818d" stroke-width="1.5"/><g stroke-linejoin="round"><use fill="#000" filter="url(#b)" xlink:href="#a"/><use stroke="#7e818d" stroke-width="1.5" xlink:href="#a"/></g><g stroke="#7e818d" stroke-width="1.5"><path d="m106 126.347826c0 2.016-1.6128 3.652174-3.6 3.652174h-46.8c-1.9872 0-3.6-1.636174-3.6-3.652174v-34.6956521c0-2.016 1.6128-3.6521739 3.6-3.6521739h46.8c1.9872 0 3.6 1.6361739 3.6 3.6521739z" fill="#e7e7e7" stroke-linejoin="round"/><path d="m106 126.347826c0 2.016-1.6128 3.652174-3.6 3.652174h-46.8c-1.9872 0-3.6-1.636174-3.6-3.652174v-34.6956521c0-2.016 1.6128-3.6521739 3.6-3.6521739h46.8c1.9872 0 3.6 1.6361739 3.6 3.6521739z" stroke-linejoin="round"/><path d="m77.3207715 98.205802c-2.4817798.6092083-4.5015075 2.717438-5.1053256 5.325957-.8085911 3.48541.7403335 6.651447 3.2833702 8.213235v6.562835c0 2.038078 1.5681768 3.692171 3.5003946 3.692171 1.9339681 0 3.5003947-1.654093 3.5003947-3.692171v-6.562835c2.084485-1.279337 3.5003946-3.634942 3.5003946-6.359765 0-4.655828-4.0849605-8.3055393-8.6792285-7.179427z" fill="#fff" stroke-linejoin="round"/><path d="m14.102564 28.067797h59.230769"/><path d="m14.102564 39.294915h59.230769"/><path d="m14.102564 50.522034h36.666667"/><path d="m22.564103 84.20339h14.102564"/><path d="m14.102564 84.20339h5.641026"/></g></g><g transform="translate(0 32)"><circle cx="21" cy="21" fill="#1cc691" r="21"/><path d="m26.1451613 21.1818028-9.7550986-.0190301.0629524-3.6605419" stroke="#fff" stroke-linecap="round" stroke-width="2" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -7.21979 23.201144)"/></g></g></svg>
assets/images/modals/modal_sync.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="166" viewBox="0 0 176 166" width="176" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m25.896543 38.0427092v-6.9475588c0-4.2627133 3.4884248-7.7195098 7.7918802-7.7195098 4.3034555 0 7.7918802 3.4567965 7.7918802 7.7195098v6.9475588"/><filter id="b" height="120.5%" width="119.3%" x="-9.6%" y="-10.2%"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feMorphology in="SourceAlpha" operator="erode" radius="1.5" result="shadowInner"/><feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"/><feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><path id="c" d="m45.8345894 54.5730535c0 .8690239-.6981524 1.5743186-1.558376 1.5743186h-20.2588885c-.8602236 0-1.5583761-.7052947-1.5583761-1.5743186v-14.9560258c0-.8690238.6981525-1.5743185 1.5583761-1.5743185h20.2588885c.8602236 0 1.558376.7052947 1.558376 1.5743185z"/><filter id="d" height="155.2%" width="142.8%" x="-21.4%" y="-27.6%"><feMorphology in="SourceAlpha" operator="dilate" radius="2" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><circle id="e" cx="9.515358" cy="9.515358" r="9.515358"/><filter id="f" height="136.8%" width="136.8%" x="-18.4%" y="-18.4%"><feMorphology in="SourceAlpha" operator="dilate" radius="1.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><path id="g" d="m25.0275937 6.36696564c-.2370679-.40640206-.6773368-.7113165-1.1515854-.77905018-.5078897-.06762078-.9820255.06784657-1.3545607.37264812-.609716.54175652-1.3885404.81280412-2.2013445.81280412-1.8626761 0-3.3866839-1.52400773-3.3866839-3.38668385 0-.33878127.0678466-.7113165.1693342-1.01600516.1355803-.47413573.0678466-.9822512-.1693342-1.38865326-.2710475-.4402689-.7113164-.7113165-1.1852264-.81280413-.7113165-.10160051-1.4564998-.1692213-2.2014574-.1692213-7.4846842 0-13.5467354 6.0620512-13.5467354 13.5467354 0 7.4844584 6.0620512 13.5467354 13.5467354 13.5467354s13.5467354-6.062277 13.5467354-13.5467354c0-2.5400129-.7113165-5.01240499-2.0658771-7.17976976z"/><filter id="h" height="125.8%" width="125.8%" x="-12.9%" y="-12.9%"><feMorphology in="SourceAlpha" operator="dilate" radius="1.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><path id="i" d="m39.8242814 68.7655317-11.0142118 11.0142118v42.6287665h11.0142118zm-6.353321-28.5198819c4.4462315 0 8.0487325-3.5697058 8.0487325-7.9672414 0-4.3985294-3.602501-7.96426-8.0487325-7.96426-4.4492128 0-8.0517138 3.5657306-8.0517138 7.96426 0 4.3975356 3.602501 7.9672414 8.0517138 7.9672414zm33.4679791-7.4683571c0 8.0686083-2.9694546 15.4495116-7.9175517 21.1628296l7.1086039 94.4570777h-63.54513517l6.88897559-92.8063869c-5.86437463-5.8981636-9.47383212-13.9359643-9.47383212-22.8135204 0-18.1059213 14.9814349-32.7772927 33.4709604-32.7772927s33.4679791 14.6713714 33.4679791 32.7772927z"/><filter id="j" height="108.8%" width="119.4%" x="-9.7%" y="-4.4%"><feMorphology in="SourceAlpha" operator="dilate" radius="2.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter></defs><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><g transform="matrix(.96592583 .25881905 -.25881905 .96592583 122.94563 9.8)"><g stroke="#7e818d"><path d="m41.3275215 5.95849663h6.1112786v-1.19169933c0-2.63246381-2.18906-4.7667973-4.8890229-4.7667973h-13.4448129"/><path d="m6.18767 12.146166h25.438197"/><path d="m6.18767 16.958798h25.438197"/><path d="m6.18767 21.77143h15.812933"/><path d="m9.625264 36.438499h6.187669"/><path d="m6.18767 36.438499h2.520902"/><path d="m23.1584887 45.962452h-23.1584887v-41.12429916c0-2.67186991 2.18299227-4.83815284 4.8754713-4.83815284h38.4382157c-2.9313771 0-5.5287844 2.08524387-5.5287844 4.98934511v15.08561229m0 25.8874946h-7.313207"/></g><g stroke-linejoin="round"><use fill="#000" filter="url(#b)" xlink:href="#a"/><use stroke="#7e818d" xlink:href="#a"/></g><g stroke-linejoin="round"><use fill="#000" filter="url(#d)" xlink:href="#c"/><use fill="#d2ecfe" fill-rule="evenodd" stroke="#7e818d" xlink:href="#c"/></g><path d="m33.2029049 42.4854282c-1.0562626.2617763-1.9158726 1.1676812-2.1728618 2.2885599-.3441419 1.497678.3150911 2.8581218 1.397425 3.5292212v2.8200452c0 .8757609.6674269 1.5865233 1.4897922 1.5865233.8231101 0 1.4897921-.7107624 1.4897921-1.5865233v-2.8200452c.8871712-.5497304 1.4897921-1.5619322 1.4897921-2.7327865 0-2.0006059-1.7385874-3.5688842-3.6939396-3.0849946z" fill="#fff" stroke="#7e818d" stroke-linejoin="round"/></g><g transform="matrix(.96592583 -.25881905 .25881905 .96592583 108.307092 94.439528)"><g stroke="#7e818d"><path d="m0 42.4191436v8.0220107c0 4.4297542 8.66615643 8.0220106 20.4537299 8.0220106 11.7875735 0 20.4537299-3.5922564 20.4537299-8.0220106v-8.0220107" fill="#ededed"/><path d="m20.4537299 51.4964562c11.7875735 0 20.4537299-3.5922564 20.4537299-8.0220107 0-4.4297542-8.6661564-8.0220106-20.4537299-8.0220106-11.78757347 0-20.4537299 3.5922564-20.4537299 8.0220106 0 4.4297543 8.66615643 8.0220107 20.4537299 8.0220107z" fill="#ededed"/><path d="m0 31.546729v8.0220107c0 4.4297543 8.66615643 8.0220106 20.4537299 8.0220106 11.7875735 0 20.4537299-3.5922563 20.4537299-8.0220106v-8.0220107" fill="#fff"/><path d="m20.4537299 39.6287975c11.7875735 0 20.4537299-3.5922564 20.4537299-8.0220106 0-4.4297543-8.6661564-8.0220107-20.4537299-8.0220107-11.78757347 0-20.4537299 3.5922564-20.4537299 8.0220107 0 4.4297542 8.66615643 8.0220106 20.4537299 8.0220106z" fill="#fff"/><path d="m0 19.7596041v7.7860692c0 4.2994674 8.66615643 7.7860691 20.4537299 7.7860691 11.7875735 0 20.4537299-3.4866017 20.4537299-7.7860691v-7.7860692" fill="#ededed"/><path d="m20.4537299 27.7816148c11.7875735 0 20.4537299-3.4866018 20.4537299-7.7860692s-8.6661564-7.7860692-20.4537299-7.7860692c-11.78757347 0-20.4537299 3.4866018-20.4537299 7.7860692s8.66615643 7.7860692 20.4537299 7.7860692z" fill="#ededed"/><path d="m0 7.55012767v7.78606913c0 4.2994674 8.66615643 7.7860692 20.4537299 7.7860692 11.7875735 0 20.4537299-3.4866018 20.4537299-7.7860692v-7.78606913" fill="#fff"/><path d="m20.4537299 15.5721383c11.7875735 0 20.4537299-3.4866017 20.4537299-7.78606914 0-4.29946739-8.6661564-7.78606916-20.4537299-7.78606916-11.78757347 0-20.4537299 3.48660177-20.4537299 7.78606916 0 4.29946744 8.66615643 7.78606914 20.4537299 7.78606914z" fill="#fff"/></g><ellipse cx="20.45373" cy="6.606362" fill="#d9d9d9" rx="11.416035" ry="3.775064"/><g stroke="#7e818d" transform="translate(15.697049 18.403436)"><path d="m3.16174717.5v1.32809192h-2.66174717v-1.32809192z"/><path d="m7.9004788.5v1.32809192h-2.66174717v-1.32809192z" fill="#d2ecfe"/></g><g stroke="#7e818d" transform="translate(17.124053 42.374298)"><path d="m.5 12.367659h2.649033v1.241978h-2.649033z"/><path d="m.5.5h2.649033v1.241978h-2.649033z"/></g><g stroke="#7e818d" transform="matrix(-1 0 0 1 27.113084 30.14103)"><path d="m3.16174717.5v1.30395962h-2.66174717v-1.30395962z"/><path d="m5.23873163.5h2.66174717v1.30395962h-2.66174717z" fill="#fff"/></g><g transform="translate(30.819114 35.418981)"><use fill="#000" filter="url(#f)" xlink:href="#e"/><g stroke="#7e818d"><use fill="#d2ecfe" fill-rule="evenodd" xlink:href="#e"/><path d="m12.2075195 9.89144617h-5.39785947l.03878267-2.9688227" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -3.043576 10.2871)"/></g></g></g><g transform="matrix(.95105652 .30901699 -.30901699 .95105652 17.501508 93.6)"><g stroke="#7e818d"><path d="m14.1857324 42.1737989h-14.1857324v-42.1737989h56.7429294v42.1737989h-14.2002528" stroke-linejoin="round"/><path d="m0 7.412365h56.742929" stroke-linejoin="round"/><path d="m3.833982 3.833982h2.555988" stroke-linejoin="round"/><path d="m8.43476 3.833982h2.555988" stroke-linejoin="round"/><path d="m14.057933 3.833982h2.555988" stroke-linejoin="round"/><path d="m53.4313428 10.7239512v8.2015562h-50.11975621v-8.2015562z" fill="#7c7c7c"/><path d="m46.998226 13.514786 2.875486 2.875486" stroke-linecap="square"/><path d="m.479248.479248 2.875486 2.875486" stroke-linecap="square" transform="matrix(1 0 0 -1 46.518978 16.86952)"/></g><g transform="translate(14.824729 26.071076)"><g fill-rule="nonzero"><use fill="#000" filter="url(#h)" xlink:href="#g"/><use fill="#d2ecfe" stroke="#7e818d" xlink:href="#g"/></g><path d="m17.1802608 15.133532h-7.47406096l.05369982-2.8027728" stroke="#7e818d" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -5.717346 15.203404)"/></g></g><g stroke="#7e818d" stroke-linejoin="round" transform="matrix(.96592583 -.25881905 .25881905 .96592583 11.6 11.129219)"><path d="m36.9245662 61.8321006v-3.316566c0-2.3174769-1.9761481-4.1957939-4.2422224-4.1957939h-1.2280837v-2.797196c0-2.3174768-.6085716-2.7971959-2.8746459-2.7971959h-1.2280837v-8.3915879l6.8378826-5.5943919v-15.3845777h-6.8378826v5.5943919h-5.4703061v-5.5943919h-6.8378826v5.5943919h-5.47030613v-5.5943919h-6.83788262v15.3845777l6.83788262 5.5943919v8.3915879h-1.22808372c-2.2660743 0-2.87464585.4797191-2.87464585 2.7971959v2.797196h-1.22808372c-2.2660743 0-4.24222238 1.878317-4.24222238 4.1957939v6.9929899h30.9092968" fill="#fff"/><path d="m5.169439 53.597884h13.292844"/><path d="m25.108705 53.597884h5.169439"/><path d="m2.215474 33.498677h16.246809"/><path d="m25.108705 33.498677h8.123405"/><path d="m29.0965581 10.4218107h-10.634275v-8.18856555h13.2928438v4.09428278" fill="#d2ecfe"/><path d="m29.5396529 13.3994709h13.2928439v-6.69973544h-13.2928439z" fill="#d2ecfe"/><path d="m18.462283 16.377131v-16.377131"/></g><g transform="translate(53 12)"><use fill="#000" filter="url(#j)" xlink:href="#i"/><use fill="#1cc691" fill-rule="evenodd" stroke="#7e818d" xlink:href="#i"/></g></g></svg>
assets/images/pc_screen_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="29" viewBox="0 0 36 29" width="36" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" stroke="#7e818d" stroke-width="1.5"><path d="m.75.75h34.14v21.18h-34.14z"/><path d="m17.91 22.68v4.32" stroke-linecap="round" stroke-linejoin="round"/><path d="m9.672353 27.27h15.755294"/></g></svg>
assets/images/question_mark.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="14" viewBox="0 0 14 14" width="14" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><circle cx="7" cy="7" fill="#6e6e6e" r="7"/><text fill="#fff" font-family="HelveticaNeue-Bold, Helvetica Neue" font-size="11" font-weight="bold"><tspan x="4" y="11">?</tspan></text></g></svg>
assets/images/question_mark_light.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" opacity=".43347"><circle cx="8" cy="8" fill="#6e6e6e" r="8"/><text fill="#fff" font-family="HelveticaNeue-Bold, Helvetica Neue" font-size="11" font-weight="bold"><tspan x="5" y="12">?</tspan></text></g></svg>
assets/images/service_cards/cons_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="72" viewBox="0 0 68 72" width="68" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(8 8)"><g stroke="#7e818d"><path d="m0 42.4926047v3.5677401c0 4.4509224 8.69539032 8.0603449 20.5227273 8.0603449 4.6844816 0 8.8776442-.5662222 12.2338134-1.5266866.786734-.2251466 1.5274752-.4719568 2.2177708-.7382153"/><path d="m0 30.8886346v5.1717102c0 4.4509224 8.69539032 8.0603449 20.5227273 8.0603449 3.1147823 0 6.0123466-.2503337 8.591076-.7004445" fill="#fff"/><path d="m0 21.0668787v4.2995006c0 4.3200129 8.69539032 7.8232759 20.5227273 7.8232759 11.8273369 0 20.5227272-3.503263 20.5227272-7.8232759v-4.2995006"/><path d="m0 7.5862069v7.8232759c0 4.3200129 8.69539032 7.8232758 20.5227273 7.8232758 11.8273369 0 20.5227272-3.5032629 20.5227272-7.8232758v-7.8232759" fill="#ededed"/><path d="m20.5227273 15.6465517c11.8273369 0 20.5227272-3.5032629 20.5227272-7.82327584 0-4.32001293-8.6953903-7.82327586-20.5227272-7.82327586-11.82733698 0-20.5227273 3.50326293-20.5227273 7.82327586 0 4.32001294 8.69539032 7.82327584 20.5227273 7.82327584z" fill="#ededed"/></g><circle cx="42.510876" cy="41.510876" fill="#d2ecfe" r="9.510876"/><circle cx="42.510876" cy="41.510876" r="9.510876" stroke="#7e818d"/><path d="m46.3060892 42.5050534h-7.2727273l.0522533-4" stroke="#7e818d" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -15.786516 47.155813)"/></g></svg>
assets/images/service_cards/cs_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="72" viewBox="0 0 68 72" width="68" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(3 8)"><g stroke="#7e818d" stroke-linejoin="round"><path d="m10.3863636 45.3291667h-10.3863636v-45.3291667h61v45.3291667h-11" fill="#fff"/><path d="m0 8h61"/><path d="m4 4h2.772727"/><path d="m9 4h2.772727"/><path d="m14 4h2.772727"/></g><path d="m3 11h55v12h-55z" fill="#efefef"/><g stroke="#bdbdbd" stroke-linecap="square" transform="translate(49 15)"><path d="m.5.5 3 3"/><path d="m.5.5 3 3" transform="matrix(1 0 0 -1 0 4)"/></g><g transform="translate(16 28)"><path d="m26.78875 6.815c-.25375-.435-.725-.76137083-1.2326208-.83387083-.5436292-.07237917-1.0511292.07262083-1.4498792.39887083-.6526208.57987917-1.48625.87-2.35625.87-1.99375 0-3.625-1.63125-3.625-3.625 0-.36262083.0726208-.76137083.18125-1.0875.1451208-.5075.0726208-1.05137083-.18125-1.48637083-.2901208-.47125-.7613708-.76137084-1.2686292-.87-.7613708-.10875-1.5589916-.18112917-2.3563708-.18112917-8.01137083 0-14.5 6.48862917-14.5 14.5 0 8.0111292 6.48862917 14.5 14.5 14.5 8.0113708 0 14.5-6.4888708 14.5-14.5 0-2.71875-.7613708-5.36512083-2.21125-7.685z" fill="#d2ecfe" fill-rule="nonzero"/><g stroke="#7e818d"><path d="m26.78875 6.815c-.25375-.435-.725-.76137083-1.2326208-.83387083-.5436292-.07237917-1.0511292.07262083-1.4498792.39887083-.6526208.57987917-1.48625.87-2.35625.87-1.99375 0-3.625-1.63125-3.625-3.625 0-.36262083.0726208-.76137083.18125-1.0875.1451208-.5075.0726208-1.05137083-.18125-1.48637083-.2901208-.47125-.7613708-.76137084-1.2686292-.87-.7613708-.10875-1.5589916-.18112917-2.3563708-.18112917-8.01137083 0-14.5 6.48862917-14.5 14.5 0 8.0111292 6.48862917 14.5 14.5 14.5 8.0113708 0 14.5-6.4888708 14.5-14.5 0-2.71875-.7613708-5.36512083-2.21125-7.685z" fill-rule="nonzero"/><path d="m19 16h-8l.0574786-3" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -5.749459 16.670246)"/></g></g></g></svg>
assets/images/service_cards/pp_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="72" viewBox="0 0 68 72" width="68" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m31.5882353 42v-6.6315789c0-4.0688422 3.3182471-7.3684211 7.4117647-7.3684211s7.4117647 3.2995789 7.4117647 7.3684211v6.6315789"/><filter id="b" height="150%" width="147.2%" x="-23.6%" y="-25%"><feMorphology in="SourceAlpha" operator="dilate" radius="2" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feMorphology in="SourceAlpha" operator="erode" radius="2.5" result="shadowInner"/><feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"/><feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter></defs><g fill="none" fill-rule="evenodd" transform="translate(6 3)"><path d="m47.9487179 7.01694915h7.0512821v-1.40338983c0-3.10008813-2.5257692-5.61355932-5.6410256-5.61355932h-15.5128206" fill="#d8d8d8" stroke="#7e818d"/><path d="m19.8025686 53.3288136h-19.8025686v-47.71525428c0-3.10008813 2.52576923-5.61355932 5.64102564-5.61355932h44.47384616c-3.3916667 0-6.3969231 2.41944407-6.3969231 5.78898305v17.50337005m0 30.0364605h-8.4615384" fill="#fff" stroke="#7e818d"/><g stroke-linejoin="round"><use fill="#000" filter="url(#b)" xlink:href="#a"/><use stroke="#7e818d" xlink:href="#a"/></g><path d="m53 63.173913c0 1.008-.8064 1.826087-1.8 1.826087h-23.4c-.9936 0-1.8-.818087-1.8-1.826087v-17.347826c0-1.008.8064-1.826087 1.8-1.826087h23.4c.9936 0 1.8.818087 1.8 1.826087z" fill="#d2ecfe"/><g stroke="#7e818d"><path d="m53 63.173913c0 1.008-.8064 1.826087-1.8 1.826087h-23.4c-.9936 0-1.8-.818087-1.8-1.826087v-17.347826c0-1.008.8064-1.826087 1.8-1.826087h23.4c.9936 0 1.8.818087 1.8 1.826087z" stroke-linejoin="round"/><path d="m38.6603857 49.102901c-1.2408899.3046041-2.2507537 1.358719-2.5526627 2.6629786-.4042956 1.7427048.3701667 3.3257233 1.641685 4.1066175v3.2814172c0 1.0190393.7840884 1.8460857 1.7501974 1.8460857.966984 0 1.7501973-.8270464 1.7501973-1.8460857v-3.2814172c1.0422425-.6396687 1.7501973-1.8174713 1.7501973-3.1798825 0-2.3279141-2.0424803-4.1527697-4.3396143-3.5897136z" fill="#fff" stroke-linejoin="round"/><path d="m7.051282 14.033898h29.615385"/><path d="m7.051282 19.647458h29.615385"/><path d="m7.051282 25.261017h18.333333"/><path d="m11.282051 42.101695h7.051282"/><path d="m7.051282 42.101695h2.820513"/></g></g></svg>
assets/images/service_cards/tc_icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="72" viewBox="0 0 68 72" width="68" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(6 4)"><g stroke="#7e818d"><path d="m47.9487179 7.01694915h7.0512821v-1.40338983c0-3.10008813-2.5257692-5.61355932-5.6410256-5.61355932h-15.5128206" fill="#d8d8d8"/><path d="m19.9443891 53.3288136h-19.9443891v-47.71525428c0-3.10008813 2.52576923-5.61355932 5.64102564-5.61355932h44.47384616c-3.3916667 0-6.3969231 2.41944407-6.3969231 5.78898305v17.50337005m0 30.0364605h-8.4615384" fill="#fff"/><path d="m7.051282 14.033898h29.615385"/><path d="m7.051282 19.647458h29.615385"/><path d="m7.051282 25.261017h18.333333"/><path d="m11.282051 42.101695h7.051282"/><path d="m7.051282 42.101695h2.820513"/></g><path d="m39.0081053 29-14.0081053 5.9148436v14.0477537c0 6.6046623 13.2226316 13.8296438 14 14.0374027.7781053-.2077589 14-7.9377202 14-13.2980472v-14.7871092z" fill="#d2ecfe"/><path d="m39.0081053 29-14.0081053 5.9148436v14.0477537c0 6.6046623 13.2226316 13.8296438 14 14.0374027.7781053-.2077589 14-7.9377202 14-13.2980472v-14.7871092z" stroke="#7e818d" stroke-linejoin="round"/><path d="m33 46.6556654 4.1042805 4.3443346 9.8957195-12" stroke="#7e818d" stroke-linejoin="round"/></g></svg>
assets/images/warning-icon.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="28" viewBox="0 0 29 28" width="29" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(1 .5)"><text fill="#804123" font-family="HiraMaruProN-W4, Hiragino Maru Gothic ProN" font-size="13"><tspan x="12" y="17.5">!</tspan></text><circle cx="13.5" cy="13.5" r="13.5" stroke="#804123"/></g></svg>
assets/images/welcome_screen_bg.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="246" viewBox="0 0 260 246" width="260" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="a" d="m38.5014035 56.6240933v-10.3409885c0-6.344771 5.1863776-11.4899872 11.5844931-11.4899872s11.5844931 5.1452162 11.5844931 11.4899872v10.3409885"/><filter id="b" height="113.7%" width="112.9%" x="-6.5%" y="-6.9%"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feMorphology in="SourceAlpha" operator="erode" radius="1.5" result="shadowInner"/><feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"/><feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><path id="c" d="m68.144077 81.2284334c0 1.2934854-1.0379706 2.3432705-2.3168986 2.3432705h-30.1196821c-1.278928 0-2.3168986-1.0497851-2.3168986-2.3432705v-22.2610696c0-1.2934853 1.0379706-2.3432705 2.3168986-2.3432705h30.1196821c1.278928 0 2.3168986 1.0497852 2.3168986 2.3432705z"/><filter id="d" height="148.2%" width="137.4%" x="-18.7%" y="-24.1%"><feMorphology in="SourceAlpha" operator="dilate" radius="2.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><ellipse id="e" cx="14.146855" cy="14.162991" rx="14.146855" ry="14.162991"/><filter id="f" height="124.7%" width="124.7%" x="-12.4%" y="-12.4%"><feMorphology in="SourceAlpha" operator="dilate" radius="1.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><path id="g" d="m37.2095025 9.47681339c-.3524581-.60490298-1.0070231-1.05874825-1.7121071-1.15956541-.7550995-.10064914-1.4600156.10098519-2.0138783.55466243-.9064886.80636928-2.0643973 1.20980599-3.272825 1.20980599-2.7693134 0-5.0351153-2.26838621-5.0351153-5.04085821 0-.50425385.1008701-1.05874825.2517557-1.51225746.2015725-.70572015.1008702-1.4620169-.2517557-2.06691988-.4029771-.65531157-1.0575421-1.05874825-1.7621226-1.20980597-1.057542-.15122574-2.1654352-.25187488-3.2729928-.25187488-11.12777275 0-20.1404614 9.02296812-20.1404614 20.1634327 0 11.1401286 9.01268865 20.1634328 20.1404614 20.1634328 11.1277728 0 20.1404614-9.0233042 20.1404614-20.1634328 0-3.7806436-1.057542-7.4606381-3.0714203-10.68661931z"/><filter id="h" height="117.4%" width="117.4%" x="-8.7%" y="-8.7%"><feMorphology in="SourceAlpha" operator="dilate" radius="1.5" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><path id="i" d="m58.9989354 102.283243-16.3173509 16.382762v63.406889h16.3173509zm-9.4123273-42.4210493c6.5870096 0 11.924048-5.3096526 11.924048-11.850636 0-6.5424617-5.3370384-11.8462015-11.924048-11.8462015-6.5914265 0-11.928465 5.3037398-11.928465 11.8462015 0 6.5409834 5.3370385 11.850636 11.928465 11.850636zm49.5821911-11.1085855c0 12.0014113-4.3991919 22.9799162-11.7297062 31.478021l10.5312651 140.4973678h-94.14094101l10.20588971-138.042097c-8.68796237-8.7730478-14.0353068-20.7286352-14.0353068-33.9332918 0-26.9311136 22.1947184-48.7536082 49.5866081-48.7536082 27.3918896 0 49.5821911 21.8224946 49.5821911 48.7536082z"/><filter id="j" height="107.2%" width="116.1%" x="-8.1%" y="-3.6%"><feMorphology in="SourceAlpha" operator="dilate" radius="3" result="shadowSpreadOuter1"/><feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feComposite in="shadowOffsetOuter1" in2="SourceAlpha" operator="out" result="shadowOffsetOuter1"/><feColorMatrix in="shadowOffsetOuter1" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter></defs><g fill="none" fill-rule="evenodd" opacity=".304256" transform="translate(1.855204 .193051)"><g transform="matrix(.96592583 .25881905 -.25881905 .96592583 181.925426 14.961569)"><g stroke="#7e818d"><path d="m61.4432428 8.86883389h9.0858769v-1.77376678c0-3.91825081-3.2545611-7.09506711-7.2687016-7.09506711h-19.9889292"/><path d="m9.19945 18.078777h37.819963"/><path d="m9.19945 25.242066h37.819963"/><path d="m9.19945 32.405355h23.509707"/><path d="m14.310256 54.23633h9.199451"/><path d="m9.19945 54.23633h3.747925"/><path d="m34.430631 68.4121142h-34.430631v-61.21083903c0-3.97690421 3.24554-7.20127517 7.24855389-7.20127517h57.14759891c-4.3581931 0-8.2198602 3.1037496-8.2198602 7.42631502v22.45395068m0 38.5318485h-10.8728308"/></g><g stroke-linejoin="round"><use fill="#000" filter="url(#b)" xlink:href="#a"/><use stroke="#7e818d" xlink:href="#a"/></g><g stroke-linejoin="round"><use fill="#000" filter="url(#d)" xlink:href="#c"/><use fill="#fff" fill-rule="evenodd" stroke="#7e818d" xlink:href="#c"/></g><path d="m49.3640575 63.2367909c-1.5703869.389637-2.8484028 1.7380173-3.2304786 3.4063723-.5116493 2.2291961.4684582 4.254128 2.0776064 5.2530157v4.1974535c0 1.303513.9922897 2.3614366 2.2149322 2.3614366 1.2237501 0 2.2149323-1.0579236 2.2149323-2.3614366v-4.1974535c1.3189921-.8182378 2.2149322-2.3248343 2.2149322-4.0675745 0-2.9777716-2.5848259-5.3120517-5.4919245-4.5918135z" fill="#fff" stroke="#7e818d" stroke-linejoin="round"/></g><g transform="matrix(.96592583 -.25881905 .25881905 .96592583 160.136501 140.92058)"><g stroke="#7e818d"><path d="m0 63.1381306v11.94024c0 6.5934006 12.8843138 11.9402401 30.4093603 11.9402401 17.5250466 0 30.4093603-5.3468395 30.4093603-11.9402401v-11.94024" fill="#ededed"/><path d="m30.4093603 76.6491188c17.5250466 0 30.4093603-5.3468395 30.4093603-11.94024 0-6.5934006-12.8843137-11.9402401-30.4093603-11.9402401-17.5250465 0-30.4093603 5.3468395-30.4093603 11.9402401 0 6.5934005 12.8843138 11.94024 30.4093603 11.94024z" fill="#ededed"/><path d="m0 46.9552501v11.9402401c0 6.5934005 12.8843138 11.94024 30.4093603 11.94024 17.5250466 0 30.4093603-5.3468395 30.4093603-11.94024v-11.9402401" fill="#fff"/><path d="m30.4093603 58.9848823c17.5250466 0 30.4093603-5.3468395 30.4093603-11.94024s-12.8843137-11.94024-30.4093603-11.94024c-17.5250465 0-30.4093603 5.3468395-30.4093603 11.94024s12.8843138 11.94024 30.4093603 11.94024z" fill="#fff"/><path d="m0 29.4108829v11.5890565c0 6.399477 12.8843138 11.5890565 30.4093603 11.5890565 17.5250466 0 30.4093603-5.1895795 30.4093603-11.5890565v-11.5890565" fill="#ededed"/><path d="m30.4093603 41.3511229c17.5250466 0 30.4093603-5.1895795 30.4093603-11.5890565s-12.8843137-11.5890565-30.4093603-11.5890565c-17.5250465 0-30.4093603 5.1895795-30.4093603 11.5890565s12.8843138 11.5890565 30.4093603 11.5890565z" fill="#ededed"/><path d="m0 11.237873v11.5890565c0 6.399477 12.8843138 11.5890565 30.4093603 11.5890565 17.5250466 0 30.4093603-5.1895795 30.4093603-11.5890565v-11.5890565" fill="#fff"/><path d="m30.4093603 23.178113c17.5250466 0 30.4093603-5.1895795 30.4093603-11.5890565s-12.8843137-11.5890565-30.4093603-11.5890565c-17.5250465 0-30.4093603 5.1895795-30.4093603 11.5890565s12.8843138 11.5890565 30.4093603 11.5890565z" fill="#fff"/></g><ellipse cx="30.40936" cy="9.833139" fill="#d9d9d9" opacity=".428484" rx="16.972666" ry="5.618936"/><g stroke="#7e818d" transform="translate(23.337416 27.392315)"><path d="m4.94406275.5v2.4652131h-4.44406275v-2.4652131z"/><path d="m11.9893204.5v2.4652131h-4.44406272v-2.4652131z" fill="#d2ecfe"/></g><g stroke="#7e818d" transform="translate(25.458999 63.071382)"><path d="m.5 18.164237h4.42516v2.337038h-4.42516z"/><path d="m.5.5h4.42516v2.337038h-4.42516z"/></g><g stroke="#7e818d" transform="matrix(-1 0 0 1 40.310082 44.862958)"><path d="m4.94406275.5v2.42929374h-4.44406275v-2.42929374z"/><path d="m11.9893204.5v2.42929374h-4.44406272v-2.42929374z" fill="#fff"/></g><g transform="translate(45.819982 52.718845)"><use fill="#000" filter="url(#f)" xlink:href="#e"/><g stroke="#7e818d"><use fill="#fff" fill-rule="evenodd" xlink:href="#e"/><path d="m18.1529996 14.7191926-8.0305801.004507.0601772-4.4159772" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -4.537426 15.300881)"/></g></g></g><g transform="matrix(.95105652 .30901699 -.30901699 .95105652 25.158661 139.696541)"><g stroke="#7e818d"><path d="m21.0904832 62.772951h-21.0904832v-62.772951h84.3619327v62.772951h-21.1120713" stroke-linejoin="round"/><path d="m0 11.032822h84.361933" stroke-linejoin="round"/><path d="m5.700131 5.706632h3.800087" stroke-linejoin="round"/><path d="m12.540287 5.706632h3.800087" stroke-linejoin="round"/><path d="m20.900479 5.706632h3.800087" stroke-linejoin="round"/><path d="m79.681837 15.7176851v12.6959166h-75.00174123v-12.6959166z" fill="#7e818d" opacity=".121525"/><path d="m69.874101 20.115878 4.275098 4.279973" stroke-linecap="square"/><path d="m.712516.713329 4.275098 4.279974" stroke-linecap="square" transform="matrix(1 0 0 -1 69.161584 25.10918)"/></g><g transform="translate(22.040505 38.805097)"><g fill-rule="nonzero"><use fill="#000" filter="url(#h)" xlink:href="#g"/><use fill="#fff" stroke="#7e818d" xlink:href="#g"/></g><path d="m25.5479053 22.520551-11.119416.0062407.0822313-4.1690006" stroke="#7e818d" stroke-linecap="round" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -8.519672 22.614087)"/></g></g><g stroke="#7e818d" stroke-linejoin="round" transform="matrix(.96592583 -.25881905 .25881905 .96592583 16.356964 16.919922)"><path d="m54.8971969 92.0330519v-4.9364924c0-3.4494132-2.9380167-6.2451658-6.307078-6.2451658h-1.8258401v-4.1634438c0-3.4494133-.9047871-4.1634439-4.2738484-4.1634439h-1.8258401v-12.4903316l10.1661476-8.3268877v-22.8989413h-10.1661476v8.3268878h-8.1329181v-8.3268878h-10.1661475v8.3268878h-8.1329181v-8.3268878h-10.16614757v22.8989413l10.16614757 8.3268877v12.4903316h-1.8258401c-3.36906131 0-4.27384844.7140306-4.27384844 4.1634439v4.1634438h-1.82584011c-3.3690613 0-6.30707795 2.7957526-6.30707795 6.2451658v10.4086097h45.9540606" fill="#fff"/><path d="m7.685608 79.776957h19.76299"/><path d="m37.330094 79.776957h7.685607"/><path d="m3.293832 49.860598h24.154766"/><path d="m37.330094 49.860598h12.077383"/><path d="m43.2589911 15.512186h-15.8103927v-12.18814614h19.7629909v6.09407307" fill="#fff"/><path d="m43.9177575 19.9442391h19.7629909v-9.97211953h-19.7629909z" fill="#fff"/><path d="m27.448598 24.376292v-24.376292"/></g><g transform="translate(77.104615 17.844224)"><use fill="#000" filter="url(#j)" xlink:href="#i"/><use fill="#fff" fill-rule="evenodd" stroke="#7e818d" xlink:href="#i"/></g></g></svg>
assets/images/white_checkmark.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="7" viewBox="0 0 8 7" width="8" xmlns="http://www.w3.org/2000/svg"><path d="m14.8113573 11.5935296h-5.33333337l.03831907-1.99999999" fill="none" stroke="#fff" stroke-linecap="round" stroke-width="2" transform="matrix(.64278761 -.76604444 .76604444 .64278761 -12.276881 5.087513)"/></svg>
assets/images/white_x.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><g style="stroke:#fff;stroke-width:2;fill:none;fill-rule:evenodd;stroke-linecap:round;stroke-linejoin:round" transform="translate(1 1)"><path d="m.5.5 4 4"/><path d="m.5.5 4 4" transform="matrix(-1 0 0 1 5 0)"/></g></svg>
assets/js/admin.js ADDED
@@ -0,0 +1,697 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // main function
2
+ var _iub = _iub || [];
3
+
4
+
5
+ function circularBar(el) {
6
+ el.innerHTML = `
7
+ <svg xmlns="http://www.w3.org/2000/svg"
8
+ viewBox="0 0 32 32" >
9
+ <circle class="circle1" cy="16" cx="16" r="13" />
10
+ <circle class="circle2" cy="16" cx="16" r="13" />
11
+ </svg>
12
+ <span></span>
13
+ `;
14
+
15
+ var perc = parseInt(el.dataset.perc);
16
+ var circle = el.querySelector('.circle2');
17
+ var color = '#CF7463';
18
+
19
+ el.querySelector('span').innerHTML = perc + '<b>%</b>';
20
+
21
+ if (perc >= 50)
22
+ color = '#F5B350';
23
+ if (perc > 80)
24
+ color = '#1CC691';
25
+
26
+ var strokeDashArray = parseInt(getComputedStyle(circle, null).getPropertyValue("stroke-dasharray"));
27
+ var strokeDashOffset = strokeDashArray - ((strokeDashArray * perc) / 100);
28
+
29
+ circle.style.strokeDashoffset = strokeDashOffset;
30
+ el.style.color = color;
31
+
32
+ }
33
+ document.addEventListener("DOMContentLoaded", function () {
34
+ // search all .circularBar and initialize them
35
+ document.querySelectorAll(".circularBar").forEach(function (el) {
36
+ circularBar(el);
37
+ });
38
+ });
39
+
40
+ ;(function (global, $) {
41
+ //es5 strict mode
42
+ "use strict";
43
+
44
+ var IUB = global.IUB = global.IUB || {};
45
+
46
+ $(document).ready(function () {
47
+ IUB.ELEMS = {body: $('body')};
48
+ IUB.ELEMS.body.on('click', '.show-modal', showModal);
49
+ IUB.ELEMS.body.on('click', '.hide-modal', hideModal);
50
+ IUB.ELEMS.body.on('click', hideAllModals);
51
+ IUB.ELEMS.body.on('click', '.section-checkbox-control', sectionCheckboxShowAndHide);
52
+ IUB.ELEMS.body.on('click', '.section-radio-control', sectionRadioControl);
53
+ IUB.ELEMS.body.on('click', '.active-class-control', activeClassControl);
54
+ IUB.ELEMS.body.on('click', '.show-class-control', showClassControl);
55
+ IUB.ELEMS.body.on('submit', '.ajax-form', submitAjaxForm);
56
+ IUB.ELEMS.body.on('submit', '.ajax-form-to-options', submitAjaxFormToOptions);
57
+ IUB.ELEMS.body.on('click', '.service-checkbox', toggleServiceSetting);
58
+ IUB.ELEMS.body.on('click', '#alert-close', hideAlertDiv);
59
+ IUB.ELEMS.body.on('click', '#public_api_button', savePublicApiKey);
60
+ IUB.ELEMS.body.on('click', '.auto-detect-forms', reloadAutoDetectForms);
61
+ IUB.ELEMS.body.on('click', '.add-custom-section', addCustomSection);
62
+ IUB.ELEMS.body.on('click', '.remove-custom-section', removeCustomSection);
63
+ IUB.ELEMS.body.on('click', '.required-control', requiredControl);
64
+ IUB.ELEMS.body.on('click', '.update-button-style', updateButtonStyle);
65
+ IUB.ELEMS.body.on('change keyup past', '.iub-embed-code-tc', syncEmbedCode);
66
+ IUB.ELEMS.body.on('change click', '.iub-toggle-elements-status', toggleCheckboxes);
67
+ });
68
+
69
+ function showModal(evt) {
70
+ $(".modal").removeClass('shown');
71
+ var elId = $(evt.target).data('modal-name');
72
+ $(elId).addClass('shown');
73
+ }
74
+
75
+ function hideModal(evt) {
76
+ var elId = $(evt.target).data('modal-name');
77
+ $(elId).removeClass('shown');
78
+ }
79
+
80
+ function hideAllModals(evt) {
81
+ if (
82
+ !evt.target.matches(".show-modal") &&
83
+ !evt.target.closest(".modal__window")
84
+ ) {
85
+ $(".modal").removeClass('shown');
86
+ }
87
+ }
88
+
89
+ function sectionCheckboxShowAndHide(evt) {
90
+ if ($(evt.target).is(':checked')) {
91
+ $($(evt.target).data('section-name')).show();
92
+ } else {
93
+ $($(evt.target).data('section-name')).hide();
94
+ }
95
+ }
96
+
97
+ function sectionRadioControl(evt) {
98
+ if ($(evt.target).is(':checked')) {
99
+ $($(evt.target).data('section-group')).hide();
100
+ $($(evt.target).data('section-name')).show();
101
+ }
102
+ }
103
+
104
+ function activeClassControl(evt) {
105
+ $($(evt.target).data('element-name')).removeClass('inactive');
106
+ }
107
+
108
+ function showClassControl(evt) {
109
+ $($(evt.target).data('section-name')).show();
110
+ }
111
+
112
+
113
+ function submitAjaxForm(evt){
114
+ evt.stopImmediatePropagation();
115
+ evt.preventDefault();
116
+
117
+ var formData= $($(evt.target)).serialize();
118
+ var formButton= $($(evt.target)).find('button[type=submit]');
119
+
120
+ var redirect= $($(evt.target)).find('input[name="_redirect"]').val();
121
+ var showModal= $($(evt.target)).find('input[name="show_modal"]').val();
122
+
123
+ $.ajax({
124
+ type: "POST",
125
+ dataType: "json",
126
+ url: iub_js_vars['site_url'] + "/wp-admin/admin-ajax.php",
127
+ data : formData,
128
+ beforeSend: function() {
129
+ formButton.addClass("btn-loading");
130
+ formButton.prop('disabled', true);
131
+ },
132
+ success: function(response){
133
+ formButton.removeClass("btn-loading");
134
+ formButton.prop('disabled', false);
135
+ if (response.status === 'done') {
136
+ if(typeof(showModal) != "undefined" && showModal !== null) {
137
+ $(".modal").removeClass('shown');
138
+ $(showModal).addClass('shown');
139
+ } else {
140
+ window.location = redirect
141
+ }
142
+ }else{
143
+ if(response.focus && $(response.focus).length){
144
+ $(response.focus).trigger('click');
145
+ $([document.documentElement, document.body]).animate({
146
+ scrollTop: $(response.focus).offset().top
147
+ }, 500);
148
+ }
149
+ $('#modal-no-website-found').addClass('shown')
150
+ }
151
+ },
152
+ error: function(response) { // if error occured
153
+
154
+ $("#alert-div").addClass("alert--failure");
155
+ $("#alert-image").attr('src',iub_js_vars['site_url'] + '/wp-content/plugins/iubenda-cookie-wp-solution/assets/images/banner_failure.svg');
156
+ $("#alert-message").text(response.responseText);
157
+
158
+
159
+ $("#alert-div").removeClass("hidden");
160
+ formButton.removeClass("btn-loading");
161
+ formButton.prop('disabled', false);
162
+ },
163
+ complete: function() {
164
+ formButton.removeClass("btn-loading");
165
+ formButton.prop('disabled', false);
166
+ },
167
+
168
+ });
169
+ return false;
170
+ }
171
+
172
+ function submitAjaxFormToOptions(evt){
173
+ evt.preventDefault();
174
+ var formData= $($(evt.target)).serialize();
175
+ var formButton= $($(evt.target)).find('button[type=submit]');
176
+
177
+ var redirect= $($(evt.target)).find('input[name="_redirect"]').val();
178
+
179
+ $.ajax({
180
+ type: "POST",
181
+ dataType: "json",
182
+ url: iub_js_vars['site_url'] + "/wp-admin/admin-ajax.php",
183
+ data : formData,
184
+ beforeSend: function() {
185
+ formButton.addClass("btn-loading");
186
+ formButton.prop('disabled', true);
187
+ },
188
+ success: function(response){
189
+ formButton.removeClass("btn-loading");
190
+ formButton.prop('disabled', false);
191
+ if (response.status === 'done') {
192
+ window.location = redirect
193
+ }else{
194
+ if(response.focus){
195
+ $(response.focus).trigger('click');
196
+ $([document.documentElement, document.body]).animate({
197
+ scrollTop: $(response.focus).offset().top
198
+ }, 500);
199
+ }
200
+ $('#modal-no-website-found').addClass('shown')
201
+ }
202
+ },
203
+ error: function(response) { // if error occured
204
+
205
+ console.log(response.responseText)
206
+ $("#alert-div").addClass("alert--failure");
207
+ $("#alert-image").attr('src',iub_js_vars['site_url'] + '/wp-content/plugins/iubenda-cookie-wp-solution/assets/images/banner_failure.svg');
208
+ $("#alert-message").text(response.responseText);
209
+
210
+
211
+ $("#alert-div").removeClass("hidden");
212
+ formButton.removeClass("btn-loading");
213
+ formButton.prop('disabled', false);
214
+ },
215
+ complete: function() {
216
+ formButton.removeClass("btn-loading");
217
+ formButton.prop('disabled', false);
218
+ },
219
+
220
+ });
221
+ return false;
222
+ }
223
+
224
+ function toggleServiceSetting(evt){
225
+ const serviceName = $(evt.target).data('service-name')
226
+ const serviceKey = $(evt.target).data('service-key')
227
+ const status = $(evt.target).is(":checked")
228
+ if(status === true){
229
+ evt.stopImmediatePropagation();
230
+ evt.preventDefault();
231
+ window.location = $(evt.target).data('redirect')
232
+ return
233
+ }
234
+ jQuery.ajax({
235
+ type: "post",
236
+ dataType: "json",
237
+ url: iub_js_vars['site_url'] + "/wp-admin/admin-ajax.php",
238
+ data : {action: "toggle_services", name: serviceName, status: status},
239
+ success: function(response){
240
+ if (response.status === 'done') {
241
+ console.log('#configiration-'+serviceKey)
242
+ $('#configiration-'+serviceKey).toggle();
243
+
244
+ // Update rating circular bar if rating percentage is not equal undefined
245
+ if(response.rating_percentage != undefined){
246
+ document.querySelectorAll(".circularBar").forEach(function (el) {
247
+ $(el).attr('data-perc', response.rating_percentage);
248
+ circularBar(el);
249
+ });
250
+ }
251
+ }
252
+ },
253
+ error: function (jqXHR, exception) {
254
+ var msg = '';
255
+ if (jqXHR.status === 0) {
256
+ msg = 'Not connect.\n Verify Network.';
257
+ } else if (jqXHR.status == 404) {
258
+ msg = 'Requested page not found. [404]';
259
+ } else if (jqXHR.status == 500) {
260
+ msg = 'Internal Server Error [500].';
261
+ } else if (exception === 'parsererror') {
262
+ msg = 'Requested JSON parse failed.';
263
+ } else if (exception === 'timeout') {
264
+ msg = 'Time out error.';
265
+ } else if (exception === 'abort') {
266
+ msg = 'Ajax request aborted.';
267
+ } else {
268
+ msg = 'Uncaught Error.\n' + jqXHR.responseText;
269
+ }
270
+ console.log(msg);
271
+ },
272
+ });
273
+ }
274
+
275
+ function hideAlertDiv(evt){
276
+ $(evt.target).parents('#alert-div').fadeOut();
277
+ }
278
+
279
+ function savePublicApiKey(evt){
280
+ evt.preventDefault();
281
+ document.querySelector('#public_api_key').reportValidity();
282
+ var public_api_key = $('#public_api_key').val();
283
+
284
+ var formButton= $('#public_api_button');
285
+
286
+ $.ajax({
287
+ type: "post",
288
+ dataType: "json",
289
+ url: iub_js_vars['site_url'] + "/wp-admin/admin-ajax.php",
290
+ data : {action: "save_public_api_key", public_api_key: public_api_key},
291
+ beforeSend: function() {
292
+ formButton.addClass("btn-loading");
293
+ formButton.prop('disabled', true);
294
+ },
295
+ success: function(response){
296
+ formButton.removeClass("btn-loading");
297
+ formButton.prop('disabled', false);
298
+ if (response.status === 'done') {
299
+ $.ajax({
300
+ type: "post",
301
+ url: iub_js_vars['site_url'] + "/wp-admin/admin-ajax.php",
302
+ data : {action: "auto_detect_forms", public_api_key: public_api_key},
303
+ success: function(response) {
304
+ $("#auto-detect-forms").html(response);
305
+ $("#public-api-key-div").show();
306
+ },
307
+ });
308
+
309
+ }else{
310
+ $('#modal-no-website-found').addClass('shown')
311
+ }
312
+ },
313
+ error: function (jqXHR, exception) {
314
+ var msg = '';
315
+ if (jqXHR.status === 0) {
316
+ msg = 'Not connect.\n Verify Network.';
317
+ } else if (jqXHR.status == 404) {
318
+ msg = 'Requested page not found. [404]';
319
+ } else if (jqXHR.status == 500) {
320
+ msg = 'Internal Server Error [500].';
321
+ } else if (exception === 'parsererror') {
322
+ msg = 'Requested JSON parse failed.';
323
+ } else if (exception === 'timeout') {
324
+ msg = 'Time out error.';
325
+ } else if (exception === 'abort') {
326
+ msg = 'Ajax request aborted.';
327
+ } else {
328
+ msg = 'Uncaught Error.\n' + jqXHR.responseText;
329
+ }
330
+ console.log(msg);
331
+ },
332
+ });
333
+ }
334
+
335
+
336
+ function reloadAutoDetectForms(evt){
337
+ evt.preventDefault();
338
+ var auto_detect_forms = $("#auto-detect-forms")
339
+ var auto_detect_parent_div = $("#auto-detect-parent-div")
340
+ auto_detect_parent_div.addClass("loader");
341
+ auto_detect_forms.css('visibility', 'hidden');
342
+
343
+
344
+ var public_api_key = $('input[name="public_api_key"]').val();
345
+
346
+ $.ajax({
347
+ type: "post",
348
+ url: iub_js_vars['site_url'] + "/wp-admin/admin-ajax.php",
349
+ data : {action: "auto_detect_forms", public_api_key: public_api_key},
350
+ success: function(result) {
351
+ auto_detect_parent_div.removeClass("loader");
352
+ $("#auto-detect-forms").html(result);
353
+ $("#auto-detect-forms").css('visibility', 'visible');
354
+ },
355
+ error: function (jqXHR, exception) {
356
+ var msg = '';
357
+ if (jqXHR.status === 0) {
358
+ msg = 'Not connect.\n Verify Network.';
359
+ } else if (jqXHR.status == 404) {
360
+ msg = 'Requested page not found. [404]';
361
+ } else if (jqXHR.status == 500) {
362
+ msg = 'Internal Server Error [500].';
363
+ } else if (exception === 'parsererror') {
364
+ msg = 'Requested JSON parse failed.';
365
+ } else if (exception === 'timeout') {
366
+ msg = 'Time out error.';
367
+ } else if (exception === 'abort') {
368
+ msg = 'Ajax request aborted.';
369
+ } else {
370
+ msg = 'Uncaught Error.\n' + jqXHR.responseText;
371
+ }
372
+ console.log(msg);
373
+ },
374
+ });
375
+ }
376
+
377
+ function addCustomSection(evt){
378
+ evt.preventDefault();
379
+ const append_section = $($(evt.target).data('append-section'));
380
+ const cloned_section = $($(evt.target).data('clone-section'));
381
+
382
+ cloned_section.clone().each(function(){
383
+ this.id = Math.random(); // to keep it unique
384
+ $(this).find('input, textarea, button, select').prop('disabled', false);
385
+ }).appendTo(append_section).hide().fadeIn(300);
386
+ }
387
+
388
+ function removeCustomSection(evt){
389
+ evt.preventDefault();
390
+ $($(evt.target)).closest($(evt.target).data('remove-section')).remove();
391
+ $("#parent-selector :input").attr("disabled", true);
392
+ }
393
+
394
+ function requiredControl(evt){
395
+ if ($(evt.target).is(':checked')) {
396
+ $($(evt.target).data('required-control')).show();
397
+ } else {
398
+ $($(evt.target).data('required-control')).hide();
399
+ }
400
+ }
401
+
402
+ function updateButtonStyle(evt){
403
+ $('.iub-pp-code, .iub-tc-code').each(function() {
404
+ var text = $(this).html();
405
+ $(this).html(text.replace('white', $(evt.target).val()).replace('black', $(evt.target).val()));
406
+ });
407
+ }
408
+
409
+ // Sync embed code between TC live code and Readonly code
410
+ function syncEmbedCode(evt){
411
+ var ele = $($(evt.target));
412
+
413
+ if($('#iub-tc-code-'+ele.data('language')).length > 0){
414
+ $('#iub-tc-code-'+ele.data('language')).text(ele.val())
415
+ }
416
+ }
417
+
418
+ // Toggle elements status
419
+ function toggleCheckboxes(evt){
420
+ $($($(evt.target)).data('group')).each(function() {
421
+ // Prevent uncheck if they already checked
422
+ if($(evt.target).is(':checked')){
423
+ $(this).prop('checked', $(evt.target).is(':checked'));
424
+ }
425
+ $(this).attr('disabled', $(evt.target).is(':checked'));
426
+ });
427
+ }
428
+
429
+ // Start banner position script
430
+ $( document ).on( 'click', '.position-select > div > label', function ( e ) {
431
+ if (!$(this).closest('.position-select > div').hasClass('open')) {
432
+ $(this).closest('.position-select > div').addClass('open');
433
+ }
434
+ })
435
+
436
+ $(document).on('mousedown', function (e) {
437
+ var positionDropdown = $('.position-select > div.open');
438
+
439
+ if (positionDropdown.length &&
440
+ !positionDropdown.is(e.target) &&
441
+ positionDropdown.has(e.target).length === 0 &&
442
+ $('.pcr-app').has(e.target).length === 0
443
+ ) {
444
+ positionDropdown.removeClass('open');
445
+ }
446
+ });
447
+ // End banner position script
448
+
449
+ // Preferences fields
450
+ // Add new preferences field
451
+ $( document ).on( 'click', '.add-preferences-field', function ( e ) {
452
+ e.preventDefault();
453
+
454
+ $( '#postbox-container-2' ).change();
455
+
456
+ var html = $( '#preferences-field-template' ).html();
457
+ html = html.replace( /__PREFERENCE_ID__/g, $( '.preferences-field' ).length++ );
458
+
459
+ $( '.preferences-table .add-preferences-field' ).closest( 'tr' ).before( '<tr class="preferences-field options-field" style="display: none;">' + html + '</tr>' );
460
+
461
+ var last = $( '.preferences-field' ).last();
462
+
463
+ last.find('.preferences-inputs').prop('disabled',false)
464
+ last.fadeIn( 300 );
465
+ } );
466
+
467
+ // Remove preferences field
468
+ $( document ).on( 'click', '.remove-preferences-field', function ( e ) {
469
+ e.preventDefault();
470
+
471
+ $( '#postbox-container-2' ).change();
472
+
473
+ $( this ).closest( '.preferences-field' ).fadeOut( 300, function () {
474
+ $( this ).remove();
475
+ } );
476
+ } );
477
+
478
+ // Exclude fields
479
+ var excludeID = $( '.exclude-field' ).length;
480
+
481
+ // Add new preferences field
482
+ $( document ).on( 'click', '.add-exclude-field', function ( e ) {
483
+ e.preventDefault();
484
+
485
+ $( '#postbox-container-2' ).change();
486
+
487
+ var html = $( '#exclude-field-template' ).html();
488
+ html = html.replace( /__EXCLUDE_ID__/g, excludeID++ ).replace( 'disabled', '' );
489
+
490
+ $( '.exclude-table .add-exclude-field' ).closest( 'tr' ).before( '<tr class="exclude-field options-field" style="display: none;">' + html + '</tr>' );
491
+
492
+ var last = $( '.exclude-field' ).last();
493
+
494
+ last.fadeIn( 300 );
495
+ } );
496
+
497
+ // Remove exclude field
498
+ $( document ).on( 'click', '.remove-exclude-field', function ( e ) {
499
+ e.preventDefault();
500
+
501
+ $( '#postbox-container-2' ).change();
502
+
503
+ $( this ).closest( '.exclude-field' ).fadeOut( 300, function () {
504
+ $( this ).remove();
505
+ } );
506
+ } );
507
+
508
+ $( function () {
509
+ $('.cs-configuration-type').on('change', function() {
510
+ if($("input[name='iubenda_cookie_law_solution[configuration_type]']:checked").val() == 'simplified'){
511
+ $('.iub-language-code').attr("disabled", true)
512
+ } else {
513
+ $('.iub-language-code').attr("disabled", false)
514
+ }
515
+ }).trigger('change');
516
+
517
+ } );
518
+
519
+ // Legal notices fields
520
+ var legalNoticesID = $( '.legal_notices-field' ).length;
521
+
522
+ // Add new preferences field
523
+ $( document ).on( 'click', '.add-legal_notices-field', function ( e ) {
524
+ e.preventDefault();
525
+
526
+ $( '#postbox-container-2' ).change();
527
+
528
+ var html = $( '#legal_notices-field-template' ).html();
529
+ html = html.replace( /__LEGAL_NOTICE_ID__/g, legalNoticesID++ );
530
+
531
+ console.log( html );
532
+
533
+ $( '.legal_notices-table .add-legal_notices-field' ).closest( 'tr' ).before( '<tr class="legal_notices-field options-field" style="display: none;">' + html + '</tr>' );
534
+
535
+ var last = $( '.legal_notices-field' ).last();
536
+
537
+ last.find('.legal-notices-inputs').prop('disabled',false)
538
+ last.fadeIn( 300 );
539
+ } );
540
+
541
+ // Remove legal notices field
542
+ $( document ).on( 'click', '.remove-legal_notices-field', function ( e ) {
543
+ e.preventDefault();
544
+
545
+ $( '#postbox-container-2' ).change();
546
+
547
+ $( this ).closest( '.legal_notices-field' ).fadeOut( 300, function () {
548
+ $( this ).remove();
549
+ } );
550
+ } );
551
+
552
+ // Handle form fields data
553
+ $( document ).on( 'change', '#postbox-container-2', function() {
554
+ var fields = {},
555
+ fieldsTypes = [ 'subject', 'preferences', 'exclude' ];
556
+
557
+ if ( iub_js_vars['form_id'] > 0 ) {
558
+ // get all fields
559
+ fields.all = $( '.subject-fields-select.select-id option:not([value=""])' ).map( function() { return $( this ).val(); } ).get();
560
+
561
+ // get specific fields
562
+ $.each( fieldsTypes, function( index, fieldType ) {
563
+ fields[fieldType] = [];
564
+
565
+ var fieldItems = $( '.' + fieldType + '-field select' );
566
+
567
+ // get selected values
568
+ $.each( fieldItems, function( index, item ) {
569
+ if ( $( item ).val() != '' )
570
+ fields[fieldType].push( $( item ).val() );
571
+ } );
572
+
573
+ fields.fieldType = $.unique( fields[fieldType] );
574
+
575
+ // remove available fields if needed
576
+ if ( fields[fieldType].length > 0 ) {
577
+
578
+ // get options count
579
+ var templateItemsCount = $( '.template-field .' + fieldType + '-fields-select option:disabled' ).length;
580
+
581
+ // update if options count changed
582
+ if ( templateItemsCount !== 0 && fields[fieldType].length != templateItemsCount ) {
583
+ // console.log( fields[fieldType] );
584
+ }
585
+
586
+ // disable add button if needed
587
+ if ( fields.all.length == fields[fieldType].length ) {
588
+ $( '.add-' + fieldType + '-field' ).attr( 'disabled', 'disabled' );
589
+ } else {
590
+ $( '.add-' + fieldType + '-field' ).attr( 'disabled', false );
591
+ }
592
+
593
+ // adjust disabled options
594
+ $.each( fields.all, function( index, fieldName ) {
595
+ if ( $.inArray( fieldName, fields[fieldType] ) < 0 ) {
596
+ // options field
597
+ $( '.' + fieldType + '-fields-select option:not(:checked)[value="' + fieldName + '"]' ).attr( 'disabled', false );
598
+ // template field
599
+ $( '.template-field .' + fieldType + '-fields-select option[value="' + fieldName + '"]' ).attr( 'disabled', false );
600
+ } else {
601
+ $( '.' + fieldType + '-fields-select option:not(:checked)[value="' + fieldName + '"]' ).attr( 'disabled', 'disabled' );
602
+ $( '.template-field .' + fieldType + '-fields-select option[value="' + fieldName + '"]' ).attr( 'disabled', 'disabled' );
603
+ }
604
+ } );
605
+ }
606
+ } );
607
+
608
+ // console.log( fields );
609
+ }
610
+
611
+ } );
612
+
613
+ // Force trigger change on document ready
614
+ $( function() {
615
+ $( '#postbox-container-2' ).change();
616
+ } );
617
+
618
+ $( document ).on( 'mouseenter mouseleave', '#postbox-container-2 .options-field, #postbox-container-2 .submit-field', function() {
619
+ $( '#postbox-container-2' ).change();
620
+ } );
621
+
622
+ // Update _iub.quick_generator selected language
623
+ $(function($) {
624
+ $('#iub-website-language').on('change', function() {
625
+ try {
626
+ _iub.quick_generator.input.privacy_policy.langs = [$(this).val()]
627
+ }
628
+ catch(err) {
629
+ console.log(err)
630
+ }
631
+ }).trigger('change');
632
+ });
633
+
634
+ $( document ).on( 'click', '.notice-dismiss', function ( e ) {
635
+ e.preventDefault();
636
+ $(this).closest('div.is-dismissible').slideUp();
637
+ });
638
+ }(window, jQuery));
639
+
640
+ jQuery(document).ready(function($){
641
+ let activeRequest = false;
642
+ let completed = false;
643
+ setTimeout(ajax, 10);
644
+
645
+ function ajax(){
646
+ if((activeRequest) || (iub_js_vars['radar_status'] == 'completed'))
647
+ {
648
+ return;
649
+ }
650
+ activeRequest = true;
651
+ jQuery.ajax({
652
+ type: "post",
653
+ dataType: "json",
654
+ url: iub_js_vars['site_url'] + "/wp-admin/admin-ajax.php",
655
+ data : {action: "radar_percentage_reload"},
656
+ success: function(result){
657
+ if (result.status === 'timeout'){
658
+ activeRequest = false;
659
+ setTimeout(ajax, (parseInt(result.data) * 1000));
660
+ return
661
+ }
662
+
663
+ if (result.status === 'progress'){
664
+ activeRequest = false;
665
+ completed = true;
666
+ setTimeout(ajax, 10000);
667
+ return
668
+ }
669
+
670
+ if (result.status === 'error'){
671
+ $("#alert-div").addClass("alert--failure");
672
+ $("#alert-image").attr('src',iub_js_vars['site_url'] + '/wp-content/plugins/iubenda-cookie-wp-solution/assets/images/banner_failure.svg');
673
+ $("#alert-message").html(result.message);
674
+ $("#alert-div-container").fadeIn( 300 );
675
+ }
676
+
677
+ if (result.status === 'complete' && completed){
678
+ if($('#frontpage-main-box').length){
679
+ $.ajax({
680
+ type: "post",
681
+ url: iub_js_vars['site_url'] + "/wp-admin/admin-ajax.php",
682
+ data : {action: "frontpage_main_box"},
683
+ success: function(response) {
684
+ $('#frontpage-main-box').html(response)
685
+ document.querySelectorAll(".circularBar").forEach(function (el) {
686
+ $(el).attr('data-perc', result.data.percentage);
687
+ circularBar(el);
688
+ });
689
+ },
690
+ });
691
+ }
692
+ }
693
+ }
694
+ })
695
+ setTimeout(ajax, 10000);
696
+ }
697
+ });
{js → assets/js}/frontend.js RENAMED
@@ -111,7 +111,7 @@
111
  };
112
 
113
  // send only if specific form has been submitted
114
- if ( (selector.parentElement.id == e.target.parentElement.id) || (selector.parentElement.id == e.target.id) ) {
115
  _this.submitForm( form, formArgs );
116
 
117
  _iub.cons.sendData();
111
  };
112
 
113
  // send only if specific form has been submitted
114
+ if ( selector.parentElement.id == e.target.parentElement.id ) {
115
  _this.submitForm( form, formArgs );
116
 
117
  _iub.cons.sendData();
assets/js/tabs.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;(function (global, $) {
2
+
3
+ $(document).on('click','.tabs__nav__item', function(e){
4
+
5
+ var navItem = $(this);
6
+ var parent = navItem.closest('.tabs');
7
+ var target = parent.find('.tabs__target[data-target="'+navItem.data('target')+'"]');
8
+ var groupNavs = parent.find('.tabs__nav__item[data-group="'+navItem.data('group')+'"]');
9
+ var groupTargets = parent.find('.tabs__target[data-group="'+navItem.data('group')+'"]');
10
+
11
+ groupNavs.removeClass('active');
12
+ groupTargets.removeClass('active');
13
+ navItem.addClass('active');
14
+
15
+ groupTargets.hide();
16
+ target.show();
17
+
18
+ // target.find('.tabs__nav__item:first-of-type').click();
19
+
20
+ });
21
+
22
+ $(document).ready(function(){
23
+ // $('.tabs__nav__item:first-of-type').click();
24
+ });
25
+ }(window, jQuery));
css/admin.css DELETED
@@ -1,164 +0,0 @@
1
- #iubenda-header {
2
- margin-bottom: 30px;
3
- }
4
- .iubenda-title {
5
- margin-top: 10px;
6
- font-weight: bold;
7
- }
8
- .iubenda-link {
9
- display: table;
10
- margin: 0 auto 10px;
11
- }
12
- .iubenda-text {
13
- margin: 10px auto;
14
- color: #434149
15
- }
16
- .button.button-primary.iub-autodetect-forms {
17
- background: #1CC691;
18
- border-color: #169970;
19
- box-shadow: 0 1px 0 #138461;
20
- text-shadow: 0 -1px 1px #138461,1px 0 1px #138461,0 1px 1px #138461,-1px 0 1px #138461;
21
- display: inline-block;
22
- margin-bottom: 30px;
23
- }
24
- .button.button-primary.iub-autodetect-forms:hover {
25
- background: #1ACC94;
26
- }
27
- .button.button-primary.iub-autodetect-forms:focus {
28
- box-shadow: 0 1px 0 #138461,0 0 2px 1px #1CC691;
29
- }
30
- #iubenda-consent-forms .tablenav.bottom {
31
- display: none;
32
- }
33
- #iubenda-tabs .submit.submit-cons {
34
- padding-top: 0;
35
- }
36
- #iubenda-tabs {
37
- margin: 30px auto 20px;
38
- }
39
- #iub_parser_engine_container {
40
- margin-top: 10px;
41
- }
42
- #iub_parser_engine_container > div:not(:last-child) {
43
- margin-bottom: 10px;
44
- }
45
- #iub_amp_options_container {
46
- margin-top: 10px;
47
- }
48
- #iub_amp_options_container > div:not(:last-child) {
49
- margin-bottom: 10px;
50
- }
51
- #iubenda-tabs .contextual-help-wrap {
52
- overflow: auto;
53
- margin: 0;
54
- position: relative;
55
- }
56
- #iubenda-tabs .contextual-help-back {
57
- position: absolute;
58
- top: 0;
59
- bottom: 0;
60
- left: 150px;
61
- right: 0;
62
- border: 1px solid #e1e1e1;
63
- background: #f6fbfd;
64
- }
65
- #iubenda-tabs .contextual-help-columns {
66
- position: relative;
67
- }
68
- #iubenda-tabs .help-tab-content {
69
- margin-right: 0;
70
- }
71
- #iubenda-tabs .help-tab-content .description {
72
- margin-bottom: 10px;
73
- }
74
- #iubenda-tabs .help-tab-content .custom-script-field, #iubenda-tabs .help-tab-content .custom-iframe-field {
75
- padding-bottom: 10px;
76
- }
77
- #iubenda-tabs .help-tab-content .custom-script-field input, #iubenda-tabs .help-tab-content .custom-iframe-field input {
78
- vertical-align: middle;
79
- }
80
- #tab-panel-scripts, #tab-panel-iframes {
81
- margin-top: 16px;
82
- margin-bottom: 18px;
83
- }
84
- #iubenda-tabs .postbox-container .widefat {
85
- border: none;
86
- box-shadow: none;
87
- }
88
- #iubenda-tabs .postbox-container .widefat h4 {
89
- margin: 8px 0;
90
- }
91
- #iubenda-tabs .postbox-container .widefat select {
92
- min-width: 50%;
93
- }
94
- #iubenda-tabs .postbox-container .widefat thead .label {
95
- font-weight: bold;
96
- }
97
- #iubenda-tabs .postbox-container .widefat .table-label {
98
- width: 25%;
99
- }
100
- #iubenda-tabs .postbox-container .widefat thead td {
101
- border: none;
102
- width: 50%;
103
- }
104
- #iubenda-tabs .postbox-container .widefat .widefat tbody td {
105
- padding-top: 5px;
106
- padding-bottom: 5px;
107
- }
108
- .iubenda-notice {
109
- border-left-color: #1CC691;
110
- padding-left: 0;
111
- display: flex;
112
- justify-content: flex-start;
113
- align-items: center;
114
- }
115
- .iubenda-notice::before {
116
- display: inline-block;
117
- content: '';
118
- height: 49px;
119
- width: 22px;
120
- margin: 1em 2em;
121
- background-size: contain;
122
- background-position: center center;
123
- background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIyMjFweCIgaGVpZ2h0PSI0OTBweCIgdmlld0JveD0iMCAwIDIyMSA0OTAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+aXViZW5kYSB2ZWN0b3IgbG9nb192M19vbmx5X2lfZ3JlZW48L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJpdWJlbmRhLXZlY3Rvci1sb2dvX3YzX29ubHlfaV9ncmVlbiIgZmlsbD0iIzFDQzY5MSIgZmlsbC1ydWxlPSJub256ZXJvIj4gICAgICAgICAgICA8cGF0aCBkPSJNMjIwLjYsMTA4LjQgQzIyMC42LDEzNSAyMTAuOCwxNTkuMyAxOTQuNSwxNzguMSBMMjE3LjksNDg5LjQgTDguNSw0ODkuNCBMMzEuMiwxODMuNSBDMTEuOSwxNjQuMiAwLDEzNy43IDAsMTA4LjQgQzAsNDguNyA0OS40LDAuNCAxMTAuMywwLjQgQzE3MS4yLDAuNCAyMjAuNiw0OC43IDIyMC42LDEwOC40IFogTTExMC4zLDEzMyBDMTI1LDEzMyAxMzYuOCwxMjEuMiAxMzYuOCwxMDYuNyBDMTM2LjgsOTIuMiAxMjQuOSw4MC41IDExMC4zLDgwLjUgQzk1LjYsODAuNSA4My44LDkyLjMgODMuOCwxMDYuNyBDODMuOCwxMjEuMyA5NS42LDEzMyAxMTAuMywxMzMgWiBNMTMxLjIsMjI3IEw5NC45LDI2My4zIEw5NC45LDQwMy44IEwxMzEuMiw0MDMuOCBMMTMxLjIsMjI3IFoiIGlkPSJTaGFwZSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+);
124
- }
125
- .iubenda-notice .notice-question {
126
- margin-bottom: 5px;
127
- display: block;
128
- }
129
- .iubenda-notice .notice-reply {
130
- margin-top: 0;
131
- }
132
- .iubenda-notice .step-2 {
133
- display: none;
134
- }
135
- .iubenda-notice .reply-yes {
136
- margin-right: 10px;
137
- }
138
- .iubenda-notice .reply-yes:before,
139
- .iubenda-notice .reply-no:before {
140
- font-family: dashicons;
141
- display: inline-block;
142
- line-height: 1;
143
- font-weight: 400;
144
- font-style: normal;
145
- speak: none;
146
- text-decoration: inherit;
147
- text-transform: none;
148
- text-rendering: auto;
149
- -webkit-font-smoothing: antialiased;
150
- -moz-osx-font-smoothing: grayscale;
151
- width: 20px;
152
- height: 20px;
153
- font-size: 20px;
154
- vertical-align: top;
155
- text-align: center;
156
- transition: color .1s ease-in;
157
- text-decoration: none;
158
- }
159
- .iubenda-notice .reply-yes:before {
160
- content: "\f147";
161
- }
162
- .iubenda-notice .reply-no:before {
163
- content: "\f335";
164
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/CookieSolutionGenerator.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) )
4
+ exit;
5
+
6
+ /**
7
+ * Class CookieSolutionGenerator
8
+ */
9
+ class CookieSolutionGenerator {
10
+
11
+ /**
12
+ * @param $language
13
+ * @param $siteId
14
+ * @param $cookiePolicyId
15
+ * @param array $args
16
+ * @return string
17
+ */
18
+ public function handle($language, $siteId, $cookiePolicyId, $args = []) {
19
+ // Return if there is no public ID or site ID
20
+ if(!$cookiePolicyId || !$siteId){
21
+ return null;
22
+ }
23
+
24
+ // Handle if the website is single language
25
+ if($language == 'default'){
26
+ $language = iubenda()->lang_current;
27
+ }
28
+
29
+ // Workaround to solve return languages if has 'pt' language
30
+ // polylang or wpml
31
+ if($language == 'pt' || $language == 'pt-br'){
32
+ $language = 'pt-BR';
33
+ }
34
+
35
+ $beforeConfiguration = '
36
+ <script type="text/javascript">
37
+ var _iub = _iub || [];
38
+ _iub.csConfiguration =';
39
+ $afterConfiguration = '</script>';
40
+
41
+ $csConfiguration = [
42
+ 'floatingPreferencesButtonDisplay' => 'bottom-right',
43
+ 'lang' => $language,
44
+ 'siteId' => $siteId,
45
+ 'cookiePolicyId' => $cookiePolicyId,
46
+ 'whitelabel' => false,
47
+ 'invalidateConsentWithoutLog' => true,
48
+ ];
49
+ $csConfiguration['banner']['closeButtonDisplay'] = false;
50
+
51
+ $legislation = array_get($args, 'legislation');
52
+
53
+ // If legislation is GDPR or Both
54
+ if ($legislation == 'gdpr' || $legislation == 'both'){
55
+ $csConfiguration['consentOnContinuedBrowsing'] = false;
56
+ $csConfiguration['perPurposeConsent'] = true;
57
+ $csConfiguration['purposes'] = '1,2,3,4,5';
58
+ $csConfiguration['banner']['listPurposes'] = true;
59
+ $csConfiguration['banner']['explicitWithdrawal'] = true;
60
+
61
+ $explicit_reject = array_get($args, 'explicit_reject');
62
+ if ($explicit_reject || true == array_get($args, 'tcf')) {
63
+ $csConfiguration['banner']['rejectButtonDisplay'] = true;
64
+ }
65
+
66
+ $explicit_accept = array_get($args, 'explicit_accept');
67
+ if ($explicit_accept || true == array_get($args, 'tcf')) {
68
+ $csConfiguration['banner']['acceptButtonDisplay'] = true;
69
+ $csConfiguration['banner']['customizeButtonDisplay'] = true;
70
+ }
71
+
72
+ // If Require Consent is EU Only
73
+ if(array_get($args, 'require_consent') == 'eu_only'){
74
+ $csConfiguration['countryDetection'] = true;
75
+ $csConfiguration['gdprAppliesGlobally'] = false;
76
+ }
77
+ }
78
+
79
+ // If legislation is CCPA or Both
80
+ if ($legislation == 'ccpa' || $legislation == 'both'){
81
+ $csConfiguration['enableCcpa'] = true;
82
+
83
+ // If Require Consent is Worldwide
84
+ if(array_get($args, 'require_consent') == 'worldwide'){
85
+ $csConfiguration['ccpaApplies'] = true;
86
+ }
87
+ $afterConfiguration .= '
88
+ <script type="text/javascript" src="//cdn.iubenda.com/cs/ccpa/stub.js"></script>
89
+ ';
90
+ }
91
+
92
+ // If legislation is CCPA
93
+ if ($legislation == 'ccpa'){
94
+ // If Require Consent is Worldwide
95
+ if(array_get($args, 'require_consent') == 'worldwide'){
96
+ $csConfiguration['enableGdpr'] = false;
97
+ }
98
+ }
99
+
100
+ // conditions on TCF is enabled
101
+ if (($legislation == 'gdpr' || $legislation == 'both') && true == array_get($args, 'tcf')){
102
+ $csConfiguration['enableTcf'] = true;
103
+ $csConfiguration['banner']['closeButtonRejects'] = true;
104
+ $csConfiguration['tcfPurposes']['1'] = true;
105
+ $csConfiguration['tcfPurposes']['2'] = 'consent_only';
106
+ $csConfiguration['tcfPurposes']['3'] = 'consent_only';
107
+ $csConfiguration['tcfPurposes']['4'] = 'consent_only';
108
+ $csConfiguration['tcfPurposes']['5'] = 'consent_only';
109
+ $csConfiguration['tcfPurposes']['6'] = 'consent_only';
110
+ $csConfiguration['tcfPurposes']['7'] = 'consent_only';
111
+ $csConfiguration['tcfPurposes']['8'] = 'consent_only';
112
+ $csConfiguration['tcfPurposes']['9'] = 'consent_only';
113
+ $csConfiguration['tcfPurposes']['10'] = 'consent_only';
114
+
115
+ $afterConfiguration .= '
116
+ <script type="text/javascript" src="//cdn.iubenda.com/cs/tcf/stub-v2.js"></script>
117
+ <script type="text/javascript" src="//cdn.iubenda.com/cs/tcf/safe-tcf-v2.js"></script>
118
+ ';
119
+ }
120
+ $csConfiguration['banner']['position'] = str_replace('full-', '', array_get($args, 'position'));
121
+
122
+ $bannerStyle = array_get($args, 'banner_style');
123
+ if ('light' == $bannerStyle) {
124
+ $csConfiguration['banner']['style'] = 'light';
125
+ $csConfiguration['banner']['textColor'] = '#000000';
126
+ $csConfiguration['banner']['backgroundColor'] = '#FFFFFF';
127
+ $csConfiguration['banner']['customizeButtonCaptionColor'] = '#4D4D4D';
128
+ $csConfiguration['banner']['customizeButtonColor'] = '#DADADA';
129
+ }else{
130
+ $csConfiguration['banner']['style'] = 'dark';
131
+ }
132
+
133
+ $background_overlay = array_get($args, 'background_overlay');
134
+ if ($background_overlay) {
135
+ $csConfiguration['banner']['backgroundOverlay'] = true;
136
+ }
137
+
138
+ $afterConfiguration .= '
139
+ <script type="text/javascript" src="//cdn.iubenda.com/cs/iubenda_cs.js" charset="UTF-8" async></script>
140
+ ';
141
+
142
+ return $beforeConfiguration.json_encode($csConfiguration)."; ".$afterConfiguration;
143
+ }
144
+ }
includes/PrivacyPolicyGenerator.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) )
4
+ exit;
5
+
6
+ /**
7
+ * Class PrivacyPolicyGenerator
8
+ */
9
+ class PrivacyPolicyGenerator {
10
+
11
+ /**
12
+ * @param $language
13
+ * @param $cookiePolicyId
14
+ * @param $buttonStyle
15
+ * @return string
16
+ */
17
+ public function handle($language, $cookiePolicyId, $buttonStyle) {
18
+ // Return if there is no public id
19
+ if(!$cookiePolicyId){
20
+ return null;
21
+ }
22
+
23
+ $privacyTitle = $language == 'default' ? __2('Privacy Policy', 'iubenda', $language) : __('Privacy Policy', 'iubenda');
24
+
25
+ $ppConfiguration = '
26
+ <a href="https://www.iubenda.com/privacy-policy/'.$cookiePolicyId.'" class="iubenda-'.$buttonStyle.' no-brand iubenda-noiframe iubenda-embed iubenda-noiframe " title="'.$privacyTitle.'">'.$privacyTitle.'</a><script type="text/javascript">(function (w,d) {var loader = function () {var s = d.createElement("script"), tag = d.getElementsByTagName("script")[0]; s.src="https://cdn.iubenda.com/iubenda.js"; tag.parentNode.insertBefore(s,tag);}; if(w.addEventListener){w.addEventListener("load", loader, false);}else if(w.attachEvent){w.attachEvent("onload", loader);}else{w.onload = loader;}})(window, document);</script>
27
+ ';
28
+
29
+ return $ppConfiguration;
30
+ }
31
+ }
includes/ProductHelper.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // exit if accessed directly
3
+ if (!defined('ABSPATH')) exit;
4
+
5
+ /**
6
+ * Class ProductHelper
7
+ */
8
+ class ProductHelper
9
+ {
10
+
11
+ /**
12
+ * @param $lang_id
13
+ * @return string
14
+ */
15
+ public function get_cs_embed_code_by_lang($lang_id): string
16
+ {
17
+ $code = array_get(iubenda()->options['cs'], "manual_code_{$lang_id}");
18
+ if (!$code) {
19
+ $code = array_get(iubenda()->options['cs'], "code_{$lang_id}");
20
+ }
21
+
22
+ return html_entity_decode(iubenda()->parse_code($code));
23
+ }
24
+
25
+ /**
26
+ * @param $lang_id
27
+ * @return string
28
+ */
29
+ public function get_pp_embed_code_by_lang($lang_id): string
30
+ {
31
+ return $this->get_embed_code('pp', $lang_id);
32
+ }
33
+
34
+ /**
35
+ * @param $lang_id
36
+ * @return string
37
+ */
38
+ public function get_tc_embed_code_by_lang($lang_id): string
39
+ {
40
+ return $this->get_embed_code('tc', $lang_id);
41
+ }
42
+
43
+ /**
44
+ * Get all languages if website is multilingual and return default if website is single language
45
+ *
46
+ * @return array|string[]
47
+ */
48
+ public function get_languages(): array
49
+ {
50
+ if (iubenda()->multilang && !empty(iubenda()->languages)) {
51
+ return iubenda()->languages;
52
+ }
53
+
54
+ return ['default' => 'default_language'];
55
+ }
56
+
57
+
58
+ /**
59
+ * @param $key
60
+ * @param $lang_id
61
+ * @return string
62
+ */
63
+ private function get_embed_code($key, $lang_id): string
64
+ {
65
+ $code = array_get(iubenda()->options[$key], "code_{$lang_id}");
66
+
67
+ return html_entity_decode(iubenda()->parse_code($code));
68
+ }
69
+
70
+ /**
71
+ * Check Iubenda CS code exists on current lang or not
72
+ *
73
+ * @return bool
74
+ */
75
+ public function check_iub_cs_code_exists_current_lang(): bool
76
+ {
77
+ return $this->check_iub_code_exists_current_lang('cs');
78
+ }
79
+
80
+ /**
81
+ * Check Iubenda $key code exists on current lang or not
82
+ *
83
+ * @param $key
84
+ * @return bool
85
+ */
86
+ private function check_iub_code_exists_current_lang($key): bool
87
+ {
88
+ // Check if there is multi language plugin installed and activated
89
+ if ( iubenda()->multilang === true && defined( 'ICL_LANGUAGE_CODE' ) && isset( iubenda()->options['cs']['code_' . ICL_LANGUAGE_CODE] ) ) {
90
+ $iubenda_code = iubenda()->options[$key]['code_' . ICL_LANGUAGE_CODE];
91
+
92
+ // no code for current language, use default
93
+ if ( ! $iubenda_code ){
94
+ $iubenda_code = iubenda()->options[$key]['code_default'];
95
+ }
96
+ } else{
97
+ $iubenda_code = iubenda()->options[$key]['code_default'];
98
+ }
99
+
100
+ return boolval(trim($iubenda_code));
101
+ }
102
+ }
includes/QuickGeneratorService.php ADDED
@@ -0,0 +1,600 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // exit if accessed directly
3
+ if (!defined('ABSPATH'))
4
+ exit;
5
+
6
+ /**
7
+ * Class QuickGeneratorService
8
+ */
9
+ class QuickGeneratorService
10
+ {
11
+ private $apiKey = '66f95ff033e00b0a6bb38d34665eab80e39b7ef7';
12
+
13
+ private $url = [
14
+ 'create_privacy_policy' => 'https://www.iubenda.com/api/transactions',
15
+ ];
16
+ public $QG_Response = [];
17
+
18
+ public function __construct(){
19
+ $this->QG_Response = get_option(iubenda_Settings::IUB_QG_Response, []) ?: [];
20
+ }
21
+
22
+ protected function get_mapped_language_on_local($iub_lang_code)
23
+ {
24
+ $result = [];
25
+ $iub_lang_code = strtolower(str_replace('-', '_', $iub_lang_code));
26
+
27
+ foreach (iubenda()->languages_locale as $wordpress_locale => $lang_code) {
28
+ // lower case and replace - with underscore
29
+ $lower_wordpress_locale = strtolower(str_replace('-', '_', $wordpress_locale));
30
+ // Map after all both codes becomes lower case and underscore
31
+
32
+ // Map en iubenda language to wordpress languages en_us
33
+ if ($iub_lang_code == 'en' && $lower_wordpress_locale == 'en_us') {
34
+ $result[] = $lang_code;
35
+ continue;
36
+ }
37
+
38
+ // Map iubenda language to wordpress languages
39
+ if ($iub_lang_code == $lower_wordpress_locale) {
40
+ $result[] = $lang_code;
41
+ continue;
42
+ }
43
+
44
+ // Map any pt iubenda language to any wordpress languages starts with pt
45
+ if (strpos($iub_lang_code, 'pt_') === 0 && strpos($lower_wordpress_locale, 'pt') === 0) {
46
+ $result[] = $lang_code;
47
+ continue;
48
+ }
49
+
50
+ // Cases iubenda languages without _ mapped to
51
+ if ($iub_lang_code == strstr($lower_wordpress_locale, '_', true)) {
52
+ $result[] = $lang_code;
53
+ continue;
54
+ }
55
+ // Map any XX_ iubenda language to any wordpress languages starts with XX_
56
+ if ((strpos($iub_lang_code, '_') === 0 && strstr($iub_lang_code, '_', true)) && (strpos($lower_wordpress_locale, '_') === 0 && strstr($lower_wordpress_locale, '_', true))) {
57
+ $result[] = $lang_code;
58
+ continue;
59
+ }
60
+
61
+ if ($lower_wordpress_locale == $iub_lang_code) {
62
+ $result[] = $lang_code;
63
+ continue;
64
+ }
65
+ }
66
+
67
+ return $result;
68
+ }
69
+
70
+ public function quick_generator_api()
71
+ {
72
+ $public_ids = [];
73
+ $privacy_policies = [];
74
+ $site_id = null;
75
+
76
+ $body = array_get($_POST, 'payload');
77
+ $user = array_get($body, 'user');
78
+
79
+ $multi_lang = boolval(iubenda()->multilang && !empty(iubenda()->languages));
80
+
81
+ foreach (array_get($body, 'privacy_policies', []) ?? [] as $key => $privacy_policy) {
82
+ //getting site id to save it into Iubenda global option
83
+ if(!$site_id){
84
+ $site_id = array_get($privacy_policy, 'site_id');
85
+ }
86
+
87
+ if($multi_lang){
88
+ if($local_lang_codes = $this->get_mapped_language_on_local($privacy_policy['lang'])){
89
+ foreach ($local_lang_codes as $local_lang_code){
90
+ $privacy_policies[$local_lang_code] = $privacy_policy;
91
+
92
+ //getting public id to save it into Iubenda global option default lang
93
+ $public_ids[$local_lang_code] = array_get($privacy_policy, 'public_id');
94
+ }
95
+ }
96
+ }else{
97
+ $privacy_policies['default'] = $privacy_policy;
98
+
99
+ //getting public id to save it into Iubenda global option default lang
100
+ $public_ids['default'] = array_get($privacy_policy, 'public_id');
101
+ }
102
+ }
103
+
104
+ $configuration = [
105
+ 'website' => array_get($_POST, 'website'),
106
+ 'user' => [
107
+ 'id' => array_get($user, 'id'),
108
+ 'email' => array_get($user, 'email'),
109
+ ],
110
+ 'privacy_policies' => $privacy_policies,
111
+ ];
112
+
113
+ update_option(iubenda_Settings::IUB_QG_Response, $configuration);
114
+ update_option( 'iubenda_global_options', ['site_id' => $site_id, 'public_ids' => $public_ids] );
115
+
116
+ iubenda()->settings->add_notice( 'iub_integrated_success', __( 'Your website has been created and your legal documents have been generated. Setup your cookie banner and privacy policy button to complete the integration.', 'iubenda' ), 'success' );
117
+
118
+ echo json_encode([
119
+ 'status' => 'done',
120
+ 'redirect' => admin_url( 'admin.php?page=iubenda&view=integrate-setup') ,
121
+ ]);
122
+ wp_die();
123
+ }
124
+
125
+ public function integrate_setup()
126
+ {
127
+ if(array_get($_POST, 'cookie_law') == 'on'){
128
+ // Saving CS data with CS function
129
+ $this->cs_save_options();
130
+ }
131
+
132
+ if(array_get($_POST, 'privacy_policy') == 'on'){
133
+ // Saving PP data with PP function
134
+ $this->pp_save_options();
135
+ }
136
+
137
+ if (array_get($_POST, 'cookie_law') == 'on' || array_get($_POST, 'privacy_policy') == 'on') {
138
+ //add notice that`s notice user the integrate has been done successfully
139
+ iubenda()->settings->add_notice('iub_integrated_success', __('Our products has been integrated successfully, now customize all products to increase the compliance rating and make your website fully compliant.', 'iubenda'), 'success');
140
+ }
141
+
142
+ echo json_encode(['status' => 'done']);
143
+ wp_die();
144
+ }
145
+
146
+ public function save_public_api_key()
147
+ {
148
+ if(empty(array_get($_POST, 'public_api_key'))){
149
+ echo json_encode(['status' => 'error', 'responseText' => "invalid public API key" ]);
150
+ wp_die();
151
+ }
152
+ update_option('iubenda_consent_solution', ['public_api_key' => array_get($_POST, 'public_api_key')]);
153
+
154
+ $iubenda_activated_products = get_option('iubenda_activated_products');
155
+ $iubenda_activated_products['iubenda_consent_solution'] = 'true';
156
+ update_option('iubenda_activated_products', $iubenda_activated_products);
157
+
158
+ echo json_encode(['status' => 'done']);
159
+ wp_die();
160
+ }
161
+
162
+ public function auto_detect_forms()
163
+ {
164
+ iubenda()->forms->autodetect_forms();
165
+
166
+ require_once IUBENDA_PLUGIN_PATH . 'views/partials/auto_detect_forms.php';
167
+ wp_die();
168
+
169
+ }
170
+
171
+ public function add_footer()
172
+ {
173
+ if(array_get(iubenda()->settings->services, 'pp.status') == 'true' && array_get(iubenda()->options['pp'], 'button_position') == 'automatic'){
174
+ echo $this->pp_button();
175
+ }
176
+ if(array_get(iubenda()->settings->services, 'tc.status') == 'true' && array_get(iubenda()->options['tc'], 'button_position') == 'automatic'){
177
+ echo $this->tc_button();
178
+ }
179
+ }
180
+
181
+ public function tc_button_shortcode(){
182
+ if ((array_get(iubenda()->settings->services, 'tc.status') == 'true') && (array_get(iubenda()->options['tc'], 'button_position') == 'manual')) {
183
+ return $this->tc_button();
184
+ }
185
+ return "[iub-tc-button]";
186
+ }
187
+
188
+ public function tc_button(){
189
+ if ( iubenda()->multilang && ! empty( iubenda()->lang_current ) ) {
190
+ $code = array_get(iubenda()->options, 'tc.code_'.iubenda()->lang_current) ?? null;
191
+ } else {
192
+ $code = array_get(iubenda()->options, 'tc.code_default') ?? null;
193
+ }
194
+
195
+ return $code;
196
+ }
197
+
198
+ public function pp_button_shortcode(){
199
+ if (array_get(iubenda()->settings->services, 'pp.status') == 'true' && array_get(iubenda()->options['pp'], 'button_position') != 'automatic') {
200
+ return $this->pp_button();
201
+ }
202
+ return "[iub-pp-button]";
203
+ }
204
+
205
+ public function pp_button(){
206
+ $privacy_policy_generator = new PrivacyPolicyGenerator();
207
+
208
+ if ( iubenda()->multilang && ! empty( iubenda()->lang_current ) ) {
209
+ $code = array_get(iubenda()->options, 'pp.code_'.iubenda()->lang_current) ?? null;
210
+ } else {
211
+ $code = array_get(iubenda()->options, 'pp.code_default') ?? null;
212
+ }
213
+
214
+ if (!$code){
215
+ if ( iubenda()->multilang && ! empty( iubenda()->lang_current ) ) {
216
+ $public_id = array_get(iubenda()->options['global_options'], 'public_ids.'.iubenda()->lang_current);
217
+ } else {
218
+ $public_id = array_get(iubenda()->options['global_options'], 'public_ids.default');
219
+ }
220
+
221
+ $code = $privacy_policy_generator->handle('default', $public_id, array_get(iubenda()->options, 'pp.button_style'));
222
+ }
223
+
224
+ return $code;
225
+ }
226
+
227
+ public function ajax_save_options()
228
+ {
229
+ $iubenda_section_name = array_get($_POST, 'iubenda_section_name');
230
+ $iubenda_section_key = array_get($_POST, 'iubenda_section_key');
231
+
232
+ // If section == CS save by CS function
233
+ if($iubenda_section_key == 'cs'){
234
+ $this->cs_save_options(false);
235
+ }
236
+ else{
237
+ $codes_statues = [];
238
+ $global_options = iubenda()->options['global_options'];
239
+
240
+ $section_new_option = array_get($_POST, $iubenda_section_name);
241
+ $old_section_options = iubenda()->options[$iubenda_section_key];
242
+
243
+ if($iubenda_section_name == 'iubenda_terms_conditions_solution') {
244
+ foreach($section_new_option as $index => $option) {
245
+ if(substr( $index, 0, 5 ) === "code_"){
246
+ $parsed_code = iubenda()->parse_tc_pp_configuration(stripslashes_deep($option));
247
+
248
+ if ($parsed_code) {
249
+ $codes_statues["{$iubenda_section_name}_codes"][] = true;
250
+ $global_options['public_ids'][substr($index, 5)] = array_get($parsed_code, 'cookie_policy_id');
251
+ }else{
252
+ $codes_statues["{$iubenda_section_name}_codes"][] = false;
253
+ }
254
+ }
255
+ }
256
+
257
+ // validating Embed Codes of TC contains at least one valid code
258
+ if(count(array_filter($codes_statues["{$iubenda_section_name}_codes"])) == 0){
259
+ echo json_encode(['status' => 'error', 'responseText' => "( {$iubenda_section_name} ) At least one code must be valid."]);
260
+ wp_die();
261
+ }
262
+ }
263
+
264
+ // Update buttons style & position
265
+ // Privacy policy Button
266
+ if($iubenda_section_name == 'iubenda_privacy_policy_solution') {
267
+ // Add a widget in the sidebar if the button is positioned automatically
268
+ if('automatic' === array_get($section_new_option, 'button_position')){
269
+ do_action('iubenda_assign_widget_to_first_sidebar');
270
+ }
271
+
272
+ // Merge old old PP options with new options to update codes with new style
273
+ $old_section_options = $old_section_options ? $this->stripslashes_deep($old_section_options) : [];
274
+ $section_new_option = array_merge($old_section_options, $section_new_option);
275
+
276
+ // Update PP codes with new button style
277
+ $section_new_option = $this->update_button_style($section_new_option, 'pp');
278
+ }
279
+
280
+ // Terms and conditions Button
281
+ if($iubenda_section_name == 'iubenda_terms_conditions_solution') {
282
+ // Add a widget in the sidebar if the button is positioned automatically
283
+ if('automatic' === array_get($section_new_option, 'button_position')){
284
+ do_action('iubenda_assign_widget_to_first_sidebar');
285
+ }
286
+
287
+ // Update TC codes with new button style
288
+ $section_new_option = $this->update_button_style($section_new_option, 'tc');
289
+ }
290
+
291
+ //set the product configured option true
292
+ $section_new_option['configured'] = 'true';
293
+
294
+ $iubenda_activated_products = get_option('iubenda_activated_products');
295
+ $iubenda_activated_products[$iubenda_section_name] = 'true';
296
+ update_option('iubenda_activated_products', $iubenda_activated_products);
297
+
298
+ $section_new_option = $this->stripslashes_deep($section_new_option);
299
+ if($old_section_options){
300
+ $old_section_options = $this->stripslashes_deep($old_section_options);
301
+ $section_new_option = array_merge($old_section_options, $section_new_option);
302
+ }
303
+ update_option($iubenda_section_name, $section_new_option);
304
+
305
+ //update iubenda global options (public_ids)
306
+ update_option( 'iubenda_global_options', $global_options );
307
+ }
308
+
309
+ echo json_encode(['status' => 'done']);
310
+ wp_die();
311
+ }
312
+
313
+ private function prepare_custom_scripts_iframes($data, $flag ) {
314
+ return array_combine(
315
+ array_get($data, $flag),
316
+ array_get($data, 'type')
317
+ );
318
+ }
319
+
320
+ private function stripslashes_deep($value)
321
+ {
322
+ $value = is_array($value) ?
323
+ array_map('stripslashes_deep', $value) :
324
+ stripslashes($value);
325
+
326
+ return $value;
327
+ }
328
+
329
+ /**.
330
+ * Update button style in options
331
+ *
332
+ * @param $options
333
+ * @param $service
334
+ * @return array
335
+ */
336
+ public function update_button_style($options, $service): array
337
+ {
338
+ if($service == 'pp'){
339
+ $privacy_policy_generator = new PrivacyPolicyGenerator();
340
+ }
341
+
342
+ $new_options = [];
343
+ $button_style = array_get($options, 'button_style');
344
+
345
+ foreach($options as $key => $index){
346
+ $new_options[$key] = $index;
347
+
348
+ if(substr( $key, 0, 5 ) === "code_"){
349
+ if($service == 'pp'){
350
+ // Get public_id for this language
351
+ $public_id = array_get(iubenda()->options['global_options'], "public_ids.".substr( $key, 5 ), false) ?: false;
352
+
353
+ if ((!$index || empty($index)) && $public_id) {
354
+ $index = $privacy_policy_generator->handle(substr( $key, 5 ), $public_id, iubenda()->options['pp']);
355
+ }
356
+ }
357
+
358
+ $new_code = str_replace(['iubenda-black', 'iubenda-white'], "iubenda-{$button_style}",$index);
359
+ $new_options[$key] = $new_code;
360
+ }
361
+ }
362
+ return $new_options;
363
+ }
364
+
365
+ /**
366
+ * saving Iubenda cookie law solution options
367
+ * @param bool $default_options
368
+ */
369
+ private function cs_save_options($default_options = true)
370
+ {
371
+ $iubenda_cookie_solution_generator = new CookieSolutionGenerator;
372
+ $global_options = iubenda()->options['global_options'];
373
+
374
+ $codes_statues = [];
375
+ $site_id = null;
376
+ $new_cs_option = array_get($_POST, 'iubenda_cookie_law_solution');
377
+
378
+ if (!$default_options) {
379
+ //CS plugin general options
380
+ $new_cs_option['parse'] = (bool)isset($new_cs_option['parse']);
381
+ $new_cs_option['parser_engine'] = isset($new_cs_option['parser_engine']) && in_array($new_cs_option['parser_engine'], ['default', 'new']) ? $new_cs_option['parser_engine'] : iubenda()->defaults['cs']['parser_engine'];
382
+ $new_cs_option['skip_parsing'] = (bool)isset($new_cs_option['skip_parsing']);
383
+ $new_cs_option['ctype'] = (bool)isset($new_cs_option['ctype']);
384
+ $new_cs_option['output_feed'] = (bool)isset($new_cs_option['output_feed']);
385
+ $new_cs_option['output_post'] = (bool)isset($new_cs_option['output_post']);
386
+ $new_cs_option['menu_position'] = isset($new_cs_option['menu_position']) && in_array($new_cs_option['menu_position'], ['topmenu', 'submenu']) ? $new_cs_option['menu_position'] : iubenda()->defaults['cs']['menu_position'];
387
+ $new_cs_option['amp_support'] = array_get($new_cs_option, 'amp_support', false) ?: false;
388
+ $new_cs_option['deactivation'] = (bool)isset($new_cs_option['deactivation']);
389
+ }
390
+
391
+ if(isset($new_cs_option['custom_scripts'])){
392
+ $new_cs_option['custom_scripts'] = $this->prepare_custom_scripts_iframes( array_get($new_cs_option, 'custom_scripts'), 'script');
393
+
394
+ // Set all selected values Int to not break compatibility with old version
395
+ $new_cs_option['custom_scripts'] = array_map('intval' , $new_cs_option['custom_scripts']);
396
+ }else{
397
+ $new_cs_option['custom_scripts'] = [];
398
+ }
399
+
400
+ if(isset($new_cs_option['custom_iframes'])){
401
+ $new_cs_option['custom_iframes'] = $this->prepare_custom_scripts_iframes( array_get($new_cs_option, 'custom_iframes'), 'iframe');
402
+
403
+ // Set all selected values Int to not break compatibility with old version
404
+ $new_cs_option['custom_iframes'] = array_map('intval' , $new_cs_option['custom_iframes']);
405
+ }else{
406
+ $new_cs_option['custom_iframes'] = [];
407
+ }
408
+
409
+ if ('simplified' === array_get($new_cs_option, 'configuration_type')) {
410
+ // Check explicit accept & reject forced on if TCF is on
411
+ if(true == array_get($new_cs_option, 'simplified.tcf')){
412
+ $new_cs_option['simplified']['explicit_accept'] = 'on';
413
+ $new_cs_option['simplified']['explicit_reject'] = 'on';
414
+ }
415
+ $languages = (new ProductHelper())->get_languages();
416
+ // loop on iubenda->>language
417
+ foreach ($languages as $lang_id => $lang_name) {
418
+ $privacy_policy_id = array_get($global_options, "public_ids.{$lang_id}");
419
+
420
+ if(!$privacy_policy_id){
421
+ continue;
422
+ }
423
+
424
+ $site_id = array_get(iubenda()->options, 'global_options.site_id') ?: null;
425
+
426
+ // Generating CS Simplified code
427
+ $cs_embed_code = $iubenda_cookie_solution_generator->handle($lang_id, $site_id, $privacy_policy_id, array_get($new_cs_option, 'simplified'));
428
+
429
+ $new_cs_option["code_{$lang_id}"] = $this->stripslashes_deep($cs_embed_code);
430
+
431
+ // generate amp template file if the code is valid
432
+ if($cs_embed_code){
433
+ // generate amp template file
434
+ if ($new_cs_option['amp_support']) {
435
+ $template_done[$lang_id] = false;
436
+
437
+ $template_done[$lang_id] = (bool)iubenda()->AMP->generate_amp_template($cs_embed_code, $lang_id);
438
+
439
+ // Check if AMP is checked and the auto generated option is selected
440
+ if ("1" == $new_cs_option['amp_support'] && 'local' == $new_cs_option['amp_source']) {
441
+
442
+ if (is_bool($template_done[$lang_id]) && false === $template_done[$lang_id]) {
443
+ $message = "Currently, you do not have write permission for <i>%s</i>. For instructions on how to fix this, please read <a target=\"_blank\" href=\"%s\">our guide</a>.";
444
+ $our_guide_URL = 'https://www.iubenda.com/en/help/1215-cookie-solution-wordpress-plugin-installation-guide#amp-permissions';
445
+ $file_path = IUBENDA_PLUGIN_PATH . 'templates' . DIRECTORY_SEPARATOR;
446
+ add_settings_error('cs_settings_errors', 'iub_cs_settings_updated', __(sprintf($message, $file_path, $our_guide_URL), 'iubenda'), 'error');
447
+ }
448
+ }
449
+
450
+ $new_cs_option['amp_template_done'] = $template_done;
451
+
452
+ // TODO need to checked with AMP files url
453
+ if (is_array($new_cs_option['amp_template'])) {
454
+ foreach ($new_cs_option['amp_template'] as $lang => $template) {
455
+ $new_cs_option['amp_template'][$lang] = esc_url($template);
456
+ }
457
+ } else {
458
+ $new_cs_option['amp_template'] = esc_url($new_cs_option['amp_template']);
459
+ }
460
+ }
461
+ }
462
+ }
463
+ }
464
+ elseif('manual' === array_get($new_cs_option, 'configuration_type')){
465
+ foreach($new_cs_option as $index => $option) {
466
+ //check code if valid or not
467
+ if (substr($index, 0, 5) === "code_" && !empty($option)) {
468
+ // Getting data from embed code
469
+ $parsed_code = iubenda()->parse_configuration(stripslashes_deep($option));
470
+
471
+ // if code parsed correctly
472
+ if(!$parsed_code){
473
+ $codes_statues[substr($index, 5)] = false;
474
+ continue;
475
+ }
476
+ $new_cs_option['manual_'."$index"] = $option;
477
+ $codes_statues[substr($index, 5)] = true;
478
+
479
+ //getting cookiePolicyId to save it into Iubenda global option
480
+ $global_options['public_ids'][substr($index, 5)] = array_get($parsed_code, 'cookiePolicyId');
481
+
482
+ //getting site id to save it into Iubenda global option
483
+ if(!$site_id){
484
+ $site_id = array_get($parsed_code, 'siteId');
485
+ }
486
+
487
+ // generate amp template file
488
+ if ($new_cs_option['amp_support']) {
489
+ $lang_id = substr($index, 5);
490
+ $template_done[$lang_id] = false;
491
+
492
+ $template_done[$lang_id] = (bool)iubenda()->AMP->generate_amp_template(stripslashes_deep($option), $lang_id);
493
+
494
+ // Check if AMP is checked and the auto generated option is selected
495
+ if ("1" == $new_cs_option['amp_support'] && 'local' == $new_cs_option['amp_source']) {
496
+
497
+ if (is_bool($template_done[$lang_id]) && false === $template_done[$lang_id]) {
498
+ $message = "Currently, you do not have write permission for <i>%s</i>. For instructions on how to fix this, please read <a target=\"_blank\" href=\"%s\">our guide</a>.";
499
+ $our_guide_URL = 'https://www.iubenda.com/en/help/1215-cookie-solution-wordpress-plugin-installation-guide#amp-permissions';
500
+ $file_path = IUBENDA_PLUGIN_PATH . 'templates' . DIRECTORY_SEPARATOR;
501
+ add_settings_error('cs_settings_errors', 'iub_cs_settings_updated', __(sprintf($message, $file_path, $our_guide_URL), 'iubenda'), 'error');
502
+ }
503
+ }
504
+
505
+ $new_cs_option['amp_template_done'] = $template_done;
506
+
507
+ // TODO need to checked with AMP files url
508
+ if (is_array($new_cs_option['amp_template'])) {
509
+ foreach ($new_cs_option['amp_template'] as $lang => $template) {
510
+ $new_cs_option['amp_template'][$lang] = esc_url($template);
511
+ }
512
+ } else {
513
+ $new_cs_option['amp_template'] = esc_url($new_cs_option['amp_template']);
514
+ }
515
+ }
516
+ }
517
+ }
518
+ // validating Embed Codes of CS contains at least one valid code
519
+ if(count(array_filter($codes_statues)) == 0){
520
+ echo json_encode(['status' => 'error', 'responseText' => "( Iubenda cookie law solution ) At least one code must be valid."]);
521
+ wp_die();
522
+ }
523
+ }
524
+
525
+ //set the product configured option true
526
+ $new_cs_option['configured'] = 'true';
527
+
528
+ // update only cs make it activated service
529
+ iubenda()->options['activated_products']['iubenda_cookie_law_solution'] = 'true';
530
+ update_option('iubenda_activated_products', iubenda()->options['activated_products']);
531
+
532
+ // saving new options merged by old options
533
+ $new_cs_option = $this->stripslashes_deep($new_cs_option);
534
+ $old_cs_options = $this->stripslashes_deep(iubenda()->options['cs']);
535
+
536
+ $new_cs_option = array_merge($old_cs_options, $new_cs_option);
537
+ update_option('iubenda_cookie_law_solution', $new_cs_option);
538
+
539
+ // save site ID into Iubenda global option
540
+ if($site_id){
541
+ $global_options['site_id'] = $site_id;
542
+ }
543
+
544
+ //update iubenda global options (site_id & public_ids)
545
+ iubenda()->options['global_options'] = $global_options;
546
+ update_option( 'iubenda_global_options', $global_options );
547
+ }
548
+
549
+ /**
550
+ * saving Iubenda privacy policy solution options
551
+ */
552
+ private function pp_save_options()
553
+ {
554
+ // TODO enhance more
555
+ $privacy_policy_generator = new PrivacyPolicyGenerator();
556
+ $global_options = iubenda()->options['global_options'];
557
+
558
+ $languages = (new ProductHelper())->get_languages();
559
+ // loop on iubenda->>language
560
+ foreach ($languages as $lang_id => $v) {
561
+ $privacy_policy_id = null;
562
+
563
+ // getting privacy policy id from saved QG response
564
+ $privacy_policy_id = array_get($global_options, "public_ids.{$lang_id}");
565
+
566
+ if(!$privacy_policy_id){
567
+ continue;
568
+ }
569
+
570
+ // Insert PP Simplified code into options
571
+ $pp_embed_code = $privacy_policy_generator->handle($lang_id, $privacy_policy_id, array_get($_POST, 'iubenda_privacy_policy_solution.button_style'));
572
+
573
+ $pp_data["code_{$lang_id}"] = $pp_embed_code;
574
+
575
+ //getting public id to save it into Iubenda global option for each lang
576
+ $global_options['public_ids'][$lang_id] = $privacy_policy_id;
577
+ }
578
+
579
+ // Add a widget in the sidebar if the button is positioned automatically
580
+ if('automatic' === array_get($_POST, 'iubenda_privacy_policy_solution.button_position')){
581
+ do_action('iubenda_assign_widget_to_first_sidebar');
582
+ }
583
+
584
+ // Set the version of PP service as Simplified
585
+ $pp_data["version"] = 'Simplified';
586
+
587
+ // Set the configured status as true
588
+ $pp_data["configured"] = 'true';
589
+
590
+ update_option("iubenda_privacy_policy_solution", array_merge($pp_data, array_get($_POST, 'iubenda_privacy_policy_solution')));
591
+
592
+ // update only pp make it activated service
593
+ iubenda()->options['activated_products']['iubenda_privacy_policy_solution'] = 'true';
594
+ update_option('iubenda_activated_products', iubenda()->options['activated_products']);
595
+
596
+ //update iubenda global options (site_id & public_ids)
597
+ iubenda()->options['global_options'] = $global_options;
598
+ update_option( 'iubenda_global_options', $global_options );
599
+ }
600
+ }
includes/RadarService.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) )
4
+ exit;
5
+
6
+
7
+ /**
8
+ * Class Radar_API
9
+ */
10
+ class RadarService {
11
+
12
+ private $authorization = [
13
+ 'username' => 'devops',
14
+ 'password' => 'orIDiVvPVdHvwyjM4',
15
+ ];
16
+ private $serviceRating = '';
17
+
18
+ private $url = [
19
+ 'match-async' => 'https://radar.iubenda.com/api/match-async',
20
+ 'match-progress' => 'https://radar.iubenda.com/api/match-progress',
21
+ ];
22
+
23
+ public $apiConfiguration = [];
24
+
25
+ private $updateMessage = "Please, make also sure the plugin is updated to the <a target='_blank' href='https://wordpress.org/plugins/iubenda-cookie-law-solution/'><u> latest version.</u></a>";
26
+
27
+ public function __construct(){
28
+ $this->serviceRating = new ServiceRating();
29
+ $this->apiConfiguration = get_option('iubenda_radar_api_configuration', []) ?: [];
30
+ }
31
+
32
+ public function askRadarToSendRequest(){
33
+ if (!empty($this->apiConfiguration)) {
34
+ return $this->send_radar_progress_request();
35
+ }
36
+
37
+ return $this->send_radar_sync_request();
38
+ }
39
+
40
+ public function forceDeleteRadarConfiguration(){
41
+ delete_option('iubenda_radar_api_configuration');
42
+ return true;
43
+ }
44
+
45
+ public function calculate_radar_percentage(){
46
+ $services['pp'] = $this->serviceRating->isPrivacyPolicyActivated();
47
+ $services['cs'] = $this->serviceRating->isCookieSolutionActivated();
48
+ $services['cons'] = $this->serviceRating->isCookieSolutionConfigured();
49
+ $services['tc'] = $this->serviceRating->isTermsConditionsActivated();
50
+
51
+ return [
52
+ 'percentage' => (count(array_filter($services)) / count($services)) * 100,
53
+ 'services' => $services
54
+ ];
55
+ }
56
+
57
+ private function send_radar_sync_request()
58
+ {
59
+ $website = get_site_url();
60
+ $data = ['timeout' => 30,
61
+ 'redirection' => 5,
62
+ 'httpversion' => '1.0',
63
+ 'headers' => ['Authorization' => 'Basic ' . base64_encode($this->authorization['username'] . ':' . $this->authorization['password'])],
64
+ 'body' => ['url' => $website, 'detectLegalDocuments' => 'true'],
65
+ ];
66
+
67
+ $response = wp_remote_get(array_get($this->url, 'match-async'), $data);
68
+ $responseCode = wp_remote_retrieve_response_code($response);
69
+
70
+ //check response code
71
+ $this->checkResponse($response, $responseCode);
72
+
73
+ $body = json_decode(array_get($response, 'body'), true);
74
+
75
+ $body['trial_num'] = 1;
76
+ $body['next_trial'] = time();
77
+
78
+ update_option('iubenda_radar_api_configuration', $body);
79
+
80
+ if (defined('DOING_AJAX') && DOING_AJAX) {
81
+ wp_send_json(['code' => $responseCode, 'status' => 'progress',]);
82
+ wp_die();
83
+ }
84
+
85
+ return true;
86
+ }
87
+
88
+ private function send_radar_progress_request()
89
+ {
90
+ $iubendaRadarApiConfiguration = $this->apiConfiguration;
91
+
92
+
93
+ if (array_get($iubendaRadarApiConfiguration, 'status') == 'completed') {
94
+ if (defined('DOING_AJAX') && DOING_AJAX) {
95
+ wp_send_json(['code' => '200', 'status' => 'complete', 'data' => $this->calculate_radar_percentage(),]);
96
+ wp_die();
97
+ }
98
+
99
+ return true;
100
+ }
101
+
102
+ // Check if the next trial is not now
103
+ if(intval(array_get($iubendaRadarApiConfiguration, 'next_trial')) > time()){
104
+ $nextRequestInSec = intval(array_get($iubendaRadarApiConfiguration, 'next_trial')) - (time());
105
+
106
+ wp_send_json(['code' => '200', 'status' => 'timeout', 'data' => $nextRequestInSec,]);
107
+ wp_die();
108
+ }
109
+
110
+ $nextTrial = time();
111
+ $trialNum = intval(array_get($iubendaRadarApiConfiguration, 'trial_num', 1) ?? 1);
112
+
113
+ // Check if 3 trials were made in this round
114
+ if(is_int($trialNum / 3)){
115
+ $rounds = $trialNum / 3 ;
116
+ $nextTrial = time() + (pow(30, $rounds));
117
+ }
118
+ $trialNum++;
119
+
120
+ $id = array_get($iubendaRadarApiConfiguration, 'id');
121
+
122
+ $data = [
123
+ 'timeout' => 30,
124
+ 'redirection' => 5,
125
+ 'httpversion' => '1.0',
126
+ 'headers' => ['Authorization' => 'Basic ' . base64_encode($this->authorization['username'] . ':' . $this->authorization['password'])],
127
+ 'body' => ['id' => $id],
128
+ ];
129
+
130
+ $response = wp_remote_get(array_get($this->url, 'match-progress'), $data);
131
+ $responseCode = wp_remote_retrieve_response_code($response);
132
+
133
+ //check response code
134
+ $this->checkResponse($response, $responseCode);
135
+
136
+ $body = json_decode(array_get($response, 'body'), true);
137
+ $body['trial_num'] = $trialNum;
138
+ $body['next_trial'] = $nextTrial;
139
+
140
+ update_option('iubenda_radar_api_configuration', $body);
141
+
142
+ if (defined('DOING_AJAX') && DOING_AJAX) {
143
+ wp_send_json(['code' => $responseCode, 'status' => 'progress',]);
144
+ wp_die();
145
+ }
146
+
147
+ return true;
148
+ }
149
+
150
+ private function checkResponse($response, $responseCode)
151
+ {
152
+ if (is_wp_error($response) || $responseCode != 200) {
153
+ if (!is_numeric($responseCode)) {
154
+ $message = $this->updateMessage;
155
+ } elseif ($responseCode == 408) {
156
+ //408 error code it`s mean request timeout
157
+ $message = $this->updateMessage;
158
+ } elseif (is_numeric(substr($responseCode, 0, 1)) == 4) {
159
+ //4xx error codes
160
+ $message = $this->updateMessage;
161
+ } else {
162
+ $message = "Something went wrong: " . $response->get_error_message();
163
+ }
164
+
165
+ wp_send_json(['code' => $responseCode, 'status' => 'error', 'message' => $message]);
166
+ wp_die();
167
+ }
168
+ }
169
+
170
+ }
includes/ServiceRating.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) )
4
+ exit;
5
+
6
+
7
+ /**
8
+ * Class ServiceRating
9
+ */
10
+ class ServiceRating {
11
+ public $radarApiConfiguration = [];
12
+
13
+ public function __construct(){
14
+ $this->radarApiConfiguration = get_option('iubenda_radar_api_configuration', []) ?: [];
15
+ }
16
+
17
+ public function isCookieSolutionActivated(){
18
+ if(array_get(iubenda()->settings->services, 'cs.status') == 'true'){
19
+ return true;
20
+ }
21
+
22
+ if($this->isServiceInstalledByRadar('cp') == true){
23
+ return true;
24
+ }
25
+ return false;
26
+ }
27
+
28
+ public function isCookieSolutionConfigured(){
29
+ if(array_get(iubenda()->settings->services, 'cs.configured') == 'true'){
30
+ return true;
31
+ }
32
+
33
+ if($this->isServiceInstalledByRadar('cp') == true){
34
+ return true;
35
+ }
36
+ return false;
37
+ }
38
+
39
+ public function isPrivacyPolicyActivated(){
40
+ if(array_get(iubenda()->settings->services, 'pp.status') == 'true'){
41
+ return true;
42
+ }
43
+
44
+ if($this->isServiceInstalledByRadar('pp') == true){
45
+ return true;
46
+ }
47
+ return false;
48
+ }
49
+
50
+ public function isTermsConditionsActivated(){
51
+ if(array_get(iubenda()->settings->services, 'tc.status') == 'true'){
52
+ return true;
53
+ }
54
+
55
+ if($this->isServiceInstalledByRadar('tc') == true){
56
+ return true;
57
+ }
58
+ return false;
59
+ }
60
+
61
+ private function isServiceInstalledByRadar($service){
62
+ if(array_get($this->radarApiConfiguration, 'status') == 'completed'){
63
+ return array_get($this->radarApiConfiguration, 'result.meta.'.$service.'_installed');
64
+ }
65
+ return false;
66
+ }
67
+
68
+ public function checkServiceStatus($service){
69
+ if($service == 'cs'){
70
+ return $this->isCookieSolutionActivated();
71
+ }
72
+ if($service == 'cons'){
73
+ return $this->isCookieSolutionConfigured();
74
+ }
75
+ if($service == 'pp'){
76
+ return $this->isPrivacyPolicyActivated();
77
+ }
78
+ if($service == 'tc'){
79
+ return $this->isTermsConditionsActivated();
80
+ }
81
+
82
+ return false;
83
+ }
84
+
85
+ public function servicesPercentage(){
86
+ $services['pp'] = $this->isPrivacyPolicyActivated();
87
+ $services['cs'] = $this->isCookieSolutionActivated();
88
+ $services['cons'] = $this->isCookieSolutionActivated() ? $this->isCookieSolutionConfigured() : false;
89
+ $services['tc'] = $this->isTermsConditionsActivated();
90
+
91
+ return (count(array_filter($services)) / count($services)) * 100;
92
+ }
93
+
94
+ }
includes/forms-list-table.php CHANGED
@@ -25,7 +25,7 @@ class iubenda_List_Table_Forms extends WP_List_Table {
25
  'ajax' => false
26
  ) );
27
 
28
- $this->base_url = esc_url_raw( add_query_arg( array( 'tab' => 'cons' ), iubenda()->base_url ) );
29
  }
30
 
31
 
@@ -83,7 +83,6 @@ class iubenda_List_Table_Forms extends WP_List_Table {
83
  */
84
  public function get_columns() {
85
  $columns = array(
86
- 'cb' => '<input type="checkbox"/>',
87
  'title' => __( 'Form Title', 'iubenda' ),
88
  'ID' => __( 'Form ID', 'iubenda' ),
89
  'source' => __( 'Form Source', 'iubenda' ),
@@ -148,8 +147,8 @@ class iubenda_List_Table_Forms extends WP_List_Table {
148
 
149
  $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-form_{$item->ID}" ) );
150
  $url = add_query_arg( array( 'form_id' => $item->ID ), $this->base_url );
151
- $edit_url = add_query_arg( array( 'action' => 'edit' ), $url );
152
- $delete_url = add_query_arg( array( 'action' => 'delete' ), $url ) . "&$del_nonce";
153
 
154
  // preorder it: View | Approve | Unapprove | Delete
155
  $actions = array(
@@ -157,7 +156,7 @@ class iubenda_List_Table_Forms extends WP_List_Table {
157
  'delete' => ''
158
  );
159
 
160
- $actions['view'] = "<a href='$edit_url' aria-label='" . esc_attr__( 'Edit this form', 'iubenda' ) . "'>" . __( 'Edit' ) . '</a>';
161
  $actions['delete'] = "<a href='$delete_url' aria-label='" . esc_attr__( 'Delete this form', 'iubenda' ) . "'>" . __( 'Delete', 'iubenda' ) . '</a>';
162
 
163
  $i = 0;
@@ -223,17 +222,6 @@ class iubenda_List_Table_Forms extends WP_List_Table {
223
  return $output;
224
  }
225
 
226
- /**
227
- * Display checkboxex callback.
228
- *
229
- * @return string
230
- */
231
- public function column_cb( $item ) {
232
- return sprintf(
233
- '<input type="checkbox" name="%1$s[]" value="%2$s" />', 'form', $item->ID
234
- );
235
- }
236
-
237
  /**
238
  * Generate the table navigation above or below the table
239
  *
@@ -269,7 +257,7 @@ class iubenda_List_Table_Forms extends WP_List_Table {
269
 
270
  if ( ! empty( $output ) ) {
271
  echo $output;
272
- submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
273
  }
274
  }
275
  ?>
@@ -339,7 +327,7 @@ class iubenda_List_Table_Forms extends WP_List_Table {
339
  }
340
 
341
  $views = $items_total > 0 ? array(
342
- 'all' => '<a href="' . $this->base_url . '"' . ($status === '' ? ' class="current"' : '') . '>' . esc_html__( 'All' ) . ' <span class="count">(' . $items_total . ')</span></a>'
343
  ) : '';
344
 
345
  foreach ( iubenda()->forms->statuses as $key => $view ) {
@@ -359,4 +347,89 @@ class iubenda_List_Table_Forms extends WP_List_Table {
359
  echo __( 'No forms found.', 'iubenda' );
360
  }
361
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  }
25
  'ajax' => false
26
  ) );
27
 
28
+ $this->base_url = esc_url_raw( add_query_arg( array( 'view' => 'cons-configuration' ), iubenda()->base_url ) );
29
  }
30
 
31
 
83
  */
84
  public function get_columns() {
85
  $columns = array(
 
86
  'title' => __( 'Form Title', 'iubenda' ),
87
  'ID' => __( 'Form ID', 'iubenda' ),
88
  'source' => __( 'Form Source', 'iubenda' ),
147
 
148
  $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-form_{$item->ID}" ) );
149
  $url = add_query_arg( array( 'form_id' => $item->ID ), $this->base_url );
150
+ $edit_url = add_query_arg( array( 'view' => 'cons-form-edit' ), $url );
151
+ $delete_url = add_query_arg( ['view' => 'cons-configuration', 'action' => 'delete'], $url ) . "&$del_nonce";
152
 
153
  // preorder it: View | Approve | Unapprove | Delete
154
  $actions = array(
156
  'delete' => ''
157
  );
158
 
159
+ $actions['view'] = "<a href='$edit_url' aria-label='" . esc_attr__( 'Edit this form', 'iubenda' ) . "'>" . __( 'Edit', 'iubenda' ) . '</a>';
160
  $actions['delete'] = "<a href='$delete_url' aria-label='" . esc_attr__( 'Delete this form', 'iubenda' ) . "'>" . __( 'Delete', 'iubenda' ) . '</a>';
161
 
162
  $i = 0;
222
  return $output;
223
  }
224
 
 
 
 
 
 
 
 
 
 
 
 
225
  /**
226
  * Generate the table navigation above or below the table
227
  *
257
 
258
  if ( ! empty( $output ) ) {
259
  echo $output;
260
+ submit_button( __( 'Filter', 'iubenda' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
261
  }
262
  }
263
  ?>
327
  }
328
 
329
  $views = $items_total > 0 ? array(
330
+ 'all' => '<a href="' . $this->base_url . '"' . ($status === '' ? ' class="current"' : '') . '>' . esc_html__( 'All', 'iubenda' ) . ' <span class="count">(' . $items_total . ')</span></a>'
331
  ) : '';
332
 
333
  foreach ( iubenda()->forms->statuses as $key => $view ) {
347
  echo __( 'No forms found.', 'iubenda' );
348
  }
349
 
350
+ /**
351
+ * Prints column headers, accounting for hidden and sortable columns.
352
+ *
353
+ * @since 3.1.0
354
+ *
355
+ * @param bool $with_id Whether to set the ID attribute or not
356
+ */
357
+ public function print_column_headers( $with_id = true ) {
358
+ list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
359
+
360
+ $current_url = remove_query_arg( 'paged', $this->base_url );
361
+
362
+ if ( isset( $_GET['orderby'] ) ) {
363
+ $current_orderby = $_GET['orderby'];
364
+ } else {
365
+ $current_orderby = '';
366
+ }
367
+
368
+ if ( isset( $_GET['order'] ) && 'desc' === $_GET['order'] ) {
369
+ $current_order = 'desc';
370
+ } else {
371
+ $current_order = 'asc';
372
+ }
373
+
374
+ if ( ! empty( $columns['cb'] ) ) {
375
+ static $cb_counter = 1;
376
+ $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All', 'iubenda' ) . '</label>'
377
+ . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
378
+ $cb_counter++;
379
+ }
380
+
381
+ foreach ( $columns as $column_key => $column_display_name ) {
382
+ $class = array( 'manage-column', "column-$column_key" );
383
+
384
+ if ( in_array( $column_key, $hidden, true ) ) {
385
+ $class[] = 'hidden';
386
+ }
387
+
388
+ if ( 'cb' === $column_key ) {
389
+ $class[] = 'check-column';
390
+ } elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ), true ) ) {
391
+ $class[] = 'num';
392
+ }
393
+
394
+ if ( $column_key === $primary ) {
395
+ $class[] = 'column-primary';
396
+ }
397
+
398
+ if ( isset( $sortable[ $column_key ] ) ) {
399
+ list( $orderby, $desc_first ) = $sortable[ $column_key ];
400
+
401
+ if ( $current_orderby === $orderby ) {
402
+ $order = 'asc' === $current_order ? 'desc' : 'asc';
403
+
404
+ $class[] = 'sorted';
405
+ $class[] = $current_order;
406
+ } else {
407
+ $order = strtolower( $desc_first );
408
+
409
+ if ( ! in_array( $order, array( 'desc', 'asc' ), true ) ) {
410
+ $order = $desc_first ? 'desc' : 'asc';
411
+ }
412
+
413
+ $class[] = 'sortable';
414
+ $class[] = 'desc' === $order ? 'asc' : 'desc';
415
+ }
416
+
417
+ $column_display_name = sprintf(
418
+ '<a href="%s"><span>%s</span><span class="sorting-indicator"></span></a>',
419
+ esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ),
420
+ $column_display_name
421
+ );
422
+ }
423
+
424
+ $tag = ( 'cb' === $column_key ) ? 'td' : 'th';
425
+ $scope = ( 'th' === $tag ) ? 'scope="col"' : '';
426
+ $id = $with_id ? "id='$column_key'" : '';
427
+
428
+ if ( ! empty( $class ) ) {
429
+ $class = "class='" . implode( ' ', $class ) . "'";
430
+ }
431
+
432
+ echo "<$tag $scope $id $class>$column_display_name</$tag>";
433
+ }
434
+ }
435
  }
includes/forms.php CHANGED
@@ -115,7 +115,7 @@ class iubenda_Forms {
115
  */
116
  public function wp_enqueue_scripts() {
117
  if ( ! empty( iubenda()->options['cons']['public_api_key'] ) ) {
118
- wp_register_script( 'iubenda-forms', IUBENDA_PLUGIN_URL . '/js/frontend.js', array( 'jquery' ), iubenda()->version, true );
119
 
120
  $args = array();
121
 
@@ -982,8 +982,6 @@ class iubenda_Forms {
982
  break;
983
  }
984
 
985
- $forms = apply_filters("iub_after_call_{$source}_forms", $forms);
986
-
987
  return $forms;
988
  }
989
 
115
  */
116
  public function wp_enqueue_scripts() {
117
  if ( ! empty( iubenda()->options['cons']['public_api_key'] ) ) {
118
+ wp_register_script( 'iubenda-forms', IUBENDA_PLUGIN_URL . '/assets/js/frontend.js', array( 'jquery' ), iubenda()->version, true );
119
 
120
  $args = array();
121
 
982
  break;
983
  }
984
 
 
 
985
  return $forms;
986
  }
987
 
includes/settings.php CHANGED
@@ -9,37 +9,65 @@ if ( ! defined( 'ABSPATH' ) )
9
  * @class Post_Views_Counter_Settings
10
  */
11
  class iubenda_Settings {
12
-
13
- public $tabs = array();
14
  public $action = '';
15
- public $links = array();
16
- public $notice_types = array( 'error', 'success', 'notice' );
17
- public $subject_fields = array();
 
 
 
18
 
19
  public function __construct() {
 
 
 
 
20
  // actions
21
  add_action( 'after_setup_theme', array( $this, 'load_defaults' ) );
22
- add_action( 'admin_init', array( $this, 'register_options' ) );
23
  add_action( 'admin_init', array( $this, 'update_plugin' ), 9 );
24
- add_action( 'admin_init', array( $this, 'admin_page_redirect' ), 20 );
25
- add_action( 'admin_init', array( $this, 'process_actions' ), 20 );
26
- add_action( 'admin_init', array( $this, 'maybe_show_notice' ) );
27
  add_action( 'admin_menu', array( $this, 'admin_menu_options' ) );
28
- add_action( 'admin_notices', array( $this, 'settings_errors' ) );
29
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
30
- add_action( 'admin_print_styles', array( $this, 'admin_print_styles' ) );
31
- // add_action( 'admin_footer-options-discussion.php', array( $this, 'admin_footer' ) );
32
- add_action( 'wp_ajax_iubenda_dismiss_notice', array( $this, 'dismiss_notice' ) );
33
-
34
- // filters
35
- add_filter( 'submenu_file', array( $this, 'submenu_file' ), 10, 2 );
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  /**
39
  * Load default settings.
40
  */
41
  public function load_defaults() {
42
- $this->subject_fields = array(
 
 
43
  'id' => __( 'string', 'iubenda' ),
44
  'email' => __( 'string', 'iubenda' ),
45
  'first_name' => __( 'string', 'iubenda' ),
@@ -77,26 +105,156 @@ class iubenda_Settings {
77
  4 => __( 'Analytics', 'iubenda' ),
78
  5 => __( 'Targeting & Advertising', 'iubenda' )
79
  );
 
 
 
80
 
81
  $links = array(
82
  'en' => array(
83
  'iab' => 'https://www.iubenda.com/en/help/7440-enable-preference-management-iab-framework',
84
- 'guide' => 'https://www.iubenda.com/en/cookie-solution',
 
85
  'plugin_page' => 'https://www.iubenda.com/en/help/posts/1215',
86
- 'generating_code' => 'https://www.iubenda.com/en/help/1177-cookie-solution-getting-started',
87
  'support_forum' => 'https://support.iubenda.com/support/home',
88
- 'documentation' => 'https://www.iubenda.com/en/help/posts/1215'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  ),
90
- 'it' => array(
91
- 'iab' => 'https://www.iubenda.com/en/help/7440-enable-preference-management-iab-framework',
92
- 'guide' => 'https://www.iubenda.com/it/cookie-solution',
93
- 'plugin_page' => 'https://www.iubenda.com/it/help/posts/810',
94
- 'generating_code' => 'https://www.iubenda.com/it/help/680-introduzione-cookie-solution',
95
- 'support_forum' => 'https://support.iubenda.com/support/home',
96
- 'documentation' => 'https://www.iubenda.com/it/help/posts/810',
97
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  );
99
 
 
 
 
 
 
100
  $locale = explode( '_', get_locale() );
101
  $locale_code = $locale[0];
102
 
@@ -108,62 +266,11 @@ class iubenda_Settings {
108
  // update item action
109
  $this->action = 'save';
110
  } else {
111
- $this->action = isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ? esc_attr( $_REQUEST['action'] ) : '';
112
- $this->action = isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ? esc_attr( $_REQUEST['action2'] ) : $this->action;
113
- }
114
- }
115
-
116
- /**
117
- * Register plugin options.
118
- *
119
- * @return void
120
- */
121
- public function register_options() {
122
- register_setting( 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution', array( $this, 'save_cookie_law_options' ) );
123
-
124
- add_settings_section( 'iubenda_cookie_law_solution', '', '', 'iubenda_cookie_law_solution' );
125
- add_settings_field( 'iub_code', __( 'Code', 'iubenda' ), array( $this, 'iub_code' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
126
- add_settings_field( 'iub_amp_support', __( 'Google AMP', 'iubenda' ), array( $this, 'iub_amp_support' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
127
- add_settings_field( 'iub_parse', __( 'Script blocking', 'iubenda' ), array( $this, 'iub_parse' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
128
- add_settings_field( 'iub_custom_scripts', __( 'Custom scripts', 'iubenda' ), array( $this, 'iub_custom_scripts' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
129
- add_settings_field( 'iub_ctype', __( 'Content type', 'iubenda' ), array( $this, 'iub_ctype' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
130
- add_settings_field( 'iub_output_feed', __( 'RSS feed', 'iubenda' ), array( $this, 'iub_output_feed' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
131
- add_settings_field( 'iub_output_post', __( 'POST requests', 'iubenda' ), array( $this, 'iub_output_post' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
132
- add_settings_field( 'iub_menu_position', __( 'Menu position', 'iubenda' ), array( $this, 'iub_menu_position' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
133
- add_settings_field( 'iub_deactivation', __( 'Deactivation', 'iubenda' ), array( $this, 'iub_deactivation' ), 'iubenda_cookie_law_solution', 'iubenda_cookie_law_solution' );
134
-
135
- // forms list
136
- if ( ! in_array( $this->action, array( 'save', 'edit' ) ) ) {
137
- register_setting( 'iubenda_consent_solution', 'iubenda_consent_solution', array( $this, 'save_consent_options' ) );
138
- add_settings_section( 'iubenda_consent_solution', __( 'Forms', 'iubenda' ), '', 'iubenda_consent_solution' );
139
- add_settings_field( 'iub_public_api_key', __( 'Public Api Key', 'iubenda' ), array( $this, 'iub_public_api_key' ), 'iubenda_consent_solution', 'iubenda_consent_solution' );
140
- // only if api key is given
141
- if ( ! empty( iubenda()->options['cons']['public_api_key'] ) )
142
- add_settings_section( 'iubenda_consent_forms', __( 'Field Mapping', 'iubenda' ), array( $this, 'iubenda_consent_forms' ), 'iubenda_consent_solution' );
143
- // single form
144
- } else {
145
- register_setting( 'iubenda_consent_solution', 'iubenda_consent_forms' );
146
- add_settings_section( 'iubenda_consent_form', __( 'Field Mapping', 'iubenda' ), array( $this, 'iubenda_consent_form' ), 'iubenda_consent_solution' );
147
  }
148
  }
149
 
150
- /**
151
- * Display errors and notices.
152
- *
153
- * @global string $pagenow
154
- */
155
- public function settings_errors() {
156
- global $pagenow;
157
-
158
- // force display notices in top menu settings page
159
- if ( $pagenow == 'options-general.php' )
160
- return;
161
-
162
- $tab_key = ! empty( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'cs';
163
-
164
- settings_errors( "{$tab_key}_settings_errors" );
165
- }
166
-
167
  /**
168
  * Add submenu.
169
  *
@@ -180,297 +287,122 @@ class iubenda_Settings {
180
  add_menu_page(
181
  'iubenda', 'iubenda', apply_filters( 'iubenda_cookie_law_cap', 'manage_options' ), 'iubenda', array( $this, 'options_page' ), 'none'
182
  );
183
- add_submenu_page( 'iubenda', __( 'Cookie Solution', 'iubenda' ), __( 'Cookie Solution', 'iubenda' ), apply_filters( 'iubenda_cookie_law_cap', 'manage_options' ), 'iubenda', array( $this, 'options_page' ) );
184
- add_submenu_page( 'iubenda', __( 'Consent Solution', 'iubenda' ), __( 'Consent Solution', 'iubenda' ), apply_filters( 'iubenda_cookie_law_cap', 'manage_options' ), 'iubenda&tab=cons', array( $this, 'options_page' ) );
185
  }
186
  }
187
 
188
- /**
189
- * Load admin scripts and styles.
190
- *
191
- * @param string $page
192
- * @return void
193
- */
194
- public function admin_enqueue_scripts( $page ) {
195
- wp_enqueue_style( 'iubenda-admin', IUBENDA_PLUGIN_URL . '/css/admin.css' );
196
-
197
- if ( ! in_array( $page, array( 'toplevel_page_iubenda', 'settings_page_iubenda' ) ) )
198
- return;
199
-
200
- wp_enqueue_script(
201
- 'iubenda-admin', IUBENDA_PLUGIN_URL . '/js/admin.js', array( 'jquery' )
202
- );
203
 
204
- $args = array(
205
- 'formId' => 0,
206
- 'deleteForm' => __( 'Are you sure you want to delete this form?', 'iubenda' )
207
- );
208
-
209
- // get form data on edit screen
210
- if ( in_array( $this->action, array( 'edit' ) ) ) {
211
- $form_id = ! empty( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
212
- $form = ! empty( $form_id ) ? iubenda()->forms->get_form( $form_id ) : array();
213
 
214
- $args['formId'] = $form_id;
215
- }
216
 
217
- wp_localize_script(
218
- 'iubenda-admin',
219
- 'iubAdminArgs',
220
- $args
221
- );
222
- }
223
 
224
- /**
225
- * Load admin style inline, for menu icon only.
226
- *
227
- * @return mixed
228
- */
229
- public function admin_print_styles() {
230
- echo '
231
- <style>
232
- a.toplevel_page_iubenda .wp-menu-image {
233
- background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAyMzIgNTAzIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zOnNlcmlmPSJodHRwOi8vd3d3LnNlcmlmLmNvbS8iIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTsiPiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLDAsMCwxLDEzNi4yNDcsMjY4LjgzMSkiPiAgICAgICAgPHBhdGggZD0iTTAsLTM1LjgxTC0zNi4zLDAuNDg5TC0zNi4zLDE0MC45NzhMMCwxNDAuOTc4TDAsLTM1LjgxWk0tMjAuOTM4LC0xMjkuODAyQy02LjI4NywtMTI5LjgwMiA1LjU4NywtMTQxLjU2NSA1LjU4NywtMTU2LjA2QzUuNTg3LC0xNzAuNTU2IC02LjI4NywtMTgyLjMwOCAtMjAuOTM4LC0xODIuMzA4Qy0zNS42LC0xODIuMzA4IC00Ny40NzQsLTE3MC41NTYgLTQ3LjQ3NCwtMTU2LjA2Qy00Ny40NzQsLTE0MS41NjUgLTM1LjYsLTEyOS44MDIgLTIwLjkzOCwtMTI5LjgwMk04OS4zNiwtMTU0LjQxNkM4OS4zNiwtMTI3LjgyNSA3OS41NzUsLTEwMy40OTkgNjMuMjY5LC04NC42NzJMODYuNjk0LDIyNi42MjhMLTEyMi43MjgsMjI2LjYyOEwtMTAwLjAyNCwtNzkuMjI5Qy0xMTkuMzUxLC05OC42NjggLTEzMS4yNDcsLTEyNS4xNTkgLTEzMS4yNDcsLTE1NC40MTZDLTEzMS4yNDcsLTIxNC4wODYgLTgxLjg3NCwtMjYyLjQzOCAtMjAuOTM4LC0yNjIuNDM4QzM5Ljk5OSwtMjYyLjQzOCA4OS4zNiwtMjE0LjA4NiA4OS4zNiwtMTU0LjQxNiIgc3R5bGU9ImZpbGw6d2hpdGU7ZmlsbC1ydWxlOm5vbnplcm87Ii8+ICAgIDwvZz48L3N2Zz4=);
234
- background-position: center center;
235
- background-repeat: no-repeat;
236
- background-size: 7px auto;
237
- }
238
- </style>
239
- ';
240
- }
241
-
242
- /**
243
- * Highlight comments cookies opt-in checkbox option.
244
- *
245
- * @return mixed
246
- */
247
- public function admin_footer() {
248
- if ( ! empty( $_GET['iub-highlight'] ) ) {
249
- echo '
250
- <style>
251
- label[for=show_comments_cookies_opt_in] {
252
- border: 1px dashed red;
253
- }
254
- </style>
255
- ';
256
- }
257
- }
258
 
259
- /**
260
- * Redirect to the correct urle after switching menu position.
261
- *
262
- * @global string $pagenow
263
- * @return void
264
- */
265
- public function admin_page_redirect() {
266
- if ( ! empty( $_GET['settings-updated'] ) && ! empty( $_GET['page'] ) && in_array( $_GET['page'], array( 'iubenda' ) ) ) {
267
- global $pagenow;
268
-
269
- // no redirect by default
270
- $redirect_to = false;
271
-
272
- if ( iubenda()->options['cs']['menu_position'] === 'submenu' && $pagenow === 'admin.php' ) {
273
- // sub menu
274
- $redirect_to = admin_url( 'options-general.php?page=iubenda' );
275
- } elseif ( iubenda()->options['cs']['menu_position'] === 'topmenu' && $pagenow === 'options-general.php' ) {
276
- // top menu
277
- $redirect_to = admin_url( 'admin.php?page=iubenda' );
278
- }
279
 
280
- if ( $redirect_to ) {
281
- // make sure it's current host location
282
- wp_safe_redirect( add_query_arg( 'settings-updated', true, $redirect_to ) );
283
- exit;
284
- }
285
- }
286
- }
287
-
288
- /**
289
- * Perform show notice on plugin installation/upgrade.
290
- *
291
- * @return void
292
- */
293
- public function maybe_show_notice() {
294
- if ( ! current_user_can( 'install_plugins' ) )
295
- return;
296
-
297
- $current_update = 1;
298
- $activation = (array) get_option( 'iubenda_activation_data', iubenda()->activation );
299
-
300
- // delete_option( 'iubenda_activation_data' );
301
- // echo '<pre>'; print_r( $activation ); echo '</pre>'; exit;
302
-
303
- // get current time
304
- $current_time = time();
305
-
306
- if ( $activation['update_version'] < $current_update ) {
307
- // check version, if update ver is lower than plugin ver, set update notice to true
308
- $activation = array_merge( $activation, array( 'update_version' => $current_update, 'update_notice' => true ) );
309
-
310
- // set activation date if not set
311
- if ( $activation['update_date'] == false )
312
- $activation = array_merge( $activation, array( 'update_date' => $current_time ) );
313
-
314
- update_option( 'iubenda_activation_data', $activation );
315
- }
316
 
317
- // display current version notice
318
- if ( $activation['update_notice'] === true ) {
319
- // include notice js, only if needed
320
- add_action( 'admin_print_scripts', array( $this, 'admin_inline_js' ), 999 );
321
 
322
- // get activation date
323
- $activation_date = $activation['update_date'];
324
-
325
- // set delay in seconds
326
- $delay = WEEK_IN_SECONDS * 2;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
 
328
- if ( (int) $activation['update_delay_date'] === 0 ) {
329
- if ( $activation_date + $delay > $current_time )
330
- $activation['update_delay_date'] = $activation_date + $delay;
331
- else
332
- $activation['update_delay_date'] = $current_time;
 
 
333
 
334
- update_option( 'iubenda_activation_data', $activation );
335
- }
336
 
337
- if ( ( ! empty( $activation['update_delay_date'] ) ? (int) $activation['update_delay_date'] : $current_time ) <= $current_time ) {
338
- // add notice
339
- add_action( 'admin_notices', array( $this, 'show_notice' ) );
340
- }
341
- }
342
- }
343
-
344
- /**
345
- * Display admin notices at iubenda settings.
346
- */
347
- public function show_notice() {
348
- global $pagenow;
349
 
350
- $display = true;
351
- /*
352
- $page = isset( $_GET['page'] ) ? esc_attr( $_GET['page'] ) : '';
353
-
354
- if ( iubenda()->options['cs']['menu_position'] === 'submenu' && $page === 'iubenda' ) {
355
- $display = true;
356
- } elseif ( iubenda()->options['cs']['menu_position'] === 'topmenu' && $page === 'iubenda' ) {
357
- $display = true;
358
- }
359
- */
360
- ?>
361
- <?php if ( $display ) { ?>
362
- <div class="iubenda-notice notice is-dismissible">
363
- <div>
364
- <p class="step-1">
365
- <span class="notice-question"><?php _e( 'Enjoying the iubenda Cookie & Consent Solution Plugin?', 'iubenda' ); ?></span>
366
- <span class="notice-reply">
367
- <a href="#" class="reply-yes"><?php _e( 'Yes', 'iubenda' ); ?></a>
368
- <a href="#" class="reply-no"><?php _e( 'No', 'iubenda' ); ?></a>
369
- </span>
370
- </p>
371
- <p class="step-2 step-yes">
372
- <span class="notice-question"><?php _e( "Whew, what a relief!? We've worked countless hours to make this plugin as useful as possible - so we're pretty happy that you're enjoying it. While you here, would you mind leaving us a 5 star rating? It would really help us out.", 'iubenda' ); ?></span>
373
- <span class="notice-reply">
374
- <a href="https://wordpress.org/support/plugin/iubenda-cookie-law-solution/reviews/?filter=5" target="_blank" class="reply-yes"><?php _e( 'Sure!', 'iubenda' ); ?></a>
375
- <a href="javascript:void(0)" class="reply-no"><?php _e( 'No thanks', 'iubenda' ); ?></a>
376
- </span>
377
- </p>
378
- <p class="step-2 step-no">
379
- <span class="notice-question"><?php _e( "We're sorry to hear that. Would you mind giving us some feedback?", 'iubenda' ); ?></span>
380
- <span class="notice-reply">
381
- <a href="https://iubenda.typeform.com/to/BXuSMZ" target="_blank" class="reply-yes"><?php _e( 'Ok sure!', 'iubenda' ); ?></a>
382
- <a href="javascript:void(0)" class="reply-no"><?php _e( 'No thanks', 'iubenda' ); ?></a>
383
- </span>
384
- </p>
385
- </div>
386
- </div>
387
- <?php } ?>
388
- <?php
389
- }
390
-
391
- /**
392
- * Print admin scripts.
393
- *
394
- * @return void
395
- */
396
- public function admin_inline_js() {
397
- if ( ! current_user_can( 'install_plugins' ) )
398
- return;
399
-
400
- $delay = MONTH_IN_SECONDS * 6;
401
- ?>
402
- <script type="text/javascript">
403
- ( function ( $ ) {
404
- $( document ).ready( function () {
405
- // step 1
406
- $( '.iubenda-notice .step-1 a' ).on( 'click', function ( e ) {
407
- e.preventDefault();
408
-
409
- $( '.iubenda-notice .step-1' ).slideUp( 'fast' );
410
-
411
- if ( $( e.target ).hasClass( 'reply-yes' ) ) {
412
- $( '.iubenda-notice .step-2.step-yes' ).slideDown( 'fast' );
413
- } else {
414
- $( '.iubenda-notice .step-2.step-no' ).slideDown( 'fast' );
415
- };
416
- } );
417
- // step 2
418
- $( '.iubenda-notice.is-dismissible' ).on( 'click', '.notice-dismiss, .step-2 a', function ( e ) {
419
- // console.log( $( e ) );
420
-
421
- var delay = <?php echo $delay; ?>;
422
-
423
- if ( $( e.target ).hasClass( 'reply-yes' ) ) {
424
- delay = 0;
425
- }
426
-
427
- $.post( ajaxurl, {
428
- action: 'iubenda_dismiss_notice',
429
- delay: delay,
430
- url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
431
- iubenda_nonce: '<?php echo wp_create_nonce( 'iubenda_dismiss_notice' ); ?>'
432
- } );
433
-
434
- $( e.delegateTarget ).slideUp( 'fast' );
435
- } );
436
- } );
437
- } )( jQuery );
438
- </script>
439
- <?php
440
- }
441
-
442
- /**
443
- * Dismiss notice.
444
- *
445
- * @return void
446
- */
447
- public function dismiss_notice() {
448
- $result = false;
449
-
450
- if ( ! current_user_can( 'install_plugins' ) )
451
- return $result;
452
-
453
- $nonce = wp_verify_nonce( $_REQUEST['iubenda_nonce'], 'iubenda_dismiss_notice' );
454
-
455
- if ( $nonce ) {
456
- $delay = ! empty( $_REQUEST['delay'] ) ? absint( $_REQUEST['delay'] ) : 0;
457
- $activation = (array) get_option( 'iubenda_activation_data', iubenda()->activation );
458
-
459
- // delay notice
460
- if ( $delay > 0 ) {
461
- $activation = array_merge( $activation, array( 'update_delay_date' => time() + $delay ) );
462
- // hide notice permanently
463
- } else {
464
- $activation = array_merge( $activation, array( 'update_delay_date' => 0, 'update_notice' => false ) );
465
- }
466
-
467
- // update activation options
468
- $result = update_option( 'iubenda_activation_data', $activation );
469
- }
470
-
471
- echo json_encode( $result );
472
- exit;
473
- }
474
 
475
  /**
476
  * Plugin options migration for versions < 1.14.0
@@ -486,13 +418,12 @@ class iubenda_Settings {
486
 
487
  if ( $db_version != false ) {
488
  if ( version_compare( $db_version, '1.14.0', '<' ) ) {
489
- $options = array();
490
 
491
  $old_new = array(
492
  'iubenda_parse' => 'parse',
493
  'skip_parsing' => 'skip_parsing',
494
  'iubenda_ctype' => 'ctype',
495
- 'iubenda_parse' => 'parse',
496
  'parser_engine' => 'parser_engine',
497
  'iubenda_output_feed' => 'output_feed',
498
  'iubenda-code-default' => 'code_default',
@@ -525,1316 +456,783 @@ class iubenda_Settings {
525
 
526
  add_option( 'iubenda_cookie_law_solution', $options, '', 'no' );
527
  add_option( 'iubenda_cookie_law_version', iubenda()->version, '', 'no' );
528
- }
529
  }
530
- }
531
 
532
- /**
533
- * Load admin options page.
534
- *
535
- * @return void
536
- */
537
- public function options_page() {
538
- global $pagenow;
539
-
540
- if ( ! current_user_can( apply_filters( 'iubenda_cookie_law_cap', 'manage_options' ) ) ) {
541
- wp_die( __( "You don't have permission to access this page.", 'iubenda' ) );
542
- }
543
 
544
- $tab_key = ! empty( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'cs';
545
-
546
- // get redirect url
547
- if ( iubenda()->options['cs']['menu_position'] === 'submenu' && $pagenow === 'admin.php' ) {
548
- // sub menu
549
- $redirect_to = admin_url( 'options-general.php?page=iubenda&tab=' . $tab_key );
550
- } else {
551
- // top menu
552
- $redirect_to = admin_url( 'admin.php?page=iubenda&tab=' . $tab_key );
553
- }
554
- ?>
555
- <div class="wrap">
556
-
557
- <div id="iubenda-header">
558
- <?php
559
- echo '
560
- <a class="iubenda-link" href="http://iubenda.com" title="iubenda" title="_blank">
561
- <img id="iubenda-logo" alt="iubenda logo" width="300" height="90" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNjM3LjggMjgzLjUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDYzNy44IDI4My41OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6IzFDQzY5MTt9LnN0MXtmaWxsOiM1MTUyNTQ7fTwvc3R5bGU+PHBhdGggY2xhc3M9InN0MCIgZD0iTTE3OC45LDk5LjljMCw4LjItMywxNS42LTgsMjEuNGw3LjIsOTUuNGgtNjQuMmw3LTkzLjhjLTUuOS02LTkuNi0xNC4xLTkuNi0yMy4xYzAtMTguMywxNS4xLTMzLjEsMzMuOC0zMy4xUzE3OC45LDgxLjYsMTc4LjksOTkuOSBNMTQ1LjEsMTA3LjRjNC41LDAsOC4xLTMuNiw4LjEtOC4xcy0zLjYtOC04LjEtOGMtNC41LDAtOC4xLDMuNi04LjEsOFMxNDAuNiwxMDcuNCwxNDUuMSwxMDcuNCBNMTUxLjUsMTM2LjJsLTExLjEsMTEuMXY0My4xaDExLjFWMTM2LjJ6Ii8+PHBhdGggY2xhc3M9InN0MSIgZD0iTTI2NS40LDE3OC42Yy0yLjMsMS4yLTQuNywxLjgtNy4yLDEuOGMtMi44LDAtNS4zLTAuOC03LjQtMi40Yy0yLjEtMS42LTMuNS0zLjctNC4zLTYuMmMtMC44LTIuNS0xLjItNi4xLTEuMi0xMC44di0xOC4yYzAsMCwwLTAuOSwwLTIuOGMwLTAuNSwwLTIuOC0xLjUtMy41Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM2MtMC40LDAtMC44LTAuNC0wLjgtMC44bDAtMi40YzAtMC41LDAuNC0wLjksMC44LTAuOWg5LjNjMS4zLDAsMi40LDEuMSwyLjQsMi40VjE0N2wwLDE1LjVjMCw0LjYsMC44LDcuNywyLjUsOS4xYzEuNiwxLjUsMy42LDIuMiw1LjksMi4yYzEuNiwwLDMuNC0wLjUsNS40LTEuNWMyLTEsNS4zLTIuOCw4LjEtNS42bDAtMi40bDAtMjIuMlYxNDBjMC0wLjUsMC0yLjgtMS40LTMuNWMtMC4yLTAuMS0wLjYtMC4yLTEuMS0wLjNjLTAuNC0wLjEtMC44LTAuNC0wLjgtMC44bDAtMi40YzAtMC41LDAuNC0wLjksMC45LTAuOWg5LjJjMS4zLDAsMi40LDEuMSwyLjQsMi40djhjMCwwLjEsMCwwLjEsMCwwLjJ2MTYuNmMwLDMuOCwwLDcuNCwwLDEwLjZjMCwwLjcsMCwxLjIsMCwxLjJjMCwwLjUtMC4xLDMuMSwxLjQsMy44YzAuMiwwLjEsMC42LDAuMiwxLjIsMC4zYzAuNCwwLDAuOCwwLjQsMC44LDAuOGwwLDIuNGMwLDAuNS0wLjQsMC44LTAuOSwwLjloLTkuMmMtMS4zLDAtMi40LTEuMS0yLjQtMi40bDAtNC41bDAtMi41QzI3MS45LDE3NC41LDI2Ny43LDE3Ny40LDI2NS40LDE3OC42Ii8+PHBhdGggY2xhc3M9InN0MSIgZD0iTTMwOS4yLDE3NmMxLjksMC45LDMuOSwxLjMsNiwxLjNjMy4yLDAsNi4zLTEuNyw5LTUuMmMyLjgtMy41LDQuMi04LjUsNC4yLTE1LjJjMC02LjEtMS40LTEwLjgtNC4yLTE0LjFjLTIuOC0zLjMtNi00LjktOS41LTQuOWMtMS45LDAtMy44LDAuNS01LjcsMS40Yy0xLjIsMC42LTIuOCwxLjgtNC43LDMuNGMtMC41LDAuNS0wLjgsMS4xLTAuOCwxLjhWMTcxYzAsMC43LDAuMywxLjQsMC44LDEuOEMzMDYsMTc0LjIsMzA3LjYsMTc1LjMsMzA5LjIsMTc2IE0yOTQuOCwxMThjMC0wLjUsMC0yLjctMS40LTMuNGMtMC4yLTAuMS0wLjMtMC4xLTAuNi0wLjJjLTAuNC0wLjEtMC42LTAuNC0wLjYtMC44bDAtMi4zYzAtMC41LDAuNC0wLjgsMC45LTAuOWgxLjhoNi41YzEuMywwLDIuMywxLDIuMywyLjNsMCwxMnYxNS40YzQuNy02LjQsOS44LTkuNiwxNS4zLTkuNmM1LDAsOS40LDIuMSwxMy4xLDYuM2MzLjcsNC4yLDUuNiw5LjksNS42LDE3LjJjMCw4LjUtMi45LDE1LjMtOC42LDIwLjVjLTQuOSw0LjQtMTAuNSw2LjctMTYuNSw2LjdjLTIuOCwwLTUuNy0wLjUtOC43LTEuNWMtMi41LTAuOS01LjEtMi4xLTcuNy0zLjdjLTAuOC0wLjUtMS4zLTEuNC0xLjMtMi40di00NmMwLTAuOSwwLTIsMC0zLjNMMjk0LjgsMTE4eiIvPjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0zODkuMywxNzkuMWMtMC41LDAtMC45LTAuNC0wLjktMC45bDAtMi4zYzAtMC40LDAuMy0wLjgsMC43LTAuOGMwLjUtMC4xLDAuOC0wLjEsMS0wLjJjMS40LTAuNywxLjQtMi45LDEuNC0zLjR2LTIuN2MwLDAsMC01LjgsMC0xNy41YzAtMS45LDAtMy44LDAuMS01LjVsMC00LjZjMC0wLjUsMC0xLDAtMS41YzAtMC42LDAtMi44LTEuNC0zLjVjLTAuMS0wLjEtMC4zLTAuMS0wLjUtMC4yYy0wLjQtMC4xLTAuNi0wLjQtMC42LTAuOGwwLTIuM2MwLTAuNSwwLjQtMC44LDAuOS0wLjloOC4xYzEuMywwLDIuMywxLDIuMywyLjN2My40YzAsMCwwLDAuNiwwLDEuOGMwLDAuMywwLjIsMC42LDAuNiwwLjZjMC4yLDAsMC4zLTAuMSwwLjQtMC4yYzUuNC01LjksMTIuMy04LjgsMTcuMi04LjhjMi43LDAsNSwwLjYsNi45LDEuOWMxLjksMS4zLDMuNCwzLjQsNC42LDYuM2MwLjgsMi4xLDEuMiw1LjIsMS4yLDkuNHYxNi41bDAsNi4zYzAsMC41LDAsMi43LDEuNCwzLjRjMC4yLDAuMSwwLjQsMC4yLDAuOCwwLjJjMC40LDAuMSwwLjcsMC40LDAuNywwLjhsMCwyLjNjMCwwLjUtMC40LDAuOC0wLjgsMC45Yy0wLjgsMC0xLjUsMC0yLDBoLTYuNWMtMC4xLDAtMC4zLDAtMC40LDBoLTMuMWMtMS4xLDAtMi0wLjktMi0yYzAtMSwwLjctMS45LDEuNi0yLjJjMC4xLDAsMC4xLDAsMC4yLTAuMWMxLTAuNSwxLjMtMS44LDEuNC0yLjd2LTcuNGwwLTE1LjJjMC00LjMtMC42LTcuNC0xLjctOS4zYy0xLjItMS45LTMuMS0yLjktNS44LTIuOWMtNC4yLDAtMTAuMywyLjItMTQuNCw2Ljd2MjAuOHYwLjNsMCw2LjRjMCwwLjUsMCwyLjgsMS40LDMuNWMwLjEsMCwwLjEsMCwwLjIsMC4xYzEsMC4zLDEuNiwxLjIsMS42LDIuMmMwLDEuMS0wLjksMi0yLDJIMzk0QzM5NCwxNzkuMSwzOTIuNCwxNzkuMSwzODkuMywxNzkuMSIvPjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik01MTUsMTUzLjRjLTYuNiwxLjMtMTAuNCwyLjItMTEuNCwyLjVjLTMuNywxLjItNi42LDIuNi02LjgsOC43Yy0wLjEsMi41LDAuOCw0LjcsMi4zLDYuM2MxLjUsMS43LDMuMywyLjUsNS4zLDIuNWMyLjUsMCw1LjctMS44LDkuNi00LjhjMC43LTAuNSwxLjEtMS4zLDEuMS0yLjJWMTUzLjR6IE01MjMuOCwxNzAuOGMwLDAuMSwwLDAuMiwwLDAuMmMwLDAuMiwwLDAuMywwLDAuNGMwLjEsMS40LDAuNiwyLjQsMS40LDIuOGMwLjIsMC4xLDAuNCwwLjIsMC42LDAuMmMwLjQsMC4xLDAuNywwLjQsMC43LDAuOGwwLDIuNGMwLDAuNS0wLjQsMC44LTAuOSwwLjloLTguM2MtMS4zLDAtMi4zLTEtMi4zLTIuM3YtNC41Yy01LDMuOS04LjIsNi4xLTkuNSw2LjdjLTEuOSwwLjktNCwxLjMtNi4xLDEuM2MtMy40LDAtNi4yLTEuMi04LjQtMy40Yy0yLjItMi4zLTMuMy01LjMtMy4zLTkuMWMwLTIuNCwwLjUtNC40LDEuNi02LjJjMS41LTIuNCwzLjctNS4yLDcuNi02LjhjNC0xLjYsNy4zLTIsMTgtNC40YzAtMC4zLDAtNCwwLTQuM2MwLTQuNS0wLjgtOS4yLTguNC04LjdjLTUuMywwLjMtMTAuMiwyLTE0LjcsNWMtMC40LDAuMy0wLjksMC4yLTEuMi0wLjJjLTAuMS0wLjEtMC4xLTAuMy0wLjEtMC41di0yLjhjMC0xLjUsMC4zLTIuNCwwLjktMi45YzMuMS0yLjUsMTAuOS01LjUsMTguNS01YzguNCwwLjYsMTEuNCw0LDEyLjksOS4zYzAuNSwxLjYsMSwyLjgsMSw3LjV2MTQuNWMwLDIsMCw0LDAsNS44VjE3MC44eiIvPjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik00NjUuNCwxMzcuOGMtMS43LTEtMy40LTEuNS01LTEuNWMtMywwLTUuOCwxLjMtOC4zLDMuOGMtMi43LDIuOC00LjYsNi41LTQuNiwxMy41YzAsNywxLjUsMTIuNCw0LjYsMTYuMmMzLDMuNyw2LjQsNS42LDEwLjIsNS42YzIuNywwLDUuMy0xLjEsNy44LTMuNGMwLjktMC44LDEuNC0xLjksMS40LTN2LTIwLjhDNDcxLjQsMTQzLjksNDY5LjEsMTQwLDQ2NS40LDEzNy44IE00ODEuMywxNzQuNmMwLjEsMC4xLDAuMywwLjEsMC41LDAuMmMwLjQsMC4xLDAuNiwwLjQsMC42LDAuOGwwLDIuM2MwLDAuNS0wLjQsMC44LTAuOSwwLjloLThjLTEuMiwwLTIuMy0xLTIuMy0yLjJ2LTIuMmMtMi4zLDIuNC00LjYsNC4yLTYuOCw1LjNjLTIuMiwxLjEtNC42LDEuNi03LjEsMS42Yy01LjIsMC05LjctMi4yLTEzLjYtNi42Yy0zLjktNC40LTUuOC0xMC01LjgtMTYuOXMyLjEtMTMuMSw2LjQtMTguOGM0LjMtNS43LDkuOC04LjUsMTYuNS04LjVjNC4yLDAsNy42LDEuMywxMC40LDR2LTE2LjdjMC0wLjUsMC0yLjctMS40LTMuNGMtMC4xLTAuMS0wLjMtMC4xLTAuNS0wLjJjLTAuNC0wLjEtMC42LTAuNC0wLjYtMC44bDAtMi40YzAtMC41LDAuNC0wLjksMC45LTAuOWg3LjljMS4yLDAsMi4zLDEsMi4zLDIuMnY1OC45QzQ3OS45LDE3MS44LDQ3OS45LDE3My45LDQ4MS4zLDE3NC42Ii8+PHBhdGggY2xhc3M9InN0MSIgZD0iTTM1MCwxNTAuMmMwLDAuMSwwLDAuMywwLjEsMC4zYzAuMSwwLjEsMC4yLDAuMSwwLjQsMC4xaDIzLjljMC4zLDAsMC41LTAuMiwwLjUtMC40YzAuMy0yLjUsMC40LTctMy4zLTEwLjhjLTEuOC0xLjktNC4xLTIuOC04LjMtMi44QzM1NS43LDEzNi42LDM1MC44LDE0My45LDM1MCwxNTAuMiBNMzQ3LjUsMTc0LjljLTMuOS00LjMtNS45LTExLjMtNS45LTE4LjJjMC03LjMsMi4zLTEzLjksNi40LTE4LjdjNC4zLTUsMTAuMi03LjcsMTcuMS03LjdjNS44LDAsMTAuMiwyLDEzLjIsNS44YzIuNywzLjYsNC4xLDguOCw0LjEsMTUuNGMwLDAuOCwwLDEuOS0wLjEsMy4zYy0wLjEsMC45LTAuOCwxLjYtMS43LDEuNmgtMjkuOGMtMC4xLDAtMC4zLDAuMS0wLjQsMC4xYy0wLjEsMC4xLTAuMSwwLjItMC4xLDAuNGMwLjEsNS40LDEuOCwxMCw1LDEzLjJjMy4xLDMuMiw3LjQsNC45LDEyLjQsNC45YzMuNywwLDguNi0xLDEyLjQtMi4xYzAuNS0wLjIsMS4xLDAuMSwxLjMsMC43YzAuMSwwLjIsMC4xLDAuNCwwLDAuNWwtMC41LDEuOWMtMC4yLDAuNy0wLjcsMS4zLTEuMywxLjZjLTMuNywxLjgtOS4zLDMuNS0xNSwzLjVDMzU3LjYsMTgxLjIsMzUxLjYsMTc5LjUsMzQ3LjUsMTc0LjkiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjMxLjEsMTM1Ljl2MzYuOWMwLDEsMC42LDEuOSwxLjQsMi4zYzAuOSwwLjQsMS40LDEuMywxLjQsMi4zdjAuN2MwLDAuOC0wLjYsMS40LTEuNCwxLjRIMjIwYy0wLjgsMC0xLjQtMC42LTEuNC0xLjR2LTAuN2MwLTEsMC42LTEuOSwxLjQtMi4zYzAuOS0wLjQsMS40LTEuMywxLjQtMi4zdi0zNS43YzAtMC41LTAuNC0wLjktMC45LTAuOXMtMC45LTAuNC0wLjktMC45di0xLjJjMC0xLjIsMC45LTIuMSwyLjEtMi4xaDUuNkMyMjkuNCwxMzIsMjMxLjEsMTMzLjcsMjMxLjEsMTM1LjkiLz48cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI2LjMsMTEwLjhjMy4zLDAsNiwyLjcsNiw1LjljMCwzLjMtMi43LDUuOS02LDUuOXMtNi0yLjctNi01LjlDMjIwLjMsMTEzLjUsMjIzLDExMC44LDIyNi4zLDExMC44Ii8+PC9zdmc+"/>
562
- </a>';
563
-
564
- if ( $tab_key === 'cs' ) {
565
- echo '
566
- <p class="iubenda-text">
567
- ' . __( "This plugin is the easiest and most comprehensive way to adapt your WordPress site to the ePrivacy (EU Cookie Law). Upon your users' first visit, the plugin will take care of collecting their consent, blocking the most popular cookie-scripts and subsequently reactivating these scripts as soon as consent is provided. The basic settings include obtaining consent by a simple scroll action (the most effective method) and script reactivation without refreshing the page (asynchronous script reactivation).", 'iubenda' ) . '
568
- </p>
569
- <p class="iubenda-text">
570
- <span class="iubenda-title">' . __( "Does the Cookie Solution support IAB's Transparency and Consent Framework?", 'iubenda' ) . '</span><br />
571
- ' . sprintf( __( "Yes it does. You can read more about it <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">here.</a>", 'iubenda' ), $this->links['iab'] ) . '
572
- </p>
573
- <p class="iubenda-text">
574
- <span class="iubenda-title">' . __( "Would you like to know more about the cookie law?", 'iubenda' ) . '</span><br />
575
- ' . sprintf( __( "Read our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">complete guide to the cookie law.</a>", 'iubenda' ), $this->links['guide'] ) . '
576
- </p>
577
- <p class="iubenda-text">
578
- <span class="iubenda-title">' . __( "What is the full functionality of the plugin?", 'iubenda' ) . '</span><br />
579
- ' . sprintf( __( "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">plugin page.</a>", 'iubenda' ), $this->links['plugin_page'] ) . '
580
- </p>
581
- <p class="iubenda-text">
582
- <span class="iubenda-title">' . __( "Enter the iubenda code for the Cookie Solution below.", 'iubenda' ) . '</span><br />
583
- ' . sprintf( __( "In order to run the plugin, you need to enter the iubenda code that activates the cookie law banner and the cookie policy in the form below. This code can be generated on www.iubenda.com, following <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">this guide.</a>", 'iubenda' ), $this->links['generating_code'] ) . '
584
- </p>';
585
- } else {
586
- echo '
587
- <p class="iubenda-text">
588
- ' . __( 'Maintaining comprehensive records of consent is a vital part of privacy compliance in general but is specifically required under the GDPR. These records should include a way of identifying the user, store proof of consent, record of the consenting action, and the legal documents available to the user at the time of consent, among other things. You can read about the <a href="https://www.iubenda.com/en/help/5428-gdpr-guide#records-of-consent" target="_blank">full requirements here</a>.', 'iubenda' ) . '
589
- </p>';
590
- }
591
- ?>
592
- </div>
593
 
594
- <?php
595
- if ( $tab_key === 'cs' ) {
596
- // add per-purpose notice
597
- if ( iubenda()->options['cs']['skip_parsing'] ) {
598
- $iubenda_code = '';
599
 
600
- if ( iubenda()->multilang === true && defined( 'ICL_LANGUAGE_CODE' ) && isset( iubenda()->options['cs']['code_' . ICL_LANGUAGE_CODE] ) ) {
601
- $iubenda_code = iubenda()->options['cs']['code_' . ICL_LANGUAGE_CODE];
 
 
 
 
602
 
603
- // no code for current language, use default
604
- if ( ! $iubenda_code )
605
- $iubenda_code = iubenda()->options['cs']['code_default'];
606
- } else
607
- $iubenda_code = iubenda()->options['cs']['code_default'];
 
 
 
 
 
 
 
608
 
609
- $per_purpose_enabled = preg_match( '/(?:"|\')perPurposeConsent(?:"|\')\: *(?:"|\'*)true(?:"|\'*)/', $iubenda_code );
610
- $reject_enabled = preg_match( '/(?:"|\')rejectButtonDisplay(?:"|\')\: *(?:"|\'*)true(?:"|\'*)/', $iubenda_code );
611
 
612
- if ( $per_purpose_enabled || $reject_enabled )
613
- $this->add_notice( 'iub_per_purpose_enabled', sprintf( __( 'If you are using per-purpose script blocking or Reject option please disable the "Leave scripts untouched on the page if the user has already given consent" option. <a href="%s" target="_self">Disable now</a>', 'iubenda' ), esc_url( add_query_arg( 'action', 'disable_skip_parsing', $redirect_to ) ) ), 'notice' );
614
- }
615
-
616
- // add AMP notice
617
- if ( iubenda()->options['cs']['amp_support'] && iubenda()->options['cs']['amp_template_done'] ) {
618
- $ssl_support = true;
619
-
620
- // multilang support
621
- if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
622
- foreach ( iubenda()->languages as $lang_id => $lang_name ) {
623
- $url = iubenda()->options['cs']['amp_source'] === 'remote' ? iubenda()->options['cs']['amp_template'][$lang_id] : iubenda()->AMP->get_amp_template_url( $lang_id );
624
- $bits = explode( '/', $url );
625
-
626
- if ( $bits[0] === 'http:' )
627
- $ssl_support = false;
628
- }
629
- } else {
630
- $url = iubenda()->options['cs']['amp_source'] === 'remote' ? iubenda()->options['cs']['amp_template'] : iubenda()->AMP->get_amp_template_url();
631
- $bits = explode( '/', $url );
632
-
633
- if ( $bits[0] === 'http:' )
634
- $ssl_support = false;
635
- }
636
-
637
- if ( ! $ssl_support )
638
- $this->add_notice( 'iub_amp_ssl_required', __( 'AMP configuration file requires HTTPS. Make sure your SSL Certificate is configured correctly.', 'iubenda' ), 'error' );
639
- }
640
 
641
- }
642
-
643
- // render custom notices
644
- $this->print_notices();
645
- ?>
646
-
647
- <h2 style="display: none;"></h2>
648
- <h2 class="nav-tab-wrapper iubenda-tab-wrapper">
649
- <a class="nav-tab<?php echo $tab_key == 'cs' ? ' nav-tab-active' : ''; ?>" href="<?php echo esc_url( iubenda()->base_url ); ?>"><?php _e( 'Cookie Solution', 'iubenda' ); ?></a>
650
- <a class="nav-tab<?php echo $tab_key == 'cons' ? ' nav-tab-active' : ''; ?>" href="<?php echo esc_url( add_query_arg( array( 'tab' => 'cons' ), iubenda()->base_url ) ); ?>"><?php _e( 'Consent Solution', 'iubenda' ); ?></a>
651
- </h2>
652
-
653
- <div id="iubenda-settings">
654
-
655
- <form id="iubenda-tabs" action="options.php" method="post">
656
-
657
-
658
- <?php
659
- if ( $tab_key === 'cs' ) {
660
- echo '<p>' . sprintf( __( 'This plugin drastically reduces the need for direct interventions in the code of the site by integrating with iubenda\'s Cookie Solution. It provides a fully customizable cookie banner, dynamically generates a cookie policy <a href="%s" target="_blank">to match the services in use on your site</a>, and, fully manages cookie-related consent - including the blocking of the most common widgets and third-party cookies before consent is received - in order to comply with the GDPR and ePrivacy.', 'iubenda' ), 'https://www.iubenda.com/en/help/19004-how-to-use-the-site-scanner-from-within-the-generator' ) . '</p>';
661
- } else {
662
- echo '<p>' . __( 'Maintaining valid records of consent is a vital part of privacy compliance in general, and it is specifically required under the GDPR. These records should include a userid, timestamp, consent proof, record of the consenting action, and the legal documents available to the user at the time of consent, among other things. This plugin is THE most complete solution for recording, sorting and maintaining GDPR records of consent*. The plugin also boasts built-in compatibility with WordPress comment form, Contact Form 7 and WP Forms plugins for your convenience, but can be manually integrated with any type of web-form and can even store consent proofs for consents collected offline (e.g in-store sign-ups) via WP media upload.' ) . '</p>';
663
- }
664
- ?>
665
 
666
- <?php
667
- settings_fields( $this->tabs[$tab_key]['key'] );
668
- do_settings_sections( $this->tabs[$tab_key]['key'] );
669
 
670
- if ( ! in_array( $this->action, array( 'save', 'edit' ) ) ) {
671
- echo ' <p class="submit submit-' . $tab_key . '">';
672
 
673
- // consent solution tab only
674
- if ( $tab_key != 'cs' && ! empty( iubenda()->options['cons']['public_api_key'] ) ) {
675
- echo '<a href="' . esc_url( add_query_arg( array( 'tab' => 'cons', 'action' => 'autodetect' ), iubenda()->base_url ) ) . '" class="button button-primary button-large iub-autodetect-forms">' . esc_html__( 'Autodetect Forms', 'iubenda' ) . '</a>';
676
- echo '<br />';
677
- }
678
- submit_button( '', 'primary', $this->tabs[$tab_key]['submit'], false );
679
- echo ' ';
680
- submit_button( __( 'Reset to defaults', 'iubenda' ), 'secondary', $this->tabs[$tab_key]['reset'], false );
681
- echo ' </p>';
682
- }
683
- ?>
684
-
685
- </form>
686
-
687
- </div>
688
-
689
- <div id="iubenda-footer">
690
- <?php echo '
691
- <p class="iubenda-text">
692
- <span class="iubenda-title">' . __( 'Need support for this plugin?', 'iubenda' ) . '</span><br />
693
- ' . sprintf( __( "Visit our <a href=\"%s\" class=\"iubenda-url\" target=\"_blank\">support forum.</a>", 'iubenda' ), $this->links['support_forum'] ) . '
694
- </p>';
695
- ?>
696
- </div>
697
-
698
- <div class="clear"></div>
699
- </div>
700
- <?php
701
- }
702
 
703
- /**
704
- * Code option.
705
- *
706
- * @return mixed
707
- */
708
- public function iub_code() {
709
- // multilang support
710
- if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
711
- echo '
712
- <div id="contextual-help-wrap" class="contextual-help-wrap hidden" tabindex="-1" style="display: block;">
713
- <div id="contextual-help-back" class="contextual-help-back"></div>
714
- <div id="contextual-help-columns" class="contextual-help-columns">
715
- <div class="contextual-help-tabs">
716
- <ul>';
717
- foreach ( iubenda()->languages as $lang_id => $lang_name ) {
718
- echo '
719
- <li class="' . ( iubenda()->lang_default == $lang_id ? 'active' : '' ) . '">
720
- <a href="#tab-panel-' . $lang_id . '" aria-controls="tab-panel-' . $lang_id . '">' . $lang_name . '</a>
721
- </li>';
722
- }
723
- echo '
724
- </ul>
725
- </div>
726
-
727
- <div id="contextual-help-tabs-wrap" class="contextual-help-tabs-wrap">';
728
- foreach ( iubenda()->languages as $lang_id => $lang_name ) {
729
- // get code for the language
730
- $code = ! empty( iubenda()->options['cs']['code_' . $lang_id] ) ? html_entity_decode( iubenda()->parse_code( iubenda()->options['cs']['code_' . $lang_id] ) ) : '';
731
- // handle default, if empty
732
- $code = empty( $code ) && $lang_id == iubenda()->lang_default ? html_entity_decode( iubenda()->parse_code( iubenda()->options['cs']['code_default'] ) ) : $code;
733
-
734
- echo '
735
- <div id="tab-panel-' . $lang_id . '" class="help-tab-content' . ( iubenda()->lang_default == $lang_id ? ' active' : '' ) . '">
736
- <textarea name="iubenda_cookie_law_solution[code_' . $lang_id . ']" class="large-text" cols="50" rows="10">' . $code . '</textarea>
737
- <p class="description">' . sprintf( __( 'Enter the iubenda code for %s.', 'iubenda' ), $lang_name ) . '</p>
738
- </div>';
739
- }
740
- echo '
741
- </div>
742
- </div>
743
- </div>';
744
- } else {
745
- echo '
746
- <div id="iub_code_default">
747
- <textarea name="iubenda_cookie_law_solution[code_default]" class="large-text" cols="50" rows="10">' . html_entity_decode( iubenda()->parse_code( iubenda()->options['cs']['code_default'] ) ) . '</textarea>
748
- <p class="description">' . __( 'Enter the iubenda code.', 'iubenda' ) . '</p>
749
- </div>';
750
- }
751
- }
752
 
753
- /**
754
- * Custom scripts option.
755
- *
756
- * @return void
757
- */
758
- public function iub_custom_scripts() {
759
- echo '
760
- <div id="contextual-help-wrap-2" class="contextual-help-wrap hidden" tabindex="-1" style="display: block;">
761
- <div id="contextual-help-back-2" class="contextual-help-back"></div>
762
- <div id="contextual-help-columns-2" class="contextual-help-columns">
763
- <div class="contextual-help-tabs">
764
- <ul>
765
- <li class="active">
766
- <a href="#tab-panel-scripts" aria-controls="tab-panel-scripts">' . esc_html__( 'Scripts', 'iubenda' ) . '</a>
767
- </li>
768
- <li>
769
- <a href="#tab-panel-iframes" aria-controls="tab-panel-iframes">' . esc_html__( 'Iframes', 'iubenda' ) . '</a>
770
- </li>
771
- </ul>
772
- </div>
773
- <div id="contextual-help-tabs-wrap-2" class="contextual-help-tabs-wrap">
774
- <div id="tab-panel-scripts" class="help-tab-content active">
775
- <p class="description">' . __( 'Provide a list of custom scripts you\'d like to block and assign their purpose.', 'iubenda' ) . '</p>
776
- <div id="custom-script-field-template" class="template-field" style="display: none;">
777
- <input type="text" class="regular-text" value="" name="iubenda_cookie_law_solution[custom_scripts][script][]" placeholder="' . __( 'Enter custom script', 'iubenda' ) . '" /> ' . $this->render_tag_types( 'script', 0 ) . ' <a href="#" class="remove-custom-script-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
778
- </div>';
779
-
780
- if ( ! empty( iubenda()->options['cs']['custom_scripts'] ) ) {
781
- foreach ( iubenda()->options['cs']['custom_scripts'] as $script => $type ) {
782
- echo '
783
- <div class="custom-script-field">
784
- <input type="text" class="regular-text" value="' . esc_attr( $script ) . '" name="iubenda_cookie_law_solution[custom_scripts][script][]" placeholder="' . __( 'Enter custom script', 'iubenda' ) . '" /> ' . $this->render_tag_types( 'script', $type ) . ' <a href="#" class="remove-custom-script-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
785
- </div>';
786
- }
787
- }
788
 
789
- echo '
790
- <a href="#" class="add-custom-script-field button-secondary">Add New Script</a>
791
- </div>
792
- <div id="tab-panel-iframes" class="help-tab-content">
793
- <p class="description">' . __( 'Provide a list of custom iframes you\'d like to block and assign their purpose. ', 'iubenda' ) . '</p>
794
- <div id="custom-iframe-field-template" class="template-field" style="display: none;">
795
- <input type="text" class="regular-text" value="" name="iubenda_cookie_law_solution[custom_iframes][iframe][]" placeholder="' . __( 'Enter custom iframe', 'iubenda' ) . '" /> ' . $this->render_tag_types( 'iframe', 0 ) . ' <a href="#" class="remove-custom-iframe-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
796
- </div>';
797
-
798
- if ( ! empty( iubenda()->options['cs']['custom_iframes'] ) ) {
799
- foreach ( iubenda()->options['cs']['custom_iframes'] as $iframe => $type ) {
800
- echo '
801
- <div class="custom-iframe-field">
802
- <input type="text" class="regular-text" value="' . esc_attr( $iframe ) . '" name="iubenda_cookie_law_solution[custom_iframes][iframe][]" placeholder="' . __( 'Enter custom iframe', 'iubenda' ) . '" /> ' . $this->render_tag_types( 'iframe', $type ) . ' <a href="#" class="remove-custom-iframe-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
803
- </div>';
804
- }
805
- }
 
 
 
 
 
 
806
 
807
- echo '
808
- <a href="#" class="add-custom-iframe-field button-secondary">Add New Iframe</a>
809
- </div>
810
- </div>
811
- </div>
812
- </div>';
813
- }
814
 
815
- /**
816
- * Prepare tag types select.
817
- *
818
- * @param string $type
819
- * @param int $selected
820
- * @return string
821
- */
822
- function render_tag_types( $type, $selected ) {
823
- $html = '<select name="iubenda_cookie_law_solution[custom_' . $type . 's][type][]">';
824
 
825
- foreach ( $this->tag_types as $tag_id => $tag_name ) {
826
- $html .= '<option value="' . esc_attr( $tag_id ) . '" ' . selected( $selected, $tag_id, false ) . '>' . esc_html( $tag_name ) . '</option>';
827
- }
828
 
829
- return $html . '</select>';
830
- }
 
831
 
832
- /**
833
- * Parsing option.
834
- *
835
- * @return mixed
836
- */
837
- public function iub_parse() {
838
- echo '
839
- <div id="iub_parse_container">
840
- <label><input id="iub_parse" type="checkbox" name="iubenda_cookie_law_solution[parse]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['parse'], false ) . '/>' . __( 'Automatically block scripts detected by the plugin', 'iubenda' ) . '</label>
841
- <p class="description">' . '(' . sprintf( __( "see <a href=\"%s\" target=\"_blank\">our documentation</a> for the list of detected scripts.", 'iubenda' ), $this->links['documentation'] ) . ')' . '</p>
842
- <div id="iub_parser_engine_container"' . ( iubenda()->options['cs']['parse'] === false ? ' style="display: none;"' : '' ) . '>
843
- <div>
844
- <label><input id="iub_parser_engine-new" type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="new" ' . checked( 'new', iubenda()->options['cs']['parser_engine'], false ) . ' />' . __( 'Primary', 'iubenda' ) . '</label>
845
- <label><input id="iub_parser_engine-default" type="radio" name="iubenda_cookie_law_solution[parser_engine]" value="default" ' . checked( 'default', iubenda()->options['cs']['parser_engine'], false ) . ' />' . __( 'Secondary', 'iubenda' ) . '</label>
846
- <p class="description">' . __( 'Select parsing engine.', 'iubenda' ) . '</p>
847
- </div>
848
- <div>
849
- <label><input id="iub_skip_parsing" type="checkbox" name="iubenda_cookie_law_solution[skip_parsing]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['skip_parsing'], false ) . '/>' . __( 'Leave scripts untouched on the page if the user has already given consent', 'iubenda' ) . '</label>
850
- <p class="description">(' . __( "Enable this option to improve performance <strong>only</strong> if your site does <strong>not</strong> use a cache system or a cache plugin and if you're <strong>not</strong> collecting per-category consent. If you're in doubt, keep this setting disabled", 'iubenda' ) . ')</p>
851
- </div>
852
- </div>
853
- </div>';
854
- }
855
 
856
- /**
857
- * Ctype option.
858
- *
859
- * @return mixed
860
- */
861
- public function iub_ctype() {
862
- echo '
863
- <div id="iub_ctype_container">
864
- <label><input id="iub_ctype" type="checkbox" name="iubenda_cookie_law_solution[ctype]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['ctype'], false ) . '/>' . __( 'Restrict the plugin to run only for requests that have "Content-type: text / html" (recommended)', 'iubenda' ) . '</label>
865
- </div>';
866
- }
867
 
868
- /**
869
- * RSS feed option.
870
- *
871
- * @return mixed
872
- */
873
- public function iub_output_feed() {
874
- echo '
875
- <div id="iub_output_feed_container">
876
- <label><input id="iub_output_feed" type="checkbox" name="iubenda_cookie_law_solution[output_feed]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['output_feed'], false ) . '/>' . __( 'Do not run the plugin inside the RSS feed (recommended)', 'iubenda' ) . '</label>
877
- </div>';
878
- }
879
-
880
- /**
881
- * POST request option.
882
- *
883
- * @return mixed
884
- */
885
- public function iub_output_post() {
886
- echo '
887
- <div id="iub_output_post_container">
888
- <label><input id="iub_output_post" type="checkbox" name="iubenda_cookie_law_solution[output_post]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['output_post'], false ) . '/>' . __( 'Do not run the plugin on POST requests (recommended)', 'iubenda' ) . '</label>
889
- </div>';
890
- }
891
 
892
- /**
893
- * Menu option.
894
- *
895
- * @return mixed
896
- */
897
- public function iub_menu_position() {
898
- echo '
899
- <div id="iub_menu_position_container">
900
- <label><input id="iub_menu_position-topmenu" type="radio" name="iubenda_cookie_law_solution[menu_position]" value="topmenu" ' . checked( 'topmenu', iubenda()->options['cs']['menu_position'], false ) . ' />' . __( 'Top menu', 'iubenda' ) . '</label>
901
- <label><input id="iub_menu_position-submenu" type="radio" name="iubenda_cookie_law_solution[menu_position]" value="submenu" ' . checked( 'submenu', iubenda()->options['cs']['menu_position'], false ) . ' />' . __( 'Submenu', 'iubenda' ) . '</label>
902
- <p class="description">' . __( 'Select whether to display iubenda in a top admin menu or the Settings submenu.', 'iubenda' ) . '</p>
903
- </div>';
904
- }
905
-
906
- /**
907
- * Google AMP support option.
908
- *
909
- * @return mixed
910
- */
911
- public function iub_amp_support() {
912
- echo '
913
- <div id="iub_amp_support_container">
914
- <label><input id="iub_amp_support" type="checkbox" name="iubenda_cookie_law_solution[amp_support]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['amp_support'], false ) . '/>' . __( 'Enable Google AMP support.', 'iubenda' ) . '</label>
915
- <p class="description">' . sprintf( __( 'This feature enables iubenda on AMP pages via the <a href="%s" target="_blank">AMP</a> and <a href="%s" target="_blank">AMP for WP</a> plugins. AMP requires specific configuration parameters and a page hosted on your domain where the configuration is loaded from. <a href="%s" target="_blank">Learn more on iubenda and AMP</a>.', 'iubenda' ), 'https://wordpress.org/plugins/amp/', 'https://wordpress.org/plugins/accelerated-mobile-pages/', 'https://www.iubenda.com/en/help/22135-cookie-solution-amp#wordpress' ) . '</p>
916
- <div id="iub_amp_options_container"' . ( iubenda()->options['cs']['amp_support'] === false ? ' style="display: none;"' : '' ) . '>
917
- <div>
918
- <label><input id="iub_amp_source-local" class="iub_amp_source" type="radio" name="iubenda_cookie_law_solution[amp_source]" value="local" ' . checked( 'local', iubenda()->options['cs']['amp_source'], false ) . ' />' . __( 'Auto-generated configuration file', 'iubenda' ) . '</label>
919
- <label><input id="iub_amp_source-remote" class="iub_amp_source" type="radio" name="iubenda_cookie_law_solution[amp_source]" value="remote" ' . checked( 'remote', iubenda()->options['cs']['amp_source'], false ) . ' />' . __( 'Custom configuration file', 'iubenda' ) . '</label>
920
- <p class="description">' . __( 'Select the iubenda AMP configuration file location.', 'iubenda' ) . '</p>
921
- </div>
922
- <div id="iub_amp_template-local"' . ( iubenda()->options['cs']['amp_source'] === 'remote' ? ' style="display: none;"' : '' ) . '>';
923
- if ( empty( iubenda()->options['cs']['amp_template_done'] ) ) {
924
- echo '
925
- <p class="description">' . __( 'No file available. Save changes to generate iubenda AMP configuration file.', 'iubenda' ) . '</p>';
926
- } else {
927
- // multilang support
928
- if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
929
- foreach ( iubenda()->languages as $lang_id => $lang_name ) {
930
- echo $lang_name . ':
931
- <a href="' . iubenda()->AMP->get_amp_template_url( $lang_id ) . '" target="_blank">' . iubenda()->AMP->get_amp_template_url( $lang_id ) . '</a><br />';
932
- }
933
- } else {
934
- echo '
935
- <a href="' . iubenda()->AMP->get_amp_template_url() . '" target="_blank">' . iubenda()->AMP->get_amp_template_url() . '</a>';
936
- }
937
- }
938
- echo '
939
- </div>
940
- <div id="iub_amp_template-remote"' . ( iubenda()->options['cs']['amp_source'] === 'local' ? ' style="display: none;"' : '' ) . '>';
941
-
942
- // multilang support
943
- if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
944
- foreach ( iubenda()->languages as $lang_id => $lang_name ) {
945
- echo $lang_name . ':
946
- <label><input id="iub_amp_template-' . $lang_id . '" type="text" class="regular-text" name="iubenda_cookie_law_solution[amp_template][' . $lang_id . ']" value="' . ( isset( iubenda()->options['cs']['amp_template'][$lang_id] ) ? esc_url( iubenda()->options['cs']['amp_template'][$lang_id] ) : '' ) . '" /></label><br />';
947
- }
948
- } else {
949
- echo '
950
- <label><input id="iub_amp_template" type="text" class="regular-text" name="iubenda_cookie_law_solution[amp_template]" value="' . ( isset( iubenda()->options['cs']['amp_template'] ) ? esc_url( iubenda()->options['cs']['amp_template'] ) : '' ) . '" /></label>';
951
- }
952
- echo '
953
- <p class="description">' . __( 'If you\'re experiencing issues with AMP setup download the generated iubenda AMP configuration file, upload it to any SSL server and paste the file link to the field above.', 'iubenda' ) . '</p>
954
- </div>
955
- <p class="description">' . sprintf( __( 'Seeing the AMP cookie notice when testing from Google but not when visiting your AMP pages directly? <a href="%s" target="_blank">Learn how to fix it</a>.', 'iubenda' ), 'https://www.iubenda.com/en/help/22135-cookie-solution-amp-wordpress#amp-domain' ) . '</p>
956
- </div>
957
- </div>';
958
- }
959
 
960
- /**
961
- * Deactivation option.
962
- *
963
- * @return mixed
964
- */
965
- public function iub_deactivation() {
966
- echo '
967
- <div id="iub_deactivation_container">
968
- <label><input id="iub_deactivation" type="checkbox" name="iubenda_cookie_law_solution[deactivation]" value="1" ' . checked( true, (bool) iubenda()->options['cs']['deactivation'], false ) . '/>' . __( 'Delete all plugin data upon deactivation', 'iubenda' ) . '</label>
969
- </div>';
970
- }
971
 
972
- /**
973
- * Public API Key option.
974
- *
975
- * @return mixed
976
- */
977
- public function iub_public_api_key() {
978
- echo '
979
- <div id="iub_public_api_key_container">
980
- <label><input id="iub_public_api_key" type="text" class="regular-text" name="iubenda_consent_solution[public_api_key]" value="' . iubenda()->options['cons']['public_api_key'] . '" /></label>
981
- <p class="description">' . __( 'Enter your iubenda Javascript library public API key.', 'iubenda' ) . '</p>
982
- </div>';
983
- }
984
 
985
- /**
986
- * Forms list.
987
- *
988
- * @return mixed
989
- */
990
- public function iubenda_consent_forms() {
991
- $form_id = ! empty( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
992
- $form = ! empty( $form_id ) ? iubenda()->forms->get_form( $form_id ) : false;
993
 
994
- $supported_forms = iubenda()->forms->sources;
 
 
 
 
 
 
995
 
996
- echo '
997
- <p class="description">' . __( 'This section lists the forms available for field mapping. The plugin currently supports & detects: WordPress Comment, Contact Form 7, WooCommerce Checkout and WP Forms.', 'iubenda' ) . '</p>';
 
 
 
 
 
998
 
999
- // list screen
1000
- if ( ! class_exists( 'WP_List_Table' ) )
1001
- include_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
 
1002
 
1003
- include_once( IUBENDA_PLUGIN_PATH . '/includes/forms-list-table.php' );
 
 
 
 
1004
 
1005
- $list_table = new iubenda_List_Table_Forms();
 
 
 
 
1006
 
1007
- echo '
1008
- <div id="iubenda-consent-forms">';
1009
- $list_table->views();
1010
- $list_table->prepare_items();
1011
- $list_table->display();
 
 
 
 
 
 
 
 
 
1012
 
1013
- echo '
1014
- </div>';
1015
- }
1016
 
1017
- /**
1018
- * Single form.
1019
- *
1020
- * @return mixed
1021
- */
1022
- public function iubenda_consent_form() {
1023
- $form_id = ! empty( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
1024
- $form = ! empty( $form_id ) ? iubenda()->forms->get_form( $form_id ) : false;
1025
 
1026
- if ( ! $form )
1027
- return;
 
1028
 
1029
- $status = isset( $form->post_status ) && in_array( $form->post_status, array_keys( iubenda()->forms->statuses ) ) ? esc_attr( $form->post_status ) : 'publish';
1030
- $subject = isset( $form->form_subject ) && is_array( $form->form_subject ) ? array_map( 'esc_attr', $form->form_subject ) : array();
1031
- $preferences = isset( $form->form_preferences ) && is_array( $form->form_preferences ) ? array_map( 'esc_attr', $form->form_preferences ) : array();
1032
- $exclude = isset( $form->form_exclude ) && is_array( $form->form_exclude ) ? array_map( 'esc_attr', $form->form_exclude ) : array();
1033
- $legal_notices = isset( $form->form_legal_notices ) && is_array( $form->form_legal_notices ) ? array_map( 'esc_attr', $form->form_legal_notices ) : array();
1034
-
1035
- $available_fields = array();
1036
-
1037
- if ( ! empty( $form->form_fields ) && is_array( $form->form_fields ) ) {
1038
- foreach ( $form->form_fields as $index => $form_field ) {
1039
- if ( is_array( $form_field ) ) {
1040
- // print_r( $form_field );
1041
- $available_fields[] = $form_field['label'] . ' (' . $form_field['type'] . ')';
1042
- } else {
1043
- $available_fields[] = $form_field;
1044
- }
1045
- }
1046
- }
1047
-
1048
- // print_r( $form );
1049
-
1050
- echo '
1051
- <div id="poststuff">
1052
- <div id="post-body" class="metabox-holder columns-2">
1053
- <div id="post-body-content">
1054
- <div id="titlediv">
1055
- <div id="titlewrap">
1056
- <h1>' . $form->post_title . '</h1>
1057
- </div>
1058
- <p class="description">' . sprintf( __( '%s form title.', 'iubenda' ), ( array_key_exists( $form->form_source, iubenda()->forms->sources ) ? iubenda()->forms->sources[$form->form_source] : __( 'Unknown', 'iubenda' ) ) ) . '</p>
1059
-
1060
- <div style="margin-top: 18px"><strong>' . __( 'Available form fields:', 'iubenda' ) . '</strong><br /><p class="description">' . implode( ', ', $available_fields ) . '</p></div>
1061
- </div>
1062
- </div>
1063
- <div id="postbox-container-1" class="postbox-container">
1064
- <div id="side-sortables" class="">
1065
- <div id="submitdiv" class="postbox ">
1066
- <h3 class="hndle"><span>' . __( 'Publish' ) . '</span></h3>
1067
- <div class="inside">
1068
- <div id="submitpost" class="submitbox">
1069
- <div id="minor-publishing">
1070
- <div class="misc-pub-section misc-pub-post-status">
1071
- <label for="status">' . __( 'Status' ) . ':</label>
1072
- <div id="status-select" class="" style="margin: 3px 0 0;">
1073
- <select id="status" name="status">';
1074
- foreach ( iubenda()->forms->statuses as $name => $label ) {
1075
- echo '
1076
- <option value="' . $name . '"' . selected( $form->post_status, $name, true ) . '>' . $label . '</option>';
1077
- }
1078
- echo '
1079
- </select>
1080
- </div>
1081
- </div>
1082
- <div id="major-publishing-actions">
1083
- <div id="delete-action">
1084
- <a class="submitdelete deletion" href="' . esc_url( add_query_arg( array( 'tab' => 'cons' ), iubenda()->base_url ) ) . '">' . __( 'Cancel' ) . '</a>
1085
- </div>
1086
- <div id="publishing-action">
1087
- <span class="spinner"></span>
1088
- <input type="hidden" value="' . $form->ID . '" name="form_id">
1089
- <input id="publish" class="button button-primary button-large" type="submit" value="' . __( 'Save' ) . '" name="save">
1090
- </div>
1091
- <div class="clear"></div>
1092
- </div>
1093
- </div>
1094
- </div>
1095
- </div>
1096
- </div>
1097
- </div>
1098
- </div>
1099
- <div id="postbox-container-2" class="postbox-container">
1100
- <div id="normal-sortables" class="meta-box-sortables">
1101
- <div id="map-fields" class="postbox">
1102
- <h3 class="hndle ui-sortable-handle"><span>' . __( 'Map fields', 'iubenda' ) . '</span></h3>
1103
- <div class="inside">
1104
- <table class="widefat">
1105
- <tbody>
1106
- <tr>
1107
- <td class="label table-label">
1108
- <h4>' . __( 'Subject fields', 'iubenda' ) . ' <span class="required">(required)</span></h4>
1109
- <p class="description">' . __( 'Subject fields allow you to store a series of identifying values about your individual subjects/users. Please map the subject field with the corresponding form fields where applicable.', 'iubenda' ) . '</p>
1110
- </td>
1111
- <td>
1112
- <table class="widefat subject-table">
1113
- <thead>
1114
- <td class="label">' . __( 'Subject field', 'iubenda' ) . '</td>
1115
- <td class="label">' . __( 'Form field', 'iubenda' ) . '</td>
1116
- </thead>
1117
- <tbody>';
1118
-
1119
- foreach ( $this->subject_fields as $field_name => $field_label ) {
1120
- $selected = isset( $subject[$field_name] ) ? $subject[$field_name] : '';
1121
- $none = $field_name == 'id' ? __( 'Autogenerated', 'iubenda' ) : __( 'None', 'iubenda' );
1122
-
1123
- echo '
1124
- <tr class="subject-field options-field">
1125
- <td>' . $field_name . ' (' . $field_label . ')' . '</td>
1126
- <td>
1127
- <select class="subject-fields-select select-' . $field_name . '" name="subject[' . $field_name . ']">
1128
- <option value="" ' . selected( $selected, '', false ) . '>' . $none . '</option>';
1129
- if ( ! empty( $form->form_fields ) ) {
1130
- foreach ( $form->form_fields as $index => $form_field ) {
1131
- // get field data
1132
- $form_field_value = is_array( $form_field ) ? $index : $form_field;
1133
- $form_field_label = is_array( $form_field ) ? $form_field['label'] . ' (' . $form_field['type'] . ')' : $form_field;
1134
- $form_field_selected = is_array( $form_field ) ? $index : $form_field;
1135
-
1136
- echo '<option value="' . $form_field_value . '" ' . selected( $selected, $form_field_selected, false ) . '>' . $form_field_label . '</option>';
1137
- }
1138
- }
1139
- echo '
1140
- </select>
1141
- </td>
1142
- </tr>
1143
- ';
1144
- }
1145
- echo '
1146
- </tbody>
1147
- </table>
1148
- </td>
1149
- </tr>
1150
- <tr>
1151
- <td class="label table-label">
1152
- <h4>' . __( 'Preferences fields', 'iubenda' ) . ' <span class="required">(required)</span></h4>
1153
- <p class="description">' . __( 'Preferences fields allow you to store a record of the various opt-ins points at which the user has agreed or given consent, such as fields for agreeing to terms and conditions, newsletter, profiling, etc. *Please create at least one preference field.', 'iubenda' ) . '</p>
1154
- </td>
1155
- <td>
1156
- <table class="widefat preferences-table">
1157
- <thead>
1158
- <td class="label">' . __( 'Preferences field', 'iubenda' ) . '</td>
1159
- <td class="label">' . __( 'Form field', 'iubenda' ) . '</td>
1160
- </thead>
1161
- <tbody>';
1162
- echo '
1163
- <tr id="preferences-field-template" class="template-field" style="display: none;">
1164
- <td><input type="text" class="regular-text" value="" name="preferences[__PREFERENCE_ID__][field]" placeholder="' . __( 'Enter field name', 'iubenda' ) . '" /></td>
1165
- <td>
1166
- <select class="preferences-fields-select select-' . $field_name . '" name="preferences[__PREFERENCE_ID__][value]">';
1167
- if ( ! empty( $form->form_fields ) ) {
1168
- foreach ( $form->form_fields as $index => $form_field ) {
1169
- // get field data
1170
- $form_field_value = is_array( $form_field ) ? $index : $form_field;
1171
- $form_field_label = is_array( $form_field ) ? $form_field['label'] . ' (' . $form_field['type'] . ')' : $form_field;
1172
-
1173
- echo '<option value="' . $form_field_value . '">' . $form_field_label . '</option>';
1174
- }
1175
- }
1176
- echo '
1177
- </select>
1178
- <a href="javascript:void(0)" class="remove-preferences-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
1179
- </td>
1180
- </tr>';
1181
-
1182
- if ( $preferences ) {
1183
- $index = 0;
1184
-
1185
- foreach ( $preferences as $field_name => $field_value ) {
1186
- $selected = isset( $preferences[$field_name] ) ? $preferences[$field_name] : '';
1187
-
1188
- echo '
1189
- <tr class="preferences-field options-field">
1190
- <td><input type="text" class="regular-text" value="' . $field_name . '" name="preferences[' . $index . '][field]" placeholder="' . __( 'Enter field name', 'iubenda' ) . '" /></td>
1191
- <td>
1192
- <select class="preferences-fields-select select-' . $field_name . '" name="preferences[' . $index . '][value]">';
1193
- if ( ! empty( $form->form_fields ) ) {
1194
- foreach ( $form->form_fields as $index => $form_field ) {
1195
- // get field data
1196
- $form_field_value = is_array( $form_field ) ? $index : $form_field;
1197
- $form_field_label = is_array( $form_field ) ? $form_field['label'] . ' (' . $form_field['type'] . ')' : $form_field;
1198
- $form_field_selected = is_array( $form_field ) ? $index : $form_field;
1199
-
1200
- echo '<option value="' . $form_field_value . '" ' . selected( $selected, $form_field_selected, false ) . '>' . $form_field_label . '</option>';
1201
- }
1202
- }
1203
- echo '
1204
- </select>
1205
- <a href="javascript:void(0)" class="remove-preferences-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
1206
- </td>
1207
- </tr>';
1208
-
1209
- $index++;
1210
- }
1211
- }
1212
-
1213
- echo '
1214
- <tr class="submit-field"><td colspan="2"><a href="javascript:void(0)" class="add-preferences-field button-secondary">' . __( 'Add New Preference', 'iubenda' ) . '</a></td></tr>
1215
- </tbody>
1216
- </table>
1217
- </td>
1218
- </tr>
1219
- <tr>
1220
- <td class="label table-label">
1221
- <h4>' . __( 'Exclude fields', 'iubenda' ) . '</h4>
1222
- <p class="description">' . __( 'Exclude fields allow you to create a list of fields that you would like to exclude from your Consent Solution recorded proofs (for e.g. password or other fields not related to the consent).', 'iubenda' ) . '</p>
1223
- </td>
1224
- <td>
1225
- <table class="widefat exclude-table">
1226
- <thead>
1227
- <td class="label">' . __( 'Exclude field', 'iubenda' ) . '</td>
1228
- <td class="label"></td>
1229
- </thead>
1230
- <tbody>';
1231
- echo '
1232
- <tr id="exclude-field-template" class="template-field" style="display: none;">
1233
- <td>
1234
- <select class="exclude-fields-select select-' . $field_name . '" name="exclude[__EXCLUDE_ID__][field]">';
1235
- if ( ! empty( $form->form_fields ) ) {
1236
- foreach ( $form->form_fields as $index => $form_field ) {
1237
- // get field data
1238
- $form_field_value = is_array( $form_field ) ? $index : $form_field;
1239
- $form_field_label = is_array( $form_field ) ? $form_field['label'] . ' (' . $form_field['type'] . ')' : $form_field;
1240
-
1241
- echo '<option value="' . $form_field_value . '">' . $form_field_label . '</option>';
1242
- }
1243
- }
1244
- echo '
1245
- </select>
1246
- <a href="javascript:void(0)" class="remove-exclude-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
1247
- </td>
1248
- <td></td>
1249
-
1250
- </tr>';
1251
-
1252
- if ( $exclude ) {
1253
- $index = 0;
1254
-
1255
- foreach ( $exclude as $index => $field_name ) {
1256
- $selected = isset( $exclude[$index] ) ? $exclude[$index] : '';
1257
-
1258
- echo '
1259
- <tr class="exclude-field options-field">
1260
- <td>
1261
- <select class="exclude-fields-select select-' . $field_name . '" name="exclude[' . $index . '][field]">';
1262
- if ( ! empty( $form->form_fields ) ) {
1263
- foreach ( $form->form_fields as $index => $form_field ) {
1264
- // get field data
1265
- $form_field_value = is_array( $form_field ) ? $index : $form_field;
1266
- $form_field_label = is_array( $form_field ) ? $form_field['label'] . ' (' . $form_field['type'] . ')' : $form_field;
1267
- $form_field_selected = is_array( $form_field ) ? $index : $form_field;
1268
-
1269
- echo '<option value="' . $form_field_value . '" ' . selected( $selected, $form_field_selected, false ) . '>' . $form_field_label . '</option>';
1270
- }
1271
- }
1272
- echo '
1273
- </select>
1274
- <a href="javascript:void(0)" class="remove-exclude-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a>
1275
- </td>
1276
- <td></td>
1277
- </tr>';
1278
-
1279
- $index++;
1280
- }
1281
- }
1282
-
1283
- echo '
1284
- <tr class="submit-field"><td colspan="2"><a href="javascript:void(0)" class="add-exclude-field button-secondary">' . __( 'Add New Exclude', 'iubenda' ) . '</a></td></tr>
1285
- </tbody>
1286
- </table>
1287
- </td>
1288
- </tr>
1289
- </tbody>
1290
- </table>
1291
- </div>
1292
- </div>
1293
- <div id="legal-notices" class="postbox">
1294
- <h3 class="hndle ui-sortable-handle"><span>' . __( 'Legal Notices', 'iubenda' ) . '</span></h3>
1295
- <div class="inside">
1296
- <table class="widefat">
1297
- <tbody>
1298
- <tr>
1299
- <td class="label table-label">
1300
- <h4>' . __( 'Legal documents', 'iubenda' ) . '</h4>
1301
- <p class="description">' . __( 'In general, it\'s important that you declare which legal documents are being agreed upon when each consent is collected. However, if you use iubenda for your legal documents, it is *required* that you identify the documents by selecting them here.', 'iubenda' ) . '</p>
1302
- </td>
1303
- <td>
1304
- <table class="widefat legal_notices-table">
1305
- <thead>
1306
- <td class="label">' . __( 'Identifier', 'iubenda' ) . '</td>
1307
- <td class="label"></td>
1308
- </thead>
1309
- <tbody>';
1310
-
1311
- // default identifiers
1312
- foreach ( $this->legal_notices as $index => $field_name ) {
1313
- echo '
1314
- <tr class="legal_notices-field default-field">
1315
- <td>' . ( $index === 0 ? '<p class="description">' . __( 'Please select each legal document available on your site.', 'iubenda' ) . '</p>' : '' ) . '<label for="legal_notices-default-field=' . $index . '"><input id="legal_notices-default-field=' . $index . '" type="checkbox" value="' . $field_name . '" name="legal_notices[' . $index . '][field]"' . checked( in_array( $field_name, $legal_notices, true ), true, false ) . 'placeholder="' . __( 'Enter field name', 'iubenda' ) . '" />' . $field_name . '</label></td>
1316
- <td></td>
1317
- </tr>';
1318
- }
1319
-
1320
- $index++;
1321
-
1322
- // custom identifiers
1323
- echo '
1324
- <tr id="legal_notices-field-template" class="template-field" style="display: none;">
1325
- <td><input type="text" class="regular-text" value="" name="legal_notices[__LEGAL_NOTICE_ID__][field]" placeholder="' . __( 'Enter field name', 'iubenda' ) . '" /> <a href="javascript:void(0)" class="remove-legal_notices-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a></td>
1326
- <td></td>
1327
- </tr>';
1328
-
1329
- echo '
1330
- <tr>
1331
- <td colspan="2"><p class="description" style="margin-bottom: 0;">' . __( 'Alternatively, you may add your own custom document identifiers.', 'iubenda' ) . '</p></td>
1332
- </tr>';
1333
-
1334
- if ( $legal_notices ) {
1335
- foreach ( $legal_notices as $field_name ) {
1336
- if ( in_array( $field_name, $this->legal_notices, true ) )
1337
- continue;
1338
-
1339
- echo '
1340
- <tr class="legal_notices-field options-field">
1341
- <td><input type="text" class="regular-text" value="' . $field_name . '" name="legal_notices[' . $index . '][field]" placeholder="' . __( 'Enter field name', 'iubenda' ) . '" /> <a href="javascript:void(0)" class="remove-legal_notices-field button-secondary" title="' . __( 'Remove', 'iubenda' ) . '">-</a></td>
1342
- <td></td>
1343
- </tr>';
1344
-
1345
- $index++;
1346
- }
1347
- }
1348
-
1349
- echo '
1350
- <tr class="submit-field"><td colspan="2"><a href="javascript:void(0)" class="add-legal_notices-field button-secondary">' . __( 'Add New Document', 'iubenda' ) . '</a></td></tr>';
1351
- echo '
1352
- </tbody>
1353
- </table>
1354
- </td>
1355
- </tr>
1356
- </tbody>
1357
- </table>
1358
- </div>
1359
- </div>
1360
- </div>
1361
- </div>
1362
- </div>
1363
- </div>
1364
- <div class="clear"></div>';
1365
-
1366
- // echo '<pre>'; print_r( $form ); echo '</pre>';
1367
- }
1368
 
1369
- /**
1370
- * Save cookie solution options.
1371
- *
1372
- * @return void
1373
- */
1374
- public function save_cookie_law_options( $input ) {
1375
- if ( ! current_user_can( apply_filters( 'iubenda_cookie_law_cap', 'manage_options' ) ) )
1376
- return $input;
1377
-
1378
- // save options
1379
- if ( isset( $_POST['save_iubenda_options'] ) ) {
1380
- $input['parse'] = (bool) isset( $input['parse'] );
1381
- $input['parser_engine'] = isset( $input['parser_engine'] ) && in_array( $input['parser_engine'], array( 'default', 'new' ) ) ? $input['parser_engine'] : iubenda()->defaults['cs']['parser_engine'];
1382
- $input['skip_parsing'] = (bool) isset( $input['skip_parsing'] );
1383
- $input['ctype'] = (bool) isset( $input['ctype'] );
1384
- $input['output_feed'] = (bool) isset( $input['output_feed'] );
1385
- $input['output_post'] = (bool) isset( $input['output_post'] );
1386
- $input['menu_position'] = isset( $input['menu_position'] ) && in_array( $input['menu_position'], array( 'topmenu', 'submenu' ) ) ? $input['menu_position'] : iubenda()->defaults['cs']['menu_position'];
1387
- $input['amp_support'] = (bool) isset( $input['amp_support'] );
1388
- $input['deactivation'] = (bool) isset( $input['deactivation'] );
1389
-
1390
- // multilang support
1391
- if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
1392
- $iubenda_code = array();
1393
-
1394
- foreach ( iubenda()->languages as $lang_id => $lang_name ) {
1395
- $input['code_' . $lang_id] = $iubenda_code[$lang_id] = ! empty( $input['code_' . $lang_id] ) ? iubenda()->parse_code( $input['code_' . $lang_id] ) : '';
1396
-
1397
- // handle default lang too
1398
- if ( $lang_id == iubenda()->lang_default ) {
1399
- $input['code_default'] = ! empty( $input['code_' . $lang_id] ) ? iubenda()->parse_code( $input['code_' . $lang_id] ) : iubenda()->options['cs']['code_default'];
1400
- }
1401
- }
1402
- } else {
1403
- $iubenda_code = '';
1404
-
1405
- $input['code_default'] = $iubenda_code = ! empty( $input['code_default'] ) ? iubenda()->parse_code( $input['code_default'] ) : '';
1406
- }
1407
-
1408
- // generate amp template file
1409
- if ( isset( $input['amp_support'] ) ) {
1410
- $template_done = false;
1411
-
1412
- if ( ! empty( $iubenda_code ) ) {
1413
- if ( is_array( $iubenda_code ) ) {
1414
- $template_done = array();
1415
-
1416
- foreach ( $iubenda_code as $lang => $code ) {
1417
- $template_done[$lang] = (bool) iubenda()->AMP->generate_amp_template( $code, $lang );
1418
- }
1419
- } else {
1420
- $template_done = (bool) iubenda()->AMP->generate_amp_template( $iubenda_code );
1421
- }
1422
- }
1423
 
1424
- // Check if AMP is checked and the auto generated option is selected
1425
- if ("1" == $input['amp_support'] && 'local' == $input['amp_source']) {
1426
- if (is_bool($template_done) && false === $template_done) {
1427
- $message = "Currently, you do not have write permission for <i>%s</i>. For instructions on how to fix this, please read <a target=\"_blank\" href=\"%s\">our guide</a>.";
1428
- $our_guide_URL = 'https://www.iubenda.com/en/help/1215-cookie-solution-wordpress-plugin-installation-guide#amp-permissions';
1429
- $file_path = IUBENDA_PLUGIN_PATH . 'templates' . DIRECTORY_SEPARATOR;
1430
- add_settings_error('cs_settings_errors', 'iub_cs_settings_updated', __(sprintf($message, $file_path, $our_guide_URL), 'iubenda'), 'error');
1431
- }
1432
- }
1433
 
1434
- $input['amp_template_done'] = $template_done;
1435
-
1436
- if ( is_array( $input['amp_template'] ) ) {
1437
- foreach ( $input['amp_template'] as $lang => $template ) {
1438
- $input['amp_template'][$lang] = esc_url( $template );
1439
- }
1440
- } else {
1441
- $input['amp_template'] = esc_url( $input['amp_template'] );
1442
- }
1443
- }
1444
 
1445
- // scripts
1446
- if ( ! empty( $input['custom_scripts'] ) && ! empty( $input['custom_scripts']['script'] ) && ! empty( $input['custom_scripts']['type'] ) ) {
1447
- $scripts = array();
1448
 
1449
- // first field is template
1450
- if ( count( $input['custom_scripts']['script'] ) > 1 ) {
1451
- foreach ( $input['custom_scripts']['script'] as $number => $script ) {
1452
- $trimmed = trim( $script );
1453
 
1454
- if ( $trimmed !== '' )
1455
- $scripts[$trimmed] = (int) $input['custom_scripts']['type'][$number];
1456
- }
1457
- }
1458
 
1459
- $input['custom_scripts'] = $scripts;
1460
- } else
1461
- $input['custom_scripts'] = array();
1462
 
1463
- // iframes
1464
- if ( ! empty( $input['custom_iframes'] ) && ! empty( $input['custom_iframes']['iframe'] ) && ! empty( $input['custom_iframes']['type'] ) ) {
1465
- $iframes = array();
1466
 
1467
- // first field is template
1468
- if ( count( $input['custom_iframes']['iframe'] ) > 1 ) {
1469
- foreach ( $input['custom_iframes']['iframe'] as $number => $iframe ) {
1470
- $trimmed = trim( $iframe );
1471
 
1472
- if ( $trimmed !== '' )
1473
- $iframes[$trimmed] = (int) $input['custom_iframes']['type'][$number];
1474
- }
1475
- }
1476
 
1477
- $input['custom_iframes'] = $iframes;
1478
- } else
1479
- $input['custom_iframes'] = array();
1480
 
1481
- add_settings_error( 'cs_settings_errors', 'iub_cs_settings_updated', __( 'Settings saved.', 'iubenda' ), 'updated' );
1482
- // reset options
1483
- } elseif ( isset( $_POST['reset_iubenda_options'] ) ) {
1484
- $input = iubenda()->defaults['cs'];
 
 
1485
 
1486
- // multilang support
1487
- if ( iubenda()->multilang && ! empty( iubenda()->languages ) ) {
1488
- foreach ( iubenda()->languages as $lang_id => $lang_name ) {
1489
- $input['code_' . $lang_id] = '';
1490
- }
1491
- }
 
 
 
 
1492
 
1493
- add_settings_error( 'cs_settings_errors', 'iub_cs_settings_restored', __( 'Settings restored to defaults.', 'iubenda' ), 'updated' );
1494
- }
1495
 
1496
- return $input;
1497
- }
1498
 
1499
- /**
1500
- * Save consent solution options.
1501
- *
1502
- * @return void
1503
- */
1504
- public function save_consent_options( $input ) {
1505
 
1506
- if ( ! current_user_can( apply_filters( 'iubenda_cookie_law_cap', 'manage_options' ) ) )
1507
- return $input;
 
1508
 
1509
- // save options
1510
- if ( isset( $_POST['save_consent_options'] ) ) {
1511
- $input['public_api_key'] = isset( $input['public_api_key'] ) ? esc_attr( $input['public_api_key'] ) : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1512
 
1513
- add_settings_error( 'cons_settings_errors', 'iub_cons_settings_updated', __( 'Settings saved.', 'iubenda' ), 'updated' );
1514
- // reset options
1515
- } elseif ( isset( $_POST['reset_consent_options'] ) ) {
1516
- $input = iubenda()->defaults['cons'];
1517
 
1518
- add_settings_error( 'cons_settings_errors', 'iub_cons_settings_restored', __( 'Settings restored to defaults.', 'iubenda' ), 'updated' );
1519
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1520
 
1521
- return $input;
1522
- }
1523
 
1524
- /**
1525
- * Process the bulk actions
1526
- *
1527
- * @return void
1528
- */
1529
- public function process_actions() {
1530
- global $pagenow;
1531
-
1532
- $page = ! empty( $_POST['option_page'] ) ? esc_attr( $_POST['option_page'] ) : ( ! empty( $_GET['page'] ) ? esc_attr( $_GET['page'] ) : '' );
1533
- $id = isset( $_REQUEST['form_id'] ) ? ( is_array( $_REQUEST['form_id'] ) ? array_map( 'ansint', $_REQUEST['form_id'] ) : absint( $_REQUEST['form_id'] ) ) : false;
1534
- $tab_key = ! empty( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'cs';
1535
-
1536
- if ( ! $page )
1537
- return;
1538
-
1539
- // get redirect url
1540
- if ( iubenda()->options['cs']['menu_position'] === 'submenu' && $pagenow === 'admin.php' ) {
1541
- // sub menu
1542
- $redirect_to = admin_url( 'options-general.php?page=iubenda&tab=' . $tab_key );
1543
- } else {
1544
- // top menu
1545
- $redirect_to = admin_url( 'admin.php?page=iubenda&tab=' . $tab_key );
1546
- }
1547
 
1548
- // add comments cookie option notice
1549
- if ( $tab_key != 'cs' && ! empty( iubenda()->options['cons']['public_api_key'] ) ) {
1550
- $cookies_enabled = get_option( 'show_comments_cookies_opt_in' );
1551
 
1552
- if ( ! $cookies_enabled ) {
1553
- $this->add_notice( 'iub_comment_cookies_disabled', sprintf( __( 'Please enable comments cookies opt-in checkbox in the <a href="%s" target="_blank">Discussion settings</a>.', 'iubenda' ), esc_url( admin_url( 'options-discussion.php' ) ) ), 'notice' );
1554
- }
1555
- }
1556
 
1557
- $result = null;
 
1558
 
1559
- switch ( $this->action ) {
1560
- case 'autodetect' :
1561
- $result = iubenda()->forms->autodetect_forms();
1562
 
1563
- // new forms notice
1564
- if ( ! empty( $result['new'] ) )
1565
- $this->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form detected successfully.', '%d forms detected successfully.', count( $result['new'] ), 'iubenda' ), count( $result['new'] ) ), 'success' );
1566
 
1567
- // forms changed notice
1568
- if ( ! empty( $result['updated'] ) )
1569
- $this->add_notice( 'iub_autodetect_success', sprintf( _n( '%d form change detected.', '%d form changes detected.', count( $result['updated'] ), 'iubenda' ), count( $result['updated'] ) ), 'success' );
1570
-
1571
- // no changes notice
1572
- if ( empty( $result['new'] ) && empty( $result['updated'] ) )
1573
- $this->add_notice( 'iub_autodetect_success', __( 'No forms or form changes detected.', 'iubenda' ), 'error' );
1574
 
1575
- // make sure it's current host location
1576
- wp_safe_redirect( $redirect_to );
1577
- exit;
 
1578
 
1579
- break;
 
1580
 
1581
- case 'save' :
1582
- if ( ! $id )
1583
- return;
1584
 
1585
- $form = iubenda()->forms->get_form( $id );
 
 
 
 
1586
 
1587
- if ( $form->ID != $id )
1588
- return;
1589
 
1590
- $status = isset( $_POST['status'] ) && in_array( $_POST['status'], array_keys( iubenda()->forms->statuses ) ) ? esc_attr( $_POST['status'] ) : 'publish';
1591
- $subject = isset( $_POST['subject'] ) && is_array( $_POST['subject'] ) ? array_map( 'esc_attr', $_POST['subject'] ) : array();
1592
- $preferences = array();
1593
- $exclude = array();
1594
- $legal_notices = array();
 
1595
 
1596
- $preferences_raw = isset( $_POST['preferences'] ) && is_array( $_POST['preferences'] ) ? array_map( array( $this, 'array_map_callback' ), $_POST['preferences'] ) : array();
1597
- $exclude_raw = isset( $_POST['exclude'] ) && is_array( $_POST['exclude'] ) ? array_map( array( $this, 'array_map_callback' ), $_POST['exclude'] ) : array();
1598
- $legal_notices_raw = isset( $_POST['legal_notices'] ) && is_array( $_POST['legal_notices'] ) ? array_map( array( $this, 'array_map_callback' ), $_POST['legal_notices'] ) : array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1599
 
1600
- // format preferences data
1601
- if ( ! empty( $preferences_raw ) && is_array( $preferences_raw ) ) {
1602
- foreach ( $preferences_raw as $index => $data ) {
1603
- if ( ! empty( $data['field'] ) && ( ! is_null( $data['value'] ) || ! "" == $data['value'] ) ) {
1604
- $preferences[ sanitize_key( $data['field'] ) ] = $data['value'];
1605
- }
1606
- }
1607
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1608
 
1609
- // format exclude data
1610
- if ( ! empty( $exclude_raw ) && is_array( $exclude_raw ) ) {
1611
- foreach ( $exclude_raw as $index => $data ) {
1612
- if ( ! empty( $data['field'] ) )
1613
- $exclude[] = $data['field'];
1614
- }
1615
- }
1616
 
1617
- // format legal notices data
1618
- if ( ! empty( $legal_notices_raw ) && is_array( $legal_notices_raw ) ) {
1619
- foreach ( $legal_notices_raw as $index => $data ) {
1620
- if ( ! empty( $data['field'] ) )
1621
- $legal_notices[] = $data['field'];
1622
- }
1623
- }
1624
-
1625
- // form first save, update status to mapped automatically
1626
- if ( empty( $form->form_subject ) && empty( $form->form_preferences ) ) {
1627
- $status = 'mapped';
1628
- }
1629
-
1630
- // echo '<pre>'; print_r( $_POST ); echo '</pre>'; exit;
1631
- $filtered_subjects = array_filter($subject, array(
1632
- $this,
1633
- 'is_not_empty'
1634
- ));
1635
 
1636
- // bail if empty fields
1637
- if ( ! count( $filtered_subjects ) ) {
1638
- $this->add_notice( 'iub_form_fields_missing', __( 'Form saving failed. Please fill the Subject fields.', 'iubenda' ), 'error' );
1639
- return;
1640
- }
1641
 
1642
- $args = array(
1643
- 'ID' => $form->ID,
1644
- 'status' => $status,
1645
- 'object_type' => $form->object_type,
1646
- 'object_id' => $form->object_id,
1647
- 'form_source' => $form->form_source,
1648
- 'form_title' => $form->post_title,
1649
- 'form_date' => $form->post_modified,
1650
- 'form_fields' => $form->form_fields,
1651
- 'form_subject' => $subject,
1652
- 'form_preferences' => $preferences,
1653
- 'form_exclude' => $exclude,
1654
- 'form_legal_notices' => $legal_notices
1655
- );
1656
 
1657
- $result = iubenda()->forms->save_form( $args );
 
 
 
 
 
 
1658
 
1659
- if ( $result ) {
1660
- // form save, inform about form status update
1661
- if ( empty( $form->form_subject ) && empty( $form->form_preferences ) ) {
1662
- $this->add_notice( 'iub_form_saved', __( 'Form saved successfully - form status changed to Mapped.', 'iubenda' ), 'success' );
1663
- // form update
1664
- } else {
1665
- $this->add_notice( 'iub_form_updated', __( 'Form updated successfully.', 'iubenda' ), 'success' );
1666
- }
1667
- } else {
1668
- $this->add_notice( 'iub_form_failed', __( 'Form saving failed.', 'iubenda' ), 'error' );
1669
- }
1670
 
1671
- break;
1672
-
1673
- case 'delete' :
1674
- if ( ! $id )
1675
- return;
1676
-
1677
- $form = iubenda()->forms->get_form( $id );
1678
-
1679
- if ( empty( $form ) )
1680
- return;
1681
-
1682
- $result = iubenda()->forms->delete_form( $id );
1683
-
1684
- if ( $result )
1685
- $this->add_notice( 'iub_form_deleted', __( 'Form deleted successfully.', 'iubenda' ), 'success' );
1686
- else
1687
- $this->add_notice( 'iub_form_delete_failed', __( 'Form delete failed.', 'iubenda' ), 'error' );
1688
-
1689
- // make sure it's current host location
1690
- wp_safe_redirect( $redirect_to );
1691
- exit;
1692
-
1693
- break;
1694
-
1695
- case 'disable_skip_parsing' :
1696
-
1697
- // disable skip parsing option
1698
- $options = iubenda()->options['cs'];
1699
- $options['skip_parsing'] = false;
1700
-
1701
- update_option( 'iubenda_cookie_law_solution', $options );
1702
-
1703
- $this->add_notice( 'iub_settings_updated', __( 'Settings saved.', 'iubenda' ), 'success' );
1704
-
1705
- // make sure it's current host location
1706
- wp_safe_redirect( $redirect_to );
1707
- exit;
1708
-
1709
- break;
1710
-
1711
- default :
1712
- return;
1713
- }
1714
 
1715
- if ( ! empty ( $result ) ) {
1716
- //
1717
- } else {
1718
- //
1719
- }
1720
- }
 
 
 
1721
 
1722
- /**
1723
- * Add admin notice.
1724
- *
1725
- * @param mixed $message
1726
- * @param string $notice_type
1727
- */
1728
- public function add_notice( $key, $message, $notice_type = 'notice' ) {
1729
- $key = ! empty( $key ) ? sanitize_key( $key ) : '';
1730
- $message = ! empty( $message ) ? wp_kses_post( $message ) : '';
1731
- $notice_type = ! empty( $notice_type ) && in_array( $notice_type, $this->notice_types ) ? $notice_type : 'notice';
1732
 
1733
- if ( ! $key || ! $message )
1734
- return;
 
 
 
 
 
 
 
 
1735
 
1736
- $notices = get_transient( 'iubenda_dashboard_notices' );
1737
- $delay = MINUTE_IN_SECONDS * 2;
1738
 
1739
- // Check notice type is exist before checking the key
1740
- if ( empty( $notices ) || ( isset( $notices[ $notice_type ] ) && ! array_key_exists( $key, $notices[ $notice_type ] ) ) ) {
1741
- $notices[$notice_type][$key] = $message;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1742
 
1743
- set_transient( 'iubenda_dashboard_notices', $notices, $delay );
1744
- }
1745
- }
 
 
 
 
 
 
1746
 
1747
- /**
1748
- * Display admin notices.
1749
- *
1750
- * @return mixed
1751
- */
1752
- public function print_notices() {
1753
- $notices = get_transient( 'iubenda_dashboard_notices' );
1754
- $notices_array = array();
1755
 
1756
- foreach ( $this->notice_types as $notice_type ) {
1757
- if ( $this->notice_count( $notices, $notice_type ) > 0 ) {
1758
- echo '<div class="notice notice-' . ( $notice_type === 'notice' ? 'info' : $notice_type ) . ' below-h2 is-dismissible">';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1759
 
1760
- foreach ( $notices[$notice_type] as $key => $notice ) {
1761
- echo '<p><strong>' . wp_kses_post( $notice ) . '</strong></p>';
1762
- }
 
 
 
 
 
 
 
1763
 
1764
- echo '<button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss this notice.' ) . '</span></button>';
 
 
 
 
 
 
 
 
 
 
 
1765
 
1766
- echo '</div>';
1767
- }
1768
- }
 
 
1769
 
1770
- delete_transient( 'iubenda_dashboard_notices' );
1771
- }
1772
 
1773
- /**
1774
- * Count notices function.
1775
- *
1776
- * @param string $notice_type
1777
- * @return int
1778
- */
1779
- public function notice_count( $all_notices = array(), $notice_type = '' ) {
1780
- $notice_count = 0;
1781
-
1782
- if ( isset( $all_notices[$notice_type] ) ) {
1783
- $notice_count = absint( sizeof( $all_notices[$notice_type] ) );
1784
- } elseif ( empty( $notice_type ) ) {
1785
- foreach ( $all_notices as $notices ) {
1786
- $notice_count += absint( sizeof( $all_notices ) );
1787
- }
1788
- }
1789
 
1790
- return $notice_count;
1791
- }
1792
 
1793
- /**
1794
- * Adjust highlighted menu.
1795
- *
1796
- * @param type $file
1797
- * @return type
1798
- */
1799
- public function submenu_file( $submenu_file, $parent_file ) {
1800
- global $menu, $submenu;
1801
 
1802
- if ( $parent_file == 'iubenda' ) {
1803
- $tab_key = ! empty( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'cs';
 
 
 
 
 
 
 
 
 
 
 
1804
 
1805
- if ( $tab_key == 'cons' ) {
1806
- $submenu_file = 'admin.php?page=iubenda&tab=cons';
1807
- $submenu['iubenda'][1][2] = 'admin.php?page=iubenda&tab=cons';
1808
- }
1809
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1810
 
1811
- return $submenu_file;
1812
- }
 
 
 
1813
 
1814
- /**
1815
- * Sanitize array helper function.
1816
- *
1817
- * @param array $array
1818
- * @return array
1819
- */
1820
- public function array_map_callback( $array ) {
1821
- if ( ! is_array( $array ) )
1822
- return array();
1823
 
1824
- return array_map( 'esc_attr', $array );
1825
- }
 
 
 
 
1826
 
1827
- /**
1828
- * Check the value is not empty and check it contains any value even 0
1829
- *
1830
- * @param $value
1831
- * @return bool
1832
- */
1833
- private function is_not_empty($value) {
1834
- if(is_null($value) || '' === $value){
1835
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1836
  }
1837
 
1838
- return true;
1839
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1840
  }
9
  * @class Post_Views_Counter_Settings
10
  */
11
  class iubenda_Settings {
12
+ const IUB_QG_Response = 'iubenda_quick_generator_response';
13
+ public $tabs = [];
14
  public $action = '';
15
+ public $links = [];
16
+ public $notice_types = ['error', 'success', 'notice'];
17
+ public $subject_fields = [];
18
+ public $quick_generator = [];
19
+ public $services = [];
20
+
21
 
22
  public function __construct() {
23
+ if(array_get($_GET, 'page') == 'iubenda'){
24
+ add_action('admin_head', array( $this, 'iubdena_hide_notices_wp' ));
25
+ }
26
+
27
  // actions
28
  add_action( 'after_setup_theme', array( $this, 'load_defaults' ) );
 
29
  add_action( 'admin_init', array( $this, 'update_plugin' ), 9 );
 
 
 
30
  add_action( 'admin_menu', array( $this, 'admin_menu_options' ) );
31
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
32
+ add_action( 'admin_print_styles', array( $this, 'admin_print_styles' ) );
33
+ add_action( 'admin_init', array( $this, 'process_actions' ), 20 );
34
+ add_action( 'admin_init', array( $this, 'maybe_show_notice' ) );
35
+ add_action( 'wp_ajax_iubenda_dismiss_notice', array( $this, 'dismiss_notice' ) );
36
+
37
+ add_action( 'wp_ajax_update_options', array($this, 'update_options'));
38
+
39
+ add_action( 'wp_ajax_quick_generator_api', array(new QuickGeneratorService(), 'quick_generator_api'));
40
+ add_action( 'wp_ajax_integrate_setup', array(new QuickGeneratorService(), 'integrate_setup'));
41
+ add_action( 'wp_ajax_cs_configuration', array(new QuickGeneratorService(), 'cs_configuration')); //todo - not in the right place
42
+ add_action( 'wp_ajax_pp_configuration', array(new QuickGeneratorService(), 'pp_configuration')); //todo - not in the right place
43
+ add_action( 'wp_ajax_tc_configuration', array(new QuickGeneratorService(), 'tc_configuration')); //todo - not in the right place
44
+ add_action( 'wp_ajax_cons_configuration', array(new QuickGeneratorService(), 'cons_configuration')); //todo - not in the right place
45
+ add_action( 'wp_ajax_toggle_services', array($this, 'toggle_services'));
46
+ add_action( 'wp_ajax_save_public_api_key', array(new QuickGeneratorService(), 'save_public_api_key')); //todo - not in the right place
47
+ add_action( 'wp_ajax_auto_detect_forms', array(new QuickGeneratorService(), 'auto_detect_forms')); //todo - not in the right place
48
+
49
+ add_action( 'wp_ajax_ajax_save_options', array(new QuickGeneratorService(), 'ajax_save_options'));
50
+
51
+ add_action('wp_ajax_radar_percentage_reload', array(new RadarService(), 'askRadarToSendRequest')); //todo - not in the right place
52
+
53
+ // Getting main div in frontpage with updated data
54
+ add_action( 'wp_ajax_frontpage_main_box', [$this, 'get_frontpage_main_box']);
55
+
56
+ register_setting( 'iubenda_consent_solution_forms', 'status' );
57
+
58
+ register_setting( 'iubenda_consent_solution', 'iubenda_consent_forms' );
59
+ add_shortcode( 'iub-tc-button', array( new QuickGeneratorService(), 'tc_button_shortcode' ) );
60
+ add_shortcode( 'iub-pp-button', array( new QuickGeneratorService(), 'pp_button_shortcode' ) );
61
+
62
+ }
63
 
64
  /**
65
  * Load default settings.
66
  */
67
  public function load_defaults() {
68
+ $this->services = $this->services_option();
69
+
70
+ $this->subject_fields = array(
71
  'id' => __( 'string', 'iubenda' ),
72
  'email' => __( 'string', 'iubenda' ),
73
  'first_name' => __( 'string', 'iubenda' ),
105
  4 => __( 'Analytics', 'iubenda' ),
106
  5 => __( 'Targeting & Advertising', 'iubenda' )
107
  );
108
+ $siteId = array_get(iubenda()->options['global_options'], 'site_id');
109
+
110
+ $QG_Response = (new QuickGeneratorService())->QG_Response;
111
 
112
  $links = array(
113
  'en' => array(
114
  'iab' => 'https://www.iubenda.com/en/help/7440-enable-preference-management-iab-framework',
115
+ 'enable_iab' => 'https://www.iubenda.com/en/help/7440-iab-framework-cmp#why-publishers-should-enable-the-transparency-and-consent-framework',
116
+ 'guide' => 'https://www.iubenda.com/en/cookie-solution',
117
  'plugin_page' => 'https://www.iubenda.com/en/help/posts/1215',
 
118
  'support_forum' => 'https://support.iubenda.com/support/home',
119
+ 'documentation' => 'https://www.iubenda.com/en/help/posts/1215',
120
+ 'how_generate_tc' => 'https://www.iubenda.com/en/help/19461',
121
+ 'how_generate_cs' => 'https://www.iubenda.com/en/help/1177',
122
+ 'how_generate_pp' => 'https://www.iubenda.com/en/help/463-generate-privacy-policy',
123
+ 'how_generate_cons' => 'https://www.iubenda.com/en/help/6473-consent-solution-js-documentation#generate-embed',
124
+ 'about_pp' => 'https://www.iubenda.com/en/privacy-and-cookie-policy-generator',
125
+ 'about_cs' => 'https://www.iubenda.com/en/cookie-solution',
126
+ 'about_tc' => 'https://www.iubenda.com/en/terms-and-conditions-generator',
127
+ 'flow_page' => "https://www.iubenda.com/en/flow/{$siteId}",
128
+ 'about_cons' => 'https://www.iubenda.com/en/consent-solution',
129
+ 'amp_support' => 'https://www.iubenda.com/en/help/22135-cookie-solution-amp-wordpress#amp-domain',
130
+ 'enable_amp_support' => 'https://www.iubenda.com/en/help/22135-cookie-solution-amp-wordpress#step-2-enable-the-google-amp-support',
131
+ 'wordpress_support' => 'https://www.iubenda.com/en/help/370-how-to-use-iubenda-privacy-and-cookie-policy-on-a-wordpress-website',
132
+ 'privacy_policy_generator_edit' => array_get($QG_Response, 'privacy_policies.en.edit_url', '') ?? '',
133
+ 'privacy_policy_generator_setup' => array_get($QG_Response, 'privacy_policies.en.setup_url', '') ?? '',
134
+ 'automatic_block_scripts' => 'https://www.iubenda.com/en/help/1215-cookie-solution-wordpress-plugin-installation-guide#functionality',
135
  ),
136
+ 'it' => array(
137
+ 'iab' => 'https://www.iubenda.com/it/help/7440-enable-preference-management-iab-framework',
138
+ 'enable_iab' => 'https://www.iubenda.com/it/help/7440-iab-framework-cmp#why-publishers-should-enable-the-transparency-and-consent-framework',
139
+ 'guide' => 'https://www.iubenda.com/it/cookie-solution',
140
+ 'plugin_page' => 'https://www.iubenda.com/it/help/posts/810',
141
+ 'support_forum' => 'https://support.iubenda.com/support/home',
142
+ 'documentation' => 'https://www.iubenda.com/it/help/posts/810',
143
+ 'how_generate_tc' => 'https://www.iubenda.com/it/help/19394',
144
+ 'how_generate_cs' => 'https://www.iubenda.com/it/help/680',
145
+ 'how_generate_pp' => 'https://www.iubenda.com/it/help/463-generate-privacy-policy',
146
+ 'how_generate_cons' => 'https://www.iubenda.com/it/help/6473-consent-solution-js-documentation#generate-embed',
147
+ 'about_pp' => 'https://www.iubenda.com/it/privacy-and-cookie-policy-generator',
148
+ 'about_cs' => 'https://www.iubenda.com/it/cookie-solution',
149
+ 'about_tc' => 'https://www.iubenda.com/it/terms-and-conditions-generator',
150
+ 'flow_page' => "https://www.iubenda.com/it/flow/{$siteId}",
151
+ 'about_cons' => 'https://www.iubenda.com/it/consent-solution',
152
+ 'amp_support' => 'https://www.iubenda.com/it/help/22135-cookie-solution-amp-wordpress#amp-domain',
153
+ 'enable_amp_support' => 'https://www.iubenda.com/it/help/22135-cookie-solution-amp-wordpress#step-2-enable-the-google-amp-support',
154
+ 'wordpress_support' => 'https://www.iubenda.com/it/help/370-how-to-use-iubenda-privacy-and-cookie-policy-on-a-wordpress-website',
155
+ 'privacy_policy_generator_edit' => array_get($QG_Response, 'privacy_policies.it.edit_url', '') ?? '',
156
+ 'privacy_policy_generator_setup' => array_get($QG_Response, 'privacy_policies.it.setup_url', '') ?? '',
157
+ 'automatic_block_scripts' => 'https://www.iubenda.com/it/help/1215-cookie-solution-wordpress-plugin-installation-guide#functionality',
158
+ ),
159
+ 'de' => array(
160
+ 'iab' => 'https://www.iubenda.com/de/help/7440-enable-preference-management-iab-framework',
161
+ 'enable_iab' => 'https://www.iubenda.com/de/help/7440-iab-framework-cmp#why-publishers-should-enable-the-transparency-and-consent-framework',
162
+ 'guide' => 'https://www.iubenda.com/de/cookie-solution',
163
+ 'plugin_page' => 'https://www.iubenda.com/de/help/posts/810',
164
+ 'support_forum' => 'https://support.iubenda.com/support/home',
165
+ 'documentation' => 'https://www.iubenda.com/de/help/posts/810',
166
+ 'how_generate_tc' => 'https://www.iubenda.com/de/help/19394',
167
+ 'how_generate_cs' => 'https://www.iubenda.com/de/help/680',
168
+ 'how_generate_pp' => 'https://www.iubenda.com/de/help/463-generate-privacy-policy',
169
+ 'how_generate_cons' => 'https://www.iubenda.com/de/help/6473-consent-solution-js-documentation#generate-embed',
170
+ 'about_pp' => 'https://www.iubenda.com/de/privacy-and-cookie-policy-generator',
171
+ 'about_cs' => 'https://www.iubenda.com/de/cookie-solution',
172
+ 'about_tc' => 'https://www.iubenda.com/de/terms-and-conditions-generator',
173
+ 'flow_page' => "https://www.iubenda.com/de/flow/{$siteId}",
174
+ 'about_cons' => 'https://www.iubenda.com/de/consent-solution',
175
+ 'amp_support' => 'https://www.iubenda.com/de/help/22135-cookie-solution-amp-wordpress#amp-domain',
176
+ 'enable_amp_support' => 'https://www.iubenda.com/de/help/22135-cookie-solution-amp-wordpress#step-2-enable-the-google-amp-support',
177
+ 'wordpress_support' => 'https://www.iubenda.com/de/help/370-how-to-use-iubenda-privacy-and-cookie-policy-on-a-wordpress-website',
178
+ 'privacy_policy_generator_edit' => array_get($QG_Response, 'privacy_policies.de.edit_url', '') ?? '',
179
+ 'privacy_policy_generator_setup' => array_get($QG_Response, 'privacy_policies.de.setup_url', '') ?? '',
180
+ 'automatic_block_scripts' => 'https://www.iubenda.com/de/help/1215-cookie-solution-wordpress-plugin-installation-guide#functionality',
181
+ ),
182
+ 'es' => array(
183
+ 'iab' => 'https://www.iubenda.com/es/help/7440-enable-preference-management-iab-framework',
184
+ 'enable_iab' => 'https://www.iubenda.com/es/help/7440-iab-framework-cmp#why-publishers-should-enable-the-transparency-and-consent-framework',
185
+ 'guide' => 'https://www.iubenda.com/es/cookie-solution',
186
+ 'plugin_page' => 'https://www.iubenda.com/es/help/posts/810',
187
+ 'support_forum' => 'https://support.iubenda.com/support/home',
188
+ 'documentation' => 'https://www.iubenda.com/es/help/posts/810',
189
+ 'how_generate_tc' => 'https://www.iubenda.com/es/help/19394',
190
+ 'how_generate_cs' => 'https://www.iubenda.com/es/help/680',
191
+ 'how_generate_pp' => 'https://www.iubenda.com/es/help/463-generate-privacy-policy',
192
+ 'how_generate_cons' => 'https://www.iubenda.com/es/help/6473-consent-solution-js-documentation#generate-embed',
193
+ 'about_pp' => 'https://www.iubenda.com/es/privacy-and-cookie-policy-generator',
194
+ 'about_cs' => 'https://www.iubenda.com/es/cookie-solution',
195
+ 'about_tc' => 'https://www.iubenda.com/es/terms-and-conditions-generator',
196
+ 'flow_page' => "https://www.iubenda.com/es/flow/{$siteId}",
197
+ 'about_cons' => 'https://www.iubenda.com/es/consent-solution',
198
+ 'amp_support' => 'https://www.iubenda.com/es/help/22135-cookie-solution-amp-wordpress#amp-domain',
199
+ 'enable_amp_support' => 'https://www.iubenda.com/es/help/22135-cookie-solution-amp-wordpress#step-2-enable-the-google-amp-support',
200
+ 'wordpress_support' => 'https://www.iubenda.com/es/help/370-how-to-use-iubenda-privacy-and-cookie-policy-on-a-wordpress-website',
201
+ 'privacy_policy_generator_edit' => array_get($QG_Response, 'privacy_policies.es.edit_url', '') ?? '',
202
+ 'privacy_policy_generator_setup' => array_get($QG_Response, 'privacy_policies.es.setup_url', '') ?? '',
203
+ 'automatic_block_scripts' => 'https://www.iubenda.com/es/help/1215-cookie-solution-wordpress-plugin-installation-guide#functionality',
204
+ ),
205
+ 'fr' => array(
206
+ 'iab' => 'https://www.iubenda.com/fr/help/7440-enable-preference-management-iab-framework',
207
+ 'enable_iab' => 'https://www.iubenda.com/fr/help/7440-iab-framework-cmp#why-publishers-should-enable-the-transparency-and-consent-framework',
208
+ 'guide' => 'https://www.iubenda.com/fr/cookie-solution',
209
+ 'plugin_page' => 'https://www.iubenda.com/fr/help/posts/810',
210
+ 'support_forum' => 'https://support.iubenda.com/support/home',
211
+ 'documentation' => 'https://www.iubenda.com/fr/help/posts/810',
212
+ 'how_generate_tc' => 'https://www.iubenda.com/fr/help/19394',
213
+ 'how_generate_cs' => 'https://www.iubenda.com/fr/help/680',
214
+ 'how_generate_pp' => 'https://www.iubenda.com/fr/help/463-generate-privacy-policy',
215
+ 'how_generate_cons' => 'https://www.iubenda.com/fr/help/6473-consent-solution-js-documentation#generate-embed',
216
+ 'about_pp' => 'https://www.iubenda.com/fr/privacy-and-cookie-policy-generator',
217
+ 'about_cs' => 'https://www.iubenda.com/fr/cookie-solution',
218
+ 'about_tc' => 'https://www.iubenda.com/fr/terms-and-conditions-generator',
219
+ 'flow_page' => "https://www.iubenda.com/fr/flow/{$siteId}",
220
+ 'about_cons' => 'https://www.iubenda.com/fr/consent-solution',
221
+ 'amp_support' => 'https://www.iubenda.com/fr/help/22135-cookie-solution-amp-wordpress#amp-domain',
222
+ 'enable_amp_support' => 'https://www.iubenda.com/fr/help/22135-cookie-solution-amp-wordpress#step-2-enable-the-google-amp-support',
223
+ 'wordpress_support' => 'https://www.iubenda.com/fr/help/370-how-to-use-iubenda-privacy-and-cookie-policy-on-a-wordpress-website',
224
+ 'privacy_policy_generator_edit' => array_get($QG_Response, 'privacy_policies.fr.edit_url', '') ?? '',
225
+ 'privacy_policy_generator_setup' => array_get($QG_Response, 'privacy_policies.fr.setup_url', '') ?? '',
226
+ 'automatic_block_scripts' => 'https://www.iubenda.com/fr/help/1215-cookie-solution-wordpress-plugin-installation-guide#functionality',
227
+ ),
228
+ 'pt-br' => array(
229
+ 'iab' => 'https://www.iubenda.com/pt-br/help/7440-enable-preference-management-iab-framework',
230
+ 'enable_iab' => 'https://www.iubenda.com/pt-br/help/7440-iab-framework-cmp#why-publishers-should-enable-the-transparency-and-consent-framework',
231
+ 'guide' => 'https://www.iubenda.com/pt-br/cookie-solution',
232
+ 'plugin_page' => 'https://www.iubenda.com/pt-br/help/posts/810',
233
+ 'support_forum' => 'https://support.iubenda.com/support/home',
234
+ 'documentation' => 'https://www.iubenda.com/pt-br/help/posts/810',
235
+ 'how_generate_tc' => 'https://www.iubenda.com/pt-br/help/19394',
236
+ 'how_generate_cs' => 'https://www.iubenda.com/pt-br/help/680',
237
+ 'how_generate_pp' => 'https://www.iubenda.com/pt-br/help/463-generate-privacy-policy',
238
+ 'how_generate_cons' => 'https://www.iubenda.com/pt-br/help/6473-consent-solution-js-documentation#generate-embed',
239
+ 'about_pp' => 'https://www.iubenda.com/pt-br/privacy-and-cookie-policy-generator',
240
+ 'about_cs' => 'https://www.iubenda.com/pt-br/cookie-solution',
241
+ 'about_tc' => 'https://www.iubenda.com/pt-br/terms-and-conditions-generator',
242
+ 'flow_page' => "https://www.iubenda.com/pt-br/flow/{$siteId}",
243
+ 'about_cons' => 'https://www.iubenda.com/pt-br/consent-solution',
244
+ 'amp_support' => 'https://www.iubenda.com/pt-br/help/22135-cookie-solution-amp-wordpress#amp-domain',
245
+ 'enable_amp_support' => 'https://www.iubenda.com/pt-br/help/22135-cookie-solution-amp-wordpress#step-2-enable-the-google-amp-support',
246
+ 'wordpress_support' => 'https://www.iubenda.com/pt-br/help/370-how-to-use-iubenda-privacy-and-cookie-policy-on-a-wordpress-website',
247
+ 'privacy_policy_generator_edit' => array_get($QG_Response, 'privacy_policies.pt-br.edit_url', '') ?? '',
248
+ 'privacy_policy_generator_setup' => array_get($QG_Response, 'privacy_policies.pt-br.setup_url', '') ?? '',
249
+ 'automatic_block_scripts' => 'https://www.iubenda.com/pt-br/help/1215-cookie-solution-wordpress-plugin-installation-guide#functionality',
250
+ )
251
  );
252
 
253
+ foreach ($this->services as $name => $service) {
254
+ $this->services[$name]['status'] = array_get(iubenda()->options, "activated_products.{$service['key']}", 'false');
255
+ }
256
+ $this->quick_generator = get_option(static::IUB_QG_Response) ?: [];
257
+
258
  $locale = explode( '_', get_locale() );
259
  $locale_code = $locale[0];
260
 
266
  // update item action
267
  $this->action = 'save';
268
  } else {
269
+ $this->action = isset( $_GET['action'] ) && -1 != $_GET['action'] ? esc_attr( $_GET['action'] ) : '';
270
+ $this->action = isset( $_GET['action2'] ) && -1 != $_GET['action2'] ? esc_attr( $_GET['action2'] ) : $this->action;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  }
272
  }
273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  /**
275
  * Add submenu.
276
  *
287
  add_menu_page(
288
  'iubenda', 'iubenda', apply_filters( 'iubenda_cookie_law_cap', 'manage_options' ), 'iubenda', array( $this, 'options_page' ), 'none'
289
  );
 
 
290
  }
291
  }
292
 
293
+ private function check_site_is_already_made_setup() {
294
+ $result = array_filter(array_column($this->services, 'status'), function ($service) { return (stripos($service, 'false') === false); });
 
 
 
 
 
 
 
 
 
 
 
 
 
295
 
296
+ if ($result) {
297
+ return true;
298
+ }
 
 
 
 
 
 
299
 
300
+ // Check if the services are configured
301
+ $result = array_filter(array_column(iubenda()->options, 'configured'), function ($service) { return (stripos($service, 'false') === false); });
302
 
303
+ if ($result) {
304
+ return true;
305
+ }
 
 
 
306
 
307
+ return false;
308
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
 
310
+ /**
311
+ * Load admin options page.
312
+ *
313
+ * @return void
314
+ */
315
+ public function options_page() {
316
+ global $pagenow;
 
 
 
 
 
 
 
 
 
 
 
 
 
317
 
318
+ $show_products_page = $this->check_site_is_already_made_setup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
 
320
+ if ( ! current_user_can( apply_filters( 'iubenda_cookie_law_cap', 'manage_options' ) ) ) {
321
+ wp_die( __( "You don't have permission to access this page.", 'iubenda' ) );
322
+ }
323
+ $default = 'frontpage';
324
 
325
+ if($show_products_page){
326
+ $default = 'products-page';
327
+ }elseif(!empty((new QuickGeneratorService())->QG_Response)){
328
+ $default = 'integrate-setup';
329
+ }
330
+ $view = array_get($_GET, 'view', $default);
331
+
332
+ switch ($view) {
333
+ case "integrate-setup":
334
+ require_once IUBENDA_PLUGIN_PATH . 'views/integrate-setup.php';
335
+ break;
336
+ case 'products-page':
337
+ require_once IUBENDA_PLUGIN_PATH . 'views/products-page.php';
338
+ break;
339
+ case "tc-configuration":
340
+ $pageLabels = [['title' => __('Terms and condition', 'iubenda')]];
341
+ $key = 'tc';
342
+ $service = array_get(iubenda()->settings->services, $key);
343
+ require_once IUBENDA_PLUGIN_PATH . 'views/tc-configuration.php';
344
+ break;
345
+ case "pp-configuration":
346
+ $pageLabels = [['title' => __('Privacy and Cookie Policy', 'iubenda')]];
347
+ $key = 'pp';
348
+ $service = array_get(iubenda()->settings->services, $key);
349
+ require_once IUBENDA_PLUGIN_PATH . 'views/pp-configuration.php';
350
+ break;
351
+ case "cs-configuration":
352
+ $pageLabels = [['title' => __('Cookie Solution', 'iubenda')]];
353
+ $key = 'cs';
354
+ $service = array_get(iubenda()->settings->services, $key);
355
+ require_once IUBENDA_PLUGIN_PATH . 'views/cs-configuration.php';
356
+ break;
357
+ case "cons-configuration":
358
+ $pageLabels = [['title' => __('Consent Solution', 'iubenda')]];
359
+ require_once IUBENDA_PLUGIN_PATH . 'views/cons-configuration.php';
360
+ break;
361
+ case "cons-form-edit":
362
+ $form_id = ! empty( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0;
363
+ $form = ! empty( $form_id ) ? iubenda()->forms->get_form( $form_id ) : false;
364
+
365
+ if ( ! $form ){
366
+ return;
367
+ }
368
+ $pageLabels = [
369
+ ['title' => __('Consent Solution', 'iubenda'), 'href' => add_query_arg( array( 'view' => 'cons-configuration' ), iubenda()->base_url )],
370
+ ['title' => $form->post_title]
371
+ ];
372
+ require_once IUBENDA_PLUGIN_PATH . 'views/cons-single-form.php';
373
+ break;
374
+ default:
375
+ if ($show_products_page) {
376
+ require_once IUBENDA_PLUGIN_PATH . 'views/products-page.php';
377
+ }
378
+ else {
379
+ require_once IUBENDA_PLUGIN_PATH . 'views/frontpage.php';
380
+ }
381
+ }
382
+ }
383
 
384
+ public function admin_enqueue_scripts($page) {
385
+ if ( ! in_array( $page, array( 'toplevel_page_iubenda', 'settings_page_iubenda' ) ) ){
386
+ wp_enqueue_style( 'iubenda-admin', IUBENDA_PLUGIN_URL . '/assets/css/admin.css' );
387
+ return;
388
+ }
389
+ wp_enqueue_style('iubenda-admin', IUBENDA_PLUGIN_URL . '/assets/css/style.css');
390
+ wp_enqueue_script('iubenda-admin', IUBENDA_PLUGIN_URL . '/assets/js/admin.js','','',true);
391
 
392
+ // Get radar api status
393
+ $iubendaRadarApiConfiguration = get_option('iubenda_radar_api_configuration', []) ?: [];
394
 
395
+ // Localize the script with new data
396
+ $iub_js_vars = [
397
+ 'site_url' => get_site_url(),
398
+ 'radar_status' => array_get($iubendaRadarApiConfiguration, 'status'),
399
+ 'form_id' => $_GET['form_id'] ?? 0,
400
+ ];
401
+ wp_localize_script( 'iubenda-admin', 'iub_js_vars', $iub_js_vars );
 
 
 
 
 
402
 
403
+ wp_register_script('iubenda-admin-tabs', IUBENDA_PLUGIN_URL . '/assets/js/tabs.js');
404
+ wp_enqueue_script('iubenda-admin-tabs', IUBENDA_PLUGIN_URL . '/assets/js/tabs.js', array(''), false, true);
405
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
 
407
  /**
408
  * Plugin options migration for versions < 1.14.0
418
 
419
  if ( $db_version != false ) {
420
  if ( version_compare( $db_version, '1.14.0', '<' ) ) {
421
+ $options = [];
422
 
423
  $old_new = array(
424
  'iubenda_parse' => 'parse',
425
  'skip_parsing' => 'skip_parsing',
426
  'iubenda_ctype' => 'ctype',
 
427
  'parser_engine' => 'parser_engine',
428
  'iubenda_output_feed' => 'output_feed',
429
  'iubenda-code-default' => 'code_default',
456
 
457
  add_option( 'iubenda_cookie_law_solution', $options, '', 'no' );
458
  add_option( 'iubenda_cookie_law_version', iubenda()->version, '', 'no' );
459
+ }
460
  }
461
+ }
462
 
463
+ public function update_options($data = []){
464
+ $data = $data ?: $_POST;
 
 
 
 
 
 
 
 
 
465
 
466
+ $products = [
467
+ 'iubenda_privacy_policy_solution' => 'pp',
468
+ 'iubenda_cookie_law_solution' => 'cs',
469
+ 'iubenda_terms_conditions_solution' => 'tc',
470
+ 'iubenda_consent_solution' => 'cons',
471
+ ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
472
 
473
+ $result = $this->init_prepare_product_options($products, $data);
 
 
 
 
474
 
475
+ // Validate whether the product (CS) is active or not
476
+ $iubenda_cookie_law_solution_status = array_get($result, 'iubenda_activated_products.iubenda_cookie_law_solution', 'false') ?: 'false';
477
+ if($iubenda_cookie_law_solution_status != 'true'){
478
+ echo json_encode(['status' => 'error', 'responseText' => "( CS ) must be activated."]);
479
+ wp_die();
480
+ }
481
 
482
+ // validating Embed Codes of product contains at least one valid code if the product is activated
483
+ foreach (array_get($result, 'iubenda_activated_products', []) ?: [] as $product_name => $product_status) {
484
+ if($product_status == 'false' || $product_name == 'iubenda_consent_solution'){
485
+ continue;
486
+ }
487
+
488
+ // Count valid codes per $product_name and return error if doesn't have at least 1 valid code
489
+ if(count(array_filter(array_get($result, "codes_statues.{$product_name}_codes", []) ?: [])) == 0){
490
+ echo json_encode(['status' => 'error', 'responseText' => "( {$product_name} ) At least one code must be valid."]);
491
+ wp_die();
492
+ }
493
+ }
494
 
495
+ $this->save_init_prepared_product_options($products, $result);
 
496
 
497
+ $data = [
498
+ 'status' => 'done',
499
+ ];
500
+ echo json_encode($data);
501
+ wp_die();
502
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
503
 
504
+ public function toggle_services(){
505
+ $name = array_get($_POST, 'name');
506
+ $status = array_get($_POST, 'status');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
 
508
+ if($status != 'true'){
509
+ $status = 'false';
510
+ }
511
 
512
+ $iubenda_activated_products = get_option( 'iubenda_activated_products');
513
+ $iubenda_activated_products[$name] = $status;
514
 
515
+ update_option( 'iubenda_activated_products', $iubenda_activated_products );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
 
517
+ // Reload Options and activated products
518
+ iubenda()->options['activated_products'] = get_option( 'iubenda_activated_products', [] );
519
+ $this->load_defaults();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
 
521
+ $data = ['status' => 'done', 'rating_percentage' => iubenda()->serviceRating->servicesPercentage()];
522
+ echo json_encode($data);
523
+ wp_die();
524
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
525
 
526
+ /**
527
+ * Process the bulk actions
528
+ *
529
+ * @return void
530
+ */
531
+ public function process_actions() {
532
+ global $pagenow;
533
+
534
+ $page = ! empty( $_POST['option_page'] ) ? esc_attr( $_POST['option_page'] ) : ( ! empty( $_GET['page'] ) ? esc_attr( $_GET['page'] ) : '' );
535
+ $id = isset( $_REQUEST['form_id'] ) ? ( is_array( $_REQUEST['form_id'] ) ? array_map( 'ansint', $_REQUEST['form_id'] ) : absint( $_REQUEST['form_id'] ) ) : false;
536
+ $view_key = ! empty( $_GET['view'] ) ? esc_attr( $_GET['view'] ) : null;
537
+
538
+ if ( ! $page )
539
+ return;
540
+
541
+ // get redirect url
542
+ if ( iubenda()->options['cs']['menu_position'] === 'submenu' && $pagenow === 'admin.php' ) {
543
+ // sub menu
544
+ $redirect_to = admin_url( 'options-general.php?page=iubenda&view=' . $view_key );
545
+ } else {
546
+ // top menu
547
+ $redirect_to = admin_url( 'admin.php?page=iubenda&view=' . $view_key );
548
+ }
549
 
550
+ // add comments cookie option notice
551
+ if ( $view_key == 'cons-configuration' && ! empty( iubenda()->options['cons']['public_api_key'] ) ) {
552
+ $cookies_enabled = get_option( 'show_comments_cookies_opt_in' );
553
+ if ( ! $cookies_enabled ) {
554
+ $this->add_notice( 'iub_comment_cookies_disabled', sprintf( __( 'Please enable comments cookies opt-in checkbox in the <a href="%s" target="_blank">Discussion settings</a>.', 'iubenda' ), esc_url( admin_url( 'options-discussion.php' ) ) ), 'notice' );
555
+ }
556
+ }
557
 
558
+ $result = null;
 
 
 
 
 
 
 
 
559
 
560
+ switch ( $this->action ) {
561
+ case 'autodetect' :
562
+ $result = iubenda()->forms->autodetect_forms();
563
 
564
+ // make sure it's current host location
565
+ wp_safe_redirect( $redirect_to );
566
+ exit;
567
 
568
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
569
 
570
+ case 'save' :
571
+ if ( ! $id )
572
+ return;
 
 
 
 
 
 
 
 
573
 
574
+ $form = iubenda()->forms->get_form( $id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
 
576
+ if ( $form->ID != $id )
577
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
 
579
+ $status = isset( $_POST['status'] ) && in_array( $_POST['status'], array_keys( iubenda()->forms->statuses ) ) ? esc_attr( $_POST['status'] ) : 'publish';
580
+ $subject = isset( $_POST['subject'] ) && is_array( $_POST['subject'] ) ? array_map( 'esc_attr', $_POST['subject'] ) : array();
581
+ $preferences = array();
582
+ $exclude = array();
583
+ $legal_notices = array();
 
 
 
 
 
 
584
 
585
+ $preferences_raw = isset( $_POST['preferences'] ) && is_array( $_POST['preferences'] ) ? array_map( array( $this, 'array_map_callback' ), $_POST['preferences'] ) : array();
586
+ $exclude_raw = isset( $_POST['exclude'] ) && is_array( $_POST['exclude'] ) ? array_map( array( $this, 'array_map_callback' ), $_POST['exclude'] ) : array();
587
+ $legal_notices_raw = isset( $_POST['legal_notices'] ) && is_array( $_POST['legal_notices'] ) ? array_map( array( $this, 'array_map_callback' ), $_POST['legal_notices'] ) : array();
 
 
 
 
 
 
 
 
 
588
 
589
+ // format preferences data
590
+ if ( ! empty( $preferences_raw ) && is_array( $preferences_raw ) ) {
591
+ foreach ( $preferences_raw as $index => $data ) {
592
+ if ( ! empty( $data['field'] ) && ( ! is_null( $data['value'] ) || ! "" == $data['value'] ) ) {
593
+ $preferences[ sanitize_key( $data['field'] ) ] = $data['value'];
594
+ }
595
+ }
596
+ }
597
 
598
+ // format exclude data
599
+ if ( ! empty( $exclude_raw ) && is_array( $exclude_raw ) ) {
600
+ foreach ( $exclude_raw as $index => $data ) {
601
+ if ( ! empty( $data['field'] ) )
602
+ $exclude[] = $data['field'];
603
+ }
604
+ }
605
 
606
+ // format legal notices data
607
+ if ( ! empty( $legal_notices_raw ) && is_array( $legal_notices_raw ) ) {
608
+ foreach ( $legal_notices_raw as $index => $data ) {
609
+ if ( ! empty( $data['field'] ) )
610
+ $legal_notices[] = $data['field'];
611
+ }
612
+ }
613
 
614
+ // form first save, update status to mapped automatically
615
+ if ( empty( $form->form_subject ) && empty( $form->form_preferences ) ) {
616
+ $status = 'mapped';
617
+ }
618
 
619
+ // echo '<pre>'; print_r( $_POST ); echo '</pre>'; exit;
620
+ $filtered_subjects = array_filter($subject, array(
621
+ $this,
622
+ 'is_not_empty'
623
+ ));
624
 
625
+ // bail if empty fields
626
+ if ( ! count( $filtered_subjects ) ) {
627
+ $this->add_notice( 'iub_form_fields_missing', __( 'Form saving failed. Please fill the Subject fields.', 'iubenda' ), 'error' );
628
+ return;
629
+ }
630
 
631
+ $args = array(
632
+ 'ID' => $form->ID,
633
+ 'status' => $status,
634
+ 'object_type' => $form->object_type,
635
+ 'object_id' => $form->object_id,
636
+ 'form_source' => $form->form_source,
637
+ 'form_title' => $form->post_title,
638
+ 'form_date' => $form->post_modified,
639
+ 'form_fields' => $form->form_fields,
640
+ 'form_subject' => $subject,
641
+ 'form_preferences' => $preferences,
642
+ 'form_exclude' => $exclude,
643
+ 'form_legal_notices' => $legal_notices
644
+ );
645
 
646
+ $result = iubenda()->forms->save_form( $args );
 
 
647
 
648
+ break;
 
 
 
 
 
 
 
649
 
650
+ case 'delete' :
651
+ if ( ! $id )
652
+ return;
653
 
654
+ $form = iubenda()->forms->get_form( $id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
655
 
656
+ if ( empty( $form ) )
657
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
658
 
659
+ $result = iubenda()->forms->delete_form( $id );
 
 
 
 
 
 
 
 
660
 
661
+ // make sure it's current host location
662
+ wp_safe_redirect( $redirect_to );
663
+ exit;
 
 
 
 
 
 
 
664
 
665
+ break;
 
 
666
 
667
+ case 'disable_skip_parsing' :
 
 
 
668
 
669
+ // disable skip parsing option
670
+ $options = iubenda()->options['cs'];
671
+ $options['skip_parsing'] = false;
 
672
 
673
+ update_option( 'iubenda_cookie_law_solution', $options );
 
 
674
 
675
+ $this->add_notice( 'iub_settings_updated', __( 'Settings saved.', 'iubenda' ), 'success' );
 
 
676
 
677
+ // make sure it's current host location
678
+ wp_safe_redirect( $redirect_to );
679
+ exit;
 
680
 
681
+ break;
 
 
 
682
 
683
+ default :
684
+ return;
685
+ }
686
 
687
+ if ( ! empty ( $result ) ) {
688
+ //
689
+ } else {
690
+ //
691
+ }
692
+ }
693
 
694
+ /**
695
+ * Add admin notice.
696
+ *
697
+ * @param mixed $message
698
+ * @param string $notice_type
699
+ */
700
+ public function add_notice( $key, $message, $notice_type = 'notice' ) {
701
+ $key = ! empty( $key ) ? sanitize_key( $key ) : '';
702
+ $message = ! empty( $message ) ? wp_kses_post( $message ) : '';
703
+ $notice_type = ! empty( $notice_type ) && in_array( $notice_type, $this->notice_types ) ? $notice_type : 'notice';
704
 
705
+ if ( ! $key || ! $message )
706
+ return;
707
 
708
+ $notices = get_transient( 'iubenda_dashboard_notices' );
709
+ $delay = MINUTE_IN_SECONDS * 2;
710
 
711
+ // Check notice type is exist before checking the key
712
+ if ( empty( $notices ) || ( isset( $notices[ $notice_type ] ) && ! array_key_exists( $key, $notices[ $notice_type ] ) ) ) {
713
+ $notices[$notice_type][$key] = $message;
 
 
 
714
 
715
+ set_transient( 'iubenda_dashboard_notices', $notices, $delay );
716
+ }
717
+ }
718
 
719
+ /**
720
+ * Display admin notices.
721
+ *
722
+ * @return mixed
723
+ */
724
+ public function print_notices() {
725
+ $notices = get_transient( 'iubenda_dashboard_notices' );
726
+ foreach ( $this->notice_types as $notice_type ) {
727
+ if ( $this->notice_count( $notices, $notice_type ) > 0 ) {
728
+ require IUBENDA_PLUGIN_PATH . '/views/partials/alert.php';
729
+ }
730
+ }
731
+ delete_transient( 'iubenda_dashboard_notices' );
732
+ }
733
+
734
+ public function has_notices() {
735
+ $notices = get_transient( 'iubenda_dashboard_notices' );
736
+ foreach ( $this->notice_types as $notice_type ) {
737
+ if ( $this->notice_count( $notices, $notice_type ) > 0 ) {
738
+ return true;
739
+ }
740
+ }
741
 
742
+ return false;
743
+ }
 
 
744
 
745
+ /**
746
+ * Count notices function.
747
+ *
748
+ * @param string $notice_type
749
+ * @return int
750
+ */
751
+ public function notice_count( $all_notices = array(), $notice_type = '' ) {
752
+ $notice_count = 0;
753
+
754
+ if ( isset( $all_notices[$notice_type] ) ) {
755
+ $notice_count = absint( sizeof( $all_notices[$notice_type] ) );
756
+ } elseif ( empty( $notice_type ) ) {
757
+ foreach ( $all_notices as $notices ) {
758
+ $notice_count += absint( sizeof( $all_notices ) );
759
+ }
760
+ }
761
 
762
+ return $notice_count;
763
+ }
764
 
765
+ /**
766
+ * Perform show notice on plugin installation/upgrade.
767
+ *
768
+ * @return void
769
+ */
770
+ public function maybe_show_notice() {
771
+ if ( ! current_user_can( 'install_plugins' ) )
772
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
773
 
774
+ $current_update = 10;
775
+ $activation = (array) get_option( 'iubenda_activation_data', iubenda()->activation );
 
776
 
777
+ // delete_option( 'iubenda_activation_data' );
778
+ // echo '<pre>'; print_r( $activation ); echo '</pre>'; exit;
 
 
779
 
780
+ // get current time
781
+ $current_time = time();
782
 
783
+ if ( $activation['update_version'] < $current_update ) {
784
+ // check version, if update ver is lower than plugin ver, set update notice to true
785
+ $activation = array_merge( $activation, array( 'update_version' => $current_update, 'update_notice' => true ) );
786
 
787
+ // set activation date if not set
788
+ if ( $activation['update_date'] == false )
789
+ $activation = array_merge( $activation, array( 'update_date' => $current_time ) );
790
 
791
+ update_option( 'iubenda_activation_data', $activation );
792
+ }
 
 
 
 
 
793
 
794
+ // display current version notice
795
+ if ( $activation['update_notice'] === true ) {
796
+ // include notice js, only if needed
797
+ add_action( 'admin_print_scripts', array( $this, 'admin_inline_js' ), 999 );
798
 
799
+ // get activation date
800
+ $activation_date = $activation['update_date'];
801
 
802
+ // set delay in seconds
803
+ $delay = WEEK_IN_SECONDS;
 
804
 
805
+ if ( (int) $activation['update_delay_date'] === 0 ) {
806
+ if ( $activation_date + $delay > $current_time )
807
+ $activation['update_delay_date'] = $activation_date + $delay;
808
+ else
809
+ $activation['update_delay_date'] = $current_time;
810
 
811
+ update_option( 'iubenda_activation_data', $activation );
812
+ }
813
 
814
+ if ( ( ! empty( $activation['update_delay_date'] ) ? (int) $activation['update_delay_date'] : $current_time ) <= $current_time ) {
815
+ // add notice
816
+ add_action( 'admin_notices', array( $this, 'show_notice' ) );
817
+ }
818
+ }
819
+ }
820
 
821
+ /**
822
+ * Display admin notices at iubenda settings.
823
+ */
824
+ public function show_notice() {
825
+ ?>
826
+ <div id="iubenda-rate" class="iubenda-notice notice is-dismissible">
827
+ <div>
828
+ <p class="step-1">
829
+ <span class="notice-question"><?php _e( 'Enjoying the iubenda Cookie & Consent Solution Plugin?', 'iubenda' ); ?></span>
830
+ <span class="notice-reply">
831
+ <a href="#" class="reply-yes"><?php _e( 'Yes', 'iubenda' ); ?></a>
832
+ <a href="#" class="reply-no"><?php _e( 'No', 'iubenda' ); ?></a>
833
+ </span>
834
+ </p>
835
+ <p class="step-2 step-yes">
836
+ <span class="notice-question"><?php _e( "Whew, what a relief!? We've worked countless hours to make this plugin as useful as possible - so we're pretty happy that you're enjoying it. While you here, would you mind leaving us a 5 star rating? It would really help us out.", 'iubenda' ); ?></span>
837
+ <span class="notice-reply">
838
+ <a href="https://wordpress.org/support/plugin/iubenda-cookie-law-solution/reviews/?filter=5" target="_blank" class="reply-yes"><?php _e( 'Sure!', 'iubenda' ); ?></a>
839
+ <a href="javascript:void(0)" class="reply-no"><?php _e( 'No thanks', 'iubenda' ); ?></a>
840
+ </span>
841
+ </p>
842
+ <p class="step-2 step-no">
843
+ <span class="notice-question"><?php _e( "We're sorry to hear that. Would you mind giving us some feedback?", 'iubenda' ); ?></span>
844
+ <span class="notice-reply">
845
+ <a href="https://iubenda.typeform.com/to/BXuSMZ" target="_blank" class="reply-yes"><?php _e( 'Ok sure!', 'iubenda' ); ?></a>
846
+ <a href="javascript:void(0)" class="reply-no"><?php _e( 'No thanks', 'iubenda' ); ?></a>
847
+ </span>
848
+ </p>
849
+ </div>
850
+ </div>
851
+ <?php
852
+ }
853
 
854
+ /**
855
+ * Print admin scripts.
856
+ *
857
+ * @return void
858
+ */
859
+ public function admin_inline_js() {
860
+ if ( ! current_user_can( 'install_plugins' ) )
861
+ return;
862
+
863
+ $delay = MONTH_IN_SECONDS * 6;
864
+ ?>
865
+ <script type="text/javascript">
866
+ ( function ( $ ) {
867
+ $( document ).ready( function () {
868
+ // step 1
869
+ $( '.iubenda-notice .step-1 a' ).on( 'click', function ( e ) {
870
+ e.preventDefault();
871
+
872
+ $( '.iubenda-notice .step-1' ).slideUp( 'fast' );
873
+ $( '.iubenda-notice .step-1' ).hide( 'fast' );
874
+
875
+ if ( $( e.target ).hasClass( 'reply-yes' ) ) {
876
+ $( '.iubenda-notice .step-2.step-yes' ).show( 'fast' );
877
+ } else {
878
+ $( '.iubenda-notice .step-2.step-no' ).show( 'fast' );
879
+ };
880
+ } );
881
+ // step 2
882
+ $( '.iubenda-notice.is-dismissible' ).on( 'click', '.notice-dismiss, .step-2 a', function ( e ) {
883
+ // console.log( $( e ) );
884
+
885
+ var delay = <?php echo $delay; ?>;
886
+
887
+ if ( $( e.target ).hasClass( 'reply-yes' ) ) {
888
+ delay = 0;
889
+ }
890
+
891
+ $.post( ajaxurl, {
892
+ action: 'iubenda_dismiss_notice',
893
+ delay: delay,
894
+ url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
895
+ iubenda_nonce: '<?php echo wp_create_nonce( 'iubenda_dismiss_notice' ); ?>'
896
+ } );
897
+
898
+ $( e.delegateTarget ).slideUp( 'fast' );
899
+ } );
900
+ } );
901
+ } )( jQuery );
902
+ </script>
903
+ <?php
904
+ }
905
 
906
+ /**
907
+ * Dismiss notice.
908
+ *
909
+ * @return void
910
+ */
911
+ public function dismiss_notice() {
912
+ $result = false;
913
 
914
+ if ( ! current_user_can( 'install_plugins' ) )
915
+ return $result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
916
 
917
+ $nonce = wp_verify_nonce( $_REQUEST['iubenda_nonce'], 'iubenda_dismiss_notice' );
 
 
 
 
918
 
919
+ if ( $nonce ) {
920
+ $delay = ! empty( $_REQUEST['delay'] ) ? absint( $_REQUEST['delay'] ) : 0;
921
+ $activation = (array) get_option( 'iubenda_activation_data', iubenda()->activation );
 
 
 
 
 
 
 
 
 
 
 
922
 
923
+ // delay notice
924
+ if ( $delay > 0 ) {
925
+ $activation = array_merge( $activation, array( 'update_delay_date' => time() + $delay ) );
926
+ // hide notice permanently
927
+ } else {
928
+ $activation = array_merge( $activation, array( 'update_delay_date' => 0, 'update_notice' => false ) );
929
+ }
930
 
931
+ // update activation options
932
+ $result = update_option( 'iubenda_activation_data', $activation );
933
+ }
 
 
 
 
 
 
 
 
934
 
935
+ echo json_encode( $result );
936
+ exit;
937
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
938
 
939
+ /**
940
+ * Sanitize array helper function.
941
+ *
942
+ * @param array $array
943
+ * @return array
944
+ */
945
+ public function array_map_callback( $array ) {
946
+ if ( ! is_array( $array ) )
947
+ return array();
948
 
949
+ return array_map( 'esc_attr', $array );
950
+ }
 
 
 
 
 
 
 
 
951
 
952
+ /**
953
+ * Check the value is not empty and check it contains any value even 0
954
+ *
955
+ * @param $value
956
+ * @return bool
957
+ */
958
+ private function is_not_empty($value) {
959
+ if(is_null($value) || '' === $value){
960
+ return false;
961
+ }
962
 
963
+ return true;
964
+ }
965
 
966
+ /**
967
+ * Load admin style inline, for menu icon only.
968
+ *
969
+ * @return mixed
970
+ */
971
+ public function admin_print_styles() {
972
+ echo '
973
+ <style>
974
+ a.toplevel_page_iubenda .wp-menu-image {
975
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAyMzIgNTAzIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zOnNlcmlmPSJodHRwOi8vd3d3LnNlcmlmLmNvbS8iIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTsiPiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLDAsMCwxLDEzNi4yNDcsMjY4LjgzMSkiPiAgICAgICAgPHBhdGggZD0iTTAsLTM1LjgxTC0zNi4zLDAuNDg5TC0zNi4zLDE0MC45NzhMMCwxNDAuOTc4TDAsLTM1LjgxWk0tMjAuOTM4LC0xMjkuODAyQy02LjI4NywtMTI5LjgwMiA1LjU4NywtMTQxLjU2NSA1LjU4NywtMTU2LjA2QzUuNTg3LC0xNzAuNTU2IC02LjI4NywtMTgyLjMwOCAtMjAuOTM4LC0xODIuMzA4Qy0zNS42LC0xODIuMzA4IC00Ny40NzQsLTE3MC41NTYgLTQ3LjQ3NCwtMTU2LjA2Qy00Ny40NzQsLTE0MS41NjUgLTM1LjYsLTEyOS44MDIgLTIwLjkzOCwtMTI5LjgwMk04OS4zNiwtMTU0LjQxNkM4OS4zNiwtMTI3LjgyNSA3OS41NzUsLTEwMy40OTkgNjMuMjY5LC04NC42NzJMODYuNjk0LDIyNi42MjhMLTEyMi43MjgsMjI2LjYyOEwtMTAwLjAyNCwtNzkuMjI5Qy0xMTkuMzUxLC05OC42NjggLTEzMS4yNDcsLTEyNS4xNTkgLTEzMS4yNDcsLTE1NC40MTZDLTEzMS4yNDcsLTIxNC4wODYgLTgxLjg3NCwtMjYyLjQzOCAtMjAuOTM4LC0yNjIuNDM4QzM5Ljk5OSwtMjYyLjQzOCA4OS4zNiwtMjE0LjA4NiA4OS4zNiwtMTU0LjQxNiIgc3R5bGU9ImZpbGw6d2hpdGU7ZmlsbC1ydWxlOm5vbnplcm87Ii8+ICAgIDwvZz48L3N2Zz4=);
976
+ background-position: center center;
977
+ background-repeat: no-repeat;
978
+ background-size: 7px auto;
979
+ }
980
+ </style>
981
+ ';
982
+ }
983
+
984
+ private function services_option() {
985
+ $cs_settings = [];
986
+ if(array_get(iubenda()->options['cs'], 'configuration_type') == 'simplified'){
987
+ $legislation = array_get(iubenda()->options['cs'], 'simplified.legislation') == 'both' ? 'GDPR/CCPA' : strtoupper(array_get(iubenda()->options['cs'], 'simplified.legislation'));
988
+ $cs_settings = [
989
+ ['label' => __('Style', 'iubenda'), 'value' => ucwords(array_get(iubenda()->options['cs'], 'simplified.banner_style'))],
990
+ ['label' => __('Position', 'iubenda'), 'value' => ucwords(array_get(iubenda()->options['cs'], 'simplified.position'))],
991
+ ['label' => __('legislation', 'iubenda'), 'value' => $legislation],
992
+ ];
993
+ }else{
994
+ $languages = (new ProductHelper())->get_languages();
995
+ foreach ($languages as $k => $v) {
996
+ $code = array_get(iubenda()->options['cs'], "code_{$k}");
997
+ if($code){
998
+ $banner = iubenda()->parse_configuration($code, ['mode' => 'banner']);
999
+ $options = iubenda()->parse_configuration($code);
1000
+
1001
+ $style = array_get($banner, 'backgroundColor') ? 'White' : 'Dark';
1002
+ if(array_get($options, 'enableGdpr') === null && array_get($options, 'ccpaApplies') == 1){
1003
+ $legislation = 'GDPR/CCPA';
1004
+ }elseif(array_get($options, 'enableGdpr') === null){
1005
+ $legislation = 'GDPR';
1006
+ }else{
1007
+ $legislation = 'CCPA';
1008
+ }
1009
 
1010
+ $cs_settings = [
1011
+ ['label' => __('Style', 'iubenda'), 'value' => $style],
1012
+ ['label' => __('Position', 'iubenda'), 'value' => ucwords(array_get($banner, 'position'))],
1013
+ ['label' => __('legislation', 'iubenda'), 'value' => $legislation],
1014
+ ];
1015
+ break;
1016
+ }
1017
+ }
1018
+ }
1019
 
 
 
 
 
 
 
 
 
1020
 
1021
+ return [
1022
+ 'pp' => [
1023
+ 'status' => false,
1024
+ 'configured' => array_get(iubenda()->options['pp'], 'configured'),
1025
+ 'label' => __('Privacy and Cookie Policy', 'iubenda'),
1026
+ 'name' => 'privacy_policy',
1027
+ 'key' => 'iubenda_privacy_policy_solution',
1028
+ 'settings' => [
1029
+ ['label' => __('Version', 'iubenda'), 'value' => array_get(iubenda()->options['pp'], 'version')],
1030
+ ['label' => __('Style', 'iubenda'), 'value' => array_get(iubenda()->options['pp'], 'button_style')],
1031
+ ['label' => __('Position', 'iubenda'), 'value' => array_get(iubenda()->options['pp'], 'button_position')]
1032
+ ]
1033
+ ],
1034
+ 'cs' => [
1035
+ 'status' => false,
1036
+ 'configured' => array_get(iubenda()->options['cs'], 'configured'),
1037
+ 'label' => __('Cookie Solution', 'iubenda'),
1038
+ 'name' => 'cookie_law',
1039
+ 'key' => 'iubenda_cookie_law_solution',
1040
+ 'settings' => $cs_settings
1041
+ ],
1042
+ 'tc' => [
1043
+ 'status' => false,
1044
+ 'configured' => array_get(iubenda()->options['tc'], 'configured'),
1045
+ 'label' => __('Terms and Conditions', 'iubenda'),
1046
+ 'name' => 'terms_conditions',
1047
+ 'key' => 'iubenda_terms_conditions_solution',
1048
+ 'settings' => [
1049
+ ['label' => __('Version', 'iubenda'), 'value' => '1.5.0'],
1050
+ ['label' => __('Style', 'iubenda'), 'value' => array_get(iubenda()->options['tc'], 'button_style')],
1051
+ ['label' => __('Position', 'iubenda'), 'value' => array_get(iubenda()->options['tc'], 'button_position')]
1052
+ ]
1053
+ ],
1054
+ 'cons' => [
1055
+ 'status' => false,
1056
+ 'configured' => array_get(iubenda()->options['cons'], 'configured'),
1057
+ 'label' => __('Consent Solution', 'iubenda'),
1058
+