Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 4.1.0

Version Description

  • 24/08/2021 =

  • Now, users can configure their Google accounts without leaving the WordPress interface. We have made plugin set up flow as seamless as possible.

Download this release

Release Info

Developer Tatvic
Plugin Icon 128x128 Enhanced Ecommerce Google Analytics Plugin for WooCommerce
Version 4.1.0
Comparing to
See all releases

Code changes from version 4.0.1 to 4.1.0

Files changed (52) hide show
  1. admin/class-conversios-onboarding.php +975 -0
  2. admin/class-enhanced-ecommerce-google-analytics-admin.php +1 -1
  3. admin/class-tvc-admin-helper.php +42 -12
  4. admin/css/enhanced-ecommerce-google-analytics-admin.css +1 -1
  5. admin/css/responsive.css +192 -0
  6. admin/css/select2.css +109 -0
  7. admin/css/slick.css +46 -0
  8. admin/css/style.css +584 -0
  9. admin/helper/class-onboarding-helper.php +1024 -0
  10. admin/images/arrow_right.png +0 -0
  11. admin/images/blue-plus.png +0 -0
  12. admin/images/check-active.png +0 -0
  13. admin/images/check-wbg.png +0 -0
  14. admin/images/close-icon.png +0 -0
  15. admin/images/close-white.png +0 -0
  16. admin/images/dashboard-icon.png +0 -0
  17. admin/images/erroricon.png +0 -0
  18. admin/images/filter-icon.png +0 -0
  19. admin/images/g-logo.png +0 -0
  20. admin/images/google_signin.png +0 -0
  21. admin/images/green-check.png +0 -0
  22. admin/images/help-icon.png +0 -0
  23. admin/images/icon/lock.svg +1 -0
  24. admin/images/info-icon.png +0 -0
  25. admin/images/next.png +0 -0
  26. admin/images/notification-icon.png +0 -0
  27. admin/images/sclability-image.png +0 -0
  28. admin/images/search-icon.png +0 -0
  29. admin/images/search-icon18.png +0 -0
  30. admin/images/select-arrow.png +0 -0
  31. admin/images/selectarrow-new.png +0 -0
  32. admin/images/setting-icon.png +0 -0
  33. admin/images/smart-shopping-icon.png +0 -0
  34. admin/images/step-down-arrow.png +0 -0
  35. admin/images/step-up-arrow.png +0 -0
  36. admin/images/sync-prdct-icon.png +0 -0
  37. admin/js/onboarding-custom.js +723 -0
  38. admin/js/select2.min.js +2 -0
  39. admin/js/showmoreless.min.js +183 -0
  40. admin/js/slick.js +3011 -0
  41. admin/partials/general-fields.php +8 -8
  42. admin/partials/pricings.php +0 -1
  43. enhanced-ecommerce-google-analytics.php +5 -4
  44. includes/class-enhanced-ecommerce-google-analytics.php +6 -1
  45. includes/setup/CustomApi.php +5 -7
  46. includes/setup/account.php +0 -1
  47. includes/setup/google-ads.php +5 -5
  48. includes/setup/google-shopping-feed-gaa-config.php +5 -5
  49. includes/setup/help-html.php +5 -5
  50. includes/setup/json/country_reward.json +94 -0
  51. includes/setup/json/merchant-info.json +5 -0
  52. readme.txt +8 -6
admin/class-conversios-onboarding.php ADDED
@@ -0,0 +1,975 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @since 4.0.2
4
+ * Description: Conversios Onboarding page, It's call while active the plugin
5
+ */
6
+ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
7
+ class Conversios_Onboarding {
8
+ protected $TVC_Admin_Helper;
9
+ protected $subscriptionId;
10
+ protected $version;
11
+ protected $connect_url;
12
+ protected $customApiObj;
13
+ protected $app_id =1;
14
+ protected $plan_id = 1;
15
+ protected $tvc_data = array();
16
+ public function __construct( ){
17
+ if ( ! is_admin() ) {
18
+ return;
19
+ }
20
+ $this->includes();
21
+ /**
22
+ * Set Var
23
+ */
24
+ $this->version = PLUGIN_TVC_VERSION;
25
+ $this->customApiObj = new CustomApi();
26
+ $this->TVC_Admin_Helper = new TVC_Admin_Helper();
27
+ $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
28
+ $this->connect_url = $this->TVC_Admin_Helper->get_connect_url();
29
+ $this->tvc_data = $this->TVC_Admin_Helper->get_store_data();
30
+ $g_mail = get_option('ee_customer_gmail');
31
+ $this->tvc_data['g_mail']="";
32
+ if($g_mail){
33
+ $this->tvc_data['g_mail']=$g_mail;
34
+ }
35
+
36
+ /**
37
+ * call Hooks and function
38
+ */
39
+ add_action( 'admin_menu', array( $this, 'register' ) );
40
+ // Add the welcome screen to the network dashboard.
41
+ add_action( 'network_admin_menu', array( $this, 'register' ) );
42
+ if($this->subscriptionId == ""){
43
+ add_action( 'admin_init', array( $this, 'maybe_redirect' ), 9999 );
44
+ }
45
+ add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts' ) );
46
+ }
47
+ public function includes() {
48
+ if (!class_exists('CustomApi.php')) {
49
+ require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
50
+ }
51
+ }
52
+
53
+ public function get_countries($user_country) {
54
+ $getCountris = file_get_contents(ENHANCAD_PLUGIN_DIR . "/includes/setup/json/countries.json");
55
+ $contData = json_decode($getCountris);
56
+ if (!empty($user_country)) {
57
+ $data = "<select id='selectCountry' name='country' class='form-control slect2bx' readonly='true'>";
58
+ $data .= "<option value=''>Please select country</option>";
59
+ foreach ($contData as $key => $value) {
60
+ $selected = ($value->code == $user_country) ? "selected='selected'" : "";
61
+ $data .= "<option value=" . $value->code . " " . $selected . " >" . $value->name . "</option>";
62
+ }
63
+ $data .= "</select>";
64
+ } else {
65
+ $data = "<select id='selectCountry' name='country' class='form-control slect2bx'>";
66
+ $data .= "<option value=''>Please select country</option>";
67
+ foreach ($contData as $key => $value) {
68
+ $data .= "<option value=" . $value->code . ">" . $value->name . "</option>";
69
+ }
70
+ $data .= "</select>";
71
+ }
72
+ return $data;
73
+ }
74
+ public function is_checked($tracking_option, $is_val){
75
+ if($tracking_option == $is_val){
76
+ return 'checked="checked"';
77
+ }
78
+ }
79
+ /**
80
+ * onboarding page HTML
81
+ */
82
+ public function welcome_screen() {
83
+ $googleDetail = "";
84
+ $defaulSelection = 1;
85
+ $tracking_option = "UA";
86
+ $login_customer_id ="";
87
+ $completed_last_step ="step-0";
88
+ $complete_step = array("step-0"=>1,"step-1"=>0,"step-2"=>0,"step-3"=>0);
89
+
90
+ if ( isset($_GET['subscription_id']) && $_GET['subscription_id']){
91
+ $this->subscriptionId = $_GET['subscription_id'];
92
+ if ( isset($_GET['g_mail']) && $_GET['g_mail']){
93
+ $this->tvc_data['g_mail'] = $_GET['g_mail'];
94
+ $completed_last_step ="step-1";
95
+ $complete_step["step-0"] = 1;
96
+ }
97
+ //$this->tvc_data = json_encode($this->tvc_data);
98
+ }
99
+
100
+ if($this->subscriptionId != ""){
101
+ $google_detail = $this->customApiObj->getGoogleAnalyticDetail($this->subscriptionId);
102
+ if(property_exists($google_detail,"error") && $google_detail->error == false){
103
+ if( property_exists($google_detail, "data") && $google_detail->data != "" ){
104
+ $googleDetail = $google_detail->data;
105
+ $this->tvc_data['subscription_id'] = $googleDetail->id;
106
+ $this->tvc_data['access_token'] = $googleDetail->access_token;
107
+ $this->tvc_data['refresh_token'] = $googleDetail->refresh_token;
108
+ $this->plan_id = $googleDetail->plan_id;
109
+ $login_customer_id = $googleDetail->customer_id;
110
+ $tracking_option = $googleDetail->tracking_option;
111
+ if($googleDetail->tracking_option != ''){
112
+ $defaulSelection = 0;
113
+ }
114
+ if($this->tvc_data['g_mail'] != ""){
115
+ if($googleDetail->measurement_id != "" || $googleDetail->property_id != ""){
116
+ $complete_step["step-1"] = 1;
117
+ }
118
+ if($googleDetail->google_ads_id != "" ){
119
+ $complete_step["step-2"] = 1;
120
+ }
121
+ if($googleDetail->google_merchant_center_id != "" ){
122
+ $complete_step["step-3"] = 1;
123
+ }
124
+ }
125
+
126
+ }
127
+ }
128
+ }
129
+
130
+ $is_e_e_tracking = (property_exists($googleDetail,"enhanced_e_commerce_tracking") && $googleDetail->enhanced_e_commerce_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
131
+ $is_u_t_tracking = (property_exists($googleDetail,"user_time_tracking") && $googleDetail->user_time_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
132
+ $is_a_g_snippet = (property_exists($googleDetail,"add_gtag_snippet") && $googleDetail->add_gtag_snippet == 1)?"checked":(($defaulSelection == 1)?"checked":"");
133
+ $is_c_i_tracking = (property_exists($googleDetail,"client_id_tracking") && $googleDetail->client_id_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
134
+ $is_e_tracking = (property_exists($googleDetail,"exception_tracking") && $googleDetail->exception_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
135
+ $is_e_l_a_tracking = (property_exists($googleDetail,"enhanced_link_attribution_tracking") && $googleDetail->enhanced_link_attribution_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
136
+
137
+ $countries = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "/includes/setup/json/countries.json"));
138
+ $credit = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "/includes/setup/json/country_reward.json"));
139
+
140
+ $off_country = "";
141
+ $off_credit_amt = "";
142
+ if(is_array($countries) || is_object($countries)){
143
+ foreach( $countries as $key => $value ){
144
+ if($value->code == $this->tvc_data['user_country']){
145
+ $off_country = $value->name;
146
+ break;
147
+ }
148
+ }
149
+ }
150
+
151
+ if(is_array($credit) || is_object($credit)){
152
+ foreach( $credit as $key => $value ){
153
+ if($value->name == $off_country){
154
+ $off_credit_amt = $value->price;
155
+ break;
156
+ }
157
+ }
158
+ }
159
+ ?>
160
+ <style>
161
+ #menu-dashboard li.current{display: none;}
162
+ #wpadminbar{display: none;}
163
+ </style>
164
+ <div class="bodyrightpart onbordingbody-wapper">
165
+ <div class="loader-section" id="loader-section"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/ajax-loader.gif';?>" alt="loader"></div>
166
+ <div class="alert-message" id="tvc_popup_box"></div>
167
+ <div class="onbordingbody">
168
+ <div class="site-header">
169
+ <div class="container">
170
+ <div class="brand"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/logo.png';?>" alt="Conversios" /></div>
171
+ </div>
172
+ </div>
173
+ <div class="onbording-wrapper">
174
+ <div class="container">
175
+ <div class="smallcontainer">
176
+ <div class="onbordingtop">
177
+ <h2>Let’s get you started.</h2>
178
+ <p>Automate Google Analytics, Dynamic Remarketing & Google Shopping in just 5 minutes.</p>
179
+ </div>
180
+ <div class="row">
181
+ <!-- onborading left start -->
182
+ <div class="onboardingstepwrap">
183
+ <!-- step-0 start -->
184
+ <div class="onbordording-step onbrdstep-0 gglanystep <?php if($this->subscriptionId == "" || $this->tvc_data['g_mail']==""){ echo "activestep"; }else{echo "selectedactivestep";} ?>">
185
+ <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-0']; ?>" id="google-signing" data-id="step_0">
186
+ <div class="stepleftround">
187
+ <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'; ?>" alt="" />
188
+ </div>
189
+ <div class="stepdetwrap">
190
+ <h4>Connect Conversios with your website <?php /*<span class="helpicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/help-icon.png'; ?>" alt="" /></span> */ ?></h4>
191
+ <p><?php echo (isset($this->tvc_data['g_mail']) && $this->subscriptionId)?$this->tvc_data['g_mail']:""; ?></p>
192
+ </div>
193
+ </div>
194
+ <div class="stepmoredtlwrp">
195
+ <div class="stepmoredtl">
196
+
197
+ <?php if(!isset($this->tvc_data['g_mail']) || $this->tvc_data['g_mail'] == "" || $this->subscriptionId == ""){?>
198
+ <div class="google_connect_url google-btn">
199
+ <div class="google-icon-wrapper">
200
+ <img class="google-icon" src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'; ?>"/>
201
+ </div>
202
+ <p class="btn-text"><b>Sign in with google</b></p>
203
+ </div>
204
+ <?php } else{?>
205
+ <div class="google_connect_url google-btn">
206
+ <div class="google-icon-wrapper">
207
+ <img class="google-icon" src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'; ?>"/>
208
+ </div>
209
+ <p class="btn-text mr-35"><b>Reauthorize</b></p>
210
+ </div>
211
+ <?php } ?>
212
+ <p>Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.</p>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <!-- step-0 over -->
217
+ <!-- step-1 start -->
218
+ <div class="onbordording-step onbrdstep-1 gglanystep <?php echo ($complete_step['step-1']==1 && $this->tvc_data['g_mail'])?'selectedactivestep':''; ?> <?php if($this->subscriptionId != "" && $this->tvc_data['g_mail']){ echo "activestep"; } ?>">
219
+ <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-1']; ?>" id="google-analytics" data-id="step_1">
220
+ <div class="stepleftround">
221
+ <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'; ?>" alt="" />
222
+ </div>
223
+ <div class="stepdetwrap">
224
+ <h4>Connect Google Analytics Account </h4>
225
+ <p>Tag your website with all important e-commerce events in Google Analytics.</p>
226
+ </div>
227
+ </div>
228
+ <div class="stepmoredtlwrp">
229
+ <div class="stepmoredtl">
230
+ <form action="#">
231
+ <div class="form-row">
232
+ <h5>How do you plan to tag your website?</h5>
233
+ <div class="cstmrdobtn-item">
234
+ <label for="univeral">
235
+ <input type="radio" <?php echo $this->is_checked($tracking_option, "UA"); ?> name="analytic_tag_type" id="univeral" value="UA">
236
+ <span class="checkmark"></span>
237
+ Universal Analytics (Google Analytics 3)
238
+ </label>
239
+ <div id="UA" class="slctunivr-filed">
240
+ <select class="slect2bx google_analytics_sel" id="ua_web_property_id">
241
+ <option value=''>Select Property Id</option>
242
+ </select>
243
+ </div>
244
+ </div>
245
+ <div class="cstmrdobtn-item">
246
+ <label for="gglanytc">
247
+ <input type="radio" <?php echo $this->is_checked($tracking_option, "GA4"); ?> name="analytic_tag_type" id="gglanytc" value="GA4">
248
+ <span class="checkmark"></span>
249
+ Google Analytics 4
250
+ </label>
251
+ <div id="GA4" class="slctunivr-filed">
252
+ <select class="slect2bx google_analytics_sel" id="ga4_web_measurement_id">
253
+ <option value=''>Select Measurement Id</option>
254
+ </select>
255
+ </div>
256
+ </div>
257
+ <div class="cstmrdobtn-item">
258
+ <label for="both">
259
+ <input type="radio" <?php echo $this->is_checked($tracking_option, "BOTH"); ?> name="analytic_tag_type" id="both" value="BOTH">
260
+ <span class="checkmark"></span>
261
+ Both
262
+ </label>
263
+ <div id="BOTH" class="slctunivr-filed">
264
+ <div class="botslectbxitem">
265
+ <select class="slect2bx google_analytics_sel" id="both_web_property_id">
266
+ <option value=''>Select Property Id</option>
267
+ </select>
268
+ </div>
269
+ <div class="botslectbxitem">
270
+ <select class="slect2bx google_analytics_sel" id="both_web_measurement_id">
271
+ <option value=''>Select Measurement Id</option>
272
+ </select>
273
+ </div>
274
+ </div>
275
+ </div>
276
+ </div>
277
+ <div class="form-row">
278
+ <h5>Advance Settings (Optional)</h5>
279
+ <div class="chckbxbgbx">
280
+ <div class="cstmcheck-item">
281
+ <label for="enhanced_e_commerce_tracking">
282
+ <input type="checkbox" class="custom-control-input" name="enhanced_e_commerce_tracking" id="enhanced_e_commerce_tracking" <?php echo $is_e_e_tracking; ?>>
283
+ <span class="checkmark"></span>
284
+ Enhaced e-commerce tracking
285
+ </label>
286
+ </div>
287
+ <div class="cstmcheck-item">
288
+ <label for="add_gtag_snippet">
289
+ <input type="checkbox" class="custom-control-input" name="add_gtag_snippe" id="add_gtag_snippet" <?php echo $is_a_g_snippet; ?>>
290
+ <span class="checkmark"></span>
291
+ Add gtag.js snippet
292
+ </label>
293
+ </div>
294
+ </div>
295
+ </div>
296
+ <div class="stepsbmtbtn">
297
+ <input type="hidden" id="subscriptionPropertyId" name="subscriptionPropertyId" value="<?php echo (property_exists($googleDetail,"property_id"))?$googleDetail->property_id:""; ?>">
298
+ <input type="hidden" id="subscriptionMeasurementId" name="subscriptionMeasurementId" value="<?php echo (property_exists($googleDetail,"measurement_id"))?$googleDetail->measurement_id:""; ?>">
299
+ <button type="button" disabled id="step_1" class="stepnextbtn stpnxttrgr">Next</button>
300
+ <!-- remove dslbbtn class for green button -->
301
+ </div>
302
+ </form>
303
+ </div>
304
+ </div>
305
+ </div>
306
+ <!-- step-1 over -->
307
+ <!-- step-2 start -->
308
+ <div class="onbordording-step onbrdstep-2 ggladsstep <?php echo ($complete_step['step-2']==1)?'selectedactivestep':''; ?>">
309
+ <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-2']; ?>" id="google-ads" data-id="step_2">
310
+ <div class="stepleftround">
311
+ <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'; ?>" alt="" />
312
+ </div>
313
+ <div class="stepdetwrap">
314
+ <h4>Select Google Ads account</h4>
315
+ <p>With dynamic reamarketing tags, you will be able to show ads to your past visitors with specific product information tailored to your customer’s previous site visit.</p>
316
+ </div>
317
+ </div>
318
+ <div class="stepmoredtlwrp">
319
+ <div class="stepmoredtl">
320
+ <form action="#">
321
+ <div class="selcttopwrap" id="tvc_ads_section">
322
+ <div class="ggladsselectbx">
323
+ <input type="hidden" id="subscriptionGoogleAdsId" name="subscriptionGoogleAdsId" value="<?php echo property_exists($googleDetail,"google_ads_id")?$googleDetail->google_ads_id:""; ?>">
324
+ <select class="slect2bx google_ads_sel" id="ads-account" name="customer_id">
325
+ <option value=''>Select Google Ads Account</option>
326
+ </select>
327
+ </div>
328
+ <div class="orwrp">or</div>
329
+ <div class="creatnewwrp">
330
+ <button type="button" class="cretnewbtn newggladsbtn"><span class="plusicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/blue-plus.png'; ?>" alt="" /></span> Create New</button>
331
+ </div>
332
+ </div>
333
+
334
+ <div class="selcttopwrap">
335
+ <div class="onbrdpp-body alert alert-primary" style="display:none;" id="new_google_ads_section">
336
+ <h4>Account Created</h4>
337
+ <p>Your Google Ads Account has been created <strong>(<b><span id="new_google_ads_id"></span></b>).</strong></p>
338
+ <h5>Steps to claim your Google Ads Account:</h5>
339
+ <ol>
340
+ <li>Accept invitation mail from Google Ads sent to your email address <em><?php echo (isset($this->tvc_data['g_mail']))?$this->tvc_data['g_mail']:""; ?></em></li>
341
+ <li>Log into your Google Ads account and set up your <em>billing preferences</em></li>
342
+ </ol>
343
+ </div>
344
+ </div>
345
+
346
+ <div class="form-row">
347
+ <?php
348
+ $is_r_tags = (property_exists($googleDetail,"remarketing_tags") && $googleDetail->remarketing_tags == 1)?"checked":(($defaulSelection == 1)?"checked":"");
349
+ $is_l_g_an_w_g_ad = (property_exists($googleDetail,"link_google_analytics_with_google_ads") && $googleDetail->link_google_analytics_with_google_ads == 1)?"checked":(($defaulSelection == 1)?"checked":"");
350
+ $is_d_r_tags = (property_exists($googleDetail,"dynamic_remarketing_tags") && $googleDetail->dynamic_remarketing_tags == 1)?"checked":(($defaulSelection == 1)?"checked":"");
351
+ $is_g_ad_c_tracking = (property_exists($googleDetail,"google_ads_conversion_tracking") && $googleDetail->google_ads_conversion_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
352
+ ?>
353
+ <h5>Advance Settings (Optional)</h5>
354
+ <div class="chckbxbgbx dsplcolmview">
355
+ <div class="cstmcheck-item">
356
+ <label for="remarketing_tag">
357
+ <input type="checkbox" class="custom-control-input" name="remarketing_tag" id="remarketing_tag" value="1" <?php echo $is_r_tags; ?>>
358
+ <span class="checkmark"></span>
359
+ Enable Google Remarketing Tag
360
+ </label>
361
+ </div>
362
+ <div class="cstmcheck-item">
363
+ <label for="dynamic_remarketing_tags">
364
+ <input type="checkbox" class="custom-control-input" name="dynamic_remarketing_tags" id="dynamic_remarketing_tags" value="1" <?php echo $is_d_r_tags; ?>>
365
+ <span class="checkmark"></span>
366
+ Enable Dynamic Remarketing Tag
367
+ </label>
368
+ </div>
369
+ <div class="cstmcheck-item <?php if($this->plan_id == 1){?>cstmcheck-item-pro <?php } ?>">
370
+ <label for="google_ads_conversion_tracking">
371
+ <?php if($this->plan_id != 1){?>
372
+ <input type="checkbox" class="custom-control-input" name="google_ads_conversion_tracking" id="google_ads_conversion_tracking" value="1" <?php echo $is_g_ad_c_tracking; ?>>
373
+ <span class="checkmark"></span>
374
+ Google Ads conversion tracking
375
+ <?php }else{?>
376
+ <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/lock.svg'; ?>"><label>Google Ads conversion tracking (Pro Plan)</label>
377
+ <?php } ?>
378
+ </label>
379
+ </div>
380
+ <div class="cstmcheck-item">
381
+ <label for="link_google_analytics_with_google_ads">
382
+ <input type="checkbox" class="custom-control-input" name="link_google_analytics_with_google_ads" id="link_google_analytics_with_google_ads" value="1" <?php echo $is_l_g_an_w_g_ad; ?>>
383
+ <span class="checkmark"></span>
384
+ Link Google Analytics with Google Ads
385
+ </label>
386
+ </div>
387
+ </div>
388
+ </div>
389
+ <div class="stepsbmtbtn">
390
+ <button type="button" id="step_2" class="stepnextbtn stpnxttrgr">Next</button>
391
+ <!-- add dslbbtn class for disable button -->
392
+ </div>
393
+ </form>
394
+ </div>
395
+ </div>
396
+ </div>
397
+ <!-- step-2 over -->
398
+ <!-- step-3 start -->
399
+ <div class="onbordording-step onbrdstep-3 gglmrchntstep <?php echo ($complete_step['step-3']==1)?'selectedactivestep':''; ?>">
400
+ <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-3']; ?>" id="gmc-account" data-id="step_3">
401
+ <div class="stepleftround">
402
+ <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'; ?>" alt="" />
403
+ </div>
404
+ <div class="stepdetwrap">
405
+ <h4>Select Google Merchant Center Account</h4>
406
+ <p>Make your WooCommerce shop and products available to millions of shoppers across google.</p>
407
+ </div>
408
+ </div>
409
+ <div class="stepmoredtlwrp">
410
+ <div class="stepmoredtl">
411
+ <form action="#">
412
+ <div class="selcttopwrap">
413
+ <div class="form-group" style="display:none;" id="new_merchant_section">
414
+ <div class="text-center">
415
+ <div class="alert alert-primary" style="padding: 10px;" role="alert">
416
+ <label class="form-label-control font-weight-bold">We have created new merchant center account with ID: <span id="new_merchant_id"></span>. Click on finish button to save new account.</label>
417
+ </div>
418
+ </div>
419
+ </div>
420
+ <div id="tvc_merchant_section">
421
+ <div class="ggladsselectbx">
422
+ <select class="slect2bx" id="google_merchant_center_id" name="google_merchant_center_id">
423
+ <option value=''>Select Measurement Id</option>
424
+ </select>
425
+ </div>
426
+ <div class="orwrp">or</div>
427
+ <div class="creatnewwrp">
428
+ <button type="button" class="cretnewbtn newmrchntbtn"><span class="plusicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/blue-plus.png'; ?>" alt="" /></span> Create New</button>
429
+ </div>
430
+ </div>
431
+ </div>
432
+ <div class="stepsbmtbtn">
433
+ <button type="button" id="step_3" data-enchanter="finish" class="stepnextbtn finishbtn">Finish</button>
434
+ <!-- add dslbbtn class for disable button -->
435
+ </div>
436
+ <input type="hidden" id="subscriptionMerchantCenId" name="subscriptionMerchantCenId" value="<?php echo property_exists($googleDetail,"google_merchant_center_id")?$googleDetail->google_merchant_center_id:""; ?>">
437
+ <input type="hidden" id="loginCustomerId" name="loginCustomerId" value="<?php echo $login_customer_id; ?>">
438
+ <input type="hidden" id="subscriptionId" name="subscriptionId" value="<?php echo $this->subscriptionId; ?>">
439
+ <input type="hidden" id="plan_id" name="plan_id" value="<?php echo $this->plan_id; ?>">
440
+ <input type="hidden" id="conversios_onboarding_nonce" name="conversios_onboarding_nonce" value="<?php echo wp_create_nonce( 'conversios_onboarding_nonce' ); ?>">
441
+
442
+ <input type="hidden" id="ga_view_id" name="ga_view_id" value="<?php echo get_option('ee_ga_view_id'); ?>">
443
+ </form>
444
+ </div>
445
+ <div class="stepnotewrp">
446
+ If you are in the European Economic Area or Switzerland your Merchant Center account must be associated with a Comparison Shopping Service (CSS). Please find more information at <a href="">Google Merchant Center Help</a> website. If you create a new Merchant Center account through this application, it will be associated with Google Shopping, Google’s CSS, by default. You can change the CSS associated with your account at any time. Please find more information about our CSS Partners <a href="">here</a>. Once you have set up your Merchant Center account you can use our onboarding tool regardless of which CSS you use.
447
+ </div>
448
+ </div>
449
+ </div>
450
+ <!-- step-3 over -->
451
+ </div>
452
+ <!-- onborading left over -->
453
+ <!-- onborading right panel start -->
454
+ <div class="onbording-right">
455
+ <div class="sidebrcontainer">
456
+ <div class="onbrd-rdmbx">
457
+ <div class="rdm-amnt">
458
+ <small>Redeem upto</small>
459
+ <?php echo $off_credit_amt; ?>
460
+ </div>
461
+ <p>Create your first Google Ads account with us and redeem upto £120.00 on the spend you make in the next 31 days.</p>
462
+ <a target="_blank" href="https://conversios.io/help-center/Google-Spend-Match.pdf" class="lrnmorbtn">Learn more <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/arrow_right.png'; ?>" alt="" /></a>
463
+ </div>
464
+ <div class="onbrdrgt-nav">
465
+ <ul>
466
+ <li><a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf">Installation Manual</a></li>
467
+ <li><a target="_blank" href="https://conversios.io/help-center/Google-shopping-Guide.pdf" href="">Google Shopping Guide</a></li>
468
+ <li><a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" href="">FAQ</a></li>
469
+ </ul>
470
+ </div>
471
+ </div>
472
+ </div>
473
+ <!-- onborading right panel over -->
474
+ </div>
475
+ </div>
476
+ </div>
477
+ </div>
478
+ </div>
479
+ </div>
480
+ <!-- google ads skip confirm poppup -->
481
+ <div class="pp-modal onbrd-popupwrp" id="tvc_ads_skip_confirm" tabindex="-1" role="dialog">
482
+ <div class="onbrdppmain" role="document">
483
+ <div class="onbrdnpp-cntner acccretppcntnr">
484
+ <div class="onbrdnpp-hdr">
485
+ <h4>You have not selected Google Ads account.</h4>
486
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png';?>" alt="" /></div>
487
+ </div>
488
+ <div class="onbrdpp-body">
489
+ <p>If you do not select Google Ads account, you will not be able to use some of the major features like:</p>
490
+ <ul>
491
+ <li>Dynamic Remarketing Tags </li>
492
+ <li>Google Smart Shopping Campaigns</li>
493
+ <li>Google Analytics and Google Ads linking</li>
494
+ </ul>
495
+ <p>Are you sure you want to continue without selecting Google Ads account?</p>
496
+ </div>
497
+ <div class="ppfooterbtn">
498
+ <button type="button" class="ppblubtn btn-secondary" data-dismiss="modal" id="ads-skip-cancel">Cancel</button>
499
+ <button type="button" class="ppblubtn btn-primary" data-dismiss="modal" id="ads-skip-continue">Continue</button>
500
+ </div>
501
+ </div>
502
+ </div>
503
+ </div>
504
+ <!-- google ads poppup -->
505
+ <div id="ggladspopup" class="pp-modal onbrd-popupwrp ggladspp">
506
+ <div class="onbrdppmain">
507
+ <div class="onbrdnpp-cntner ggladsppcntnr">
508
+ <div class="onbrdnpp-hdr">
509
+ <h4>Enable Google Ads Account</h4>
510
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png';?>" alt="" /></div>
511
+ </div>
512
+ <div class="onbrdpp-body">
513
+ <p>You’ll receive an invite from Google on your email. Accept the invitation to enable your Google Ads Account.</p>
514
+ </div>
515
+ <div class="ppfooterbtn">
516
+ <button type="button" id="ads-continue" class="ppblubtn sndinvitebtn">Send Invite</button>
517
+ </div>
518
+ </div>
519
+ </div>
520
+ </div>
521
+ <!-- merchant center skip confirm -->
522
+ <div class="pp-modal onbrd-popupwrp" id="tvc_merchant_center_skip_confirm">
523
+ <div class="onbrdppmain">
524
+ <div class="onbrdnpp-cntner acccretppcntnr">
525
+ <div class="onbrdnpp-hdr">
526
+ <h4>You have not selected Google merchant center account.</h4>
527
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png';?>" alt="" /></div>
528
+ </div>
529
+ <div class="onbrdpp-body">
530
+ <p>If you do not select a merchant center account, you will not be able to use complete google shopping features.</p>
531
+ <p>Are you sure you want to continue without selecting a merchant center account?</p>
532
+ </div>
533
+ <div class="ppfooterbtn">
534
+ <button type="button" class="ppblubtn btn-secondary" data-dismiss="modal" id="merchant-center-skip-cancel">Cancel</button>
535
+ <button type="button" class="ppblubtn btn-primary" data-dismiss="modal" id="merchant-center-skip-continue">Continue</button>
536
+ </div>
537
+ </div>
538
+ </div>
539
+ </div>
540
+ <!-- Create New Merchant poppup -->
541
+ <div id="createmerchantpopup" class="pp-modal onbrd-popupwrp crtemrchntpp">
542
+ <div class="onbrdppmain">
543
+ <div class="onbrdnpp-cntner crtemrchntppcntnr">
544
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png'; ?>" alt="" /></div>
545
+ <div class="onbrdpp-body">
546
+ <div class="row">
547
+ <div class="crtemrchnpp-lft">
548
+ <div class="crtemrchpplft-top">
549
+ <h4>Create Google Merchant Center Account</h4>
550
+ <p>Before you can upload product data, you’ll need to verify and claim your store’s website URL. Claiming associates your website URL with your Google Merchant Center account.</p>
551
+ </div>
552
+ <div class="claimedbx">
553
+ Your site will automatically be claimed and verified.
554
+ </div>
555
+ <div class="mrchntformwrp">
556
+ <form action="#">
557
+ <div class="form-row">
558
+ <input type="hidden" id="get-mail" name="g_email" value="<?php echo isset($this->tvc_data['g_mail'])?$this->tvc_data['g_mail']:""; ?>">
559
+ <input type="text" value="<?php echo $this->tvc_data['user_domain']; ?>" class="fromfiled" name="url" id="url" placeholder="Enter Website">
560
+ <div class="cstmcheck-item mt15">
561
+ <label for="adult_content">
562
+ <input class="" type="checkbox" name="adult_content" id="adult_content">
563
+ <span class="checkmark"></span>
564
+ My site contains
565
+ </label>
566
+ <strong>Adult Content</strong>
567
+ </div>
568
+ </div>
569
+ <div class="form-row">
570
+ <input type="text" class="fromfiled" name="store_name" id="store_name" placeholder="Enter Store Name" required>
571
+ <div class="inputinfotxt">This name will appear in your Shopping Ads.</div>
572
+ </div>
573
+ <div class="form-row">
574
+ <?php echo $this->get_countries($this->tvc_data['user_country']); ?>
575
+ </div>
576
+ <div class="form-row">
577
+ <div class="cstmcheck-item">
578
+ <label for="terms_conditions">
579
+ <input class="" type="checkbox" name="concent" id="terms_conditions">
580
+ <span class="checkmark"></span>
581
+ I accept the
582
+ </label>
583
+ <a target="_blank" href="https://support.google.com/merchants/answer/160173?hl=en">terms & conditions</a>
584
+ </div>
585
+ </div>
586
+ </form>
587
+ </div>
588
+ <div class="ppfooterbtn">
589
+ <button type="button" id="create_merchant_account" class="cretemrchntbtn">Create Account
590
+ </button>
591
+ </div>
592
+ </div>
593
+ <div class="crtemrchnpp-right">
594
+ <h6>To use Google Shopping, your website must meet these requirements:</h6>
595
+ <ul>
596
+ <li><a target="_blank" href="https://support.google.com/merchants/answer/6149970?hl=en">Google Shopping ads policies</a></li>
597
+ <li><a target="_blank" href="https://support.google.com/merchants/answer/6150127">Accurate Contact Information</a></li>
598
+ <li><a target="_blank" href="https://support.google.com/merchants/answer/6150122">Secure collection of process and personal data</a></li>
599
+ <li><a target="_blank" href="https://support.google.com/merchants/answer/6150127">Return Policy</a></li>
600
+ <li><a target="_blank" href="https://support.google.com/merchants/answer/6150127">Billing terms & conditions</a></li>
601
+ <li><a target="_blank" href="https://support.google.com/merchants/answer/6150118">Complete checkout process</a></li>
602
+ </ul>
603
+ </div>
604
+ </div>
605
+ </div>
606
+
607
+ </div>
608
+ </div>
609
+ </div>
610
+
611
+ <!-- congratulation poppup -->
612
+ <div id="tvc_confirm_submite" class="pp-modal onbrd-popupwrp congratepp">
613
+ <div class="onbrdppmain">
614
+ <div class="onbrdnpp-cntner congratppcntnr">
615
+ <div class="onbrdnpp-hdr txtcnter">
616
+ <h2>Congratulations!!</h2>
617
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png'; ?>" alt="" /></div>
618
+ </div>
619
+ <div class="onbrdpp-body congratppbody">
620
+ <p>You have been successfully onboarded. Please check the account summary below and confirm.</p>
621
+ <div class="congratppdtlwrp">
622
+ <div class="cngrtppdtl-item" id="google_analytics_property_id_info">
623
+ <div class="cngtrpplft">
624
+ <span class="cngrtchckicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'; ?>" alt="" /></span>
625
+ Google Analytics Property Id:
626
+ </div>
627
+ <div class="cngtrpprgt" id="selected_google_analytics_property"></div>
628
+ </div>
629
+ <div class="cngrtppdtl-item" id="google_analytics_measurement_id_info">
630
+ <div class="cngtrpplft">
631
+ <span class="cngrtchckicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'; ?>" alt="" /></span>
632
+ Google Analytics Measurement Id:
633
+ </div>
634
+ <div class="cngtrpprgt" id="selected_google_analytics_measurement"></div>
635
+ </div>
636
+ <div class="cngrtppdtl-item" id="google_ads_info">
637
+ <div class="cngtrpplft">
638
+ <span class="cngrtchckicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'; ?>" alt="" /></span>
639
+ Google Ads Account:
640
+ </div>
641
+ <div class="cngtrpprgt" id="selected_google_ads_account"></div>
642
+ </div>
643
+ <div class="cngrtppdtl-item" id="google_merchant_center_info">
644
+ <div class="cngtrpplft">
645
+ <span class="cngrtchckicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'; ?>" alt="" /></span>
646
+ Google Merchant Center Account
647
+ </div>
648
+ <div class="cngtrpprgt" id="selected_google_merchant_center"></div>
649
+ </div>
650
+ </div>
651
+ </div>
652
+ <div class="ppfooterbtn">
653
+ <button type="button" id="confirm_selection" class="ppblubtn">Confirm</button>
654
+ </div>
655
+ </div>
656
+ </div>
657
+ </div>
658
+ <?php
659
+ $this->page_script();
660
+ }
661
+ /**
662
+ * onboarding page javascript
663
+ */
664
+ public function page_script(){
665
+ $j_tvc_data = json_encode($this->tvc_data);
666
+ ?>
667
+ <script>
668
+ let tvc_data = <?php echo $j_tvc_data; ?>;
669
+ var tvc_ajax_url = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
670
+ let subscription_id ="<?php echo $this->subscriptionId; ?>";
671
+ let plan_id ="<?php echo $this->plan_id; ?>";
672
+ let app_id ="<?php echo $this->app_id; ?>";
673
+ /**
674
+ * Convesios custom script
675
+ */
676
+ //Step-0
677
+ $(".google_connect_url").on( "click", function() {
678
+ const w =600; const h=650;
679
+ const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
680
+ const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;
681
+
682
+ const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
683
+ const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
684
+
685
+ const systemZoom = width / window.screen.availWidth;
686
+ const left = (width - w) / 2 / systemZoom + dualScreenLeft;
687
+ const top = (height - h) / 2 / systemZoom + dualScreenTop;
688
+ /*window.open('<?php echo $this->connect_url; ?>','newwindow', config=`height=670,width=670,top=100,left=${left},toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no`);*/
689
+ var url ='<?php echo $this->connect_url; ?>';
690
+ url = url.replace(/&amp;/g, '&');
691
+ const newWindow = window.open(url, "newwindow", config= `scrollbars=yes,
692
+ width=${w / systemZoom},
693
+ height=${h / systemZoom},
694
+ top=${top},
695
+ left=${left},toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no
696
+ `);
697
+ if (window.focus) newWindow.focus();
698
+ });
699
+
700
+ //Step-1
701
+ $(document).ready(function() {
702
+ let tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
703
+ if(tracking_option != ""){
704
+ if(subscription_id != ""){
705
+ call_list_analytics_web_properties(tracking_option, tvc_data);
706
+ }
707
+ $(".slctunivr-filed").slideUp();
708
+ $("#"+tracking_option).slideDown();
709
+ //is_validate_step("step_1");
710
+ }
711
+
712
+ $("input[type=radio][name=analytic_tag_type]").on( "change", function() {
713
+ let tracking_option = this.value;
714
+ if(subscription_id != ""){
715
+ call_list_analytics_web_properties(tracking_option, tvc_data);
716
+ is_validate_step("step_1");
717
+ }
718
+ $(".slctunivr-filed").slideUp();
719
+ $("#"+tracking_option).slideDown();
720
+ });
721
+ });
722
+ if(subscription_id != ""){
723
+ call_list_googl_ads_account(tvc_data);
724
+ call_list_google_merchant_account(tvc_data);
725
+ }
726
+
727
+ //Step-2
728
+ // create google ads account
729
+ $("#ads-continue").on('click', function(e){
730
+ e.preventDefault();
731
+ create_google_ads_account(tvc_data);
732
+ $('.ggladspp').removeClass('showpopup');
733
+ });
734
+ // skip google ads account selection
735
+ $("#ads-skip-continue").on('click', function(e){
736
+ e.preventDefault();
737
+ save_google_ads_data("", tvc_data, subscription_id, true );
738
+ go_next($("#step_2"));
739
+ });
740
+ //Step - 3
741
+ $("#create_merchant_account").on('click', function(e){
742
+ e.preventDefault();
743
+ create_google_merchant_center_account(tvc_data);
744
+ });
745
+ //Click skip merchant center account on popup
746
+ $("#merchant-center-skip-continue").on('click', function(e){
747
+ e.preventDefault();
748
+ if(is_validate_step("step_1")){
749
+ save_merchant_data("", "", tvc_data, subscription_id, plan_id, true );
750
+ }else{
751
+ add_message("error","Please select property/measurement id.");
752
+ }
753
+ })
754
+ //Click finish button
755
+ $("#step_3").on('click', function(e){
756
+ e.preventDefault();
757
+ let google_merchant_center_id = $("#new_merchant_id").text();
758
+ let merchant_id = "NewMerchant";
759
+ if( google_merchant_center_id == null || google_merchant_center_id =="" ){
760
+ google_merchant_center_id = $('#google_merchant_center_id').val();
761
+ merchant_id =$("#google_merchant_center_id").find(':selected').data('merchant_id');
762
+ }
763
+ if( google_merchant_center_id == null || google_merchant_center_id == "" ){
764
+ $('#tvc_merchant_center_skip_confirm').addClass('showpopup');
765
+ $('body').addClass('scrlnone');
766
+ }else{
767
+ if(is_validate_step("step_1")){
768
+ save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, false );
769
+ }else{
770
+ add_message("error","Please Connect Google Analytics Account.");
771
+ }
772
+ }
773
+ })
774
+ //Click confirm button on confirm popup
775
+ $('#confirm_selection').on('click', function(e){
776
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
777
+ var tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
778
+ var view_id = "";
779
+ add_message("warning","Process to save your settings. Do not refresh..",false);
780
+ if(tracking_option == "UA"){
781
+ ga_view_id = $("#ua_web_property_id").find(':selected').data('profileid');
782
+ }else{
783
+ ga_view_id = $("#both_web_property_id").find(':selected').data('profileid');
784
+ }
785
+ $.ajax({
786
+ type: "POST",
787
+ dataType: "json",
788
+ url: tvc_ajax_url,
789
+ data: {action: "update_setup_time_to_subscription", tvc_data:tvc_data, subscription_id:subscription_id, ga_view_id:ga_view_id, conversios_onboarding_nonce:conversios_onboarding_nonce},
790
+ beforeSend: function () {
791
+ loaderSection(true);
792
+ },
793
+ success: function (response) {
794
+ //console.log(response);
795
+ if (response.error === false) {
796
+ if(response.return_url){
797
+ location.replace( response.return_url);
798
+ }else{
799
+ location.replace( "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=general_settings");
800
+ }
801
+ }else{
802
+ loaderSection(false);
803
+ }
804
+ }
805
+ });
806
+ });
807
+
808
+ /**
809
+ * Convesios defoult html script
810
+ */
811
+ $(document).ready(function() {
812
+ $( ".stepdtltop" ).each(function() {
813
+ $(this).on("click", function(){
814
+ if(subscription_id != ""){
815
+ if($(this).attr("data-is-done") == "1"){
816
+ if($(this).parent('.onbordording-step').hasClass("activestep")){
817
+ $(this).parent('.onbordording-step').removeClass('activestep');
818
+ }else{
819
+ $('.onbordording-step').removeClass('activestep');
820
+ $(this).parent('.onbordording-step').addClass('activestep');
821
+ }
822
+ }
823
+ }else{
824
+ //alert("First Connect you website.");
825
+ }
826
+ });
827
+ });
828
+
829
+ $( ".stpnxttrgr" ).each(function() {
830
+ $(this).on("click", function(event){
831
+ var step =$(this).attr("id");
832
+ //step 1 next button call
833
+ if(step == "step_1"){
834
+ if(is_validate_step(step)){
835
+ let tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
836
+ save_analytics_web_properties( tracking_option, tvc_data, subscription_id );
837
+ go_next(this);
838
+ call_list_google_merchant_account(tvc_data);
839
+ }
840
+ }
841
+ //step 2 next button call
842
+ if(step == "step_2" ){
843
+ //event.preventDefault();
844
+ let google_ads_id = $("#new_google_ads_id").text();
845
+ if(google_ads_id ==null || google_ads_id ==""){
846
+ google_ads_id = $('#ads-account').val();
847
+ }
848
+ let tr_ads = save_google_ads_data(google_ads_id, tvc_data, subscription_id, false );
849
+ if(tr_ads){
850
+ go_next(this);
851
+ }
852
+ }
853
+
854
+ });
855
+ });
856
+
857
+ });
858
+ $('.slctunivr-filed').slideUp();
859
+ //
860
+
861
+ function go_next(next_this){
862
+ $(next_this).closest('.onbordording-step').find('.stepdtltop').attr("data-is-done","1");
863
+ $(next_this).closest('.onbordording-step').addClass('selectedactivestep');
864
+ $(next_this).closest('.onbordording-step').removeClass('activestep');
865
+ $( next_this ).closest('.onbordording-step').next('.onbordording-step').addClass('activestep');
866
+ }
867
+ </script>
868
+ <script>
869
+ $(document).ready(function(){
870
+ $(".slect2bx").select2();
871
+ });
872
+ </script>
873
+ <!-- popup script -->
874
+ <script>
875
+ $(document).ready(function() {
876
+ //open now google ads account popup
877
+ $(".newggladsbtn").on( "click", function() {
878
+ $('.ggladspp').addClass('showpopup');
879
+ $('body').addClass('scrlnone');
880
+ });
881
+
882
+ //close any poup whie click on out side
883
+ $('body').click(function(evt){
884
+ if($(evt.target).closest('#step_2,.cretnewbtn,.finishbtn,.onbrdnpp-cntner, .crtemrchntpp .onbrdppmain').length)
885
+ return;
886
+ $('.onbrd-popupwrp').removeClass('showpopup');
887
+ $('body').removeClass('scrlnone');
888
+ });
889
+ });
890
+ $(".clsbtntrgr, .ppblubtn").on( "click", function() {
891
+ $(this).closest('.onbrd-popupwrp').removeClass('showpopup');
892
+ $('body').removeClass('scrlnone');
893
+ });
894
+ /*
895
+ $(".sndinvitebtn").on( "click", function() {
896
+
897
+ //$('.acccretpp').addClass('showpopup');
898
+ //$('body').addClass('scrlnone');
899
+ });
900
+ $(".finishbtn").on( "click", function() {
901
+ $('.congratepp').addClass('showpopup');
902
+ $('body').addClass('scrlnone');
903
+ $('.alertbx').removeClass('show');
904
+ });*/
905
+ $(".newmrchntbtn").on( "click", function() {
906
+ $('.crtemrchntpp').addClass('showpopup');
907
+ $('body').addClass('scrlnone');
908
+ });
909
+ /*$(".cretemrchntbtn").on( "click", function() {
910
+ $('.mrchntalert').addClass('show');
911
+ });
912
+ $(".alertclsbtn").on( "click", function() {
913
+ $(this).parent('.alertbx').removeClass('show');
914
+ });*/
915
+ </script>
916
+ <?php
917
+ }
918
+ /**
919
+ * onboarding page add scripts file
920
+ */
921
+ public function add_scripts(){
922
+ wp_register_style('conversios-select2-css',ENHANCAD_PLUGIN_URL . '/admin/css/select2.css');
923
+ wp_enqueue_style('conversios-style-css',ENHANCAD_PLUGIN_URL . '/admin/css/style.css', array(), $this->version, 'all');
924
+ wp_enqueue_style('conversios-responsive-css',ENHANCAD_PLUGIN_URL . '/admin/css/responsive.css', array(), $this->version, 'all');
925
+ wp_enqueue_style('conversios-select2-css');
926
+
927
+
928
+ wp_enqueue_script( 'conversios-jquery-js', ENHANCAD_PLUGIN_URL . '/admin/js/jquery-3.5.1.min.js', array( 'jquery' ), $this->version, false );
929
+ wp_register_script('conversios-select2-js', ENHANCAD_PLUGIN_URL.'/admin/js/select2.min.js');
930
+ wp_enqueue_script('conversios-select2-js');
931
+ wp_enqueue_script( 'conversios-onboarding-js', ENHANCAD_PLUGIN_URL . '/admin/js/onboarding-custom.js', array( 'jquery' ), $this->version, false );
932
+ }
933
+ /**
934
+ * Onboarding page register menu
935
+ */
936
+ public function register() {
937
+ // Getting started - shows after installation.
938
+ add_dashboard_page(
939
+ esc_html__( 'Welcome to Conversios Onboarding', 'conversios' ),
940
+ esc_html__( 'Welcome to Conversios Onboarding', 'google-analytics-for-wordpress' ),
941
+ apply_filters( 'conversios_welcome', 'manage_options' ),
942
+ 'conversios_onboarding',
943
+ array( $this, 'welcome_screen' )
944
+ );
945
+ }
946
+ /**
947
+ * Check if we should do any redirect.
948
+ */
949
+ public function maybe_redirect() {
950
+
951
+ // Bail if no activation redirect.
952
+ if ( ! get_transient( '_conversios_activation_redirect' ) || isset( $_GET['conversios-redirect'] ) ) {
953
+ return;
954
+ }
955
+ // Delete the redirect transient.
956
+ delete_transient( '_conversios_activation_redirect' );
957
+
958
+ // Bail if activating from network, or bulk.
959
+ if ( isset( $_GET['activate-multi'] ) ) { // WPCS: CSRF ok, input var ok.
960
+ return;
961
+ }
962
+
963
+
964
+ /*if ( apply_filters( 'monsterinsights_enable_onboarding_wizard', false === $upgrade ) ) {*/
965
+ //$redirect = admin_url( 'index.php?page=conversios_onboarding&conversios-redirect=1' );
966
+ $path = 'index.php?page=conversios_onboarding&conversios-redirect=1';
967
+ $redirect = is_network_admin() ? network_admin_url( $path ) : admin_url( $path );
968
+ wp_safe_redirect( $redirect );
969
+ exit;
970
+ //}
971
+ }
972
+ //End function
973
+ }//End Conversios_Onboarding Class
974
+ }
975
+ new Conversios_Onboarding();
admin/class-enhanced-ecommerce-google-analytics-admin.php CHANGED
@@ -57,7 +57,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
57
  public function __construct($plugin_name, $version) {
58
  $this->plugin_name = $plugin_name;
59
  $this->version = $version;
60
- $this->url = $this->get_connect_url();
61
  $this->site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
62
  $this->pro_plan_site = $this->get_pro_plan_site();
63
  $this->google_detail = $this->get_ee_options_data();
57
  public function __construct($plugin_name, $version) {
58
  $this->plugin_name = $plugin_name;
59
  $this->version = $version;
60
+ $this->url = $this->get_onboarding_page_url();
61
  $this->site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
62
  $this->pro_plan_site = $this->get_pro_plan_site();
63
  $this->google_detail = $this->get_ee_options_data();
admin/class-tvc-admin-helper.php CHANGED
@@ -16,6 +16,9 @@ Class TVC_Admin_Helper{
16
  protected $setting_status = "";
17
  protected $ee_additional_data = "";
18
  protected $TVC_Admin_DB_Helper;
 
 
 
19
  public function __construct() {
20
  $this->includes();
21
  $this->customApiObj = new CustomApi();
@@ -378,7 +381,25 @@ Class TVC_Admin_Helper{
378
  return $this->connect_actual_link;
379
  }
380
  }
381
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  public function get_connect_url(){
383
  if(!empty($this->connect_url)){
384
  return $this->connect_url;
@@ -388,6 +409,15 @@ Class TVC_Admin_Helper{
388
  }
389
  }
390
 
 
 
 
 
 
 
 
 
 
391
  public function get_woo_currency(){
392
  if(!empty($this->woo_currency)){
393
  return $this->woo_currency;
@@ -534,10 +564,10 @@ Class TVC_Admin_Helper{
534
  $setting_status['google_analytic_msg']= "";
535
  }else if($googleDetail->property_id == "" ){
536
  $setting_status['google_analytic']= false;
537
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
538
  }else if($googleDetail->measurement_id == "" ){
539
  $setting_status['google_analytic']= false;
540
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
541
  }
542
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && $googleDetail->tracking_option == "GA4"){
543
  if( $googleDetail->measurement_id != ""){
@@ -545,7 +575,7 @@ Class TVC_Admin_Helper{
545
  $setting_status['google_analytic_msg']= "";
546
  }else{
547
  $setting_status['google_analytic']= false;
548
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
549
  }
550
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->property_id) && $googleDetail->tracking_option == "UA" ){
551
  if($googleDetail->property_id != ""){
@@ -553,7 +583,7 @@ Class TVC_Admin_Helper{
553
  $setting_status['google_analytic_msg']= "";
554
  }else{
555
  $setting_status['google_analytic']= false;
556
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
557
  }
558
  }else{
559
  $setting_status['google_analytic']= false;
@@ -567,10 +597,10 @@ Class TVC_Admin_Helper{
567
  $setting_status['google_shopping_msg']= "";
568
  }else if($googleDetail->google_merchant_center_id == ""){
569
  $setting_status['google_shopping']= false;
570
- $setting_status['google_shopping_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
571
  }else if($googleDetail->google_ads_id == ""){
572
  $setting_status['google_shopping']= false;
573
- $setting_status['google_shopping_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
574
  }
575
  }else{
576
  $setting_status['google_shopping']= false;
@@ -584,10 +614,10 @@ Class TVC_Admin_Helper{
584
  $setting_status['google_ads_msg']= "";
585
  }else if($googleDetail->google_merchant_center_id == ""){
586
  $setting_status['google_ads']= false;
587
- $setting_status['google_ads_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
588
  }else if($googleDetail->google_ads_id == ""){
589
  $setting_status['google_ads']= false;
590
- $setting_status['google_ads_msg']= "Configure Google Ads account to reach to millions of interested shoppers <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
591
  }
592
  }else{
593
  $setting_status['google_ads']= false;
@@ -610,7 +640,7 @@ Class TVC_Admin_Helper{
610
  $setting_status['google_shopping_conf_msg']= "Google Shopping Configuration Success.";
611
  }else if($googleDetail->google_merchant_center_id == "" || $googleDetail->google_ads_id == "" ){
612
  $setting_status['google_shopping_conf']= false;
613
- $setting_status['google_shopping_conf_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
614
  }else if($googleDetail->is_site_verified ==0 && $googleDetail->is_domain_claim ==0 ){
615
  $setting_status['google_shopping_conf']= false;
616
  $setting_status['google_shopping_conf_msg']= "Site verification and domain claim for your merchant center account failed.";
@@ -649,7 +679,7 @@ Class TVC_Admin_Helper{
649
  }
650
  }else{
651
  $setting_status['google_shopping_p_sync']= false;
652
- $setting_status['google_shopping_p_sync_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
653
  }
654
 
655
  //sub tab product Campaigns
@@ -669,7 +699,7 @@ Class TVC_Admin_Helper{
669
  }
670
  }else{
671
  $setting_status['google_shopping_p_campaigns']= false;
672
- $setting_status['google_shopping_p_campaigns_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
673
  }
674
  }
675
  return $setting_status;
16
  protected $setting_status = "";
17
  protected $ee_additional_data = "";
18
  protected $TVC_Admin_DB_Helper;
19
+ protected $store_data;
20
+ protected $api_subscription_data;
21
+ protected $onboarding_page_url;
22
  public function __construct() {
23
  $this->includes();
24
  $this->customApiObj = new CustomApi();
381
  return $this->connect_actual_link;
382
  }
383
  }
384
+
385
+ /**
386
+ * Wordpress store information
387
+ */
388
+ public function get_store_data(){
389
+ if(!empty($this->store_data)){
390
+ return $this->store_data;
391
+ }else{
392
+ return $this->store_data = array(
393
+ "subscription_id"=>$this->get_subscriptionId(),
394
+ "user_domain" => $this->get_connect_actual_link(),
395
+ "currency_code" => $this->get_woo_currency(),
396
+ "timezone_string" => $this->get_time_zone(),
397
+ "user_country" => $this->get_woo_country(),
398
+ "app_id" => 1,
399
+ "time"=> date("d-M-Y h:i:s A")
400
+ );
401
+ }
402
+ }
403
  public function get_connect_url(){
404
  if(!empty($this->connect_url)){
405
  return $this->connect_url;
409
  }
410
  }
411
 
412
+ public function get_onboarding_page_url(){
413
+ if(!empty($this->onboarding_page_url)){
414
+ return $this->onboarding_page_url;
415
+ }else{
416
+ $this->onboarding_page_url = admin_url()."?page=conversios_onboarding";
417
+ return $this->onboarding_page_url;
418
+ }
419
+ }
420
+
421
  public function get_woo_currency(){
422
  if(!empty($this->woo_currency)){
423
  return $this->woo_currency;
564
  $setting_status['google_analytic_msg']= "";
565
  }else if($googleDetail->property_id == "" ){
566
  $setting_status['google_analytic']= false;
567
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
568
  }else if($googleDetail->measurement_id == "" ){
569
  $setting_status['google_analytic']= false;
570
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
571
  }
572
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && $googleDetail->tracking_option == "GA4"){
573
  if( $googleDetail->measurement_id != ""){
575
  $setting_status['google_analytic_msg']= "";
576
  }else{
577
  $setting_status['google_analytic']= false;
578
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
579
  }
580
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->property_id) && $googleDetail->tracking_option == "UA" ){
581
  if($googleDetail->property_id != ""){
583
  $setting_status['google_analytic_msg']= "";
584
  }else{
585
  $setting_status['google_analytic']= false;
586
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
587
  }
588
  }else{
589
  $setting_status['google_analytic']= false;
597
  $setting_status['google_shopping_msg']= "";
598
  }else if($googleDetail->google_merchant_center_id == ""){
599
  $setting_status['google_shopping']= false;
600
+ $setting_status['google_shopping_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
601
  }else if($googleDetail->google_ads_id == ""){
602
  $setting_status['google_shopping']= false;
603
+ $setting_status['google_shopping_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
604
  }
605
  }else{
606
  $setting_status['google_shopping']= false;
614
  $setting_status['google_ads_msg']= "";
615
  }else if($googleDetail->google_merchant_center_id == ""){
616
  $setting_status['google_ads']= false;
617
+ $setting_status['google_ads_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
618
  }else if($googleDetail->google_ads_id == ""){
619
  $setting_status['google_ads']= false;
620
+ $setting_status['google_ads_msg']= "Configure Google Ads account to reach to millions of interested shoppers <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
621
  }
622
  }else{
623
  $setting_status['google_ads']= false;
640
  $setting_status['google_shopping_conf_msg']= "Google Shopping Configuration Success.";
641
  }else if($googleDetail->google_merchant_center_id == "" || $googleDetail->google_ads_id == "" ){
642
  $setting_status['google_shopping_conf']= false;
643
+ $setting_status['google_shopping_conf_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
644
  }else if($googleDetail->is_site_verified ==0 && $googleDetail->is_domain_claim ==0 ){
645
  $setting_status['google_shopping_conf']= false;
646
  $setting_status['google_shopping_conf_msg']= "Site verification and domain claim for your merchant center account failed.";
679
  }
680
  }else{
681
  $setting_status['google_shopping_p_sync']= false;
682
+ $setting_status['google_shopping_p_sync_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
683
  }
684
 
685
  //sub tab product Campaigns
699
  }
700
  }else{
701
  $setting_status['google_shopping_p_campaigns']= false;
702
+ $setting_status['google_shopping_p_campaigns_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
703
  }
704
  }
705
  return $setting_status;
admin/css/enhanced-ecommerce-google-analytics-admin.css CHANGED
@@ -11,7 +11,7 @@
11
  body{
12
  background: #f1f1f1 !important;
13
  }
14
-
15
  .popover{
16
  max-width:500px !important;
17
  }
11
  body{
12
  background: #f1f1f1 !important;
13
  }
14
+ .update-nag, .updated, .error, .is-dismissible { display: none; }
15
  .popover{
16
  max-width:500px !important;
17
  }
admin/css/responsive.css ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @media only screen and (min-width:1025px) and (max-width:1199px){
2
+ /*------ sync-product -----*/
3
+ .navinfotopnav ul li a{padding:0 10px 16px;}
4
+ .navsmrybx{padding:15px;}
5
+ .navsmrysmalltxt{font-size:13px;}
6
+ .navsmrybigtxt{font-size:36px;}
7
+ }
8
+ @media only screen and (max-width:1024px){
9
+
10
+ }
11
+ @media only screen and (min-width:992px) and (max-width:1024px){
12
+ /*------ sync-product -----*/
13
+ .navinfotopnav ul li a{padding:0 10px 16px;}
14
+ .navsmrybx{padding:15px;min-height:110px;}
15
+ .navsmrysmalltxt{font-size:13px;}
16
+ .navsmrybigtxt{font-size:36px;}
17
+ }
18
+ @media only screen and (max-width:991px){
19
+ /*----- onboarding ----*/
20
+ .onbordingtop{margin-left: auto; margin-right: auto;}
21
+ .onboardingstepwrap{flex: 0 0 100%;margin: 0 auto;}
22
+ .onbording-right{max-width: 622px; flex: 0 0 100%; margin:20px auto 0;}
23
+
24
+ }
25
+ @media only screen and (min-width:768px) and (max-width:991px){
26
+ /*----- onboarding -----*/
27
+ .crtemrchntpp .onbrdpp-body{max-width: 700px;}
28
+ .crtemrchnpp-lft{max-width: 425px;}
29
+
30
+ /*------ sync-product -----*/
31
+ .hdrcntcbx{font-size: 13px;}
32
+ .navinfotopnav ul li a{font-size:14px;padding:0 10px 16px;}
33
+ .navsmrybx{padding:15px;min-height:100px;}
34
+ .navsmrysmalltxt{font-size:12px;}
35
+ .navsmrybigtxt{font-size:36px;}
36
+ .sclabilityleft{max-width:370px;}
37
+ .sclabilityleft h2{font-size:24px;line-height:30px;}
38
+ .sclabilityleft p{font-size:14px;line-height:22px;}
39
+ .syncpropagination ul li{margin:0 2px;}
40
+ .pgprevbtn{margin-right:10px;}
41
+ .pgnextbtn{margin-left:10px;}
42
+ }
43
+ @media only screen and (min-width:783px) and (max-width:960px){
44
+ .site-header{left: 36px !important;}
45
+ }
46
+ @media only screen and (max-width:782px){
47
+ .site-header{left: 0px !important;}
48
+ }
49
+ @media only screen and (max-width:767px){
50
+ /*----- onboarding ------*/
51
+ .crtemrchntppcntnr{padding: 0 10px;}
52
+ .crtemrchnpp-lft{border-right: none; padding-right: 0px; padding-bottom: 15px; border-bottom: 1px solid #E9E9E9; margin: 0 auto; width: 100%; }
53
+ .crtemrchnpp-right{padding-left: 0px; margin: 0 auto; width: 100%; max-width: 506px; padding-top: 15px; }
54
+
55
+ /*------ sync-product -----*/
56
+ .header{padding:20px 15px 20px;}
57
+ .promobandmsg{font-size:12px;line-height:18px;}
58
+ .promoleft, .promoright{flex:0 0 100%;max-width:100%;}
59
+ .promoright{margin-top:10px;}
60
+ .promobandtop, .errormsgtopbx{margin-bottom:15px;position:relative;}
61
+ .promobandtop{padding:15px 0;}
62
+ .prmoclsbtn{position:absolute;top:5px;right:5px;}
63
+ .hdrtpleft{flex:1;max-width:100%;}
64
+
65
+ .hdrnotiwrp{margin-left:15px;}
66
+ .navinfonavtext{opacity:0;display:none;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
67
+ .navinfotopnav ul li a{padding:0 10px 16px;}
68
+ .navinfotopnav ul li a:hover .navinfonavtext{opacity:1;display:none;}
69
+ .navinfotopnav ul li.active a .navinfonavtext{opacity:1;display:none;}
70
+ .navsmryitem{max-width:33.3333%;flex:0 0 33.33333%;margin-bottom:20px;}
71
+ .navsmryitem:last-child{margin-bottom:0px;}
72
+ .sclabilityright{margin:40px 0 0;padding-left:15px;}
73
+ .w750container{max-width:430px;}
74
+ .sclabilityleft h2{font-size:24px;line-height:30px;}
75
+ .sclabilityleft p{font-size:14px;line-height:22px;}
76
+ .syncprodtheader{padding:15px 15px;}
77
+ .syncprdcbtnwrp{padding-left:0px;}
78
+ .syncprodtblheader{display:none;}
79
+ .mbl-allitemchek{display:flex;}
80
+ .syncprotbody-item{flex-wrap:wrap;align-items:center;}
81
+ .syncprotblcell{max-width:100%;flex:100%;display:flex;padding:6px 10px;}
82
+ .data-th{display:block;flex:0 0 120px;max-width:120px;margin-bottom:6px;font-weight:500;}
83
+ .stsdetlcell, .actndetlcell{text-align:left;}
84
+ .syncprofooter{padding:20px 20px}
85
+ .properpage{padding-right:0px;margin-bottom:9px;max-width:100%;flex:0 0 100%;}
86
+ .syncpropagination{padding-left:0px;max-width:100%;flex:0 0 100%;justify-content:center;}
87
+ .syncpropagination ul li{margin:0 1px;}
88
+ .pgprevbtn{margin-right:8px}
89
+ .pgnextbtn{margin-left:8px}
90
+ }
91
+ @media only screen and (min-width:639px) and (max-width:767px){
92
+ /*------ sync-product -----*/
93
+ .w750container{max-width:100%;}
94
+ .sclabilityleft{max-width:300px;}
95
+ .sclabilityright{max-width:271px;}
96
+ .sclabilityleft h2{font-size:21px;line-height:24px;}
97
+ .sclabilityleft p{line-height:20px;}
98
+ .prdcinfopp-left{max-width:260px;flex:0 0 260px;}
99
+ .prdtpplrg-imgwrp{width:280px;height:280px;}
100
+ .prdcinfopp-right{max-width:280px;flex:0 0 280px;}
101
+ }
102
+ @media only screen and (max-width:639px){
103
+ /*------ sync-product -----*/
104
+ .header{padding-bottom: 15px;}
105
+ .hdrtpleft{max-width: 138px;}
106
+ .hdrtpright{max-width: 100%; flex: 1;}
107
+ .hdrcntcbx{display: none;}
108
+ .mblhdrcntcbx{display: inherit; max-width:100%;flex:0 0 100%;padding:10px 15px 0;margin-left:0;border-left:none;border-top:1px solid #e9e9e9;margin-top:15px;}
109
+
110
+ .navsmryitem{max-width:50%;flex:0 0 50%;}
111
+ .prdcinfopp-right{max-width:305px;flex:0 0 305px;padding-left:0px;margin-top:15px}
112
+ .prdcinfobody{justify-content:center;}
113
+ .prdctinfopp-cntn{max-width:400px;}
114
+ }
115
+ @media only screen and (min-width:576px) and (max-width:639px){
116
+ /*------ onboarding -----*/
117
+ .orwrp{font-size: 14px; padding: 0 12px; }
118
+ .chckbxbgbx{display: inherit;}
119
+ .chckbxbgbx .cstmcheck-item{margin-right: 0px; margin-bottom: 9px;}
120
+ .chckbxbgbx .cstmcheck-item:last-child{margin-bottom: 0px;}
121
+ }
122
+ @media only screen and (max-width:575px){
123
+
124
+ /*------ onboarding -----*/
125
+ .onbordingtop{padding: 0 15px;}
126
+ .stepdtltop{padding:15px 40px 15px 15px }
127
+ .helpicon{margin-left: 6px;}
128
+ .stepdtltop::before{right: 15px;}
129
+ .stepleftround{margin-right: 12px;}
130
+ .stepmoredtlwrp{padding-left:20px; padding-right: 20px;}
131
+ .chckbxbgbx{display: inherit;}
132
+ .chckbxbgbx .cstmcheck-item{margin-right: 0px; margin-bottom: 9px;}
133
+ .chckbxbgbx .cstmcheck-item:last-child{margin-bottom: 0px;}
134
+ .stepnotewrp{margin-left: -20px; margin-right: -20px; padding-left: 15px; padding-right: 15px; }
135
+
136
+ /*------ sync-product -----*/
137
+ .hdrtpleft{flex-wrap:wrap;}
138
+ .errmsglft{max-width:100%;flex:0 0 100%;line-height:18px;}
139
+ .errmsgright{margin-left:0;padding-left:0;border-left:none;margin-left:28px;}
140
+ .prdchdrsrch, .prdcfilter{padding:0 5px;}
141
+ .syncprdcbtn{min-width:200px;}
142
+ }
143
+ @media only screen and (max-width:479px){
144
+
145
+ /*------ onboarding -------*/
146
+ .selcttopwrap {flex-wrap: wrap; }
147
+ .congratppcntnr .onbrdnpp-hdr h2{font-size: 36px;}
148
+ .creatnewwrp{flex: 0 0 100%; max-width: 100%; margin-top: 9px;}
149
+ .cngtrpplft{padding-left: 20px}
150
+
151
+ /*------ sync-product -----*/
152
+ .navsmryitem{max-width:100%;flex:0 0 100%;}
153
+ .syncprdcbtnwrp{max-width:100%;flex:0 0 100%;padding-left:15px;margin-top:6px;}
154
+ .syncprdcbtn{width:100%;}
155
+ .syncproimage{width:70px;height:70px;}
156
+ .syncprotblcell{flex-wrap:wrap;}
157
+ .data-th{max-width:120px;flex:0 0 120px;}
158
+ .syncpropagination ul{flex-wrap:wrap;}
159
+ .syncpropagination ul{margin:0 0px;}
160
+ .paginitem{margin-top:6px; min-width: 18px; font-size: 12px; line-height: 13px; padding: 3px 4px; height: 20px;}
161
+ .tbodyprodetl-cell .syncprotblcntn{flex: 0 0 100%; max-width: 100%;}
162
+ .pgprevbtn{margin-right: 1px;}
163
+ .pgnextbtn{margin-left: 1px;}
164
+
165
+ }
166
+ @media only screen and (max-width:399px){
167
+ /*------- onboarding -------*/
168
+ .onbordingtop p{font-size: 14px; line-height: 22px;}
169
+ .onbordingtop h2{font-size: 24px;}
170
+ .stepdtltop h4{font-size: 16px; line-height: 22px;}
171
+ .slect2bx{width: 225px;}
172
+ .orwrp{padding:0 0 0 8px;}
173
+ .congratppcntnr .onbrdnpp-hdr h2{font-size: 28px;}
174
+ .congratppcntnr .onbrdnpp-hdr{padding-bottom: 0px;}
175
+ .cngrtppdtl-item{display: inherit;}
176
+ .cngtrpplft{padding-left: 22px}
177
+ .cngtrpprgt{text-align: left; padding-left: 22px; margin-top: 4px;}
178
+
179
+ /*------ sync-product -----*/
180
+ .hdrcntcbx{font-size:13px;line-height:20px;}
181
+ }
182
+ @media only screen and (max-width:359px){
183
+ /*------ sync-product -----*/
184
+ .hdrcntcbx{font-size:12px;line-height:18px;}
185
+ .prdctinfopp-cntn{padding:15px;}
186
+ .prdcinfopp-left{max-width:260px;flex:0 0 260px;}
187
+ .prdtpplrg-imgwrp{width:260px;height:260px;}
188
+ .prdcinfopp-right{max-width:260px;flex:0 0 260px;}
189
+ .hdrtpright{min-width: 100%; flex: 0 0 100%; margin-top: 6px;}
190
+
191
+ }
192
+ img{max-width:100%;height:auto;}
admin/css/select2.css ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;}
2
+ .select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:42px;user-select:none;-webkit-user-select:none;}
3
+ .select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:15px;padding-right:35px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
4
+ .select2-container .select2-selection--single .select2-selection__clear{background-color:transparent;border:none;font-size:1em;}
5
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px;}
6
+ .select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none;}
7
+ .select2-container .select2-selection--multiple .select2-selection__rendered{display:inline;list-style:none;padding:0;}
8
+ .select2-container .select2-selection--multiple .select2-selection__clear{background-color:transparent;border:none;font-size:1em;}
9
+ .select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;margin-left:5px;padding:0;max-width:100%;resize:none;height:18px;vertical-align:bottom;font-family:sans-serif;overflow:hidden;word-break:keep-all;}
10
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}
11
+ .select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051;}
12
+ .select2-results{display:block;}
13
+ .select2-results__options{list-style:none;margin:0;padding:0;}
14
+ .select2-results__option{padding:6px 14px;user-select:none;-webkit-user-select:none;}
15
+
16
+ .select2-results__option--selectable{cursor:pointer;}
17
+ .select2-container--open .select2-dropdown{left:0;}
18
+ .select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}
19
+ .select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0;
20
+ box-shadow:0px 3px 6px rgba(0, 0, 0, 0.12); overflow: hidden;}
21
+ .select2-search--dropdown{display:block;padding:4px;}
22
+ .select2-search--dropdown .select2-search__field{padding:6px 9px;width:100%;background-color: #F3F3F3; border-radius: 6px; box-sizing:border-box; line-height: 18px;}
23
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}
24
+ .select2-search--dropdown.select2-search--hide{display:none;}
25
+ .select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0);}
26
+ .select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important;}
27
+ .select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #C6C6C6;border-radius:6px;}
28
+ .select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:42px;}
29
+ .select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;padding-right:0px;}
30
+ .select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;}
31
+ .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;position:absolute;top:1px;right:15px;width:20px;}
32
+ .select2-container--default .select2-selection--single .select2-selection__arrow b{border:none;height:0;left:50%;margin-left:-4px;margin-top:-4px;position:absolute;top:50%;width:0;
33
+ background-image: url(../images/select-arrow.png); width: 12px; height: 8px; background-size: 100%;}
34
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}
35
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto;}
36
+ .select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default;}
37
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none;}
38
+ .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}
39
+ .select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;padding-bottom:5px;padding-right:5px;position:relative;}
40
+ .select2-container--default .select2-selection--multiple.select2-selection--clearable{padding-right:25px;}
41
+ .select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;font-weight:bold;height:20px;margin-right:10px;margin-top:5px;position:absolute;right:0;padding:1px;}
42
+ .select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:inline-block;margin-left:5px;margin-top:5px;padding:0;padding-left:20px;position:relative;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap;}
43
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px;}
44
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-right:1px solid #aaa;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#999;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;position:absolute;left:0;top:0;}
45
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover, .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{background-color:#f1f1f1;color:#333;outline:none;}
46
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}
47
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px;}
48
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-left:1px solid #aaa;border-right:none;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px;}
49
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__clear{float:left;margin-left:10px;margin-right:auto;}
50
+ .select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0;}
51
+ .select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default;}
52
+ .select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none;}
53
+ .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0;}
54
+ .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0;}
55
+ .select2-container--default .select2-search--dropdown .select2-search__field{border:0px solid #aaa; }
56
+ .select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield;}
57
+ .select2-container--default .select2-results > .select2-results__options{max-height:200px;overflow-y:auto;}
58
+ .select2-container--default .select2-results__option .select2-results__option{padding-left:1em;}
59
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0;}
60
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em;}
61
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em;}
62
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em;}
63
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em;}
64
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em;}
65
+ .select2-container--default .select2-results__option--group{padding:0;}
66
+ .select2-container--default .select2-results__option--disabled{color:#999;}
67
+ .select2-container--default .select2-results__option--selected{background-color:#E6F1FB;}
68
+ .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{background-color:#E6F1FB;color:#000000;}
69
+ .select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;}
70
+ .select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, white 50%, #eeeeee 100%);background-image:-o-linear-gradient(top, white 50%, #eeeeee 100%);background-image:linear-gradient(to bottom, white 50%, #eeeeee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);}
71
+ .select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb;}
72
+ .select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px;}
73
+ .select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;}
74
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999;}
75
+ .select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0);}
76
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0;}
77
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}
78
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto;}
79
+ .select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb;}
80
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none;}
81
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}
82
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, white 0%, #eeeeee 50%);background-image:-o-linear-gradient(top, white 0%, #eeeeee 50%);background-image:linear-gradient(to bottom, white 0%, #eeeeee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);}
83
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eeeeee 50%, white 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, white 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, white 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0);}
84
+ .select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;padding-bottom:5px;padding-right:5px;}
85
+ .select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb;}
86
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none;}
87
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;display:inline-block;margin-left:5px;margin-top:5px;padding:0;}
88
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px;}
89
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#888;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;}
90
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;outline:none;}
91
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}
92
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px;}
93
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px;}
94
+ .select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb;}
95
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0;}
96
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}
97
+ .select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0;}
98
+ .select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none;}
99
+ .select2-container--classic .select2-dropdown{background-color:white;border:1px solid transparent;}
100
+ .select2-container--classic .select2-dropdown--above{border-bottom:none;}
101
+ .select2-container--classic .select2-dropdown--below{border-top:none;}
102
+ .select2-container--classic .select2-results > .select2-results__options{max-height:200px;overflow-y:auto;}
103
+ .select2-container--classic .select2-results__option--group{padding:0;}
104
+ .select2-container--classic .select2-results__option--disabled{color:grey;}
105
+ .select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable{background-color:#3875d7;color:white;}
106
+ .select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px;}
107
+ .select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb;}
108
+ .select2-search--dropdown{position: relative;}
109
+ .select2-search--dropdown:before{content: ""; width: 14px; height: 14px; background-image: url(../images/search-icon.png); background-size: 100%; background-repeat: no-repeat; position: absolute; top: 50%; margin-top: -7px; right: 15px;}
admin/css/slick.css ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset 'UTF-8';
2
+ /* Slider */
3
+ .slick-slider{position:relative;display:block;box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
4
+ .slick-list{position:relative;display:block;overflow:hidden;margin:0;padding:0;}
5
+ .slick-list:focus{outline:none;}
6
+ .slick-list.dragging{cursor:pointer;cursor:hand;}
7
+ .slick-slider .slick-track,.slick-slider .slick-list{-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);}
8
+ .slick-track{position:relative;top:0;left:0;display:block;margin-left:auto;margin-right:auto;}
9
+ .slick-track:before,.slick-track:after{display:table;content:'';}
10
+ .slick-track:after{clear:both;}
11
+ .slick-loading .slick-track{visibility:hidden;}
12
+ .slick-slide{display:none;float:left;height:100%;min-height:1px;}
13
+ [dir='rtl'] .slick-slide{float:right;}
14
+ .slick-slide img{display:block;}
15
+ .slick-slide.slick-loading img{display:none;}
16
+ .slick-slide.dragging img{pointer-events:none;}
17
+ .slick-initialized .slick-slide{display:block;}
18
+ .slick-loading .slick-slide{visibility:hidden;}
19
+ .slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent;}
20
+ .slick-arrow.slick-hidden{display:none;}
21
+
22
+ .slick-loading .slick-list{background:#fff url('./ajax-loader.gif') center center no-repeat; width: 42px; height: 42px; background-size: 100%;}
23
+
24
+ .slick-prev,.slick-next{font-size:0;line-height:0;position:absolute;top:50%;display:block;width:20px;height:20px;padding:0;-webkit-transform:translate(0, -50%);-ms-transform:translate(0, -50%);transform:translate(0, -50%);cursor:pointer;color:transparent;border:none;outline:none;background:#F1F6FA;}
25
+ .slick-prev:hover,.slick-prev:focus,.slick-next:hover,.slick-next:focus{color:transparent;outline:none;}
26
+ .slick-prev:hover:before,.slick-prev:focus:before,.slick-next:hover:before,.slick-next:focus:before{opacity:1;}
27
+ .slick-prev.slick-disabled:before,.slick-next.slick-disabled:before{opacity:.25;}
28
+ .slick-prev:before,.slick-next:before{content: ""; display: inline-block; width: 8px; height: 12px; background-size: 100%; background-repeat: no-repeat;
29
+ }
30
+ .slick-prev{left:0px;}
31
+ [dir='rtl'] .slick-prev{right:-25px;left:auto;}
32
+ .slick-prev:before{content:'←';}
33
+ [dir='rtl'] .slick-prev:before{background-image: url(../images/prev.png)}
34
+ .slick-next{right:-24px;}
35
+ [dir='rtl'] .slick-next{right:auto;left:-25px;}
36
+ .slick-next:before{background-image: url(../images/next.png)}
37
+ [dir='rtl'] .slick-next:before{content:'←';}
38
+ /* Dots */
39
+ .slick-dotted.slick-slider{margin-bottom:30px;}
40
+ .slick-dots{position:absolute;bottom:-25px;display:block;width:100%;padding:0;margin:0;list-style:none;text-align:center;}
41
+ .slick-dots li{position:relative;display:inline-block;width:20px;height:20px;margin:0 5px;padding:0;cursor:pointer;}
42
+ .slick-dots li button{font-size:0;line-height:0;display:block;width:20px;height:20px;padding:5px;cursor:pointer;color:transparent;border:0;outline:none;background:transparent;}
43
+ .slick-dots li button:hover,.slick-dots li button:focus{outline:none;}
44
+ .slick-dots li button:hover:before,.slick-dots li button:focus:before{opacity:1;}
45
+ .slick-dots li button:before{font-family:'slick';font-size:6px;line-height:20px;position:absolute;top:0;left:0;width:20px;height:20px;content:'•';text-align:center;opacity:.25;color:black;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
46
+ .slick-dots li.slick-active button:before{opacity:.75;color:black;}
admin/css/style.css ADDED
@@ -0,0 +1,584 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @charset "utf-8";
2
+ @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,500&display=swap');
3
+ /*rc */
4
+ #create_merchant_account{
5
+ background-color: #002BFC;
6
+ border-radius: 6px;
7
+ border: none;
8
+ padding: 9px 15px;
9
+ color: #ffffff;
10
+ font-size: 16px;
11
+ font-weight: 700;
12
+ min-width: 154px;
13
+ text-align: center;
14
+ height: 42px;
15
+ display: inline-flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ line-height: 24px;
19
+ }
20
+ @-webkit-keyframes tvc_popup_box_open {
21
+ 0%{opacity: 0; margin-top:-20%;}
22
+ 75%{margin-top: 5%;}
23
+ 100%{opacity: 1;}
24
+ }
25
+ @keyframes tvc_popup_box_open {
26
+ 0%{opacity: 0; margin-top:-20%;}
27
+ 75%{margin-top: 5%;}
28
+ 100%{opacity: 1;}
29
+ }
30
+ @-webkit-keyframes tvc_popup_box_close {
31
+ 0%{opacity: 1;}
32
+ 75%{opacity: 1; margin-top: : -20%;}
33
+ 100%{opacity: 0;margin-top: 40%;}
34
+ }
35
+ @keyframes tvc_popup_box_close {
36
+ 0%{opacity: 1;}
37
+ 75%{opacity: 1; margin-top: -20%;}
38
+ 100%{opacity: 0;margin-top: 40%;}
39
+ }
40
+ #tvc_popup_box.tvc_popup_box_close{
41
+ display: none;
42
+ animation: tvc_popup_box_close 0.5s;
43
+ -webkit-animation: tvc_popup_box_close 0.5s;
44
+ -webkit-animation-fill-mode: forwards;
45
+ animation-fill-mode: forwards;
46
+ }
47
+ #tvc_popup_box.tvc_popup_box{
48
+ overflow: hidden;
49
+ /*transform: translate(-50%, -50%);*/
50
+ z-index: 9999;
51
+ display: block;
52
+ animation: tvc_popup_box_open 0.5s;
53
+ -webkit-animation: tvc_popup_box_open 0.5s;
54
+ position: fixed;
55
+ left: 500px;
56
+ top: 10px;
57
+ }
58
+ .alert-message {
59
+ text-align: right;
60
+ }
61
+ .alert {
62
+ position: relative;
63
+ padding: .75rem 1.25rem;
64
+ margin-bottom: 1rem;
65
+ border: 1px solid transparent;
66
+ border-radius: .25rem;
67
+ }
68
+ .alert-message .tvc-alert-success{display: inline-block;
69
+ border-radius: 500px;
70
+ border: 0;
71
+ padding-top: 0.5rem;
72
+ padding-bottom: 0.5rem;
73
+ color: #FFFFFF;
74
+ background-color: #66BB6A;
75
+ padding-left: 30px;
76
+ }
77
+ .alert-message .tvc-alert-error{display: inline-block;
78
+ border-radius: 500px;
79
+ border: 0;
80
+ padding-top: 0.5rem;
81
+ padding-bottom: 0.5rem;
82
+ color: #721c24;
83
+ background-color: #f8d7da;
84
+ padding-left: 30px;
85
+ }
86
+ .alert-message .tvc-alert-warning{display: inline-block;
87
+ border-radius: 500px;
88
+ border: 0;
89
+ padding-top: 0.5rem;
90
+ padding-bottom: 0.5rem;
91
+ color: #856404;
92
+ background-color: #fff3cd;
93
+ padding-left: 30px;
94
+ }
95
+ .alert-message .tvc-alert-success:after {
96
+ content: '\2713';
97
+ position: absolute;
98
+ left: 12px;
99
+ }
100
+ .alert-primary{
101
+ padding: 10px;
102
+ color: #004085;
103
+ background-color: #cce5ff;
104
+ border-color: #b8daff;
105
+ }
106
+ .update-nag, .updated, .error, .is-dismissible { display: none; }
107
+ .loader-section {
108
+ position: fixed;
109
+ top: 0;
110
+ bottom: 0;
111
+ left: 0;
112
+ right: 0;
113
+ height: 100%;
114
+ background-color: rgba(255,255,255,0.85);
115
+ display: flex;
116
+ justify-content: center;
117
+ align-items: center;
118
+ z-index: 999;
119
+ }
120
+ .loader-section img {
121
+ max-width: 50px;
122
+ }
123
+ .site-header{left: 160px !important;}
124
+ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
125
+ #tvc_merchant_section{display: flex; align-items: center;}
126
+ /*google button*/
127
+ .google-btn {
128
+ margin: 0 auto;
129
+ width: 184px;
130
+ height: 42px;
131
+ background-color: #4285f4;
132
+ border-radius: 2px;
133
+ box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.25);
134
+ margin-bottom: 15px;
135
+ }
136
+ .google-btn .google-icon-wrapper {
137
+ position: absolute;
138
+ margin-top: 1px;
139
+ margin-left: 1px;
140
+ width: 40px;
141
+ height: 40px;
142
+ border-radius: 2px;
143
+ background-color: #fff;
144
+ }
145
+ .google-btn .google-icon {
146
+ position: absolute;
147
+ margin-top: 11px;
148
+ margin-left: 11px;
149
+ width: 18px;
150
+ height: 18px;
151
+ }
152
+ .google-btn .btn-text {
153
+ float: right;
154
+ margin: 11px 11px 0 0;
155
+ color: #fff;
156
+ font-size: 14px;
157
+ letter-spacing: 0.2px;
158
+ font-family: "Roboto";
159
+ }
160
+ .google-btn:hover {
161
+ box-shadow: 0 0 6px #4285f4;
162
+ cursor: pointer;
163
+ }
164
+ .google-btn:active {
165
+ background: #1669f2;
166
+ }
167
+ .google-btn .btn-text.mr-35{margin-right: 35px;}
168
+ /*google button*/
169
+ /*.google_connect_url{
170
+ display: block;
171
+ background: white;
172
+ color: #444;
173
+ width: 200px;
174
+ border-radius: 5px;
175
+ border: thin solid #888;
176
+ box-shadow: 1px 1px 1px grey;
177
+ white-space: nowrap;
178
+ margin: 0 auto;
179
+ margin-bottom: 8px;
180
+ }
181
+ .google_connect_url:hover {
182
+ cursor: pointer;
183
+ }
184
+ .google_connect_url img {width: 30px;
185
+ height: 30px;
186
+ margin: 8px; display: inline-block;
187
+ vertical-align: middle;}
188
+ .google_connect_url span {
189
+ display: inline-block;
190
+ vertical-align: middle;
191
+ padding-left: 5px;
192
+ padding-right: 5px;
193
+ font-size: 14px;
194
+ font-weight: bold;
195
+
196
+ }
197
+ */
198
+ #tvc_ads_skip_confirm ul{ padding: 0;
199
+ margin: 0;
200
+ list-style: auto;
201
+ margin-left: 20px;}
202
+ #tvc_ads_skip_confirm ul li{font-size: 15px;
203
+ line-height: 22px;
204
+ margin-bottom: 5px;}
205
+ .cstmcheck-item-pro img{position: absolute;
206
+ left: -2px;
207
+ top: 0;}
208
+ .cstmcheck-item-pro label{padding-left: 13px !important;}
209
+
210
+ /*rc */
211
+ /* comman style----------------------*/
212
+ body{margin:0;padding:0;font-family:'Roboto', sans-serif;font-size:14px;color:#515151;scroll-behavior:smooth;overflow-x:hidden;font-weight:normal;}
213
+ a{text-decoration:none;color:#002BFC;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
214
+ a:hover{color:#1E1E1E;text-decoration:none;}
215
+ a:focus{outline:none;text-decoration:none;}
216
+ :focus{outline:none;}
217
+ h1,h2,h3,h4,h5,h6{margin:0 0 10px 0;color:#1E1E1E;padding:0;line-height:1.2;font-family:'Roboto', sans-serif;text-transform:none;font-weight:700;}
218
+ h1{font-size:36px;}
219
+ h2{font-size:30px;}
220
+ h3{font-size:24px;}
221
+ h4{font-size:18px;line-height:24px;}
222
+ h5{font-size:16px;}
223
+ h6{font-size:14px;line-height:22px;}
224
+ h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:inherit;text-decoration:none;font-size:inherit;}
225
+ h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover{text-decoration:none;}
226
+ onbording-right.small{display:block;margin-top:4px;}
227
+ p{margin:0 0 20px 0;line-height:22px;}
228
+ ul, ol{margin:0;}
229
+ button{font-family:'Roboto', sans-serif;cursor:pointer;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;line-height:1;}
230
+ strong, b{font-weight:600;}
231
+ *,::after,::before{box-sizing:border-box;}
232
+ select{-moz-appearance:none;-webkit-appearance:none;background-image:url(../images/selectarrow-new.png);background-repeat:no-repeat;background-position:right center;border:1px solid #C6C6C6;border-radius:6px;}
233
+
234
+ img{
235
+ image-rendering: -moz-crisp-edges;
236
+ image-rendering: -o-crisp-edges;
237
+ image-rendering: -webkit-optimize-contrast;
238
+ image-rendering: crisp-edges;
239
+ -ms-interpolation-mode: nearest-neighbor;
240
+ }
241
+
242
+ .container{max-width:1170px;margin:0 auto;padding:0 15px;}
243
+ .row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}
244
+ .primary-c{color:#002BFC;}
245
+ .primary-bg{background-color:#002BFC;}
246
+
247
+ /*------ onboarding page ------*/
248
+ .onbordingbody{padding-top: 54px;}
249
+ /*----- onboarding header ------*/
250
+ .site-header{padding:12px 0;background-color:#ffffff;position:fixed;z-index:10;top:0;left:0;width:100%;height:54px;box-shadow:0px 1px 6px rgba(0, 0, 0, 0.12);}
251
+ .brand{max-width:138px;}
252
+ .brand img{max-width:138px;}
253
+
254
+
255
+ /*---- onborading style ------*/
256
+ .onbording-wrapper{padding:30px 0;}
257
+ .smallcontainer{max-width:881px;margin:0 0 0 auto;}
258
+ .onbordingtop{max-width:622px;padding:0 35px;text-align:center;margin-bottom:24px;}
259
+ .onbordingtop h2{line-height:35px;margin-bottom:10px;}
260
+ .onbordingtop p{font-size:16px;line-height:24px;margin-bottom:0px;}
261
+ .onboardingstepwrap{max-width:622px;width:100%;flex:1;padding:0 15px}
262
+ .onbordording-step{border:1px solid #E9E9E9;border-radius:6px;margin-bottom:15px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);}
263
+ .selectedactivestep{border:2px solid #2FBB0E;}
264
+ .stepleftround{max-width:42px;height:42px;display:flex;justify-content:center;align-items:center;border:1px dashed #C6C6C6;border-radius:100%;flex:0 0 42px;margin-right:24px;}
265
+ .stepleftround img{opacity:0;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
266
+ .selectedactivestep .stepleftround{background-color:#2FBB0E;border:1px solid #2FBB0E;}
267
+ .selectedactivestep .stepleftround img{opacity:1;}
268
+ .helpicon{margin-left:8px;display:inline-block;margin-top:-1px;vertical-align:top;}
269
+ .helpicon img{vertical-align:middle;}
270
+ .stepdtltop{display:flex;cursor:pointer;align-items:center;padding:24px 60px 24px 24px;position:relative;}
271
+ .stepdtltop:before{content:"";background-image:url(../images/step-down-arrow.png);width:24px;height:24px;background-repeat:no-repeat;background-size:100%;position:absolute;right:30px;top:50%;transform:translateY(-50%);}
272
+ .stepdetwrap p{margin-bottom:0px;}
273
+ .stepdtltop h4{line-height:24px;font-weight:500;margin-bottom:8px;}
274
+ .stepmoredtlwrp{height:0;opacity:0;overflow:hidden;visibility:hidden;padding-left:90px;padding-right:60px;transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
275
+ .stepmoredtl{padding-top:24px;padding-bottom:24px;border-top:1px solid #E9E9E9;}
276
+ .activestep .stepmoredtlwrp{height:auto;opacity:1;visibility:visible;}
277
+ .activestep .stepdtltop:before{background-image:url(../images/step-up-arrow.png);}
278
+ .stepmoredtl h5{font-weight:500;margin-bottom:12px;}
279
+ input[type="radio"], input[type="checkbox"]{margin:0;}
280
+ /*----custom radio -----*/
281
+ .cstmrdobtn-item{margin-bottom:10px;}
282
+ .cstmrdobtn-item label{display:inline-block;position:relative;padding-left:25px;margin-bottom:0px;cursor:pointer;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
283
+ .cstmrdobtn-item input[type="radio"]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}
284
+ .cstmrdobtn-item .checkmark:before{content:"";position:absolute;top:3px;left:0;height:16px;width:16px;border:1px solid #C6C6C6;border-radius:100%;background-color:transparent;}
285
+ .cstmrdobtn-item .checkmark:after{content:"";position:absolute;opacity:0;left:2px;top:5px;width:12px;height:12px;background:#002BFC;border-radius:100%;-webkit-transform:scale(0);transform:scale(0);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
286
+ .cstmrdobtn-item input[type="radio"]:checked ~ .checkmark:after{opacity:1;-webkit-transform:scale(1);transform:scale(1);}
287
+ /*----custom checkbox -----*/
288
+ .cstmcheck-item label{display:inline-block;position:relative;padding-left:25px;margin-bottom:0px;cursor:pointer;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none; min-height:20px;}
289
+ .cstmcheck-item input[type="checkbox"]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}
290
+ .cstmcheck-item .checkmark:before{content:"";position:absolute;top:3px;left:0;height:16px;width:16px;border:1px solid #C6C6C6;border-radius:3px;background-color:#ffffff;border-color:#C6C6C6;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
291
+ .cstmcheck-item .checkmark:after{content:"";position:absolute;opacity:1;left:2px;top:5px;width:12px;height:10px;background-image:url(../images/check-active.png);background-repeat:no-repeat;background-size:100%;-webkit-transform:scale(0);transform:scale(0);-ms-transform:scale(0);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
292
+ .cstmcheck-item input[type="checkbox"]:checked ~ .checkmark:before{background-color:#002BFC;border-color:#002BFC;}
293
+ .cstmcheck-item input[type="checkbox"]:checked ~ .checkmark:after{opacity:1;-webkit-transform:scale(1);transform:scale(1);-ms-transform:scale(1);}
294
+
295
+ .form-row{margin-bottom:24px;}
296
+ .chckbxbgbx{background-color:#F1F6FA;padding:13px 15px;border-radius:6px;display:flex;}
297
+ .chckbxbgbx .cstmcheck-item{margin-right:30px;}
298
+ .chckbxbgbx .cstmcheck-item:last-child{margin-right:0px;}
299
+ .stepnextbtn{display:inline-block;width:154px;height:42px;background-color:#2FBB0E;text-align:center;padding:10px;border-radius:6px;color:#ffffff;font-size:16px;font-weight:700;box-shadow:none;border:none;cursor:pointer;}
300
+ .stepnextbtn:hover{background-color:#28d000;color:#ffffff;}
301
+ .dslbbtn, .dslbbtn:hover{background-color:#CCCCCC;color:#ffffff;}
302
+ .slctunivr-filed{padding-left:25px;margin-top:12px;}
303
+ .slect2bx{border:1px solid #C6C6C6;width:258px;height:42px;}
304
+ .botslectbxitem{margin-bottom:9px;}
305
+ .botslectbxitem:last-child{margin-bottom:0px;}
306
+ .selcttopwrap{display:flex;align-items:center;margin-bottom:24px;}
307
+ .orwrp{padding:0 18px;font-size:16px;line-height:24px;color:#515151;}
308
+ .cretnewbtn{background-color:transparent;cursor:pointer;padding:0;border:none;box-shadow:none;color:#002BFC;font-size:16px;line-height:24px;}
309
+ .cretnewbtn:hover{color:#000000;}
310
+ .cretnewbtn:hover img{filter:grayscale(1);-webkit-filter:grayscale(1);}
311
+ .dsplcolmview{flex-direction:column;}
312
+ .dsplcolmview .cstmcheck-item{margin-bottom:9px;}
313
+ .dsplcolmview .cstmcheck-item:last-child{margin-bottom:0px;}
314
+ .stepnotewrp{margin-bottom:24px;color:#515151;margin-left:-65px;margin-right:-32px;padding-top:15px;border-top:1px solid #E9E9E9;font-size:10px;line-height:16px;}
315
+ .onbording-right{max-width:289px;flex:1;padding:0 15px;}
316
+ .sidebrcontainer{position:sticky;top:84px;}
317
+ .onbrd-rdmbx{background-color:#FBF7EE;padding:22px 24px;border-radius:6px;margin-bottom:24px;}
318
+ .rdm-amnt{font-size:42px;line-height:50px;letter-spacing:-0.06em;color:#002BFC;font-weight:700;margin-bottom:18px;}
319
+ .rdm-amnt small{color:#1E1E1E;font-size:14px;line-height:22px;letter-spacing:0;font-weight:400;}
320
+ .lrnmorbtn{text-align:right;display:inherit;}
321
+ .lrnmorbtn img{vertical-align:middle;}
322
+ .lrnmorbtn:hover img{filter:grayscale(1);-webkit-filter:grayscale(1);}
323
+ .onbrdrgt-nav ul{margin:0;padding:0;list-style:none;}
324
+ .onbrdrgt-nav ul li{padding:0 24px;margin-bottom:9px;}
325
+ .onbrdrgt-nav ul li a{display:inline-block;line-height:22px;text-decoration:none;color:#1E1E1E;text-decoration:underline;}
326
+ .onbrdrgt-nav ul li a:hover{color:#000000;text-decoration:none}
327
+ /*--- popoup style -----*/
328
+ .onbrd-popupwrp{position:fixed;opacity:0;left:0;visibility:hidden;top:0;width:100%;height:100%;z-index:12;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
329
+ .onbrdppmain{display:flex;width:100%;height:100%;padding:30px 15px;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.6);}
330
+ .onbrdnpp-cntner{background-color:#ffffff;border-radius:6px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);max-height:100%;overflow:auto;}
331
+ .onbrdnpp-hdr{padding:15px 40px 15px 15px;border-bottom:1px solid #E9E9E9;position:relative;}
332
+ .onbrdnpp-hdr h4{margin-bottom:0px;font-weight:500;}
333
+ .onbrdpp-body{padding:15px;font-size:16px;line-height:24px;color:#515151;}
334
+ .onbrdpp-body p{line-height:24px;}
335
+ .onbrdpp-body p:last-child{margin-bottom:0px;}
336
+ .onbrdpp-body p strong{color:#1e1e1e;}
337
+ .onbrdpp-body h5{margin-bottom:15px;}
338
+ .onbrdpp-body ul,.onbrdpp-body ol{padding:0;margin:0;}
339
+ .onbrdpp-body ul li, .onbrdpp-body ol li{font-size:16px;line-height:24px;margin-bottom:12px;}
340
+ .onbrdpp-body ul li:last-child, .onbrdpp-body ol li:last-child{margin-bottom:0px;}
341
+ .onbrdpp-body ol{padding-left:20px;}
342
+ .onbrdpp-body ol li{padding-left:5px;}
343
+ .onbrdpp-body em{font-weight:500;font-style:italic;color:#1e1e1e;}
344
+ .ppclsbtn{position:absolute;right:20px;top:18px;cursor:pointer}
345
+ .ggladsppcntnr{width:100%;max-width:390px;}
346
+ .ppfooterbtn{padding:15px 15px 24px;}
347
+ .ppblubtn{background-color:#002BFC;border-radius:6px;border:none;padding:9px 15px;color:#ffffff;font-size:16px;font-weight:700;min-width:154px;text-align:center;height:42px;display:inline-flex;align-items:center;justify-content:center;line-height:24px;}
348
+ .ppblubtn:hover{background-color:#0022c7;}
349
+ .showpopup{opacity:1;visibility:visible;}
350
+ .scrlnone{overflow:hidden;}
351
+ .acccretppcntnr{width:100%;max-width:592px;}
352
+ .congratppcntnr{width:100%;max-width:592px;}
353
+ .cngrtppdtl-item{display:flex;justify-content:space-between;margin-bottom:9px;color:#515151;font-size:14px;line-height:22px;}
354
+ .congratppbody{max-width:454px;margin:0 auto;text-align:center;}
355
+ .cngtrpplft{position:relative;padding-left:22px;}
356
+ .cngrtchckicon{position:absolute;left:0;top:3px;}
357
+ .cngtrpprgt{text-align:right;font-weight:700;}
358
+ .congratppcntnr .ppfooterbtn{text-align:center;}
359
+ .congratppcntnr .onbrdnpp-hdr{padding-top:30px;padding-left:40px;text-align:center;border-bottom:none;}
360
+ .congratppcntnr .onbrdnpp-hdr h2{font-size:42px;margin-bottom:0px;line-height:48px;background-color:#002BFC;background-image:linear-gradient(45deg, #002BFC, #00D2F6);background-size:100%;background-repeat:repeat;-webkit-background-clip:text;-webkit-text-fill-color:transparent;-moz-background-clip:text;-moz-text-fill-color:transparent;}
361
+ /*--- create merchnat popup -----*/
362
+ .crtemrchntpp .onbrdppmain{background-color:#ffffff;display:inherit;}
363
+ .crtemrchntppcntnr{width:100%;padding:0px 20px;box-shadow:none;}
364
+ .crtemrchntpp .onbrdpp-body{max-width:780px;margin:0 auto;padding:0 15px;font-size:14px;line-height:22px;}
365
+ .crtemrchntpp .onbrdpp-body h4{margin-bottom:9px;color:#1e1e1e}
366
+ .crtemrchnpp-lft{padding-right:15px;max-width:506px;border-right:1px solid #E9E9E9;}
367
+ .crtemrchnpp-right{padding-left:15px;max-width:273px;}
368
+ .crtemrchnpp-lft .ppfooterbtn{padding:0;}
369
+ .crtemrchpplft-top p{line-height:22px;color:#515151;margin-bottom:0px;}
370
+ .claimedbx{padding:10px 15px;border-radius:6px;background-color:#F3F0E4;color:#1E1E1E;font-weight:500;margin-top:24px;}
371
+ .mrchntformwrp{margin-top:15px;}
372
+ .fromfiled{border:1px solid #C6C6C6;border-radius:6px;width:258px;line-height:22px;font-size:14px;height:42px;padding:10px 15px;color:#1E1E1E;font-family:'Roboto', sans-serif;}
373
+ .fromfiled::-webkit-input-placeholder{color:#B6B6B6;opacity:1;}
374
+ .fromfiled::-moz-placeholder{color:#B6B6B6;opacity:1;}
375
+ .fromfiled:-ms-input-placeholder{color:#B6B6B6;opacity:1;}
376
+ .fromfiled:-moz-placeholder{color:#B6B6B6;opacity:1;}
377
+ .mt15{margin-top:15px;}
378
+ .crtemrchnpp-lft .cstmcheck-item{font-size:12px;}
379
+ .crtemrchnpp-lft .cstmcheck-item label{font-size:12px;line-height:22px;}
380
+ .cstmcheck-item strong{color:#1e1e1e;font-weight:500;}
381
+ .inputinfotxt{margin-top:6px;font-size:12px;line-height:18px;color:#515151}
382
+ .crtemrchnpp-right h6{font-weight:500;margin-bottom:0;}
383
+ .crtemrchnpp-right ul{margin:18px 0 0 0;padding:0;list-style:none}
384
+ .crtemrchnpp-right ul li{margin-bottom:9px;font-size:14px;line-height:22px;}
385
+ .congratppdtlwrp{text-align:left;}
386
+ /*---- alert bx ----*/
387
+ .alertbx{padding:15px 42px 15px 15px;opacity:0;width:90%;visibility:hidden;z-index:11;position:fixed;max-width:592px;font-size:16px;border-radius:6px;line-height:24px;box-shadow:0px 3px 6px rgba(0, 0, 0, 0.18);top:0;left:50%;transform:translateX(-50%);-ms-transform:translateX(-50%);-webkit-transform:translateX(-50%);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
388
+ .alertbx.show{top:35px;opacity:1;visibility:visible;}
389
+ .bluealertbx{background-color:#002BFC;color:#ffffff;}
390
+ .alertclsbtn{cursor:pointer;position:absolute;right:15px;top:50%;transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);}
391
+
392
+ /* --- all other pages cooman style ------*/
393
+ .trnseffect{transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
394
+ .container-fluid{width:100%;margin:0 auto;padding:0 15px;}
395
+ .row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}
396
+ .cvrs-btn{border-radius:100px;border:none;box-shadow:none;padding:9px 24px;font-weight:500;}
397
+ .greenbtn{background-color:#CAF8BF;color:#2FBB0E;}
398
+ .greenbtn:hover{background-color:#2FBB0E;color:#ffffff;}
399
+ .upgradebtn{background-color:#FBC53B;border-radius:6px;color:#1E1E1E;padding:9px 24px;border:none;line-height:24px;height:42px;font-size:16px;font-weight:500;text-align:center;}
400
+ .upgradebtn:hover{background-color:#1E1E1E;color:#ffffff;}
401
+ .bodyrightpart{padding:20px;background-color:#f1f1f1;}
402
+
403
+ /*----- promotion band -----*/
404
+ .promobandtop{padding:6px 0px;margin-bottom:24px;background:#002bfc;background:linear-gradient(90deg, #002BFC -12.5%, #00CFF6 103.95%);}
405
+ .promobandtop .row{align-items:center;}
406
+ .promoleft{padding:0 15px;flex:1;}
407
+ .promobandmsg{font-size:14px;color:#ffffff;line-height:22px;}
408
+ .promoright{display:flex;padding:0 20px 0 15px;align-items:center;max-width:171px}
409
+ .prmoupgrdbtn .upgradebtn{font-size:14px;height:30px;padding-top:5px;padding-bottom:5px;line-height:22px;}
410
+ .prmoclsbtn{margin-left:20px;cursor:pointer;line-height:0;}
411
+ /*----- error msg top -----*/
412
+ .errormsgtopbx{margin-bottom:24px}
413
+ .errmscntbx{border-radius:300px;display:inline-flex;flex-wrap:wrap;align-items:center;padding:6px 15px;box-shadow:0px 1px 12px rgba(0, 0, 0, 0.06);background-color:#ffffff;font-size:14px;line-height:22px;}
414
+ .errmsgicon{margin-right:6px;line-height:0px;min-width:20px;vertical-align:middle;}
415
+ .errmsglft{color:#FA424D;display:flex;align-items:center;}
416
+ .errmsgright{border-left:1px solid #C6C6C6;padding-left:15px;margin-left:45px;}
417
+ .errmsgright a{color:#0083FC;}
418
+ .errmsgright a:hover{color:#1e1e1e;}
419
+
420
+ /*---- header ----*/
421
+ .header{padding:24px 20px 20px 20px;background-color:#ffffff;border-radius:6px;position:relative;}
422
+ .hdrtpleft{display:flex;padding:0 15px;align-items:center;max-width:66.6666%;flex:0 0 66.66666%;}
423
+ .brandlogo{line-height:0}
424
+ .brandlogo img{max-width:138px;}
425
+ .hdrcntcbx{padding-left:15px;margin-left:15px;border-left:1px solid #C6C6C6;font-size:14px;line-height:22px;}
426
+ .hdrcntcbx span{color:#0083FC;display:inline-block;}
427
+ .hdrtpright{display:flex;padding:0 15px;max-width:33.333333%;flex:0 0 33.33333%;justify-content:flex-end;}
428
+ .hustleplanbtn .cvrs-btn{font-size:12px;padding:6px 12px;}
429
+ .hdrnotiwrp{display:flex;margin-left:22px;align-items:flex-start;}
430
+ .notialrt{background-color:#FA424D;color:#ffffff;font-size:10px;line-height:12px;border-radius:30px;padding:2px 4px 2px;margin-left:-10px;}
431
+
432
+ .mblhdrcntcbx{display: none; flex: 0 0 100%; max-width: 100%;}
433
+
434
+ /*------ sync product style start -----*/
435
+
436
+ /*---- navinfo section ------*/
437
+ .navinfowrap{margin-top:20px;background-color:#ffffff;border-radius:6px;}
438
+ .navinfotopnav{padding:16px 10px 0;border-bottom:1px solid #E9E9E9;}
439
+ .navinfotopnav ul{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap}
440
+ .navinfotopnav ul li a{padding:0 15px 16px;display:flex;align-items:center;position:relative;font-size:16px;font-weight:500;line-height:1;color:#515151;}
441
+ .navinfotopnav ul li a:before{content:"";opacity:0;position:absolute;left:0;bottom:-1px;width:100%;height:2px;background-color:#515151;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
442
+ .navinfoicon{margin-right:8px;line-height:0;}
443
+ .navinfotopnav ul li a:hover:before{opacity:1;}
444
+ .navinfotopnav ul li.active a:before{opacity:1;background-color:#002BFC;}
445
+ .navifosummary{padding:20px;}
446
+ .navifosummary .row{margin-left:-10px;margin-right:-10px;}
447
+ .navsmryitem{max-width:20%;flex:0 0 20%;padding:0 10px;}
448
+ .navsmrybx{background-color:#ffffff;border-radius:6px;box-shadow:0px 1px 9px rgba(0, 0, 0, 0.15);padding:24px;min-height:124px}
449
+ .navsmrysmalltxt{color:#515151;margin-bottom:6px;}
450
+ .navsmrybigtxt{font-size:42px;color:#1e1e1e;font-weight:500;line-height:48px;}
451
+
452
+ /*---- scalability banner ------*/
453
+ .scalability-wrp{margin-top:24px;}
454
+ .scalabilitybx{background:linear-gradient(90deg, #002BFC -12.5%, #00CFF6 103.95%);padding:30px 25px;}
455
+ .col-padd{padding:0 15px;}
456
+ .scalabilitybx .row{align-items:center;}
457
+ .w750container{max-width:780px;margin:0 auto;}
458
+ .sclabilityleft{max-width:465px;}
459
+ .sclabilityright{max-width:331px;padding-left:41px}
460
+ .sclabilityleft h2{color:#ffffff;line-height:38px;margin-bottom:12px;}
461
+ .sclabilityleft p{font-size:16px;line-height:24px;color:#ffffff;}
462
+ .sclabilitybtnarea .upgradebtn{min-width:200px;}
463
+
464
+ /*------ syncproduct section -------*/
465
+ .syncprodt-wrap{margin-top:30px;background-color:#ffffff;border-radius:6px;}
466
+ .syncprodtheader{padding:20px 20px;}
467
+ .syncprodthdrleft h5{margin-bottom:0px;font-weight:400;}
468
+ .syncprodthdrright{display:flex;flex:1;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
469
+ .align-items-center{align-items:center;}
470
+ .prctfltrhover{position:absolute;right:10px;top:100%;min-width:240px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.18);border-radius:6px;margin-top:15px;opacity:0;visibility:hidden;background-color:#ffffff;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
471
+ .prctfltrhovershow{opacity:1;visibility:visible;margin-top:0px;}
472
+ .prdcfltrtrgr{cursor:pointer;}
473
+ .prdchdrsrch, .prdcfilter{padding:0 8px;position:relative;}
474
+ .syncprdcbtnwrp{display:flex;flex:1;max-width:270px;justify-content:flex-end;}
475
+ .syncprdcbtn{border-radius:6px;background-color:#2FBB0E;min-width:240px;text-align:center;height:48px;font-size:16px;line-height:24px;color:#ffffff;border:none;}
476
+ .syncprdcbtn:hover{background-color:#1e1e1e;}
477
+ .prctfltritem{border-bottom:1px solid #E9E9E9;}
478
+ .prctfltrtrgr{color:#B6B6B6;cursor:pointer;padding:16px 30px 15px 15px;position:relative;font-weight:400;text-transform:uppercase;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
479
+ .prctfltritemdtl{display:none;color:#1e1e1e;}
480
+ .prctfltritemdtl ul{margin:0;padding:0 15px 15px;list-style:none;max-height:280px;overflow:auto;}
481
+ .prctfltritemdtl ul li{margin-bottom:9px;}
482
+ .prctfltritemdtl ul li:last-child{margin-bottom:0px;}
483
+ .plusminus{position:absolute;left:15px;top:10px;}
484
+ .prctfltritemdtl p:last-child{margin-bottom:0px;}
485
+ .prctfltrtrgr:after{content:"";position:absolute;right:21px;top:18px;height:14px;width:2px;background-color:#002BFC;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
486
+ .prctfltrtrgr:before{content:"";position:absolute;right:15px;top:24px;height:2px;width:14px;background-color:#002BFC;}
487
+ .prctfltrtrgr.active:after{opacity:0;visibility:hidden;}
488
+
489
+ /*--- sync product popoup style -----*/
490
+ .scrlnone{overflow:hidden;}
491
+ .whitepopup{position:fixed;opacity:0;left:0;visibility:hidden;top:0;width:100%;height:100%;z-index:12;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
492
+ .sycnprdct-ppcnt{display:flex;background-color:rgba(0,0,0,0.7);width:100%;height:100%;justify-content:center;align-items:center; position: relative;}
493
+ .sycnprdctpp-cntr{max-height:100%;overflow:auto;padding:30px;}
494
+ .ppclsbtn{position:absolute;right:20px;top:18px;cursor:pointer}
495
+ .ggladsppcntnr{width:100%;max-width:390px;}
496
+ .sycnprdpp-ftr{margin-top:30px;}
497
+ .sycnprdppbtmbtn{background-color:transparent;border:1px solid #e6e6e6;border-radius:6px;padding:7px 23px;color:#ffffff;font-size:14px;font-weight:normal;min-width:90px;text-align:center;height:36px;display:inline-flex;align-items:center;justify-content:center;line-height:24px;}
498
+ .ppblubtn:hover{background-color:#0022c7;}
499
+ .showpopup{opacity:1;visibility:visible;}
500
+ .sycnprdppcnclbtn{border-color:#FA414D;color:#FA414D}
501
+ .sycnprdbtnrgt{text-align:right;}
502
+ .progressinfo{text-align:right;font-size:12px;line-height:16px;color:#515151;margin-top:9px;}
503
+ .progress{display:-ms-flexbox;display:flex;height:30px;overflow:hidden;line-height:0;background-color:#F3F3F3;border-radius:100px;}
504
+ .progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:left;padding-left:24px;white-space:nowrap;background:linear-gradient(90deg, #0032FC 0%, #00D2F6 100%);transition:width 0.6s ease;border-radius:100px;}
505
+
506
+ /*--- table structure -----*/
507
+ .syncprodtblheader{padding:0 20px;}
508
+ .syncpro-thead{background-color:#F1F6FA;display:flex;align-items:center;}
509
+ .syncpro-thead .syncprotblcell{color:#1e1e1e;}
510
+ .syncprotblcell{padding:10px;color:#1e1e1e;}
511
+ .thedprodetl-cell{display:flex;align-items:center;}
512
+ .thedprodetl-cell .cstmcheck-item{line-height:0;}
513
+ .prodetlcell{max-width:40%;flex:0 0 40%;}
514
+ .stsdetlcell{max-width:18%;flex:0 0 18%;text-align:center;}
515
+ .actndetlcell{max-width:17%;flex:0 0 17%;text-align:center;}
516
+ .issuedetlcell{max-width:25%;flex:0 0 30%;}
517
+ .tbodyprodetl-cell{display:flex;}
518
+ .syncprodtlinfo{padding-left:15px;}
519
+ .syncproimage{width:90px;height:90px;overflow:hidden; background-color: #e9e9e9;}
520
+ .syncproimage img{width:100%;height:100%;object-fit:cover;}
521
+ .sycnproimgwrp{position:relative;}
522
+ .sycnproimgwrp .cstmcheck-item{position:absolute;left:8px;top:4px;}
523
+ .ststbx{min-width:120px;display:inline-block;text-align:center;font-size:12px;padding:3px 10px;line-height:18px;height:24px;border-radius:100px;}
524
+ .disaprvsts{background-color:#FFDEE0;color:#CC0E0E;}
525
+ .aprvsts{background-color:#CEF6CD;color:#169601;}
526
+ .syncprotbody-item{display:flex;padding:15px 10px;border-bottom:1px solid #E9E9E9}
527
+ .proinfotrgr{cursor:pointer}
528
+ .proinfoicon{margin-left:8px;}
529
+ .proinfoicon img{max-width:20px;vertical-align:middle;}
530
+ .pro-price{margin-top:6px;font-size:16px;font-weight:500;color:#1e1e1e;}
531
+ .tbodyissuedetl-cell{color:#515151;line-height:22px;}
532
+ .tbodyissuedetl-cell p{margin-bottom:0px;}
533
+ .syncprofooter{padding:40px 20px;display:flex;align-items:center;flex-wrap:wrap;}
534
+ .properpage{padding-right:15px}
535
+
536
+ /*----- pagination -----*/
537
+ .syncpropagination{display:flex;padding-left:15px;justify-content:flex-end;flex:1;}
538
+ .syncpropagination ul{margin:0;padding:0;list-style:none;display:flex;}
539
+ .syncpropagination ul li{margin:0 4px;}
540
+ .paginitem{border-radius:4px;display:inline-block;text-align:center;height:36px;min-width:36px;padding:6px 10px;font-size:14px;line-height:22px;font-weight:normal;color:#515151;border:1px solid transparent;}
541
+ a.paginitem:hover{color:#002BFC;}
542
+ span.pagecurrent{background-color:#002BFC;color:#ffffff;font-weight:700;}
543
+ .pgprevbtn, .pgnextbtn{border:1px solid #1e1e1e;padding-left:16px;padding-right:16px;}
544
+ .pgprevbtn{margin-right:15px;}
545
+ .pgnextbtn{margin-left:15px;}
546
+ .disblebtn{border-color:#cccccc;color:#CCCCCC;}
547
+ a.disblebtn:hover{color:#cccccc;}
548
+ select.properselect{min-width:64px;height:36px;margin-left:10px;padding-left:6px;}
549
+
550
+ .mbl-allitemchek{display:none;margin:0 20px;padding:10px;background-color:#F1F6FA;align-items:center;}
551
+ .data-th{display:none;}
552
+ .syncprotblcntn{display:flex;}
553
+
554
+ /*--- product info popup ------*/
555
+ .ppoverlay{display:flex;padding:15px 0;background-color:rgba(0,0,0,0.7);width:100%;height:100%;justify-content:center;align-items:center;}
556
+ .ppwhitebg{background-color:#ffffff; position: relative; border-radius:6px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);}
557
+ .pp-content{width:94%;max-width:500px;max-height:100%;overflow:auto;padding:30px;}
558
+ .width650{max-width:650px;}
559
+ .prdctinfopp-cntn{padding:13px 20px;}
560
+ .prdcinfobody{display:flex;flex-wrap:wrap}
561
+ .prdcinfopp-left{max-width:288px;flex:0 0 288px;}
562
+ .prdtpplrg-imgwrp{border-radius:6px;width:288px;height:288px;text-align:center;display:flex;align-items:center;justify-content:center;}
563
+ .prdtpplrg-imgwrp img{width:100%;height:100%;object-fit:contain}
564
+ .prdcinfopp-right{padding-left:20px;max-width:305px;flex:0 0 305px; word-wrap: break-word;}
565
+ .prdcinfopp-right h4{line-height:28px;margin-bottom:4px;}
566
+ .prdcinfopp-right p{margin-bottom:0px;}
567
+ .prdcinfopp-right p a{color:#0083FC}
568
+ .prdcinfopp-right p a:hover{color:#000000}
569
+ .prdinfodtlitem{margin-top:12px;color:#1e1e1e;line-height:22px;font-weight:500;}
570
+ .prdinfodtlitem span{display:block;color:#B6B6B6;font-weight:500;line-height:22px;}
571
+ .prdtpp-thumb{margin-top:6px;padding-right:24px}
572
+ .thumbimgppttem{margin-right:15px;width:76px !important;height:76px;overflow:hidden;border:1px solid #E9E9E9;border-radius:6px;}
573
+ .thumbimgppttem img{width:100%;height:100%;object-fit:cover;}
574
+ .absltpsclsbtn{position: absolute; right: 10px; top: 10px;}
575
+
576
+ .show-less{line-height:22px;}
577
+ .prdtpp-thumb .slick-prev, .prdtpp-thumb .slick-next{height:100%;border-radius:6px;}
578
+ .prdtpp-thumb .slick-prev:hover, .prdtpp-thumb .slick-next:hover{background:#e0e8ef;}
579
+ span.show-more-less-handler{color:#0083FC;padding-left:5px;}
580
+
581
+
582
+ /* RC*/
583
+ .onbordingbody{padding-top: 10px;}
584
+ .dashboard_page_conversios_onboarding, .index_page_conversios_onboarding, .onbordingbody-wapper{background: #fff;}
admin/helper/class-onboarding-helper.php ADDED
@@ -0,0 +1,1024 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The admin-specific functionality of the plugin.
4
+ *
5
+ * @link
6
+ * @since 1.0.0
7
+ *
8
+ * Woo Order Reports
9
+ */
10
+
11
+ if(!defined('ABSPATH')){
12
+ exit; // Exit if accessed directly
13
+ }
14
+ if(!class_exists('Conversios_Onboarding_Helper')):
15
+ class Conversios_Onboarding_Helper{
16
+ protected $apiDomain;
17
+ protected $token;
18
+ public function __construct(){
19
+ $this->req_int();
20
+ //analytics
21
+ add_action('wp_ajax_get_analytics_web_properties', array($this,'get_analytics_web_properties') );
22
+ add_action('wp_ajax_save_analytics_data', array($this,'save_analytics_data') );
23
+ //googl_ads
24
+ add_action('wp_ajax_list_googl_ads_account', array($this,'list_googl_ads_account') );
25
+ add_action('wp_ajax_create_google_ads_account', array($this,'create_google_ads_account') );
26
+ add_action('wp_ajax_save_google_ads_data', array($this,'save_google_ads_data') );
27
+ add_action('wp_ajax_link_analytic_to_ads_account', array($this,'link_analytic_to_ads_account') );
28
+ add_action('wp_ajax_get_conversion_list', array($this,'get_conversion_list') );
29
+
30
+ //google_merchant
31
+ add_action('wp_ajax_list_google_merchant_account', array($this,'list_google_merchant_account') );
32
+ add_action('wp_ajax_create_google_merchant_center_account', array($this,'create_google_merchant_center_account') );
33
+ add_action('wp_ajax_save_merchant_data', array($this,'save_merchant_data') );
34
+ add_action('wp_ajax_link_google_ads_to_merchant_center', array($this,'link_google_ads_to_merchant_center') );
35
+
36
+ //get subscription details
37
+ add_action('wp_ajax_get_subscription_details', array($this,'get_subscription_details') );
38
+ add_action('wp_ajax_update_setup_time_to_subscription', array($this,'update_setup_time_to_subscription') );
39
+
40
+
41
+
42
+ }
43
+
44
+ public function req_int(){
45
+ if (!class_exists('CustomApi.php')) {
46
+ require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
47
+ }
48
+ }
49
+ protected function admin_safe_ajax_call( $nonce, $registered_nonce_name ) {
50
+ // only return results when the user is an admin with manage options
51
+ if ( is_admin() && wp_verify_nonce($nonce,$registered_nonce_name) ) {
52
+ return true;
53
+ } else {
54
+ return false;
55
+ }
56
+ }
57
+
58
+ /**
59
+ * Ajax code for get analytics web properties.
60
+ * @since 4.0.2
61
+ */
62
+ public function get_analytics_web_properties(){
63
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
64
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
65
+ $tvc_data = (object)$_POST['tvc_data'];
66
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
67
+ echo json_encode($api_obj->getAnalyticsWebProperties($_POST));
68
+ wp_die();
69
+ }else{
70
+ echo "Admin security nonce is not verified.";
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Ajax code for save analytics data.
76
+ * @since 4.0.2
77
+ */
78
+ public function save_analytics_data(){
79
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
80
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
81
+ $tvc_data = (object)$_POST['tvc_data'];
82
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
83
+ /*sendingblue*/
84
+ $data = array();
85
+ $data["email"] = $tvc_data->g_mail;
86
+ $data["attributes"]["PRODUCT"] = "Woocommerce Free Plugin";
87
+ $data["attributes"]["SET_GA"] = true;
88
+ $data["listIds"]=[40,41];
89
+ $data["updateEnabled"]=true;
90
+ $this->add_sendinblue_contant($data, $api_obj);
91
+ /*end sendingblue*/
92
+ echo json_encode($api_obj->saveAnalyticsData($_POST));
93
+ wp_die();
94
+ }else{
95
+ echo "Admin security nonce is not verified.";
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Ajax code for list googl ads account.
101
+ * @since 4.0.2
102
+ */
103
+ public function list_googl_ads_account(){
104
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
105
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
106
+ $tvc_data = (object)$_POST['tvc_data'];
107
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
108
+ echo json_encode($api_obj->getGoogleAdsAccountList($_POST));
109
+ wp_die();
110
+ }else{
111
+ echo "Admin security nonce is not verified.";
112
+ }
113
+ }
114
+ /**
115
+ * Ajax code for create google ads account.
116
+ * @since 4.0.2
117
+ */
118
+ public function create_google_ads_account(){
119
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
120
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
121
+ $tvc_data = (object)$_POST['tvc_data'];
122
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
123
+ echo json_encode($api_obj->createGoogleAdsAccount($_POST));
124
+ wp_die();
125
+ }else{
126
+ echo "Admin security nonce is not verified.";
127
+ }
128
+ }
129
+
130
+ /**
131
+ * Ajax code for save google ads data.
132
+ * @since 4.0.2
133
+ */
134
+ public function save_google_ads_data(){
135
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
136
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
137
+ $tvc_data = (object)$_POST['tvc_data'];
138
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
139
+ /*sendingblue*/
140
+ $data = array();
141
+ $data["email"] = $tvc_data->g_mail;
142
+ $data["attributes"]["PRODUCT"] = "Woocommerce Free Plugin";
143
+ $data["attributes"]["SET_ADS"] = true;
144
+ $data["listIds"]=[40,41];
145
+ $data["updateEnabled"]=true;
146
+ $this->add_sendinblue_contant($data, $api_obj);
147
+ /*end sendingblue*/
148
+ echo json_encode($api_obj->saveGoogleAdsData($_POST));
149
+ wp_die();
150
+ }else{
151
+ echo "Admin security nonce is not verified.";
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Ajax code for link analytic to ads account.
157
+ * @since 4.0.2
158
+ */
159
+ public function link_analytic_to_ads_account(){
160
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
161
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
162
+ $tvc_data = (object)$_POST['tvc_data'];
163
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
164
+ echo json_encode($api_obj->linkAnalyticToAdsAccount($_POST));
165
+ wp_die();
166
+ }else{
167
+ echo "Admin security nonce is not verified.";
168
+ }
169
+ }
170
+
171
+ /**
172
+ * Ajax code for list google merchant account.
173
+ * @since 4.0.2
174
+ */
175
+ public function list_google_merchant_account(){
176
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
177
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
178
+ $tvc_data = (object)$_POST['tvc_data'];
179
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
180
+ echo json_encode($api_obj->listMerchantCenterAccount($_POST));
181
+ wp_die();
182
+ }else{
183
+ echo "Admin security nonce is not verified.";
184
+ }
185
+ }
186
+ /**
187
+ * Ajax code for link analytic to ads account.
188
+ * @since 4.0.2
189
+ */
190
+ public function create_google_merchant_center_account(){
191
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
192
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
193
+ $tvc_data = (object)$_POST['tvc_data'];
194
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
195
+ echo json_encode($api_obj->createMerchantAccount($_POST));
196
+ wp_die();
197
+ }else{
198
+ echo "Admin security nonce is not verified.";
199
+ }
200
+ }
201
+
202
+ /**
203
+ * Ajax code for save merchant data.
204
+ * @since 4.0.2
205
+ */
206
+ public function save_merchant_data(){
207
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
208
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
209
+ $tvc_data = (object)$_POST['tvc_data'];
210
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
211
+ /*sendingblue*/
212
+ $data = array();
213
+ $data["email"] = $tvc_data->g_mail;
214
+ $data["attributes"]["PRODUCT"] = "Woocommerce Free Plugin";
215
+ $data["attributes"]["SET_GMC"] = true;
216
+ $data["listIds"]=[40,41];
217
+ $data["updateEnabled"]=true;
218
+ $this->add_sendinblue_contant($data, $api_obj);
219
+ /*end sendingblue*/
220
+ echo json_encode($api_obj->saveMechantData($_POST));
221
+ wp_die();
222
+ }else{
223
+ echo "Admin security nonce is not verified.";
224
+ }
225
+ }
226
+ /**
227
+ * Ajax code for link analytic to ads account.
228
+ * @since 4.0.2
229
+ */
230
+ public function get_conversion_list(){
231
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
232
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
233
+ $tvc_data = (object)$_POST['tvc_data'];
234
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
235
+ unset($_POST['tvc_data']);
236
+ unset($_POST['conversios_onboarding_nonce']);
237
+ echo json_encode($api_obj->getConversionList($_POST));
238
+ wp_die();
239
+ }else{
240
+ echo "Admin security nonce is not verified.";
241
+ }
242
+ }
243
+
244
+ /**
245
+ * Ajax code for link google ads to merchant center.
246
+ * @since 4.0.2
247
+ */
248
+ public function link_google_ads_to_merchant_center(){
249
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
250
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
251
+ $tvc_data = (object)$_POST['tvc_data'];
252
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
253
+ echo json_encode($api_obj->linkGoogleAdsToMerchantCenter($_POST));
254
+ wp_die();
255
+ }else{
256
+ echo "Admin security nonce is not verified.";
257
+ }
258
+ }
259
+ /**
260
+ * Ajax code for link google ads to merchant center.
261
+ * @since 4.0.2
262
+ */
263
+ public function get_subscription_details(){
264
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
265
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
266
+ $tvc_data = (object)$_POST['tvc_data'];
267
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
268
+ echo json_encode($api_obj->getSubscriptionDetails($_POST['tvc_data'], $_POST['subscription_id']));
269
+ wp_die();
270
+ }else{
271
+ echo "Admin security nonce is not verified.";
272
+ }
273
+ }
274
+
275
+ /**
276
+ * Ajax code for update setup time to subscription.
277
+ * @since 4.0.2
278
+ */
279
+ public function update_setup_time_to_subscription(){
280
+ $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
281
+ if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
282
+ $tvc_data = (object)$_POST['tvc_data'];
283
+ $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
284
+ $return_url = $this->save_wp_setting_from_subscription_api($api_obj, $tvc_data, $_POST['subscription_id']);
285
+ $return_rs = $api_obj->updateSetupTimeToSubscription($_POST);
286
+ $return_rs->return_url = $return_url;
287
+ echo json_encode($return_rs);
288
+ wp_die();
289
+ }else{
290
+ echo "Admin security nonce is not verified.";
291
+ }
292
+ }
293
+
294
+ /**
295
+ * save wp setting from subscription api
296
+ * @since 4.0.2
297
+ */
298
+ public function save_wp_setting_from_subscription_api($api_obj, $tvc_data, $subscription_id){
299
+ //print_r($tvc_data);
300
+ //echo "=================";
301
+ $TVC_Admin_Helper = new TVC_Admin_Helper();
302
+ $google_detail = $api_obj->getSubscriptionDetails($tvc_data, $subscription_id);
303
+ /**
304
+ * active licence key while come from server page
305
+ */
306
+ $ee_additional_data = $TVC_Admin_Helper->get_ee_additional_data();
307
+ if(isset($ee_additional_data['temp_active_licence_key']) && $ee_additional_data['temp_active_licence_key'] != ""){
308
+ $licence_key = $ee_additional_data['temp_active_licence_key'];
309
+ $TVC_Admin_Helper->active_licence($licence_key, $_GET['subscription_id']);
310
+ unset($ee_additional_data['temp_active_licence_key']);
311
+ $TVC_Admin_Helper->set_ee_additional_data($ee_additional_data);
312
+ }
313
+ if(property_exists($google_detail,"error") && $google_detail->error == false){
314
+ /**
315
+ * for save conversion send to in WP DB
316
+ */
317
+ $googleDetail = $google_detail->data;
318
+ if($googleDetail->plan_id != 1 && $googleDetail->google_ads_conversion_tracking == 1){
319
+ $TVC_Admin_Helper->update_conversion_send_to();
320
+ }
321
+ /**
322
+ * for site verifecation
323
+ */
324
+ $this->site_verification_and_domain_claim($googleDetail);
325
+
326
+ $_POST['subscription_id'] = $googleDetail->id;
327
+ $_POST['ga_eeT'] = (isset($googleDetail->enhanced_e_commerce_tracking) && $googleDetail->enhanced_e_commerce_tracking == "1") ? "on" : "";
328
+
329
+ $_POST['ga_ST'] = (isset($googleDetail->add_gtag_snippet) && $googleDetail->add_gtag_snippet == "1") ? "on" : "";
330
+ $_POST['gm_id'] = $googleDetail->measurement_id;
331
+ $_POST['ga_id'] = $googleDetail->property_id;
332
+ $_POST['google_ads_id'] = $googleDetail->google_ads_id;
333
+ $_POST['google_merchant_id'] = $googleDetail->google_merchant_center_id;
334
+ $_POST['tracking_option'] = $googleDetail->tracking_option;
335
+ $_POST['ga_gUser'] = 'on';
336
+ //$_POST['ga_gCkout'] = 'on';
337
+ $_POST['ga_Impr'] = 6;
338
+ $_POST['ga_IPA'] = 'on';
339
+ $_POST['ga_OPTOUT'] = 'on';
340
+ $_POST['ga_PrivacyPolicy'] = 'on';
341
+ $_POST['google-analytic'] = '';
342
+ //update option in wordpress local database
343
+ update_option('google_ads_conversion_tracking', $googleDetail->google_ads_conversion_tracking);
344
+ update_option('ads_tracking_id', $googleDetail->google_ads_id);
345
+ update_option('ads_ert', $googleDetail->remarketing_tags);
346
+ update_option('ads_edrt', $googleDetail->dynamic_remarketing_tags);
347
+ Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
348
+ if(property_exists($tvc_data,"g_mail") && $tvc_data->g_mail){
349
+ update_option('ee_customer_gmail', $tvc_data->g_mail);
350
+ }
351
+ if(isset($_POST['ga_view_id']) && $_POST['ga_view_id']){
352
+ update_option('ee_ga_view_id', $_POST['ga_view_id']);
353
+ }
354
+
355
+ /**
356
+ * function call for save remarketing snippets in WP DB
357
+ */
358
+ $TVC_Admin_Helper->update_remarketing_snippets();
359
+ $return_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=gaa_config_page";
360
+ if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
361
+ if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != ""){
362
+ $return_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=sync_product_page&welcome_msg=true";
363
+ }else{
364
+ $return_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=gaa_config_page&welcome_msg=true";
365
+ }
366
+ }
367
+ return $return_url;
368
+ }
369
+ }
370
+ /**
371
+ * site verification and_domain claim code
372
+ * @since 4.0.2
373
+ */
374
+ public function site_verification_and_domain_claim($googleDetail){
375
+ $TVC_Admin_Helper = new TVC_Admin_Helper();
376
+ $customApiObj = new CustomApi();
377
+ $postData = [
378
+ 'merchant_id' => $googleDetail->merchant_id,
379
+ 'website_url' => get_site_url(),
380
+ 'subscription_id' => $googleDetail->id,
381
+ 'account_id' => $googleDetail->google_merchant_center_id
382
+ ];
383
+ //is site verified
384
+ if ($googleDetail->is_site_verified == '0') {
385
+ $postData['method']="file";
386
+ $siteVerificationToken = $customApiObj->siteVerificationToken($postData);
387
+ if (isset($siteVerificationToken->error) && !empty($siteVerificationToken->errors)) {
388
+ goto call_method_tag;
389
+ } else {
390
+ $myFile = ABSPATH.$siteVerificationToken->data->token;
391
+ if (!file_exists($myFile)) {
392
+ $fh = fopen($myFile, 'w+');
393
+ chmod($myFile,0777);
394
+ $stringData = "google-site-verification: ".$siteVerificationToken->data->token;
395
+ fwrite($fh, $stringData);
396
+ fclose($fh);
397
+ }
398
+ $postData['method']="file";
399
+ $siteVerification = $customApiObj->siteVerification($postData);
400
+ if (isset($siteVerification->error) && !empty($siteVerification->errors)) {
401
+ call_method_tag:
402
+ //methd using tag
403
+ $postData['method']="meta";
404
+ $siteVerificationToken_tag = $customApiObj->siteVerificationToken($postData);
405
+ if(isset($siteVerificationToken_tag->data->token) && $siteVerificationToken_tag->data->token){
406
+ $TVC_Admin_Helper->set_ee_additional_data(array("add_site_varification_tag"=>1,"site_varification_tag_val"=> base64_encode($siteVerificationToken_tag->data->token)));
407
+ sleep(1);
408
+ $siteVerification_tag = $customApiObj->siteVerification($postData);
409
+ if(isset($siteVerification_tag->error) && !empty($siteVerification_tag->errors)){
410
+ }else{
411
+ $googleDetail->is_site_verified = '1';
412
+ }
413
+ }
414
+ } else {
415
+ $googleDetail->is_site_verified = '1';
416
+ }
417
+ }
418
+ }
419
+ //is domain claim
420
+ if ($googleDetail->is_domain_claim == '0') {
421
+ $claimWebsite = $customApiObj->claimWebsite($postData);
422
+ if (isset($claimWebsite->error) && !empty($claimWebsite->errors)) {
423
+ } else {
424
+ $googleDetail->is_domain_claim = '1';
425
+ }
426
+ }
427
+
428
+ /**
429
+ * function call for save API data in WP DB
430
+ */
431
+ $TVC_Admin_Helper->set_update_api_to_db($googleDetail, false);
432
+ }
433
+ /**
434
+ * update contact details on sendinblue.
435
+ * @since 4.0.2
436
+ */
437
+ function add_sendinblue_contant($data, $api_obj){
438
+ $api_obj->TVC_CALL_API("POST", "https://api.sendinblue.com/v3/contacts", json_encode($data));
439
+ }
440
+
441
+ }
442
+ endif; // class_exists
443
+ new Conversios_Onboarding_Helper();
444
+
445
+ if(!class_exists('Conversios_Onboarding_ApiCall') ){
446
+ class Conversios_Onboarding_ApiCall {
447
+ protected $apiDomain;
448
+ protected $token;
449
+ protected $merchantId;
450
+ protected $access_token;
451
+ protected $refresh_token;
452
+ public function __construct($access_token, $refresh_token) {
453
+ $merchantInfo = json_decode(file_get_contents(ENHANCAD_PLUGIN_URL.'/includes/setup/json/merchant-info.json'), true);
454
+ $this->refresh_token = $refresh_token;
455
+ $this->access_token = $this->generateAccessToken($access_token, $this->refresh_token);
456
+ $this->apiDomain = TVC_API_CALL_URL;
457
+ $this->token = 'MTIzNA==';
458
+ $this->merchantId = $merchantInfo['merchantId'];
459
+ }
460
+
461
+ function TVC_CALL_API($method, $url, $data, $headers = false){
462
+ $curl = curl_init();
463
+ switch ($method){
464
+ case "POST":
465
+ curl_setopt($curl, CURLOPT_POST, 1);
466
+ if ($data)
467
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
468
+ break;
469
+ case "PUT":
470
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
471
+ if ($data)
472
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
473
+ break;
474
+ default:
475
+ if ($data)
476
+ $url = sprintf("%s?%s", $url, http_build_query($data));
477
+ }
478
+ // OPTIONS:
479
+ curl_setopt($curl, CURLOPT_URL, $url);
480
+ if(!$headers){
481
+ curl_setopt($curl, CURLOPT_HTTPHEADER, array(
482
+ 'api-key: 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',
483
+ 'Content-Type: application/json',
484
+ ));
485
+ }else{
486
+ curl_setopt($curl, CURLOPT_HTTPHEADER, array(
487
+ 'api-key: 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',
488
+ 'Content-Type: application/json',
489
+ $headers
490
+ ));
491
+ }
492
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
493
+ curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
494
+ // EXECUTE:
495
+ $result = curl_exec($curl);
496
+ curl_close($curl);
497
+ return $result;
498
+ }
499
+
500
+ public function updateTokenToSubscription($tvc_data) {
501
+ try {
502
+ $tvc_data = json_decode(base64_decode($tvc_data));
503
+ $url = $this->apiDomain . '/customer-subscriptions/update-token';
504
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
505
+ $data = [
506
+ 'subscription_id' => "",//$this->subscription_id,
507
+ 'gmail' => $tvc_data->g_mail,
508
+ 'access_token' => $this->access_token,
509
+ 'refresh_token' => $this->refresh_token,
510
+ 'domain' => $tvc_data->user_domain
511
+ ];
512
+ $curl_url = $url;
513
+ $data = json_encode($data);
514
+ $ch = curl_init();
515
+ curl_setopt_array($ch, array(
516
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
517
+ CURLOPT_RETURNTRANSFER => true,
518
+ CURLOPT_TIMEOUT => 0,
519
+ CURLOPT_HTTPHEADER => $header,
520
+ CURLOPT_POSTFIELDS => $data
521
+ ));
522
+ $response = curl_exec($ch);
523
+ $response = json_decode($response);
524
+ return $response;
525
+ } catch (Exception $e) {
526
+ return $e->getMessage();
527
+ }
528
+ }
529
+
530
+ public function getSubscriptionDetails($tvc_data, $subscription_id){
531
+ try{
532
+ $tvc_data = (object)$tvc_data;
533
+ $url = $this->apiDomain . '/customer-subscriptions/subscription-detail';
534
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "AccessToken:$this->access_token");
535
+ $data = [
536
+ 'subscription_id' => $subscription_id,//$this->subscription_id,
537
+ 'domain' => $tvc_data->user_domain
538
+ ];
539
+ $curl_url = $url;
540
+ $postData = json_encode($data);
541
+ $ch = curl_init();
542
+ curl_setopt_array($ch, array(
543
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
544
+ CURLOPT_RETURNTRANSFER => true,
545
+ CURLOPT_TIMEOUT => 0,
546
+ CURLOPT_HTTPHEADER => $header,
547
+ CURLOPT_POSTFIELDS => $postData
548
+ ));
549
+ $response = curl_exec($ch);
550
+ $response = json_decode($response);
551
+ return $response;
552
+ }catch(Exception $e){
553
+ return $e->getMessage();
554
+ }
555
+ }
556
+
557
+ public function getAnalyticsWebProperties($postData) {
558
+ try {
559
+ // print_r($postData);
560
+ //$tvc_data = json_decode(base64_decode($postData['tvc_data']));
561
+ //unset($postData['tvc_data']);
562
+ $url = $this->apiDomain . '/google-analytics/account-list';
563
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "AccessToken:$this->access_token");
564
+ $data = [
565
+ 'merchant_id' => $this->merchantId,
566
+ 'type' => $postData['type']
567
+ ];
568
+ $curl_url = $url;
569
+ $postData = json_encode($data);
570
+ $ch = curl_init();
571
+ curl_setopt_array($ch, array(
572
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
573
+ CURLOPT_RETURNTRANSFER => true,
574
+ CURLOPT_TIMEOUT => 0,
575
+ CURLOPT_HTTPHEADER => $header,
576
+ CURLOPT_POSTFIELDS => $postData
577
+ ));
578
+ $response = curl_exec($ch);
579
+ $response = json_decode($response);
580
+ return $response;
581
+ } catch (Exception $e) {
582
+ return $e->getMessage();
583
+ }
584
+ }
585
+
586
+ public function getGoogleAdsAccountList($postData) {
587
+ try {
588
+ if($this->refresh_token != ""){
589
+ //$tvc_data = json_decode(base64_decode($postData['tvc_data']));
590
+ $url = $this->apiDomain . '/adwords/list';
591
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "RefreshToken:$this->refresh_token");
592
+ $curl_url = $url;
593
+ $ch = curl_init();
594
+ curl_setopt_array($ch, array(
595
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
596
+ CURLOPT_RETURNTRANSFER => true,
597
+ CURLOPT_TIMEOUT => 0,
598
+ CURLOPT_HTTPHEADER => $header,
599
+ CURLOPT_POSTFIELDS => ""
600
+ ));
601
+ $response = curl_exec($ch);
602
+ return json_decode($response);
603
+ }else{
604
+ return json_decode(array("error"=>true));
605
+ }
606
+ } catch (Exception $e) {
607
+ return $e->getMessage();
608
+ }
609
+ }
610
+
611
+ public function listMerchantCenterAccount() {
612
+ try {
613
+ $url = $this->apiDomain . '/gmc/user-merchant-center/list';
614
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
615
+ $data = [
616
+ 'access_token' => $this->access_token,
617
+ ];
618
+ $curl_url = $url;
619
+ $postData = json_encode($data);
620
+ $ch = curl_init();
621
+ curl_setopt_array($ch, array(
622
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
623
+ CURLOPT_RETURNTRANSFER => true,
624
+ CURLOPT_TIMEOUT => 0,
625
+ CURLOPT_HTTPHEADER => $header,
626
+ CURLOPT_POSTFIELDS => $postData
627
+ ));
628
+ $response = curl_exec($ch);
629
+ return json_decode($response);
630
+ } catch (Exception $e) {
631
+ return $e->getMessage();
632
+ }
633
+ }
634
+
635
+ public function createGoogleAdsAccount($postData) {
636
+ try {
637
+ $tvc_data = (object)$postData['tvc_data'];
638
+ $url = $this->apiDomain . '/adwords/create-ads-account';
639
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
640
+ $data = [
641
+ 'email' => $tvc_data->g_mail,
642
+ 'currency' => $tvc_data->currency_code,
643
+ 'time_zone' => $tvc_data->timezone_string, //'Asia/Kolkata',
644
+ 'domain' => $tvc_data->user_domain
645
+ ];
646
+ $curl_url = $url;
647
+ $postData = json_encode($data);
648
+ $ch = curl_init();
649
+ curl_setopt_array($ch, array(
650
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
651
+ CURLOPT_RETURNTRANSFER => true,
652
+ CURLOPT_TIMEOUT => 0,
653
+ CURLOPT_HTTPHEADER => $header,
654
+ CURLOPT_POSTFIELDS => $postData
655
+ ));
656
+ $response = curl_exec($ch);
657
+ $response = json_decode($response);
658
+ return $response;
659
+ } catch (Exception $e) {
660
+ return $e->getMessage();
661
+ }
662
+ }
663
+ public function createMerchantAccount($postData) {
664
+ try {
665
+ $url = $this->apiDomain . '/gmc/create';
666
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
667
+ $data = [
668
+ 'merchant_id' => $this->merchantId, //'256922349',
669
+ 'name' => $postData['store_name'],
670
+ 'website_url' => $postData['website_url'],
671
+ 'customer_id' => $postData['customer_id'],
672
+ 'adult_content' => isset($postData['adult_content']) && $postData['adult_content'] == 'true' ? true : false,
673
+ 'country' => $postData['country'],
674
+ 'users' => [
675
+ [
676
+ "email_address" => $postData['email_address'], //"sarjit@pivotdrive.ca"
677
+ "admin" => true
678
+ ]
679
+ ],
680
+ 'business_information' => [
681
+ 'address' => [
682
+ 'country' => $postData['country']
683
+ ]
684
+ ]
685
+ ];
686
+ $curl_url = $url;
687
+ $data = json_encode($data);
688
+ $ch = curl_init();
689
+ curl_setopt_array($ch, array(
690
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
691
+ CURLOPT_RETURNTRANSFER => true,
692
+ CURLOPT_TIMEOUT => 0,
693
+ CURLOPT_HTTPHEADER => $header,
694
+ CURLOPT_POSTFIELDS => $data
695
+ ));
696
+ $response = curl_exec($ch);
697
+ return json_decode($response);
698
+ } catch (Exception $e) {
699
+ return $e->getMessage();
700
+ }
701
+ }
702
+ public function doCustomerLogin($tvc_data) {
703
+ try {
704
+ $tvc_data = json_decode(base64_decode($tvc_data));
705
+ $url = $this->apiDomain . '/customers/login';
706
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
707
+ $data = [
708
+ 'email' => $tvc_data->g_mail,
709
+ 'access_token' => $this->access_token,
710
+ 'refresh_token' => $this->refresh_token,
711
+ 'sign_in_type' => $tvc_data->sign_in_type
712
+ ];
713
+ $curl_url = $url;
714
+ $data = json_encode($data);
715
+ $ch = curl_init();
716
+ curl_setopt_array($ch, array(
717
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
718
+ CURLOPT_RETURNTRANSFER => true,
719
+ CURLOPT_TIMEOUT => 0,
720
+ CURLOPT_HTTPHEADER => $header,
721
+ CURLOPT_POSTFIELDS => $data
722
+ ));
723
+ $response = curl_exec($ch);
724
+ return json_decode($response);
725
+ } catch (Exception $e) {
726
+ return $e->getMessage();
727
+ }
728
+ }//doCustomerLogin
729
+
730
+
731
+
732
+ public function saveAnalyticsData($postData = array()) {
733
+ try {
734
+ $url = $this->apiDomain . '/customer-subscriptions/update-detail';
735
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
736
+ $data = array(
737
+ 'subscription_id' => (isset($postData['subscription_id']))?$postData['subscription_id'] : '',
738
+ 'tracking_option' => (isset($postData['tracking_option']))?$postData['tracking_option'] : '',
739
+ 'measurement_id' => (isset($postData['web_measurement_id']))?$postData['web_measurement_id'] : '',
740
+ 'ga4_analytic_account_id' => (isset($postData['ga4_account_id']))?$postData['ga4_account_id'] : '',
741
+ 'property_id' => (isset($postData['web_property_id'])) ? $postData['web_property_id'] : '',
742
+ 'ua_analytic_account_id' => (isset($postData['ua_account_id'])) ? $postData['ua_account_id'] : '',
743
+ 'enhanced_e_commerce_tracking' => (isset($postData['enhanced_e_commerce_tracking']) && $postData['enhanced_e_commerce_tracking'] == 'true') ? 1 : 0,
744
+ 'user_time_tracking' => (isset($postData['user_time_tracking']) && $postData['user_time_tracking']=='true')?1:0,
745
+ 'add_gtag_snippet' => (isset($postData['add_gtag_snippet']) && $postData['add_gtag_snippet'] == 'true')? 1:0,
746
+ 'client_id_tracking' => (isset($postData['client_id_tracking']) && $postData['client_id_tracking']=='true')?1:0,
747
+ 'exception_tracking' => (isset($postData['exception_tracking']) && $postData['exception_tracking']=='true')?1:0,
748
+ 'enhanced_link_attribution_tracking' => (isset($postData['enhanced_link_attribution_tracking']) && $postData['enhanced_link_attribution_tracking'] == 'true')? 1 : 0
749
+ );
750
+ $curl_url = $url;
751
+ $data = json_encode($data);
752
+ $ch = curl_init();
753
+ curl_setopt_array($ch, array(
754
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
755
+ CURLOPT_RETURNTRANSFER => true,
756
+ CURLOPT_TIMEOUT => 0,
757
+ CURLOPT_HTTPHEADER => $header,
758
+ CURLOPT_POSTFIELDS => $data
759
+ ));
760
+ $response = curl_exec($ch);
761
+ return json_decode($response);
762
+ } catch (Exception $e) {
763
+ return $e->getMessage();
764
+ }
765
+ }
766
+
767
+ public function saveGoogleAdsData($postData = array()){
768
+ try {
769
+ $url = $this->apiDomain . '/customer-subscriptions/update-detail';
770
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
771
+ $data = [
772
+ 'subscription_id' => (isset($postData['subscription_id']))?$postData['subscription_id'] : '',
773
+ 'google_ads_id' => (isset($postData['google_ads_id']))? $postData['google_ads_id'] : '',
774
+ 'remarketing_tags' => (isset($postData['remarketing_tags']) && $postData['remarketing_tags'] == 'true') ? 1 : 0,
775
+ 'dynamic_remarketing_tags' => (isset($postData['dynamic_remarketing_tags']) && $postData['dynamic_remarketing_tags'] == 'true') ? 1 : 0,
776
+ 'google_ads_conversion_tracking' => (isset($postData['google_ads_conversion_tracking']) && $postData['google_ads_conversion_tracking'] == 'true') ? 1 : 0,
777
+ 'link_google_analytics_with_google_ads' => (isset($postData['link_google_analytics_with_google_ads']) && $postData['link_google_analytics_with_google_ads'] == 'true') ? 1 : 0
778
+ ];
779
+ $curl_url = $url;
780
+ $data = json_encode($data);
781
+ $ch = curl_init();
782
+ curl_setopt_array($ch, array(
783
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
784
+ CURLOPT_RETURNTRANSFER => true,
785
+ CURLOPT_TIMEOUT => 0,
786
+ CURLOPT_HTTPHEADER => $header,
787
+ CURLOPT_POSTFIELDS => $data
788
+ ));
789
+ $response = curl_exec($ch);
790
+ return json_decode($response);
791
+ } catch (Exception $e) {
792
+ return $e->getMessage();
793
+ }
794
+ }
795
+
796
+ public function saveMechantData($postData = array()) {
797
+ try {
798
+ $url = $this->apiDomain . '/customer-subscriptions/update-detail';
799
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
800
+ $data = [
801
+ 'merchant_id' => ($postData['merchant_id'] == 'NewMerchant') ? $this->merchantId: $postData['merchant_id'],
802
+ 'subscription_id' => (isset($postData['subscription_id']))?$postData['subscription_id'] : '',
803
+ 'google_merchant_center_id' => (isset($postData['google_merchant_center']))? $postData['google_merchant_center'] : '',
804
+ 'website_url' => $postData['website_url'],
805
+ 'customer_id' => $postData['customer_id']
806
+ ];
807
+ $curl_url = $url;
808
+ $postData = json_encode($data);
809
+ $ch = curl_init();
810
+ curl_setopt_array($ch, array(
811
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
812
+ CURLOPT_RETURNTRANSFER => true,
813
+ CURLOPT_TIMEOUT => 0,
814
+ CURLOPT_HTTPHEADER => $header,
815
+ CURLOPT_POSTFIELDS => $postData
816
+ ));
817
+ $response = curl_exec($ch);
818
+ return json_decode($response);
819
+ } catch (Exception $e) {
820
+ return $e->getMessage();
821
+ }
822
+ }
823
+
824
+ public function linkAnalyticToAdsAccount($postData) {
825
+ try {
826
+ $url = $this->apiDomain . '/google-analytics/link-ads-to-analytics';
827
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "AccessToken:$this->access_token", "RefreshToken:$this->refresh_token");
828
+ if ($postData['type'] == "UA") {
829
+ $data = [
830
+ 'type' => $postData['type'],
831
+ 'ads_customer_id' => $postData['ads_customer_id'], //'7894072776', //$postData['ads_customer_id']
832
+ 'analytics_id' => $postData['analytics_id'], //'184918792', //$postData['analytics_id']
833
+ 'web_property_id' => $postData['web_property_id'], //'UA-184918792-2', //$postData['web_property_id']
834
+ 'profile_id' => $postData['profile_id'], //'234239637', //$postData['profile_id']
835
+ ];
836
+ } else {
837
+ $data = [
838
+ 'type' => $postData['type'],
839
+ 'ads_customer_id' => $postData['ads_customer_id'], //'7894072776', //$postData['ads_customer_id']
840
+ 'analytics_id' => '', //$postData['analytics_id']
841
+ 'web_property_id' => $postData['web_property_id'], //'properties/257833054', //$postData['web_property_id']
842
+ 'profile_id' => '', //$postData['profile_id']
843
+ 'web_property' => $postData['web_property'], //'234239637', //$postData['profile_id']
844
+ ];
845
+ }
846
+ $curl_url = $url;
847
+ $data = json_encode($data);
848
+ $ch = curl_init();
849
+ curl_setopt_array($ch, array(
850
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
851
+ CURLOPT_RETURNTRANSFER => true,
852
+ CURLOPT_TIMEOUT => 0,
853
+ CURLOPT_HTTPHEADER => $header,
854
+ CURLOPT_POSTFIELDS => $data
855
+ ));
856
+ $response = curl_exec($ch);
857
+ return json_decode($response);
858
+ } catch (Exception $e) {
859
+ return $e->getMessage();
860
+ }
861
+ }
862
+ public function linkGoogleAdsToMerchantCenter($postData) {
863
+ try {
864
+ $url = $this->apiDomain . '/adwords/link-ads-to-merchant-center';
865
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "AccessToken:$this->access_token");
866
+ $data = [
867
+ 'merchant_id' => ($postData['merchant_id'] == 'NewMerchant') ? $this->merchantId: $postData['merchant_id'],
868
+ 'account_id' => $postData['account_id'],
869
+ 'adwords_id' => $postData['adwords_id']
870
+ ];
871
+ $curl_url = $url;
872
+ $data = json_encode($data);
873
+ $ch = curl_init();
874
+ curl_setopt_array($ch, array(
875
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
876
+ CURLOPT_RETURNTRANSFER => true,
877
+ CURLOPT_TIMEOUT => 0,
878
+ CURLOPT_HTTPHEADER => $header,
879
+ CURLOPT_POSTFIELDS => $data
880
+ ));
881
+ $response = curl_exec($ch);
882
+ return json_decode($response);
883
+ } catch (Exception $e) {
884
+ return $e->getMessage();
885
+ }
886
+ }
887
+ public function updateSetupTimeToSubscription($postData) {
888
+ try {
889
+ $url = $this->apiDomain . '/customer-subscriptions/update-setup-time';
890
+ $this->header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
891
+ $data = [
892
+ 'subscription_id' => (isset($postData['subscription_id']))?$postData['subscription_id'] : '',
893
+ 'setup_end_time' => date('Y-m-d H:i:s')
894
+ ];
895
+ $this->curl_url = $url;
896
+ $data = json_encode($data);
897
+ $ch = curl_init();
898
+ curl_setopt_array($ch, array(
899
+ CURLOPT_URL => $this->curl_url, //esc_url($this->curl_url),
900
+ CURLOPT_RETURNTRANSFER => true,
901
+ CURLOPT_TIMEOUT => 0,
902
+ CURLOPT_HTTPHEADER => $this->header,
903
+ CURLOPT_POSTFIELDS => $data
904
+ ));
905
+ $this->response = curl_exec($ch);
906
+ $this->response = json_decode($this->response);
907
+ return $this->response;
908
+ } catch (Exception $e) {
909
+ return $e->getMessage();
910
+ }
911
+ }
912
+
913
+ public function getConversionList($data) {
914
+ try {
915
+ $url = $this->apiDomain . '/google-ads/conversion-list';
916
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
917
+ $curl_url = $url;
918
+ $postData = json_encode($data);
919
+ $ch = curl_init();
920
+ curl_setopt_array($ch, array(
921
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
922
+ CURLOPT_RETURNTRANSFER => true,
923
+ CURLOPT_TIMEOUT => 0,
924
+ CURLOPT_HTTPHEADER => $header,
925
+ CURLOPT_POSTFIELDS => $postData
926
+ ));
927
+ $response = curl_exec($ch);
928
+ $response = json_decode($response);
929
+ $return = new \stdClass();
930
+
931
+ if(isset($response->data) && count($response->data) > 0){
932
+ $return->error = false;
933
+ $return->message = "Google Ads conversion tracking setting success.";
934
+ }else{
935
+ if(isset($response->error) && $response->error == false){
936
+ $response = $this->createConversion($data);
937
+ if(isset($response->error) && $response->error == false){
938
+ $return->error = false;
939
+ $return->message = $response->message;
940
+ }else{
941
+ $return->error = true;
942
+ $errors = json_decode($response->errors[0]);
943
+ $return->errors = $errors->message;
944
+ }
945
+ }else{
946
+ $return->error = true;
947
+ $return->errors = $response->errors[0];
948
+ }
949
+ }
950
+ return $return;
951
+ } catch (Exception $e) {
952
+ return $e->getMessage();
953
+ }
954
+ }
955
+
956
+ public function createConversion($postData) {
957
+ try {
958
+ $url = $this->apiDomain . '/google-ads/create-conversion';
959
+ $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
960
+ $data = [
961
+ 'customer_id' => (isset($postData['customer_id']))?$postData['customer_id'] : '',
962
+ 'name' => "Order Conversion"
963
+ ];
964
+ $curl_url = $url;
965
+ $postData = json_encode($data);
966
+ $ch = curl_init();
967
+ curl_setopt_array($ch, array(
968
+ CURLOPT_URL => $curl_url, //esc_url($curl_url),
969
+ CURLOPT_RETURNTRANSFER => true,
970
+ CURLOPT_TIMEOUT => 0,
971
+ CURLOPT_HTTPHEADER => $header,
972
+ CURLOPT_POSTFIELDS => $postData
973
+ ));
974
+ $response = curl_exec($ch);
975
+ $response = json_decode($response);
976
+ return $response;
977
+ } catch (Exception $e) {
978
+ return $e->getMessage();
979
+ }
980
+ }
981
+ public function generateAccessToken($access_token, $refresh_token) {
982
+ $request = "https://www.googleapis.com/oauth2/v1/tokeninfo?"
983
+ . "access_token=" . $access_token;
984
+
985
+ $ch = curl_init();
986
+ curl_setopt($ch, CURLOPT_URL, $request);
987
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
988
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
989
+ $response = curl_exec($ch);
990
+ $result = json_decode($response);
991
+
992
+ if (isset($result->error) && $result->error) {
993
+ $credentials = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . 'includes/setup/json/client-secrets.json'), true);
994
+ $url = 'https://www.googleapis.com/oauth2/v4/token';
995
+ $header = array("content-type: application/json");
996
+ $clientId = $credentials['web']['client_id'];
997
+ $clientSecret = $credentials['web']['client_secret'];
998
+
999
+ $data = [
1000
+ "grant_type" => 'refresh_token',
1001
+ "client_id" => $clientId,
1002
+ 'client_secret' => $clientSecret,
1003
+ 'refresh_token' => $refresh_token,
1004
+ ];
1005
+
1006
+ $postData = json_encode($data);
1007
+ $ch = curl_init();
1008
+ curl_setopt_array($ch, array(
1009
+ CURLOPT_URL => $url, //esc_url($curl_url),
1010
+ CURLOPT_RETURNTRANSFER => true,
1011
+ CURLOPT_TIMEOUT => 0,
1012
+ CURLOPT_HTTPHEADER => $header,
1013
+ CURLOPT_POSTFIELDS => $postData
1014
+ ));
1015
+ $response = curl_exec($ch);
1016
+ $response = json_decode($response);
1017
+ return $response->access_token;
1018
+ } else {
1019
+ return $access_token;
1020
+ }
1021
+ }//generateAccessToken
1022
+
1023
+ }
1024
+ }
admin/images/arrow_right.png ADDED
Binary file
admin/images/blue-plus.png ADDED
Binary file
admin/images/check-active.png ADDED
Binary file
admin/images/check-wbg.png ADDED
Binary file
admin/images/close-icon.png ADDED
Binary file
admin/images/close-white.png ADDED
Binary file
admin/images/dashboard-icon.png ADDED
Binary file
admin/images/erroricon.png ADDED
Binary file
admin/images/filter-icon.png ADDED
Binary file
admin/images/g-logo.png ADDED
Binary file
admin/images/google_signin.png ADDED
Binary file
admin/images/green-check.png ADDED
Binary file
admin/images/help-icon.png ADDED
Binary file
admin/images/icon/lock.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 28.857 28.857"><defs><style>.a,.b{fill:none;}.b{opacity:0.87;}.c{fill:#0872fc;}</style></defs><path class="a" d="M0,0H28.857V28.857H0Z"/><path class="b" d="M0,0H28.857V28.857H0Z"/><path class="c" d="M20.833,9.417h-1.2v-2.4a6.012,6.012,0,0,0-12.024,0v2.4H6.4a2.412,2.412,0,0,0-2.4,2.4V23.845a2.412,2.412,0,0,0,2.4,2.4H20.833a2.412,2.412,0,0,0,2.4-2.4V11.821A2.412,2.412,0,0,0,20.833,9.417Zm-10.821-2.4a3.607,3.607,0,1,1,7.214,0v2.4H10.012ZM20.833,23.845H6.4V11.821H20.833Zm-7.214-3.607a2.4,2.4,0,1,0-2.4-2.4A2.412,2.412,0,0,0,13.619,20.238Z" transform="translate(0.81 0.202)"/></svg>
admin/images/info-icon.png ADDED
Binary file
admin/images/next.png ADDED
Binary file
admin/images/notification-icon.png ADDED
Binary file
admin/images/sclability-image.png ADDED
Binary file
admin/images/search-icon.png ADDED
Binary file
admin/images/search-icon18.png ADDED
Binary file
admin/images/select-arrow.png ADDED
Binary file
admin/images/selectarrow-new.png ADDED
Binary file
admin/images/setting-icon.png ADDED
Binary file
admin/images/smart-shopping-icon.png ADDED
Binary file
admin/images/step-down-arrow.png ADDED
Binary file
admin/images/step-up-arrow.png ADDED
Binary file
admin/images/sync-prdct-icon.png ADDED
Binary file
admin/js/onboarding-custom.js ADDED
@@ -0,0 +1,723 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function loaderSection(isShow) {
2
+ if (isShow){
3
+ $('#loader-section').show();
4
+ }else{
5
+ $('#loader-section').hide();
6
+ }
7
+ }
8
+ var tvc_time_out="";
9
+ function add_message(type, msg, is_close = true){
10
+ let tvc_popup_box = document.getElementById('tvc_popup_box');
11
+ tvc_popup_box.classList.remove("tvc_popup_box_close");
12
+ tvc_popup_box.classList.add("tvc_popup_box");
13
+ if(type == "success"){
14
+ document.getElementById('tvc_popup_box').innerHTML ="<div class='alert tvc-alert-success'>"+msg+"</div>";
15
+ }else if(type == "error"){
16
+ document.getElementById('tvc_popup_box').innerHTML ="<div class='alert tvc-alert-error'>"+msg+"</div>";
17
+ }else if(type == "warning"){
18
+ document.getElementById('tvc_popup_box').innerHTML ="<div class='alert tvc-alert-warning'>"+msg+"</div>";
19
+ }
20
+ if(is_close){
21
+ tvc_time_out = setTimeout(function(){ //tvc_popup_box.style.display = "none";
22
+ tvc_popup_box.classList.add("tvc_popup_box_close");
23
+ tvc_popup_box.classList.remove("tvc_popup_box");
24
+ }, 4000);
25
+ }
26
+ }
27
+
28
+ function is_validate_step(step){
29
+ var is_valide = false;
30
+ if(step == "step_1"){
31
+ var web_property_id = ""; var ua_account_id = ""; var web_measurement_id = ""; var ga4_account_id = "";
32
+ var tracking_option = $('input[type=radio][name=analytic_tag_type]:checked').val();
33
+ //console.log(tracking_option);
34
+ if(tracking_option == "UA"){
35
+ web_property_id = $('#ua_web_property_id').val();
36
+ ua_account_id = $("#ua_web_property_id").find(':selected').data('accountid');
37
+ if(web_property_id == ""){
38
+ msg = "Please select web property id.";
39
+ }else{
40
+ is_valide = true;
41
+ }
42
+ }else if(tracking_option == "GA4"){
43
+ web_measurement_id = $('#ga4_web_measurement_id').val();
44
+ ga4_account_id = $("#ga4_web_measurement_id").find(':selected').data('accountid');
45
+ if(web_measurement_id == ""){
46
+ msg = "Please select measurement id.";
47
+ }else{
48
+ is_valide = true;
49
+ }
50
+ }else{
51
+ web_property_id = $('#both_web_property_id').val();
52
+ ua_account_id = $("#both_web_property_id").find(':selected').data('accountid');
53
+ web_measurement_id = $('#both_web_measurement_id').val();
54
+ ga4_account_id = $("#both_web_measurement_id").find(':selected').data('accountid');
55
+
56
+ if(web_property_id == "" || web_measurement_id == ""){
57
+ msg = "Please select property/measurement id.";
58
+ }else{
59
+ is_valide = true;
60
+ }
61
+ }
62
+ //console.log("is_valide"+is_valide+"-"+tracking_option+"-"+web_property_id);
63
+ if(is_valide){
64
+ $('#step_1').prop('disabled', false);
65
+ }else{
66
+ $('#step_1').prop('disabled', true);
67
+ }
68
+ }else if(step == "step_2"){
69
+ google_ads_id = $('#ads-account').val();
70
+ if(google_ads_id == ""){
71
+ msg = "Please select Google Ads account.";
72
+ }else{
73
+ is_valide = true;
74
+ }
75
+ if(is_valide){
76
+ $('#step_2').prop('disabled', false);
77
+ }else{
78
+ $('#step_2').prop('disabled', true);
79
+ }
80
+
81
+ }
82
+ return is_valide;
83
+ }
84
+ $(document).ready(function () {
85
+ loaderSection(false);
86
+ //step-1
87
+ $(".google_analytics_sel").on( "change", function() {
88
+ is_validate_step("step_1");
89
+ $(".onbrdstep-1").removeClass('selectedactivestep');
90
+ $(".onbrdstep-3").removeClass('selectedactivestep');
91
+ $(".onbrdstep-2").removeClass('selectedactivestep');
92
+ $("[data-id=step_1]").attr("data-is-done",0);
93
+ $("[data-id=step_2]").attr("data-is-done",0);
94
+ $("[data-id=step_3]").attr("data-is-done",0);
95
+ });
96
+ //step-2
97
+ $(".google_ads_sel").on( "change", function() {
98
+ //$(".onbrdstep-1").removeClass('selectedactivestep');
99
+ $(".onbrdstep-3").removeClass('selectedactivestep');
100
+ $(".onbrdstep-2").removeClass('selectedactivestep');
101
+ //$("[data-id=step_1]").attr("data-is-done",0);
102
+ $("[data-id=step_2]").attr("data-is-done",0);
103
+ $("[data-id=step_3]").attr("data-is-done",0);
104
+ });
105
+ $('input[type=checkbox]:not(#adult_content, #terms_conditions)').change(function() {
106
+ //$(".onbrdstep-1").removeClass('selectedactivestep');
107
+ $(".onbrdstep-3").removeClass('selectedactivestep');
108
+ $(".onbrdstep-2").removeClass('selectedactivestep');
109
+ // $("[data-id=step_1]").attr("data-is-done",0);
110
+ $("[data-id=step_2]").attr("data-is-done",0);
111
+ $("[data-id=step_3]").attr("data-is-done",0);
112
+ });
113
+
114
+ //select2
115
+ //$(".select2").select2();
116
+ // desable to close advance settings
117
+ $(".advance-settings .dropdown-menu").click(function(e){
118
+ e.stopPropagation();
119
+ });
120
+ });
121
+ //save nalytics web properties while next button click
122
+ function save_analytics_web_properties(tracking_option, tvc_data, subscription_id){
123
+ if(subscription_id != ""){
124
+ var web_measurement_id = "";
125
+ var web_property_id = "";
126
+ var ga4_account_id = "";
127
+ var ua_account_id = "";
128
+ var is_valide = true;
129
+ var msg ="";
130
+ if(tracking_option == "UA"){
131
+ web_property_id = $('#ua_web_property_id').val();
132
+ ua_account_id = $("#ua_web_property_id").find(':selected').data('accountid');
133
+ if(web_property_id == ""){
134
+ is_valide = false;
135
+ msg = "Please select web property id.";
136
+ }
137
+ }else if(tracking_option == "GA4"){
138
+ web_measurement_id = $('#ga4_web_measurement_id').val();
139
+ ga4_account_id = $("#ga4_web_measurement_id").find(':selected').data('accountid');
140
+ if(web_measurement_id == ""){
141
+ is_valide = false;
142
+ msg = "Please select measurement id.";
143
+ }
144
+ }else{
145
+ web_property_id = $('#both_web_property_id').val();
146
+ ua_account_id = $("#both_web_property_id").find(':selected').data('accountid');
147
+ web_measurement_id = $('#both_web_measurement_id').val();
148
+ ga4_account_id = $("#both_web_measurement_id").find(':selected').data('accountid');
149
+
150
+ if(web_property_id == "" || web_measurement_id == ""){
151
+ is_valide = false;
152
+ msg = "Please select property/measurement id.";
153
+ }
154
+ }
155
+ if(is_valide == true){
156
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
157
+ var data = {
158
+ action: "save_analytics_data",
159
+ subscription_id:subscription_id,
160
+ tracking_option: tracking_option,
161
+ web_measurement_id: web_measurement_id,
162
+ web_property_id: web_property_id,
163
+ ga4_account_id: ga4_account_id,
164
+ ua_account_id: ua_account_id,
165
+ enhanced_e_commerce_tracking: $('#enhanced_e_commerce_tracking').is(':checked'),
166
+ user_time_tracking: $('#user_time_tracking').is(':checked'),
167
+ add_gtag_snippet: $('#add_gtag_snippet').is(':checked'),
168
+ client_id_tracking: $('#client_id_tracking').is(':checked'),
169
+ exception_tracking: $('#exception_tracking').is(':checked'),
170
+ enhanced_link_attribution_tracking: $('#enhanced_link_attribution_tracking').is(':checked'),
171
+ tvc_data:tvc_data,
172
+ conversios_onboarding_nonce:conversios_onboarding_nonce
173
+ };
174
+ $.ajax({
175
+ type: "POST",
176
+ dataType: "json",
177
+ url: tvc_ajax_url,
178
+ data: data,
179
+ beforeSend: function(){
180
+ loaderSection(true);
181
+ },
182
+ success: function(response){
183
+ loaderSection(false);
184
+ if (response.error === false) {
185
+ add_message("success","Google Analytics successfully updated.");
186
+ return true;
187
+ }else{
188
+ add_message("error","Error while updating Google Analytics.");
189
+ return false;
190
+ }
191
+
192
+ }
193
+ });
194
+
195
+ }else{
196
+ add_message("warning",msg);
197
+ return false;
198
+ }
199
+ }else{
200
+ add_message("warning","Missing value of subscription id.");
201
+ return false;
202
+ }
203
+ }
204
+
205
+ function save_google_ads_data(google_ads_id, tvc_data, subscription_id, is_skip=false){
206
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
207
+ if(google_ads_id || is_skip == true){
208
+ loaderSection(true);
209
+ var data = {
210
+ action: "save_google_ads_data",
211
+ subscription_id:subscription_id,
212
+ google_ads_id: google_ads_id,
213
+ remarketing_tags: $('#remarketing_tag').is(':checked'),
214
+ dynamic_remarketing_tags: $('#dynamic_remarketing_tags').is(':checked'),
215
+ google_ads_conversion_tracking: $("#google_ads_conversion_tracking").is(':checked'),
216
+ link_google_analytics_with_google_ads: $("#link_google_analytics_with_google_ads").is(':checked'),
217
+ tvc_data:tvc_data,
218
+ conversios_onboarding_nonce:conversios_onboarding_nonce
219
+ };
220
+ $.ajax({
221
+ type: "POST",
222
+ dataType: "json",
223
+ url: tvc_ajax_url,
224
+ data: data,
225
+ beforeSend: function () {
226
+ },
227
+ success: function (response) {
228
+ if(response.error === false) {
229
+ add_message("success","Google Ads successfully updated.");
230
+ //$("#ads-account").val(google_ads_id);
231
+ let tracking_option = $('input:radio[name=analytic_tag_type]:checked').val();
232
+ var s_tracking_option = tracking_option.toLowerCase();
233
+ if(plan_id != 1){
234
+ check_oradd_conversion_list(google_ads_id, tvc_data);
235
+ }
236
+ if ($("#link_google_analytics_with_google_ads").is(':checked')) {
237
+ if(tracking_option == "UA" || tracking_option == "BOTH"){
238
+ var UalinkData = {
239
+ action: "link_analytic_to_ads_account",
240
+ type: "UA",
241
+ ads_customer_id: google_ads_id,
242
+ analytics_id: $("#"+s_tracking_option+"_web_property_id").find(':selected').data('accountid'),
243
+ web_property_id: $("#"+s_tracking_option+"_web_property_id").val(),
244
+ profile_id: $("#"+s_tracking_option+"_web_property_id").find(':selected').data('profileid'),
245
+ tvc_data:tvc_data,
246
+ conversios_onboarding_nonce:conversios_onboarding_nonce
247
+ };
248
+ //console.log(UalinkData);
249
+ if(google_ads_id != ""){
250
+ setTimeout(function(){
251
+ link_analytic_to_ads_account(UalinkData);
252
+ }, 1000);
253
+ }
254
+
255
+ }
256
+ if(tracking_option == "GA4" || tracking_option == "BOTH"){
257
+ var Ga4linkData = {
258
+ action: "link_analytic_to_ads_account",
259
+ type: "GA4",
260
+ ads_customer_id: google_ads_id,
261
+ web_property_id: $("#"+s_tracking_option+"_web_measurement_id").val(),
262
+ web_property: $("#"+s_tracking_option+"_web_measurement_id").find(':selected').data('name'),
263
+ tvc_data:tvc_data,
264
+ conversios_onboarding_nonce:conversios_onboarding_nonce
265
+ };
266
+ if(google_ads_id != ""){
267
+ setTimeout(function(){
268
+ link_analytic_to_ads_account(Ga4linkData);
269
+ }, 1500);
270
+ }
271
+ }
272
+ loaderSection(false);
273
+ return true;
274
+ }
275
+ }else{
276
+ add_message("error","Error while updating Google Ads.");
277
+ }
278
+ loaderSection(false);
279
+ }
280
+ });
281
+ return true;
282
+ }else{
283
+ $('#tvc_ads_skip_confirm').addClass('showpopup');
284
+ $('body').addClass('scrlnone');
285
+ //$('#tvc_ads_skip_confirm').modal('show');
286
+ return false;
287
+ }
288
+ }
289
+ function save_merchant_data(google_merchant_center_id, merchant_id, tvc_data, subscription_id, plan_id, is_skip=fals){
290
+ if(google_merchant_center_id || is_skip == true){
291
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
292
+ var website_url = $("#url").val();
293
+ var customer_id = $("#loginCustomerId").val();
294
+ var data = {
295
+ action: "save_merchant_data",
296
+ subscription_id:subscription_id,
297
+ google_merchant_center:google_merchant_center_id,
298
+ merchant_id: merchant_id,
299
+ website_url:website_url,
300
+ customer_id:customer_id,
301
+ tvc_data:tvc_data,
302
+ conversios_onboarding_nonce:conversios_onboarding_nonce
303
+ };
304
+ $.ajax({
305
+ type: "POST",
306
+ dataType: "json",
307
+ url: tvc_ajax_url,
308
+ data: data,
309
+ beforeSend: function () {
310
+ loaderSection(true);
311
+ },
312
+ success: function (response) {
313
+ let google_ads_id = $("#new_google_ads_id").text();
314
+ if(google_ads_id ==null || google_ads_id ==""){
315
+ google_ads_id = $('#ads-account').val();
316
+ }
317
+
318
+ if (response.error === false) {
319
+ add_message("success","Google merchant center successfully updated.");
320
+ //clearTimeout(tvc_time_out);
321
+ var link_data = {
322
+ action: "link_google_ads_to_merchant_center",
323
+ account_id: google_merchant_center_id,
324
+ merchant_id: merchant_id,
325
+ adwords_id: google_ads_id,
326
+ tvc_data:tvc_data,
327
+ conversios_onboarding_nonce:conversios_onboarding_nonce
328
+ };
329
+ if(google_merchant_center_id != "" && google_ads_id != ""){
330
+ link_google_Ads_to_merchant_center(link_data, tvc_data, subscription_id);
331
+ }else{
332
+ get_subscription_details(tvc_data, subscription_id);
333
+ }
334
+ } else {
335
+ add_message("error","Error while updating Google merchant center.");
336
+ }
337
+
338
+ //loaderSection(false);
339
+ }
340
+ });
341
+ }else{
342
+ add_message("warning","Missing Google merchant center accountid.");
343
+ }
344
+ }
345
+
346
+ /* get conversion list */
347
+ function check_oradd_conversion_list(google_ads_id, google_merchant_center_id, tvc_data){
348
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
349
+ if(google_ads_id && google_merchant_center_id){
350
+ var data = {
351
+ action: "get_conversion_list",
352
+ customer_id:google_ads_id,
353
+ tvc_data:tvc_data,
354
+ conversios_onboarding_nonce:conversios_onboarding_nonce
355
+ };
356
+ $.ajax({
357
+ type: "POST",
358
+ dataType: "json",
359
+ url: tvc_ajax_url,
360
+ data: data,
361
+ success: function (response) {
362
+ //console.log(response);
363
+ clearTimeout(tvc_time_out);
364
+ if(response.error === false){
365
+ setTimeout(function(){
366
+ add_message("success",response.message);
367
+ }, 2000);
368
+ }else{
369
+ //const errors = JSON.parse(response.errors[0]);
370
+ if(response.errors){
371
+ setTimeout(function(){
372
+ add_message("error",response.errors);
373
+ }, 2000);
374
+ }
375
+
376
+ }
377
+ }
378
+ });
379
+ }
380
+ }
381
+ /* link account code */
382
+ function link_analytic_to_ads_account(data) {
383
+ $.ajax({
384
+ type: "POST",
385
+ dataType: "json",
386
+ url: tvc_ajax_url,
387
+ data: data,
388
+ success: function (response) {
389
+ clearTimeout(tvc_time_out);
390
+ if(response.error === false){
391
+ add_message("success","Google ananlytics and google ads linked successfully.");
392
+ }else{
393
+ const errors = JSON.parse(response.errors[0]);
394
+ add_message("error",errors.message);
395
+ }
396
+ }
397
+ });
398
+ }
399
+
400
+ function link_google_Ads_to_merchant_center(link_data, tvc_data, subscription_id){
401
+ $.ajax({
402
+ type: "POST",
403
+ dataType: "json",
404
+ url: tvc_ajax_url,
405
+ data: link_data,
406
+ beforeSend: function(){
407
+ //loaderSection(true);
408
+ },
409
+ success: function (response) {
410
+ clearTimeout(tvc_time_out);
411
+ if(response.error === false){
412
+ add_message("success",response.data.message);
413
+ }else if(response.error == true && response.errors != undefined){
414
+ const errors = JSON.parse(response.errors[0]);
415
+ add_message("error",errors.message);
416
+ }else{
417
+ add_message("error","There was an error while link account");
418
+ }
419
+ get_subscription_details(tvc_data, subscription_id);
420
+ //loaderSection(false);
421
+ }
422
+ });
423
+ }
424
+ /* get subscription details */
425
+ function get_subscription_details(tvc_data, subscription_id) {
426
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
427
+ $.ajax({
428
+ type: "POST",
429
+ dataType: "json",
430
+ url: tvc_ajax_url,
431
+ data: {action: "get_subscription_details", tvc_data:tvc_data, subscription_id:subscription_id, conversios_onboarding_nonce:conversios_onboarding_nonce},
432
+ beforeSend: function () {
433
+ },
434
+ success: function (response) {
435
+ if (response.error === false) {
436
+ $("#google_analytics_property_id_info").hide();
437
+ $("#google_analytics_measurement_id_info").hide();
438
+ $("#google_ads_info").hide();
439
+ $("#google_merchant_center_info").hide();
440
+ if(response.data.property_id != ""){
441
+ $("#selected_google_analytics_property").text(response.data.property_id);
442
+ $("#google_analytics_property_id_info").show();
443
+ }
444
+ if(response.data.measurement_id != ""){
445
+ $("#selected_google_analytics_measurement").text(response.data.measurement_id);
446
+ $("#google_analytics_measurement_id_info").show();
447
+ }
448
+ if(response.data.google_ads_id != ""){
449
+ $("#selected_google_ads_account").text(response.data.google_ads_id);
450
+ $("#google_ads_info").show();
451
+ }
452
+ if(response.data.google_merchant_center_id != ""){
453
+ $("#selected_google_merchant_center").text(response.data.google_merchant_center_id);
454
+ $("#google_merchant_center_info").show();
455
+ }
456
+ $('#tvc_confirm_submite').addClass('showpopup');
457
+ $('body').addClass('scrlnone');
458
+ //$('#tvc_confirm_submite').modal('show');
459
+ } else {
460
+ add_message("error","Error while fetching subscription data");
461
+ }
462
+ loaderSection(false);
463
+ }
464
+ });
465
+ }
466
+ /* List function */
467
+ //call get list propertie function base on tracking_option
468
+ function call_list_analytics_web_properties(tracking_option, tvc_data){
469
+ if (tracking_option == 'UA'){
470
+ let web_property_id_length = $('#ua_web_property_id option').length;
471
+ if(web_property_id_length < 2){
472
+ list_analytics_web_properties("UA", tvc_data);
473
+ }
474
+ }else if (tracking_option == 'GA4'){
475
+ let web_measurement_id_length = $('#ga4_web_measurement_id option').length;
476
+ if(web_measurement_id_length < 2){
477
+ list_analytics_web_properties("GA4", tvc_data);
478
+ }
479
+ }else if (tracking_option == 'BOTH'){
480
+ let web_property_id_length = $('#both_web_property_id option').length;
481
+ let web_measurement_id_length = $('#both_web_measurement_id option').length;
482
+ if(web_measurement_id_length < 2 || web_property_id_length < 2){
483
+ list_analytics_web_properties("BOTH", tvc_data);
484
+ }
485
+ }
486
+ }
487
+ // get list properties dropdown options
488
+ function list_analytics_web_properties(type, tvc_data) {
489
+ loaderSection(true);
490
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
491
+ $.ajax({
492
+ type: "POST",
493
+ dataType: "json",
494
+ url: tvc_ajax_url,
495
+ data: {action: "get_analytics_web_properties", type: type, tvc_data:tvc_data, conversios_onboarding_nonce:conversios_onboarding_nonce},
496
+ success: function (response) {
497
+ if (response.error === false) {
498
+ if (type == "UA" || type == "BOTH") {
499
+ //web_properties_dropdown
500
+ var subscriptionPropertyId = $("#subscriptionPropertyId").val();
501
+ var ga_view_id = $("#ga_view_id").val();
502
+ var PropOptions = '<option value="">Select Property Id</option>';
503
+ $.each(response.data.wep_properties, function (propKey, propValue) {
504
+ var selected ="";
505
+ if (subscriptionPropertyId == propValue.webPropertyId) {
506
+ if(ga_view_id != "" && ga_view_id == propValue.id){
507
+ selected = "selected='selected'";
508
+ }else if(ga_view_id =="" ){
509
+ selected = "selected='selected'";
510
+ }
511
+
512
+ }else{
513
+ selected = "";
514
+ }
515
+ PropOptions = PropOptions + '<option value="' + propValue.webPropertyId + '" ' + selected + ' data-accountid="' + propValue.accountId + '" data-profileid="' + propValue.id + '"> ' + propValue.accountName + ' - ' + propValue.propertyName + ' - ' + propValue.name + '</option>';
516
+ });
517
+ $('#ua_web_property_id').html(PropOptions);
518
+ $('#both_web_property_id').html(PropOptions);
519
+ }
520
+ if (type == "GA4" || type == "BOTH") {
521
+ //web_measurement_dropdown
522
+ var subscriptionMeasurementId = $("#subscriptionMeasurementId").val();
523
+ var MeasOptions = '<option value="">Select Measurement Id</option>';
524
+ $.each(response.data.wep_measurement, function (measKey, measValue) {
525
+ if (subscriptionMeasurementId == measValue.measurementId) {
526
+ var selected = "selected='selected'";
527
+ } else {
528
+ var selected = "";
529
+ }
530
+ var web_property = measValue.name.split("/");
531
+ MeasOptions = MeasOptions + '<option value="' + measValue.measurementId + '" ' + selected + ' data-name="'+web_property[1] +'"'+ ' data-accountid="' + measValue.accountId + '"> ' + measValue.accountName + ' - ' + web_property[1] + ' - ' + measValue.measurementId + '</option>';
532
+ });
533
+ $('#ga4_web_measurement_id').html(MeasOptions);
534
+ $('#both_web_measurement_id').html(MeasOptions);
535
+ }
536
+ $(".slect2bx").select2();
537
+ }
538
+ is_validate_step("step_1");
539
+ loaderSection(false);
540
+ }
541
+ });
542
+ }
543
+ function call_list_googl_ads_account(tvc_data){
544
+ let ads_account_length = $('#ads-account option').length;
545
+ if(ads_account_length < 2){
546
+ list_googl_ads_account(tvc_data);
547
+ }
548
+ }
549
+ // get list google ads dropdown options
550
+ function list_googl_ads_account(tvc_data) {
551
+ //loaderSection(true);
552
+ var selectedValue = $("#subscriptionGoogleAdsId").val();
553
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
554
+ $.ajax({
555
+ type: "POST",
556
+ dataType: "json",
557
+ url: tvc_ajax_url,
558
+ data: {action: "list_googl_ads_account", tvc_data:tvc_data, conversios_onboarding_nonce:conversios_onboarding_nonce},
559
+ success: function (response) {
560
+ if (response.error === false) {
561
+ $('#ads-account').empty();
562
+ $('#ads-account').append($('<option>', {
563
+ value: "",
564
+ text: "Select Google Ads Account"
565
+ }));
566
+ if (response.data.length == 0) {
567
+ add_message("warning","There are no Google ads accounts associated with email.");
568
+ } else {
569
+ $.each(response.data, function (key, value) {
570
+
571
+ if (selectedValue == value) {
572
+ $('#ads-account').append($('<option>', { value: value, text: value,selected: "selected"}));
573
+ } else {
574
+ if(selectedValue == "" && key == 0){
575
+ $('#ads-account').append($('<option>', { value: value, text: value,selected: "selected"}));
576
+ }else{
577
+ $('#ads-account').append($('<option>', { value: value, text: value,}));
578
+ }
579
+ }
580
+ });
581
+ }
582
+ } else {
583
+ add_message("warning","There are no Google ads accounts associated with email.");
584
+ }
585
+ //loaderSection(false);
586
+ }
587
+ });
588
+ }
589
+
590
+ function call_list_google_merchant_account(tvc_data){
591
+ let mcc_account_length = $('#google_merchant_center_id option').length;
592
+ if(mcc_account_length < 2){
593
+ list_google_merchant_account(tvc_data);
594
+ }
595
+ }
596
+ function list_google_merchant_account(tvc_data){
597
+ var selectedValue = $("#subscriptionMerchantCenId").val();
598
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
599
+ $.ajax({
600
+ type: "POST",
601
+ dataType: "json",
602
+ url: tvc_ajax_url,
603
+ data: {action: "list_google_merchant_account", tvc_data:tvc_data, conversios_onboarding_nonce:conversios_onboarding_nonce},
604
+ success: function (response) {
605
+ if (response.error === false){
606
+ $('#google_merchant_center_id').empty();
607
+ $('#google_merchant_center_id').append($('<option>', {value: "", text: "Select Measurement Id"}));
608
+ if (response.data.length > 0) {
609
+ $.each(response.data, function (key, value) {
610
+ if(selectedValue == value.account_id){
611
+ $('#google_merchant_center_id').append($('<option>', {value: value.account_id, "data-merchant_id": value.merchant_id, text: value.account_id,selected: "selected"}));
612
+ }else{
613
+ if(selectedValue == "" && key == 0){
614
+ $('#google_merchant_center_id').append($('<option>', {value: value.account_id, "data-merchant_id": value.merchant_id, text: value.account_id,selected: "selected"}));
615
+ }else{
616
+ $('#google_merchant_center_id').append($('<option>', {value: value.account_id,"data-merchant_id": value.merchant_id, text: value.account_id, }));
617
+ }
618
+ }
619
+ });
620
+ }else{
621
+ add_message("error","There are no Google merchant center accounts associated with email.");
622
+ }
623
+ }else{
624
+ add_message("error","There are no Google merchant center accounts associated with email.");
625
+ }
626
+ }
627
+ });
628
+ loaderSection(false);
629
+ }
630
+ /* Create function */
631
+ function create_google_ads_account(tvc_data){
632
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
633
+ $.ajax({
634
+ type: "POST",
635
+ dataType: "json",
636
+ url: tvc_ajax_url,
637
+ data: {action: "create_google_ads_account", tvc_data:tvc_data, conversios_onboarding_nonce:conversios_onboarding_nonce},
638
+ beforeSend: function () {
639
+ loaderSection(true);
640
+ },
641
+ success: function (response) {
642
+ if (response.error === false) {
643
+ add_message("success",response.data.message);
644
+ $("#new_google_ads_id").text(response.data.adwords_id);
645
+ $("#tvc_ads_section").slideUp();
646
+ $("#new_google_ads_section").slideDown();
647
+ //localStorage.setItem("new_google_ads_id", response.data.adwords_id);
648
+ //listGoogleAdsAccount();
649
+ } else {
650
+ add_message("error",response.data.message);
651
+ }
652
+ loaderSection(false);
653
+ }
654
+ });
655
+ }
656
+
657
+ function create_google_merchant_center_account(tvc_data){
658
+ var conversios_onboarding_nonce = $("#conversios_onboarding_nonce").val();
659
+ var is_valide = true;
660
+ var website_url = $("#url").val();
661
+ var email_address = $("#get-mail").val();
662
+ var store_name = $("#store_name").val();
663
+ var country = $("#selectCountry").val();
664
+ var customer_id = $("#loginCustomerId").val();
665
+ var adult_content = $("#adult_content").is(':checked');
666
+ if(website_url == ""){
667
+ add_message("error","Missing value of website url.");
668
+ is_valide = false;
669
+ }else if(email_address == ""){
670
+ add_message("error","Missing value of email address.");
671
+ is_valide = false;
672
+ }else if(store_name == ""){
673
+ add_message("error","Missing value of store name.");
674
+ is_valide = false;
675
+ }else if(country == ""){
676
+ add_message("error","Missing value of country.");
677
+ is_valide = false;
678
+ } else if($('#terms_conditions').prop('checked') == false){
679
+ add_message("error","Please I accept the terms and conditions.");
680
+ is_valide = false;
681
+ }
682
+ if(is_valide == true){
683
+ var data = {
684
+ action: "create_google_merchant_center_account",
685
+ website_url: website_url,
686
+ email_address: email_address,
687
+ store_name: store_name,
688
+ country: country,
689
+ concent: 1,
690
+ customer_id: customer_id,
691
+ adult_content:adult_content,
692
+ tvc_data:tvc_data,
693
+ conversios_onboarding_nonce:conversios_onboarding_nonce
694
+ };
695
+ $.ajax({
696
+ type: "POST",
697
+ dataType: "json",
698
+ url: tvc_ajax_url,
699
+ data: data,
700
+ beforeSend: function () {
701
+ loaderSection(true);
702
+ },
703
+ success: function (response, status) {
704
+ if (response.error === false || response.merchant_id != undefined) {
705
+ add_message("success","New merchant center created successfully.");
706
+ $("#new_merchant_id").text(response.account.id);
707
+ $("#tvc_merchant_section").slideUp();
708
+ $("#new_merchant_section").slideDown();
709
+ } else if (response.error === true) {
710
+ const errors = JSON.parse(response.errors[0]);
711
+ add_message("error",errors.message);
712
+ } else {
713
+ add_message("error","There was error to create merchant center account");
714
+ }
715
+ $("#createmerchantpopup").removeClass('showpopup');
716
+ $('body').removeClass('scrlnone');
717
+ //$("#merchantconfirmModal").modal('hide');
718
+ loaderSection(false);
719
+ }
720
+ });
721
+
722
+ }
723
+ }
admin/js/select2.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+ !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(t){var e,n,s,p,r,o,h,f,g,m,y,v,i,a,_,s=(t&&t.fn&&t.fn.select2&&t.fn.select2.amd&&(u=t.fn.select2.amd),u&&u.requirejs||(u?n=u:u={},g={},m={},y={},v={},i=Object.prototype.hasOwnProperty,a=[].slice,_=/\.js$/,h=function(e,t){var n,s,i=c(e),r=i[0],t=t[1];return e=i[1],r&&(n=x(r=l(r,t))),r?e=n&&n.normalize?n.normalize(e,(s=t,function(e){return l(e,s)})):l(e,t):(r=(i=c(e=l(e,t)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},f={require:function(e){return w(e)},exports:function(e){var t=g[e];return void 0!==t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},r=function(e,t,n,s){var i,r,o,a,l,c=[],u=typeof n,d=A(s=s||e);if("undefined"==u||"function"==u){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(r=(o=h(t[a],d)).f))c[a]=f.require(e);else if("exports"===r)c[a]=f.exports(e),l=!0;else if("module"===r)i=c[a]=f.module(e);else if(b(g,r)||b(m,r)||b(v,r))c[a]=x(r);else{if(!o.p)throw new Error(e+" missing "+r);o.p.load(o.n,w(s,!0),function(t){return function(e){g[t]=e}}(r),{}),c[a]=g[r]}u=n?n.apply(g[e],c):void 0,e&&(i&&i.exports!==p&&i.exports!==g[e]?g[e]=i.exports:u===p&&l||(g[e]=u))}else e&&(g[e]=n)},e=n=o=function(e,t,n,s,i){if("string"==typeof e)return f[e]?f[e](t):x(h(e,A(t)).f);if(!e.splice){if((y=e).deps&&o(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=s,s=i),s?r(p,e,t,n):setTimeout(function(){r(p,e,t,n)},4),o},o.config=function(e){return o(e)},e._defined=g,(s=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(g,e)||b(m,e)||(m[e]=[e,t,n])}).amd={jQuery:!0},u.requirejs=e,u.require=n,u.define=s),u.define("almond",function(){}),u.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),u.define("select2/utils",["jquery"],function(r){var s={};function c(e){var t,n=e.prototype,s=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&s.push(t);return s}s.Extend=function(e,t){var n,s={}.hasOwnProperty;function i(){this.constructor=e}for(n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},s.Decorate=function(s,i){var e=c(i),t=c(s);function r(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=s.prototype.constructor;0<t&&(e.call(arguments,s.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=s.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var o=t[n];r.prototype[o]=s.prototype[o]}for(var a=0;a<e.length;a++){var l=e[a];r.prototype[l]=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return r};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,s=e.length;n<s;n++)e[n].apply(this,t)},s.Observable=e,s.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},s.bind=function(e,t){return function(){e.apply(t,arguments)}},s._convertData=function(e){for(var t in e){var n=t.split("-"),s=e;if(1!==n.length){for(var i=0;i<n.length;i++){var r=n[i];(r=r.substring(0,1).toLowerCase()+r.substring(1))in s||(s[r]={}),i==n.length-1&&(s[r]=e[t]),s=s[r]}delete e[t]}}return e},s.hasScroll=function(e,t){var n=r(t),s=t.style.overflowX,i=t.style.overflowY;return(s!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===s||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},s.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},s.__cache={};var n=0;return s.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null!=t||(t=e.id?"select2-data-"+e.id:"select2-data-"+(++n).toString()+"-"+s.generateChars(4),e.setAttribute("data-select2-id",t)),t},s.StoreData=function(e,t,n){e=s.GetUniqueElementId(e);s.__cache[e]||(s.__cache[e]={}),s.__cache[e][t]=n},s.GetData=function(e,t){var n=s.GetUniqueElementId(e);return t?s.__cache[n]&&null!=s.__cache[n][t]?s.__cache[n][t]:r(e).data(t):s.__cache[n]},s.RemoveData=function(e){var t=s.GetUniqueElementId(e);null!=s.__cache[t]&&delete s.__cache[t],e.removeAttribute("data-select2-id")},s.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0===e.indexOf("select2-")}),t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0!==e.indexOf("select2-")}),t=n.concat(t);e.setAttribute("class",t.join(" "))},s}),u.define("select2/results",["jquery","./utils"],function(d,p){function s(e,t,n){this.$element=e,this.data=n,this.options=t,s.__super__.constructor.call(this)}return p.Extend(s,p.Observable),s.prototype.render=function(){var e=d('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),s=this.options.get("translations").get(e.message);n.append(t(s(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var s=e.results[n],s=this.option(s);t.push(s)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},s.prototype.position=function(e,t){t.find(".select2-results").append(e)},s.prototype.sort=function(e){return this.options.get("sorter")(e)},s.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");(0<t.length?t:e).first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var t=this;this.data.current(function(e){var s=e.map(function(e){return e.id.toString()});t.$results.find(".select2-results__option--selectable").each(function(){var e=d(this),t=p.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<s.indexOf(n)?(this.classList.add("select2-results__option--selected"),e.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),e.attr("aria-selected","false"))})})},s.prototype.showLoading=function(e){this.hideLoading();e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},e=this.option(e);e.className+=" loading-results",this.$results.prepend(e)},s.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},s.prototype.option=function(e){var t=document.createElement("li");t.classList.add("select2-results__option"),t.classList.add("select2-results__option--selectable");var n,s={role:"option"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(n in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(s["aria-disabled"]="true",t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--disabled")),null==e.id&&t.classList.remove("select2-results__option--selectable"),null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(s.role="group",s["aria-label"]=e.text,t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--group")),s){var r=s[n];t.setAttribute(n,r)}if(e.children){var o=d(t),a=document.createElement("strong");a.className="select2-results__group",this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],u=this.option(u);l.push(u)}i=d("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});i.append(l),o.append(a),o.append(i)}else this.template(e,t);return p.StoreData(t,"data",e),t},s.prototype.bind=function(t,e){var i=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=i.getHighlightedResults();0!==t.length&&(e=p.GetData(t[0],"data"),t.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t);s<=0||(e=s-1,0===t.length&&(e=0),(s=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=s.offset().top,s=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(s))}),t.on("results:next",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t)+1;s>=n.length||((e=n.eq(s)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===s?i.$results.scrollTop(0):t<n&&i.$results.scrollTop(e))}),t.on("results:focus",function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")}),t.on("results:message",function(e){i.displayMessage(e)}),d.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=i.$results.height();t?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option--selectable",function(e){var t=d(this),n=p.GetData(this,"data");t.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:e,data:n}):i.trigger("close",{}):i.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option--selectable",function(e){var t=p.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:t,element:d(this)})})},s.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},s.prototype.destroy=function(){this.$results.remove()},s.prototype.ensureHighlightVisible=function(){var e,t,n,s,i=this.getHighlightedResults();0!==i.length&&(e=this.$results.find(".select2-results__option--selectable").index(i),s=this.$results.offset().top,t=i.offset().top,n=this.$results.scrollTop()+(t-s),s=t-s,n-=2*i.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(n))},s.prototype.template=function(e,t){var n=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=s(e):d(t).append(e)},s}),u.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),u.define("select2/selection/base",["jquery","../utils","../keys"],function(n,s,i){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return s.Extend(r,s.Observable),r.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=s.GetData(this.$element[0],"old-tabindex")?this._tabindex=s.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},r.prototype.bind=function(e,t){var n=this,s=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",s),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},r.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&s.GetData(this,"element").select2("close")})})},r.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},r.prototype.position=function(e,t){t.find(".selection").append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),u.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,s){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("aria-controls",s),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i}),u.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,c){function r(e,t){r.__super__.constructor.apply(this,arguments)}return c.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var s=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){var t;n.isDisabled()||(t=i(this).parent(),t=c.GetData(t[0],"data"),n.trigger("unselect",{originalEvent:e,data:t}))}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){n.isDisabled()||e.stopPropagation()})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",s=0;s<e.length;s++){var i=e[s],r=this.selectionContainer(),o=this.display(i,r),a=n+c.generateChars(4)+"-";i.id?a+=i.id:a+=c.generateChars(4),r.find(".select2-selection__choice__display").append(o).attr("id",a);var l=i.title||i.text;l&&r.attr("title",l);o=this.options.get("translations").get("removeItem"),l=r.find(".select2-selection__choice__remove");l.attr("title",o()),l.attr("aria-label",o()),l.attr("aria-describedby",a),c.StoreData(r[0],"data",i),t.push(r)}this.$selection.find(".select2-selection__rendered").append(t)}},r}),u.define("select2/selection/placeholder",[],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");t=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",t),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(t)},e}),u.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,s,a){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){s._handleClear(e)}),t.on("keypress",function(e){s._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var s=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var r={data:s};if(this.trigger("clear",r),r.prevented)this.$element.val(i);else{for(var o=0;o<s.length;o++)if(r={data:s[o]},this.trigger("unselect",r),r.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=s.DELETE&&t.which!=s.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){var n,s;e.call(this,t),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),0<this.$selection.find(".select2-selection__placeholder").length||0===t.length||(n=this.$selection.find(".select2-selection__rendered").attr("id"),s=this.options.get("translations").get("removeAllItems"),(e=i('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>')).attr("title",s()),e.attr("aria-label",s()),e.attr("aria-describedby",n),a.StoreData(e[0],"data",t),this.$selection.prepend(e),this.$selection[0].classList.add("select2-selection--clearable"))},e}),u.define("select2/selection/search",["jquery","../utils","../keys"],function(s,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=this.options.get("translations").get("search"),n=s('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=n,this.$search=n.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",t());e=e.call(this);return this._transferTabIndex(),e.append(this.$searchContainer),e},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results",r=t.id+"-container";e.call(this,t,n),s.$search.attr("aria-describedby",r),t.on("open",function(){s.$search.attr("aria-controls",i),s.$search.trigger("focus")}),t.on("close",function(){s.$search.val(""),s.resizeSearch(),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")}),t.on("enable",function(){s.$search.prop("disabled",!1),s._transferTabIndex()}),t.on("disable",function(){s.$search.prop("disabled",!0)}),t.on("focus",function(e){s.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){s.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){s._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){var t;e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which!==l.BACKSPACE||""!==s.$search.val()||0<(t=s.$selection.find(".select2-selection__choice").last()).length&&(t=a.GetData(t[0],"data"),s.searchRemoveChoice(t),e.preventDefault())}),this.$selection.on("click",".select2-search--inline",function(e){s.$search.val()&&e.stopPropagation()});var t=document.documentMode,o=t&&t<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o?s.$selection.off("input.search input.searchcheck"):s.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){var t;o&&"input"===e.type?s.$selection.off("input.search input.searchcheck"):(t=e.which)!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&s.handleSearch(e)})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},e}),u.define("select2/selection/selectionCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("selectionCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var s=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],r=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==i.indexOf(e)&&(t=t||{},n=o.Event("select2:"+e,{params:t}),s.$element.trigger(n),-1!==r.indexOf(e)&&(t.prevented=n.isDefaultPrevented()))})},e}),u.define("select2/translation",["jquery","require"],function(t,n){function s(e){this.dict=e||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(e){return this.dict[e]},s.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},s._cache={},s.loadPath=function(e){var t;return e in s._cache||(t=n(e),s._cache[e]=t),new s(s._cache[e])},s}),u.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),u.define("select2/data/base",["../utils"],function(n){function s(e,t){s.__super__.constructor.call(this)}return n.Extend(s,n.Observable),s.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},s.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},s.prototype.bind=function(e,t){},s.prototype.destroy=function(){},s.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},s}),u.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(l(e))}))},n.prototype.select=function(i){var e,r=this;if(i.selected=!0,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var s=i[n].id;-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")}):(e=i.id,this.$element.val(e),this.$element.trigger("input").trigger("change"))},n.prototype.unselect=function(i){var r=this;if(this.$element.prop("multiple")){if(i.selected=!1,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var s=e[n].id;s!==i.id&&-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(t,e){var n=[],s=this;this.$element.children().each(function(){var e;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(e=l(this),e=s.item(e),null!==(e=s.matches(t,e))&&n.push(e))}),e({results:n})},n.prototype.addOptions=function(e){this.$element.append(e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);e=this._normalizeItem(e);return e.element=t,a.StoreData(t,"data",e),l(t)},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;var n=e[0];if("option"===n.tagName.toLowerCase())t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===n.tagName.toLowerCase()){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var s=e.children("option"),i=[],r=0;r<s.length;r++){var o=l(s[r]),o=this.item(o);i.push(o)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),u.define("select2/data/array",["./select","../utils","jquery"],function(e,t,c){function s(e,t){this._dataToConvert=t.get("data")||[],s.__super__.constructor.call(this,e,t)}return t.Extend(s,e),s.prototype.bind=function(e,t){s.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},s.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),s.__super__.select.call(this,n)},s.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),s=n.map(function(){return t.item(c(this)).id}).get(),i=[];for(var r=0;r<e.length;r++){var o,a,l=this._normalizeItem(e[r]);0<=s.indexOf(l.id)?(o=n.filter(function(e){return function(){return c(this).val()==e.id}}(l)),a=this.item(o),a=c.extend(!0,{},l,a),a=this.option(a),o.replaceWith(a)):(a=this.option(l),l.children&&(l=this.convertToOptions(l.children),a.append(l)),i.push(a))}return i},s}),u.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,r){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return r.extend({},e,{q:e.term})},transport:function(e,t,n){e=r.ajax(e);return e.then(t),e.fail(n),e}};return r.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(t,n){var s=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=r.extend({type:"GET"},this.ajaxOptions);function e(){var e=i.transport(i,function(e){e=s.processResults(e,t);s.options.get("debug")&&window.console&&console.error&&(e&&e.results&&Array.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){"status"in e&&(0===e.status||"0"===e.status)||s.trigger("results:message",{message:"errorLoading"})});s._request=e}"function"==typeof i.url&&(i.url=i.url.call(this.$element,t)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),u.define("select2/data/tags",["jquery"],function(t){function e(e,t,n){var s=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);i=n.get("insertTag");if(void 0!==i&&(this.insertTag=i),e.call(this,t,n),Array.isArray(s))for(var r=0;r<s.length;r++){var o=s[r],o=this._normalizeItem(o),o=this.option(o);this.$element.append(o)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var s=t.results,i=0;i<s.length;i++){var r=s[i],o=null!=r.children&&!e({results:r.children},!0);if((r.text||"").toUpperCase()===(c.term||"").toUpperCase()||o)return!n&&(t.data=s,void u(t))}if(n)return!0;var a,l=d.createTag(c);null!=l&&((a=d.option(l)).attr("data-select2-tag","true"),d.addOptions([a]),d.insertTag(s,l)),t.results=s,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){if(null==t.term)return null;t=t.term.trim();return""===t?null:{id:t,text:t}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),u.define("select2/data/tokenizer",["jquery"],function(c){function e(e,t,n){var s=n.get("tokenizer");void 0!==s&&(this.tokenizer=s),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var s=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=s._normalizeItem(e);s.$element.find("option").filter(function(){return c(this).val()===n.id}).length||((t=s.option(n)).attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([t])),t=n,s.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,s){for(var i=n.get("tokenSeparators")||[],r=t.term,o=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};o<r.length;){var l=r[o];-1!==i.indexOf(l)?(l=r.substr(0,o),null!=(l=a(c.extend({},t,{term:l})))?(s(l),r=r.substr(o+1)||"",o=0):o++):o++}return{term:r}},e}),u.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(){s._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var s=this;this._checkIfMaximumSelected(function(){e.call(s,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){e=null!=e?e.length:0;0<n.maximumSelectionLength&&e>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()})},e}),u.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),u.define("select2/dropdown/search",["jquery"],function(r){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("translations").get("search"),e=r('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t.prepend(e),t},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){s.handleSearch(e)}),t.on("open",function(){s.$search.attr("tabindex",0),s.$search.attr("aria-controls",i),s.$search.trigger("focus"),window.setTimeout(function(){s.$search.trigger("focus")},0)}),t.on("close",function(){s.$search.attr("tabindex",-1),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.val(""),s.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||s.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(s.showSearch(e)?s.$searchContainer[0].classList.remove("select2-search--hide"):s.$searchContainer[0].classList.add("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")})},e.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},e.prototype.showSearch=function(e,t){return!0},e}),u.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,s){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,s)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),s=t.length-1;0<=s;s--){var i=t[s];this.placeholder.id===i.id&&n.splice(s,1)}return n},e}),u.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,s){this.lastParams={},e.call(this,t,n,s),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("query",function(e){s.lastParams=e,s.loading=!0}),t.on("query:append",function(e){s.lastParams=e,s.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&(e=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=e+50&&this.loadMore())},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),u.define("select2/dropdown/attachBody",["jquery","../utils"],function(u,o){function e(e,t,n){this.$dropdownParent=u(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("open",function(){s._showDropdown(),s._attachPositioningHandler(t),s._bindContainerResultHandlers(t)}),t.on("close",function(){s._hideDropdown(),s._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u("<span></span>"),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0)},e.prototype._attachPositioningHandler=function(e,t){var n=this,s="scroll.select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id,t=this.$container.parents().filter(o.hasScroll);t.each(function(){o.StoreData(this,"select2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(s,function(e){var t=o.GetData(this,"select2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(s+" "+i+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,s="resize.select2."+t.id,t="orientationchange.select2."+t.id;this.$container.parents().filter(o.hasScroll).off(n),u(window).off(n+" "+s+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),s=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=i.top,r.bottom=i.top+r.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-o,e=l>i.bottom+o,a={left:i.left,top:r.bottom},l=this.$dropdownParent;"static"===l.css("position")&&(l=l.offsetParent());i={top:0,left:0};(u.contains(document.body,l[0])||l[0].isConnected)&&(i=l.offset()),a.top-=i.top,a.left-=i.left,t||n||(s="below"),e||!c||t?!c&&e&&t&&(s="below"):s="above",("above"==s||t&&"below"!==s)&&(a.top=r.top-i.top-o),null!=s&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+s),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+s)),this.$dropdownContainer.css(a)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),u.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,s){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,s)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,s=0;s<t.length;s++){var i=t[s];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),u.define("select2/dropdown/selectOnClose",["../utils"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("close",function(e){s._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}n=this.getHighlightedResults();n.length<1||(null!=(n=s.GetData(n[0],"data")).element&&n.element.selected||null==n.element&&n.selected||this.trigger("select",{data:n}))},e}),u.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(e){s._selectTriggered(e)}),t.on("unselect",function(e){s._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),u.define("select2/dropdown/dropdownCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("dropdownCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(s){function e(){}return e.prototype.highlightFirstItem=function(e){var t=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(0<t.length){var n=t.first(),t=s.GetData(n[0],"data").element;if(t&&t.getAttribute&&"true"===t.getAttribute("data-select2-tag"))return void n.trigger("mouseenter")}e.call(this)},e}),u.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),u.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function(l,r,o,a,c,u,d,p,h,f,g,t,m,y,v,_,b,$,w,x,A,D,S,E,O,C,L,T,q,I,e){function n(){this.reset()}return n.prototype.apply=function(e){var t;null==(e=l.extend(!0,{},this.defaults,e)).dataAdapter&&(null!=e.ajax?e.dataAdapter=v:null!=e.data?e.dataAdapter=y:e.dataAdapter=m,0<e.minimumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,$)),0<e.maximumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,w)),0<e.maximumSelectionLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,x)),e.tags&&(e.dataAdapter=f.Decorate(e.dataAdapter,_)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=f.Decorate(e.dataAdapter,b))),null==e.resultsAdapter&&(e.resultsAdapter=r,null!=e.ajax&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,E)),null!=e.placeholder&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,S)),e.selectOnClose&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,L)),e.tags&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter&&(e.multiple?e.dropdownAdapter=A:(t=f.Decorate(A,D),e.dropdownAdapter=t),0!==e.minimumResultsForSearch&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,C)),e.closeOnSelect&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,T)),null!=e.dropdownCssClass&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,q)),e.dropdownAdapter=f.Decorate(e.dropdownAdapter,O)),null==e.selectionAdapter&&(e.multiple?e.selectionAdapter=a:e.selectionAdapter=o,null!=e.placeholder&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,c)),e.allowClear&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,u)),e.multiple&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,d)),null!=e.selectionCssClass&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,p)),e.selectionAdapter=f.Decorate(e.selectionAdapter,h)),e.language=this._resolveLanguage(e.language),e.language.push("en");for(var n=[],s=0;s<e.language.length;s++){var i=e.language[s];-1===n.indexOf(i)&&n.push(i)}return e.language=n,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:f.escapeMarkup,language:{},matcher:function e(t,n){if(null==t.term||""===t.term.trim())return n;if(n.children&&0<n.children.length){for(var s=l.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&s.children.splice(i,1);return 0<s.children.length?s:e(t,s)}var r=a(n.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<r.indexOf(o)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,s=this.defaults.language,i=t.prop("lang"),t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(s),this._resolveLanguage(t));return e.language=t,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(l.isEmptyObject(e))return[];if(l.isPlainObject(e))return[e];for(var t,n=Array.isArray(e)?e:[e],s=[],i=0;i<n.length;i++)s.push(n[i]),"string"==typeof n[i]&&0<n[i].indexOf("-")&&(t=n[i].split("-")[0],s.push(t));return s},n.prototype._processTranslations=function(e,t){for(var n=new g,s=0;s<e.length;s++){var i=new g,r=e[s];if("string"==typeof r)try{i=g.loadPath(r)}catch(e){try{r=this.defaults.amdLanguageBase+r,i=g.loadPath(r)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+r+'" could not be automatically loaded. A fallback will be used instead.')}}else i=l.isPlainObject(r)?new g(r):r;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[l.camelCase(e)]=t;n=f._convertData(n);l.extend(!0,this.defaults,n)},new n}),u.define("select2/options",["jquery","./defaults","./utils"],function(c,n,u){function e(e,t){this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=n.applyFromElement(this.options,t)),this.options=n.apply(this.options)}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),u.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),u.StoreData(e[0],"data",u.GetData(e[0],"select2Tags")),u.StoreData(e[0],"tags",!0)),u.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",u.GetData(e[0],"ajaxUrl")),u.StoreData(e[0],"ajax-Url",u.GetData(e[0],"ajaxUrl")));var n={};function s(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var r=e[0].attributes[i].name,o="data-";r.substr(0,o.length)==o&&(r=r.substring(o.length),o=u.GetData(e[0],r),n[r.replace(/-([a-z])/g,s)]=o)}c.fn.jquery&&"1."==c.fn.jquery.substr(0,2)&&e[0].dataset&&(n=c.extend(!0,{},e[0].dataset,n));var a,l=c.extend(!0,{},u.GetData(e[0]),n);for(a in l=u._convertData(l))-1<t.indexOf(a)||(c.isPlainObject(this.options[a])?c.extend(this.options[a],l[a]):this.options[a]=l[a]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),u.define("select2/core",["jquery","./options","./utils","./keys"],function(t,i,r,s){var o=function(e,t){null!=r.GetData(e[0],"select2")&&r.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new i(t,e),o.__super__.constructor.call(this);var n=e.attr("tabindex")||0;r.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");t=this.options.get("dataAdapter");this.dataAdapter=new t(e,this.options);n=this.render();this._placeContainer(n);t=this.options.get("selectionAdapter");this.selection=new t(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,n);t=this.options.get("dropdownAdapter");this.dropdown=new t(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,n);n=this.options.get("resultsAdapter");this.results=new n(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var s=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){s.trigger("selection:update",{data:e})}),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),r.StoreData(e[0],"select2",this),e.data("select2",this)};return r.Extend(o,r.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+r.generateChars(2):r.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var s=this._resolveWidth(e,"style");return null!=s?s:this._resolveWidth(e,"element")}if("element"==t){s=e.outerWidth(!1);return s<=0?"auto":s+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;e=e.attr("style");if("string"!=typeof e)return null;for(var i=e.split(";"),r=0,o=i.length;r<o;r+=1){var a=i[r].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=r.bind(this._syncAttributes,this),this._syncS=r.bind(this._syncSubtree,this),this._observer=new window.MutationObserver(function(e){t._syncA(),t._syncS(e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},o.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerSelectionEvents=function(){var n=this,s=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===s.indexOf(e)&&n.trigger(e,t)})},o.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container[0].classList.add("select2-container--open")}),this.on("close",function(){n.$container[0].classList.remove("select2-container--open")}),this.on("enable",function(){n.$container[0].classList.remove("select2-container--disabled")}),this.on("disable",function(){n.$container[0].classList.add("select2-container--disabled")}),this.on("blur",function(){n.$container[0].classList.remove("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===s.ESC||t===s.UP&&e.altKey?(n.close(e),e.preventDefault()):t===s.ENTER||t===s.TAB?(n.trigger("results:select",{}),e.preventDefault()):t===s.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===s.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===s.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===s.ENTER||t===s.SPACE||t===s.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;if(Array.isArray(e))return e.some(function(e){return t._isChangeMutation(e)})}return!1},o.prototype._syncSubtree=function(e){var e=this._isChangeMutation(e),t=this;e&&this.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,s={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in s){var i=s[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},o.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},o.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);e=!e[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0];Array.isArray(e)&&(e=e.map(function(e){return e.toString()})),this.$element.val(e).trigger("input").trigger("change")},o.prototype.destroy=function(){r.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",r.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),r.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),r.StoreData(e[0],"element",this.$element),e},o}),u.define("jquery-mousewheel",["jquery"],function(e){return e}),u.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,r,t,o){var a;return null==i.fn.select2&&(a=["open","close","destroy"],i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new r(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,s)}),-1<a.indexOf(t)?this:n}),null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),r}),{define:u.define,require:u.require});function b(e,t){return i.call(e,t)}function l(e,t){var n,s,i,r,o,a,l,c,u,d,p=t&&t.split("/"),h=y.map,f=h&&h["*"]||{};if(e){for(t=(e=e.split("/")).length-1,y.nodeIdCompat&&_.test(e[t])&&(e[t]=e[t].replace(_,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),c=0;c<e.length;c++)"."===(d=e[c])?(e.splice(c,1),--c):".."===d&&(0===c||1===c&&".."===e[2]||".."===e[c-1]||0<c&&(e.splice(c-1,2),c-=2));e=e.join("/")}if((p||f)&&h){for(c=(n=e.split("/")).length;0<c;--c){if(s=n.slice(0,c).join("/"),p)for(u=p.length;0<u;--u)if(i=h[p.slice(0,u).join("/")],i=i&&i[s]){r=i,o=c;break}if(r)break;!a&&f&&f[s]&&(a=f[s],l=c)}!r&&a&&(r=a,o=l),r&&(n.splice(0,o,r),e=n.join("/"))}return e}function w(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(p,e.concat([t,n]))}}function x(e){var t;if(b(m,e)&&(t=m[e],delete m[e],v[e]=!0,r.apply(p,t)),!b(g,e)&&!b(v,e))throw new Error("No "+e);return g[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function A(e){return e?c(e):[]}var u=s.require("jquery.select2");return t.fn.select2.amd=s,u});
admin/js/showmoreless.min.js ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******************************************
2
+ *
3
+ * ShowMoreLess v1.0 - jQuery
4
+ *
5
+ ******************************************/
6
+ (function ($) {
7
+ let pluginName = 'myOwnLineShowMoreLess';
8
+
9
+ let d = 0;
10
+
11
+ let initShowMoreLess=function(data){
12
+ let $that=$(this);
13
+ let $thatDisplayVal=$that.css("display");
14
+ let $thatFontSize=parseInt($that.css("font-size"),10);
15
+ if($thatDisplayVal!=="inline"){
16
+ $that.css({'display':'inline-block'});
17
+ }
18
+ let $span=$('<span>');
19
+ let jsElem=$that.get(0);
20
+ let compStyles = window.getComputedStyle(jsElem);
21
+ let $thatLineHeight=compStyles.getPropertyValue('line-height');
22
+
23
+ if($thatLineHeight=='normal'){
24
+ var nodeName = jsElem.nodeName;
25
+ var _node = document.createElement(nodeName);
26
+ _node.innerHTML = '&nbsp;';
27
+
28
+ let compStyles1 = window.getComputedStyle(jsElem);
29
+ let fontSizeStr=compStyles1.getPropertyValue('font-size');
30
+ _node.style.fontSize = fontSizeStr;
31
+
32
+ _node.style.padding = '0px';
33
+ _node.style.border = '0px';
34
+
35
+ var body = document.body;
36
+ body.appendChild(_node);
37
+
38
+ var height = _node.offsetHeight;
39
+ $thatLineHeight = height;
40
+
41
+ body.removeChild(_node);
42
+ }
43
+ let $thatLineHeightInPx=parseInt($thatLineHeight);
44
+ let restrictedLine=parseInt(data.settings.showLessLine);
45
+ console.log($thatLineHeightInPx,restrictedLine);
46
+
47
+ let currentState=(data.settings.lessAtInitial)?'less':'more';
48
+
49
+ if(data.settings.lessAtInitial){
50
+ $that.css({
51
+ 'max-height':($thatLineHeightInPx*restrictedLine)+'px',
52
+ 'overflow':'hidden',
53
+ 'position':'relative',
54
+ });
55
+ $span.html(data.settings.showMoreText);
56
+ $span.attr('class','show-more-less-handler');
57
+ $span.attr('style',' background: rgb(255,255,255);background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 17%, rgba(255,255,255,1) 100%); ');
58
+ $span.css({
59
+ 'position':'absolute',
60
+ 'right':'0',
61
+ 'bottom':'0',
62
+ 'padding-left': '22px',
63
+ 'display':'inline-block',
64
+ 'cursor':'pointer',
65
+ });
66
+ }
67
+ else{
68
+ $that.css({
69
+ 'position':'relative'
70
+ });
71
+ $span.html(data.settings.showLessText);
72
+ $span.attr('class','show-more-less-handler');
73
+ $span.attr('style',' background: rgb(255,255,255);background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 17%, rgba(255,255,255,1) 100%); ');
74
+ $span.css({
75
+ 'position':'static',
76
+ 'right':'0',
77
+ 'bottom':'0',
78
+ 'padding-left': '22px',
79
+ 'display':'inline-block',
80
+ 'cursor':'pointer'
81
+ });
82
+ }
83
+
84
+ $span.on('click',function(){
85
+ if (currentState=='less') {
86
+ currentState='more';
87
+ $that.css({
88
+ 'position':'relative',
89
+ 'overflow':'auto',
90
+ 'max-height':'none'
91
+ });
92
+ $span.html(data.settings.showLessText);
93
+ $span.attr('class','show-more-less-handler');
94
+ $span.attr('style',' background: rgb(255,255,255);background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 17%, rgba(255,255,255,1) 100%); ');
95
+ $span.css({
96
+ 'position':'static',
97
+ 'right':'0',
98
+ 'bottom':'0',
99
+ 'padding-left': '22px',
100
+ 'display':'inline-block',
101
+ 'cursor':'pointer'
102
+ });
103
+ if(data.settings.lessAtInitial && !data.settings.showLessAfterMore){
104
+ $span.remove();
105
+ }
106
+ }
107
+ else{
108
+ currentState='less';
109
+ $that.css({
110
+ 'max-height':($thatLineHeightInPx*restrictedLine)+'px',
111
+ 'overflow':'hidden',
112
+ 'position':'relative'
113
+ });
114
+ $span.html(data.settings.showMoreText);
115
+ $span.css({
116
+ 'position':'absolute',
117
+ 'right':'0',
118
+ 'bottom':'0',
119
+ 'padding-left': '22px',
120
+ 'display':'inline-block',
121
+ 'cursor':'pointer'
122
+ });
123
+ }
124
+
125
+ });
126
+ $that.append($span);
127
+ };
128
+
129
+ let methods =
130
+ {
131
+ init : function(options)
132
+ {
133
+ //"this" is a jquery object on which this plugin has been invoked.
134
+ return this.each(function(index)
135
+ {
136
+ let $this = $(this);
137
+ let data = $this.data(pluginName);
138
+ // If the plugin hasn't been initialized yet
139
+ if (!data)
140
+ {
141
+ let settings =
142
+ {
143
+ showLessLine:1,
144
+ showLessText:'Show Less',
145
+ showMoreText:'Show More',
146
+ lessAtInitial:true,
147
+ showLessAfterMore:true,
148
+ };
149
+
150
+ if(options)
151
+ {
152
+ $.extend(true, settings, options);
153
+ }
154
+
155
+ $this.data(pluginName,
156
+ {
157
+ target : $this,
158
+ settings: settings
159
+ });
160
+
161
+ var $this2 = $(this)
162
+ var data2 = $this.data(pluginName);
163
+
164
+ initShowMoreLess.call($this2, data2);
165
+ }
166
+ });
167
+ }
168
+ };
169
+
170
+ $.fn[pluginName] = function( method )
171
+ {
172
+ if ( methods[method] )
173
+ {
174
+ return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
175
+ } else if ( typeof method === 'object' || !method )
176
+ {
177
+ return methods.init.apply( this, arguments );
178
+ } else
179
+ {
180
+ $.error( 'Method ' + method + ' does not exist in jQuery.' + pluginName );
181
+ }
182
+ };
183
+ }(jQuery));
admin/js/slick.js ADDED
@@ -0,0 +1,3011 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ _ _ _ _
3
+ ___| (_) ___| | __ (_)___
4
+ / __| | |/ __| |/ / | / __|
5
+ \__ \ | | (__| < _ | \__ \
6
+ |___/_|_|\___|_|\_(_)/ |___/
7
+ |__/
8
+
9
+ Version: 1.8.0
10
+ Author: Ken Wheeler
11
+ Website: http://kenwheeler.github.io
12
+ Docs: http://kenwheeler.github.io/slick
13
+ Repo: http://github.com/kenwheeler/slick
14
+ Issues: http://github.com/kenwheeler/slick/issues
15
+
16
+ */
17
+ /* global window, document, define, jQuery, setInterval, clearInterval */
18
+ ;(function(factory) {
19
+ 'use strict';
20
+ if (typeof define === 'function' && define.amd) {
21
+ define(['jquery'], factory);
22
+ } else if (typeof exports !== 'undefined') {
23
+ module.exports = factory(require('jquery'));
24
+ } else {
25
+ factory(jQuery);
26
+ }
27
+
28
+ }(function($) {
29
+ 'use strict';
30
+ var Slick = window.Slick || {};
31
+
32
+ Slick = (function() {
33
+
34
+ var instanceUid = 0;
35
+
36
+ function Slick(element, settings) {
37
+
38
+ var _ = this, dataSettings;
39
+
40
+ _.defaults = {
41
+ accessibility: true,
42
+ adaptiveHeight: false,
43
+ appendArrows: $(element),
44
+ appendDots: $(element),
45
+ arrows: true,
46
+ asNavFor: null,
47
+ prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
48
+ nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
49
+ autoplay: false,
50
+ autoplaySpeed: 3000,
51
+ centerMode: false,
52
+ centerPadding: '50px',
53
+ cssEase: 'ease',
54
+ customPaging: function(slider, i) {
55
+ return $('<button type="button" />').text(i + 1);
56
+ },
57
+ dots: false,
58
+ dotsClass: 'slick-dots',
59
+ draggable: true,
60
+ easing: 'linear',
61
+ edgeFriction: 0.35,
62
+ fade: false,
63
+ focusOnSelect: false,
64
+ focusOnChange: false,
65
+ infinite: true,
66
+ initialSlide: 0,
67
+ lazyLoad: 'ondemand',
68
+ mobileFirst: false,
69
+ pauseOnHover: true,
70
+ pauseOnFocus: true,
71
+ pauseOnDotsHover: false,
72
+ respondTo: 'window',
73
+ responsive: null,
74
+ rows: 1,
75
+ rtl: false,
76
+ slide: '',
77
+ slidesPerRow: 1,
78
+ slidesToShow: 1,
79
+ slidesToScroll: 1,
80
+ speed: 500,
81
+ swipe: true,
82
+ swipeToSlide: false,
83
+ touchMove: true,
84
+ touchThreshold: 5,
85
+ useCSS: true,
86
+ useTransform: true,
87
+ variableWidth: false,
88
+ vertical: false,
89
+ verticalSwiping: false,
90
+ waitForAnimate: true,
91
+ zIndex: 1000
92
+ };
93
+
94
+ _.initials = {
95
+ animating: false,
96
+ dragging: false,
97
+ autoPlayTimer: null,
98
+ currentDirection: 0,
99
+ currentLeft: null,
100
+ currentSlide: 0,
101
+ direction: 1,
102
+ $dots: null,
103
+ listWidth: null,
104
+ listHeight: null,
105
+ loadIndex: 0,
106
+ $nextArrow: null,
107
+ $prevArrow: null,
108
+ scrolling: false,
109
+ slideCount: null,
110
+ slideWidth: null,
111
+ $slideTrack: null,
112
+ $slides: null,
113
+ sliding: false,
114
+ slideOffset: 0,
115
+ swipeLeft: null,
116
+ swiping: false,
117
+ $list: null,
118
+ touchObject: {},
119
+ transformsEnabled: false,
120
+ unslicked: false
121
+ };
122
+
123
+ $.extend(_, _.initials);
124
+
125
+ _.activeBreakpoint = null;
126
+ _.animType = null;
127
+ _.animProp = null;
128
+ _.breakpoints = [];
129
+ _.breakpointSettings = [];
130
+ _.cssTransitions = false;
131
+ _.focussed = false;
132
+ _.interrupted = false;
133
+ _.hidden = 'hidden';
134
+ _.paused = true;
135
+ _.positionProp = null;
136
+ _.respondTo = null;
137
+ _.rowCount = 1;
138
+ _.shouldClick = true;
139
+ _.$slider = $(element);
140
+ _.$slidesCache = null;
141
+ _.transformType = null;
142
+ _.transitionType = null;
143
+ _.visibilityChange = 'visibilitychange';
144
+ _.windowWidth = 0;
145
+ _.windowTimer = null;
146
+
147
+ dataSettings = $(element).data('slick') || {};
148
+
149
+ _.options = $.extend({}, _.defaults, settings, dataSettings);
150
+
151
+ _.currentSlide = _.options.initialSlide;
152
+
153
+ _.originalSettings = _.options;
154
+
155
+ if (typeof document.mozHidden !== 'undefined') {
156
+ _.hidden = 'mozHidden';
157
+ _.visibilityChange = 'mozvisibilitychange';
158
+ } else if (typeof document.webkitHidden !== 'undefined') {
159
+ _.hidden = 'webkitHidden';
160
+ _.visibilityChange = 'webkitvisibilitychange';
161
+ }
162
+
163
+ _.autoPlay = $.proxy(_.autoPlay, _);
164
+ _.autoPlayClear = $.proxy(_.autoPlayClear, _);
165
+ _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
166
+ _.changeSlide = $.proxy(_.changeSlide, _);
167
+ _.clickHandler = $.proxy(_.clickHandler, _);
168
+ _.selectHandler = $.proxy(_.selectHandler, _);
169
+ _.setPosition = $.proxy(_.setPosition, _);
170
+ _.swipeHandler = $.proxy(_.swipeHandler, _);
171
+ _.dragHandler = $.proxy(_.dragHandler, _);
172
+ _.keyHandler = $.proxy(_.keyHandler, _);
173
+
174
+ _.instanceUid = instanceUid++;
175
+
176
+ // A simple way to check for HTML strings
177
+ // Strict HTML recognition (must start with <)
178
+ // Extracted from jQuery v1.11 source
179
+ _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
180
+
181
+
182
+ _.registerBreakpoints();
183
+ _.init(true);
184
+
185
+ }
186
+
187
+ return Slick;
188
+
189
+ }());
190
+
191
+ Slick.prototype.activateADA = function() {
192
+ var _ = this;
193
+
194
+ _.$slideTrack.find('.slick-active').attr({
195
+ 'aria-hidden': 'false'
196
+ }).find('a, input, button, select').attr({
197
+ 'tabindex': '0'
198
+ });
199
+
200
+ };
201
+
202
+ Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
203
+
204
+ var _ = this;
205
+
206
+ if (typeof(index) === 'boolean') {
207
+ addBefore = index;
208
+ index = null;
209
+ } else if (index < 0 || (index >= _.slideCount)) {
210
+ return false;
211
+ }
212
+
213
+ _.unload();
214
+
215
+ if (typeof(index) === 'number') {
216
+ if (index === 0 && _.$slides.length === 0) {
217
+ $(markup).appendTo(_.$slideTrack);
218
+ } else if (addBefore) {
219
+ $(markup).insertBefore(_.$slides.eq(index));
220
+ } else {
221
+ $(markup).insertAfter(_.$slides.eq(index));
222
+ }
223
+ } else {
224
+ if (addBefore === true) {
225
+ $(markup).prependTo(_.$slideTrack);
226
+ } else {
227
+ $(markup).appendTo(_.$slideTrack);
228
+ }
229
+ }
230
+
231
+ _.$slides = _.$slideTrack.children(this.options.slide);
232
+
233
+ _.$slideTrack.children(this.options.slide).detach();
234
+
235
+ _.$slideTrack.append(_.$slides);
236
+
237
+ _.$slides.each(function(index, element) {
238
+ $(element).attr('data-slick-index', index);
239
+ });
240
+
241
+ _.$slidesCache = _.$slides;
242
+
243
+ _.reinit();
244
+
245
+ };
246
+
247
+ Slick.prototype.animateHeight = function() {
248
+ var _ = this;
249
+ if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
250
+ var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
251
+ _.$list.animate({
252
+ height: targetHeight
253
+ }, _.options.speed);
254
+ }
255
+ };
256
+
257
+ Slick.prototype.animateSlide = function(targetLeft, callback) {
258
+
259
+ var animProps = {},
260
+ _ = this;
261
+
262
+ _.animateHeight();
263
+
264
+ if (_.options.rtl === true && _.options.vertical === false) {
265
+ targetLeft = -targetLeft;
266
+ }
267
+ if (_.transformsEnabled === false) {
268
+ if (_.options.vertical === false) {
269
+ _.$slideTrack.animate({
270
+ left: targetLeft
271
+ }, _.options.speed, _.options.easing, callback);
272
+ } else {
273
+ _.$slideTrack.animate({
274
+ top: targetLeft
275
+ }, _.options.speed, _.options.easing, callback);
276
+ }
277
+
278
+ } else {
279
+
280
+ if (_.cssTransitions === false) {
281
+ if (_.options.rtl === true) {
282
+ _.currentLeft = -(_.currentLeft);
283
+ }
284
+ $({
285
+ animStart: _.currentLeft
286
+ }).animate({
287
+ animStart: targetLeft
288
+ }, {
289
+ duration: _.options.speed,
290
+ easing: _.options.easing,
291
+ step: function(now) {
292
+ now = Math.ceil(now);
293
+ if (_.options.vertical === false) {
294
+ animProps[_.animType] = 'translate(' +
295
+ now + 'px, 0px)';
296
+ _.$slideTrack.css(animProps);
297
+ } else {
298
+ animProps[_.animType] = 'translate(0px,' +
299
+ now + 'px)';
300
+ _.$slideTrack.css(animProps);
301
+ }
302
+ },
303
+ complete: function() {
304
+ if (callback) {
305
+ callback.call();
306
+ }
307
+ }
308
+ });
309
+
310
+ } else {
311
+
312
+ _.applyTransition();
313
+ targetLeft = Math.ceil(targetLeft);
314
+
315
+ if (_.options.vertical === false) {
316
+ animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
317
+ } else {
318
+ animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
319
+ }
320
+ _.$slideTrack.css(animProps);
321
+
322
+ if (callback) {
323
+ setTimeout(function() {
324
+
325
+ _.disableTransition();
326
+
327
+ callback.call();
328
+ }, _.options.speed);
329
+ }
330
+
331
+ }
332
+
333
+ }
334
+
335
+ };
336
+
337
+ Slick.prototype.getNavTarget = function() {
338
+
339
+ var _ = this,
340
+ asNavFor = _.options.asNavFor;
341
+
342
+ if ( asNavFor && asNavFor !== null ) {
343
+ asNavFor = $(asNavFor).not(_.$slider);
344
+ }
345
+
346
+ return asNavFor;
347
+
348
+ };
349
+
350
+ Slick.prototype.asNavFor = function(index) {
351
+
352
+ var _ = this,
353
+ asNavFor = _.getNavTarget();
354
+
355
+ if ( asNavFor !== null && typeof asNavFor === 'object' ) {
356
+ asNavFor.each(function() {
357
+ var target = $(this).slick('getSlick');
358
+ if(!target.unslicked) {
359
+ target.slideHandler(index, true);
360
+ }
361
+ });
362
+ }
363
+
364
+ };
365
+
366
+ Slick.prototype.applyTransition = function(slide) {
367
+
368
+ var _ = this,
369
+ transition = {};
370
+
371
+ if (_.options.fade === false) {
372
+ transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
373
+ } else {
374
+ transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
375
+ }
376
+
377
+ if (_.options.fade === false) {
378
+ _.$slideTrack.css(transition);
379
+ } else {
380
+ _.$slides.eq(slide).css(transition);
381
+ }
382
+
383
+ };
384
+
385
+ Slick.prototype.autoPlay = function() {
386
+
387
+ var _ = this;
388
+
389
+ _.autoPlayClear();
390
+
391
+ if ( _.slideCount > _.options.slidesToShow ) {
392
+ _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
393
+ }
394
+
395
+ };
396
+
397
+ Slick.prototype.autoPlayClear = function() {
398
+
399
+ var _ = this;
400
+
401
+ if (_.autoPlayTimer) {
402
+ clearInterval(_.autoPlayTimer);
403
+ }
404
+
405
+ };
406
+
407
+ Slick.prototype.autoPlayIterator = function() {
408
+
409
+ var _ = this,
410
+ slideTo = _.currentSlide + _.options.slidesToScroll;
411
+
412
+ if ( !_.paused && !_.interrupted && !_.focussed ) {
413
+
414
+ if ( _.options.infinite === false ) {
415
+
416
+ if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
417
+ _.direction = 0;
418
+ }
419
+
420
+ else if ( _.direction === 0 ) {
421
+
422
+ slideTo = _.currentSlide - _.options.slidesToScroll;
423
+
424
+ if ( _.currentSlide - 1 === 0 ) {
425
+ _.direction = 1;
426
+ }
427
+
428
+ }
429
+
430
+ }
431
+
432
+ _.slideHandler( slideTo );
433
+
434
+ }
435
+
436
+ };
437
+
438
+ Slick.prototype.buildArrows = function() {
439
+
440
+ var _ = this;
441
+
442
+ if (_.options.arrows === true ) {
443
+
444
+ _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
445
+ _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
446
+
447
+ if( _.slideCount > _.options.slidesToShow ) {
448
+
449
+ _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
450
+ _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
451
+
452
+ if (_.htmlExpr.test(_.options.prevArrow)) {
453
+ _.$prevArrow.prependTo(_.options.appendArrows);
454
+ }
455
+
456
+ if (_.htmlExpr.test(_.options.nextArrow)) {
457
+ _.$nextArrow.appendTo(_.options.appendArrows);
458
+ }
459
+
460
+ if (_.options.infinite !== true) {
461
+ _.$prevArrow
462
+ .addClass('slick-disabled')
463
+ .attr('aria-disabled', 'true');
464
+ }
465
+
466
+ } else {
467
+
468
+ _.$prevArrow.add( _.$nextArrow )
469
+
470
+ .addClass('slick-hidden')
471
+ .attr({
472
+ 'aria-disabled': 'true',
473
+ 'tabindex': '-1'
474
+ });
475
+
476
+ }
477
+
478
+ }
479
+
480
+ };
481
+
482
+ Slick.prototype.buildDots = function() {
483
+
484
+ var _ = this,
485
+ i, dot;
486
+
487
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
488
+
489
+ _.$slider.addClass('slick-dotted');
490
+
491
+ dot = $('<ul />').addClass(_.options.dotsClass);
492
+
493
+ for (i = 0; i <= _.getDotCount(); i += 1) {
494
+ dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
495
+ }
496
+
497
+ _.$dots = dot.appendTo(_.options.appendDots);
498
+
499
+ _.$dots.find('li').first().addClass('slick-active');
500
+
501
+ }
502
+
503
+ };
504
+
505
+ Slick.prototype.buildOut = function() {
506
+
507
+ var _ = this;
508
+
509
+ _.$slides =
510
+ _.$slider
511
+ .children( _.options.slide + ':not(.slick-cloned)')
512
+ .addClass('slick-slide');
513
+
514
+ _.slideCount = _.$slides.length;
515
+
516
+ _.$slides.each(function(index, element) {
517
+ $(element)
518
+ .attr('data-slick-index', index)
519
+ .data('originalStyling', $(element).attr('style') || '');
520
+ });
521
+
522
+ _.$slider.addClass('slick-slider');
523
+
524
+ _.$slideTrack = (_.slideCount === 0) ?
525
+ $('<div class="slick-track"/>').appendTo(_.$slider) :
526
+ _.$slides.wrapAll('<div class="slick-track"/>').parent();
527
+
528
+ _.$list = _.$slideTrack.wrap(
529
+ '<div class="slick-list"/>').parent();
530
+ _.$slideTrack.css('opacity', 0);
531
+
532
+ if (_.options.centerMode === true || _.options.swipeToSlide === true) {
533
+ _.options.slidesToScroll = 1;
534
+ }
535
+
536
+ $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
537
+
538
+ _.setupInfinite();
539
+
540
+ _.buildArrows();
541
+
542
+ _.buildDots();
543
+
544
+ _.updateDots();
545
+
546
+
547
+ _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
548
+
549
+ if (_.options.draggable === true) {
550
+ _.$list.addClass('draggable');
551
+ }
552
+
553
+ };
554
+
555
+ Slick.prototype.buildRows = function() {
556
+
557
+ var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
558
+
559
+ newSlides = document.createDocumentFragment();
560
+ originalSlides = _.$slider.children();
561
+
562
+ if(_.options.rows > 0) {
563
+
564
+ slidesPerSection = _.options.slidesPerRow * _.options.rows;
565
+ numOfSlides = Math.ceil(
566
+ originalSlides.length / slidesPerSection
567
+ );
568
+
569
+ for(a = 0; a < numOfSlides; a++){
570
+ var slide = document.createElement('div');
571
+ for(b = 0; b < _.options.rows; b++) {
572
+ var row = document.createElement('div');
573
+ for(c = 0; c < _.options.slidesPerRow; c++) {
574
+ var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
575
+ if (originalSlides.get(target)) {
576
+ row.appendChild(originalSlides.get(target));
577
+ }
578
+ }
579
+ slide.appendChild(row);
580
+ }
581
+ newSlides.appendChild(slide);
582
+ }
583
+
584
+ _.$slider.empty().append(newSlides);
585
+ _.$slider.children().children().children()
586
+ .css({
587
+ 'width':(100 / _.options.slidesPerRow) + '%',
588
+ 'display': 'inline-block'
589
+ });
590
+
591
+ }
592
+
593
+ };
594
+
595
+ Slick.prototype.checkResponsive = function(initial, forceUpdate) {
596
+
597
+ var _ = this,
598
+ breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
599
+ var sliderWidth = _.$slider.width();
600
+ var windowWidth = window.innerWidth || $(window).width();
601
+
602
+ if (_.respondTo === 'window') {
603
+ respondToWidth = windowWidth;
604
+ } else if (_.respondTo === 'slider') {
605
+ respondToWidth = sliderWidth;
606
+ } else if (_.respondTo === 'min') {
607
+ respondToWidth = Math.min(windowWidth, sliderWidth);
608
+ }
609
+
610
+ if ( _.options.responsive &&
611
+ _.options.responsive.length &&
612
+ _.options.responsive !== null) {
613
+
614
+ targetBreakpoint = null;
615
+
616
+ for (breakpoint in _.breakpoints) {
617
+ if (_.breakpoints.hasOwnProperty(breakpoint)) {
618
+ if (_.originalSettings.mobileFirst === false) {
619
+ if (respondToWidth < _.breakpoints[breakpoint]) {
620
+ targetBreakpoint = _.breakpoints[breakpoint];
621
+ }
622
+ } else {
623
+ if (respondToWidth > _.breakpoints[breakpoint]) {
624
+ targetBreakpoint = _.breakpoints[breakpoint];
625
+ }
626
+ }
627
+ }
628
+ }
629
+
630
+ if (targetBreakpoint !== null) {
631
+ if (_.activeBreakpoint !== null) {
632
+ if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
633
+ _.activeBreakpoint =
634
+ targetBreakpoint;
635
+ if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
636
+ _.unslick(targetBreakpoint);
637
+ } else {
638
+ _.options = $.extend({}, _.originalSettings,
639
+ _.breakpointSettings[
640
+ targetBreakpoint]);
641
+ if (initial === true) {
642
+ _.currentSlide = _.options.initialSlide;
643
+ }
644
+ _.refresh(initial);
645
+ }
646
+ triggerBreakpoint = targetBreakpoint;
647
+ }
648
+ } else {
649
+ _.activeBreakpoint = targetBreakpoint;
650
+ if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
651
+ _.unslick(targetBreakpoint);
652
+ } else {
653
+ _.options = $.extend({}, _.originalSettings,
654
+ _.breakpointSettings[
655
+ targetBreakpoint]);
656
+ if (initial === true) {
657
+ _.currentSlide = _.options.initialSlide;
658
+ }
659
+ _.refresh(initial);
660
+ }
661
+ triggerBreakpoint = targetBreakpoint;
662
+ }
663
+ } else {
664
+ if (_.activeBreakpoint !== null) {
665
+ _.activeBreakpoint = null;
666
+ _.options = _.originalSettings;
667
+ if (initial === true) {
668
+ _.currentSlide = _.options.initialSlide;
669
+ }
670
+ _.refresh(initial);
671
+ triggerBreakpoint = targetBreakpoint;
672
+ }
673
+ }
674
+
675
+ // only trigger breakpoints during an actual break. not on initialize.
676
+ if( !initial && triggerBreakpoint !== false ) {
677
+ _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
678
+ }
679
+ }
680
+
681
+ };
682
+
683
+ Slick.prototype.changeSlide = function(event, dontAnimate) {
684
+
685
+ var _ = this,
686
+ $target = $(event.currentTarget),
687
+ indexOffset, slideOffset, unevenOffset;
688
+
689
+ // If target is a link, prevent default action.
690
+ if($target.is('a')) {
691
+ event.preventDefault();
692
+ }
693
+
694
+ // If target is not the <li> element (ie: a child), find the <li>.
695
+ if(!$target.is('li')) {
696
+ $target = $target.closest('li');
697
+ }
698
+
699
+ unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
700
+ indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
701
+
702
+ switch (event.data.message) {
703
+
704
+ case 'previous':
705
+ slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
706
+ if (_.slideCount > _.options.slidesToShow) {
707
+ _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
708
+ }
709
+ break;
710
+
711
+ case 'next':
712
+ slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
713
+ if (_.slideCount > _.options.slidesToShow) {
714
+ _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
715
+ }
716
+ break;
717
+
718
+ case 'index':
719
+ var index = event.data.index === 0 ? 0 :
720
+ event.data.index || $target.index() * _.options.slidesToScroll;
721
+
722
+ _.slideHandler(_.checkNavigable(index), false, dontAnimate);
723
+ $target.children().trigger('focus');
724
+ break;
725
+
726
+ default:
727
+ return;
728
+ }
729
+
730
+ };
731
+
732
+ Slick.prototype.checkNavigable = function(index) {
733
+
734
+ var _ = this,
735
+ navigables, prevNavigable;
736
+
737
+ navigables = _.getNavigableIndexes();
738
+ prevNavigable = 0;
739
+ if (index > navigables[navigables.length - 1]) {
740
+ index = navigables[navigables.length - 1];
741
+ } else {
742
+ for (var n in navigables) {
743
+ if (index < navigables[n]) {
744
+ index = prevNavigable;
745
+ break;
746
+ }
747
+ prevNavigable = navigables[n];
748
+ }
749
+ }
750
+
751
+ return index;
752
+ };
753
+
754
+ Slick.prototype.cleanUpEvents = function() {
755
+
756
+ var _ = this;
757
+
758
+ if (_.options.dots && _.$dots !== null) {
759
+
760
+ $('li', _.$dots)
761
+ .off('click.slick', _.changeSlide)
762
+ .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
763
+ .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
764
+
765
+ if (_.options.accessibility === true) {
766
+ _.$dots.off('keydown.slick', _.keyHandler);
767
+ }
768
+ }
769
+
770
+ _.$slider.off('focus.slick blur.slick');
771
+
772
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
773
+ _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
774
+ _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
775
+
776
+ if (_.options.accessibility === true) {
777
+ _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
778
+ _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
779
+ }
780
+ }
781
+
782
+ _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
783
+ _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
784
+ _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
785
+ _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
786
+
787
+ _.$list.off('click.slick', _.clickHandler);
788
+
789
+ $(document).off(_.visibilityChange, _.visibility);
790
+
791
+ _.cleanUpSlideEvents();
792
+
793
+ if (_.options.accessibility === true) {
794
+ _.$list.off('keydown.slick', _.keyHandler);
795
+ }
796
+
797
+ if (_.options.focusOnSelect === true) {
798
+ $(_.$slideTrack).children().off('click.slick', _.selectHandler);
799
+ }
800
+
801
+ $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
802
+
803
+ $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
804
+
805
+ $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
806
+
807
+ $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
808
+
809
+ };
810
+
811
+ Slick.prototype.cleanUpSlideEvents = function() {
812
+
813
+ var _ = this;
814
+
815
+ _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
816
+ _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
817
+
818
+ };
819
+
820
+ Slick.prototype.cleanUpRows = function() {
821
+
822
+ var _ = this, originalSlides;
823
+
824
+ if(_.options.rows > 0) {
825
+ originalSlides = _.$slides.children().children();
826
+ originalSlides.removeAttr('style');
827
+ _.$slider.empty().append(originalSlides);
828
+ }
829
+
830
+ };
831
+
832
+ Slick.prototype.clickHandler = function(event) {
833
+
834
+ var _ = this;
835
+
836
+ if (_.shouldClick === false) {
837
+ event.stopImmediatePropagation();
838
+ event.stopPropagation();
839
+ event.preventDefault();
840
+ }
841
+
842
+ };
843
+
844
+ Slick.prototype.destroy = function(refresh) {
845
+
846
+ var _ = this;
847
+
848
+ _.autoPlayClear();
849
+
850
+ _.touchObject = {};
851
+
852
+ _.cleanUpEvents();
853
+
854
+ $('.slick-cloned', _.$slider).detach();
855
+
856
+ if (_.$dots) {
857
+ _.$dots.remove();
858
+ }
859
+
860
+ if ( _.$prevArrow && _.$prevArrow.length ) {
861
+
862
+ _.$prevArrow
863
+ .removeClass('slick-disabled slick-arrow slick-hidden')
864
+ .removeAttr('aria-hidden aria-disabled tabindex')
865
+ .css('display','');
866
+
867
+ if ( _.htmlExpr.test( _.options.prevArrow )) {
868
+ _.$prevArrow.remove();
869
+ }
870
+ }
871
+
872
+ if ( _.$nextArrow && _.$nextArrow.length ) {
873
+
874
+ _.$nextArrow
875
+ .removeClass('slick-disabled slick-arrow slick-hidden')
876
+ .removeAttr('aria-hidden aria-disabled tabindex')
877
+ .css('display','');
878
+
879
+ if ( _.htmlExpr.test( _.options.nextArrow )) {
880
+ _.$nextArrow.remove();
881
+ }
882
+ }
883
+
884
+
885
+ if (_.$slides) {
886
+
887
+ _.$slides
888
+ .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
889
+ .removeAttr('aria-hidden')
890
+ .removeAttr('data-slick-index')
891
+ .each(function(){
892
+ $(this).attr('style', $(this).data('originalStyling'));
893
+ });
894
+
895
+ _.$slideTrack.children(this.options.slide).detach();
896
+
897
+ _.$slideTrack.detach();
898
+
899
+ _.$list.detach();
900
+
901
+ _.$slider.append(_.$slides);
902
+ }
903
+
904
+ _.cleanUpRows();
905
+
906
+ _.$slider.removeClass('slick-slider');
907
+ _.$slider.removeClass('slick-initialized');
908
+ _.$slider.removeClass('slick-dotted');
909
+
910
+ _.unslicked = true;
911
+
912
+ if(!refresh) {
913
+ _.$slider.trigger('destroy', [_]);
914
+ }
915
+
916
+ };
917
+
918
+ Slick.prototype.disableTransition = function(slide) {
919
+
920
+ var _ = this,
921
+ transition = {};
922
+
923
+ transition[_.transitionType] = '';
924
+
925
+ if (_.options.fade === false) {
926
+ _.$slideTrack.css(transition);
927
+ } else {
928
+ _.$slides.eq(slide).css(transition);
929
+ }
930
+
931
+ };
932
+
933
+ Slick.prototype.fadeSlide = function(slideIndex, callback) {
934
+
935
+ var _ = this;
936
+
937
+ if (_.cssTransitions === false) {
938
+
939
+ _.$slides.eq(slideIndex).css({
940
+ zIndex: _.options.zIndex
941
+ });
942
+
943
+ _.$slides.eq(slideIndex).animate({
944
+ opacity: 1
945
+ }, _.options.speed, _.options.easing, callback);
946
+
947
+ } else {
948
+
949
+ _.applyTransition(slideIndex);
950
+
951
+ _.$slides.eq(slideIndex).css({
952
+ opacity: 1,
953
+ zIndex: _.options.zIndex
954
+ });
955
+
956
+ if (callback) {
957
+ setTimeout(function() {
958
+
959
+ _.disableTransition(slideIndex);
960
+
961
+ callback.call();
962
+ }, _.options.speed);
963
+ }
964
+
965
+ }
966
+
967
+ };
968
+
969
+ Slick.prototype.fadeSlideOut = function(slideIndex) {
970
+
971
+ var _ = this;
972
+
973
+ if (_.cssTransitions === false) {
974
+
975
+ _.$slides.eq(slideIndex).animate({
976
+ opacity: 0,
977
+ zIndex: _.options.zIndex - 2
978
+ }, _.options.speed, _.options.easing);
979
+
980
+ } else {
981
+
982
+ _.applyTransition(slideIndex);
983
+
984
+ _.$slides.eq(slideIndex).css({
985
+ opacity: 0,
986
+ zIndex: _.options.zIndex - 2
987
+ });
988
+
989
+ }
990
+
991
+ };
992
+
993
+ Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
994
+
995
+ var _ = this;
996
+
997
+ if (filter !== null) {
998
+
999
+ _.$slidesCache = _.$slides;
1000
+
1001
+ _.unload();
1002
+
1003
+ _.$slideTrack.children(this.options.slide).detach();
1004
+
1005
+ _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
1006
+
1007
+ _.reinit();
1008
+
1009
+ }
1010
+
1011
+ };
1012
+
1013
+ Slick.prototype.focusHandler = function() {
1014
+
1015
+ var _ = this;
1016
+
1017
+ _.$slider
1018
+ .off('focus.slick blur.slick')
1019
+ .on('focus.slick blur.slick', '*', function(event) {
1020
+
1021
+ event.stopImmediatePropagation();
1022
+ var $sf = $(this);
1023
+
1024
+ setTimeout(function() {
1025
+
1026
+ if( _.options.pauseOnFocus ) {
1027
+ _.focussed = $sf.is(':focus');
1028
+ _.autoPlay();
1029
+ }
1030
+
1031
+ }, 0);
1032
+
1033
+ });
1034
+ };
1035
+
1036
+ Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
1037
+
1038
+ var _ = this;
1039
+ return _.currentSlide;
1040
+
1041
+ };
1042
+
1043
+ Slick.prototype.getDotCount = function() {
1044
+
1045
+ var _ = this;
1046
+
1047
+ var breakPoint = 0;
1048
+ var counter = 0;
1049
+ var pagerQty = 0;
1050
+
1051
+ if (_.options.infinite === true) {
1052
+ if (_.slideCount <= _.options.slidesToShow) {
1053
+ ++pagerQty;
1054
+ } else {
1055
+ while (breakPoint < _.slideCount) {
1056
+ ++pagerQty;
1057
+ breakPoint = counter + _.options.slidesToScroll;
1058
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1059
+ }
1060
+ }
1061
+ } else if (_.options.centerMode === true) {
1062
+ pagerQty = _.slideCount;
1063
+ } else if(!_.options.asNavFor) {
1064
+ pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
1065
+ }else {
1066
+ while (breakPoint < _.slideCount) {
1067
+ ++pagerQty;
1068
+ breakPoint = counter + _.options.slidesToScroll;
1069
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1070
+ }
1071
+ }
1072
+
1073
+ return pagerQty - 1;
1074
+
1075
+ };
1076
+
1077
+ Slick.prototype.getLeft = function(slideIndex) {
1078
+
1079
+ var _ = this,
1080
+ targetLeft,
1081
+ verticalHeight,
1082
+ verticalOffset = 0,
1083
+ targetSlide,
1084
+ coef;
1085
+
1086
+ _.slideOffset = 0;
1087
+ verticalHeight = _.$slides.first().outerHeight(true);
1088
+
1089
+ if (_.options.infinite === true) {
1090
+ if (_.slideCount > _.options.slidesToShow) {
1091
+ _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
1092
+ coef = -1
1093
+
1094
+ if (_.options.vertical === true && _.options.centerMode === true) {
1095
+ if (_.options.slidesToShow === 2) {
1096
+ coef = -1.5;
1097
+ } else if (_.options.slidesToShow === 1) {
1098
+ coef = -2
1099
+ }
1100
+ }
1101
+ verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
1102
+ }
1103
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
1104
+ if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
1105
+ if (slideIndex > _.slideCount) {
1106
+ _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
1107
+ verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
1108
+ } else {
1109
+ _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
1110
+ verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
1111
+ }
1112
+ }
1113
+ }
1114
+ } else {
1115
+ if (slideIndex + _.options.slidesToShow > _.slideCount) {
1116
+ _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
1117
+ verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
1118
+ }
1119
+ }
1120
+
1121
+ if (_.slideCount <= _.options.slidesToShow) {
1122
+ _.slideOffset = 0;
1123
+ verticalOffset = 0;
1124
+ }
1125
+
1126
+ if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
1127
+ _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
1128
+ } else if (_.options.centerMode === true && _.options.infinite === true) {
1129
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
1130
+ } else if (_.options.centerMode === true) {
1131
+ _.slideOffset = 0;
1132
+ _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
1133
+ }
1134
+
1135
+ if (_.options.vertical === false) {
1136
+ targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
1137
+ } else {
1138
+ targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
1139
+ }
1140
+
1141
+ if (_.options.variableWidth === true) {
1142
+
1143
+ if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1144
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1145
+ } else {
1146
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
1147
+ }
1148
+
1149
+ if (_.options.rtl === true) {
1150
+ if (targetSlide[0]) {
1151
+ targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1152
+ } else {
1153
+ targetLeft = 0;
1154
+ }
1155
+ } else {
1156
+ targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1157
+ }
1158
+
1159
+ if (_.options.centerMode === true) {
1160
+ if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1161
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1162
+ } else {
1163
+ targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
1164
+ }
1165
+
1166
+ if (_.options.rtl === true) {
1167
+ if (targetSlide[0]) {
1168
+ targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1169
+ } else {
1170
+ targetLeft = 0;
1171
+ }
1172
+ } else {
1173
+ targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1174
+ }
1175
+
1176
+ targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
1177
+ }
1178
+ }
1179
+
1180
+ return targetLeft;
1181
+
1182
+ };
1183
+
1184
+ Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
1185
+
1186
+ var _ = this;
1187
+
1188
+ return _.options[option];
1189
+
1190
+ };
1191
+
1192
+ Slick.prototype.getNavigableIndexes = function() {
1193
+
1194
+ var _ = this,
1195
+ breakPoint = 0,
1196
+ counter = 0,
1197
+ indexes = [],
1198
+ max;
1199
+
1200
+ if (_.options.infinite === false) {
1201
+ max = _.slideCount;
1202
+ } else {
1203
+ breakPoint = _.options.slidesToScroll * -1;
1204
+ counter = _.options.slidesToScroll * -1;
1205
+ max = _.slideCount * 2;
1206
+ }
1207
+
1208
+ while (breakPoint < max) {
1209
+ indexes.push(breakPoint);
1210
+ breakPoint = counter + _.options.slidesToScroll;
1211
+ counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1212
+ }
1213
+
1214
+ return indexes;
1215
+
1216
+ };
1217
+
1218
+ Slick.prototype.getSlick = function() {
1219
+
1220
+ return this;
1221
+
1222
+ };
1223
+
1224
+ Slick.prototype.getSlideCount = function() {
1225
+
1226
+ var _ = this,
1227
+ slidesTraversed, swipedSlide, centerOffset;
1228
+
1229
+ centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
1230
+
1231
+ if (_.options.swipeToSlide === true) {
1232
+ _.$slideTrack.find('.slick-slide').each(function(index, slide) {
1233
+ if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
1234
+ swipedSlide = slide;
1235
+ return false;
1236
+ }
1237
+ });
1238
+
1239
+ slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
1240
+
1241
+ return slidesTraversed;
1242
+
1243
+ } else {
1244
+ return _.options.slidesToScroll;
1245
+ }
1246
+
1247
+ };
1248
+
1249
+ Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
1250
+
1251
+ var _ = this;
1252
+
1253
+ _.changeSlide({
1254
+ data: {
1255
+ message: 'index',
1256
+ index: parseInt(slide)
1257
+ }
1258
+ }, dontAnimate);
1259
+
1260
+ };
1261
+
1262
+ Slick.prototype.init = function(creation) {
1263
+
1264
+ var _ = this;
1265
+
1266
+ if (!$(_.$slider).hasClass('slick-initialized')) {
1267
+
1268
+ $(_.$slider).addClass('slick-initialized');
1269
+
1270
+ _.buildRows();
1271
+ _.buildOut();
1272
+ _.setProps();
1273
+ _.startLoad();
1274
+ _.loadSlider();
1275
+ _.initializeEvents();
1276
+ _.updateArrows();
1277
+ _.updateDots();
1278
+ _.checkResponsive(true);
1279
+ _.focusHandler();
1280
+
1281
+ }
1282
+
1283
+ if (creation) {
1284
+ _.$slider.trigger('init', [_]);
1285
+ }
1286
+
1287
+ if (_.options.accessibility === true) {
1288
+ _.initADA();
1289
+ }
1290
+
1291
+ if ( _.options.autoplay ) {
1292
+
1293
+ _.paused = false;
1294
+ _.autoPlay();
1295
+
1296
+ }
1297
+
1298
+ };
1299
+
1300
+ Slick.prototype.initADA = function() {
1301
+ var _ = this,
1302
+ numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
1303
+ tabControlIndexes = _.getNavigableIndexes().filter(function(val) {
1304
+ return (val >= 0) && (val < _.slideCount);
1305
+ });
1306
+
1307
+ _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
1308
+ 'aria-hidden': 'true',
1309
+ 'tabindex': '-1'
1310
+ }).find('a, input, button, select').attr({
1311
+ 'tabindex': '-1'
1312
+ });
1313
+
1314
+ if (_.$dots !== null) {
1315
+ _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
1316
+ var slideControlIndex = tabControlIndexes.indexOf(i);
1317
+
1318
+ $(this).attr({
1319
+ 'role': 'tabpanel',
1320
+ 'id': 'slick-slide' + _.instanceUid + i,
1321
+ 'tabindex': -1
1322
+ });
1323
+
1324
+ if (slideControlIndex !== -1) {
1325
+ var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
1326
+ if ($('#' + ariaButtonControl).length) {
1327
+ $(this).attr({
1328
+ 'aria-describedby': ariaButtonControl
1329
+ });
1330
+ }
1331
+ }
1332
+ });
1333
+
1334
+ _.$dots.attr('role', 'tablist').find('li').each(function(i) {
1335
+ var mappedSlideIndex = tabControlIndexes[i];
1336
+
1337
+ $(this).attr({
1338
+ 'role': 'presentation'
1339
+ });
1340
+
1341
+ $(this).find('button').first().attr({
1342
+ 'role': 'tab',
1343
+ 'id': 'slick-slide-control' + _.instanceUid + i,
1344
+ 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
1345
+ 'aria-label': (i + 1) + ' of ' + numDotGroups,
1346
+ 'aria-selected': null,
1347
+ 'tabindex': '-1'
1348
+ });
1349
+
1350
+ }).eq(_.currentSlide).find('button').attr({
1351
+ 'aria-selected': 'true',
1352
+ 'tabindex': '0'
1353
+ }).end();
1354
+ }
1355
+
1356
+ for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
1357
+ if (_.options.focusOnChange) {
1358
+ _.$slides.eq(i).attr({'tabindex': '0'});
1359
+ } else {
1360
+ _.$slides.eq(i).removeAttr('tabindex');
1361
+ }
1362
+ }
1363
+
1364
+ _.activateADA();
1365
+
1366
+ };
1367
+
1368
+ Slick.prototype.initArrowEvents = function() {
1369
+
1370
+ var _ = this;
1371
+
1372
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1373
+ _.$prevArrow
1374
+ .off('click.slick')
1375
+ .on('click.slick', {
1376
+ message: 'previous'
1377
+ }, _.changeSlide);
1378
+ _.$nextArrow
1379
+ .off('click.slick')
1380
+ .on('click.slick', {
1381
+ message: 'next'
1382
+ }, _.changeSlide);
1383
+
1384
+ if (_.options.accessibility === true) {
1385
+ _.$prevArrow.on('keydown.slick', _.keyHandler);
1386
+ _.$nextArrow.on('keydown.slick', _.keyHandler);
1387
+ }
1388
+ }
1389
+
1390
+ };
1391
+
1392
+ Slick.prototype.initDotEvents = function() {
1393
+
1394
+ var _ = this;
1395
+
1396
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1397
+ $('li', _.$dots).on('click.slick', {
1398
+ message: 'index'
1399
+ }, _.changeSlide);
1400
+
1401
+ if (_.options.accessibility === true) {
1402
+ _.$dots.on('keydown.slick', _.keyHandler);
1403
+ }
1404
+ }
1405
+
1406
+ if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
1407
+
1408
+ $('li', _.$dots)
1409
+ .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
1410
+ .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1411
+
1412
+ }
1413
+
1414
+ };
1415
+
1416
+ Slick.prototype.initSlideEvents = function() {
1417
+
1418
+ var _ = this;
1419
+
1420
+ if ( _.options.pauseOnHover ) {
1421
+
1422
+ _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
1423
+ _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1424
+
1425
+ }
1426
+
1427
+ };
1428
+
1429
+ Slick.prototype.initializeEvents = function() {
1430
+
1431
+ var _ = this;
1432
+
1433
+ _.initArrowEvents();
1434
+
1435
+ _.initDotEvents();
1436
+ _.initSlideEvents();
1437
+
1438
+ _.$list.on('touchstart.slick mousedown.slick', {
1439
+ action: 'start'
1440
+ }, _.swipeHandler);
1441
+ _.$list.on('touchmove.slick mousemove.slick', {
1442
+ action: 'move'
1443
+ }, _.swipeHandler);
1444
+ _.$list.on('touchend.slick mouseup.slick', {
1445
+ action: 'end'
1446
+ }, _.swipeHandler);
1447
+ _.$list.on('touchcancel.slick mouseleave.slick', {
1448
+ action: 'end'
1449
+ }, _.swipeHandler);
1450
+
1451
+ _.$list.on('click.slick', _.clickHandler);
1452
+
1453
+ $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
1454
+
1455
+ if (_.options.accessibility === true) {
1456
+ _.$list.on('keydown.slick', _.keyHandler);
1457
+ }
1458
+
1459
+ if (_.options.focusOnSelect === true) {
1460
+ $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1461
+ }
1462
+
1463
+ $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
1464
+
1465
+ $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
1466
+
1467
+ $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
1468
+
1469
+ $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
1470
+ $(_.setPosition);
1471
+
1472
+ };
1473
+
1474
+ Slick.prototype.initUI = function() {
1475
+
1476
+ var _ = this;
1477
+
1478
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1479
+
1480
+ _.$prevArrow.show();
1481
+ _.$nextArrow.show();
1482
+
1483
+ }
1484
+
1485
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1486
+
1487
+ _.$dots.show();
1488
+
1489
+ }
1490
+
1491
+ };
1492
+
1493
+ Slick.prototype.keyHandler = function(event) {
1494
+
1495
+ var _ = this;
1496
+ //Dont slide if the cursor is inside the form fields and arrow keys are pressed
1497
+ if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
1498
+ if (event.keyCode === 37 && _.options.accessibility === true) {
1499
+ _.changeSlide({
1500
+ data: {
1501
+ message: _.options.rtl === true ? 'next' : 'previous'
1502
+ }
1503
+ });
1504
+ } else if (event.keyCode === 39 && _.options.accessibility === true) {
1505
+ _.changeSlide({
1506
+ data: {
1507
+ message: _.options.rtl === true ? 'previous' : 'next'
1508
+ }
1509
+ });
1510
+ }
1511
+ }
1512
+
1513
+ };
1514
+
1515
+ Slick.prototype.lazyLoad = function() {
1516
+
1517
+ var _ = this,
1518
+ loadRange, cloneRange, rangeStart, rangeEnd;
1519
+
1520
+ function loadImages(imagesScope) {
1521
+
1522
+ $('img[data-lazy]', imagesScope).each(function() {
1523
+
1524
+ var image = $(this),
1525
+ imageSource = $(this).attr('data-lazy'),
1526
+ imageSrcSet = $(this).attr('data-srcset'),
1527
+ imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
1528
+ imageToLoad = document.createElement('img');
1529
+
1530
+ imageToLoad.onload = function() {
1531
+
1532
+ image
1533
+ .animate({ opacity: 0 }, 100, function() {
1534
+
1535
+ if (imageSrcSet) {
1536
+ image
1537
+ .attr('srcset', imageSrcSet );
1538
+
1539
+ if (imageSizes) {
1540
+ image
1541
+ .attr('sizes', imageSizes );
1542
+ }
1543
+ }
1544
+
1545
+ image
1546
+ .attr('src', imageSource)
1547
+ .animate({ opacity: 1 }, 200, function() {
1548
+ image
1549
+ .removeAttr('data-lazy data-srcset data-sizes')
1550
+ .removeClass('slick-loading');
1551
+ });
1552
+ _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
1553
+ });
1554
+
1555
+ };
1556
+
1557
+ imageToLoad.onerror = function() {
1558
+
1559
+ image
1560
+ .removeAttr( 'data-lazy' )
1561
+ .removeClass( 'slick-loading' )
1562
+ .addClass( 'slick-lazyload-error' );
1563
+
1564
+ _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1565
+
1566
+ };
1567
+
1568
+ imageToLoad.src = imageSource;
1569
+
1570
+ });
1571
+
1572
+ }
1573
+
1574
+ if (_.options.centerMode === true) {
1575
+ if (_.options.infinite === true) {
1576
+ rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
1577
+ rangeEnd = rangeStart + _.options.slidesToShow + 2;
1578
+ } else {
1579
+ rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
1580
+ rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
1581
+ }
1582
+ } else {
1583
+ rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
1584
+ rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
1585
+ if (_.options.fade === true) {
1586
+ if (rangeStart > 0) rangeStart--;
1587
+ if (rangeEnd <= _.slideCount) rangeEnd++;
1588
+ }
1589
+ }
1590
+
1591
+ loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
1592
+
1593
+ if (_.options.lazyLoad === 'anticipated') {
1594
+ var prevSlide = rangeStart - 1,
1595
+ nextSlide = rangeEnd,
1596
+ $slides = _.$slider.find('.slick-slide');
1597
+
1598
+ for (var i = 0; i < _.options.slidesToScroll; i++) {
1599
+ if (prevSlide < 0) prevSlide = _.slideCount - 1;
1600
+ loadRange = loadRange.add($slides.eq(prevSlide));
1601
+ loadRange = loadRange.add($slides.eq(nextSlide));
1602
+ prevSlide--;
1603
+ nextSlide++;
1604
+ }
1605
+ }
1606
+
1607
+ loadImages(loadRange);
1608
+
1609
+ if (_.slideCount <= _.options.slidesToShow) {
1610
+ cloneRange = _.$slider.find('.slick-slide');
1611
+ loadImages(cloneRange);
1612
+ } else
1613
+ if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
1614
+ cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
1615
+ loadImages(cloneRange);
1616
+ } else if (_.currentSlide === 0) {
1617
+ cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
1618
+ loadImages(cloneRange);
1619
+ }
1620
+
1621
+ };
1622
+
1623
+ Slick.prototype.loadSlider = function() {
1624
+
1625
+ var _ = this;
1626
+
1627
+ _.setPosition();
1628
+
1629
+ _.$slideTrack.css({
1630
+ opacity: 1
1631
+ });
1632
+
1633
+ _.$slider.removeClass('slick-loading');
1634
+
1635
+ _.initUI();
1636
+
1637
+ if (_.options.lazyLoad === 'progressive') {
1638
+ _.progressiveLazyLoad();
1639
+ }
1640
+
1641
+ };
1642
+
1643
+ Slick.prototype.next = Slick.prototype.slickNext = function() {
1644
+
1645
+ var _ = this;
1646
+
1647
+ _.changeSlide({
1648
+ data: {
1649
+ message: 'next'
1650
+ }
1651
+ });
1652
+
1653
+ };
1654
+
1655
+ Slick.prototype.orientationChange = function() {
1656
+
1657
+ var _ = this;
1658
+
1659
+ _.checkResponsive();
1660
+ _.setPosition();
1661
+
1662
+ };
1663
+
1664
+ Slick.prototype.pause = Slick.prototype.slickPause = function() {
1665
+
1666
+ var _ = this;
1667
+
1668
+ _.autoPlayClear();
1669
+ _.paused = true;
1670
+
1671
+ };
1672
+
1673
+ Slick.prototype.play = Slick.prototype.slickPlay = function() {
1674
+
1675
+ var _ = this;
1676
+
1677
+ _.autoPlay();
1678
+ _.options.autoplay = true;
1679
+ _.paused = false;
1680
+ _.focussed = false;
1681
+ _.interrupted = false;
1682
+
1683
+ };
1684
+
1685
+ Slick.prototype.postSlide = function(index) {
1686
+
1687
+ var _ = this;
1688
+
1689
+ if( !_.unslicked ) {
1690
+
1691
+ _.$slider.trigger('afterChange', [_, index]);
1692
+
1693
+ _.animating = false;
1694
+
1695
+ if (_.slideCount > _.options.slidesToShow) {
1696
+ _.setPosition();
1697
+ }
1698
+
1699
+ _.swipeLeft = null;
1700
+
1701
+ if ( _.options.autoplay ) {
1702
+ _.autoPlay();
1703
+ }
1704
+
1705
+ if (_.options.accessibility === true) {
1706
+ _.initADA();
1707
+
1708
+ if (_.options.focusOnChange) {
1709
+ var $currentSlide = $(_.$slides.get(_.currentSlide));
1710
+ $currentSlide.attr('tabindex', 0).focus();
1711
+ }
1712
+ }
1713
+
1714
+ }
1715
+
1716
+ };
1717
+
1718
+ Slick.prototype.prev = Slick.prototype.slickPrev = function() {
1719
+
1720
+ var _ = this;
1721
+
1722
+ _.changeSlide({
1723
+ data: {
1724
+ message: 'previous'
1725
+ }
1726
+ });
1727
+
1728
+ };
1729
+
1730
+ Slick.prototype.preventDefault = function(event) {
1731
+
1732
+ event.preventDefault();
1733
+
1734
+ };
1735
+
1736
+ Slick.prototype.progressiveLazyLoad = function( tryCount ) {
1737
+
1738
+ tryCount = tryCount || 1;
1739
+
1740
+ var _ = this,
1741
+ $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
1742
+ image,
1743
+ imageSource,
1744
+ imageSrcSet,
1745
+ imageSizes,
1746
+ imageToLoad;
1747
+
1748
+ if ( $imgsToLoad.length ) {
1749
+
1750
+ image = $imgsToLoad.first();
1751
+ imageSource = image.attr('data-lazy');
1752
+ imageSrcSet = image.attr('data-srcset');
1753
+ imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');
1754
+ imageToLoad = document.createElement('img');
1755
+
1756
+ imageToLoad.onload = function() {
1757
+
1758
+ if (imageSrcSet) {
1759
+ image
1760
+ .attr('srcset', imageSrcSet );
1761
+
1762
+ if (imageSizes) {
1763
+ image
1764
+ .attr('sizes', imageSizes );
1765
+ }
1766
+ }
1767
+
1768
+ image
1769
+ .attr( 'src', imageSource )
1770
+ .removeAttr('data-lazy data-srcset data-sizes')
1771
+ .removeClass('slick-loading');
1772
+
1773
+ if ( _.options.adaptiveHeight === true ) {
1774
+ _.setPosition();
1775
+ }
1776
+
1777
+ _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
1778
+ _.progressiveLazyLoad();
1779
+
1780
+ };
1781
+
1782
+ imageToLoad.onerror = function() {
1783
+
1784
+ if ( tryCount < 3 ) {
1785
+
1786
+ /**
1787
+ * try to load the image 3 times,
1788
+ * leave a slight delay so we don't get
1789
+ * servers blocking the request.
1790
+ */
1791
+ setTimeout( function() {
1792
+ _.progressiveLazyLoad( tryCount + 1 );
1793
+ }, 500 );
1794
+
1795
+ } else {
1796
+
1797
+ image
1798
+ .removeAttr( 'data-lazy' )
1799
+ .removeClass( 'slick-loading' )
1800
+ .addClass( 'slick-lazyload-error' );
1801
+
1802
+ _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1803
+
1804
+ _.progressiveLazyLoad();
1805
+
1806
+ }
1807
+
1808
+ };
1809
+
1810
+ imageToLoad.src = imageSource;
1811
+
1812
+ } else {
1813
+
1814
+ _.$slider.trigger('allImagesLoaded', [ _ ]);
1815
+
1816
+ }
1817
+
1818
+ };
1819
+
1820
+ Slick.prototype.refresh = function( initializing ) {
1821
+
1822
+ var _ = this, currentSlide, lastVisibleIndex;
1823
+
1824
+ lastVisibleIndex = _.slideCount - _.options.slidesToShow;
1825
+
1826
+ // in non-infinite sliders, we don't want to go past the
1827
+ // last visible index.
1828
+ if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
1829
+ _.currentSlide = lastVisibleIndex;
1830
+ }
1831
+
1832
+ // if less slides than to show, go to start.
1833
+ if ( _.slideCount <= _.options.slidesToShow ) {
1834
+ _.currentSlide = 0;
1835
+
1836
+ }
1837
+
1838
+ currentSlide = _.currentSlide;
1839
+
1840
+ _.destroy(true);
1841
+
1842
+ $.extend(_, _.initials, { currentSlide: currentSlide });
1843
+
1844
+ _.init();
1845
+
1846
+ if( !initializing ) {
1847
+
1848
+ _.changeSlide({
1849
+ data: {
1850
+ message: 'index',
1851
+ index: currentSlide
1852
+ }
1853
+ }, false);
1854
+
1855
+ }
1856
+
1857
+ };
1858
+
1859
+ Slick.prototype.registerBreakpoints = function() {
1860
+
1861
+ var _ = this, breakpoint, currentBreakpoint, l,
1862
+ responsiveSettings = _.options.responsive || null;
1863
+
1864
+ if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
1865
+
1866
+ _.respondTo = _.options.respondTo || 'window';
1867
+
1868
+ for ( breakpoint in responsiveSettings ) {
1869
+
1870
+ l = _.breakpoints.length-1;
1871
+
1872
+ if (responsiveSettings.hasOwnProperty(breakpoint)) {
1873
+ currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
1874
+
1875
+ // loop through the breakpoints and cut out any existing
1876
+ // ones with the same breakpoint number, we don't want dupes.
1877
+ while( l >= 0 ) {
1878
+ if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
1879
+ _.breakpoints.splice(l,1);
1880
+ }
1881
+ l--;
1882
+ }
1883
+
1884
+ _.breakpoints.push(currentBreakpoint);
1885
+ _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
1886
+
1887
+ }
1888
+
1889
+ }
1890
+
1891
+ _.breakpoints.sort(function(a, b) {
1892
+ return ( _.options.mobileFirst ) ? a-b : b-a;
1893
+ });
1894
+
1895
+ }
1896
+
1897
+ };
1898
+
1899
+ Slick.prototype.reinit = function() {
1900
+
1901
+ var _ = this;
1902
+
1903
+ _.$slides =
1904
+ _.$slideTrack
1905
+ .children(_.options.slide)
1906
+ .addClass('slick-slide');
1907
+
1908
+ _.slideCount = _.$slides.length;
1909
+
1910
+ if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
1911
+ _.currentSlide = _.currentSlide - _.options.slidesToScroll;
1912
+ }
1913
+
1914
+ if (_.slideCount <= _.options.slidesToShow) {
1915
+ _.currentSlide = 0;
1916
+ }
1917
+
1918
+ _.registerBreakpoints();
1919
+
1920
+ _.setProps();
1921
+ _.setupInfinite();
1922
+ _.buildArrows();
1923
+ _.updateArrows();
1924
+ _.initArrowEvents();
1925
+ _.buildDots();
1926
+ _.updateDots();
1927
+ _.initDotEvents();
1928
+ _.cleanUpSlideEvents();
1929
+ _.initSlideEvents();
1930
+
1931
+ _.checkResponsive(false, true);
1932
+
1933
+ if (_.options.focusOnSelect === true) {
1934
+ $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1935
+ }
1936
+
1937
+ _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
1938
+
1939
+ _.setPosition();
1940
+ _.focusHandler();
1941
+
1942
+ _.paused = !_.options.autoplay;
1943
+ _.autoPlay();
1944
+
1945
+ _.$slider.trigger('reInit', [_]);
1946
+
1947
+ };
1948
+
1949
+ Slick.prototype.resize = function() {
1950
+
1951
+ var _ = this;
1952
+
1953
+ if ($(window).width() !== _.windowWidth) {
1954
+ clearTimeout(_.windowDelay);
1955
+ _.windowDelay = window.setTimeout(function() {
1956
+ _.windowWidth = $(window).width();
1957
+ _.checkResponsive();
1958
+ if( !_.unslicked ) { _.setPosition(); }
1959
+ }, 50);
1960
+ }
1961
+ };
1962
+
1963
+ Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
1964
+
1965
+ var _ = this;
1966
+
1967
+ if (typeof(index) === 'boolean') {
1968
+ removeBefore = index;
1969
+ index = removeBefore === true ? 0 : _.slideCount - 1;
1970
+ } else {
1971
+ index = removeBefore === true ? --index : index;
1972
+ }
1973
+
1974
+ if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
1975
+ return false;
1976
+ }
1977
+
1978
+ _.unload();
1979
+
1980
+ if (removeAll === true) {
1981
+ _.$slideTrack.children().remove();
1982
+ } else {
1983
+ _.$slideTrack.children(this.options.slide).eq(index).remove();
1984
+ }
1985
+
1986
+ _.$slides = _.$slideTrack.children(this.options.slide);
1987
+
1988
+ _.$slideTrack.children(this.options.slide).detach();
1989
+
1990
+ _.$slideTrack.append(_.$slides);
1991
+
1992
+ _.$slidesCache = _.$slides;
1993
+
1994
+ _.reinit();
1995
+
1996
+ };
1997
+
1998
+ Slick.prototype.setCSS = function(position) {
1999
+
2000
+ var _ = this,
2001
+ positionProps = {},
2002
+ x, y;
2003
+
2004
+ if (_.options.rtl === true) {
2005
+ position = -position;
2006
+ }
2007
+ x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
2008
+ y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
2009
+
2010
+ positionProps[_.positionProp] = position;
2011
+
2012
+ if (_.transformsEnabled === false) {
2013
+ _.$slideTrack.css(positionProps);
2014
+ } else {
2015
+ positionProps = {};
2016
+ if (_.cssTransitions === false) {
2017
+ positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
2018
+ _.$slideTrack.css(positionProps);
2019
+ } else {
2020
+ positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
2021
+ _.$slideTrack.css(positionProps);
2022
+ }
2023
+ }
2024
+
2025
+ };
2026
+
2027
+ Slick.prototype.setDimensions = function() {
2028
+
2029
+ var _ = this;
2030
+
2031
+ if (_.options.vertical === false) {
2032
+ if (_.options.centerMode === true) {
2033
+ _.$list.css({
2034
+ padding: ('0px ' + _.options.centerPadding)
2035
+ });
2036
+ }
2037
+ } else {
2038
+ _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
2039
+ if (_.options.centerMode === true) {
2040
+ _.$list.css({
2041
+ padding: (_.options.centerPadding + ' 0px')
2042
+ });
2043
+ }
2044
+ }
2045
+
2046
+ _.listWidth = _.$list.width();
2047
+ _.listHeight = _.$list.height();
2048
+
2049
+
2050
+ if (_.options.vertical === false && _.options.variableWidth === false) {
2051
+ _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
2052
+ _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
2053
+
2054
+ } else if (_.options.variableWidth === true) {
2055
+ _.$slideTrack.width(5000 * _.slideCount);
2056
+ } else {
2057
+ _.slideWidth = Math.ceil(_.listWidth);
2058
+ _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
2059
+ }
2060
+
2061
+ var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
2062
+ if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
2063
+
2064
+ };
2065
+
2066
+ Slick.prototype.setFade = function() {
2067
+
2068
+ var _ = this,
2069
+ targetLeft;
2070
+
2071
+ _.$slides.each(function(index, element) {
2072
+ targetLeft = (_.slideWidth * index) * -1;
2073
+ if (_.options.rtl === true) {
2074
+ $(element).css({
2075
+ position: 'relative',
2076
+ right: targetLeft,
2077
+ top: 0,
2078
+ zIndex: _.options.zIndex - 2,
2079
+ opacity: 0
2080
+ });
2081
+ } else {
2082
+ $(element).css({
2083
+ position: 'relative',
2084
+ left: targetLeft,
2085
+ top: 0,
2086
+ zIndex: _.options.zIndex - 2,
2087
+ opacity: 0
2088
+ });
2089
+ }
2090
+ });
2091
+
2092
+ _.$slides.eq(_.currentSlide).css({
2093
+ zIndex: _.options.zIndex - 1,
2094
+ opacity: 1
2095
+ });
2096
+
2097
+ };
2098
+
2099
+ Slick.prototype.setHeight = function() {
2100
+
2101
+ var _ = this;
2102
+
2103
+ if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
2104
+ var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
2105
+ _.$list.css('height', targetHeight);
2106
+ }
2107
+
2108
+ };
2109
+
2110
+ Slick.prototype.setOption =
2111
+ Slick.prototype.slickSetOption = function() {
2112
+
2113
+ /**
2114
+ * accepts arguments in format of:
2115
+ *
2116
+ * - for changing a single option's value:
2117
+ * .slick("setOption", option, value, refresh )
2118
+ *
2119
+ * - for changing a set of responsive options:
2120
+ * .slick("setOption", 'responsive', [{}, ...], refresh )
2121
+ *
2122
+ * - for updating multiple values at once (not responsive)
2123
+ * .slick("setOption", { 'option': value, ... }, refresh )
2124
+ */
2125
+
2126
+ var _ = this, l, item, option, value, refresh = false, type;
2127
+
2128
+ if( $.type( arguments[0] ) === 'object' ) {
2129
+
2130
+ option = arguments[0];
2131
+ refresh = arguments[1];
2132
+ type = 'multiple';
2133
+
2134
+ } else if ( $.type( arguments[0] ) === 'string' ) {
2135
+
2136
+ option = arguments[0];
2137
+ value = arguments[1];
2138
+ refresh = arguments[2];
2139
+
2140
+ if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
2141
+
2142
+ type = 'responsive';
2143
+
2144
+ } else if ( typeof arguments[1] !== 'undefined' ) {
2145
+
2146
+ type = 'single';
2147
+
2148
+ }
2149
+
2150
+ }
2151
+
2152
+ if ( type === 'single' ) {
2153
+
2154
+ _.options[option] = value;
2155
+
2156
+
2157
+ } else if ( type === 'multiple' ) {
2158
+
2159
+ $.each( option , function( opt, val ) {
2160
+
2161
+ _.options[opt] = val;
2162
+
2163
+ });
2164
+
2165
+
2166
+ } else if ( type === 'responsive' ) {
2167
+
2168
+ for ( item in value ) {
2169
+
2170
+ if( $.type( _.options.responsive ) !== 'array' ) {
2171
+
2172
+ _.options.responsive = [ value[item] ];
2173
+
2174
+ } else {
2175
+
2176
+ l = _.options.responsive.length-1;
2177
+
2178
+ // loop through the responsive object and splice out duplicates.
2179
+ while( l >= 0 ) {
2180
+
2181
+ if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
2182
+
2183
+ _.options.responsive.splice(l,1);
2184
+
2185
+ }
2186
+
2187
+ l--;
2188
+
2189
+ }
2190
+
2191
+ _.options.responsive.push( value[item] );
2192
+
2193
+ }
2194
+
2195
+ }
2196
+
2197
+ }
2198
+
2199
+ if ( refresh ) {
2200
+
2201
+ _.unload();
2202
+ _.reinit();
2203
+
2204
+ }
2205
+
2206
+ };
2207
+
2208
+ Slick.prototype.setPosition = function() {
2209
+
2210
+ var _ = this;
2211
+
2212
+ _.setDimensions();
2213
+
2214
+ _.setHeight();
2215
+
2216
+ if (_.options.fade === false) {
2217
+ _.setCSS(_.getLeft(_.currentSlide));
2218
+ } else {
2219
+ _.setFade();
2220
+ }
2221
+
2222
+ _.$slider.trigger('setPosition', [_]);
2223
+
2224
+ };
2225
+
2226
+ Slick.prototype.setProps = function() {
2227
+
2228
+ var _ = this,
2229
+ bodyStyle = document.body.style;
2230
+
2231
+ _.positionProp = _.options.vertical === true ? 'top' : 'left';
2232
+
2233
+ if (_.positionProp === 'top') {
2234
+ _.$slider.addClass('slick-vertical');
2235
+ } else {
2236
+ _.$slider.removeClass('slick-vertical');
2237
+ }
2238
+
2239
+ if (bodyStyle.WebkitTransition !== undefined ||
2240
+ bodyStyle.MozTransition !== undefined ||
2241
+ bodyStyle.msTransition !== undefined) {
2242
+ if (_.options.useCSS === true) {
2243
+ _.cssTransitions = true;
2244
+ }
2245
+ }
2246
+
2247
+ if ( _.options.fade ) {
2248
+ if ( typeof _.options.zIndex === 'number' ) {
2249
+ if( _.options.zIndex < 3 ) {
2250
+ _.options.zIndex = 3;
2251
+ }
2252
+ } else {
2253
+ _.options.zIndex = _.defaults.zIndex;
2254
+ }
2255
+ }
2256
+
2257
+ if (bodyStyle.OTransform !== undefined) {
2258
+ _.animType = 'OTransform';
2259
+ _.transformType = '-o-transform';
2260
+ _.transitionType = 'OTransition';
2261
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2262
+ }
2263
+ if (bodyStyle.MozTransform !== undefined) {
2264
+ _.animType = 'MozTransform';
2265
+ _.transformType = '-moz-transform';
2266
+ _.transitionType = 'MozTransition';
2267
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
2268
+ }
2269
+ if (bodyStyle.webkitTransform !== undefined) {
2270
+ _.animType = 'webkitTransform';
2271
+ _.transformType = '-webkit-transform';
2272
+ _.transitionType = 'webkitTransition';
2273
+ if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2274
+ }
2275
+ if (bodyStyle.msTransform !== undefined) {
2276
+ _.animType = 'msTransform';
2277
+ _.transformType = '-ms-transform';
2278
+ _.transitionType = 'msTransition';
2279
+ if (bodyStyle.msTransform === undefined) _.animType = false;
2280
+ }
2281
+ if (bodyStyle.transform !== undefined && _.animType !== false) {
2282
+ _.animType = 'transform';
2283
+ _.transformType = 'transform';
2284
+ _.transitionType = 'transition';
2285
+ }
2286
+ _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
2287
+ };
2288
+
2289
+
2290
+ Slick.prototype.setSlideClasses = function(index) {
2291
+
2292
+ var _ = this,
2293
+ centerOffset, allSlides, indexOffset, remainder;
2294
+
2295
+ allSlides = _.$slider
2296
+ .find('.slick-slide')
2297
+ .removeClass('slick-active slick-center slick-current')
2298
+ .attr('aria-hidden', 'true');
2299
+
2300
+ _.$slides
2301
+ .eq(index)
2302
+ .addClass('slick-current');
2303
+
2304
+ if (_.options.centerMode === true) {
2305
+
2306
+ var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
2307
+
2308
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
2309
+
2310
+ if (_.options.infinite === true) {
2311
+
2312
+ if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
2313
+ _.$slides
2314
+ .slice(index - centerOffset + evenCoef, index + centerOffset + 1)
2315
+ .addClass('slick-active')
2316
+ .attr('aria-hidden', 'false');
2317
+
2318
+ } else {
2319
+
2320
+ indexOffset = _.options.slidesToShow + index;
2321
+ allSlides
2322
+ .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
2323
+ .addClass('slick-active')
2324
+ .attr('aria-hidden', 'false');
2325
+
2326
+ }
2327
+
2328
+ if (index === 0) {
2329
+
2330
+ allSlides
2331
+ .eq(allSlides.length - 1 - _.options.slidesToShow)
2332
+ .addClass('slick-center');
2333
+
2334
+ } else if (index === _.slideCount - 1) {
2335
+
2336
+ allSlides
2337
+ .eq(_.options.slidesToShow)
2338
+ .addClass('slick-center');
2339
+
2340
+ }
2341
+
2342
+ }
2343
+
2344
+ _.$slides
2345
+ .eq(index)
2346
+ .addClass('slick-center');
2347
+
2348
+ } else {
2349
+
2350
+ if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
2351
+
2352
+ _.$slides
2353
+ .slice(index, index + _.options.slidesToShow)
2354
+ .addClass('slick-active')
2355
+ .attr('aria-hidden', 'false');
2356
+
2357
+ } else if (allSlides.length <= _.options.slidesToShow) {
2358
+
2359
+ allSlides
2360
+ .addClass('slick-active')
2361
+ .attr('aria-hidden', 'false');
2362
+
2363
+ } else {
2364
+
2365
+ remainder = _.slideCount % _.options.slidesToShow;
2366
+ indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
2367
+
2368
+ if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
2369
+
2370
+ allSlides
2371
+ .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
2372
+ .addClass('slick-active')
2373
+ .attr('aria-hidden', 'false');
2374
+
2375
+ } else {
2376
+
2377
+ allSlides
2378
+ .slice(indexOffset, indexOffset + _.options.slidesToShow)
2379
+ .addClass('slick-active')
2380
+ .attr('aria-hidden', 'false');
2381
+
2382
+ }
2383
+
2384
+ }
2385
+
2386
+ }
2387
+
2388
+ if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
2389
+ _.lazyLoad();
2390
+ }
2391
+ };
2392
+
2393
+ Slick.prototype.setupInfinite = function() {
2394
+
2395
+ var _ = this,
2396
+ i, slideIndex, infiniteCount;
2397
+
2398
+ if (_.options.fade === true) {
2399
+ _.options.centerMode = false;
2400
+ }
2401
+
2402
+ if (_.options.infinite === true && _.options.fade === false) {
2403
+
2404
+ slideIndex = null;
2405
+
2406
+ if (_.slideCount > _.options.slidesToShow) {
2407
+
2408
+ if (_.options.centerMode === true) {
2409
+ infiniteCount = _.options.slidesToShow + 1;
2410
+ } else {
2411
+ infiniteCount = _.options.slidesToShow;
2412
+ }
2413
+
2414
+ for (i = _.slideCount; i > (_.slideCount -
2415
+ infiniteCount); i -= 1) {
2416
+ slideIndex = i - 1;
2417
+ $(_.$slides[slideIndex]).clone(true).attr('id', '')
2418
+ .attr('data-slick-index', slideIndex - _.slideCount)
2419
+ .prependTo(_.$slideTrack).addClass('slick-cloned');
2420
+ }
2421
+ for (i = 0; i < infiniteCount + _.slideCount; i += 1) {
2422
+ slideIndex = i;
2423
+ $(_.$slides[slideIndex]).clone(true).attr('id', '')
2424
+ .attr('data-slick-index', slideIndex + _.slideCount)
2425
+ .appendTo(_.$slideTrack).addClass('slick-cloned');
2426
+ }
2427
+ _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
2428
+ $(this).attr('id', '');
2429
+ });
2430
+
2431
+ }
2432
+
2433
+ }
2434
+
2435
+ };
2436
+
2437
+ Slick.prototype.interrupt = function( toggle ) {
2438
+
2439
+ var _ = this;
2440
+
2441
+ if( !toggle ) {
2442
+ _.autoPlay();
2443
+ }
2444
+ _.interrupted = toggle;
2445
+
2446
+ };
2447
+
2448
+ Slick.prototype.selectHandler = function(event) {
2449
+
2450
+ var _ = this;
2451
+
2452
+ var targetElement =
2453
+ $(event.target).is('.slick-slide') ?
2454
+ $(event.target) :
2455
+ $(event.target).parents('.slick-slide');
2456
+
2457
+ var index = parseInt(targetElement.attr('data-slick-index'));
2458
+
2459
+ if (!index) index = 0;
2460
+
2461
+ if (_.slideCount <= _.options.slidesToShow) {
2462
+
2463
+ _.slideHandler(index, false, true);
2464
+ return;
2465
+
2466
+ }
2467
+
2468
+ _.slideHandler(index);
2469
+
2470
+ };
2471
+
2472
+ Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
2473
+
2474
+ var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
2475
+ _ = this, navTarget;
2476
+
2477
+ sync = sync || false;
2478
+
2479
+ if (_.animating === true && _.options.waitForAnimate === true) {
2480
+ return;
2481
+ }
2482
+
2483
+ if (_.options.fade === true && _.currentSlide === index) {
2484
+ return;
2485
+ }
2486
+
2487
+ if (sync === false) {
2488
+ _.asNavFor(index);
2489
+ }
2490
+
2491
+ targetSlide = index;
2492
+ targetLeft = _.getLeft(targetSlide);
2493
+ slideLeft = _.getLeft(_.currentSlide);
2494
+
2495
+ _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
2496
+
2497
+ if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
2498
+ if (_.options.fade === false) {
2499
+ targetSlide = _.currentSlide;
2500
+ if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2501
+ _.animateSlide(slideLeft, function() {
2502
+ _.postSlide(targetSlide);
2503
+ });
2504
+ } else {
2505
+ _.postSlide(targetSlide);
2506
+ }
2507
+ }
2508
+ return;
2509
+ } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
2510
+ if (_.options.fade === false) {
2511
+ targetSlide = _.currentSlide;
2512
+ if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2513
+ _.animateSlide(slideLeft, function() {
2514
+ _.postSlide(targetSlide);
2515
+ });
2516
+ } else {
2517
+ _.postSlide(targetSlide);
2518
+ }
2519
+ }
2520
+ return;
2521
+ }
2522
+
2523
+ if ( _.options.autoplay ) {
2524
+ clearInterval(_.autoPlayTimer);
2525
+ }
2526
+
2527
+ if (targetSlide < 0) {
2528
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
2529
+ animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
2530
+ } else {
2531
+ animSlide = _.slideCount + targetSlide;
2532
+ }
2533
+ } else if (targetSlide >= _.slideCount) {
2534
+ if (_.slideCount % _.options.slidesToScroll !== 0) {
2535
+ animSlide = 0;
2536
+ } else {
2537
+ animSlide = targetSlide - _.slideCount;
2538
+ }
2539
+ } else {
2540
+ animSlide = targetSlide;
2541
+ }
2542
+
2543
+ _.animating = true;
2544
+
2545
+ _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
2546
+
2547
+ oldSlide = _.currentSlide;
2548
+ _.currentSlide = animSlide;
2549
+
2550
+ _.setSlideClasses(_.currentSlide);
2551
+
2552
+ if ( _.options.asNavFor ) {
2553
+
2554
+ navTarget = _.getNavTarget();
2555
+ navTarget = navTarget.slick('getSlick');
2556
+
2557
+ if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
2558
+ navTarget.setSlideClasses(_.currentSlide);
2559
+ }
2560
+
2561
+ }
2562
+
2563
+ _.updateDots();
2564
+ _.updateArrows();
2565
+
2566
+ if (_.options.fade === true) {
2567
+ if (dontAnimate !== true) {
2568
+
2569
+ _.fadeSlideOut(oldSlide);
2570
+
2571
+ _.fadeSlide(animSlide, function() {
2572
+ _.postSlide(animSlide);
2573
+ });
2574
+
2575
+ } else {
2576
+ _.postSlide(animSlide);
2577
+ }
2578
+ _.animateHeight();
2579
+ return;
2580
+ }
2581
+
2582
+ if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
2583
+ _.animateSlide(targetLeft, function() {
2584
+ _.postSlide(animSlide);
2585
+ });
2586
+ } else {
2587
+ _.postSlide(animSlide);
2588
+ }
2589
+
2590
+ };
2591
+
2592
+ Slick.prototype.startLoad = function() {
2593
+
2594
+ var _ = this;
2595
+
2596
+ if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
2597
+
2598
+ _.$prevArrow.hide();
2599
+ _.$nextArrow.hide();
2600
+
2601
+ }
2602
+
2603
+ if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
2604
+
2605
+ _.$dots.hide();
2606
+
2607
+ }
2608
+
2609
+ _.$slider.addClass('slick-loading');
2610
+
2611
+ };
2612
+
2613
+ Slick.prototype.swipeDirection = function() {
2614
+
2615
+ var xDist, yDist, r, swipeAngle, _ = this;
2616
+
2617
+ xDist = _.touchObject.startX - _.touchObject.curX;
2618
+ yDist = _.touchObject.startY - _.touchObject.curY;
2619
+ r = Math.atan2(yDist, xDist);
2620
+
2621
+ swipeAngle = Math.round(r * 180 / Math.PI);
2622
+ if (swipeAngle < 0) {
2623
+ swipeAngle = 360 - Math.abs(swipeAngle);
2624
+ }
2625
+
2626
+ if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
2627
+ return (_.options.rtl === false ? 'left' : 'right');
2628
+ }
2629
+ if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
2630
+ return (_.options.rtl === false ? 'left' : 'right');
2631
+ }
2632
+ if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
2633
+ return (_.options.rtl === false ? 'right' : 'left');
2634
+ }
2635
+ if (_.options.verticalSwiping === true) {
2636
+ if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
2637
+ return 'down';
2638
+ } else {
2639
+ return 'up';
2640
+ }
2641
+ }
2642
+
2643
+ return 'vertical';
2644
+
2645
+ };
2646
+
2647
+ Slick.prototype.swipeEnd = function(event) {
2648
+
2649
+ var _ = this,
2650
+ slideCount,
2651
+ direction;
2652
+
2653
+ _.dragging = false;
2654
+ _.swiping = false;
2655
+
2656
+ if (_.scrolling) {
2657
+ _.scrolling = false;
2658
+ return false;
2659
+ }
2660
+
2661
+ _.interrupted = false;
2662
+ _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
2663
+
2664
+ if ( _.touchObject.curX === undefined ) {
2665
+ return false;
2666
+ }
2667
+
2668
+ if ( _.touchObject.edgeHit === true ) {
2669
+ _.$slider.trigger('edge', [_, _.swipeDirection() ]);
2670
+ }
2671
+
2672
+ if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
2673
+
2674
+ direction = _.swipeDirection();
2675
+
2676
+ switch ( direction ) {
2677
+
2678
+ case 'left':
2679
+ case 'down':
2680
+
2681
+ slideCount =
2682
+ _.options.swipeToSlide ?
2683
+ _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
2684
+ _.currentSlide + _.getSlideCount();
2685
+
2686
+ _.currentDirection = 0;
2687
+
2688
+ break;
2689
+
2690
+ case 'right':
2691
+ case 'up':
2692
+
2693
+ slideCount =
2694
+ _.options.swipeToSlide ?
2695
+ _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
2696
+ _.currentSlide - _.getSlideCount();
2697
+
2698
+ _.currentDirection = 1;
2699
+
2700
+ break;
2701
+
2702
+ default:
2703
+
2704
+
2705
+ }
2706
+
2707
+ if( direction != 'vertical' ) {
2708
+
2709
+ _.slideHandler( slideCount );
2710
+ _.touchObject = {};
2711
+ _.$slider.trigger('swipe', [_, direction ]);
2712
+
2713
+ }
2714
+
2715
+ } else {
2716
+
2717
+ if ( _.touchObject.startX !== _.touchObject.curX ) {
2718
+
2719
+ _.slideHandler( _.currentSlide );
2720
+ _.touchObject = {};
2721
+
2722
+ }
2723
+
2724
+ }
2725
+
2726
+ };
2727
+
2728
+ Slick.prototype.swipeHandler = function(event) {
2729
+
2730
+ var _ = this;
2731
+
2732
+ if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
2733
+ return;
2734
+ } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
2735
+ return;
2736
+ }
2737
+
2738
+ _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
2739
+ event.originalEvent.touches.length : 1;
2740
+
2741
+ _.touchObject.minSwipe = _.listWidth / _.options
2742
+ .touchThreshold;
2743
+
2744
+ if (_.options.verticalSwiping === true) {
2745
+ _.touchObject.minSwipe = _.listHeight / _.options
2746
+ .touchThreshold;
2747
+ }
2748
+
2749
+ switch (event.data.action) {
2750
+
2751
+ case 'start':
2752
+ _.swipeStart(event);
2753
+ break;
2754
+
2755
+ case 'move':
2756
+ _.swipeMove(event);
2757
+ break;
2758
+
2759
+ case 'end':
2760
+ _.swipeEnd(event);
2761
+ break;
2762
+
2763
+ }
2764
+
2765
+ };
2766
+
2767
+ Slick.prototype.swipeMove = function(event) {
2768
+
2769
+ var _ = this,
2770
+ edgeWasHit = false,
2771
+ curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
2772
+
2773
+ touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
2774
+
2775
+ if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
2776
+ return false;
2777
+ }
2778
+
2779
+ curLeft = _.getLeft(_.currentSlide);
2780
+
2781
+ _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
2782
+ _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
2783
+
2784
+ _.touchObject.swipeLength = Math.round(Math.sqrt(
2785
+ Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
2786
+
2787
+ verticalSwipeLength = Math.round(Math.sqrt(
2788
+ Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
2789
+
2790
+ if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
2791
+ _.scrolling = true;
2792
+ return false;
2793
+ }
2794
+
2795
+ if (_.options.verticalSwiping === true) {
2796
+ _.touchObject.swipeLength = verticalSwipeLength;
2797
+ }
2798
+
2799
+ swipeDirection = _.swipeDirection();
2800
+
2801
+ if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
2802
+ _.swiping = true;
2803
+ event.preventDefault();
2804
+ }
2805
+
2806
+ positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
2807
+ if (_.options.verticalSwiping === true) {
2808
+ positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
2809
+ }
2810
+
2811
+
2812
+ swipeLength = _.touchObject.swipeLength;
2813
+
2814
+ _.touchObject.edgeHit = false;
2815
+
2816
+ if (_.options.infinite === false) {
2817
+ if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
2818
+ swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
2819
+ _.touchObject.edgeHit = true;
2820
+ }
2821
+ }
2822
+
2823
+ if (_.options.vertical === false) {
2824
+ _.swipeLeft = curLeft + swipeLength * positionOffset;
2825
+ } else {
2826
+ _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
2827
+ }
2828
+ if (_.options.verticalSwiping === true) {
2829
+ _.swipeLeft = curLeft + swipeLength * positionOffset;
2830
+ }
2831
+
2832
+ if (_.options.fade === true || _.options.touchMove === false) {
2833
+ return false;
2834
+ }
2835
+
2836
+ if (_.animating === true) {
2837
+ _.swipeLeft = null;
2838
+ return false;
2839
+ }
2840
+
2841
+ _.setCSS(_.swipeLeft);
2842
+
2843
+ };
2844
+
2845
+ Slick.prototype.swipeStart = function(event) {
2846
+
2847
+ var _ = this,
2848
+ touches;
2849
+
2850
+ _.interrupted = true;
2851
+
2852
+ if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
2853
+ _.touchObject = {};
2854
+ return false;
2855
+ }
2856
+
2857
+ if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
2858
+ touches = event.originalEvent.touches[0];
2859
+ }
2860
+
2861
+ _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
2862
+ _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
2863
+
2864
+ _.dragging = true;
2865
+
2866
+ };
2867
+
2868
+ Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
2869
+
2870
+ var _ = this;
2871
+
2872
+ if (_.$slidesCache !== null) {
2873
+
2874
+ _.unload();
2875
+
2876
+ _.$slideTrack.children(this.options.slide).detach();
2877
+
2878
+ _.$slidesCache.appendTo(_.$slideTrack);
2879
+
2880
+ _.reinit();
2881
+
2882
+ }
2883
+
2884
+ };
2885
+
2886
+ Slick.prototype.unload = function() {
2887
+
2888
+ var _ = this;
2889
+
2890
+ $('.slick-cloned', _.$slider).remove();
2891
+
2892
+ if (_.$dots) {
2893
+ _.$dots.remove();
2894
+ }
2895
+
2896
+ if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
2897
+ _.$prevArrow.remove();
2898
+ }
2899
+
2900
+ if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
2901
+ _.$nextArrow.remove();
2902
+ }
2903
+
2904
+ _.$slides
2905
+ .removeClass('slick-slide slick-active slick-visible slick-current')
2906
+ .attr('aria-hidden', 'true')
2907
+ .css('width', '');
2908
+
2909
+ };
2910
+
2911
+ Slick.prototype.unslick = function(fromBreakpoint) {
2912
+
2913
+ var _ = this;
2914
+ _.$slider.trigger('unslick', [_, fromBreakpoint]);
2915
+ _.destroy();
2916
+
2917
+ };
2918
+
2919
+ Slick.prototype.updateArrows = function() {
2920
+
2921
+ var _ = this,
2922
+ centerOffset;
2923
+
2924
+ centerOffset = Math.floor(_.options.slidesToShow / 2);
2925
+
2926
+ if ( _.options.arrows === true &&
2927
+ _.slideCount > _.options.slidesToShow &&
2928
+ !_.options.infinite ) {
2929
+
2930
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2931
+ _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2932
+
2933
+ if (_.currentSlide === 0) {
2934
+
2935
+ _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2936
+ _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2937
+
2938
+ } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
2939
+
2940
+ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2941
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2942
+
2943
+ } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
2944
+
2945
+ _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2946
+ _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2947
+
2948
+ }
2949
+
2950
+ }
2951
+
2952
+ };
2953
+
2954
+ Slick.prototype.updateDots = function() {
2955
+
2956
+ var _ = this;
2957
+
2958
+ if (_.$dots !== null) {
2959
+
2960
+ _.$dots
2961
+ .find('li')
2962
+ .removeClass('slick-active')
2963
+ .end();
2964
+
2965
+ _.$dots
2966
+ .find('li')
2967
+ .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
2968
+ .addClass('slick-active');
2969
+
2970
+ }
2971
+
2972
+ };
2973
+
2974
+ Slick.prototype.visibility = function() {
2975
+
2976
+ var _ = this;
2977
+
2978
+ if ( _.options.autoplay ) {
2979
+
2980
+ if ( document[_.hidden] ) {
2981
+
2982
+ _.interrupted = true;
2983
+
2984
+ } else {
2985
+
2986
+ _.interrupted = false;
2987
+
2988
+ }
2989
+
2990
+ }
2991
+
2992
+ };
2993
+
2994
+ $.fn.slick = function() {
2995
+ var _ = this,
2996
+ opt = arguments[0],
2997
+ args = Array.prototype.slice.call(arguments, 1),
2998
+ l = _.length,
2999
+ i,
3000
+ ret;
3001
+ for (i = 0; i < l; i++) {
3002
+ if (typeof opt == 'object' || typeof opt == 'undefined')
3003
+ _[i].slick = new Slick(_[i], opt);
3004
+ else
3005
+ ret = _[i].slick[opt].apply(_[i].slick, args);
3006
+ if (typeof ret != 'undefined') return ret;
3007
+ }
3008
+ return _;
3009
+ };
3010
+
3011
+ }));
admin/partials/general-fields.php CHANGED
@@ -229,9 +229,9 @@ if(isset($google_detail['setting'])){
229
  </p>
230
  <?php
231
  if (isset($data['ga_id']) && $data['ga_id'] != '') {
232
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
233
  } else {
234
- echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
235
  }?>
236
  </div>
237
  </div>
@@ -247,9 +247,9 @@ if(isset($google_detail['setting'])){
247
  </p>
248
  <?php
249
  if (isset($data['gm_id']) && $data['gm_id'] != '') {
250
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
251
  } else {
252
- echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
253
  }?>
254
  </div>
255
  </div>
@@ -265,9 +265,9 @@ if(isset($google_detail['setting'])){
265
  </p>
266
  <?php
267
  if (isset($data['google_ads_id']) && $data['google_ads_id'] != '') {
268
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
269
  } else {
270
- echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
271
  }?>
272
  </div>
273
  </div>
@@ -283,9 +283,9 @@ if(isset($google_detail['setting'])){
283
  </p>
284
  <?php
285
  if (isset($data['google_merchant_id']) && $data['google_merchant_id'] != '') {
286
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
287
  } else {
288
- echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
289
  }?>
290
  </div>
291
  </div>
229
  </p>
230
  <?php
231
  if (isset($data['ga_id']) && $data['ga_id'] != '') {
232
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
233
  } else {
234
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
235
  }?>
236
  </div>
237
  </div>
247
  </p>
248
  <?php
249
  if (isset($data['gm_id']) && $data['gm_id'] != '') {
250
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
251
  } else {
252
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
253
  }?>
254
  </div>
255
  </div>
265
  </p>
266
  <?php
267
  if (isset($data['google_ads_id']) && $data['google_ads_id'] != '') {
268
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
269
  } else {
270
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
271
  }?>
272
  </div>
273
  </div>
283
  </p>
284
  <?php
285
  if (isset($data['google_merchant_id']) && $data['google_merchant_id'] != '') {
286
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
287
  } else {
288
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
289
  }?>
290
  </div>
291
  </div>
admin/partials/pricings.php CHANGED
@@ -10,7 +10,6 @@ class TVC_Pricings {
10
  public function __construct() {
11
  $this->TVC_Admin_Helper = new TVC_Admin_Helper();
12
  $this->customApiObj = new CustomApi();
13
- $this->url = $this->TVC_Admin_Helper->get_connect_url();
14
  $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
15
  $this->google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
16
  $this->TVC_Admin_Helper->add_spinner_html();
10
  public function __construct() {
11
  $this->TVC_Admin_Helper = new TVC_Admin_Helper();
12
  $this->customApiObj = new CustomApi();
 
13
  $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
14
  $this->google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
15
  $this->TVC_Admin_Helper->add_spinner_html();
enhanced-ecommerce-google-analytics.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: Enhanced E-commerce for Woocommerce store
17
  * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
18
  * Description: Automates eCommerce tracking in Google Analytics, dynamic remarkting in Google Ads, and provides complete Google Shopping features.
19
- * Version: 4.0.1
20
  * Author: Tatvic
21
  * Author URI: www.tatvic.com
22
  * License: GPL-2.0+
@@ -24,7 +24,7 @@
24
  * Text Domain: www.tatvic.com
25
  * Domain Path: /languages
26
  * WC requires at least: 1.4.1
27
- * WC tested up to: 5.0.0
28
  */
29
 
30
  /**
@@ -38,7 +38,7 @@ if ( ! defined( 'WPINC' ) ) {
38
  * Start at version 1.0.0 and use SemVer - https://semver.org
39
  * Rename this for your plugin and update it as you release new versions.
40
  */
41
- define( 'PLUGIN_TVC_VERSION', '4.0.1' );
42
  $fullName = plugin_basename( __FILE__ );
43
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
44
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
@@ -57,7 +57,7 @@ if ( ! defined( 'TVC_API_CALL_URL' ) ) {
57
  define( 'TVC_API_CALL_URL', 'https://connect.tatvic.com/laravelapi/public/api' );
58
  }
59
  if ( ! defined( 'TVC_AUTH_CONNECT_URL' ) ) {
60
- define( 'TVC_AUTH_CONNECT_URL', 'estorenew.tatvic.com' );
61
  }
62
 
63
  if(!defined('TVC_Admin_Helper')){
@@ -71,6 +71,7 @@ if(!defined('TVC_Admin_Helper')){
71
  function activate_enhanced_ecommerce_google_analytics() {
72
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics-activator.php';
73
  Enhanced_Ecommerce_Google_Analytics_Activator::activate();
 
74
  }
75
 
76
  /**
16
  * Plugin Name: Enhanced E-commerce for Woocommerce store
17
  * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
18
  * Description: Automates eCommerce tracking in Google Analytics, dynamic remarkting in Google Ads, and provides complete Google Shopping features.
19
+ * Version: 4.1.0
20
  * Author: Tatvic
21
  * Author URI: www.tatvic.com
22
  * License: GPL-2.0+
24
  * Text Domain: www.tatvic.com
25
  * Domain Path: /languages
26
  * WC requires at least: 1.4.1
27
+ * WC tested up to: 5.6.0
28
  */
29
 
30
  /**
38
  * Start at version 1.0.0 and use SemVer - https://semver.org
39
  * Rename this for your plugin and update it as you release new versions.
40
  */
41
+ define( 'PLUGIN_TVC_VERSION', '4.1.0' );
42
  $fullName = plugin_basename( __FILE__ );
43
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
44
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
57
  define( 'TVC_API_CALL_URL', 'https://connect.tatvic.com/laravelapi/public/api' );
58
  }
59
  if ( ! defined( 'TVC_AUTH_CONNECT_URL' ) ) {
60
+ define( 'TVC_AUTH_CONNECT_URL', 'conversios.io' );
61
  }
62
 
63
  if(!defined('TVC_Admin_Helper')){
71
  function activate_enhanced_ecommerce_google_analytics() {
72
  require_once plugin_dir_path( __FILE__ ) . 'includes/class-enhanced-ecommerce-google-analytics-activator.php';
73
  Enhanced_Ecommerce_Google_Analytics_Activator::activate();
74
+ set_transient( '_conversios_activation_redirect', 1, 30 );
75
  }
76
 
77
  /**
includes/class-enhanced-ecommerce-google-analytics.php CHANGED
@@ -99,6 +99,8 @@ class Enhanced_Ecommerce_Google_Analytics {
99
  */
100
  private function load_dependencies() {
101
 
 
 
102
  /**
103
  * The class responsible for orchestrating the actions and filters of the
104
  * core plugin.
@@ -124,6 +126,9 @@ class Enhanced_Ecommerce_Google_Analytics {
124
 
125
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-enhanced-ecommerce-google-analytics-settings.php';
126
 
 
 
 
127
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-tvc-admin-auto-product-sync-helper.php';
128
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-survey.php';
129
 
@@ -273,7 +278,7 @@ class Enhanced_Ecommerce_Google_Analytics {
273
  $links[] = '<a href="' . get_admin_url(null, $setting_url) . '">Settings</a>';
274
 
275
  $links[] = '<a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq" target="_blank">FAQ</a>';
276
- $links[] = '<a href="http://plugins.tatvic.com/help-center/Installation-Manual.pdf" target="_blank">Documentation</a>';
277
  $links[] = '<a href="https://conversios.io/pricings/?utm_source=EE+Plugin+User+Interface&utm_medium=Plugins+Listing+Page+Upgrade+to+Premium&utm_campaign=Upsell+at+Conversios" target="_blank"><b>Upgrade to Premium</b></a>';
278
  $links['deactivate'] = $deactivate_link;
279
  return $links;
99
  */
100
  private function load_dependencies() {
101
 
102
+
103
+
104
  /**
105
  * The class responsible for orchestrating the actions and filters of the
106
  * core plugin.
126
 
127
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-enhanced-ecommerce-google-analytics-settings.php';
128
 
129
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-conversios-onboarding.php';
130
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/helper/class-onboarding-helper.php';
131
+
132
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-tvc-admin-auto-product-sync-helper.php';
133
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-survey.php';
134
 
278
  $links[] = '<a href="' . get_admin_url(null, $setting_url) . '">Settings</a>';
279
 
280
  $links[] = '<a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq" target="_blank">FAQ</a>';
281
+ $links[] = '<a href="https://conversios.io/help-center/Installation-Manual.pdf" target="_blank">Documentation</a>';
282
  $links[] = '<a href="https://conversios.io/pricings/?utm_source=EE+Plugin+User+Interface&utm_medium=Plugins+Listing+Page+Upgrade+to+Premium&utm_campaign=Upsell+at+Conversios" target="_blank"><b>Upgrade to Premium</b></a>';
283
  $links['deactivate'] = $deactivate_link;
284
  return $links;
includes/setup/CustomApi.php CHANGED
@@ -98,7 +98,7 @@ class CustomApi{
98
  }
99
  }
100
 
101
- public function getGoogleAnalyticDetail() {
102
  try {
103
  $url = $this->apiDomain . '/customer-subscriptions/subscription-detail';
104
  $header = array(
@@ -106,14 +106,12 @@ class CustomApi{
106
  "content-type: application/json"
107
  );
108
  $ee_options_data = unserialize(get_option('ee_options'));
109
- if(isset($ee_options_data['subscription_id'])) {
110
- $ee_subscription_id = $ee_options_data['subscription_id'];
111
- } else {
112
- $ee_subscription_id = null;
113
  }
114
  $actual_link = get_site_url();
115
  $data = [
116
- 'subscription_id' => $ee_subscription_id,
117
  'domain' => $actual_link
118
  ];
119
  $postData = json_encode($data);
@@ -483,7 +481,7 @@ class CustomApi{
483
  "AccessToken:".$this->generateAccessToken($this->get_tvc_access_token(), $this->get_tvc_refresh_token())
484
  );
485
  $curl_url = $this->apiDomain . "/products/batch";
486
- $postData = json_encode($data);
487
  $ch = curl_init();
488
  curl_setopt_array($ch, array(
489
  CURLOPT_URL => esc_url($curl_url),
98
  }
99
  }
100
 
101
+ public function getGoogleAnalyticDetail($subscription_id = null) {
102
  try {
103
  $url = $this->apiDomain . '/customer-subscriptions/subscription-detail';
104
  $header = array(
106
  "content-type: application/json"
107
  );
108
  $ee_options_data = unserialize(get_option('ee_options'));
109
+ if($subscription_id == null && isset($ee_options_data['subscription_id'])) {
110
+ $subscription_id = $ee_options_data['subscription_id'];
 
 
111
  }
112
  $actual_link = get_site_url();
113
  $data = [
114
+ 'subscription_id' => $subscription_id,
115
  'domain' => $actual_link
116
  ];
117
  $postData = json_encode($data);
481
  "AccessToken:".$this->generateAccessToken($this->get_tvc_access_token(), $this->get_tvc_refresh_token())
482
  );
483
  $curl_url = $this->apiDomain . "/products/batch";
484
+ $postData = json_encode($data);
485
  $ch = curl_init();
486
  curl_setopt_array($ch, array(
487
  CURLOPT_URL => esc_url($curl_url),
includes/setup/account.php CHANGED
@@ -8,7 +8,6 @@ class TVC_Account {
8
  public function __construct() {
9
  $this->TVC_Admin_Helper = new TVC_Admin_Helper();
10
  $this->customApiObj = new CustomApi();
11
- $this->url = $this->TVC_Admin_Helper->get_connect_url();
12
  $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
13
  $this->google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
14
  $this->TVC_Admin_Helper->add_spinner_html();
8
  public function __construct() {
9
  $this->TVC_Admin_Helper = new TVC_Admin_Helper();
10
  $this->customApiObj = new CustomApi();
 
11
  $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
12
  $this->google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
13
  $this->TVC_Admin_Helper->add_spinner_html();
includes/setup/google-ads.php CHANGED
@@ -9,7 +9,7 @@ class GoogleAds {
9
  public function __construct($theURL = '') {
10
  $this->TVC_Admin_Helper = new TVC_Admin_Helper();
11
  $this->customApiObj = new CustomApi();
12
- $this->url = $this->TVC_Admin_Helper->get_connect_url();
13
  $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
14
  $this->google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
15
  $this->plan_id = $this->TVC_Admin_Helper->get_plan_id();
@@ -86,9 +86,9 @@ class GoogleAds {
86
  </p>
87
  <?php
88
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') {
89
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
90
  } else {
91
- echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
92
  }?>
93
  </div>
94
  </div>
@@ -105,9 +105,9 @@ class GoogleAds {
105
  </p>
106
  <?php
107
  if(isset($googleDetail->property_id) && $googleDetail->property_id != ''){
108
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
109
  }else{
110
- echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
111
  } ?>
112
  </div>
113
  </div>
9
  public function __construct($theURL = '') {
10
  $this->TVC_Admin_Helper = new TVC_Admin_Helper();
11
  $this->customApiObj = new CustomApi();
12
+ $this->url = $this->TVC_Admin_Helper->get_onboarding_page_url();
13
  $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
14
  $this->google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
15
  $this->plan_id = $this->TVC_Admin_Helper->get_plan_id();
86
  </p>
87
  <?php
88
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') {
89
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
90
  } else {
91
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
92
  }?>
93
  </div>
94
  </div>
105
  </p>
106
  <?php
107
  if(isset($googleDetail->property_id) && $googleDetail->property_id != ''){
108
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
109
  }else{
110
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
111
  } ?>
112
  </div>
113
  </div>
includes/setup/google-shopping-feed-gaa-config.php CHANGED
@@ -11,7 +11,7 @@ class GAAConfiguration {
11
  $this->TVCProductSyncHelper = new TVCProductSyncHelper();
12
  $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
13
  $this->site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
14
- $this->url = $this->TVC_Admin_Helper->get_connect_url();
15
  $this->html_run();
16
  }
17
  public function includes() {
@@ -73,9 +73,9 @@ class GAAConfiguration {
73
  <p class="ga-text"><?php echo ((isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '') ? $googleDetail->google_merchant_center_id : '<span>Get started</span>'); ?></p>
74
  <?php
75
  if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != ''){
76
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
77
  }else{
78
- echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
79
  }?>
80
  </div>
81
  </div>
@@ -89,9 +89,9 @@ class GAAConfiguration {
89
  <p class="ga-text"><?php echo (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '' ? $googleDetail->google_ads_id : '<span>Get started</span>');?></p>
90
  <?php
91
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') {
92
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
93
  } else {
94
- echo '<p class="ga-text text-right"><a href="#" data-toggle="modal" data-target="#tvc_google_connect" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
95
  } ?>
96
  </div>
97
  </div>
11
  $this->TVCProductSyncHelper = new TVCProductSyncHelper();
12
  $this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
13
  $this->site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
14
+ $this->url = $this->TVC_Admin_Helper->get_onboarding_page_url();
15
  $this->html_run();
16
  }
17
  public function includes() {
73
  <p class="ga-text"><?php echo ((isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '') ? $googleDetail->google_merchant_center_id : '<span>Get started</span>'); ?></p>
74
  <?php
75
  if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != ''){
76
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
77
  }else{
78
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
79
  }?>
80
  </div>
81
  </div>
89
  <p class="ga-text"><?php echo (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '' ? $googleDetail->google_ads_id : '<span>Get started</span>');?></p>
90
  <?php
91
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') {
92
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
93
  } else {
94
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
95
  } ?>
96
  </div>
97
  </div>
includes/setup/help-html.php CHANGED
@@ -15,7 +15,7 @@ function get_connect_google_popup_html(){
15
  <p>Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.</p>
16
  </div>
17
  <div class="modal-footer">
18
- <a target="_blank" class="ee-oauth-container btn darken-4 white black-text" href="'. $TVC_Admin_Helper->get_connect_url().'" style="text-transform:none; margin: 0 auto;">
19
  <p style="font-size: inherit; margin-top:5px;"><img width="20px" style="margin-right:8px" alt="Google sign-in" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />Sign In With Google</p>
20
  </a>
21
  </div>
@@ -38,7 +38,7 @@ function get_connect_google_popup_html_to_active_licence(){
38
  <p>Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.</p>
39
  </div>
40
  <div class="modal-footer">
41
- <a target="_blank" class="ee-oauth-container btn darken-4 white black-text" href="'. $TVC_Admin_Helper->get_connect_url().'" style="text-transform:none; margin: 0 auto;">
42
  <p style="font-size: inherit; margin-top:5px;"><img width="20px" style="margin-right:8px" alt="Google sign-in" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />Sign In With Google</p>
43
  </a>
44
  </div>
@@ -178,7 +178,7 @@ function get_tvc_google_ads_help_html(){
178
  </nav>
179
  </div>
180
  <div class="tvc-footer-links">
181
- <a target="_blank" href="http://plugins.tatvic.com/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="http://plugins.tatvic.com/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
182
  </div>
183
  <script>
184
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
@@ -261,7 +261,7 @@ function get_tvc_help_html(){
261
  </nav>
262
  </div>
263
  <div class="tvc-footer-links">
264
- <a target="_blank" href="http://plugins.tatvic.com/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="http://plugins.tatvic.com/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
265
  </div>
266
  <script>
267
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
@@ -362,7 +362,7 @@ function get_tvc_google_ga_sidebar(){
362
  </nav>
363
  </div>
364
  <div class="tvc-footer-links">
365
- <a target="_blank" href="http://plugins.tatvic.com/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="http://plugins.tatvic.com/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
366
  </div>
367
  <script>
368
  $(".tvc-b-value-slider").slick({
15
  <p>Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.</p>
16
  </div>
17
  <div class="modal-footer">
18
+ <a class="ee-oauth-container btn darken-4 white black-text" href="'. $TVC_Admin_Helper->get_onboarding_page_url().'" style="text-transform:none; margin: 0 auto;">
19
  <p style="font-size: inherit; margin-top:5px;"><img width="20px" style="margin-right:8px" alt="Google sign-in" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />Sign In With Google</p>
20
  </a>
21
  </div>
38
  <p>Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.</p>
39
  </div>
40
  <div class="modal-footer">
41
+ <a class="ee-oauth-container btn darken-4 white black-text" href="'. $TVC_Admin_Helper->get_onboarding_page_url().'" style="text-transform:none; margin: 0 auto;">
42
  <p style="font-size: inherit; margin-top:5px;"><img width="20px" style="margin-right:8px" alt="Google sign-in" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />Sign In With Google</p>
43
  </a>
44
  </div>
178
  </nav>
179
  </div>
180
  <div class="tvc-footer-links">
181
+ <a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="https://conversios.io/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
182
  </div>
183
  <script>
184
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
261
  </nav>
262
  </div>
263
  <div class="tvc-footer-links">
264
+ <a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="https://conversios.io/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
265
  </div>
266
  <script>
267
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
362
  </nav>
363
  </div>
364
  <div class="tvc-footer-links">
365
+ <a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="https://conversios.io/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
366
  </div>
367
  <script>
368
  $(".tvc-b-value-slider").slick({
includes/setup/json/country_reward.json ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ [
3
+ {"name":"Algeria","price": "USD 45.00"},
4
+ {"name":"Argentina","price": "ARS 2,300.00"},
5
+ {"name":"Australia","price": "AUD 150.00"},
6
+ {"name":"Austria","price": "EUR 120.00"},
7
+ {"name":"Bahrain","price": "USD 120.00"},
8
+ {"name":"Belarus","price": "USD 90.00"},
9
+ {"name":"Belgium","price": "EUR 120.00"},
10
+ {"name":"Bolivia","price": "USD 75.00"},
11
+ {"name":"Bosnia and Herzegovina","price": "EUR 45.00"},
12
+ {"name":"Brazil","price": "BRL 225.00"},
13
+ {"name":"Bulgaria","price": "BRL 225.00"},
14
+ {"name":"Canada","price": "CAD 150.00"},
15
+ {"name":"Chile","price": "USD 75.00"},
16
+ {"name":"Colombia","price": "USD 75.00"},
17
+ {"name":"Costa Rica","price": "USD 75.00"},
18
+ {"name":"Croatia","price": "HRK 600.00"},
19
+ {"name":"Cyprus","price": "EUR 120.00"},
20
+ {"name":"Czech Republic","price": "CZK 1,500.00"},
21
+ {"name":"Denmark","price": "DKK 900.00"},
22
+ {"name":"Dominican Republic","price": "USD 75.00"},
23
+ {"name":"Ecuador","price": "USD 75.00"},
24
+ {"name":"Egypt","price": "EGP 225.00"},
25
+ {"name":"El Salvador","price": "USD 75.00"},
26
+ {"name":"Estonia","price": "EUR 60.00"},
27
+ {"name":"Finland","price": "EUR 120.00"},
28
+ {"name":"France","price": "EUR 120.00"},
29
+ {"name":"Germany","price": "EUR 120.00"},
30
+ {"name":"Greece","price": "EUR 120.00"},
31
+ {"name":"Guatemala","price": "USD 75.00"},
32
+ {"name":"Honduras","price": "USD 75.00"},
33
+ {"name":"Hong Kong","price": "HKD 600.00"},
34
+ {"name":"Hungary","price": "HUF 22,500.00"},
35
+ {"name":"Iceland","price": "USD 120.00"},
36
+ {"name":"India","price": "INR 3,000.00"},
37
+ {"name":"Indonesia","price": "IDR 675,000.00"},
38
+ {"name":"Ireland","price": "EUR 120.00"},
39
+ {"name":"Israel","price": "ILS 450.00"},
40
+ {"name":"Italy","price": "EUR 120.00"},
41
+ {"name":"Japan","price": "JPY 11,250"},
42
+ {"name":"Jordan","price": "USD 120.00"},
43
+ {"name":"Kazakhstan","price": "USD 90.00"},
44
+ {"name":"Kuwait","price": "USD 120.00"},
45
+ {"name":"Latvia","price": "EUR 60.00"},
46
+ {"name":"Lebanon","price": "USD 120.00"},
47
+ {"name":"Libya","price": "USD 45.00"},
48
+ {"name":"Lithuania","price": "EUR 60.00"},
49
+ {"name":"Luxembourg","price": "EUR 120.00"},
50
+ {"name":"Malaysia","price": "MYR 225.00"},
51
+ {"name":"Malta","price": "EUR 120.00"},
52
+ {"name":"Mexico","price": "MXN 1,350.00"},
53
+ {"name":"Montenegro","price": "EUR 60.00"},
54
+ {"name":"Morocco","price": "USD 45.00"},
55
+ {"name":"Netherlands","price": "EUR 120.00"},
56
+ {"name":"New Zealand","price": "NZD 150.00"},
57
+ {"name":"Nicaragua","price": "USD 75.00"},
58
+ {"name":"Nigeria","price": "USD 45.00"},
59
+ {"name":"North Macedonia","price": "USD 45.00"},
60
+ {"name":"Norway","price": "NOK 1,125.00"},
61
+ {"name":"Oman","price": "USD 120.00"},
62
+ {"name":"Pakistan","price": "USD 70.00"},
63
+ {"name":"Palestine","price": "USD 120.00"},
64
+ {"name":"Panama","price": "USD 75.00"},
65
+ {"name":"Paraguay","price": "USD 75.00"},
66
+ {"name":"Peru","price": "USD 75.00"},
67
+ {"name":"Philippines","price": "PHP 3,000.00"},
68
+ {"name":"Poland","price": "PLN 375.00"},
69
+ {"name":"Portugal","price": "EUR 120.00"},
70
+ {"name":"Puerto Rico","price": "USD 75.00"},
71
+ {"name":"Qatar","price": "USD 120.00"},
72
+ {"name":"Romania","price": "RON 300.00"},
73
+ {"name":"Russia","price": "RUB 3,000.00"},
74
+ {"name":"Saudi Arabia","price": "SAR 450.00"},
75
+ {"name":"Serbia","price": "EUR 60.00"},
76
+ {"name":"Singapore","price": "SGD 120.00"},
77
+ {"name":"Slovakia","price": "EUR 120.00"},
78
+ {"name":"South Africa","price": "ZAR 900.00"},
79
+ {"name":"Spain","price": "EUR 120.00"},
80
+ {"name":"Sri Lanka","price": "USD 70.00"},
81
+ {"name":"Sweden","price": "SEK 1,125.00"},
82
+ {"name":"Switzerland","price": "CHF 150.00"},
83
+ {"name":"Taiwan","price": "TWD 2,250.00"},
84
+ {"name":"Thailand","price": "THB 2,250.00"},
85
+ {"name":"Tunisia","price": "USD 45.00"},
86
+ {"name":"Turkey","price": "TRY 150.00"},
87
+ {"name":"Ukraine","price": "UAH 2,000.00"},
88
+ {"name":"United Arab Emirates","price": "AED 450.00"},
89
+ {"name":"United Kingdom","price": "GBP 120.00"},
90
+ {"name":"United States","price": "USD 150.00"},
91
+ {"name":"Uruguay","price": "USD 75.00"},
92
+ {"name":"Venezuela","price": "USD 75.00"},
93
+ {"name":"Vietnam","price": "VND 1,350,000"}
94
+ ]
includes/setup/json/merchant-info.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ {
2
+ "merchantId": 256922349,
3
+ "accountSampleUser": "",
4
+ "accountSampleAdWordsCID": 0
5
+ }
readme.txt CHANGED
@@ -8,15 +8,13 @@ Author: Tatvic
8
  Requires at least: 1.4.1
9
  Tested up to: 5.8
10
  Requires PHP: 5.6 or Higher
11
- Stable tag: 4.0.1
12
- Version: 4.0.1
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
16
  Automates eCommerce tracking in Google Analytics and the complete Google Shopping solution with dynamic remarketing tags.
17
 
18
- https://youtu.be/s-L6VvY0sVw?rel=0
19
-
20
  == Product Description ==
21
 
22
  ###GOOGLE ANALYTICS PLUGIN FOR WOOCOMMERCE
@@ -56,9 +54,9 @@ Achieve all this by connecting Google Analytics, Google Ads, and Google Merchant
56
 
57
  * NO CODING REQUIRED or NO NEED TO HIRE A DEVELOPER for the setup. You can configure the plugin instantly in under 5 minutes and with a few clicks from your WordPress backend.
58
 
59
- <a target="_blank" href="http://plugins.tatvic.com/help-center/Installation-Manual.pdf">Here is how you can configure the plugin without any hassle and start scaling your eCommerce business faster.</a>
60
 
61
- Create a new Google Ads account using the plugin and get a Google ads coupon upto USD 150 (amount differs based on the country you are in) on the spends you make in the first 31 days. <a target="_blank" href ="http://plugins.tatvic.com/help-center/Google-Spend-Match.pdf">See terms and condition.</a>
62
 
63
  ###AN INTERESTING AMALGAM OF - GOOGLE ANALYTICS + ENHANCED ECOMMERCE REPORTS - THE BEST YOU CAN GET!
64
 
@@ -391,6 +389,10 @@ You can resolve the duplication of data by removing the manually implemented GA
391
 
392
  == Changelog ==
393
 
 
 
 
 
394
  = 4.0.1 - 06/08/2021 =
395
  * We have fixed Google Ads Conversion Tracking issue (Pro)
396
 
8
  Requires at least: 1.4.1
9
  Tested up to: 5.8
10
  Requires PHP: 5.6 or Higher
11
+ Stable tag: 4.1.0
12
+ Version: 4.1.0
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
16
  Automates eCommerce tracking in Google Analytics and the complete Google Shopping solution with dynamic remarketing tags.
17
 
 
 
18
  == Product Description ==
19
 
20
  ###GOOGLE ANALYTICS PLUGIN FOR WOOCOMMERCE
54
 
55
  * NO CODING REQUIRED or NO NEED TO HIRE A DEVELOPER for the setup. You can configure the plugin instantly in under 5 minutes and with a few clicks from your WordPress backend.
56
 
57
+ <a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf">Here is how you can configure the plugin without any hassle and start scaling your eCommerce business faster.</a>
58
 
59
+ Create a new Google Ads account using the plugin and get a Google ads coupon upto USD 150 (amount differs based on the country you are in) on the spends you make in the first 31 days. <a target="_blank" href ="https://conversios.io/help-center/Google-Spend-Match.pdf">See terms and condition.</a>
60
 
61
  ###AN INTERESTING AMALGAM OF - GOOGLE ANALYTICS + ENHANCED ECOMMERCE REPORTS - THE BEST YOU CAN GET!
62
 
389
 
390
  == Changelog ==
391
 
392
+ = 4.1.0 - 24/08/2021 =
393
+
394
+ * Now, users can configure their Google accounts without leaving the WordPress interface. We have made plugin set up flow as seamless as possible.
395
+
396
  = 4.0.1 - 06/08/2021 =
397
  * We have fixed Google Ads Conversion Tracking issue (Pro)
398