WordPress Online Booking and Scheduling Plugin – Bookly - Version 16.7

Version Description

Download this release

Release Info

Developer Ladela
Plugin Icon 128x128 WordPress Online Booking and Scheduling Plugin – Bookly
Version 16.7
Comparing to
See all releases

Code changes from version 16.6 to 16.7

backend/components/gutenberg/bookly_form/Block.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Backend\Components\Gutenberg\BooklyForm;
3
+
4
+ use Bookly\Lib;
5
+
6
+ /**
7
+ * Class Block
8
+ * @package Bookly\Backend\Components\Gutenberg\BooklyForm
9
+ */
10
+ class Block extends Lib\Base\Block
11
+ {
12
+ /**
13
+ * @inheritdoc
14
+ */
15
+ public static function registerBlockType()
16
+ {
17
+ self::enqueueScripts( array(
18
+ 'module' => array(
19
+ 'js/booking-form-block.js' => array( 'jquery', 'wp-blocks', 'wp-components', 'wp-element', 'wp-editor' ),
20
+ ),
21
+ ) );
22
+
23
+ wp_localize_script( 'bookly-booking-form-block.js', 'BooklyFormL10n', array(
24
+ 'casest' => Lib\Config::getCaSeSt(),
25
+ 'block' => array(
26
+ 'title' => __( 'Bookly - Booking form', 'bookly' ),
27
+ 'description' => __( 'A custom block for displaying booking form', 'bookly' ),
28
+ ),
29
+ 'selectLocation' => __( 'Select location', 'bookly' ),
30
+ 'selectCategory' => __( 'Select category', 'bookly' ),
31
+ 'any' => __( 'Any', 'bookly' ),
32
+ 'formFields' => __( 'Form fields', 'bookly' ),
33
+ 'location' => __( 'Default value for location', 'bookly' ),
34
+ 'category' => __( 'Default value for category', 'bookly' ),
35
+ 'service' => __( 'Default value for service', 'bookly' ),
36
+ 'staff' => __( 'Default value for employee', 'bookly' ),
37
+ 'nop' => __( 'Number of persons', 'bookly' ),
38
+ 'quantity' => __( 'Quantity', 'bookly' ),
39
+ 'date' => __( 'Date', 'bookly' ),
40
+ 'weekDays' => __( 'Week days', 'bookly' ),
41
+ 'timeRange' => __( 'Time range', 'bookly' ),
42
+ 'hide' => __( 'hide', 'bookly' ),
43
+ 'fields' => __( 'Fields', 'bookly' ),
44
+ 'duration' => __( 'Duration', 'bookly' ),
45
+ 'locationCustom' => (int) Lib\Proxy\Locations::servicesPerLocationAllowed(),
46
+ 'addons' => array(
47
+ 'customDuration' => (int) Lib\Config::customDurationActive(),
48
+ 'groupBooking' => (int) Lib\Config::groupBookingActive(),
49
+ 'locations' => (int) Lib\Config::locationsActive(),
50
+ 'multiplyAppointments' => (int) Lib\Config::multiplyAppointmentsActive(),
51
+ ),
52
+ ) );
53
+
54
+ register_block_type( 'bookly/form-block', array(
55
+ 'editor_script' => 'bookly-booking-form-block.js',
56
+ ) );
57
+ }
58
+ }
backend/components/gutenberg/bookly_form/resources/js/booking-form-block.js ADDED
@@ -0,0 +1,619 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function (wp, $) {
2
+ var el = wp.element.createElement,
3
+ components = wp.components,
4
+ blockControls = wp.editor.BlockControls,
5
+ inspectorControls = wp.editor.InspectorControls
6
+ ;
7
+
8
+ wp.blocks.registerBlockType('bookly/form', {
9
+ title: BooklyFormL10n.block.title,
10
+ description: BooklyFormL10n.block.description,
11
+ icon: el('svg', { width: '20', height: '20', viewBox: "0 0 64 64" },
12
+ el('path', {style: {fill: "rgb(0, 0, 0)"}, d: "M 8 0 H 56 A 8 8 0 0 1 64 8 V 22 H 0 V 8 A 8 8 0 0 1 8 0 Z"}),
13
+ el('path', {style: {fill: "rgb(244, 102, 47)"}, d: "M 0 22 H 64 V 56 A 8 8 0 0 1 56 64 H 8 A 8 8 0 0 1 0 56 V 22 Z"}),
14
+ el('rect', {style: {fill: "rgb(98, 86, 86)"}, x: 6, y: 6, width: 52, height: 10}),
15
+ el('rect', {style: {fill: "rgb(242, 227, 227)"}, x: 12, y: 30, width: 40, height: 24}),
16
+ ),
17
+ category: 'bookly-blocks',
18
+ keywords: [
19
+ 'bookly',
20
+ 'booking',
21
+ ],
22
+ supports: {
23
+ customClassName: false,
24
+ html: false
25
+ },
26
+ attributes: {
27
+ short_code: {
28
+ type: 'string',
29
+ default: '[bookly-form]'
30
+ },
31
+ location:{
32
+ type: 'string',
33
+ default: ''
34
+ },
35
+ category:{
36
+ type: 'string',
37
+ default: ''
38
+ },
39
+ service:{
40
+ type: 'string',
41
+ default: ''
42
+ },
43
+ staff:{
44
+ type: 'string',
45
+ default: ''
46
+ },
47
+ hide_locations: {
48
+ type: 'boolean',
49
+ default: false
50
+ },
51
+ hide_category: {
52
+ type: 'boolean',
53
+ default: false
54
+ },
55
+ hide_services: {
56
+ type: 'boolean',
57
+ default: false
58
+ },
59
+ hide_service_duration: {
60
+ type: 'boolean',
61
+ default: false
62
+ },
63
+ hide_nop: {
64
+ type: 'boolean',
65
+ default: true
66
+ },
67
+ hide_staff: {
68
+ type: 'boolean',
69
+ default: false
70
+ },
71
+ hide_quantity: {
72
+ type: 'boolean',
73
+ default: false
74
+ },
75
+ hide_date: {
76
+ type: 'boolean',
77
+ default: false
78
+ },
79
+ hide_week_days: {
80
+ type: 'boolean',
81
+ default: false
82
+ },
83
+ hide_time_range: {
84
+ type: 'boolean',
85
+ default: false
86
+ }
87
+ },
88
+ edit: function (props) {
89
+ var inspectorElements = [],
90
+ $select_location = $('#bookly-js-select-location'),
91
+ $select_category = $('#bookly-js-select-category'),
92
+ $select_service = $('#bookly-js-select-service'),
93
+ $select_employee = $('#bookly-js-select-staff'),
94
+ attributes = props.attributes,
95
+ staff = BooklyFormL10n.casest.staff,
96
+ services = BooklyFormL10n.casest.services,
97
+ locations = BooklyFormL10n.casest.locations,
98
+ categories = BooklyFormL10n.casest.categories,
99
+ options = []
100
+ ;
101
+ options['locations'] = [{value: '', label: BooklyFormL10n.selectLocation}];
102
+ options['categories'] = [{value: '', label: BooklyFormL10n.selectCategory}];
103
+ options['services'] = [{value: '', label: BooklyFormL10n.any}];
104
+ options['staff'] = [{value: '', label: BooklyFormL10n.any}];
105
+
106
+ function getOptions(data) {
107
+ var options = [];
108
+ data = Object.keys(data).map(function (key) { return data[key]; });
109
+
110
+ data.sort(function (a, b) {
111
+ if (parseInt(a.pos) < parseInt(b.pos))
112
+ return -1;
113
+ if (parseInt(a.pos) > parseInt(b.pos))
114
+ return 1;
115
+ return 0;
116
+ });
117
+
118
+ data.forEach(function (element) {
119
+ options.push({value: element.id, label: element.name});
120
+ });
121
+
122
+ return options;
123
+ }
124
+
125
+ function setSelect($select, data, value) {
126
+ // reset select
127
+ $('option:not([value=""])', $select).remove();
128
+ // and fill the new data
129
+ var docFragment = document.createDocumentFragment();
130
+
131
+ function valuesToArray(obj) {
132
+ return Object.keys(obj).map(function (key) { return obj[key]; });
133
+ }
134
+
135
+ function compare(a, b) {
136
+ if (parseInt(a.pos) < parseInt(b.pos))
137
+ return -1;
138
+ if (parseInt(a.pos) > parseInt(b.pos))
139
+ return 1;
140
+ return 0;
141
+ }
142
+
143
+ // sort select by position
144
+ data = valuesToArray(data).sort(compare);
145
+
146
+ $.each(data, function(key, object) {
147
+ var option = document.createElement('option');
148
+ option.value = object.id;
149
+ option.text = object.name;
150
+ docFragment.appendChild(option);
151
+ });
152
+ $select.append(docFragment);
153
+ // set default value of select
154
+ $select.val(value);
155
+ }
156
+
157
+ function setSelects(location_id, category_id, service_id, staff_id) {
158
+ var _location_id = (BooklyFormL10n.locationCustom == '1' && location_id) ? location_id : 0,
159
+ _staff = {}, _services = {}, _categories = {}, _nop = {}, _max_capacity = null, _min_capacity = null;
160
+ $.each(staff, function(id, staff_member) {
161
+ if (!location_id || locations[location_id].staff.hasOwnProperty(id)) {
162
+ if (!service_id) {
163
+ if (!category_id) {
164
+ _staff[id] = staff_member;
165
+ } else {
166
+ $.each(staff_member.services, function(s_id) {
167
+ if (services[s_id].category_id == category_id) {
168
+ _staff[id] = staff_member;
169
+ return false;
170
+ }
171
+ });
172
+ }
173
+ } else if (staff_member.services.hasOwnProperty(service_id)) {
174
+ // var _location_id = staff_member.services[service_id].locations.hasOwnProperty(location_id) ? location_id : 0;
175
+ if (staff_member.services[service_id].locations.hasOwnProperty(_location_id)) {
176
+ if ( staff_member.services[service_id].locations[_location_id].price != null) {
177
+ _min_capacity = _min_capacity ? Math.min(_min_capacity, staff_member.services[service_id].locations[_location_id].min_capacity) : staff_member.services[service_id].locations[_location_id].min_capacity;
178
+ _max_capacity = _max_capacity ? Math.max(_max_capacity, staff_member.services[service_id].locations[_location_id].max_capacity) : staff_member.services[service_id].locations[_location_id].max_capacity;
179
+ _staff[id] = {
180
+ id : id,
181
+ name : staff_member.name + ' (' + staff_member.services[service_id].locations[_location_id].price + ')',
182
+ pos : staff_member.pos
183
+ };
184
+ } else {
185
+ _staff[id] = {
186
+ id : id,
187
+ name : staff_member.name,
188
+ pos : staff_member.pos
189
+ };
190
+ }
191
+ }
192
+ }
193
+ }
194
+ });
195
+ if (!location_id) {
196
+ _categories = categories;
197
+ $.each(services, function(id, service) {
198
+ if (!category_id || service.category_id == category_id) {
199
+ if (!staff_id || staff[staff_id].services.hasOwnProperty(id)) {
200
+ _services[id] = service;
201
+ }
202
+ }
203
+ });
204
+ } else {
205
+ var category_ids = [],
206
+ service_ids = [];
207
+ $.each(staff, function (st_id) {
208
+ $.each(staff[st_id].services, function (s_id) {
209
+ if (staff[st_id].services[s_id].locations.hasOwnProperty(_location_id)) {
210
+ category_ids.push(services[s_id].category_id);
211
+ service_ids.push(s_id);
212
+ }
213
+ });
214
+ });
215
+ $.each(categories, function(id, category) {
216
+ if ($.inArray(parseInt(id), category_ids) > -1) {
217
+ _categories[id] = category;
218
+ }
219
+ });
220
+ $.each(services, function(id, service) {
221
+ if ($.inArray(id, service_ids) > -1) {
222
+ if (!category_id || service.category_id == category_id) {
223
+ if (!staff_id || staff[staff_id].services.hasOwnProperty(id)) {
224
+ _services[id] = service;
225
+ }
226
+ }
227
+ }
228
+ });
229
+ }
230
+
231
+ setSelect($select_category, _categories, category_id);
232
+ setSelect($select_service, _services, service_id);
233
+ setSelect($select_employee, _staff, staff_id);
234
+ }
235
+
236
+ function getShortCode(props, attributes) {
237
+ var short_code = '[bookly-form',
238
+ hide = [];
239
+ if (attributes.location !== '') {
240
+ short_code += ' location_id="' + attributes.location + '"';
241
+ }
242
+ if (attributes.category !== '') {
243
+ short_code += ' category_id="' + attributes.category + '"';
244
+ }
245
+ if (attributes.hide_locations) {
246
+ hide.push('locations');
247
+ }
248
+ if (attributes.hide_category) {
249
+ hide.push('categories');
250
+ }
251
+ if (attributes.service !== '') {
252
+ short_code += ' service_id="' + attributes.service + '"';
253
+ }
254
+ if (attributes.hide_services) {
255
+ hide.push('services');
256
+ }
257
+ if (attributes.hide_service_duration) {
258
+ hide.push('service_duration');
259
+ }
260
+ if (attributes.staff !== '') {
261
+ short_code += ' staff_member_id="' + attributes.staff + '"';
262
+ }
263
+ if (!attributes.hide_nop) {
264
+ short_code += ' show_number_of_persons="1"';
265
+ }
266
+ if (attributes.hide_quantity) {
267
+ hide.push('quantity');
268
+ }
269
+ if (attributes.hide_staff) {
270
+ hide.push('staff_members');
271
+ }
272
+ if (attributes.hide_date) {
273
+ hide.push('date')
274
+ }
275
+ if (attributes.hide_week_days) {
276
+ hide.push('week_days')
277
+ }
278
+ if (attributes.hide_time_range) {
279
+ hide.push('time_range');
280
+ }
281
+ if (hide.length > 0) {
282
+ short_code += ' hide="' + hide.join() + '"';
283
+ }
284
+ short_code += ']';
285
+
286
+ props.setAttributes({short_code: short_code});
287
+
288
+ return short_code;
289
+ }
290
+
291
+ getOptions(categories)
292
+ .forEach(function (element) {
293
+ options['categories'].push(element)
294
+ });
295
+
296
+ getOptions(services)
297
+ .forEach(function (element) {
298
+ options['services'].push(element)
299
+ });
300
+
301
+ getOptions(staff)
302
+ .forEach(function (element) {
303
+ options['staff'].push(element)
304
+ });
305
+
306
+ // Add Locations
307
+ if (BooklyFormL10n.addons.locations == '1') {
308
+ getOptions(locations)
309
+ .forEach(function (element) {
310
+ options['locations'].push(element);
311
+ });
312
+ inspectorElements.push(el(components.SelectControl, {
313
+ id: 'bookly-js-select-location',
314
+ label: BooklyFormL10n.location,
315
+ value: attributes.location,
316
+ help: el(components.PanelRow,
317
+ {},
318
+ el('label', {htmlFor: 'bookly-js-hide-locations'}, BooklyFormL10n.hide),
319
+ el(components.FormToggle, {
320
+ id: 'bookly-js-hide-locations',
321
+ checked: attributes.hide_locations,
322
+ onChange: function () {
323
+ return props.setAttributes({hide_locations: !props.attributes.hide_locations});
324
+ },
325
+ })
326
+ ),
327
+ options: options.locations,
328
+ onChange: function (selectControl) {
329
+ var location_id = selectControl,
330
+ category_id = $select_category.val(),
331
+ service_id = $select_service.val(),
332
+ staff_id = $select_employee.val()
333
+ ;
334
+
335
+ // Validate selected values.
336
+ if (location_id != '') {
337
+ if (staff_id != '' && !locations[location_id].staff.hasOwnProperty(staff_id)) {
338
+ staff_id = '';
339
+ }
340
+ if (service_id != '') {
341
+ var valid = false;
342
+ $.each(locations[location_id].staff, function(id) {
343
+ if (staff[id].services.hasOwnProperty(service_id)) {
344
+ valid = true;
345
+ return false;
346
+ }
347
+ });
348
+ if (!valid) {
349
+ service_id = '';
350
+ }
351
+ }
352
+ if (category_id != '') {
353
+ var valid = false;
354
+ $.each(locations[location_id].staff, function(id) {
355
+ $.each(staff[id].services, function(s_id) {
356
+ if (services[s_id].category_id == category_id) {
357
+ valid = true;
358
+ return false;
359
+ }
360
+ });
361
+ if (valid) {
362
+ return false;
363
+ }
364
+ });
365
+ if (!valid) {
366
+ category_id = '';
367
+ }
368
+ }
369
+ }
370
+ setSelects(location_id, category_id, service_id, staff_id);
371
+
372
+ return props.setAttributes({location: selectControl})
373
+ }
374
+ }
375
+ ));
376
+ } else {
377
+ props.setAttributes({location: ''});
378
+ }
379
+
380
+ // Add Category
381
+ inspectorElements.push(el(components.SelectControl, {
382
+ id : 'bookly-js-select-category',
383
+ label: BooklyFormL10n.category,
384
+ value: attributes.category,
385
+ help : el(components.PanelRow,
386
+ {},
387
+ el('label', {htmlFor: 'bookly-js-hide-category'}, BooklyFormL10n.hide),
388
+ el(components.FormToggle, {
389
+ id: 'bookly-js-hide-category',
390
+ checked: attributes.hide_category,
391
+ onChange: function () {
392
+ return props.setAttributes({hide_category: !props.attributes.hide_category});
393
+ },
394
+ })
395
+ ),
396
+ options: options.categories,
397
+ onChange: function (selectControl) {
398
+ var location_id = $select_location.val(),
399
+ category_id = selectControl,
400
+ service_id = $select_service.val(),
401
+ staff_id = $select_employee.val()
402
+ ;
403
+
404
+ // Validate selected values.
405
+ if (category_id != '') {
406
+ if (service_id != '') {
407
+ if (services[service_id].category_id != category_id) {
408
+ service_id = '';
409
+ }
410
+ }
411
+ if (staff_id != '') {
412
+ var valid = false;
413
+ $.each(staff[staff_id].services, function(id) {
414
+ if (services[id].category_id == category_id) {
415
+ valid = true;
416
+ return false;
417
+ }
418
+ });
419
+ if (!valid) {
420
+ staff_id = '';
421
+ }
422
+ }
423
+ }
424
+ setSelects(location_id, category_id, service_id, staff_id);
425
+ return props.setAttributes({category: selectControl})
426
+ }
427
+ }));
428
+ // Add service
429
+ inspectorElements.push(el(components.SelectControl, {
430
+ id : 'bookly-js-select-service',
431
+ label: BooklyFormL10n.service,
432
+ value: attributes.service,
433
+ help : el(components.PanelRow,
434
+ {},
435
+ el('label', {htmlFor: 'bookly-js-hide-category'}, BooklyFormL10n.hide),
436
+ el(components.FormToggle, {
437
+ id: 'bookly-js-hide-category',
438
+ checked: attributes.hide_services,
439
+ onChange: function () {
440
+ return props.setAttributes({hide_services: !props.attributes.hide_services});
441
+ },
442
+ })
443
+ ),
444
+ options: options.services,
445
+ onChange: function (selectControl) {
446
+ var location_id = $select_location.val(),
447
+ category_id = '',
448
+ service_id = selectControl,
449
+ staff_id = $select_employee.val()
450
+ ;
451
+
452
+ // Validate selected values.
453
+ if (service_id != '') {
454
+ if (staff_id != '' && !staff[staff_id].services.hasOwnProperty(service_id)) {
455
+ staff_id = '';
456
+ }
457
+ }
458
+ setSelects(location_id, category_id, service_id, staff_id);
459
+ if (service_id) {
460
+ $select_category.val(services[service_id].category_id);
461
+ }
462
+ return props.setAttributes({service: selectControl})
463
+ }
464
+ }));
465
+
466
+ inspectorElements.push(el('div', {style: {'margin': '-20px 0 1.5em 0', 'font-style': 'italic'}}, 'Please be aware that a value in this field is required in the frontend. If you choose to hide this field, please be sure to select a default value for it'));
467
+
468
+ // Add staff
469
+ inspectorElements.push(el(components.SelectControl, {
470
+ id : 'bookly-js-select-staff',
471
+ label: BooklyFormL10n.staff,
472
+ value: attributes.staff,
473
+ help : el(components.PanelRow,
474
+ {},
475
+ el('label', {htmlFor: 'bookly-js-hide-staff'}, BooklyFormL10n.hide),
476
+ el(components.FormToggle, {
477
+ id: 'bookly-js-hide-staff',
478
+ checked: attributes.hide_staff,
479
+ onChange: function () {
480
+ return props.setAttributes({hide_staff: !props.attributes.hide_staff});
481
+ },
482
+ })
483
+ ),
484
+ options: options.staff,
485
+ onChange: function (selectControl) {
486
+ var location_id = $select_location.val(),
487
+ category_id = $select_category.val(),
488
+ service_id = $select_service.val(),
489
+ staff_id = selectControl
490
+ ;
491
+
492
+ setSelects(location_id, category_id, service_id, staff_id);
493
+ return props.setAttributes({staff: selectControl})
494
+ }
495
+ }));
496
+
497
+ // Add row field hide
498
+ inspectorElements.push(el(components.PanelRow,
499
+ {},
500
+ el('b', {}, BooklyFormL10n.fields),
501
+ el('span', {}, BooklyFormL10n.hide),
502
+ ));
503
+
504
+ // Duration
505
+ if (BooklyFormL10n.addons.customDuration == '1') {
506
+ inspectorElements.push(el(components.PanelRow,
507
+ {},
508
+ el('label', {htmlFor: 'bookly-js-hide-duration'}, BooklyFormL10n.duration),
509
+ el(components.FormToggle, {
510
+ id: 'bookly-js-hide-duration',
511
+ checked: attributes.hide_service_duration,
512
+ onChange: function () {
513
+ return props.setAttributes({hide_service_duration: !props.attributes.hide_service_duration});
514
+ },
515
+ })
516
+ )
517
+ );
518
+ } else {
519
+ props.setAttributes({hide_service_duration: false});
520
+ }
521
+
522
+ // Number of persons
523
+ if (BooklyFormL10n.addons.multiplyAppointments == '1') {
524
+ inspectorElements.push(el(components.PanelRow,
525
+ {},
526
+ el('label', {htmlFor: 'bookly-js-hide-nop'}, BooklyFormL10n.nop),
527
+ el(components.FormToggle, {
528
+ id: 'bookly-js-hide-nop',
529
+ checked: attributes.hide_nop,
530
+ onChange: function () {
531
+ return props.setAttributes({hide_nop: !props.attributes.hide_nop});
532
+ },
533
+ })
534
+ ));
535
+ } else {
536
+ props.setAttributes({hide_nop: true});
537
+ }
538
+
539
+ // Quantity
540
+ if (BooklyFormL10n.addons.groupBooking == '1') {
541
+ inspectorElements.push(el(components.PanelRow,
542
+ {},
543
+ el('label', {htmlFor: 'bookly-js-hide-quantity'}, BooklyFormL10n.quantity),
544
+ el(components.FormToggle, {
545
+ id: 'bookly-js-hide-quantity',
546
+ checked: attributes.hide_quantity,
547
+ onChange: function () {
548
+ return props.setAttributes({hide_quantity: !props.attributes.hide_quantity});
549
+ },
550
+ })
551
+ ));
552
+ } else {
553
+ props.setAttributes({hide_quantity: false});
554
+ }
555
+
556
+ // Date
557
+ inspectorElements.push(el(components.PanelRow,
558
+ {},
559
+ el('label', {htmlFor: 'bookly-js-hide-date'}, BooklyFormL10n.date),
560
+ el(components.FormToggle, {
561
+ id: 'bookly-js-hide-date',
562
+ checked: attributes.hide_date,
563
+ onChange: function () {
564
+ return props.setAttributes({hide_date: !props.attributes.hide_date});
565
+ },
566
+ })
567
+ ));
568
+
569
+ // Week days
570
+ inspectorElements.push(el(components.PanelRow,
571
+ {},
572
+ el('label', {htmlFor: 'bookly-js-hide-week_days'}, BooklyFormL10n.weekDays),
573
+ el(components.FormToggle, {
574
+ id: 'bookly-js-hide-week_days',
575
+ checked: attributes.hide_week_days,
576
+ onChange: function () {
577
+ return props.setAttributes({hide_week_days: !props.attributes.hide_week_days});
578
+ },
579
+ })
580
+ ));
581
+
582
+ // Time range
583
+ inspectorElements.push(el(components.PanelRow,
584
+ {},
585
+ el('label', {htmlFor: 'bookly-js-hide-time_range'}, BooklyFormL10n.timeRange),
586
+ el(components.FormToggle, {
587
+ id: 'bookly-js-hide-time_range',
588
+ checked: attributes.hide_time_range,
589
+ onChange: function () {
590
+ return props.setAttributes({hide_time_range: !props.attributes.hide_time_range});
591
+ },
592
+ })
593
+ ));
594
+
595
+ return [
596
+ el(blockControls, {key: 'controls'}),
597
+ el(inspectorControls, {key: 'inspector'},
598
+ el(components.PanelBody, {initialOpen: true},
599
+ inspectorElements
600
+ )
601
+ ),
602
+ el('div', {},
603
+ getShortCode(props, props.attributes)
604
+ )
605
+ ]
606
+ },
607
+
608
+ save: function (props) {
609
+ return (
610
+ el('div', {},
611
+ props.attributes.short_code
612
+ )
613
+ )
614
+ }
615
+ })
616
+ })(
617
+ window.wp,
618
+ jQuery
619
+ );
backend/modules/appearance/resources/js/appearance.js CHANGED
@@ -537,17 +537,15 @@ jQuery(function($) {
537
  // Show Facebook login button.
538
  $show_facebook_login_button.change(function () {
539
  if ($(this).data('appid') == '') {
540
- $('#bookly-facebook-warning').modal('show');
541
- this.checked = false;
 
 
542
  } else {
543
  $('#bookly-facebook-login-button').toggle(this.checked);
544
  }
545
  });
546
 
547
- if ($show_facebook_login_button.prop('checked')) {
548
- $show_facebook_login_button.trigger('change');
549
- }
550
-
551
  // Show first and last name.
552
  $first_last_name.on('change', function () {
553
  $first_last_name.popover('toggle');
537
  // Show Facebook login button.
538
  $show_facebook_login_button.change(function () {
539
  if ($(this).data('appid') == '') {
540
+ if (this.checked) {
541
+ $('#bookly-facebook-warning').modal('show');
542
+ this.checked = false;
543
+ }
544
  } else {
545
  $('#bookly-facebook-login-button').toggle(this.checked);
546
  }
547
  });
548
 
 
 
 
 
549
  // Show first and last name.
550
  $first_last_name.on('change', function () {
551
  $first_last_name.popover('toggle');
frontend/resources/js/bookly.js CHANGED
@@ -2641,14 +2641,23 @@
2641
  } else {
2642
  var category_ids = [],
2643
  service_ids = [];
2644
- $.each(_staff, function (st_id) {
2645
- $.each(staff[st_id].services, function (s_id) {
2646
- if (staff[st_id].services[s_id].locations.hasOwnProperty(_location_id)) {
 
 
 
 
 
 
 
 
 
2647
  category_ids.push(services[s_id].category_id);
2648
  service_ids.push(s_id);
2649
- }
2650
  });
2651
- });
2652
  $.each(categories, function(id, category) {
2653
  if ($.inArray(parseInt(id), category_ids) > -1) {
2654
  _categories[id] = category;
2641
  } else {
2642
  var category_ids = [],
2643
  service_ids = [];
2644
+ if (services_per_location) {
2645
+ $.each(staff, function (st_id) {
2646
+ $.each(staff[st_id].services, function (s_id) {
2647
+ if (staff[st_id].services[s_id].locations.hasOwnProperty(_location_id)) {
2648
+ category_ids.push(services[s_id].category_id);
2649
+ service_ids.push(s_id);
2650
+ }
2651
+ });
2652
+ });
2653
+ } else {
2654
+ $.each(locations[location_id].staff, function(st_id) {
2655
+ $.each(staff[st_id].services, function(s_id) {
2656
  category_ids.push(services[s_id].category_id);
2657
  service_ids.push(s_id);
2658
+ });
2659
  });
2660
+ }
2661
  $.each(categories, function(id, category) {
2662
  if ($.inArray(parseInt(id), category_ids) > -1) {
2663
  _categories[id] = category;
frontend/resources/js/bookly.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(V){"use strict";V=V&&V.hasOwnProperty("default")?V.default:V;var ee={};function oe(e){var o=Ladda.create(e);return o.start(),o}function te(e){var o=e.offset().top,t=V(window).scrollTop();(o<V(window).scrollTop()||o>t+window.innerHeight)&&V("html,body").animate({scrollTop:o-24},500)}function ae(e){var o=V.extend({action:"bookly_render_complete",csrf_token:BooklyL10n.csrf_token},e),t=ee[e.form_id].$container;V.ajax({url:BooklyL10n.ajaxurl,data:o,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&(e.final_step_url&&!o.error?document.location.href=e.final_step_url:(t.html(e.html),te(t)))}})}function se(l){var d=ee[l.form_id].$container;V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_render_payment",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id,page_url:document.URL.split("#")[0]},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){if(e.disabled)return void c(l.form_id);d.html(e.html),te(d),"cancelled"==ee[l.form_id].status.booking&&(ee[l.form_id].status.booking="ok");var o=V(".bookly-payment",d),t=V(".bookly-js-apply-coupon",d),a=V("input.bookly-user-coupon",d),s=V(".bookly-js-coupon-error",d),i=V("input[type=radio][name=bookly-full-payment]",d),r=V(".bookly-info-text-coupon",d),n=V(".bookly-gateway-buttons,form.bookly-authorize_net,form.bookly-stripe",d);o.on("click",function(){n.hide(),V(".bookly-gateway-buttons.pay-"+V(this).val(),d).show(),"card"==V(this).val()&&V("form.bookly-"+V(this).data("form"),d).show()}),o.eq(0).trigger("click"),i.on("change",function(){var e={action:"bookly_deposit_payments_apply_payment_method",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id,deposit_full:V(this).val()};V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&se({form_id:l.form_id})}})}),t.on("click",function(e){var o=oe(this);s.text(""),a.removeClass("bookly-error");var t={action:"bookly_coupons_apply_coupon",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id,coupon_code:a.val()};V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:t,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success?se({form_id:l.form_id}):(s.html(ee[l.form_id].errors[e.error]),a.addClass("bookly-error"),r.html(e.text),te(s),o.stop())},error:function(){o.stop()}})}),V(".bookly-js-next-step",d).on("click",function(e){var t,a=oe(this);if(V(".bookly-payment[value=local]",d).is(":checked")||V(this).hasClass("bookly-js-coupon-payment"))e.preventDefault(),c(l.form_id);else if(V(".bookly-payment[value=card]",d).is(":checked")){var o=V(".bookly-payment[data-form=stripe]",d).is(":checked"),s=o?"bookly_stripe_payment":"bookly_authorize_net_aim_payment";t=d.find(o?".bookly-stripe":".bookly-authorize_net"),e.preventDefault();var i={action:s,csrf_token:BooklyL10n.csrf_token,card:{number:t.find('input[name="card_number"]').val(),cvc:t.find('input[name="card_cvc"]').val(),exp_month:t.find('select[name="card_exp_month"]').val(),exp_year:t.find('select[name="card_exp_year"]').val()},form_id:l.form_id},r=function(e){V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success?ae({form_id:l.form_id}):"cart_item_not_available"==e.error?f(e,l.form_id):"payment_error"==e.error&&(a.stop(),t.find(".bookly-js-card-error").text(e.error_message))}})};if(o&&t.find("#publishable_key").val())try{Stripe.setPublishableKey(t.find("#publishable_key").val()),Stripe.createToken(i.card,function(e,o){o.error?(t.find(".bookly-js-card-error").text(o.error.message),a.stop()):(i.card=o.id,r(i))})}catch(e){t.find(".bookly-js-card-error").text(e.message),a.stop()}else r(i)}else(V(".bookly-payment[value=paypal]",d).is(":checked")||V(".bookly-payment[value=2checkout]",d).is(":checked")||V(".bookly-payment[value=payu_biz]",d).is(":checked")||V(".bookly-payment[value=payu_latam]",d).is(":checked")||V(".bookly-payment[value=payson]",d).is(":checked")||V(".bookly-payment[value=mollie]",d).is(":checked"))&&(e.preventDefault(),0<(t=V(this).closest("form")).find("input.bookly-payment-id").length?V.ajax({type:"POST",url:BooklyL10n.ajaxurl,xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,data:{action:"bookly_pro_save_pending_appointment",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id,payment_type:t.data("gateway")},dataType:"json",success:function(e){e.success?(t.find("input.bookly-payment-id").val(e.payment_id),t.submit()):"cart_item_not_available"==e.error&&f(e,l.form_id)}}):V.ajax({type:"POST",url:BooklyL10n.ajaxurl,xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,data:{action:"bookly_check_cart",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id},dataType:"json",success:function(e){e.success?t.submit():"cart_item_not_available"==e.error&&f(e,l.form_id)}}))}),V(".bookly-js-back-step",d).on("click",function(e){e.preventDefault(),oe(this),S({form_id:l.form_id})})}}})}function c(o){V.ajax({type:"POST",url:BooklyL10n.ajaxurl,xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,data:{action:"bookly_save_appointment",csrf_token:BooklyL10n.csrf_token,form_id:o},dataType:"json"}).done(function(e){e.success?ae({form_id:o}):"cart_item_not_available"==e.error&&f(e,o)})}function f(e,o){ee[o].skip_steps.cart?ne({form_id:o},ee[o].errors[e.error]):ie({form_id:o},{failed_key:e.failed_cart_key,message:ee[o].errors[e.error]})}function S(W){var e=V.extend({action:"bookly_render_details",csrf_token:BooklyL10n.csrf_token},W),G=ee[W.form_id].$container;V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){G.html(e.html),te(G);var l=e.intlTelInput,d=e.update_details_dialog,c=e.woocommerce;ee[W.form_id].hasOwnProperty("google_maps")&&ee[W.form_id].google_maps.enabled&&(G||V(".bookly-form .bookly-details-step")).each(function(){!function(t){var e=t.find(".bookly-js-cst-address-autocomplete");if(e.length){var i=new google.maps.places.Autocomplete(e[0],{types:["geocode"]}),o=[{selector:".bookly-js-address-country",val:function(){return a("country")},short:function(){return a("country",!0)}},{selector:".bookly-js-address-postcode",val:function(){return a("postal_code")}},{selector:".bookly-js-address-city",val:function(){return a("locality")}},{selector:".bookly-js-address-state",val:function(){return a("administrative_area_level_1")},short:function(){return a("administrative_area_level_1",!0)}},{selector:".bookly-js-address-street",val:function(){return a("route")}},{selector:".bookly-js-address-street_number",val:function(){return a("street_number")}}],a=function(e,o){for(var t=i.getPlace().address_components,a=0;a<t.length;a++){var s=t[a].types[0];if(s===e)return o?t[a].short_name:t[a].long_name}return""};i.addListener("place_changed",function(){o.forEach(function(e){var o=t.find(e.selector);0!==o.length&&(o.val(e.val()),"function"==typeof e.short&&o.data("short",e.short()))})})}}(V(this))}),V(document.body).trigger("bookly.render.step_detail",[G]);var f="",t=V(".bookly-js-guest",G),m=V(".bookly-js-user-phone-input",G),y=V(".bookly-js-user-email",G),u=V(".bookly-js-user-email-confirm",G),_=V(".bookly-js-select-birthday-day",G),k=V(".bookly-js-select-birthday-month",G),p=V(".bookly-js-select-birthday-year",G),h=V(".bookly-js-address-country",G),b=V(".bookly-js-address-state",G),v=V(".bookly-js-address-postcode",G),j=V(".bookly-js-address-city",G),g=V(".bookly-js-address-street",G),w=V(".bookly-js-address-street_number",G),x=V(".bookly-js-address-additional_address",G),C=V(".bookly-js-address-country-error",G),L=V(".bookly-js-address-state-error",G),B=V(".bookly-js-address-postcode-error",G),T=V(".bookly-js-address-city-error",G),D=V(".bookly-js-address-street-error",G),S=V(".bookly-js-address-street_number-error",G),O=V(".bookly-js-address-additional_address-error",G),M=V(".bookly-js-select-birthday-day-error",G),q=V(".bookly-js-select-birthday-month-error",G),P=V(".bookly-js-select-birthday-year-error",G),F=V(".bookly-js-full-name",G),E=V(".bookly-js-first-name",G),R=V(".bookly-js-last-name",G),H=V(".bookly-js-user-notes",G),o=V(".bookly-custom-field",G),a=V(".bookly-js-info-field",G),X=V(".bookly-js-user-phone-error",G),I=V(".bookly-js-user-email-error",G),z=V(".bookly-js-user-email-confirm-error",G),N=V(".bookly-js-full-name-error",G),Y=V(".bookly-js-first-name-error",G),Z=V(".bookly-js-last-name-error",G),s=V(".bookly-js-captcha-img",G),i=V(".bookly-custom-field-error",G),r=V(".bookly-js-info-field-error",G),n=V(".bookly-js-modal",G),J=V(".bookly-js-login",G),$=V(".bookly-js-cst-duplicate",G),A=V(".bookly-js-next-step",G),U=V([M,q,P,C,L,B,T,D,S,O,N,Y,Z,X,I,z,i,r]).map(V.fn.toArray),K=V([_,k,p,j,h,v,b,g,w,x,F,E,R,m,y,u,o,a]).map(V.fn.toArray),Q=function(e){if(F.val(e.data.full_name).removeClass("bookly-error"),E.val(e.data.first_name).removeClass("bookly-error"),R.val(e.data.last_name).removeClass("bookly-error"),e.data.birthday){var o=e.data.birthday.split("-"),t=parseInt(o[0]),a=parseInt(o[1]),s=parseInt(o[2]);_.val(s).removeClass("bookly-error"),k.val(a).removeClass("bookly-error"),p.val(t).removeClass("bookly-error")}e.data.phone&&(m.removeClass("bookly-error"),l.enabled?m.intlTelInput("setNumber",e.data.phone):m.val(e.data.phone)),e.data.country&&h.val(e.data.country).removeClass("bookly-error"),e.data.state&&b.val(e.data.state).removeClass("bookly-error"),e.data.postcode&&v.val(e.data.postcode).removeClass("bookly-error"),e.data.city&&j.val(e.data.city).removeClass("bookly-error"),e.data.street&&g.val(e.data.street).removeClass("bookly-error"),e.data.street_number&&w.val(e.data.street_number).removeClass("bookly-error"),e.data.additional_address&&x.val(e.data.additional_address).removeClass("bookly-error"),y.val(e.data.email).removeClass("bookly-error"),e.data.info_fields&&e.data.info_fields.forEach(function(e){var o=G.find('.bookly-js-info-field-row[data-id="'+e.id+'"]');switch(o.data("type")){case"checkboxes":e.value.forEach(function(e){o.find(".bookly-js-info-field").filter(function(){return this.value==e}).prop("checked",!0)});break;case"radio-buttons":o.find(".bookly-js-info-field").filter(function(){return this.value==e.value}).prop("checked",!0);break;default:o.find(".bookly-js-info-field").val(e.value)}}),U.filter(":not(.bookly-custom-field-error)").html("")};l.enabled&&m.intlTelInput({preferredCountries:[l.country],initialCountry:l.country,geoIpLookup:function(t){V.get("https://ipinfo.io",function(){},"jsonp").always(function(e){var o=e&&e.country?e.country:"";t(o)})},utilsScript:l.utils}),V("body > .bookly-js-modal."+W.form_id).remove(),n.addClass(W.form_id).appendTo("body").on("click",".bookly-js-close",function(e){e.preventDefault(),V(e.delegateTarget).removeClass("bookly-in").find("form").trigger("reset").end().find("input").removeClass("bookly-error").end().find(".bookly-label-error").html("")}),V(".bookly-js-login-show",G).on("click",function(e){e.preventDefault(),J.addClass("bookly-in")}),V("button:submit",J).on("click",function(e){e.preventDefault();var o=Ladda.create(this);o.start(),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_wp_user_login",csrf_token:BooklyL10n.csrf_token,form_id:W.form_id,log:J.find('[name="log"]').val(),pwd:J.find('[name="pwd"]').val(),rememberme:J.find('[name="rememberme"]').prop("checked")?1:0},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success?(BooklyL10n.csrf_token=e.data.csrf_token,t.fadeOut("slow"),Q(e),J.removeClass("bookly-in")):"incorrect_username_password"==e.error&&(J.find("input").addClass("bookly-error"),J.find(".bookly-label-error").html(ee[W.form_id].errors[e.error])),o.stop()}})}),V("button:submit",$).on("click",function(e){e.preventDefault(),$.removeClass("bookly-in"),A.trigger("click",[1])}),ee[W.form_id].hasOwnProperty("facebook")&&ee[W.form_id].facebook.enabled&&(FB.XFBML.parse(V(".bookly-js-fb-login-button",G).parent().get(0)),ee[W.form_id].facebook.onStatusChange=function(e){"connected"===e.status&&(ee[W.form_id].facebook.enabled=!1,ee[W.form_id].facebook.onStatusChange=void 0,t.fadeOut("slow",function(){V(".bookly-js-fb-login-button").hide()}),FB.api("/me",{fields:"id,name,first_name,last_name,email"},function(e){V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:V.extend(e,{action:"bookly_pro_facebook_login",csrf_token:BooklyL10n.csrf_token,form_id:W.form_id}),dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&Q(e)}})}))}),A.on("click",function(e,o){e.preventDefault();var a,t=[],s={},i=[],r=oe(this);V("div.bookly-js-info-field-row",G).each(function(){var e=V(this);switch(e.data("type")){case"text-field":t.push({id:e.data("id"),value:e.find("input.bookly-js-info-field").val()});break;case"textarea":t.push({id:e.data("id"),value:e.find("textarea.bookly-js-info-field").val()});break;case"checkboxes":a=[],e.find("input.bookly-js-info-field:checked").each(function(){a.push(this.value)}),t.push({id:e.data("id"),value:a});break;case"radio-buttons":t.push({id:e.data("id"),value:e.find("input.bookly-js-info-field:checked").val()||null});break;case"drop-down":t.push({id:e.data("id"),value:e.find("select.bookly-js-info-field").val()})}}),V(".bookly-custom-fields-container",G).each(function(){var e=V(this),o=e.data("key"),t=[];V("div.bookly-custom-field-row",e).each(function(){var e=V(this);switch(e.data("type")){case"text-field":case"file":t.push({id:e.data("id"),value:e.find("input.bookly-custom-field").val()});break;case"textarea":t.push({id:e.data("id"),value:e.find("textarea.bookly-custom-field").val()});break;case"checkboxes":a=[],e.find("input.bookly-custom-field:checked").each(function(){a.push(this.value)}),t.push({id:e.data("id"),value:a});break;case"radio-buttons":t.push({id:e.data("id"),value:e.find("input.bookly-custom-field:checked").val()||null});break;case"drop-down":t.push({id:e.data("id"),value:e.find("select.bookly-custom-field").val()});break;case"captcha":t.push({id:e.data("id"),value:e.find("input.bookly-custom-field").val()}),i.push(e.data("id"))}}),s[o]={custom_fields:JSON.stringify(t)}});try{""==(f=l.enabled?m.intlTelInput("getNumber"):m.val())&&(f=m.val())}catch(e){f=m.val()}var n={action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:W.form_id,full_name:F.val(),first_name:E.val(),last_name:R.val(),phone:f,email:y.val(),email_confirm:u.val(),birthday:{day:_.val(),month:k.val(),year:p.val()},country:h.val(),state:b.val(),postcode:v.val(),city:j.val(),street:g.val(),street_number:w.val(),additional_address:x.val(),address_iso:{country:h.data("short"),state:b.data("short")},info_fields:t,notes:H.val(),cart:s,captcha_ids:JSON.stringify(i),force_update_customer:!d||o};V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:n,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(o){if(U.empty(),K.removeClass("bookly-error"),o.success)if(c.enabled){var e={action:"bookly_pro_add_to_woocommerce_cart",csrf_token:BooklyL10n.csrf_token,form_id:W.form_id};V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success?window.location.href=c.cart_url:(r.stop(),ne({form_id:W.form_id},ee[W.form_id].errors[e.error]))}})}else se({form_id:W.form_id});else{var i=null;if(o.appointments_limit_reached)ae({form_id:W.form_id,error:"appointments_limit_reached"});else{r.stop();[{name:"full_name",errorElement:N,formElement:F},{name:"first_name",errorElement:Y,formElement:E},{name:"last_name",errorElement:Z,formElement:R},{name:"phone",errorElement:X,formElement:m},{name:"email",errorElement:I,formElement:y},{name:"email_confirm",errorElement:z,formElement:u},{name:"birthday_day",errorElement:M,formElement:_},{name:"birthday_month",errorElement:q,formElement:k},{name:"birthday_year",errorElement:P,formElement:p},{name:"country",errorElement:C,formElement:h},{name:"state",errorElement:L,formElement:b},{name:"postcode",errorElement:B,formElement:v},{name:"city",errorElement:T,formElement:j},{name:"street",errorElement:D,formElement:g},{name:"street_number",errorElement:S,formElement:w},{name:"additional_address",errorElement:O,formElement:x}].forEach(function(e){o[e.name]&&(e.errorElement.html(o[e.name]),e.formElement.addClass("bookly-error"),null===i&&(i=e.formElement))}),o.info_fields&&V.each(o.info_fields,function(e,o){var t=V('div.bookly-js-info-field-row[data-id="'+e+'"]',G);t.find(".bookly-js-info-field-error").html(o),t.find(".bookly-js-info-field").addClass("bookly-error"),null===i&&(i=t.find(".bookly-js-info-field"))}),o.custom_fields&&V.each(o.custom_fields,function(s,e){V.each(e,function(e,o){var t=V('.bookly-custom-fields-container[data-key="'+s+'"]',G),a=V('[data-id="'+e+'"]',t);a.find(".bookly-custom-field-error").html(o),a.find(".bookly-custom-field").addClass("bookly-error"),null===i&&(i=a.find(".bookly-custom-field"))})}),o.customer&&$.find(".bookly-js-modal-body").html(o.customer).end().addClass("bookly-in")}null!==i&&te(i)}}})}),V(".bookly-js-back-step",G).on("click",function(e){e.preventDefault(),oe(this),ee[W.form_id].skip_steps.cart?ee[W.form_id].no_time?ee[W.form_id].no_extras?de({form_id:W.form_id}):le({form_id:W.form_id}):ee[W.form_id].skip_steps.repeat?ee[W.form_id].skip_steps.extras||"after_step_time"!=ee[W.form_id].step_extras||ee[W.form_id].no_extras?ne({form_id:W.form_id}):le({form_id:W.form_id}):re({form_id:W.form_id}):ie({form_id:W.form_id})}),V(".bookly-js-captcha-refresh",G).on("click",function(){s.css("opacity","0.5"),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_custom_fields_captcha_refresh",form_id:W.form_id,csrf_token:BooklyL10n.csrf_token},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&s.attr("src",e.data.captcha_url).on("load",function(){s.css("opacity","1")})}})})}}})}function ie(o,t){if(ee[o.form_id].skip_steps.cart)S(o);else{o&&o.from_step&&(ee[o.form_id].cart_prev_step=o.from_step);var e=V.extend({action:"bookly_render_cart",csrf_token:BooklyL10n.csrf_token},o),s=ee[o.form_id].$container;V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&(s.html(e.html),t?(V(".bookly-label-error",s).html(t.message),V('tr[data-cart-key="'+t.failed_key+'"]',s).addClass("bookly-label-error")):V(".bookly-label-error",s).hide(),te(s),V(".bookly-js-next-step",s).on("click",function(){oe(this),S({form_id:o.form_id})}),V(".bookly-add-item",s).on("click",function(){oe(this),de({form_id:o.form_id,new_chain:!0})}),V(".bookly-js-back-step",s).on("click",function(e){switch(e.preventDefault(),oe(this),ee[o.form_id].cart_prev_step){case"service":de({form_id:o.form_id});break;case"extras":le({form_id:o.form_id});break;case"time":ne({form_id:o.form_id});break;case"repeat":re({form_id:o.form_id});break;default:de({form_id:o.form_id})}}),V(".bookly-js-actions button",s).on("click",function(){oe(this);var e=V(this),a=e.closest("tr");switch(e.data("action")){case"drop":V.ajax({url:BooklyL10n.ajaxurl,data:{action:"bookly_cart_drop_item",csrf_token:BooklyL10n.csrf_token,form_id:o.form_id,cart_key:a.data("cart-key")},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){var o=a.data("cart-key"),t=V('tr[data-cart-key="'+o+'"]',s);a.delay(300).fadeOut(200,function(){e.data.total_waiting_list?(V(".bookly-js-waiting-list-price",s).html(e.data.waiting_list_price),V(".bookly-js-waiting-list-deposit",s).html(e.data.waiting_list_deposit)):V(".bookly-js-waiting-list-price",s).closest("tr").remove(),V(".bookly-js-subtotal-price",s).html(e.data.subtotal_price),V(".bookly-js-subtotal-deposit",s).html(e.data.subtotal_deposit),V(".bookly-js-pay-now-deposit",s).html(e.data.pay_now_deposit),V(".bookly-js-pay-now-tax",s).html(e.data.pay_now_tax),V(".bookly-js-total-price",s).html(e.data.total_price),V(".bookly-js-total-tax",s).html(e.data.total_tax),t.remove(),0==V("tr[data-cart-key]").length&&(V(".bookly-js-back-step",s).hide(),V(".bookly-js-next-step",s).hide())})}}});break;case"edit":de({form_id:o.form_id,edit_cart_item:a.data("cart-key")})}}))}})}}function re(M,e){if(ee[M.form_id].skip_steps.repeat)ie(M,e);else{var o=V.extend({action:"bookly_render_repeat",csrf_token:BooklyL10n.csrf_token},M),q=ee[M.form_id].$container;V.ajax({url:BooklyL10n.ajaxurl,data:o,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){q.html(e.html),te(q);var o=V(".bookly-js-repeat-appointment-enabled",q),f=V(".bookly-js-next-step",q),t=V(".bookly-js-repeat-variants-container",q),a=V('[class^="bookly-js-variant"]',t),s=V(".bookly-js-repeat-variant",t),i=V(".bookly-js-get-schedule",t),r=V(".bookly-js-variant-weekly",t),n=V(".bookly-js-repeat-variant-monthly",t),l=V(".bookly-js-repeat-until",t),d=V(".bookly-js-repeat-times",t),c=V(".bookly-js-monthly-specific-day",t),m=V(".bookly-js-monthly-week-day",t),y=V(".bookly-js-repeat-daily-every",t),u=V(".bookly-js-week-day",t),_=V(".bookly-js-schedule-container",q),k=V(".bookly-js-days-error",t),p=V(".bookly-js-schedule-slots",_),h=V(".bookly-js-intersection-info",_),b=V(".bookly-js-schedule-help",_),v=V(".bookly-well",_),j=V(".bookly-pagination",_),g=V(".bookly-schedule-row-template .bookly-schedule-row",_),w=e.pages_warning_info,x=e.short_date_format,C={min:e.date_min||!0,max:e.date_max||!0},L=[],B={prepareButtonNextState:function(){for(var e=f.prop("disabled"),o=0==L.length,t=0;t<L.length;t++)if(e){if(!L[t].deleted){o=!1;break}}else{if(!L[t].deleted){o=!1;break}o=!0}f.prop("disabled",o)},addTimeSlotControl:function(e,o,a,s){var i,r="";o.length&&(r=V("<select/>"),V.each(o,function(e,o){var t=V("<option/>");t.text(o.title).val(o.value),o.disabled&&t.attr("disabled","disabled"),r.append(t),i||o.disabled||(o.title==a?(r.val(o.value),i=!0):o.title==s&&r.val(o.value))}));e.find(".bookly-js-schedule-time").html(r),e.find("div.bookly-label-error").toggle(!o.length)},renderSchedulePage:function(e){var o,t=L.length,a=5*e-5,s=[];p.html("");for(var i=a,r=0;r<5&&i<t;i++,r++)(o=g.clone()).data("datetime",L[i].datetime),o.data("index",L[i].index),V("> div:first-child",o).html(L[i].index),V(".bookly-schedule-date",o).html(L[i].display_date),void 0!==L[i].all_day_service_time?(V(".bookly-js-schedule-time",o).hide(),V(".bookly-js-schedule-all-day-time",o).html(L[i].all_day_service_time).show()):(V(".bookly-js-schedule-time",o).html(L[i].display_time).show(),V(".bookly-js-schedule-all-day-time",o).hide()),L[i].another_time&&V(".bookly-schedule-intersect",o).show(),L[i].deleted&&o.find(".bookly-schedule-appointment").addClass("bookly-appointment-hidden"),p.append(o);if(5<t){var n=V("<li/>").html("«");for(n.on("click",function(){var e=parseInt(j.find(".active").html());1<e&&B.renderSchedulePage(e-1)}),j.html(n),i=0,r=1;i<t;i+=5,r++)n=V("<li/>").html(r),j.append(n),n.on("click",function(){B.renderSchedulePage(V(this).html())});for(j.find("li:eq("+e+")").addClass("active"),(n=V("<li/>").html("»")).on("click",function(){var e=parseInt(j.find(".active").html());e<t/5&&B.renderSchedulePage(e+1)}),j.append(n).show(),i=0;i<t;i++)L[i].another_time&&(e=parseInt(i/5)+1,s.push(e),i=5*e-1);0<s.length&&h.html(w.replace("{list}",s.join(", "))),v.toggle(0<s.length),j.toggle(5<t)}else for(j.hide(),v.hide(),i=0;i<t;i++)if(L[i].another_time){b.show();break}},renderFullSchedule:function(e){L=e;var c=null;V.each(L,function(e,o){c||o.another_time||(c=o.display_time)}),B.renderSchedulePage(1),_.show(),f.prop("disabled",0==L.length),p.on("click","button[data-action]",function(){var o=V(this).closest(".bookly-schedule-row"),a=o.data("index")-1;switch(V(this).data("action")){case"drop":L[a].deleted=!0,o.find(".bookly-schedule-appointment").addClass("bookly-appointment-hidden"),B.prepareButtonNextState();break;case"restore":L[a].deleted=!1,o.find(".bookly-schedule-appointment").removeClass("bookly-appointment-hidden"),f.prop("disabled",!1);break;case"edit":var e=V('<input type="text"/>'),s=V(this),i=oe(this);o.find(".bookly-schedule-date").html(e),e.pickadate({min:C.min,max:C.max,formatSubmit:"yyyy-mm-dd",format:x,clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ee[M.form_id].start_of_week,onSet:function(){var t=[];V.each(L,function(e,o){a==e||o.deleted||t.push(o.slots)}),V.ajax({url:BooklyL10n.ajaxurl,type:"POST",data:{action:"bookly_recurring_appointments_get_daily_customer_schedule",csrf_token:BooklyL10n.csrf_token,date:this.get("select","yyyy-mm-dd"),form_id:M.form_id,exclude:t},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){s.hide(),i.stop(),e.data.length?(B.addTimeSlotControl(o,e.data[0].options,c,L[a].display_time,e.data[0].all_day_service_time),o.find('button[data-action="save"]').show()):(B.addTimeSlotControl(o,[]),o.find('button[data-action="save"]').hide())}})}});var t=JSON.parse(L[a].slots);e.pickadate("picker").set("select",new Date(t[0][2]));break;case"save":V(this).hide(),o.find('button[data-action="edit"]').show();var r=o.find(".bookly-schedule-date"),n=o.find(".bookly-js-schedule-time"),l=n.find("select"),d=l.find("option:selected");L[a].slots=l.val(),L[a].display_date=r.find("input").val(),L[a].display_time=d.text(),r.html(L[a].display_date),n.html(L[a].display_time)}})},isDateMatchesSelections:function(e){switch(s.val()){case"daily":if((6<y.val()||-1!=V.inArray(e.format("ddd").toLowerCase(),B.week_days))&&e.diff(B.date_from,"days")%y.val()==0)return!0;break;case"weekly":case"biweekly":if(("weekly"==s.val()||e.diff(B.date_from.clone().startOf("isoWeek"),"weeks")%2==0)&&-1!=V.inArray(e.format("ddd").toLowerCase(),B.checked_week_days))return!0;break;case"monthly":switch(n.val()){case"specific":if(e.format("D")==c.val())return!0;break;case"last":if(e.format("ddd").toLowerCase()==m.val()&&e.clone().endOf("month").diff(e,"days")<7)return!0;break;default:var o=e.diff(e.clone().startOf("month"),"days");if(e.format("ddd").toLowerCase()==m.val()&&o>=7*(n.prop("selectedIndex")-1)&&o<7*n.prop("selectedIndex"))return!0}}return!1},updateRepeatDate:function(){var e=0,o=d.val(),t=C.min.slice(),a=l.pickadate("picker").get("select"),s=moment().year(a.year).month(a.month).date(a.date).add(5,"years");t[1]++,B.date_from=moment(t.join(","),"YYYY,M,D"),B.week_days=[],m.find("option").each(function(){B.week_days.push(V(this).val())}),B.checked_week_days=[],u.each(function(){V(this).prop("checked")&&B.checked_week_days.push(V(this).val())});for(var i=B.date_from.clone();B.isDateMatchesSelections(i)&&e++,i.add(1,"days"),e<o&&i.isBefore(s););l.val(i.subtract(1,"days").format("MMMM D, YYYY")),l.pickadate("picker").set("select",new Date(i.format("YYYY"),i.format("M")-1,i.format("D")))},updateRepeatTimes:function(){var e=0,o=C.min.slice(),t=l.pickadate("picker").get("select"),a=moment().year(t.year).month(t.month).date(t.date);o[1]++,B.date_from=moment(o.join(","),"YYYY,M,D"),B.week_days=[],m.find("option").each(function(){B.week_days.push(V(this).val())}),B.checked_week_days=[],u.each(function(){V(this).prop("checked")&&B.checked_week_days.push(V(this).val())});for(var s=B.date_from.clone();B.isDateMatchesSelections(s)&&e++,s.add(1,"days"),s.isBefore(a););d.val(e)}};l.pickadate({formatSubmit:"yyyy-mm-dd",format:ee[M.form_id].date_format,min:C.min,max:C.max,clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ee[M.form_id].start_of_week});var T=o.on("change",function(){t.toggle(V(this).prop("checked")),V(this).prop("checked")?B.prepareButtonNextState():f.prop("disabled",!1)});if(e.repeated){var D=e.repeat_data,S=D.params;o.prop("checked",!0),s.val(D.repeat);var O=D.until.split("-");switch(l.pickadate("set").set("select",new Date(O[0],O[1]-1,O[2])),D.repeat){case"daily":y.val(S.every);break;case"weekly":case"biweekly":V(".bookly-js-week-days input.bookly-js-week-day",t).prop("checked",!1).parent().removeClass("active"),S.on.forEach(function(e){V(".bookly-js-week-days input.bookly-js-week-day[value="+e+"]",t).prop("checked",!0).parent().addClass("active")});break;case"monthly":"day"===S.on?(n.val("specific"),V(".bookly-js-monthly-specific-day[value="+S.day+"]",t).prop("checked",!0)):(n.val(S.on),m.val(S.weekday))}B.renderFullSchedule(e.schedule)}T.trigger("change"),e.could_be_repeated||o.attr("disabled",!0),s.on("change",function(){a.hide(),t.find(".bookly-js-variant-"+this.value).show(),B.updateRepeatTimes()}).trigger("change"),n.on("change",function(){m.toggle("specific"!=this.value),c.toggle("specific"==this.value),B.updateRepeatTimes()}).trigger("change"),u.on("change",function(){var e=V(this);e.is(":checked")?e.parent().not("[class*='active']").addClass("active"):e.parent().removeClass("active"),B.updateRepeatTimes()}),c.val(e.date_min[2]),c.on("change",function(){B.updateRepeatTimes()}),m.on("change",function(){B.updateRepeatTimes()}),l.on("change",function(){B.updateRepeatTimes()}),y.on("change",function(){B.updateRepeatTimes()}),d.on("change",function(){B.updateRepeatDate()}),i.on("click",function(){_.hide();var e={action:"bookly_recurring_appointments_get_customer_schedule",csrf_token:BooklyL10n.csrf_token,form_id:M.form_id,repeat:s.val(),until:l.pickadate("picker").get("select","yyyy-mm-dd"),params:{}},o=oe(this);switch(e.repeat){case"daily":e.params={every:y.val()};break;case"weekly":case"biweekly":if(e.params.on=[],V(".bookly-js-week-days input.bookly-js-week-day:checked",r).each(function(){e.params.on.push(this.value)}),0==e.params.on.length)return k.toggle(!0),o.stop(),!1;k.toggle(!1);break;case"monthly":"specific"==n.val()?e.params={on:"day",day:c.val()}:e.params={on:n.val(),weekday:m.val()}}p.off("click"),V.ajax({url:BooklyL10n.ajaxurl,type:"POST",data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&(B.renderFullSchedule(e.data),o.stop())}})}),V(".bookly-js-back-step",q).on("click",function(e){e.preventDefault(),oe(this),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:M.form_id,unrepeat:1},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ee[M.form_id].skip_steps.extras||"after_step_time"!=ee[M.form_id].step_extras||ee[M.form_id].no_extras?ne({form_id:M.form_id}):le({form_id:M.form_id})}})}),V(".bookly-js-go-to-cart",q).on("click",function(e){e.preventDefault(),oe(this),ie({form_id:M.form_id,from_step:"repeat"})}),V(".bookly-js-next-step",q).on("click",function(e){if(oe(this),o.is(":checked")){var t=[],a=0;L.forEach(function(e){if(!e.deleted){var o=JSON.parse(e.slots);t=t.concat(o),a++}}),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:M.form_id,slots:JSON.stringify(t),repeat:a},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ie({form_id:M.form_id,add_to_cart:!0,from_step:"repeat"})}})}else V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:M.form_id,unrepeat:1},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ie({form_id:M.form_id,add_to_cart:!0,from_step:"repeat"})}})})}}})}}var o=null;function ne(C,L){if(ee[C.form_id].no_time||ee[C.form_id].skip_steps.time)ee[C.form_id].skip_steps.extras||"after_step_time"!=ee[C.form_id].step_extras||ee[C.form_id].no_extras?ee[C.form_id].skip_steps.cart?S({form_id:C.form_id,add_to_cart:!0}):ie({form_id:C.form_id,add_to_cart:!0,from_step:C&&C.prev_step?C.prev_step:"service"}):le({form_id:C.form_id});else{var e={action:"bookly_render_time",csrf_token:BooklyL10n.csrf_token},B=ee[C.form_id].$container;ee[C.form_id].skip_steps.service&&ee[C.form_id].use_client_time_zone&&(e.time_zone=ee[C.form_id].timeZone,e.time_zone_offset=ee[C.form_id].timeZoneOffset),V.extend(e,C),o=V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(0!=e.success){BooklyL10n.csrf_token=e.csrf_token,B.html(e.html);var m,y,u,_=V(".bookly-columnizer-wrap",B),k=V(".bookly-columnizer",_),i=V(".bookly-time-next",B),a=V(".bookly-time-prev",B),p=null,h=e.time_slots_wide?205:127,b=e.time_slots_wide?"bookly-column bookly-column-wide":"bookly-column",v=0,r=0,j=e.has_more_slots,g=!1,o=e.show_calendar,n=e.is_rtl,w=e.day_one_column,t=T(e.slots_data,e.selected_date);if(V(".bookly-js-back-step",B).on("click",function(e){e.preventDefault(),oe(this),ee[C.form_id].skip_steps.extras||ee[C.form_id].no_extras?de({form_id:C.form_id}):"before_step_time"==ee[C.form_id].step_extras?le({form_id:C.form_id}):de({form_id:C.form_id})}).toggle(!ee[C.form_id].skip_steps.service||!ee[C.form_id].skip_steps.extras),V(".bookly-js-go-to-cart",B).on("click",function(e){e.preventDefault(),oe(this),ie({form_id:C.form_id,from_step:"time"})}),V(".bookly-js-time-zone-switcher",B).on("change",function(e){ee[C.form_id].timeZone=this.value,ee[C.form_id].timeZoneOffset=void 0,f(),D(),ne({form_id:C.form_id,time_zone:ee[C.form_id].timeZone})}),o){var s=V(".bookly-js-selected-date",B);s.pickadate({formatSubmit:"yyyy-mm-dd",format:ee[C.form_id].date_format,min:e.date_min||!0,max:e.date_max||!0,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,monthsFull:BooklyL10n.months,firstDay:ee[C.form_id].start_of_week,clear:!1,close:!1,today:!1,disable:e.disabled_days,closeOnSelect:!1,klass:{picker:"picker picker--opened picker--focused"},onSet:function(e){if(e.select){var o=this.get("select","yyyy-mm-dd");t[o]?(k.html(t[o]).css("left","0px"),r=v=0,p=null,x(),a.hide(),i.toggle(1!=m.length)):(D(),ne({form_id:C.form_id,selected_date:o}),f())}this.open()},onClose:function(){this.open(!1)},onRender:function(){var e=new Date(Date.UTC(this.get("view").year,this.get("view").month));V(".picker__nav--next",B).on("click",function(){e.setUTCMonth(e.getUTCMonth()+1),D(),ne({form_id:C.form_id,selected_date:e.toJSON().substr(0,10)}),f()}),V(".picker__nav--prev",B).on("click",function(){e.setUTCMonth(e.getUTCMonth()-1),D(),ne({form_id:C.form_id,selected_date:e.toJSON().substr(0,10)}),f()})}});var l=s.pickadate("picker").get("select","yyyy-mm-dd");k.html(t[l])}else{var d="";V.each(t,function(e,o){d+=o}),k.html(d)}if(e.has_slots){L?B.find(".bookly-label-error").html(L):B.find(".bookly-label-error").hide(),(y=parseInt(V(window).height()/36,10))<4?y=4:10<y&&(y=10),10<(u=parseInt(_.width()/h,10))?u=10:0==u&&(g=!0,u=4),x(),j||1!=m.length||i.hide();var c=V(".bookly-time-step",B).hammer({swipe_velocity:.1});c.on("swipeleft",function(){i.is(":visible")&&i.trigger("click")}),c.on("swiperight",function(){a.is(":visible")&&a.trigger("click")}),i.on("click",function(e){if(a.show(),m.eq(r+1).length)k.animate({left:(n?"+":"-")+(r+1)*p.width()},{duration:800}),p=m.eq(++r),_.animate({height:p.height()},{duration:800}),r+1!=m.length||j||i.hide();else if(j){var o=V("> button:last",k);0==o.length&&0==(o=V(".bookly-column:hidden:last > button:last",k)).length&&(o=V(".bookly-column:last > button:last",k));var t={action:"bookly_render_next_time",csrf_token:BooklyL10n.csrf_token,form_id:C.form_id,last_slot:o.val()},s=oe(this);V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:t,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success)if(e.has_slots){j=e.has_more_slots;var t="";V.each(T(e.slots_data,e.selected_date),function(e,o){t+=o});var o=V(t),a=o.eq(0);V('button.bookly-day[value="'+a.attr("value")+'"]',B).length&&(o=o.not(":first")),k.append(o),x(),i.trigger("click")}else i.hide();else i.hide();s.stop()}})}}),a.on("click",function(){i.show(),p=m.eq(--r),k.animate({left:(n?"+":"-")+r*p.width()},{duration:800}),_.animate({height:p.height()},{duration:800}),0===r&&a.hide()})}void 0===C&&te(B)}else de({form_id:C.form_id});function f(){V(".bookly-time-screen,.bookly-not-time-screen",B).addClass("bookly-spin-overlay");var e={lines:11,length:11,width:4,radius:5};m?new Spinner(e).spin(m.eq(r).get(0)):new Spinner(e).spin(V(".bookly-not-time-screen",B).get(0))}function x(){var e,o,t,a=V("> button",k),s=0,i=0;if(w)for(;0<a.length;)a.eq(0).hasClass("bookly-day")?(s=1,o=V('<div class="'+b+'" />'),(e=V(a.splice(0,1))).addClass("bookly-js-first-child"),o.append(e)):(s++,e=V(a.splice(0,1)),!a.length||a.eq(0).hasClass("bookly-day")?(e.addClass("bookly-last-child"),o.append(e),k.append(o)):o.append(e)),i<s&&(i=s);else for(;j?a.length>y:a.length;){o=V('<div class="'+b+'" />'),i=y,v%u!=0||a.eq(0).hasClass("bookly-day")||--i;for(var r=0;r<i&&(r+1!=i||!a.eq(0).hasClass("bookly-day"));++r)e=V(a.splice(0,1)),0==r?e.addClass("bookly-js-first-child"):r+1==i&&e.addClass("bookly-last-child"),o.append(e);k.append(o),++v}for(var n=V("> .bookly-column",k);j?n.length>=u:n.length;){t=V('<div class="bookly-time-screen"/>');for(r=0;r<u;++r){if(o=V(n.splice(0,1)),0==r){o.addClass("bookly-js-first-column");var l=o.find(".bookly-js-first-child");if(!l.hasClass("bookly-day")){var d=l.data("group"),c=V('button.bookly-day[value="'+d+'"]:last',B);o.prepend(c.clone())}}t.append(o)}k.append(t)}m=V(".bookly-time-screen",k),null===p&&(p=m.eq(0)),V("button.bookly-time-skip",B).off("click").on("click",function(e){oe(this),ee[C.form_id].skip_steps.cart?S({form_id:C.form_id,add_to_cart:!0}):ie({form_id:C.form_id,add_to_cart:!0,from_step:"time"})});var f=null;V("button.bookly-hour",B).off("click").on("click",function(e){null!=f&&(f.abort(),f=null),e.preventDefault();var o=V(this),t={action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:C.form_id,slots:this.value};o.attr({"data-style":"zoom-in","data-spinner-color":"#333","data-spinner-size":"40"}),oe(this),f=V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:t,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ee[C.form_id].skip_steps.extras||"after_step_time"!=ee[C.form_id].step_extras||ee[C.form_id].no_extras?ee[C.form_id].skip_steps.repeat?ee[C.form_id].skip_steps.cart?S({form_id:C.form_id,add_to_cart:!0}):ie({form_id:C.form_id,add_to_cart:!0,from_step:"time"}):re({form_id:C.form_id}):le({form_id:C.form_id})}})}),V(".bookly-time-step",B).width(u*h),_.height(g?39*V(".bookly-column.bookly-js-first-column button",p).length:p.height()),g=!1}}})}function T(e,s){var o={};return V.each(e,function(t,e){var a='<button class="bookly-day" value="'+t+'">'+e.title+"</button>";V.each(e.slots,function(e,o){a+='<button value="'+JSON.stringify(o.data).replace(/"/g,"&quot;")+'" data-group="'+t+'" class="bookly-hour'+("waiting-list"==o.status?" bookly-slot-in-waiting-list":"booked"==o.status?" booked":"")+'"'+("booked"==o.status?" disabled":"")+'><span class="ladda-label bookly-time-main'+(o.data[0][2]==s?" bookly-bold":"")+'"><i class="bookly-hour-icon"><span></span></i>'+o.time_text+'</span><span class="bookly-time-additional'+("waiting-list"==o.status?" bookly-waiting-list":"")+'"> '+o.additional_text+"</span></button>"}),o[t]=a}),o}function D(){null!=o&&(o.abort(),o=null)}}function le(c){var e={action:"bookly_render_extras",csrf_token:BooklyL10n.csrf_token},f=ee[c.form_id].$container;ee[c.form_id].skip_steps.service&&ee[c.form_id].use_client_time_zone&&(e.time_zone=ee[c.form_id].timeZone,e.time_zone_offset=ee[c.form_id].timeZoneOffset),V.extend(e,c),V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){BooklyL10n.csrf_token=e.csrf_token,f.html(e.html),void 0===c&&te(f);var s,i,o=V(".bookly-js-next-step",f),t=V(".bookly-js-back-step",f),a=V(".bookly-js-go-to-cart",f),r=V(".bookly-js-extras-item",f),n=V(".bookly-js-extras-summary span",f),l=e.currency,d=function(e,o){var t=e.find("input"),a=e.find(".bookly-js-extras-total-price"),s=o*parseFloat(e.data("price"));a.text(l.format.replace("1",s.toFixed(l.precision))),t.val(o),e.find(".bookly-js-extras-thumb").toggleClass("bookly-extras-selected",0<o);var i=0;r.each(function(e,o){var t=V(this),a=t.closest(".bookly-js-extras-container").data("multiplier");i+=parseFloat(t.data("price"))*t.find("input").val()*a}),i?n.html(" + "+l.format.replace("1",i.toFixed(l.precision))):n.html("")};r.each(function(e,o){var t=V(this),a=t.find("input");t.find(".bookly-js-extras-thumb").on("click",function(){d(t,0<a.val()?0:1)}),t.find(".bookly-js-count-control").on("click",function(){var e=parseInt(a.val());e=V(this).hasClass("bookly-js-extras-increment")?Math.min(t.data("max_quantity"),e+1):Math.max(0,e-1),d(t,e)})}),a.on("click",function(e){e.preventDefault(),oe(this),ie({form_id:c.form_id,from_step:"extras"})}),o.on("click",function(e){e.preventDefault(),oe(this);var a={};V(".bookly-js-extras-container",f).each(function(){var e=V(this),o=e.data("chain"),t={};e.find(".bookly-js-extras-item").each(function(e,o){s=V(this),0<(i=s.find("input")).val()&&(t[s.data("id")]=i.val())}),a[o]=JSON.stringify(t)}),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:c.form_id,extras:a},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){"before_step_time"==ee[c.form_id].step_extras?ne({form_id:c.form_id,prev_step:"extras"}):ee[c.form_id].skip_steps.repeat?ee[c.form_id].skip_steps.cart?S({form_id:c.form_id,add_to_cart:!0}):ie({form_id:c.form_id,add_to_cart:!0,from_step:"time"}):re({form_id:c.form_id})}})}),t.on("click",function(e){e.preventDefault(),oe(this),"after_step_time"!=ee[c.form_id].step_extras||ee[c.form_id].no_time?de({form_id:c.form_id}):ne({form_id:c.form_id,prev_step:"extras"})})}}})}function de(q){if(ee[q.form_id].skip_steps.service)ee[q.form_id].skip_steps.extras||"before_step_time"!=ee[q.form_id].step_extras?ne(q):le(q);else{var e={action:"bookly_render_service",csrf_token:BooklyL10n.csrf_token},P=ee[q.form_id].$container;ee[q.form_id].use_client_time_zone&&(e.time_zone=ee[q.form_id].timeZone,e.time_zone_offset=ee[q.form_id].timeZoneOffset),V.extend(e,q),V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){BooklyL10n.csrf_token=e.csrf_token,P.html(e.html),void 0===q&&te(P);var a=V(".bookly-js-chain-item.bookly-js-draft",P),o=V(".bookly-js-select-location",P),t=V(".bookly-js-select-category",P),s=V(".bookly-js-select-service",P),i=V(".bookly-js-select-employee",P),r=V(".bookly-js-select-units-duration",P),n=V(".bookly-js-select-number-of-persons",P),l=V(".bookly-js-select-quantity",P),d=V(".bookly-js-date-from",P),c=V(".bookly-js-week-day",P),f=V(".bookly-js-select-time-from",P),m=V(".bookly-js-select-time-to",P),y=V(".bookly-js-next-step",P),u=V(".bookly-js-mobile-next-step",P),_=V(".bookly-js-mobile-prev-step",P),h=e.locations,b=e.categories,v=e.services,j=e.staff,k=e.chain,p=e.required,g=ee[q.form_id].defaults,w=e.services_per_location,x=0,C=!1,L=e.service_name_with_duration,B=e.show_ratings;d.pickadate({formatSubmit:"yyyy-mm-dd",format:ee[q.form_id].date_format,min:e.date_min||!0,max:e.date_max||!0,clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ee[q.form_id].start_of_week,onSet:function(e){if(V.isNumeric(e.select)){var o=new Date(e.select);V('.bookly-js-week-day[value="'+(o.getDay()+1)+'"]:not(:checked)',P).attr("checked",!0).trigger("change")}}}),V(".bookly-js-go-to-cart",P).on("click",function(e){e.preventDefault(),oe(this),ie({form_id:q.form_id,from_step:"service"})});var T=function(e,o,t){V('option:not([value=""])',e).remove();var a,s=document.createDocumentFragment();o=(a=o,Object.keys(a).map(function(e){return a[e]})).sort(function(e,o){return parseInt(e.pos)<parseInt(o.pos)?-1:parseInt(e.pos)>parseInt(o.pos)?1:0}),V.each(o,function(e,o){var t=document.createElement("option");t.value=o.id,t.text=o.name,s.appendChild(t)}),e.append(s),e.find('option[value="'+t+'"]').length&&e.val(t)},D=function(e,o,s,i,t){var r=w&&o?o:0,n={},a={},l={},d={},c=null,f=null;if(V.each(j,function(t,a){o&&!h[o].staff.hasOwnProperty(t)||(i?a.services.hasOwnProperty(i)&&V.each(a.services[i].locations,function(e,o){if(r&&r!=e)return!0;f=f?Math.min(f,o.min_capacity):o.min_capacity,c=c?Math.max(c,o.max_capacity):o.max_capacity,n[t]={id:t,name:a.name+(null==o.price||!r&&w?"":" ("+o.price+")"),pos:a.pos}}):s?V.each(a.services,function(e){if(v[e].category_id==s)return n[t]=V.extend({},a),!1}):n[t]=V.extend({},a))}),o){var m=[],y=[];V.each(n,function(o){V.each(j[o].services,function(e){j[o].services[e].locations.hasOwnProperty(r)&&(m.push(v[e].category_id),y.push(e))})}),V.each(b,function(e,o){-1<V.inArray(parseInt(e),m)&&(l[e]=o)}),V.each(v,function(e,o){-1<V.inArray(e,y)&&(s&&o.category_id!=s||t&&!j[t].services.hasOwnProperty(e)||(a[e]=o))})}else l=b,V.each(v,function(e,o){s&&o.category_id!=s||t&&!j[t].services.hasOwnProperty(e)||(a[e]=o)});for(var u=V(".bookly-js-select-number-of-persons",e).val()||1,_=i?t?j[t].services[i].locations.hasOwnProperty(r)?j[t].services[i].locations[r].max_capacity:1:c||1:1,k=i?t?j[t].services[i].locations.hasOwnProperty(r)?j[t].services[i].locations[r].min_capacity:1:f||1:1,p=k;p<=_;++p)d[p]={id:p,name:p,pos:p};_<u&&(u=_),(u<k||!ee[q.form_id].form_attributes.show_number_of_persons)&&(u=k),B&&V.each(j,function(e,o){n.hasOwnProperty(o.id)&&(i?o.services.hasOwnProperty(i)&&o.services[i].rating&&(n[o.id].name="★"+o.services[i].rating+" "+n[o.id].name):o.rating&&(n[o.id].name="★"+o.rating+" "+n[o.id].name))}),T(e.find(".bookly-js-select-category"),l,s),T(e.find(".bookly-js-select-service"),a,i),T(e.find(".bookly-js-select-employee"),n,t),T(e.find(".bookly-js-select-number-of-persons"),d,u)};P.off("click").off("change"),P.on("change",".bookly-js-select-location",function(){var e=V(this).closest(".bookly-js-chain-item"),o=this.value,t=e.find(".bookly-js-select-category").val(),a=e.find(".bookly-js-select-service").val(),s=e.find(".bookly-js-select-employee").val();if(o){var i=w?o:0;if(s&&(h[o].staff.hasOwnProperty(s)?a&&!j[s].services[a].locations.hasOwnProperty(i)&&(s=""):s=""),a){var r=!1;V.each(h[o].staff,function(e){if(j[e].services.hasOwnProperty(a)&&j[e].services[a].locations.hasOwnProperty(i))return!(r=!0)}),r||(a="")}if(t){r=!1;V.each(h[o].staff,function(e){if(V.each(j[e].services,function(e){if(v[e].category_id==t)return!(r=!0)}),r)return!1}),r||(t="")}}D(e,o,t,a,s),S(e,a,s,o)}),P.on("change",".bookly-js-select-category",function(){var e=V(this).closest(".bookly-js-chain-item"),o=e.find(".bookly-js-select-location").val(),t=this.value,a=e.find(".bookly-js-select-service").val(),s=e.find(".bookly-js-select-employee").val();if(t){if(C=!0,a&&v[a].category_id!=t&&(a=""),s){var i=!1;V.each(j[s].services,function(e){if(v[e].category_id==t)return!(i=!0)}),i||(s="")}}else C=!1;D(e,o,t,a,s)});var S=function(e,a,o,s){var t=e.find(".bookly-js-select-units-duration"),i=t.val();if(t.find("option").remove(),a){V.each(function(e){if(!e||w&&!s)return v[a].hasOwnProperty("units")?v[a].units:[{value:"",title:"-"}];var o=s||0,t=j[e].services[a].locations;return void 0===t?[{value:"",title:"-"}]:(t.hasOwnProperty(o)?t[o]:t[0]).units||[{value:"",title:"-"}]}(o),function(e,o){t.append(V("<option>",{value:o.value,text:o.title}))}),0!=t.find('option[value="'+i+'"]').length&&t.val(i)}else t.append(V("<option>",{value:"",text:"-"}))};if(P.on("change",".bookly-js-select-service",function(){var e=V(this).closest(".bookly-js-chain-item"),o=e.find(".bookly-js-select-location").val(),t=C?e.find(".bookly-js-select-category").val():"",a=this.value,s=e.find(".bookly-js-select-employee").val();a&&s&&!j[s].services.hasOwnProperty(a)&&(s=""),D(e,o,t,a,s),a&&e.find(".bookly-js-select-category").val(v[a].category_id),S(e,a,s,o)}),P.on("change",".bookly-js-select-employee",function(){var e=V(this).closest(".bookly-js-chain-item"),o=e.find(".bookly-js-select-location").val(),t=V(".bookly-js-select-category",e).val(),a=e.find(".bookly-js-select-service").val(),s=this.value;D(e,o,t,a,s),S(e,a,s,o)}),L&&V.each(v,function(e,o){o.name=o.name+" ( "+o.duration+" )"}),T(o,h),T(t,b),T(s,v),B){var O={};V.each(j,function(e,o){O[e]=V.extend({},o),o.rating&&(O[e].name="★"+o.rating+" "+O[e].name)}),T(i,O)}else T(i,j);o.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_locations),t.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_categories),s.closest(".bookly-form-group").toggle(!(ee[q.form_id].form_attributes.hide_services&&g.service_id)),i.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_staff_members),r.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_service_duration),n.closest(".bookly-form-group").toggle(ee[q.form_id].form_attributes.show_number_of_persons),l.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_quantity),g.location_id&&o.val(g.location_id).trigger("change"),g.category_id&&t.val(g.category_id).trigger("change"),g.service_id&&s.val(g.service_id).trigger("change"),g.staff_id&&i.val(g.staff_id).trigger("change"),ee[q.form_id].form_attributes.hide_date&&V(".bookly-js-available-date",P).hide(),ee[q.form_id].form_attributes.hide_week_days&&V(".bookly-js-week-days",P).hide(),ee[q.form_id].form_attributes.hide_time_range&&V(".bookly-js-time-range",P).hide(),V.each(k,function(e,o){var t=a.clone().data("chain_key",e).removeClass("bookly-js-draft").css("display","table");a.find("select").each(function(e,o){t.find("select:eq("+e+")").val(o.value)}),0==(x=e)&&t.find('.bookly-js-actions button[data-action="drop"]').remove(),V(".bookly-js-chain-item:last",P).after(t),!ee[q.form_id].form_attributes.hide_locations&&o.location_id&&V(".bookly-js-select-location",t).val(o.location_id).trigger("change"),o.service_id&&(V(".bookly-js-select-service",t).val(o.service_id).trigger("change"),ee[q.form_id].form_attributes.hide_categories&&(ee[q.form_id].form_attributes.hasOwnProperty("const_category_id")?V(".bookly-js-select-category",t).val(ee[q.form_id].form_attributes.const_category_id):V(".bookly-js-select-category",t).val(""))),!ee[q.form_id].form_attributes.hide_staff_members&&1==o.staff_ids.length&&o.staff_ids[0]&&V(".bookly-js-select-employee",t).val(o.staff_ids[0]).trigger("change"),1<o.number_of_persons&&V(".bookly-js-select-number-of-persons",t).val(o.number_of_persons),1<o.units&&V(".bookly-js-select-units-duration",t).val(o.units),1<o.quantity&&V(".bookly-js-select-quantity",t).val(o.quantity)}),P.on("click",".bookly-js-mobile-step-1 .bookly-js-actions button",function(){switch(V(this).data("action")){case"plus":var t=a.clone();a.find("select").each(function(e,o){t.find("select:eq("+e+")").val(o.value)}),V(".bookly-js-chain-item:last",P).after(t.data("chain_key",++x).removeClass("bookly-js-draft").css("display","table"));break;case"drop":V(this).closest(".bookly-js-chain-item").remove()}}),c.on("change",function(){var e=V(this);e.is(":checked")?e.parent().not("[class*='active']").addClass("active"):e.parent().removeClass("active")}),f.on("change",function(){var e=V(this).val(),o=m.val(),t=V("option:last",f);m.empty(),f[0].selectedIndex<t.index()?V("option",this).each(function(){V(this).val()>e&&m.append(V(this).clone())}):m.append(t.clone()).val(t.val());var a=V("option:first",m).val();m.val(a<=o?o:a)});var M=function(){V(".bookly-js-select-service-error",P).hide(),V(".bookly-js-select-employee-error",P).hide(),V(".bookly-js-select-location-error",P).hide();var o=!0,t=null,a=null,s=null,i=null;return V(".bookly-js-chain-item:not(.bookly-js-draft)",P).each(function(){var e=V(this);t=V(".bookly-js-select-service",e),a=V(".bookly-js-select-employee",e),s=V(".bookly-js-select-location",e),t.removeClass("bookly-error"),a.removeClass("bookly-error"),s.removeClass("bookly-error"),t.val()||(o=!1,t.addClass("bookly-error"),V(".bookly-js-select-service-error",e).show(),i=t),p.hasOwnProperty("location")&&p.location&&!s.val()&&(o=!1,s.addClass("bookly-error"),V(".bookly-js-select-location-error",e).show(),i=s),p.staff&&!a.val()&&(o=!1,a.addClass("bookly-error"),V(".bookly-js-select-employee-error",e).show(),i=a)}),d.removeClass("bookly-error"),d.val()||(o=!1,d.addClass("bookly-error"),null===i&&(i=d)),V(".bookly-js-week-day:checked",P).length||(o=!1,null===i&&(i=c)),null!==i&&te(i),o};y.on("click",function(e){if(e.preventDefault(),M()){oe(this);var a={},s=0,i=0,r={required:2,optional:1,off:0};V(".bookly-js-chain-item:not(.bookly-js-draft)",P).each(function(){var e=V(this),o=[],t=v[V(".bookly-js-select-service",e).val()];V(".bookly-js-select-employee",e).val()?o.push(V(".bookly-js-select-employee",e).val()):V(".bookly-js-select-employee",e).find("option").each(function(){this.value&&o.push(this.value)}),a[e.data("chain_key")]={location_id:V(".bookly-js-select-location",e).val(),service_id:V(".bookly-js-select-service",e).val(),staff_ids:o,units:V(".bookly-js-select-units-duration",e).val()||1,number_of_persons:V(".bookly-js-select-number-of-persons",e).val()||1,quantity:V(".bookly-js-select-quantity",e).val()?V(".bookly-js-select-quantity",e).val():1},i=Math.max(i,r[t.hasOwnProperty("time_requirements")?t.time_requirements:"required"]),s+=t.has_extras});var o=[];V(".bookly-js-week-days .active input.bookly-js-week-day",P).each(function(){o.push(this.value)}),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:q.form_id,chain:a,date_from:d.pickadate("picker").get("select","yyyy-mm-dd"),days:o,time_from:f.val(),time_to:m.val(),no_extras:0==s},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ee[q.form_id].no_time=0==i,ee[q.form_id].no_extras=0==s,ee[q.form_id].skip_steps.extras?ne({form_id:q.form_id}):0==s||"after_step_time"==ee[q.form_id].step_extras?ne({form_id:q.form_id}):le({form_id:q.form_id})}})}}),u.on("click",function(e,o){return M()&&(ee[q.form_id].skip_steps.service_part2?(oe(this),y.trigger("click")):(V(".bookly-js-mobile-step-1",P).hide(),V(".bookly-js-mobile-step-2",P).css("display","block"),1!=o&&te(P))),!1}),ee[q.form_id].skip_steps.service_part1?(u.trigger("click",[!0]),_.remove()):_.on("click",function(){return V(".bookly-js-mobile-step-1",P).show(),V(".bookly-js-mobile-step-2",P).hide(),s.val()&&V(".bookly-js-select-service",P).parent().removeClass("bookly-error"),!1})}}})}}window.bookly=function(e){var o;(ee[e.form_id]=e,ee[e.form_id].$container=V("#bookly-form-"+e.form_id),ee[e.form_id].timeZone="object"==typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0,ee[e.form_id].timeZoneOffset=(new Date).getTimezoneOffset(),ee[e.form_id].skip_steps.service=e.skip_steps.service_part1&&e.skip_steps.service_part2,"finished"==e.status.booking?ae({form_id:e.form_id}):"cancelled"==e.status.booking?se({form_id:e.form_id}):de({form_id:e.form_id,new_chain:!0}),e.hasOwnProperty("facebook")&&e.facebook.enabled&&(o=e,FB.init({appId:o.facebook.appId,status:!0,version:"v2.12"}),FB.getLoginStatus(function(e){"connected"===e.status?(o.facebook.enabled=!1,FB.api("/me",{fields:"id,name,first_name,last_name,email,link"},function(e){V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:V.extend(e,{action:"bookly_pro_facebook_login",csrf_token:BooklyL10n.csrf_token,form_id:o.form_id}),dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){}})})):FB.Event.subscribe("auth.statusChange",function(e){o.facebook.onStatusChange&&o.facebook.onStatusChange(e)})})),e.hasOwnProperty("google_maps")&&e.google_maps.enabled)&&function(e,o,t){var a=document.createElement("script");a.type="text/javascript",void 0!==o&&(a.async=o);t instanceof Function&&(a.onload=t);document.head.appendChild(a),a.src=e}("https://maps.googleapis.com/maps/api/js?key="+e.google_maps.api_key+"&libraries=places",!0)}}(jQuery);
2
  //# sourceMappingURL=bookly.min.js.map
1
+ !function(V){"use strict";V=V&&V.hasOwnProperty("default")?V.default:V;var ee={};function oe(e){var o=Ladda.create(e);return o.start(),o}function te(e){var o=e.offset().top,t=V(window).scrollTop();(o<V(window).scrollTop()||o>t+window.innerHeight)&&V("html,body").animate({scrollTop:o-24},500)}function ae(e){var o=V.extend({action:"bookly_render_complete",csrf_token:BooklyL10n.csrf_token},e),t=ee[e.form_id].$container;V.ajax({url:BooklyL10n.ajaxurl,data:o,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&(e.final_step_url&&!o.error?document.location.href=e.final_step_url:(t.html(e.html),te(t)))}})}function se(l){var d=ee[l.form_id].$container;V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_render_payment",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id,page_url:document.URL.split("#")[0]},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){if(e.disabled)return void c(l.form_id);d.html(e.html),te(d),"cancelled"==ee[l.form_id].status.booking&&(ee[l.form_id].status.booking="ok");var o=V(".bookly-payment",d),t=V(".bookly-js-apply-coupon",d),a=V("input.bookly-user-coupon",d),s=V(".bookly-js-coupon-error",d),i=V("input[type=radio][name=bookly-full-payment]",d),r=V(".bookly-info-text-coupon",d),n=V(".bookly-gateway-buttons,form.bookly-authorize_net,form.bookly-stripe",d);o.on("click",function(){n.hide(),V(".bookly-gateway-buttons.pay-"+V(this).val(),d).show(),"card"==V(this).val()&&V("form.bookly-"+V(this).data("form"),d).show()}),o.eq(0).trigger("click"),i.on("change",function(){var e={action:"bookly_deposit_payments_apply_payment_method",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id,deposit_full:V(this).val()};V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&se({form_id:l.form_id})}})}),t.on("click",function(e){var o=oe(this);s.text(""),a.removeClass("bookly-error");var t={action:"bookly_coupons_apply_coupon",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id,coupon_code:a.val()};V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:t,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success?se({form_id:l.form_id}):(s.html(ee[l.form_id].errors[e.error]),a.addClass("bookly-error"),r.html(e.text),te(s),o.stop())},error:function(){o.stop()}})}),V(".bookly-js-next-step",d).on("click",function(e){var t,a=oe(this);if(V(".bookly-payment[value=local]",d).is(":checked")||V(this).hasClass("bookly-js-coupon-payment"))e.preventDefault(),c(l.form_id);else if(V(".bookly-payment[value=card]",d).is(":checked")){var o=V(".bookly-payment[data-form=stripe]",d).is(":checked"),s=o?"bookly_stripe_payment":"bookly_authorize_net_aim_payment";t=d.find(o?".bookly-stripe":".bookly-authorize_net"),e.preventDefault();var i={action:s,csrf_token:BooklyL10n.csrf_token,card:{number:t.find('input[name="card_number"]').val(),cvc:t.find('input[name="card_cvc"]').val(),exp_month:t.find('select[name="card_exp_month"]').val(),exp_year:t.find('select[name="card_exp_year"]').val()},form_id:l.form_id},r=function(e){V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success?ae({form_id:l.form_id}):"cart_item_not_available"==e.error?f(e,l.form_id):"payment_error"==e.error&&(a.stop(),t.find(".bookly-js-card-error").text(e.error_message))}})};if(o&&t.find("#publishable_key").val())try{Stripe.setPublishableKey(t.find("#publishable_key").val()),Stripe.createToken(i.card,function(e,o){o.error?(t.find(".bookly-js-card-error").text(o.error.message),a.stop()):(i.card=o.id,r(i))})}catch(e){t.find(".bookly-js-card-error").text(e.message),a.stop()}else r(i)}else(V(".bookly-payment[value=paypal]",d).is(":checked")||V(".bookly-payment[value=2checkout]",d).is(":checked")||V(".bookly-payment[value=payu_biz]",d).is(":checked")||V(".bookly-payment[value=payu_latam]",d).is(":checked")||V(".bookly-payment[value=payson]",d).is(":checked")||V(".bookly-payment[value=mollie]",d).is(":checked"))&&(e.preventDefault(),0<(t=V(this).closest("form")).find("input.bookly-payment-id").length?V.ajax({type:"POST",url:BooklyL10n.ajaxurl,xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,data:{action:"bookly_pro_save_pending_appointment",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id,payment_type:t.data("gateway")},dataType:"json",success:function(e){e.success?(t.find("input.bookly-payment-id").val(e.payment_id),t.submit()):"cart_item_not_available"==e.error&&f(e,l.form_id)}}):V.ajax({type:"POST",url:BooklyL10n.ajaxurl,xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,data:{action:"bookly_check_cart",csrf_token:BooklyL10n.csrf_token,form_id:l.form_id},dataType:"json",success:function(e){e.success?t.submit():"cart_item_not_available"==e.error&&f(e,l.form_id)}}))}),V(".bookly-js-back-step",d).on("click",function(e){e.preventDefault(),oe(this),S({form_id:l.form_id})})}}})}function c(o){V.ajax({type:"POST",url:BooklyL10n.ajaxurl,xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,data:{action:"bookly_save_appointment",csrf_token:BooklyL10n.csrf_token,form_id:o},dataType:"json"}).done(function(e){e.success?ae({form_id:o}):"cart_item_not_available"==e.error&&f(e,o)})}function f(e,o){ee[o].skip_steps.cart?ne({form_id:o},ee[o].errors[e.error]):ie({form_id:o},{failed_key:e.failed_cart_key,message:ee[o].errors[e.error]})}function S(W){var e=V.extend({action:"bookly_render_details",csrf_token:BooklyL10n.csrf_token},W),G=ee[W.form_id].$container;V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){G.html(e.html),te(G);var l=e.intlTelInput,d=e.update_details_dialog,c=e.woocommerce;ee[W.form_id].hasOwnProperty("google_maps")&&ee[W.form_id].google_maps.enabled&&(G||V(".bookly-form .bookly-details-step")).each(function(){!function(t){var e=t.find(".bookly-js-cst-address-autocomplete");if(e.length){var i=new google.maps.places.Autocomplete(e[0],{types:["geocode"]}),o=[{selector:".bookly-js-address-country",val:function(){return a("country")},short:function(){return a("country",!0)}},{selector:".bookly-js-address-postcode",val:function(){return a("postal_code")}},{selector:".bookly-js-address-city",val:function(){return a("locality")}},{selector:".bookly-js-address-state",val:function(){return a("administrative_area_level_1")},short:function(){return a("administrative_area_level_1",!0)}},{selector:".bookly-js-address-street",val:function(){return a("route")}},{selector:".bookly-js-address-street_number",val:function(){return a("street_number")}}],a=function(e,o){for(var t=i.getPlace().address_components,a=0;a<t.length;a++){var s=t[a].types[0];if(s===e)return o?t[a].short_name:t[a].long_name}return""};i.addListener("place_changed",function(){o.forEach(function(e){var o=t.find(e.selector);0!==o.length&&(o.val(e.val()),"function"==typeof e.short&&o.data("short",e.short()))})})}}(V(this))}),V(document.body).trigger("bookly.render.step_detail",[G]);var f="",t=V(".bookly-js-guest",G),m=V(".bookly-js-user-phone-input",G),y=V(".bookly-js-user-email",G),u=V(".bookly-js-user-email-confirm",G),_=V(".bookly-js-select-birthday-day",G),k=V(".bookly-js-select-birthday-month",G),p=V(".bookly-js-select-birthday-year",G),h=V(".bookly-js-address-country",G),b=V(".bookly-js-address-state",G),v=V(".bookly-js-address-postcode",G),j=V(".bookly-js-address-city",G),g=V(".bookly-js-address-street",G),w=V(".bookly-js-address-street_number",G),x=V(".bookly-js-address-additional_address",G),C=V(".bookly-js-address-country-error",G),L=V(".bookly-js-address-state-error",G),B=V(".bookly-js-address-postcode-error",G),T=V(".bookly-js-address-city-error",G),D=V(".bookly-js-address-street-error",G),S=V(".bookly-js-address-street_number-error",G),O=V(".bookly-js-address-additional_address-error",G),M=V(".bookly-js-select-birthday-day-error",G),q=V(".bookly-js-select-birthday-month-error",G),P=V(".bookly-js-select-birthday-year-error",G),F=V(".bookly-js-full-name",G),E=V(".bookly-js-first-name",G),R=V(".bookly-js-last-name",G),H=V(".bookly-js-user-notes",G),o=V(".bookly-custom-field",G),a=V(".bookly-js-info-field",G),X=V(".bookly-js-user-phone-error",G),I=V(".bookly-js-user-email-error",G),z=V(".bookly-js-user-email-confirm-error",G),N=V(".bookly-js-full-name-error",G),Y=V(".bookly-js-first-name-error",G),Z=V(".bookly-js-last-name-error",G),s=V(".bookly-js-captcha-img",G),i=V(".bookly-custom-field-error",G),r=V(".bookly-js-info-field-error",G),n=V(".bookly-js-modal",G),J=V(".bookly-js-login",G),$=V(".bookly-js-cst-duplicate",G),A=V(".bookly-js-next-step",G),U=V([M,q,P,C,L,B,T,D,S,O,N,Y,Z,X,I,z,i,r]).map(V.fn.toArray),K=V([_,k,p,j,h,v,b,g,w,x,F,E,R,m,y,u,o,a]).map(V.fn.toArray),Q=function(e){if(F.val(e.data.full_name).removeClass("bookly-error"),E.val(e.data.first_name).removeClass("bookly-error"),R.val(e.data.last_name).removeClass("bookly-error"),e.data.birthday){var o=e.data.birthday.split("-"),t=parseInt(o[0]),a=parseInt(o[1]),s=parseInt(o[2]);_.val(s).removeClass("bookly-error"),k.val(a).removeClass("bookly-error"),p.val(t).removeClass("bookly-error")}e.data.phone&&(m.removeClass("bookly-error"),l.enabled?m.intlTelInput("setNumber",e.data.phone):m.val(e.data.phone)),e.data.country&&h.val(e.data.country).removeClass("bookly-error"),e.data.state&&b.val(e.data.state).removeClass("bookly-error"),e.data.postcode&&v.val(e.data.postcode).removeClass("bookly-error"),e.data.city&&j.val(e.data.city).removeClass("bookly-error"),e.data.street&&g.val(e.data.street).removeClass("bookly-error"),e.data.street_number&&w.val(e.data.street_number).removeClass("bookly-error"),e.data.additional_address&&x.val(e.data.additional_address).removeClass("bookly-error"),y.val(e.data.email).removeClass("bookly-error"),e.data.info_fields&&e.data.info_fields.forEach(function(e){var o=G.find('.bookly-js-info-field-row[data-id="'+e.id+'"]');switch(o.data("type")){case"checkboxes":e.value.forEach(function(e){o.find(".bookly-js-info-field").filter(function(){return this.value==e}).prop("checked",!0)});break;case"radio-buttons":o.find(".bookly-js-info-field").filter(function(){return this.value==e.value}).prop("checked",!0);break;default:o.find(".bookly-js-info-field").val(e.value)}}),U.filter(":not(.bookly-custom-field-error)").html("")};l.enabled&&m.intlTelInput({preferredCountries:[l.country],initialCountry:l.country,geoIpLookup:function(t){V.get("https://ipinfo.io",function(){},"jsonp").always(function(e){var o=e&&e.country?e.country:"";t(o)})},utilsScript:l.utils}),V("body > .bookly-js-modal."+W.form_id).remove(),n.addClass(W.form_id).appendTo("body").on("click",".bookly-js-close",function(e){e.preventDefault(),V(e.delegateTarget).removeClass("bookly-in").find("form").trigger("reset").end().find("input").removeClass("bookly-error").end().find(".bookly-label-error").html("")}),V(".bookly-js-login-show",G).on("click",function(e){e.preventDefault(),J.addClass("bookly-in")}),V("button:submit",J).on("click",function(e){e.preventDefault();var o=Ladda.create(this);o.start(),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_wp_user_login",csrf_token:BooklyL10n.csrf_token,form_id:W.form_id,log:J.find('[name="log"]').val(),pwd:J.find('[name="pwd"]').val(),rememberme:J.find('[name="rememberme"]').prop("checked")?1:0},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success?(BooklyL10n.csrf_token=e.data.csrf_token,t.fadeOut("slow"),Q(e),J.removeClass("bookly-in")):"incorrect_username_password"==e.error&&(J.find("input").addClass("bookly-error"),J.find(".bookly-label-error").html(ee[W.form_id].errors[e.error])),o.stop()}})}),V("button:submit",$).on("click",function(e){e.preventDefault(),$.removeClass("bookly-in"),A.trigger("click",[1])}),ee[W.form_id].hasOwnProperty("facebook")&&ee[W.form_id].facebook.enabled&&(FB.XFBML.parse(V(".bookly-js-fb-login-button",G).parent().get(0)),ee[W.form_id].facebook.onStatusChange=function(e){"connected"===e.status&&(ee[W.form_id].facebook.enabled=!1,ee[W.form_id].facebook.onStatusChange=void 0,t.fadeOut("slow",function(){V(".bookly-js-fb-login-button").hide()}),FB.api("/me",{fields:"id,name,first_name,last_name,email"},function(e){V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:V.extend(e,{action:"bookly_pro_facebook_login",csrf_token:BooklyL10n.csrf_token,form_id:W.form_id}),dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&Q(e)}})}))}),A.on("click",function(e,o){e.preventDefault();var a,t=[],s={},i=[],r=oe(this);V("div.bookly-js-info-field-row",G).each(function(){var e=V(this);switch(e.data("type")){case"text-field":t.push({id:e.data("id"),value:e.find("input.bookly-js-info-field").val()});break;case"textarea":t.push({id:e.data("id"),value:e.find("textarea.bookly-js-info-field").val()});break;case"checkboxes":a=[],e.find("input.bookly-js-info-field:checked").each(function(){a.push(this.value)}),t.push({id:e.data("id"),value:a});break;case"radio-buttons":t.push({id:e.data("id"),value:e.find("input.bookly-js-info-field:checked").val()||null});break;case"drop-down":t.push({id:e.data("id"),value:e.find("select.bookly-js-info-field").val()})}}),V(".bookly-custom-fields-container",G).each(function(){var e=V(this),o=e.data("key"),t=[];V("div.bookly-custom-field-row",e).each(function(){var e=V(this);switch(e.data("type")){case"text-field":case"file":t.push({id:e.data("id"),value:e.find("input.bookly-custom-field").val()});break;case"textarea":t.push({id:e.data("id"),value:e.find("textarea.bookly-custom-field").val()});break;case"checkboxes":a=[],e.find("input.bookly-custom-field:checked").each(function(){a.push(this.value)}),t.push({id:e.data("id"),value:a});break;case"radio-buttons":t.push({id:e.data("id"),value:e.find("input.bookly-custom-field:checked").val()||null});break;case"drop-down":t.push({id:e.data("id"),value:e.find("select.bookly-custom-field").val()});break;case"captcha":t.push({id:e.data("id"),value:e.find("input.bookly-custom-field").val()}),i.push(e.data("id"))}}),s[o]={custom_fields:JSON.stringify(t)}});try{""==(f=l.enabled?m.intlTelInput("getNumber"):m.val())&&(f=m.val())}catch(e){f=m.val()}var n={action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:W.form_id,full_name:F.val(),first_name:E.val(),last_name:R.val(),phone:f,email:y.val(),email_confirm:u.val(),birthday:{day:_.val(),month:k.val(),year:p.val()},country:h.val(),state:b.val(),postcode:v.val(),city:j.val(),street:g.val(),street_number:w.val(),additional_address:x.val(),address_iso:{country:h.data("short"),state:b.data("short")},info_fields:t,notes:H.val(),cart:s,captcha_ids:JSON.stringify(i),force_update_customer:!d||o};V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:n,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(o){if(U.empty(),K.removeClass("bookly-error"),o.success)if(c.enabled){var e={action:"bookly_pro_add_to_woocommerce_cart",csrf_token:BooklyL10n.csrf_token,form_id:W.form_id};V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success?window.location.href=c.cart_url:(r.stop(),ne({form_id:W.form_id},ee[W.form_id].errors[e.error]))}})}else se({form_id:W.form_id});else{var i=null;if(o.appointments_limit_reached)ae({form_id:W.form_id,error:"appointments_limit_reached"});else{r.stop();[{name:"full_name",errorElement:N,formElement:F},{name:"first_name",errorElement:Y,formElement:E},{name:"last_name",errorElement:Z,formElement:R},{name:"phone",errorElement:X,formElement:m},{name:"email",errorElement:I,formElement:y},{name:"email_confirm",errorElement:z,formElement:u},{name:"birthday_day",errorElement:M,formElement:_},{name:"birthday_month",errorElement:q,formElement:k},{name:"birthday_year",errorElement:P,formElement:p},{name:"country",errorElement:C,formElement:h},{name:"state",errorElement:L,formElement:b},{name:"postcode",errorElement:B,formElement:v},{name:"city",errorElement:T,formElement:j},{name:"street",errorElement:D,formElement:g},{name:"street_number",errorElement:S,formElement:w},{name:"additional_address",errorElement:O,formElement:x}].forEach(function(e){o[e.name]&&(e.errorElement.html(o[e.name]),e.formElement.addClass("bookly-error"),null===i&&(i=e.formElement))}),o.info_fields&&V.each(o.info_fields,function(e,o){var t=V('div.bookly-js-info-field-row[data-id="'+e+'"]',G);t.find(".bookly-js-info-field-error").html(o),t.find(".bookly-js-info-field").addClass("bookly-error"),null===i&&(i=t.find(".bookly-js-info-field"))}),o.custom_fields&&V.each(o.custom_fields,function(s,e){V.each(e,function(e,o){var t=V('.bookly-custom-fields-container[data-key="'+s+'"]',G),a=V('[data-id="'+e+'"]',t);a.find(".bookly-custom-field-error").html(o),a.find(".bookly-custom-field").addClass("bookly-error"),null===i&&(i=a.find(".bookly-custom-field"))})}),o.customer&&$.find(".bookly-js-modal-body").html(o.customer).end().addClass("bookly-in")}null!==i&&te(i)}}})}),V(".bookly-js-back-step",G).on("click",function(e){e.preventDefault(),oe(this),ee[W.form_id].skip_steps.cart?ee[W.form_id].no_time?ee[W.form_id].no_extras?de({form_id:W.form_id}):le({form_id:W.form_id}):ee[W.form_id].skip_steps.repeat?ee[W.form_id].skip_steps.extras||"after_step_time"!=ee[W.form_id].step_extras||ee[W.form_id].no_extras?ne({form_id:W.form_id}):le({form_id:W.form_id}):re({form_id:W.form_id}):ie({form_id:W.form_id})}),V(".bookly-js-captcha-refresh",G).on("click",function(){s.css("opacity","0.5"),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_custom_fields_captcha_refresh",form_id:W.form_id,csrf_token:BooklyL10n.csrf_token},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&s.attr("src",e.data.captcha_url).on("load",function(){s.css("opacity","1")})}})})}}})}function ie(o,t){if(ee[o.form_id].skip_steps.cart)S(o);else{o&&o.from_step&&(ee[o.form_id].cart_prev_step=o.from_step);var e=V.extend({action:"bookly_render_cart",csrf_token:BooklyL10n.csrf_token},o),s=ee[o.form_id].$container;V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&(s.html(e.html),t?(V(".bookly-label-error",s).html(t.message),V('tr[data-cart-key="'+t.failed_key+'"]',s).addClass("bookly-label-error")):V(".bookly-label-error",s).hide(),te(s),V(".bookly-js-next-step",s).on("click",function(){oe(this),S({form_id:o.form_id})}),V(".bookly-add-item",s).on("click",function(){oe(this),de({form_id:o.form_id,new_chain:!0})}),V(".bookly-js-back-step",s).on("click",function(e){switch(e.preventDefault(),oe(this),ee[o.form_id].cart_prev_step){case"service":de({form_id:o.form_id});break;case"extras":le({form_id:o.form_id});break;case"time":ne({form_id:o.form_id});break;case"repeat":re({form_id:o.form_id});break;default:de({form_id:o.form_id})}}),V(".bookly-js-actions button",s).on("click",function(){oe(this);var e=V(this),a=e.closest("tr");switch(e.data("action")){case"drop":V.ajax({url:BooklyL10n.ajaxurl,data:{action:"bookly_cart_drop_item",csrf_token:BooklyL10n.csrf_token,form_id:o.form_id,cart_key:a.data("cart-key")},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){var o=a.data("cart-key"),t=V('tr[data-cart-key="'+o+'"]',s);a.delay(300).fadeOut(200,function(){e.data.total_waiting_list?(V(".bookly-js-waiting-list-price",s).html(e.data.waiting_list_price),V(".bookly-js-waiting-list-deposit",s).html(e.data.waiting_list_deposit)):V(".bookly-js-waiting-list-price",s).closest("tr").remove(),V(".bookly-js-subtotal-price",s).html(e.data.subtotal_price),V(".bookly-js-subtotal-deposit",s).html(e.data.subtotal_deposit),V(".bookly-js-pay-now-deposit",s).html(e.data.pay_now_deposit),V(".bookly-js-pay-now-tax",s).html(e.data.pay_now_tax),V(".bookly-js-total-price",s).html(e.data.total_price),V(".bookly-js-total-tax",s).html(e.data.total_tax),t.remove(),0==V("tr[data-cart-key]").length&&(V(".bookly-js-back-step",s).hide(),V(".bookly-js-next-step",s).hide())})}}});break;case"edit":de({form_id:o.form_id,edit_cart_item:a.data("cart-key")})}}))}})}}function re(M,e){if(ee[M.form_id].skip_steps.repeat)ie(M,e);else{var o=V.extend({action:"bookly_render_repeat",csrf_token:BooklyL10n.csrf_token},M),q=ee[M.form_id].$container;V.ajax({url:BooklyL10n.ajaxurl,data:o,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){q.html(e.html),te(q);var o=V(".bookly-js-repeat-appointment-enabled",q),f=V(".bookly-js-next-step",q),t=V(".bookly-js-repeat-variants-container",q),a=V('[class^="bookly-js-variant"]',t),s=V(".bookly-js-repeat-variant",t),i=V(".bookly-js-get-schedule",t),r=V(".bookly-js-variant-weekly",t),n=V(".bookly-js-repeat-variant-monthly",t),l=V(".bookly-js-repeat-until",t),d=V(".bookly-js-repeat-times",t),c=V(".bookly-js-monthly-specific-day",t),m=V(".bookly-js-monthly-week-day",t),y=V(".bookly-js-repeat-daily-every",t),u=V(".bookly-js-week-day",t),_=V(".bookly-js-schedule-container",q),k=V(".bookly-js-days-error",t),p=V(".bookly-js-schedule-slots",_),h=V(".bookly-js-intersection-info",_),b=V(".bookly-js-schedule-help",_),v=V(".bookly-well",_),j=V(".bookly-pagination",_),g=V(".bookly-schedule-row-template .bookly-schedule-row",_),w=e.pages_warning_info,x=e.short_date_format,C={min:e.date_min||!0,max:e.date_max||!0},L=[],B={prepareButtonNextState:function(){for(var e=f.prop("disabled"),o=0==L.length,t=0;t<L.length;t++)if(e){if(!L[t].deleted){o=!1;break}}else{if(!L[t].deleted){o=!1;break}o=!0}f.prop("disabled",o)},addTimeSlotControl:function(e,o,a,s){var i,r="";o.length&&(r=V("<select/>"),V.each(o,function(e,o){var t=V("<option/>");t.text(o.title).val(o.value),o.disabled&&t.attr("disabled","disabled"),r.append(t),i||o.disabled||(o.title==a?(r.val(o.value),i=!0):o.title==s&&r.val(o.value))}));e.find(".bookly-js-schedule-time").html(r),e.find("div.bookly-label-error").toggle(!o.length)},renderSchedulePage:function(e){var o,t=L.length,a=5*e-5,s=[];p.html("");for(var i=a,r=0;r<5&&i<t;i++,r++)(o=g.clone()).data("datetime",L[i].datetime),o.data("index",L[i].index),V("> div:first-child",o).html(L[i].index),V(".bookly-schedule-date",o).html(L[i].display_date),void 0!==L[i].all_day_service_time?(V(".bookly-js-schedule-time",o).hide(),V(".bookly-js-schedule-all-day-time",o).html(L[i].all_day_service_time).show()):(V(".bookly-js-schedule-time",o).html(L[i].display_time).show(),V(".bookly-js-schedule-all-day-time",o).hide()),L[i].another_time&&V(".bookly-schedule-intersect",o).show(),L[i].deleted&&o.find(".bookly-schedule-appointment").addClass("bookly-appointment-hidden"),p.append(o);if(5<t){var n=V("<li/>").html("«");for(n.on("click",function(){var e=parseInt(j.find(".active").html());1<e&&B.renderSchedulePage(e-1)}),j.html(n),i=0,r=1;i<t;i+=5,r++)n=V("<li/>").html(r),j.append(n),n.on("click",function(){B.renderSchedulePage(V(this).html())});for(j.find("li:eq("+e+")").addClass("active"),(n=V("<li/>").html("»")).on("click",function(){var e=parseInt(j.find(".active").html());e<t/5&&B.renderSchedulePage(e+1)}),j.append(n).show(),i=0;i<t;i++)L[i].another_time&&(e=parseInt(i/5)+1,s.push(e),i=5*e-1);0<s.length&&h.html(w.replace("{list}",s.join(", "))),v.toggle(0<s.length),j.toggle(5<t)}else for(j.hide(),v.hide(),i=0;i<t;i++)if(L[i].another_time){b.show();break}},renderFullSchedule:function(e){L=e;var c=null;V.each(L,function(e,o){c||o.another_time||(c=o.display_time)}),B.renderSchedulePage(1),_.show(),f.prop("disabled",0==L.length),p.on("click","button[data-action]",function(){var o=V(this).closest(".bookly-schedule-row"),a=o.data("index")-1;switch(V(this).data("action")){case"drop":L[a].deleted=!0,o.find(".bookly-schedule-appointment").addClass("bookly-appointment-hidden"),B.prepareButtonNextState();break;case"restore":L[a].deleted=!1,o.find(".bookly-schedule-appointment").removeClass("bookly-appointment-hidden"),f.prop("disabled",!1);break;case"edit":var e=V('<input type="text"/>'),s=V(this),i=oe(this);o.find(".bookly-schedule-date").html(e),e.pickadate({min:C.min,max:C.max,formatSubmit:"yyyy-mm-dd",format:x,clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ee[M.form_id].start_of_week,onSet:function(){var t=[];V.each(L,function(e,o){a==e||o.deleted||t.push(o.slots)}),V.ajax({url:BooklyL10n.ajaxurl,type:"POST",data:{action:"bookly_recurring_appointments_get_daily_customer_schedule",csrf_token:BooklyL10n.csrf_token,date:this.get("select","yyyy-mm-dd"),form_id:M.form_id,exclude:t},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){s.hide(),i.stop(),e.data.length?(B.addTimeSlotControl(o,e.data[0].options,c,L[a].display_time,e.data[0].all_day_service_time),o.find('button[data-action="save"]').show()):(B.addTimeSlotControl(o,[]),o.find('button[data-action="save"]').hide())}})}});var t=JSON.parse(L[a].slots);e.pickadate("picker").set("select",new Date(t[0][2]));break;case"save":V(this).hide(),o.find('button[data-action="edit"]').show();var r=o.find(".bookly-schedule-date"),n=o.find(".bookly-js-schedule-time"),l=n.find("select"),d=l.find("option:selected");L[a].slots=l.val(),L[a].display_date=r.find("input").val(),L[a].display_time=d.text(),r.html(L[a].display_date),n.html(L[a].display_time)}})},isDateMatchesSelections:function(e){switch(s.val()){case"daily":if((6<y.val()||-1!=V.inArray(e.format("ddd").toLowerCase(),B.week_days))&&e.diff(B.date_from,"days")%y.val()==0)return!0;break;case"weekly":case"biweekly":if(("weekly"==s.val()||e.diff(B.date_from.clone().startOf("isoWeek"),"weeks")%2==0)&&-1!=V.inArray(e.format("ddd").toLowerCase(),B.checked_week_days))return!0;break;case"monthly":switch(n.val()){case"specific":if(e.format("D")==c.val())return!0;break;case"last":if(e.format("ddd").toLowerCase()==m.val()&&e.clone().endOf("month").diff(e,"days")<7)return!0;break;default:var o=e.diff(e.clone().startOf("month"),"days");if(e.format("ddd").toLowerCase()==m.val()&&o>=7*(n.prop("selectedIndex")-1)&&o<7*n.prop("selectedIndex"))return!0}}return!1},updateRepeatDate:function(){var e=0,o=d.val(),t=C.min.slice(),a=l.pickadate("picker").get("select"),s=moment().year(a.year).month(a.month).date(a.date).add(5,"years");t[1]++,B.date_from=moment(t.join(","),"YYYY,M,D"),B.week_days=[],m.find("option").each(function(){B.week_days.push(V(this).val())}),B.checked_week_days=[],u.each(function(){V(this).prop("checked")&&B.checked_week_days.push(V(this).val())});for(var i=B.date_from.clone();B.isDateMatchesSelections(i)&&e++,i.add(1,"days"),e<o&&i.isBefore(s););l.val(i.subtract(1,"days").format("MMMM D, YYYY")),l.pickadate("picker").set("select",new Date(i.format("YYYY"),i.format("M")-1,i.format("D")))},updateRepeatTimes:function(){var e=0,o=C.min.slice(),t=l.pickadate("picker").get("select"),a=moment().year(t.year).month(t.month).date(t.date);o[1]++,B.date_from=moment(o.join(","),"YYYY,M,D"),B.week_days=[],m.find("option").each(function(){B.week_days.push(V(this).val())}),B.checked_week_days=[],u.each(function(){V(this).prop("checked")&&B.checked_week_days.push(V(this).val())});for(var s=B.date_from.clone();B.isDateMatchesSelections(s)&&e++,s.add(1,"days"),s.isBefore(a););d.val(e)}};l.pickadate({formatSubmit:"yyyy-mm-dd",format:ee[M.form_id].date_format,min:C.min,max:C.max,clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ee[M.form_id].start_of_week});var T=o.on("change",function(){t.toggle(V(this).prop("checked")),V(this).prop("checked")?B.prepareButtonNextState():f.prop("disabled",!1)});if(e.repeated){var D=e.repeat_data,S=D.params;o.prop("checked",!0),s.val(D.repeat);var O=D.until.split("-");switch(l.pickadate("set").set("select",new Date(O[0],O[1]-1,O[2])),D.repeat){case"daily":y.val(S.every);break;case"weekly":case"biweekly":V(".bookly-js-week-days input.bookly-js-week-day",t).prop("checked",!1).parent().removeClass("active"),S.on.forEach(function(e){V(".bookly-js-week-days input.bookly-js-week-day[value="+e+"]",t).prop("checked",!0).parent().addClass("active")});break;case"monthly":"day"===S.on?(n.val("specific"),V(".bookly-js-monthly-specific-day[value="+S.day+"]",t).prop("checked",!0)):(n.val(S.on),m.val(S.weekday))}B.renderFullSchedule(e.schedule)}T.trigger("change"),e.could_be_repeated||o.attr("disabled",!0),s.on("change",function(){a.hide(),t.find(".bookly-js-variant-"+this.value).show(),B.updateRepeatTimes()}).trigger("change"),n.on("change",function(){m.toggle("specific"!=this.value),c.toggle("specific"==this.value),B.updateRepeatTimes()}).trigger("change"),u.on("change",function(){var e=V(this);e.is(":checked")?e.parent().not("[class*='active']").addClass("active"):e.parent().removeClass("active"),B.updateRepeatTimes()}),c.val(e.date_min[2]),c.on("change",function(){B.updateRepeatTimes()}),m.on("change",function(){B.updateRepeatTimes()}),l.on("change",function(){B.updateRepeatTimes()}),y.on("change",function(){B.updateRepeatTimes()}),d.on("change",function(){B.updateRepeatDate()}),i.on("click",function(){_.hide();var e={action:"bookly_recurring_appointments_get_customer_schedule",csrf_token:BooklyL10n.csrf_token,form_id:M.form_id,repeat:s.val(),until:l.pickadate("picker").get("select","yyyy-mm-dd"),params:{}},o=oe(this);switch(e.repeat){case"daily":e.params={every:y.val()};break;case"weekly":case"biweekly":if(e.params.on=[],V(".bookly-js-week-days input.bookly-js-week-day:checked",r).each(function(){e.params.on.push(this.value)}),0==e.params.on.length)return k.toggle(!0),o.stop(),!1;k.toggle(!1);break;case"monthly":"specific"==n.val()?e.params={on:"day",day:c.val()}:e.params={on:n.val(),weekday:m.val()}}p.off("click"),V.ajax({url:BooklyL10n.ajaxurl,type:"POST",data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){e.success&&(B.renderFullSchedule(e.data),o.stop())}})}),V(".bookly-js-back-step",q).on("click",function(e){e.preventDefault(),oe(this),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:M.form_id,unrepeat:1},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ee[M.form_id].skip_steps.extras||"after_step_time"!=ee[M.form_id].step_extras||ee[M.form_id].no_extras?ne({form_id:M.form_id}):le({form_id:M.form_id})}})}),V(".bookly-js-go-to-cart",q).on("click",function(e){e.preventDefault(),oe(this),ie({form_id:M.form_id,from_step:"repeat"})}),V(".bookly-js-next-step",q).on("click",function(e){if(oe(this),o.is(":checked")){var t=[],a=0;L.forEach(function(e){if(!e.deleted){var o=JSON.parse(e.slots);t=t.concat(o),a++}}),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:M.form_id,slots:JSON.stringify(t),repeat:a},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ie({form_id:M.form_id,add_to_cart:!0,from_step:"repeat"})}})}else V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:M.form_id,unrepeat:1},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ie({form_id:M.form_id,add_to_cart:!0,from_step:"repeat"})}})})}}})}}var o=null;function ne(C,L){if(ee[C.form_id].no_time||ee[C.form_id].skip_steps.time)ee[C.form_id].skip_steps.extras||"after_step_time"!=ee[C.form_id].step_extras||ee[C.form_id].no_extras?ee[C.form_id].skip_steps.cart?S({form_id:C.form_id,add_to_cart:!0}):ie({form_id:C.form_id,add_to_cart:!0,from_step:C&&C.prev_step?C.prev_step:"service"}):le({form_id:C.form_id});else{var e={action:"bookly_render_time",csrf_token:BooklyL10n.csrf_token},B=ee[C.form_id].$container;ee[C.form_id].skip_steps.service&&ee[C.form_id].use_client_time_zone&&(e.time_zone=ee[C.form_id].timeZone,e.time_zone_offset=ee[C.form_id].timeZoneOffset),V.extend(e,C),o=V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(0!=e.success){BooklyL10n.csrf_token=e.csrf_token,B.html(e.html);var m,y,u,_=V(".bookly-columnizer-wrap",B),k=V(".bookly-columnizer",_),i=V(".bookly-time-next",B),a=V(".bookly-time-prev",B),p=null,h=e.time_slots_wide?205:127,b=e.time_slots_wide?"bookly-column bookly-column-wide":"bookly-column",v=0,r=0,j=e.has_more_slots,g=!1,o=e.show_calendar,n=e.is_rtl,w=e.day_one_column,t=T(e.slots_data,e.selected_date);if(V(".bookly-js-back-step",B).on("click",function(e){e.preventDefault(),oe(this),ee[C.form_id].skip_steps.extras||ee[C.form_id].no_extras?de({form_id:C.form_id}):"before_step_time"==ee[C.form_id].step_extras?le({form_id:C.form_id}):de({form_id:C.form_id})}).toggle(!ee[C.form_id].skip_steps.service||!ee[C.form_id].skip_steps.extras),V(".bookly-js-go-to-cart",B).on("click",function(e){e.preventDefault(),oe(this),ie({form_id:C.form_id,from_step:"time"})}),V(".bookly-js-time-zone-switcher",B).on("change",function(e){ee[C.form_id].timeZone=this.value,ee[C.form_id].timeZoneOffset=void 0,f(),D(),ne({form_id:C.form_id,time_zone:ee[C.form_id].timeZone})}),o){var s=V(".bookly-js-selected-date",B);s.pickadate({formatSubmit:"yyyy-mm-dd",format:ee[C.form_id].date_format,min:e.date_min||!0,max:e.date_max||!0,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,monthsFull:BooklyL10n.months,firstDay:ee[C.form_id].start_of_week,clear:!1,close:!1,today:!1,disable:e.disabled_days,closeOnSelect:!1,klass:{picker:"picker picker--opened picker--focused"},onSet:function(e){if(e.select){var o=this.get("select","yyyy-mm-dd");t[o]?(k.html(t[o]).css("left","0px"),r=v=0,p=null,x(),a.hide(),i.toggle(1!=m.length)):(D(),ne({form_id:C.form_id,selected_date:o}),f())}this.open()},onClose:function(){this.open(!1)},onRender:function(){var e=new Date(Date.UTC(this.get("view").year,this.get("view").month));V(".picker__nav--next",B).on("click",function(){e.setUTCMonth(e.getUTCMonth()+1),D(),ne({form_id:C.form_id,selected_date:e.toJSON().substr(0,10)}),f()}),V(".picker__nav--prev",B).on("click",function(){e.setUTCMonth(e.getUTCMonth()-1),D(),ne({form_id:C.form_id,selected_date:e.toJSON().substr(0,10)}),f()})}});var l=s.pickadate("picker").get("select","yyyy-mm-dd");k.html(t[l])}else{var d="";V.each(t,function(e,o){d+=o}),k.html(d)}if(e.has_slots){L?B.find(".bookly-label-error").html(L):B.find(".bookly-label-error").hide(),(y=parseInt(V(window).height()/36,10))<4?y=4:10<y&&(y=10),10<(u=parseInt(_.width()/h,10))?u=10:0==u&&(g=!0,u=4),x(),j||1!=m.length||i.hide();var c=V(".bookly-time-step",B).hammer({swipe_velocity:.1});c.on("swipeleft",function(){i.is(":visible")&&i.trigger("click")}),c.on("swiperight",function(){a.is(":visible")&&a.trigger("click")}),i.on("click",function(e){if(a.show(),m.eq(r+1).length)k.animate({left:(n?"+":"-")+(r+1)*p.width()},{duration:800}),p=m.eq(++r),_.animate({height:p.height()},{duration:800}),r+1!=m.length||j||i.hide();else if(j){var o=V("> button:last",k);0==o.length&&0==(o=V(".bookly-column:hidden:last > button:last",k)).length&&(o=V(".bookly-column:last > button:last",k));var t={action:"bookly_render_next_time",csrf_token:BooklyL10n.csrf_token,form_id:C.form_id,last_slot:o.val()},s=oe(this);V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:t,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success)if(e.has_slots){j=e.has_more_slots;var t="";V.each(T(e.slots_data,e.selected_date),function(e,o){t+=o});var o=V(t),a=o.eq(0);V('button.bookly-day[value="'+a.attr("value")+'"]',B).length&&(o=o.not(":first")),k.append(o),x(),i.trigger("click")}else i.hide();else i.hide();s.stop()}})}}),a.on("click",function(){i.show(),p=m.eq(--r),k.animate({left:(n?"+":"-")+r*p.width()},{duration:800}),_.animate({height:p.height()},{duration:800}),0===r&&a.hide()})}void 0===C&&te(B)}else de({form_id:C.form_id});function f(){V(".bookly-time-screen,.bookly-not-time-screen",B).addClass("bookly-spin-overlay");var e={lines:11,length:11,width:4,radius:5};m?new Spinner(e).spin(m.eq(r).get(0)):new Spinner(e).spin(V(".bookly-not-time-screen",B).get(0))}function x(){var e,o,t,a=V("> button",k),s=0,i=0;if(w)for(;0<a.length;)a.eq(0).hasClass("bookly-day")?(s=1,o=V('<div class="'+b+'" />'),(e=V(a.splice(0,1))).addClass("bookly-js-first-child"),o.append(e)):(s++,e=V(a.splice(0,1)),!a.length||a.eq(0).hasClass("bookly-day")?(e.addClass("bookly-last-child"),o.append(e),k.append(o)):o.append(e)),i<s&&(i=s);else for(;j?a.length>y:a.length;){o=V('<div class="'+b+'" />'),i=y,v%u!=0||a.eq(0).hasClass("bookly-day")||--i;for(var r=0;r<i&&(r+1!=i||!a.eq(0).hasClass("bookly-day"));++r)e=V(a.splice(0,1)),0==r?e.addClass("bookly-js-first-child"):r+1==i&&e.addClass("bookly-last-child"),o.append(e);k.append(o),++v}for(var n=V("> .bookly-column",k);j?n.length>=u:n.length;){t=V('<div class="bookly-time-screen"/>');for(r=0;r<u;++r){if(o=V(n.splice(0,1)),0==r){o.addClass("bookly-js-first-column");var l=o.find(".bookly-js-first-child");if(!l.hasClass("bookly-day")){var d=l.data("group"),c=V('button.bookly-day[value="'+d+'"]:last',B);o.prepend(c.clone())}}t.append(o)}k.append(t)}m=V(".bookly-time-screen",k),null===p&&(p=m.eq(0)),V("button.bookly-time-skip",B).off("click").on("click",function(e){oe(this),ee[C.form_id].skip_steps.cart?S({form_id:C.form_id,add_to_cart:!0}):ie({form_id:C.form_id,add_to_cart:!0,from_step:"time"})});var f=null;V("button.bookly-hour",B).off("click").on("click",function(e){null!=f&&(f.abort(),f=null),e.preventDefault();var o=V(this),t={action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:C.form_id,slots:this.value};o.attr({"data-style":"zoom-in","data-spinner-color":"#333","data-spinner-size":"40"}),oe(this),f=V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:t,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ee[C.form_id].skip_steps.extras||"after_step_time"!=ee[C.form_id].step_extras||ee[C.form_id].no_extras?ee[C.form_id].skip_steps.repeat?ee[C.form_id].skip_steps.cart?S({form_id:C.form_id,add_to_cart:!0}):ie({form_id:C.form_id,add_to_cart:!0,from_step:"time"}):re({form_id:C.form_id}):le({form_id:C.form_id})}})}),V(".bookly-time-step",B).width(u*h),_.height(g?39*V(".bookly-column.bookly-js-first-column button",p).length:p.height()),g=!1}}})}function T(e,s){var o={};return V.each(e,function(t,e){var a='<button class="bookly-day" value="'+t+'">'+e.title+"</button>";V.each(e.slots,function(e,o){a+='<button value="'+JSON.stringify(o.data).replace(/"/g,"&quot;")+'" data-group="'+t+'" class="bookly-hour'+("waiting-list"==o.status?" bookly-slot-in-waiting-list":"booked"==o.status?" booked":"")+'"'+("booked"==o.status?" disabled":"")+'><span class="ladda-label bookly-time-main'+(o.data[0][2]==s?" bookly-bold":"")+'"><i class="bookly-hour-icon"><span></span></i>'+o.time_text+'</span><span class="bookly-time-additional'+("waiting-list"==o.status?" bookly-waiting-list":"")+'"> '+o.additional_text+"</span></button>"}),o[t]=a}),o}function D(){null!=o&&(o.abort(),o=null)}}function le(c){var e={action:"bookly_render_extras",csrf_token:BooklyL10n.csrf_token},f=ee[c.form_id].$container;ee[c.form_id].skip_steps.service&&ee[c.form_id].use_client_time_zone&&(e.time_zone=ee[c.form_id].timeZone,e.time_zone_offset=ee[c.form_id].timeZoneOffset),V.extend(e,c),V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){BooklyL10n.csrf_token=e.csrf_token,f.html(e.html),void 0===c&&te(f);var s,i,o=V(".bookly-js-next-step",f),t=V(".bookly-js-back-step",f),a=V(".bookly-js-go-to-cart",f),r=V(".bookly-js-extras-item",f),n=V(".bookly-js-extras-summary span",f),l=e.currency,d=function(e,o){var t=e.find("input"),a=e.find(".bookly-js-extras-total-price"),s=o*parseFloat(e.data("price"));a.text(l.format.replace("1",s.toFixed(l.precision))),t.val(o),e.find(".bookly-js-extras-thumb").toggleClass("bookly-extras-selected",0<o);var i=0;r.each(function(e,o){var t=V(this),a=t.closest(".bookly-js-extras-container").data("multiplier");i+=parseFloat(t.data("price"))*t.find("input").val()*a}),i?n.html(" + "+l.format.replace("1",i.toFixed(l.precision))):n.html("")};r.each(function(e,o){var t=V(this),a=t.find("input");t.find(".bookly-js-extras-thumb").on("click",function(){d(t,0<a.val()?0:1)}),t.find(".bookly-js-count-control").on("click",function(){var e=parseInt(a.val());e=V(this).hasClass("bookly-js-extras-increment")?Math.min(t.data("max_quantity"),e+1):Math.max(0,e-1),d(t,e)})}),a.on("click",function(e){e.preventDefault(),oe(this),ie({form_id:c.form_id,from_step:"extras"})}),o.on("click",function(e){e.preventDefault(),oe(this);var a={};V(".bookly-js-extras-container",f).each(function(){var e=V(this),o=e.data("chain"),t={};e.find(".bookly-js-extras-item").each(function(e,o){s=V(this),0<(i=s.find("input")).val()&&(t[s.data("id")]=i.val())}),a[o]=JSON.stringify(t)}),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:c.form_id,extras:a},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){"before_step_time"==ee[c.form_id].step_extras?ne({form_id:c.form_id,prev_step:"extras"}):ee[c.form_id].skip_steps.repeat?ee[c.form_id].skip_steps.cart?S({form_id:c.form_id,add_to_cart:!0}):ie({form_id:c.form_id,add_to_cart:!0,from_step:"time"}):re({form_id:c.form_id})}})}),t.on("click",function(e){e.preventDefault(),oe(this),"after_step_time"!=ee[c.form_id].step_extras||ee[c.form_id].no_time?de({form_id:c.form_id}):ne({form_id:c.form_id,prev_step:"extras"})})}}})}function de(q){if(ee[q.form_id].skip_steps.service)ee[q.form_id].skip_steps.extras||"before_step_time"!=ee[q.form_id].step_extras?ne(q):le(q);else{var e={action:"bookly_render_service",csrf_token:BooklyL10n.csrf_token},P=ee[q.form_id].$container;ee[q.form_id].use_client_time_zone&&(e.time_zone=ee[q.form_id].timeZone,e.time_zone_offset=ee[q.form_id].timeZoneOffset),V.extend(e,q),V.ajax({url:BooklyL10n.ajaxurl,data:e,dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){if(e.success){BooklyL10n.csrf_token=e.csrf_token,P.html(e.html),void 0===q&&te(P);var a=V(".bookly-js-chain-item.bookly-js-draft",P),o=V(".bookly-js-select-location",P),t=V(".bookly-js-select-category",P),s=V(".bookly-js-select-service",P),i=V(".bookly-js-select-employee",P),r=V(".bookly-js-select-units-duration",P),n=V(".bookly-js-select-number-of-persons",P),l=V(".bookly-js-select-quantity",P),d=V(".bookly-js-date-from",P),c=V(".bookly-js-week-day",P),f=V(".bookly-js-select-time-from",P),m=V(".bookly-js-select-time-to",P),y=V(".bookly-js-next-step",P),u=V(".bookly-js-mobile-next-step",P),_=V(".bookly-js-mobile-prev-step",P),h=e.locations,b=e.categories,v=e.services,j=e.staff,k=e.chain,p=e.required,g=ee[q.form_id].defaults,w=e.services_per_location,x=0,C=!1,L=e.service_name_with_duration,B=e.show_ratings;d.pickadate({formatSubmit:"yyyy-mm-dd",format:ee[q.form_id].date_format,min:e.date_min||!0,max:e.date_max||!0,clear:!1,close:!1,today:BooklyL10n.today,monthsFull:BooklyL10n.months,weekdaysFull:BooklyL10n.days,weekdaysShort:BooklyL10n.daysShort,labelMonthNext:BooklyL10n.nextMonth,labelMonthPrev:BooklyL10n.prevMonth,firstDay:ee[q.form_id].start_of_week,onSet:function(e){if(V.isNumeric(e.select)){var o=new Date(e.select);V('.bookly-js-week-day[value="'+(o.getDay()+1)+'"]:not(:checked)',P).attr("checked",!0).trigger("change")}}}),V(".bookly-js-go-to-cart",P).on("click",function(e){e.preventDefault(),oe(this),ie({form_id:q.form_id,from_step:"service"})});var T=function(e,o,t){V('option:not([value=""])',e).remove();var a,s=document.createDocumentFragment();o=(a=o,Object.keys(a).map(function(e){return a[e]})).sort(function(e,o){return parseInt(e.pos)<parseInt(o.pos)?-1:parseInt(e.pos)>parseInt(o.pos)?1:0}),V.each(o,function(e,o){var t=document.createElement("option");t.value=o.id,t.text=o.name,s.appendChild(t)}),e.append(s),e.find('option[value="'+t+'"]').length&&e.val(t)},D=function(e,o,s,i,t){var r=w&&o?o:0,n={},a={},l={},d={},c=null,f=null;if(V.each(j,function(t,a){o&&!h[o].staff.hasOwnProperty(t)||(i?a.services.hasOwnProperty(i)&&V.each(a.services[i].locations,function(e,o){if(r&&r!=e)return!0;f=f?Math.min(f,o.min_capacity):o.min_capacity,c=c?Math.max(c,o.max_capacity):o.max_capacity,n[t]={id:t,name:a.name+(null==o.price||!r&&w?"":" ("+o.price+")"),pos:a.pos}}):s?V.each(a.services,function(e){if(v[e].category_id==s)return n[t]=V.extend({},a),!1}):n[t]=V.extend({},a))}),o){var m=[],y=[];w?V.each(j,function(o){V.each(j[o].services,function(e){j[o].services[e].locations.hasOwnProperty(r)&&(m.push(v[e].category_id),y.push(e))})}):V.each(h[o].staff,function(e){V.each(j[e].services,function(e){m.push(v[e].category_id),y.push(e)})}),V.each(b,function(e,o){-1<V.inArray(parseInt(e),m)&&(l[e]=o)}),V.each(v,function(e,o){-1<V.inArray(e,y)&&(s&&o.category_id!=s||t&&!j[t].services.hasOwnProperty(e)||(a[e]=o))})}else l=b,V.each(v,function(e,o){s&&o.category_id!=s||t&&!j[t].services.hasOwnProperty(e)||(a[e]=o)});for(var u=V(".bookly-js-select-number-of-persons",e).val()||1,_=i?t?j[t].services[i].locations.hasOwnProperty(r)?j[t].services[i].locations[r].max_capacity:1:c||1:1,k=i?t?j[t].services[i].locations.hasOwnProperty(r)?j[t].services[i].locations[r].min_capacity:1:f||1:1,p=k;p<=_;++p)d[p]={id:p,name:p,pos:p};_<u&&(u=_),(u<k||!ee[q.form_id].form_attributes.show_number_of_persons)&&(u=k),B&&V.each(j,function(e,o){n.hasOwnProperty(o.id)&&(i?o.services.hasOwnProperty(i)&&o.services[i].rating&&(n[o.id].name="★"+o.services[i].rating+" "+n[o.id].name):o.rating&&(n[o.id].name="★"+o.rating+" "+n[o.id].name))}),T(e.find(".bookly-js-select-category"),l,s),T(e.find(".bookly-js-select-service"),a,i),T(e.find(".bookly-js-select-employee"),n,t),T(e.find(".bookly-js-select-number-of-persons"),d,u)};P.off("click").off("change"),P.on("change",".bookly-js-select-location",function(){var e=V(this).closest(".bookly-js-chain-item"),o=this.value,t=e.find(".bookly-js-select-category").val(),a=e.find(".bookly-js-select-service").val(),s=e.find(".bookly-js-select-employee").val();if(o){var i=w?o:0;if(s&&(h[o].staff.hasOwnProperty(s)?a&&!j[s].services[a].locations.hasOwnProperty(i)&&(s=""):s=""),a){var r=!1;V.each(h[o].staff,function(e){if(j[e].services.hasOwnProperty(a)&&j[e].services[a].locations.hasOwnProperty(i))return!(r=!0)}),r||(a="")}if(t){r=!1;V.each(h[o].staff,function(e){if(V.each(j[e].services,function(e){if(v[e].category_id==t)return!(r=!0)}),r)return!1}),r||(t="")}}D(e,o,t,a,s),S(e,a,s,o)}),P.on("change",".bookly-js-select-category",function(){var e=V(this).closest(".bookly-js-chain-item"),o=e.find(".bookly-js-select-location").val(),t=this.value,a=e.find(".bookly-js-select-service").val(),s=e.find(".bookly-js-select-employee").val();if(t){if(C=!0,a&&v[a].category_id!=t&&(a=""),s){var i=!1;V.each(j[s].services,function(e){if(v[e].category_id==t)return!(i=!0)}),i||(s="")}}else C=!1;D(e,o,t,a,s)});var S=function(e,a,o,s){var t=e.find(".bookly-js-select-units-duration"),i=t.val();if(t.find("option").remove(),a){V.each(function(e){if(!e||w&&!s)return v[a].hasOwnProperty("units")?v[a].units:[{value:"",title:"-"}];var o=s||0,t=j[e].services[a].locations;return void 0===t?[{value:"",title:"-"}]:(t.hasOwnProperty(o)?t[o]:t[0]).units||[{value:"",title:"-"}]}(o),function(e,o){t.append(V("<option>",{value:o.value,text:o.title}))}),0!=t.find('option[value="'+i+'"]').length&&t.val(i)}else t.append(V("<option>",{value:"",text:"-"}))};if(P.on("change",".bookly-js-select-service",function(){var e=V(this).closest(".bookly-js-chain-item"),o=e.find(".bookly-js-select-location").val(),t=C?e.find(".bookly-js-select-category").val():"",a=this.value,s=e.find(".bookly-js-select-employee").val();a&&s&&!j[s].services.hasOwnProperty(a)&&(s=""),D(e,o,t,a,s),a&&e.find(".bookly-js-select-category").val(v[a].category_id),S(e,a,s,o)}),P.on("change",".bookly-js-select-employee",function(){var e=V(this).closest(".bookly-js-chain-item"),o=e.find(".bookly-js-select-location").val(),t=V(".bookly-js-select-category",e).val(),a=e.find(".bookly-js-select-service").val(),s=this.value;D(e,o,t,a,s),S(e,a,s,o)}),L&&V.each(v,function(e,o){o.name=o.name+" ( "+o.duration+" )"}),T(o,h),T(t,b),T(s,v),B){var O={};V.each(j,function(e,o){O[e]=V.extend({},o),o.rating&&(O[e].name="★"+o.rating+" "+O[e].name)}),T(i,O)}else T(i,j);o.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_locations),t.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_categories),s.closest(".bookly-form-group").toggle(!(ee[q.form_id].form_attributes.hide_services&&g.service_id)),i.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_staff_members),r.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_service_duration),n.closest(".bookly-form-group").toggle(ee[q.form_id].form_attributes.show_number_of_persons),l.closest(".bookly-form-group").toggle(!ee[q.form_id].form_attributes.hide_quantity),g.location_id&&o.val(g.location_id).trigger("change"),g.category_id&&t.val(g.category_id).trigger("change"),g.service_id&&s.val(g.service_id).trigger("change"),g.staff_id&&i.val(g.staff_id).trigger("change"),ee[q.form_id].form_attributes.hide_date&&V(".bookly-js-available-date",P).hide(),ee[q.form_id].form_attributes.hide_week_days&&V(".bookly-js-week-days",P).hide(),ee[q.form_id].form_attributes.hide_time_range&&V(".bookly-js-time-range",P).hide(),V.each(k,function(e,o){var t=a.clone().data("chain_key",e).removeClass("bookly-js-draft").css("display","table");a.find("select").each(function(e,o){t.find("select:eq("+e+")").val(o.value)}),0==(x=e)&&t.find('.bookly-js-actions button[data-action="drop"]').remove(),V(".bookly-js-chain-item:last",P).after(t),!ee[q.form_id].form_attributes.hide_locations&&o.location_id&&V(".bookly-js-select-location",t).val(o.location_id).trigger("change"),o.service_id&&(V(".bookly-js-select-service",t).val(o.service_id).trigger("change"),ee[q.form_id].form_attributes.hide_categories&&(ee[q.form_id].form_attributes.hasOwnProperty("const_category_id")?V(".bookly-js-select-category",t).val(ee[q.form_id].form_attributes.const_category_id):V(".bookly-js-select-category",t).val(""))),!ee[q.form_id].form_attributes.hide_staff_members&&1==o.staff_ids.length&&o.staff_ids[0]&&V(".bookly-js-select-employee",t).val(o.staff_ids[0]).trigger("change"),1<o.number_of_persons&&V(".bookly-js-select-number-of-persons",t).val(o.number_of_persons),1<o.units&&V(".bookly-js-select-units-duration",t).val(o.units),1<o.quantity&&V(".bookly-js-select-quantity",t).val(o.quantity)}),P.on("click",".bookly-js-mobile-step-1 .bookly-js-actions button",function(){switch(V(this).data("action")){case"plus":var t=a.clone();a.find("select").each(function(e,o){t.find("select:eq("+e+")").val(o.value)}),V(".bookly-js-chain-item:last",P).after(t.data("chain_key",++x).removeClass("bookly-js-draft").css("display","table"));break;case"drop":V(this).closest(".bookly-js-chain-item").remove()}}),c.on("change",function(){var e=V(this);e.is(":checked")?e.parent().not("[class*='active']").addClass("active"):e.parent().removeClass("active")}),f.on("change",function(){var e=V(this).val(),o=m.val(),t=V("option:last",f);m.empty(),f[0].selectedIndex<t.index()?V("option",this).each(function(){V(this).val()>e&&m.append(V(this).clone())}):m.append(t.clone()).val(t.val());var a=V("option:first",m).val();m.val(a<=o?o:a)});var M=function(){V(".bookly-js-select-service-error",P).hide(),V(".bookly-js-select-employee-error",P).hide(),V(".bookly-js-select-location-error",P).hide();var o=!0,t=null,a=null,s=null,i=null;return V(".bookly-js-chain-item:not(.bookly-js-draft)",P).each(function(){var e=V(this);t=V(".bookly-js-select-service",e),a=V(".bookly-js-select-employee",e),s=V(".bookly-js-select-location",e),t.removeClass("bookly-error"),a.removeClass("bookly-error"),s.removeClass("bookly-error"),t.val()||(o=!1,t.addClass("bookly-error"),V(".bookly-js-select-service-error",e).show(),i=t),p.hasOwnProperty("location")&&p.location&&!s.val()&&(o=!1,s.addClass("bookly-error"),V(".bookly-js-select-location-error",e).show(),i=s),p.staff&&!a.val()&&(o=!1,a.addClass("bookly-error"),V(".bookly-js-select-employee-error",e).show(),i=a)}),d.removeClass("bookly-error"),d.val()||(o=!1,d.addClass("bookly-error"),null===i&&(i=d)),V(".bookly-js-week-day:checked",P).length||(o=!1,null===i&&(i=c)),null!==i&&te(i),o};y.on("click",function(e){if(e.preventDefault(),M()){oe(this);var a={},s=0,i=0,r={required:2,optional:1,off:0};V(".bookly-js-chain-item:not(.bookly-js-draft)",P).each(function(){var e=V(this),o=[],t=v[V(".bookly-js-select-service",e).val()];V(".bookly-js-select-employee",e).val()?o.push(V(".bookly-js-select-employee",e).val()):V(".bookly-js-select-employee",e).find("option").each(function(){this.value&&o.push(this.value)}),a[e.data("chain_key")]={location_id:V(".bookly-js-select-location",e).val(),service_id:V(".bookly-js-select-service",e).val(),staff_ids:o,units:V(".bookly-js-select-units-duration",e).val()||1,number_of_persons:V(".bookly-js-select-number-of-persons",e).val()||1,quantity:V(".bookly-js-select-quantity",e).val()?V(".bookly-js-select-quantity",e).val():1},i=Math.max(i,r[t.hasOwnProperty("time_requirements")?t.time_requirements:"required"]),s+=t.has_extras});var o=[];V(".bookly-js-week-days .active input.bookly-js-week-day",P).each(function(){o.push(this.value)}),V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:{action:"bookly_session_save",csrf_token:BooklyL10n.csrf_token,form_id:q.form_id,chain:a,date_from:d.pickadate("picker").get("select","yyyy-mm-dd"),days:o,time_from:f.val(),time_to:m.val(),no_extras:0==s},dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){ee[q.form_id].no_time=0==i,ee[q.form_id].no_extras=0==s,ee[q.form_id].skip_steps.extras?ne({form_id:q.form_id}):0==s||"after_step_time"==ee[q.form_id].step_extras?ne({form_id:q.form_id}):le({form_id:q.form_id})}})}}),u.on("click",function(e,o){return M()&&(ee[q.form_id].skip_steps.service_part2?(oe(this),y.trigger("click")):(V(".bookly-js-mobile-step-1",P).hide(),V(".bookly-js-mobile-step-2",P).css("display","block"),1!=o&&te(P))),!1}),ee[q.form_id].skip_steps.service_part1?(u.trigger("click",[!0]),_.remove()):_.on("click",function(){return V(".bookly-js-mobile-step-1",P).show(),V(".bookly-js-mobile-step-2",P).hide(),s.val()&&V(".bookly-js-select-service",P).parent().removeClass("bookly-error"),!1})}}})}}window.bookly=function(e){var o;(ee[e.form_id]=e,ee[e.form_id].$container=V("#bookly-form-"+e.form_id),ee[e.form_id].timeZone="object"==typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0,ee[e.form_id].timeZoneOffset=(new Date).getTimezoneOffset(),ee[e.form_id].skip_steps.service=e.skip_steps.service_part1&&e.skip_steps.service_part2,"finished"==e.status.booking?ae({form_id:e.form_id}):"cancelled"==e.status.booking?se({form_id:e.form_id}):de({form_id:e.form_id,new_chain:!0}),e.hasOwnProperty("facebook")&&e.facebook.enabled&&(o=e,FB.init({appId:o.facebook.appId,status:!0,version:"v2.12"}),FB.getLoginStatus(function(e){"connected"===e.status?(o.facebook.enabled=!1,FB.api("/me",{fields:"id,name,first_name,last_name,email,link"},function(e){V.ajax({type:"POST",url:BooklyL10n.ajaxurl,data:V.extend(e,{action:"bookly_pro_facebook_login",csrf_token:BooklyL10n.csrf_token,form_id:o.form_id}),dataType:"json",xhrFields:{withCredentials:!0},crossDomain:"withCredentials"in new XMLHttpRequest,success:function(e){}})})):FB.Event.subscribe("auth.statusChange",function(e){o.facebook.onStatusChange&&o.facebook.onStatusChange(e)})})),e.hasOwnProperty("google_maps")&&e.google_maps.enabled)&&function(e,o,t){var a=document.createElement("script");a.type="text/javascript",void 0!==o&&(a.async=o);t instanceof Function&&(a.onload=t);document.head.appendChild(a),a.src=e}("https://maps.googleapis.com/maps/api/js?key="+e.google_maps.api_key+"&libraries=places",!0)}}(jQuery);
2
  //# sourceMappingURL=bookly.min.js.map
frontend/resources/js/bookly.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["bookly.js"],"names":["$","hasOwnProperty","opt","laddaStart","elem","ladda","Ladda","create","start","scrollTo","$elem","elemTop","offset","top","scrollTop","window","innerHeight","animate","stepComplete","params","data","extend","action","csrf_token","BooklyL10n","$container","form_id","ajax","url","ajaxurl","dataType","xhrFields","withCredentials","crossDomain","XMLHttpRequest","success","response","final_step_url","error","document","location","href","html","stepPayment","type","page_url","URL","split","disabled","save","status","booking","$payments","$apply_coupon_button","$coupon_input","$coupon_error","$deposit_mode","$coupon_info_text","$buttons","on","hide","this","val","show","eq","trigger","deposit_full","e","text","removeClass","coupon_code","errors","addClass","stop","$form","is","hasClass","preventDefault","stripe","card_action","find","card","number","cvc","exp_month","exp_year","cardPayment","handleErrorCartItemNotAvailable","error_message","Stripe","setPublishableKey","createToken","message","closest","length","payment_type","payment_id","submit","stepDetails","done","skip_steps","cart","stepTime","stepCart","failed_key","failed_cart_key","intlTelInput","update_details_dialog","woocommerce","google_maps","enabled","each","autocompleteInput","autocomplete","google","maps","places","Autocomplete","types","autocompleteFeidls","selector","getFieldValueByType","short","useShortName","addressComponents","getPlace","address_components","i","addressType","addListener","forEach","field","element","initGooglePlacesAutocomplete","body","phone_number","$guest_info","$phone_field","$email_field","$email_confirm_field","$birthday_day_field","$birthday_month_field","$birthday_year_field","$address_country_field","$address_state_field","$address_postcode_field","$address_city_field","$address_street_field","$address_street_number_field","$address_additional_field","$address_country_error","$address_state_error","$address_postcode_error","$address_city_error","$address_street_error","$address_street_number_error","$address_additional_error","$birthday_day_error","$birthday_month_error","$birthday_year_error","$full_name_field","$first_name_field","$last_name_field","$notes_field","$custom_field","$info_field","$phone_error","$email_error","$email_confirm_error","$name_error","$first_name_error","$last_name_error","$captcha","$custom_error","$info_error","$modals","$login_modal","$cst_modal","$next_btn","$errors","map","fn","toArray","$fields","populateForm","full_name","first_name","last_name","birthday","dateParts","year","parseInt","month","day","phone","country","state","postcode","city","street","street_number","additional_address","email","info_fields","id","value","filter","prop","preferredCountries","initialCountry","geoIpLookup","callback","get","always","resp","countryCode","utilsScript","utils","remove","appendTo","delegateTarget","end","log","pwd","rememberme","fadeOut","facebook","FB","XFBML","parse","parent","onStatusChange","undefined","api","fields","userInfo","force_update_customer","checkbox_values","custom_fields","captcha_ids","$this","push","$cf_container","key","custom_fields_data","JSON","stringify","email_confirm","address_iso","notes","empty","cart_url","$scroll_to","appointments_limit_reached","name","errorElement","formElement","field_id","$div","$custom_fields_collector","customer","no_time","no_extras","stepService","stepExtras","repeat","extras","step_extras","stepRepeat","css","attr","captcha_url","from_step","cart_prev_step","new_chain","$cart_item","cart_key","remove_cart_key","$trs_to_remove","delay","total_waiting_list","waiting_list_price","waiting_list_deposit","subtotal_price","subtotal_deposit","pay_now_deposit","pay_now_tax","total_price","total_tax","edit_cart_item","$repeat_enabled","$next_step","$repeat_container","$variants","$repeat_variant","$button_get_schedule","$variant_weekly","$variant_monthly","$date_until","$repeat_times","$monthly_specific_day","$monthly_week_day","$repeat_every_day","$week_day","$schedule_container","$days_error","$schedule_slots","$intersection_info","$info_help","$info_wells","$pagination","$schedule_row_template","pages_warning_info","short_date_format","bound_date","min","date_min","max","date_max","schedule","prepareButtonNextState","is_disabled","new_prop_disabled","deleted","addTimeSlotControl","$schedule_row","options","preferred_time","selected_time","prefer","$time","index","option","$option","title","append","toggle","renderSchedulePage","page","$row","count","warning_pages","j","clone","datetime","display_date","all_day_service_time","display_time","another_time","$btn","replace","join","renderFullSchedule","item","row_index","$date","$edit_button","ladda_round","pickadate","formatSubmit","format","clear","close","today","monthsFull","months","weekdaysFull","days","weekdaysShort","daysShort","labelMonthNext","nextMonth","labelMonthPrev","prevMonth","firstDay","start_of_week","onSet","exclude","slots","date","set","Date","$date_container","$time_container","$select","isDateMatchesSelections","current_date","inArray","toLowerCase","week_days","diff","date_from","startOf","checked_week_days","endOf","month_diff","updateRepeatDate","number_of_times","repeat_times","slice","date_until","moment_until","moment","add","isBefore","subtract","updateRepeatTimes","date_format","open_repeat_onchange","repeated","repeat_data","repeat_params","until","every","weekday","could_be_repeated","not","off","unrepeat","slots_to_send","concat","add_to_cart","xhr_render_time","time","prev_step","service","use_client_time_zone","time_zone","timeZone","time_zone_offset","timeZoneOffset","$screens","slots_per_column","columns_per_screen","$columnizer_wrap","$columnizer","$time_next_button","$time_prev_button","$current_screen","column_width","time_slots_wide","column_class","columns","screen_index","has_more_slots","form_hidden","show_calendar","is_rtl","show_day_per_column","day_one_column","prepareSlotsHtml","slots_data","selected_date","showSpinner","dropAjax","$input","disable","disabled_days","closeOnSelect","klass","picker","select","initSlots","open","onClose","onRender","UTC","setUTCMonth","getUTCMonth","toJSON","substr","group","group_slots","has_slots","height","width","hammertime","hammer","swipe_velocity","left","duration","$button","last_slot","$html","$first_day","opts","lines","radius","Spinner","spin","$column","$screen","slots_count","max_slots","splice","$columns","$first_slot","$group_slot","prepend","xhr_session_save","abort","data-style","data-spinner-color","data-spinner-size","slot","time_text","additional_text","$back_step","$goto_cart","$extras_items","$extras_summary","currency","extrasChanged","$extras_item","quantity","$total","parseFloat","toFixed","precision","toggleClass","amount","multiplier","Math","$extras_container","chain_id","chain_extras","$chain_item_draft","$select_location","$select_category","$select_service","$select_employee","$select_duration","$select_nop","$select_quantity","$date_from","$select_time_from","$select_time_to","$mobile_next_step","$mobile_prev_step","locations","categories","services","staff","chain","required","defaults","services_per_location","last_chain_key","category_selected","service_name_with_duration","show_ratings","timestamp","isNumeric","getDay","setSelect","obj","docFragment","createDocumentFragment","Object","keys","sort","a","b","pos","object","createElement","appendChild","setSelects","$chain_item","location_id","category_id","service_id","staff_id","_location_id","_staff","_services","_categories","_nop","_max_capacity","_min_capacity","staff_member","loc_id","loc_srv","min_capacity","max_capacity","price","s_id","category_ids","service_ids","st_id","category","nop","form_attributes","show_number_of_persons","rating","valid","updateServiceDurationSelect","$units_duration","current_duration","locationId","staffLocations","units","getUnitsByStaffId","hide_locations","hide_categories","hide_services","hide_staff_members","hide_service_duration","hide_quantity","hide_date","hide_week_days","hide_time_range","chain_item","after","const_category_id","staff_ids","number_of_persons","$new_chain","start_time","end_time","$last_time_entry","selectedIndex","first_value","stepServiceValidator","$chain","has_extras","time_requirements","_time_requirements","optional","_service","time_from","time_to","skip_scroll","service_part2","service_part1","bookly","Intl","DateTimeFormat","resolvedOptions","getTimezoneOffset","init","appId","version","getLoginStatus","Event","subscribe","src","async","onLoad","script","Function","onload","head","importScript","api_key","jQuery"],"mappings":"CAAC,SAAUA,GACP,aAEAA,EAAIA,GAAKA,EAAEC,eAAe,WAAaD,EAAW,QAAIA,EA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,IAAI,MAAO,CAACC,OAAQ,2CAA4C,SAASC,GACxE3O,EAAE2B,KAAK,CACHiB,KAAM,OACNhB,IAAKJ,WAAWK,QAChBT,KAAMpB,EAAEqB,OAAOsN,EAAU,CACrBrN,OAAc,4BACdC,WAAcC,WAAWD,WACzBG,QAAc4S,EAAQ5S,UAE1BI,SAAU,OACVC,UAAW,CAACC,iBAAiB,GAC7BC,YAAa,oBAAqB,IAAIC,eACtCC,QAAS,SAAUC,UAI3B+L,GAAGia,MAAMC,UAAU,oBAAqB,SAASjmB,GACzCkS,EAAQpG,SAASK,gBACjB+F,EAAQpG,SAASK,eAAenM,QAtC5CkS,EAAQrU,eAAe,gBAAkBqU,EAAQzN,YAAYC,UA6CrE,SAAsBwhB,EAAKC,EAAOC,GAC9B,IAAIC,EAASlmB,SAAS8gB,cAAc,UACpCoF,EAAO7lB,KAAO,uBAEA4L,IAAV+Z,IACAE,EAAOF,MAAQA,GAEfC,aAAkBE,WAClBD,EAAOE,OAASH,GAGpBjmB,SAASqmB,KAAKtF,YAAYmF,GAC1BA,EAAOH,IAAMA,EArDTO,CAFU,+CADGvU,EAAQzN,YAAYiiB,QACmC,qBAElD,IA1qG9B,CAkuGEC"}
1
+ {"version":3,"sources":["bookly.js"],"names":["$","hasOwnProperty","opt","laddaStart","elem","ladda","Ladda","create","start","scrollTo","$elem","elemTop","offset","top","scrollTop","window","innerHeight","animate","stepComplete","params","data","extend","action","csrf_token","BooklyL10n","$container","form_id","ajax","url","ajaxurl","dataType","xhrFields","withCredentials","crossDomain","XMLHttpRequest","success","response","final_step_url","error","document","location","href","html","stepPayment","type","page_url","URL","split","disabled","save","status","booking","$payments","$apply_coupon_button","$coupon_input","$coupon_error","$deposit_mode","$coupon_info_text","$buttons","on","hide","this","val","show","eq","trigger","deposit_full","e","text","removeClass","coupon_code","errors","addClass","stop","$form","is","hasClass","preventDefault","stripe","card_action","find","card","number","cvc","exp_month","exp_year","cardPayment","handleErrorCartItemNotAvailable","error_message","Stripe","setPublishableKey","createToken","message","closest","length","payment_type","payment_id","submit","stepDetails","done","skip_steps","cart","stepTime","stepCart","failed_key","failed_cart_key","intlTelInput","update_details_dialog","woocommerce","google_maps","enabled","each","autocompleteInput","autocomplete","google","maps","places","Autocomplete","types","autocompleteFeidls","selector","getFieldValueByType","short","useShortName","addressComponents","getPlace","address_components","i","addressType","addListener","forEach","field","element","initGooglePlacesAutocomplete","body","phone_number","$guest_info","$phone_field","$email_field","$email_confirm_field","$birthday_day_field","$birthday_month_field","$birthday_year_field","$address_country_field","$address_state_field","$address_postcode_field","$address_city_field","$address_street_field","$address_street_number_field","$address_additional_field","$address_country_error","$address_state_error","$address_postcode_error","$address_city_error","$address_street_error","$address_street_number_error","$address_additional_error","$birthday_day_error","$birthday_month_error","$birthday_year_error","$full_name_field","$first_name_field","$last_name_field","$notes_field","$custom_field","$info_field","$phone_error","$email_error","$email_confirm_error","$name_error","$first_name_error","$last_name_error","$captcha","$custom_error","$info_error","$modals","$login_modal","$cst_modal","$next_btn","$errors","map","fn","toArray","$fields","populateForm","full_name","first_name","last_name","birthday","dateParts","year","parseInt","month","day","phone","country","state","postcode","city","street","street_number","additional_address","email","info_fields","id","value","filter","prop","preferredCountries","initialCountry","geoIpLookup","callback","get","always","resp","countryCode","utilsScript","utils","remove","appendTo","delegateTarget","end","log","pwd","rememberme","fadeOut","facebook","FB","XFBML","parse","parent","onStatusChange","undefined","api","fields","userInfo","force_update_customer","checkbox_values","custom_fields","captcha_ids","$this","push","$cf_container","key","custom_fields_data","JSON","stringify","email_confirm","address_iso","notes","empty","cart_url","$scroll_to","appointments_limit_reached","name","errorElement","formElement","field_id","$div","$custom_fields_collector","customer","no_time","no_extras","stepService","stepExtras","repeat","extras","step_extras","stepRepeat","css","attr","captcha_url","from_step","cart_prev_step","new_chain","$cart_item","cart_key","remove_cart_key","$trs_to_remove","delay","total_waiting_list","waiting_list_price","waiting_list_deposit","subtotal_price","subtotal_deposit","pay_now_deposit","pay_now_tax","total_price","total_tax","edit_cart_item","$repeat_enabled","$next_step","$repeat_container","$variants","$repeat_variant","$button_get_schedule","$variant_weekly","$variant_monthly","$date_until","$repeat_times","$monthly_specific_day","$monthly_week_day","$repeat_every_day","$week_day","$schedule_container","$days_error","$schedule_slots","$intersection_info","$info_help","$info_wells","$pagination","$schedule_row_template","pages_warning_info","short_date_format","bound_date","min","date_min","max","date_max","schedule","prepareButtonNextState","is_disabled","new_prop_disabled","deleted","addTimeSlotControl","$schedule_row","options","preferred_time","selected_time","prefer","$time","index","option","$option","title","append","toggle","renderSchedulePage","page","$row","count","warning_pages","j","clone","datetime","display_date","all_day_service_time","display_time","another_time","$btn","replace","join","renderFullSchedule","item","row_index","$date","$edit_button","ladda_round","pickadate","formatSubmit","format","clear","close","today","monthsFull","months","weekdaysFull","days","weekdaysShort","daysShort","labelMonthNext","nextMonth","labelMonthPrev","prevMonth","firstDay","start_of_week","onSet","exclude","slots","date","set","Date","$date_container","$time_container","$select","isDateMatchesSelections","current_date","inArray","toLowerCase","week_days","diff","date_from","startOf","checked_week_days","endOf","month_diff","updateRepeatDate","number_of_times","repeat_times","slice","date_until","moment_until","moment","add","isBefore","subtract","updateRepeatTimes","date_format","open_repeat_onchange","repeated","repeat_data","repeat_params","until","every","weekday","could_be_repeated","not","off","unrepeat","slots_to_send","concat","add_to_cart","xhr_render_time","time","prev_step","service","use_client_time_zone","time_zone","timeZone","time_zone_offset","timeZoneOffset","$screens","slots_per_column","columns_per_screen","$columnizer_wrap","$columnizer","$time_next_button","$time_prev_button","$current_screen","column_width","time_slots_wide","column_class","columns","screen_index","has_more_slots","form_hidden","show_calendar","is_rtl","show_day_per_column","day_one_column","prepareSlotsHtml","slots_data","selected_date","showSpinner","dropAjax","$input","disable","disabled_days","closeOnSelect","klass","picker","select","initSlots","open","onClose","onRender","UTC","setUTCMonth","getUTCMonth","toJSON","substr","group","group_slots","has_slots","height","width","hammertime","hammer","swipe_velocity","left","duration","$button","last_slot","$html","$first_day","opts","lines","radius","Spinner","spin","$column","$screen","slots_count","max_slots","splice","$columns","$first_slot","$group_slot","prepend","xhr_session_save","abort","data-style","data-spinner-color","data-spinner-size","slot","time_text","additional_text","$back_step","$goto_cart","$extras_items","$extras_summary","currency","extrasChanged","$extras_item","quantity","$total","parseFloat","toFixed","precision","toggleClass","amount","multiplier","Math","$extras_container","chain_id","chain_extras","$chain_item_draft","$select_location","$select_category","$select_service","$select_employee","$select_duration","$select_nop","$select_quantity","$date_from","$select_time_from","$select_time_to","$mobile_next_step","$mobile_prev_step","locations","categories","services","staff","chain","required","defaults","services_per_location","last_chain_key","category_selected","service_name_with_duration","show_ratings","timestamp","isNumeric","getDay","setSelect","obj","docFragment","createDocumentFragment","Object","keys","sort","a","b","pos","object","createElement","appendChild","setSelects","$chain_item","location_id","category_id","service_id","staff_id","_location_id","_staff","_services","_categories","_nop","_max_capacity","_min_capacity","staff_member","loc_id","loc_srv","min_capacity","max_capacity","price","s_id","category_ids","service_ids","st_id","category","nop","form_attributes","show_number_of_persons","rating","valid","updateServiceDurationSelect","$units_duration","current_duration","locationId","staffLocations","units","getUnitsByStaffId","hide_locations","hide_categories","hide_services","hide_staff_members","hide_service_duration","hide_quantity","hide_date","hide_week_days","hide_time_range","chain_item","after","const_category_id","staff_ids","number_of_persons","$new_chain","start_time","end_time","$last_time_entry","selectedIndex","first_value","stepServiceValidator","$chain","has_extras","time_requirements","_time_requirements","optional","_service","time_from","time_to","skip_scroll","service_part2","service_part1","bookly","Intl","DateTimeFormat","resolvedOptions","getTimezoneOffset","init","appId","version","getLoginStatus","Event","subscribe","src","async","onLoad","script","Function","onload","head","importScript","api_key","jQuery"],"mappings":"CAAC,SAAUA,GACP,aAEAA,EAAIA,GAAKA,EAAEC,eAAe,WAAaD,EAAW,QAAIA,EAEtD,IAAIE,GAAM,GAKV,SAASC,GAAWC,GAChB,IAAIC,EAAQC,MAAMC,OAAOH,GAEzB,OADAC,EAAMG,QACCH,EAQX,SAASI,GAASC,GACd,IAAIC,EAAYD,E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EAASc,QACToR,EAAQpG,SAASpH,SAAU,EAC3BqH,GAAGM,IAAI,MAAO,CAACC,OAAQ,2CAA4C,SAASC,GACxE3O,EAAE2B,KAAK,CACHiB,KAAM,OACNhB,IAAKJ,WAAWK,QAChBT,KAAMpB,EAAEqB,OAAOsN,EAAU,CACrBrN,OAAc,4BACdC,WAAcC,WAAWD,WACzBG,QAAc4S,EAAQ5S,UAE1BI,SAAU,OACVC,UAAW,CAACC,iBAAiB,GAC7BC,YAAa,oBAAqB,IAAIC,eACtCC,QAAS,SAAUC,UAI3B+L,GAAGia,MAAMC,UAAU,oBAAqB,SAASjmB,GACzCkS,EAAQpG,SAASK,gBACjB+F,EAAQpG,SAASK,eAAenM,QAtC5CkS,EAAQrU,eAAe,gBAAkBqU,EAAQzN,YAAYC,UA6CrE,SAAsBwhB,EAAKC,EAAOC,GAC9B,IAAIC,EAASlmB,SAAS8gB,cAAc,UACpCoF,EAAO7lB,KAAO,uBAEA4L,IAAV+Z,IACAE,EAAOF,MAAQA,GAEfC,aAAkBE,WAClBD,EAAOE,OAASH,GAGpBjmB,SAASqmB,KAAKtF,YAAYmF,GAC1BA,EAAOH,IAAMA,EArDTO,CAFU,+CADGvU,EAAQzN,YAAYiiB,QACmC,qBAElD,IAnrG9B,CA2uGEC"}
frontend/resources/js/src/service_step.js CHANGED
@@ -181,14 +181,23 @@ export default function stepService(params) {
181
  } else {
182
  var category_ids = [],
183
  service_ids = [];
184
- $.each(_staff, function (st_id) {
185
- $.each(staff[st_id].services, function (s_id) {
186
- if (staff[st_id].services[s_id].locations.hasOwnProperty(_location_id)) {
 
 
 
 
 
 
 
 
 
187
  category_ids.push(services[s_id].category_id);
188
  service_ids.push(s_id);
189
- }
190
  });
191
- });
192
  $.each(categories, function(id, category) {
193
  if ($.inArray(parseInt(id), category_ids) > -1) {
194
  _categories[id] = category;
181
  } else {
182
  var category_ids = [],
183
  service_ids = [];
184
+ if (services_per_location) {
185
+ $.each(staff, function (st_id) {
186
+ $.each(staff[st_id].services, function (s_id) {
187
+ if (staff[st_id].services[s_id].locations.hasOwnProperty(_location_id)) {
188
+ category_ids.push(services[s_id].category_id);
189
+ service_ids.push(s_id);
190
+ }
191
+ });
192
+ });
193
+ } else {
194
+ $.each(locations[location_id].staff, function(st_id) {
195
+ $.each(staff[st_id].services, function(s_id) {
196
  category_ids.push(services[s_id].category_id);
197
  service_ids.push(s_id);
198
+ });
199
  });
200
+ }
201
  $.each(categories, function(id, category) {
202
  if ($.inArray(parseInt(id), category_ids) > -1) {
203
  _categories[id] = category;
lib/Cart.php CHANGED
@@ -435,7 +435,7 @@ class Cart
435
  Proxy\Shared::prepareStatement( 0, 'COALESCE(s.padding_left,0)', 'Service' ),
436
  Proxy\Shared::prepareStatement( 0, 'COALESCE(s.padding_right,0)', 'Service' ) ) )
437
  ->leftJoin( 'Appointment', 'a', 'a.id = ca.appointment_id' )
438
- ->leftJoin( 'StaffService', 'ss', 'ss.staff_id = a.staff_id AND ss.service_id = a.service_id' )
439
  ->leftJoin( 'Service', 's', 's.id = a.service_id' )
440
  ->where( 'a.staff_id', $staff_id )
441
  ->whereIn( 'ca.status', array( Entities\CustomerAppointment::STATUS_PENDING, Entities\CustomerAppointment::STATUS_APPROVED ) )
435
  Proxy\Shared::prepareStatement( 0, 'COALESCE(s.padding_left,0)', 'Service' ),
436
  Proxy\Shared::prepareStatement( 0, 'COALESCE(s.padding_right,0)', 'Service' ) ) )
437
  ->leftJoin( 'Appointment', 'a', 'a.id = ca.appointment_id' )
438
+ ->leftJoin( 'StaffService', 'ss', 'ss.staff_id = a.staff_id AND ss.service_id = a.service_id AND ss.location_id <=> a.location_id' )
439
  ->leftJoin( 'Service', 's', 's.id = a.service_id' )
440
  ->where( 'a.staff_id', $staff_id )
441
  ->whereIn( 'ca.status', array( Entities\CustomerAppointment::STATUS_PENDING, Entities\CustomerAppointment::STATUS_APPROVED ) )
lib/Plugin.php CHANGED
@@ -32,6 +32,7 @@ abstract class Plugin extends Base\Plugin
32
  Backend\Components\Dialogs\Customer\Edit\Ajax::init();
33
  Backend\Components\Dialogs\Customer\Delete\Ajax::init();
34
  Backend\Components\Dialogs\Payment\Ajax::init();
 
35
  Backend\Components\Notices\CollectStatsAjax::init();
36
  Backend\Components\Notices\LiteRebrandingAjax::init();
37
  Backend\Components\Notices\NpsAjax::init();
@@ -95,6 +96,17 @@ abstract class Plugin extends Base\Plugin
95
  }, 99, 1 );
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
98
  // Register and schedule routines.
99
  Routines::init();
100
  }
32
  Backend\Components\Dialogs\Customer\Edit\Ajax::init();
33
  Backend\Components\Dialogs\Customer\Delete\Ajax::init();
34
  Backend\Components\Dialogs\Payment\Ajax::init();
35
+ Backend\Components\Gutenberg\BooklyForm\Block::init();
36
  Backend\Components\Notices\CollectStatsAjax::init();
37
  Backend\Components\Notices\LiteRebrandingAjax::init();
38
  Backend\Components\Notices\NpsAjax::init();
96
  }, 99, 1 );
97
  }
98
 
99
+ // Gutenberg category
100
+ add_filter( 'block_categories', function ( $categories, $post ) {
101
+ return array_merge( array(
102
+ array(
103
+ 'slug' => 'bookly-blocks',
104
+ 'title' => 'Bookly',
105
+ ), ),
106
+ $categories
107
+ );
108
+ }, 10, 2 );
109
+
110
  // Register and schedule routines.
111
  Routines::init();
112
  }
lib/base/Block.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Bookly\Lib\Base;
3
+
4
+ use Bookly\Lib;
5
+
6
+ /**
7
+ * Class Block
8
+ * @package Bookly\Lib\Base
9
+ */
10
+ abstract class Block extends Component
11
+ {
12
+ /**
13
+ * Register WP Ajax actions.
14
+ */
15
+ public static function init()
16
+ {
17
+ if ( is_admin() && function_exists( 'register_block_type' ) ) {
18
+ if ( substr( $_SERVER['PHP_SELF'], '-8' ) == 'post.php' ||
19
+ substr( $_SERVER['PHP_SELF'], '-12' ) == 'post-new.php'
20
+ ) {
21
+ /** @var static $class */
22
+ $class = get_called_class();
23
+ add_action( 'init', function () use ( $class ) {
24
+ $class::registerBlockType();
25
+ } );
26
+ }
27
+ }
28
+ }
29
+
30
+ /**
31
+ * Register block for gutenberg
32
+ */
33
+ public static function registerBlockType()
34
+ {
35
+
36
+ }
37
+
38
+ }
lib/notifications/Codes.php CHANGED
@@ -77,6 +77,7 @@ class Codes
77
  public $staff_phone;
78
  public $staff_photo;
79
  public $staff_rating_url;
 
80
  public $total_price;
81
  public $total_price_no_tax;
82
  public $total_tax;
@@ -324,6 +325,7 @@ class Codes
324
  '{total_tax}' => Utils\Price::format( $this->total_tax ),
325
  '{total_price_no_tax}' => Utils\Price::format( $this->total_price - $this->total_tax ),
326
  '{cancellation_reason}' => $this->cancellation_reason,
 
327
  );
328
  $codes['{cancel_appointment}'] = $format == 'html'
329
  ? sprintf( '<a href="%1$s">%1$s</a>', $codes['{cancel_appointment_url}'] )
@@ -411,6 +413,7 @@ class Codes
411
  $item->getCA()->getTimeZoneOffset() !== null ? 'UTC' . Utils\DateTime::guessTimeZone( - $item->getCA()->getTimeZoneOffset() * 60 ) : ''
412
  );
413
  $codes->number_of_persons = $item->getCA()->getNumberOfPersons();
 
414
  $codes->service_price = $item->getServicePrice();
415
  $codes->service_duration = $item->getServiceDuration();
416
  $codes->staff_email = $item->getStaff()->getEmail();
77
  public $staff_phone;
78
  public $staff_photo;
79
  public $staff_rating_url;
80
+ public $status;
81
  public $total_price;
82
  public $total_price_no_tax;
83
  public $total_tax;
325
  '{total_tax}' => Utils\Price::format( $this->total_tax ),
326
  '{total_price_no_tax}' => Utils\Price::format( $this->total_price - $this->total_tax ),
327
  '{cancellation_reason}' => $this->cancellation_reason,
328
+ '{status}' => Entities\CustomerAppointment::statusToString( $this->status ),
329
  );
330
  $codes['{cancel_appointment}'] = $format == 'html'
331
  ? sprintf( '<a href="%1$s">%1$s</a>', $codes['{cancel_appointment_url}'] )
413
  $item->getCA()->getTimeZoneOffset() !== null ? 'UTC' . Utils\DateTime::guessTimeZone( - $item->getCA()->getTimeZoneOffset() * 60 ) : ''
414
  );
415
  $codes->number_of_persons = $item->getCA()->getNumberOfPersons();
416
+ $codes->status = $item->getCA()->getStatus();
417
  $codes->service_price = $item->getServicePrice();
418
  $codes->service_duration = $item->getServiceDuration();
419
  $codes->staff_email = $item->getStaff()->getEmail();
main.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Bookly
4
  Plugin URI: https://www.booking-wp-plugin.com/?utm_source=bookly_admin&utm_medium=plugins_page&utm_campaign=plugins_page
5
  Description: Bookly Plugin – is a great easy-to-use and easy-to-manage booking tool for service providers who think about their customers. The plugin supports a wide range of services provided by business and individuals who offer reservations through websites. Set up any reservation quickly, pleasantly and easily with Bookly!
6
- Version: 16.6
7
  Author: Bookly
8
  Author URI: https://www.booking-wp-plugin.com/?utm_source=bookly_admin&utm_medium=plugins_page&utm_campaign=plugins_page
9
  Text Domain: bookly
3
  Plugin Name: Bookly
4
  Plugin URI: https://www.booking-wp-plugin.com/?utm_source=bookly_admin&utm_medium=plugins_page&utm_campaign=plugins_page
5
  Description: Bookly Plugin – is a great easy-to-use and easy-to-manage booking tool for service providers who think about their customers. The plugin supports a wide range of services provided by business and individuals who offer reservations through websites. Set up any reservation quickly, pleasantly and easily with Bookly!
6
+ Version: 16.7
7
  Author: Bookly
8
  Author URI: https://www.booking-wp-plugin.com/?utm_source=bookly_admin&utm_medium=plugins_page&utm_campaign=plugins_page
9
  Text Domain: bookly
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: Ladela
3
  Tags: Booking, booking system, appointment booking, Booking calendar, reservation calendar, appointment scheduler, appointment calendar
4
  Donate link: https://www.booking-wp-plugin.com/
5
  Requires at least: 3.7
6
- Tested up to: 4.9.8
7
  Requires PHP: 5.3.7
8
- Stable tag: 16.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -277,4 +277,4 @@ Upon the completion of these steps, customers can book appointments. In the Cale
277
  Visit our [changelog page](https://www.booking-wp-plugin.com/change-log/?utm_campaign=wp_FAQ&utm_medium=cpc&utm_source=WP_ORG) to stay up-to-date.
278
 
279
  == Upgrade Notice ==
280
- Upgrade now to the most recent version of Bookly.
3
  Tags: Booking, booking system, appointment booking, Booking calendar, reservation calendar, appointment scheduler, appointment calendar
4
  Donate link: https://www.booking-wp-plugin.com/
5
  Requires at least: 3.7
6
+ Tested up to: 5.0.3
7
  Requires PHP: 5.3.7
8
+ Stable tag: 16.7
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
277
  Visit our [changelog page](https://www.booking-wp-plugin.com/change-log/?utm_campaign=wp_FAQ&utm_medium=cpc&utm_source=WP_ORG) to stay up-to-date.
278
 
279
  == Upgrade Notice ==
280
+ Upgrade now to the most recent version of Bookly.